From ea13bc1a020387a7f28deb2ef714f31566fc8522 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Mon, 4 Jun 2007 13:26:49 -0700 Subject: [PATCH] --- yaml --- r: 57333 b: refs/heads/master c: 45efebf2492187e8915e2876c5bf6f3803b1c23f h: refs/heads/master i: 57331: 593d5760d0a9f1bf81195358e26bdaa49626b48c v: v3 --- [refs] | 2 +- trunk/arch/i386/kernel/cpu/mtrr/main.c | 5 ++++- trunk/drivers/ata/Kconfig | 1 + trunk/drivers/spi/spi.c | 2 +- trunk/drivers/video/Kconfig | 6 +++--- trunk/fs/ioctl.c | 14 +++++++++++--- 6 files changed, 21 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index f720aaddbd02..64a72c14476e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6e1d91039becc9d5bcd046d8c709dbaf471220e3 +refs/heads/master: 45efebf2492187e8915e2876c5bf6f3803b1c23f diff --git a/trunk/arch/i386/kernel/cpu/mtrr/main.c b/trunk/arch/i386/kernel/cpu/mtrr/main.c index 1cf466df330a..7202b98aac4f 100644 --- a/trunk/arch/i386/kernel/cpu/mtrr/main.c +++ b/trunk/arch/i386/kernel/cpu/mtrr/main.c @@ -734,10 +734,13 @@ void mtrr_ap_init(void) */ void mtrr_save_state(void) { - if (smp_processor_id() == 0) + int cpu = get_cpu(); + + if (cpu == 0) mtrr_save_fixed_ranges(NULL); else smp_call_function_single(0, mtrr_save_fixed_ranges, NULL, 1, 1); + put_cpu(); } static int __init mtrr_init_finialize(void) diff --git a/trunk/drivers/ata/Kconfig b/trunk/drivers/ata/Kconfig index b4a8d6030e48..7d893a60f994 100644 --- a/trunk/drivers/ata/Kconfig +++ b/trunk/drivers/ata/Kconfig @@ -8,6 +8,7 @@ menuconfig ATA depends on BLOCK depends on !(M32R || M68K) || BROKEN depends on !SUN4 || BROKEN + depends on !(SPARC64 && !PCI) select SCSI ---help--- If you want to use a ATA hard disk, ATA tape drive, ATA CD-ROM or diff --git a/trunk/drivers/spi/spi.c b/trunk/drivers/spi/spi.c index c3219b29b5ac..4831edbae2d5 100644 --- a/trunk/drivers/spi/spi.c +++ b/trunk/drivers/spi/spi.c @@ -411,7 +411,7 @@ EXPORT_SYMBOL_GPL(spi_alloc_master); */ int spi_register_master(struct spi_master *master) { - static atomic_t dyn_bus_id = ATOMIC_INIT((1<<16) - 1); + static atomic_t dyn_bus_id = ATOMIC_INIT((1<<15) - 1); struct device *dev = master->cdev.dev; int status = -ENODEV; int dynamic = 0; diff --git a/trunk/drivers/video/Kconfig b/trunk/drivers/video/Kconfig index 6e1f1ea21b38..403dac787ebf 100644 --- a/trunk/drivers/video/Kconfig +++ b/trunk/drivers/video/Kconfig @@ -755,7 +755,7 @@ config FB_LEO config FB_IGA bool "IGA 168x display support" - depends on FB && SPARC32 + depends on (FB = y) && SPARC32 select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT @@ -765,7 +765,7 @@ config FB_IGA config FB_XVR500 bool "Sun XVR-500 3DLABS Wildcat support" - depends on FB && PCI && SPARC64 + depends on (FB = y) && PCI && SPARC64 select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT @@ -778,7 +778,7 @@ config FB_XVR500 config FB_XVR2500 bool "Sun XVR-2500 3DLABS Wildcat support" - depends on FB && PCI && SPARC64 + depends on (FB = y) && PCI && SPARC64 select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT diff --git a/trunk/fs/ioctl.c b/trunk/fs/ioctl.c index 479c1038ed4a..8c90cbc903fa 100644 --- a/trunk/fs/ioctl.c +++ b/trunk/fs/ioctl.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -20,6 +21,7 @@ static long do_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) { int error = -ENOTTY; + void *f; if (!filp->f_op) goto out; @@ -29,10 +31,16 @@ static long do_ioctl(struct file *filp, unsigned int cmd, if (error == -ENOIOCTLCMD) error = -EINVAL; goto out; - } else if (filp->f_op->ioctl) { + } else if ((f = filp->f_op->ioctl)) { lock_kernel(); - error = filp->f_op->ioctl(filp->f_path.dentry->d_inode, - filp, cmd, arg); + if (!filp->f_op->ioctl) { + printk("%s: ioctl %p disappeared\n", __FUNCTION__, f); + print_symbol("symbol: %s\n", (unsigned long)f); + dump_stack(); + } else { + error = filp->f_op->ioctl(filp->f_path.dentry->d_inode, + filp, cmd, arg); + } unlock_kernel(); }