From ea80ed8cf7b774922381d2210e506a9cf4b955e0 Mon Sep 17 00:00:00 2001 From: Florin Malita Date: Wed, 24 May 2006 21:21:31 -0400 Subject: [PATCH] --- yaml --- r: 27116 b: refs/heads/master c: 1617406a763870a84ffe6bba3659f30f96ac4a61 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/Documentation/serial/driver | 9 ++- trunk/MAINTAINERS | 12 ---- trunk/arch/alpha/kernel/alpha_ksyms.c | 1 + trunk/arch/alpha/kernel/process.c | 6 +- trunk/arch/alpha/kernel/smp.c | 14 ++-- trunk/arch/alpha/kernel/sys_titan.c | 2 +- trunk/arch/arm/mach-ixp23xx/core.c | 18 +---- .../powerpc/platforms/powermac/pfunc_core.c | 18 ++--- trunk/arch/sparc64/kernel/head.S | 30 -------- trunk/arch/sparc64/kernel/setup.c | 23 +++--- trunk/arch/sparc64/kernel/smp.c | 16 ++++- trunk/arch/sparc64/lib/checksum.S | 5 +- trunk/arch/sparc64/lib/csum_copy.S | 5 +- trunk/arch/um/Makefile-i386 | 4 -- trunk/arch/um/include/kern_util.h | 13 +++- trunk/arch/um/kernel/time_kern.c | 10 --- trunk/arch/um/os-Linux/main.c | 2 +- trunk/arch/um/os-Linux/time.c | 10 ++- trunk/arch/um/sys-i386/syscalls.c | 9 ++- trunk/arch/um/sys-x86_64/signal.c | 24 +++---- trunk/arch/um/sys-x86_64/syscalls.c | 2 +- trunk/block/cfq-iosched.c | 52 +++----------- trunk/drivers/ieee1394/sbp2.c | 2 +- trunk/drivers/infiniband/ulp/ipoib/ipoib_ib.c | 1 - trunk/drivers/message/fusion/mptbase.c | 27 ++----- trunk/drivers/net/forcedeth.c | 16 ----- trunk/drivers/net/pcmcia/nmclan_cs.c | 2 +- trunk/drivers/pcmcia/ds.c | 6 ++ trunk/drivers/rtc/rtc-m48t86.c | 72 +++++++++---------- trunk/drivers/s390/cio/css.h | 4 +- trunk/drivers/s390/cio/device_fsm.c | 2 +- trunk/drivers/scsi/ppa.c | 7 -- trunk/drivers/scsi/sata_sil24.c | 6 +- trunk/drivers/scsi/scsi_devinfo.c | 1 - trunk/drivers/scsi/scsi_lib.c | 2 +- trunk/drivers/scsi/scsi_transport_sas.c | 4 +- trunk/fs/namei.c | 19 +++-- trunk/include/asm-alpha/smp.h | 4 +- trunk/include/asm-arm/arch-ixp23xx/memory.h | 2 +- trunk/include/asm-generic/pgtable.h | 11 ++- trunk/include/asm-mips/pgtable.h | 10 +-- trunk/include/asm-s390/lowcore.h | 4 +- trunk/include/asm-sparc64/pgtable.h | 17 ----- trunk/include/asm-um/irqflags.h | 6 -- trunk/include/asm-um/uaccess.h | 6 +- trunk/include/linux/m48t86.h | 4 +- trunk/include/linux/mmzone.h | 1 - trunk/mm/slab.c | 27 +++---- trunk/net/ipv4/tcp_highspeed.c | 3 +- trunk/security/selinux/hooks.c | 6 +- 51 files changed, 213 insertions(+), 346 deletions(-) delete mode 100644 trunk/include/asm-um/irqflags.h diff --git a/[refs] b/[refs] index c7b5de3df858..cfd628381787 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: fec468b0c9e0a75b89514408e3b35b1576b57071 +refs/heads/master: 1617406a763870a84ffe6bba3659f30f96ac4a61 diff --git a/trunk/Documentation/serial/driver b/trunk/Documentation/serial/driver index 88ad615dd338..df82116a9f26 100644 --- a/trunk/Documentation/serial/driver +++ b/trunk/Documentation/serial/driver @@ -214,13 +214,12 @@ hardware. The interaction of the iflag bits is as follows (parity error given as an example): Parity error INPCK IGNPAR - n/a 0 n/a character received, marked as + None n/a n/a character received + Yes n/a 0 character discarded + Yes 0 1 character received, marked as TTY_NORMAL - None 1 n/a character received, marked as - TTY_NORMAL - Yes 1 0 character received, marked as + Yes 1 1 character received, marked as TTY_PARITY - Yes 1 1 character discarded Other flags may be used (eg, xon/xoff characters) if your hardware supports hardware "soft" flow control. diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index 141c22269eba..74d71cafb17c 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -568,18 +568,6 @@ L: linuxppc-dev@ozlabs.org W: http://www.penguinppc.org/ppc64/ S: Supported -BROADCOM BNX2 GIGABIT ETHERNET DRIVER -P: Michael Chan -M: mchan@broadcom.com -L: netdev@vger.kernel.org -S: Supported - -BROADCOM TG3 GIGABIT ETHERNET DRIVER -P: Michael Chan -M: mchan@broadcom.com -L: netdev@vger.kernel.org -S: Supported - BTTV VIDEO4LINUX DRIVER P: Mauro Carvalho Chehab M: mchehab@infradead.org diff --git a/trunk/arch/alpha/kernel/alpha_ksyms.c b/trunk/arch/alpha/kernel/alpha_ksyms.c index 2b245ad731ee..c645c5e14786 100644 --- a/trunk/arch/alpha/kernel/alpha_ksyms.c +++ b/trunk/arch/alpha/kernel/alpha_ksyms.c @@ -182,6 +182,7 @@ EXPORT_SYMBOL(smp_num_cpus); EXPORT_SYMBOL(smp_call_function); EXPORT_SYMBOL(smp_call_function_on_cpu); EXPORT_SYMBOL(_atomic_dec_and_lock); +EXPORT_SYMBOL(cpu_present_mask); #endif /* CONFIG_SMP */ /* diff --git a/trunk/arch/alpha/kernel/process.c b/trunk/arch/alpha/kernel/process.c index c760a831fd1a..9924fd07743a 100644 --- a/trunk/arch/alpha/kernel/process.c +++ b/trunk/arch/alpha/kernel/process.c @@ -94,7 +94,7 @@ common_shutdown_1(void *generic_ptr) if (cpuid != boot_cpuid) { flags |= 0x00040000UL; /* "remain halted" */ *pflags = flags; - cpu_clear(cpuid, cpu_present_map); + clear_bit(cpuid, &cpu_present_mask); halt(); } #endif @@ -120,8 +120,8 @@ common_shutdown_1(void *generic_ptr) #ifdef CONFIG_SMP /* Wait for the secondaries to halt. */ - cpu_clear(boot_cpuid, cpu_present_map); - while (cpus_weight(cpu_present_map)) + cpu_clear(boot_cpuid, cpu_possible_map); + while (cpus_weight(cpu_possible_map)) barrier(); #endif diff --git a/trunk/arch/alpha/kernel/smp.c b/trunk/arch/alpha/kernel/smp.c index 4dc273e537fd..185255416e85 100644 --- a/trunk/arch/alpha/kernel/smp.c +++ b/trunk/arch/alpha/kernel/smp.c @@ -68,6 +68,7 @@ enum ipi_message_type { static int smp_secondary_alive __initdata = 0; /* Which cpus ids came online. */ +cpumask_t cpu_present_mask; cpumask_t cpu_online_map; EXPORT_SYMBOL(cpu_online_map); @@ -438,7 +439,7 @@ setup_smp(void) if ((cpu->flags & 0x1cc) == 0x1cc) { smp_num_probed++; /* Assume here that "whami" == index */ - cpu_set(i, cpu_present_map); + cpu_set(i, cpu_present_mask); cpu->pal_revision = boot_cpu_palrev; } @@ -449,10 +450,11 @@ setup_smp(void) } } else { smp_num_probed = 1; + cpu_set(boot_cpuid, cpu_present_mask); } - printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_map = %lx\n", - smp_num_probed, cpu_present_map.bits[0]); + printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_mask = %lx\n", + smp_num_probed, cpu_possible_map.bits[0]); } /* @@ -471,7 +473,7 @@ smp_prepare_cpus(unsigned int max_cpus) /* Nothing to do on a UP box, or when told not to. */ if (smp_num_probed == 1 || max_cpus == 0) { - cpu_present_map = cpumask_of_cpu(boot_cpuid); + cpu_present_mask = cpumask_of_cpu(boot_cpuid); printk(KERN_INFO "SMP mode deactivated.\n"); return; } @@ -484,6 +486,10 @@ smp_prepare_cpus(unsigned int max_cpus) void __devinit smp_prepare_boot_cpu(void) { + /* + * Mark the boot cpu (current cpu) as online + */ + cpu_set(smp_processor_id(), cpu_online_map); } int __devinit diff --git a/trunk/arch/alpha/kernel/sys_titan.c b/trunk/arch/alpha/kernel/sys_titan.c index 2551fb49ae09..5f84417eeb7b 100644 --- a/trunk/arch/alpha/kernel/sys_titan.c +++ b/trunk/arch/alpha/kernel/sys_titan.c @@ -66,7 +66,7 @@ titan_update_irq_hw(unsigned long mask) register int bcpu = boot_cpuid; #ifdef CONFIG_SMP - cpumask_t cpm = cpu_present_map; + cpumask_t cpm = cpu_present_mask; volatile unsigned long *dim0, *dim1, *dim2, *dim3; unsigned long mask0, mask1, mask2, mask3, dummy; diff --git a/trunk/arch/arm/mach-ixp23xx/core.c b/trunk/arch/arm/mach-ixp23xx/core.c index affd1d5d7440..092ee12ced42 100644 --- a/trunk/arch/arm/mach-ixp23xx/core.c +++ b/trunk/arch/arm/mach-ixp23xx/core.c @@ -178,12 +178,8 @@ static int ixp23xx_irq_set_type(unsigned int irq, unsigned int type) static void ixp23xx_irq_mask(unsigned int irq) { - volatile unsigned long *intr_reg; + volatile unsigned long *intr_reg = IXP23XX_INTR_EN1 + (irq / 32); - if (irq >= 56) - irq += 8; - - intr_reg = IXP23XX_INTR_EN1 + (irq / 32); *intr_reg &= ~(1 << (irq % 32)); } @@ -203,25 +199,17 @@ static void ixp23xx_irq_ack(unsigned int irq) */ static void ixp23xx_irq_level_unmask(unsigned int irq) { - volatile unsigned long *intr_reg; + volatile unsigned long *intr_reg = IXP23XX_INTR_EN1 + (irq / 32); ixp23xx_irq_ack(irq); - if (irq >= 56) - irq += 8; - - intr_reg = IXP23XX_INTR_EN1 + (irq / 32); *intr_reg |= (1 << (irq % 32)); } static void ixp23xx_irq_edge_unmask(unsigned int irq) { - volatile unsigned long *intr_reg; - - if (irq >= 56) - irq += 8; + volatile unsigned long *intr_reg = IXP23XX_INTR_EN1 + (irq / 32); - intr_reg = IXP23XX_INTR_EN1 + (irq / 32); *intr_reg |= (1 << (irq % 32)); } diff --git a/trunk/arch/powerpc/platforms/powermac/pfunc_core.c b/trunk/arch/powerpc/platforms/powermac/pfunc_core.c index f08173b0f065..4baa75b1d36f 100644 --- a/trunk/arch/powerpc/platforms/powermac/pfunc_core.c +++ b/trunk/arch/powerpc/platforms/powermac/pfunc_core.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include @@ -547,7 +546,6 @@ struct pmf_device { static LIST_HEAD(pmf_devices); static spinlock_t pmf_lock = SPIN_LOCK_UNLOCKED; -static DEFINE_MUTEX(pmf_irq_mutex); static void pmf_release_device(struct kref *kref) { @@ -866,17 +864,15 @@ int pmf_register_irq_client(struct device_node *target, spin_lock_irqsave(&pmf_lock, flags); func = __pmf_find_function(target, name, PMF_FLAGS_INT_GEN); - if (func) - func = pmf_get_function(func); - spin_unlock_irqrestore(&pmf_lock, flags); - if (func == NULL) + if (func == NULL) { + spin_unlock_irqrestore(&pmf_lock, flags); return -ENODEV; - mutex_lock(&pmf_irq_mutex); + } if (list_empty(&func->irq_clients)) func->dev->handlers->irq_enable(func); list_add(&client->link, &func->irq_clients); client->func = func; - mutex_unlock(&pmf_irq_mutex); + spin_unlock_irqrestore(&pmf_lock, flags); return 0; } @@ -885,16 +881,16 @@ EXPORT_SYMBOL_GPL(pmf_register_irq_client); void pmf_unregister_irq_client(struct pmf_irq_client *client) { struct pmf_function *func = client->func; + unsigned long flags; BUG_ON(func == NULL); - mutex_lock(&pmf_irq_mutex); + spin_lock_irqsave(&pmf_lock, flags); client->func = NULL; list_del(&client->link); if (list_empty(&func->irq_clients)) func->dev->handlers->irq_disable(func); - mutex_unlock(&pmf_irq_mutex); - pmf_put_function(func); + spin_unlock_irqrestore(&pmf_lock, flags); } EXPORT_SYMBOL_GPL(pmf_unregister_irq_client); diff --git a/trunk/arch/sparc64/kernel/head.S b/trunk/arch/sparc64/kernel/head.S index 31c5892f5acc..3eadac5e171e 100644 --- a/trunk/arch/sparc64/kernel/head.S +++ b/trunk/arch/sparc64/kernel/head.S @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include @@ -494,35 +493,6 @@ tlb_fixup_done: call prom_init mov %l7, %o0 ! OpenPROM cif handler - /* Initialize current_thread_info()->cpu as early as possible. - * In order to do that accurately we have to patch up the get_cpuid() - * assembler sequences. And that, in turn, requires that we know - * if we are on a Starfire box or not. While we're here, patch up - * the sun4v sequences as well. - */ - call check_if_starfire - nop - call per_cpu_patch - nop - call sun4v_patch - nop - -#ifdef CONFIG_SMP - call hard_smp_processor_id - nop - cmp %o0, NR_CPUS - blu,pt %xcc, 1f - nop - call boot_cpu_id_too_large - nop - /* Not reached... */ - -1: -#else - mov 0, %o0 -#endif - stb %o0, [%g6 + TI_CPU] - /* Off we go.... */ call start_kernel nop diff --git a/trunk/arch/sparc64/kernel/setup.c b/trunk/arch/sparc64/kernel/setup.c index 9cf1c88cd774..005167f82419 100644 --- a/trunk/arch/sparc64/kernel/setup.c +++ b/trunk/arch/sparc64/kernel/setup.c @@ -220,7 +220,7 @@ char reboot_command[COMMAND_LINE_SIZE]; static struct pt_regs fake_swapper_regs = { { 0, }, 0, 0, 0, 0 }; -void __init per_cpu_patch(void) +static void __init per_cpu_patch(void) { struct cpuid_patch_entry *p; unsigned long ver; @@ -280,7 +280,7 @@ void __init per_cpu_patch(void) } } -void __init sun4v_patch(void) +static void __init sun4v_patch(void) { struct sun4v_1insn_patch_entry *p1; struct sun4v_2insn_patch_entry *p2; @@ -315,15 +315,6 @@ void __init sun4v_patch(void) } } -#ifdef CONFIG_SMP -void __init boot_cpu_id_too_large(int cpu) -{ - prom_printf("Serious problem, boot cpu id (%d) >= NR_CPUS (%d)\n", - cpu, NR_CPUS); - prom_halt(); -} -#endif - void __init setup_arch(char **cmdline_p) { /* Initialize PROM console and command line. */ @@ -341,6 +332,16 @@ void __init setup_arch(char **cmdline_p) conswitchp = &prom_con; #endif + /* Work out if we are starfire early on */ + check_if_starfire(); + + /* Now we know enough to patch the get_cpuid sequences + * used by trap code. + */ + per_cpu_patch(); + + sun4v_patch(); + boot_flags_init(*cmdline_p); idprom_init(); diff --git a/trunk/arch/sparc64/kernel/smp.c b/trunk/arch/sparc64/kernel/smp.c index 4e8cd79156e0..90eaca3ec9a6 100644 --- a/trunk/arch/sparc64/kernel/smp.c +++ b/trunk/arch/sparc64/kernel/smp.c @@ -1264,6 +1264,7 @@ void __init smp_tick_init(void) boot_cpu_id = hard_smp_processor_id(); current_tick_offset = timer_tick_offset; + cpu_set(boot_cpu_id, cpu_online_map); prof_counter(boot_cpu_id) = prof_multiplier(boot_cpu_id) = 1; } @@ -1344,6 +1345,18 @@ void __init smp_setup_cpu_possible_map(void) void __devinit smp_prepare_boot_cpu(void) { + int cpu = hard_smp_processor_id(); + + if (cpu >= NR_CPUS) { + prom_printf("Serious problem, boot cpu id >= NR_CPUS\n"); + prom_halt(); + } + + current_thread_info()->cpu = cpu; + __local_per_cpu_offset = __per_cpu_offset(cpu); + + cpu_set(smp_processor_id(), cpu_online_map); + cpu_set(smp_processor_id(), phys_cpu_present_map); } int __devinit __cpu_up(unsigned int cpu) @@ -1420,7 +1433,4 @@ void __init setup_per_cpu_areas(void) for (i = 0; i < NR_CPUS; i++, ptr += size) memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start); - - /* Setup %g5 for the boot cpu. */ - __local_per_cpu_offset = __per_cpu_offset(smp_processor_id()); } diff --git a/trunk/arch/sparc64/lib/checksum.S b/trunk/arch/sparc64/lib/checksum.S index 1d230f693dc4..ba9cd3ccc2b2 100644 --- a/trunk/arch/sparc64/lib/checksum.S +++ b/trunk/arch/sparc64/lib/checksum.S @@ -165,9 +165,8 @@ csum_partial_end_cruft: sll %g1, 8, %g1 or %o5, %g1, %o4 -1: addcc %o2, %o4, %o2 - addc %g0, %o2, %o2 +1: add %o2, %o4, %o2 csum_partial_finish: retl - srl %o2, 0, %o0 + mov %o2, %o0 diff --git a/trunk/arch/sparc64/lib/csum_copy.S b/trunk/arch/sparc64/lib/csum_copy.S index e566c770a0f6..71af48839064 100644 --- a/trunk/arch/sparc64/lib/csum_copy.S +++ b/trunk/arch/sparc64/lib/csum_copy.S @@ -221,12 +221,11 @@ FUNC_NAME: /* %o0=src, %o1=dst, %o2=len, %o3=sum */ sll %g1, 8, %g1 or %o5, %g1, %o4 -1: addcc %o3, %o4, %o3 - addc %g0, %o3, %o3 +1: add %o3, %o4, %o3 70: retl - srl %o3, 0, %o0 + mov %o3, %o0 95: mov 0, GLOBAL_SPARE brlez,pn %o2, 4f diff --git a/trunk/arch/um/Makefile-i386 b/trunk/arch/um/Makefile-i386 index b65ca115ef77..7a0e04e34bf9 100644 --- a/trunk/arch/um/Makefile-i386 +++ b/trunk/arch/um/Makefile-i386 @@ -33,9 +33,5 @@ include $(srctree)/arch/i386/Makefile.cpu # prevent gcc from keeping the stack 16 byte aligned. Taken from i386. cflags-y += $(call cc-option,-mpreferred-stack-boundary=2) -# Prevent sprintf in nfsd from being converted to strcpy and resulting in -# an unresolved reference. -cflags-y += -ffreestanding - CFLAGS += $(cflags-y) USER_CFLAGS += $(cflags-y) diff --git a/trunk/arch/um/include/kern_util.h b/trunk/arch/um/include/kern_util.h index 310980b32173..efa3d33c0be6 100644 --- a/trunk/arch/um/include/kern_util.h +++ b/trunk/arch/um/include/kern_util.h @@ -120,11 +120,20 @@ extern int is_syscall(unsigned long addr); extern void free_irq(unsigned int, void *); extern int cpu(void); -extern void time_init_kern(void); - /* Are we disallowed to sleep? Used to choose between GFP_KERNEL and GFP_ATOMIC. */ extern int __cant_sleep(void); extern void segv_handler(int sig, union uml_pt_regs *regs); extern void sigio_handler(int sig, union uml_pt_regs *regs); #endif + +/* + * Overrides for Emacs so that we follow Linus's tabbing style. + * Emacs will notice this stuff at the end of the file and automatically + * adjust the settings for this buffer only. This must remain at the end + * of the file. + * --------------------------------------------------------------------------- + * Local variables: + * c-file-style: "linux" + * End: + */ diff --git a/trunk/arch/um/kernel/time_kern.c b/trunk/arch/um/kernel/time_kern.c index 86f51d04c98d..528cf623f8b4 100644 --- a/trunk/arch/um/kernel/time_kern.c +++ b/trunk/arch/um/kernel/time_kern.c @@ -84,16 +84,6 @@ void timer_irq(union uml_pt_regs *regs) } } - -void time_init_kern(void) -{ - unsigned long long nsecs; - - nsecs = os_nsecs(); - set_normalized_timespec(&wall_to_monotonic, -nsecs / BILLION, - -nsecs % BILLION); -} - void do_boot_timer_handler(struct sigcontext * sc) { struct pt_regs regs; diff --git a/trunk/arch/um/os-Linux/main.c b/trunk/arch/um/os-Linux/main.c index 90912aaca7aa..3a0ac38e978b 100644 --- a/trunk/arch/um/os-Linux/main.c +++ b/trunk/arch/um/os-Linux/main.c @@ -59,7 +59,7 @@ static __init void do_uml_initcalls(void) initcall_t *call; call = &__uml_initcall_start; - while (call < &__uml_initcall_end){ + while (call < &__uml_initcall_end){; (*call)(); call++; } diff --git a/trunk/arch/um/os-Linux/time.c b/trunk/arch/um/os-Linux/time.c index 280c4fb9b585..6f7626775acb 100644 --- a/trunk/arch/um/os-Linux/time.c +++ b/trunk/arch/um/os-Linux/time.c @@ -81,12 +81,20 @@ void uml_idle_timer(void) set_interval(ITIMER_REAL); } +extern void ktime_get_ts(struct timespec *ts); +#define do_posix_clock_monotonic_gettime(ts) ktime_get_ts(ts) + void time_init(void) { + struct timespec now; + if(signal(SIGVTALRM, boot_timer_handler) == SIG_ERR) panic("Couldn't set SIGVTALRM handler"); set_interval(ITIMER_VIRTUAL); - time_init_kern(); + + do_posix_clock_monotonic_gettime(&now); + wall_to_monotonic.tv_sec = -now.tv_sec; + wall_to_monotonic.tv_nsec = -now.tv_nsec; } unsigned long long os_nsecs(void) diff --git a/trunk/arch/um/sys-i386/syscalls.c b/trunk/arch/um/sys-i386/syscalls.c index 710d5fb807e1..749dd1bfe60f 100644 --- a/trunk/arch/um/sys-i386/syscalls.c +++ b/trunk/arch/um/sys-i386/syscalls.c @@ -99,12 +99,11 @@ long sys_ipc (uint call, int first, int second, switch (call) { case SEMOP: - return sys_semtimedop(first, (struct sembuf __user *) ptr, - second, NULL); + return sys_semtimedop(first, (struct sembuf *) ptr, second, + NULL); case SEMTIMEDOP: - return sys_semtimedop(first, (struct sembuf __user *) ptr, - second, - (const struct timespec __user *) fifth); + return sys_semtimedop(first, (struct sembuf *) ptr, second, + (const struct timespec *) fifth); case SEMGET: return sys_semget (first, second, third); case SEMCTL: { diff --git a/trunk/arch/um/sys-x86_64/signal.c b/trunk/arch/um/sys-x86_64/signal.c index 9edf114faf79..a4c46a8af008 100644 --- a/trunk/arch/um/sys-x86_64/signal.c +++ b/trunk/arch/um/sys-x86_64/signal.c @@ -21,7 +21,7 @@ #include "skas.h" static int copy_sc_from_user_skas(struct pt_regs *regs, - struct sigcontext __user *from) + struct sigcontext *from) { int err = 0; @@ -54,8 +54,7 @@ static int copy_sc_from_user_skas(struct pt_regs *regs, return(err); } -int copy_sc_to_user_skas(struct sigcontext __user *to, - struct _fpstate __user *to_fp, +int copy_sc_to_user_skas(struct sigcontext *to, struct _fpstate *to_fp, struct pt_regs *regs, unsigned long mask, unsigned long sp) { @@ -107,11 +106,10 @@ int copy_sc_to_user_skas(struct sigcontext __user *to, #endif #ifdef CONFIG_MODE_TT -int copy_sc_from_user_tt(struct sigcontext *to, struct sigcontext __user *from, +int copy_sc_from_user_tt(struct sigcontext *to, struct sigcontext *from, int fpsize) { - struct _fpstate *to_fp; - struct _fpstate __user *from_fp; + struct _fpstate *to_fp, *from_fp; unsigned long sigs; int err; @@ -126,14 +124,13 @@ int copy_sc_from_user_tt(struct sigcontext *to, struct sigcontext __user *from, return(err); } -int copy_sc_to_user_tt(struct sigcontext __user *to, struct _fpstate __user *fp, +int copy_sc_to_user_tt(struct sigcontext *to, struct _fpstate *fp, struct sigcontext *from, int fpsize, unsigned long sp) { - struct _fpstate __user *to_fp; - struct _fpstate *from_fp; + struct _fpstate *to_fp, *from_fp; int err; - to_fp = (fp ? fp : (struct _fpstate __user *) (to + 1)); + to_fp = (fp ? fp : (struct _fpstate *) (to + 1)); from_fp = from->fpstate; err = copy_to_user(to, from, sizeof(*to)); /* The SP in the sigcontext is the updated one for the signal @@ -161,8 +158,7 @@ static int copy_sc_from_user(struct pt_regs *to, void __user *from) return(ret); } -static int copy_sc_to_user(struct sigcontext __user *to, - struct _fpstate __user *fp, +static int copy_sc_to_user(struct sigcontext *to, struct _fpstate *fp, struct pt_regs *from, unsigned long mask, unsigned long sp) { @@ -173,7 +169,7 @@ static int copy_sc_to_user(struct sigcontext __user *to, struct rt_sigframe { - char __user *pretcode; + char *pretcode; struct ucontext uc; struct siginfo info; }; @@ -192,7 +188,7 @@ int setup_signal_stack_si(unsigned long stack_top, int sig, frame = (struct rt_sigframe __user *) round_down(stack_top - sizeof(struct rt_sigframe), 16) - 8; - frame = (struct rt_sigframe __user *) ((unsigned long) frame - 128); + frame = (struct rt_sigframe *) ((unsigned long) frame - 128); if (!access_ok(VERIFY_WRITE, fp, sizeof(struct _fpstate))) goto out; diff --git a/trunk/arch/um/sys-x86_64/syscalls.c b/trunk/arch/um/sys-x86_64/syscalls.c index 6fce9f45dfdc..6acee5c4ada6 100644 --- a/trunk/arch/um/sys-x86_64/syscalls.c +++ b/trunk/arch/um/sys-x86_64/syscalls.c @@ -45,7 +45,7 @@ static long arch_prctl_tt(int code, unsigned long addr) case ARCH_GET_GS: ret = arch_prctl(code, (unsigned long) &tmp); if(!ret) - ret = put_user(tmp, (long __user *)addr); + ret = put_user(tmp, &addr); break; default: ret = -EINVAL; diff --git a/trunk/block/cfq-iosched.c b/trunk/block/cfq-iosched.c index 8e9d84825e1c..11ce6aaf1bd0 100644 --- a/trunk/block/cfq-iosched.c +++ b/trunk/block/cfq-iosched.c @@ -133,7 +133,6 @@ struct cfq_data { mempool_t *crq_pool; int rq_in_driver; - int hw_tag; /* * schedule slice state info @@ -501,13 +500,10 @@ static void cfq_resort_rr_list(struct cfq_queue *cfqq, int preempted) /* * if queue was preempted, just add to front to be fair. busy_rr - * isn't sorted, but insert at the back for fairness. + * isn't sorted. */ if (preempted || list == &cfqd->busy_rr) { - if (preempted) - list = list->prev; - - list_add_tail(&cfqq->cfq_list, list); + list_add(&cfqq->cfq_list, list); return; } @@ -668,15 +664,6 @@ static void cfq_activate_request(request_queue_t *q, struct request *rq) struct cfq_data *cfqd = q->elevator->elevator_data; cfqd->rq_in_driver++; - - /* - * If the depth is larger 1, it really could be queueing. But lets - * make the mark a little higher - idling could still be good for - * low queueing, and a low queueing number could also just indicate - * a SCSI mid layer like behaviour where limit+1 is often seen. - */ - if (!cfqd->hw_tag && cfqd->rq_in_driver > 4) - cfqd->hw_tag = 1; } static void cfq_deactivate_request(request_queue_t *q, struct request *rq) @@ -891,13 +878,6 @@ static struct cfq_queue *cfq_set_active_queue(struct cfq_data *cfqd) if (!list_empty(&cfqd->cur_rr) || cfq_get_next_prio_level(cfqd) != -1) cfqq = list_entry_cfqq(cfqd->cur_rr.next); - /* - * If no new queues are available, check if the busy list has some - * before falling back to idle io. - */ - if (!cfqq && !list_empty(&cfqd->busy_rr)) - cfqq = list_entry_cfqq(cfqd->busy_rr.next); - /* * if we have idle queues and no rt or be queues had pending * requests, either allow immediate service if the grace period @@ -1478,8 +1458,7 @@ cfq_get_queue(struct cfq_data *cfqd, unsigned int key, struct task_struct *tsk, * set ->slice_left to allow preemption for a new process */ cfqq->slice_left = 2 * cfqd->cfq_slice_idle; - if (!cfqd->hw_tag) - cfq_mark_cfqq_idle_window(cfqq); + cfq_mark_cfqq_idle_window(cfqq); cfq_mark_cfqq_prio_changed(cfqq); cfq_init_prio_data(cfqq); } @@ -1670,7 +1649,7 @@ cfq_update_idle_window(struct cfq_data *cfqd, struct cfq_queue *cfqq, { int enable_idle = cfq_cfqq_idle_window(cfqq); - if (!cic->ioc->task || !cfqd->cfq_slice_idle || cfqd->hw_tag) + if (!cic->ioc->task || !cfqd->cfq_slice_idle) enable_idle = 0; else if (sample_valid(cic->ttime_samples)) { if (cic->ttime_mean > cfqd->cfq_slice_idle) @@ -1761,24 +1740,14 @@ cfq_crq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq, cfqq->next_crq = cfq_choose_req(cfqd, cfqq->next_crq, crq); - cic = crq->io_context; - /* * we never wait for an async request and we don't allow preemption * of an async request. so just return early */ - if (!cfq_crq_is_sync(crq)) { - /* - * sync process issued an async request, if it's waiting - * then expire it and kick rq handling. - */ - if (cic == cfqd->active_cic && - del_timer(&cfqd->idle_slice_timer)) { - cfq_slice_expired(cfqd, 0); - cfq_start_queueing(cfqd, cfqq); - } + if (!cfq_crq_is_sync(crq)) return; - } + + cic = crq->io_context; cfq_update_io_thinktime(cfqd, cic); cfq_update_io_seektime(cfqd, cic, crq); @@ -2196,9 +2165,10 @@ static void cfq_idle_class_timer(unsigned long data) * race with a non-idle queue, reset timer */ end = cfqd->last_end_request + CFQ_IDLE_GRACE; - if (!time_after_eq(jiffies, end)) - mod_timer(&cfqd->idle_class_timer, end); - else + if (!time_after_eq(jiffies, end)) { + cfqd->idle_class_timer.expires = end; + add_timer(&cfqd->idle_class_timer); + } else cfq_schedule_dispatch(cfqd); spin_unlock_irqrestore(cfqd->queue->queue_lock, flags); diff --git a/trunk/drivers/ieee1394/sbp2.c b/trunk/drivers/ieee1394/sbp2.c index 5413dc43b9f1..8a23fb54c693 100644 --- a/trunk/drivers/ieee1394/sbp2.c +++ b/trunk/drivers/ieee1394/sbp2.c @@ -845,7 +845,7 @@ static struct scsi_id_instance_data *sbp2_alloc_device(struct unit_directory *ud &sbp2_highlevel, ud->ne->host, &sbp2_ops, sizeof(struct sbp2_status_block), sizeof(quadlet_t), 0x010000000000ULL, CSR1212_ALL_SPACE_END); - if (scsi_id->status_fifo_addr == ~0ULL) { + if (!scsi_id->status_fifo_addr) { SBP2_ERR("failed to allocate status FIFO address range"); goto failed_alloc; } diff --git a/trunk/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/trunk/drivers/infiniband/ulp/ipoib/ipoib_ib.c index 8406839b91cf..a54da42849ae 100644 --- a/trunk/drivers/infiniband/ulp/ipoib/ipoib_ib.c +++ b/trunk/drivers/infiniband/ulp/ipoib/ipoib_ib.c @@ -275,7 +275,6 @@ static void ipoib_ib_handle_wc(struct net_device *dev, spin_lock_irqsave(&priv->tx_lock, flags); ++priv->tx_tail; if (netif_queue_stopped(dev) && - test_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags) && priv->tx_head - priv->tx_tail <= ipoib_sendq_size >> 1) netif_wake_queue(dev); spin_unlock_irqrestore(&priv->tx_lock, flags); diff --git a/trunk/drivers/message/fusion/mptbase.c b/trunk/drivers/message/fusion/mptbase.c index a30084076ac8..9080853fe283 100644 --- a/trunk/drivers/message/fusion/mptbase.c +++ b/trunk/drivers/message/fusion/mptbase.c @@ -1605,21 +1605,6 @@ mpt_resume(struct pci_dev *pdev) } #endif -static int -mpt_signal_reset(int index, MPT_ADAPTER *ioc, int reset_phase) -{ - if ((MptDriverClass[index] == MPTSPI_DRIVER && - ioc->bus_type != SPI) || - (MptDriverClass[index] == MPTFC_DRIVER && - ioc->bus_type != FC) || - (MptDriverClass[index] == MPTSAS_DRIVER && - ioc->bus_type != SAS)) - /* make sure we only call the relevant reset handler - * for the bus */ - return 0; - return (MptResetHandlers[index])(ioc, reset_phase); -} - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /* * mpt_do_ioc_recovery - Initialize or recover MPT adapter. @@ -1900,14 +1885,14 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag) if ((ret == 0) && MptResetHandlers[ii]) { dprintk((MYIOC_s_INFO_FMT "Calling IOC post_reset handler #%d\n", ioc->name, ii)); - rc += mpt_signal_reset(ii, ioc, MPT_IOC_POST_RESET); + rc += (*(MptResetHandlers[ii]))(ioc, MPT_IOC_POST_RESET); handlers++; } if (alt_ioc_ready && MptResetHandlers[ii]) { drsprintk((MYIOC_s_INFO_FMT "Calling alt-%s post_reset handler #%d\n", ioc->name, ioc->alt_ioc->name, ii)); - rc += mpt_signal_reset(ii, ioc->alt_ioc, MPT_IOC_POST_RESET); + rc += (*(MptResetHandlers[ii]))(ioc->alt_ioc, MPT_IOC_POST_RESET); handlers++; } } @@ -3282,11 +3267,11 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ignore, int sleepFlag) if (MptResetHandlers[ii]) { dprintk((MYIOC_s_INFO_FMT "Calling IOC pre_reset handler #%d\n", ioc->name, ii)); - r += mpt_signal_reset(ii, ioc, MPT_IOC_PRE_RESET); + r += (*(MptResetHandlers[ii]))(ioc, MPT_IOC_PRE_RESET); if (ioc->alt_ioc) { dprintk((MYIOC_s_INFO_FMT "Calling alt-%s pre_reset handler #%d\n", ioc->name, ioc->alt_ioc->name, ii)); - r += mpt_signal_reset(ii, ioc->alt_ioc, MPT_IOC_PRE_RESET); + r += (*(MptResetHandlers[ii]))(ioc->alt_ioc, MPT_IOC_PRE_RESET); } } } @@ -5721,11 +5706,11 @@ mpt_HardResetHandler(MPT_ADAPTER *ioc, int sleepFlag) if (MptResetHandlers[ii]) { dtmprintk((MYIOC_s_INFO_FMT "Calling IOC reset_setup handler #%d\n", ioc->name, ii)); - r += mpt_signal_reset(ii, ioc, MPT_IOC_SETUP_RESET); + r += (*(MptResetHandlers[ii]))(ioc, MPT_IOC_SETUP_RESET); if (ioc->alt_ioc) { dtmprintk((MYIOC_s_INFO_FMT "Calling alt-%s setup reset handler #%d\n", ioc->name, ioc->alt_ioc->name, ii)); - r += mpt_signal_reset(ii, ioc->alt_ioc, MPT_IOC_SETUP_RESET); + r += (*(MptResetHandlers[ii]))(ioc->alt_ioc, MPT_IOC_SETUP_RESET); } } } diff --git a/trunk/drivers/net/forcedeth.c b/trunk/drivers/net/forcedeth.c index feb5b223cd60..705e1229d89d 100644 --- a/trunk/drivers/net/forcedeth.c +++ b/trunk/drivers/net/forcedeth.c @@ -2615,18 +2615,6 @@ static int nv_nway_reset(struct net_device *dev) return ret; } -#ifdef NETIF_F_TSO -static int nv_set_tso(struct net_device *dev, u32 value) -{ - struct fe_priv *np = netdev_priv(dev); - - if ((np->driver_data & DEV_HAS_CHECKSUM)) - return ethtool_op_set_tso(dev, value); - else - return value ? -EOPNOTSUPP : 0; -} -#endif - static struct ethtool_ops ops = { .get_drvinfo = nv_get_drvinfo, .get_link = ethtool_op_get_link, @@ -2638,10 +2626,6 @@ static struct ethtool_ops ops = { .get_regs = nv_get_regs, .nway_reset = nv_nway_reset, .get_perm_addr = ethtool_op_get_perm_addr, -#ifdef NETIF_F_TSO - .get_tso = ethtool_op_get_tso, - .set_tso = nv_set_tso -#endif }; static void nv_vlan_rx_register(struct net_device *dev, struct vlan_group *grp) diff --git a/trunk/drivers/net/pcmcia/nmclan_cs.c b/trunk/drivers/net/pcmcia/nmclan_cs.c index a8f6bfc96fd2..4260c2128f47 100644 --- a/trunk/drivers/net/pcmcia/nmclan_cs.c +++ b/trunk/drivers/net/pcmcia/nmclan_cs.c @@ -1204,7 +1204,7 @@ static int mace_rx(struct net_device *dev, unsigned char RxCnt) dev->last_rx = jiffies; lp->linux_stats.rx_packets++; - lp->linux_stats.rx_bytes += pkt_len; + lp->linux_stats.rx_bytes += skb->len; outb(0xFF, ioaddr + AM2150_RCV_NEXT); /* skip to next frame */ continue; } else { diff --git a/trunk/drivers/pcmcia/ds.c b/trunk/drivers/pcmcia/ds.c index 48d3b3d30c21..74b3124e8247 100644 --- a/trunk/drivers/pcmcia/ds.c +++ b/trunk/drivers/pcmcia/ds.c @@ -1143,6 +1143,12 @@ static int ds_event(struct pcmcia_socket *skt, event_t event, int priority) { struct pcmcia_socket *s = pcmcia_get_socket(skt); + if (!s) { + printk(KERN_ERR "PCMCIA obtaining reference to socket %p " \ + "failed, event 0x%x lost!\n", skt, event); + return -ENODEV; + } + ds_dbg(1, "ds_event(0x%06x, %d, 0x%p)\n", event, priority, skt); diff --git a/trunk/drivers/rtc/rtc-m48t86.c b/trunk/drivers/rtc/rtc-m48t86.c index 8c0d1a6739ad..f6e7ee04f3dc 100644 --- a/trunk/drivers/rtc/rtc-m48t86.c +++ b/trunk/drivers/rtc/rtc-m48t86.c @@ -48,33 +48,33 @@ static int m48t86_rtc_read_time(struct device *dev, struct rtc_time *tm) struct platform_device *pdev = to_platform_device(dev); struct m48t86_ops *ops = pdev->dev.platform_data; - reg = ops->readbyte(M48T86_REG_B); + reg = ops->readb(M48T86_REG_B); if (reg & M48T86_REG_B_DM) { /* data (binary) mode */ - tm->tm_sec = ops->readbyte(M48T86_REG_SEC); - tm->tm_min = ops->readbyte(M48T86_REG_MIN); - tm->tm_hour = ops->readbyte(M48T86_REG_HOUR) & 0x3F; - tm->tm_mday = ops->readbyte(M48T86_REG_DOM); + tm->tm_sec = ops->readb(M48T86_REG_SEC); + tm->tm_min = ops->readb(M48T86_REG_MIN); + tm->tm_hour = ops->readb(M48T86_REG_HOUR) & 0x3F; + tm->tm_mday = ops->readb(M48T86_REG_DOM); /* tm_mon is 0-11 */ - tm->tm_mon = ops->readbyte(M48T86_REG_MONTH) - 1; - tm->tm_year = ops->readbyte(M48T86_REG_YEAR) + 100; - tm->tm_wday = ops->readbyte(M48T86_REG_DOW); + tm->tm_mon = ops->readb(M48T86_REG_MONTH) - 1; + tm->tm_year = ops->readb(M48T86_REG_YEAR) + 100; + tm->tm_wday = ops->readb(M48T86_REG_DOW); } else { /* bcd mode */ - tm->tm_sec = BCD2BIN(ops->readbyte(M48T86_REG_SEC)); - tm->tm_min = BCD2BIN(ops->readbyte(M48T86_REG_MIN)); - tm->tm_hour = BCD2BIN(ops->readbyte(M48T86_REG_HOUR) & 0x3F); - tm->tm_mday = BCD2BIN(ops->readbyte(M48T86_REG_DOM)); + tm->tm_sec = BCD2BIN(ops->readb(M48T86_REG_SEC)); + tm->tm_min = BCD2BIN(ops->readb(M48T86_REG_MIN)); + tm->tm_hour = BCD2BIN(ops->readb(M48T86_REG_HOUR) & 0x3F); + tm->tm_mday = BCD2BIN(ops->readb(M48T86_REG_DOM)); /* tm_mon is 0-11 */ - tm->tm_mon = BCD2BIN(ops->readbyte(M48T86_REG_MONTH)) - 1; - tm->tm_year = BCD2BIN(ops->readbyte(M48T86_REG_YEAR)) + 100; - tm->tm_wday = BCD2BIN(ops->readbyte(M48T86_REG_DOW)); + tm->tm_mon = BCD2BIN(ops->readb(M48T86_REG_MONTH)) - 1; + tm->tm_year = BCD2BIN(ops->readb(M48T86_REG_YEAR)) + 100; + tm->tm_wday = BCD2BIN(ops->readb(M48T86_REG_DOW)); } /* correct the hour if the clock is in 12h mode */ if (!(reg & M48T86_REG_B_H24)) - if (ops->readbyte(M48T86_REG_HOUR) & 0x80) + if (ops->readb(M48T86_REG_HOUR) & 0x80) tm->tm_hour += 12; return 0; @@ -86,35 +86,35 @@ static int m48t86_rtc_set_time(struct device *dev, struct rtc_time *tm) struct platform_device *pdev = to_platform_device(dev); struct m48t86_ops *ops = pdev->dev.platform_data; - reg = ops->readbyte(M48T86_REG_B); + reg = ops->readb(M48T86_REG_B); /* update flag and 24h mode */ reg |= M48T86_REG_B_SET | M48T86_REG_B_H24; - ops->writebyte(reg, M48T86_REG_B); + ops->writeb(reg, M48T86_REG_B); if (reg & M48T86_REG_B_DM) { /* data (binary) mode */ - ops->writebyte(tm->tm_sec, M48T86_REG_SEC); - ops->writebyte(tm->tm_min, M48T86_REG_MIN); - ops->writebyte(tm->tm_hour, M48T86_REG_HOUR); - ops->writebyte(tm->tm_mday, M48T86_REG_DOM); - ops->writebyte(tm->tm_mon + 1, M48T86_REG_MONTH); - ops->writebyte(tm->tm_year % 100, M48T86_REG_YEAR); - ops->writebyte(tm->tm_wday, M48T86_REG_DOW); + ops->writeb(tm->tm_sec, M48T86_REG_SEC); + ops->writeb(tm->tm_min, M48T86_REG_MIN); + ops->writeb(tm->tm_hour, M48T86_REG_HOUR); + ops->writeb(tm->tm_mday, M48T86_REG_DOM); + ops->writeb(tm->tm_mon + 1, M48T86_REG_MONTH); + ops->writeb(tm->tm_year % 100, M48T86_REG_YEAR); + ops->writeb(tm->tm_wday, M48T86_REG_DOW); } else { /* bcd mode */ - ops->writebyte(BIN2BCD(tm->tm_sec), M48T86_REG_SEC); - ops->writebyte(BIN2BCD(tm->tm_min), M48T86_REG_MIN); - ops->writebyte(BIN2BCD(tm->tm_hour), M48T86_REG_HOUR); - ops->writebyte(BIN2BCD(tm->tm_mday), M48T86_REG_DOM); - ops->writebyte(BIN2BCD(tm->tm_mon + 1), M48T86_REG_MONTH); - ops->writebyte(BIN2BCD(tm->tm_year % 100), M48T86_REG_YEAR); - ops->writebyte(BIN2BCD(tm->tm_wday), M48T86_REG_DOW); + ops->writeb(BIN2BCD(tm->tm_sec), M48T86_REG_SEC); + ops->writeb(BIN2BCD(tm->tm_min), M48T86_REG_MIN); + ops->writeb(BIN2BCD(tm->tm_hour), M48T86_REG_HOUR); + ops->writeb(BIN2BCD(tm->tm_mday), M48T86_REG_DOM); + ops->writeb(BIN2BCD(tm->tm_mon + 1), M48T86_REG_MONTH); + ops->writeb(BIN2BCD(tm->tm_year % 100), M48T86_REG_YEAR); + ops->writeb(BIN2BCD(tm->tm_wday), M48T86_REG_DOW); } /* update ended */ reg &= ~M48T86_REG_B_SET; - ops->writebyte(reg, M48T86_REG_B); + ops->writeb(reg, M48T86_REG_B); return 0; } @@ -125,12 +125,12 @@ static int m48t86_rtc_proc(struct device *dev, struct seq_file *seq) struct platform_device *pdev = to_platform_device(dev); struct m48t86_ops *ops = pdev->dev.platform_data; - reg = ops->readbyte(M48T86_REG_B); + reg = ops->readb(M48T86_REG_B); seq_printf(seq, "mode\t\t: %s\n", (reg & M48T86_REG_B_DM) ? "binary" : "bcd"); - reg = ops->readbyte(M48T86_REG_D); + reg = ops->readb(M48T86_REG_D); seq_printf(seq, "battery\t\t: %s\n", (reg & M48T86_REG_D_VRT) ? "ok" : "exhausted"); @@ -157,7 +157,7 @@ static int __devinit m48t86_rtc_probe(struct platform_device *dev) platform_set_drvdata(dev, rtc); /* read battery status */ - reg = ops->readbyte(M48T86_REG_D); + reg = ops->readb(M48T86_REG_D); dev_info(&dev->dev, "battery %s\n", (reg & M48T86_REG_D_VRT) ? "ok" : "exhausted"); diff --git a/trunk/drivers/s390/cio/css.h b/trunk/drivers/s390/cio/css.h index e210f89a2449..74a257b23383 100644 --- a/trunk/drivers/s390/cio/css.h +++ b/trunk/drivers/s390/cio/css.h @@ -45,11 +45,11 @@ struct pgid { union { __u8 fc; /* SPID function code */ struct path_state ps; /* SNID path state */ - } __attribute__ ((packed)) inf; + } inf; union { __u32 cpu_addr : 16; /* CPU address */ struct extended_cssid ext_cssid; - } __attribute__ ((packed)) pgid_high; + } pgid_high; __u32 cpu_id : 24; /* CPU identification */ __u32 cpu_model : 16; /* CPU model */ __u32 tod_high; /* high word TOD clock */ diff --git a/trunk/drivers/s390/cio/device_fsm.c b/trunk/drivers/s390/cio/device_fsm.c index 49ec562d7f60..180b3bf8b90d 100644 --- a/trunk/drivers/s390/cio/device_fsm.c +++ b/trunk/drivers/s390/cio/device_fsm.c @@ -749,7 +749,7 @@ ccw_device_irq(struct ccw_device *cdev, enum dev_event dev_event) /* Unit check but no sense data. Need basic sense. */ if (ccw_device_do_sense(cdev, irb) != 0) goto call_handler_unsol; - memcpy(&cdev->private->irb, irb, sizeof(struct irb)); + memcpy(irb, &cdev->private->irb, sizeof(struct irb)); cdev->private->state = DEV_STATE_W4SENSE; cdev->private->intparm = 0; return; diff --git a/trunk/drivers/scsi/ppa.c b/trunk/drivers/scsi/ppa.c index 108910f512e4..fee843fab1c7 100644 --- a/trunk/drivers/scsi/ppa.c +++ b/trunk/drivers/scsi/ppa.c @@ -982,12 +982,6 @@ static int device_check(ppa_struct *dev) return -ENODEV; } -static int ppa_adjust_queue(struct scsi_device *device) -{ - blk_queue_bounce_limit(device->request_queue, BLK_BOUNCE_HIGH); - return 0; -} - static struct scsi_host_template ppa_template = { .module = THIS_MODULE, .proc_name = "ppa", @@ -1003,7 +997,6 @@ static struct scsi_host_template ppa_template = { .cmd_per_lun = 1, .use_clustering = ENABLE_CLUSTERING, .can_queue = 1, - .slave_alloc = ppa_adjust_queue, }; /*************************************************************************** diff --git a/trunk/drivers/scsi/sata_sil24.c b/trunk/drivers/scsi/sata_sil24.c index cb9082fd7e2f..f7264fd611c2 100644 --- a/trunk/drivers/scsi/sata_sil24.c +++ b/trunk/drivers/scsi/sata_sil24.c @@ -454,7 +454,7 @@ static int sil24_softreset(struct ata_port *ap, int verbose, */ msleep(10); - prb->ctrl = cpu_to_le16(PRB_CTRL_SRST); + prb->ctrl = PRB_CTRL_SRST; prb->fis[1] = 0; /* no PM yet */ writel((u32)paddr, port + PORT_CMD_ACTIVATE); @@ -551,9 +551,9 @@ static void sil24_qc_prep(struct ata_queued_cmd *qc) if (qc->tf.protocol != ATA_PROT_ATAPI_NODATA) { if (qc->tf.flags & ATA_TFLAG_WRITE) - prb->ctrl = cpu_to_le16(PRB_CTRL_PACKET_WRITE); + prb->ctrl = PRB_CTRL_PACKET_WRITE; else - prb->ctrl = cpu_to_le16(PRB_CTRL_PACKET_READ); + prb->ctrl = PRB_CTRL_PACKET_READ; } else prb->ctrl = 0; diff --git a/trunk/drivers/scsi/scsi_devinfo.c b/trunk/drivers/scsi/scsi_devinfo.c index 62f8cb7b3d2b..941c1e15c899 100644 --- a/trunk/drivers/scsi/scsi_devinfo.c +++ b/trunk/drivers/scsi/scsi_devinfo.c @@ -165,7 +165,6 @@ static struct { {"HP", "HSV100", NULL, BLIST_REPORTLUN2 | BLIST_NOSTARTONADD}, {"HP", "C1557A", NULL, BLIST_FORCELUN}, {"HP", "C3323-300", "4269", BLIST_NOTQ}, - {"HP", "C5713A", NULL, BLIST_NOREPORTLUN}, {"IBM", "AuSaV1S2", NULL, BLIST_FORCELUN}, {"IBM", "ProFibre 4000R", "*", BLIST_SPARSELUN | BLIST_LARGELUN}, {"IBM", "2105", NULL, BLIST_RETRY_HWERROR}, diff --git a/trunk/drivers/scsi/scsi_lib.c b/trunk/drivers/scsi/scsi_lib.c index faee4757c03a..764a8b375ead 100644 --- a/trunk/drivers/scsi/scsi_lib.c +++ b/trunk/drivers/scsi/scsi_lib.c @@ -367,7 +367,7 @@ static int scsi_req_map_sg(struct request *rq, struct scatterlist *sgl, int nsegs, unsigned bufflen, gfp_t gfp) { struct request_queue *q = rq->q; - int nr_pages = (bufflen + sgl[0].offset + PAGE_SIZE - 1) >> PAGE_SHIFT; + int nr_pages = (bufflen + PAGE_SIZE - 1) >> PAGE_SHIFT; unsigned int data_len = 0, len, bytes, off; struct page *page; struct bio *bio = NULL; diff --git a/trunk/drivers/scsi/scsi_transport_sas.c b/trunk/drivers/scsi/scsi_transport_sas.c index f3b16066387c..8b6d65e21bae 100644 --- a/trunk/drivers/scsi/scsi_transport_sas.c +++ b/trunk/drivers/scsi/scsi_transport_sas.c @@ -955,8 +955,7 @@ static int sas_user_scan(struct Scsi_Host *shost, uint channel, list_for_each_entry(rphy, &sas_host->rphy_list, list) { struct sas_phy *parent = dev_to_phy(rphy->dev.parent); - if (rphy->identify.device_type != SAS_END_DEVICE || - rphy->scsi_target_id == -1) + if (rphy->scsi_target_id == -1) continue; if ((channel == SCAN_WILD_CARD || channel == parent->port_identifier) && @@ -978,6 +977,7 @@ static int sas_user_scan(struct Scsi_Host *shost, uint channel, #define SETUP_TEMPLATE(attrb, field, perm, test) \ i->private_##attrb[count] = class_device_attr_##field; \ i->private_##attrb[count].attr.mode = perm; \ + i->private_##attrb[count].store = NULL; \ i->attrb[count] = &i->private_##attrb[count]; \ if (test) \ count++ diff --git a/trunk/fs/namei.c b/trunk/fs/namei.c index d6e2ee251736..96723ae83c89 100644 --- a/trunk/fs/namei.c +++ b/trunk/fs/namei.c @@ -1080,8 +1080,8 @@ static int fastcall do_path_lookup(int dfd, const char *name, nd->flags = flags; nd->depth = 0; + read_lock(¤t->fs->lock); if (*name=='/') { - read_lock(¤t->fs->lock); if (current->fs->altroot && !(nd->flags & LOOKUP_NOALT)) { nd->mnt = mntget(current->fs->altrootmnt); nd->dentry = dget(current->fs->altroot); @@ -1092,35 +1092,33 @@ static int fastcall do_path_lookup(int dfd, const char *name, } nd->mnt = mntget(current->fs->rootmnt); nd->dentry = dget(current->fs->root); - read_unlock(¤t->fs->lock); } else if (dfd == AT_FDCWD) { - read_lock(¤t->fs->lock); nd->mnt = mntget(current->fs->pwdmnt); nd->dentry = dget(current->fs->pwd); - read_unlock(¤t->fs->lock); } else { struct dentry *dentry; file = fget_light(dfd, &fput_needed); retval = -EBADF; if (!file) - goto out_fail; + goto unlock_fail; dentry = file->f_dentry; retval = -ENOTDIR; if (!S_ISDIR(dentry->d_inode->i_mode)) - goto fput_fail; + goto fput_unlock_fail; retval = file_permission(file, MAY_EXEC); if (retval) - goto fput_fail; + goto fput_unlock_fail; nd->mnt = mntget(file->f_vfsmnt); nd->dentry = dget(dentry); fput_light(file, fput_needed); } + read_unlock(¤t->fs->lock); current->total_link_count = 0; retval = link_path_walk(name, nd); out: @@ -1129,12 +1127,13 @@ static int fastcall do_path_lookup(int dfd, const char *name, nd->dentry->d_inode)) audit_inode(name, nd->dentry->d_inode, flags); } -out_fail: return retval; -fput_fail: +fput_unlock_fail: fput_light(file, fput_needed); - goto out_fail; +unlock_fail: + read_unlock(¤t->fs->lock); + return retval; } int fastcall path_lookup(const char *name, unsigned int flags, diff --git a/trunk/include/asm-alpha/smp.h b/trunk/include/asm-alpha/smp.h index e1432102be05..9950706abdf8 100644 --- a/trunk/include/asm-alpha/smp.h +++ b/trunk/include/asm-alpha/smp.h @@ -45,8 +45,10 @@ extern struct cpuinfo_alpha cpu_data[NR_CPUS]; #define hard_smp_processor_id() __hard_smp_processor_id() #define raw_smp_processor_id() (current_thread_info()->cpu) +extern cpumask_t cpu_present_mask; +extern cpumask_t cpu_online_map; extern int smp_num_cpus; -#define cpu_possible_map cpu_present_map +#define cpu_possible_map cpu_present_mask int smp_call_function_on_cpu(void (*func) (void *info), void *info,int retry, int wait, cpumask_t cpu); diff --git a/trunk/include/asm-arm/arch-ixp23xx/memory.h b/trunk/include/asm-arm/arch-ixp23xx/memory.h index c85fc06a043c..6e19f46d54d1 100644 --- a/trunk/include/asm-arm/arch-ixp23xx/memory.h +++ b/trunk/include/asm-arm/arch-ixp23xx/memory.h @@ -49,7 +49,7 @@ static inline int __ixp23xx_arch_is_coherent(void) { extern unsigned int processor_id; - if (((processor_id & 15) >= 4) || machine_is_roadrunner()) + if (((processor_id & 15) >= 2) || machine_is_roadrunner()) return 1; return 0; diff --git a/trunk/include/asm-generic/pgtable.h b/trunk/include/asm-generic/pgtable.h index c2059a3a0621..358e4d309ceb 100644 --- a/trunk/include/asm-generic/pgtable.h +++ b/trunk/include/asm-generic/pgtable.h @@ -159,8 +159,17 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addres #define lazy_mmu_prot_update(pte) do { } while (0) #endif -#ifndef __HAVE_ARCH_MOVE_PTE +#ifndef __HAVE_ARCH_MULTIPLE_ZERO_PAGE #define move_pte(pte, prot, old_addr, new_addr) (pte) +#else +#define move_pte(pte, prot, old_addr, new_addr) \ +({ \ + pte_t newpte = (pte); \ + if (pte_present(pte) && pfn_valid(pte_pfn(pte)) && \ + pte_page(pte) == ZERO_PAGE(old_addr)) \ + newpte = mk_pte(ZERO_PAGE(new_addr), (prot)); \ + newpte; \ +}) #endif /* diff --git a/trunk/include/asm-mips/pgtable.h b/trunk/include/asm-mips/pgtable.h index f80fe75c7800..174a3cda8c26 100644 --- a/trunk/include/asm-mips/pgtable.h +++ b/trunk/include/asm-mips/pgtable.h @@ -70,15 +70,7 @@ extern unsigned long zero_page_mask; #define ZERO_PAGE(vaddr) \ (virt_to_page(empty_zero_page + (((unsigned long)(vaddr)) & zero_page_mask))) -#define __HAVE_ARCH_MOVE_PTE -#define move_pte(pte, prot, old_addr, new_addr) \ -({ \ - pte_t newpte = (pte); \ - if (pte_present(pte) && pfn_valid(pte_pfn(pte)) && \ - pte_page(pte) == ZERO_PAGE(old_addr)) \ - newpte = mk_pte(ZERO_PAGE(new_addr), (prot)); \ - newpte; \ -}) +#define __HAVE_ARCH_MULTIPLE_ZERO_PAGE extern void paging_init(void); diff --git a/trunk/include/asm-s390/lowcore.h b/trunk/include/asm-s390/lowcore.h index bea727904287..db0606c1abd4 100644 --- a/trunk/include/asm-s390/lowcore.h +++ b/trunk/include/asm-s390/lowcore.h @@ -98,8 +98,8 @@ #define __LC_KERNEL_ASCE 0xD58 #define __LC_USER_ASCE 0xD60 #define __LC_PANIC_STACK 0xD68 -#define __LC_CPUID 0xD80 -#define __LC_CPUADDR 0xD88 +#define __LC_CPUID 0xD90 +#define __LC_CPUADDR 0xD98 #define __LC_IPLDEV 0xDB8 #define __LC_JIFFY_TIMER 0xDC0 #define __LC_CURRENT 0xDD8 diff --git a/trunk/include/asm-sparc64/pgtable.h b/trunk/include/asm-sparc64/pgtable.h index cd464f469a2c..c44e7466534e 100644 --- a/trunk/include/asm-sparc64/pgtable.h +++ b/trunk/include/asm-sparc64/pgtable.h @@ -689,23 +689,6 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *p #define pte_clear(mm,addr,ptep) \ set_pte_at((mm), (addr), (ptep), __pte(0UL)) -#ifdef DCACHE_ALIASING_POSSIBLE -#define __HAVE_ARCH_MOVE_PTE -#define move_pte(pte, prot, old_addr, new_addr) \ -({ \ - pte_t newpte = (pte); \ - if (tlb_type != hypervisor && pte_present(pte)) { \ - unsigned long this_pfn = pte_pfn(pte); \ - \ - if (pfn_valid(this_pfn) && \ - (((old_addr) ^ (new_addr)) & (1 << 13))) \ - flush_dcache_page_all(current->mm, \ - pfn_to_page(this_pfn)); \ - } \ - newpte; \ -}) -#endif - extern pgd_t swapper_pg_dir[2048]; extern pmd_t swapper_low_pmd_dir[2048]; diff --git a/trunk/include/asm-um/irqflags.h b/trunk/include/asm-um/irqflags.h deleted file mode 100644 index 659b9abdfdba..000000000000 --- a/trunk/include/asm-um/irqflags.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __UM_IRQFLAGS_H -#define __UM_IRQFLAGS_H - -/* Empty for now */ - -#endif diff --git a/trunk/include/asm-um/uaccess.h b/trunk/include/asm-um/uaccess.h index 16c734af9193..bea5a015f667 100644 --- a/trunk/include/asm-um/uaccess.h +++ b/trunk/include/asm-um/uaccess.h @@ -41,11 +41,11 @@ #define __get_user(x, ptr) \ ({ \ - const __typeof__(*(ptr)) __user *__private_ptr = (ptr); \ + const __typeof__(ptr) __private_ptr = ptr; \ __typeof__(x) __private_val; \ int __private_ret = -EFAULT; \ (x) = (__typeof__(*(__private_ptr)))0; \ - if (__copy_from_user((__force void *)&__private_val, (__private_ptr),\ + if (__copy_from_user((void *) &__private_val, (__private_ptr), \ sizeof(*(__private_ptr))) == 0) { \ (x) = (__typeof__(*(__private_ptr))) __private_val; \ __private_ret = 0; \ @@ -62,7 +62,7 @@ #define __put_user(x, ptr) \ ({ \ - __typeof__(*(ptr)) __user *__private_ptr = ptr; \ + __typeof__(ptr) __private_ptr = ptr; \ __typeof__(*(__private_ptr)) __private_val; \ int __private_ret = -EFAULT; \ __private_val = (__typeof__(*(__private_ptr))) (x); \ diff --git a/trunk/include/linux/m48t86.h b/trunk/include/linux/m48t86.h index 915d6b4f0f89..9065199319d0 100644 --- a/trunk/include/linux/m48t86.h +++ b/trunk/include/linux/m48t86.h @@ -11,6 +11,6 @@ struct m48t86_ops { - void (*writebyte)(unsigned char value, unsigned long addr); - unsigned char (*readbyte)(unsigned long addr); + void (*writeb)(unsigned char value, unsigned long addr); + unsigned char (*readb)(unsigned long addr); }; diff --git a/trunk/include/linux/mmzone.h b/trunk/include/linux/mmzone.h index 2d8337150493..36740354d4db 100644 --- a/trunk/include/linux/mmzone.h +++ b/trunk/include/linux/mmzone.h @@ -15,7 +15,6 @@ #include #include #include -#include /* Free memory management - zoned buddy allocator. */ #ifndef CONFIG_FORCE_MAX_ZONEORDER diff --git a/trunk/mm/slab.c b/trunk/mm/slab.c index f1b644eb39d8..d31a06bfbea5 100644 --- a/trunk/mm/slab.c +++ b/trunk/mm/slab.c @@ -207,6 +207,11 @@ typedef unsigned int kmem_bufctl_t; #define BUFCTL_ACTIVE (((kmem_bufctl_t)(~0U))-2) #define SLAB_LIMIT (((kmem_bufctl_t)(~0U))-3) +/* Max number of objs-per-slab for caches which use off-slab slabs. + * Needed to avoid a possible looping condition in cache_grow(). + */ +static unsigned long offslab_limit; + /* * struct slab * @@ -1351,6 +1356,12 @@ void __init kmem_cache_init(void) NULL, NULL); } + /* Inc off-slab bufctl limit until the ceiling is hit. */ + if (!(OFF_SLAB(sizes->cs_cachep))) { + offslab_limit = sizes->cs_size - sizeof(struct slab); + offslab_limit /= sizeof(kmem_bufctl_t); + } + sizes->cs_dmacachep = kmem_cache_create(names->name_dma, sizes->cs_size, ARCH_KMALLOC_MINALIGN, @@ -1769,7 +1780,6 @@ static void set_up_list3s(struct kmem_cache *cachep, int index) static size_t calculate_slab_order(struct kmem_cache *cachep, size_t size, size_t align, unsigned long flags) { - unsigned long offslab_limit; size_t left_over = 0; int gfporder; @@ -1781,18 +1791,9 @@ static size_t calculate_slab_order(struct kmem_cache *cachep, if (!num) continue; - if (flags & CFLGS_OFF_SLAB) { - /* - * Max number of objs-per-slab for caches which - * use off-slab slabs. Needed to avoid a possible - * looping condition in cache_grow(). - */ - offslab_limit = size - sizeof(struct slab); - offslab_limit /= sizeof(kmem_bufctl_t); - - if (num > offslab_limit) - break; - } + /* More than offslab_limit objects will cause problems */ + if ((flags & CFLGS_OFF_SLAB) && num > offslab_limit) + break; /* Found something acceptable - save it away */ cachep->num = num; diff --git a/trunk/net/ipv4/tcp_highspeed.c b/trunk/net/ipv4/tcp_highspeed.c index ba7c63ca5bb1..b72fa55dfb84 100644 --- a/trunk/net/ipv4/tcp_highspeed.c +++ b/trunk/net/ipv4/tcp_highspeed.c @@ -135,8 +135,7 @@ static void hstcp_cong_avoid(struct sock *sk, u32 adk, u32 rtt, /* Do additive increase */ if (tp->snd_cwnd < tp->snd_cwnd_clamp) { - /* cwnd = cwnd + a(w) / cwnd */ - tp->snd_cwnd_cnt += ca->ai + 1; + tp->snd_cwnd_cnt += ca->ai; if (tp->snd_cwnd_cnt >= tp->snd_cwnd) { tp->snd_cwnd_cnt -= tp->snd_cwnd; tp->snd_cwnd++; diff --git a/trunk/security/selinux/hooks.c b/trunk/security/selinux/hooks.c index 90b4cdc0c948..21dad415b896 100644 --- a/trunk/security/selinux/hooks.c +++ b/trunk/security/selinux/hooks.c @@ -4422,7 +4422,6 @@ void selinux_complete_init(void) /* Set up any superblocks initialized prior to the policy load. */ printk(KERN_INFO "SELinux: Setting up existing superblocks.\n"); - spin_lock(&sb_lock); spin_lock(&sb_security_lock); next_sb: if (!list_empty(&superblock_security_head)) { @@ -4431,20 +4430,19 @@ void selinux_complete_init(void) struct superblock_security_struct, list); struct super_block *sb = sbsec->sb; + spin_lock(&sb_lock); sb->s_count++; - spin_unlock(&sb_security_lock); spin_unlock(&sb_lock); + spin_unlock(&sb_security_lock); down_read(&sb->s_umount); if (sb->s_root) superblock_doinit(sb, NULL); drop_super(sb); - spin_lock(&sb_lock); spin_lock(&sb_security_lock); list_del_init(&sbsec->list); goto next_sb; } spin_unlock(&sb_security_lock); - spin_unlock(&sb_lock); } /* SELinux requires early initialization in order to label