From c9f5dfd23db5817b0e9077a7737d1f0e8a898979 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Thu, 28 Jun 2007 13:26:06 -0500 Subject: [PATCH] --- yaml --- r: 58100 b: refs/heads/master c: 5f708dd91d15876e26d7a57f97a255cedffca463 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/Documentation/HOWTO | 28 ++++---- trunk/arch/arm/kernel/calls.S | 2 +- trunk/arch/arm/kernel/sys_arm.c | 13 ++++ trunk/arch/i386/kernel/cpu/mtrr/cyrix.c | 4 +- trunk/arch/mips/jazz/setup.c | 2 +- trunk/arch/powerpc/kernel/sys_ppc32.c | 9 --- trunk/drivers/atm/Kconfig | 2 +- trunk/drivers/dma/ioatdma.c | 8 +-- trunk/drivers/media/dvb/Kconfig | 2 +- trunk/drivers/media/radio/Kconfig | 2 +- trunk/drivers/media/video/Kconfig | 6 +- .../media/video/saa7134/saa7134-tvaudio.c | 2 +- trunk/drivers/net/irda/smsc-ircc2.c | 14 ++-- trunk/drivers/net/pcmcia/Kconfig | 2 +- trunk/drivers/net/phy/mdio_bus.c | 3 +- trunk/drivers/net/phy/vitesse.c | 2 +- trunk/drivers/pnp/quirks.c | 66 +++++-------------- trunk/drivers/serial/mpsc.c | 3 +- trunk/drivers/video/aty/atyfb_base.c | 17 ++--- trunk/drivers/video/chipsfb.c | 6 +- trunk/drivers/w1/slaves/w1_therm.c | 6 +- trunk/fs/ecryptfs/ecryptfs_kernel.h | 2 - trunk/fs/ecryptfs/inode.c | 66 +------------------ trunk/fs/ecryptfs/mmap.c | 55 +++++++--------- trunk/fs/ext2/super.c | 1 - trunk/fs/signalfd.c | 3 +- trunk/fs/sync.c | 8 --- trunk/include/asm-arm/unistd.h | 1 - trunk/include/asm-powerpc/systbl.h | 1 - trunk/include/asm-powerpc/unistd.h | 3 +- trunk/include/linux/eventfd.h | 3 +- trunk/include/linux/syscalls.h | 2 - trunk/kernel/relay.c | 11 +--- trunk/mm/rmap.c | 24 ++++++- trunk/scripts/checksyscalls.sh | 5 -- trunk/sound/isa/opl3sa2.c | 2 +- trunk/sound/pci/ice1712/prodigy192.c | 2 +- 38 files changed, 146 insertions(+), 244 deletions(-) diff --git a/[refs] b/[refs] index a441fe369699..955f11371042 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: edd5cd4a9424f22b0fa08bef5e299d41befd5622 +refs/heads/master: 5f708dd91d15876e26d7a57f97a255cedffca463 diff --git a/trunk/Documentation/HOWTO b/trunk/Documentation/HOWTO index 98e2701c746f..ced9207bedcf 100644 --- a/trunk/Documentation/HOWTO +++ b/trunk/Documentation/HOWTO @@ -322,34 +322,39 @@ kernel releases as described above. Here is a list of some of the different kernel trees available: git trees: - Kbuild development tree, Sam Ravnborg - git.kernel.org:/pub/scm/linux/kernel/git/sam/kbuild.git + kernel.org:/pub/scm/linux/kernel/git/sam/kbuild.git - ACPI development tree, Len Brown - git.kernel.org:/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6.git + kernel.org:/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6.git - Block development tree, Jens Axboe - git.kernel.org:/pub/scm/linux/kernel/git/axboe/linux-2.6-block.git + kernel.org:/pub/scm/linux/kernel/git/axboe/linux-2.6-block.git - DRM development tree, Dave Airlie - git.kernel.org:/pub/scm/linux/kernel/git/airlied/drm-2.6.git + kernel.org:/pub/scm/linux/kernel/git/airlied/drm-2.6.git - ia64 development tree, Tony Luck - git.kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6.git + kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6.git + + - ieee1394 development tree, Jody McIntyre + kernel.org:/pub/scm/linux/kernel/git/scjody/ieee1394.git - infiniband, Roland Dreier - git.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband.git + kernel.org:/pub/scm/linux/kernel/git/roland/infiniband.git - libata, Jeff Garzik - git.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev.git + kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev.git - network drivers, Jeff Garzik - git.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git + kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git - pcmcia, Dominik Brodowski - git.kernel.org:/pub/scm/linux/kernel/git/brodo/pcmcia-2.6.git + kernel.org:/pub/scm/linux/kernel/git/brodo/pcmcia-2.6.git - SCSI, James Bottomley - git.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git + kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git + + Other git kernel trees can be found listed at http://kernel.org/git quilt trees: - USB, PCI, Driver Core, and I2C, Greg Kroah-Hartman @@ -357,9 +362,6 @@ Here is a list of some of the different kernel trees available: - x86-64, partly i386, Andi Kleen ftp.firstfloor.org:/pub/ak/x86_64/quilt/ - Other kernel trees can be found listed at http://git.kernel.org/ and in - the MAINTAINERS file. - Bug Reporting ------------- diff --git a/trunk/arch/arm/kernel/calls.S b/trunk/arch/arm/kernel/calls.S index a98d0c933db0..19326d7cdeb3 100644 --- a/trunk/arch/arm/kernel/calls.S +++ b/trunk/arch/arm/kernel/calls.S @@ -350,7 +350,7 @@ CALL(sys_set_robust_list) CALL(sys_get_robust_list) /* 340 */ CALL(sys_splice) - CALL(sys_sync_file_range2) + CALL(sys_arm_sync_file_range) CALL(sys_tee) CALL(sys_vmsplice) CALL(sys_move_pages) diff --git a/trunk/arch/arm/kernel/sys_arm.c b/trunk/arch/arm/kernel/sys_arm.c index 4d25e49a14f7..1ca2d5174fcb 100644 --- a/trunk/arch/arm/kernel/sys_arm.c +++ b/trunk/arch/arm/kernel/sys_arm.c @@ -328,3 +328,16 @@ asmlinkage long sys_arm_fadvise64_64(int fd, int advice, { return sys_fadvise64_64(fd, offset, len, advice); } + +/* + * Yet more syscall fsckage - we can't fit sys_sync_file_range's + * arguments into the available registers with EABI. So, let's + * create an ARM specific syscall for this which has _sane_ + * arguments. (This incidentally also has an ABI-independent + * argument layout.) + */ +asmlinkage long sys_arm_sync_file_range(int fd, unsigned int flags, + loff_t offset, loff_t nbytes) +{ + return sys_sync_file_range(fd, offset, nbytes, flags); +} diff --git a/trunk/arch/i386/kernel/cpu/mtrr/cyrix.c b/trunk/arch/i386/kernel/cpu/mtrr/cyrix.c index 1001f1e0fe6d..9edf5625584f 100644 --- a/trunk/arch/i386/kernel/cpu/mtrr/cyrix.c +++ b/trunk/arch/i386/kernel/cpu/mtrr/cyrix.c @@ -233,12 +233,12 @@ typedef struct { mtrr_type type; } arr_state_t; -static arr_state_t arr_state[8] = { +static arr_state_t arr_state[8] __devinitdata = { {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL} }; -static unsigned char ccr_state[7] = { 0, 0, 0, 0, 0, 0, 0 }; +static unsigned char ccr_state[7] __devinitdata = { 0, 0, 0, 0, 0, 0, 0 }; static void cyrix_set_all(void) { diff --git a/trunk/arch/mips/jazz/setup.c b/trunk/arch/mips/jazz/setup.c index 81ec559a1c26..d848f1a07786 100644 --- a/trunk/arch/mips/jazz/setup.c +++ b/trunk/arch/mips/jazz/setup.c @@ -54,7 +54,7 @@ static struct resource jazz_io_resources[] = { .start = 0x40, .end = 0x5f, .name = "timer", - .flags = IORESOURCE_BUSY + .end = IORESOURCE_BUSY }, { .start = 0x80, .end = 0x8f, diff --git a/trunk/arch/powerpc/kernel/sys_ppc32.c b/trunk/arch/powerpc/kernel/sys_ppc32.c index b42cbf1e2d7d..047246ad4f65 100644 --- a/trunk/arch/powerpc/kernel/sys_ppc32.c +++ b/trunk/arch/powerpc/kernel/sys_ppc32.c @@ -810,12 +810,3 @@ asmlinkage long compat_sys_request_key(const char __user *_type, return sys_request_key(_type, _description, _callout_info, destringid); } -asmlinkage long compat_sys_sync_file_range2(int fd, unsigned int flags, - unsigned offset_hi, unsigned offset_lo, - unsigned nbytes_hi, unsigned nbytes_lo) -{ - loff_t offset = ((loff_t)offset_hi << 32) | offset_lo; - loff_t nbytes = ((loff_t)nbytes_hi << 32) | nbytes_lo; - - return sys_sync_file_range(fd, offset, nbytes, flags); -} diff --git a/trunk/drivers/atm/Kconfig b/trunk/drivers/atm/Kconfig index 5b4fab24155f..f5a47a48c3b4 100644 --- a/trunk/drivers/atm/Kconfig +++ b/trunk/drivers/atm/Kconfig @@ -7,7 +7,7 @@ menuconfig ATM_DRIVERS depends on NETDEVICES && ATM default y -if ATM_DRIVERS && NETDEVICES && ATM +if ATM_DRIVERS config ATM_DUMMY tristate "Dummy ATM driver" diff --git a/trunk/drivers/dma/ioatdma.c b/trunk/drivers/dma/ioatdma.c index 850014139556..8e8726104619 100644 --- a/trunk/drivers/dma/ioatdma.c +++ b/trunk/drivers/dma/ioatdma.c @@ -556,7 +556,7 @@ static struct pci_device_id ioat_pci_tbl[] = { { 0, } }; -static struct pci_driver ioat_pci_driver = { +static struct pci_driver ioat_pci_drv = { .name = "ioatdma", .id_table = ioat_pci_tbl, .probe = ioat_probe, @@ -699,7 +699,7 @@ static int __devinit ioat_probe(struct pci_dev *pdev, if (err) goto err_set_dma_mask; - err = pci_request_regions(pdev, ioat_pci_driver.name); + err = pci_request_regions(pdev, ioat_pci_drv.name); if (err) goto err_request_regions; @@ -828,14 +828,14 @@ static int __init ioat_init_module(void) /* if forced, worst case is that rmmod hangs */ __unsafe(THIS_MODULE); - return pci_register_driver(&ioat_pci_driver); + return pci_register_driver(&ioat_pci_drv); } module_init(ioat_init_module); static void __exit ioat_exit_module(void) { - pci_unregister_driver(&ioat_pci_driver); + pci_unregister_driver(&ioat_pci_drv); } module_exit(ioat_exit_module); diff --git a/trunk/drivers/media/dvb/Kconfig b/trunk/drivers/media/dvb/Kconfig index 03ef88acd9b8..efd2b7468158 100644 --- a/trunk/drivers/media/dvb/Kconfig +++ b/trunk/drivers/media/dvb/Kconfig @@ -11,7 +11,7 @@ menuconfig DVB_CAPTURE_DRIVERS ---help--- Say Y to select Digital TV adapters -if DVB_CAPTURE_DRIVERS && DVB_CORE +if DVB_CAPTURE_DRIVERS comment "Supported SAA7146 based PCI Adapters" depends on DVB_CORE && PCI && I2C diff --git a/trunk/drivers/media/radio/Kconfig b/trunk/drivers/media/radio/Kconfig index 194b102140ef..a6ac82a609d4 100644 --- a/trunk/drivers/media/radio/Kconfig +++ b/trunk/drivers/media/radio/Kconfig @@ -9,7 +9,7 @@ menuconfig RADIO_ADAPTERS ---help--- Say Y here to enable selecting AM/FM radio adapters. -if RADIO_ADAPTERS && VIDEO_DEV +if RADIO_ADAPTERS config RADIO_CADET tristate "ADS Cadet AM/FM Tuner" diff --git a/trunk/drivers/media/video/Kconfig b/trunk/drivers/media/video/Kconfig index 4d45a40016de..4cca55170e21 100644 --- a/trunk/drivers/media/video/Kconfig +++ b/trunk/drivers/media/video/Kconfig @@ -11,7 +11,7 @@ menuconfig VIDEO_CAPTURE_DRIVERS webcams, analog TV, and hybrid analog/digital TV. Some of those devices also supports FM radio. -if VIDEO_CAPTURE_DRIVERS && VIDEO_DEV +if VIDEO_CAPTURE_DRIVERS config VIDEO_ADV_DEBUG bool "Enable advanced debug functionality" @@ -347,7 +347,7 @@ endmenu # encoder / decoder chips config VIDEO_VIVI tristate "Virtual Video Driver" - depends on VIDEO_V4L2 && !SPARC32 && !SPARC64 && PCI + depends on VIDEO_V4L2 && !SPARC32 && !SPARC64 && PCI && VIDEO_DEV select VIDEO_BUF default n ---help--- @@ -691,7 +691,7 @@ menuconfig V4L_USB_DRIVERS depends on USB default y -if V4L_USB_DRIVERS && USB +if V4L_USB_DRIVERS source "drivers/media/video/pvrusb2/Kconfig" diff --git a/trunk/drivers/media/video/saa7134/saa7134-tvaudio.c b/trunk/drivers/media/video/saa7134/saa7134-tvaudio.c index 30395d6b5f14..7b56041186dc 100644 --- a/trunk/drivers/media/video/saa7134/saa7134-tvaudio.c +++ b/trunk/drivers/media/video/saa7134/saa7134-tvaudio.c @@ -1005,7 +1005,7 @@ int saa7134_tvaudio_init2(struct saa7134_dev *dev) int saa7134_tvaudio_fini(struct saa7134_dev *dev) { /* shutdown tvaudio thread */ - if (dev->thread.pid > 0) { + if (dev->thread.pid >= 0) { dev->thread.shutdown = 1; wake_up_interruptible(&dev->thread.wq); wait_for_completion(&dev->thread.exit); diff --git a/trunk/drivers/net/irda/smsc-ircc2.c b/trunk/drivers/net/irda/smsc-ircc2.c index 2803b370ba01..9043bf4aa49e 100644 --- a/trunk/drivers/net/irda/smsc-ircc2.c +++ b/trunk/drivers/net/irda/smsc-ircc2.c @@ -416,13 +416,6 @@ static int __init smsc_ircc_legacy_probe(void) { int ret = 0; -#ifdef CONFIG_PCI - if (smsc_ircc_preconfigure_subsystems(ircc_cfg, ircc_fir, ircc_sir, ircc_dma, ircc_irq) < 0) { - /* Ignore errors from preconfiguration */ - IRDA_ERROR("%s, Preconfiguration failed !\n", driver_name); - } -#endif - if (ircc_fir > 0 && ircc_sir > 0) { IRDA_MESSAGE(" Overriding FIR address 0x%04x\n", ircc_fir); IRDA_MESSAGE(" Overriding SIR address 0x%04x\n", ircc_sir); @@ -466,6 +459,13 @@ static int __init smsc_ircc_init(void) return ret; } +#ifdef CONFIG_PCI + if (smsc_ircc_preconfigure_subsystems(ircc_cfg, ircc_fir, ircc_sir, ircc_dma, ircc_irq) < 0) { + /* Ignore errors from preconfiguration */ + IRDA_ERROR("%s, Preconfiguration failed !\n", driver_name); + } +#endif + dev_count = 0; if (smsc_nopnp || !pnp_platform_devices || diff --git a/trunk/drivers/net/pcmcia/Kconfig b/trunk/drivers/net/pcmcia/Kconfig index e8f55d8ed7a9..5d658bc9791c 100644 --- a/trunk/drivers/net/pcmcia/Kconfig +++ b/trunk/drivers/net/pcmcia/Kconfig @@ -19,7 +19,7 @@ menuconfig NET_PCMCIA If unsure, say N. -if NET_PCMCIA && PCMCIA +if NET_PCMCIA config PCMCIA_3C589 tristate "3Com 3c589 PCMCIA support" diff --git a/trunk/drivers/net/phy/mdio_bus.c b/trunk/drivers/net/phy/mdio_bus.c index fc4aee96cdfd..fc2f0e695a13 100644 --- a/trunk/drivers/net/phy/mdio_bus.c +++ b/trunk/drivers/net/phy/mdio_bus.c @@ -131,7 +131,8 @@ static int mdio_bus_match(struct device *dev, struct device_driver *drv) struct phy_device *phydev = to_phy_device(dev); struct phy_driver *phydrv = to_phy_driver(drv); - return (phydrv->phy_id == (phydev->phy_id & phydrv->phy_id_mask)); + return ((phydrv->phy_id & phydrv->phy_id_mask) == + (phydev->phy_id & phydrv->phy_id_mask)); } /* Suspend and resume. Copied from platform_suspend and diff --git a/trunk/drivers/net/phy/vitesse.c b/trunk/drivers/net/phy/vitesse.c index 792716beb052..596222b260d6 100644 --- a/trunk/drivers/net/phy/vitesse.c +++ b/trunk/drivers/net/phy/vitesse.c @@ -84,7 +84,7 @@ static int vsc824x_config_intr(struct phy_device *phydev) /* Vitesse 824x */ static struct phy_driver vsc8244_driver = { - .phy_id = 0x000fc6c2, + .phy_id = 0x000fc6c0, .name = "Vitesse VSC8244", .phy_id_mask = 0x000fffc0, .features = PHY_GBIT_FEATURES, diff --git a/trunk/drivers/pnp/quirks.c b/trunk/drivers/pnp/quirks.c index 967a8e22b2da..277df50c89ae 100644 --- a/trunk/drivers/pnp/quirks.c +++ b/trunk/drivers/pnp/quirks.c @@ -107,61 +107,31 @@ static void quirk_sb16audio_resources(struct pnp_dev *dev) return; } -static int quirk_smc_fir_enabled(struct pnp_dev *dev) -{ - unsigned long firbase; - u8 bank, high, low, chip; - - if (!pnp_port_valid(dev, 1)) - return 0; - - firbase = pnp_port_start(dev, 1); - - /* Select register bank 3 */ - bank = inb(firbase + 7); - bank &= 0xf0; - bank |= 3; - outb(bank, firbase + 7); - - high = inb(firbase + 0); - low = inb(firbase + 1); - chip = inb(firbase + 2); - - /* This corresponds to the check in smsc_ircc_present() */ - if (high == 0x10 && low == 0xb8 && (chip == 0xf1 || chip == 0xf2)) - return 1; - - return 0; -} - static void quirk_smc_enable(struct pnp_dev *dev) { - /* - * If the BIOS left the device disabled, or it is enabled and - * responding correctly, we're in good shape. - */ - if (!dev->active || quirk_smc_fir_enabled(dev)) + unsigned int firbase; + + if (!dev->active || !pnp_port_valid(dev, 1)) return; /* - * Sometimes the BIOS claims the device is enabled, but it reports - * the wrong FIR resources or doesn't properly configure ISA or LPC - * bridges on the way to the device. + * On the HP/Compaq nw8240 (and probably other similar machines), + * there is an SMCF010 device with two I/O port regions: + * + * 0x3e8-0x3ef SIR + * 0x100-0x10f FIR * - * HP nc6000 and nc8000/nw8000 laptops have known problems like - * this. Fortunately, they do fix things up if we auto-configure - * the device using its _PRS and _SRS methods. + * _STA reports the device is enabled, but in fact, the BIOS + * neglects to enable the FIR range. Fortunately, it does fully + * enable the device if we call _SRS. */ - dev_err(&dev->dev, "%s device not responding, auto-configuring " - "resources\n", dev->id->id); - - pnp_disable_dev(dev); - pnp_init_resource_table(&dev->res); - pnp_auto_config_dev(dev); - pnp_activate_dev(dev); - - if (!quirk_smc_fir_enabled(dev)) - dev_err(&dev->dev, "giving up; try \"smsc-ircc2.nopnp\"\n"); + firbase = pnp_port_start(dev, 1); + if (inb(firbase + 0x7 /* IRCC_MASTER */) == 0xff) { + pnp_err("%s (%s) enabled but not responding, disabling and " + "re-enabling", dev->dev.bus_id, pnp_dev_name(dev)); + pnp_disable_dev(dev); + pnp_activate_dev(dev); + } } diff --git a/trunk/drivers/serial/mpsc.c b/trunk/drivers/serial/mpsc.c index 00924feaf621..d09f2097d5b0 100644 --- a/trunk/drivers/serial/mpsc.c +++ b/trunk/drivers/serial/mpsc.c @@ -503,8 +503,7 @@ mpsc_sdma_intr_ack(struct mpsc_port_info *pi) if (pi->mirror_regs) pi->shared_regs->SDMA_INTR_CAUSE_m = 0; - writeb(0x00, pi->shared_regs->sdma_intr_base + SDMA_INTR_CAUSE + - pi->port.line); + writel(0, pi->shared_regs->sdma_intr_base + SDMA_INTR_CAUSE); return; } diff --git a/trunk/drivers/video/aty/atyfb_base.c b/trunk/drivers/video/aty/atyfb_base.c index 2fbff6317433..8d3455da663a 100644 --- a/trunk/drivers/video/aty/atyfb_base.c +++ b/trunk/drivers/video/aty/atyfb_base.c @@ -2290,6 +2290,15 @@ static int __devinit aty_init(struct fb_info *info) init_waitqueue_head(&par->vblank.wait); spin_lock_init(&par->int_lock); +#ifdef CONFIG_PPC_PMAC + /* The Apple iBook1 uses non-standard memory frequencies. We detect it + * and set the frequency manually. */ + if (machine_is_compatible("PowerBook2,1")) { + par->pll_limits.mclk = 70; + par->pll_limits.xclk = 53; + } +#endif + #ifdef CONFIG_FB_ATY_GX if (!M64_HAS(INTEGRATED)) { u32 stat0; @@ -2374,14 +2383,6 @@ static int __devinit aty_init(struct fb_info *info) par->pll_limits.xclk = (par->pll_limits.xclk + 1) >> 1; } #endif -#ifdef CONFIG_PPC_PMAC - /* The Apple iBook1 uses non-standard memory frequencies. We detect it - * and set the frequency manually. */ - if (machine_is_compatible("PowerBook2,1")) { - par->pll_limits.mclk = 70; - par->pll_limits.xclk = 53; - } -#endif /* Allow command line to override clocks. */ if (pll) diff --git a/trunk/drivers/video/chipsfb.c b/trunk/drivers/video/chipsfb.c index f48e8c534c87..af313bf1a2da 100644 --- a/trunk/drivers/video/chipsfb.c +++ b/trunk/drivers/video/chipsfb.c @@ -292,7 +292,7 @@ static void __init chips_hw_init(void) write_fr(chips_init_fr[i].addr, chips_init_fr[i].data); } -static struct fb_fix_screeninfo chipsfb_fix __devinitdata = { +static struct fb_fix_screeninfo chipsfb_fix __initdata = { .id = "C&T 65550", .type = FB_TYPE_PACKED_PIXELS, .visual = FB_VISUAL_PSEUDOCOLOR, @@ -309,7 +309,7 @@ static struct fb_fix_screeninfo chipsfb_fix __devinitdata = { .smem_len = 0x100000, /* 1MB */ }; -static struct fb_var_screeninfo chipsfb_var __devinitdata = { +static struct fb_var_screeninfo chipsfb_var __initdata = { .xres = 800, .yres = 600, .xres_virtual = 800, @@ -330,7 +330,7 @@ static struct fb_var_screeninfo chipsfb_var __devinitdata = { .vsync_len = 8, }; -static void __devinit init_chips(struct fb_info *p, unsigned long addr) +static void __init init_chips(struct fb_info *p, unsigned long addr) { memset(p->screen_base, 0, 0x100000); diff --git a/trunk/drivers/w1/slaves/w1_therm.c b/trunk/drivers/w1/slaves/w1_therm.c index 1a6937dc190b..732db4780042 100644 --- a/trunk/drivers/w1/slaves/w1_therm.c +++ b/trunk/drivers/w1/slaves/w1_therm.c @@ -191,7 +191,11 @@ static ssize_t w1_therm_read_bin(struct kobject *kobj, char *buf, loff_t off, si w1_write_8(dev, W1_CONVERT_TEMP); - msleep(tm); + while (tm) { + tm = msleep_interruptible(tm); + if (signal_pending(current)) + flush_signals(current); + } if (!w1_reset_select_slave(sl)) { diff --git a/trunk/fs/ecryptfs/ecryptfs_kernel.h b/trunk/fs/ecryptfs/ecryptfs_kernel.h index 1b9dd9a96f19..403e3bad1455 100644 --- a/trunk/fs/ecryptfs/ecryptfs_kernel.h +++ b/trunk/fs/ecryptfs/ecryptfs_kernel.h @@ -580,7 +580,5 @@ void ecryptfs_write_header_metadata(char *virt, struct ecryptfs_crypt_stat *crypt_stat, size_t *written); -int ecryptfs_write_zeros(struct file *file, pgoff_t index, int start, - int num_zeros); #endif /* #ifndef ECRYPTFS_KERNEL_H */ diff --git a/trunk/fs/ecryptfs/inode.c b/trunk/fs/ecryptfs/inode.c index 83e94fedd4e9..1548be26b5e6 100644 --- a/trunk/fs/ecryptfs/inode.c +++ b/trunk/fs/ecryptfs/inode.c @@ -800,25 +800,6 @@ int ecryptfs_truncate(struct dentry *dentry, loff_t new_length) goto out_fput; } } else { /* new_length < i_size_read(inode) */ - pgoff_t index = 0; - int end_pos_in_page = -1; - - if (new_length != 0) { - index = ((new_length - 1) >> PAGE_CACHE_SHIFT); - end_pos_in_page = ((new_length - 1) & ~PAGE_CACHE_MASK); - } - if (end_pos_in_page != (PAGE_CACHE_SIZE - 1)) { - if ((rc = ecryptfs_write_zeros(&fake_ecryptfs_file, - index, - (end_pos_in_page + 1), - ((PAGE_CACHE_SIZE - 1) - - end_pos_in_page)))) { - printk(KERN_ERR "Error attempting to zero out " - "the remainder of the end page on " - "reducing truncate; rc = [%d]\n", rc); - goto out_fput; - } - } vmtruncate(inode, new_length); rc = ecryptfs_write_inode_size_to_metadata( lower_file, lower_dentry->d_inode, inode, dentry, @@ -894,54 +875,9 @@ static int ecryptfs_setattr(struct dentry *dentry, struct iattr *ia) struct ecryptfs_crypt_stat *crypt_stat; crypt_stat = &ecryptfs_inode_to_private(dentry->d_inode)->crypt_stat; - if (!(crypt_stat->flags & ECRYPTFS_STRUCT_INITIALIZED)) - ecryptfs_init_crypt_stat(crypt_stat); + lower_dentry = ecryptfs_dentry_to_lower(dentry); inode = dentry->d_inode; lower_inode = ecryptfs_inode_to_lower(inode); - lower_dentry = ecryptfs_dentry_to_lower(dentry); - mutex_lock(&crypt_stat->cs_mutex); - if (S_ISDIR(dentry->d_inode->i_mode)) - crypt_stat->flags &= ~(ECRYPTFS_ENCRYPTED); - else if (!(crypt_stat->flags & ECRYPTFS_POLICY_APPLIED) - || !(crypt_stat->flags & ECRYPTFS_KEY_VALID)) { - struct vfsmount *lower_mnt; - struct file *lower_file = NULL; - struct ecryptfs_mount_crypt_stat *mount_crypt_stat; - int lower_flags; - - lower_mnt = ecryptfs_dentry_to_lower_mnt(dentry); - lower_flags = O_RDONLY; - if ((rc = ecryptfs_open_lower_file(&lower_file, lower_dentry, - lower_mnt, lower_flags))) { - printk(KERN_ERR - "Error opening lower file; rc = [%d]\n", rc); - mutex_unlock(&crypt_stat->cs_mutex); - goto out; - } - mount_crypt_stat = &ecryptfs_superblock_to_private( - dentry->d_sb)->mount_crypt_stat; - if ((rc = ecryptfs_read_metadata(dentry, lower_file))) { - if (!(mount_crypt_stat->flags - & ECRYPTFS_PLAINTEXT_PASSTHROUGH_ENABLED)) { - rc = -EIO; - printk(KERN_WARNING "Attempt to read file that " - "is not in a valid eCryptfs format, " - "and plaintext passthrough mode is not " - "enabled; returning -EIO\n"); - - mutex_unlock(&crypt_stat->cs_mutex); - fput(lower_file); - goto out; - } - rc = 0; - crypt_stat->flags &= ~(ECRYPTFS_ENCRYPTED); - mutex_unlock(&crypt_stat->cs_mutex); - fput(lower_file); - goto out; - } - fput(lower_file); - } - mutex_unlock(&crypt_stat->cs_mutex); if (ia->ia_valid & ATTR_SIZE) { ecryptfs_printk(KERN_DEBUG, "ia->ia_valid = [0x%x] ATTR_SIZE" " = [0x%x]\n", diff --git a/trunk/fs/ecryptfs/mmap.c b/trunk/fs/ecryptfs/mmap.c index 7d5a43cb0d5c..55cec98a84e7 100644 --- a/trunk/fs/ecryptfs/mmap.c +++ b/trunk/fs/ecryptfs/mmap.c @@ -56,6 +56,9 @@ static struct page *ecryptfs_get1page(struct file *file, int index) return read_mapping_page(mapping, index, (void *)file); } +static +int write_zeros(struct file *file, pgoff_t index, int start, int num_zeros); + /** * ecryptfs_fill_zeros * @file: The ecryptfs file @@ -98,13 +101,10 @@ int ecryptfs_fill_zeros(struct file *file, loff_t new_length) if (old_end_page_index == new_end_page_index) { /* Start and end are in the same page; we just need to * set a portion of the existing page to zero's */ - rc = ecryptfs_write_zeros(file, index, - (old_end_pos_in_page + 1), - (new_end_pos_in_page - - old_end_pos_in_page)); + rc = write_zeros(file, index, (old_end_pos_in_page + 1), + (new_end_pos_in_page - old_end_pos_in_page)); if (rc) - ecryptfs_printk(KERN_ERR, "ecryptfs_write_zeros(" - "file=[%p], " + ecryptfs_printk(KERN_ERR, "write_zeros(file=[%p], " "index=[0x%.16x], " "old_end_pos_in_page=[d], " "(PAGE_CACHE_SIZE - new_end_pos_in_page" @@ -117,10 +117,10 @@ int ecryptfs_fill_zeros(struct file *file, loff_t new_length) goto out; } /* Fill the remainder of the previous last page with zeros */ - rc = ecryptfs_write_zeros(file, index, (old_end_pos_in_page + 1), + rc = write_zeros(file, index, (old_end_pos_in_page + 1), ((PAGE_CACHE_SIZE - 1) - old_end_pos_in_page)); if (rc) { - ecryptfs_printk(KERN_ERR, "ecryptfs_write_zeros(file=[%p], " + ecryptfs_printk(KERN_ERR, "write_zeros(file=[%p], " "index=[0x%.16x], old_end_pos_in_page=[d], " "(PAGE_CACHE_SIZE - old_end_pos_in_page)=[d]) " "returned [%d]\n", file, index, @@ -131,10 +131,9 @@ int ecryptfs_fill_zeros(struct file *file, loff_t new_length) index++; while (index < new_end_page_index) { /* Fill all intermediate pages with zeros */ - rc = ecryptfs_write_zeros(file, index, 0, PAGE_CACHE_SIZE); + rc = write_zeros(file, index, 0, PAGE_CACHE_SIZE); if (rc) { - ecryptfs_printk(KERN_ERR, "ecryptfs_write_zeros(" - "file=[%p], " + ecryptfs_printk(KERN_ERR, "write_zeros(file=[%p], " "index=[0x%.16x], " "old_end_pos_in_page=[d], " "(PAGE_CACHE_SIZE - new_end_pos_in_page" @@ -150,9 +149,9 @@ int ecryptfs_fill_zeros(struct file *file, loff_t new_length) } /* Fill the portion at the beginning of the last new page with * zero's */ - rc = ecryptfs_write_zeros(file, index, 0, (new_end_pos_in_page + 1)); + rc = write_zeros(file, index, 0, (new_end_pos_in_page + 1)); if (rc) { - ecryptfs_printk(KERN_ERR, "ecryptfs_write_zeros(file=" + ecryptfs_printk(KERN_ERR, "write_zeros(file=" "[%p], index=[0x%.16x], 0, " "new_end_pos_in_page=[%d]" "returned [%d]\n", file, index, @@ -401,6 +400,7 @@ ecryptfs_prepare_write_no_truncate(struct file *file, struct page *page, static int ecryptfs_prepare_write(struct file *file, struct page *page, unsigned from, unsigned to) { + loff_t pos; int rc = 0; if (from == 0 && to == PAGE_CACHE_SIZE) @@ -408,22 +408,15 @@ static int ecryptfs_prepare_write(struct file *file, struct page *page, up to date. */ if (!PageUptodate(page)) rc = ecryptfs_do_readpage(file, page, page->index); - if (page->index != 0) { - loff_t end_of_prev_pg_pos = - (((loff_t)page->index << PAGE_CACHE_SHIFT) - 1); - - if (end_of_prev_pg_pos > i_size_read(page->mapping->host)) { - rc = ecryptfs_truncate(file->f_path.dentry, - end_of_prev_pg_pos); - if (rc) { - printk(KERN_ERR "Error on attempt to " - "truncate to (higher) offset [%lld];" - " rc = [%d]\n", end_of_prev_pg_pos, rc); - goto out; - } + pos = ((loff_t)page->index << PAGE_CACHE_SHIFT) + to; + if (pos > i_size_read(page->mapping->host)) { + rc = ecryptfs_truncate(file->f_path.dentry, pos); + if (rc) { + printk(KERN_ERR "Error on attempt to " + "truncate to (higher) offset [%lld];" + " rc = [%d]\n", pos, rc); + goto out; } - if (end_of_prev_pg_pos + 1 > i_size_read(page->mapping->host)) - zero_user_page(page, 0, PAGE_CACHE_SIZE, KM_USER0); } out: return rc; @@ -760,7 +753,7 @@ static int ecryptfs_commit_write(struct file *file, struct page *page, } /** - * ecryptfs_write_zeros + * write_zeros * @file: The ecryptfs file * @index: The index in which we are writing * @start: The position after the last block of data @@ -770,8 +763,8 @@ static int ecryptfs_commit_write(struct file *file, struct page *page, * * (start + num_zeros) must be less than or equal to PAGE_CACHE_SIZE */ -int -ecryptfs_write_zeros(struct file *file, pgoff_t index, int start, int num_zeros) +static +int write_zeros(struct file *file, pgoff_t index, int start, int num_zeros) { int rc = 0; struct page *tmp_page; diff --git a/trunk/fs/ext2/super.c b/trunk/fs/ext2/super.c index 5de5061eb331..c9fd8cf6eaa9 100644 --- a/trunk/fs/ext2/super.c +++ b/trunk/fs/ext2/super.c @@ -1043,7 +1043,6 @@ static int ext2_remount (struct super_block * sb, int * flags, char * data) if ((ext2_use_xip(sb)) && (sb->s_blocksize != PAGE_SIZE)) { printk("XIP: Unsupported blocksize\n"); - err = -EINVAL; goto restore_opts; } diff --git a/trunk/fs/signalfd.c b/trunk/fs/signalfd.c index 3b07f26d984d..f1da89203a9a 100644 --- a/trunk/fs/signalfd.c +++ b/trunk/fs/signalfd.c @@ -133,8 +133,7 @@ static unsigned int signalfd_poll(struct file *file, poll_table *wait) * the peer disconnects. */ if (signalfd_lock(ctx, &lk)) { - if ((lk.tsk == current && - next_signal(&lk.tsk->pending, &ctx->sigmask) > 0) || + if (next_signal(&lk.tsk->pending, &ctx->sigmask) > 0 || next_signal(&lk.tsk->signal->shared_pending, &ctx->sigmask) > 0) events |= POLLIN; diff --git a/trunk/fs/sync.c b/trunk/fs/sync.c index 7cd005ea7639..2f97576355b8 100644 --- a/trunk/fs/sync.c +++ b/trunk/fs/sync.c @@ -236,14 +236,6 @@ asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes, return ret; } -/* It would be nice if people remember that not all the world's an i386 - when they introduce new system calls */ -asmlinkage long sys_sync_file_range2(int fd, unsigned int flags, - loff_t offset, loff_t nbytes) -{ - return sys_sync_file_range(fd, offset, nbytes, flags); -} - /* * `endbyte' is inclusive */ diff --git a/trunk/include/asm-arm/unistd.h b/trunk/include/asm-arm/unistd.h index bfdbebebdc1b..250d7f145aca 100644 --- a/trunk/include/asm-arm/unistd.h +++ b/trunk/include/asm-arm/unistd.h @@ -367,7 +367,6 @@ #define __NR_get_robust_list (__NR_SYSCALL_BASE+339) #define __NR_splice (__NR_SYSCALL_BASE+340) #define __NR_arm_sync_file_range (__NR_SYSCALL_BASE+341) -#define __NR_sync_file_range2 __NR_arm_sync_file_range #define __NR_tee (__NR_SYSCALL_BASE+342) #define __NR_vmsplice (__NR_SYSCALL_BASE+343) #define __NR_move_pages (__NR_SYSCALL_BASE+344) diff --git a/trunk/include/asm-powerpc/systbl.h b/trunk/include/asm-powerpc/systbl.h index 1cc3f9cb6f4e..700ca5928741 100644 --- a/trunk/include/asm-powerpc/systbl.h +++ b/trunk/include/asm-powerpc/systbl.h @@ -311,4 +311,3 @@ COMPAT_SYS_SPU(utimensat) COMPAT_SYS_SPU(signalfd) COMPAT_SYS_SPU(timerfd) SYSCALL_SPU(eventfd) -COMPAT_SYS_SPU(sync_file_range2) diff --git a/trunk/include/asm-powerpc/unistd.h b/trunk/include/asm-powerpc/unistd.h index f71c6061f1ec..e3c28dc31abf 100644 --- a/trunk/include/asm-powerpc/unistd.h +++ b/trunk/include/asm-powerpc/unistd.h @@ -330,11 +330,10 @@ #define __NR_signalfd 305 #define __NR_timerfd 306 #define __NR_eventfd 307 -#define __NR_sync_file_range2 308 #ifdef __KERNEL__ -#define __NR_syscalls 309 +#define __NR_syscalls 308 #define __NR__exit __NR_exit #define NR_syscalls __NR_syscalls diff --git a/trunk/include/linux/eventfd.h b/trunk/include/linux/eventfd.h index b489fc6d0b62..0d6ecc60b94d 100644 --- a/trunk/include/linux/eventfd.h +++ b/trunk/include/linux/eventfd.h @@ -19,8 +19,7 @@ int eventfd_signal(struct file *file, int n); #else /* CONFIG_EVENTFD */ #define eventfd_fget(fd) ERR_PTR(-ENOSYS) -static inline int eventfd_signal(struct file *file, int n) -{ return 0; } +#define eventfd_signal(f, n) 0 #endif /* CONFIG_EVENTFD */ diff --git a/trunk/include/linux/syscalls.h b/trunk/include/linux/syscalls.h index 83d0ec11235e..b02070eac422 100644 --- a/trunk/include/linux/syscalls.h +++ b/trunk/include/linux/syscalls.h @@ -598,8 +598,6 @@ asmlinkage long sys_tee(int fdin, int fdout, size_t len, unsigned int flags); asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes, unsigned int flags); -asmlinkage long sys_sync_file_range2(int fd, unsigned int flags, - loff_t offset, loff_t nbytes); asmlinkage long sys_get_robust_list(int pid, struct robust_list_head __user * __user *head_ptr, size_t __user *len_ptr); diff --git a/trunk/kernel/relay.c b/trunk/kernel/relay.c index 95db8c79fe8f..4311101b0ca7 100644 --- a/trunk/kernel/relay.c +++ b/trunk/kernel/relay.c @@ -812,10 +812,7 @@ static void relay_file_read_consume(struct rchan_buf *buf, } buf->bytes_consumed += bytes_consumed; - if (!read_pos) - read_subbuf = buf->subbufs_consumed % n_subbufs; - else - read_subbuf = read_pos / buf->chan->subbuf_size; + read_subbuf = read_pos / buf->chan->subbuf_size; if (buf->bytes_consumed + buf->padding[read_subbuf] == subbuf_size) { if ((read_subbuf == buf->subbufs_produced % n_subbufs) && (buf->offset == subbuf_size)) @@ -844,9 +841,8 @@ static int relay_file_read_avail(struct rchan_buf *buf, size_t read_pos) } if (unlikely(produced - consumed >= n_subbufs)) { - consumed = produced - n_subbufs + 1; + consumed = (produced / n_subbufs) * n_subbufs; buf->subbufs_consumed = consumed; - buf->bytes_consumed = 0; } produced = (produced % n_subbufs) * subbuf_size + buf->offset; @@ -903,10 +899,7 @@ static size_t relay_file_read_start_pos(size_t read_pos, size_t read_subbuf, padding, padding_start, padding_end; size_t subbuf_size = buf->chan->subbuf_size; size_t n_subbufs = buf->chan->n_subbufs; - size_t consumed = buf->subbufs_consumed % n_subbufs; - if (!read_pos) - read_pos = consumed * subbuf_size + buf->bytes_consumed; read_subbuf = read_pos / subbuf_size; padding = buf->padding[read_subbuf]; padding_start = (read_subbuf + 1) * subbuf_size - padding; diff --git a/trunk/mm/rmap.c b/trunk/mm/rmap.c index 61e492597a0b..850165d32b7a 100644 --- a/trunk/mm/rmap.c +++ b/trunk/mm/rmap.c @@ -53,6 +53,24 @@ struct kmem_cache *anon_vma_cachep; +static inline void validate_anon_vma(struct vm_area_struct *find_vma) +{ +#ifdef CONFIG_DEBUG_VM + struct anon_vma *anon_vma = find_vma->anon_vma; + struct vm_area_struct *vma; + unsigned int mapcount = 0; + int found = 0; + + list_for_each_entry(vma, &anon_vma->head, anon_vma_node) { + mapcount++; + BUG_ON(mapcount > 100000); + if (vma == find_vma) + found = 1; + } + BUG_ON(!found); +#endif +} + /* This must be called under the mmap_sem. */ int anon_vma_prepare(struct vm_area_struct *vma) { @@ -103,8 +121,10 @@ void __anon_vma_link(struct vm_area_struct *vma) { struct anon_vma *anon_vma = vma->anon_vma; - if (anon_vma) + if (anon_vma) { list_add_tail(&vma->anon_vma_node, &anon_vma->head); + validate_anon_vma(vma); + } } void anon_vma_link(struct vm_area_struct *vma) @@ -114,6 +134,7 @@ void anon_vma_link(struct vm_area_struct *vma) if (anon_vma) { spin_lock(&anon_vma->lock); list_add_tail(&vma->anon_vma_node, &anon_vma->head); + validate_anon_vma(vma); spin_unlock(&anon_vma->lock); } } @@ -127,6 +148,7 @@ void anon_vma_unlink(struct vm_area_struct *vma) return; spin_lock(&anon_vma->lock); + validate_anon_vma(vma); list_del(&vma->anon_vma_node); /* We must garbage collect the anon_vma if it's empty */ diff --git a/trunk/scripts/checksyscalls.sh b/trunk/scripts/checksyscalls.sh index 0dcc01ce45a6..f98171f5a3df 100755 --- a/trunk/scripts/checksyscalls.sh +++ b/trunk/scripts/checksyscalls.sh @@ -99,11 +99,6 @@ cat << EOF #define __IGNORE_setfsuid32 #define __IGNORE_setfsgid32 -/* sync_file_range had a stupid ABI. Allow sync_file_range2 instead */ -#ifdef __NR_sync_file_range2 -#define __IGNORE_sync_file_range -#endif - /* Unmerged syscalls for AFS, STREAMS, etc. */ #define __IGNORE_afs_syscall #define __IGNORE_getpmsg diff --git a/trunk/sound/isa/opl3sa2.c b/trunk/sound/isa/opl3sa2.c index 4f6800b43b0e..61a323cc0e49 100644 --- a/trunk/sound/isa/opl3sa2.c +++ b/trunk/sound/isa/opl3sa2.c @@ -953,7 +953,7 @@ static int snd_opl3sa2_isa_resume(struct device *dev, unsigned int n) static struct isa_driver snd_opl3sa2_isa_driver = { .match = snd_opl3sa2_isa_match, .probe = snd_opl3sa2_isa_probe, - .remove = __devexit_p(snd_opl3sa2_isa_remove), + .remove = __devexit( snd_opl3sa2_isa_remove), #ifdef CONFIG_PM .suspend = snd_opl3sa2_isa_suspend, .resume = snd_opl3sa2_isa_resume, diff --git a/trunk/sound/pci/ice1712/prodigy192.c b/trunk/sound/pci/ice1712/prodigy192.c index 4bae7305a79b..f03c02c07743 100644 --- a/trunk/sound/pci/ice1712/prodigy192.c +++ b/trunk/sound/pci/ice1712/prodigy192.c @@ -705,7 +705,7 @@ static int ak4114_input_sw_put(struct snd_kcontrol *kcontrol, } -static struct snd_kcontrol_new ak4114_controls[] __devinitdata = { +static const struct snd_kcontrol_new ak4114_controls[] __devinitdata = { { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = "MIODIO IEC958 Capture Input",