From 20da3b3ea9a87168abcf729b10dda021ab892f60 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Mon, 22 Sep 2008 18:46:37 +0200 Subject: [PATCH] --- yaml --- r: 109975 b: refs/heads/master c: 6441402b1f173fa38e561d3cee7c01c32e5281ad h: refs/heads/master i: 109973: 25a46e5bc4772808f0e7e13e8380a7004bb32bd6 109971: fdcda33ec92a044b7b85a3e60004a43279489a6c 109967: 6603599fd9d2ed3234bc59e4f2251fa4d8ba5b21 v: v3 --- [refs] | 2 +- trunk/Documentation/DMA-mapping.txt | 2 +- trunk/Documentation/sysctl/kernel.txt | 7 ++-- trunk/MAINTAINERS | 3 +- trunk/arch/ia64/kernel/efi.c | 5 ++- trunk/arch/ia64/kernel/setup.c | 2 -- trunk/arch/sparc64/kernel/of_device.c | 9 +++--- trunk/arch/sparc64/kernel/pci.c | 2 +- trunk/arch/x86/kernel/amd_iommu.c | 22 ++++--------- trunk/arch/x86/kernel/vsmp_64.c | 2 +- trunk/arch/x86/oprofile/nmi_int.c | 4 +-- trunk/drivers/input/mouse/bcm5974.c | 13 +++----- .../drivers/input/touchscreen/jornada720_ts.c | 4 +-- trunk/drivers/net/wireless/ath9k/core.c | 4 +-- trunk/drivers/net/wireless/ath9k/core.h | 1 + trunk/drivers/net/wireless/ath9k/main.c | 12 +++---- trunk/drivers/net/wireless/ath9k/xmit.c | 6 ++-- trunk/drivers/net/wireless/zd1211rw/zd_usb.c | 1 - trunk/drivers/pci/pcie/aspm.c | 2 +- trunk/drivers/pci/search.c | 6 ++-- trunk/drivers/pcmcia/ds.c | 23 ++++++------- trunk/drivers/serial/atmel_serial.c | 32 ++++++++----------- trunk/drivers/watchdog/geodewdt.c | 6 ++-- trunk/drivers/watchdog/ibmasr.c | 1 + trunk/drivers/watchdog/pnx4008_wdt.c | 4 +-- trunk/drivers/watchdog/rc32434_wdt.c | 6 ++-- trunk/drivers/watchdog/rdc321x_wdt.c | 6 ++-- trunk/drivers/watchdog/wdt285.c | 15 ++++----- trunk/include/linux/pci.h | 8 ++--- trunk/include/linux/smb.h | 2 -- trunk/kernel/kexec.c | 8 +---- trunk/kernel/sched.c | 2 +- trunk/kernel/time/tick-common.c | 7 ++-- trunk/kernel/time/tick-internal.h | 4 +++ trunk/kernel/time/tick-sched.c | 8 ++--- trunk/mm/memcontrol.c | 1 - trunk/mm/tiny-shmem.c | 24 ++++++++------ trunk/net/core/dev.c | 6 ++-- trunk/net/socket.c | 2 -- trunk/scripts/kernel-doc | 4 --- trunk/sound/soc/at32/at32-pcm.c | 5 ++- 41 files changed, 120 insertions(+), 163 deletions(-) diff --git a/[refs] b/[refs] index 8593f9cad8ed..41a0d515440e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: be3be8905854d2fcf6030f1da9ebc221e9e2c5f1 +refs/heads/master: 6441402b1f173fa38e561d3cee7c01c32e5281ad diff --git a/trunk/Documentation/DMA-mapping.txt b/trunk/Documentation/DMA-mapping.txt index c74fec8c2351..b463ecd0c7ce 100644 --- a/trunk/Documentation/DMA-mapping.txt +++ b/trunk/Documentation/DMA-mapping.txt @@ -740,7 +740,7 @@ failure can be determined by: dma_addr_t dma_handle; dma_handle = pci_map_single(pdev, addr, size, direction); - if (pci_dma_mapping_error(pdev, dma_handle)) { + if (pci_dma_mapping_error(dma_handle)) { /* * reduce current DMA mapping usage, * delay and try again later or diff --git a/trunk/Documentation/sysctl/kernel.txt b/trunk/Documentation/sysctl/kernel.txt index e1ff0d920a5c..276a7e637822 100644 --- a/trunk/Documentation/sysctl/kernel.txt +++ b/trunk/Documentation/sysctl/kernel.txt @@ -351,10 +351,9 @@ kernel. This value defaults to SHMMAX. softlockup_thresh: -This value can be used to lower the softlockup tolerance threshold. The -default threshold is 60 seconds. If a cpu is locked up for 60 seconds, -the kernel complains. Valid values are 1-60 seconds. Setting this -tunable to zero will disable the softlockup detection altogether. +This value can be used to lower the softlockup tolerance +threshold. The default threshold is 10s. If a cpu is locked up +for 10s, the kernel complains. Valid values are 1-60s. ============================================================== diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index 42ebbfdc350b..cad81a24e832 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -3833,12 +3833,11 @@ S: Maintained SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEMENT P: Liam Girdwood -M: lrg@slimlogic.co.uk +M: liam.girdwood@wolfsonmicro.com P: Mark Brown M: broonie@opensource.wolfsonmicro.com T: git opensource.wolfsonmicro.com/linux-2.6-asoc L: alsa-devel@alsa-project.org (subscribers-only) -W: http://alsa-project.org/main/index.php/ASoC S: Supported SPI SUBSYSTEM diff --git a/trunk/arch/ia64/kernel/efi.c b/trunk/arch/ia64/kernel/efi.c index 51b75cea7018..d45f215bc8fc 100644 --- a/trunk/arch/ia64/kernel/efi.c +++ b/trunk/arch/ia64/kernel/efi.c @@ -1232,10 +1232,9 @@ efi_initialize_iomem_resources(struct resource *code_resource, if (md->attribute & EFI_MEMORY_WP) { name = "System ROM"; flags |= IORESOURCE_READONLY; - } else if (md->attribute == EFI_MEMORY_UC) - name = "Uncached RAM"; - else + } else { name = "System RAM"; + } break; case EFI_ACPI_MEMORY_NVS: diff --git a/trunk/arch/ia64/kernel/setup.c b/trunk/arch/ia64/kernel/setup.c index de636b215677..c27d5b2c182b 100644 --- a/trunk/arch/ia64/kernel/setup.c +++ b/trunk/arch/ia64/kernel/setup.c @@ -616,9 +616,7 @@ setup_arch (char **cmdline_p) ia64_mca_init(); platform_setup(cmdline_p); -#ifndef CONFIG_IA64_HP_SIM check_sal_cache_flush(); -#endif paging_init(); } diff --git a/trunk/arch/sparc64/kernel/of_device.c b/trunk/arch/sparc64/kernel/of_device.c index 100ebd527499..f845f150f565 100644 --- a/trunk/arch/sparc64/kernel/of_device.c +++ b/trunk/arch/sparc64/kernel/of_device.c @@ -169,7 +169,7 @@ static unsigned long of_bus_default_get_flags(const u32 *addr, unsigned long fla static int of_bus_pci_match(struct device_node *np) { - if (!strcmp(np->name, "pci")) { + if (!strcmp(np->type, "pci") || !strcmp(np->type, "pciex")) { const char *model = of_get_property(np, "model", NULL); if (model && !strcmp(model, "SUNW,simba")) @@ -200,7 +200,7 @@ static int of_bus_simba_match(struct device_node *np) /* Treat PCI busses lacking ranges property just like * simba. */ - if (!strcmp(np->name, "pci")) { + if (!strcmp(np->type, "pci") || !strcmp(np->type, "pciex")) { if (!of_find_property(np, "ranges", NULL)) return 1; } @@ -429,7 +429,7 @@ static int __init use_1to1_mapping(struct device_node *pp) * it lacks a ranges property, and this will include * cases like Simba. */ - if (!strcmp(pp->name, "pci")) + if (!strcmp(pp->type, "pci") || !strcmp(pp->type, "pciex")) return 0; return 1; @@ -714,7 +714,8 @@ static unsigned int __init build_one_device_irq(struct of_device *op, break; } } else { - if (!strcmp(pp->name, "pci")) { + if (!strcmp(pp->type, "pci") || + !strcmp(pp->type, "pciex")) { unsigned int this_orig_irq = irq; irq = pci_irq_swizzle(dp, pp, irq); diff --git a/trunk/arch/sparc64/kernel/pci.c b/trunk/arch/sparc64/kernel/pci.c index 80dad76f8b81..55096195458f 100644 --- a/trunk/arch/sparc64/kernel/pci.c +++ b/trunk/arch/sparc64/kernel/pci.c @@ -425,7 +425,7 @@ struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm, dev->current_state = 4; /* unknown power state */ dev->error_state = pci_channel_io_normal; - if (!strcmp(node->name, "pci")) { + if (!strcmp(type, "pci") || !strcmp(type, "pciex")) { /* a PCI-PCI bridge */ dev->hdr_type = PCI_HEADER_TYPE_BRIDGE; dev->rom_base_reg = PCI_ROM_ADDRESS1; diff --git a/trunk/arch/x86/kernel/amd_iommu.c b/trunk/arch/x86/kernel/amd_iommu.c index 042fdc27bc92..69b4d060b21c 100644 --- a/trunk/arch/x86/kernel/amd_iommu.c +++ b/trunk/arch/x86/kernel/amd_iommu.c @@ -101,10 +101,10 @@ static int iommu_queue_command(struct amd_iommu *iommu, struct iommu_cmd *cmd) */ static int iommu_completion_wait(struct amd_iommu *iommu) { - int ret = 0, ready = 0; + int ret, ready = 0; unsigned status = 0; struct iommu_cmd cmd; - unsigned long flags, i = 0; + unsigned long i = 0; memset(&cmd, 0, sizeof(cmd)); cmd.data[0] = CMD_COMPL_WAIT_INT_MASK; @@ -112,12 +112,10 @@ static int iommu_completion_wait(struct amd_iommu *iommu) iommu->need_sync = 0; - spin_lock_irqsave(&iommu->lock, flags); - - ret = __iommu_queue_command(iommu, &cmd); + ret = iommu_queue_command(iommu, &cmd); if (ret) - goto out; + return ret; while (!ready && (i < EXIT_LOOP_COUNT)) { ++i; @@ -132,8 +130,6 @@ static int iommu_completion_wait(struct amd_iommu *iommu) if (unlikely((i == EXIT_LOOP_COUNT) && printk_ratelimit())) printk(KERN_WARNING "AMD IOMMU: Completion wait loop failed\n"); -out: - spin_unlock_irqrestore(&iommu->lock, flags); return 0; } @@ -144,7 +140,6 @@ static int iommu_completion_wait(struct amd_iommu *iommu) static int iommu_queue_inv_dev_entry(struct amd_iommu *iommu, u16 devid) { struct iommu_cmd cmd; - int ret; BUG_ON(iommu == NULL); @@ -152,11 +147,9 @@ static int iommu_queue_inv_dev_entry(struct amd_iommu *iommu, u16 devid) CMD_SET_TYPE(&cmd, CMD_INV_DEV_ENTRY); cmd.data[0] = devid; - ret = iommu_queue_command(iommu, &cmd); - iommu->need_sync = 1; - return ret; + return iommu_queue_command(iommu, &cmd); } /* @@ -166,7 +159,6 @@ static int iommu_queue_inv_iommu_pages(struct amd_iommu *iommu, u64 address, u16 domid, int pde, int s) { struct iommu_cmd cmd; - int ret; memset(&cmd, 0, sizeof(cmd)); address &= PAGE_MASK; @@ -179,11 +171,9 @@ static int iommu_queue_inv_iommu_pages(struct amd_iommu *iommu, if (pde) /* PDE bit - we wan't flush everything not only the PTEs */ cmd.data[2] |= CMD_INV_IOMMU_PAGES_PDE_MASK; - ret = iommu_queue_command(iommu, &cmd); - iommu->need_sync = 1; - return ret; + return iommu_queue_command(iommu, &cmd); } /* diff --git a/trunk/arch/x86/kernel/vsmp_64.c b/trunk/arch/x86/kernel/vsmp_64.c index 7766d36983fc..0c029e8959c7 100644 --- a/trunk/arch/x86/kernel/vsmp_64.c +++ b/trunk/arch/x86/kernel/vsmp_64.c @@ -61,7 +61,7 @@ static void vsmp_irq_enable(void) native_restore_fl((flags | X86_EFLAGS_IF) & (~X86_EFLAGS_AC)); } -static unsigned __init_or_module vsmp_patch(u8 type, u16 clobbers, void *ibuf, +static unsigned __init vsmp_patch(u8 type, u16 clobbers, void *ibuf, unsigned long addr, unsigned len) { switch (type) { diff --git a/trunk/arch/x86/oprofile/nmi_int.c b/trunk/arch/x86/oprofile/nmi_int.c index 8a5f1614a3d5..0227694f7dab 100644 --- a/trunk/arch/x86/oprofile/nmi_int.c +++ b/trunk/arch/x86/oprofile/nmi_int.c @@ -295,12 +295,10 @@ static void nmi_cpu_shutdown(void *dummy) static void nmi_shutdown(void) { - struct op_msrs *msrs; - + struct op_msrs *msrs = &get_cpu_var(cpu_msrs); nmi_enabled = 0; on_each_cpu(nmi_cpu_shutdown, NULL, 1); unregister_die_notifier(&profile_exceptions_nb); - msrs = &get_cpu_var(cpu_msrs); model->shutdown(msrs); free_msrs(); put_cpu_var(cpu_msrs); diff --git a/trunk/drivers/input/mouse/bcm5974.c b/trunk/drivers/input/mouse/bcm5974.c index 2998a6ac9ae4..18f4d7f6ce6d 100644 --- a/trunk/drivers/input/mouse/bcm5974.c +++ b/trunk/drivers/input/mouse/bcm5974.c @@ -351,9 +351,8 @@ static int report_tp_state(struct bcm5974 *dev, int size) #define BCM5974_WELLSPRING_MODE_REQUEST_VALUE 0x300 #define BCM5974_WELLSPRING_MODE_REQUEST_INDEX 0 #define BCM5974_WELLSPRING_MODE_VENDOR_VALUE 0x01 -#define BCM5974_WELLSPRING_MODE_NORMAL_VALUE 0x08 -static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on) +static int bcm5974_wellspring_mode(struct bcm5974 *dev) { char *data = kmalloc(8, GFP_KERNEL); int retval = 0, size; @@ -378,9 +377,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on) } /* apply the mode switch */ - data[0] = on ? - BCM5974_WELLSPRING_MODE_VENDOR_VALUE : - BCM5974_WELLSPRING_MODE_NORMAL_VALUE; + data[0] = BCM5974_WELLSPRING_MODE_VENDOR_VALUE; /* write configuration */ size = usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev, 0), @@ -395,8 +392,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on) goto out; } - dprintk(2, "bcm5974: switched to %s mode.\n", - on ? "wellspring" : "normal"); + dprintk(2, "bcm5974: switched to wellspring mode.\n"); out: kfree(data); @@ -485,7 +481,7 @@ static void bcm5974_irq_trackpad(struct urb *urb) */ static int bcm5974_start_traffic(struct bcm5974 *dev) { - if (bcm5974_wellspring_mode(dev, true)) { + if (bcm5974_wellspring_mode(dev)) { dprintk(1, "bcm5974: mode switch failed\n"); goto error; } @@ -508,7 +504,6 @@ static void bcm5974_pause_traffic(struct bcm5974 *dev) { usb_kill_urb(dev->tp_urb); usb_kill_urb(dev->bt_urb); - bcm5974_wellspring_mode(dev, false); } /* diff --git a/trunk/drivers/input/touchscreen/jornada720_ts.c b/trunk/drivers/input/touchscreen/jornada720_ts.c index c8b7e8a45c4d..bf44f9d68342 100644 --- a/trunk/drivers/input/touchscreen/jornada720_ts.c +++ b/trunk/drivers/input/touchscreen/jornada720_ts.c @@ -119,8 +119,8 @@ static int __devinit jornada720_ts_probe(struct platform_device *pdev) input_dev->id.bustype = BUS_HOST; input_dev->dev.parent = &pdev->dev; - input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); - input_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); + input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); + input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); input_set_abs_params(input_dev, ABS_X, 270, 3900, 0, 0); input_set_abs_params(input_dev, ABS_Y, 180, 3700, 0, 0); diff --git a/trunk/drivers/net/wireless/ath9k/core.c b/trunk/drivers/net/wireless/ath9k/core.c index c04959357bda..f6c45288d0e7 100644 --- a/trunk/drivers/net/wireless/ath9k/core.c +++ b/trunk/drivers/net/wireless/ath9k/core.c @@ -294,6 +294,8 @@ static int ath_stop(struct ath_softc *sc) * hardware is gone (invalid). */ + if (!sc->sc_invalid) + ath9k_hw_set_interrupts(ah, 0); ath_draintxq(sc, false); if (!sc->sc_invalid) { ath_stoprecv(sc); @@ -1334,8 +1336,6 @@ void ath_deinit(struct ath_softc *sc) DPRINTF(sc, ATH_DBG_CONFIG, "%s\n", __func__); - tasklet_kill(&sc->intr_tq); - tasklet_kill(&sc->bcon_tasklet); ath_stop(sc); if (!sc->sc_invalid) ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_AWAKE); diff --git a/trunk/drivers/net/wireless/ath9k/core.h b/trunk/drivers/net/wireless/ath9k/core.h index 2f84093331ee..4ee695b76b88 100644 --- a/trunk/drivers/net/wireless/ath9k/core.h +++ b/trunk/drivers/net/wireless/ath9k/core.h @@ -974,6 +974,7 @@ struct ath_softc { u32 sc_keymax; /* size of key cache */ DECLARE_BITMAP(sc_keymap, ATH_KEYMAX); /* key use bit map */ u8 sc_splitmic; /* split TKIP MIC keys */ + int sc_keytype; /* RX */ struct list_head sc_rxbuf; diff --git a/trunk/drivers/net/wireless/ath9k/main.c b/trunk/drivers/net/wireless/ath9k/main.c index acebdf1d20a8..99badf1404c3 100644 --- a/trunk/drivers/net/wireless/ath9k/main.c +++ b/trunk/drivers/net/wireless/ath9k/main.c @@ -206,6 +206,8 @@ static int ath_key_config(struct ath_softc *sc, if (!ret) return -EIO; + if (mac) + sc->sc_keytype = hk.kv_type; return 0; } @@ -776,6 +778,7 @@ static int ath9k_set_key(struct ieee80211_hw *hw, case DISABLE_KEY: ath_key_delete(sc, key); clear_bit(key->keyidx, sc->sc_keymap); + sc->sc_keytype = ATH9K_CIPHER_CLR; break; default: ret = -EINVAL; @@ -1411,17 +1414,10 @@ static void ath_pci_remove(struct pci_dev *pdev) { struct ieee80211_hw *hw = pci_get_drvdata(pdev); struct ath_softc *sc = hw->priv; - enum ath9k_int status; - if (pdev->irq) { - ath9k_hw_set_interrupts(sc->sc_ah, 0); - /* clear the ISR */ - ath9k_hw_getisr(sc->sc_ah, &status); - sc->sc_invalid = 1; + if (pdev->irq) free_irq(pdev->irq, sc); - } ath_detach(sc); - pci_iounmap(pdev, sc->mem); pci_release_region(pdev, 0); pci_disable_device(pdev); diff --git a/trunk/drivers/net/wireless/ath9k/xmit.c b/trunk/drivers/net/wireless/ath9k/xmit.c index 8b332e11a656..550129f717e2 100644 --- a/trunk/drivers/net/wireless/ath9k/xmit.c +++ b/trunk/drivers/net/wireless/ath9k/xmit.c @@ -315,11 +315,11 @@ static int ath_tx_prepare(struct ath_softc *sc, txctl->keyix = tx_info->control.hw_key->hw_key_idx; txctl->frmlen += tx_info->control.icv_len; - if (tx_info->control.hw_key->alg == ALG_WEP) + if (sc->sc_keytype == ATH9K_CIPHER_WEP) txctl->keytype = ATH9K_KEY_TYPE_WEP; - else if (tx_info->control.hw_key->alg == ALG_TKIP) + else if (sc->sc_keytype == ATH9K_CIPHER_TKIP) txctl->keytype = ATH9K_KEY_TYPE_TKIP; - else if (tx_info->control.hw_key->alg == ALG_CCMP) + else if (sc->sc_keytype == ATH9K_CIPHER_AES_CCM) txctl->keytype = ATH9K_KEY_TYPE_AES; } diff --git a/trunk/drivers/net/wireless/zd1211rw/zd_usb.c b/trunk/drivers/net/wireless/zd1211rw/zd_usb.c index a60ae86bd5c9..da8b7433e3a6 100644 --- a/trunk/drivers/net/wireless/zd1211rw/zd_usb.c +++ b/trunk/drivers/net/wireless/zd1211rw/zd_usb.c @@ -58,7 +58,6 @@ static struct usb_device_id usb_ids[] = { { USB_DEVICE(0x0586, 0x3407), .driver_info = DEVICE_ZD1211 }, { USB_DEVICE(0x129b, 0x1666), .driver_info = DEVICE_ZD1211 }, { USB_DEVICE(0x157e, 0x300a), .driver_info = DEVICE_ZD1211 }, - { USB_DEVICE(0x0105, 0x145f), .driver_info = DEVICE_ZD1211 }, /* ZD1211B */ { USB_DEVICE(0x0ace, 0x1215), .driver_info = DEVICE_ZD1211B }, { USB_DEVICE(0x157e, 0x300d), .driver_info = DEVICE_ZD1211B }, diff --git a/trunk/drivers/pci/pcie/aspm.c b/trunk/drivers/pci/pcie/aspm.c index 851f5b83cdbc..9a7c9e1408a4 100644 --- a/trunk/drivers/pci/pcie/aspm.c +++ b/trunk/drivers/pci/pcie/aspm.c @@ -527,7 +527,7 @@ static int pcie_aspm_sanity_check(struct pci_dev *pdev) */ pci_read_config_dword(child_dev, child_pos + PCI_EXP_DEVCAP, ®32); - if (!(reg32 & PCI_EXP_DEVCAP_RBER) && !aspm_force) { + if (!(reg32 & PCI_EXP_DEVCAP_RBER && !aspm_force)) { printk("Pre-1.1 PCIe device detected, " "disable ASPM for %s. It can be enabled forcedly" " with 'pcie_aspm=force'\n", pci_name(pdev)); diff --git a/trunk/drivers/pci/search.c b/trunk/drivers/pci/search.c index 4edfc4731bd4..3b3b5f178797 100644 --- a/trunk/drivers/pci/search.c +++ b/trunk/drivers/pci/search.c @@ -162,7 +162,7 @@ EXPORT_SYMBOL(pci_find_slot); * time. */ struct pci_dev *pci_find_device(unsigned int vendor, unsigned int device, - struct pci_dev *from) + const struct pci_dev *from) { struct pci_dev *pdev; @@ -263,7 +263,7 @@ static int match_pci_dev_by_id(struct device *dev, void *data) * this file. */ static struct pci_dev *pci_get_dev_by_id(const struct pci_device_id *id, - struct pci_dev *from) + const struct pci_dev *from) { struct device *dev; struct device *dev_start = NULL; @@ -303,7 +303,7 @@ static struct pci_dev *pci_get_dev_by_id(const struct pci_device_id *id, */ struct pci_dev *pci_get_subsys(unsigned int vendor, unsigned int device, unsigned int ss_vendor, unsigned int ss_device, - struct pci_dev *from) + const struct pci_dev *from) { struct pci_dev *pdev; struct pci_device_id *id; diff --git a/trunk/drivers/pcmcia/ds.c b/trunk/drivers/pcmcia/ds.c index 34c83d3ca0fa..4174d9656e35 100644 --- a/trunk/drivers/pcmcia/ds.c +++ b/trunk/drivers/pcmcia/ds.c @@ -427,18 +427,6 @@ static int pcmcia_device_probe(struct device * dev) p_drv = to_pcmcia_drv(dev->driver); s = p_dev->socket; - /* The PCMCIA code passes the match data in via dev->driver_data - * which is an ugly hack. Once the driver probe is called it may - * and often will overwrite the match data so we must save it first - * - * handle pseudo multifunction devices: - * there are at most two pseudo multifunction devices. - * if we're matching against the first, schedule a - * call which will then check whether there are two - * pseudo devices, and if not, add the second one. - */ - did = p_dev->dev.driver_data; - ds_dbg(1, "trying to bind %s to %s\n", p_dev->dev.bus_id, p_drv->drv.name); @@ -467,14 +455,21 @@ static int pcmcia_device_probe(struct device * dev) goto put_module; } + /* handle pseudo multifunction devices: + * there are at most two pseudo multifunction devices. + * if we're matching against the first, schedule a + * call which will then check whether there are two + * pseudo devices, and if not, add the second one. + */ + did = p_dev->dev.driver_data; if (did && (did->match_flags & PCMCIA_DEV_ID_MATCH_DEVICE_NO) && (p_dev->socket->device_count == 1) && (p_dev->device_no == 0)) pcmcia_add_device_later(p_dev->socket, 0); -put_module: + put_module: if (ret) module_put(p_drv->owner); -put_dev: + put_dev: if (ret) put_device(dev); return (ret); diff --git a/trunk/drivers/serial/atmel_serial.c b/trunk/drivers/serial/atmel_serial.c index 61fb8b6d19af..3a6da80b081c 100644 --- a/trunk/drivers/serial/atmel_serial.c +++ b/trunk/drivers/serial/atmel_serial.c @@ -131,8 +131,7 @@ struct atmel_uart_char { struct atmel_uart_port { struct uart_port uart; /* uart */ struct clk *clk; /* uart clock */ - int may_wakeup; /* cached value of device_may_wakeup for times we need to disable it */ - u32 backup_imr; /* IMR saved during suspend */ + unsigned short suspended; /* is port suspended? */ int break_active; /* break being received */ short use_dma_rx; /* enable PDC receiver */ @@ -985,15 +984,8 @@ static void atmel_serial_pm(struct uart_port *port, unsigned int state, * This is called on uart_open() or a resume event. */ clk_enable(atmel_port->clk); - - /* re-enable interrupts if we disabled some on suspend */ - UART_PUT_IER(port, atmel_port->backup_imr); break; case 3: - /* Back up the interrupt mask and disable all interrupts */ - atmel_port->backup_imr = UART_GET_IMR(port); - UART_PUT_IDR(port, -1); - /* * Disable the peripheral clock for this serial port. * This is called on uart_close() or a suspend event. @@ -1483,12 +1475,13 @@ static int atmel_serial_suspend(struct platform_device *pdev, cpu_relax(); } - /* we can not wake up if we're running on slow clock */ - atmel_port->may_wakeup = device_may_wakeup(&pdev->dev); - if (atmel_serial_clk_will_stop()) - device_set_wakeup_enable(&pdev->dev, 0); - - uart_suspend_port(&atmel_uart, port); + if (device_may_wakeup(&pdev->dev) + && !atmel_serial_clk_will_stop()) + enable_irq_wake(port->irq); + else { + uart_suspend_port(&atmel_uart, port); + atmel_port->suspended = 1; + } return 0; } @@ -1498,8 +1491,11 @@ static int atmel_serial_resume(struct platform_device *pdev) struct uart_port *port = platform_get_drvdata(pdev); struct atmel_uart_port *atmel_port = to_atmel_uart_port(port); - uart_resume_port(&atmel_uart, port); - device_set_wakeup_enable(&pdev->dev, atmel_port->may_wakeup); + if (atmel_port->suspended) { + uart_resume_port(&atmel_uart, port); + atmel_port->suspended = 0; + } else + disable_irq_wake(port->irq); return 0; } @@ -1517,8 +1513,6 @@ static int __devinit atmel_serial_probe(struct platform_device *pdev) BUILD_BUG_ON(!is_power_of_2(ATMEL_SERIAL_RINGSIZE)); port = &atmel_ports[pdev->id]; - port->backup_imr = 0; - atmel_init_port(port, pdev); if (!atmel_use_dma_rx(&port->uart)) { diff --git a/trunk/drivers/watchdog/geodewdt.c b/trunk/drivers/watchdog/geodewdt.c index 6799a6de66fe..614a5c7017b6 100644 --- a/trunk/drivers/watchdog/geodewdt.c +++ b/trunk/drivers/watchdog/geodewdt.c @@ -130,8 +130,8 @@ static ssize_t geodewdt_write(struct file *file, const char __user *data, return len; } -static long geodewdt_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) +static int geodewdt_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) { void __user *argp = (void __user *)arg; int __user *p = argp; @@ -198,7 +198,7 @@ static const struct file_operations geodewdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = geodewdt_write, - .unlocked_ioctl = geodewdt_ioctl, + .ioctl = geodewdt_ioctl, .open = geodewdt_open, .release = geodewdt_release, }; diff --git a/trunk/drivers/watchdog/ibmasr.c b/trunk/drivers/watchdog/ibmasr.c index 89fcefcc8510..b82405cfb4cd 100644 --- a/trunk/drivers/watchdog/ibmasr.c +++ b/trunk/drivers/watchdog/ibmasr.c @@ -85,6 +85,7 @@ static void __asr_toggle(void) outb(reg & ~asr_toggle_mask, asr_write_addr); reg = inb(asr_read_addr); + spin_unlock(&asr_lock); } static void asr_toggle(void) diff --git a/trunk/drivers/watchdog/pnx4008_wdt.c b/trunk/drivers/watchdog/pnx4008_wdt.c index 6d9f3d4a9987..0ed84162437b 100644 --- a/trunk/drivers/watchdog/pnx4008_wdt.c +++ b/trunk/drivers/watchdog/pnx4008_wdt.c @@ -173,8 +173,8 @@ static const struct watchdog_info ident = { .identity = "PNX4008 Watchdog", }; -static long pnx4008_wdt_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) +static long pnx4008_wdt_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) { int ret = -ENOTTY; int time; diff --git a/trunk/drivers/watchdog/rc32434_wdt.c b/trunk/drivers/watchdog/rc32434_wdt.c index c9c73b69c5e5..6756bcb009ed 100644 --- a/trunk/drivers/watchdog/rc32434_wdt.c +++ b/trunk/drivers/watchdog/rc32434_wdt.c @@ -182,8 +182,8 @@ static ssize_t rc32434_wdt_write(struct file *file, const char *data, return 0; } -static long rc32434_wdt_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) +static int rc32434_wdt_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) { void __user *argp = (void __user *)arg; int new_timeout; @@ -242,7 +242,7 @@ static struct file_operations rc32434_wdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = rc32434_wdt_write, - .unlocked_ioctl = rc32434_wdt_ioctl, + .ioctl = rc32434_wdt_ioctl, .open = rc32434_wdt_open, .release = rc32434_wdt_release, }; diff --git a/trunk/drivers/watchdog/rdc321x_wdt.c b/trunk/drivers/watchdog/rdc321x_wdt.c index bf92802f2bbe..9108efa73e7d 100644 --- a/trunk/drivers/watchdog/rdc321x_wdt.c +++ b/trunk/drivers/watchdog/rdc321x_wdt.c @@ -144,8 +144,8 @@ static int rdc321x_wdt_release(struct inode *inode, struct file *file) return 0; } -static long rdc321x_wdt_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) +static int rdc321x_wdt_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) { void __user *argp = (void __user *)arg; unsigned int value; @@ -204,7 +204,7 @@ static ssize_t rdc321x_wdt_write(struct file *file, const char __user *buf, static const struct file_operations rdc321x_wdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, - .unlocked_ioctl = rdc321x_wdt_ioctl, + .ioctl = rdc321x_wdt_ioctl, .open = rdc321x_wdt_open, .write = rdc321x_wdt_write, .release = rdc321x_wdt_release, diff --git a/trunk/drivers/watchdog/wdt285.c b/trunk/drivers/watchdog/wdt285.c index 191ea6302107..db362c34958b 100644 --- a/trunk/drivers/watchdog/wdt285.c +++ b/trunk/drivers/watchdog/wdt285.c @@ -115,8 +115,8 @@ static int watchdog_release(struct inode *inode, struct file *file) return 0; } -static ssize_t watchdog_write(struct file *file, const char __user *data, - size_t len, loff_t *ppos) +static ssize_t watchdog_write(struct file *file, const char *data, + size_t len, loff_t *ppos) { /* * Refresh the timer. @@ -133,22 +133,21 @@ static const struct watchdog_info ident = { }; static long watchdog_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) + unsigned long arg) { unsigned int new_margin; - int __user *int_arg = (int __user *)arg; int ret = -ENOTTY; switch (cmd) { case WDIOC_GETSUPPORT: ret = 0; - if (copy_to_user((void __user *)arg, &ident, sizeof(ident))) + if (copy_to_user((void *)arg, &ident, sizeof(ident))) ret = -EFAULT; break; case WDIOC_GETSTATUS: case WDIOC_GETBOOTSTATUS: - ret = put_user(0, int_arg); + ret = put_user(0, (int *)arg); break; case WDIOC_KEEPALIVE: @@ -157,7 +156,7 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd, break; case WDIOC_SETTIMEOUT: - ret = get_user(new_margin, int_arg); + ret = get_user(new_margin, (int *)arg); if (ret) break; @@ -172,7 +171,7 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd, watchdog_ping(); /* Fall */ case WDIOC_GETTIMEOUT: - ret = put_user(soft_margin, int_arg); + ret = put_user(soft_margin, (int *)arg); break; } return ret; diff --git a/trunk/include/linux/pci.h b/trunk/include/linux/pci.h index 98dc6243a706..c0e14008a3c2 100644 --- a/trunk/include/linux/pci.h +++ b/trunk/include/linux/pci.h @@ -534,7 +534,7 @@ extern void pci_sort_breadthfirst(void); #ifdef CONFIG_PCI_LEGACY struct pci_dev __deprecated *pci_find_device(unsigned int vendor, unsigned int device, - struct pci_dev *from); + const struct pci_dev *from); struct pci_dev __deprecated *pci_find_slot(unsigned int bus, unsigned int devfn); #endif /* CONFIG_PCI_LEGACY */ @@ -550,7 +550,7 @@ struct pci_dev *pci_get_device(unsigned int vendor, unsigned int device, struct pci_dev *from); struct pci_dev *pci_get_subsys(unsigned int vendor, unsigned int device, unsigned int ss_vendor, unsigned int ss_device, - struct pci_dev *from); + const struct pci_dev *from); struct pci_dev *pci_get_slot(struct pci_bus *bus, unsigned int devfn); struct pci_dev *pci_get_bus_and_slot(unsigned int bus, unsigned int devfn); struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *from); @@ -816,7 +816,7 @@ _PCI_NOP_ALL(write,) static inline struct pci_dev *pci_find_device(unsigned int vendor, unsigned int device, - struct pci_dev *from) + const struct pci_dev *from) { return NULL; } @@ -838,7 +838,7 @@ static inline struct pci_dev *pci_get_subsys(unsigned int vendor, unsigned int device, unsigned int ss_vendor, unsigned int ss_device, - struct pci_dev *from) + const struct pci_dev *from) { return NULL; } diff --git a/trunk/include/linux/smb.h b/trunk/include/linux/smb.h index 82fefddc5987..caa43b2370cb 100644 --- a/trunk/include/linux/smb.h +++ b/trunk/include/linux/smb.h @@ -11,9 +11,7 @@ #include #include -#ifdef __KERNEL__ #include -#endif enum smb_protocol { SMB_PROTOCOL_NONE, diff --git a/trunk/kernel/kexec.c b/trunk/kernel/kexec.c index aef265325cd3..59f3f0df35d4 100644 --- a/trunk/kernel/kexec.c +++ b/trunk/kernel/kexec.c @@ -753,14 +753,8 @@ static struct page *kimage_alloc_page(struct kimage *image, *old = addr | (*old & ~PAGE_MASK); /* The old page I have found cannot be a - * destination page, so return it if it's - * gfp_flags honor the ones passed in. + * destination page, so return it. */ - if (!(gfp_mask & __GFP_HIGHMEM) && - PageHighMem(old_page)) { - kimage_free_pages(old_page); - continue; - } addr = old_addr; page = old_page; break; diff --git a/trunk/kernel/sched.c b/trunk/kernel/sched.c index 13dd2db9fb2d..98890807375b 100644 --- a/trunk/kernel/sched.c +++ b/trunk/kernel/sched.c @@ -1087,7 +1087,7 @@ hotplug_hrtick(struct notifier_block *nfb, unsigned long action, void *hcpu) return NOTIFY_DONE; } -static __init void init_hrtick(void) +static void init_hrtick(void) { hotcpu_notifier(hotplug_hrtick, 0); } diff --git a/trunk/kernel/time/tick-common.c b/trunk/kernel/time/tick-common.c index 019315ebf9de..b523d095decf 100644 --- a/trunk/kernel/time/tick-common.c +++ b/trunk/kernel/time/tick-common.c @@ -33,7 +33,7 @@ DEFINE_PER_CPU(struct tick_device, tick_cpu_device); */ ktime_t tick_next_period; ktime_t tick_period; -int tick_do_timer_cpu __read_mostly = -1; +int tick_do_timer_cpu __read_mostly = TICK_DO_TIMER_BOOT; DEFINE_SPINLOCK(tick_device_lock); /* @@ -148,7 +148,7 @@ static void tick_setup_device(struct tick_device *td, * If no cpu took the do_timer update, assign it to * this cpu: */ - if (tick_do_timer_cpu == -1) { + if (tick_do_timer_cpu == TICK_DO_TIMER_BOOT) { tick_do_timer_cpu = cpu; tick_next_period = ktime_get(); tick_period = ktime_set(0, NSEC_PER_SEC / HZ); @@ -300,7 +300,8 @@ static void tick_shutdown(unsigned int *cpup) if (*cpup == tick_do_timer_cpu) { int cpu = first_cpu(cpu_online_map); - tick_do_timer_cpu = (cpu != NR_CPUS) ? cpu : -1; + tick_do_timer_cpu = (cpu != NR_CPUS) ? cpu : + TICK_DO_TIMER_NONE; } spin_unlock_irqrestore(&tick_device_lock, flags); } diff --git a/trunk/kernel/time/tick-internal.h b/trunk/kernel/time/tick-internal.h index 6e9db9734aa6..e18014fadf95 100644 --- a/trunk/kernel/time/tick-internal.h +++ b/trunk/kernel/time/tick-internal.h @@ -1,6 +1,10 @@ /* * tick internal variable and functions used by low/high res code */ + +#define TICK_DO_TIMER_NONE -1 +#define TICK_DO_TIMER_BOOT -2 + DECLARE_PER_CPU(struct tick_device, tick_cpu_device); extern spinlock_t tick_device_lock; extern ktime_t tick_next_period; diff --git a/trunk/kernel/time/tick-sched.c b/trunk/kernel/time/tick-sched.c index a87b0468568b..31a14e8caac1 100644 --- a/trunk/kernel/time/tick-sched.c +++ b/trunk/kernel/time/tick-sched.c @@ -221,7 +221,7 @@ void tick_nohz_stop_sched_tick(int inidle) */ if (unlikely(!cpu_online(cpu))) { if (cpu == tick_do_timer_cpu) - tick_do_timer_cpu = -1; + tick_do_timer_cpu = TICK_DO_TIMER_NONE; } if (unlikely(ts->nohz_mode == NOHZ_MODE_INACTIVE)) @@ -303,7 +303,7 @@ void tick_nohz_stop_sched_tick(int inidle) * invoked. */ if (cpu == tick_do_timer_cpu) - tick_do_timer_cpu = -1; + tick_do_timer_cpu = TICK_DO_TIMER_NONE; ts->idle_sleeps++; @@ -468,7 +468,7 @@ static void tick_nohz_handler(struct clock_event_device *dev) * this duty, then the jiffies update is still serialized by * xtime_lock. */ - if (unlikely(tick_do_timer_cpu == -1)) + if (unlikely(tick_do_timer_cpu == TICK_DO_TIMER_NONE)) tick_do_timer_cpu = cpu; /* Check, if the jiffies need an update */ @@ -570,7 +570,7 @@ static enum hrtimer_restart tick_sched_timer(struct hrtimer *timer) * this duty, then the jiffies update is still serialized by * xtime_lock. */ - if (unlikely(tick_do_timer_cpu == -1)) + if (unlikely(tick_do_timer_cpu == TICK_DO_TIMER_NONE)) tick_do_timer_cpu = cpu; #endif diff --git a/trunk/mm/memcontrol.c b/trunk/mm/memcontrol.c index c0500e4d3a2f..0f1f7a7374ba 100644 --- a/trunk/mm/memcontrol.c +++ b/trunk/mm/memcontrol.c @@ -806,7 +806,6 @@ int mem_cgroup_shrink_usage(struct mm_struct *mm, gfp_t gfp_mask) do { progress = try_to_free_mem_cgroup_pages(mem, gfp_mask); - progress += res_counter_check_under_limit(&mem->res); } while (!progress && --retry); css_put(&mem->css); diff --git a/trunk/mm/tiny-shmem.c b/trunk/mm/tiny-shmem.c index d17cb6f6ab10..ae532f501943 100644 --- a/trunk/mm/tiny-shmem.c +++ b/trunk/mm/tiny-shmem.c @@ -65,25 +65,31 @@ struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags) if (!dentry) goto put_memory; - error = -ENFILE; - file = get_empty_filp(); - if (!file) - goto put_dentry; - error = -ENOSPC; inode = ramfs_get_inode(root->d_sb, S_IFREG | S_IRWXUGO, 0); if (!inode) - goto close_file; + goto put_dentry; d_instantiate(dentry, inode); - inode->i_size = size; - inode->i_nlink = 0; /* It is unlinked */ - init_file(file, shm_mnt, dentry, FMODE_WRITE | FMODE_READ, + error = -ENFILE; + file = alloc_file(shm_mnt, dentry, FMODE_WRITE | FMODE_READ, &ramfs_file_operations); + if (!file) + goto put_dentry; + + inode->i_nlink = 0; /* It is unlinked */ + + /* notify everyone as to the change of file size */ + error = do_truncate(dentry, size, 0, file); + if (error < 0) + goto close_file; + return file; close_file: put_filp(file); + return ERR_PTR(error); + put_dentry: dput(dentry); put_memory: diff --git a/trunk/net/core/dev.c b/trunk/net/core/dev.c index e8eb2b478344..e719ed29310f 100644 --- a/trunk/net/core/dev.c +++ b/trunk/net/core/dev.c @@ -122,7 +122,6 @@ #include #include #include -#include #include #include #include @@ -1668,7 +1667,7 @@ static u16 simple_tx_hash(struct net_device *dev, struct sk_buff *skb) { u32 addr1, addr2, ports; u32 hash, ihl; - u8 ip_proto = 0; + u8 ip_proto; if (unlikely(!simple_tx_hashrnd_initialized)) { get_random_bytes(&simple_tx_hashrnd, 4); @@ -1677,8 +1676,7 @@ static u16 simple_tx_hash(struct net_device *dev, struct sk_buff *skb) switch (skb->protocol) { case __constant_htons(ETH_P_IP): - if (!(ip_hdr(skb)->frag_off & htons(IP_MF | IP_OFFSET))) - ip_proto = ip_hdr(skb)->protocol; + ip_proto = ip_hdr(skb)->protocol; addr1 = ip_hdr(skb)->saddr; addr2 = ip_hdr(skb)->daddr; ihl = ip_hdr(skb)->ihl; diff --git a/trunk/net/socket.c b/trunk/net/socket.c index 3e8d4e35c08f..8ef8ba81b9e2 100644 --- a/trunk/net/socket.c +++ b/trunk/net/socket.c @@ -1511,7 +1511,6 @@ long do_accept(int fd, struct sockaddr __user *upeer_sockaddr, goto out_put; } -#if 0 #ifdef HAVE_SET_RESTORE_SIGMASK asmlinkage long sys_paccept(int fd, struct sockaddr __user *upeer_sockaddr, int __user *upeer_addrlen, @@ -1565,7 +1564,6 @@ asmlinkage long sys_paccept(int fd, struct sockaddr __user *upeer_sockaddr, return do_accept(fd, upeer_sockaddr, upeer_addrlen, flags); } #endif -#endif asmlinkage long sys_accept(int fd, struct sockaddr __user *upeer_sockaddr, int __user *upeer_addrlen) diff --git a/trunk/scripts/kernel-doc b/trunk/scripts/kernel-doc index 44ee94d2ab76..ff787e6ff8ed 100755 --- a/trunk/scripts/kernel-doc +++ b/trunk/scripts/kernel-doc @@ -781,7 +781,6 @@ sub output_struct_xml(%) { print " \n"; print " Members\n"; - if ($#{$args{'parameterlist'}} >= 0) { print " \n"; foreach $parameter (@{$args{'parameterlist'}}) { ($parameter =~ /^#/) && next; @@ -799,9 +798,6 @@ sub output_struct_xml(%) { print " \n"; } print " \n"; - } else { - print " \n None\n \n"; - } print " \n"; output_section_xml(@_); diff --git a/trunk/sound/soc/at32/at32-pcm.c b/trunk/sound/soc/at32/at32-pcm.c index c83584f989a9..435f1daf177c 100644 --- a/trunk/sound/soc/at32/at32-pcm.c +++ b/trunk/sound/soc/at32/at32-pcm.c @@ -434,8 +434,7 @@ static int at32_pcm_suspend(struct platform_device *pdev, params = prtd->params; /* Disable the PDC and save the PDC registers */ - ssc_writex(params->ssc->regs, ATMEL_PDC_PTCR, - params->mask->pdc_disable); + ssc_writex(params->ssc->regs, PDC_PTCR, params->mask->pdc_disable); prtd->pdc_xpr_save = ssc_readx(params->ssc->regs, params->pdc->xpr); prtd->pdc_xcr_save = ssc_readx(params->ssc->regs, params->pdc->xcr); @@ -465,7 +464,7 @@ static int at32_pcm_resume(struct platform_device *pdev, ssc_writex(params->ssc->regs, params->pdc->xnpr, prtd->pdc_xnpr_save); ssc_writex(params->ssc->regs, params->pdc->xncr, prtd->pdc_xncr_save); - ssc_writex(params->ssc->regs, ATMEL_PDC_PTCR, params->mask->pdc_enable); + ssc_writex(params->ssc->regs, PDC_PTCR, params->mask->pdc_enable); return 0; } #else /* CONFIG_PM */