From a45036a9bc93b1374b804b5c4b49b239bab83f2d Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Sun, 5 Feb 2006 20:37:53 -0700 Subject: [PATCH] --- yaml --- r: 20265 b: refs/heads/master c: f823bcae2b9f194cfc164b8cbb87d71695dec563 h: refs/heads/master i: 20263: 233c7ccb901e3250641af908c7649e392351b806 v: v3 --- [refs] | 2 +- .../powerpc/booting-without-of.txt | 60 +-- trunk/MAINTAINERS | 18 +- trunk/Makefile | 2 +- trunk/arch/arm/mach-s3c2410/mach-h1940.c | 29 +- trunk/arch/arm/mach-s3c2410/s3c2400.h | 31 -- trunk/arch/i386/kernel/head.S | 4 - trunk/arch/i386/kernel/smpboot.c | 4 + trunk/arch/i386/kernel/syscall_table.S | 2 +- trunk/arch/i386/kernel/timers/timer_tsc.c | 5 - trunk/arch/i386/mach-voyager/voyager_smp.c | 2 +- trunk/arch/ia64/ia32/ia32_signal.c | 1 - trunk/arch/ia64/kernel/entry.S | 16 - trunk/arch/ia64/kernel/fsys.S | 29 +- trunk/arch/ia64/kernel/mca_drv.c | 3 - trunk/arch/ia64/sn/kernel/io_init.c | 8 +- trunk/arch/ia64/sn/kernel/irq.c | 4 +- trunk/arch/m68k/fpsp040/bindec.S | 5 +- trunk/arch/m68k/fpsp040/binstr.S | 5 +- trunk/arch/m68k/fpsp040/bugfix.S | 5 +- trunk/arch/m68k/fpsp040/decbin.S | 5 +- trunk/arch/m68k/fpsp040/do_func.S | 5 +- trunk/arch/m68k/fpsp040/fpsp.h | 5 +- trunk/arch/m68k/fpsp040/gen_except.S | 5 +- trunk/arch/m68k/fpsp040/get_op.S | 5 +- trunk/arch/m68k/fpsp040/kernel_ex.S | 5 +- trunk/arch/m68k/fpsp040/res_func.S | 5 +- trunk/arch/m68k/fpsp040/round.S | 5 +- trunk/arch/m68k/fpsp040/sacos.S | 5 +- trunk/arch/m68k/fpsp040/sasin.S | 5 +- trunk/arch/m68k/fpsp040/satan.S | 5 +- trunk/arch/m68k/fpsp040/satanh.S | 5 +- trunk/arch/m68k/fpsp040/scale.S | 5 +- trunk/arch/m68k/fpsp040/scosh.S | 5 +- trunk/arch/m68k/fpsp040/setox.S | 5 +- trunk/arch/m68k/fpsp040/sgetem.S | 5 +- trunk/arch/m68k/fpsp040/sint.S | 5 +- trunk/arch/m68k/fpsp040/skeleton.S | 5 +- trunk/arch/m68k/fpsp040/slog2.S | 5 +- trunk/arch/m68k/fpsp040/slogn.S | 5 +- trunk/arch/m68k/fpsp040/smovecr.S | 5 +- trunk/arch/m68k/fpsp040/srem_mod.S | 5 +- trunk/arch/m68k/fpsp040/ssin.S | 5 +- trunk/arch/m68k/fpsp040/ssinh.S | 5 +- trunk/arch/m68k/fpsp040/stan.S | 5 +- trunk/arch/m68k/fpsp040/stanh.S | 5 +- trunk/arch/m68k/fpsp040/sto_res.S | 5 +- trunk/arch/m68k/fpsp040/stwotox.S | 5 +- trunk/arch/m68k/fpsp040/tbldo.S | 5 +- trunk/arch/m68k/fpsp040/util.S | 5 +- trunk/arch/m68k/fpsp040/x_bsun.S | 5 +- trunk/arch/m68k/fpsp040/x_fline.S | 5 +- trunk/arch/m68k/fpsp040/x_operr.S | 5 +- trunk/arch/m68k/fpsp040/x_ovfl.S | 5 +- trunk/arch/m68k/fpsp040/x_snan.S | 5 +- trunk/arch/m68k/fpsp040/x_store.S | 5 +- trunk/arch/m68k/fpsp040/x_unfl.S | 5 +- trunk/arch/m68k/fpsp040/x_unimp.S | 5 +- trunk/arch/m68k/fpsp040/x_unsupp.S | 5 +- trunk/arch/mips/kernel/scall32-o32.S | 2 +- trunk/arch/powerpc/Kconfig | 6 - trunk/arch/powerpc/Makefile | 3 - trunk/arch/powerpc/kernel/Makefile | 6 +- trunk/arch/powerpc/kernel/systbl.S | 3 +- trunk/arch/ppc/kernel/misc.S | 283 +++++++++++ trunk/arch/s390/defconfig | 9 +- trunk/arch/s390/kernel/compat_linux.c | 20 - trunk/arch/s390/kernel/compat_signal.c | 3 + trunk/arch/s390/kernel/compat_wrapper.S | 13 +- trunk/arch/s390/kernel/machine_kexec.c | 5 +- trunk/arch/s390/kernel/smp.c | 6 +- trunk/arch/s390/kernel/syscalls.S | 3 +- trunk/arch/sparc/kernel/systbls.S | 2 +- trunk/arch/sparc64/kernel/sys_sparc32.c | 21 - trunk/arch/sparc64/kernel/systbls.S | 4 +- trunk/arch/x86_64/ia32/ia32entry.S | 2 +- trunk/arch/x86_64/ia32/sys_ia32.c | 22 - trunk/arch/x86_64/kernel/apic.c | 2 +- trunk/arch/x86_64/kernel/pci-gart.c | 6 +- trunk/arch/x86_64/kernel/time.c | 12 +- trunk/arch/x86_64/kernel/traps.c | 18 +- trunk/drivers/bluetooth/bt3c_cs.c | 17 +- trunk/drivers/char/drm/drm_pciids.h | 1 + trunk/drivers/char/tipar.c | 15 +- trunk/drivers/char/tty_io.c | 30 +- trunk/drivers/char/watchdog/pcwd.c | 450 +++++++++--------- trunk/drivers/char/watchdog/sa1100_wdt.c | 12 +- trunk/drivers/cpufreq/cpufreq.c | 110 +++-- trunk/drivers/net/appletalk/cops.h | 2 +- trunk/drivers/net/wireless/Kconfig | 2 +- trunk/drivers/net/wireless/orinoco_cs.c | 1 - trunk/drivers/parisc/ccio-dma.c | 160 +++---- trunk/drivers/s390/char/sclp.c | 13 +- trunk/drivers/s390/cio/chsc.c | 10 +- trunk/drivers/scsi/sata_mv.c | 11 +- trunk/drivers/scsi/sata_sil.c | 10 +- trunk/drivers/serial/ioc4_serial.c | 14 + trunk/drivers/video/Kconfig | 5 + trunk/drivers/video/fbmem.c | 2 - trunk/drivers/video/nvidia/nvidia.c | 2 - trunk/fs/compat.c | 37 +- trunk/fs/reiserfs/super.c | 2 + trunk/fs/reiserfs/xattr_acl.c | 3 +- trunk/fs/select.c | 32 +- trunk/fs/stat.c | 22 - .../asm-arm/arch-s3c2410/h1940-latch.h | 64 --- trunk/include/asm-i386/unistd.h | 2 +- trunk/include/asm-ia64/unistd.h | 17 +- trunk/include/asm-powerpc/unistd.h | 3 +- trunk/include/asm-s390/bitops.h | 4 +- trunk/include/asm-s390/setup.h | 10 +- trunk/include/asm-s390/smp.h | 1 - trunk/include/asm-s390/unistd.h | 7 +- trunk/include/asm-sparc/unistd.h | 2 +- trunk/include/asm-sparc64/unistd.h | 2 +- trunk/include/asm-x86_64/hpet.h | 2 - trunk/include/asm-x86_64/ia32_unistd.h | 2 +- trunk/include/linux/compat.h | 20 - trunk/include/linux/cpumask.h | 2 +- trunk/include/linux/kbd_kern.h | 4 +- trunk/include/linux/kexec.h | 1 - trunk/include/linux/netlink.h | 3 +- trunk/include/linux/pci_ids.h | 1 - trunk/include/linux/sched.h | 2 +- trunk/include/linux/syscalls.h | 2 - trunk/include/linux/time.h | 25 +- trunk/include/linux/tty.h | 2 - trunk/include/linux/tty_flip.h | 4 +- trunk/include/net/bluetooth/rfcomm.h | 2 +- trunk/include/net/irda/irda.h | 6 +- trunk/include/net/irda/irlap.h | 3 - trunk/init/initramfs.c | 24 +- trunk/init/main.c | 1 + trunk/ipc/mqueue.c | 3 +- trunk/ipc/shm.c | 1 - trunk/kernel/panic.c | 1 - trunk/kernel/sched.c | 129 ++++- trunk/kernel/signal.c | 9 +- trunk/mm/slab.c | 10 +- trunk/mm/vmscan.c | 106 ++--- trunk/net/802/p8023.c | 2 - trunk/net/atm/signaling.c | 3 +- trunk/net/bluetooth/hci_sock.c | 10 +- trunk/net/bluetooth/rfcomm/core.c | 13 +- trunk/net/bridge/br_if.c | 94 ++-- trunk/net/bridge/br_input.c | 19 +- trunk/net/bridge/br_netfilter.c | 57 +-- trunk/net/bridge/br_private.h | 6 +- trunk/net/bridge/br_stp_bpdu.c | 30 +- trunk/net/bridge/br_sysfs_if.c | 50 +- trunk/net/core/datagram.c | 81 ++-- trunk/net/core/rtnetlink.c | 2 +- trunk/net/ipv4/devinet.c | 2 +- trunk/net/ipv4/fib_semantics.c | 2 +- trunk/net/ipv4/icmp.c | 2 +- trunk/net/ipv4/tcp_input.c | 3 +- trunk/net/ipv6/raw.c | 5 +- trunk/net/irda/irda_device.c | 4 +- trunk/net/irda/irnet/irnet_irda.c | 2 +- trunk/net/netfilter/Kconfig | 4 +- trunk/net/netlink/af_netlink.c | 7 +- trunk/net/netlink/genetlink.c | 11 +- trunk/net/xfrm/xfrm_policy.c | 4 +- trunk/scripts/kconfig/Makefile | 12 +- 164 files changed, 1303 insertions(+), 1443 deletions(-) delete mode 100644 trunk/arch/arm/mach-s3c2410/s3c2400.h delete mode 100644 trunk/include/asm-arm/arch-s3c2410/h1940-latch.h diff --git a/[refs] b/[refs] index 2b20902e37f4..26c76827ba25 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 934a3595b30c986bab52bc9c08d12c8962c88c8a +refs/heads/master: f823bcae2b9f194cfc164b8cbb87d71695dec563 diff --git a/trunk/Documentation/powerpc/booting-without-of.txt b/trunk/Documentation/powerpc/booting-without-of.txt index d02c64953dcd..54e5f9b1536d 100644 --- a/trunk/Documentation/powerpc/booting-without-of.txt +++ b/trunk/Documentation/powerpc/booting-without-of.txt @@ -44,6 +44,7 @@ compiler and the textural representation of the tree that can be "compiled" by dtc. + November 21, 2005: Rev 0.5 - Additions/generalizations for 32-bit - Changed to reflect the new arch/powerpc @@ -1306,65 +1307,6 @@ platforms are moved over to use the flattened-device-tree model. }; - f) Freescale SOC USB controllers - - The device node for a USB controller that is part of a Freescale - SOC is as described in the document "Open Firmware Recommended - Practice : Universal Serial Bus" with the following modifications - and additions : - - Required properties : - - compatible : Should be "fsl-usb2-mph" for multi port host usb - controllers, or "fsl-usb2-dr" for dual role usb controllers - - phy_type : For multi port host usb controllers, should be one of - "ulpi", or "serial". For dual role usb controllers, should be - one of "ulpi", "utmi", "utmi_wide", or "serial". - - reg : Offset and length of the register set for the device - - port0 : boolean; if defined, indicates port0 is connected for - fsl-usb2-mph compatible controllers. Either this property or - "port1" (or both) must be defined for "fsl-usb2-mph" compatible - controllers. - - port1 : boolean; if defined, indicates port1 is connected for - fsl-usb2-mph compatible controllers. Either this property or - "port0" (or both) must be defined for "fsl-usb2-mph" compatible - controllers. - - Recommended properties : - - interrupts : where a is the interrupt number and b is a - field that represents an encoding of the sense and level - information for the interrupt. This should be encoded based on - the information in section 2) depending on the type of interrupt - controller you have. - - interrupt-parent : the phandle for the interrupt controller that - services interrupts for this device. - - Example multi port host usb controller device node : - usb@22000 { - device_type = "usb"; - compatible = "fsl-usb2-mph"; - reg = <22000 1000>; - #address-cells = <1>; - #size-cells = <0>; - interrupt-parent = <700>; - interrupts = <27 1>; - phy_type = "ulpi"; - port0; - port1; - }; - - Example dual role usb controller device node : - usb@23000 { - device_type = "usb"; - compatible = "fsl-usb2-dr"; - reg = <23000 1000>; - #address-cells = <1>; - #size-cells = <0>; - interrupt-parent = <700>; - interrupts = <26 1>; - phy = "ulpi"; - }; - - More devices will be defined as this spec matures. diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index 9c592aa0280c..b22db521cec1 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -2232,23 +2232,7 @@ P: Martin Schwidefsky M: schwidefsky@de.ibm.com M: linux390@de.ibm.com L: linux-390@vm.marist.edu -W: http://www.ibm.com/developerworks/linux/linux390/ -S: Supported - -S390 NETWORK DRIVERS -P: Frank Pavlic -M: fpavlic@de.ibm.com -M: linux390@de.ibm.com -L: linux-390@vm.marist.edu -W: http://www.ibm.com/developerworks/linux/linux390/ -S: Supported - -S390 ZFCP DRIVER -P: Andreas Herrmann -M: aherrman@de.ibm.com -M: linux390@de.ibm.com -L: linux-390@vm.marist.edu -W: http://www.ibm.com/developerworks/linux/linux390/ +W: http://oss.software.ibm.com/developerworks/opensource/linux390 S: Supported SAA7146 VIDEO4LINUX-2 DRIVER diff --git a/trunk/Makefile b/trunk/Makefile index 74d67b2c35d9..a1158d1c051e 100644 --- a/trunk/Makefile +++ b/trunk/Makefile @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 16 -EXTRAVERSION =-rc3 +EXTRAVERSION =-rc2 NAME=Sliding Snow Leopard # *DOCUMENTATION* diff --git a/trunk/arch/arm/mach-s3c2410/mach-h1940.c b/trunk/arch/arm/mach-s3c2410/mach-h1940.c index 646a3a5d33a5..1c316f14ed94 100644 --- a/trunk/arch/arm/mach-s3c2410/mach-h1940.c +++ b/trunk/arch/arm/mach-s3c2410/mach-h1940.c @@ -46,11 +46,10 @@ #include #include - +//#include #include #include -#include #include #include @@ -60,12 +59,7 @@ #include "cpu.h" static struct map_desc h1940_iodesc[] __initdata = { - [0] = { - .virtual = (unsigned long)H1940_LATCH, - .pfn = __phys_to_pfn(H1940_PA_LATCH), - .length = SZ_16K, - .type = MT_DEVICE - }, + /* nothing here yet */ }; #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK @@ -98,25 +92,6 @@ static struct s3c2410_uartcfg h1940_uartcfgs[] = { } }; -/* Board control latch control */ - -static unsigned int latch_state = H1940_LATCH_DEFAULT; - -void h1940_latch_control(unsigned int clear, unsigned int set) -{ - unsigned long flags; - - local_irq_save(flags); - - latch_state &= ~clear; - latch_state |= set; - - __raw_writel(latch_state, H1940_LATCH); - - local_irq_restore(flags); -} - -EXPORT_SYMBOL_GPL(h1940_latch_control); /** diff --git a/trunk/arch/arm/mach-s3c2410/s3c2400.h b/trunk/arch/arm/mach-s3c2410/s3c2400.h deleted file mode 100644 index 8b2394e1ed40..000000000000 --- a/trunk/arch/arm/mach-s3c2410/s3c2400.h +++ /dev/null @@ -1,31 +0,0 @@ -/* arch/arm/mach-s3c2410/s3c2400.h - * - * Copyright (c) 2004 Simtec Electronics - * Ben Dooks - * - * Header file for S3C2400 cpu support - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Modifications: - * 09-Fev-2006 LCVR First version, based on s3c2410.h -*/ - -#ifdef CONFIG_CPU_S3C2400 - -extern int s3c2400_init(void); - -extern void s3c2400_map_io(struct map_desc *mach_desc, int size); - -extern void s3c2400_init_uarts(struct s3c2410_uartcfg *cfg, int no); - -extern void s3c2400_init_clocks(int xtal); - -#else -#define s3c2400_init_clocks NULL -#define s3c2400_init_uarts NULL -#define s3c2400_map_io NULL -#define s3c2400_init NULL -#endif diff --git a/trunk/arch/i386/kernel/head.S b/trunk/arch/i386/kernel/head.S index 2bee6499edd9..5884469f6bfe 100644 --- a/trunk/arch/i386/kernel/head.S +++ b/trunk/arch/i386/kernel/head.S @@ -398,11 +398,7 @@ ignore_int: pushl 32(%esp) pushl 40(%esp) pushl $int_msg -#ifdef CONFIG_EARLY_PRINTK - call early_printk -#else call printk -#endif addl $(5*4),%esp popl %ds popl %es diff --git a/trunk/arch/i386/kernel/smpboot.c b/trunk/arch/i386/kernel/smpboot.c index fb00ab7b7612..255adb498268 100644 --- a/trunk/arch/i386/kernel/smpboot.c +++ b/trunk/arch/i386/kernel/smpboot.c @@ -87,7 +87,11 @@ EXPORT_SYMBOL(cpu_online_map); cpumask_t cpu_callin_map; cpumask_t cpu_callout_map; EXPORT_SYMBOL(cpu_callout_map); +#ifdef CONFIG_HOTPLUG_CPU +cpumask_t cpu_possible_map = CPU_MASK_ALL; +#else cpumask_t cpu_possible_map; +#endif EXPORT_SYMBOL(cpu_possible_map); static cpumask_t smp_commenced_mask; diff --git a/trunk/arch/i386/kernel/syscall_table.S b/trunk/arch/i386/kernel/syscall_table.S index ac687d00a1ce..5a8b3fb6d27b 100644 --- a/trunk/arch/i386/kernel/syscall_table.S +++ b/trunk/arch/i386/kernel/syscall_table.S @@ -299,7 +299,7 @@ ENTRY(sys_call_table) .long sys_mknodat .long sys_fchownat .long sys_futimesat - .long sys_fstatat64 /* 300 */ + .long sys_newfstatat /* 300 */ .long sys_unlinkat .long sys_renameat .long sys_linkat diff --git a/trunk/arch/i386/kernel/timers/timer_tsc.c b/trunk/arch/i386/kernel/timers/timer_tsc.c index a7f5a2aceba2..7c86e3c5f1c1 100644 --- a/trunk/arch/i386/kernel/timers/timer_tsc.c +++ b/trunk/arch/i386/kernel/timers/timer_tsc.c @@ -282,10 +282,6 @@ time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, if (val != CPUFREQ_RESUMECHANGE) write_seqlock_irq(&xtime_lock); if (!ref_freq) { - if (!freq->old){ - ref_freq = freq->new; - goto end; - } ref_freq = freq->old; loops_per_jiffy_ref = cpu_data[freq->cpu].loops_per_jiffy; #ifndef CONFIG_SMP @@ -311,7 +307,6 @@ time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, #endif } -end: if (val != CPUFREQ_RESUMECHANGE) write_sequnlock_irq(&xtime_lock); diff --git a/trunk/arch/i386/mach-voyager/voyager_smp.c b/trunk/arch/i386/mach-voyager/voyager_smp.c index 6e4c3baef6cc..72a1b9cae2e4 100644 --- a/trunk/arch/i386/mach-voyager/voyager_smp.c +++ b/trunk/arch/i386/mach-voyager/voyager_smp.c @@ -240,7 +240,7 @@ static cpumask_t smp_commenced_mask = CPU_MASK_NONE; cpumask_t cpu_callin_map = CPU_MASK_NONE; cpumask_t cpu_callout_map = CPU_MASK_NONE; EXPORT_SYMBOL(cpu_callout_map); -cpumask_t cpu_possible_map = CPU_MASK_NONE; +cpumask_t cpu_possible_map = CPU_MASK_ALL; EXPORT_SYMBOL(cpu_possible_map); /* The per processor IRQ masks (these are usually kept in sync) */ diff --git a/trunk/arch/ia64/ia32/ia32_signal.c b/trunk/arch/ia64/ia32/ia32_signal.c index b3355a9ca2c3..5856510210fa 100644 --- a/trunk/arch/ia64/ia32/ia32_signal.c +++ b/trunk/arch/ia64/ia32/ia32_signal.c @@ -515,7 +515,6 @@ sys32_signal (int sig, unsigned int handler) sigact_set_handler(&new_sa, handler, 0); new_sa.sa.sa_flags = SA_ONESHOT | SA_NOMASK; - sigemptyset(&new_sa.sa.sa_mask); ret = do_sigaction(sig, &new_sa, &old_sa); diff --git a/trunk/arch/ia64/kernel/entry.S b/trunk/arch/ia64/kernel/entry.S index 27b222c277e4..7a6ffd613789 100644 --- a/trunk/arch/ia64/kernel/entry.S +++ b/trunk/arch/ia64/kernel/entry.S @@ -1601,21 +1601,5 @@ sys_call_table: data8 sys_inotify_add_watch data8 sys_inotify_rm_watch data8 sys_migrate_pages // 1280 - data8 sys_openat - data8 sys_mkdirat - data8 sys_mknodat - data8 sys_fchownat - data8 sys_futimesat // 1285 - data8 sys_newfstatat - data8 sys_unlinkat - data8 sys_renameat - data8 sys_linkat - data8 sys_symlinkat // 1290 - data8 sys_readlinkat - data8 sys_fchmodat - data8 sys_faccessat - data8 sys_ni_syscall // reserved for pselect - data8 sys_ni_syscall // 1295 reserved for ppoll - data8 sys_unshare .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls diff --git a/trunk/arch/ia64/kernel/fsys.S b/trunk/arch/ia64/kernel/fsys.S index ac6055c83115..ce423910ca97 100644 --- a/trunk/arch/ia64/kernel/fsys.S +++ b/trunk/arch/ia64/kernel/fsys.S @@ -878,8 +878,31 @@ fsyscall_table: data8 0 // timer_delete data8 0 // clock_settime data8 fsys_clock_gettime // clock_gettime - #define __NR_syscall_last 1255 - - .space 8*(NR_syscalls + 1024 - __NR_syscall_last), 0 + data8 0 // clock_getres // 1255 + data8 0 // clock_nanosleep + data8 0 // fstatfs64 + data8 0 // statfs64 + data8 0 + data8 0 // 1260 + data8 0 + data8 0 // mq_open + data8 0 // mq_unlink + data8 0 // mq_timedsend + data8 0 // mq_timedreceive // 1265 + data8 0 // mq_notify + data8 0 // mq_getsetattr + data8 0 // kexec_load + data8 0 + data8 0 // 1270 + data8 0 + data8 0 + data8 0 + data8 0 + data8 0 // 1275 + data8 0 + data8 0 + data8 0 + data8 0 + data8 0 // 1280 .org fsyscall_table + 8*NR_syscalls // guard against failures to increase NR_syscalls diff --git a/trunk/arch/ia64/kernel/mca_drv.c b/trunk/arch/ia64/kernel/mca_drv.c index 8fd93afa75a7..3492e3211a44 100644 --- a/trunk/arch/ia64/kernel/mca_drv.c +++ b/trunk/arch/ia64/kernel/mca_drv.c @@ -437,9 +437,6 @@ recover_from_read_error(slidx_table_t *slidx, * the process not have any locks of kernel. */ - /* Is minstate valid? */ - if (!peidx_bottom(peidx) || !(peidx_bottom(peidx)->valid.minstate)) - return 0; psr1 =(struct ia64_psr *)&(peidx_minstate_area(peidx)->pmsa_ipsr); /* diff --git a/trunk/arch/ia64/sn/kernel/io_init.c b/trunk/arch/ia64/sn/kernel/io_init.c index 3437c2390429..d7e4d79e16a8 100644 --- a/trunk/arch/ia64/sn/kernel/io_init.c +++ b/trunk/arch/ia64/sn/kernel/io_init.c @@ -617,15 +617,15 @@ void sn_bus_store_sysdata(struct pci_dev *dev) void sn_bus_free_sysdata(void) { struct sysdata_el *element; - struct list_head *list, *safe; + struct list_head *list; - list_for_each_safe(list, safe, &sn_sysdata_list) { +sn_sysdata_free_start: + list_for_each(list, &sn_sysdata_list) { element = list_entry(list, struct sysdata_el, entry); list_del(&element->entry); - list_del(&(((struct pcidev_info *) - (element->sysdata))->pdi_list)); kfree(element->sysdata); kfree(element); + goto sn_sysdata_free_start; } return; } diff --git a/trunk/arch/ia64/sn/kernel/irq.c b/trunk/arch/ia64/sn/kernel/irq.c index c373113d073a..74d87d903d5d 100644 --- a/trunk/arch/ia64/sn/kernel/irq.c +++ b/trunk/arch/ia64/sn/kernel/irq.c @@ -299,9 +299,7 @@ void sn_irq_unfixup(struct pci_dev *pci_dev) return; sn_irq_info = SN_PCIDEV_INFO(pci_dev)->pdi_sn_irq_info; - if (!sn_irq_info) - return; - if (!sn_irq_info->irq_irq) { + if (!sn_irq_info || !sn_irq_info->irq_irq) { kfree(sn_irq_info); return; } diff --git a/trunk/arch/m68k/fpsp040/bindec.S b/trunk/arch/m68k/fpsp040/bindec.S index 72f1159cb804..3ba446a99a12 100644 --- a/trunk/arch/m68k/fpsp040/bindec.S +++ b/trunk/arch/m68k/fpsp040/bindec.S @@ -131,8 +131,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. |BINDEC idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/binstr.S b/trunk/arch/m68k/fpsp040/binstr.S index 8a05ba92a8a0..d53555c0a2b6 100644 --- a/trunk/arch/m68k/fpsp040/binstr.S +++ b/trunk/arch/m68k/fpsp040/binstr.S @@ -60,8 +60,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. |BINSTR idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/bugfix.S b/trunk/arch/m68k/fpsp040/bugfix.S index 3bb9c84bb058..942c4f6f4fd1 100644 --- a/trunk/arch/m68k/fpsp040/bugfix.S +++ b/trunk/arch/m68k/fpsp040/bugfix.S @@ -152,8 +152,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. |BUGFIX idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/decbin.S b/trunk/arch/m68k/fpsp040/decbin.S index 16ed796bad87..2160609e328d 100644 --- a/trunk/arch/m68k/fpsp040/decbin.S +++ b/trunk/arch/m68k/fpsp040/decbin.S @@ -69,8 +69,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. |DECBIN idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/do_func.S b/trunk/arch/m68k/fpsp040/do_func.S index 3eff99a80413..81f6a9856dce 100644 --- a/trunk/arch/m68k/fpsp040/do_func.S +++ b/trunk/arch/m68k/fpsp040/do_func.S @@ -22,8 +22,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. DO_FUNC: |idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/fpsp.h b/trunk/arch/m68k/fpsp040/fpsp.h index 5df4cd772934..984a4eb8010a 100644 --- a/trunk/arch/m68k/fpsp040/fpsp.h +++ b/trunk/arch/m68k/fpsp040/fpsp.h @@ -5,8 +5,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. | fpsp.h --- stack frame offsets during FPSP exception handling | diff --git a/trunk/arch/m68k/fpsp040/gen_except.S b/trunk/arch/m68k/fpsp040/gen_except.S index 3642cb7e3641..401d06f39f73 100644 --- a/trunk/arch/m68k/fpsp040/gen_except.S +++ b/trunk/arch/m68k/fpsp040/gen_except.S @@ -29,8 +29,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. GEN_EXCEPT: |idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/get_op.S b/trunk/arch/m68k/fpsp040/get_op.S index 64c36d79ef83..c7c2f3727425 100644 --- a/trunk/arch/m68k/fpsp040/get_op.S +++ b/trunk/arch/m68k/fpsp040/get_op.S @@ -54,8 +54,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. GET_OP: |idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/kernel_ex.S b/trunk/arch/m68k/fpsp040/kernel_ex.S index 45bcf3455d34..476b711967ce 100644 --- a/trunk/arch/m68k/fpsp040/kernel_ex.S +++ b/trunk/arch/m68k/fpsp040/kernel_ex.S @@ -12,8 +12,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. KERNEL_EX: |idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/res_func.S b/trunk/arch/m68k/fpsp040/res_func.S index d9cdf4383545..8f6b95217865 100644 --- a/trunk/arch/m68k/fpsp040/res_func.S +++ b/trunk/arch/m68k/fpsp040/res_func.S @@ -16,8 +16,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. RES_FUNC: |idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/round.S b/trunk/arch/m68k/fpsp040/round.S index f84ae0dd4358..00f98068783f 100644 --- a/trunk/arch/m68k/fpsp040/round.S +++ b/trunk/arch/m68k/fpsp040/round.S @@ -8,8 +8,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. |ROUND idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/sacos.S b/trunk/arch/m68k/fpsp040/sacos.S index 513c7cca7318..83b00ab1c48f 100644 --- a/trunk/arch/m68k/fpsp040/sacos.S +++ b/trunk/arch/m68k/fpsp040/sacos.S @@ -38,8 +38,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. |SACOS idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/sasin.S b/trunk/arch/m68k/fpsp040/sasin.S index 2a269a58ceaa..5647a6043903 100644 --- a/trunk/arch/m68k/fpsp040/sasin.S +++ b/trunk/arch/m68k/fpsp040/sasin.S @@ -38,8 +38,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. |SASIN idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/satan.S b/trunk/arch/m68k/fpsp040/satan.S index c8a664998f92..20dae222d51e 100644 --- a/trunk/arch/m68k/fpsp040/satan.S +++ b/trunk/arch/m68k/fpsp040/satan.S @@ -43,8 +43,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. |satan idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/satanh.S b/trunk/arch/m68k/fpsp040/satanh.S index ba91f77a7571..20f07810bcda 100644 --- a/trunk/arch/m68k/fpsp040/satanh.S +++ b/trunk/arch/m68k/fpsp040/satanh.S @@ -45,8 +45,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. |satanh idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/scale.S b/trunk/arch/m68k/fpsp040/scale.S index 04829dd4f1f4..5c9b805265f2 100644 --- a/trunk/arch/m68k/fpsp040/scale.S +++ b/trunk/arch/m68k/fpsp040/scale.S @@ -21,8 +21,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. |SCALE idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/scosh.S b/trunk/arch/m68k/fpsp040/scosh.S index 07d3a4d7c86d..e81edbb87642 100644 --- a/trunk/arch/m68k/fpsp040/scosh.S +++ b/trunk/arch/m68k/fpsp040/scosh.S @@ -49,8 +49,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. |SCOSH idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/setox.S b/trunk/arch/m68k/fpsp040/setox.S index 145af5447581..0aa75f9bf7d1 100644 --- a/trunk/arch/m68k/fpsp040/setox.S +++ b/trunk/arch/m68k/fpsp040/setox.S @@ -331,8 +331,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. |setox idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/sgetem.S b/trunk/arch/m68k/fpsp040/sgetem.S index d9234f4aed57..0fcbd045ba75 100644 --- a/trunk/arch/m68k/fpsp040/sgetem.S +++ b/trunk/arch/m68k/fpsp040/sgetem.S @@ -24,8 +24,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. |SGETEM idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/sint.S b/trunk/arch/m68k/fpsp040/sint.S index 0e92d4e5d231..0f9bd28e55a0 100644 --- a/trunk/arch/m68k/fpsp040/sint.S +++ b/trunk/arch/m68k/fpsp040/sint.S @@ -51,8 +51,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. |SINT idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/skeleton.S b/trunk/arch/m68k/fpsp040/skeleton.S index a8f41615d94a..a1629194e3fd 100644 --- a/trunk/arch/m68k/fpsp040/skeleton.S +++ b/trunk/arch/m68k/fpsp040/skeleton.S @@ -30,8 +30,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. | | Modified for Linux-1.3.x by Jes Sorensen (jds@kom.auc.dk) diff --git a/trunk/arch/m68k/fpsp040/slog2.S b/trunk/arch/m68k/fpsp040/slog2.S index fac2c738382e..517fa4563246 100644 --- a/trunk/arch/m68k/fpsp040/slog2.S +++ b/trunk/arch/m68k/fpsp040/slog2.S @@ -96,8 +96,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. |SLOG2 idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/slogn.S b/trunk/arch/m68k/fpsp040/slogn.S index d98eaf641ec4..2aaa0725c035 100644 --- a/trunk/arch/m68k/fpsp040/slogn.S +++ b/trunk/arch/m68k/fpsp040/slogn.S @@ -63,8 +63,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. |slogn idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/smovecr.S b/trunk/arch/m68k/fpsp040/smovecr.S index 73c36512081b..a0127fa55e9c 100644 --- a/trunk/arch/m68k/fpsp040/smovecr.S +++ b/trunk/arch/m68k/fpsp040/smovecr.S @@ -15,8 +15,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. |SMOVECR idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/srem_mod.S b/trunk/arch/m68k/fpsp040/srem_mod.S index a27e70c9a0eb..8c8d7f50cc68 100644 --- a/trunk/arch/m68k/fpsp040/srem_mod.S +++ b/trunk/arch/m68k/fpsp040/srem_mod.S @@ -66,8 +66,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. SREM_MOD: |idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/ssin.S b/trunk/arch/m68k/fpsp040/ssin.S index a1ef8e01bf06..043c91cdd657 100644 --- a/trunk/arch/m68k/fpsp040/ssin.S +++ b/trunk/arch/m68k/fpsp040/ssin.S @@ -83,8 +83,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. |SSIN idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/ssinh.S b/trunk/arch/m68k/fpsp040/ssinh.S index 8a560edc7653..c8b3308bb143 100644 --- a/trunk/arch/m68k/fpsp040/ssinh.S +++ b/trunk/arch/m68k/fpsp040/ssinh.S @@ -49,8 +49,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. |SSINH idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/stan.S b/trunk/arch/m68k/fpsp040/stan.S index f8553aaececb..b5c2a196e617 100644 --- a/trunk/arch/m68k/fpsp040/stan.S +++ b/trunk/arch/m68k/fpsp040/stan.S @@ -50,8 +50,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. |STAN idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/stanh.S b/trunk/arch/m68k/fpsp040/stanh.S index 7e12e59ee8c7..33b009802243 100644 --- a/trunk/arch/m68k/fpsp040/stanh.S +++ b/trunk/arch/m68k/fpsp040/stanh.S @@ -49,8 +49,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. |STANH idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/sto_res.S b/trunk/arch/m68k/fpsp040/sto_res.S index 484b47d4eaad..0cdca3b060ad 100644 --- a/trunk/arch/m68k/fpsp040/sto_res.S +++ b/trunk/arch/m68k/fpsp040/sto_res.S @@ -19,8 +19,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. STO_RES: |idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/stwotox.S b/trunk/arch/m68k/fpsp040/stwotox.S index 0d5e6a1436a6..4e3c1407d3df 100644 --- a/trunk/arch/m68k/fpsp040/stwotox.S +++ b/trunk/arch/m68k/fpsp040/stwotox.S @@ -76,8 +76,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. |STWOTOX idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/tbldo.S b/trunk/arch/m68k/fpsp040/tbldo.S index fd5c37a5a2b9..fe60cf4d20d7 100644 --- a/trunk/arch/m68k/fpsp040/tbldo.S +++ b/trunk/arch/m68k/fpsp040/tbldo.S @@ -17,8 +17,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. |TBLDO idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/util.S b/trunk/arch/m68k/fpsp040/util.S index 65b26fa88c60..452f3d65857b 100644 --- a/trunk/arch/m68k/fpsp040/util.S +++ b/trunk/arch/m68k/fpsp040/util.S @@ -16,8 +16,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. |UTIL idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/x_bsun.S b/trunk/arch/m68k/fpsp040/x_bsun.S index d5a576bfac79..039247b09c8b 100644 --- a/trunk/arch/m68k/fpsp040/x_bsun.S +++ b/trunk/arch/m68k/fpsp040/x_bsun.S @@ -13,8 +13,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. X_BSUN: |idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/x_fline.S b/trunk/arch/m68k/fpsp040/x_fline.S index 264e126d1db7..3917710b0fde 100644 --- a/trunk/arch/m68k/fpsp040/x_fline.S +++ b/trunk/arch/m68k/fpsp040/x_fline.S @@ -13,8 +13,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. X_FLINE: |idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/x_operr.S b/trunk/arch/m68k/fpsp040/x_operr.S index e2c371c3a45d..b0f54bcb49a7 100644 --- a/trunk/arch/m68k/fpsp040/x_operr.S +++ b/trunk/arch/m68k/fpsp040/x_operr.S @@ -43,8 +43,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. X_OPERR: |idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/x_ovfl.S b/trunk/arch/m68k/fpsp040/x_ovfl.S index 6fe4989ee31f..22cb8b42c7b6 100644 --- a/trunk/arch/m68k/fpsp040/x_ovfl.S +++ b/trunk/arch/m68k/fpsp040/x_ovfl.S @@ -35,8 +35,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. X_OVFL: |idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/x_snan.S b/trunk/arch/m68k/fpsp040/x_snan.S index 4ed766416378..039af573312e 100644 --- a/trunk/arch/m68k/fpsp040/x_snan.S +++ b/trunk/arch/m68k/fpsp040/x_snan.S @@ -22,8 +22,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. X_SNAN: |idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/x_store.S b/trunk/arch/m68k/fpsp040/x_store.S index 402dc0c0ebc0..4282fa67d449 100644 --- a/trunk/arch/m68k/fpsp040/x_store.S +++ b/trunk/arch/m68k/fpsp040/x_store.S @@ -11,8 +11,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. X_STORE: |idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/x_unfl.S b/trunk/arch/m68k/fpsp040/x_unfl.S index eb772ff3b812..077fcc230fcc 100644 --- a/trunk/arch/m68k/fpsp040/x_unfl.S +++ b/trunk/arch/m68k/fpsp040/x_unfl.S @@ -21,8 +21,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. X_UNFL: |idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/x_unimp.S b/trunk/arch/m68k/fpsp040/x_unimp.S index 6f382b21228b..920cb9410e9e 100644 --- a/trunk/arch/m68k/fpsp040/x_unimp.S +++ b/trunk/arch/m68k/fpsp040/x_unimp.S @@ -22,8 +22,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. X_UNIMP: |idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/m68k/fpsp040/x_unsupp.S b/trunk/arch/m68k/fpsp040/x_unsupp.S index d7cf46208c62..4ec57285b683 100644 --- a/trunk/arch/m68k/fpsp040/x_unsupp.S +++ b/trunk/arch/m68k/fpsp040/x_unsupp.S @@ -23,8 +23,9 @@ | Copyright (C) Motorola, Inc. 1990 | All Rights Reserved | -| For details on the license for this file, please see the -| file, README, in this same directory. +| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA +| The copyright notice above does not evidence any +| actual or intended publication of such source code. X_UNSUPP: |idnt 2,1 | Motorola 040 Floating Point Software Package diff --git a/trunk/arch/mips/kernel/scall32-o32.S b/trunk/arch/mips/kernel/scall32-o32.S index d83e033dbc87..d7c4a38ed5ae 100644 --- a/trunk/arch/mips/kernel/scall32-o32.S +++ b/trunk/arch/mips/kernel/scall32-o32.S @@ -623,7 +623,7 @@ einval: li v0, -EINVAL sys sys_mknodat 4 /* 4290 */ sys sys_fchownat 5 sys sys_futimesat 3 - sys sys_fstatat64 4 + sys sys_newfstatat 4 sys sys_unlinkat 3 sys sys_renameat 4 /* 4295 */ sys sys_linkat 4 diff --git a/trunk/arch/powerpc/Kconfig b/trunk/arch/powerpc/Kconfig index 80d114a3a837..df338c5cc910 100644 --- a/trunk/arch/powerpc/Kconfig +++ b/trunk/arch/powerpc/Kconfig @@ -83,12 +83,6 @@ config GENERIC_TBSYNC default y if PPC32 && SMP default n -config DEFAULT_UIMAGE - bool - help - Used to allow a board to specify it wants a uImage built by default - default n - menu "Processor support" choice prompt "Processor Type" diff --git a/trunk/arch/powerpc/Makefile b/trunk/arch/powerpc/Makefile index 5500ab55d042..44dd82b791d1 100644 --- a/trunk/arch/powerpc/Makefile +++ b/trunk/arch/powerpc/Makefile @@ -142,7 +142,6 @@ drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/ # Default to zImage, override when needed defaultimage-y := zImage defaultimage-$(CONFIG_PPC_ISERIES) := vmlinux -defaultimage-$(CONFIG_DEFAULT_UIMAGE) := uImage KBUILD_IMAGE := $(defaultimage-y) all: $(KBUILD_IMAGE) @@ -168,8 +167,6 @@ endef archclean: $(Q)$(MAKE) $(clean)=$(boot) - -archmrproper: $(Q)rm -rf arch/$(ARCH)/include archprepare: checkbin diff --git a/trunk/arch/powerpc/kernel/Makefile b/trunk/arch/powerpc/kernel/Makefile index 80e9fe2632b8..c287980b7e65 100644 --- a/trunk/arch/powerpc/kernel/Makefile +++ b/trunk/arch/powerpc/kernel/Makefile @@ -12,10 +12,10 @@ endif obj-y := semaphore.o cputable.o ptrace.o syscalls.o \ irq.o align.o signal_32.o pmc.o vdso.o \ - init_task.o process.o systbl.o + init_task.o process.o obj-y += vdso32/ obj-$(CONFIG_PPC64) += setup_64.o binfmt_elf32.o sys_ppc32.o \ - signal_64.o ptrace32.o \ + signal_64.o ptrace32.o systbl.o \ paca.o cpu_setup_power4.o \ firmware.o sysfs.o idle_64.o obj-$(CONFIG_PPC64) += vdso64/ @@ -46,7 +46,7 @@ extra-$(CONFIG_8xx) := head_8xx.o extra-y += vmlinux.lds obj-y += time.o prom.o traps.o setup-common.o udbg.o -obj-$(CONFIG_PPC32) += entry_32.o setup_32.o misc_32.o +obj-$(CONFIG_PPC32) += entry_32.o setup_32.o misc_32.o systbl.o obj-$(CONFIG_PPC64) += misc_64.o dma_64.o iommu.o obj-$(CONFIG_PPC_MULTIPLATFORM) += prom_init.o obj-$(CONFIG_MODULES) += ppc_ksyms.o diff --git a/trunk/arch/powerpc/kernel/systbl.S b/trunk/arch/powerpc/kernel/systbl.S index 8a9f994ed917..007b15ee36d2 100644 --- a/trunk/arch/powerpc/kernel/systbl.S +++ b/trunk/arch/powerpc/kernel/systbl.S @@ -36,6 +36,8 @@ #ifdef CONFIG_PPC64 #define sys_sigpending sys_ni_syscall #define sys_old_getrlimit sys_ni_syscall +#else +#define ppc_rtas sys_ni_syscall #endif _GLOBAL(sys_call_table) @@ -321,4 +323,3 @@ SYSCALL(spu_run) SYSCALL(spu_create) COMPAT_SYS(pselect6) COMPAT_SYS(ppoll) -SYSCALL(unshare) diff --git a/trunk/arch/ppc/kernel/misc.S b/trunk/arch/ppc/kernel/misc.S index 5a936566fd61..c3427eed8345 100644 --- a/trunk/arch/ppc/kernel/misc.S +++ b/trunk/arch/ppc/kernel/misc.S @@ -1048,3 +1048,286 @@ _GLOBAL(name) \ blr SYSCALL(execve) + +/* Why isn't this a) automatic, b) written in 'C'? */ + .data + .align 4 +_GLOBAL(sys_call_table) + .long sys_restart_syscall /* 0 */ + .long sys_exit + .long ppc_fork + .long sys_read + .long sys_write + .long sys_open /* 5 */ + .long sys_close + .long sys_waitpid + .long sys_creat + .long sys_link + .long sys_unlink /* 10 */ + .long sys_execve + .long sys_chdir + .long sys_time + .long sys_mknod + .long sys_chmod /* 15 */ + .long sys_lchown + .long sys_ni_syscall /* old break syscall holder */ + .long sys_stat + .long sys_lseek + .long sys_getpid /* 20 */ + .long sys_mount + .long sys_oldumount + .long sys_setuid + .long sys_getuid + .long sys_stime /* 25 */ + .long sys_ptrace + .long sys_alarm + .long sys_fstat + .long sys_pause + .long sys_utime /* 30 */ + .long sys_ni_syscall /* old stty syscall holder */ + .long sys_ni_syscall /* old gtty syscall holder */ + .long sys_access + .long sys_nice + .long sys_ni_syscall /* 35 */ /* old ftime syscall holder */ + .long sys_sync + .long sys_kill + .long sys_rename + .long sys_mkdir + .long sys_rmdir /* 40 */ + .long sys_dup + .long sys_pipe + .long sys_times + .long sys_ni_syscall /* old prof syscall holder */ + .long sys_brk /* 45 */ + .long sys_setgid + .long sys_getgid + .long sys_signal + .long sys_geteuid + .long sys_getegid /* 50 */ + .long sys_acct + .long sys_umount /* recycled never used phys() */ + .long sys_ni_syscall /* old lock syscall holder */ + .long sys_ioctl + .long sys_fcntl /* 55 */ + .long sys_ni_syscall /* old mpx syscall holder */ + .long sys_setpgid + .long sys_ni_syscall /* old ulimit syscall holder */ + .long sys_olduname + .long sys_umask /* 60 */ + .long sys_chroot + .long sys_ustat + .long sys_dup2 + .long sys_getppid + .long sys_getpgrp /* 65 */ + .long sys_setsid + .long sys_sigaction + .long sys_sgetmask + .long sys_ssetmask + .long sys_setreuid /* 70 */ + .long sys_setregid + .long sys_sigsuspend + .long sys_sigpending + .long sys_sethostname + .long sys_setrlimit /* 75 */ + .long sys_old_getrlimit + .long sys_getrusage + .long sys_gettimeofday + .long sys_settimeofday + .long sys_getgroups /* 80 */ + .long sys_setgroups + .long ppc_select + .long sys_symlink + .long sys_lstat + .long sys_readlink /* 85 */ + .long sys_uselib + .long sys_swapon + .long sys_reboot + .long old_readdir + .long sys_mmap /* 90 */ + .long sys_munmap + .long sys_truncate + .long sys_ftruncate + .long sys_fchmod + .long sys_fchown /* 95 */ + .long sys_getpriority + .long sys_setpriority + .long sys_ni_syscall /* old profil syscall holder */ + .long sys_statfs + .long sys_fstatfs /* 100 */ + .long sys_ni_syscall + .long sys_socketcall + .long sys_syslog + .long sys_setitimer + .long sys_getitimer /* 105 */ + .long sys_newstat + .long sys_newlstat + .long sys_newfstat + .long sys_uname + .long sys_ni_syscall /* 110 */ + .long sys_vhangup + .long sys_ni_syscall /* old 'idle' syscall */ + .long sys_ni_syscall + .long sys_wait4 + .long sys_swapoff /* 115 */ + .long sys_sysinfo + .long sys_ipc + .long sys_fsync + .long sys_sigreturn + .long ppc_clone /* 120 */ + .long sys_setdomainname + .long sys_newuname + .long sys_ni_syscall + .long sys_adjtimex + .long sys_mprotect /* 125 */ + .long sys_sigprocmask + .long sys_ni_syscall /* old sys_create_module */ + .long sys_init_module + .long sys_delete_module + .long sys_ni_syscall /* old sys_get_kernel_syms */ /* 130 */ + .long sys_quotactl + .long sys_getpgid + .long sys_fchdir + .long sys_bdflush + .long sys_sysfs /* 135 */ + .long sys_personality + .long sys_ni_syscall /* for afs_syscall */ + .long sys_setfsuid + .long sys_setfsgid + .long sys_llseek /* 140 */ + .long sys_getdents + .long ppc_select + .long sys_flock + .long sys_msync + .long sys_readv /* 145 */ + .long sys_writev + .long sys_getsid + .long sys_fdatasync + .long sys_sysctl + .long sys_mlock /* 150 */ + .long sys_munlock + .long sys_mlockall + .long sys_munlockall + .long sys_sched_setparam + .long sys_sched_getparam /* 155 */ + .long sys_sched_setscheduler + .long sys_sched_getscheduler + .long sys_sched_yield + .long sys_sched_get_priority_max + .long sys_sched_get_priority_min /* 160 */ + .long sys_sched_rr_get_interval + .long sys_nanosleep + .long sys_mremap + .long sys_setresuid + .long sys_getresuid /* 165 */ + .long sys_ni_syscall /* old sys_query_module */ + .long sys_poll + .long sys_nfsservctl + .long sys_setresgid + .long sys_getresgid /* 170 */ + .long sys_prctl + .long sys_rt_sigreturn + .long sys_rt_sigaction + .long sys_rt_sigprocmask + .long sys_rt_sigpending /* 175 */ + .long sys_rt_sigtimedwait + .long sys_rt_sigqueueinfo + .long sys_rt_sigsuspend + .long sys_pread64 + .long sys_pwrite64 /* 180 */ + .long sys_chown + .long sys_getcwd + .long sys_capget + .long sys_capset + .long sys_sigaltstack /* 185 */ + .long sys_sendfile + .long sys_ni_syscall /* streams1 */ + .long sys_ni_syscall /* streams2 */ + .long ppc_vfork + .long sys_getrlimit /* 190 */ + .long sys_readahead + .long sys_mmap2 + .long sys_truncate64 + .long sys_ftruncate64 + .long sys_stat64 /* 195 */ + .long sys_lstat64 + .long sys_fstat64 + .long sys_pciconfig_read + .long sys_pciconfig_write + .long sys_pciconfig_iobase /* 200 */ + .long sys_ni_syscall /* 201 - reserved - MacOnLinux - new */ + .long sys_getdents64 + .long sys_pivot_root + .long sys_fcntl64 + .long sys_madvise /* 205 */ + .long sys_mincore + .long sys_gettid + .long sys_tkill + .long sys_setxattr + .long sys_lsetxattr /* 210 */ + .long sys_fsetxattr + .long sys_getxattr + .long sys_lgetxattr + .long sys_fgetxattr + .long sys_listxattr /* 215 */ + .long sys_llistxattr + .long sys_flistxattr + .long sys_removexattr + .long sys_lremovexattr + .long sys_fremovexattr /* 220 */ + .long sys_futex + .long sys_sched_setaffinity + .long sys_sched_getaffinity + .long sys_ni_syscall + .long sys_ni_syscall /* 225 - reserved for Tux */ + .long sys_sendfile64 + .long sys_io_setup + .long sys_io_destroy + .long sys_io_getevents + .long sys_io_submit /* 230 */ + .long sys_io_cancel + .long sys_set_tid_address + .long sys_fadvise64 + .long sys_exit_group + .long sys_lookup_dcookie /* 235 */ + .long sys_epoll_create + .long sys_epoll_ctl + .long sys_epoll_wait + .long sys_remap_file_pages + .long sys_timer_create /* 240 */ + .long sys_timer_settime + .long sys_timer_gettime + .long sys_timer_getoverrun + .long sys_timer_delete + .long sys_clock_settime /* 245 */ + .long sys_clock_gettime + .long sys_clock_getres + .long sys_clock_nanosleep + .long sys_swapcontext + .long sys_tgkill /* 250 */ + .long sys_utimes + .long sys_statfs64 + .long sys_fstatfs64 + .long ppc_fadvise64_64 + .long sys_ni_syscall /* 255 - rtas (used on ppc64) */ + .long sys_debug_setcontext + .long sys_ni_syscall /* 257 reserved for vserver */ + .long sys_ni_syscall /* 258 reserved for new sys_remap_file_pages */ + .long sys_ni_syscall /* 259 reserved for new sys_mbind */ + .long sys_ni_syscall /* 260 reserved for new sys_get_mempolicy */ + .long sys_ni_syscall /* 261 reserved for new sys_set_mempolicy */ + .long sys_mq_open + .long sys_mq_unlink + .long sys_mq_timedsend + .long sys_mq_timedreceive /* 265 */ + .long sys_mq_notify + .long sys_mq_getsetattr + .long sys_kexec_load + .long sys_add_key + .long sys_request_key /* 270 */ + .long sys_keyctl + .long sys_waitid + .long sys_ioprio_set + .long sys_ioprio_get + .long sys_inotify_init /* 275 */ + .long sys_inotify_add_watch + .long sys_inotify_rm_watch diff --git a/trunk/arch/s390/defconfig b/trunk/arch/s390/defconfig index f8d0cd540a06..3525c91204d4 100644 --- a/trunk/arch/s390/defconfig +++ b/trunk/arch/s390/defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.16-rc2 -# Wed Feb 8 10:44:39 2006 +# Linux kernel version: 2.6.16-rc1 +# Thu Jan 19 10:58:53 2006 # CONFIG_MMU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y @@ -12,6 +12,7 @@ CONFIG_S390=y # Code maturity level options # CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y CONFIG_LOCK_KERNEL=y CONFIG_INIT_ENV_ARG_LIMIT=32 @@ -153,7 +154,6 @@ CONFIG_NET=y # # Networking options # -# CONFIG_NETDEBUG is not set CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set CONFIG_UNIX=y @@ -607,7 +607,6 @@ CONFIG_MSDOS_PARTITION=y # Instrumentation Support # # CONFIG_PROFILING is not set -# CONFIG_STATISTICS is not set # # Kernel hacking @@ -625,7 +624,7 @@ CONFIG_DEBUG_MUTEXES=y # CONFIG_DEBUG_SPINLOCK_SLEEP is not set # CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_INFO is not set -CONFIG_DEBUG_FS=y +# CONFIG_DEBUG_FS is not set # CONFIG_DEBUG_VM is not set CONFIG_FORCED_INLINING=y # CONFIG_RCU_TORTURE_TEST is not set diff --git a/trunk/arch/s390/kernel/compat_linux.c b/trunk/arch/s390/kernel/compat_linux.c index 2d021626c1a6..cc20f0e3a7d3 100644 --- a/trunk/arch/s390/kernel/compat_linux.c +++ b/trunk/arch/s390/kernel/compat_linux.c @@ -905,26 +905,6 @@ asmlinkage long sys32_fstat64(unsigned long fd, struct stat64_emu31 __user * sta return ret; } -asmlinkage long sys32_fstatat(unsigned int dfd, char __user *filename, - struct stat64_emu31 __user* statbuf, int flag) -{ - struct kstat stat; - int error = -EINVAL; - - if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0) - goto out; - - if (flag & AT_SYMLINK_NOFOLLOW) - error = vfs_lstat_fd(dfd, filename, &stat); - else - error = vfs_stat_fd(dfd, filename, &stat); - - if (!error) - error = cp_stat64(statbuf, &stat); -out: - return error; -} - /* * Linux/i386 didn't use to be able to handle more than * 4 system call parameters, so these system calls used a memory diff --git a/trunk/arch/s390/kernel/compat_signal.c b/trunk/arch/s390/kernel/compat_signal.c index 5291b5f8788d..ef706694a0c1 100644 --- a/trunk/arch/s390/kernel/compat_signal.c +++ b/trunk/arch/s390/kernel/compat_signal.c @@ -195,6 +195,9 @@ sys32_sigaction(int sig, const struct old_sigaction32 __user *act, return ret; } +int +do_sigaction(int sig, const struct k_sigaction *act, struct k_sigaction *oact); + asmlinkage long sys32_rt_sigaction(int sig, const struct sigaction32 __user *act, struct sigaction32 __user *oact, size_t sigsetsize) diff --git a/trunk/arch/s390/kernel/compat_wrapper.S b/trunk/arch/s390/kernel/compat_wrapper.S index dd2d6c3e8df8..83b33fe1923c 100644 --- a/trunk/arch/s390/kernel/compat_wrapper.S +++ b/trunk/arch/s390/kernel/compat_wrapper.S @@ -1523,13 +1523,13 @@ compat_sys_futimesat_wrapper: llgtr %r4,%r4 # struct timeval * jg compat_sys_futimesat - .globl sys32_fstatat_wrapper -sys32_fstatat_wrapper: + .globl compat_sys_newfstatat_wrapper +compat_sys_newfstatat_wrapper: llgfr %r2,%r2 # unsigned int llgtr %r3,%r3 # char * - llgtr %r4,%r4 # struct stat64 * + llgtr %r4,%r4 # struct stat * lgfr %r5,%r5 # int - jg sys32_fstatat + jg compat_sys_newfstatat .globl sys_unlinkat_wrapper sys_unlinkat_wrapper: @@ -1602,8 +1602,3 @@ compat_sys_ppoll_wrapper: llgtr %r5,%r5 # const sigset_t * llgfr %r6,%r6 # size_t jg compat_sys_ppoll - - .globl sys_unshare_wrapper -sys_unshare_wrapper: - llgfr %r2,%r2 # unsigned long - jg sys_unshare diff --git a/trunk/arch/s390/kernel/machine_kexec.c b/trunk/arch/s390/kernel/machine_kexec.c index bad81b5832db..f0ed5c642c74 100644 --- a/trunk/arch/s390/kernel/machine_kexec.c +++ b/trunk/arch/s390/kernel/machine_kexec.c @@ -12,16 +12,15 @@ * on the S390 architecture. */ +#include +#include #include #include #include #include -#include -#include #include #include #include -#include static void kexec_halt_all_cpus(void *); diff --git a/trunk/arch/s390/kernel/smp.c b/trunk/arch/s390/kernel/smp.c index 0d1ad5dbe2b1..cbfcfd02a43a 100644 --- a/trunk/arch/s390/kernel/smp.c +++ b/trunk/arch/s390/kernel/smp.c @@ -52,7 +52,7 @@ extern volatile int __cpu_logical_map[]; struct _lowcore *lowcore_ptr[NR_CPUS]; cpumask_t cpu_online_map; -cpumask_t cpu_possible_map = CPU_MASK_ALL; +cpumask_t cpu_possible_map; static struct task_struct *current_set[NR_CPUS]; @@ -514,6 +514,9 @@ __init smp_check_cpus(unsigned int max_cpus) num_cpus++; } + for (cpu = 1; cpu < max_cpus; cpu++) + cpu_set(cpu, cpu_possible_map); + printk("Detected %d CPU's\n",(int) num_cpus); printk("Boot cpu address %2X\n", boot_cpu_addr); } @@ -807,6 +810,7 @@ void __devinit smp_prepare_boot_cpu(void) cpu_set(0, cpu_online_map); cpu_set(0, cpu_present_map); + cpu_set(0, cpu_possible_map); S390_lowcore.percpu_offset = __per_cpu_offset[0]; current_set[0] = current; } diff --git a/trunk/arch/s390/kernel/syscalls.S b/trunk/arch/s390/kernel/syscalls.S index 84921fe8d266..3280345efacd 100644 --- a/trunk/arch/s390/kernel/syscalls.S +++ b/trunk/arch/s390/kernel/syscalls.S @@ -301,7 +301,7 @@ SYSCALL(sys_mkdirat,sys_mkdirat,sys_mkdirat_wrapper) SYSCALL(sys_mknodat,sys_mknodat,sys_mknodat_wrapper) /* 290 */ SYSCALL(sys_fchownat,sys_fchownat,sys_fchownat_wrapper) SYSCALL(sys_futimesat,sys_futimesat,compat_sys_futimesat_wrapper) -SYSCALL(sys_fstatat64,sys_newfstatat,sys32_fstatat_wrapper) +SYSCALL(sys_newfstatat,sys_newfstatat,compat_sys_newfstatat_wrapper) SYSCALL(sys_unlinkat,sys_unlinkat,sys_unlinkat_wrapper) SYSCALL(sys_renameat,sys_renameat,sys_renameat_wrapper) /* 295 */ SYSCALL(sys_linkat,sys_linkat,sys_linkat_wrapper) @@ -311,4 +311,3 @@ SYSCALL(sys_fchmodat,sys_fchmodat,sys_fchmodat_wrapper) SYSCALL(sys_faccessat,sys_faccessat,sys_faccessat_wrapper) /* 300 */ SYSCALL(sys_pselect6,sys_pselect6,compat_sys_pselect6_wrapper) SYSCALL(sys_ppoll,sys_ppoll,compat_sys_ppoll_wrapper) -SYSCALL(sys_unshare,sys_unshare,sys_unshare_wrapper) diff --git a/trunk/arch/sparc/kernel/systbls.S b/trunk/arch/sparc/kernel/systbls.S index 768de64b371f..c0314705d73a 100644 --- a/trunk/arch/sparc/kernel/systbls.S +++ b/trunk/arch/sparc/kernel/systbls.S @@ -76,7 +76,7 @@ sys_call_table: /*270*/ .long sys_io_submit, sys_io_cancel, sys_io_getevents, sys_mq_open, sys_mq_unlink /*275*/ .long sys_mq_timedsend, sys_mq_timedreceive, sys_mq_notify, sys_mq_getsetattr, sys_waitid /*280*/ .long sys_ni_syscall, sys_add_key, sys_request_key, sys_keyctl, sys_openat -/*285*/ .long sys_mkdirat, sys_mknodat, sys_fchownat, sys_futimesat, sys_fstatat64 +/*285*/ .long sys_mkdirat, sys_mknodat, sys_fchownat, sys_futimesat, sys_newfstatat /*290*/ .long sys_unlinkat, sys_renameat, sys_linkat, sys_symlinkat, sys_readlinkat /*295*/ .long sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll, sys_unshare diff --git a/trunk/arch/sparc64/kernel/sys_sparc32.c b/trunk/arch/sparc64/kernel/sys_sparc32.c index 417727bd87ba..9264ccbaaafa 100644 --- a/trunk/arch/sparc64/kernel/sys_sparc32.c +++ b/trunk/arch/sparc64/kernel/sys_sparc32.c @@ -428,27 +428,6 @@ asmlinkage long compat_sys_fstat64(unsigned int fd, return error; } -asmlinkage long compat_sys_fstatat64(unsigned int dfd, char __user *filename, - struct compat_stat64 __user * statbuf, int flag) -{ - struct kstat stat; - int error = -EINVAL; - - if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0) - goto out; - - if (flag & AT_SYMLINK_NOFOLLOW) - error = vfs_lstat_fd(dfd, filename, &stat); - else - error = vfs_stat_fd(dfd, filename, &stat); - - if (!error) - error = cp_compat_stat64(&stat, statbuf); - -out: - return error; -} - asmlinkage long compat_sys_sysfs(int option, u32 arg1, u32 arg2) { return sys_sysfs(option, arg1, arg2); diff --git a/trunk/arch/sparc64/kernel/systbls.S b/trunk/arch/sparc64/kernel/systbls.S index c3adb7ac167d..5928b3c33e27 100644 --- a/trunk/arch/sparc64/kernel/systbls.S +++ b/trunk/arch/sparc64/kernel/systbls.S @@ -77,7 +77,7 @@ sys_call_table32: /*270*/ .word sys32_io_submit, sys_io_cancel, compat_sys_io_getevents, sys32_mq_open, sys_mq_unlink .word compat_sys_mq_timedsend, compat_sys_mq_timedreceive, compat_sys_mq_notify, compat_sys_mq_getsetattr, compat_sys_waitid /*280*/ .word sys_ni_syscall, sys_add_key, sys_request_key, sys_keyctl, compat_sys_openat - .word sys_mkdirat, sys_mknodat, sys_fchownat, compat_sys_futimesat, compat_sys_fstatat64 + .word sys_mkdirat, sys_mknodat, sys_fchownat, compat_sys_futimesat, compat_sys_newfstatat /*285*/ .word sys_unlinkat, sys_renameat, sys_linkat, sys_symlinkat, sys_readlinkat .word sys_fchmodat, sys_faccessat, compat_sys_pselect6, compat_sys_ppoll, sys_unshare @@ -146,7 +146,7 @@ sys_call_table: /*270*/ .word sys_io_submit, sys_io_cancel, sys_io_getevents, sys_mq_open, sys_mq_unlink .word sys_mq_timedsend, sys_mq_timedreceive, sys_mq_notify, sys_mq_getsetattr, sys_waitid /*280*/ .word sys_nis_syscall, sys_add_key, sys_request_key, sys_keyctl, sys_openat - .word sys_mkdirat, sys_mknodat, sys_fchownat, sys_futimesat, sys_fstatat64 + .word sys_mkdirat, sys_mknodat, sys_fchownat, sys_futimesat, compat_sys_newfstatat /*285*/ .word sys_unlinkat, sys_renameat, sys_linkat, sys_symlinkat, sys_readlinkat .word sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll, sys_unshare diff --git a/trunk/arch/x86_64/ia32/ia32entry.S b/trunk/arch/x86_64/ia32/ia32entry.S index 00dee176c08e..ada4535d0161 100644 --- a/trunk/arch/x86_64/ia32/ia32entry.S +++ b/trunk/arch/x86_64/ia32/ia32entry.S @@ -677,7 +677,7 @@ ia32_sys_call_table: .quad sys_mknodat .quad sys_fchownat .quad compat_sys_futimesat - .quad sys32_fstatat /* 300 */ + .quad compat_sys_newfstatat /* 300 */ .quad sys_unlinkat .quad sys_renameat .quad sys_linkat diff --git a/trunk/arch/x86_64/ia32/sys_ia32.c b/trunk/arch/x86_64/ia32/sys_ia32.c index 2bc55af95419..54481af5344a 100644 --- a/trunk/arch/x86_64/ia32/sys_ia32.c +++ b/trunk/arch/x86_64/ia32/sys_ia32.c @@ -180,28 +180,6 @@ sys32_fstat64(unsigned int fd, struct stat64 __user *statbuf) return ret; } -asmlinkage long -sys32_fstatat(unsigned int dfd, char __user *filename, - struct stat64 __user* statbuf, int flag) -{ - struct kstat stat; - int error = -EINVAL; - - if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0) - goto out; - - if (flag & AT_SYMLINK_NOFOLLOW) - error = vfs_lstat_fd(dfd, filename, &stat); - else - error = vfs_stat_fd(dfd, filename, &stat); - - if (!error) - error = cp_stat64(statbuf, &stat); - -out: - return error; -} - /* * Linux/i386 didn't use to be able to handle more than * 4 system call parameters, so these system calls used a memory diff --git a/trunk/arch/x86_64/kernel/apic.c b/trunk/arch/x86_64/kernel/apic.c index 7a0a3e8d5d72..6147770b4347 100644 --- a/trunk/arch/x86_64/kernel/apic.c +++ b/trunk/arch/x86_64/kernel/apic.c @@ -708,7 +708,7 @@ static void setup_APIC_timer(unsigned int clocks) local_irq_save(flags); /* wait for irq slice */ - if (vxtime.hpet_address && hpet_use_timer) { + if (vxtime.hpet_address) { int trigger = hpet_readl(HPET_T0_CMP); while (hpet_readl(HPET_COUNTER) >= trigger) /* do nothing */ ; diff --git a/trunk/arch/x86_64/kernel/pci-gart.c b/trunk/arch/x86_64/kernel/pci-gart.c index dd0718dc178b..2fe23a6c361b 100644 --- a/trunk/arch/x86_64/kernel/pci-gart.c +++ b/trunk/arch/x86_64/kernel/pci-gart.c @@ -310,7 +310,7 @@ void gart_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, int di for (i = 0; i < nents; i++) { struct scatterlist *s = &sg[i]; - if (!s->dma_length) + if (!s->dma_length || !s->length) break; dma_unmap_single(dev, s->dma_address, s->dma_length, dir); } @@ -364,6 +364,7 @@ static int __dma_map_cont(struct scatterlist *sg, int start, int stopat, BUG_ON(i > start && s->offset); if (i == start) { + *sout = *s; sout->dma_address = iommu_bus_base; sout->dma_address += iommu_page*PAGE_SIZE + s->offset; sout->dma_length = s->length; @@ -378,7 +379,7 @@ static int __dma_map_cont(struct scatterlist *sg, int start, int stopat, SET_LEAK(iommu_page); addr += PAGE_SIZE; iommu_page++; - } + } } BUG_ON(iommu_page - iommu_start != pages); return 0; @@ -390,6 +391,7 @@ static inline int dma_map_cont(struct scatterlist *sg, int start, int stopat, { if (!need) { BUG_ON(stopat - start != 1); + *sout = sg[start]; sout->dma_length = sg[start].length; return 0; } diff --git a/trunk/arch/x86_64/kernel/time.c b/trunk/arch/x86_64/kernel/time.c index 3c58c30506a1..dba7237be5c1 100644 --- a/trunk/arch/x86_64/kernel/time.c +++ b/trunk/arch/x86_64/kernel/time.c @@ -59,7 +59,7 @@ static int notsc __initdata = 0; unsigned int cpu_khz; /* TSC clocks / usec, not used here */ static unsigned long hpet_period; /* fsecs / HPET clock */ unsigned long hpet_tick; /* HPET clocks / interrupt */ -int hpet_use_timer; /* Use counter of hpet for time keeping, otherwise PIT */ +static int hpet_use_timer; /* Use counter of hpet for time keeping, otherwise PIT */ unsigned long vxtime_hz = PIT_TICK_RATE; int report_lost_ticks; /* command line option */ unsigned long long monotonic_base; @@ -326,10 +326,7 @@ static noinline void handle_lost_ticks(int lost, struct pt_regs *regs) print_symbol("rip %s\n", regs->rip); if (vxtime.mode == VXTIME_TSC && vxtime.hpet_address) { printk(KERN_WARNING "Falling back to HPET\n"); - if (hpet_use_timer) - vxtime.last = hpet_readl(HPET_T0_CMP) - hpet_tick; - else - vxtime.last = hpet_readl(HPET_COUNTER); + vxtime.last = hpet_readl(HPET_T0_CMP) - hpet_tick; vxtime.mode = VXTIME_HPET; do_gettimeoffset = do_gettimeoffset_hpet; } @@ -991,10 +988,7 @@ void __init time_init_gtod(void) notsc = 1; if (vxtime.hpet_address && notsc) { timetype = hpet_use_timer ? "HPET" : "PIT/HPET"; - if (hpet_use_timer) - vxtime.last = hpet_readl(HPET_T0_CMP) - hpet_tick; - else - vxtime.last = hpet_readl(HPET_COUNTER); + vxtime.last = hpet_readl(HPET_T0_CMP) - hpet_tick; vxtime.mode = VXTIME_HPET; do_gettimeoffset = do_gettimeoffset_hpet; #ifdef CONFIG_X86_PM_TIMER diff --git a/trunk/arch/x86_64/kernel/traps.c b/trunk/arch/x86_64/kernel/traps.c index 28d50dc540e8..ee1b2da9e5e7 100644 --- a/trunk/arch/x86_64/kernel/traps.c +++ b/trunk/arch/x86_64/kernel/traps.c @@ -90,20 +90,6 @@ static inline void conditional_sti(struct pt_regs *regs) local_irq_enable(); } -static inline void preempt_conditional_sti(struct pt_regs *regs) -{ - preempt_disable(); - if (regs->eflags & X86_EFLAGS_IF) - local_irq_enable(); -} - -static inline void preempt_conditional_cli(struct pt_regs *regs) -{ - if (regs->eflags & X86_EFLAGS_IF) - local_irq_disable(); - preempt_enable_no_resched(); -} - static int kstack_depth_to_print = 10; #ifdef CONFIG_KALLSYMS @@ -707,7 +693,7 @@ asmlinkage void __kprobes do_debug(struct pt_regs * regs, SIGTRAP) == NOTIFY_STOP) return; - preempt_conditional_sti(regs); + conditional_sti(regs); /* Mask out spurious debug traps due to lazy DR7 setting */ if (condition & (DR_TRAP0|DR_TRAP1|DR_TRAP2|DR_TRAP3)) { @@ -752,13 +738,11 @@ asmlinkage void __kprobes do_debug(struct pt_regs * regs, clear_dr7: set_debugreg(0UL, 7); - preempt_conditional_cli(regs); return; clear_TF_reenable: set_tsk_thread_flag(tsk, TIF_SINGLESTEP); regs->eflags &= ~TF_MASK; - preempt_conditional_cli(regs); } static int kernel_math_error(struct pt_regs *regs, const char *str, int trapnr) diff --git a/trunk/drivers/bluetooth/bt3c_cs.c b/trunk/drivers/bluetooth/bt3c_cs.c index 7e21b1ff27c4..e522d19ad886 100644 --- a/trunk/drivers/bluetooth/bt3c_cs.c +++ b/trunk/drivers/bluetooth/bt3c_cs.c @@ -474,6 +474,18 @@ static int bt3c_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned long /* ======================== Card services HCI interaction ======================== */ +static struct device *bt3c_device(void) +{ + static struct device dev = { + .bus_id = "pcmcia", + }; + kobject_set_name(&dev.kobj, "bt3c"); + kobject_init(&dev.kobj); + + return &dev; +} + + static int bt3c_load_firmware(bt3c_info_t *info, unsigned char *firmware, int count) { char *ptr = (char *) firmware; @@ -562,7 +574,6 @@ static int bt3c_open(bt3c_info_t *info) { const struct firmware *firmware; struct hci_dev *hdev; - client_handle_t handle; int err; spin_lock_init(&(info->lock)); @@ -594,10 +605,8 @@ static int bt3c_open(bt3c_info_t *info) hdev->owner = THIS_MODULE; - handle = info->link.handle; - /* Load firmware */ - err = request_firmware(&firmware, "BT3CPCC.bin", &handle_to_dev(handle)); + err = request_firmware(&firmware, "BT3CPCC.bin", bt3c_device()); if (err < 0) { BT_ERR("Firmware request failed"); goto error; diff --git a/trunk/drivers/char/drm/drm_pciids.h b/trunk/drivers/char/drm/drm_pciids.h index 2c17e88a8847..8fd6357a48da 100644 --- a/trunk/drivers/char/drm/drm_pciids.h +++ b/trunk/drivers/char/drm/drm_pciids.h @@ -85,6 +85,7 @@ {0x1002, 0x5969, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV100}, \ {0x1002, 0x596A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280}, \ {0x1002, 0x596B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280}, \ + {0x1002, 0x5b60, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV350}, \ {0x1002, 0x5c61, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280|CHIP_IS_MOBILITY}, \ {0x1002, 0x5c62, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280}, \ {0x1002, 0x5c63, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280|CHIP_IS_MOBILITY}, \ diff --git a/trunk/drivers/char/tipar.c b/trunk/drivers/char/tipar.c index eb2eb3e12d6a..41a94bc79f67 100644 --- a/trunk/drivers/char/tipar.c +++ b/trunk/drivers/char/tipar.c @@ -250,17 +250,12 @@ tipar_open(struct inode *inode, struct file *file) { unsigned int minor = iminor(inode) - TIPAR_MINOR; - if (tp_count == 0 || minor > tp_count - 1) + if (minor > tp_count - 1) return -ENXIO; if (test_and_set_bit(minor, &opened)) return -EBUSY; - if (!table[minor].dev) { - printk(KERN_ERR "%s: NULL device for minor %u\n", - __FUNCTION__, minor); - return -ENXIO; - } parport_claim_or_block(table[minor].dev); init_ti_parallel(minor); parport_release(table[minor].dev); @@ -515,20 +510,16 @@ tipar_init_module(void) err = PTR_ERR(tipar_class); goto out_chrdev; } - if (parport_register_driver(&tipar_driver) || tp_count == 0) { + if (parport_register_driver(&tipar_driver)) { printk(KERN_ERR "tipar: unable to register with parport\n"); err = -EIO; - goto out_class; + goto out; } err = 0; goto out; -out_class: - class_destroy(tipar_class); - out_chrdev: - devfs_remove("ticables/par"); unregister_chrdev(TIPAR_MAJOR, "tipar"); out: return err; diff --git a/trunk/drivers/char/tty_io.c b/trunk/drivers/char/tty_io.c index a23816d3e9a1..076e07c1da38 100644 --- a/trunk/drivers/char/tty_io.c +++ b/trunk/drivers/char/tty_io.c @@ -268,8 +268,6 @@ static struct tty_buffer *tty_buffer_alloc(size_t size) p->size = size; p->next = NULL; p->active = 0; - p->commit = 0; - p->read = 0; p->char_buf_ptr = (char *)(p->data); p->flag_buf_ptr = (unsigned char *)p->char_buf_ptr + size; /* printk("Flip create %p\n", p); */ @@ -300,8 +298,6 @@ static struct tty_buffer *tty_buffer_find(struct tty_struct *tty, size_t size) *tbh = t->next; t->next = NULL; t->used = 0; - t->commit = 0; - t->read = 0; /* DEBUG ONLY */ memset(t->data, '*', size); /* printk("Flip recycle %p\n", t); */ @@ -339,7 +335,6 @@ int tty_buffer_request_room(struct tty_struct *tty, size_t size) if (b != NULL) { b->next = n; b->active = 0; - b->commit = b->used; } else tty->buf.head = n; tty->buf.tail = n; @@ -2757,9 +2752,6 @@ static void flush_to_ldisc(void *private_) unsigned long flags; struct tty_ldisc *disc; struct tty_buffer *tbuf; - int count; - char *char_buf; - unsigned char *flag_buf; disc = tty_ldisc_ref(tty); if (disc == NULL) /* !TTY_LDISC */ @@ -2773,20 +2765,16 @@ static void flush_to_ldisc(void *private_) goto out; } spin_lock_irqsave(&tty->buf.lock, flags); - while((tbuf = tty->buf.head) != NULL) { - while ((count = tbuf->commit - tbuf->read) != 0) { - char_buf = tbuf->char_buf_ptr + tbuf->read; - flag_buf = tbuf->flag_buf_ptr + tbuf->read; - tbuf->read += count; - spin_unlock_irqrestore(&tty->buf.lock, flags); - disc->receive_buf(tty, char_buf, flag_buf, count); - spin_lock_irqsave(&tty->buf.lock, flags); - } - if (tbuf->active) - break; + while((tbuf = tty->buf.head) != NULL && !tbuf->active) { tty->buf.head = tbuf->next; if (tty->buf.head == NULL) tty->buf.tail = NULL; + spin_unlock_irqrestore(&tty->buf.lock, flags); + /* printk("Process buffer %p for %d\n", tbuf, tbuf->used); */ + disc->receive_buf(tty, tbuf->char_buf_ptr, + tbuf->flag_buf_ptr, + tbuf->used); + spin_lock_irqsave(&tty->buf.lock, flags); tty_buffer_free(tty, tbuf); } spin_unlock_irqrestore(&tty->buf.lock, flags); @@ -2883,10 +2871,8 @@ void tty_flip_buffer_push(struct tty_struct *tty) { unsigned long flags; spin_lock_irqsave(&tty->buf.lock, flags); - if (tty->buf.tail != NULL) { + if (tty->buf.tail != NULL) tty->buf.tail->active = 0; - tty->buf.tail->commit = tty->buf.tail->used; - } spin_unlock_irqrestore(&tty->buf.lock, flags); if (tty->low_latency) diff --git a/trunk/drivers/char/watchdog/pcwd.c b/trunk/drivers/char/watchdog/pcwd.c index 8d6b249ad66b..37c9e13ad3ac 100644 --- a/trunk/drivers/char/watchdog/pcwd.c +++ b/trunk/drivers/char/watchdog/pcwd.c @@ -49,37 +49,29 @@ * More info available at http://www.berkprod.com/ or http://www.pcwatchdog.com/ */ -#include /* For CONFIG_WATCHDOG_NOWAYOUT/... */ -#include /* For module specific items */ -#include /* For new moduleparam's */ -#include /* For standard types (like size_t) */ -#include /* For the -ENODEV/... values */ -#include /* For printk/panic/... */ -#include /* For mdelay function */ -#include /* For timer related operations */ -#include /* For jiffies stuff */ -#include /* For MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR) */ -#include /* For the watchdog specific items */ -#include /* For notifier support */ -#include /* For reboot_notifier stuff */ -#include /* For __init/__exit/... */ -#include /* For file operations */ -#include /* For io-port access */ -#include /* For spin_lock/spin_unlock/... */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include /* TASK_INTERRUPTIBLE, set_current_state() and friends */ -#include /* For kmalloc */ +#include +#include -#include /* For copy_to_user/put_user/... */ -#include /* For inb/outb/... */ - -/* Module and version information */ -#define WATCHDOG_VERSION "1.16" -#define WATCHDOG_DATE "03 Jan 2006" -#define WATCHDOG_DRIVER_NAME "ISA-PC Watchdog" -#define WATCHDOG_NAME "pcwd" -#define PFX WATCHDOG_NAME ": " -#define DRIVER_VERSION WATCHDOG_DRIVER_NAME " driver, v" WATCHDOG_VERSION " (" WATCHDOG_DATE ")\n" -#define WD_VER WATCHDOG_VERSION " (" WATCHDOG_DATE ")" +#define WD_VER "1.16 (06/12/2004)" +#define PFX "pcwd: " /* * It should be noted that PCWD_REVISION_B was removed because A and B @@ -93,38 +85,36 @@ /* * These are the defines that describe the control status bits for the - * PCI-PC Watchdog card. -*/ -/* Port 1 : Control Status #1 for the PC Watchdog card, revision A. */ + * PC Watchdog card, revision A. + */ #define WD_WDRST 0x01 /* Previously reset state */ #define WD_T110 0x02 /* Temperature overheat sense */ #define WD_HRTBT 0x04 /* Heartbeat sense */ #define WD_RLY2 0x08 /* External relay triggered */ #define WD_SRLY2 0x80 /* Software external relay triggered */ -/* Port 1 : Control Status #1 for the PC Watchdog card, revision C. */ + +/* + * These are the defines that describe the control status bits for the + * PC Watchdog card, revision C. + */ #define WD_REVC_WTRP 0x01 /* Watchdog Trip status */ #define WD_REVC_HRBT 0x02 /* Watchdog Heartbeat */ #define WD_REVC_TTRP 0x04 /* Temperature Trip status */ -/* Port 2 : Control Status #2 */ -#define WD_WDIS 0x10 /* Watchdog Disabled */ -#define WD_ENTP 0x20 /* Watchdog Enable Temperature Trip */ -#define WD_SSEL 0x40 /* Watchdog Switch Select (1:SW1 <-> 0:SW2) */ -#define WD_WCMD 0x80 /* Watchdog Command Mode */ /* max. time we give an ISA watchdog card to process a command */ /* 500ms for each 4 bit response (according to spec.) */ #define ISA_COMMAND_TIMEOUT 1000 /* Watchdog's internal commands */ -#define CMD_ISA_IDLE 0x00 -#define CMD_ISA_VERSION_INTEGER 0x01 -#define CMD_ISA_VERSION_TENTH 0x02 -#define CMD_ISA_VERSION_HUNDRETH 0x03 -#define CMD_ISA_VERSION_MINOR 0x04 -#define CMD_ISA_SWITCH_SETTINGS 0x05 -#define CMD_ISA_DELAY_TIME_2SECS 0x0A -#define CMD_ISA_DELAY_TIME_4SECS 0x0B -#define CMD_ISA_DELAY_TIME_8SECS 0x0C +#define CMD_ISA_IDLE 0x00 +#define CMD_ISA_VERSION_INTEGER 0x01 +#define CMD_ISA_VERSION_TENTH 0x02 +#define CMD_ISA_VERSION_HUNDRETH 0x03 +#define CMD_ISA_VERSION_MINOR 0x04 +#define CMD_ISA_SWITCH_SETTINGS 0x05 +#define CMD_ISA_DELAY_TIME_2SECS 0x0A +#define CMD_ISA_DELAY_TIME_4SECS 0x0B +#define CMD_ISA_DELAY_TIME_8SECS 0x0C /* * We are using an kernel timer to do the pinging of the watchdog @@ -140,17 +130,15 @@ static int cards_found; /* internal variables */ static atomic_t open_allowed = ATOMIC_INIT(1); static char expect_close; +static struct timer_list timer; +static unsigned long next_heartbeat; static int temp_panic; -static struct { /* this is private data for each ISA-PC watchdog card */ - int revision; /* The card's revision */ - int supports_temp; /* Wether or not the card has a temperature device */ - int command_mode; /* Wether or not the card is in command mode */ - int boot_status; /* The card's boot status */ - int io_addr; /* The cards I/O address */ - spinlock_t io_lock; /* the lock for io operations */ - struct timer_list timer; /* The timer that pings the watchdog */ - unsigned long next_heartbeat; /* the next_heartbeat for the timer */ -} pcwd_private; +static int revision; /* The card's revision */ +static int supports_temp; /* Wether or not the card has a temperature device */ +static int command_mode; /* Wether or not the card is in command mode */ +static int initial_status; /* The card's boot status */ +static int current_readport; /* The cards I/O address */ +static spinlock_t io_lock; /* module parameters */ #define WATCHDOG_HEARTBEAT 60 /* 60 sec default heartbeat */ @@ -173,14 +161,14 @@ static int send_isa_command(int cmd) int port0, last_port0; /* Double read for stabilising */ /* The WCMD bit must be 1 and the command is only 4 bits in size */ - control_status = (cmd & 0x0F) | WD_WCMD; - outb_p(control_status, pcwd_private.io_addr + 2); + control_status = (cmd & 0x0F) | 0x80; + outb_p(control_status, current_readport + 2); udelay(ISA_COMMAND_TIMEOUT); - port0 = inb_p(pcwd_private.io_addr); + port0 = inb_p(current_readport); for (i = 0; i < 25; ++i) { last_port0 = port0; - port0 = inb_p(pcwd_private.io_addr); + port0 = inb_p(current_readport); if (port0 == last_port0) break; /* Data is stable */ @@ -196,7 +184,7 @@ static int set_command_mode(void) int i, found=0, count=0; /* Set the card into command mode */ - spin_lock(&pcwd_private.io_lock); + spin_lock(&io_lock); while ((!found) && (count < 3)) { i = send_isa_command(CMD_ISA_IDLE); @@ -204,15 +192,15 @@ static int set_command_mode(void) found = 1; else if (i == 0xF3) { /* Card does not like what we've done to it */ - outb_p(0x00, pcwd_private.io_addr + 2); + outb_p(0x00, current_readport + 2); udelay(1200); /* Spec says wait 1ms */ - outb_p(0x00, pcwd_private.io_addr + 2); + outb_p(0x00, current_readport + 2); udelay(ISA_COMMAND_TIMEOUT); } count++; } - spin_unlock(&pcwd_private.io_lock); - pcwd_private.command_mode = found; + spin_unlock(&io_lock); + command_mode = found; return(found); } @@ -220,95 +208,12 @@ static int set_command_mode(void) static void unset_command_mode(void) { /* Set the card into normal mode */ - spin_lock(&pcwd_private.io_lock); - outb_p(0x00, pcwd_private.io_addr + 2); + spin_lock(&io_lock); + outb_p(0x00, current_readport + 2); udelay(ISA_COMMAND_TIMEOUT); - spin_unlock(&pcwd_private.io_lock); - - pcwd_private.command_mode = 0; -} - -static inline void pcwd_check_temperature_support(void) -{ - if (inb(pcwd_private.io_addr) != 0xF0) - pcwd_private.supports_temp = 1; -} - -static inline char *get_firmware(void) -{ - int one, ten, hund, minor; - char *ret; - - ret = kmalloc(6, GFP_KERNEL); - if(ret == NULL) - return NULL; - - if (set_command_mode()) { - one = send_isa_command(CMD_ISA_VERSION_INTEGER); - ten = send_isa_command(CMD_ISA_VERSION_TENTH); - hund = send_isa_command(CMD_ISA_VERSION_HUNDRETH); - minor = send_isa_command(CMD_ISA_VERSION_MINOR); - sprintf(ret, "%c.%c%c%c", one, ten, hund, minor); - } - else - sprintf(ret, "ERROR"); - - unset_command_mode(); - return(ret); -} - -static inline int pcwd_get_option_switches(void) -{ - int option_switches=0; - - if (set_command_mode()) { - /* Get switch settings */ - option_switches = send_isa_command(CMD_ISA_SWITCH_SETTINGS); - } - - unset_command_mode(); - return(option_switches); -} - -static void pcwd_show_card_info(void) -{ - char *firmware; - int option_switches; - - /* Get some extra info from the hardware (in command/debug/diag mode) */ - if (pcwd_private.revision == PCWD_REVISION_A) - printk(KERN_INFO PFX "ISA-PC Watchdog (REV.A) detected at port 0x%04x\n", pcwd_private.io_addr); - else if (pcwd_private.revision == PCWD_REVISION_C) { - firmware = get_firmware(); - printk(KERN_INFO PFX "ISA-PC Watchdog (REV.C) detected at port 0x%04x (Firmware version: %s)\n", - pcwd_private.io_addr, firmware); - kfree(firmware); - option_switches = pcwd_get_option_switches(); - printk(KERN_INFO PFX "Option switches (0x%02x): Temperature Reset Enable=%s, Power On Delay=%s\n", - option_switches, - ((option_switches & 0x10) ? "ON" : "OFF"), - ((option_switches & 0x08) ? "ON" : "OFF")); - - /* Reprogram internal heartbeat to 2 seconds */ - if (set_command_mode()) { - send_isa_command(CMD_ISA_DELAY_TIME_2SECS); - unset_command_mode(); - } - } - - if (pcwd_private.supports_temp) - printk(KERN_INFO PFX "Temperature Option Detected\n"); - - if (pcwd_private.boot_status & WDIOF_CARDRESET) - printk(KERN_INFO PFX "Previous reboot was caused by the card\n"); - - if (pcwd_private.boot_status & WDIOF_OVERHEAT) { - printk(KERN_EMERG PFX "Card senses a CPU Overheat. Panicking!\n"); - printk(KERN_EMERG PFX "CPU Overheat\n"); - } + spin_unlock(&io_lock); - if (pcwd_private.boot_status == 0) - printk(KERN_INFO PFX "No previous trip detected - Cold boot or reset\n"); + command_mode = 0; } static void pcwd_timer_ping(unsigned long data) @@ -317,25 +222,25 @@ static void pcwd_timer_ping(unsigned long data) /* If we got a heartbeat pulse within the WDT_INTERVAL * we agree to ping the WDT */ - if(time_before(jiffies, pcwd_private.next_heartbeat)) { + if(time_before(jiffies, next_heartbeat)) { /* Ping the watchdog */ - spin_lock(&pcwd_private.io_lock); - if (pcwd_private.revision == PCWD_REVISION_A) { + spin_lock(&io_lock); + if (revision == PCWD_REVISION_A) { /* Rev A cards are reset by setting the WD_WDRST bit in register 1 */ - wdrst_stat = inb_p(pcwd_private.io_addr); + wdrst_stat = inb_p(current_readport); wdrst_stat &= 0x0F; wdrst_stat |= WD_WDRST; - outb_p(wdrst_stat, pcwd_private.io_addr + 1); + outb_p(wdrst_stat, current_readport + 1); } else { /* Re-trigger watchdog by writing to port 0 */ - outb_p(0x00, pcwd_private.io_addr); + outb_p(0x00, current_readport); } /* Re-set the timer interval */ - mod_timer(&pcwd_private.timer, jiffies + WDT_INTERVAL); + mod_timer(&timer, jiffies + WDT_INTERVAL); - spin_unlock(&pcwd_private.io_lock); + spin_unlock(&io_lock); } else { printk(KERN_WARNING PFX "Heartbeat lost! Will not ping the watchdog\n"); } @@ -345,19 +250,19 @@ static int pcwd_start(void) { int stat_reg; - pcwd_private.next_heartbeat = jiffies + (heartbeat * HZ); + next_heartbeat = jiffies + (heartbeat * HZ); /* Start the timer */ - mod_timer(&pcwd_private.timer, jiffies + WDT_INTERVAL); + mod_timer(&timer, jiffies + WDT_INTERVAL); /* Enable the port */ - if (pcwd_private.revision == PCWD_REVISION_C) { - spin_lock(&pcwd_private.io_lock); - outb_p(0x00, pcwd_private.io_addr + 3); + if (revision == PCWD_REVISION_C) { + spin_lock(&io_lock); + outb_p(0x00, current_readport + 3); udelay(ISA_COMMAND_TIMEOUT); - stat_reg = inb_p(pcwd_private.io_addr + 2); - spin_unlock(&pcwd_private.io_lock); - if (stat_reg & WD_WDIS) { + stat_reg = inb_p(current_readport + 2); + spin_unlock(&io_lock); + if (stat_reg & 0x10) { printk(KERN_INFO PFX "Could not start watchdog\n"); return -EIO; } @@ -370,18 +275,18 @@ static int pcwd_stop(void) int stat_reg; /* Stop the timer */ - del_timer(&pcwd_private.timer); + del_timer(&timer); /* Disable the board */ - if (pcwd_private.revision == PCWD_REVISION_C) { - spin_lock(&pcwd_private.io_lock); - outb_p(0xA5, pcwd_private.io_addr + 3); + if (revision == PCWD_REVISION_C) { + spin_lock(&io_lock); + outb_p(0xA5, current_readport + 3); udelay(ISA_COMMAND_TIMEOUT); - outb_p(0xA5, pcwd_private.io_addr + 3); + outb_p(0xA5, current_readport + 3); udelay(ISA_COMMAND_TIMEOUT); - stat_reg = inb_p(pcwd_private.io_addr + 2); - spin_unlock(&pcwd_private.io_lock); - if ((stat_reg & WD_WDIS) == 0) { + stat_reg = inb_p(current_readport + 2); + spin_unlock(&io_lock); + if ((stat_reg & 0x10) == 0) { printk(KERN_INFO PFX "Could not stop watchdog\n"); return -EIO; } @@ -392,7 +297,7 @@ static int pcwd_stop(void) static int pcwd_keepalive(void) { /* user land ping */ - pcwd_private.next_heartbeat = jiffies + (heartbeat * HZ); + next_heartbeat = jiffies + (heartbeat * HZ); return 0; } @@ -410,23 +315,23 @@ static int pcwd_get_status(int *status) int card_status; *status=0; - spin_lock(&pcwd_private.io_lock); - if (pcwd_private.revision == PCWD_REVISION_A) + spin_lock(&io_lock); + if (revision == PCWD_REVISION_A) /* Rev A cards return status information from * the base register, which is used for the * temperature in other cards. */ - card_status = inb(pcwd_private.io_addr); + card_status = inb(current_readport); else { /* Rev C cards return card status in the base * address + 1 register. And use different bits * to indicate a card initiated reset, and an * over-temperature condition. And the reboot * status can be reset. */ - card_status = inb(pcwd_private.io_addr + 1); + card_status = inb(current_readport + 1); } - spin_unlock(&pcwd_private.io_lock); + spin_unlock(&io_lock); - if (pcwd_private.revision == PCWD_REVISION_A) { + if (revision == PCWD_REVISION_A) { if (card_status & WD_WDRST) *status |= WDIOF_CARDRESET; @@ -455,10 +360,10 @@ static int pcwd_get_status(int *status) static int pcwd_clear_status(void) { - if (pcwd_private.revision == PCWD_REVISION_C) { - spin_lock(&pcwd_private.io_lock); - outb_p(0x00, pcwd_private.io_addr + 1); /* clear reset status */ - spin_unlock(&pcwd_private.io_lock); + if (revision == PCWD_REVISION_C) { + spin_lock(&io_lock); + outb_p(0x00, current_readport + 1); /* clear reset status */ + spin_unlock(&io_lock); } return 0; } @@ -466,20 +371,20 @@ static int pcwd_clear_status(void) static int pcwd_get_temperature(int *temperature) { /* check that port 0 gives temperature info and no command results */ - if (pcwd_private.command_mode) + if (command_mode) return -1; *temperature = 0; - if (!pcwd_private.supports_temp) + if (!supports_temp) return -ENODEV; /* * Convert celsius to fahrenheit, since this was * the decided 'standard' for this return value. */ - spin_lock(&pcwd_private.io_lock); - *temperature = ((inb(pcwd_private.io_addr)) * 9 / 5) + 32; - spin_unlock(&pcwd_private.io_lock); + spin_lock(&io_lock); + *temperature = ((inb(current_readport)) * 9 / 5) + 32; + spin_unlock(&io_lock); return 0; } @@ -520,7 +425,7 @@ static int pcwd_ioctl(struct inode *inode, struct file *file, return put_user(status, argp); case WDIOC_GETBOOTSTATUS: - return put_user(pcwd_private.boot_status, argp); + return put_user(initial_status, argp); case WDIOC_GETTEMP: if (pcwd_get_temperature(&temperature)) @@ -529,7 +434,7 @@ static int pcwd_ioctl(struct inode *inode, struct file *file, return put_user(temperature, argp); case WDIOC_SETOPTIONS: - if (pcwd_private.revision == PCWD_REVISION_C) + if (revision == PCWD_REVISION_C) { if(copy_from_user(&rv, argp, sizeof(int))) return -EFAULT; @@ -645,7 +550,7 @@ static ssize_t pcwd_temp_read(struct file *file, char __user *buf, size_t count, static int pcwd_temp_open(struct inode *inode, struct file *file) { - if (!pcwd_private.supports_temp) + if (!supports_temp) return -ENODEV; return nonseekable_open(inode, file); @@ -711,24 +616,68 @@ static struct notifier_block pcwd_notifier = { * Init & exit routines */ +static inline void get_support(void) +{ + if (inb(current_readport) != 0xF0) + supports_temp = 1; +} + static inline int get_revision(void) { int r = PCWD_REVISION_C; - spin_lock(&pcwd_private.io_lock); + spin_lock(&io_lock); /* REV A cards use only 2 io ports; test * presumes a floating bus reads as 0xff. */ - if ((inb(pcwd_private.io_addr + 2) == 0xFF) || - (inb(pcwd_private.io_addr + 3) == 0xFF)) + if ((inb(current_readport + 2) == 0xFF) || + (inb(current_readport + 3) == 0xFF)) r=PCWD_REVISION_A; - spin_unlock(&pcwd_private.io_lock); + spin_unlock(&io_lock); return r; } +static inline char *get_firmware(void) +{ + int one, ten, hund, minor; + char *ret; + + ret = kmalloc(6, GFP_KERNEL); + if(ret == NULL) + return NULL; + + if (set_command_mode()) { + one = send_isa_command(CMD_ISA_VERSION_INTEGER); + ten = send_isa_command(CMD_ISA_VERSION_TENTH); + hund = send_isa_command(CMD_ISA_VERSION_HUNDRETH); + minor = send_isa_command(CMD_ISA_VERSION_MINOR); + sprintf(ret, "%c.%c%c%c", one, ten, hund, minor); + } + else + sprintf(ret, "ERROR"); + + unset_command_mode(); + return(ret); +} + +static inline int get_option_switches(void) +{ + int rv=0; + + if (set_command_mode()) { + /* Get switch settings */ + rv = send_isa_command(CMD_ISA_SWITCH_SETTINGS); + } + + unset_command_mode(); + return(rv); +} + static int __devinit pcwatchdog_init(int base_addr) { int ret; + char *firmware; + int option_switches; cards_found++; if (cards_found == 1) @@ -743,66 +692,104 @@ static int __devinit pcwatchdog_init(int base_addr) printk(KERN_ERR PFX "No I/O-Address for card detected\n"); return -ENODEV; } - pcwd_private.io_addr = base_addr; + current_readport = base_addr; /* Check card's revision */ - pcwd_private.revision = get_revision(); + revision = get_revision(); - if (!request_region(pcwd_private.io_addr, (pcwd_private.revision == PCWD_REVISION_A) ? 2 : 4, "PCWD")) { + if (!request_region(current_readport, (revision == PCWD_REVISION_A) ? 2 : 4, "PCWD")) { printk(KERN_ERR PFX "I/O address 0x%04x already in use\n", - pcwd_private.io_addr); - pcwd_private.io_addr = 0x0000; + current_readport); + current_readport = 0x0000; return -EIO; } /* Initial variables */ - pcwd_private.supports_temp = 0; + supports_temp = 0; temp_panic = 0; - pcwd_private.boot_status = 0x0000; + initial_status = 0x0000; /* get the boot_status */ - pcwd_get_status(&pcwd_private.boot_status); + pcwd_get_status(&initial_status); /* clear the "card caused reboot" flag */ pcwd_clear_status(); - init_timer(&pcwd_private.timer); - pcwd_private.timer.function = pcwd_timer_ping; - pcwd_private.timer.data = 0; + init_timer(&timer); + timer.function = pcwd_timer_ping; + timer.data = 0; /* Disable the board */ pcwd_stop(); /* Check whether or not the card supports the temperature device */ - pcwd_check_temperature_support(); + get_support(); + + /* Get some extra info from the hardware (in command/debug/diag mode) */ + if (revision == PCWD_REVISION_A) + printk(KERN_INFO PFX "ISA-PC Watchdog (REV.A) detected at port 0x%04x\n", current_readport); + else if (revision == PCWD_REVISION_C) { + firmware = get_firmware(); + printk(KERN_INFO PFX "ISA-PC Watchdog (REV.C) detected at port 0x%04x (Firmware version: %s)\n", + current_readport, firmware); + kfree(firmware); + option_switches = get_option_switches(); + printk(KERN_INFO PFX "Option switches (0x%02x): Temperature Reset Enable=%s, Power On Delay=%s\n", + option_switches, + ((option_switches & 0x10) ? "ON" : "OFF"), + ((option_switches & 0x08) ? "ON" : "OFF")); + + /* Reprogram internal heartbeat to 2 seconds */ + if (set_command_mode()) { + send_isa_command(CMD_ISA_DELAY_TIME_2SECS); + unset_command_mode(); + } + } else { + /* Should NEVER happen, unless get_revision() fails. */ + printk(KERN_INFO PFX "Unable to get revision\n"); + release_region(current_readport, (revision == PCWD_REVISION_A) ? 2 : 4); + current_readport = 0x0000; + return -1; + } - /* Show info about the card itself */ - pcwd_show_card_info(); + if (supports_temp) + printk(KERN_INFO PFX "Temperature Option Detected\n"); + + if (initial_status & WDIOF_CARDRESET) + printk(KERN_INFO PFX "Previous reboot was caused by the card\n"); + + if (initial_status & WDIOF_OVERHEAT) { + printk(KERN_EMERG PFX "Card senses a CPU Overheat. Panicking!\n"); + printk(KERN_EMERG PFX "CPU Overheat\n"); + } + + if (initial_status == 0) + printk(KERN_INFO PFX "No previous trip detected - Cold boot or reset\n"); /* Check that the heartbeat value is within it's range ; if not reset to the default */ - if (pcwd_set_heartbeat(heartbeat)) { - pcwd_set_heartbeat(WATCHDOG_HEARTBEAT); - printk(KERN_INFO PFX "heartbeat value must be 2<=heartbeat<=7200, using %d\n", - WATCHDOG_HEARTBEAT); + if (pcwd_set_heartbeat(heartbeat)) { + pcwd_set_heartbeat(WATCHDOG_HEARTBEAT); + printk(KERN_INFO PFX "heartbeat value must be 2<=heartbeat<=7200, using %d\n", + WATCHDOG_HEARTBEAT); } ret = register_reboot_notifier(&pcwd_notifier); if (ret) { printk(KERN_ERR PFX "cannot register reboot notifier (err=%d)\n", ret); - release_region(pcwd_private.io_addr, (pcwd_private.revision == PCWD_REVISION_A) ? 2 : 4); - pcwd_private.io_addr = 0x0000; + release_region(current_readport, (revision == PCWD_REVISION_A) ? 2 : 4); + current_readport = 0x0000; return ret; } - if (pcwd_private.supports_temp) { + if (supports_temp) { ret = misc_register(&temp_miscdev); if (ret) { printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n", TEMP_MINOR, ret); unregister_reboot_notifier(&pcwd_notifier); - release_region(pcwd_private.io_addr, (pcwd_private.revision == PCWD_REVISION_A) ? 2 : 4); - pcwd_private.io_addr = 0x0000; + release_region(current_readport, (revision == PCWD_REVISION_A) ? 2 : 4); + current_readport = 0x0000; return ret; } } @@ -811,11 +798,11 @@ static int __devinit pcwatchdog_init(int base_addr) if (ret) { printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n", WATCHDOG_MINOR, ret); - if (pcwd_private.supports_temp) + if (supports_temp) misc_deregister(&temp_miscdev); unregister_reboot_notifier(&pcwd_notifier); - release_region(pcwd_private.io_addr, (pcwd_private.revision == PCWD_REVISION_A) ? 2 : 4); - pcwd_private.io_addr = 0x0000; + release_region(current_readport, (revision == PCWD_REVISION_A) ? 2 : 4); + current_readport = 0x0000; return ret; } @@ -833,12 +820,11 @@ static void __devexit pcwatchdog_exit(void) /* Deregister */ misc_deregister(&pcwd_miscdev); - if (pcwd_private.supports_temp) + if (supports_temp) misc_deregister(&temp_miscdev); unregister_reboot_notifier(&pcwd_notifier); - release_region(pcwd_private.io_addr, (pcwd_private.revision == PCWD_REVISION_A) ? 2 : 4); - pcwd_private.io_addr = 0x0000; - cards_found--; + release_region(current_readport, (revision == PCWD_REVISION_A) ? 2 : 4); + current_readport = 0x0000; } /* @@ -901,7 +887,7 @@ static int __init pcwd_init_module(void) { int i, found = 0; - spin_lock_init(&pcwd_private.io_lock); + spin_lock_init(&io_lock); for (i = 0; pcwd_ioports[i] != 0; i++) { if (pcwd_checkcard(pcwd_ioports[i])) { @@ -920,7 +906,7 @@ static int __init pcwd_init_module(void) static void __exit pcwd_cleanup_module(void) { - if (pcwd_private.io_addr) + if (current_readport) pcwatchdog_exit(); return; } diff --git a/trunk/drivers/char/watchdog/sa1100_wdt.c b/trunk/drivers/char/watchdog/sa1100_wdt.c index 522a9370db94..b474ea52d6e8 100644 --- a/trunk/drivers/char/watchdog/sa1100_wdt.c +++ b/trunk/drivers/char/watchdog/sa1100_wdt.c @@ -93,25 +93,23 @@ static int sa1100dog_ioctl(struct inode *inode, struct file *file, { int ret = -ENOIOCTLCMD; int time; - void __user *argp = (void __user *)arg; - int __user *p = argp; switch (cmd) { case WDIOC_GETSUPPORT: - ret = copy_to_user(argp, &ident, + ret = copy_to_user((struct watchdog_info __user *)arg, &ident, sizeof(ident)) ? -EFAULT : 0; break; case WDIOC_GETSTATUS: - ret = put_user(0, p); + ret = put_user(0, (int __user *)arg); break; case WDIOC_GETBOOTSTATUS: - ret = put_user(boot_status, p); + ret = put_user(boot_status, (int __user *)arg); break; case WDIOC_SETTIMEOUT: - ret = get_user(time, p); + ret = get_user(time, (int __user *)arg); if (ret) break; @@ -125,7 +123,7 @@ static int sa1100dog_ioctl(struct inode *inode, struct file *file, /*fall through*/ case WDIOC_GETTIMEOUT: - ret = put_user(pre_margin / OSCR_FREQ, p); + ret = put_user(pre_margin / OSCR_FREQ, (int __user *)arg); break; case WDIOC_KEEPALIVE: diff --git a/trunk/drivers/cpufreq/cpufreq.c b/trunk/drivers/cpufreq/cpufreq.c index 9582de1c9cad..7a511479ae29 100644 --- a/trunk/drivers/cpufreq/cpufreq.c +++ b/trunk/drivers/cpufreq/cpufreq.c @@ -35,8 +35,8 @@ * level driver of CPUFreq support, and its spinlock. This lock * also protects the cpufreq_cpu_data array. */ -static struct cpufreq_driver *cpufreq_driver; -static struct cpufreq_policy *cpufreq_cpu_data[NR_CPUS]; +static struct cpufreq_driver *cpufreq_driver; +static struct cpufreq_policy *cpufreq_cpu_data[NR_CPUS]; static DEFINE_SPINLOCK(cpufreq_driver_lock); /* internal prototypes */ @@ -50,15 +50,15 @@ static void handle_update(void *data); * changes to devices when the CPU clock speed changes. * The mutex locks both lists. */ -static struct notifier_block *cpufreq_policy_notifier_list; -static struct notifier_block *cpufreq_transition_notifier_list; -static DECLARE_RWSEM (cpufreq_notifier_rwsem); +static struct notifier_block *cpufreq_policy_notifier_list; +static struct notifier_block *cpufreq_transition_notifier_list; +static DECLARE_RWSEM (cpufreq_notifier_rwsem); static LIST_HEAD(cpufreq_governor_list); -static DEFINE_MUTEX (cpufreq_governor_mutex); +static DEFINE_MUTEX (cpufreq_governor_mutex); -struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu) +struct cpufreq_policy * cpufreq_cpu_get(unsigned int cpu) { struct cpufreq_policy *data; unsigned long flags; @@ -85,19 +85,20 @@ struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu) if (!kobject_get(&data->kobj)) goto err_out_put_module; + spin_unlock_irqrestore(&cpufreq_driver_lock, flags); + return data; -err_out_put_module: + err_out_put_module: module_put(cpufreq_driver->owner); -err_out_unlock: + err_out_unlock: spin_unlock_irqrestore(&cpufreq_driver_lock, flags); -err_out: + err_out: return NULL; } EXPORT_SYMBOL_GPL(cpufreq_cpu_get); - void cpufreq_cpu_put(struct cpufreq_policy *data) { kobject_put(&data->kobj); @@ -228,53 +229,44 @@ static inline void adjust_jiffies(unsigned long val, struct cpufreq_freqs *ci) { /** - * cpufreq_notify_transition - call notifier chain and adjust_jiffies - * on frequency transition. + * cpufreq_notify_transition - call notifier chain and adjust_jiffies on frequency transition * - * This function calls the transition notifiers and the "adjust_jiffies" - * function. It is called twice on all CPU frequency changes that have - * external effects. + * This function calls the transition notifiers and the "adjust_jiffies" function. It is called + * twice on all CPU frequency changes that have external effects. */ void cpufreq_notify_transition(struct cpufreq_freqs *freqs, unsigned int state) { - struct cpufreq_policy *policy; - BUG_ON(irqs_disabled()); freqs->flags = cpufreq_driver->flags; - dprintk("notification %u of frequency transition to %u kHz\n", - state, freqs->new); + dprintk("notification %u of frequency transition to %u kHz\n", state, freqs->new); down_read(&cpufreq_notifier_rwsem); - - policy = cpufreq_cpu_data[freqs->cpu]; switch (state) { - case CPUFREQ_PRECHANGE: - /* detect if the driver reported a value as "old frequency" - * which is not equal to what the cpufreq core thinks is - * "old frequency". + /* detect if the driver reported a value as "old frequency" which + * is not equal to what the cpufreq core thinks is "old frequency". */ if (!(cpufreq_driver->flags & CPUFREQ_CONST_LOOPS)) { - if ((policy) && (policy->cpu == freqs->cpu) && - (policy->cur) && (policy->cur != freqs->old)) { - dprintk(KERN_WARNING "Warning: CPU frequency is" - " %u, cpufreq assumed %u kHz.\n", - freqs->old, policy->cur); - freqs->old = policy->cur; + if ((likely(cpufreq_cpu_data[freqs->cpu])) && + (likely(cpufreq_cpu_data[freqs->cpu]->cpu == freqs->cpu)) && + (likely(cpufreq_cpu_data[freqs->cpu]->cur)) && + (unlikely(freqs->old != cpufreq_cpu_data[freqs->cpu]->cur))) + { + dprintk(KERN_WARNING "Warning: CPU frequency is %u, " + "cpufreq assumed %u kHz.\n", freqs->old, cpufreq_cpu_data[freqs->cpu]->cur); + freqs->old = cpufreq_cpu_data[freqs->cpu]->cur; } } - notifier_call_chain(&cpufreq_transition_notifier_list, - CPUFREQ_PRECHANGE, freqs); + notifier_call_chain(&cpufreq_transition_notifier_list, CPUFREQ_PRECHANGE, freqs); adjust_jiffies(CPUFREQ_PRECHANGE, freqs); break; - case CPUFREQ_POSTCHANGE: adjust_jiffies(CPUFREQ_POSTCHANGE, freqs); - notifier_call_chain(&cpufreq_transition_notifier_list, - CPUFREQ_POSTCHANGE, freqs); - if (likely(policy) && likely(policy->cpu == freqs->cpu)) - policy->cur = freqs->new; + notifier_call_chain(&cpufreq_transition_notifier_list, CPUFREQ_POSTCHANGE, freqs); + if ((likely(cpufreq_cpu_data[freqs->cpu])) && + (likely(cpufreq_cpu_data[freqs->cpu]->cpu == freqs->cpu))) + cpufreq_cpu_data[freqs->cpu]->cur = freqs->new; break; } up_read(&cpufreq_notifier_rwsem); @@ -316,7 +308,7 @@ static int cpufreq_parse_governor (char *str_governor, unsigned int *policy, return 0; } } -out: + out: mutex_unlock(&cpufreq_governor_mutex); } return -EINVAL; @@ -423,6 +415,7 @@ static ssize_t store_scaling_governor (struct cpufreq_policy * policy, return -EINVAL; ret = cpufreq_set_policy(&new_policy); + return ret ? ret : count; } @@ -453,7 +446,7 @@ static ssize_t show_scaling_available_governors (struct cpufreq_policy * policy, goto out; i += scnprintf(&buf[i], CPUFREQ_NAME_LEN, "%s ", t->name); } -out: + out: i += sprintf(&buf[i], "\n"); return i; } @@ -796,6 +789,7 @@ static int cpufreq_remove_dev (struct sys_device * sys_dev) kfree(data); cpufreq_debug_enable_ratelimit(); + return 0; } @@ -876,7 +870,8 @@ unsigned int cpufreq_get(unsigned int cpu) ret = cpufreq_driver->get(cpu); - if (ret && policy->cur && !(cpufreq_driver->flags & CPUFREQ_CONST_LOOPS)) { + if (ret && policy->cur && !(cpufreq_driver->flags & CPUFREQ_CONST_LOOPS)) + { /* verify no discrepancy between actual and saved value exists */ if (unlikely(ret != policy->cur)) { cpufreq_out_of_sync(cpu, policy->cur, ret); @@ -886,7 +881,7 @@ unsigned int cpufreq_get(unsigned int cpu) mutex_unlock(&policy->lock); -out: + out: cpufreq_cpu_put(policy); return (ret); @@ -967,7 +962,7 @@ static int cpufreq_suspend(struct sys_device * sysdev, pm_message_t pmsg) cpu_policy->cur = cur_freq; } -out: + out: cpufreq_cpu_put(cpu_policy); return 0; } @@ -1174,6 +1169,7 @@ int cpufreq_driver_target(struct cpufreq_policy *policy, mutex_unlock(&policy->lock); cpufreq_cpu_put(policy); + return ret; } EXPORT_SYMBOL_GPL(cpufreq_driver_target); @@ -1212,6 +1208,7 @@ int cpufreq_governor(unsigned int cpu, unsigned int event) mutex_unlock(&policy->lock); cpufreq_cpu_put(policy); + return ret; } EXPORT_SYMBOL_GPL(cpufreq_governor); @@ -1235,6 +1232,7 @@ int cpufreq_register_governor(struct cpufreq_governor *governor) list_add(&governor->governor_list, &cpufreq_governor_list); mutex_unlock(&cpufreq_governor_mutex); + return 0; } EXPORT_SYMBOL_GPL(cpufreq_register_governor); @@ -1279,6 +1277,7 @@ int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu) mutex_unlock(&cpu_policy->lock); cpufreq_cpu_put(cpu_policy); + return 0; } EXPORT_SYMBOL(cpufreq_get_policy); @@ -1292,7 +1291,9 @@ static int __cpufreq_set_policy(struct cpufreq_policy *data, struct cpufreq_poli dprintk("setting new policy for CPU %u: %u - %u kHz\n", policy->cpu, policy->min, policy->max); - memcpy(&policy->cpuinfo, &data->cpuinfo, sizeof(struct cpufreq_cpuinfo)); + memcpy(&policy->cpuinfo, + &data->cpuinfo, + sizeof(struct cpufreq_cpuinfo)); /* verify the cpu speed can be set within this limit */ ret = cpufreq_driver->verify(policy); @@ -1323,8 +1324,8 @@ static int __cpufreq_set_policy(struct cpufreq_policy *data, struct cpufreq_poli up_read(&cpufreq_notifier_rwsem); - data->min = policy->min; - data->max = policy->max; + data->min = policy->min; + data->max = policy->max; dprintk("new min and max freqs are %u - %u kHz\n", data->min, data->max); @@ -1361,7 +1362,7 @@ static int __cpufreq_set_policy(struct cpufreq_policy *data, struct cpufreq_poli __cpufreq_governor(data, CPUFREQ_GOV_LIMITS); } -error_out: + error_out: cpufreq_debug_enable_ratelimit(); return ret; } @@ -1420,7 +1421,9 @@ int cpufreq_update_policy(unsigned int cpu) mutex_lock(&data->lock); dprintk("updating policy for CPU %u\n", cpu); - memcpy(&policy, data, sizeof(struct cpufreq_policy)); + memcpy(&policy, + data, + sizeof(struct cpufreq_policy)); policy.min = data->user_policy.min; policy.max = data->user_policy.max; policy.policy = data->user_policy.policy; @@ -1430,13 +1433,8 @@ int cpufreq_update_policy(unsigned int cpu) -> ask driver for current freq and notify governors about a change */ if (cpufreq_driver->get) { policy.cur = cpufreq_driver->get(cpu); - if (!data->cur) { - dprintk("Driver did not initialize current freq"); - data->cur = policy.cur; - } else { - if (data->cur != policy.cur) - cpufreq_out_of_sync(cpu, data->cur, policy.cur); - } + if (data->cur != policy.cur) + cpufreq_out_of_sync(cpu, data->cur, policy.cur); } ret = __cpufreq_set_policy(data, &policy); diff --git a/trunk/drivers/net/appletalk/cops.h b/trunk/drivers/net/appletalk/cops.h index fd2750b269c8..c68ba9c2ef46 100644 --- a/trunk/drivers/net/appletalk/cops.h +++ b/trunk/drivers/net/appletalk/cops.h @@ -51,7 +51,7 @@ struct ltfirmware { unsigned int length; - const unsigned char *data; + unsigned char * data; }; #define DAYNA 1 diff --git a/trunk/drivers/net/wireless/Kconfig b/trunk/drivers/net/wireless/Kconfig index ef85d76575a2..233a4f608084 100644 --- a/trunk/drivers/net/wireless/Kconfig +++ b/trunk/drivers/net/wireless/Kconfig @@ -148,7 +148,7 @@ config IPW2100 In order to use this driver, you will need a firmware image for it. You can obtain the firmware from . Once you have the firmware image, you - will need to place it in /lib/firmware. + will need to place it in /etc/firmware. You will also very likely need the Wireless Tools in order to configure your card: diff --git a/trunk/drivers/net/wireless/orinoco_cs.c b/trunk/drivers/net/wireless/orinoco_cs.c index ec6f2a48895b..3c128b692bce 100644 --- a/trunk/drivers/net/wireless/orinoco_cs.c +++ b/trunk/drivers/net/wireless/orinoco_cs.c @@ -590,7 +590,6 @@ static struct pcmcia_device_id orinoco_cs_ids[] = { PCMCIA_DEVICE_PROD_ID12("PROXIM", "LAN PC CARD HARMONY 80211B", 0xc6536a5e, 0x090c3cd9), PCMCIA_DEVICE_PROD_ID12("PROXIM", "LAN PCI CARD HARMONY 80211B", 0xc6536a5e, 0x9f494e26), PCMCIA_DEVICE_PROD_ID12("SAMSUNG", "11Mbps WLAN Card", 0x43d74cb4, 0x579bd91b), - PCMCIA_DEVICE_PROD_ID12("SMC", "SMC2532W-B EliteConnect Wireless Adapter", 0xc4f8b18b, 0x196bd757), PCMCIA_DEVICE_PROD_ID12("SMC", "SMC2632W", 0xc4f8b18b, 0x474a1f2a), PCMCIA_DEVICE_PROD_ID12("Symbol Technologies", "LA4111 Spectrum24 Wireless LAN PC Card", 0x3f02b4d6, 0x3663cb0e), PCMCIA_DEVICE_PROD_ID123("The Linksys Group, Inc.", "Instant Wireless Network PC Card", "ISL37300P", 0xa5f472c2, 0x590eb502, 0xc9049a39), diff --git a/trunk/drivers/parisc/ccio-dma.c b/trunk/drivers/parisc/ccio-dma.c index f46e8438e0d2..93f8a8fa8890 100644 --- a/trunk/drivers/parisc/ccio-dma.c +++ b/trunk/drivers/parisc/ccio-dma.c @@ -40,6 +40,8 @@ #include #include #include +#include +#include #include #include /* for L1_CACHE_BYTES */ @@ -1019,62 +1021,33 @@ static struct hppa_dma_ops ccio_ops = { }; #ifdef CONFIG_PROC_FS -static int proc_append(char *src, int len, char **dst, off_t *offset, int *max) -{ - if (len < *offset) { - *offset -= len; - return 0; - } - if (*offset > 0) { - src += *offset; - len -= *offset; - *offset = 0; - } - if (len > *max) { - len = *max; - } - memcpy(*dst, src, len); - *dst += len; - *max -= len; - return (*max == 0); -} - -static int ccio_proc_info(char *buf, char **start, off_t offset, int count, - int *eof, void *data) +static int ccio_proc_info(struct seq_file *m, void *p) { - int max = count; - char tmp[80]; /* width of an ANSI-standard terminal */ + int len = 0; struct ioc *ioc = ioc_list; while (ioc != NULL) { unsigned int total_pages = ioc->res_size << 3; unsigned long avg = 0, min, max; - int j, len; + int j; - len = sprintf(tmp, "%s\n", ioc->name); - if (proc_append(tmp, len, &buf, &offset, &count)) - break; + len += seq_printf(m, "%s\n", ioc->name); - len = sprintf(tmp, "Cujo 2.0 bug : %s\n", - (ioc->cujo20_bug ? "yes" : "no")); - if (proc_append(tmp, len, &buf, &offset, &count)) - break; + len += seq_printf(m, "Cujo 2.0 bug : %s\n", + (ioc->cujo20_bug ? "yes" : "no")); - len = sprintf(tmp, "IO PDIR size : %d bytes (%d entries)\n", - total_pages * 8, total_pages); - if (proc_append(tmp, len, &buf, &offset, &count)) - break; + len += seq_printf(m, "IO PDIR size : %d bytes (%d entries)\n", + total_pages * 8, total_pages); + #ifdef CCIO_MAP_STATS - len = sprintf(tmp, "IO PDIR entries : %ld free %ld used (%d%%)\n", - total_pages - ioc->used_pages, ioc->used_pages, - (int)(ioc->used_pages * 100 / total_pages)); - if (proc_append(tmp, len, &buf, &offset, &count)) - break; + len += seq_printf(m, "IO PDIR entries : %ld free %ld used (%d%%)\n", + total_pages - ioc->used_pages, ioc->used_pages, + (int)(ioc->used_pages * 100 / total_pages)); #endif - len = sprintf(tmp, "Resource bitmap : %d bytes (%d pages)\n", - ioc->res_size, total_pages); - if (proc_append(tmp, len, &buf, &offset, &count)) - break; + + len += seq_printf(m, "Resource bitmap : %d bytes (%d pages)\n", + ioc->res_size, total_pages); + #ifdef CCIO_SEARCH_TIME min = max = ioc->avg_search[0]; for(j = 0; j < CCIO_SEARCH_SAMPLE; ++j) { @@ -1085,70 +1058,83 @@ static int ccio_proc_info(char *buf, char **start, off_t offset, int count, min = ioc->avg_search[j]; } avg /= CCIO_SEARCH_SAMPLE; - len = sprintf(tmp, " Bitmap search : %ld/%ld/%ld (min/avg/max CPU Cycles)\n", - min, avg, max); - if (proc_append(tmp, len, &buf, &offset, &count)) - break; + len += seq_printf(m, " Bitmap search : %ld/%ld/%ld (min/avg/max CPU Cycles)\n", + min, avg, max); #endif #ifdef CCIO_MAP_STATS - len = sprintf(tmp, "pci_map_single(): %8ld calls %8ld pages (avg %d/1000)\n", - ioc->msingle_calls, ioc->msingle_pages, - (int)((ioc->msingle_pages * 1000)/ioc->msingle_calls)); - if (proc_append(tmp, len, &buf, &offset, &count)) - break; - + len += seq_printf(m, "pci_map_single(): %8ld calls %8ld pages (avg %d/1000)\n", + ioc->msingle_calls, ioc->msingle_pages, + (int)((ioc->msingle_pages * 1000)/ioc->msingle_calls)); /* KLUGE - unmap_sg calls unmap_single for each mapped page */ min = ioc->usingle_calls - ioc->usg_calls; max = ioc->usingle_pages - ioc->usg_pages; - len = sprintf(tmp, "pci_unmap_single: %8ld calls %8ld pages (avg %d/1000)\n", - min, max, (int)((max * 1000)/min)); - if (proc_append(tmp, len, &buf, &offset, &count)) - break; + len += seq_printf(m, "pci_unmap_single: %8ld calls %8ld pages (avg %d/1000)\n", + min, max, (int)((max * 1000)/min)); - len = sprintf(tmp, "pci_map_sg() : %8ld calls %8ld pages (avg %d/1000)\n", - ioc->msg_calls, ioc->msg_pages, - (int)((ioc->msg_pages * 1000)/ioc->msg_calls)); - if (proc_append(tmp, len, &buf, &offset, &count)) - break; - len = sprintf(tmp, "pci_unmap_sg() : %8ld calls %8ld pages (avg %d/1000)\n\n\n", - ioc->usg_calls, ioc->usg_pages, - (int)((ioc->usg_pages * 1000)/ioc->usg_calls)); - if (proc_append(tmp, len, &buf, &offset, &count)) - break; + len += seq_printf(m, "pci_map_sg() : %8ld calls %8ld pages (avg %d/1000)\n", + ioc->msg_calls, ioc->msg_pages, + (int)((ioc->msg_pages * 1000)/ioc->msg_calls)); + + len += seq_printf(m, "pci_unmap_sg() : %8ld calls %8ld pages (avg %d/1000)\n\n\n", + ioc->usg_calls, ioc->usg_pages, + (int)((ioc->usg_pages * 1000)/ioc->usg_calls)); #endif /* CCIO_MAP_STATS */ + ioc = ioc->next; } - if (count == 0) { - *eof = 1; - } - return (max - count); + return 0; +} + +static int ccio_proc_info_open(struct inode *inode, struct file *file) +{ + return single_open(file, &ccio_proc_info, NULL); } -static int ccio_resource_map(char *buf, char **start, off_t offset, int len, - int *eof, void *data) +static struct file_operations ccio_proc_info_fops = { + .owner = THIS_MODULE, + .open = ccio_proc_info_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; + +static int ccio_proc_bitmap_info(struct seq_file *m, void *p) { + int len = 0; struct ioc *ioc = ioc_list; - buf[0] = '\0'; while (ioc != NULL) { u32 *res_ptr = (u32 *)ioc->res_map; int j; for (j = 0; j < (ioc->res_size / sizeof(u32)); j++) { if ((j & 7) == 0) - strcat(buf,"\n "); - sprintf(buf, "%s %08x", buf, *res_ptr); + len += seq_puts(m, "\n "); + len += seq_printf(m, "%08x", *res_ptr); res_ptr++; } - strcat(buf, "\n\n"); + len += seq_puts(m, "\n\n"); ioc = ioc->next; break; /* XXX - remove me */ } - return strlen(buf); + return 0; } + +static int ccio_proc_bitmap_open(struct inode *inode, struct file *file) +{ + return single_open(file, &ccio_proc_bitmap_info, NULL); +} + +static struct file_operations ccio_proc_bitmap_fops = { + .owner = THIS_MODULE, + .open = ccio_proc_bitmap_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; #endif /** @@ -1556,6 +1542,7 @@ static int ccio_probe(struct parisc_device *dev) { int i; struct ioc *ioc, **ioc_p = &ioc_list; + struct proc_dir_entry *info_entry, *bitmap_entry; ioc = kzalloc(sizeof(struct ioc), GFP_KERNEL); if (ioc == NULL) { @@ -1583,13 +1570,14 @@ static int ccio_probe(struct parisc_device *dev) BUG_ON(dev->dev.platform_data == NULL); HBA_DATA(dev->dev.platform_data)->iommu = ioc; - if (ioc_count == 0) { - /* FIXME: Create separate entries for each ioc */ - create_proc_read_entry(MODULE_NAME, S_IRWXU, proc_runway_root, - ccio_proc_info, NULL); - create_proc_read_entry(MODULE_NAME"-bitmap", S_IRWXU, - proc_runway_root, ccio_resource_map, NULL); + info_entry = create_proc_entry(MODULE_NAME, 0, proc_runway_root); + if (info_entry) + info_entry->proc_fops = &ccio_proc_info_fops; + + bitmap_entry = create_proc_entry(MODULE_NAME"-bitmap", 0, proc_runway_root); + if (bitmap_entry) + bitmap_entry->proc_fops = &ccio_proc_bitmap_fops; } ioc_count++; diff --git a/trunk/drivers/s390/char/sclp.c b/trunk/drivers/s390/char/sclp.c index 4138564402b8..ceb0e474fde4 100644 --- a/trunk/drivers/s390/char/sclp.c +++ b/trunk/drivers/s390/char/sclp.c @@ -85,10 +85,11 @@ static volatile enum sclp_mask_state_t { /* Maximum retry counts */ #define SCLP_INIT_RETRY 3 #define SCLP_MASK_RETRY 3 +#define SCLP_REQUEST_RETRY 3 /* Timeout intervals in seconds.*/ -#define SCLP_BUSY_INTERVAL 10 -#define SCLP_RETRY_INTERVAL 15 +#define SCLP_BUSY_INTERVAL 2 +#define SCLP_RETRY_INTERVAL 5 static void sclp_process_queue(void); static int sclp_init_mask(int calculate); @@ -152,9 +153,11 @@ __sclp_start_request(struct sclp_req *req) if (sclp_running_state != sclp_running_state_idle) return 0; del_timer(&sclp_request_timer); - rc = service_call(req->command, req->sccb); - req->start_count++; - + if (req->start_count <= SCLP_REQUEST_RETRY) { + rc = service_call(req->command, req->sccb); + req->start_count++; + } else + rc = -EIO; if (rc == 0) { /* Sucessfully started request */ req->status = SCLP_REQ_RUNNING; diff --git a/trunk/drivers/s390/cio/chsc.c b/trunk/drivers/s390/cio/chsc.c index 8cf9905d484b..92be75d99a56 100644 --- a/trunk/drivers/s390/cio/chsc.c +++ b/trunk/drivers/s390/cio/chsc.c @@ -232,7 +232,7 @@ s390_subchannel_remove_chpid(struct device *dev, void *data) return 0; mask = 0x80 >> j; - spin_lock_irq(&sch->lock); + spin_lock(&sch->lock); stsch(sch->schid, &schib); if (!schib.pmcw.dnv) @@ -281,10 +281,10 @@ s390_subchannel_remove_chpid(struct device *dev, void *data) if (sch->driver && sch->driver->verify) sch->driver->verify(&sch->dev); out_unlock: - spin_unlock_irq(&sch->lock); + spin_unlock(&sch->lock); return 0; out_unreg: - spin_unlock_irq(&sch->lock); + spin_unlock(&sch->lock); sch->lpm = 0; if (css_enqueue_subchannel_slow(sch->schid)) { css_clear_subchannel_slow_list(); @@ -652,7 +652,7 @@ __chp_add(struct subchannel_id schid, void *data) if (!sch) /* Check if the subchannel is now available. */ return __chp_add_new_sch(schid); - spin_lock_irq(&sch->lock); + spin_lock(&sch->lock); for (i=0; i<8; i++) if (sch->schib.pmcw.chpid[i] == chp->id) { if (stsch(sch->schid, &sch->schib) != 0) { @@ -674,7 +674,7 @@ __chp_add(struct subchannel_id schid, void *data) if (sch->driver && sch->driver->verify) sch->driver->verify(&sch->dev); - spin_unlock_irq(&sch->lock); + spin_unlock(&sch->lock); put_device(&sch->dev); return 0; } diff --git a/trunk/drivers/scsi/sata_mv.c b/trunk/drivers/scsi/sata_mv.c index 6fddf17a3b70..cd54244058b5 100644 --- a/trunk/drivers/scsi/sata_mv.c +++ b/trunk/drivers/scsi/sata_mv.c @@ -509,12 +509,6 @@ static const struct mv_hw_ops mv6xxx_ops = { .reset_bus = mv_reset_pci_bus, }; -/* - * module options - */ -static int msi; /* Use PCI msi; either zero (off, default) or non-zero */ - - /* * Functions */ @@ -2197,7 +2191,7 @@ static int mv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) } /* Enable interrupts */ - if (msi && pci_enable_msi(pdev) == 0) { + if (pci_enable_msi(pdev) == 0) { hpriv->hp_flags |= MV_HP_FLAG_MSI; } else { pci_intx(pdev, 1); @@ -2252,8 +2246,5 @@ MODULE_LICENSE("GPL"); MODULE_DEVICE_TABLE(pci, mv_pci_tbl); MODULE_VERSION(DRV_VERSION); -module_param(msi, int, 0444); -MODULE_PARM_DESC(msi, "Enable use of PCI MSI (0=off, 1=on)"); - module_init(mv_init); module_exit(mv_exit); diff --git a/trunk/drivers/scsi/sata_sil.c b/trunk/drivers/scsi/sata_sil.c index 17f74d3c10e7..b017f85e6d6a 100644 --- a/trunk/drivers/scsi/sata_sil.c +++ b/trunk/drivers/scsi/sata_sil.c @@ -231,10 +231,6 @@ MODULE_LICENSE("GPL"); MODULE_DEVICE_TABLE(pci, sil_pci_tbl); MODULE_VERSION(DRV_VERSION); -static int slow_down = 0; -module_param(slow_down, int, 0444); -MODULE_PARM_DESC(slow_down, "Sledgehammer used to work around random problems, by limiting commands to 15 sectors (0=off, 1=on)"); - static unsigned char sil_get_device_cache_line(struct pci_dev *pdev) { @@ -358,10 +354,8 @@ static void sil_dev_config(struct ata_port *ap, struct ata_device *dev) } /* limit requests to 15 sectors */ - if (slow_down || - ((ap->flags & SIL_FLAG_MOD15WRITE) && - (quirks & SIL_QUIRK_MOD15WRITE))) { - printk(KERN_INFO "ata%u(%u): applying Seagate errata fix (mod15write workaround)\n", + if ((ap->flags & SIL_FLAG_MOD15WRITE) && (quirks & SIL_QUIRK_MOD15WRITE)) { + printk(KERN_INFO "ata%u(%u): applying Seagate errata fix\n", ap->id, dev->devno); ap->host->max_sectors = 15; ap->host->hostt->max_sectors = 15; diff --git a/trunk/drivers/serial/ioc4_serial.c b/trunk/drivers/serial/ioc4_serial.c index f3763d2ccb86..1d85533d46d2 100644 --- a/trunk/drivers/serial/ioc4_serial.c +++ b/trunk/drivers/serial/ioc4_serial.c @@ -1717,9 +1717,11 @@ ioc4_change_speed(struct uart_port *the_port, } if (cflag & CRTSCTS) { + info->flags |= ASYNC_CTS_FLOW; port->ip_sscr |= IOC4_SSCR_HFC_EN; } else { + info->flags &= ~ASYNC_CTS_FLOW; port->ip_sscr &= ~IOC4_SSCR_HFC_EN; } writel(port->ip_sscr, &port->ip_serial_regs->sscr); @@ -1758,6 +1760,18 @@ static inline int ic4_startup_local(struct uart_port *the_port) info = the_port->info; + if (info->tty) { + set_bit(TTY_IO_ERROR, &info->tty->flags); + clear_bit(TTY_IO_ERROR, &info->tty->flags); + if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI) + info->tty->alt_speed = 57600; + if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI) + info->tty->alt_speed = 115200; + if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_SHI) + info->tty->alt_speed = 230400; + if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_WARP) + info->tty->alt_speed = 460800; + } local_open(port); /* set the speed of the serial port */ diff --git a/trunk/drivers/video/Kconfig b/trunk/drivers/video/Kconfig index e64ed16bd42f..3e153d313bb0 100644 --- a/trunk/drivers/video/Kconfig +++ b/trunk/drivers/video/Kconfig @@ -525,6 +525,11 @@ config FB_GBE_MEM This is the amount of memory reserved for the framebuffer, which can be any value between 1MB and 8MB. +config BUS_I2C + bool + depends on (FB = y) && VISWS + default y + config FB_SUN3 bool "Sun3 framebuffer support" depends on (FB = y) && (SUN3 || SUN3X) && BROKEN diff --git a/trunk/drivers/video/fbmem.c b/trunk/drivers/video/fbmem.c index 996c7b58564e..d2dede6ed3e5 100644 --- a/trunk/drivers/video/fbmem.c +++ b/trunk/drivers/video/fbmem.c @@ -1550,7 +1550,6 @@ int fb_get_options(char *name, char **option) return retval; } -#ifndef MODULE /** * video_setup - process command line options * @options: string of options @@ -1594,7 +1593,6 @@ static int __init video_setup(char *options) return 0; } __setup("video=", video_setup); -#endif /* * Visible symbols for modules diff --git a/trunk/drivers/video/nvidia/nvidia.c b/trunk/drivers/video/nvidia/nvidia.c index a7c4e5e8ead6..dbcb8962e57d 100644 --- a/trunk/drivers/video/nvidia/nvidia.c +++ b/trunk/drivers/video/nvidia/nvidia.c @@ -138,8 +138,6 @@ static struct pci_device_id nvidiafb_pci_tbl[] = { PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_420_8X, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, - {PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_4000, - PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_448_GO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_488_GO, diff --git a/trunk/fs/compat.c b/trunk/fs/compat.c index a2ba78bdf7f7..70c5af4cc270 100644 --- a/trunk/fs/compat.c +++ b/trunk/fs/compat.c @@ -1751,15 +1751,11 @@ asmlinkage long compat_sys_select(int n, compat_ulong_t __user *inp, ret = compat_core_sys_select(n, inp, outp, exp, &timeout); if (tvp) { - struct compat_timeval rtv; - if (current->personality & STICKY_TIMEOUTS) goto sticky; - rtv.tv_usec = jiffies_to_usecs(do_div((*(u64*)&timeout), HZ)); - rtv.tv_sec = timeout; - if (compat_timeval_compare(&rtv, &tv) < 0) - rtv = tv; - if (copy_to_user(tvp, &rtv, sizeof(rtv))) { + tv.tv_usec = jiffies_to_usecs(do_div((*(u64*)&timeout), HZ)); + tv.tv_sec = timeout; + if (copy_to_user(tvp, &tv, sizeof(tv))) { sticky: /* * If an application puts its timeval in read-only @@ -1826,17 +1822,13 @@ asmlinkage long compat_sys_pselect7(int n, compat_ulong_t __user *inp, } while (!ret && !timeout && tsp && (ts.tv_sec || ts.tv_nsec)); if (tsp && !(current->personality & STICKY_TIMEOUTS)) { - struct compat_timespec rts; - - rts.tv_sec = timeout / HZ; - rts.tv_nsec = (timeout % HZ) * (NSEC_PER_SEC/HZ); - if (rts.tv_nsec >= NSEC_PER_SEC) { - rts.tv_sec++; - rts.tv_nsec -= NSEC_PER_SEC; + ts.tv_sec += timeout / HZ; + ts.tv_nsec += (timeout % HZ) * (1000000000/HZ); + if (ts.tv_nsec >= 1000000000) { + ts.tv_sec++; + ts.tv_nsec -= 1000000000; } - if (compat_timespec_compare(&rts, &ts) < 0) - rts = ts; - copy_to_user(tsp, &rts, sizeof(rts)); + (void)copy_to_user(tsp, &ts, sizeof(ts)); } if (ret == -ERESTARTNOHAND) { @@ -1926,17 +1918,12 @@ asmlinkage long compat_sys_ppoll(struct pollfd __user *ufds, sigprocmask(SIG_SETMASK, &sigsaved, NULL); if (tsp && timeout >= 0) { - struct compat_timespec rts; - if (current->personality & STICKY_TIMEOUTS) goto sticky; /* Yes, we know it's actually an s64, but it's also positive. */ - rts.tv_nsec = jiffies_to_usecs(do_div((*(u64*)&timeout), HZ)) * - 1000; - rts.tv_sec = timeout; - if (compat_timespec_compare(&rts, &ts) < 0) - rts = ts; - if (copy_to_user(tsp, &rts, sizeof(rts))) { + ts.tv_nsec = jiffies_to_usecs(do_div((*(u64*)&timeout), HZ)) * 1000; + ts.tv_sec = timeout; + if (copy_to_user(tsp, &ts, sizeof(ts))) { sticky: /* * If an application puts its timeval in read-only diff --git a/trunk/fs/reiserfs/super.c b/trunk/fs/reiserfs/super.c index d63da756eb49..ef5e5414e7a8 100644 --- a/trunk/fs/reiserfs/super.c +++ b/trunk/fs/reiserfs/super.c @@ -1124,6 +1124,8 @@ static void handle_attrs(struct super_block *s) "reiserfs: cannot support attributes until flag is set in super-block"); REISERFS_SB(s)->s_mount_opt &= ~(1 << REISERFS_ATTRS); } + } else if (le32_to_cpu(rs->s_flags) & reiserfs_attrs_cleared) { + REISERFS_SB(s)->s_mount_opt |= (1 << REISERFS_ATTRS); } } diff --git a/trunk/fs/reiserfs/xattr_acl.c b/trunk/fs/reiserfs/xattr_acl.c index ab8894c3b9e5..43de3ba83332 100644 --- a/trunk/fs/reiserfs/xattr_acl.c +++ b/trunk/fs/reiserfs/xattr_acl.c @@ -228,8 +228,7 @@ struct posix_acl *reiserfs_get_acl(struct inode *inode, int type) acl = ERR_PTR(retval); } else { acl = posix_acl_from_disk(value, retval); - if (!IS_ERR(acl)) - *p_acl = posix_acl_dup(acl); + *p_acl = posix_acl_dup(acl); } kfree(value); diff --git a/trunk/fs/select.c b/trunk/fs/select.c index 6ce68a9c8976..bc60a3e14ef3 100644 --- a/trunk/fs/select.c +++ b/trunk/fs/select.c @@ -398,15 +398,11 @@ asmlinkage long sys_select(int n, fd_set __user *inp, fd_set __user *outp, ret = core_sys_select(n, inp, outp, exp, &timeout); if (tvp) { - struct timeval rtv; - if (current->personality & STICKY_TIMEOUTS) goto sticky; - rtv.tv_usec = jiffies_to_usecs(do_div((*(u64*)&timeout), HZ)); - rtv.tv_sec = timeout; - if (timeval_compare(&rtv, &tv) < 0) - rtv = tv; - if (copy_to_user(tvp, &rtv, sizeof(rtv))) { + tv.tv_usec = jiffies_to_usecs(do_div((*(u64*)&timeout), HZ)); + tv.tv_sec = timeout; + if (copy_to_user(tvp, &tv, sizeof(tv))) { sticky: /* * If an application puts its timeval in read-only @@ -464,16 +460,11 @@ asmlinkage long sys_pselect7(int n, fd_set __user *inp, fd_set __user *outp, ret = core_sys_select(n, inp, outp, exp, &timeout); if (tsp) { - struct timespec rts; - if (current->personality & STICKY_TIMEOUTS) goto sticky; - rts.tv_nsec = jiffies_to_usecs(do_div((*(u64*)&timeout), HZ)) * - 1000; - rts.tv_sec = timeout; - if (timespec_compare(&rts, &ts) < 0) - rts = ts; - if (copy_to_user(tsp, &rts, sizeof(rts))) { + ts.tv_nsec = jiffies_to_usecs(do_div((*(u64*)&timeout), HZ)) * 1000; + ts.tv_sec = timeout; + if (copy_to_user(tsp, &ts, sizeof(ts))) { sticky: /* * If an application puts its timeval in read-only @@ -767,17 +758,12 @@ asmlinkage long sys_ppoll(struct pollfd __user *ufds, unsigned int nfds, sigprocmask(SIG_SETMASK, &sigsaved, NULL); if (tsp && timeout >= 0) { - struct timespec rts; - if (current->personality & STICKY_TIMEOUTS) goto sticky; /* Yes, we know it's actually an s64, but it's also positive. */ - rts.tv_nsec = jiffies_to_usecs(do_div((*(u64*)&timeout), HZ)) * - 1000; - rts.tv_sec = timeout; - if (timespec_compare(&rts, &ts) < 0) - rts = ts; - if (copy_to_user(tsp, &rts, sizeof(rts))) { + ts.tv_nsec = jiffies_to_usecs(do_div((*(u64*)&timeout), HZ)) * 1000; + ts.tv_sec = timeout; + if (copy_to_user(tsp, &ts, sizeof(ts))) { sticky: /* * If an application puts its timeval in read-only diff --git a/trunk/fs/stat.c b/trunk/fs/stat.c index 9948cc1685a4..24211b030f39 100644 --- a/trunk/fs/stat.c +++ b/trunk/fs/stat.c @@ -261,7 +261,6 @@ asmlinkage long sys_newlstat(char __user *filename, struct stat __user *statbuf) return error; } -#ifndef __ARCH_WANT_STAT64 asmlinkage long sys_newfstatat(int dfd, char __user *filename, struct stat __user *statbuf, int flag) { @@ -282,7 +281,6 @@ asmlinkage long sys_newfstatat(int dfd, char __user *filename, out: return error; } -#endif asmlinkage long sys_newfstat(unsigned int fd, struct stat __user *statbuf) { @@ -397,26 +395,6 @@ asmlinkage long sys_fstat64(unsigned long fd, struct stat64 __user * statbuf) return error; } -asmlinkage long sys_fstatat64(int dfd, char __user *filename, - struct stat64 __user *statbuf, int flag) -{ - struct kstat stat; - int error = -EINVAL; - - if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0) - goto out; - - if (flag & AT_SYMLINK_NOFOLLOW) - error = vfs_lstat_fd(dfd, filename, &stat); - else - error = vfs_stat_fd(dfd, filename, &stat); - - if (!error) - error = cp_new_stat64(&stat, statbuf); - -out: - return error; -} #endif /* __ARCH_WANT_STAT64 */ void inode_add_bytes(struct inode *inode, loff_t bytes) diff --git a/trunk/include/asm-arm/arch-s3c2410/h1940-latch.h b/trunk/include/asm-arm/arch-s3c2410/h1940-latch.h deleted file mode 100644 index c5802411f43d..000000000000 --- a/trunk/include/asm-arm/arch-s3c2410/h1940-latch.h +++ /dev/null @@ -1,64 +0,0 @@ -/* linux/include/asm-arm/arch-s3c2410/h1940-latch.h - * - * (c) 2005 Simtec Electronics - * http://armlinux.simtec.co.uk/ - * Ben Dooks - * - * iPAQ H1940 series - latch definitions - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. -*/ - -#ifndef __ASM_ARCH_H1940_LATCH_H -#define __ASM_ARCH_H1940_LATCH_H - - -#ifndef __ASSEMBLY__ -#define H1940_LATCH ((void __iomem *)0xF8000000) -#else -#define H1940_LATCH 0xF8000000 -#endif - -#define H1940_PA_LATCH (S3C2410_CS2) - -/* SD layer latch */ - -#define H1940_LATCH_SDQ1 (1<<16) -#define H1940_LATCH_LCD_P1 (1<<17) -#define H1940_LATCH_LCD_P2 (1<<18) -#define H1940_LATCH_LCD_P3 (1<<19) -#define H1940_LATCH_MAX1698_nSHUTDOWN (1<<20) /* LCD backlight */ -#define H1940_LATCH_LED_RED (1<<21) -#define H1940_LATCH_SDQ7 (1<<22) -#define H1940_LATCH_USB_DP (1<<23) - -/* CPU layer latch */ - -#define H1940_LATCH_UDA_POWER (1<<24) -#define H1940_LATCH_AUDIO_POWER (1<<25) -#define H1940_LATCH_SM803_ENABLE (1<<26) -#define H1940_LATCH_LCD_P4 (1<<27) -#define H1940_LATCH_CPUQ5 (1<<28) /* untraced */ -#define H1940_LATCH_BLUETOOTH_POWER (1<<29) /* active high */ -#define H1940_LATCH_LED_GREEN (1<<30) -#define H1940_LATCH_LED_FLASH (1<<31) - -/* default settings */ - -#define H1940_LATCH_DEFAULT \ - H1940_LATCH_LCD_P4 | \ - H1940_LATCH_SM803_ENABLE | \ - H1940_LATCH_SDQ1 | \ - H1940_LATCH_LCD_P1 | \ - H1940_LATCH_LCD_P2 | \ - H1940_LATCH_LCD_P3 | \ - H1940_LATCH_MAX1698_nSHUTDOWN | \ - H1940_LATCH_CPUQ5 - -/* control functions */ - -extern void h1940_latch_control(unsigned int clear, unsigned int set); - -#endif /* __ASM_ARCH_H1940_LATCH_H */ diff --git a/trunk/include/asm-i386/unistd.h b/trunk/include/asm-i386/unistd.h index dc81a55dd94d..cf6f2cd9c514 100644 --- a/trunk/include/asm-i386/unistd.h +++ b/trunk/include/asm-i386/unistd.h @@ -305,7 +305,7 @@ #define __NR_mknodat 297 #define __NR_fchownat 298 #define __NR_futimesat 299 -#define __NR_fstatat64 300 +#define __NR_newfstatat 300 #define __NR_unlinkat 301 #define __NR_renameat 302 #define __NR_linkat 303 diff --git a/trunk/include/asm-ia64/unistd.h b/trunk/include/asm-ia64/unistd.h index 019956c613e4..962f9bd1bdff 100644 --- a/trunk/include/asm-ia64/unistd.h +++ b/trunk/include/asm-ia64/unistd.h @@ -270,27 +270,12 @@ #define __NR_inotify_add_watch 1278 #define __NR_inotify_rm_watch 1279 #define __NR_migrate_pages 1280 -#define __NR_openat 1281 -#define __NR_mkdirat 1282 -#define __NR_mknodat 1283 -#define __NR_fchownat 1284 -#define __NR_futimesat 1285 -#define __NR_newfstatat 1286 -#define __NR_unlinkat 1287 -#define __NR_renameat 1288 -#define __NR_linkat 1289 -#define __NR_symlinkat 1290 -#define __NR_readlinkat 1291 -#define __NR_fchmodat 1292 -#define __NR_faccessat 1293 -/* 1294, 1295 reserved for pselect/ppoll */ -#define __NR_unshare 1296 #ifdef __KERNEL__ #include -#define NR_syscalls 273 /* length of syscall table */ +#define NR_syscalls 270 /* length of syscall table */ #define __ARCH_WANT_SYS_RT_SIGACTION diff --git a/trunk/include/asm-powerpc/unistd.h b/trunk/include/asm-powerpc/unistd.h index 35556993f066..a40cdff21a88 100644 --- a/trunk/include/asm-powerpc/unistd.h +++ b/trunk/include/asm-powerpc/unistd.h @@ -300,9 +300,8 @@ #define __NR_spu_create 279 #define __NR_pselect6 280 #define __NR_ppoll 281 -#define __NR_unshare 282 -#define __NR_syscalls 283 +#define __NR_syscalls 282 #ifdef __KERNEL__ #define __NR__exit __NR_exit diff --git a/trunk/include/asm-s390/bitops.h b/trunk/include/asm-s390/bitops.h index 3628899f48bb..61232760cc3b 100644 --- a/trunk/include/asm-s390/bitops.h +++ b/trunk/include/asm-s390/bitops.h @@ -518,8 +518,8 @@ static inline int __test_bit(unsigned long nr, const volatile unsigned long *ptr static inline int __constant_test_bit(unsigned long nr, const volatile unsigned long *addr) { - return (((volatile char *) addr) - [(nr^(__BITOPS_WORDSIZE-8))>>3] & (1<<(nr&7))) != 0; + return ((((volatile char *) addr) + [(nr^(__BITOPS_WORDSIZE-8))>>3] & (1<<(nr&7)))) != 0; } #define test_bit(nr,addr) \ diff --git a/trunk/include/asm-s390/setup.h b/trunk/include/asm-s390/setup.h index da3fd4a7bb32..348a88137445 100644 --- a/trunk/include/asm-s390/setup.h +++ b/trunk/include/asm-s390/setup.h @@ -8,8 +8,6 @@ #ifndef _ASM_S390_SETUP_H #define _ASM_S390_SETUP_H -#ifdef __KERNEL__ - #include #define PARMAREA 0x10400 @@ -116,7 +114,7 @@ extern u16 ipl_devno; IPL_PARMBLOCK_ORIGIN) #define IPL_PARMBLOCK_SIZE (IPL_PARMBLOCK_START->hdr.length) -#else /* __ASSEMBLY__ */ +#else #ifndef __s390x__ #define IPL_DEVICE 0x10404 @@ -129,6 +127,6 @@ extern u16 ipl_devno; #endif /* __s390x__ */ #define COMMAND_LINE 0x10480 -#endif /* __ASSEMBLY__ */ -#endif /* __KERNEL__ */ -#endif /* _ASM_S390_SETUP_H */ +#endif + +#endif diff --git a/trunk/include/asm-s390/smp.h b/trunk/include/asm-s390/smp.h index 9c6e9c300eb9..a2ae7628bbaa 100644 --- a/trunk/include/asm-s390/smp.h +++ b/trunk/include/asm-s390/smp.h @@ -101,7 +101,6 @@ smp_call_function_on(void (*func) (void *info), void *info, func(info); return 0; } -#define smp_cpu_not_running(cpu) 1 #define smp_get_cpu(cpu) ({ 0; }) #define smp_put_cpu(cpu) ({ 0; }) #endif diff --git a/trunk/include/asm-s390/unistd.h b/trunk/include/asm-s390/unistd.h index 657d582e8149..29a9f357eb9e 100644 --- a/trunk/include/asm-s390/unistd.h +++ b/trunk/include/asm-s390/unistd.h @@ -285,7 +285,7 @@ #define __NR_mknodat 290 #define __NR_fchownat 291 #define __NR_futimesat 292 -#define __NR_fstatat64 293 +#define __NR_newfstatat 293 #define __NR_unlinkat 294 #define __NR_renameat 295 #define __NR_linkat 296 @@ -295,9 +295,8 @@ #define __NR_faccessat 300 #define __NR_pselect6 301 #define __NR_ppoll 302 -#define __NR_unshare 303 -#define NR_syscalls 304 +#define NR_syscalls 303 /* * There are some system calls that are not present on 64 bit, some @@ -359,7 +358,6 @@ #undef __NR_fcntl64 #undef __NR_sendfile64 #undef __NR_fadvise64_64 -#undef __NR_fstatat64 #define __NR_select 142 #define __NR_getrlimit 191 /* SuS compliant getrlimit */ @@ -382,7 +380,6 @@ #define __NR_setgid 214 #define __NR_setfsuid 215 #define __NR_setfsgid 216 -#define __NR_newfstatat 293 #endif diff --git a/trunk/include/asm-sparc/unistd.h b/trunk/include/asm-sparc/unistd.h index 64ec640a40ee..0615d601a7c6 100644 --- a/trunk/include/asm-sparc/unistd.h +++ b/trunk/include/asm-sparc/unistd.h @@ -305,7 +305,7 @@ #define __NR_mknodat 286 #define __NR_fchownat 287 #define __NR_futimesat 288 -#define __NR_fstatat64 289 +#define __NR_newfstatat 289 #define __NR_unlinkat 290 #define __NR_renameat 291 #define __NR_linkat 292 diff --git a/trunk/include/asm-sparc64/unistd.h b/trunk/include/asm-sparc64/unistd.h index a284986b1541..c58ba8a096cf 100644 --- a/trunk/include/asm-sparc64/unistd.h +++ b/trunk/include/asm-sparc64/unistd.h @@ -307,7 +307,7 @@ #define __NR_mknodat 286 #define __NR_fchownat 287 #define __NR_futimesat 288 -#define __NR_fstatat64 289 +#define __NR_newfstatat 289 #define __NR_unlinkat 290 #define __NR_renameat 291 #define __NR_linkat 292 diff --git a/trunk/include/asm-x86_64/hpet.h b/trunk/include/asm-x86_64/hpet.h index 08b75c15269a..c20c28f5c7a0 100644 --- a/trunk/include/asm-x86_64/hpet.h +++ b/trunk/include/asm-x86_64/hpet.h @@ -55,8 +55,6 @@ extern int is_hpet_enabled(void); extern int hpet_rtc_timer_init(void); extern int oem_force_hpet_timer(void); -extern int hpet_use_timer; - #ifdef CONFIG_HPET_EMULATE_RTC extern int hpet_mask_rtc_irq_bit(unsigned long bit_mask); extern int hpet_set_rtc_irq_bit(unsigned long bit_mask); diff --git a/trunk/include/asm-x86_64/ia32_unistd.h b/trunk/include/asm-x86_64/ia32_unistd.h index eeb2bcd635de..20468983d453 100644 --- a/trunk/include/asm-x86_64/ia32_unistd.h +++ b/trunk/include/asm-x86_64/ia32_unistd.h @@ -305,7 +305,7 @@ #define __NR_ia32_mknodat 297 #define __NR_ia32_fchownat 298 #define __NR_ia32_futimesat 299 -#define __NR_ia32_fstatat64 300 +#define __NR_ia32_newfstatat 300 #define __NR_ia32_unlinkat 301 #define __NR_ia32_renameat 302 #define __NR_ia32_linkat 303 diff --git a/trunk/include/linux/compat.h b/trunk/include/linux/compat.h index c9ab2a26348c..f9ca534787e2 100644 --- a/trunk/include/linux/compat.h +++ b/trunk/include/linux/compat.h @@ -161,25 +161,5 @@ int copy_siginfo_to_user32(struct compat_siginfo __user *to, siginfo_t *from); int get_compat_sigevent(struct sigevent *event, const struct compat_sigevent __user *u_event); -static inline int compat_timeval_compare(struct compat_timeval *lhs, - struct compat_timeval *rhs) -{ - if (lhs->tv_sec < rhs->tv_sec) - return -1; - if (lhs->tv_sec > rhs->tv_sec) - return 1; - return lhs->tv_usec - rhs->tv_usec; -} - -static inline int compat_timespec_compare(struct compat_timespec *lhs, - struct compat_timespec *rhs) -{ - if (lhs->tv_sec < rhs->tv_sec) - return -1; - if (lhs->tv_sec > rhs->tv_sec) - return 1; - return lhs->tv_nsec - rhs->tv_nsec; -} - #endif /* CONFIG_COMPAT */ #endif /* _LINUX_COMPAT_H */ diff --git a/trunk/include/linux/cpumask.h b/trunk/include/linux/cpumask.h index 60e56c6e03dd..20b446f26ecd 100644 --- a/trunk/include/linux/cpumask.h +++ b/trunk/include/linux/cpumask.h @@ -328,7 +328,7 @@ static inline void __cpus_remap(cpumask_t *dstp, const cpumask_t *srcp, * bitmap of size NR_CPUS. * * #ifdef CONFIG_HOTPLUG_CPU - * cpu_possible_map - has bit 'cpu' set iff cpu is populatable + * cpu_possible_map - all NR_CPUS bits set * cpu_present_map - has bit 'cpu' set iff cpu is populated * cpu_online_map - has bit 'cpu' set iff cpu available to scheduler * #else diff --git a/trunk/include/linux/kbd_kern.h b/trunk/include/linux/kbd_kern.h index e87c32a5c86a..3aed37314ab8 100644 --- a/trunk/include/linux/kbd_kern.h +++ b/trunk/include/linux/kbd_kern.h @@ -153,10 +153,8 @@ static inline void con_schedule_flip(struct tty_struct *t) { unsigned long flags; spin_lock_irqsave(&t->buf.lock, flags); - if (t->buf.tail != NULL) { + if (t->buf.tail != NULL) t->buf.tail->active = 0; - t->buf.tail->commit = t->buf.tail->used; - } spin_unlock_irqrestore(&t->buf.lock, flags); schedule_work(&t->buf.work); } diff --git a/trunk/include/linux/kexec.h b/trunk/include/linux/kexec.h index cfb3410e32b1..a311f58c8a7c 100644 --- a/trunk/include/linux/kexec.h +++ b/trunk/include/linux/kexec.h @@ -6,7 +6,6 @@ #include #include #include -#include #include /* Verify architecture specific macros are defined */ diff --git a/trunk/include/linux/netlink.h b/trunk/include/linux/netlink.h index c256ebe2a7b4..6a2ccf78a356 100644 --- a/trunk/include/linux/netlink.h +++ b/trunk/include/linux/netlink.h @@ -160,8 +160,7 @@ extern int netlink_unregister_notifier(struct notifier_block *nb); /* finegrained unicast helpers: */ struct sock *netlink_getsockbyfilp(struct file *filp); -int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock, - long timeo, struct sock *ssk); +int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock, long timeo); void netlink_detachskb(struct sock *sk, struct sk_buff *skb); int netlink_sendskb(struct sock *sk, struct sk_buff *skb, int protocol); diff --git a/trunk/include/linux/pci_ids.h b/trunk/include/linux/pci_ids.h index 82b83da25d77..7a61ccdcbc4b 100644 --- a/trunk/include/linux/pci_ids.h +++ b/trunk/include/linux/pci_ids.h @@ -1087,7 +1087,6 @@ #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440_8X 0x0181 #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440SE_8X 0x0182 #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_420_8X 0x0183 -#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_4000 0x0185 #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_448_GO 0x0186 #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_488_GO 0x0187 #define PCI_DEVICE_ID_NVIDIA_QUADRO4_580_XGL 0x0188 diff --git a/trunk/include/linux/sched.h b/trunk/include/linux/sched.h index 9c1da0269a18..0cfcd1c7865e 100644 --- a/trunk/include/linux/sched.h +++ b/trunk/include/linux/sched.h @@ -1098,7 +1098,7 @@ extern struct sigqueue *sigqueue_alloc(void); extern void sigqueue_free(struct sigqueue *); extern int send_sigqueue(int, struct sigqueue *, struct task_struct *); extern int send_group_sigqueue(int, struct sigqueue *, struct task_struct *); -extern int do_sigaction(int, struct k_sigaction *, struct k_sigaction *); +extern int do_sigaction(int, const struct k_sigaction *, struct k_sigaction *); extern int do_sigaltstack(const stack_t __user *, stack_t __user *, unsigned long); /* These can be the second arg to send_sig_info/send_group_sig_info. */ diff --git a/trunk/include/linux/syscalls.h b/trunk/include/linux/syscalls.h index d73501ba7e44..3877209d23c3 100644 --- a/trunk/include/linux/syscalls.h +++ b/trunk/include/linux/syscalls.h @@ -557,8 +557,6 @@ asmlinkage long sys_openat(int dfd, const char __user *filename, int flags, int mode); asmlinkage long sys_newfstatat(int dfd, char __user *filename, struct stat __user *statbuf, int flag); -asmlinkage long sys_fstatat64(int dfd, char __user *filename, - struct stat64 __user *statbuf, int flag); asmlinkage long sys_readlinkat(int dfd, const char __user *path, char __user *buf, int bufsiz); asmlinkage long compat_sys_futimesat(unsigned int dfd, char __user *filename, diff --git a/trunk/include/linux/time.h b/trunk/include/linux/time.h index d9cdba54b789..7b4dc36532bb 100644 --- a/trunk/include/linux/time.h +++ b/trunk/include/linux/time.h @@ -33,34 +33,11 @@ struct timezone { #define NSEC_PER_SEC 1000000000L #define NSEC_PER_USEC 1000L -static inline int timespec_equal(struct timespec *a, struct timespec *b) +static __inline__ int timespec_equal(struct timespec *a, struct timespec *b) { return (a->tv_sec == b->tv_sec) && (a->tv_nsec == b->tv_nsec); } -/* - * lhs < rhs: return <0 - * lhs == rhs: return 0 - * lhs > rhs: return >0 - */ -static inline int timespec_compare(struct timespec *lhs, struct timespec *rhs) -{ - if (lhs->tv_sec < rhs->tv_sec) - return -1; - if (lhs->tv_sec > rhs->tv_sec) - return 1; - return lhs->tv_nsec - rhs->tv_nsec; -} - -static inline int timeval_compare(struct timeval *lhs, struct timeval *rhs) -{ - if (lhs->tv_sec < rhs->tv_sec) - return -1; - if (lhs->tv_sec > rhs->tv_sec) - return 1; - return lhs->tv_usec - rhs->tv_usec; -} - extern unsigned long mktime(const unsigned int year, const unsigned int mon, const unsigned int day, const unsigned int hour, const unsigned int min, const unsigned int sec); diff --git a/trunk/include/linux/tty.h b/trunk/include/linux/tty.h index f45cd74e6f24..a7bd3b4558d2 100644 --- a/trunk/include/linux/tty.h +++ b/trunk/include/linux/tty.h @@ -58,8 +58,6 @@ struct tty_buffer { int used; int size; int active; - int commit; - int read; /* Data points here */ unsigned long data[0]; }; diff --git a/trunk/include/linux/tty_flip.h b/trunk/include/linux/tty_flip.h index 222faf97d5f9..82961eb19888 100644 --- a/trunk/include/linux/tty_flip.h +++ b/trunk/include/linux/tty_flip.h @@ -29,10 +29,8 @@ _INLINE_ void tty_schedule_flip(struct tty_struct *tty) { unsigned long flags; spin_lock_irqsave(&tty->buf.lock, flags); - if (tty->buf.tail != NULL) { + if (tty->buf.tail != NULL) tty->buf.tail->active = 0; - tty->buf.tail->commit = tty->buf.tail->used; - } spin_unlock_irqrestore(&tty->buf.lock, flags); schedule_delayed_work(&tty->buf.work, 1); } diff --git a/trunk/include/net/bluetooth/rfcomm.h b/trunk/include/net/bluetooth/rfcomm.h index 89d743cfdfdf..bbfac86734ec 100644 --- a/trunk/include/net/bluetooth/rfcomm.h +++ b/trunk/include/net/bluetooth/rfcomm.h @@ -33,7 +33,7 @@ #define RFCOMM_DEFAULT_MTU 127 #define RFCOMM_DEFAULT_CREDITS 7 -#define RFCOMM_MAX_L2CAP_MTU 1013 +#define RFCOMM_MAX_L2CAP_MTU 1024 #define RFCOMM_MAX_CREDITS 40 #define RFCOMM_SKB_HEAD_RESERVE 8 diff --git a/trunk/include/net/irda/irda.h b/trunk/include/net/irda/irda.h index 1880e46ecc9b..05a840837fe7 100644 --- a/trunk/include/net/irda/irda.h +++ b/trunk/include/net/irda/irda.h @@ -82,9 +82,9 @@ do { if(!(expr)) { \ #define IRDA_ASSERT_LABEL(label) #endif /* CONFIG_IRDA_DEBUG */ -#define IRDA_WARNING(args...) do { if (net_ratelimit()) printk(KERN_WARNING args); } while (0) -#define IRDA_MESSAGE(args...) do { if (net_ratelimit()) printk(KERN_INFO args); } while (0) -#define IRDA_ERROR(args...) do { if (net_ratelimit()) printk(KERN_ERR args); } while (0) +#define IRDA_WARNING(args...) printk(KERN_WARNING args) +#define IRDA_MESSAGE(args...) printk(KERN_INFO args) +#define IRDA_ERROR(args...) printk(KERN_ERR args) /* * Magic numbers used by Linux-IrDA. Random numbers which must be unique to diff --git a/trunk/include/net/irda/irlap.h b/trunk/include/net/irda/irlap.h index 2127cae1e0a6..f55e86e75030 100644 --- a/trunk/include/net/irda/irlap.h +++ b/trunk/include/net/irda/irlap.h @@ -50,9 +50,6 @@ /* May be different when we get VFIR */ #define LAP_MAX_HEADER (LAP_ADDR_HEADER + LAP_CTRL_HEADER) -/* Each IrDA device gets a random 32 bits IRLAP device address */ -#define LAP_ALEN 4 - #define BROADCAST 0xffffffff /* Broadcast device address */ #define CBROADCAST 0xfe /* Connection broadcast address */ #define XID_FORMAT 0x01 /* Discovery XID format */ diff --git a/trunk/init/initramfs.c b/trunk/init/initramfs.c index 637344b05981..0c5d9a3f951b 100644 --- a/trunk/init/initramfs.c +++ b/trunk/init/initramfs.c @@ -466,32 +466,10 @@ static char * __init unpack_to_rootfs(char *buf, unsigned len, int check_only) extern char __initramfs_start[], __initramfs_end[]; #ifdef CONFIG_BLK_DEV_INITRD #include -#include static void __init free_initrd(void) { -#ifdef CONFIG_KEXEC - unsigned long crashk_start = (unsigned long)__va(crashk_res.start); - unsigned long crashk_end = (unsigned long)__va(crashk_res.end); - - /* - * If the initrd region is overlapped with crashkernel reserved region, - * free only memory that is not part of crashkernel region. - */ - if (initrd_start < crashk_end && initrd_end > crashk_start) { - /* - * Initialize initrd memory region since the kexec boot does - * not do. - */ - memset((void *)initrd_start, 0, initrd_end - initrd_start); - if (initrd_start < crashk_start) - free_initrd_mem(initrd_start, crashk_start); - if (initrd_end > crashk_end) - free_initrd_mem(crashk_end, initrd_end); - } else -#endif - free_initrd_mem(initrd_start, initrd_end); - + free_initrd_mem(initrd_start, initrd_end); initrd_start = 0; initrd_end = 0; } diff --git a/trunk/init/main.c b/trunk/init/main.c index 4c194c47395f..7c79da57d3a2 100644 --- a/trunk/init/main.c +++ b/trunk/init/main.c @@ -668,6 +668,7 @@ static int init(void * unused) */ child_reaper = current; + /* Sets up cpus_possible() */ smp_prepare_cpus(max_cpus); do_pre_smp_initcalls(); diff --git a/trunk/ipc/mqueue.c b/trunk/ipc/mqueue.c index fd2e26b6f966..59302fc3643b 100644 --- a/trunk/ipc/mqueue.c +++ b/trunk/ipc/mqueue.c @@ -1018,8 +1018,7 @@ asmlinkage long sys_mq_notify(mqd_t mqdes, goto out; } - ret = netlink_attachskb(sock, nc, 0, - MAX_SCHEDULE_TIMEOUT, NULL); + ret = netlink_attachskb(sock, nc, 0, MAX_SCHEDULE_TIMEOUT); if (ret == 1) goto retry; if (ret) { diff --git a/trunk/ipc/shm.c b/trunk/ipc/shm.c index 9162123a7b23..4c28d2d8e305 100644 --- a/trunk/ipc/shm.c +++ b/trunk/ipc/shm.c @@ -870,7 +870,6 @@ asmlinkage long sys_shmdt(char __user *shmaddr) * could possibly have landed at. Also cast things to loff_t to * prevent overflows and make comparisions vs. equal-width types. */ - size = PAGE_ALIGN(size); while (vma && (loff_t)(vma->vm_end - addr) <= size) { next = vma->vm_next; diff --git a/trunk/kernel/panic.c b/trunk/kernel/panic.c index 126dc43f1c74..c5c4ab255834 100644 --- a/trunk/kernel/panic.c +++ b/trunk/kernel/panic.c @@ -130,7 +130,6 @@ NORET_TYPE void panic(const char * fmt, ...) #endif local_irq_enable(); for (i = 0;;) { - touch_softlockup_watchdog(); i += panic_blink(i); mdelay(1); i++; diff --git a/trunk/kernel/sched.c b/trunk/kernel/sched.c index 87d93be336a1..bc38804e40dd 100644 --- a/trunk/kernel/sched.c +++ b/trunk/kernel/sched.c @@ -215,6 +215,7 @@ struct runqueue { */ unsigned long nr_running; #ifdef CONFIG_SMP + unsigned long prio_bias; unsigned long cpu_load[3]; #endif unsigned long long nr_switches; @@ -668,13 +669,68 @@ static int effective_prio(task_t *p) return prio; } +#ifdef CONFIG_SMP +static inline void inc_prio_bias(runqueue_t *rq, int prio) +{ + rq->prio_bias += MAX_PRIO - prio; +} + +static inline void dec_prio_bias(runqueue_t *rq, int prio) +{ + rq->prio_bias -= MAX_PRIO - prio; +} + +static inline void inc_nr_running(task_t *p, runqueue_t *rq) +{ + rq->nr_running++; + if (rt_task(p)) { + if (p != rq->migration_thread) + /* + * The migration thread does the actual balancing. Do + * not bias by its priority as the ultra high priority + * will skew balancing adversely. + */ + inc_prio_bias(rq, p->prio); + } else + inc_prio_bias(rq, p->static_prio); +} + +static inline void dec_nr_running(task_t *p, runqueue_t *rq) +{ + rq->nr_running--; + if (rt_task(p)) { + if (p != rq->migration_thread) + dec_prio_bias(rq, p->prio); + } else + dec_prio_bias(rq, p->static_prio); +} +#else +static inline void inc_prio_bias(runqueue_t *rq, int prio) +{ +} + +static inline void dec_prio_bias(runqueue_t *rq, int prio) +{ +} + +static inline void inc_nr_running(task_t *p, runqueue_t *rq) +{ + rq->nr_running++; +} + +static inline void dec_nr_running(task_t *p, runqueue_t *rq) +{ + rq->nr_running--; +} +#endif + /* * __activate_task - move a task to the runqueue. */ static inline void __activate_task(task_t *p, runqueue_t *rq) { enqueue_task(p, rq->active); - rq->nr_running++; + inc_nr_running(p, rq); } /* @@ -683,7 +739,7 @@ static inline void __activate_task(task_t *p, runqueue_t *rq) static inline void __activate_idle_task(task_t *p, runqueue_t *rq) { enqueue_task_head(p, rq->active); - rq->nr_running++; + inc_nr_running(p, rq); } static int recalc_task_prio(task_t *p, unsigned long long now) @@ -807,7 +863,7 @@ static void activate_task(task_t *p, runqueue_t *rq, int local) */ static void deactivate_task(struct task_struct *p, runqueue_t *rq) { - rq->nr_running--; + dec_nr_running(p, rq); dequeue_task(p, p->array); p->array = NULL; } @@ -951,27 +1007,61 @@ void kick_process(task_t *p) * We want to under-estimate the load of migration sources, to * balance conservatively. */ -static inline unsigned long source_load(int cpu, int type) +static unsigned long __source_load(int cpu, int type, enum idle_type idle) { runqueue_t *rq = cpu_rq(cpu); - unsigned long load_now = rq->nr_running * SCHED_LOAD_SCALE; + unsigned long running = rq->nr_running; + unsigned long source_load, cpu_load = rq->cpu_load[type-1], + load_now = running * SCHED_LOAD_SCALE; + if (type == 0) - return load_now; + source_load = load_now; + else + source_load = min(cpu_load, load_now); + + if (running > 1 || (idle == NOT_IDLE && running)) + /* + * If we are busy rebalancing the load is biased by + * priority to create 'nice' support across cpus. When + * idle rebalancing we should only bias the source_load if + * there is more than one task running on that queue to + * prevent idle rebalance from trying to pull tasks from a + * queue with only one running task. + */ + source_load = source_load * rq->prio_bias / running; - return min(rq->cpu_load[type-1], load_now); + return source_load; +} + +static inline unsigned long source_load(int cpu, int type) +{ + return __source_load(cpu, type, NOT_IDLE); } /* * Return a high guess at the load of a migration-target cpu */ -static inline unsigned long target_load(int cpu, int type) +static inline unsigned long __target_load(int cpu, int type, enum idle_type idle) { runqueue_t *rq = cpu_rq(cpu); - unsigned long load_now = rq->nr_running * SCHED_LOAD_SCALE; + unsigned long running = rq->nr_running; + unsigned long target_load, cpu_load = rq->cpu_load[type-1], + load_now = running * SCHED_LOAD_SCALE; + if (type == 0) - return load_now; + target_load = load_now; + else + target_load = max(cpu_load, load_now); - return max(rq->cpu_load[type-1], load_now); + if (running > 1 || (idle == NOT_IDLE && running)) + target_load = target_load * rq->prio_bias / running; + + return target_load; +} + +static inline unsigned long target_load(int cpu, int type) +{ + return __target_load(cpu, type, NOT_IDLE); } /* @@ -1440,7 +1530,7 @@ void fastcall wake_up_new_task(task_t *p, unsigned long clone_flags) list_add_tail(&p->run_list, ¤t->run_list); p->array = current->array; p->array->nr_active++; - rq->nr_running++; + inc_nr_running(p, rq); } set_need_resched(); } else @@ -1785,9 +1875,9 @@ void pull_task(runqueue_t *src_rq, prio_array_t *src_array, task_t *p, runqueue_t *this_rq, prio_array_t *this_array, int this_cpu) { dequeue_task(p, src_array); - src_rq->nr_running--; + dec_nr_running(p, src_rq); set_task_cpu(p, this_cpu); - this_rq->nr_running++; + inc_nr_running(p, this_rq); enqueue_task(p, this_array); p->timestamp = (p->timestamp - src_rq->timestamp_last_tick) + this_rq->timestamp_last_tick; @@ -1966,9 +2056,9 @@ find_busiest_group(struct sched_domain *sd, int this_cpu, /* Bias balancing toward cpus of our domain */ if (local_group) - load = target_load(i, load_idx); + load = __target_load(i, load_idx, idle); else - load = source_load(i, load_idx); + load = __source_load(i, load_idx, idle); avg_load += load; } @@ -2081,7 +2171,7 @@ static runqueue_t *find_busiest_queue(struct sched_group *group, int i; for_each_cpu_mask(i, group->cpumask) { - load = source_load(i, 0); + load = __source_load(i, 0, idle); if (load > max_load) { max_load = load; @@ -3481,8 +3571,10 @@ void set_user_nice(task_t *p, long nice) goto out_unlock; } array = p->array; - if (array) + if (array) { dequeue_task(p, array); + dec_prio_bias(rq, p->static_prio); + } old_prio = p->prio; new_prio = NICE_TO_PRIO(nice); @@ -3492,6 +3584,7 @@ void set_user_nice(task_t *p, long nice) if (array) { enqueue_task(p, array); + inc_prio_bias(rq, p->static_prio); /* * If the task increased its priority or is running and * lowered its priority, then reschedule its CPU: diff --git a/trunk/kernel/signal.c b/trunk/kernel/signal.c index ea154104a00b..b373fc2420da 100644 --- a/trunk/kernel/signal.c +++ b/trunk/kernel/signal.c @@ -2430,7 +2430,7 @@ sys_rt_sigqueueinfo(int pid, int sig, siginfo_t __user *uinfo) } int -do_sigaction(int sig, struct k_sigaction *act, struct k_sigaction *oact) +do_sigaction(int sig, const struct k_sigaction *act, struct k_sigaction *oact) { struct k_sigaction *k; sigset_t mask; @@ -2454,8 +2454,6 @@ do_sigaction(int sig, struct k_sigaction *act, struct k_sigaction *oact) *oact = *k; if (act) { - sigdelsetmask(&act->sa.sa_mask, - sigmask(SIGKILL) | sigmask(SIGSTOP)); /* * POSIX 3.3.1.3: * "Setting a signal action to SIG_IGN for a signal that is @@ -2481,6 +2479,8 @@ do_sigaction(int sig, struct k_sigaction *act, struct k_sigaction *oact) read_lock(&tasklist_lock); spin_lock_irq(&t->sighand->siglock); *k = *act; + sigdelsetmask(&k->sa.sa_mask, + sigmask(SIGKILL) | sigmask(SIGSTOP)); sigemptyset(&mask); sigaddset(&mask, sig); rm_from_queue_full(&mask, &t->signal->shared_pending); @@ -2495,6 +2495,8 @@ do_sigaction(int sig, struct k_sigaction *act, struct k_sigaction *oact) } *k = *act; + sigdelsetmask(&k->sa.sa_mask, + sigmask(SIGKILL) | sigmask(SIGSTOP)); } spin_unlock_irq(¤t->sighand->siglock); @@ -2700,7 +2702,6 @@ sys_signal(int sig, __sighandler_t handler) new_sa.sa.sa_handler = handler; new_sa.sa.sa_flags = SA_ONESHOT | SA_NOMASK; - sigemptyset(&new_sa.sa.sa_mask); ret = do_sigaction(sig, &new_sa, &old_sa); diff --git a/trunk/mm/slab.c b/trunk/mm/slab.c index add05d808a4a..d66c2b0d9715 100644 --- a/trunk/mm/slab.c +++ b/trunk/mm/slab.c @@ -1717,12 +1717,6 @@ kmem_cache_create (const char *name, size_t size, size_t align, BUG(); } - /* - * Prevent CPUs from coming and going. - * lock_cpu_hotplug() nests outside cache_chain_mutex - */ - lock_cpu_hotplug(); - mutex_lock(&cache_chain_mutex); list_for_each(p, &cache_chain) { @@ -1924,6 +1918,8 @@ kmem_cache_create (const char *name, size_t size, size_t align, cachep->dtor = dtor; cachep->name = name; + /* Don't let CPUs to come and go */ + lock_cpu_hotplug(); if (g_cpucache_up == FULL) { enable_cpucache(cachep); @@ -1982,12 +1978,12 @@ kmem_cache_create (const char *name, size_t size, size_t align, /* cache setup completed, link it into the list */ list_add(&cachep->next, &cache_chain); + unlock_cpu_hotplug(); oops: if (!cachep && (flags & SLAB_PANIC)) panic("kmem_cache_create(): failed to create slab `%s'\n", name); mutex_unlock(&cache_chain_mutex); - unlock_cpu_hotplug(); return cachep; } EXPORT_SYMBOL(kmem_cache_create); diff --git a/trunk/mm/vmscan.c b/trunk/mm/vmscan.c index 1838c15ca4fd..5a610804cd06 100644 --- a/trunk/mm/vmscan.c +++ b/trunk/mm/vmscan.c @@ -443,10 +443,6 @@ static int shrink_list(struct list_head *page_list, struct scan_control *sc) BUG_ON(PageActive(page)); sc->nr_scanned++; - - if (!sc->may_swap && page_mapped(page)) - goto keep_locked; - /* Double the slab pressure for mapped and swapcache pages */ if (page_mapped(page) || PageSwapCache(page)) sc->nr_scanned++; @@ -636,7 +632,7 @@ static int swap_page(struct page *page) struct address_space *mapping = page_mapping(page); if (page_mapped(page) && mapping) - if (try_to_unmap(page, 1) != SWAP_SUCCESS) + if (try_to_unmap(page, 0) != SWAP_SUCCESS) goto unlock_retry; if (PageDirty(page)) { @@ -843,7 +839,7 @@ EXPORT_SYMBOL(migrate_page); * pages are swapped out. * * The function returns after 10 attempts or if no pages - * are movable anymore because to has become empty + * are movable anymore because t has become empty * or no retryable pages exist anymore. * * Return: Number of pages not migrated when "to" ran empty. @@ -932,21 +928,12 @@ int migrate_pages(struct list_head *from, struct list_head *to, goto unlock_both; if (mapping->a_ops->migratepage) { - /* - * Most pages have a mapping and most filesystems - * should provide a migration function. Anonymous - * pages are part of swap space which also has its - * own migration function. This is the most common - * path for page migration. - */ rc = mapping->a_ops->migratepage(newpage, page); goto unlock_both; } /* - * Default handling if a filesystem does not provide - * a migration function. We can only migrate clean - * pages so try to write out any dirty pages first. + * Trigger writeout if page is dirty */ if (PageDirty(page)) { switch (pageout(page, mapping)) { @@ -962,10 +949,9 @@ int migrate_pages(struct list_head *from, struct list_head *to, ; /* try to migrate the page below */ } } - /* - * Buffers are managed in a filesystem specific way. - * We must have no buffers or drop them. + * If we have no buffer or can release the buffer + * then do a simple migration. */ if (!page_has_buffers(page) || try_to_release_page(page, GFP_KERNEL)) { @@ -980,11 +966,6 @@ int migrate_pages(struct list_head *from, struct list_head *to, * swap them out. */ if (pass > 4) { - /* - * Persistently unable to drop buffers..... As a - * measure of last resort we fall back to - * swap_page(). - */ unlock_page(newpage); newpage = NULL; rc = swap_page(page); @@ -1195,47 +1176,9 @@ refill_inactive_zone(struct zone *zone, struct scan_control *sc) struct page *page; struct pagevec pvec; int reclaim_mapped = 0; - - if (unlikely(sc->may_swap)) { - long mapped_ratio; - long distress; - long swap_tendency; - - /* - * `distress' is a measure of how much trouble we're having - * reclaiming pages. 0 -> no problems. 100 -> great trouble. - */ - distress = 100 >> zone->prev_priority; - - /* - * The point of this algorithm is to decide when to start - * reclaiming mapped memory instead of just pagecache. Work out - * how much memory - * is mapped. - */ - mapped_ratio = (sc->nr_mapped * 100) / total_memory; - - /* - * Now decide how much we really want to unmap some pages. The - * mapped ratio is downgraded - just because there's a lot of - * mapped memory doesn't necessarily mean that page reclaim - * isn't succeeding. - * - * The distress ratio is important - we don't want to start - * going oom. - * - * A 100% value of vm_swappiness overrides this algorithm - * altogether. - */ - swap_tendency = mapped_ratio / 2 + distress + vm_swappiness; - - /* - * Now use this metric to decide whether to start moving mapped - * memory onto the inactive list. - */ - if (swap_tendency >= 100) - reclaim_mapped = 1; - } + long mapped_ratio; + long distress; + long swap_tendency; lru_add_drain(); spin_lock_irq(&zone->lru_lock); @@ -1245,6 +1188,37 @@ refill_inactive_zone(struct zone *zone, struct scan_control *sc) zone->nr_active -= pgmoved; spin_unlock_irq(&zone->lru_lock); + /* + * `distress' is a measure of how much trouble we're having reclaiming + * pages. 0 -> no problems. 100 -> great trouble. + */ + distress = 100 >> zone->prev_priority; + + /* + * The point of this algorithm is to decide when to start reclaiming + * mapped memory instead of just pagecache. Work out how much memory + * is mapped. + */ + mapped_ratio = (sc->nr_mapped * 100) / total_memory; + + /* + * Now decide how much we really want to unmap some pages. The mapped + * ratio is downgraded - just because there's a lot of mapped memory + * doesn't necessarily mean that page reclaim isn't succeeding. + * + * The distress ratio is important - we don't want to start going oom. + * + * A 100% value of vm_swappiness overrides this algorithm altogether. + */ + swap_tendency = mapped_ratio / 2 + distress + vm_swappiness; + + /* + * Now use this metric to decide whether to start moving mapped memory + * onto the inactive list. + */ + if (swap_tendency >= 100) + reclaim_mapped = 1; + while (!list_empty(&l_hold)) { cond_resched(); page = lru_to_page(&l_hold); @@ -1621,7 +1595,9 @@ static int balance_pgdat(pg_data_t *pgdat, int nr_pages, int order) sc.nr_reclaimed = 0; sc.priority = priority; sc.swap_cluster_max = nr_pages? nr_pages : SWAP_CLUSTER_MAX; + atomic_inc(&zone->reclaim_in_progress); shrink_zone(zone, &sc); + atomic_dec(&zone->reclaim_in_progress); reclaim_state->reclaimed_slab = 0; nr_slab = shrink_slab(sc.nr_scanned, GFP_KERNEL, lru_pages); diff --git a/trunk/net/802/p8023.c b/trunk/net/802/p8023.c index 53cf05709283..d23e906456eb 100644 --- a/trunk/net/802/p8023.c +++ b/trunk/net/802/p8023.c @@ -59,5 +59,3 @@ void destroy_8023_client(struct datalink_proto *dl) EXPORT_SYMBOL(destroy_8023_client); EXPORT_SYMBOL(make_8023_client); - -MODULE_LICENSE("GPL"); diff --git a/trunk/net/atm/signaling.c b/trunk/net/atm/signaling.c index 93ad59a28ef5..e7211a7f382c 100644 --- a/trunk/net/atm/signaling.c +++ b/trunk/net/atm/signaling.c @@ -56,8 +56,7 @@ static void sigd_put_skb(struct sk_buff *skb) remove_wait_queue(&sigd_sleep,&wait); #else if (!sigd) { - if (net_ratelimit()) - printk(KERN_WARNING "atmsvc: no signaling demon\n"); + printk(KERN_WARNING "atmsvc: no signaling demon\n"); kfree_skb(skb); return; } diff --git a/trunk/net/bluetooth/hci_sock.c b/trunk/net/bluetooth/hci_sock.c index 97bdec73d17e..bdb6458c6bd5 100644 --- a/trunk/net/bluetooth/hci_sock.c +++ b/trunk/net/bluetooth/hci_sock.c @@ -143,15 +143,13 @@ void hci_send_to_sock(struct hci_dev *hdev, struct sk_buff *skb) static int hci_sock_release(struct socket *sock) { struct sock *sk = sock->sk; - struct hci_dev *hdev; + struct hci_dev *hdev = hci_pi(sk)->hdev; BT_DBG("sock %p sk %p", sock, sk); if (!sk) return 0; - hdev = hci_pi(sk)->hdev; - bt_sock_unlink(&hci_sk_list, sk); if (hdev) { @@ -313,18 +311,14 @@ static int hci_sock_getname(struct socket *sock, struct sockaddr *addr, int *add { struct sockaddr_hci *haddr = (struct sockaddr_hci *) addr; struct sock *sk = sock->sk; - struct hci_dev *hdev = hci_pi(sk)->hdev; BT_DBG("sock %p sk %p", sock, sk); - if (!hdev) - return -EBADFD; - lock_sock(sk); *addr_len = sizeof(*haddr); haddr->hci_family = AF_BLUETOOTH; - haddr->hci_dev = hdev->id; + haddr->hci_dev = hci_pi(sk)->hdev->id; release_sock(sk); return 0; diff --git a/trunk/net/bluetooth/rfcomm/core.c b/trunk/net/bluetooth/rfcomm/core.c index 5b4253c61f62..0d89d6434136 100644 --- a/trunk/net/bluetooth/rfcomm/core.c +++ b/trunk/net/bluetooth/rfcomm/core.c @@ -46,15 +46,13 @@ #include #include +#define VERSION "1.6" + #ifndef CONFIG_BT_RFCOMM_DEBUG #undef BT_DBG #define BT_DBG(D...) #endif -#define VERSION "1.7" - -static unsigned int l2cap_mtu = RFCOMM_MAX_L2CAP_MTU; - static struct task_struct *rfcomm_thread; static DECLARE_MUTEX(rfcomm_sem); @@ -625,7 +623,7 @@ static struct rfcomm_session *rfcomm_session_create(bdaddr_t *src, bdaddr_t *dst /* Set L2CAP options */ sk = sock->sk; lock_sock(sk); - l2cap_pi(sk)->imtu = l2cap_mtu; + l2cap_pi(sk)->imtu = RFCOMM_MAX_L2CAP_MTU; release_sock(sk); s = rfcomm_session_add(sock, BT_BOUND); @@ -1870,7 +1868,7 @@ static int rfcomm_add_listener(bdaddr_t *ba) /* Set L2CAP options */ sk = sock->sk; lock_sock(sk); - l2cap_pi(sk)->imtu = l2cap_mtu; + l2cap_pi(sk)->imtu = RFCOMM_MAX_L2CAP_MTU; release_sock(sk); /* Start listening on the socket */ @@ -2072,9 +2070,6 @@ static void __exit rfcomm_exit(void) module_init(rfcomm_init); module_exit(rfcomm_exit); -module_param(l2cap_mtu, uint, 0644); -MODULE_PARM_DESC(l2cap_mtu, "Default MTU for the L2CAP connection"); - MODULE_AUTHOR("Maxim Krasnyansky , Marcel Holtmann "); MODULE_DESCRIPTION("Bluetooth RFCOMM ver " VERSION); MODULE_VERSION(VERSION); diff --git a/trunk/net/bridge/br_if.c b/trunk/net/bridge/br_if.c index 7fa3a5a9971f..da687c8dc6ff 100644 --- a/trunk/net/bridge/br_if.c +++ b/trunk/net/bridge/br_if.c @@ -79,14 +79,9 @@ static int port_cost(struct net_device *dev) */ static void port_carrier_check(void *arg) { - struct net_device *dev = arg; - struct net_bridge_port *p; + struct net_bridge_port *p = arg; rtnl_lock(); - p = dev->br_port; - if (!p) - goto done; - if (netif_carrier_ok(p->dev)) { u32 cost = port_cost(p->dev); @@ -102,33 +97,19 @@ static void port_carrier_check(void *arg) br_stp_disable_port(p); spin_unlock_bh(&p->br->lock); } -done: rtnl_unlock(); } -static void release_nbp(struct kobject *kobj) -{ - struct net_bridge_port *p - = container_of(kobj, struct net_bridge_port, kobj); - kfree(p); -} - -static struct kobj_type brport_ktype = { -#ifdef CONFIG_SYSFS - .sysfs_ops = &brport_sysfs_ops, -#endif - .release = release_nbp, -}; - static void destroy_nbp(struct net_bridge_port *p) { struct net_device *dev = p->dev; + dev->br_port = NULL; p->br = NULL; p->dev = NULL; dev_put(dev); - kobject_put(&p->kobj); + br_sysfs_freeif(p); } static void destroy_nbp_rcu(struct rcu_head *head) @@ -152,24 +133,24 @@ static void del_nbp(struct net_bridge_port *p) struct net_bridge *br = p->br; struct net_device *dev = p->dev; - sysfs_remove_link(&br->ifobj, dev->name); + /* Race between RTNL notify and RCU callback */ + if (p->deleted) + return; dev_set_promiscuity(dev, -1); cancel_delayed_work(&p->carrier_check); + flush_scheduled_work(); spin_lock_bh(&br->lock); br_stp_disable_port(p); + p->deleted = 1; spin_unlock_bh(&br->lock); br_fdb_delete_by_port(br, p); list_del_rcu(&p->list); - rcu_assign_pointer(dev->br_port, NULL); - - kobject_del(&p->kobj); - call_rcu(&p->rcu, destroy_nbp_rcu); } @@ -179,6 +160,7 @@ static void del_br(struct net_bridge *br) struct net_bridge_port *p, *n; list_for_each_entry_safe(p, n, &br->port_list, list) { + br_sysfs_removeif(p); del_nbp(p); } @@ -272,17 +254,13 @@ static struct net_bridge_port *new_nbp(struct net_bridge *br, p->dev = dev; p->path_cost = port_cost(dev); p->priority = 0x8000 >> BR_PORT_BITS; + dev->br_port = p; p->port_no = index; br_init_port(p); p->state = BR_STATE_DISABLED; - INIT_WORK(&p->carrier_check, port_carrier_check, dev); + INIT_WORK(&p->carrier_check, port_carrier_check, p); kobject_init(&p->kobj); - kobject_set_name(&p->kobj, SYSFS_BRIDGE_PORT_ATTR); - p->kobj.ktype = &brport_ktype; - p->kobj.parent = &(dev->class_dev.kobj); - p->kobj.kset = NULL; - return p; } @@ -410,43 +388,30 @@ int br_add_if(struct net_bridge *br, struct net_device *dev) if (dev->br_port != NULL) return -EBUSY; - p = new_nbp(br, dev); - if (IS_ERR(p)) + if (IS_ERR(p = new_nbp(br, dev))) return PTR_ERR(p); - err = kobject_add(&p->kobj); - if (err) - goto err0; - - err = br_fdb_insert(br, p, dev->dev_addr); - if (err) - goto err1; - - err = br_sysfs_addif(p); - if (err) - goto err2; - - rcu_assign_pointer(dev->br_port, p); - dev_set_promiscuity(dev, 1); + if ((err = br_fdb_insert(br, p, dev->dev_addr))) + destroy_nbp(p); + + else if ((err = br_sysfs_addif(p))) + del_nbp(p); + else { + dev_set_promiscuity(dev, 1); - list_add_rcu(&p->list, &br->port_list); + list_add_rcu(&p->list, &br->port_list); - spin_lock_bh(&br->lock); - br_stp_recalculate_bridge_id(br); - br_features_recompute(br); - schedule_delayed_work(&p->carrier_check, BR_PORT_DEBOUNCE); - spin_unlock_bh(&br->lock); + spin_lock_bh(&br->lock); + br_stp_recalculate_bridge_id(br); + br_features_recompute(br); + if ((br->dev->flags & IFF_UP) + && (dev->flags & IFF_UP) && netif_carrier_ok(dev)) + br_stp_enable_port(p); + spin_unlock_bh(&br->lock); - dev_set_mtu(br->dev, br_min_mtu(br)); - kobject_uevent(&p->kobj, KOBJ_ADD); + dev_set_mtu(br->dev, br_min_mtu(br)); + } - return 0; -err2: - br_fdb_delete_by_port(br, p); -err1: - kobject_del(&p->kobj); -err0: - kobject_put(&p->kobj); return err; } @@ -458,6 +423,7 @@ int br_del_if(struct net_bridge *br, struct net_device *dev) if (!p || p->br != br) return -EINVAL; + br_sysfs_removeif(p); del_nbp(p); spin_lock_bh(&br->lock); diff --git a/trunk/net/bridge/br_input.c b/trunk/net/bridge/br_input.c index 4eef83755315..e3a73cead6b6 100644 --- a/trunk/net/bridge/br_input.c +++ b/trunk/net/bridge/br_input.c @@ -45,20 +45,18 @@ static void br_pass_frame_up(struct net_bridge *br, struct sk_buff *skb) int br_handle_frame_finish(struct sk_buff *skb) { const unsigned char *dest = eth_hdr(skb)->h_dest; - struct net_bridge_port *p = rcu_dereference(skb->dev->br_port); - struct net_bridge *br; + struct net_bridge_port *p = skb->dev->br_port; + struct net_bridge *br = p->br; struct net_bridge_fdb_entry *dst; int passedup = 0; - if (!p || p->state == BR_STATE_DISABLED) - goto drop; - /* insert into forwarding database after filtering to avoid spoofing */ - br = p->br; - br_fdb_update(br, p, eth_hdr(skb)->h_source); + br_fdb_update(p->br, p, eth_hdr(skb)->h_source); - if (p->state == BR_STATE_LEARNING) - goto drop; + if (p->state == BR_STATE_LEARNING) { + kfree_skb(skb); + goto out; + } if (br->dev->flags & IFF_PROMISC) { struct sk_buff *skb2; @@ -95,9 +93,6 @@ int br_handle_frame_finish(struct sk_buff *skb) out: return 0; -drop: - kfree_skb(skb); - goto out; } /* diff --git a/trunk/net/bridge/br_netfilter.c b/trunk/net/bridge/br_netfilter.c index 6bb0c7eb1ef0..7cac3fb9f809 100644 --- a/trunk/net/bridge/br_netfilter.c +++ b/trunk/net/bridge/br_netfilter.c @@ -51,6 +51,9 @@ #define store_orig_dstaddr(skb) (skb_origaddr(skb) = (skb)->nh.iph->daddr) #define dnat_took_place(skb) (skb_origaddr(skb) != (skb)->nh.iph->daddr) +#define has_bridge_parent(device) ((device)->br_port != NULL) +#define bridge_parent(device) ((device)->br_port->br->dev) + #ifdef CONFIG_SYSCTL static struct ctl_table_header *brnf_sysctl_header; static int brnf_call_iptables = 1; @@ -95,12 +98,6 @@ static struct rtable __fake_rtable = { .rt_flags = 0, }; -static inline struct net_device *bridge_parent(const struct net_device *dev) -{ - struct net_bridge_port *port = rcu_dereference(dev->br_port); - - return port ? port->br->dev : NULL; -} /* PF_BRIDGE/PRE_ROUTING *********************************************/ /* Undo the changes made for ip6tables PREROUTING and continue the @@ -192,15 +189,11 @@ static int br_nf_pre_routing_finish_bridge(struct sk_buff *skb) skb->nf_bridge->mask ^= BRNF_NF_BRIDGE_PREROUTING; skb->dev = bridge_parent(skb->dev); - if (!skb->dev) - kfree_skb(skb); - else { - if (skb->protocol == __constant_htons(ETH_P_8021Q)) { - skb_pull(skb, VLAN_HLEN); - skb->nh.raw += VLAN_HLEN; - } - skb->dst->output(skb); + if (skb->protocol == __constant_htons(ETH_P_8021Q)) { + skb_pull(skb, VLAN_HLEN); + skb->nh.raw += VLAN_HLEN; } + skb->dst->output(skb); return 0; } @@ -277,7 +270,7 @@ static int br_nf_pre_routing_finish(struct sk_buff *skb) } /* Some common code for IPv4/IPv6 */ -static struct net_device *setup_pre_routing(struct sk_buff *skb) +static void setup_pre_routing(struct sk_buff *skb) { struct nf_bridge_info *nf_bridge = skb->nf_bridge; @@ -289,8 +282,6 @@ static struct net_device *setup_pre_routing(struct sk_buff *skb) nf_bridge->mask |= BRNF_NF_BRIDGE_PREROUTING; nf_bridge->physindev = skb->dev; skb->dev = bridge_parent(skb->dev); - - return skb->dev; } /* We only check the length. A bridge shouldn't do any hop-by-hop stuff anyway */ @@ -385,8 +376,7 @@ static unsigned int br_nf_pre_routing_ipv6(unsigned int hook, nf_bridge_put(skb->nf_bridge); if ((nf_bridge = nf_bridge_alloc(skb)) == NULL) return NF_DROP; - if (!setup_pre_routing(skb)) - return NF_DROP; + setup_pre_routing(skb); NF_HOOK(PF_INET6, NF_IP6_PRE_ROUTING, skb, skb->dev, NULL, br_nf_pre_routing_finish_ipv6); @@ -475,8 +465,7 @@ static unsigned int br_nf_pre_routing(unsigned int hook, struct sk_buff **pskb, nf_bridge_put(skb->nf_bridge); if ((nf_bridge = nf_bridge_alloc(skb)) == NULL) return NF_DROP; - if (!setup_pre_routing(skb)) - return NF_DROP; + setup_pre_routing(skb); store_orig_dstaddr(skb); NF_HOOK(PF_INET, NF_IP_PRE_ROUTING, skb, skb->dev, NULL, @@ -550,16 +539,11 @@ static unsigned int br_nf_forward_ip(unsigned int hook, struct sk_buff **pskb, struct sk_buff *skb = *pskb; struct nf_bridge_info *nf_bridge; struct vlan_ethhdr *hdr = vlan_eth_hdr(skb); - struct net_device *parent; int pf; if (!skb->nf_bridge) return NF_ACCEPT; - parent = bridge_parent(out); - if (!parent) - return NF_DROP; - if (skb->protocol == __constant_htons(ETH_P_IP) || IS_VLAN_IP) pf = PF_INET; else @@ -580,8 +564,8 @@ static unsigned int br_nf_forward_ip(unsigned int hook, struct sk_buff **pskb, nf_bridge->mask |= BRNF_BRIDGED; nf_bridge->physoutdev = skb->dev; - NF_HOOK(pf, NF_IP_FORWARD, skb, bridge_parent(in), parent, - br_nf_forward_finish); + NF_HOOK(pf, NF_IP_FORWARD, skb, bridge_parent(in), + bridge_parent(out), br_nf_forward_finish); return NF_STOLEN; } @@ -704,8 +688,6 @@ static unsigned int br_nf_local_out(unsigned int hook, struct sk_buff **pskb, goto out; } realoutdev = bridge_parent(skb->dev); - if (!realoutdev) - return NF_DROP; #if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) /* iptables should match -o br0.x */ @@ -719,11 +701,9 @@ static unsigned int br_nf_local_out(unsigned int hook, struct sk_buff **pskb, /* IP forwarded traffic has a physindev, locally * generated traffic hasn't. */ if (realindev != NULL) { - if (!(nf_bridge->mask & BRNF_DONT_TAKE_PARENT) ) { - struct net_device *parent = bridge_parent(realindev); - if (parent) - realindev = parent; - } + if (!(nf_bridge->mask & BRNF_DONT_TAKE_PARENT) && + has_bridge_parent(realindev)) + realindev = bridge_parent(realindev); NF_HOOK_THRESH(pf, NF_IP_FORWARD, skb, realindev, realoutdev, br_nf_local_out_finish, @@ -763,9 +743,6 @@ static unsigned int br_nf_post_routing(unsigned int hook, struct sk_buff **pskb, if (!nf_bridge) return NF_ACCEPT; - if (!realoutdev) - return NF_DROP; - if (skb->protocol == __constant_htons(ETH_P_IP) || IS_VLAN_IP) pf = PF_INET; else @@ -805,8 +782,8 @@ static unsigned int br_nf_post_routing(unsigned int hook, struct sk_buff **pskb, print_error: if (skb->dev != NULL) { printk("[%s]", skb->dev->name); - if (realoutdev) - printk("[%s]", realoutdev->name); + if (has_bridge_parent(skb->dev)) + printk("[%s]", bridge_parent(skb->dev)->name); } printk(" head:%p, raw:%p, data:%p\n", skb->head, skb->mac.raw, skb->data); diff --git a/trunk/net/bridge/br_private.h b/trunk/net/bridge/br_private.h index 8f10e09f251b..e330b17b6d81 100644 --- a/trunk/net/bridge/br_private.h +++ b/trunk/net/bridge/br_private.h @@ -68,6 +68,7 @@ struct net_bridge_port /* STP */ u8 priority; u8 state; + u8 deleted; u16 port_no; unsigned char topology_change_ack; unsigned char config_pending; @@ -232,8 +233,9 @@ extern void (*br_fdb_put_hook)(struct net_bridge_fdb_entry *ent); #ifdef CONFIG_SYSFS /* br_sysfs_if.c */ -extern struct sysfs_ops brport_sysfs_ops; extern int br_sysfs_addif(struct net_bridge_port *p); +extern void br_sysfs_removeif(struct net_bridge_port *p); +extern void br_sysfs_freeif(struct net_bridge_port *p); /* br_sysfs_br.c */ extern int br_sysfs_addbr(struct net_device *dev); @@ -242,6 +244,8 @@ extern void br_sysfs_delbr(struct net_device *dev); #else #define br_sysfs_addif(p) (0) +#define br_sysfs_removeif(p) do { } while(0) +#define br_sysfs_freeif(p) kfree(p) #define br_sysfs_addbr(dev) (0) #define br_sysfs_delbr(dev) do { } while(0) #endif /* CONFIG_SYSFS */ diff --git a/trunk/net/bridge/br_stp_bpdu.c b/trunk/net/bridge/br_stp_bpdu.c index 296f6a487c52..d071f1c9ad0b 100644 --- a/trunk/net/bridge/br_stp_bpdu.c +++ b/trunk/net/bridge/br_stp_bpdu.c @@ -133,35 +133,29 @@ void br_send_tcn_bpdu(struct net_bridge_port *p) static const unsigned char header[6] = {0x42, 0x42, 0x03, 0x00, 0x00, 0x00}; -/* NO locks, but rcu_read_lock (preempt_disabled) */ +/* NO locks */ int br_stp_handle_bpdu(struct sk_buff *skb) { - struct net_bridge_port *p = rcu_dereference(skb->dev->br_port); - struct net_bridge *br; + struct net_bridge_port *p = skb->dev->br_port; + struct net_bridge *br = p->br; unsigned char *buf; - if (!p) - goto err; - - br = p->br; - spin_lock(&br->lock); - - if (p->state == BR_STATE_DISABLED || !(br->dev->flags & IFF_UP)) - goto out; - /* insert into forwarding database after filtering to avoid spoofing */ - br_fdb_update(br, p, eth_hdr(skb)->h_source); - - if (!br->stp_enabled) - goto out; + br_fdb_update(p->br, p, eth_hdr(skb)->h_source); /* need at least the 802 and STP headers */ if (!pskb_may_pull(skb, sizeof(header)+1) || memcmp(skb->data, header, sizeof(header))) - goto out; + goto err; buf = skb_pull(skb, sizeof(header)); + spin_lock_bh(&br->lock); + if (p->state == BR_STATE_DISABLED + || !(br->dev->flags & IFF_UP) + || !br->stp_enabled) + goto out; + if (buf[0] == BPDU_TYPE_CONFIG) { struct br_config_bpdu bpdu; @@ -207,7 +201,7 @@ int br_stp_handle_bpdu(struct sk_buff *skb) br_received_tcn_bpdu(p); } out: - spin_unlock(&br->lock); + spin_unlock_bh(&br->lock); err: kfree_skb(skb); return 0; diff --git a/trunk/net/bridge/br_sysfs_if.c b/trunk/net/bridge/br_sysfs_if.c index c51c9e42aeb3..0ac0355d16dd 100644 --- a/trunk/net/bridge/br_sysfs_if.c +++ b/trunk/net/bridge/br_sysfs_if.c @@ -195,11 +195,23 @@ static ssize_t brport_store(struct kobject * kobj, return ret; } -struct sysfs_ops brport_sysfs_ops = { +/* called from kobject_put when port ref count goes to zero. */ +static void brport_release(struct kobject *kobj) +{ + kfree(container_of(kobj, struct net_bridge_port, kobj)); +} + +static struct sysfs_ops brport_sysfs_ops = { .show = brport_show, .store = brport_store, }; +static struct kobj_type brport_ktype = { + .sysfs_ops = &brport_sysfs_ops, + .release = brport_release, +}; + + /* * Add sysfs entries to ethernet device added to a bridge. * Creates a brport subdirectory with bridge attributes. @@ -211,6 +223,17 @@ int br_sysfs_addif(struct net_bridge_port *p) struct brport_attribute **a; int err; + ASSERT_RTNL(); + + kobject_set_name(&p->kobj, SYSFS_BRIDGE_PORT_ATTR); + p->kobj.ktype = &brport_ktype; + p->kobj.parent = &(p->dev->class_dev.kobj); + p->kobj.kset = NULL; + + err = kobject_add(&p->kobj); + if(err) + goto out1; + err = sysfs_create_link(&p->kobj, &br->dev->class_dev.kobj, SYSFS_BRIDGE_PORT_LINK); if (err) @@ -222,7 +245,28 @@ int br_sysfs_addif(struct net_bridge_port *p) goto out2; } - err= sysfs_create_link(&br->ifobj, &p->kobj, p->dev->name); -out2: + err = sysfs_create_link(&br->ifobj, &p->kobj, p->dev->name); + if (err) + goto out2; + + kobject_uevent(&p->kobj, KOBJ_ADD); + return 0; + out2: + kobject_del(&p->kobj); + out1: return err; } + +void br_sysfs_removeif(struct net_bridge_port *p) +{ + pr_debug("br_sysfs_removeif\n"); + sysfs_remove_link(&p->br->ifobj, p->dev->name); + kobject_uevent(&p->kobj, KOBJ_REMOVE); + kobject_del(&p->kobj); +} + +void br_sysfs_freeif(struct net_bridge_port *p) +{ + pr_debug("br_sysfs_freeif\n"); + kobject_put(&p->kobj); +} diff --git a/trunk/net/core/datagram.c b/trunk/net/core/datagram.c index b8ce6bf81188..f8d322e1ea92 100644 --- a/trunk/net/core/datagram.c +++ b/trunk/net/core/datagram.c @@ -247,74 +247,49 @@ EXPORT_SYMBOL(skb_kill_datagram); int skb_copy_datagram_iovec(const struct sk_buff *skb, int offset, struct iovec *to, int len) { - int start = skb_headlen(skb); - int i, copy = start - offset; + int i, err, fraglen, end = 0; + struct sk_buff *next = skb_shinfo(skb)->frag_list; - /* Copy header. */ - if (copy > 0) { - if (copy > len) - copy = len; - if (memcpy_toiovec(to, skb->data + offset, copy)) - goto fault; - if ((len -= copy) == 0) - return 0; - offset += copy; - } + if (!len) + return 0; - /* Copy paged appendix. Hmm... why does this look so complicated? */ - for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { - int end; +next_skb: + fraglen = skb_headlen(skb); + i = -1; - BUG_TRAP(start <= offset + len); + while (1) { + int start = end; - end = start + skb_shinfo(skb)->frags[i].size; - if ((copy = end - offset) > 0) { - int err; - u8 *vaddr; - skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; - struct page *page = frag->page; + if ((end += fraglen) > offset) { + int copy = end - offset, o = offset - start; if (copy > len) copy = len; - vaddr = kmap(page); - err = memcpy_toiovec(to, vaddr + frag->page_offset + - offset - start, copy); - kunmap(page); + if (i == -1) + err = memcpy_toiovec(to, skb->data + o, copy); + else { + skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; + struct page *page = frag->page; + void *p = kmap(page) + frag->page_offset + o; + err = memcpy_toiovec(to, p, copy); + kunmap(page); + } if (err) goto fault; if (!(len -= copy)) return 0; offset += copy; } - start = end; + if (++i >= skb_shinfo(skb)->nr_frags) + break; + fraglen = skb_shinfo(skb)->frags[i].size; } - - if (skb_shinfo(skb)->frag_list) { - struct sk_buff *list = skb_shinfo(skb)->frag_list; - - for (; list; list = list->next) { - int end; - - BUG_TRAP(start <= offset + len); - - end = start + list->len; - if ((copy = end - offset) > 0) { - if (copy > len) - copy = len; - if (skb_copy_datagram_iovec(list, - offset - start, - to, copy)) - goto fault; - if ((len -= copy) == 0) - return 0; - offset += copy; - } - start = end; - } + if (next) { + skb = next; + BUG_ON(skb_shinfo(skb)->frag_list); + next = skb->next; + goto next_skb; } - if (!len) - return 0; - fault: return -EFAULT; } diff --git a/trunk/net/core/rtnetlink.c b/trunk/net/core/rtnetlink.c index eca2976abb25..8700379685e0 100644 --- a/trunk/net/core/rtnetlink.c +++ b/trunk/net/core/rtnetlink.c @@ -455,7 +455,7 @@ void rtmsg_ifinfo(int type, struct net_device *dev, unsigned change) if (!skb) return; - if (rtnetlink_fill_ifinfo(skb, dev, type, 0, 0, change, 0) < 0) { + if (rtnetlink_fill_ifinfo(skb, dev, type, current->pid, 0, change, 0) < 0) { kfree_skb(skb); return; } diff --git a/trunk/net/ipv4/devinet.c b/trunk/net/ipv4/devinet.c index 3ffa60dadc0c..95b9d81ac488 100644 --- a/trunk/net/ipv4/devinet.c +++ b/trunk/net/ipv4/devinet.c @@ -1135,7 +1135,7 @@ static void rtmsg_ifa(int event, struct in_ifaddr* ifa) if (!skb) netlink_set_err(rtnl, 0, RTNLGRP_IPV4_IFADDR, ENOBUFS); - else if (inet_fill_ifaddr(skb, ifa, 0, 0, event, 0) < 0) { + else if (inet_fill_ifaddr(skb, ifa, current->pid, 0, event, 0) < 0) { kfree_skb(skb); netlink_set_err(rtnl, 0, RTNLGRP_IPV4_IFADDR, EINVAL); } else { diff --git a/trunk/net/ipv4/fib_semantics.c b/trunk/net/ipv4/fib_semantics.c index 0f4145babb14..ef4724de7350 100644 --- a/trunk/net/ipv4/fib_semantics.c +++ b/trunk/net/ipv4/fib_semantics.c @@ -1045,7 +1045,7 @@ fib_convert_rtentry(int cmd, struct nlmsghdr *nl, struct rtmsg *rtm, } nl->nlmsg_flags = NLM_F_REQUEST; - nl->nlmsg_pid = 0; + nl->nlmsg_pid = current->pid; nl->nlmsg_seq = 0; nl->nlmsg_len = NLMSG_LENGTH(sizeof(*rtm)); if (cmd == SIOCDELRT) { diff --git a/trunk/net/ipv4/icmp.c b/trunk/net/ipv4/icmp.c index e7bbff4340bb..4d1c40972a4b 100644 --- a/trunk/net/ipv4/icmp.c +++ b/trunk/net/ipv4/icmp.c @@ -192,7 +192,7 @@ int sysctl_icmp_echo_ignore_all; int sysctl_icmp_echo_ignore_broadcasts = 1; /* Control parameter - ignore bogus broadcast responses? */ -int sysctl_icmp_ignore_bogus_error_responses = 1; +int sysctl_icmp_ignore_bogus_error_responses; /* * Configurable global rate limit. diff --git a/trunk/net/ipv4/tcp_input.c b/trunk/net/ipv4/tcp_input.c index e9a54ae7d690..a97ed5416c28 100644 --- a/trunk/net/ipv4/tcp_input.c +++ b/trunk/net/ipv4/tcp_input.c @@ -456,8 +456,7 @@ void tcp_rcv_space_adjust(struct sock *sk) tp->rcvq_space.space = space; - if (sysctl_tcp_moderate_rcvbuf && - !(sk->sk_userlocks & SOCK_RCVBUF_LOCK)) { + if (sysctl_tcp_moderate_rcvbuf) { int new_clamp = space; /* Receive space grows, normalize in order to diff --git a/trunk/net/ipv6/raw.c b/trunk/net/ipv6/raw.c index ae20a0ec9bd8..738376cf0c51 100644 --- a/trunk/net/ipv6/raw.c +++ b/trunk/net/ipv6/raw.c @@ -803,7 +803,10 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk, err = rawv6_push_pending_frames(sk, &fl, rp); } done: - dst_release(dst); + ip6_dst_store(sk, dst, + ipv6_addr_equal(&fl.fl6_dst, &np->daddr) ? + &np->daddr : NULL); + release_sock(sk); out: fl6_sock_release(flowlabel); diff --git a/trunk/net/irda/irda_device.c b/trunk/net/irda/irda_device.c index e3debbdb67f5..890bac0d4a56 100644 --- a/trunk/net/irda/irda_device.c +++ b/trunk/net/irda/irda_device.c @@ -343,12 +343,12 @@ static void irda_task_timer_expired(void *data) static void irda_device_setup(struct net_device *dev) { dev->hard_header_len = 0; - dev->addr_len = LAP_ALEN; + dev->addr_len = 0; dev->type = ARPHRD_IRDA; dev->tx_queue_len = 8; /* Window size + 1 s-frame */ - memset(dev->broadcast, 0xff, LAP_ALEN); + memset(dev->broadcast, 0xff, 4); dev->mtu = 2048; dev->flags = IFF_NOARP; diff --git a/trunk/net/irda/irnet/irnet_irda.c b/trunk/net/irda/irnet/irnet_irda.c index f65c7a83bc5c..07ec326c71f5 100644 --- a/trunk/net/irda/irnet/irnet_irda.c +++ b/trunk/net/irda/irnet/irnet_irda.c @@ -696,7 +696,7 @@ irnet_daddr_to_dname(irnet_socket * self) { /* Yes !!! Get it.. */ strlcpy(self->rname, discoveries[i].info, sizeof(self->rname)); - self->rname[sizeof(self->rname) - 1] = '\0'; + self->rname[NICKNAME_MAX_LEN + 1] = '\0'; DEBUG(IRDA_SERV_INFO, "Device 0x%08x is in fact ``%s''.\n", self->daddr, self->rname); kfree(discoveries); diff --git a/trunk/net/netfilter/Kconfig b/trunk/net/netfilter/Kconfig index 0e550127fa7e..99c0a0fa4a97 100644 --- a/trunk/net/netfilter/Kconfig +++ b/trunk/net/netfilter/Kconfig @@ -102,6 +102,8 @@ config NF_CT_NETLINK help This option enables support for a netlink-based userspace interface +endmenu + config NETFILTER_XTABLES tristate "Netfilter Xtables support (required for ip_tables)" help @@ -359,5 +361,3 @@ config NETFILTER_XT_MATCH_TCPMSS To compile it as a module, choose M here. If unsure, say N. -endmenu - diff --git a/trunk/net/netlink/af_netlink.c b/trunk/net/netlink/af_netlink.c index 6b9772d95872..2101b45d2ec6 100644 --- a/trunk/net/netlink/af_netlink.c +++ b/trunk/net/netlink/af_netlink.c @@ -702,8 +702,7 @@ struct sock *netlink_getsockbyfilp(struct file *filp) * 0: continue * 1: repeat lookup - reference dropped while waiting for socket memory. */ -int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock, - long timeo, struct sock *ssk) +int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock, long timeo) { struct netlink_sock *nlk; @@ -713,7 +712,7 @@ int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock, test_bit(0, &nlk->state)) { DECLARE_WAITQUEUE(wait, current); if (!timeo) { - if (!ssk || nlk_sk(ssk)->pid == 0) + if (!nlk->pid) netlink_overrun(sk); sock_put(sk); kfree_skb(skb); @@ -798,7 +797,7 @@ int netlink_unicast(struct sock *ssk, struct sk_buff *skb, u32 pid, int nonblock kfree_skb(skb); return PTR_ERR(sk); } - err = netlink_attachskb(sk, skb, nonblock, timeo, ssk); + err = netlink_attachskb(sk, skb, nonblock, timeo); if (err == 1) goto retry; if (err) diff --git a/trunk/net/netlink/genetlink.c b/trunk/net/netlink/genetlink.c index 43e72419c868..4ae1538c54a9 100644 --- a/trunk/net/netlink/genetlink.c +++ b/trunk/net/netlink/genetlink.c @@ -238,7 +238,7 @@ int genl_register_family(struct genl_family *family) sizeof(struct nlattr *), GFP_KERNEL); if (family->attrbuf == NULL) { err = -ENOMEM; - goto errout_locked; + goto errout; } } else family->attrbuf = NULL; @@ -288,7 +288,7 @@ int genl_unregister_family(struct genl_family *family) return -ENOENT; } -static int genl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, +static inline int genl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, int *errp) { struct genl_ops *ops; @@ -375,7 +375,7 @@ static void genl_rcv(struct sock *sk, int len) do { if (genl_trylock()) return; - netlink_run_queue(sk, &qlen, genl_rcv_msg); + netlink_run_queue(sk, &qlen, &genl_rcv_msg); genl_unlock(); } while (qlen && genl_sock && genl_sock->sk_receive_queue.qlen); } @@ -549,8 +549,10 @@ static int __init genl_init(void) netlink_set_nonroot(NETLINK_GENERIC, NL_NONROOT_RECV); genl_sock = netlink_kernel_create(NETLINK_GENERIC, GENL_MAX_ID, genl_rcv, THIS_MODULE); - if (genl_sock == NULL) + if (genl_sock == NULL) { panic("GENL: Cannot initialize generic netlink\n"); + return -ENOMEM; + } return 0; @@ -558,6 +560,7 @@ static int __init genl_init(void) genl_unregister_family(&genl_ctrl); errout: panic("GENL: Cannot register controller: %d\n", err); + return err; } subsys_initcall(genl_init); diff --git a/trunk/net/xfrm/xfrm_policy.c b/trunk/net/xfrm/xfrm_policy.c index 98ec53bd3ac7..dbf4620768d6 100644 --- a/trunk/net/xfrm/xfrm_policy.c +++ b/trunk/net/xfrm/xfrm_policy.c @@ -889,9 +889,7 @@ int xfrm_lookup(struct dst_entry **dst_p, struct flowi *fl, xfrm_pol_put(policy); if (dst) dst_free(dst); - - err = -EHOSTUNREACH; - goto error; + goto restart; } dst->next = policy->bundles; policy->bundles = dst; diff --git a/trunk/scripts/kconfig/Makefile b/trunk/scripts/kconfig/Makefile index 5760e057ecba..d64aae85c378 100644 --- a/trunk/scripts/kconfig/Makefile +++ b/trunk/scripts/kconfig/Makefile @@ -123,7 +123,17 @@ KBUILD_HAVE_NLS := $(shell \ then echo yes ; \ else echo no ; fi) ifeq ($(KBUILD_HAVE_NLS),no) -HOSTCFLAGS += -DKBUILD_NO_NLS + HOSTCFLAGS += -DKBUILD_NO_NLS +else + KBUILD_NEED_LINTL := $(shell \ + if echo -e "\#include \nint main(int a, char** b) { gettext(\"\"); return 0; }\n" | \ + $(HOSTCC) $(HOSTCFLAGS) -x c - -o /dev/null> /dev/null 2>&1 ; \ + then echo no ; \ + else echo yes ; fi) + ifeq ($(KBUILD_NEED_LINTL),yes) + HOSTLOADLIBES_conf += -lintl + HOSTLOADLIBES_mconf += -lintl + endif endif # generated files seem to need this to find local include files