diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2009-10-12 14:30:25 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2009-10-12 14:30:25 +1100 |
commit | 49979ad7d4a5789b54edaff1a6cad0e8c514fcd6 (patch) | |
tree | b608730e3ea213475a3ed3fa617e96e7ecb57074 | |
parent | 19ec9314cca3c2332225e8c1d88a238cd8576e91 (diff) |
Revert "Merge branch 'out-of-tree' into auto-latest"
This reverts commit e67d8da85f7a4c2772fe3731de9396b6d01a045e, reversing
changes made to 3d531a163c973490b3e69cc3058c0613bca48a2d.
Conflicts:
drivers/mtd/maps/gpio-addr-flash.c
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
69 files changed, 202 insertions, 317 deletions
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index 6c73a958ed95..9bcec9945c12 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c @@ -640,11 +640,6 @@ do_copy_regs (struct unw_frame_info *info, void *arg) } void -__ia64_save_stack_nonlocal(void) -{ -} - -void do_dump_fpu (struct unw_frame_info *info, void *arg) { do_dump_task_fpu(current, info, arg); diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h index f1363b72364f..b608a64c5814 100644 --- a/arch/x86/include/asm/mce.h +++ b/arch/x86/include/asm/mce.h @@ -133,8 +133,6 @@ static inline void winchip_mcheck_init(struct cpuinfo_x86 *c) {} static inline void enable_p5_mce(void) {} #endif -extern void (*x86_mce_decode_callback)(struct mce *m); - void mce_setup(struct mce *m); void mce_log(struct mce *m); DECLARE_PER_CPU(struct sys_device, mce_dev); diff --git a/arch/x86/kernel/acpi/processor.c b/arch/x86/kernel/acpi/processor.c index 5bd7d7a08dfd..d296f4a195c9 100644 --- a/arch/x86/kernel/acpi/processor.c +++ b/arch/x86/kernel/acpi/processor.c @@ -43,11 +43,6 @@ static void init_intel_pdc(struct acpi_processor *pr, struct cpuinfo_x86 *c) buf[0] = ACPI_PDC_REVISION_ID; buf[1] = 1; buf[2] = ACPI_PDC_C_CAPABILITY_SMP; - /* - * If mwait/monitor is unsupported, C2/C3_FFH will be disabled. - */ - if (!cpu_has(c, X86_FEATURE_MWAIT)) - buf[2] &= ~ACPI_PDC_C_C2C3_FFH; /* * The default of PDC_SMP_T_SWCOORD bit is set for intel x86 cpu so diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index b1598a9436d0..183c3457d2f4 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c @@ -85,18 +85,6 @@ static DECLARE_WAIT_QUEUE_HEAD(mce_wait); static DEFINE_PER_CPU(struct mce, mces_seen); static int cpu_missing; -static void default_decode_mce(struct mce *m) -{ - pr_emerg("No human readable MCE decoding support on this CPU type.\n"); - pr_emerg("Run the message through 'mcelog --ascii' to decode.\n"); -} - -/* - * CPU/chipset specific EDAC code can register a callback here to print - * MCE errors in a human-readable form: - */ -void (*x86_mce_decode_callback)(struct mce *m) = default_decode_mce; -EXPORT_SYMBOL(x86_mce_decode_callback); /* MCA banks polled by the period polling timer for corrected events */ DEFINE_PER_CPU(mce_banks_t, mce_poll_banks) = { @@ -177,46 +165,46 @@ void mce_log(struct mce *mce) set_bit(0, &mce_need_notify); } +void __weak decode_mce(struct mce *m) +{ + return; +} + static void print_mce(struct mce *m) { - pr_emerg("CPU %d: Machine Check Exception: %16Lx Bank %d: %016Lx\n", + printk(KERN_EMERG + "CPU %d: Machine Check Exception: %16Lx Bank %d: %016Lx\n", m->extcpu, m->mcgstatus, m->bank, m->status); - if (m->ip) { - pr_emerg("RIP%s %02x:<%016Lx> ", - !(m->mcgstatus & MCG_STATUS_EIPV) ? " !INEXACT!" : "", - m->cs, m->ip); - + printk(KERN_EMERG "RIP%s %02x:<%016Lx> ", + !(m->mcgstatus & MCG_STATUS_EIPV) ? " !INEXACT!" : "", + m->cs, m->ip); if (m->cs == __KERNEL_CS) print_symbol("{%s}", m->ip); - pr_cont("\n"); + printk(KERN_CONT "\n"); } - - pr_emerg("TSC %llx ", m->tsc); + printk(KERN_EMERG "TSC %llx ", m->tsc); if (m->addr) - pr_cont("ADDR %llx ", m->addr); + printk(KERN_CONT "ADDR %llx ", m->addr); if (m->misc) - pr_cont("MISC %llx ", m->misc); - - pr_cont("\n"); - pr_emerg("PROCESSOR %u:%x TIME %llu SOCKET %u APIC %x\n", - m->cpuvendor, m->cpuid, m->time, m->socketid, m->apicid); + printk(KERN_CONT "MISC %llx ", m->misc); + printk(KERN_CONT "\n"); + printk(KERN_EMERG "PROCESSOR %u:%x TIME %llu SOCKET %u APIC %x\n", + m->cpuvendor, m->cpuid, m->time, m->socketid, + m->apicid); - /* - * Print out human-readable details about the MCE error, - * (if the CPU has an implementation for that): - */ - x86_mce_decode_callback(m); + decode_mce(m); } static void print_mce_head(void) { - pr_emerg("\nHARDWARE ERROR\n"); + printk(KERN_EMERG "\nHARDWARE ERROR\n"); } static void print_mce_tail(void) { - pr_emerg("This is not a software problem!\n"); + printk(KERN_EMERG "This is not a software problem!\n" + "Run through mcelog --ascii to decode and contact your hardware vendor\n"); } #define PANIC_TIMEOUT 5 /* 5 seconds */ @@ -230,7 +218,6 @@ static atomic_t mce_fake_paniced; static void wait_for_panic(void) { long timeout = PANIC_TIMEOUT*USEC_PER_SEC; - preempt_disable(); local_irq_enable(); while (timeout-- > 0) @@ -298,7 +285,6 @@ static void mce_panic(char *msg, struct mce *final, char *exp) static int msr_to_offset(u32 msr) { unsigned bank = __get_cpu_var(injectm.bank); - if (msr == rip_msr) return offsetof(struct mce, ip); if (msr == MSR_IA32_MCx_STATUS(bank)) diff --git a/arch/x86/kernel/cpu/mtrr/if.c b/arch/x86/kernel/cpu/mtrr/if.c index 3c1b12d461d1..f04e72527604 100644 --- a/arch/x86/kernel/cpu/mtrr/if.c +++ b/arch/x86/kernel/cpu/mtrr/if.c @@ -96,24 +96,17 @@ mtrr_write(struct file *file, const char __user *buf, size_t len, loff_t * ppos) unsigned long long base, size; char *ptr; char line[LINE_SIZE]; - int length; size_t linelen; if (!capable(CAP_SYS_ADMIN)) return -EPERM; - - memset(line, 0, LINE_SIZE); - - length = len; - length--; - - if (length > LINE_SIZE - 1) - length = LINE_SIZE - 1; - - if (length < 0) + if (!len) return -EINVAL; - if (copy_from_user(line, buf, length)) + memset(line, 0, LINE_SIZE); + if (len > LINE_SIZE) + len = LINE_SIZE; + if (copy_from_user(line, buf, len - 1)) return -EFAULT; linelen = strlen(line); diff --git a/drivers/acpi/acpica/nsxfeval.c b/drivers/acpi/acpica/nsxfeval.c index eaacbf4cce7d..4929dbdbc8f0 100644 --- a/drivers/acpi/acpica/nsxfeval.c +++ b/drivers/acpi/acpica/nsxfeval.c @@ -467,9 +467,6 @@ acpi_walk_namespace(acpi_object_type type, ACPI_FUNCTION_TRACE(acpi_walk_namespace); - if (acpi_disabled) - return_ACPI_STATUS(AE_NO_NAMESPACE); - /* Parameter validation */ if ((type > ACPI_TYPE_LOCAL_MAX) || (!max_depth) || (!user_function)) { diff --git a/drivers/acpi/acpica/psloop.c b/drivers/acpi/acpica/psloop.c index 0aee59069be8..cd7995b3aed4 100644 --- a/drivers/acpi/acpica/psloop.c +++ b/drivers/acpi/acpica/psloop.c @@ -823,6 +823,8 @@ acpi_ps_complete_op(struct acpi_walk_state *walk_state, *op = NULL; } + ACPI_PREEMPTION_POINT(); + return_ACPI_STATUS(AE_OK); } diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c index 40d395efec1e..8ba0ed0b9ddb 100644 --- a/drivers/acpi/processor_perflib.c +++ b/drivers/acpi/processor_perflib.c @@ -356,11 +356,7 @@ static int acpi_processor_get_performance_info(struct acpi_processor *pr) if (result) goto update_bios; - /* We need to call _PPC once when cpufreq starts */ - if (ignore_ppc != 1) - result = acpi_processor_get_platform_limit(pr); - - return result; + return 0; /* * Having _PPC but missing frequencies (_PSS, _PCT) is a very good hint that diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index e3991a47e648..a90afcc723ab 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c @@ -26,7 +26,6 @@ #include "sleep.h" u8 sleep_states[ACPI_S_STATE_COUNT]; -static u32 acpi_target_sleep_state = ACPI_STATE_S0; static void acpi_sleep_tts_switch(u32 acpi_state) { @@ -80,6 +79,7 @@ static int acpi_sleep_prepare(u32 acpi_state) } #ifdef CONFIG_ACPI_SLEEP +static u32 acpi_target_sleep_state = ACPI_STATE_S0; /* * ACPI 1.0 wants us to execute _PTS before suspending devices, so we allow the * user to request that behavior by using the 'acpi_old_suspend_ordering' diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 53f215674702..f6e54bf8dd96 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -1218,9 +1218,7 @@ acpi_video_device_write_state(struct file *file, u32 state = 0; - if (!dev) - return -EINVAL; - if (count >= sizeof(str)) + if (!dev || count + 1 > sizeof str) return -EINVAL; if (copy_from_user(str, buffer, count)) @@ -1277,10 +1275,7 @@ acpi_video_device_write_brightness(struct file *file, int i; - if (!dev || !dev->brightness) - return -EINVAL; - - if (count >= sizeof(str)) + if (!dev || !dev->brightness || count + 1 > sizeof str) return -EINVAL; if (copy_from_user(str, buffer, count)) @@ -1562,10 +1557,7 @@ acpi_video_bus_write_POST(struct file *file, unsigned long long opt, options; - if (!video) - return -EINVAL; - - if (count >= sizeof(str)) + if (!video || count + 1 > sizeof str) return -EINVAL; status = acpi_video_bus_POST_options(video, &options); @@ -1605,9 +1597,7 @@ acpi_video_bus_write_DOS(struct file *file, unsigned long opt; - if (!video) - return -EINVAL; - if (count >= sizeof(str)) + if (!video || count + 1 > sizeof str) return -EINVAL; if (copy_from_user(str, buffer, count)) diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig index c52aaadcff25..ee377270beb9 100644 --- a/drivers/base/Kconfig +++ b/drivers/base/Kconfig @@ -28,7 +28,6 @@ config DEVTMPFS config DEVTMPFS_MOUNT bool "Automount devtmpfs at /dev" depends on DEVTMPFS - depends on 0 help This will mount devtmpfs at /dev if the kernel mounts the root filesystem. It will not affect initramfs based mounting. diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 0f11a776124e..5c01f747571b 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -3497,9 +3497,6 @@ static int fd_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd, ((cmd & 0x80) && !capable(CAP_SYS_ADMIN))) return -EPERM; - if (size < 0 || size > sizeof(inparam)) - return -EINVAL; - /* copyin */ CLEARSTRUCT(&inparam); if (_IOC_DIR(cmd) & _IOC_WRITE) diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c index b2a7eafa7871..88cee4099be9 100644 --- a/drivers/char/nvram.c +++ b/drivers/char/nvram.c @@ -267,15 +267,7 @@ static ssize_t nvram_write(struct file *file, const char __user *buf, unsigned char *tmp; int len; - len = count; - if (count > NVRAM_BYTES - i) - len = NVRAM_BYTES - i; - - if (len > NVRAM_BYTES) - len = NVRAM_BYTES; - if (len < 0) - return -EINVAL; - + len = (NVRAM_BYTES - i) < count ? (NVRAM_BYTES - i) : count; if (copy_from_user(contents, buf, len)) return -EFAULT; diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig index 55c9c59b3f71..02127e59fe8e 100644 --- a/drivers/edac/Kconfig +++ b/drivers/edac/Kconfig @@ -47,18 +47,6 @@ config EDAC_DEBUG_VERBOSE Source file name and line number where debugging message printed will be added to debugging message. - config EDAC_DECODE_MCE - tristate "Decode MCEs in human-readable form (only on AMD for now)" - depends on CPU_SUP_AMD && X86_MCE - default y - ---help--- - Enable this option if you want to decode Machine Check Exceptions - occuring on your machine in human-readable form. - - You should definitely say Y here in case you want to decode MCEs - which occur really early upon boot, before the module infrastructure - has been initialized. - config EDAC_MM_EDAC tristate "Main Memory EDAC (Error Detection And Correction) reporting" help @@ -71,7 +59,7 @@ config EDAC_MM_EDAC config EDAC_AMD64 tristate "AMD64 (Opteron, Athlon64) K8, F10h, F11h" - depends on EDAC_MM_EDAC && K8_NB && X86_64 && PCI && EDAC_DECODE_MCE + depends on EDAC_MM_EDAC && K8_NB && X86_64 && PCI && CPU_SUP_AMD help Support for error detection and correction on the AMD 64 Families of Memory Controllers (K8, F10h and F11h) diff --git a/drivers/edac/Makefile b/drivers/edac/Makefile index bc5dc232a0fb..7a473bbe8abd 100644 --- a/drivers/edac/Makefile +++ b/drivers/edac/Makefile @@ -6,6 +6,7 @@ # GNU General Public License. # + obj-$(CONFIG_EDAC) := edac_stub.o obj-$(CONFIG_EDAC_MM_EDAC) += edac_core.o @@ -16,7 +17,9 @@ ifdef CONFIG_PCI edac_core-objs += edac_pci.o edac_pci_sysfs.o endif -obj-$(CONFIG_EDAC_DECODE_MCE) += edac_mce_amd.o +ifdef CONFIG_CPU_SUP_AMD +edac_core-objs += edac_mce_amd.o +endif obj-$(CONFIG_EDAC_AMD76X) += amd76x_edac.o obj-$(CONFIG_EDAC_CPC925) += cpc925_edac.o diff --git a/drivers/edac/edac_mce_amd.c b/drivers/edac/edac_mce_amd.c index 713ed7d37247..0c21c370c9dd 100644 --- a/drivers/edac/edac_mce_amd.c +++ b/drivers/edac/edac_mce_amd.c @@ -3,7 +3,6 @@ static bool report_gart_errors; static void (*nb_bus_decoder)(int node_id, struct err_regs *regs); -static void (*orig_mce_callback)(struct mce *m); void amd_report_gart_errors(bool v) { @@ -363,7 +362,7 @@ static inline void amd_decode_err_code(unsigned int ec) pr_warning("Huh? Unknown MCE error 0x%x\n", ec); } -static void amd_decode_mce(struct mce *m) +void decode_mce(struct mce *m) { struct err_regs regs; int node, ecc; @@ -421,32 +420,3 @@ static void amd_decode_mce(struct mce *m) amd_decode_err_code(m->status & 0xffff); } - -static int __init mce_amd_init(void) -{ - /* - * We can decode MCEs for Opteron and later CPUs: - */ - if ((boot_cpu_data.x86_vendor == X86_VENDOR_AMD) && - (boot_cpu_data.x86 >= 0xf)) { - /* safe the default decode mce callback */ - orig_mce_callback = x86_mce_decode_callback; - - x86_mce_decode_callback = amd_decode_mce; - } - - return 0; -} -early_initcall(mce_amd_init); - -#ifdef MODULE -static void __exit mce_amd_exit(void) -{ - x86_mce_decode_callback = orig_mce_callback; -} - -MODULE_DESCRIPTION("AMD MCE decoder"); -MODULE_ALIAS("edac-mce-amd"); -MODULE_LICENSE("GPL"); -module_exit(mce_amd_exit); -#endif diff --git a/drivers/hwmon/k8temp.c b/drivers/hwmon/k8temp.c index 4459dbf8afd7..1fe995111841 100644 --- a/drivers/hwmon/k8temp.c +++ b/drivers/hwmon/k8temp.c @@ -1,6 +1,5 @@ /* * k8temp.c - Linux kernel module for hardware monitoring - * for AMD K8 and derivatives * * Copyright (C) 2006 Rudolf Marek <r.marek@assembler.cz> * @@ -34,7 +33,7 @@ #include <linux/mutex.h> #include <asm/processor.h> -#define REG_TCTL 0xa4 +#define TEMP_FROM_REG(val) (((((val) >> 16) & 0xff) - 49) * 1000) #define REG_TEMP 0xe4 #define SEL_PLACE 0x40 #define SEL_CORE 0x04 @@ -53,14 +52,6 @@ struct k8temp_data { u32 temp_offset; }; -static unsigned long temp_from_reg(unsigned long val) -{ - if (boot_cpu_data.x86 > 0xf) - return ((val) >> 21) * 125; - else - return ((((val) >> 16) & 0xff) - 49) * 1000; -} - static struct k8temp_data *k8temp_update_device(struct device *dev) { struct k8temp_data *data = dev_get_drvdata(dev); @@ -71,11 +62,6 @@ static struct k8temp_data *k8temp_update_device(struct device *dev) if (!data->valid || time_after(jiffies, data->last_updated + HZ)) { - if (boot_cpu_data.x86 > 0xf) { - pci_read_config_dword(pdev, REG_TCTL, - &data->temp[0][0]); - goto update_done; - } pci_read_config_byte(pdev, REG_TEMP, &tmp); tmp &= ~(SEL_PLACE | SEL_CORE); /* Select sensor 0, core0 */ pci_write_config_byte(pdev, REG_TEMP, tmp); @@ -103,7 +89,6 @@ static struct k8temp_data *k8temp_update_device(struct device *dev) } } -update_done: data->last_updated = jiffies; data->valid = 1; } @@ -138,7 +123,7 @@ static ssize_t show_temp(struct device *dev, if (data->swap_core_select) core = core ? 0 : 1; - temp = temp_from_reg(data->temp[core][place]) + data->temp_offset; + temp = TEMP_FROM_REG(data->temp[core][place]) + data->temp_offset; return sprintf(buf, "%d\n", temp); } @@ -153,14 +138,6 @@ static DEVICE_ATTR(name, S_IRUGO, show_name, NULL); static struct pci_device_id k8temp_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_K8_NB_MISC) }, - /* - * AMD 10H cpus reports Inaccurate Temperature Measurement : - * http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/41322.pdf - * Errata #319 - * So skipping 10H - { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_10H_NB_MISC) }, - */ - { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_11H_NB_MISC) }, { 0 }, }; @@ -180,9 +157,6 @@ static int __devinit k8temp_probe(struct pci_dev *pdev, goto exit; } - if (boot_cpu_data.x86 > 0xf) - goto probe_done; - model = boot_cpu_data.x86_model; stepping = boot_cpu_data.x86_mask; @@ -252,7 +226,6 @@ static int __devinit k8temp_probe(struct pci_dev *pdev, data->sensorsp &= ~SEL_CORE; } -probe_done: data->name = "k8temp"; mutex_init(&data->update_lock); dev_set_drvdata(&pdev->dev, data); diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index f70767429945..bc817001a280 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -56,9 +56,6 @@ config I2C_AMD756 config I2C_AMD756_S4882 tristate "SMBus multiplexing on the Tyan S4882" depends on I2C_AMD756 && X86 && EXPERIMENTAL - # broke an Athlon 64 X2 Asus A8N-E with: - # http://redhat.com/~mingo/misc/config-Thu_Jul_17_11_34_08_CEST_2008.bad - depends on 0 help Enabling this option will add specific SMBus support for the Tyan S4882 motherboard. On this 4-CPU board, the SMBus is multiplexed @@ -155,9 +152,6 @@ config I2C_NFORCE2 config I2C_NFORCE2_S4985 tristate "SMBus multiplexing on the Tyan S4985" depends on I2C_NFORCE2 && X86 && EXPERIMENTAL - # broke a T60 Core2Duo with: - # http://redhat.com/~mingo/misc/config-Thu_Jul_17_10_47_42_CEST_2008.bad - depends on 0 help Enabling this option will add specific SMBus support for the Tyan S4985 motherboard. On this 4-CPU board, the SMBus is multiplexed diff --git a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c index f8e5bdeb51f2..ac11be08585e 100644 --- a/drivers/input/gameport/gameport.c +++ b/drivers/input/gameport/gameport.c @@ -40,9 +40,8 @@ static LIST_HEAD(gameport_list); static struct bus_type gameport_bus; -static void gameport_add_driver(struct gameport_driver *drv); static void gameport_add_port(struct gameport *gameport); -static void gameport_destroy_port(struct gameport *gameport); +static void gameport_attach_driver(struct gameport_driver *drv); static void gameport_reconnect_port(struct gameport *gameport); static void gameport_disconnect_port(struct gameport *gameport); @@ -222,7 +221,6 @@ static void gameport_find_driver(struct gameport *gameport) enum gameport_event_type { GAMEPORT_REGISTER_PORT, - GAMEPORT_REGISTER_DRIVER, GAMEPORT_ATTACH_DRIVER, }; @@ -366,8 +364,8 @@ static void gameport_handle_event(void) gameport_add_port(event->object); break; - case GAMEPORT_REGISTER_DRIVER: - gameport_add_driver(event->object); + case GAMEPORT_ATTACH_DRIVER: + gameport_attach_driver(event->object); break; default: @@ -701,14 +699,14 @@ static int gameport_driver_remove(struct device *dev) return 0; } -static void gameport_add_driver(struct gameport_driver *drv) +static void gameport_attach_driver(struct gameport_driver *drv) { int error; - error = driver_register(&drv->driver); + error = driver_attach(&drv->driver); if (error) printk(KERN_ERR - "gameport: driver_register() failed for %s, error: %d\n", + "gameport: driver_attach() failed for %s, error: %d\n", drv->driver.name, error); } diff --git a/drivers/input/mouse/sentelic.c b/drivers/input/mouse/sentelic.c index 84e2fc04d11b..f84cbd97c884 100644 --- a/drivers/input/mouse/sentelic.c +++ b/drivers/input/mouse/sentelic.c @@ -92,7 +92,8 @@ static int fsp_reg_read(struct psmouse *psmouse, int reg_addr, int *reg_val) */ ps2_command(ps2dev, NULL, PSMOUSE_CMD_DISABLE); psmouse_set_state(psmouse, PSMOUSE_CMD_MODE); - mutex_lock(&ps2dev->cmd_mutex); + + ps2_begin_command(ps2dev); if (ps2_sendbyte(ps2dev, 0xf3, FSP_CMD_TIMEOUT) < 0) goto out; @@ -126,7 +127,7 @@ static int fsp_reg_read(struct psmouse *psmouse, int reg_addr, int *reg_val) rc = 0; out: - mutex_unlock(&ps2dev->cmd_mutex); + ps2_end_command(ps2dev); ps2_command(ps2dev, NULL, PSMOUSE_CMD_ENABLE); psmouse_set_state(psmouse, PSMOUSE_ACTIVATED); dev_dbg(&ps2dev->serio->dev, "READ REG: 0x%02x is 0x%02x (rc = %d)\n", @@ -140,7 +141,7 @@ static int fsp_reg_write(struct psmouse *psmouse, int reg_addr, int reg_val) unsigned char v; int rc = -1; - mutex_lock(&ps2dev->cmd_mutex); + ps2_begin_command(ps2dev); if (ps2_sendbyte(ps2dev, 0xf3, FSP_CMD_TIMEOUT) < 0) goto out; @@ -179,7 +180,7 @@ static int fsp_reg_write(struct psmouse *psmouse, int reg_addr, int reg_val) rc = 0; out: - mutex_unlock(&ps2dev->cmd_mutex); + ps2_end_command(ps2dev); dev_dbg(&ps2dev->serio->dev, "WRITE REG: 0x%02x to 0x%02x (rc = %d)\n", reg_addr, reg_val, rc); return rc; @@ -214,7 +215,8 @@ static int fsp_page_reg_read(struct psmouse *psmouse, int *reg_val) ps2_command(ps2dev, NULL, PSMOUSE_CMD_DISABLE); psmouse_set_state(psmouse, PSMOUSE_CMD_MODE); - mutex_lock(&ps2dev->cmd_mutex); + + ps2_begin_command(ps2dev); if (ps2_sendbyte(ps2dev, 0xf3, FSP_CMD_TIMEOUT) < 0) goto out; @@ -236,7 +238,7 @@ static int fsp_page_reg_read(struct psmouse *psmouse, int *reg_val) rc = 0; out: - mutex_unlock(&ps2dev->cmd_mutex); + ps2_end_command(ps2dev); ps2_command(ps2dev, NULL, PSMOUSE_CMD_ENABLE); psmouse_set_state(psmouse, PSMOUSE_ACTIVATED); dev_dbg(&ps2dev->serio->dev, "READ PAGE REG: 0x%02x (rc = %d)\n", @@ -250,7 +252,7 @@ static int fsp_page_reg_write(struct psmouse *psmouse, int reg_val) unsigned char v; int rc = -1; - mutex_lock(&ps2dev->cmd_mutex); + ps2_begin_command(ps2dev); if (ps2_sendbyte(ps2dev, 0xf3, FSP_CMD_TIMEOUT) < 0) goto out; @@ -275,7 +277,7 @@ static int fsp_page_reg_write(struct psmouse *psmouse, int reg_val) rc = 0; out: - mutex_unlock(&ps2dev->cmd_mutex); + ps2_end_command(ps2dev); dev_dbg(&ps2dev->serio->dev, "WRITE PAGE REG: to 0x%02x (rc = %d)\n", reg_val, rc); return rc; diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 2e1981b63696..a31578170ccc 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c @@ -87,8 +87,22 @@ static bool i8042_bypass_aux_irq_test; #include "i8042.h" +/* + * i8042_lock protects serialization between i8042_command and + * the interrupt handler. + */ static DEFINE_SPINLOCK(i8042_lock); +/* + * Writers to AUX and KBD ports as well as users issuing i8042_command + * directly should acquire i8042_mutex (by means of calling + * i8042_lock_chip() and i8042_unlock_ship() helpers) to ensure that + * they do not disturb each other (unfortunately in many i8042 + * implementations write to one of the ports will immediately abort + * command that is being processed by another port). + */ +static DEFINE_MUTEX(i8042_mutex); + struct i8042_port { struct serio *serio; int irq; @@ -113,6 +127,18 @@ static struct platform_device *i8042_platform_device; static irqreturn_t i8042_interrupt(int irq, void *dev_id); +void i8042_lock_chip(void) +{ + mutex_lock(&i8042_mutex); +} +EXPORT_SYMBOL(i8042_lock_chip); + +void i8042_unlock_chip(void) +{ + mutex_unlock(&i8042_mutex); +} +EXPORT_SYMBOL(i8042_unlock_chip); + /* * The i8042_wait_read() and i8042_wait_write functions wait for the i8042 to * be ready for reading values from it / writing values to it. @@ -1164,6 +1190,21 @@ static void __devexit i8042_unregister_ports(void) } } +/* + * Checks whether port belongs to i8042 controller. + */ +bool i8042_check_port_owner(const struct serio *port) +{ + int i; + + for (i = 0; i < I8042_NUM_PORTS; i++) + if (i8042_ports[i].serio == port) + return true; + + return false; +} +EXPORT_SYMBOL(i8042_check_port_owner); + static void i8042_free_irqs(void) { if (i8042_aux_irq_registered) diff --git a/drivers/input/serio/libps2.c b/drivers/input/serio/libps2.c index 5485629ea9f9..f3876acc3e83 100644 --- a/drivers/input/serio/libps2.c +++ b/drivers/input/serio/libps2.c @@ -18,6 +18,7 @@ #include <linux/interrupt.h> #include <linux/input.h> #include <linux/serio.h> +#include <linux/i8042.h> #include <linux/init.h> #include <linux/libps2.h> @@ -55,6 +56,24 @@ int ps2_sendbyte(struct ps2dev *ps2dev, unsigned char byte, int timeout) } EXPORT_SYMBOL(ps2_sendbyte); +void ps2_begin_command(struct ps2dev *ps2dev) +{ + mutex_lock(&ps2dev->cmd_mutex); + + if (i8042_check_port_owner(ps2dev->serio)) + i8042_lock_chip(); +} +EXPORT_SYMBOL(ps2_begin_command); + +void ps2_end_command(struct ps2dev *ps2dev) +{ + if (i8042_check_port_owner(ps2dev->serio)) + i8042_unlock_chip(); + + mutex_unlock(&ps2dev->cmd_mutex); +} +EXPORT_SYMBOL(ps2_end_command); + /* * ps2_drain() waits for device to transmit requested number of bytes * and discards them. @@ -67,7 +86,7 @@ void ps2_drain(struct ps2dev *ps2dev, int maxbytes, int timeout) maxbytes = sizeof(ps2dev->cmdbuf); } - mutex_lock(&ps2dev->cmd_mutex); + ps2_begin_command(ps2dev); serio_pause_rx(ps2dev->serio); ps2dev->flags = PS2_FLAG_CMD; @@ -77,7 +96,8 @@ void ps2_drain(struct ps2dev *ps2dev, int maxbytes, int timeout) wait_event_timeout(ps2dev->wait, !(ps2dev->flags & PS2_FLAG_CMD), msecs_to_jiffies(timeout)); - mutex_unlock(&ps2dev->cmd_mutex); + + ps2_end_command(ps2dev); } EXPORT_SYMBOL(ps2_drain); @@ -238,9 +258,9 @@ int ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command) { int rc; - mutex_lock(&ps2dev->cmd_mutex); + ps2_begin_command(ps2dev); rc = __ps2_command(ps2dev, param, command); - mutex_unlock(&ps2dev->cmd_mutex); + ps2_end_command(ps2dev); return rc; } diff --git a/drivers/isdn/isdnloop/isdnloop.c b/drivers/isdn/isdnloop/isdnloop.c index ea07fdd8fa88..a335c85a736e 100644 --- a/drivers/isdn/isdnloop/isdnloop.c +++ b/drivers/isdn/isdnloop/isdnloop.c @@ -15,7 +15,7 @@ #include <linux/sched.h> #include "isdnloop.h" -static char revision[] = "$Revision: 1.11.6.7 $"; +static char *revision = "$Revision: 1.11.6.7 $"; static char *isdnloop_id = "loop0"; MODULE_DESCRIPTION("ISDN4Linux: Pseudo Driver that simulates an ISDN card"); @@ -1494,7 +1494,7 @@ static int __init isdnloop_init(void) { char *p; - char rev[sizeof(revision)]; + char rev[10]; if ((p = strchr(revision, ':'))) { strcpy(rev, p + 1); diff --git a/drivers/isdn/mISDN/Kconfig b/drivers/isdn/mISDN/Kconfig index e553892dc95b..1747a02a019a 100644 --- a/drivers/isdn/mISDN/Kconfig +++ b/drivers/isdn/mISDN/Kconfig @@ -4,9 +4,6 @@ menuconfig MISDN tristate "Modular ISDN driver" - # broken with: - # http://redhat.com/~mingo/misc/config-Sun_Jul_27_08_30_16_CEST_2008.bad - depends on 0 help Enable support for the modular ISDN driver. diff --git a/drivers/leds/leds-clevo-mail.c b/drivers/leds/leds-clevo-mail.c index 8ee83ceb4a7d..a498135a4e80 100644 --- a/drivers/leds/leds-clevo-mail.c +++ b/drivers/leds/leds-clevo-mail.c @@ -93,6 +93,8 @@ static struct dmi_system_id __initdata mail_led_whitelist[] = { static void clevo_mail_led_set(struct led_classdev *led_cdev, enum led_brightness value) { + i8042_lock_chip(); + if (value == LED_OFF) i8042_command(NULL, CLEVO_MAIL_LED_OFF); else if (value <= LED_HALF) @@ -100,6 +102,8 @@ static void clevo_mail_led_set(struct led_classdev *led_cdev, else i8042_command(NULL, CLEVO_MAIL_LED_BLINK_1HZ); + i8042_unlock_chip(); + } static int clevo_mail_led_blink(struct led_classdev *led_cdev, @@ -108,6 +112,8 @@ static int clevo_mail_led_blink(struct led_classdev *led_cdev, { int status = -EINVAL; + i8042_lock_chip(); + if (*delay_on == 0 /* ms */ && *delay_off == 0 /* ms */) { /* Special case: the leds subsystem requested us to * chose one user friendly blinking of the LED, and @@ -135,6 +141,8 @@ static int clevo_mail_led_blink(struct led_classdev *led_cdev, *delay_on, *delay_off); } + i8042_unlock_chip(); + return status; } diff --git a/drivers/media/dvb/dvb-usb/Kconfig b/drivers/media/dvb/dvb-usb/Kconfig index 5f91b8fd72cc..9744b0692417 100644 --- a/drivers/media/dvb/dvb-usb/Kconfig +++ b/drivers/media/dvb/dvb-usb/Kconfig @@ -69,7 +69,6 @@ config DVB_USB_DIBUSB_MC config DVB_USB_DIB0700 tristate "DiBcom DiB0700 USB DVB devices (see help for supported devices)" depends on DVB_USB - depends on 0 select DVB_DIB7000P if !DVB_FE_CUSTOMISE select DVB_DIB7000M if !DVB_FE_CUSTOMISE select DVB_DIB8000 if !DVB_FE_CUSTOMISE @@ -241,7 +240,6 @@ config DVB_USB_OPERA1 config DVB_USB_AF9005 tristate "Afatech AF9005 DVB-T USB1.1 support" depends on DVB_USB && EXPERIMENTAL - depends on 0 select MEDIA_TUNER_MT2060 if !MEDIA_TUNER_CUSTOMISE select MEDIA_TUNER_QT1010 if !MEDIA_TUNER_CUSTOMISE help diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig index e1d424967a7c..a87a477c87f2 100644 --- a/drivers/media/radio/Kconfig +++ b/drivers/media/radio/Kconfig @@ -32,7 +32,6 @@ config RADIO_CADET config RADIO_RTRACK tristate "AIMSlab RadioTrack (aka RadioReveal) support" depends on ISA && VIDEO_V4L2 - depends on 0 ---help--- Choose Y here if you have one of these FM radio cards, and then fill in the port address below. diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index c2d879c0d4ee..e6186b338a12 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig @@ -610,7 +610,6 @@ config VIDEO_PMS config VIDEO_BWQCAM tristate "Quickcam BW Video For Linux" depends on PARPORT && VIDEO_V4L1 - depends on 0 help Say Y have if you the black and white version of the QuickCam camera. See the next option for the color version. @@ -621,7 +620,6 @@ config VIDEO_BWQCAM config VIDEO_CQCAM tristate "QuickCam Colour Video For Linux (EXPERIMENTAL)" depends on EXPERIMENTAL && PARPORT && VIDEO_V4L1 - depends on 0 help This is the video4linux driver for the colour version of the Connectix QuickCam. If you have one of these cameras, say Y here, @@ -633,7 +631,6 @@ config VIDEO_CQCAM config VIDEO_W9966 tristate "W9966CF Webcam (FlyCam Supra and others) Video For Linux" depends on PARPORT_1284 && PARPORT && VIDEO_V4L1 - depends on 0 help Video4linux driver for Winbond's w9966 based Webcams. Currently tested with the LifeView FlyCam Supra. diff --git a/drivers/media/video/au0828/Kconfig b/drivers/media/video/au0828/Kconfig index fdf8bb7f2423..0c3a5ba0e857 100644 --- a/drivers/media/video/au0828/Kconfig +++ b/drivers/media/video/au0828/Kconfig @@ -2,10 +2,6 @@ config VIDEO_AU0828 tristate "Auvitek AU0828 support" depends on I2C && INPUT && DVB_CORE && USB && VIDEO_V4L2 - # - # The build breaks with certain configs: - # - depends on 0 select I2C_ALGOBIT select VIDEO_TVEEPROM select VIDEOBUF_VMALLOC diff --git a/drivers/media/video/cx88/Kconfig b/drivers/media/video/cx88/Kconfig index 480d34ae9094..49952980dab3 100644 --- a/drivers/media/video/cx88/Kconfig +++ b/drivers/media/video/cx88/Kconfig @@ -1,8 +1,6 @@ config VIDEO_CX88 tristate "Conexant 2388x (bt878 successor) support" depends on VIDEO_DEV && PCI && I2C && INPUT - # build failure, see config-Mon_Oct_20_13_45_14_CEST_2008.bad - depends on BROKEN select I2C_ALGOBIT select VIDEO_BTCX select VIDEOBUF_DMA_SG diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 8690bd9abde0..570be139f9df 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -235,8 +235,6 @@ config MFD_WM8350_I2C tristate "Support Wolfson Microelectronics WM8350 with I2C" select MFD_WM8350 depends on I2C - # build failure - depends on 0 help The WM8350 is an integrated audio and power management subsystem with watchdog and RTC functionality for embedded diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index bd6239f352c7..e1dd53fc2457 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -247,8 +247,6 @@ config DELL_LAPTOP depends on BACKLIGHT_CLASS_DEVICE depends on RFKILL depends on POWER_SUPPLY - # broken build with: config-Thu_Jan_15_01_30_52_CET_2009.bad - depends on 0 default n ---help--- This driver adds support for rfkill and backlight control to Dell diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index f19882059ed7..712776089b46 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -776,8 +776,6 @@ config NET_VENDOR_SMC config WD80x3 tristate "WD80*3 support" depends on NET_VENDOR_SMC && ISA - # broken build - depends on 0 select CRC32 help If you have a network (Ethernet) card of this type, say Y and read @@ -1184,8 +1182,6 @@ config EEXPRESS_PRO config HPLAN_PLUS tristate "HP PCLAN+ (27247B and 27252A) support" depends on NET_ISA - # broken build with config-Mon_Jul_21_20_21_08_CEST_2008.bad - depends on 0 select CRC32 help If you have a network (Ethernet) card of this type, say Y and read @@ -1745,7 +1741,6 @@ config KS8851 config KS8851_MLL tristate "Micrel KS8851 MLL" depends on HAS_IOMEM - depends on 0 help This platform driver is for Micrel KS8851 Address/data bus multiplexed network chip. @@ -2310,7 +2305,6 @@ config BNX2 config CNIC tristate "Broadcom CNIC support" depends on PCI - depends on 0 select BNX2 select UIO help @@ -2650,8 +2644,6 @@ config S2IO config VXGE tristate "Neterion X3100 Series 10GbE PCIe Server Adapter" depends on PCI && INET - # build failures: - depends on 0 ---help--- This driver supports Neterion Inc's X3100 Series 10 GbE PCIe I/O Virtualized Server Adapter. @@ -2694,8 +2686,6 @@ config MYRI10GE_DCA config NETXEN_NIC tristate "NetXen Multi port (1/10) Gigabit Ethernet NIC" - # build breakage - depends on 0 depends on PCI help This enables the support for NetXen's Gigabit Ethernet card. diff --git a/drivers/net/Makefile b/drivers/net/Makefile index e6708f5e8df4..48d82e901aad 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -120,7 +120,7 @@ ifeq ($(CONFIG_FEC_MPC52xx_MDIO),y) obj-$(CONFIG_FEC_MPC52xx) += fec_mpc52xx_phy.o endif obj-$(CONFIG_68360_ENET) += 68360enet.o -obj-$(CONFIG_WD80x3) += wd.o 8390p.o +obj-$(CONFIG_WD80x3) += wd.o 8390.o obj-$(CONFIG_EL2) += 3c503.o 8390p.o obj-$(CONFIG_NE2000) += ne.o 8390p.o obj-$(CONFIG_NE2_MCA) += ne2.o 8390p.o diff --git a/drivers/net/wimax/i2400m/Kconfig b/drivers/net/wimax/i2400m/Kconfig index 6ab63bebb30b..d623b3d99a4b 100644 --- a/drivers/net/wimax/i2400m/Kconfig +++ b/drivers/net/wimax/i2400m/Kconfig @@ -13,8 +13,6 @@ comment "Enable MMC support to see WiMAX SDIO drivers" config WIMAX_I2400M_USB tristate "Intel Wireless WiMAX Connection 2400 over USB (including 5x50)" depends on WIMAX && USB - # build failure: config-Thu_Jan__8_10_51_13_CET_2009.bad - depends on 0 select WIMAX_I2400M help Select if you have a device based on the Intel WiMAX diff --git a/drivers/net/wireless/rt2x00/Kconfig b/drivers/net/wireless/rt2x00/Kconfig index 9c903afb8784..ed1f997e3521 100644 --- a/drivers/net/wireless/rt2x00/Kconfig +++ b/drivers/net/wireless/rt2x00/Kconfig @@ -1,7 +1,6 @@ menuconfig RT2X00 tristate "Ralink driver support" depends on MAC80211 && WLAN_80211 - depends on 0 ---help--- This will enable the support for the Ralink drivers, developed in the rt2x00 project <http://rt2x00.serialmonkey.com>. diff --git a/drivers/net/wireless/wl12xx/Kconfig b/drivers/net/wireless/wl12xx/Kconfig index dd36ea91b030..88060e117541 100644 --- a/drivers/net/wireless/wl12xx/Kconfig +++ b/drivers/net/wireless/wl12xx/Kconfig @@ -1,7 +1,6 @@ menuconfig WL12XX tristate "TI wl12xx driver support" depends on MAC80211 && WLAN_80211 && EXPERIMENTAL - depends on 0 ---help--- This will enable TI wl12xx driver support. The drivers make use of the mac80211 stack. diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig index c11ba0e68c9a..55ca39dea42e 100644 --- a/drivers/platform/x86/Kconfig +++ b/drivers/platform/x86/Kconfig @@ -37,7 +37,6 @@ config ACER_WMI config ACERHDF tristate "Acer Aspire One temperature and fan driver" depends on THERMAL && THERMAL_HWMON && ACPI - depends on 0 ---help--- This is a driver for Acer Aspire One netbooks. It allows to access the temperature sensor and to control the fan. diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index fb45f5ee8df1..454970d2d701 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c @@ -746,7 +746,9 @@ static acpi_status WMID_set_u32(u32 value, u32 cap, struct wmi_interface *iface) return AE_BAD_PARAMETER; if (quirks->mailled == 1) { param = value ? 0x92 : 0x93; + i8042_lock_chip(); i8042_command(¶m, 0x1059); + i8042_unlock_chip(); return 0; } break; diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index baee1a74db3c..9a2e9a7b0bed 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -2216,7 +2216,6 @@ static int hotkey_user_mask_set(const u32 mask) return rc; } -#ifdef CONFIG_THINKPAD_ACPI_HOTKEY_POLL /* * Sets the driver hotkey mask. * @@ -2247,7 +2246,6 @@ static int tpacpi_hotkey_driver_mask_set(const u32 mask) return rc; } -#endif static int hotkey_status_get(int *status) { diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index 57fd0328c92e..e11cca4c784c 100644 --- a/drivers/scsi/Kconfig +++ b/drivers/scsi/Kconfig @@ -1559,13 +1559,6 @@ config SCSI_NSP32 config SCSI_DEBUG tristate "SCSI debugging host simulator" depends on SCSI - - # - # SCSI-debug can break when combined with async bootup. Turn - # it off for now: - # - depends on BROKEN - select CRC_T10DIF help This is a host adapter simulator that can simulate multiple hosts diff --git a/drivers/scsi/bnx2i/Kconfig b/drivers/scsi/bnx2i/Kconfig index d7aa3be2500e..1e9f7141102b 100644 --- a/drivers/scsi/bnx2i/Kconfig +++ b/drivers/scsi/bnx2i/Kconfig @@ -1,6 +1,5 @@ config SCSI_BNX2_ISCSI tristate "Broadcom NetXtreme II iSCSI support" - depends on 0 select SCSI_ISCSI_ATTRS select NETDEVICES select NETDEV_1000 diff --git a/drivers/telephony/Kconfig b/drivers/telephony/Kconfig index ea97bd1c423b..b5f78b6ed2bd 100644 --- a/drivers/telephony/Kconfig +++ b/drivers/telephony/Kconfig @@ -20,8 +20,6 @@ if PHONE config PHONE_IXJ tristate "QuickNet Internet LineJack/PhoneJack support" depends on ISA || PCI - # build breakage, config-Sat_Jul_19_00_58_16_CEST_2008.bad - depends on 0 ---help--- Say M if you have a telephony card manufactured by Quicknet Technologies, Inc. These include the Internet PhoneJACK and diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index 3189c24b078f..33351312327f 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig @@ -15,9 +15,6 @@ menuconfig USB_GADGET tristate "USB Gadget Support" - # crashes on titan with: - # http://redhat.com/~mingo/misc/config-Tue_Jul_22_13_44_45_CEST_2008.bad - depends on 0 help USB is a master/slave protocol, organized with one master host (such as a PC) controlling up to 127 peripheral devices. diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index d8bd5bb90446..9b43b226817f 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -358,8 +358,6 @@ config USB_WHCI_HCD tristate "Wireless USB Host Controller Interface (WHCI) driver (EXPERIMENTAL)" depends on EXPERIMENTAL depends on PCI && USB - depends on 0 - select USB_WUSB select UWB_WHCI help diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 144310609635..3711b888d482 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -395,7 +395,6 @@ config SC520_WDT config SBC_FITPC2_WATCHDOG tristate "Compulab SBC-FITPC2 watchdog" depends on X86 - depends on 0 ---help--- This is the driver for the built-in watchdog timer on the fit-PC2 Single-board computer made by Compulab. diff --git a/fs/Kconfig b/fs/Kconfig index 0ea6e3744de4..d4bf8caad8d0 100644 --- a/fs/Kconfig +++ b/fs/Kconfig @@ -48,7 +48,7 @@ source "fs/nilfs2/Kconfig" endif # BLOCK config FILE_LOCKING - bool "Enable POSIX file locking API" if BROKEN + bool "Enable POSIX file locking API" if EMBEDDED default y help This option enables standard file locking support, required diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c index 94b86da01696..42cec2a7c0cf 100644 --- a/fs/cifs/cifs_debug.c +++ b/fs/cifs/cifs_debug.c @@ -732,13 +732,11 @@ static ssize_t cifs_security_flags_proc_write(struct file *file, char flags_string[12]; char c; - memset(flags_string, 0, 12); - - if (count < 1) - return -EINVAL; - if (count > 11) + if ((count < 1) || (count > 11)) return -EINVAL; + memset(flags_string, 0, 12); + if (copy_from_user(flags_string, buffer, count)) return -EFAULT; diff --git a/include/linux/dmar.h b/include/linux/dmar.h index a05cd1cec6d7..69a6fbac0921 100644 --- a/include/linux/dmar.h +++ b/include/linux/dmar.h @@ -47,11 +47,11 @@ extern struct list_head dmar_drhd_units; #define for_each_active_iommu(i, drhd) \ list_for_each_entry(drhd, &dmar_drhd_units, list) \ - if (({i=drhd->iommu, drhd->ignored;})) {} else + if (i=drhd->iommu, drhd->ignored) {} else #define for_each_iommu(i, drhd) \ list_for_each_entry(drhd, &dmar_drhd_units, list) \ - if (({ i=drhd->iommu, 0;})) {} else + if (i=drhd->iommu, 0) {} else extern int dmar_table_init(void); extern int dmar_dev_scope_init(void); diff --git a/include/linux/i8042.h b/include/linux/i8042.h index 7907a72403ee..60c3360ef6ad 100644 --- a/include/linux/i8042.h +++ b/include/linux/i8042.h @@ -7,6 +7,7 @@ * the Free Software Foundation. */ +#include <linux/types.h> /* * Standard commands. @@ -30,6 +31,35 @@ #define I8042_CMD_MUX_PFX 0x0090 #define I8042_CMD_MUX_SEND 0x1090 +struct serio; + +#if defined(CONFIG_SERIO_I8042) || defined(CONFIG_SERIO_I8042_MODULE) + +void i8042_lock_chip(void); +void i8042_unlock_chip(void); int i8042_command(unsigned char *param, int command); +bool i8042_check_port_owner(const struct serio *); + +#else + +void i8042_lock_chip(void) +{ +} + +void i8042_unlock_chip(void) +{ +} + +int i8042_command(unsigned char *param, int command) +{ + return -ENOSYS; +} + +bool i8042_check_port_owner(const struct serio *serio) +{ + return false; +} + +#endif #endif diff --git a/include/linux/init.h b/include/linux/init.h index ff8bde520d03..400adbb45414 100644 --- a/include/linux/init.h +++ b/include/linux/init.h @@ -271,7 +271,6 @@ void __init parse_early_options(char *cmdline); #else /* MODULE */ /* Don't use these in modules, but some people do... */ -#define early_initcall(fn) module_init(fn) #define core_initcall(fn) module_init(fn) #define postcore_initcall(fn) module_init(fn) #define arch_initcall(fn) module_init(fn) diff --git a/include/linux/kmod.h b/include/linux/kmod.h index d5fa565086d1..384ca8bbf1ac 100644 --- a/include/linux/kmod.h +++ b/include/linux/kmod.h @@ -34,7 +34,7 @@ extern int __request_module(bool wait, const char *name, ...) \ #define request_module(mod...) __request_module(true, mod) #define request_module_nowait(mod...) __request_module(false, mod) #define try_then_request_module(x, mod...) \ - ((x) ?: (__request_module(false, mod), (x))) + ((x) ?: (__request_module(true, mod), (x))) #else static inline int request_module(const char *name, ...) { return -ENOSYS; } static inline int request_module_nowait(const char *name, ...) { return -ENOSYS; } diff --git a/include/linux/libps2.h b/include/linux/libps2.h index fcf5fbe6a50c..79603a6c356f 100644 --- a/include/linux/libps2.h +++ b/include/linux/libps2.h @@ -44,6 +44,8 @@ struct ps2dev { void ps2_init(struct ps2dev *ps2dev, struct serio *serio); int ps2_sendbyte(struct ps2dev *ps2dev, unsigned char byte, int timeout); void ps2_drain(struct ps2dev *ps2dev, int maxbytes, int timeout); +void ps2_begin_command(struct ps2dev *ps2dev); +void ps2_end_command(struct ps2dev *ps2dev); int __ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command); int ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command); int ps2_handle_ack(struct ps2dev *ps2dev, unsigned char data); diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index 5158e784bf36..b43a9e039059 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h @@ -1,9 +1,9 @@ #ifndef _LINUX_PIPE_FS_I_H #define _LINUX_PIPE_FS_I_H -#define PIPEFS_MAGIC 0x50495045 +#define PIPEFS_MAGIC 0x50495045 -#define PIPE_BUFFERS 64 +#define PIPE_BUFFERS (16) #define PIPE_BUF_FLAG_LRU 0x01 /* page is on the LRU */ #define PIPE_BUF_FLAG_ATOMIC 0x02 /* was atomically mapped */ diff --git a/include/linux/pktcdvd.h b/include/linux/pktcdvd.h index 6c0d7cf6e136..d745f5b6c7b0 100644 --- a/include/linux/pktcdvd.h +++ b/include/linux/pktcdvd.h @@ -112,7 +112,6 @@ struct pkt_ctrl_command { #include <linux/completion.h> #include <linux/cdrom.h> #include <linux/kobject.h> -#include <linux/mempool.h> #include <linux/sysfs.h> #include <linux/mempool.h> diff --git a/init/Kconfig b/init/Kconfig index 68f64e51640a..08928803a328 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -1070,8 +1070,6 @@ config SLQB config SLOB depends on EMBEDDED - # lockups observed: - depends on 0 bool "SLOB (Simple Allocator)" help SLOB replaces the stock allocator with a drastically simpler diff --git a/kernel/async.c b/kernel/async.c index e2cf309d6bcb..27235f5de198 100644 --- a/kernel/async.c +++ b/kernel/async.c @@ -49,6 +49,7 @@ asynchronous and synchronous parts of the kernel. */ #include <linux/async.h> +#include <linux/bug.h> #include <linux/module.h> #include <linux/wait.h> #include <linux/sched.h> @@ -386,20 +387,11 @@ static int async_manager_thread(void *unused) static int __init async_init(void) { - if (async_enabled) - if (IS_ERR(kthread_run(async_manager_thread, NULL, - "async/mgr"))) - async_enabled = 0; - return 0; -} + async_enabled = + !IS_ERR(kthread_run(async_manager_thread, NULL, "async/mgr")); -static int __init setup_async(char *str) -{ - async_enabled = 1; - return 1; + WARN_ON(!async_enabled); + return 0; } -__setup("fastboot", setup_async); - - core_initcall(async_init); diff --git a/kernel/capability.c b/kernel/capability.c index c2316d3fa094..4e17041963f5 100644 --- a/kernel/capability.c +++ b/kernel/capability.c @@ -238,7 +238,7 @@ SYSCALL_DEFINE2(capget, cap_user_header_t, header, cap_user_data_t, dataptr) SYSCALL_DEFINE2(capset, cap_user_header_t, header, const cap_user_data_t, data) { struct __user_cap_data_struct kdata[_KERNEL_CAPABILITY_U32S]; - unsigned i, tocopy, copybytes; + unsigned i, tocopy; kernel_cap_t inheritable, permitted, effective; struct cred *new; int ret; @@ -255,11 +255,8 @@ SYSCALL_DEFINE2(capset, cap_user_header_t, header, const cap_user_data_t, data) if (pid != 0 && pid != task_pid_vnr(current)) return -EPERM; - copybytes = tocopy * sizeof(struct __user_cap_data_struct); - if (copybytes > sizeof(kdata)) - return -EFAULT; - - if (copy_from_user(&kdata, data, copybytes)) + if (copy_from_user(&kdata, data, + tocopy * sizeof(struct __user_cap_data_struct))) return -EFAULT; for (i = 0; i < tocopy; i++) { diff --git a/kernel/gcov/Kconfig b/kernel/gcov/Kconfig index 505b2d394893..70a298d6da71 100644 --- a/kernel/gcov/Kconfig +++ b/kernel/gcov/Kconfig @@ -3,7 +3,6 @@ menu "GCOV-based kernel profiling" config GCOV_KERNEL bool "Enable gcov-based kernel profiling" depends on DEBUG_FS && CONSTRUCTORS - depends on BROKEN default n ---help--- This option enables gcov-based code profiling (e.g. for code coverage diff --git a/kernel/sysctl.c b/kernel/sysctl.c index b230a105dc8f..3e2c7a003e31 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -1036,6 +1036,14 @@ static struct ctl_table kern_table[] = { }, #endif #ifdef CONFIG_BLOCK + { + .ctl_name = CTL_UNNUMBERED, + .procname = "blk_iopoll", + .data = &blk_iopoll_enabled, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec, + }, #endif /* * NOTE: do not add new entries to this table unless you have read diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index ab03bb9b3a9c..11bdf7d19082 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -103,6 +103,7 @@ config HEADERS_CHECK config DEBUG_SECTION_MISMATCH bool "Enable full Section mismatch analysis" + depends on UNDEFINED # This option is on purpose disabled for now. # It will be enabled when we are down to a resonable number # of section mismatch warnings (< 10 for an allyesconfig build) diff --git a/localversion-tip b/localversion-tip deleted file mode 100644 index 55b0f65e6274..000000000000 --- a/localversion-tip +++ /dev/null @@ -1 +0,0 @@ --tip diff --git a/mm/migrate.c b/mm/migrate.c index 5b9ebc5f4ef6..1a4bf4813780 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -1044,15 +1044,11 @@ static int do_pages_stat(struct mm_struct *mm, unsigned long nr_pages, int err; for (i = 0; i < nr_pages; i += chunk_nr) { - unsigned int copy; if (chunk_nr + i > nr_pages) chunk_nr = nr_pages - i; - copy = chunk_nr * sizeof(*chunk_pages); - if (copy > DO_PAGES_STAT_CHUNK_NR) - return -EFAULT; - - err = copy_from_user(chunk_pages, &pages[i], copy); + err = copy_from_user(chunk_pages, &pages[i], + chunk_nr * sizeof(*chunk_pages)); if (err) { err = -EFAULT; goto out; diff --git a/net/9p/Kconfig b/net/9p/Kconfig index dcf30201d268..7ed75c7bd5d1 100644 --- a/net/9p/Kconfig +++ b/net/9p/Kconfig @@ -4,8 +4,6 @@ menuconfig NET_9P depends on NET && EXPERIMENTAL - # build breakage - depends on 0 tristate "Plan 9 Resource Sharing Support (9P2000) (Experimental)" help If you say Y here, you will get experimental support for diff --git a/net/core/skbuff.c b/net/core/skbuff.c index b30625e0e621..80a96166df39 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -256,7 +256,7 @@ EXPORT_SYMBOL(__alloc_skb); struct sk_buff *__netdev_alloc_skb(struct net_device *dev, unsigned int length, gfp_t gfp_mask) { - int node = dev_to_node(&dev->dev); + int node = dev->dev.parent ? dev_to_node(dev->dev.parent) : -1; struct sk_buff *skb; skb = __alloc_skb(length + NET_SKB_PAD, gfp_mask, 0, node); diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig index 1a3034a7ba95..634d14affc8d 100644 --- a/net/netfilter/Kconfig +++ b/net/netfilter/Kconfig @@ -275,6 +275,8 @@ config NF_CT_NETLINK help This option enables support for a netlink-based userspace interface +endif # NF_CONNTRACK + # transparent proxy support config NETFILTER_TPROXY tristate "Transparent proxying support (EXPERIMENTAL)" @@ -290,8 +292,6 @@ config NETFILTER_TPROXY To compile it as a module, choose M here. If unsure, say N. -endif # NF_CONNTRACK - config NETFILTER_XTABLES tristate "Netfilter Xtables support (required for ip_tables)" default m if NETFILTER_ADVANCED=n diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index 5ddeda117c1e..446e9bd4b4bc 100644 --- a/net/netfilter/ipvs/ip_vs_ctl.c +++ b/net/netfilter/ipvs/ip_vs_ctl.c @@ -2077,10 +2077,6 @@ do_ip_vs_set_ctl(struct sock *sk, int cmd, void __user *user, unsigned int len) if (!capable(CAP_NET_ADMIN)) return -EPERM; - if (cmd < IP_VS_BASE_CTL || cmd > IP_VS_SO_SET_MAX + 1) - return -EINVAL; - if (len < 0 || len > sizeof(arg)) - return -EINVAL; if (len != set_arglen[SET_CMDID(cmd)]) { pr_err("set_ctl: len %u != %u\n", len, set_arglen[SET_CMDID(cmd)]); @@ -2356,25 +2352,17 @@ do_ip_vs_get_ctl(struct sock *sk, int cmd, void __user *user, int *len) { unsigned char arg[128]; int ret = 0; - unsigned int copylen; if (!capable(CAP_NET_ADMIN)) return -EPERM; - if (cmd < IP_VS_BASE_CTL || cmd > IP_VS_SO_GET_MAX + 1) - return -EINVAL; - if (*len < get_arglen[GET_CMDID(cmd)]) { pr_err("get_ctl: len %u < %u\n", *len, get_arglen[GET_CMDID(cmd)]); return -EINVAL; } - copylen = get_arglen[GET_CMDID(cmd)]; - if (copylen > sizeof(arg)) - return -EINVAL; - - if (copy_from_user(arg, user, copylen) != 0) + if (copy_from_user(arg, user, get_arglen[GET_CMDID(cmd)]) != 0) return -EFAULT; if (mutex_lock_interruptible(&__ip_vs_mutex)) diff --git a/security/capability.c b/security/capability.c index 13781e9af4ae..fce07a7bc825 100644 --- a/security/capability.c +++ b/security/capability.c @@ -11,7 +11,6 @@ */ #include <linux/security.h> -#include <net/sock.h> static int cap_acct(struct file *file) { @@ -682,9 +681,6 @@ static int cap_socket_getpeersec_dgram(struct socket *sock, static int cap_sk_alloc_security(struct sock *sk, int family, gfp_t priority) { -#ifdef CONFIG_SECURITY_NETWORK - sk->sk_security = NULL; -#endif return 0; } diff --git a/sound/drivers/Kconfig b/sound/drivers/Kconfig index 491e0d7f3914..84714a65e5c8 100644 --- a/sound/drivers/Kconfig +++ b/sound/drivers/Kconfig @@ -91,8 +91,6 @@ config SND_VIRMIDI config SND_MTPAV tristate "MOTU MidiTimePiece AV multiport MIDI" - # sometimes crashes - depends on 0 select SND_RAWMIDI help To use a MOTU MidiTimePiece AV multiport MIDI adapter |