diff --git a/[refs] b/[refs] index a218d9f708f0..8eed8866f2c3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 17aa7e034416e3080bc57a786d09ba0a4a044561 +refs/heads/master: 0885cb5653ff82c8d322df1b8a95843dc5f5486b diff --git a/trunk/Documentation/DocBook/kgdb.tmpl b/trunk/Documentation/DocBook/kgdb.tmpl index 028a8444d95e..97618bed4d65 100644 --- a/trunk/Documentation/DocBook/kgdb.tmpl +++ b/trunk/Documentation/DocBook/kgdb.tmpl @@ -72,7 +72,7 @@ kgdb is a source level debugger for linux kernel. It is used along with gdb to debug a linux kernel. The expectation is that gdb can be used to "break in" to the kernel to inspect memory, variables - and look through call stack information similar to what an + and look through a cal stack information similar to what an application developer would use gdb for. It is possible to place breakpoints in kernel code and perform some limited execution stepping. @@ -93,10 +93,8 @@ Compiling a kernel - To enable CONFIG_KGDB you should first turn on - "Prompt for development and/or incomplete code/drivers" - (CONFIG_EXPERIMENTAL) in "General setup", then under the - "Kernel debugging" select "KGDB: kernel debugging with remote gdb". + To enable CONFIG_KGDB, look under the "Kernel debugging" + and then select "KGDB: kernel debugging with remote gdb". Next you should choose one of more I/O drivers to interconnect debugging diff --git a/trunk/Documentation/kernel-parameters.txt b/trunk/Documentation/kernel-parameters.txt index cdd5b934f43e..a3c35446e755 100644 --- a/trunk/Documentation/kernel-parameters.txt +++ b/trunk/Documentation/kernel-parameters.txt @@ -1094,6 +1094,9 @@ and is between 256 and 4096 characters. It is defined in the file mac5380= [HW,SCSI] Format: ,,,, + mac53c9x= [HW,SCSI] Format: + ,,,,,,, + machvec= [IA64] Force the use of a particular machine-vector (machvec) in a generic kernel. Example: machvec=hpzx1_swiotlb @@ -1522,8 +1525,6 @@ and is between 256 and 4096 characters. It is defined in the file This is normally done in pci_enable_device(), so this option is a temporary workaround for broken drivers that don't call it. - skip_isa_align [X86] do not align io start addr, so can - handle more pci cards firmware [ARM] Do not re-enumerate the bus but instead just use the configuration from the bootloader. This is currently used on diff --git a/trunk/arch/m68k/kernel/traps.c b/trunk/arch/m68k/kernel/traps.c index 75b8340b254b..fd4858e2dd63 100644 --- a/trunk/arch/m68k/kernel/traps.c +++ b/trunk/arch/m68k/kernel/traps.c @@ -468,26 +468,15 @@ static inline void access_error040(struct frame *fp) * (if do_page_fault didn't fix the mapping, * the writeback won't do good) */ -disable_wb: #ifdef DEBUG printk(".. disabling wb2\n"); #endif if (fp->un.fmt7.wb2a == fp->un.fmt7.faddr) fp->un.fmt7.wb2s &= ~WBV_040; - if (fp->un.fmt7.wb3a == fp->un.fmt7.faddr) - fp->un.fmt7.wb3s &= ~WBV_040; } - } else { - /* In case of a bus error we either kill the process or expect - * the kernel to catch the fault, which then is also responsible - * for cleaning up the mess. - */ - current->thread.signo = SIGBUS; - current->thread.faddr = fp->un.fmt7.faddr; - if (send_fault_sig(&fp->ptregs) >= 0) - printk("68040 bus error (ssw=%x, faddr=%lx)\n", ssw, - fp->un.fmt7.faddr); - goto disable_wb; + } else if (send_fault_sig(&fp->ptregs) > 0) { + printk("68040 access error, ssw=%x\n", ssw); + trap_c(fp); } do_040writebacks(fp); diff --git a/trunk/arch/m68k/mac/config.c b/trunk/arch/m68k/mac/config.c index ad3e3bacae39..735a49b4b936 100644 --- a/trunk/arch/m68k/mac/config.c +++ b/trunk/arch/m68k/mac/config.c @@ -48,6 +48,9 @@ struct mac_booter_data mac_bi_data; int mac_bisize = sizeof mac_bi_data; +struct mac_hw_present mac_hw_present; +EXPORT_SYMBOL(mac_hw_present); + /* New m68k bootinfo stuff and videobase */ extern int m68k_num_memory; @@ -814,6 +817,27 @@ void __init mac_identify(void) m68k_ramdisk.addr, m68k_ramdisk.size); #endif + /* + * TODO: set the various fields in macintosh_config->hw_present here! + */ + switch (macintosh_config->scsi_type) { + case MAC_SCSI_OLD: + MACHW_SET(MAC_SCSI_80); + break; + case MAC_SCSI_QUADRA: + case MAC_SCSI_QUADRA2: + case MAC_SCSI_QUADRA3: + MACHW_SET(MAC_SCSI_96); + if ((macintosh_config->ident == MAC_MODEL_Q900) || + (macintosh_config->ident == MAC_MODEL_Q950)) + MACHW_SET(MAC_SCSI_96_2); + break; + default: + printk(KERN_WARNING "config.c: wtf: unknown scsi, using 53c80\n"); + MACHW_SET(MAC_SCSI_80); + break; + } + iop_init(); via_init(); oss_init(); diff --git a/trunk/arch/x86/pci/acpi.c b/trunk/arch/x86/pci/acpi.c index d95de2f199cd..1a9c0c6a1a18 100644 --- a/trunk/arch/x86/pci/acpi.c +++ b/trunk/arch/x86/pci/acpi.c @@ -6,6 +6,45 @@ #include #include "pci.h" +static int __devinit can_skip_ioresource_align(const struct dmi_system_id *d) +{ + pci_probe |= PCI_CAN_SKIP_ISA_ALIGN; + printk(KERN_INFO "PCI: %s detected, can skip ISA alignment\n", d->ident); + return 0; +} + +static struct dmi_system_id acpi_pciprobe_dmi_table[] __devinitdata = { +/* + * Systems where PCI IO resource ISA alignment can be skipped + * when the ISA enable bit in the bridge control is not set + */ + { + .callback = can_skip_ioresource_align, + .ident = "IBM System x3800", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "IBM"), + DMI_MATCH(DMI_PRODUCT_NAME, "x3800"), + }, + }, + { + .callback = can_skip_ioresource_align, + .ident = "IBM System x3850", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "IBM"), + DMI_MATCH(DMI_PRODUCT_NAME, "x3850"), + }, + }, + { + .callback = can_skip_ioresource_align, + .ident = "IBM System x3950", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "IBM"), + DMI_MATCH(DMI_PRODUCT_NAME, "x3950"), + }, + }, + {} +}; + struct pci_root_info { char *name; unsigned int res_num; @@ -157,6 +196,8 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do int pxm; #endif + dmi_check_system(acpi_pciprobe_dmi_table); + if (domain && !pci_domains_supported) { printk(KERN_WARNING "PCI: Multiple domains not supported " "(dom %d, bus %d)\n", domain, busnum); diff --git a/trunk/arch/x86/pci/common.c b/trunk/arch/x86/pci/common.c index bfa72a9475b3..2a4d751818b7 100644 --- a/trunk/arch/x86/pci/common.c +++ b/trunk/arch/x86/pci/common.c @@ -90,50 +90,6 @@ static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev) rom_r->start = rom_r->end = rom_r->flags = 0; } -static int __devinit can_skip_ioresource_align(const struct dmi_system_id *d) -{ - pci_probe |= PCI_CAN_SKIP_ISA_ALIGN; - printk(KERN_INFO "PCI: %s detected, can skip ISA alignment\n", d->ident); - return 0; -} - -static struct dmi_system_id can_skip_pciprobe_dmi_table[] __devinitdata = { -/* - * Systems where PCI IO resource ISA alignment can be skipped - * when the ISA enable bit in the bridge control is not set - */ - { - .callback = can_skip_ioresource_align, - .ident = "IBM System x3800", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "IBM"), - DMI_MATCH(DMI_PRODUCT_NAME, "x3800"), - }, - }, - { - .callback = can_skip_ioresource_align, - .ident = "IBM System x3850", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "IBM"), - DMI_MATCH(DMI_PRODUCT_NAME, "x3850"), - }, - }, - { - .callback = can_skip_ioresource_align, - .ident = "IBM System x3950", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "IBM"), - DMI_MATCH(DMI_PRODUCT_NAME, "x3950"), - }, - }, - {} -}; - -void __init dmi_check_skip_isa_align(void) -{ - dmi_check_system(can_skip_pciprobe_dmi_table); -} - /* * Called after each bus is probed, but before its children * are examined. @@ -362,16 +318,13 @@ static struct dmi_system_id __devinitdata pciprobe_dmi_table[] = { {} }; -void __init dmi_check_pciprobe(void) -{ - dmi_check_system(pciprobe_dmi_table); -} - struct pci_bus * __devinit pcibios_scan_root(int busnum) { struct pci_bus *bus = NULL; struct pci_sysdata *sd; + dmi_check_system(pciprobe_dmi_table); + while ((bus = pci_find_next_bus(bus)) != NULL) { if (bus->number == busnum) { /* Already scanned */ @@ -509,9 +462,6 @@ char * __devinit pcibios_setup(char *str) } else if (!strcmp(str, "routeirq")) { pci_routeirq = 1; return NULL; - } else if (!strcmp(str, "skip_isa_align")) { - pci_probe |= PCI_CAN_SKIP_ISA_ALIGN; - return NULL; } return str; } @@ -539,7 +489,7 @@ void pcibios_disable_device (struct pci_dev *dev) pcibios_disable_irq(dev); } -struct pci_bus * __devinit pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node) +struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node) { struct pci_bus *bus = NULL; struct pci_sysdata *sd; @@ -562,7 +512,7 @@ struct pci_bus * __devinit pci_scan_bus_on_node(int busno, struct pci_ops *ops, return bus; } -struct pci_bus * __devinit pci_scan_bus_with_sysdata(int busno) +struct pci_bus *pci_scan_bus_with_sysdata(int busno) { return pci_scan_bus_on_node(busno, &pci_root_ops, -1); } diff --git a/trunk/arch/x86/pci/fixup.c b/trunk/arch/x86/pci/fixup.c index ff3a6a336342..b60b2abd480c 100644 --- a/trunk/arch/x86/pci/fixup.c +++ b/trunk/arch/x86/pci/fixup.c @@ -502,7 +502,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SIEMENS, 0x0015, */ static void fam10h_pci_cfg_space_size(struct pci_dev *dev) { - dev->cfg_size = pci_cfg_space_size_ext(dev); + dev->cfg_size = pci_cfg_space_size_ext(dev, 0); } DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1200, fam10h_pci_cfg_space_size); diff --git a/trunk/arch/x86/pci/init.c b/trunk/arch/x86/pci/init.c index e70b9c57b88e..dd30c6076b5d 100644 --- a/trunk/arch/x86/pci/init.c +++ b/trunk/arch/x86/pci/init.c @@ -33,10 +33,6 @@ static __init int pci_access_init(void) printk(KERN_ERR "PCI: Fatal: No config space access function found\n"); - dmi_check_pciprobe(); - - dmi_check_skip_isa_align(); - return 0; } arch_initcall(pci_access_init); diff --git a/trunk/arch/x86/pci/pci.h b/trunk/arch/x86/pci/pci.h index f3972b12c60a..c58805a92db5 100644 --- a/trunk/arch/x86/pci/pci.h +++ b/trunk/arch/x86/pci/pci.h @@ -38,9 +38,6 @@ enum pci_bf_sort_state { pci_dmi_bf, }; -extern void __init dmi_check_pciprobe(void); -extern void __init dmi_check_skip_isa_align(void); - /* pci-i386.c */ extern unsigned int pcibios_max_latency; diff --git a/trunk/drivers/char/serial167.c b/trunk/drivers/char/serial167.c index 3b23270eaa65..fd2db07a50fc 100644 --- a/trunk/drivers/char/serial167.c +++ b/trunk/drivers/char/serial167.c @@ -1073,7 +1073,7 @@ static int cy_put_char(struct tty_struct *tty, unsigned char ch) return 0; if (!info->xmit_buf) - return 0; + return; local_irq_save(flags); if (info->xmit_cnt >= PAGE_SIZE - 1) { diff --git a/trunk/drivers/edac/edac_core.h b/trunk/drivers/edac/edac_core.h index b27b13c5eb5a..a9aa845dbe74 100644 --- a/trunk/drivers/edac/edac_core.h +++ b/trunk/drivers/edac/edac_core.h @@ -97,7 +97,7 @@ extern int edac_debug_level; #define PCI_VEND_DEV(vend, dev) PCI_VENDOR_ID_ ## vend, \ PCI_DEVICE_ID_ ## vend ## _ ## dev -#define edac_dev_name(dev) (dev)->dev_name +#define dev_name(dev) (dev)->dev_name /* memory devices */ enum dev_type { diff --git a/trunk/drivers/edac/edac_device.c b/trunk/drivers/edac/edac_device.c index 5fcd3d89c75d..63372fa7ecfe 100644 --- a/trunk/drivers/edac/edac_device.c +++ b/trunk/drivers/edac/edac_device.c @@ -333,7 +333,7 @@ static int add_edac_dev_to_global_list(struct edac_device_ctl_info *edac_dev) fail0: edac_printk(KERN_WARNING, EDAC_MC, "%s (%s) %s %s already assigned %d\n", - rover->dev->bus_id, edac_dev_name(rover), + rover->dev->bus_id, dev_name(rover), rover->mod_name, rover->ctl_name, rover->dev_idx); return 1; @@ -538,7 +538,7 @@ int edac_device_add_device(struct edac_device_ctl_info *edac_dev) "'%s': DEV '%s' (%s)\n", edac_dev->mod_name, edac_dev->ctl_name, - edac_dev_name(edac_dev), + dev_name(edac_dev), edac_op_state_to_string(edac_dev->op_state)); mutex_unlock(&device_ctls_mutex); @@ -599,7 +599,7 @@ struct edac_device_ctl_info *edac_device_del_device(struct device *dev) edac_printk(KERN_INFO, EDAC_MC, "Removed device %d for %s %s: DEV %s\n", edac_dev->dev_idx, - edac_dev->mod_name, edac_dev->ctl_name, edac_dev_name(edac_dev)); + edac_dev->mod_name, edac_dev->ctl_name, dev_name(edac_dev)); return edac_dev; } diff --git a/trunk/drivers/edac/edac_mc.c b/trunk/drivers/edac/edac_mc.c index d110392d48f4..a4cf1645f588 100644 --- a/trunk/drivers/edac/edac_mc.c +++ b/trunk/drivers/edac/edac_mc.c @@ -402,7 +402,7 @@ static int add_mc_to_global_list(struct mem_ctl_info *mci) fail0: edac_printk(KERN_WARNING, EDAC_MC, "%s (%s) %s %s already assigned %d\n", p->dev->bus_id, - edac_dev_name(mci), p->mod_name, p->ctl_name, p->mc_idx); + dev_name(mci), p->mod_name, p->ctl_name, p->mc_idx); return 1; fail1: @@ -517,7 +517,7 @@ int edac_mc_add_mc(struct mem_ctl_info *mci) /* Report action taken */ edac_mc_printk(mci, KERN_INFO, "Giving out device to '%s' '%s':" - " DEV %s\n", mci->mod_name, mci->ctl_name, edac_dev_name(mci)); + " DEV %s\n", mci->mod_name, mci->ctl_name, dev_name(mci)); mutex_unlock(&mem_ctls_mutex); return 0; @@ -565,7 +565,7 @@ struct mem_ctl_info *edac_mc_del_mc(struct device *dev) edac_printk(KERN_INFO, EDAC_MC, "Removed device %d for %s %s: DEV %s\n", mci->mc_idx, - mci->mod_name, mci->ctl_name, edac_dev_name(mci)); + mci->mod_name, mci->ctl_name, dev_name(mci)); return mci; } diff --git a/trunk/drivers/edac/edac_pci.c b/trunk/drivers/edac/edac_pci.c index 22ec9d5d4312..9b24340b52e1 100644 --- a/trunk/drivers/edac/edac_pci.c +++ b/trunk/drivers/edac/edac_pci.c @@ -150,7 +150,7 @@ static int add_edac_pci_to_global_list(struct edac_pci_ctl_info *pci) fail0: edac_printk(KERN_WARNING, EDAC_PCI, "%s (%s) %s %s already assigned %d\n", - rover->dev->bus_id, edac_dev_name(rover), + rover->dev->bus_id, dev_name(rover), rover->mod_name, rover->ctl_name, rover->pci_idx); return 1; @@ -360,7 +360,7 @@ int edac_pci_add_device(struct edac_pci_ctl_info *pci, int edac_idx) " DEV '%s' (%s)\n", pci->mod_name, pci->ctl_name, - edac_dev_name(pci), edac_op_state_to_string(pci->op_state)); + dev_name(pci), edac_op_state_to_string(pci->op_state)); mutex_unlock(&edac_pci_ctls_mutex); return 0; @@ -415,7 +415,7 @@ struct edac_pci_ctl_info *edac_pci_del_device(struct device *dev) edac_printk(KERN_INFO, EDAC_PCI, "Removed device %d for %s %s: DEV %s\n", - pci->pci_idx, pci->mod_name, pci->ctl_name, edac_dev_name(pci)); + pci->pci_idx, pci->mod_name, pci->ctl_name, dev_name(pci)); return pci; } diff --git a/trunk/drivers/ide/legacy/falconide.c b/trunk/drivers/ide/legacy/falconide.c index 9e449a0c623f..83555ca513b5 100644 --- a/trunk/drivers/ide/legacy/falconide.c +++ b/trunk/drivers/ide/legacy/falconide.c @@ -61,7 +61,7 @@ static void falconide_output_data(ide_drive_t *drive, struct request *rq, unsigned long data_addr = drive->hwif->io_ports.data_addr; if (drive->media == ide_disk && rq && rq->cmd_type == REQ_TYPE_FS) - return outsw(data_addr, buf, (len + 1) / 2); + return outsw(data_adr, buf, (len + 1) / 2); outsw_swapw(data_addr, buf, (len + 1) / 2); } diff --git a/trunk/drivers/input/serio/hp_sdc.c b/trunk/drivers/input/serio/hp_sdc.c index edfedd9a166c..02b3ad8c0826 100644 --- a/trunk/drivers/input/serio/hp_sdc.c +++ b/trunk/drivers/input/serio/hp_sdc.c @@ -69,7 +69,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/macintosh/therm_pm72.c b/trunk/drivers/macintosh/therm_pm72.c index 1e0a69a5e815..ddfb426a9abd 100644 --- a/trunk/drivers/macintosh/therm_pm72.c +++ b/trunk/drivers/macintosh/therm_pm72.c @@ -122,6 +122,7 @@ #include #include #include +#include #include #include #include @@ -169,7 +170,7 @@ static int rackmac; static s32 dimm_output_clamp; static int fcu_rpm_shift; static int fcu_tickle_ticks; -static DECLARE_MUTEX(driver_lock); +static DEFINE_MUTEX(driver_lock); /* * We have 3 types of CPU PID control. One is "split" old style control @@ -729,9 +730,9 @@ static void fetch_cpu_pumps_minmax(void) static ssize_t show_##name(struct device *dev, struct device_attribute *attr, char *buf) \ { \ ssize_t r; \ - down(&driver_lock); \ + mutex_lock(&driver_lock); \ r = sprintf(buf, "%d.%03d", FIX32TOPRINT(data)); \ - up(&driver_lock); \ + mutex_unlock(&driver_lock); \ return r; \ } #define BUILD_SHOW_FUNC_INT(name, data) \ @@ -1803,11 +1804,11 @@ static int main_control_loop(void *x) { DBG("main_control_loop started\n"); - down(&driver_lock); + mutex_lock(&driver_lock); if (start_fcu() < 0) { printk(KERN_ERR "kfand: failed to start FCU\n"); - up(&driver_lock); + mutex_unlock(&driver_lock); goto out; } @@ -1822,14 +1823,14 @@ static int main_control_loop(void *x) fcu_tickle_ticks = FCU_TICKLE_TICKS; - up(&driver_lock); + mutex_unlock(&driver_lock); while (state == state_attached) { unsigned long elapsed, start; start = jiffies; - down(&driver_lock); + mutex_lock(&driver_lock); /* Tickle the FCU just in case */ if (--fcu_tickle_ticks < 0) { @@ -1861,7 +1862,7 @@ static int main_control_loop(void *x) do_monitor_slots(&slots_state); else do_monitor_drives(&drives_state); - up(&driver_lock); + mutex_unlock(&driver_lock); if (critical_state == 1) { printk(KERN_WARNING "Temperature control detected a critical condition\n"); @@ -2019,13 +2020,13 @@ static void detach_fcu(void) */ static int therm_pm72_attach(struct i2c_adapter *adapter) { - down(&driver_lock); + mutex_lock(&driver_lock); /* Check state */ if (state == state_detached) state = state_attaching; if (state != state_attaching) { - up(&driver_lock); + mutex_unlock(&driver_lock); return 0; } @@ -2054,7 +2055,7 @@ static int therm_pm72_attach(struct i2c_adapter *adapter) state = state_attached; start_control_loops(); } - up(&driver_lock); + mutex_unlock(&driver_lock); return 0; } @@ -2065,16 +2066,16 @@ static int therm_pm72_attach(struct i2c_adapter *adapter) */ static int therm_pm72_detach(struct i2c_adapter *adapter) { - down(&driver_lock); + mutex_lock(&driver_lock); if (state != state_detached) state = state_detaching; /* Stop control loops if any */ DBG("stopping control loops\n"); - up(&driver_lock); + mutex_unlock(&driver_lock); stop_control_loops(); - down(&driver_lock); + mutex_lock(&driver_lock); if (u3_0 != NULL && !strcmp(adapter->name, "u3 0")) { DBG("lost U3-0, disposing control loops\n"); @@ -2090,7 +2091,7 @@ static int therm_pm72_detach(struct i2c_adapter *adapter) if (u3_0 == NULL && u3_1 == NULL) state = state_detached; - up(&driver_lock); + mutex_unlock(&driver_lock); return 0; } diff --git a/trunk/drivers/misc/kgdbts.c b/trunk/drivers/misc/kgdbts.c index fa394104339c..30a1af857c7a 100644 --- a/trunk/drivers/misc/kgdbts.c +++ b/trunk/drivers/misc/kgdbts.c @@ -47,7 +47,6 @@ * to test the HW NMI watchdog * F## = Break at do_fork for ## iterations * S## = Break at sys_open for ## iterations - * I## = Run the single step test ## iterations * * NOTE: that the do_fork and sys_open tests are mutually exclusive. * @@ -376,7 +375,7 @@ static void emul_sstep_get(char *arg) break; case 1: /* set breakpoint */ - break_helper("Z0", NULL, sstep_addr); + break_helper("Z0", 0, sstep_addr); break; case 2: /* Continue */ @@ -384,7 +383,7 @@ static void emul_sstep_get(char *arg) break; case 3: /* Clear breakpoint */ - break_helper("z0", NULL, sstep_addr); + break_helper("z0", 0, sstep_addr); break; default: eprintk("kgdbts: ERROR failed sstep get emulation\n"); @@ -466,11 +465,11 @@ static struct test_struct sw_breakpoint_test[] = { { "?", "S0*" }, /* Clear break points */ { "kgdbts_break_test", "OK", sw_break, }, /* set sw breakpoint */ { "c", "T0*", }, /* Continue */ - { "g", "kgdbts_break_test", NULL, check_and_rewind_pc }, + { "g", "kgdbts_break_test", 0, check_and_rewind_pc }, { "write", "OK", write_regs }, { "kgdbts_break_test", "OK", sw_rem_break }, /*remove breakpoint */ { "D", "OK" }, /* Detach */ - { "D", "OK", NULL, got_break }, /* On success we made it here */ + { "D", "OK", 0, got_break }, /* If the test worked we made it here */ { "", "" }, }; @@ -500,14 +499,14 @@ static struct test_struct singlestep_break_test[] = { { "?", "S0*" }, /* Clear break points */ { "kgdbts_break_test", "OK", sw_break, }, /* set sw breakpoint */ { "c", "T0*", }, /* Continue */ - { "g", "kgdbts_break_test", NULL, check_and_rewind_pc }, + { "g", "kgdbts_break_test", 0, check_and_rewind_pc }, { "write", "OK", write_regs }, /* Write registers */ { "kgdbts_break_test", "OK", sw_rem_break }, /*remove breakpoint */ { "s", "T0*", emul_sstep_get, emul_sstep_put }, /* Single step */ - { "g", "kgdbts_break_test", NULL, check_single_step }, + { "g", "kgdbts_break_test", 0, check_single_step }, { "kgdbts_break_test", "OK", sw_break, }, /* set sw breakpoint */ { "c", "T0*", }, /* Continue */ - { "g", "kgdbts_break_test", NULL, check_and_rewind_pc }, + { "g", "kgdbts_break_test", 0, check_and_rewind_pc }, { "write", "OK", write_regs }, /* Write registers */ { "D", "OK" }, /* Remove all breakpoints and continues */ { "", "" }, @@ -521,14 +520,14 @@ static struct test_struct do_fork_test[] = { { "?", "S0*" }, /* Clear break points */ { "do_fork", "OK", sw_break, }, /* set sw breakpoint */ { "c", "T0*", }, /* Continue */ - { "g", "do_fork", NULL, check_and_rewind_pc }, /* check location */ + { "g", "do_fork", 0, check_and_rewind_pc }, /* check location */ { "write", "OK", write_regs }, /* Write registers */ { "do_fork", "OK", sw_rem_break }, /*remove breakpoint */ { "s", "T0*", emul_sstep_get, emul_sstep_put }, /* Single step */ - { "g", "do_fork", NULL, check_single_step }, + { "g", "do_fork", 0, check_single_step }, { "do_fork", "OK", sw_break, }, /* set sw breakpoint */ { "7", "T0*", skip_back_repeat_test }, /* Loop based on repeat_test */ - { "D", "OK", NULL, final_ack_set }, /* detach and unregister I/O */ + { "D", "OK", 0, final_ack_set }, /* detach and unregister I/O */ { "", "" }, }; @@ -539,14 +538,14 @@ static struct test_struct sys_open_test[] = { { "?", "S0*" }, /* Clear break points */ { "sys_open", "OK", sw_break, }, /* set sw breakpoint */ { "c", "T0*", }, /* Continue */ - { "g", "sys_open", NULL, check_and_rewind_pc }, /* check location */ + { "g", "sys_open", 0, check_and_rewind_pc }, /* check location */ { "write", "OK", write_regs }, /* Write registers */ { "sys_open", "OK", sw_rem_break }, /*remove breakpoint */ { "s", "T0*", emul_sstep_get, emul_sstep_put }, /* Single step */ - { "g", "sys_open", NULL, check_single_step }, + { "g", "sys_open", 0, check_single_step }, { "sys_open", "OK", sw_break, }, /* set sw breakpoint */ { "7", "T0*", skip_back_repeat_test }, /* Loop based on repeat_test */ - { "D", "OK", NULL, final_ack_set }, /* detach and unregister I/O */ + { "D", "OK", 0, final_ack_set }, /* detach and unregister I/O */ { "", "" }, }; @@ -557,11 +556,11 @@ static struct test_struct hw_breakpoint_test[] = { { "?", "S0*" }, /* Clear break points */ { "kgdbts_break_test", "OK", hw_break, }, /* set hw breakpoint */ { "c", "T0*", }, /* Continue */ - { "g", "kgdbts_break_test", NULL, check_and_rewind_pc }, + { "g", "kgdbts_break_test", 0, check_and_rewind_pc }, { "write", "OK", write_regs }, { "kgdbts_break_test", "OK", hw_rem_break }, /*remove breakpoint */ { "D", "OK" }, /* Detach */ - { "D", "OK", NULL, got_break }, /* On success we made it here */ + { "D", "OK", 0, got_break }, /* If the test worked we made it here */ { "", "" }, }; @@ -571,12 +570,12 @@ static struct test_struct hw_breakpoint_test[] = { static struct test_struct hw_write_break_test[] = { { "?", "S0*" }, /* Clear break points */ { "hw_break_val", "OK", hw_write_break, }, /* set hw breakpoint */ - { "c", "T0*", NULL, got_break }, /* Continue */ - { "g", "silent", NULL, check_and_rewind_pc }, + { "c", "T0*", 0, got_break }, /* Continue */ + { "g", "silent", 0, check_and_rewind_pc }, { "write", "OK", write_regs }, { "hw_break_val", "OK", hw_rem_write_break }, /*remove breakpoint */ { "D", "OK" }, /* Detach */ - { "D", "OK", NULL, got_break }, /* On success we made it here */ + { "D", "OK", 0, got_break }, /* If the test worked we made it here */ { "", "" }, }; @@ -586,12 +585,12 @@ static struct test_struct hw_write_break_test[] = { static struct test_struct hw_access_break_test[] = { { "?", "S0*" }, /* Clear break points */ { "hw_break_val", "OK", hw_access_break, }, /* set hw breakpoint */ - { "c", "T0*", NULL, got_break }, /* Continue */ - { "g", "silent", NULL, check_and_rewind_pc }, + { "c", "T0*", 0, got_break }, /* Continue */ + { "g", "silent", 0, check_and_rewind_pc }, { "write", "OK", write_regs }, { "hw_break_val", "OK", hw_rem_access_break }, /*remove breakpoint */ { "D", "OK" }, /* Detach */ - { "D", "OK", NULL, got_break }, /* On success we made it here */ + { "D", "OK", 0, got_break }, /* If the test worked we made it here */ { "", "" }, }; @@ -600,9 +599,9 @@ static struct test_struct hw_access_break_test[] = { */ static struct test_struct nmi_sleep_test[] = { { "?", "S0*" }, /* Clear break points */ - { "c", "T0*", NULL, got_break }, /* Continue */ + { "c", "T0*", 0, got_break }, /* Continue */ { "D", "OK" }, /* Detach */ - { "D", "OK", NULL, got_break }, /* On success we made it here */ + { "D", "OK", 0, got_break }, /* If the test worked we made it here */ { "", "" }, }; @@ -875,23 +874,18 @@ static void kgdbts_run_tests(void) { char *ptr; int fork_test = 0; - int do_sys_open_test = 0; - int sstep_test = 1000; + int sys_open_test = 0; int nmi_sleep = 0; - int i; ptr = strstr(config, "F"); if (ptr) - fork_test = simple_strtol(ptr + 1, NULL, 10); + fork_test = simple_strtol(ptr+1, NULL, 10); ptr = strstr(config, "S"); if (ptr) - do_sys_open_test = simple_strtol(ptr + 1, NULL, 10); + sys_open_test = simple_strtol(ptr+1, NULL, 10); ptr = strstr(config, "N"); if (ptr) nmi_sleep = simple_strtol(ptr+1, NULL, 10); - ptr = strstr(config, "I"); - if (ptr) - sstep_test = simple_strtol(ptr+1, NULL, 10); /* required internal KGDB tests */ v1printk("kgdbts:RUN plant and detach test\n"); @@ -900,13 +894,8 @@ static void kgdbts_run_tests(void) run_breakpoint_test(0); v1printk("kgdbts:RUN bad memory access test\n"); run_bad_read_test(); - v1printk("kgdbts:RUN singlestep test %i iterations\n", sstep_test); - for (i = 0; i < sstep_test; i++) { - run_singlestep_break_test(); - if (i % 100 == 0) - v1printk("kgdbts:RUN singlestep [%i/%i]\n", - i, sstep_test); - } + v1printk("kgdbts:RUN singlestep breakpoint test\n"); + run_singlestep_break_test(); /* ===Optional tests=== */ @@ -933,7 +922,7 @@ static void kgdbts_run_tests(void) repeat_test = fork_test; printk(KERN_INFO "kgdbts:RUN do_fork for %i breakpoints\n", repeat_test); - kthread_run(kgdbts_unreg_thread, NULL, "kgdbts_unreg"); + kthread_run(kgdbts_unreg_thread, 0, "kgdbts_unreg"); run_do_fork_test(); return; } @@ -942,11 +931,11 @@ static void kgdbts_run_tests(void) * executed because a kernel thread will be spawned at the very * end to unregister the debug hooks. */ - if (do_sys_open_test) { - repeat_test = do_sys_open_test; + if (sys_open_test) { + repeat_test = sys_open_test; printk(KERN_INFO "kgdbts:RUN sys_open for %i breakpoints\n", repeat_test); - kthread_run(kgdbts_unreg_thread, NULL, "kgdbts_unreg"); + kthread_run(kgdbts_unreg_thread, 0, "kgdbts_unreg"); run_sys_open_test(); return; } diff --git a/trunk/drivers/pci/probe.c b/trunk/drivers/pci/probe.c index 3706ce7972dd..4a55bf380957 100644 --- a/trunk/drivers/pci/probe.c +++ b/trunk/drivers/pci/probe.c @@ -842,26 +842,14 @@ static void set_pcie_port_type(struct pci_dev *pdev) * reading the dword at 0x100 which must either be 0 or a valid extended * capability header. */ -int pci_cfg_space_size_ext(struct pci_dev *dev) -{ - u32 status; - - if (pci_read_config_dword(dev, 256, &status) != PCIBIOS_SUCCESSFUL) - goto fail; - if (status == 0xffffffff) - goto fail; - - return PCI_CFG_SPACE_EXP_SIZE; - - fail: - return PCI_CFG_SPACE_SIZE; -} - -int pci_cfg_space_size(struct pci_dev *dev) +int pci_cfg_space_size_ext(struct pci_dev *dev, unsigned check_exp_pcix) { int pos; u32 status; + if (!check_exp_pcix) + goto skip; + pos = pci_find_capability(dev, PCI_CAP_ID_EXP); if (!pos) { pos = pci_find_capability(dev, PCI_CAP_ID_PCIX); @@ -873,12 +861,23 @@ int pci_cfg_space_size(struct pci_dev *dev) goto fail; } - return pci_cfg_space_size_ext(dev); + skip: + if (pci_read_config_dword(dev, 256, &status) != PCIBIOS_SUCCESSFUL) + goto fail; + if (status == 0xffffffff) + goto fail; + + return PCI_CFG_SPACE_EXP_SIZE; fail: return PCI_CFG_SPACE_SIZE; } +int pci_cfg_space_size(struct pci_dev *dev) +{ + return pci_cfg_space_size_ext(dev, 1); +} + static void pci_release_bus_bridge_dev(struct device *dev) { kfree(dev); diff --git a/trunk/drivers/scsi/Kconfig b/trunk/drivers/scsi/Kconfig index 81ccbd7f9e34..46d7e400c8be 100644 --- a/trunk/drivers/scsi/Kconfig +++ b/trunk/drivers/scsi/Kconfig @@ -1679,7 +1679,6 @@ config MAC_SCSI config SCSI_MAC_ESP tristate "Macintosh NCR53c9[46] SCSI" depends on MAC && SCSI - select SCSI_SPI_ATTRS help This is the NCR 53c9x SCSI controller found on most of the 68040 based Macintoshes. diff --git a/trunk/include/asm-m68k/machw.h b/trunk/include/asm-m68k/machw.h index 35624998291c..d2e0e25d5c90 100644 --- a/trunk/include/asm-m68k/machw.h +++ b/trunk/include/asm-m68k/machw.h @@ -66,6 +66,36 @@ struct MAC_SCC # define mac_scc ((*(volatile struct SCC*)MAC_SCC_BAS)) #endif +/* hardware stuff */ + +#define MACHW_DECLARE(name) unsigned name : 1 +#define MACHW_SET(name) (mac_hw_present.name = 1) +#define MACHW_PRESENT(name) (mac_hw_present.name) + +struct mac_hw_present { + /* video hardware */ + /* sound hardware */ + /* disk storage interfaces */ + MACHW_DECLARE(MAC_SCSI_80); /* Directly mapped NCR5380 */ + MACHW_DECLARE(MAC_SCSI_96); /* 53c9[46] */ + MACHW_DECLARE(MAC_SCSI_96_2); /* 2nd 53c9[46] Q900 and Q950 */ + MACHW_DECLARE(IDE); /* IDE Interface */ + /* other I/O hardware */ + MACHW_DECLARE(SCC); /* Serial Communications Contr. */ + /* DMA */ + MACHW_DECLARE(SCSI_DMA); /* DMA for the NCR5380 */ + /* real time clocks */ + MACHW_DECLARE(RTC_CLK); /* clock chip */ + /* supporting hardware */ + MACHW_DECLARE(VIA1); /* Versatile Interface Ad. 1 */ + MACHW_DECLARE(VIA2); /* Versatile Interface Ad. 2 */ + MACHW_DECLARE(RBV); /* Versatile Interface Ad. 2+ */ + /* NUBUS */ + MACHW_DECLARE(NUBUS); /* NUBUS */ +}; + +extern struct mac_hw_present mac_hw_present; + #endif /* __ASSEMBLY__ */ #endif /* linux/machw.h */ diff --git a/trunk/include/linux/kgdb.h b/trunk/include/linux/kgdb.h index 6adcc297e354..9757b1a6d9dc 100644 --- a/trunk/include/linux/kgdb.h +++ b/trunk/include/linux/kgdb.h @@ -261,12 +261,10 @@ struct kgdb_io { extern struct kgdb_arch arch_kgdb_ops; -extern unsigned long __weak kgdb_arch_pc(int exception, struct pt_regs *regs); - extern int kgdb_register_io_module(struct kgdb_io *local_kgdb_io_ops); extern void kgdb_unregister_io_module(struct kgdb_io *local_kgdb_io_ops); -extern int kgdb_hex2long(char **ptr, unsigned long *long_val); +extern int kgdb_hex2long(char **ptr, long *long_val); extern int kgdb_mem2hex(char *mem, char *buf, int count); extern int kgdb_hex2mem(char *buf, char *mem, int count); diff --git a/trunk/include/linux/pci.h b/trunk/include/linux/pci.h index 509159bcd4e7..96acd0dae241 100644 --- a/trunk/include/linux/pci.h +++ b/trunk/include/linux/pci.h @@ -44,7 +44,6 @@ #include #include -#include #include #include #include @@ -475,7 +474,7 @@ extern struct pci_bus *pci_find_bus(int domain, int busnr); void pci_bus_add_devices(struct pci_bus *bus); struct pci_bus *pci_scan_bus_parented(struct device *parent, int bus, struct pci_ops *ops, void *sysdata); -static inline struct pci_bus * __devinit pci_scan_bus(int bus, struct pci_ops *ops, +static inline struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops, void *sysdata) { struct pci_bus *root_bus; @@ -667,7 +666,7 @@ int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, void pci_walk_bus(struct pci_bus *top, void (*cb)(struct pci_dev *, void *), void *userdata); -int pci_cfg_space_size_ext(struct pci_dev *dev); +int pci_cfg_space_size_ext(struct pci_dev *dev, unsigned check_exp_pcix); int pci_cfg_space_size(struct pci_dev *dev); unsigned char pci_bus_max_busnr(struct pci_bus *bus); diff --git a/trunk/kernel/futex.c b/trunk/kernel/futex.c index 449def8074fe..98092c9817f4 100644 --- a/trunk/kernel/futex.c +++ b/trunk/kernel/futex.c @@ -104,6 +104,10 @@ struct futex_q { /* Key which the futex is hashed on: */ union futex_key key; + /* For fd, sigio sent using these: */ + int fd; + struct file *filp; + /* Optional priority inheritance state: */ struct futex_pi_state *pi_state; struct task_struct *task; @@ -122,6 +126,9 @@ struct futex_hash_bucket { static struct futex_hash_bucket futex_queues[1<mmap_sem, when futex is shared */ @@ -603,6 +610,8 @@ lookup_pi_state(u32 uval, struct futex_hash_bucket *hb, static void wake_futex(struct futex_q *q) { plist_del(&q->list, &q->list.plist); + if (q->filp) + send_sigio(&q->filp->f_owner, q->fd, POLL_IN); /* * The lock in wake_up_all() is a crucial memory barrier after the * plist_del() and also before assigning to q->lock_ptr. @@ -979,10 +988,14 @@ static int futex_requeue(u32 __user *uaddr1, struct rw_semaphore *fshared, } /* The key must be already stored in q->key. */ -static inline struct futex_hash_bucket *queue_lock(struct futex_q *q) +static inline struct futex_hash_bucket * +queue_lock(struct futex_q *q, int fd, struct file *filp) { struct futex_hash_bucket *hb; + q->fd = fd; + q->filp = filp; + init_waitqueue_head(&q->waiters); get_futex_key_refs(&q->key); @@ -993,7 +1006,7 @@ static inline struct futex_hash_bucket *queue_lock(struct futex_q *q) return hb; } -static inline void queue_me(struct futex_q *q, struct futex_hash_bucket *hb) +static inline void __queue_me(struct futex_q *q, struct futex_hash_bucket *hb) { int prio; @@ -1028,6 +1041,15 @@ queue_unlock(struct futex_q *q, struct futex_hash_bucket *hb) * exactly once. They are called with the hashed spinlock held. */ +/* The key must be already stored in q->key. */ +static void queue_me(struct futex_q *q, int fd, struct file *filp) +{ + struct futex_hash_bucket *hb; + + hb = queue_lock(q, fd, filp); + __queue_me(q, hb); +} + /* Return 1 if we were still queued (ie. 0 means we were woken) */ static int unqueue_me(struct futex_q *q) { @@ -1172,7 +1194,7 @@ static int futex_wait(u32 __user *uaddr, struct rw_semaphore *fshared, if (unlikely(ret != 0)) goto out_release_sem; - hb = queue_lock(&q); + hb = queue_lock(&q, -1, NULL); /* * Access the page AFTER the futex is queued. @@ -1216,7 +1238,7 @@ static int futex_wait(u32 __user *uaddr, struct rw_semaphore *fshared, goto out_unlock_release_sem; /* Only actually queue if *uaddr contained val. */ - queue_me(&q, hb); + __queue_me(&q, hb); /* * Now the futex is queued and we have checked the data, we @@ -1364,7 +1386,7 @@ static int futex_lock_pi(u32 __user *uaddr, struct rw_semaphore *fshared, goto out_release_sem; retry_unlocked: - hb = queue_lock(&q); + hb = queue_lock(&q, -1, NULL); retry_locked: ret = lock_taken = 0; @@ -1477,7 +1499,7 @@ static int futex_lock_pi(u32 __user *uaddr, struct rw_semaphore *fshared, /* * Only actually queue now that the atomic ops are done: */ - queue_me(&q, hb); + __queue_me(&q, hb); /* * Now the futex is queued and we have checked the data, we @@ -1724,6 +1746,121 @@ static int futex_unlock_pi(u32 __user *uaddr, struct rw_semaphore *fshared) return ret; } +static int futex_close(struct inode *inode, struct file *filp) +{ + struct futex_q *q = filp->private_data; + + unqueue_me(q); + kfree(q); + + return 0; +} + +/* This is one-shot: once it's gone off you need a new fd */ +static unsigned int futex_poll(struct file *filp, + struct poll_table_struct *wait) +{ + struct futex_q *q = filp->private_data; + int ret = 0; + + poll_wait(filp, &q->waiters, wait); + + /* + * plist_node_empty() is safe here without any lock. + * q->lock_ptr != 0 is not safe, because of ordering against wakeup. + */ + if (plist_node_empty(&q->list)) + ret = POLLIN | POLLRDNORM; + + return ret; +} + +static const struct file_operations futex_fops = { + .release = futex_close, + .poll = futex_poll, +}; + +/* + * Signal allows caller to avoid the race which would occur if they + * set the sigio stuff up afterwards. + */ +static int futex_fd(u32 __user *uaddr, int signal) +{ + struct futex_q *q; + struct file *filp; + int ret, err; + struct rw_semaphore *fshared; + static unsigned long printk_interval; + + if (printk_timed_ratelimit(&printk_interval, 60 * 60 * 1000)) { + printk(KERN_WARNING "Process `%s' used FUTEX_FD, which " + "will be removed from the kernel in June 2007\n", + current->comm); + } + + ret = -EINVAL; + if (!valid_signal(signal)) + goto out; + + ret = get_unused_fd(); + if (ret < 0) + goto out; + filp = get_empty_filp(); + if (!filp) { + put_unused_fd(ret); + ret = -ENFILE; + goto out; + } + filp->f_op = &futex_fops; + filp->f_path.mnt = mntget(futex_mnt); + filp->f_path.dentry = dget(futex_mnt->mnt_root); + filp->f_mapping = filp->f_path.dentry->d_inode->i_mapping; + + if (signal) { + err = __f_setown(filp, task_pid(current), PIDTYPE_PID, 1); + if (err < 0) { + goto error; + } + filp->f_owner.signum = signal; + } + + q = kmalloc(sizeof(*q), GFP_KERNEL); + if (!q) { + err = -ENOMEM; + goto error; + } + q->pi_state = NULL; + + fshared = ¤t->mm->mmap_sem; + down_read(fshared); + err = get_futex_key(uaddr, fshared, &q->key); + + if (unlikely(err != 0)) { + up_read(fshared); + kfree(q); + goto error; + } + + /* + * queue_me() must be called before releasing mmap_sem, because + * key->shared.inode needs to be referenced while holding it. + */ + filp->private_data = q; + + queue_me(q, ret, filp); + up_read(fshared); + + /* Now we map fd to filp, so userspace can access it */ + fd_install(ret, filp); +out: + return ret; +error: + put_unused_fd(ret); + put_filp(filp); + ret = err; + goto out; +} + /* * Support for robust futexes: the kernel cleans up held futexes at * thread exit time. @@ -1955,6 +2092,10 @@ long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout, case FUTEX_WAKE_BITSET: ret = futex_wake(uaddr, fshared, val, val3); break; + case FUTEX_FD: + /* non-zero val means F_SETOWN(getpid()) & F_SETSIG(val) */ + ret = futex_fd(uaddr, val); + break; case FUTEX_REQUEUE: ret = futex_requeue(uaddr, fshared, uaddr2, val, val2, NULL); break; @@ -2015,6 +2156,19 @@ asmlinkage long sys_futex(u32 __user *uaddr, int op, u32 val, return do_futex(uaddr, op, val, tp, uaddr2, val2, val3); } +static int futexfs_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data, + struct vfsmount *mnt) +{ + return get_sb_pseudo(fs_type, "futex", NULL, FUTEXFS_SUPER_MAGIC, mnt); +} + +static struct file_system_type futex_fs_type = { + .name = "futexfs", + .get_sb = futexfs_get_sb, + .kill_sb = kill_anon_super, +}; + static int __init futex_init(void) { u32 curval; @@ -2039,6 +2193,16 @@ static int __init futex_init(void) spin_lock_init(&futex_queues[i].lock); } + i = register_filesystem(&futex_fs_type); + if (i) + return i; + + futex_mnt = kern_mount(&futex_fs_type); + if (IS_ERR(futex_mnt)) { + unregister_filesystem(&futex_fs_type); + return PTR_ERR(futex_mnt); + } + return 0; } __initcall(futex_init); diff --git a/trunk/kernel/kgdb.c b/trunk/kernel/kgdb.c index 39e31a036f5b..1bd0ec1c80b2 100644 --- a/trunk/kernel/kgdb.c +++ b/trunk/kernel/kgdb.c @@ -61,7 +61,7 @@ struct kgdb_state { int err_code; int cpu; int pass_exception; - unsigned long threadid; + long threadid; long kgdb_usethreadid; struct pt_regs *linux_regs; }; @@ -146,7 +146,7 @@ atomic_t kgdb_cpu_doing_single_step = ATOMIC_INIT(-1); * the other CPUs might interfere with your debugging context, so * use this with care: */ -static int kgdb_do_roundup = 1; +int kgdb_do_roundup = 1; static int __init opt_nokgdbroundup(char *str) { @@ -438,7 +438,7 @@ int kgdb_hex2mem(char *buf, char *mem, int count) * While we find nice hex chars, build a long_val. * Return number of chars processed. */ -int kgdb_hex2long(char **ptr, unsigned long *long_val) +int kgdb_hex2long(char **ptr, long *long_val) { int hex_val; int num = 0; @@ -709,7 +709,7 @@ int kgdb_isremovedbreak(unsigned long addr) return 0; } -static int remove_all_break(void) +int remove_all_break(void) { unsigned long addr; int error; diff --git a/trunk/lib/Kconfig.kgdb b/trunk/lib/Kconfig.kgdb index a5d4b1dac2a5..f2e01ac5ab09 100644 --- a/trunk/lib/Kconfig.kgdb +++ b/trunk/lib/Kconfig.kgdb @@ -1,10 +1,4 @@ -config HAVE_ARCH_KGDB_SHADOW_INFO - bool - -config HAVE_ARCH_KGDB - bool - menuconfig KGDB bool "KGDB: kernel debugging with remote gdb" select FRAME_POINTER @@ -16,10 +10,15 @@ menuconfig KGDB at http://kgdb.sourceforge.net as well as in DocBook form in Documentation/DocBook/. If unsure, say N. -if KGDB +config HAVE_ARCH_KGDB_SHADOW_INFO + bool + +config HAVE_ARCH_KGDB + bool config KGDB_SERIAL_CONSOLE tristate "KGDB: use kgdb over the serial console" + depends on KGDB select CONSOLE_POLL select MAGIC_SYSRQ default y @@ -29,6 +28,7 @@ config KGDB_SERIAL_CONSOLE config KGDB_TESTS bool "KGDB: internal test suite" + depends on KGDB default n help This is a kgdb I/O module specifically designed to test @@ -56,5 +56,3 @@ config KGDB_TESTS_BOOT_STRING boot. See the drivers/misc/kgdbts.c for detailed information about other strings you could use beyond the default of V1F100. - -endif # KGDB diff --git a/trunk/sound/drivers/pcsp/pcsp.c b/trunk/sound/drivers/pcsp/pcsp.c index 54a1f9036c66..59203511e77d 100644 --- a/trunk/sound/drivers/pcsp/pcsp.c +++ b/trunk/sound/drivers/pcsp/pcsp.c @@ -194,7 +194,6 @@ static void pcsp_stop_beep(struct snd_pcsp *chip) spin_unlock_irq(&chip->substream_lock); } -#ifdef CONFIG_PM static int pcsp_suspend(struct platform_device *dev, pm_message_t state) { struct snd_pcsp *chip = platform_get_drvdata(dev); @@ -202,9 +201,6 @@ static int pcsp_suspend(struct platform_device *dev, pm_message_t state) snd_pcm_suspend_all(chip->pcm); return 0; } -#else -#define pcsp_suspend NULL -#endif /* CONFIG_PM */ static void pcsp_shutdown(struct platform_device *dev) { diff --git a/trunk/sound/pci/Kconfig b/trunk/sound/pci/Kconfig index 7e4742109572..581debf37dcb 100644 --- a/trunk/sound/pci/Kconfig +++ b/trunk/sound/pci/Kconfig @@ -515,16 +515,19 @@ config SND_FM801 config SND_FM801_TEA575X_BOOL bool "ForteMedia FM801 + TEA5757 tuner" depends on SND_FM801 - depends on VIDEO_V4L1=y || VIDEO_V4L1=SND_FM801 help Say Y here to include support for soundcards based on the ForteMedia FM801 chip with a TEA5757 tuner connected to GPIO1-3 pins (Media Forte SF256-PCS-02) into the snd-fm801 driver. + This will enable support for the old V4L1 API. + config SND_FM801_TEA575X tristate depends on SND_FM801_TEA575X_BOOL default SND_FM801 + select VIDEO_V4L1 + select VIDEO_DEV config SND_HDA_INTEL tristate "Intel HD Audio" diff --git a/trunk/sound/pci/ac97/ac97_patch.c b/trunk/sound/pci/ac97/ac97_patch.c index 2da89810ca10..39198e505b12 100644 --- a/trunk/sound/pci/ac97/ac97_patch.c +++ b/trunk/sound/pci/ac97/ac97_patch.c @@ -3446,7 +3446,6 @@ static const struct snd_kcontrol_new snd_ac97_controls_vt1617a[] = { int patch_vt1617a(struct snd_ac97 * ac97) { int err = 0; - int val; /* we choose to not fail out at this point, but we tell the caller when we return */ @@ -3457,13 +3456,7 @@ int patch_vt1617a(struct snd_ac97 * ac97) /* bring analog power consumption to normal by turning off the * headphone amplifier, like WinXP driver for EPIA SP */ - /* We need to check the bit before writing it. - * On some (many?) hardwares, setting bit actually clears it! - */ - val = snd_ac97_read(ac97, 0x5c); - if (!(val & 0x20)) - snd_ac97_write_cache(ac97, 0x5c, 0x20); - + snd_ac97_write_cache(ac97, 0x5c, 0x20); ac97->ext_id |= AC97_EI_SPDIF; /* force the detection of spdif */ ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000; ac97->build_ops = &patch_vt1616_ops; diff --git a/trunk/sound/pci/hda/patch_realtek.c b/trunk/sound/pci/hda/patch_realtek.c index 6d4df45e81e0..d9783a4263e0 100644 --- a/trunk/sound/pci/hda/patch_realtek.c +++ b/trunk/sound/pci/hda/patch_realtek.c @@ -11902,10 +11902,7 @@ static void alc861_auto_set_output_and_unmute(struct hda_codec *codec, hda_nid_t nid, int pin_type, int dac_idx) { - snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, - pin_type); - snd_hda_codec_write(codec, dac_idx, 0, AC_VERB_SET_AMP_GAIN_MUTE, - AMP_OUT_UNMUTE); + alc_set_pin_output(codec, nid, pin_type); } static void alc861_auto_init_multi_out(struct hda_codec *codec) diff --git a/trunk/sound/pci/hda/patch_sigmatel.c b/trunk/sound/pci/hda/patch_sigmatel.c index 393f7fd2b1be..b3a15d616873 100644 --- a/trunk/sound/pci/hda/patch_sigmatel.c +++ b/trunk/sound/pci/hda/patch_sigmatel.c @@ -4289,8 +4289,6 @@ struct hda_codec_preset snd_hda_preset_sigmatel[] = { { .id = 0x83847635, .name = "STAC9250D", .patch = patch_stac925x }, { .id = 0x83847636, .name = "STAC9251", .patch = patch_stac925x }, { .id = 0x83847637, .name = "STAC9250D", .patch = patch_stac925x }, - { .id = 0x83847645, .name = "92HD206X", .patch = patch_stac927x }, - { .id = 0x83847646, .name = "92HD206D", .patch = patch_stac927x }, /* The following does not take into account .id=0x83847661 when subsys = * 104D0C00 which is STAC9225s. Because of this, some SZ Notebooks are * currently not fully supported. diff --git a/trunk/sound/soc/s3c24xx/s3c24xx-i2s.c b/trunk/sound/soc/s3c24xx/s3c24xx-i2s.c index 1ed6afd45459..4ebcd6a8bf28 100644 --- a/trunk/sound/soc/s3c24xx/s3c24xx-i2s.c +++ b/trunk/sound/soc/s3c24xx/s3c24xx-i2s.c @@ -224,7 +224,6 @@ static int s3c24xx_i2s_set_fmt(struct snd_soc_cpu_dai *cpu_dai, iismod |= S3C2410_IISMOD_SLAVE; break; case SND_SOC_DAIFMT_CBS_CFS: - iismod &= ~S3C2410_IISMOD_SLAVE; break; default: return -EINVAL; @@ -235,7 +234,6 @@ static int s3c24xx_i2s_set_fmt(struct snd_soc_cpu_dai *cpu_dai, iismod |= S3C2410_IISMOD_MSB; break; case SND_SOC_DAIFMT_I2S: - iismod &= ~S3C2410_IISMOD_MSB; break; default: return -EINVAL; diff --git a/trunk/sound/soc/s3c24xx/s3c24xx-pcm.c b/trunk/sound/soc/s3c24xx/s3c24xx-pcm.c index 7806ae614617..6c70a81c730c 100644 --- a/trunk/sound/soc/s3c24xx/s3c24xx-pcm.c +++ b/trunk/sound/soc/s3c24xx/s3c24xx-pcm.c @@ -171,7 +171,7 @@ static int s3c24xx_pcm_hw_params(struct snd_pcm_substream *substream, ret = s3c2410_dma_request(prtd->params->channel, prtd->params->client, NULL); - if (ret < 0) { + if (ret) { DBG(KERN_ERR "failed to get dma channel\n"); return ret; }