Merge branch 'rawhide/user/kyle/kernel-git' into rawhide/user/myoung/xendom0
Conflicts: config-x86-generic config-x86_64-generic kernel.spec
This commit is contained in:
commit
890c8ce6ae
|
@ -1,26 +0,0 @@
|
|||
From 56a2432f60ea0a0c85a93b0951ae8507e5b85270 Mon Sep 17 00:00:00 2001
|
||||
From: dennis <dennis@daedalus.ausil.us>
|
||||
Date: Wed, 5 Jan 2011 19:43:25 +0000
|
||||
Subject: [PATCH] use __devexit not __exit in n2_unregister_algs fixes build failure on fedora
|
||||
|
||||
thanks to kylem for helping with debugging
|
||||
---
|
||||
drivers/crypto/n2_core.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/drivers/crypto/n2_core.c b/drivers/crypto/n2_core.c
|
||||
index 88ee015..3372491 100644
|
||||
--- a/drivers/crypto/n2_core.c
|
||||
+++ b/drivers/crypto/n2_core.c
|
||||
@@ -1542,7 +1542,7 @@ out:
|
||||
return err;
|
||||
}
|
||||
|
||||
-static void __exit n2_unregister_algs(void)
|
||||
+static void __devexit n2_unregister_algs(void)
|
||||
{
|
||||
mutex_lock(&spu_lock);
|
||||
if (!--algs_registered)
|
||||
--
|
||||
1.6.6.1
|
||||
|
4
Makefile
4
Makefile
|
@ -94,6 +94,8 @@ debug:
|
|||
@perl -pi -e 's/# CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER is not set/CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_TEST_LIST_SORT is not set/CONFIG_TEST_LIST_SORT=y/' config-nodebug
|
||||
|
||||
@perl -pi -e 's/# CONFIG_DEBUG_SET_MODULE_RONX is not set/CONFIG_DEBUG_SET_MODULE_RONX=y/' config-nodebug
|
||||
|
||||
@# just in case we're going from extremedebug -> debug
|
||||
@perl -pi -e 's/CONFIG_DEBUG_PAGEALLOC=y/# CONFIG_DEBUG_PAGEALLOC is not set/' config-nodebug
|
||||
|
||||
|
@ -171,6 +173,8 @@ release:
|
|||
@perl -pi -e 's/CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y/# CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_TEST_LIST_SORT=y/# CONFIG_TEST_LIST_SORT is not set/' config-nodebug
|
||||
|
||||
@perl -pi -e 's/CONFIG_DEBUG_SET_MODULE_RONX=y/# CONFIG_DEBUG_SET_MODULE_RONX is not set/' config-nodebug
|
||||
|
||||
@perl -pi -e 's/CONFIG_DEBUG_PAGEALLOC=y/# CONFIG_DEBUG_PAGEALLOC is not set/' config-debug
|
||||
@perl -pi -e 's/CONFIG_DEBUG_PAGEALLOC=y/# CONFIG_DEBUG_PAGEALLOC is not set/' config-nodebug
|
||||
|
||||
|
|
|
@ -1,94 +0,0 @@
|
|||
From kyle@infradead.org Wed Sep 22 18:35:38 2010
|
||||
From: Matthew Garrett <mjg@redhat.com>
|
||||
To: linux-acpi@vger.kernel.org
|
||||
Cc: linux-kernel@vger.kernel.org, Matthew Garrett <mjg@redhat.com>
|
||||
Subject: [PATCH] acpi: Update battery information on notification 0x81
|
||||
Date: Mon, 16 Aug 2010 16:32:19 -0400
|
||||
|
||||
A notification event 0x81 from an ACPI battery device requires us to
|
||||
re-read the battery information structure. Do so, and if the battery's
|
||||
reporting units have changed (as is the case on some Thinkpads) destroy
|
||||
and recreate the battery in order to populate the fields correctly.
|
||||
|
||||
Signed-off-by: Matthew Garrett <mjg@redhat.com>
|
||||
---
|
||||
|
||||
drivers/acpi/battery.c | 21 ++++++++++++++++-----
|
||||
1 files changed, 16 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
|
||||
index 95649d3..161e43a 100644
|
||||
--- a/drivers/acpi/battery.c
|
||||
+++ b/drivers/acpi/battery.c
|
||||
@@ -152,6 +152,7 @@ static int acpi_battery_technology(struct acpi_battery *battery)
|
||||
return POWER_SUPPLY_TECHNOLOGY_UNKNOWN;
|
||||
}
|
||||
|
||||
+static int acpi_battery_update(struct acpi_battery *battery, bool get_info);
|
||||
static int acpi_battery_get_state(struct acpi_battery *battery);
|
||||
|
||||
static int acpi_battery_is_charged(struct acpi_battery *battery)
|
||||
@@ -605,9 +606,11 @@ static void acpi_battery_quirks2(struct acpi_battery *battery)
|
||||
}
|
||||
}
|
||||
|
||||
-static int acpi_battery_update(struct acpi_battery *battery)
|
||||
+static int acpi_battery_update(struct acpi_battery *battery, bool get_info)
|
||||
{
|
||||
int result, old_present = acpi_battery_present(battery);
|
||||
+ int old_power_unit = battery->power_unit;
|
||||
+
|
||||
result = acpi_battery_get_status(battery);
|
||||
if (result)
|
||||
return result;
|
||||
@@ -626,6 +629,14 @@ static int acpi_battery_update(struct acpi_battery *battery)
|
||||
}
|
||||
if (!battery->bat.dev)
|
||||
sysfs_add_battery(battery);
|
||||
+ if (get_info) {
|
||||
+ acpi_battery_get_info(battery);
|
||||
+ if (old_power_unit != battery->power_unit) {
|
||||
+ /* The battery has changed its reporting units */
|
||||
+ sysfs_remove_battery(battery);
|
||||
+ sysfs_add_battery(battery);
|
||||
+ }
|
||||
+ }
|
||||
result = acpi_battery_get_state(battery);
|
||||
acpi_battery_quirks2(battery);
|
||||
return result;
|
||||
@@ -803,7 +814,7 @@ static print_func acpi_print_funcs[ACPI_BATTERY_NUMFILES] = {
|
||||
static int acpi_battery_read(int fid, struct seq_file *seq)
|
||||
{
|
||||
struct acpi_battery *battery = seq->private;
|
||||
- int result = acpi_battery_update(battery);
|
||||
+ int result = acpi_battery_update(battery, false);
|
||||
return acpi_print_funcs[fid](seq, result);
|
||||
}
|
||||
|
||||
@@ -914,7 +925,7 @@ static void acpi_battery_notify(struct acpi_device *device, u32 event)
|
||||
if (!battery)
|
||||
return;
|
||||
old = battery->bat.dev;
|
||||
- acpi_battery_update(battery);
|
||||
+ acpi_battery_update(battery, (event == ACPI_BATTERY_NOTIFY_INFO));
|
||||
acpi_bus_generate_proc_event(device, event,
|
||||
acpi_battery_present(battery));
|
||||
acpi_bus_generate_netlink_event(device->pnp.device_class,
|
||||
@@ -943,7 +954,7 @@ static int acpi_battery_add(struct acpi_device *device)
|
||||
if (ACPI_SUCCESS(acpi_get_handle(battery->device->handle,
|
||||
"_BIX", &handle)))
|
||||
set_bit(ACPI_BATTERY_XINFO_PRESENT, &battery->flags);
|
||||
- acpi_battery_update(battery);
|
||||
+ acpi_battery_update(battery, false);
|
||||
#ifdef CONFIG_ACPI_PROCFS_POWER
|
||||
result = acpi_battery_add_fs(device);
|
||||
#endif
|
||||
@@ -984,7 +995,7 @@ static int acpi_battery_resume(struct acpi_device *device)
|
||||
return -EINVAL;
|
||||
battery = acpi_driver_data(device);
|
||||
battery->update_time = 0;
|
||||
- acpi_battery_update(battery);
|
||||
+ acpi_battery_update(battery, true);
|
||||
return 0;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -89,6 +89,8 @@ CONFIG_USB_TUSB6010=y
|
|||
# CONFIG_USB_MUSB_DEBUG is not set
|
||||
|
||||
CONFIG_MMC_ARMMMCI=m
|
||||
CONFIG_MMC_DW=m
|
||||
# CONFIG_MMC_DW_IDMAC is not set
|
||||
|
||||
CONFIG_RTC_DRV_PL030=m
|
||||
CONFIG_RTC_DRV_PL031=m
|
||||
|
@ -129,3 +131,7 @@ CONFIG_SECCOMP=y
|
|||
CONFIG_STRICT_DEVMEM=y
|
||||
|
||||
# CONFIG_AMBA_PL08X is not set
|
||||
|
||||
# CONFIG_HVC_DCC is not set
|
||||
|
||||
CONFIG_SPARSE_IRQ=y
|
||||
|
|
|
@ -97,3 +97,5 @@ CONFIG_KDB_KEYBOARD=y
|
|||
|
||||
CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y
|
||||
CONFIG_TEST_LIST_SORT=y
|
||||
|
||||
CONFIG_DEBUG_SET_MODULE_RONX=y
|
||||
|
|
|
@ -40,6 +40,7 @@ CONFIG_SYSCTL=y
|
|||
CONFIG_LOG_BUF_SHIFT=17
|
||||
# CONFIG_IKCONFIG is not set
|
||||
# CONFIG_EMBEDDED is not set
|
||||
# CONFIG_EXPERT is not set
|
||||
CONFIG_KALLSYMS=y
|
||||
CONFIG_KALLSYMS_ALL=y
|
||||
CONFIG_KALLSYMS_EXTRA_PASS=y
|
||||
|
@ -123,6 +124,7 @@ CONFIG_SDIO_UART=m
|
|||
# CONFIG_MMC_TEST is not set
|
||||
# CONFIG_MMC_DEBUG is not set
|
||||
# CONFIG_MMC_UNSAFE_RESUME is not set
|
||||
# CONFIG_MMC_CLKGATE is not set
|
||||
CONFIG_MMC_BLOCK=m
|
||||
CONFIG_MMC_BLOCK_MINORS=8
|
||||
CONFIG_MMC_BLOCK_BOUNCE=y
|
||||
|
@ -564,6 +566,7 @@ CONFIG_SATA_SX4=m
|
|||
CONFIG_SATA_ULI=m
|
||||
CONFIG_SATA_VIA=m
|
||||
CONFIG_SATA_VITESSE=m
|
||||
CONFIG_SATA_ACARD_AHCI=m
|
||||
|
||||
CONFIG_PATA_ACPI=m
|
||||
CONFIG_PATA_ALI=m
|
||||
|
@ -687,6 +690,7 @@ CONFIG_DM_ZERO=y
|
|||
CONFIG_DM_LOG_USERSPACE=m
|
||||
CONFIG_DM_MULTIPATH_QL=m
|
||||
CONFIG_DM_MULTIPATH_ST=m
|
||||
CONFIG_DM_RAID=m
|
||||
|
||||
#
|
||||
# Fusion MPT device support
|
||||
|
@ -1436,6 +1440,7 @@ CONFIG_B43_PCMCIA=y
|
|||
CONFIG_B43_SDIO=y
|
||||
# CONFIG_B43_DEBUG is not set
|
||||
CONFIG_B43_PHY_LP=y
|
||||
CONFIG_B43_PHY_N=y
|
||||
# CONFIG_B43_FORCE_PIO is not set
|
||||
CONFIG_B43LEGACY=m
|
||||
# CONFIG_B43LEGACY_DEBUG is not set
|
||||
|
@ -1503,12 +1508,12 @@ CONFIG_RT2500PCI=m
|
|||
CONFIG_RT61PCI=m
|
||||
CONFIG_RT2500USB=m
|
||||
CONFIG_RT2800USB=m
|
||||
# CONFIG_RT2800USB_RT30XX is not set
|
||||
# CONFIG_RT2800USB_RT35XX is not set
|
||||
# CONFIG_RT2800USB_UNKNOWN is not set
|
||||
CONFIG_RT2800USB_RT33XX=y
|
||||
CONFIG_RT2800USB_RT35XX=y
|
||||
CONFIG_RT2800USB_UNKNOWN=y
|
||||
CONFIG_RT2800PCI=m
|
||||
# CONFIG_RT2800PCI_RT30XX is not set
|
||||
# CONFIG_RT2800PCI_RT35XX is not set
|
||||
CONFIG_RT2800PCI_RT33XX=y
|
||||
CONFIG_RT2800PCI_RT35XX=y
|
||||
CONFIG_RT73USB=m
|
||||
CONFIG_RTL8180=m
|
||||
CONFIG_RTL8187=m
|
||||
|
@ -1520,7 +1525,13 @@ CONFIG_ZD1211RW=m
|
|||
# CONFIG_ZD1211RW_DEBUG is not set
|
||||
CONFIG_AR9170_USB=m
|
||||
|
||||
CONFIG_WL12XX=y
|
||||
CONFIG_WL12XX_MENU=m
|
||||
CONFIG_WL12XX=m
|
||||
# CONFIG_WL12XX_HT is not set
|
||||
CONFIG_WL12XX_SPI=m
|
||||
CONFIG_WL12XX_SDIO=m
|
||||
# CONFIG_WL12XX_SDIO_TEST is not set
|
||||
|
||||
CONFIG_WL1251=m
|
||||
CONFIG_WL1251_SPI=m
|
||||
CONFIG_WL1251_SDIO=m
|
||||
|
@ -1528,6 +1539,8 @@ CONFIG_WL1271=m
|
|||
CONFIG_WL1271_SDIO=m
|
||||
CONFIG_WL1271_SPI=m
|
||||
|
||||
CONFIG_RTL8192CE=m
|
||||
|
||||
#
|
||||
# Token Ring devices
|
||||
#
|
||||
|
@ -1583,7 +1596,8 @@ CONFIG_CAN_ESD_USB2=m
|
|||
CONFIG_CAN_KVASER_PCI=m
|
||||
CONFIG_CAN_PLX_PCI=m
|
||||
CONFIG_CAN_TSCAN1=m
|
||||
CONFIG_PCH_CAN=m
|
||||
CONFIG_CAN_SLCAN=m
|
||||
# CONFIG_PCH_CAN is not set
|
||||
CONFIG_NETROM=m
|
||||
CONFIG_ROSE=m
|
||||
CONFIG_MKISS=m
|
||||
|
@ -1832,6 +1846,8 @@ CONFIG_INPUT_CM109=m
|
|||
CONFIG_INPUT_POLLDEV=m
|
||||
CONFIG_INPUT_SPARSEKMAP=m
|
||||
# CONFIG_INPUT_ADXL34X is not set
|
||||
CONFIG_INPUT_CMA3000=m
|
||||
CONFIG_INPUT_CMA3000_I2C=m
|
||||
|
||||
#
|
||||
# Input I/O drivers
|
||||
|
@ -1911,6 +1927,7 @@ CONFIG_JOYSTICK_XPAD=m
|
|||
CONFIG_JOYSTICK_XPAD_FF=y
|
||||
CONFIG_JOYSTICK_XPAD_LEDS=y
|
||||
CONFIG_JOYSTICK_ZHENHUA=m
|
||||
# CONFIG_JOYSTICK_AS5011 is not set
|
||||
|
||||
CONFIG_INPUT_TOUCHSCREEN=y
|
||||
# CONFIG_TOUCHSCREEN_AD7879 is not set
|
||||
|
@ -1941,6 +1958,7 @@ CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
|
|||
# CONFIG_TOUCHSCREEN_WM97XX is not set
|
||||
CONFIG_TOUCHSCREEN_W90X900=m
|
||||
# CONFIG_TOUCHSCREEN_BU21013 is not set
|
||||
CONFIG_TOUCHSCREEN_ST1232=m
|
||||
|
||||
CONFIG_INPUT_MISC=y
|
||||
CONFIG_INPUT_PCSPKR=m
|
||||
|
@ -2067,6 +2085,7 @@ CONFIG_I2C_ALGOPCA=m
|
|||
# CONFIG_I2C_ISCH is not set
|
||||
# CONFIG_I2C_NFORCE2_S4985 is not set
|
||||
# CONFIG_I2C_INTEL_MID is not set
|
||||
# CONFIG_I2C_EG20T is not set
|
||||
|
||||
CONFIG_EEPROM_AT24=m
|
||||
CONFIG_EEPROM_LEGACY=m
|
||||
|
@ -2198,10 +2217,13 @@ CONFIG_SENSORS_LTC4261=m
|
|||
# CONFIG_SENSORS_GPIO_FAN is not set
|
||||
CONFIG_SENSORS_W83795=m
|
||||
# CONFIG_SENSORS_W83795_FANCTRL is not set
|
||||
CONFIG_SENSORS_DS620=m
|
||||
CONFIG_SENSORS_SHT21=m
|
||||
|
||||
# CONFIG_HMC6352 is not set
|
||||
# CONFIG_BMP085 is not set
|
||||
# CONFIG_PCH_PHUB is not set
|
||||
# CONFIG_SERIAL_PCH_UART is not set
|
||||
|
||||
CONFIG_W1=m
|
||||
CONFIG_W1_CON=y
|
||||
|
@ -2218,6 +2240,8 @@ CONFIG_W1_SLAVE_DS2431=m
|
|||
CONFIG_W1_SLAVE_DS2433=m
|
||||
CONFIG_W1_SLAVE_DS2433_CRC=y
|
||||
CONFIG_W1_SLAVE_DS2760=m
|
||||
CONFIG_W1_SLAVE_DS2423=m
|
||||
|
||||
#
|
||||
# Mice
|
||||
#
|
||||
|
@ -2418,6 +2442,7 @@ CONFIG_VIDEO_EM28XX_DVB=m
|
|||
CONFIG_VIDEO_CX231XX=m
|
||||
CONFIG_VIDEO_CX231XX_ALSA=m
|
||||
CONFIG_VIDEO_CX231XX_DVB=m
|
||||
CONFIG_VIDEO_CX231XX_RC=y
|
||||
CONFIG_VIDEO_HEXIUM_ORION=m
|
||||
CONFIG_VIDEO_HEXIUM_GEMINI=m
|
||||
CONFIG_VIDEO_IVTV=m
|
||||
|
@ -2447,6 +2472,7 @@ CONFIG_VIDEO_ZORAN_ZR36060=m
|
|||
CONFIG_VIDEO_FB_IVTV=m
|
||||
CONFIG_VIDEO_SAA7164=m
|
||||
CONFIG_VIDEO_TLG2300=m
|
||||
# CONFIG_VIDEO_TIMBERDALE is not set
|
||||
|
||||
CONFIG_USB_VIDEO_CLASS=m
|
||||
CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
|
||||
|
@ -2457,6 +2483,7 @@ CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
|
|||
CONFIG_RADIO_GEMTEK_PCI=m
|
||||
CONFIG_RADIO_MAXIRADIO=m
|
||||
CONFIG_RADIO_MAESTRO=m
|
||||
CONFIG_RADIO_WL1273=m
|
||||
|
||||
CONFIG_MEDIA_ATTACH=y
|
||||
CONFIG_MEDIA_TUNER_CUSTOMISE=y
|
||||
|
@ -2573,6 +2600,7 @@ CONFIG_DVB_LGS8GL5=m
|
|||
CONFIG_DVB_DUMMY_FE=m
|
||||
CONFIG_DVB_FIREDTV=m
|
||||
CONFIG_DVB_NGENE=m
|
||||
CONFIG_DVB_MB86A20S=m
|
||||
|
||||
#
|
||||
# Supported SAA7146 based PCI Adapters
|
||||
|
@ -2637,6 +2665,8 @@ CONFIG_VIDEO_PVRUSB2=m
|
|||
CONFIG_VIDEO_PVRUSB2_SYSFS=y
|
||||
# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
|
||||
|
||||
CONFIG_RC_CORE=m
|
||||
CONFIG_RC_LOOPBACK=m
|
||||
CONFIG_RC_MAP=m
|
||||
CONFIG_IR_NEC_DECODER=m
|
||||
CONFIG_IR_RC5_DECODER=m
|
||||
|
@ -3016,6 +3046,7 @@ CONFIG_HID_3M_PCT=y
|
|||
CONFIG_LOGIG940_FF=y
|
||||
CONFIG_HID_MAGICMOUSE=y
|
||||
CONFIG_HID_MOSART=y
|
||||
CONFIG_HID_MULTITOUCH=m
|
||||
CONFIG_HID_NTRIG=y
|
||||
CONFIG_HID_QUANTA=y
|
||||
CONFIG_HID_STANTUM=y
|
||||
|
@ -3041,10 +3072,12 @@ CONFIG_HID_THRUSTMASTER=m
|
|||
CONFIG_HID_ZEROPLUS=m
|
||||
CONFIG_HID_ZYDACRON=m
|
||||
CONFIG_HID_ACRUX_FF=m
|
||||
CONFIG_HID_EMS_FF=m
|
||||
CONFIG_HID_ELECOM=m
|
||||
CONFIG_HID_UCLOGIC=m
|
||||
CONFIG_HID_WALTOP=m
|
||||
CONFIG_HID_ROCCAT_PYRA=m
|
||||
CONFIG_HID_ROCCAT_KONEPLUS=m
|
||||
|
||||
#
|
||||
# USB Imaging devices
|
||||
|
@ -3127,6 +3160,7 @@ CONFIG_SOC_CAMERA_RJ54N1=m
|
|||
CONFIG_SOC_CAMERA_OV9640=m
|
||||
CONFIG_SOC_CAMERA_OV6650=m
|
||||
CONFIG_SOC_CAMERA_IMX074=m
|
||||
CONFIG_SOC_CAMERA_OV2640=m
|
||||
|
||||
#
|
||||
# USB Network adaptors
|
||||
|
@ -3148,6 +3182,7 @@ CONFIG_USB_NET_MCS7830=m
|
|||
CONFIG_USB_NET_RNDIS_HOST=m
|
||||
CONFIG_USB_NET_CDC_SUBSET=m
|
||||
CONFIG_USB_NET_CDC_EEM=m
|
||||
CONFIG_USB_NET_CDC_NCM=m
|
||||
CONFIG_USB_NET_ZAURUS=m
|
||||
CONFIG_USB_NET_CX82310_ETH=m
|
||||
CONFIG_USB_NET_INT51X1=m
|
||||
|
@ -3355,6 +3390,7 @@ CONFIG_MFD_WM8400=m
|
|||
# CONFIG_MFD_RDC321X is not set
|
||||
# CONFIG_MFD_JANZ_CMODIO is not set
|
||||
# CONFIG_MFD_WM831X_I2C is not set
|
||||
CONFIG_MFD_CS5535=m
|
||||
|
||||
#
|
||||
# File systems
|
||||
|
@ -3481,6 +3517,7 @@ CONFIG_CRAMFS=m
|
|||
CONFIG_SQUASHFS=m
|
||||
CONFIG_SQUASHFS_XATTR=y
|
||||
CONFIG_SQUASHFS_LZO=y
|
||||
CONFIG_SQUASHFS_XZ=y
|
||||
# CONFIG_SQUASHFS_EMBEDDED is not set
|
||||
CONFIG_VXFS_FS=m
|
||||
# CONFIG_HPFS_FS is not set
|
||||
|
@ -3695,12 +3732,14 @@ CONFIG_AUDITSYSCALL=y
|
|||
#
|
||||
CONFIG_CRYPTO=y
|
||||
CONFIG_CRYPTO_FIPS=y
|
||||
CONFIG_CRYPTO_USER_API_HASH=y
|
||||
CONFIG_CRYPTO_USER_API_SKCIPHER=y
|
||||
CONFIG_CRYPTO_MANAGER_TESTS=y
|
||||
CONFIG_CRYPTO_HW=y
|
||||
CONFIG_CRYPTO_BLKCIPHER=y
|
||||
CONFIG_CRYPTO_MANAGER=m
|
||||
# CONFIG_CRYPTO_CRYPTD is not set
|
||||
CONFIG_CRYPTO_AES=m
|
||||
CONFIG_CRYPTO_AES=y
|
||||
CONFIG_CRYPTO_ARC4=m
|
||||
CONFIG_CRYPTO_ANUBIS=m
|
||||
CONFIG_CRYPTO_AUTHENC=m
|
||||
|
@ -3708,14 +3747,14 @@ CONFIG_CRYPTO_BLOWFISH=m
|
|||
CONFIG_CRYPTO_CAMELLIA=m
|
||||
CONFIG_CRYPTO_CAST5=m
|
||||
CONFIG_CRYPTO_CAST6=m
|
||||
CONFIG_CRYPTO_CBC=m
|
||||
CONFIG_CRYPTO_CBC=y
|
||||
CONFIG_CRYPTO_CCM=m
|
||||
CONFIG_CRYPTO_CRC32C=y
|
||||
CONFIG_CRYPTO_CTR=m
|
||||
CONFIG_CRYPTO_CTR=y
|
||||
CONFIG_CRYPTO_CTS=m
|
||||
CONFIG_CRYPTO_DEFLATE=m
|
||||
CONFIG_CRYPTO_DES=m
|
||||
CONFIG_CRYPTO_ECB=m
|
||||
CONFIG_CRYPTO_ECB=y
|
||||
CONFIG_CRYPTO_FCRYPT=m
|
||||
CONFIG_CRYPTO_GCM=m
|
||||
CONFIG_CRYPTO_GF128MUL=m
|
||||
|
@ -3773,6 +3812,8 @@ CONFIG_ZLIB_DEFLATE=m
|
|||
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_KEYS=y
|
||||
CONFIG_TRUSTED_KEYS=m
|
||||
CONFIG_ENCRYPTED_KEYS=m
|
||||
CONFIG_KEYS_DEBUG_PROC_KEYS=y
|
||||
CONFIG_CDROM_PKTCDVD=m
|
||||
CONFIG_CDROM_PKTCDVD_BUFFERS=8
|
||||
|
@ -3801,6 +3842,7 @@ CONFIG_FAIR_GROUP_SCHED=y
|
|||
CONFIG_SCHED_OMIT_FRAME_POINTER=y
|
||||
CONFIG_GROUP_SCHED=y
|
||||
CONFIG_RT_GROUP_SCHED=y
|
||||
CONFIG_SCHED_AUTOGROUP=y
|
||||
|
||||
CONFIG_CPUSETS=y
|
||||
CONFIG_PROC_PID_CPUSET=y
|
||||
|
@ -4076,15 +4118,17 @@ CONFIG_POWER_SUPPLY=m
|
|||
# CONFIG_POWER_SUPPLY_DEBUG is not set
|
||||
# CONFIG_TEST_POWER is not set
|
||||
CONFIG_APM_POWER=m
|
||||
CONFIG_WM831X_POWER=m
|
||||
# CONFIG_WM831X_POWER is not set
|
||||
# CONFIG_BATTERY_DS2760 is not set
|
||||
# CONFIG_BATTERY_DS2782 is not set
|
||||
# CONFIG_BATTERY_BQ20Z75 is not set
|
||||
# CONFIG_CHARGER_ISP1704 is not set
|
||||
CONFIG_BATTERY_PMU=m
|
||||
CONFIG_BATTERY_BQ27x00=m
|
||||
CONFIG_BATTERY_MAX17040=m
|
||||
# CONFIG_BATTERY_BQ27x00 is not set
|
||||
# CONFIG_BATTERY_MAX17040 is not set
|
||||
# CONFIG_PDA_POWER is not set
|
||||
# CONFIG_CHARGER_GPIO is not set
|
||||
# CONFIG_BATTERY_MAX17042 is not set
|
||||
|
||||
CONFIG_AUXDISPLAY=y
|
||||
|
||||
|
@ -4280,6 +4324,9 @@ CONFIG_USB_ATMEL=m
|
|||
# CONFIG_BCM_WIMAX is not set
|
||||
# CONFIG_FT1000 is not set
|
||||
# CONFIG_SPEAKUP is not set
|
||||
# CONFIG_DX_SEP is not set
|
||||
# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set
|
||||
# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set
|
||||
|
||||
#
|
||||
# Android
|
||||
|
@ -4322,6 +4369,7 @@ CONFIG_STRIP_ASM_SYMS=y
|
|||
|
||||
# CONFIG_RCU_FANOUT_EXACT is not set
|
||||
CONFIG_RCU_FAST_NO_HZ=y
|
||||
CONFIG_SRCU_SYNCHRONIZE_DELAY=10
|
||||
|
||||
CONFIG_KSM=y
|
||||
CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
|
||||
|
@ -4340,6 +4388,9 @@ CONFIG_PPS=m
|
|||
# CONFIG_PPS_CLIENT_KTIMER is not set
|
||||
CONFIG_PPS_CLIENT_LDISC=m
|
||||
# CONFIG_PPS_DEBUG is not set
|
||||
CONFIG_PPS_CLIENT_PARPORT=m
|
||||
CONFIG_PPS_GENERATOR_PARPORT=m
|
||||
CONFIG_NTP_PPS=y
|
||||
|
||||
# CONFIG_USB_SERIAL_QUATECH2 is not set
|
||||
# CONFIG_VT6655 is not set
|
||||
|
@ -4405,6 +4456,7 @@ CONFIG_GPIO_SYSFS=y
|
|||
# CONFIG_GPIO_BASIC_MMIO is not set
|
||||
# CONFIG_GPIO_VX855 is not set
|
||||
# CONFIG_GPIO_PCH is not set
|
||||
# CONFIG_GPIO_ML_IOH is not set
|
||||
|
||||
CONFIG_KSYM_TRACER=y
|
||||
CONFIG_PROFILE_KSYM_TRACER=y
|
||||
|
@ -4415,14 +4467,28 @@ CONFIG_KPROBE_EVENT=y
|
|||
CONFIG_IR_CORE=m
|
||||
CONFIG_IR_ENE=m
|
||||
CONFIG_IR_STREAMZAP=m
|
||||
CONFIG_IR_WINBOND_CIR=m
|
||||
|
||||
# CONFIG_GPIO_SX150X is not set
|
||||
# CONFIG_MFD_STMPE is not set
|
||||
# CONFIG_MFD_MAX8998 is not set
|
||||
# CONFIG_MFD_TPS6586X is not set
|
||||
# CONFIG_MFD_TC3589X is not set
|
||||
|
||||
CONFIG_SPARSE_RCU_POINTER=y
|
||||
|
||||
# CONFIG_PM_OPP is not set
|
||||
|
||||
CONFIG_BKL=y
|
||||
|
||||
CONFIG_EVENT_POWER_TRACING_DEPRECATED=y
|
||||
|
||||
# CONFIG_XZ_DEC_TEST is not set
|
||||
|
||||
CONFIG_NFC_DEVICES=y
|
||||
CONFIG_PN544_NFC=m
|
||||
|
||||
CONFIG_TARGET_CORE=m
|
||||
CONFIG_TCM_IBLOCK=m
|
||||
CONFIG_TCM_FILEIO=m
|
||||
CONFIG_TCM_PSCSI=m
|
||||
|
|
|
@ -139,6 +139,7 @@ CONFIG_ACPI_VIDEO=m
|
|||
# CONFIG_ACPI_PROC_EVENT is not set
|
||||
CONFIG_ACPI_HED=m
|
||||
CONFIG_ACPI_EC_DEBUGFS=m
|
||||
CONFIG_ACPI_IPMI=m
|
||||
|
||||
CONFIG_PM=y
|
||||
CONFIG_HOTPLUG_PCI=y
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
# This file is intentionally left empty in the stock kernel. Its a nicety
|
||||
# added for those wanting to do custom rebuilds with altered config opts.
|
|
@ -97,3 +97,5 @@ CONFIG_KDB_KEYBOARD=y
|
|||
|
||||
# CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER is not set
|
||||
# CONFIG_TEST_LIST_SORT is not set
|
||||
|
||||
# CONFIG_DEBUG_SET_MODULE_RONX is not set
|
||||
|
|
|
@ -335,4 +335,6 @@ CONFIG_SERIAL_GRLIB_GAISLER_APBUART=m
|
|||
|
||||
# CONFIG_PPC_MPC512x is not set
|
||||
|
||||
CONFIG_MPC512X_DMA=m
|
||||
|
||||
CONFIG_KVM_GUEST=y
|
||||
|
|
|
@ -182,3 +182,5 @@ CONFIG_PPC_SMLPAR=y
|
|||
CONFIG_CMM=y
|
||||
#-- DLPAR memory remove
|
||||
# CONFIG_SPARSEMEM_VMEMMAP is not set
|
||||
|
||||
CONFIG_PSERIES_ENERGY=m
|
||||
|
|
|
@ -203,3 +203,7 @@ CONFIG_FB_XVR1000=y
|
|||
CONFIG_CRYPTO_DEV_NIAGARA2=y
|
||||
|
||||
CONFIG_JUMP_LABEL=y
|
||||
|
||||
# CONFIG_MTD_OF_PARTS is not set
|
||||
# CONFIG_MTD_PHYSMAP_OF is not set
|
||||
# CONFIG_MMC_SDHCI_OF is not set
|
||||
|
|
|
@ -154,6 +154,7 @@ CONFIG_ACPI_HED=m
|
|||
CONFIG_ACPI_APEI=y
|
||||
CONFIG_ACPI_APEI_GHES=m
|
||||
# CONFIG_ACPI_APEI_EINJ is not set
|
||||
CONFIG_ACPI_IPMI=m
|
||||
|
||||
#
|
||||
# CPUFreq processor drivers
|
||||
|
@ -373,6 +374,9 @@ CONFIG_XEN_NETDEV_FRONTEND=m
|
|||
CONFIG_XEN_PCIDEV_FRONTEND=m
|
||||
CONFIG_XENFS=m
|
||||
CONFIG_XEN_COMPAT_XENFS=y
|
||||
CONFIG_XEN_BACKEND=y
|
||||
CONFIG_XEN_DEBUG_FS=y
|
||||
CONFIG_XEN_PLATFORM_PCI=m
|
||||
CONFIG_XEN_GNTDEV=m
|
||||
|
||||
CONFIG_MTD_ESB2ROM=m
|
||||
|
@ -408,6 +412,8 @@ CONFIG_SENSORS_I5K_AMB=m
|
|||
# CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set
|
||||
|
||||
CONFIG_HP_WATCHDOG=m
|
||||
CONFIG_NV_TCO=m
|
||||
CONFIG_SP5100_TCO=m
|
||||
|
||||
CONFIG_OLPC=y
|
||||
CONFIG_OLPC_OPENFIRMWARE=y
|
||||
|
@ -445,7 +451,6 @@ CONFIG_X86_RESERVE_LOW_64K=y
|
|||
|
||||
CONFIG_PANASONIC_LAPTOP=m
|
||||
|
||||
CONFIG_XEN_DEBUG_FS=y
|
||||
CONFIG_X86_PTRACE_BTS=y
|
||||
|
||||
CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y
|
||||
|
@ -509,7 +514,6 @@ CONFIG_HPWDT_NMI_DECODING=y
|
|||
# CONFIG_MFD_TPS6586X is not set
|
||||
# CONFIG_INTEL_MID_DMAC is not set
|
||||
CONFIG_PCH_DMA=m
|
||||
CONFIG_XEN_PLATFORM_PCI=m
|
||||
# CONFIG_ACPI_QUICKSTART is not set
|
||||
CONFIG_IDEAPAD_ACPI=m
|
||||
CONFIG_INTEL_IPS=m
|
||||
|
@ -527,3 +531,16 @@ CONFIG_PCH_GBE=m
|
|||
CONFIG_PCH_PHUB=m
|
||||
|
||||
CONFIG_JUMP_LABEL=y
|
||||
|
||||
CONFIG_X86_32_IRIS=m
|
||||
|
||||
CONFIG_TRANSPARENT_HUGEPAGE=y
|
||||
|
||||
CONFIG_CRYPTO_AES_NI_INTEL=m
|
||||
|
||||
CONFIG_MTD_OF_PARTS=m
|
||||
CONFIG_MTD_PHYSMAP_OF=m
|
||||
CONFIG_PROC_DEVICETREE=y
|
||||
CONFIG_SERIAL_OF_PLATFORM=m
|
||||
CONFIG_SERIAL_GRLIB_GAISLER_APBUART=m
|
||||
# CONFIG_MMC_SDHCI_OF is not set
|
||||
|
|
|
@ -13,6 +13,7 @@ CONFIG_X86_CPUID=y
|
|||
CONFIG_MTRR=y
|
||||
CONFIG_NUMA=y
|
||||
CONFIG_K8_NUMA=y
|
||||
CONFIG_AMD_NUMA=y
|
||||
CONFIG_X86_64_ACPI_NUMA=y
|
||||
# CONFIG_NUMA_EMU is not set
|
||||
CONFIG_NR_CPUS=256
|
||||
|
@ -97,6 +98,7 @@ CONFIG_ACPI_HED=m
|
|||
CONFIG_ACPI_APEI=y
|
||||
CONFIG_ACPI_APEI_GHES=m
|
||||
# CONFIG_ACPI_APEI_EINJ is not set
|
||||
CONFIG_ACPI_IPMI=m
|
||||
|
||||
CONFIG_X86_PLATFORM_DEVICES=y
|
||||
CONFIG_ASUS_LAPTOP=m
|
||||
|
@ -154,8 +156,8 @@ CONFIG_CRYPTO_DEV_PADLOCK=m
|
|||
CONFIG_CRYPTO_DEV_PADLOCK_AES=m
|
||||
CONFIG_CRYPTO_DEV_PADLOCK_SHA=m
|
||||
|
||||
CONFIG_CRYPTO_AES_X86_64=m
|
||||
CONFIG_CRYPTO_AES_NI_INTEL=m
|
||||
CONFIG_CRYPTO_AES_X86_64=y
|
||||
CONFIG_CRYPTO_AES_NI_INTEL=y
|
||||
CONFIG_CRYPTO_TWOFISH_X86_64=m
|
||||
CONFIG_CRYPTO_SALSA20_X86_64=m
|
||||
|
||||
|
@ -304,7 +306,10 @@ CONFIG_XENFS=m
|
|||
CONFIG_XEN_COMPAT_XENFS=y
|
||||
CONFIG_XEN_DEV_EVTCHN=m
|
||||
CONFIG_XEN_SYS_HYPERVISOR=y
|
||||
CONFIG_XEN_BACKEND=y
|
||||
CONFIG_XEN_GNTDEV=m
|
||||
CONFIG_XEN_DEBUG_FS=y
|
||||
CONFIG_XEN_PLATFORM_PCI=m
|
||||
|
||||
CONFIG_DMADEVICES=y
|
||||
CONFIG_INTEL_IOATDMA=m
|
||||
|
@ -317,6 +322,8 @@ CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
|
|||
# CONFIG_CPA_DEBUG is not set
|
||||
|
||||
CONFIG_HP_WATCHDOG=m
|
||||
CONFIG_NV_TCO=m
|
||||
CONFIG_SP5100_TCO=m
|
||||
|
||||
CONFIG_FRAME_WARN=2048
|
||||
|
||||
|
@ -356,7 +363,6 @@ CONFIG_X86_RESERVE_LOW_64K=y
|
|||
|
||||
CONFIG_PANASONIC_LAPTOP=m
|
||||
|
||||
CONFIG_XEN_DEBUG_FS=y
|
||||
CONFIG_X86_PTRACE_BTS=y
|
||||
|
||||
CONFIG_I7300_IDLE=m
|
||||
|
@ -421,7 +427,6 @@ CONFIG_HPWDT_NMI_DECODING=y
|
|||
# CONFIG_MFD_TPS6586X is not set
|
||||
# CONFIG_INTEL_MID_DMAC is not set
|
||||
CONFIG_PCH_DMA=m
|
||||
CONFIG_XEN_PLATFORM_PCI=m
|
||||
# CONFIG_ACPI_QUICKSTART is not set
|
||||
CONFIG_IDEAPAD_ACPI=m
|
||||
CONFIG_INTEL_IPS=m
|
||||
|
@ -440,3 +445,5 @@ CONFIG_VIDEO_VIA_CAMERA=m
|
|||
CONFIG_JUMP_LABEL=y
|
||||
|
||||
CONFIG_HP_ILO=m
|
||||
|
||||
CONFIG_TRANSPARENT_HUGEPAGE=y
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
omgwtfbbqchainsaw?
|
||||
---
|
||||
drivers/gpu/drm/i915/i915_gem.c | 5 +++++
|
||||
drivers/gpu/drm/i915/i915_gem_execbuffer.c | 5 +++++
|
||||
1 files changed, 5 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
|
||||
index 8eb8453..36fa9d7 100644
|
||||
--- a/drivers/gpu/drm/i915/i915_gem.c
|
||||
+++ b/drivers/gpu/drm/i915/i915_gem.c
|
||||
@@ -3692,6 +3692,11 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
|
||||
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
|
||||
index e698343..21e601d1 100644
|
||||
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
|
||||
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
|
||||
@@ -1090,6 +1090,11 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
|
||||
if (ret)
|
||||
goto pre_mutex_err;
|
||||
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
From patchwork Tue Jan 4 18:46:49 2011
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: drm/i915: check eDP encoder correctly when setting modes
|
||||
Date: Tue, 04 Jan 2011 18:46:49 -0000
|
||||
From: Jesse Barnes <jbarnes@virtuousgeek.org>
|
||||
X-Patchwork-Id: 451441
|
||||
Message-Id: <1294166809-3316-1-git-send-email-jbarnes@virtuousgeek.org>
|
||||
To: intel-gfx@lists.freedesktop.org
|
||||
|
||||
We were using a stale pointer in the check which caused us to use CPU
|
||||
attached DP params when we should have been using PCH attached params.
|
||||
|
||||
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
|
||||
|
||||
---
|
||||
drivers/gpu/drm/i915/intel_display.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
|
||||
index fe56cb3..28d58ef 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_display.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_display.c
|
||||
@@ -3949,7 +3949,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
|
||||
int lane = 0, link_bw, bpp;
|
||||
/* CPU eDP doesn't require FDI link, so just set DP M/N
|
||||
according to current link config */
|
||||
- if (has_edp_encoder && !intel_encoder_is_pch_edp(&encoder->base)) {
|
||||
+ if (has_edp_encoder && !intel_encoder_is_pch_edp(&has_edp_encoder->base)) {
|
||||
target_clock = mode->clock;
|
||||
intel_edp_link_config(has_edp_encoder,
|
||||
&lane, &link_bw);
|
|
@ -39,14 +39,15 @@ V1->V2:
|
|||
1 files changed, 3 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/fs/dcache.c b/fs/dcache.c
|
||||
index 23702a9..119d489 100644
|
||||
index 5699d4c..85388fc 100644
|
||||
--- a/fs/dcache.c
|
||||
+++ b/fs/dcache.c
|
||||
@@ -1201,9 +1201,12 @@ struct dentry *d_obtain_alias(struct inode *inode)
|
||||
@@ -1577,9 +1577,13 @@ struct dentry *d_obtain_alias(struct inode *inode)
|
||||
spin_unlock(&tmp->d_lock);
|
||||
spin_unlock(&inode->i_lock);
|
||||
|
||||
spin_unlock(&dcache_lock);
|
||||
+ security_d_instantiate(tmp, inode);
|
||||
+
|
||||
return tmp;
|
||||
|
||||
out_iput:
|
||||
|
@ -55,8 +56,6 @@ index 23702a9..119d489 100644
|
|||
iput(inode);
|
||||
return res;
|
||||
}
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
--
|
||||
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
|
||||
|
|
160
kernel.spec
160
kernel.spec
|
@ -6,7 +6,7 @@ Summary: The Linux kernel
|
|||
# For a stable, released kernel, released_kernel should be 1. For rawhide
|
||||
# and/or a kernel built from an rc or git snapshot, released_kernel should
|
||||
# be 0.
|
||||
%global released_kernel 1
|
||||
%global released_kernel 0
|
||||
|
||||
# Save original buildid for later if it's defined
|
||||
%if 0%{?buildid:1}
|
||||
|
@ -52,7 +52,7 @@ Summary: The Linux kernel
|
|||
# For non-released -rc kernels, this will be prepended with "0.", so
|
||||
# for example a 3 here will become 0.3
|
||||
#
|
||||
%global baserelease 2
|
||||
%global baserelease 1
|
||||
%global fedora_build %{baserelease}
|
||||
|
||||
# base_sublevel is the kernel version we're starting with and patching
|
||||
|
@ -83,7 +83,7 @@ Summary: The Linux kernel
|
|||
# The next upstream release sublevel (base_sublevel+1)
|
||||
%define upstream_sublevel %(echo $((%{base_sublevel} + 1)))
|
||||
# The rc snapshot level
|
||||
%define rcrev 0
|
||||
%define rcrev 2
|
||||
# The git snapshot level
|
||||
%define gitrev 0
|
||||
# Set rpm version accordingly
|
||||
|
@ -104,6 +104,8 @@ Summary: The Linux kernel
|
|||
%define with_up %{?_without_up: 0} %{?!_without_up: 1}
|
||||
# kernel-smp (only valid for ppc 32-bit)
|
||||
%define with_smp %{?_without_smp: 0} %{?!_without_smp: 1}
|
||||
# kernel-PAE (only valid for i686)
|
||||
%define with_pae %{?_without_pae: 0} %{?!_without_pae: 1}
|
||||
# kernel-debug
|
||||
%define with_debug %{?_without_debug: 0} %{?!_without_debug: 1}
|
||||
# kernel-doc
|
||||
|
@ -141,6 +143,8 @@ Summary: The Linux kernel
|
|||
%define with_baseonly %{?_with_baseonly: 1} %{?!_with_baseonly: 0}
|
||||
# Only build the smp kernel (--with smponly):
|
||||
%define with_smponly %{?_with_smponly: 1} %{?!_with_smponly: 0}
|
||||
# Only build the pae kernel (--with paeonly):
|
||||
%define with_paeonly %{?_with_paeonly: 1} %{?!_with_paeonly: 0}
|
||||
# Only build the debug kernel (--with dbgonly):
|
||||
%define with_dbgonly %{?_with_dbgonly: 1} %{?!_with_dbgonly: 0}
|
||||
|
||||
|
@ -222,22 +226,31 @@ Summary: The Linux kernel
|
|||
%define debuginfodir /usr/lib/debug
|
||||
|
||||
# kernel-PAE is only built on i686.
|
||||
%ifarch i686
|
||||
%define with_pae 1
|
||||
%define with_up 0
|
||||
%else
|
||||
%ifnarch i686
|
||||
%define with_pae 0
|
||||
%endif
|
||||
%ifarch i686
|
||||
%define with_up 0
|
||||
%endif
|
||||
|
||||
# if requested, only build base kernel
|
||||
%if %{with_baseonly}
|
||||
%define with_smp 0
|
||||
%define with_pae 0
|
||||
%define with_debug 0
|
||||
%endif
|
||||
|
||||
# if requested, only build smp kernel
|
||||
%if %{with_smponly}
|
||||
%define with_up 0
|
||||
%define with_pae 0
|
||||
%define with_debug 0
|
||||
%endif
|
||||
|
||||
# if requested, only build pae kernel
|
||||
%if %{with_paeonly}
|
||||
%define with_up 0
|
||||
%define with_smp 0
|
||||
%define with_debug 0
|
||||
%endif
|
||||
|
||||
|
@ -245,6 +258,7 @@ Summary: The Linux kernel
|
|||
%if %{with_dbgonly}
|
||||
%if %{debugbuildsenabled}
|
||||
%define with_up 0
|
||||
%define with_pae 0
|
||||
%endif
|
||||
%define with_smp 0
|
||||
%define with_pae 0
|
||||
|
@ -548,6 +562,10 @@ Source90: config-sparc64-generic
|
|||
|
||||
Source100: config-arm
|
||||
|
||||
# This file is intentionally left empty in the stock kernel. Its a nicety
|
||||
# added for those wanting to do custom rebuilds with altered config opts.
|
||||
Source1000: config-local
|
||||
|
||||
# Here should be only the patches up to the upstream canonical Linus tree.
|
||||
|
||||
# For a stable release kernel
|
||||
|
@ -606,13 +624,11 @@ Patch31: linux-2.6-utrace.patch
|
|||
Patch32: linux-2.6-utrace-ptrace.patch
|
||||
|
||||
Patch150: linux-2.6.29-sparc-IOC_TYPECHECK.patch
|
||||
Patch151: 0001-use-__devexit-not-__exit-in-n2_unregister_algs-fixes.patch
|
||||
|
||||
Patch160: linux-2.6-32bit-mmap-exec-randomization.patch
|
||||
Patch161: linux-2.6-i386-nx-emulation.patch
|
||||
|
||||
Patch200: linux-2.6-debug-sizeof-structs.patch
|
||||
Patch201: linux-2.6-debug-nmi-timeout.patch
|
||||
Patch202: linux-2.6-debug-taint-vm.patch
|
||||
Patch203: linux-2.6-debug-vm-would-have-oomkilled.patch
|
||||
Patch204: linux-2.6-debug-always-inline-kzalloc.patch
|
||||
|
@ -620,7 +636,6 @@ Patch204: linux-2.6-debug-always-inline-kzalloc.patch
|
|||
Patch380: linux-2.6-defaults-pci_no_msi.patch
|
||||
Patch381: linux-2.6-defaults-pci_use_crs.patch
|
||||
Patch383: linux-2.6-defaults-aspm.patch
|
||||
Patch384: pci-disable-aspm-if-bios-asks-us-to.patch
|
||||
Patch386: pci-_osc-supported-field-should-contain-supported-features-not-enabled-ones.patch
|
||||
|
||||
Patch385: ima-allow-it-to-be-completely-disabled-and-default-off.patch
|
||||
|
@ -629,7 +644,6 @@ Patch390: linux-2.6-defaults-acpi-video.patch
|
|||
Patch391: linux-2.6-acpi-video-dos.patch
|
||||
Patch393: acpi-ec-add-delay-before-write.patch
|
||||
Patch394: linux-2.6-acpi-debug-infinite-loop.patch
|
||||
Patch395: acpi-update-battery-information-on-notification-0x81.patch
|
||||
|
||||
Patch450: linux-2.6-input-kill-stupid-messages.patch
|
||||
Patch452: linux-2.6.30-no-pcspkr-modalias.patch
|
||||
|
@ -665,7 +679,6 @@ Patch1824: drm-intel-next.patch
|
|||
# make sure the lvds comes back on lid open
|
||||
Patch1825: drm-intel-make-lvds-work.patch
|
||||
Patch1826: drm-intel-edp-fixes.patch
|
||||
Patch1827: drm_i915-check-eDP-encoder-correctly-when-setting-modes.patch
|
||||
|
||||
Patch1900: linux-2.6-intel-iommu-igfx.patch
|
||||
|
||||
|
@ -687,7 +700,7 @@ Patch2910: linux-2.6-v4l-dvb-add-lgdt3304-support.patch
|
|||
Patch2912: linux-2.6-v4l-dvb-ir-core-update.patch
|
||||
|
||||
#Patch2916: lirc-staging-2.6.36-fixes.patch
|
||||
Patch2917: hdpvr-ir-enable.patch
|
||||
#Patch2917: hdpvr-ir-enable.patch
|
||||
|
||||
Patch2918: flexcop-fix-xlate_proc_name-warning.patch
|
||||
|
||||
|
@ -707,14 +720,13 @@ Patch12018: neuter_intel_microcode_load.patch
|
|||
|
||||
Patch12030: tpm-fix-stall-on-boot.patch
|
||||
|
||||
Patch12100: applesmc_update.patch
|
||||
Patch12101: apple_backlight.patch
|
||||
Patch12102: efifb_update.patch
|
||||
Patch12103: linux-next-macbook-air-input.patch
|
||||
Patch12200: acpi_reboot.patch
|
||||
Patch12210: efi_default_physical.patch
|
||||
|
||||
# Runtime power management
|
||||
Patch12202: linux-2.6-ehci-check-port-status.patch
|
||||
Patch12203: linux-2.6-usb-pci-autosuspend.patch
|
||||
Patch12204: linux-2.6-enable-more-pci-autosuspend.patch
|
||||
Patch12205: runtime_pm_fixups.patch
|
||||
|
@ -723,13 +735,8 @@ Patch12303: dmar-disable-when-ricoh-multifunction.patch
|
|||
|
||||
Patch12401: debug-tty-print-dev-name.patch
|
||||
|
||||
Patch12410: mm-page-allocator-adjust-the-per-cpu-counter-threshold-when-memory-is-low.patch
|
||||
Patch12411: mm-vmstat-use-a-single-setter-function-and-callback-for-adjusting-percpu-thresholds.patch
|
||||
|
||||
Patch12421: fs-call-security_d_instantiate-in-d_obtain_alias.patch
|
||||
|
||||
Patch12422: net-AF_PACKET-vmalloc.patch
|
||||
|
||||
# Xen patches
|
||||
# git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git branches
|
||||
Patch20000: xen.next-2.6.37.patch
|
||||
|
@ -1138,6 +1145,14 @@ make -f %{SOURCE20} VERSION=%{version} configs
|
|||
done
|
||||
%endif
|
||||
|
||||
# Merge in any user-provided local config option changes
|
||||
for i in %{all_arch_configs}
|
||||
do
|
||||
mv $i $i.tmp
|
||||
./merge.pl %{SOURCE1000} $i.tmp > $i
|
||||
rm $i.tmp
|
||||
done
|
||||
|
||||
ApplyOptionalPatch git-linus.diff
|
||||
|
||||
ApplyPatch linux-2.6-makefile-after_link.patch
|
||||
|
@ -1174,7 +1189,6 @@ ApplyPatch linux-2.6-utrace-ptrace.patch
|
|||
# SPARC64
|
||||
#
|
||||
ApplyPatch linux-2.6.29-sparc-IOC_TYPECHECK.patch
|
||||
ApplyPatch 0001-use-__devexit-not-__exit-in-n2_unregister_algs-fixes.patch
|
||||
|
||||
#
|
||||
# Exec shield
|
||||
|
@ -1206,11 +1220,9 @@ ApplyPatch linux-2.6-defaults-acpi-video.patch
|
|||
ApplyPatch linux-2.6-acpi-video-dos.patch
|
||||
ApplyPatch acpi-ec-add-delay-before-write.patch
|
||||
ApplyPatch linux-2.6-acpi-debug-infinite-loop.patch
|
||||
ApplyPatch acpi-update-battery-information-on-notification-0x81.patch
|
||||
|
||||
# Various low-impact patches to aid debugging.
|
||||
ApplyPatch linux-2.6-debug-sizeof-structs.patch
|
||||
ApplyPatch linux-2.6-debug-nmi-timeout.patch
|
||||
ApplyPatch linux-2.6-debug-taint-vm.patch
|
||||
ApplyPatch linux-2.6-debug-vm-would-have-oomkilled.patch
|
||||
ApplyPatch linux-2.6-debug-always-inline-kzalloc.patch
|
||||
|
@ -1223,9 +1235,8 @@ ApplyPatch linux-2.6-defaults-pci_no_msi.patch
|
|||
ApplyPatch linux-2.6-defaults-pci_use_crs.patch
|
||||
# enable ASPM by default on hardware we expect to work
|
||||
ApplyPatch linux-2.6-defaults-aspm.patch
|
||||
ApplyPatch pci-disable-aspm-if-bios-asks-us-to.patch
|
||||
# rhbz#638912
|
||||
ApplyPatch pci-_osc-supported-field-should-contain-supported-features-not-enabled-ones.patch
|
||||
#ApplyPatch pci-_osc-supported-field-should-contain-supported-features-not-enabled-ones.patch
|
||||
|
||||
#ApplyPatch ima-allow-it-to-be-completely-disabled-and-default-off.patch
|
||||
|
||||
|
@ -1291,7 +1302,6 @@ ApplyPatch drm-intel-big-hammer.patch
|
|||
ApplyPatch drm-intel-make-lvds-work.patch
|
||||
ApplyPatch linux-2.6-intel-iommu-igfx.patch
|
||||
ApplyPatch drm-intel-edp-fixes.patch
|
||||
ApplyPatch drm_i915-check-eDP-encoder-correctly-when-setting-modes.patch
|
||||
|
||||
# linux1394 git patches
|
||||
#ApplyPatch linux-2.6-firewire-git-update.patch
|
||||
|
@ -1313,7 +1323,7 @@ ApplyOptionalPatch linux-2.6-v4l-dvb-experimental.patch
|
|||
# http://www.lirc.org/
|
||||
#ApplyOptionalPatch lirc-staging-2.6.36-fixes.patch
|
||||
# enable IR receiver on Hauppauge HD PVR (v4l-dvb merge pending)
|
||||
ApplyPatch hdpvr-ir-enable.patch
|
||||
#ApplyPatch hdpvr-ir-enable.patch
|
||||
|
||||
# rhbz#664852
|
||||
ApplyPatch flexcop-fix-xlate_proc_name-warning.patch
|
||||
|
@ -1329,17 +1339,16 @@ ApplyPatch neuter_intel_microcode_load.patch
|
|||
ApplyPatch tpm-fix-stall-on-boot.patch
|
||||
|
||||
# various fixes for Apple and EFI
|
||||
ApplyPatch applesmc_update.patch
|
||||
ApplyPatch apple_backlight.patch
|
||||
ApplyPatch efifb_update.patch
|
||||
ApplyPatch linux-next-macbook-air-input.patch
|
||||
ApplyPatch acpi_reboot.patch
|
||||
ApplyPatch efi_default_physical.patch
|
||||
|
||||
# Runtime PM
|
||||
ApplyPatch linux-2.6-ehci-check-port-status.patch
|
||||
ApplyPatch linux-2.6-usb-pci-autosuspend.patch
|
||||
ApplyPatch linux-2.6-enable-more-pci-autosuspend.patch
|
||||
ApplyPatch runtime_pm_fixups.patch
|
||||
#ApplyPatch linux-2.6-enable-more-pci-autosuspend.patch
|
||||
#ApplyPatch runtime_pm_fixups.patch
|
||||
|
||||
# rhbz#605888
|
||||
ApplyPatch dmar-disable-when-ricoh-multifunction.patch
|
||||
|
@ -1347,16 +1356,9 @@ ApplyPatch dmar-disable-when-ricoh-multifunction.patch
|
|||
# rhbz#630464
|
||||
ApplyPatch debug-tty-print-dev-name.patch
|
||||
|
||||
# backport some fixes for kswapd from mmotm, rhbz#649694
|
||||
ApplyPatch mm-page-allocator-adjust-the-per-cpu-counter-threshold-when-memory-is-low.patch
|
||||
ApplyPatch mm-vmstat-use-a-single-setter-function-and-callback-for-adjusting-percpu-thresholds.patch
|
||||
|
||||
# rhbz#662344,600690
|
||||
ApplyPatch fs-call-security_d_instantiate-in-d_obtain_alias.patch
|
||||
|
||||
# rhbz#637619
|
||||
ApplyPatch net-AF_PACKET-vmalloc.patch
|
||||
|
||||
# Xen patches
|
||||
ApplyPatch xen.next-2.6.37.patch
|
||||
#ApplyPatch xen.upstream.core.patch
|
||||
|
@ -1627,7 +1629,7 @@ BuildKernel() {
|
|||
rm -f modinfo modnames
|
||||
|
||||
# remove files that will be auto generated by depmod at rpm -i time
|
||||
for i in alias alias.bin ccwmap dep dep.bin ieee1394map inputmap isapnpmap ofmap pcimap seriomap symbols symbols.bin usbmap
|
||||
for i in alias alias.bin builtin.bin ccwmap dep dep.bin ieee1394map inputmap isapnpmap ofmap pcimap seriomap symbols symbols.bin usbmap
|
||||
do
|
||||
rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/modules.$i
|
||||
done
|
||||
|
@ -1974,8 +1976,82 @@ fi
|
|||
# (__)\ )\/\
|
||||
# ||----w |
|
||||
# || ||
|
||||
|
||||
%changelog
|
||||
* Sat Jan 22 2011 Kyle McMartin <kmcmartin@redhat.com> 2.6.38-0.rc2.git0.1
|
||||
- Linux 2.6.38-rc2
|
||||
- linux-2.6-serial-460800.patch, drivers/serial => drivers/tty/serial
|
||||
|
||||
* Thu Jan 20 2011 Kyle McMartin <kmcmartin@redhat.com> 2.6.38-0.rc1.git1.1
|
||||
- Linux 2.6.38-rc1-git1, should fix boot failure in -rc1.
|
||||
|
||||
* Wed Jan 19 2011 Roland McGrath <roland@redhat.com>
|
||||
- utrace update
|
||||
|
||||
* Wed Jan 19 2011 Kyle McMartin <kmcmartin@redhat.com> 2.6.38-0.rc1.git0.1
|
||||
- Linux 2.6.38-rc1
|
||||
|
||||
* Tue Jan 18 2011 Kyle McMartin <kmcmartin@redhat.com> 2.6.38-0.rc0.git18.1
|
||||
- Linux 2.6.37-git18
|
||||
|
||||
* Mon Jan 17 2011 Kyle McMartin <kmcmartin@redhat.com> 2.6.38-0.rc0.git16.1
|
||||
- Linux 2.6.37-git16
|
||||
- config changes:
|
||||
- CONFIG_SQUASHFS_XZ=y [generic]
|
||||
- CONFIG_SPARSE_IRQ=y [arm]
|
||||
|
||||
* Sat Jan 15 2011 Kyle McMartin <kmcmartin@redhat.com> 2.6.38-0.rc0.git13.1
|
||||
- Linux 2.6.37-git13
|
||||
- Drop xen_export-arbitrary_virt_to_machine.patch, upstream.
|
||||
|
||||
* Fri Jan 14 2011 Kyle McMartin <kmcmartin@redhat.com>
|
||||
- xen_export-arbitrary_virt_to_machine.patch: pull patch from upstream
|
||||
to fix build error.
|
||||
|
||||
* Fri Jan 14 2011 Kyle McMartin <kmcmartin@redhat.com> 2.6.38-0.rc0.git12.1
|
||||
- Linux 2.6.37-git12
|
||||
- 0001-use-__devexit-not-__exit-in-n2_unregister_algs-fixes.patch: drop
|
||||
upstream patch.
|
||||
- acpi-update-battery-information-on-notification-0x81.patch: drop upstream
|
||||
patch.
|
||||
- mm-*.patch: drop upstream patches.
|
||||
- important config changes:
|
||||
ACPI_IPMI=m
|
||||
CRYPTO_AES_NI_INTEL=m [i386]
|
||||
TRANSPARENT_HUGEPAGE=y
|
||||
|
||||
* Wed Jan 12 2011 Kyle McMartin <kmcmartin@redhat.com> 2.6.38-0.rc0.git9.1
|
||||
- Linux 2.6.37-git9
|
||||
- Re-enable DEBUG_SET_MODULE_RONX since commit 94462ad3 fixed it.
|
||||
- Enable some more new random HID and sensor junk as modules.
|
||||
|
||||
* Tue Jan 11 2011 Matthew Garrett <mjg@redhat.com>
|
||||
- linux-2.6-ehci-check-port-status.patch - fix USB resume on some AMD systems
|
||||
|
||||
* Mon Jan 10 2011 Jarod Wilson <jarod@redhat.com>
|
||||
- Add support for local rebuild config option overrides
|
||||
- Add missing --with/--without pae build flag support
|
||||
|
||||
* Mon Jan 10 2011 Kyle McMartin <kmcmartin@redhat.com> 2.6.38-0.rc0.git4.2
|
||||
- Disable DEBUG_SET_MODULE_RONX for now, it causes boot-up to fail since
|
||||
dynamic ftrace is trying to rewrite instructions on module load.
|
||||
|
||||
* Mon Jan 10 2011 Kyle McMartin <kmcmartin@redhat.com>
|
||||
- Drop obsolete linux-2.6-debug-nmi-timeout.patch
|
||||
|
||||
* Mon Jan 10 2011 Kyle McMartin <kmcmartin@redhat.com> 2.6.38-0.rc0.git4.1
|
||||
- Branch for 2.6.38
|
||||
- Rebase trivial patches.
|
||||
- Switch debug configs back on.
|
||||
- config changes:
|
||||
DEBUG_SET_MODULE_RONX=y
|
||||
B43_PHY_N=y
|
||||
RT2800USB_RT33XX=y |
|
||||
RT2800PCI_RT33XX=y | experimental
|
||||
WL12XX=m
|
||||
RTL8192CE=m
|
||||
CAN_SLCAN=m
|
||||
SCHED_AUTOGROUP=n
|
||||
|
||||
* Sun Jan 09 2011 Michael Young <m.a.young@durham.ac.uk>
|
||||
- reorganize xen.pcifront.fixes.patch to be a combination of
|
||||
stable/bug-fixes stable/generic and stable/irq.rework for fixes
|
||||
|
@ -1990,10 +2066,10 @@ fi
|
|||
- update xen.pcifront.fixes.patch with IRQ fixes from stable/bug-fixes branch
|
||||
- skip docs - it seems to cause build failures at random points the moment.
|
||||
|
||||
* Wed Jan 05 2011 Dennis Gilmore <dennis@ausil.us>
|
||||
* Wed Jan 05 2011 Dennis Gilmore <dennis@ausil.us>
|
||||
- build sparc headers on sparcv9
|
||||
|
||||
* Tue Jan 04 2011 Dennis Gilmore <dennis@ausil.us>
|
||||
* Tue Jan 04 2011 Dennis Gilmore <dennis@ausil.us>
|
||||
- add patch for sparc build failure
|
||||
|
||||
* Tue Jan 04 2011 Kyle McMartin <kyle@redhat.com> 2.6.37-1
|
||||
|
|
|
@ -14,9 +14,9 @@
|
|||
--- b/mm/mmap.c
|
||||
+++ b/mm/mmap.c
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <linux/mmu_notifier.h>
|
||||
#include <linux/perf_event.h>
|
||||
#include <linux/audit.h>
|
||||
#include <linux/khugepaged.h>
|
||||
+#include <linux/random.h>
|
||||
|
||||
#include <asm/uaccess.h>
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
From 542dee6f43067fa0101b53925aadf1d08c997cd4 Mon Sep 17 00:00:00 2001
|
||||
From: Kyle McMartin <kyle@phobos.i.jkkm.org>
|
||||
Date: Mon, 29 Mar 2010 23:40:27 -0400
|
||||
Subject: linux-2.6-debug-nmi-timeout
|
||||
|
||||
---
|
||||
arch/x86/kernel/apic/nmi.c | 2 +-
|
||||
lib/Kconfig.debug | 8 ++++++++
|
||||
2 files changed, 9 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/arch/x86/kernel/apic/nmi.c b/arch/x86/kernel/apic/nmi.c
|
||||
index 8aa65ad..ba7d55e 100644
|
||||
--- a/arch/x86/kernel/apic/nmi.c
|
||||
+++ b/arch/x86/kernel/apic/nmi.c
|
||||
@@ -439,7 +439,7 @@ nmi_watchdog_tick(struct pt_regs *regs, unsigned reason)
|
||||
* wait a few IRQs (5 seconds) before doing the oops ...
|
||||
*/
|
||||
__this_cpu_inc(alert_counter);
|
||||
- if (__this_cpu_read(alert_counter) == 5 * nmi_hz)
|
||||
+ if (__this_cpu_read(alert_counter) == CONFIG_DEBUG_NMI_TIMEOUT * nmi_hz)
|
||||
/*
|
||||
* die_nmi will return ONLY if NOTIFY_STOP happens..
|
||||
*/
|
||||
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
|
||||
index 1fafb4b..963e78b 100644
|
||||
--- a/lib/Kconfig.debug
|
||||
+++ b/lib/Kconfig.debug
|
||||
@@ -254,6 +254,14 @@ config SCHEDSTATS
|
||||
application, you can say N to avoid the very slight overhead
|
||||
this adds.
|
||||
|
||||
+config DEBUG_NMI_TIMEOUT
|
||||
+ int "Number of seconds before NMI timeout"
|
||||
+ depends on X86
|
||||
+ default 5
|
||||
+ help
|
||||
+ This value is the number of seconds the NMI watchdog will tick
|
||||
+ before it decides the machine has hung.
|
||||
+
|
||||
config TIMER_STATS
|
||||
bool "Collect kernel timers statistics"
|
||||
depends on DEBUG_KERNEL && PROC_FS
|
||||
--
|
||||
1.7.0.1
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
commit e17a07a9e0b62d5a5f0a5683ecbabad3aa95a4d5
|
||||
Author: Matthew Garrett <mjg@redhat.com>
|
||||
Date: Tue Jan 11 12:19:40 2011 -0500
|
||||
|
||||
ehci: Check individual port status registers on resume
|
||||
|
||||
If a device plug/unplug is detected on an ATI SB700 USB controller in D3,
|
||||
it appears to set the port status register but not the controller status
|
||||
register. As a result we'll fail to detect the plug event. Check the port
|
||||
status register on resume as well in order to catch this case.
|
||||
|
||||
Signed-off-by: Matthew Garrett <mjg@redhat.com>
|
||||
|
||||
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
|
||||
index 796ea0c..d9c0748 100644
|
||||
--- a/drivers/usb/host/ehci-hub.c
|
||||
+++ b/drivers/usb/host/ehci-hub.c
|
||||
@@ -106,6 +106,27 @@ static void ehci_handover_companion_ports(struct ehci_hcd *ehci)
|
||||
ehci->owned_ports = 0;
|
||||
}
|
||||
|
||||
+static int ehci_port_change(struct ehci_hcd *ehci)
|
||||
+{
|
||||
+ int i = HCS_N_PORTS(ehci->hcs_params);
|
||||
+
|
||||
+ /* First check if the controller indicates a change event */
|
||||
+
|
||||
+ if (ehci_readl(ehci, &ehci->regs->status) & STS_PCD)
|
||||
+ return 1;
|
||||
+
|
||||
+ /*
|
||||
+ * Not all controllers appear to update this while going from D3 to D0,
|
||||
+ * so check the individual port status registers as well
|
||||
+ */
|
||||
+
|
||||
+ while (i--)
|
||||
+ if (ehci_readl(ehci, &ehci->regs->port_status[i]) & PORT_CSC)
|
||||
+ return 1;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static void ehci_adjust_port_wakeup_flags(struct ehci_hcd *ehci,
|
||||
bool suspending, bool do_wakeup)
|
||||
{
|
||||
@@ -168,7 +189,7 @@ static void ehci_adjust_port_wakeup_flags(struct ehci_hcd *ehci,
|
||||
}
|
||||
|
||||
/* Does the root hub have a port wakeup pending? */
|
||||
- if (!suspending && (ehci_readl(ehci, &ehci->regs->status) & STS_PCD))
|
||||
+ if (!suspending && ehci_port_change(ehci))
|
||||
usb_hcd_resume_root_hub(ehci_to_hcd(ehci));
|
||||
}
|
||||
|
|
@ -389,7 +389,7 @@
|
|||
+ else
|
||||
+
|
||||
printk(KERN_NOTICE "Notice: NX (Execute Disable) protection "
|
||||
"missing in CPU or disabled in BIOS!\n");
|
||||
"missing in CPU!\n");
|
||||
} else {
|
||||
--- a/arch/x86/mm/tlb.c
|
||||
+++ b/arch/x86/mm/tlb.c
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
|
||||
index 2209620..659c1bb 100644
|
||||
--- a/drivers/serial/8250.c
|
||||
+++ b/drivers/serial/8250.c
|
||||
--- a/drivers/tty/serial/8250.c
|
||||
+++ b/drivers/tty/serial/8250.c
|
||||
@@ -7,6 +7,9 @@
|
||||
*
|
||||
* Copyright (C) 2001 Russell King.
|
||||
|
|
|
@ -1,15 +1,3 @@
|
|||
--- linux-2.6.26.noarch/drivers/base/power/main.c~ 2008-08-22 20:57:57.000000000 -0400
|
||||
+++ linux-2.6.26.noarch/drivers/base/power/main.c 2008-08-22 20:58:05.000000000 -0400
|
||||
@@ -69,9 +69,6 @@ void device_pm_unlock(void)
|
||||
*/
|
||||
void device_pm_add(struct device *dev)
|
||||
{
|
||||
- pr_debug("PM: Adding info for %s:%s\n",
|
||||
- dev->bus ? dev->bus->name : "No Bus",
|
||||
- kobject_name(&dev->kobj));
|
||||
mutex_lock(&dpm_list_mtx);
|
||||
if (dev->parent) {
|
||||
if (dev->parent->power.status >= DPM_SUSPENDING)
|
||||
From b4e96f34c17e5a79cd28774cc722bb33e7e02c6e Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Thu, 25 Sep 2008 16:23:33 -0400
|
||||
|
@ -31,7 +19,7 @@ index 170f71e..4f3e632 100644
|
|||
static int i8042_controller_check(void)
|
||||
{
|
||||
- if (i8042_flush() == I8042_BUFFER_SIZE) {
|
||||
- printk(KERN_ERR "i8042.c: No controller found.\n");
|
||||
- pr_err("No controller found\n");
|
||||
+ if (i8042_flush() == I8042_BUFFER_SIZE)
|
||||
return -ENODEV;
|
||||
- }
|
||||
|
@ -64,3 +52,21 @@ Signed-off-by: Dave Jones <davej@redhat.com>
|
|||
}
|
||||
#endif
|
||||
|
||||
This was removed in revision 1.6 of linux-2.6-silence-noise.patch
|
||||
in ye olde CVS tree. I have no idea why. Originally the pr_debug in
|
||||
device_pm_remove was nuked as well, but that seems to have gotten lost in
|
||||
the r1.634 of kernel.spec (2.6.26-rc2-git5.)
|
||||
|
||||
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
|
||||
index 2a52270..bacbdd2 100644
|
||||
--- a/drivers/base/power/main.c
|
||||
+++ b/drivers/base/power/main.c
|
||||
@@ -87,8 +87,6 @@ void device_pm_unlock(void)
|
||||
*/
|
||||
void device_pm_add(struct device *dev)
|
||||
{
|
||||
- pr_debug("PM: Adding info for %s:%s\n",
|
||||
- dev->bus ? dev->bus->name : "No Bus", dev_name(dev));
|
||||
mutex_lock(&dpm_list_mtx);
|
||||
if (dev->parent && dev->parent->power.in_suspend)
|
||||
dev_warn(dev, "parent %s should not be sleeping\n",
|
||||
|
|
|
@ -20,10 +20,10 @@ Signed-off-by: Roland McGrath <roland@redhat.com>
|
|||
5 files changed, 10 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h
|
||||
index 4272521..a85fb41 100644
|
||||
index 092a04f..619cdf0 100644
|
||||
--- a/include/linux/ptrace.h
|
||||
+++ b/include/linux/ptrace.h
|
||||
@@ -105,6 +105,7 @@ extern int ptrace_traceme(void);
|
||||
@@ -106,6 +106,7 @@ extern int ptrace_traceme(void);
|
||||
extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len);
|
||||
extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len);
|
||||
extern int ptrace_attach(struct task_struct *tsk);
|
||||
|
@ -32,10 +32,10 @@ index 4272521..a85fb41 100644
|
|||
extern void ptrace_disable(struct task_struct *);
|
||||
extern int ptrace_check_attach(struct task_struct *task, int kill);
|
||||
diff --git a/include/linux/sched.h b/include/linux/sched.h
|
||||
index ce160d6..5e7cc95 100644
|
||||
index 2238745..09f26df 100644
|
||||
--- a/include/linux/sched.h
|
||||
+++ b/include/linux/sched.h
|
||||
@@ -2030,6 +2030,7 @@ extern int kill_pgrp(struct pid *pid, in
|
||||
@@ -2061,6 +2061,7 @@ extern int kill_pgrp(struct pid *pid, in
|
||||
extern int kill_pid(struct pid *pid, int sig, int priv);
|
||||
extern int kill_proc_info(int, struct siginfo *, pid_t);
|
||||
extern int do_notify_parent(struct task_struct *, int);
|
||||
|
@ -44,7 +44,7 @@ index ce160d6..5e7cc95 100644
|
|||
extern void force_sig(int, struct task_struct *);
|
||||
extern int send_sig(int, struct task_struct *, int);
|
||||
diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h
|
||||
index 10db010..c78b2f4 100644
|
||||
index 3a2e66d..98917e9 100644
|
||||
--- a/include/linux/tracehook.h
|
||||
+++ b/include/linux/tracehook.h
|
||||
@@ -134,7 +134,7 @@ static inline __must_check int tracehook
|
||||
|
@ -93,7 +93,7 @@ index 10db010..c78b2f4 100644
|
|||
|
||||
/**
|
||||
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
|
||||
index f34d798..8049cb5 100644
|
||||
index 99bbaa3..84d9f8f 100644
|
||||
--- a/kernel/ptrace.c
|
||||
+++ b/kernel/ptrace.c
|
||||
@@ -270,7 +270,7 @@ static int ignoring_children(struct sigh
|
||||
|
@ -106,10 +106,10 @@ index f34d798..8049cb5 100644
|
|||
__ptrace_unlink(p);
|
||||
|
||||
diff --git a/kernel/signal.c b/kernel/signal.c
|
||||
index bded651..6d13d9f 100644
|
||||
index 4e3cff1..b74324d 100644
|
||||
--- a/kernel/signal.c
|
||||
+++ b/kernel/signal.c
|
||||
@@ -1521,7 +1521,7 @@ int do_notify_parent(struct task_struct
|
||||
@@ -1522,7 +1522,7 @@ int do_notify_parent(struct task_struct
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -118,7 +118,7 @@ index bded651..6d13d9f 100644
|
|||
{
|
||||
struct siginfo info;
|
||||
unsigned long flags;
|
||||
@@ -1791,7 +1791,7 @@ static int do_signal_stop(int signr)
|
||||
@@ -1794,7 +1794,7 @@ static int do_signal_stop(int signr)
|
||||
static int ptrace_signal(int signr, siginfo_t *info,
|
||||
struct pt_regs *regs, void *cookie)
|
||||
{
|
||||
|
|
|
@ -12,28 +12,27 @@ change to userland when CONFIG_UTRACE is enabled.
|
|||
Signed-off-by: Roland McGrath <roland@redhat.com>
|
||||
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
|
||||
---
|
||||
include/linux/ptrace.h | 2 +-
|
||||
include/linux/ptrace.h | 1 +
|
||||
kernel/Makefile | 1 +
|
||||
kernel/ptrace-utrace.c | 1138 ++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
kernel/ptrace.c | 688 ++++++++++++++---------------
|
||||
kernel/ptrace-utrace.c | 1187 ++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
kernel/ptrace.c | 690 ++++++++++++++--------------
|
||||
kernel/utrace.c | 16 +
|
||||
5 files changed, 1494 insertions(+), 351 deletions(-)
|
||||
5 files changed, 1544 insertions(+), 351 deletions(-)
|
||||
|
||||
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h
|
||||
index a85fb41..235c1b0 100644
|
||||
index 619cdf0..e391bdb 100644
|
||||
--- a/include/linux/ptrace.h
|
||||
+++ b/include/linux/ptrace.h
|
||||
@@ -99,7 +99,7 @@
|
||||
#include <linux/compiler.h> /* For unlikely. */
|
||||
@@ -100,6 +100,7 @@
|
||||
#include <linux/sched.h> /* For struct task_struct. */
|
||||
|
||||
-
|
||||
|
||||
+extern void ptrace_notify_stop(struct task_struct *tracee);
|
||||
extern long arch_ptrace(struct task_struct *child, long request,
|
||||
unsigned long addr, unsigned long data);
|
||||
extern int ptrace_traceme(void);
|
||||
diff --git a/kernel/Makefile b/kernel/Makefile
|
||||
index 6004913..b09c9a5 100644
|
||||
index 1172528..9a815a5 100644
|
||||
--- a/kernel/Makefile
|
||||
+++ b/kernel/Makefile
|
||||
@@ -71,6 +71,7 @@ obj-$(CONFIG_RESOURCE_COUNTERS) += res_c
|
||||
|
@ -46,10 +45,10 @@ index 6004913..b09c9a5 100644
|
|||
obj-$(CONFIG_AUDIT_WATCH) += audit_watch.o
|
||||
diff --git a/kernel/ptrace-utrace.c b/kernel/ptrace-utrace.c
|
||||
new file mode 100644
|
||||
index ...a90078d 100644
|
||||
index ...a5bcb9e 100644
|
||||
--- /dev/null
|
||||
+++ b/kernel/ptrace-utrace.c
|
||||
@@ -0,0 +1,1138 @@
|
||||
@@ -0,0 +1,1187 @@
|
||||
+/*
|
||||
+ * linux/kernel/ptrace.c
|
||||
+ *
|
||||
|
@ -119,6 +118,7 @@ index ...a90078d 100644
|
|||
+#define PT_UTRACED 0x00001000
|
||||
+
|
||||
+#define PTRACE_O_SYSEMU 0x100
|
||||
+#define PTRACE_O_DETACHED 0x200
|
||||
+
|
||||
+#define PTRACE_EVENT_SYSCALL (1 << 16)
|
||||
+#define PTRACE_EVENT_SIGTRAP (2 << 16)
|
||||
|
@ -155,6 +155,19 @@ index ...a90078d 100644
|
|||
+ &ptrace_utrace_ops, NULL);
|
||||
+}
|
||||
+
|
||||
+static int utrace_barrier_uninterruptible(struct task_struct *target,
|
||||
+ struct utrace_engine *engine)
|
||||
+{
|
||||
+ for (;;) {
|
||||
+ int err = utrace_barrier(target, engine);
|
||||
+
|
||||
+ if (err != -ERESTARTSYS)
|
||||
+ return err;
|
||||
+
|
||||
+ schedule_timeout_uninterruptible(1);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static struct utrace_engine *
|
||||
+ptrace_reuse_engine(struct task_struct *tracee)
|
||||
+{
|
||||
|
@ -167,7 +180,7 @@ index ...a90078d 100644
|
|||
+ return engine;
|
||||
+
|
||||
+ ctx = ptrace_context(engine);
|
||||
+ if (unlikely(ctx->resume == UTRACE_DETACH)) {
|
||||
+ if (unlikely(ctx->options == PTRACE_O_DETACHED)) {
|
||||
+ /*
|
||||
+ * Try to reuse this self-detaching engine.
|
||||
+ * The only caller which can hit this case is ptrace_attach(),
|
||||
|
@ -181,12 +194,16 @@ index ...a90078d 100644
|
|||
+ if (!err || err == -EINPROGRESS) {
|
||||
+ ctx->resume = UTRACE_RESUME;
|
||||
+ /* synchronize with ptrace_report_signal() */
|
||||
+ err = utrace_barrier(tracee, engine);
|
||||
+ err = utrace_barrier_uninterruptible(tracee, engine);
|
||||
+ }
|
||||
+ WARN_ON(!err != (engine->ops == &ptrace_utrace_ops));
|
||||
+
|
||||
+ if (!err)
|
||||
+ if (!err) {
|
||||
+ WARN_ON(engine->ops != &ptrace_utrace_ops &&
|
||||
+ !tracee->exit_state);
|
||||
+ return engine;
|
||||
+ }
|
||||
+
|
||||
+ WARN_ON(engine->ops == &ptrace_utrace_ops);
|
||||
+ }
|
||||
+
|
||||
+ utrace_engine_put(engine);
|
||||
|
@ -296,32 +313,60 @@ index ...a90078d 100644
|
|||
+ * If true, the caller is PTRACE_DETACH, otherwise
|
||||
+ * the tracer detaches implicitly during exit.
|
||||
+ */
|
||||
+ bool voluntary = (sig >= 0);
|
||||
+ bool explicit = (sig >= 0);
|
||||
+ struct utrace_engine *engine = ptrace_lookup_engine(tracee);
|
||||
+ enum utrace_resume_action action = UTRACE_DETACH;
|
||||
+ struct ptrace_context *ctx;
|
||||
+
|
||||
+ if (unlikely(IS_ERR(engine)))
|
||||
+ return;
|
||||
+
|
||||
+ if (sig) {
|
||||
+ struct ptrace_context *ctx = ptrace_context(engine);
|
||||
+ ctx = ptrace_context(engine);
|
||||
+
|
||||
+ if (!explicit) {
|
||||
+ int err;
|
||||
+
|
||||
+ /*
|
||||
+ * We are going to detach, the tracee can be running.
|
||||
+ * Ensure ptrace_report_signal() won't report a signal.
|
||||
+ */
|
||||
+ ctx->resume = UTRACE_DETACH;
|
||||
+ err = utrace_barrier_uninterruptible(tracee, engine);
|
||||
+
|
||||
+ if (!err && ctx->siginfo) {
|
||||
+ /*
|
||||
+ * The tracee has already reported a signal
|
||||
+ * before utrace_barrier().
|
||||
+ *
|
||||
+ * Resume it like we do in PTRACE_EVENT_SIGNAL
|
||||
+ * case below. The difference is that we can race
|
||||
+ * with ptrace_report_signal() if the tracee is
|
||||
+ * running but this doesn't matter. In any case
|
||||
+ * UTRACE_SIGNAL_REPORT must be pending and it
|
||||
+ * can return nothing but UTRACE_DETACH.
|
||||
+ */
|
||||
+ action = UTRACE_RESUME;
|
||||
+ }
|
||||
+
|
||||
+ } else if (sig) {
|
||||
+ switch (get_stop_event(ctx)) {
|
||||
+ case PTRACE_EVENT_SYSCALL:
|
||||
+ if (voluntary)
|
||||
+ send_sig_info(sig, SEND_SIG_PRIV, tracee);
|
||||
+ send_sig_info(sig, SEND_SIG_PRIV, tracee);
|
||||
+ break;
|
||||
+
|
||||
+ case PTRACE_EVENT_SIGNAL:
|
||||
+ if (voluntary)
|
||||
+ ctx->signr = sig;
|
||||
+ ctx->signr = sig;
|
||||
+ ctx->resume = UTRACE_DETACH;
|
||||
+ action = UTRACE_RESUME;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ ptrace_wake_up(tracee, engine, action, voluntary);
|
||||
+ ptrace_wake_up(tracee, engine, action, explicit);
|
||||
+
|
||||
+ if (action != UTRACE_DETACH)
|
||||
+ ctx->options = PTRACE_O_DETACHED;
|
||||
+
|
||||
+ utrace_engine_put(engine);
|
||||
+}
|
||||
+
|
||||
|
@ -453,6 +498,11 @@ index ...a90078d 100644
|
|||
+ return UTRACE_SYSCALL_RUN | UTRACE_STOP;
|
||||
+}
|
||||
+
|
||||
+static inline bool is_step_resume(enum utrace_resume_action resume)
|
||||
+{
|
||||
+ return resume == UTRACE_BLOCKSTEP || resume == UTRACE_SINGLESTEP;
|
||||
+}
|
||||
+
|
||||
+static u32 ptrace_report_syscall_exit(u32 action, struct utrace_engine *engine,
|
||||
+ struct pt_regs *regs)
|
||||
+{
|
||||
|
@ -461,11 +511,7 @@ index ...a90078d 100644
|
|||
+ if (ptrace_event_pending(ctx))
|
||||
+ return UTRACE_STOP;
|
||||
+
|
||||
+ if (ctx->resume != UTRACE_RESUME) {
|
||||
+ WARN_ON(ctx->resume != UTRACE_BLOCKSTEP &&
|
||||
+ ctx->resume != UTRACE_SINGLESTEP);
|
||||
+ ctx->resume = UTRACE_RESUME;
|
||||
+
|
||||
+ if (is_step_resume(ctx->resume)) {
|
||||
+ ctx->signr = SIGTRAP;
|
||||
+ return UTRACE_INTERRUPT;
|
||||
+ }
|
||||
|
@ -553,10 +599,7 @@ index ...a90078d 100644
|
|||
+ if (WARN_ON(ctx->siginfo))
|
||||
+ ctx->siginfo = NULL;
|
||||
+
|
||||
+ if (resume != UTRACE_RESUME) {
|
||||
+ WARN_ON(resume != UTRACE_BLOCKSTEP &&
|
||||
+ resume != UTRACE_SINGLESTEP);
|
||||
+
|
||||
+ if (is_step_resume(resume)) {
|
||||
+ set_stop_code(ctx, PTRACE_EVENT_SIGTRAP);
|
||||
+ return UTRACE_STOP | UTRACE_SIGNAL_IGN;
|
||||
+ }
|
||||
|
@ -583,6 +626,11 @@ index ...a90078d 100644
|
|||
+ }
|
||||
+
|
||||
+ WARN_ON(ctx->siginfo);
|
||||
+
|
||||
+ /* Raced with the exiting tracer ? */
|
||||
+ if (resume == UTRACE_DETACH)
|
||||
+ return action;
|
||||
+
|
||||
+ ctx->siginfo = info;
|
||||
+ /*
|
||||
+ * ctx->siginfo points to the caller's stack.
|
||||
|
@ -811,7 +859,7 @@ index ...a90078d 100644
|
|||
+static int ptrace_set_options(struct task_struct *tracee,
|
||||
+ struct utrace_engine *engine, long data)
|
||||
+{
|
||||
+ BUILD_BUG_ON(PTRACE_O_MASK & PTRACE_O_SYSEMU);
|
||||
+ BUILD_BUG_ON(PTRACE_O_MASK & (PTRACE_O_SYSEMU | PTRACE_O_DETACHED));
|
||||
+
|
||||
+ ptrace_set_events(tracee, engine, data & PTRACE_O_MASK);
|
||||
+ return (data & ~PTRACE_O_MASK) ? -EINVAL : 0;
|
||||
|
@ -1189,7 +1237,7 @@ index ...a90078d 100644
|
|||
+}
|
||||
+#endif /* CONFIG_COMPAT */
|
||||
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
|
||||
index 23bde94..daed9e8 100644
|
||||
index e275608..72ea65c 100644
|
||||
--- a/kernel/ptrace.c
|
||||
+++ b/kernel/ptrace.c
|
||||
@@ -15,7 +15,6 @@
|
||||
|
@ -1200,7 +1248,7 @@ index 23bde94..daed9e8 100644
|
|||
#include <linux/security.h>
|
||||
#include <linux/signal.h>
|
||||
#include <linux/audit.h>
|
||||
@@ -24,7 +23,317 @@
|
||||
@@ -24,7 +23,320 @@
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/regset.h>
|
||||
|
||||
|
@ -1412,7 +1460,8 @@ index 23bde94..daed9e8 100644
|
|||
+#define arch_ptrace_attach(child) do { } while (0)
|
||||
+#endif
|
||||
+
|
||||
+SYSCALL_DEFINE4(ptrace, long, request, long, pid, unsigned long, addr, unsigned long, data)
|
||||
+SYSCALL_DEFINE4(ptrace, long, request, long, pid, unsigned long, addr,
|
||||
+ unsigned long, data)
|
||||
+{
|
||||
+ struct task_struct *child;
|
||||
+ long ret;
|
||||
|
@ -1423,13 +1472,13 @@ index 23bde94..daed9e8 100644
|
|||
+ arch_ptrace_attach(current);
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
|
||||
+ child = ptrace_get_task_struct(pid);
|
||||
+ if (IS_ERR(child)) {
|
||||
+ ret = PTR_ERR(child);
|
||||
+ goto out;
|
||||
+ }
|
||||
|
||||
+
|
||||
+ if (request == PTRACE_ATTACH) {
|
||||
+ ret = ptrace_attach(child);
|
||||
+ /*
|
||||
|
@ -1453,7 +1502,8 @@ index 23bde94..daed9e8 100644
|
|||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+int generic_ptrace_peekdata(struct task_struct *tsk, unsigned long addr, unsigned long data)
|
||||
+int generic_ptrace_peekdata(struct task_struct *tsk, unsigned long addr,
|
||||
+ unsigned long data)
|
||||
+{
|
||||
+ unsigned long tmp;
|
||||
+ int copied;
|
||||
|
@ -1464,7 +1514,8 @@ index 23bde94..daed9e8 100644
|
|||
+ return put_user(tmp, (unsigned long __user *)data);
|
||||
+}
|
||||
+
|
||||
+int generic_ptrace_pokedata(struct task_struct *tsk, unsigned long addr, unsigned long data)
|
||||
+int generic_ptrace_pokedata(struct task_struct *tsk, unsigned long addr,
|
||||
+ unsigned long data)
|
||||
+{
|
||||
+ int copied;
|
||||
+
|
||||
|
@ -1518,7 +1569,7 @@ index 23bde94..daed9e8 100644
|
|||
/*
|
||||
* ptrace a task: make the debugger its new parent and
|
||||
* move it to the ptrace list.
|
||||
@@ -117,61 +426,6 @@ int ptrace_check_attach(struct task_stru
|
||||
@@ -117,61 +429,6 @@ int ptrace_check_attach(struct task_stru
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -1580,7 +1631,7 @@ index 23bde94..daed9e8 100644
|
|||
int ptrace_attach(struct task_struct *task)
|
||||
{
|
||||
int retval;
|
||||
@@ -195,8 +449,6 @@ int ptrace_attach(struct task_struct *ta
|
||||
@@ -195,8 +452,6 @@ int ptrace_attach(struct task_struct *ta
|
||||
|
||||
task_lock(task);
|
||||
retval = __ptrace_may_access(task, PTRACE_MODE_ATTACH);
|
||||
|
@ -1589,13 +1640,10 @@ index 23bde94..daed9e8 100644
|
|||
task_unlock(task);
|
||||
if (retval)
|
||||
goto unlock_creds;
|
||||
@@ -217,94 +469,40 @@ int ptrace_attach(struct task_struct *ta
|
||||
|
||||
retval = 0;
|
||||
unlock_tasklist:
|
||||
- write_unlock_irq(&tasklist_lock);
|
||||
-unlock_creds:
|
||||
- mutex_unlock(&task->signal->cred_guard_mutex);
|
||||
@@ -220,91 +475,37 @@ unlock_tasklist:
|
||||
write_unlock_irq(&tasklist_lock);
|
||||
unlock_creds:
|
||||
mutex_unlock(&task->signal->cred_guard_mutex);
|
||||
-out:
|
||||
- return retval;
|
||||
-}
|
||||
|
@ -1654,9 +1702,6 @@ index 23bde94..daed9e8 100644
|
|||
- * If it's a zombie, our attachedness prevented normal parent notification
|
||||
- * or self-reaping. Do notification now if it would have happened earlier.
|
||||
- * If it should reap itself, return true.
|
||||
+ write_unlock_irq(&tasklist_lock);
|
||||
+unlock_creds:
|
||||
+ mutex_unlock(&task->signal->cred_guard_mutex);
|
||||
+out:
|
||||
+ return retval;
|
||||
+}
|
||||
|
@ -1711,7 +1756,7 @@ index 23bde94..daed9e8 100644
|
|||
}
|
||||
|
||||
int ptrace_detach(struct task_struct *child, unsigned int data)
|
||||
@@ -366,56 +564,6 @@ void exit_ptrace(struct task_struct *tra
|
||||
@@ -368,57 +569,7 @@ void exit_ptrace(struct task_struct *tra
|
||||
write_lock_irq(&tasklist_lock);
|
||||
}
|
||||
|
||||
|
@ -1765,10 +1810,12 @@ index 23bde94..daed9e8 100644
|
|||
- return copied;
|
||||
-}
|
||||
-
|
||||
static int ptrace_setoptions(struct task_struct *child, unsigned long data)
|
||||
-static int ptrace_setoptions(struct task_struct *child, unsigned long data)
|
||||
+static int ptrace_setoptions(struct task_struct *child, long data)
|
||||
{
|
||||
child->ptrace &= ~PT_TRACE_MASK;
|
||||
@@ -530,47 +677,6 @@ static int ptrace_resume(struct task_str
|
||||
|
||||
@@ -533,47 +683,6 @@ static int ptrace_resume(struct task_str
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1816,7 +1863,7 @@ index 23bde94..daed9e8 100644
|
|||
int ptrace_request(struct task_struct *child, long request,
|
||||
unsigned long addr, unsigned long data)
|
||||
{
|
||||
@@ -686,91 +792,7 @@ int ptrace_request(struct task_struct *c
|
||||
@@ -689,91 +798,7 @@ int ptrace_request(struct task_struct *c
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -1908,7 +1955,7 @@ index 23bde94..daed9e8 100644
|
|||
int compat_ptrace_request(struct task_struct *child, compat_long_t request,
|
||||
compat_ulong_t addr, compat_ulong_t data)
|
||||
{
|
||||
@@ -845,42 +870,5 @@ int compat_ptrace_request(struct task_st
|
||||
@@ -851,42 +876,5 @@ int compat_ptrace_request(struct task_st
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -1953,10 +2000,10 @@ index 23bde94..daed9e8 100644
|
|||
#endif /* CONFIG_COMPAT */
|
||||
+#endif /* CONFIG_UTRACE */
|
||||
diff --git a/kernel/utrace.c b/kernel/utrace.c
|
||||
index 43f38b7..fd21b7b 100644
|
||||
index 26d6faf..37dce16 100644
|
||||
--- a/kernel/utrace.c
|
||||
+++ b/kernel/utrace.c
|
||||
@@ -809,6 +809,22 @@ relock:
|
||||
@@ -816,6 +816,22 @@ relock:
|
||||
spin_unlock_irq(&task->sighand->siglock);
|
||||
spin_unlock(&utrace->lock);
|
||||
|
||||
|
|
|
@ -35,11 +35,11 @@ Signed-off-by: Roland McGrath <roland@redhat.com>
|
|||
kernel/Makefile | 1 +
|
||||
kernel/fork.c | 3 +
|
||||
kernel/ptrace.c | 14 +
|
||||
kernel/utrace.c | 2434 +++++++++++++++++++++++++++++++++++++
|
||||
11 files changed, 3837 insertions(+), 2 deletions(-)
|
||||
kernel/utrace.c | 2440 +++++++++++++++++++++++++++++++++++++
|
||||
11 files changed, 3843 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
|
||||
index 34929f2..884c36b 100644
|
||||
index 8b6e00a..2740633 100644
|
||||
--- a/Documentation/DocBook/Makefile
|
||||
+++ b/Documentation/DocBook/Makefile
|
||||
@@ -14,7 +14,7 @@ DOCBOOKS := z8530book.xml mcabook.xml de
|
||||
|
@ -668,10 +668,10 @@ index fff6572..a67bd83 100644
|
|||
if (p->files)
|
||||
fdt = files_fdtable(p->files);
|
||||
diff --git a/include/linux/sched.h b/include/linux/sched.h
|
||||
index 5e7cc95..66a1ec8 100644
|
||||
index 09f26df..e6fa5e9 100644
|
||||
--- a/include/linux/sched.h
|
||||
+++ b/include/linux/sched.h
|
||||
@@ -1339,6 +1339,11 @@ struct task_struct {
|
||||
@@ -1357,6 +1357,11 @@ struct task_struct {
|
||||
#endif
|
||||
seccomp_t seccomp;
|
||||
|
||||
|
@ -684,7 +684,7 @@ index 5e7cc95..66a1ec8 100644
|
|||
u32 parent_exec_id;
|
||||
u32 self_exec_id;
|
||||
diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h
|
||||
index c78b2f4..71fa250 100644
|
||||
index 98917e9..afba8f8 100644
|
||||
--- a/include/linux/tracehook.h
|
||||
+++ b/include/linux/tracehook.h
|
||||
@@ -49,6 +49,7 @@
|
||||
|
@ -1620,10 +1620,10 @@ index ...f251efe 100644
|
|||
+
|
||||
+#endif /* linux/utrace.h */
|
||||
diff --git a/init/Kconfig b/init/Kconfig
|
||||
index 2de5b1c..a283086 100644
|
||||
index c972899..17483b7 100644
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -332,6 +332,15 @@ config AUDIT_TREE
|
||||
@@ -339,6 +339,15 @@ config AUDIT_TREE
|
||||
depends on AUDITSYSCALL
|
||||
select FSNOTIFY
|
||||
|
||||
|
@ -1640,7 +1640,7 @@ index 2de5b1c..a283086 100644
|
|||
|
||||
menu "RCU Subsystem"
|
||||
diff --git a/kernel/Makefile b/kernel/Makefile
|
||||
index 0b72d1a..6004913 100644
|
||||
index 0b5ff08..1172528 100644
|
||||
--- a/kernel/Makefile
|
||||
+++ b/kernel/Makefile
|
||||
@@ -70,6 +70,7 @@ obj-$(CONFIG_IKCONFIG) += configs.o
|
||||
|
@ -1652,10 +1652,10 @@ index 0b72d1a..6004913 100644
|
|||
obj-$(CONFIG_AUDITSYSCALL) += auditsc.o
|
||||
obj-$(CONFIG_AUDIT_WATCH) += audit_watch.o
|
||||
diff --git a/kernel/fork.c b/kernel/fork.c
|
||||
index 98b4508..3ceff6f 100644
|
||||
index 5447dc7..10a39fe 100644
|
||||
--- a/kernel/fork.c
|
||||
+++ b/kernel/fork.c
|
||||
@@ -161,6 +161,7 @@ void free_task(struct task_struct *tsk)
|
||||
@@ -162,6 +162,7 @@ void free_task(struct task_struct *tsk)
|
||||
free_thread_info(tsk->stack);
|
||||
rt_mutex_debug_task_free(tsk);
|
||||
ftrace_graph_exit_task(tsk);
|
||||
|
@ -1663,7 +1663,7 @@ index 98b4508..3ceff6f 100644
|
|||
free_task_struct(tsk);
|
||||
}
|
||||
EXPORT_SYMBOL(free_task);
|
||||
@@ -1008,6 +1009,8 @@ static struct task_struct *copy_process(
|
||||
@@ -1018,6 +1019,8 @@ static struct task_struct *copy_process(
|
||||
if (!p)
|
||||
goto fork_out;
|
||||
|
||||
|
@ -1673,7 +1673,7 @@ index 98b4508..3ceff6f 100644
|
|||
|
||||
rt_mutex_init_task(p);
|
||||
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
|
||||
index 8049cb5..23bde94 100644
|
||||
index 84d9f8f..e275608 100644
|
||||
--- a/kernel/ptrace.c
|
||||
+++ b/kernel/ptrace.c
|
||||
@@ -15,6 +15,7 @@
|
||||
|
@ -1720,10 +1720,10 @@ index 8049cb5..23bde94 100644
|
|||
if (!current->ptrace) {
|
||||
diff --git a/kernel/utrace.c b/kernel/utrace.c
|
||||
new file mode 100644
|
||||
index ...43f38b7 100644
|
||||
index ...26d6faf 100644
|
||||
--- /dev/null
|
||||
+++ b/kernel/utrace.c
|
||||
@@ -0,0 +1,2434 @@
|
||||
@@ -0,0 +1,2440 @@
|
||||
+/*
|
||||
+ * utrace infrastructure interface for debugging user processes
|
||||
+ *
|
||||
|
@ -2440,8 +2440,15 @@ index ...43f38b7 100644
|
|||
+ /*
|
||||
+ * If no more engines want it stopped, wake it up.
|
||||
+ */
|
||||
+ if (task_is_traced(task) && !(flags & ENGINE_STOP))
|
||||
+ if (task_is_traced(task) && !(flags & ENGINE_STOP)) {
|
||||
+ /*
|
||||
+ * It just resumes, so make sure single-step
|
||||
+ * is not left set.
|
||||
+ */
|
||||
+ if (utrace->resume == UTRACE_RESUME)
|
||||
+ user_disable_single_step(task);
|
||||
+ utrace_wakeup(task, utrace);
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * In theory spin_lock() doesn't imply rcu_read_lock().
|
||||
|
@ -2865,14 +2872,7 @@ index ...43f38b7 100644
|
|||
+ break;
|
||||
+
|
||||
+ case UTRACE_RESUME:
|
||||
+ /*
|
||||
+ * This and all other cases imply resuming if stopped.
|
||||
+ * There might not be another report before it just
|
||||
+ * resumes, so make sure single-step is not left set.
|
||||
+ */
|
||||
+ clear_engine_wants_stop(engine);
|
||||
+ if (likely(reset))
|
||||
+ user_disable_single_step(target);
|
||||
+ break;
|
||||
+
|
||||
+ case UTRACE_BLOCKSTEP:
|
||||
|
@ -3238,6 +3238,12 @@ index ...43f38b7 100644
|
|||
+ engine, event)))
|
||||
+ return NULL;
|
||||
+
|
||||
+ if (!event) {
|
||||
+ /* We only got here to report QUIESCE */
|
||||
+ report->spurious = false;
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * finish_callback() reset utrace->reporting after the
|
||||
+ * quiesce callback. Now we set it again (as above)
|
||||
|
@ -3253,7 +3259,7 @@ index ...43f38b7 100644
|
|||
+ if (want & ENGINE_STOP)
|
||||
+ report->action = UTRACE_STOP;
|
||||
+
|
||||
+ if (want & (event ?: UTRACE_EVENT(QUIESCE))) {
|
||||
+ if (want & event) {
|
||||
+ report->spurious = false;
|
||||
+ return ops;
|
||||
+ }
|
||||
|
|
|
@ -1,185 +0,0 @@
|
|||
Support for USB HID devices on the new Macbook Airs. From -next.
|
||||
|
||||
diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
|
||||
index eaeca56..6c52203 100644
|
||||
--- a/drivers/hid/hid-apple.c
|
||||
+++ b/drivers/hid/hid-apple.c
|
||||
@@ -59,6 +59,27 @@ struct apple_key_translation {
|
||||
u8 flags;
|
||||
};
|
||||
|
||||
+static const struct apple_key_translation macbookair_fn_keys[] = {
|
||||
+ { KEY_BACKSPACE, KEY_DELETE },
|
||||
+ { KEY_ENTER, KEY_INSERT },
|
||||
+ { KEY_F1, KEY_BRIGHTNESSDOWN, APPLE_FLAG_FKEY },
|
||||
+ { KEY_F2, KEY_BRIGHTNESSUP, APPLE_FLAG_FKEY },
|
||||
+ { KEY_F3, KEY_SCALE, APPLE_FLAG_FKEY },
|
||||
+ { KEY_F4, KEY_DASHBOARD, APPLE_FLAG_FKEY },
|
||||
+ { KEY_F6, KEY_PREVIOUSSONG, APPLE_FLAG_FKEY },
|
||||
+ { KEY_F7, KEY_PLAYPAUSE, APPLE_FLAG_FKEY },
|
||||
+ { KEY_F8, KEY_NEXTSONG, APPLE_FLAG_FKEY },
|
||||
+ { KEY_F9, KEY_MUTE, APPLE_FLAG_FKEY },
|
||||
+ { KEY_F10, KEY_VOLUMEDOWN, APPLE_FLAG_FKEY },
|
||||
+ { KEY_F11, KEY_VOLUMEUP, APPLE_FLAG_FKEY },
|
||||
+ { KEY_F12, KEY_EJECTCD, APPLE_FLAG_FKEY },
|
||||
+ { KEY_UP, KEY_PAGEUP },
|
||||
+ { KEY_DOWN, KEY_PAGEDOWN },
|
||||
+ { KEY_LEFT, KEY_HOME },
|
||||
+ { KEY_RIGHT, KEY_END },
|
||||
+ { }
|
||||
+};
|
||||
+
|
||||
static const struct apple_key_translation apple_fn_keys[] = {
|
||||
{ KEY_BACKSPACE, KEY_DELETE },
|
||||
{ KEY_ENTER, KEY_INSERT },
|
||||
@@ -157,10 +178,15 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
|
||||
if (fnmode) {
|
||||
int do_translate;
|
||||
|
||||
- trans = apple_find_translation((hid->product < 0x21d ||
|
||||
- hid->product >= 0x300) ?
|
||||
- powerbook_fn_keys : apple_fn_keys,
|
||||
- usage->code);
|
||||
+ if(hid->product >= USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI &&
|
||||
+ hid->product <= USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS) {
|
||||
+ trans = apple_find_translation(macbookair_fn_keys, usage->code);
|
||||
+ } else if (hid->product < 0x21d || hid->product >= 0x300) {
|
||||
+ trans = apple_find_translation(powerbook_fn_keys, usage->code);
|
||||
+ } else {
|
||||
+ trans = apple_find_translation(apple_fn_keys, usage->code);
|
||||
+ }
|
||||
+
|
||||
if (trans) {
|
||||
if (test_bit(usage->code, asc->pressed_fn))
|
||||
do_translate = 1;
|
||||
@@ -436,6 +462,18 @@ static const struct hid_device_id apple_devices[] = {
|
||||
.driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_JIS),
|
||||
.driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI),
|
||||
+ .driver_data = APPLE_HAS_FN },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4_ISO),
|
||||
+ .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4_JIS),
|
||||
+ .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI),
|
||||
+ .driver_data = APPLE_HAS_FN },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO),
|
||||
+ .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS),
|
||||
+ .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
|
||||
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI),
|
||||
.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
|
||||
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO),
|
||||
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
|
||||
index b3393e1..53ac909 100644
|
||||
--- a/drivers/hid/hid-core.c
|
||||
+++ b/drivers/hid/hid-core.c
|
||||
@@ -1274,6 +1274,12 @@ static const struct hid_device_id hid_blacklist[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ISO) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_JIS) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4_ISO) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4_JIS) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS) },
|
||||
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI) },
|
||||
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO) },
|
||||
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS) },
|
||||
@@ -1760,6 +1766,12 @@ static const struct hid_device_id hid_mouse_ignore_list[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ISO) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_JIS) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4_ISO) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4_JIS) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) },
|
||||
{ }
|
||||
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
|
||||
index 68114db..104b9f9 100644
|
||||
--- a/drivers/hid/hid-ids.h
|
||||
+++ b/drivers/hid/hid-ids.h
|
||||
@@ -97,6 +97,12 @@
|
||||
#define USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI 0x0236
|
||||
#define USB_DEVICE_ID_APPLE_WELLSPRING3_ISO 0x0237
|
||||
#define USB_DEVICE_ID_APPLE_WELLSPRING3_JIS 0x0238
|
||||
+#define USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI 0x023f
|
||||
+#define USB_DEVICE_ID_APPLE_WELLSPRING4_ISO 0x0240
|
||||
+#define USB_DEVICE_ID_APPLE_WELLSPRING4_JIS 0x0241
|
||||
+#define USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI 0x0242
|
||||
+#define USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO 0x0243
|
||||
+#define USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS 0x0244
|
||||
#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI 0x0239
|
||||
#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO 0x023a
|
||||
#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS 0x023b
|
||||
|
||||
diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c
|
||||
index b952317..ee82851 100644
|
||||
--- a/drivers/input/mouse/bcm5974.c
|
||||
+++ b/drivers/input/mouse/bcm5974.c
|
||||
@@ -55,6 +55,14 @@
|
||||
#define USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI 0x0236
|
||||
#define USB_DEVICE_ID_APPLE_WELLSPRING3_ISO 0x0237
|
||||
#define USB_DEVICE_ID_APPLE_WELLSPRING3_JIS 0x0238
|
||||
+/* MacbookAir3,2 (unibody), aka wellspring5 */
|
||||
+#define USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI 0x023f
|
||||
+#define USB_DEVICE_ID_APPLE_WELLSPRING4_ISO 0x0240
|
||||
+#define USB_DEVICE_ID_APPLE_WELLSPRING4_JIS 0x0241
|
||||
+/* MacbookAir3,1 (unibody), aka wellspring4 */
|
||||
+#define USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI 0x0242
|
||||
+#define USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO 0x0243
|
||||
+#define USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS 0x0244
|
||||
|
||||
#define BCM5974_DEVICE(prod) { \
|
||||
.match_flags = (USB_DEVICE_ID_MATCH_DEVICE | \
|
||||
@@ -80,6 +88,14 @@ static const struct usb_device_id bcm5974_table[] = {
|
||||
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI),
|
||||
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING3_ISO),
|
||||
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING3_JIS),
|
||||
+ /* MacbookAir3,2 */
|
||||
+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI),
|
||||
+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4_ISO),
|
||||
+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4_JIS),
|
||||
+ /* MacbookAir3,1 */
|
||||
+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI),
|
||||
+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO),
|
||||
+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS),
|
||||
/* Terminating entry */
|
||||
{}
|
||||
};
|
||||
@@ -234,6 +250,30 @@ static const struct bcm5974_config bcm5974_config_table[] = {
|
||||
{ DIM_X, DIM_X / SN_COORD, -4460, 5166 },
|
||||
{ DIM_Y, DIM_Y / SN_COORD, -75, 6700 }
|
||||
},
|
||||
+ {
|
||||
+ USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI,
|
||||
+ USB_DEVICE_ID_APPLE_WELLSPRING4_ISO,
|
||||
+ USB_DEVICE_ID_APPLE_WELLSPRING4_JIS,
|
||||
+ HAS_INTEGRATED_BUTTON,
|
||||
+ 0x84, sizeof(struct bt_data),
|
||||
+ 0x81, TYPE2, FINGER_TYPE2, FINGER_TYPE2 + SIZEOF_ALL_FINGERS,
|
||||
+ { DIM_PRESSURE, DIM_PRESSURE / SN_PRESSURE, 0, 300 },
|
||||
+ { DIM_WIDTH, DIM_WIDTH / SN_WIDTH, 0, 2048 },
|
||||
+ { DIM_X, DIM_X / SN_COORD, -4620, 5140 },
|
||||
+ { DIM_Y, DIM_Y / SN_COORD, -150, 6600 }
|
||||
+ },
|
||||
+ {
|
||||
+ USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI,
|
||||
+ USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO,
|
||||
+ USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS,
|
||||
+ HAS_INTEGRATED_BUTTON,
|
||||
+ 0x84, sizeof(struct bt_data),
|
||||
+ 0x81, TYPE2, FINGER_TYPE2, FINGER_TYPE2 + SIZEOF_ALL_FINGERS,
|
||||
+ { DIM_PRESSURE, DIM_PRESSURE / SN_PRESSURE, 0, 300 },
|
||||
+ { DIM_WIDTH, DIM_WIDTH / SN_WIDTH, 0, 2048 },
|
||||
+ { DIM_X, DIM_X / SN_COORD, -4616, 5112 },
|
||||
+ { DIM_Y, DIM_Y / SN_COORD, -142, 5234 }
|
||||
+ },
|
||||
{}
|
||||
};
|
|
@ -1,389 +0,0 @@
|
|||
From df43fae25437d7bc7dfff72599c1e825038b67cf Mon Sep 17 00:00:00 2001
|
||||
From: Mel Gorman <mel@csn.ul.ie>
|
||||
Date: Wed, 24 Nov 2010 22:18:23 -0500
|
||||
Subject: [PATCH 1/2] mm: page allocator: Adjust the per-cpu counter threshold when memory is low
|
||||
|
||||
Commit aa45484 ("calculate a better estimate of NR_FREE_PAGES when memory
|
||||
is low") noted that watermarks were based on the vmstat NR_FREE_PAGES. To
|
||||
avoid synchronization overhead, these counters are maintained on a per-cpu
|
||||
basis and drained both periodically and when a threshold is above a
|
||||
threshold. On large CPU systems, the difference between the estimate and
|
||||
real value of NR_FREE_PAGES can be very high. The system can get into a
|
||||
case where pages are allocated far below the min watermark potentially
|
||||
causing livelock issues. The commit solved the problem by taking a better
|
||||
reading of NR_FREE_PAGES when memory was low.
|
||||
|
||||
Unfortately, as reported by Shaohua Li this accurate reading can consume a
|
||||
large amount of CPU time on systems with many sockets due to cache line
|
||||
bouncing. This patch takes a different approach. For large machines
|
||||
where counter drift might be unsafe and while kswapd is awake, the per-cpu
|
||||
thresholds for the target pgdat are reduced to limit the level of drift to
|
||||
what should be a safe level. This incurs a performance penalty in heavy
|
||||
memory pressure by a factor that depends on the workload and the machine
|
||||
but the machine should function correctly without accidentally exhausting
|
||||
all memory on a node. There is an additional cost when kswapd wakes and
|
||||
sleeps but the event is not expected to be frequent - in Shaohua's test
|
||||
case, there was one recorded sleep and wake event at least.
|
||||
|
||||
To ensure that kswapd wakes up, a safe version of zone_watermark_ok() is
|
||||
introduced that takes a more accurate reading of NR_FREE_PAGES when called
|
||||
from wakeup_kswapd, when deciding whether it is really safe to go back to
|
||||
sleep in sleeping_prematurely() and when deciding if a zone is really
|
||||
balanced or not in balance_pgdat(). We are still using an expensive
|
||||
function but limiting how often it is called.
|
||||
|
||||
When the test case is reproduced, the time spent in the watermark
|
||||
functions is reduced. The following report is on the percentage of time
|
||||
spent cumulatively spent in the functions zone_nr_free_pages(),
|
||||
zone_watermark_ok(), __zone_watermark_ok(), zone_watermark_ok_safe(),
|
||||
zone_page_state_snapshot(), zone_page_state().
|
||||
|
||||
vanilla 11.6615%
|
||||
disable-threshold 0.2584%
|
||||
|
||||
Reported-by: Shaohua Li <shaohua.li@intel.com>
|
||||
Signed-off-by: Mel Gorman <mel@csn.ul.ie>
|
||||
Reviewed-by: Christoph Lameter <cl@linux.com>
|
||||
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
[[http://userweb.kernel.org/~akpm/mmotm/broken-out/mm-page-allocator-adjust-the-per-cpu-counter-threshold-when-memory-is-low.patch]]
|
||||
---
|
||||
include/linux/mmzone.h | 10 ++-----
|
||||
include/linux/vmstat.h | 5 +++
|
||||
mm/mmzone.c | 21 ---------------
|
||||
mm/page_alloc.c | 35 +++++++++++++++++++-----
|
||||
mm/vmscan.c | 23 +++++++++-------
|
||||
mm/vmstat.c | 68 +++++++++++++++++++++++++++++++++++++++++++++++-
|
||||
6 files changed, 115 insertions(+), 47 deletions(-)
|
||||
|
||||
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
|
||||
index 3984c4e..8d789d7 100644
|
||||
--- a/include/linux/mmzone.h
|
||||
+++ b/include/linux/mmzone.h
|
||||
@@ -448,12 +448,6 @@ static inline int zone_is_oom_locked(const struct zone *zone)
|
||||
return test_bit(ZONE_OOM_LOCKED, &zone->flags);
|
||||
}
|
||||
|
||||
-#ifdef CONFIG_SMP
|
||||
-unsigned long zone_nr_free_pages(struct zone *zone);
|
||||
-#else
|
||||
-#define zone_nr_free_pages(zone) zone_page_state(zone, NR_FREE_PAGES)
|
||||
-#endif /* CONFIG_SMP */
|
||||
-
|
||||
/*
|
||||
* The "priority" of VM scanning is how much of the queues we will scan in one
|
||||
* go. A value of 12 for DEF_PRIORITY implies that we will scan 1/4096th of the
|
||||
@@ -651,7 +645,9 @@ typedef struct pglist_data {
|
||||
extern struct mutex zonelists_mutex;
|
||||
void build_all_zonelists(void *data);
|
||||
void wakeup_kswapd(struct zone *zone, int order);
|
||||
-int zone_watermark_ok(struct zone *z, int order, unsigned long mark,
|
||||
+bool zone_watermark_ok(struct zone *z, int order, unsigned long mark,
|
||||
+ int classzone_idx, int alloc_flags);
|
||||
+bool zone_watermark_ok_safe(struct zone *z, int order, unsigned long mark,
|
||||
int classzone_idx, int alloc_flags);
|
||||
enum memmap_context {
|
||||
MEMMAP_EARLY,
|
||||
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h
|
||||
index eaaea37..e4cc21c 100644
|
||||
--- a/include/linux/vmstat.h
|
||||
+++ b/include/linux/vmstat.h
|
||||
@@ -254,6 +254,8 @@ extern void dec_zone_state(struct zone *, enum zone_stat_item);
|
||||
extern void __dec_zone_state(struct zone *, enum zone_stat_item);
|
||||
|
||||
void refresh_cpu_vm_stats(int);
|
||||
+void reduce_pgdat_percpu_threshold(pg_data_t *pgdat);
|
||||
+void restore_pgdat_percpu_threshold(pg_data_t *pgdat);
|
||||
#else /* CONFIG_SMP */
|
||||
|
||||
/*
|
||||
@@ -298,6 +300,9 @@ static inline void __dec_zone_page_state(struct page *page,
|
||||
#define dec_zone_page_state __dec_zone_page_state
|
||||
#define mod_zone_page_state __mod_zone_page_state
|
||||
|
||||
+static inline void reduce_pgdat_percpu_threshold(pg_data_t *pgdat) { }
|
||||
+static inline void restore_pgdat_percpu_threshold(pg_data_t *pgdat) { }
|
||||
+
|
||||
static inline void refresh_cpu_vm_stats(int cpu) { }
|
||||
#endif
|
||||
|
||||
diff --git a/mm/mmzone.c b/mm/mmzone.c
|
||||
index e35bfb8..f5b7d17 100644
|
||||
--- a/mm/mmzone.c
|
||||
+++ b/mm/mmzone.c
|
||||
@@ -87,24 +87,3 @@ int memmap_valid_within(unsigned long pfn,
|
||||
return 1;
|
||||
}
|
||||
#endif /* CONFIG_ARCH_HAS_HOLES_MEMORYMODEL */
|
||||
-
|
||||
-#ifdef CONFIG_SMP
|
||||
-/* Called when a more accurate view of NR_FREE_PAGES is needed */
|
||||
-unsigned long zone_nr_free_pages(struct zone *zone)
|
||||
-{
|
||||
- unsigned long nr_free_pages = zone_page_state(zone, NR_FREE_PAGES);
|
||||
-
|
||||
- /*
|
||||
- * While kswapd is awake, it is considered the zone is under some
|
||||
- * memory pressure. Under pressure, there is a risk that
|
||||
- * per-cpu-counter-drift will allow the min watermark to be breached
|
||||
- * potentially causing a live-lock. While kswapd is awake and
|
||||
- * free pages are low, get a better estimate for free pages
|
||||
- */
|
||||
- if (nr_free_pages < zone->percpu_drift_mark &&
|
||||
- !waitqueue_active(&zone->zone_pgdat->kswapd_wait))
|
||||
- return zone_page_state_snapshot(zone, NR_FREE_PAGES);
|
||||
-
|
||||
- return nr_free_pages;
|
||||
-}
|
||||
-#endif /* CONFIG_SMP */
|
||||
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
|
||||
index f12ad18..0286150 100644
|
||||
--- a/mm/page_alloc.c
|
||||
+++ b/mm/page_alloc.c
|
||||
@@ -1454,24 +1454,24 @@ static inline int should_fail_alloc_page(gfp_t gfp_mask, unsigned int order)
|
||||
#endif /* CONFIG_FAIL_PAGE_ALLOC */
|
||||
|
||||
/*
|
||||
- * Return 1 if free pages are above 'mark'. This takes into account the order
|
||||
+ * Return true if free pages are above 'mark'. This takes into account the order
|
||||
* of the allocation.
|
||||
*/
|
||||
-int zone_watermark_ok(struct zone *z, int order, unsigned long mark,
|
||||
- int classzone_idx, int alloc_flags)
|
||||
+static bool __zone_watermark_ok(struct zone *z, int order, unsigned long mark,
|
||||
+ int classzone_idx, int alloc_flags, long free_pages)
|
||||
{
|
||||
/* free_pages my go negative - that's OK */
|
||||
long min = mark;
|
||||
- long free_pages = zone_nr_free_pages(z) - (1 << order) + 1;
|
||||
int o;
|
||||
|
||||
+ free_pages -= (1 << order) + 1;
|
||||
if (alloc_flags & ALLOC_HIGH)
|
||||
min -= min / 2;
|
||||
if (alloc_flags & ALLOC_HARDER)
|
||||
min -= min / 4;
|
||||
|
||||
if (free_pages <= min + z->lowmem_reserve[classzone_idx])
|
||||
- return 0;
|
||||
+ return false;
|
||||
for (o = 0; o < order; o++) {
|
||||
/* At the next order, this order's pages become unavailable */
|
||||
free_pages -= z->free_area[o].nr_free << o;
|
||||
@@ -1480,9 +1480,28 @@ int zone_watermark_ok(struct zone *z, int order, unsigned long mark,
|
||||
min >>= 1;
|
||||
|
||||
if (free_pages <= min)
|
||||
- return 0;
|
||||
+ return false;
|
||||
}
|
||||
- return 1;
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
+bool zone_watermark_ok(struct zone *z, int order, unsigned long mark,
|
||||
+ int classzone_idx, int alloc_flags)
|
||||
+{
|
||||
+ return __zone_watermark_ok(z, order, mark, classzone_idx, alloc_flags,
|
||||
+ zone_page_state(z, NR_FREE_PAGES));
|
||||
+}
|
||||
+
|
||||
+bool zone_watermark_ok_safe(struct zone *z, int order, unsigned long mark,
|
||||
+ int classzone_idx, int alloc_flags)
|
||||
+{
|
||||
+ long free_pages = zone_page_state(z, NR_FREE_PAGES);
|
||||
+
|
||||
+ if (z->percpu_drift_mark && free_pages < z->percpu_drift_mark)
|
||||
+ free_pages = zone_page_state_snapshot(z, NR_FREE_PAGES);
|
||||
+
|
||||
+ return __zone_watermark_ok(z, order, mark, classzone_idx, alloc_flags,
|
||||
+ free_pages);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NUMA
|
||||
@@ -2436,7 +2455,7 @@ void show_free_areas(void)
|
||||
" all_unreclaimable? %s"
|
||||
"\n",
|
||||
zone->name,
|
||||
- K(zone_nr_free_pages(zone)),
|
||||
+ K(zone_page_state(zone, NR_FREE_PAGES)),
|
||||
K(min_wmark_pages(zone)),
|
||||
K(low_wmark_pages(zone)),
|
||||
K(high_wmark_pages(zone)),
|
||||
diff --git a/mm/vmscan.c b/mm/vmscan.c
|
||||
index c5dfabf..3e71cb1 100644
|
||||
--- a/mm/vmscan.c
|
||||
+++ b/mm/vmscan.c
|
||||
@@ -2082,7 +2082,7 @@ static int sleeping_prematurely(pg_data_t *pgdat, int order, long remaining)
|
||||
if (zone->all_unreclaimable)
|
||||
continue;
|
||||
|
||||
- if (!zone_watermark_ok(zone, order, high_wmark_pages(zone),
|
||||
+ if (!zone_watermark_ok_safe(zone, order, high_wmark_pages(zone),
|
||||
0, 0))
|
||||
return 1;
|
||||
}
|
||||
@@ -2169,7 +2169,7 @@ loop_again:
|
||||
shrink_active_list(SWAP_CLUSTER_MAX, zone,
|
||||
&sc, priority, 0);
|
||||
|
||||
- if (!zone_watermark_ok(zone, order,
|
||||
+ if (!zone_watermark_ok_safe(zone, order,
|
||||
high_wmark_pages(zone), 0, 0)) {
|
||||
end_zone = i;
|
||||
break;
|
||||
@@ -2215,7 +2215,7 @@ loop_again:
|
||||
* We put equal pressure on every zone, unless one
|
||||
* zone has way too many pages free already.
|
||||
*/
|
||||
- if (!zone_watermark_ok(zone, order,
|
||||
+ if (!zone_watermark_ok_safe(zone, order,
|
||||
8*high_wmark_pages(zone), end_zone, 0))
|
||||
shrink_zone(priority, zone, &sc);
|
||||
reclaim_state->reclaimed_slab = 0;
|
||||
@@ -2236,7 +2236,7 @@ loop_again:
|
||||
total_scanned > sc.nr_reclaimed + sc.nr_reclaimed / 2)
|
||||
sc.may_writepage = 1;
|
||||
|
||||
- if (!zone_watermark_ok(zone, order,
|
||||
+ if (!zone_watermark_ok_safe(zone, order,
|
||||
high_wmark_pages(zone), end_zone, 0)) {
|
||||
all_zones_ok = 0;
|
||||
/*
|
||||
@@ -2244,7 +2244,7 @@ loop_again:
|
||||
* means that we have a GFP_ATOMIC allocation
|
||||
* failure risk. Hurry up!
|
||||
*/
|
||||
- if (!zone_watermark_ok(zone, order,
|
||||
+ if (!zone_watermark_ok_safe(zone, order,
|
||||
min_wmark_pages(zone), end_zone, 0))
|
||||
has_under_min_watermark_zone = 1;
|
||||
}
|
||||
@@ -2378,7 +2378,9 @@ static int kswapd(void *p)
|
||||
*/
|
||||
if (!sleeping_prematurely(pgdat, order, remaining)) {
|
||||
trace_mm_vmscan_kswapd_sleep(pgdat->node_id);
|
||||
+ restore_pgdat_percpu_threshold(pgdat);
|
||||
schedule();
|
||||
+ reduce_pgdat_percpu_threshold(pgdat);
|
||||
} else {
|
||||
if (remaining)
|
||||
count_vm_event(KSWAPD_LOW_WMARK_HIT_QUICKLY);
|
||||
@@ -2417,16 +2419,17 @@ void wakeup_kswapd(struct zone *zone, int order)
|
||||
if (!populated_zone(zone))
|
||||
return;
|
||||
|
||||
- pgdat = zone->zone_pgdat;
|
||||
- if (zone_watermark_ok(zone, order, low_wmark_pages(zone), 0, 0))
|
||||
+ if (!cpuset_zone_allowed_hardwall(zone, GFP_KERNEL))
|
||||
return;
|
||||
+ pgdat = zone->zone_pgdat;
|
||||
if (pgdat->kswapd_max_order < order)
|
||||
pgdat->kswapd_max_order = order;
|
||||
- trace_mm_vmscan_wakeup_kswapd(pgdat->node_id, zone_idx(zone), order);
|
||||
- if (!cpuset_zone_allowed_hardwall(zone, GFP_KERNEL))
|
||||
- return;
|
||||
if (!waitqueue_active(&pgdat->kswapd_wait))
|
||||
return;
|
||||
+ if (zone_watermark_ok_safe(zone, order, low_wmark_pages(zone), 0, 0))
|
||||
+ return;
|
||||
+
|
||||
+ trace_mm_vmscan_wakeup_kswapd(pgdat->node_id, zone_idx(zone), order);
|
||||
wake_up_interruptible(&pgdat->kswapd_wait);
|
||||
}
|
||||
|
||||
diff --git a/mm/vmstat.c b/mm/vmstat.c
|
||||
index 355a9e6..4d7faeb 100644
|
||||
--- a/mm/vmstat.c
|
||||
+++ b/mm/vmstat.c
|
||||
@@ -81,6 +81,30 @@ EXPORT_SYMBOL(vm_stat);
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
|
||||
+static int calculate_pressure_threshold(struct zone *zone)
|
||||
+{
|
||||
+ int threshold;
|
||||
+ int watermark_distance;
|
||||
+
|
||||
+ /*
|
||||
+ * As vmstats are not up to date, there is drift between the estimated
|
||||
+ * and real values. For high thresholds and a high number of CPUs, it
|
||||
+ * is possible for the min watermark to be breached while the estimated
|
||||
+ * value looks fine. The pressure threshold is a reduced value such
|
||||
+ * that even the maximum amount of drift will not accidentally breach
|
||||
+ * the min watermark
|
||||
+ */
|
||||
+ watermark_distance = low_wmark_pages(zone) - min_wmark_pages(zone);
|
||||
+ threshold = max(1, (int)(watermark_distance / num_online_cpus()));
|
||||
+
|
||||
+ /*
|
||||
+ * Maximum threshold is 125
|
||||
+ */
|
||||
+ threshold = min(125, threshold);
|
||||
+
|
||||
+ return threshold;
|
||||
+}
|
||||
+
|
||||
static int calculate_threshold(struct zone *zone)
|
||||
{
|
||||
int threshold;
|
||||
@@ -159,6 +183,48 @@ static void refresh_zone_stat_thresholds(void)
|
||||
}
|
||||
}
|
||||
|
||||
+void reduce_pgdat_percpu_threshold(pg_data_t *pgdat)
|
||||
+{
|
||||
+ struct zone *zone;
|
||||
+ int cpu;
|
||||
+ int threshold;
|
||||
+ int i;
|
||||
+
|
||||
+ get_online_cpus();
|
||||
+ for (i = 0; i < pgdat->nr_zones; i++) {
|
||||
+ zone = &pgdat->node_zones[i];
|
||||
+ if (!zone->percpu_drift_mark)
|
||||
+ continue;
|
||||
+
|
||||
+ threshold = calculate_pressure_threshold(zone);
|
||||
+ for_each_online_cpu(cpu)
|
||||
+ per_cpu_ptr(zone->pageset, cpu)->stat_threshold
|
||||
+ = threshold;
|
||||
+ }
|
||||
+ put_online_cpus();
|
||||
+}
|
||||
+
|
||||
+void restore_pgdat_percpu_threshold(pg_data_t *pgdat)
|
||||
+{
|
||||
+ struct zone *zone;
|
||||
+ int cpu;
|
||||
+ int threshold;
|
||||
+ int i;
|
||||
+
|
||||
+ get_online_cpus();
|
||||
+ for (i = 0; i < pgdat->nr_zones; i++) {
|
||||
+ zone = &pgdat->node_zones[i];
|
||||
+ if (!zone->percpu_drift_mark)
|
||||
+ continue;
|
||||
+
|
||||
+ threshold = calculate_threshold(zone);
|
||||
+ for_each_online_cpu(cpu)
|
||||
+ per_cpu_ptr(zone->pageset, cpu)->stat_threshold
|
||||
+ = threshold;
|
||||
+ }
|
||||
+ put_online_cpus();
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* For use when we know that interrupts are disabled.
|
||||
*/
|
||||
@@ -826,7 +892,7 @@ static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat,
|
||||
"\n scanned %lu"
|
||||
"\n spanned %lu"
|
||||
"\n present %lu",
|
||||
- zone_nr_free_pages(zone),
|
||||
+ zone_page_state(zone, NR_FREE_PAGES),
|
||||
min_wmark_pages(zone),
|
||||
low_wmark_pages(zone),
|
||||
high_wmark_pages(zone),
|
||||
--
|
||||
1.7.3.2
|
||||
|
|
@ -1,167 +0,0 @@
|
|||
From 82e3d4969144377d13da97d511e849e8cf3e6dcc Mon Sep 17 00:00:00 2001
|
||||
From: Mel Gorman <mel@csn.ul.ie>
|
||||
Date: Wed, 24 Nov 2010 22:24:24 -0500
|
||||
Subject: [PATCH 2/2] mm: vmstat: Use a single setter function and callback for adjusting percpu thresholds
|
||||
|
||||
reduce_pgdat_percpu_threshold() and restore_pgdat_percpu_threshold() exist
|
||||
to adjust the per-cpu vmstat thresholds while kswapd is awake to avoid
|
||||
errors due to counter drift. The functions duplicate some code so this
|
||||
patch replaces them with a single set_pgdat_percpu_threshold() that takes
|
||||
a callback function to calculate the desired threshold as a parameter.
|
||||
|
||||
Signed-off-by: Mel Gorman <mel@csn.ul.ie>
|
||||
Reviewed-by: Christoph Lameter <cl@linux.com>
|
||||
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
|
||||
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
[the various mmotm patches updating this were rolled up. --kyle]
|
||||
[[http://userweb.kernel.org/~akpm/mmotm/broken-out/mm-vmstat-use-a-single-setter-function-and-callback-for-adjusting-percpu-thresholds-fix-set_pgdat_percpu_threshold-dont-use-for_each_online_cpu.patch]]
|
||||
---
|
||||
include/linux/vmstat.h | 10 ++++++----
|
||||
mm/vmscan.c | 19 +++++++++++++++++--
|
||||
mm/vmstat.c | 36 +++++++-----------------------------
|
||||
3 files changed, 30 insertions(+), 35 deletions(-)
|
||||
|
||||
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h
|
||||
index e4cc21c..833e676 100644
|
||||
--- a/include/linux/vmstat.h
|
||||
+++ b/include/linux/vmstat.h
|
||||
@@ -254,8 +254,11 @@ extern void dec_zone_state(struct zone *, enum zone_stat_item);
|
||||
extern void __dec_zone_state(struct zone *, enum zone_stat_item);
|
||||
|
||||
void refresh_cpu_vm_stats(int);
|
||||
-void reduce_pgdat_percpu_threshold(pg_data_t *pgdat);
|
||||
-void restore_pgdat_percpu_threshold(pg_data_t *pgdat);
|
||||
+
|
||||
+int calculate_pressure_threshold(struct zone *zone);
|
||||
+int calculate_normal_threshold(struct zone *zone);
|
||||
+void set_pgdat_percpu_threshold(pg_data_t *pgdat,
|
||||
+ int (*calculate_pressure)(struct zone *));
|
||||
#else /* CONFIG_SMP */
|
||||
|
||||
/*
|
||||
@@ -300,8 +303,7 @@ static inline void __dec_zone_page_state(struct page *page,
|
||||
#define dec_zone_page_state __dec_zone_page_state
|
||||
#define mod_zone_page_state __mod_zone_page_state
|
||||
|
||||
-static inline void reduce_pgdat_percpu_threshold(pg_data_t *pgdat) { }
|
||||
-static inline void restore_pgdat_percpu_threshold(pg_data_t *pgdat) { }
|
||||
+#define set_pgdat_percpu_threshold(pgdat, callback) { }
|
||||
|
||||
static inline void refresh_cpu_vm_stats(int cpu) { }
|
||||
#endif
|
||||
diff --git a/mm/vmscan.c b/mm/vmscan.c
|
||||
index 3e71cb1..ba39948 100644
|
||||
--- a/mm/vmscan.c
|
||||
+++ b/mm/vmscan.c
|
||||
@@ -2378,9 +2378,24 @@ static int kswapd(void *p)
|
||||
*/
|
||||
if (!sleeping_prematurely(pgdat, order, remaining)) {
|
||||
trace_mm_vmscan_kswapd_sleep(pgdat->node_id);
|
||||
- restore_pgdat_percpu_threshold(pgdat);
|
||||
+
|
||||
+ /*
|
||||
+ * vmstat counters are not perfectly
|
||||
+ * accurate and the estimated value
|
||||
+ * for counters such as NR_FREE_PAGES
|
||||
+ * can deviate from the true value by
|
||||
+ * nr_online_cpus * threshold. To
|
||||
+ * avoid the zone watermarks being
|
||||
+ * breached while under pressure, we
|
||||
+ * reduce the per-cpu vmstat threshold
|
||||
+ * while kswapd is awake and restore
|
||||
+ * them before going back to sleep.
|
||||
+ */
|
||||
+ set_pgdat_percpu_threshold(pgdat,
|
||||
+ calculate_normal_threshold);
|
||||
schedule();
|
||||
- reduce_pgdat_percpu_threshold(pgdat);
|
||||
+ set_pgdat_percpu_threshold(pgdat,
|
||||
+ calculate_pressure_threshold);
|
||||
} else {
|
||||
if (remaining)
|
||||
count_vm_event(KSWAPD_LOW_WMARK_HIT_QUICKLY);
|
||||
diff --git a/mm/vmstat.c b/mm/vmstat.c
|
||||
index 4d7faeb..511c2c0 100644
|
||||
--- a/mm/vmstat.c
|
||||
+++ b/mm/vmstat.c
|
||||
@@ -81,7 +81,7 @@ EXPORT_SYMBOL(vm_stat);
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
|
||||
-static int calculate_pressure_threshold(struct zone *zone)
|
||||
+int calculate_pressure_threshold(struct zone *zone)
|
||||
{
|
||||
int threshold;
|
||||
int watermark_distance;
|
||||
@@ -105,7 +105,7 @@ static int calculate_pressure_threshold(struct zone *zone)
|
||||
return threshold;
|
||||
}
|
||||
|
||||
-static int calculate_threshold(struct zone *zone)
|
||||
+int calculate_normal_threshold(struct zone *zone)
|
||||
{
|
||||
int threshold;
|
||||
int mem; /* memory in 128 MB units */
|
||||
@@ -164,7 +164,7 @@ static void refresh_zone_stat_thresholds(void)
|
||||
for_each_populated_zone(zone) {
|
||||
unsigned long max_drift, tolerate_drift;
|
||||
|
||||
- threshold = calculate_threshold(zone);
|
||||
+ threshold = calculate_normal_threshold(zone);
|
||||
|
||||
for_each_online_cpu(cpu)
|
||||
per_cpu_ptr(zone->pageset, cpu)->stat_threshold
|
||||
@@ -183,46 +183,24 @@ static void refresh_zone_stat_thresholds(void)
|
||||
}
|
||||
}
|
||||
|
||||
-void reduce_pgdat_percpu_threshold(pg_data_t *pgdat)
|
||||
+void set_pgdat_percpu_threshold(pg_data_t *pgdat,
|
||||
+ int (*calculate_pressure)(struct zone *))
|
||||
{
|
||||
struct zone *zone;
|
||||
int cpu;
|
||||
int threshold;
|
||||
int i;
|
||||
|
||||
- get_online_cpus();
|
||||
- for (i = 0; i < pgdat->nr_zones; i++) {
|
||||
- zone = &pgdat->node_zones[i];
|
||||
- if (!zone->percpu_drift_mark)
|
||||
- continue;
|
||||
-
|
||||
- threshold = calculate_pressure_threshold(zone);
|
||||
- for_each_online_cpu(cpu)
|
||||
- per_cpu_ptr(zone->pageset, cpu)->stat_threshold
|
||||
- = threshold;
|
||||
- }
|
||||
- put_online_cpus();
|
||||
-}
|
||||
-
|
||||
-void restore_pgdat_percpu_threshold(pg_data_t *pgdat)
|
||||
-{
|
||||
- struct zone *zone;
|
||||
- int cpu;
|
||||
- int threshold;
|
||||
- int i;
|
||||
-
|
||||
- get_online_cpus();
|
||||
for (i = 0; i < pgdat->nr_zones; i++) {
|
||||
zone = &pgdat->node_zones[i];
|
||||
if (!zone->percpu_drift_mark)
|
||||
continue;
|
||||
|
||||
- threshold = calculate_threshold(zone);
|
||||
- for_each_online_cpu(cpu)
|
||||
+ threshold = (*calculate_pressure)(zone);
|
||||
+ for_each_possible_cpu(cpu)
|
||||
per_cpu_ptr(zone->pageset, cpu)->stat_threshold
|
||||
= threshold;
|
||||
}
|
||||
- put_online_cpus();
|
||||
}
|
||||
|
||||
/*
|
||||
--
|
||||
1.7.3.2
|
||||
|
|
@ -1,254 +0,0 @@
|
|||
Author: Neil Horman <nhorman@tuxdriver.com>
|
||||
Date: Fri Dec 17 13:35:36 2010 -0500
|
||||
|
||||
Enhance AF_PACKET to support using non-contiguous memory when allocating ring
|
||||
buffer space. This is a combined backport of the following commits from
|
||||
net-next-2.6:
|
||||
0e3125c755445664f00ad036e4fc2cd32fd52877
|
||||
bbce5a59e4e0e6e1dbc85492caaf310ff6611309
|
||||
0af55bb58f8fa7865004ac48d16affe125ac1b7f
|
||||
920b8d913bd3d963d5c88bca160a272b71e0c95a
|
||||
|
||||
diff -up linux-2.6.34.x86_64/net/packet/af_packet.c.orig linux-2.6.34.x86_64/net/packet/af_packet.c
|
||||
--- linux-2.6.34.x86_64/net/packet/af_packet.c.orig 2010-12-17 12:16:58.000000000 -0500
|
||||
+++ linux-2.6.34.x86_64/net/packet/af_packet.c 2010-12-17 12:30:14.000000000 -0500
|
||||
@@ -61,6 +61,7 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/kmod.h>
|
||||
#include <linux/slab.h>
|
||||
+#include <linux/vmalloc.h>
|
||||
#include <net/net_namespace.h>
|
||||
#include <net/ip.h>
|
||||
#include <net/protocol.h>
|
||||
@@ -161,8 +162,14 @@ struct packet_mreq_max {
|
||||
static int packet_set_ring(struct sock *sk, struct tpacket_req *req,
|
||||
int closing, int tx_ring);
|
||||
|
||||
+#define PGV_FROM_VMALLOC 1
|
||||
+struct pgv {
|
||||
+ char *buffer;
|
||||
+ unsigned char flags;
|
||||
+};
|
||||
+
|
||||
struct packet_ring_buffer {
|
||||
- char **pg_vec;
|
||||
+ struct pgv *pg_vec;
|
||||
unsigned int head;
|
||||
unsigned int frames_per_block;
|
||||
unsigned int frame_size;
|
||||
@@ -214,6 +221,13 @@ struct packet_skb_cb {
|
||||
|
||||
#define PACKET_SKB_CB(__skb) ((struct packet_skb_cb *)((__skb)->cb))
|
||||
|
||||
+static inline struct page *pgv_to_page(void *addr)
|
||||
+{
|
||||
+ if (is_vmalloc_addr(addr))
|
||||
+ return vmalloc_to_page(addr);
|
||||
+ return virt_to_page(addr);
|
||||
+}
|
||||
+
|
||||
static void __packet_set_status(struct packet_sock *po, void *frame, int status)
|
||||
{
|
||||
union {
|
||||
@@ -226,11 +240,11 @@ static void __packet_set_status(struct p
|
||||
switch (po->tp_version) {
|
||||
case TPACKET_V1:
|
||||
h.h1->tp_status = status;
|
||||
- flush_dcache_page(virt_to_page(&h.h1->tp_status));
|
||||
+ flush_dcache_page(pgv_to_page(&h.h1->tp_status));
|
||||
break;
|
||||
case TPACKET_V2:
|
||||
h.h2->tp_status = status;
|
||||
- flush_dcache_page(virt_to_page(&h.h2->tp_status));
|
||||
+ flush_dcache_page(pgv_to_page(&h.h2->tp_status));
|
||||
break;
|
||||
default:
|
||||
pr_err("TPACKET version not supported\n");
|
||||
@@ -253,10 +267,10 @@ static int __packet_get_status(struct pa
|
||||
h.raw = frame;
|
||||
switch (po->tp_version) {
|
||||
case TPACKET_V1:
|
||||
- flush_dcache_page(virt_to_page(&h.h1->tp_status));
|
||||
+ flush_dcache_page(pgv_to_page(&h.h1->tp_status));
|
||||
return h.h1->tp_status;
|
||||
case TPACKET_V2:
|
||||
- flush_dcache_page(virt_to_page(&h.h2->tp_status));
|
||||
+ flush_dcache_page(pgv_to_page(&h.h2->tp_status));
|
||||
return h.h2->tp_status;
|
||||
default:
|
||||
pr_err("TPACKET version not supported\n");
|
||||
@@ -280,7 +294,8 @@ static void *packet_lookup_frame(struct
|
||||
pg_vec_pos = position / rb->frames_per_block;
|
||||
frame_offset = position % rb->frames_per_block;
|
||||
|
||||
- h.raw = rb->pg_vec[pg_vec_pos] + (frame_offset * rb->frame_size);
|
||||
+ h.raw = rb->pg_vec[pg_vec_pos].buffer +
|
||||
+ (frame_offset * rb->frame_size);
|
||||
|
||||
if (status != __packet_get_status(po, h.raw))
|
||||
return NULL;
|
||||
@@ -771,15 +786,11 @@ static int tpacket_rcv(struct sk_buff *s
|
||||
__packet_set_status(po, h.raw, status);
|
||||
smp_mb();
|
||||
{
|
||||
- struct page *p_start, *p_end;
|
||||
- u8 *h_end = h.raw + macoff + snaplen - 1;
|
||||
+ u8 *start, *end;
|
||||
|
||||
- p_start = virt_to_page(h.raw);
|
||||
- p_end = virt_to_page(h_end);
|
||||
- while (p_start <= p_end) {
|
||||
- flush_dcache_page(p_start);
|
||||
- p_start++;
|
||||
- }
|
||||
+ end = (u8 *)PAGE_ALIGN((unsigned long)h.raw + macoff + snaplen);
|
||||
+ for (start = h.raw; start < end; start += PAGE_SIZE)
|
||||
+ flush_dcache_page(pgv_to_page(start));
|
||||
}
|
||||
|
||||
sk->sk_data_ready(sk, 0);
|
||||
@@ -886,7 +897,6 @@ static int tpacket_fill_skb(struct packe
|
||||
}
|
||||
|
||||
err = -EFAULT;
|
||||
- page = virt_to_page(data);
|
||||
offset = offset_in_page(data);
|
||||
len_max = PAGE_SIZE - offset;
|
||||
len = ((to_write > len_max) ? len_max : to_write);
|
||||
@@ -905,11 +915,11 @@ static int tpacket_fill_skb(struct packe
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
+ page = pgv_to_page(data);
|
||||
+ data += len;
|
||||
flush_dcache_page(page);
|
||||
get_page(page);
|
||||
- skb_fill_page_desc(skb,
|
||||
- nr_frags,
|
||||
- page++, offset, len);
|
||||
+ skb_fill_page_desc(skb, nr_frags, page, offset, len);
|
||||
to_write -= len;
|
||||
offset = 0;
|
||||
len_max = PAGE_SIZE;
|
||||
@@ -2230,37 +2240,76 @@ static const struct vm_operations_struct
|
||||
.close = packet_mm_close,
|
||||
};
|
||||
|
||||
-static void free_pg_vec(char **pg_vec, unsigned int order, unsigned int len)
|
||||
+static void free_pg_vec(struct pgv *pg_vec, unsigned int order,
|
||||
+ unsigned int len)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
- if (likely(pg_vec[i]))
|
||||
- free_pages((unsigned long) pg_vec[i], order);
|
||||
+ if (likely(pg_vec[i].buffer)) {
|
||||
+ if (pg_vec[i].flags & PGV_FROM_VMALLOC)
|
||||
+ vfree(pg_vec[i].buffer);
|
||||
+ else
|
||||
+ free_pages((unsigned long)pg_vec[i].buffer,
|
||||
+ order);
|
||||
+ pg_vec[i].buffer = NULL;
|
||||
+ }
|
||||
}
|
||||
kfree(pg_vec);
|
||||
}
|
||||
|
||||
-static inline char *alloc_one_pg_vec_page(unsigned long order)
|
||||
+static inline char *alloc_one_pg_vec_page(unsigned long order,
|
||||
+ unsigned char *flags)
|
||||
{
|
||||
- gfp_t gfp_flags = GFP_KERNEL | __GFP_COMP | __GFP_ZERO | __GFP_NOWARN;
|
||||
+ char *buffer = NULL;
|
||||
+ gfp_t gfp_flags = GFP_KERNEL | __GFP_COMP |
|
||||
+ __GFP_ZERO | __GFP_NOWARN | __GFP_NORETRY;
|
||||
+
|
||||
+ buffer = (char *) __get_free_pages(gfp_flags, order);
|
||||
|
||||
- return (char *) __get_free_pages(gfp_flags, order);
|
||||
+ if (buffer)
|
||||
+ return buffer;
|
||||
+
|
||||
+ /*
|
||||
+ * __get_free_pages failed, fall back to vmalloc
|
||||
+ */
|
||||
+ *flags |= PGV_FROM_VMALLOC;
|
||||
+ buffer = vmalloc((1 << order) * PAGE_SIZE);
|
||||
+
|
||||
+ if (buffer) {
|
||||
+ memset(buffer, 0, (1 << order) * PAGE_SIZE);
|
||||
+ return buffer;
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * vmalloc failed, lets dig into swap here
|
||||
+ */
|
||||
+ *flags = 0;
|
||||
+ gfp_flags &= ~__GFP_NORETRY;
|
||||
+ buffer = (char *)__get_free_pages(gfp_flags, order);
|
||||
+ if (buffer)
|
||||
+ return buffer;
|
||||
+
|
||||
+ /*
|
||||
+ * complete and utter failure
|
||||
+ */
|
||||
+ return NULL;
|
||||
}
|
||||
|
||||
-static char **alloc_pg_vec(struct tpacket_req *req, int order)
|
||||
+static struct pgv *alloc_pg_vec(struct tpacket_req *req, int order)
|
||||
{
|
||||
unsigned int block_nr = req->tp_block_nr;
|
||||
- char **pg_vec;
|
||||
+ struct pgv *pg_vec;
|
||||
int i;
|
||||
|
||||
- pg_vec = kzalloc(block_nr * sizeof(char *), GFP_KERNEL);
|
||||
+ pg_vec = kcalloc(block_nr, sizeof(struct pgv), GFP_KERNEL);
|
||||
if (unlikely(!pg_vec))
|
||||
goto out;
|
||||
|
||||
for (i = 0; i < block_nr; i++) {
|
||||
- pg_vec[i] = alloc_one_pg_vec_page(order);
|
||||
- if (unlikely(!pg_vec[i]))
|
||||
+ pg_vec[i].buffer = alloc_one_pg_vec_page(order,
|
||||
+ &pg_vec[i].flags);
|
||||
+ if (unlikely(!pg_vec[i].buffer))
|
||||
goto out_free_pgvec;
|
||||
}
|
||||
|
||||
@@ -2276,7 +2325,7 @@ out_free_pgvec:
|
||||
static int packet_set_ring(struct sock *sk, struct tpacket_req *req,
|
||||
int closing, int tx_ring)
|
||||
{
|
||||
- char **pg_vec = NULL;
|
||||
+ struct pgv *pg_vec = NULL;
|
||||
struct packet_sock *po = pkt_sk(sk);
|
||||
int was_running, order = 0;
|
||||
struct packet_ring_buffer *rb;
|
||||
@@ -2438,15 +2487,22 @@ static int packet_mmap(struct file *file
|
||||
continue;
|
||||
|
||||
for (i = 0; i < rb->pg_vec_len; i++) {
|
||||
- struct page *page = virt_to_page(rb->pg_vec[i]);
|
||||
+ struct page *page;
|
||||
+ void *kaddr = rb->pg_vec[i].buffer;
|
||||
int pg_num;
|
||||
|
||||
for (pg_num = 0; pg_num < rb->pg_vec_pages;
|
||||
- pg_num++, page++) {
|
||||
+ pg_num++) {
|
||||
+ if (rb->pg_vec[i].flags & PGV_FROM_VMALLOC)
|
||||
+ page = vmalloc_to_page(kaddr);
|
||||
+ else
|
||||
+ page = virt_to_page(kaddr);
|
||||
+
|
||||
err = vm_insert_page(vma, start, page);
|
||||
if (unlikely(err))
|
||||
goto out;
|
||||
start += PAGE_SIZE;
|
||||
+ kaddr += PAGE_SIZE;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,144 +0,0 @@
|
|||
From linux-kernel-owner@vger.kernel.org Mon Dec 6 14:01:17 2010
|
||||
From: Matthew Garrett <mjg@redhat.com>
|
||||
To: linux-pci@vger.kernel.org
|
||||
Cc: linux-kernel@vger.kernel.org, jbarnes@virtuousgeek.org,
|
||||
Matthew Garrett <mjg@redhat.com>
|
||||
Subject: [PATCH v2] PCI: Disable ASPM if BIOS asks us to
|
||||
Date: Mon, 6 Dec 2010 14:00:56 -0500
|
||||
Message-Id: <1291662056-6055-1-git-send-email-mjg@redhat.com>
|
||||
|
||||
We currently refuse to touch the ASPM registers if the BIOS tells us that
|
||||
ASPM isn't supported. This can cause problems if the BIOS has (for any
|
||||
reason) enabled ASPM on some devices anyway. Change the code such that we
|
||||
explicitly clear ASPM if the FADT indicates that ASPM isn't supported,
|
||||
and make sure we tidy up appropriately on device removal in order to deal
|
||||
with the hotplug case. If ASPM is disabled because the BIOS doesn't hand
|
||||
over control then we won't touch the registers.
|
||||
|
||||
Signed-off-by: Matthew Garrett <mjg@redhat.com>
|
||||
---
|
||||
|
||||
Implement Rafael's suggestion to use two separate functions, and also
|
||||
ensure that we clear the clkpm bit as well as the ASPM bits.
|
||||
|
||||
drivers/pci/pci-acpi.c | 1 +
|
||||
drivers/pci/pcie/aspm.c | 21 +++++++++++++++++----
|
||||
include/linux/pci-aspm.h | 5 ++++-
|
||||
3 files changed, 22 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
|
||||
index 24e19c5..d7ea699 100644
|
||||
--- a/drivers/pci/pci-acpi.c
|
||||
+++ b/drivers/pci/pci-acpi.c
|
||||
@@ -399,6 +399,7 @@ static int __init acpi_pci_init(void)
|
||||
|
||||
if (acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_ASPM) {
|
||||
printk(KERN_INFO"ACPI FADT declares the system doesn't support PCIe ASPM, so disable it\n");
|
||||
+ pcie_clear_aspm();
|
||||
pcie_no_aspm();
|
||||
}
|
||||
|
||||
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
|
||||
index 7122281..8112415 100644
|
||||
--- a/drivers/pci/pcie/aspm.c
|
||||
+++ b/drivers/pci/pcie/aspm.c
|
||||
@@ -68,7 +68,7 @@ struct pcie_link_state {
|
||||
struct aspm_latency acceptable[8];
|
||||
};
|
||||
|
||||
-static int aspm_disabled, aspm_force;
|
||||
+static int aspm_disabled, aspm_force, aspm_clear_state;
|
||||
static DEFINE_MUTEX(aspm_lock);
|
||||
static LIST_HEAD(link_list);
|
||||
|
||||
@@ -139,7 +139,7 @@ static void pcie_set_clkpm(struct pcie_link_state *link, int enable)
|
||||
{
|
||||
/* Don't enable Clock PM if the link is not Clock PM capable */
|
||||
if (!link->clkpm_capable && enable)
|
||||
- return;
|
||||
+ enable = 0;
|
||||
/* Need nothing if the specified equals to current state */
|
||||
if (link->clkpm_enabled == enable)
|
||||
return;
|
||||
@@ -498,6 +498,10 @@ static int pcie_aspm_sanity_check(struct pci_dev *pdev)
|
||||
struct pci_dev *child;
|
||||
int pos;
|
||||
u32 reg32;
|
||||
+
|
||||
+ if (aspm_clear_state)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
/*
|
||||
* Some functions in a slot might not all be PCIe functions,
|
||||
* very strange. Disable ASPM for the whole slot
|
||||
@@ -563,12 +567,15 @@ void pcie_aspm_init_link_state(struct pci_dev *pdev)
|
||||
struct pcie_link_state *link;
|
||||
int blacklist = !!pcie_aspm_sanity_check(pdev);
|
||||
|
||||
- if (aspm_disabled || !pci_is_pcie(pdev) || pdev->link_state)
|
||||
+ if (!pci_is_pcie(pdev) || pdev->link_state)
|
||||
return;
|
||||
if (pdev->pcie_type != PCI_EXP_TYPE_ROOT_PORT &&
|
||||
pdev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM)
|
||||
return;
|
||||
|
||||
+ if (aspm_disabled && !aspm_clear_state)
|
||||
+ return;
|
||||
+
|
||||
/* VIA has a strange chipset, root port is under a bridge */
|
||||
if (pdev->pcie_type == PCI_EXP_TYPE_ROOT_PORT &&
|
||||
pdev->bus->self)
|
||||
@@ -641,7 +648,7 @@ void pcie_aspm_exit_link_state(struct pci_dev *pdev)
|
||||
struct pci_dev *parent = pdev->bus->self;
|
||||
struct pcie_link_state *link, *root, *parent_link;
|
||||
|
||||
- if (aspm_disabled || !pci_is_pcie(pdev) ||
|
||||
+ if ((aspm_disabled && !aspm_clear_state) || !pci_is_pcie(pdev) ||
|
||||
!parent || !parent->link_state)
|
||||
return;
|
||||
if ((parent->pcie_type != PCI_EXP_TYPE_ROOT_PORT) &&
|
||||
@@ -899,6 +906,12 @@ static int __init pcie_aspm_disable(char *str)
|
||||
|
||||
__setup("pcie_aspm=", pcie_aspm_disable);
|
||||
|
||||
+void pcie_clear_aspm(void)
|
||||
+{
|
||||
+ if (!aspm_force)
|
||||
+ aspm_clear_state = 1;
|
||||
+}
|
||||
+
|
||||
void pcie_no_aspm(void)
|
||||
{
|
||||
if (!aspm_force)
|
||||
diff --git a/include/linux/pci-aspm.h b/include/linux/pci-aspm.h
|
||||
index 91ba0b3..ce68105 100644
|
||||
--- a/include/linux/pci-aspm.h
|
||||
+++ b/include/linux/pci-aspm.h
|
||||
@@ -27,6 +27,7 @@ extern void pcie_aspm_init_link_state(struct pci_dev *pdev);
|
||||
extern void pcie_aspm_exit_link_state(struct pci_dev *pdev);
|
||||
extern void pcie_aspm_pm_state_change(struct pci_dev *pdev);
|
||||
extern void pci_disable_link_state(struct pci_dev *pdev, int state);
|
||||
+extern void pcie_clear_aspm(void);
|
||||
extern void pcie_no_aspm(void);
|
||||
#else
|
||||
static inline void pcie_aspm_init_link_state(struct pci_dev *pdev)
|
||||
@@ -41,7 +42,9 @@ static inline void pcie_aspm_pm_state_change(struct pci_dev *pdev)
|
||||
static inline void pci_disable_link_state(struct pci_dev *pdev, int state)
|
||||
{
|
||||
}
|
||||
-
|
||||
+static inline void pcie_clear_aspm(void)
|
||||
+{
|
||||
+}
|
||||
static inline void pcie_no_aspm(void)
|
||||
{
|
||||
}
|
||||
--
|
||||
1.7.3.2
|
||||
|
||||
--
|
||||
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
|
||||
the body of a message to majordomo@vger.kernel.org
|
||||
More majordomo info at http://vger.kernel.org/majordomo-info.html
|
||||
Please read the FAQ at http://www.tux.org/lkml/
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
utrace_base=2.6-current
|
||||
utrace_base=2.6.37
|
||||
|
||||
url=http://people.redhat.com/roland/utrace/${1:-$utrace_base}
|
||||
|
||||
|
|
Loading…
Reference in New Issue