diff --git a/[refs] b/[refs] index 1634a4b1622e..759bd95d23f1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a98fdcef941e107eeabae622d85a1f476f25a160 +refs/heads/master: 3e39752d5367f9087e058abe768708165e1ec373 diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index 2340cfb1e25d..92aa0a7e58ea 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -665,18 +665,12 @@ S: Maintained ATMEL AT91 MCI DRIVER P: Nicolas Ferre -M: nicolas.ferre@atmel.com +M: nicolas.ferre@rfo.atmel.com L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) W: http://www.atmel.com/products/AT91/ W: http://www.at91.com/ S: Maintained -ATMEL LCDFB DRIVER -P: Nicolas Ferre -M: nicolas.ferre@atmel.com -L: linux-fbdev-devel@lists.sourceforge.net (subscribers-only) -S: Maintained - ATMEL MACB ETHERNET DRIVER P: Haavard Skinnemoen M: hskinnemoen@atmel.com diff --git a/trunk/arch/cris/arch-v10/drivers/ds1302.c b/trunk/arch/cris/arch-v10/drivers/ds1302.c index 1d1936a18133..88eff7f54ea6 100644 --- a/trunk/arch/cris/arch-v10/drivers/ds1302.c +++ b/trunk/arch/cris/arch-v10/drivers/ds1302.c @@ -6,9 +6,136 @@ *! *! Functions exported: ds1302_readreg, ds1302_writereg, ds1302_init *! +*! $Log: ds1302.c,v $ +*! Revision 1.18 2005/01/24 09:11:26 mikaelam +*! Minor changes to get DS1302 RTC chip driver to work +*! +*! Revision 1.17 2005/01/05 06:11:22 starvik +*! No need to do local_irq_disable after local_irq_save. +*! +*! Revision 1.16 2004/12/13 12:21:52 starvik +*! Added I/O and DMA allocators from Linux 2.4 +*! +*! Revision 1.14 2004/08/24 06:48:43 starvik +*! Whitespace cleanup +*! +*! Revision 1.13 2004/05/28 09:26:59 starvik +*! Modified I2C initialization to work in 2.6. +*! +*! Revision 1.12 2004/05/14 07:58:03 starvik +*! Merge of changes from 2.4 +*! +*! Revision 1.10 2004/02/04 09:25:12 starvik +*! Merge of Linux 2.6.2 +*! +*! Revision 1.9 2003/07/04 08:27:37 starvik +*! Merge of Linux 2.5.74 +*! +*! Revision 1.8 2003/04/09 05:20:47 starvik +*! Merge of Linux 2.5.67 +*! +*! Revision 1.6 2003/01/09 14:42:51 starvik +*! Merge of Linux 2.5.55 +*! +*! Revision 1.4 2002/12/11 13:13:57 starvik +*! Added arch/ to v10 specific includes +*! Added fix from Linux 2.4 in serial.c (flush_to_flip_buffer) +*! +*! Revision 1.3 2002/11/20 11:56:10 starvik +*! Merge of Linux 2.5.48 +*! +*! Revision 1.2 2002/11/18 13:16:06 starvik +*! Linux 2.5 port of latest 2.4 drivers +*! +*! Revision 1.15 2002/10/11 16:14:33 johana +*! Added CONFIG_ETRAX_DS1302_TRICKLE_CHARGE and initial setting of the +*! trcklecharge register. +*! +*! Revision 1.14 2002/10/10 12:15:38 magnusmn +*! Added support for having the RST signal on bit g0 +*! +*! Revision 1.13 2002/05/29 15:16:08 johana +*! Removed unused variables. +*! +*! Revision 1.12 2002/04/10 15:35:25 johana +*! Moved probe function closer to init function and marked it __init. +*! +*! Revision 1.11 2001/06/14 12:35:52 jonashg +*! The ATA hack is back. It is unfortunately the only way to set g27 to output. +*! +*! Revision 1.9 2001/06/14 10:00:14 jonashg +*! No need for tempudelay to be inline anymore (had to adjust the usec to +*! loops conversion because of this to make it slow enough to be a udelay). +*! +*! Revision 1.8 2001/06/14 08:06:32 jonashg +*! Made tempudelay delay usecs (well, just a tad more). +*! +*! Revision 1.7 2001/06/13 14:18:11 jonashg +*! Only allow processes with SYS_TIME capability to set time and charge. +*! +*! Revision 1.6 2001/06/12 15:22:07 jonashg +*! * Made init function __init. +*! * Parameter to out_byte() is unsigned char. +*! * The magic number 42 has got a name. +*! * Removed comment about /proc (nothing is exported there). +*! +*! Revision 1.5 2001/06/12 14:35:13 jonashg +*! Gave the module a name and added it to printk's. +*! +*! Revision 1.4 2001/05/31 14:53:40 jonashg +*! Made tempudelay() inline so that the watchdog doesn't reset (see +*! function comment). +*! +*! Revision 1.3 2001/03/26 16:03:06 bjornw +*! Needs linux/config.h +*! +*! Revision 1.2 2001/03/20 19:42:00 bjornw +*! Use the ETRAX prefix on the DS1302 options +*! +*! Revision 1.1 2001/03/20 09:13:50 magnusmn +*! Linux 2.4 port +*! +*! Revision 1.10 2000/07/05 15:38:23 bjornw +*! Dont update kernel time when a RTC_SET_TIME is done +*! +*! Revision 1.9 2000/03/02 15:42:59 macce +*! * Hack to make RTC work on all 2100/2400 +*! +*! Revision 1.8 2000/02/23 16:59:18 torbjore +*! added setup of R_GEN_CONFIG when RTC is connected to the generic port. +*! +*! Revision 1.7 2000/01/17 15:51:43 johana +*! Added RTC_SET_CHARGE ioctl to enable trickle charger. +*! +*! Revision 1.6 1999/10/27 13:19:47 bjornw +*! Added update_xtime_from_cmos which reads back the updated RTC into the kernel. +*! /dev/rtc calls it now. +*! +*! Revision 1.5 1999/10/27 12:39:37 bjornw +*! Disabled superuser check. Anyone can now set the time. +*! +*! Revision 1.4 1999/09/02 13:27:46 pkj +*! Added shadow for R_PORT_PB_CONFIG. +*! Renamed port_g_shadow to port_g_data_shadow. +*! +*! Revision 1.3 1999/09/02 08:28:06 pkj +*! Made it possible to select either port PB or the generic port for the RST +*! signal line to the DS1302 RTC. +*! Also make sure the RST bit is configured as output on Port PB (if used). +*! +*! Revision 1.2 1999/09/01 14:47:20 bjornw +*! Added support for /dev/rtc operations with ioctl RD_TIME and SET_TIME to read +*! and set the date. Register as major 121. +*! +*! Revision 1.1 1999/09/01 09:45:29 bjornw +*! Implemented a DS1302 RTC driver. +*! +*! *! --------------------------------------------------------------------------- *! -*! (C) Copyright 1999-2007 Axis Communications AB, LUND, SWEDEN +*! (C) Copyright 1999, 2000, 2001, 2002, 2003, 2004 Axis Communications AB, LUND, SWEDEN +*! +*! $Id: ds1302.c,v 1.18 2005/01/24 09:11:26 mikaelam Exp $ *! *!***************************************************************************/ @@ -29,8 +156,6 @@ #include #include -#include "i2c.h" - #define RTC_MAJOR_NR 121 /* local major, change later */ static const char ds1302_name[] = "ds1302"; diff --git a/trunk/arch/cris/arch-v10/kernel/signal.c b/trunk/arch/cris/arch-v10/kernel/signal.c index b6be705c2a3e..41d4a5f93284 100644 --- a/trunk/arch/cris/arch-v10/kernel/signal.c +++ b/trunk/arch/cris/arch-v10/kernel/signal.c @@ -7,7 +7,7 @@ * * Ideas also taken from arch/arm. * - * Copyright (C) 2000-2007 Axis Communications AB + * Copyright (C) 2000, 2001 Axis Communications AB * * Authors: Bjorn Wesen (bjornw@axis.com) * @@ -40,30 +40,84 @@ */ #define RESTART_CRIS_SYS(regs) regs->r10 = regs->orig_r10; regs->irp -= 2; -void do_signal(int canrestart, struct pt_regs *regs); +int do_signal(int canrestart, sigset_t *oldset, struct pt_regs *regs); /* - * Atomically swap in the new signal mask, and wait for a signal. Define + * Atomically swap in the new signal mask, and wait for a signal. Define * dummy arguments to be able to reach the regs argument. (Note that this * arrangement relies on old_sigset_t occupying one register.) */ -int sys_sigsuspend(old_sigset_t mask, long r11, long r12, long r13, long mof, - long srp, struct pt_regs *regs) +int +sys_sigsuspend(old_sigset_t mask, long r11, long r12, long r13, long mof, + long srp, struct pt_regs *regs) { + sigset_t saveset; + mask &= _BLOCKABLE; spin_lock_irq(¤t->sighand->siglock); - current->saved_sigmask = current->blocked; + saveset = current->blocked; siginitset(¤t->blocked, mask); recalc_sigpending(); spin_unlock_irq(¤t->sighand->siglock); - current->state = TASK_INTERRUPTIBLE; - schedule(); - set_thread_flag(TIF_RESTORE_SIGMASK); - return -ERESTARTNOHAND; + + regs->r10 = -EINTR; + while (1) { + current->state = TASK_INTERRUPTIBLE; + schedule(); + if (do_signal(0, &saveset, regs)) + /* We will get here twice: once to call the signal + handler, then again to return from the + sigsuspend system call. When calling the + signal handler, R10 holds the signal number as + set through do_signal. The sigsuspend call + will return with the restored value set above; + always -EINTR. */ + return regs->r10; + } } -int sys_sigaction(int sig, const struct old_sigaction __user *act, - struct old_sigaction *oact) +/* Define dummy arguments to be able to reach the regs argument. (Note that + * this arrangement relies on size_t occupying one register.) + */ +int +sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize, long r12, long r13, + long mof, long srp, struct pt_regs *regs) +{ + sigset_t saveset, newset; + + /* XXX: Don't preclude handling different sized sigset_t's. */ + if (sigsetsize != sizeof(sigset_t)) + return -EINVAL; + + if (copy_from_user(&newset, unewset, sizeof(newset))) + return -EFAULT; + sigdelsetmask(&newset, ~_BLOCKABLE); + + spin_lock_irq(¤t->sighand->siglock); + saveset = current->blocked; + current->blocked = newset; + recalc_sigpending(); + spin_unlock_irq(¤t->sighand->siglock); + + regs->r10 = -EINTR; + while (1) { + current->state = TASK_INTERRUPTIBLE; + schedule(); + if (do_signal(0, &saveset, regs)) + /* We will get here twice: once to call the signal + handler, then again to return from the + sigsuspend system call. When calling the + signal handler, R10 holds the signal number as + set through do_signal. The sigsuspend call + will return with the restored value set above; + always -EINTR. */ + return regs->r10; + } +} + +int +sys_sigaction(int sig, const struct old_sigaction __user *act, + struct old_sigaction *oact) { struct k_sigaction new_ka, old_ka; int ret; @@ -93,7 +147,8 @@ int sys_sigaction(int sig, const struct old_sigaction __user *act, return ret; } -int sys_sigaltstack(const stack_t *uss, stack_t __user *uoss) +int +sys_sigaltstack(const stack_t *uss, stack_t __user *uoss) { return do_sigaltstack(uss, uoss, rdusp()); } @@ -150,7 +205,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) /* TODO: the other ports use regs->orig_XX to disable syscall checks * after this completes, but we don't use that mechanism. maybe we can - * use it now ? + * use it now ? */ return err; @@ -161,7 +216,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) /* Define dummy arguments to be able to reach the regs argument. */ -asmlinkage int sys_sigreturn(long r10, long r11, long r12, long r13, long mof, +asmlinkage int sys_sigreturn(long r10, long r11, long r12, long r13, long mof, long srp, struct pt_regs *regs) { struct sigframe __user *frame = (struct sigframe *)rdusp(); @@ -188,7 +243,7 @@ asmlinkage int sys_sigreturn(long r10, long r11, long r12, long r13, long mof, current->blocked = set; recalc_sigpending(); spin_unlock_irq(¤t->sighand->siglock); - + if (restore_sigcontext(regs, &frame->sc)) goto badframe; @@ -199,11 +254,11 @@ asmlinkage int sys_sigreturn(long r10, long r11, long r12, long r13, long mof, badframe: force_sig(SIGSEGV, current); return 0; -} +} /* Define dummy arguments to be able to reach the regs argument. */ -asmlinkage int sys_rt_sigreturn(long r10, long r11, long r12, long r13, +asmlinkage int sys_rt_sigreturn(long r10, long r11, long r12, long r13, long mof, long srp, struct pt_regs *regs) { struct rt_sigframe __user *frame = (struct rt_sigframe *)rdusp(); @@ -227,7 +282,7 @@ asmlinkage int sys_rt_sigreturn(long r10, long r11, long r12, long r13, current->blocked = set; recalc_sigpending(); spin_unlock_irq(¤t->sighand->siglock); - + if (restore_sigcontext(regs, &frame->uc.uc_mcontext)) goto badframe; @@ -239,14 +294,14 @@ asmlinkage int sys_rt_sigreturn(long r10, long r11, long r12, long r13, badframe: force_sig(SIGSEGV, current); return 0; -} +} /* * Set up a signal frame. */ -static int setup_sigcontext(struct sigcontext __user *sc, - struct pt_regs *regs, unsigned long mask) +static int +setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, unsigned long mask) { int err = 0; unsigned long usp = rdusp(); @@ -269,11 +324,10 @@ static int setup_sigcontext(struct sigcontext __user *sc, return err; } -/* Figure out where we want to put the new signal frame - * - usually on the stack. */ +/* figure out where we want to put the new signal frame - usually on the stack */ static inline void __user * -get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size) +get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size) { unsigned long sp = rdusp(); @@ -291,15 +345,15 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size) } /* grab and setup a signal frame. - * + * * basically we stack a lot of state info, and arrange for the * user-mode program to return to the kernel using either a * trampoline which performs the syscall sigreturn, or a provided * user-mode trampoline. */ -static int setup_frame(int sig, struct k_sigaction *ka, - sigset_t *set, struct pt_regs *regs) +static void setup_frame(int sig, struct k_sigaction *ka, + sigset_t *set, struct pt_regs * regs) { struct sigframe __user *frame; unsigned long return_ip; @@ -347,15 +401,14 @@ static int setup_frame(int sig, struct k_sigaction *ka, wrusp((unsigned long)frame); - return 0; + return; give_sigsegv: force_sigsegv(sig, current); - return -EFAULT; } -static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, - sigset_t *set, struct pt_regs *regs) +static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, + sigset_t *set, struct pt_regs * regs) { struct rt_sigframe __user *frame; unsigned long return_ip; @@ -390,10 +443,9 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, /* trampoline - the desired return ip is the retcode itself */ return_ip = (unsigned long)&frame->retcode; /* This is movu.w __NR_rt_sigreturn, r9; break 13; */ - err |= __put_user(0x9c5f, (short __user *)(frame->retcode+0)); - err |= __put_user(__NR_rt_sigreturn, - (short __user *)(frame->retcode+2)); - err |= __put_user(0xe93d, (short __user *)(frame->retcode+4)); + err |= __put_user(0x9c5f, (short __user*)(frame->retcode+0)); + err |= __put_user(__NR_rt_sigreturn, (short __user*)(frame->retcode+2)); + err |= __put_user(0xe93d, (short __user*)(frame->retcode+4)); } if (err) @@ -403,81 +455,73 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, /* Set up registers for signal handler */ - /* What we enter NOW */ - regs->irp = (unsigned long) ka->sa.sa_handler; - /* What we enter LATER */ - regs->srp = return_ip; - /* First argument is signo */ - regs->r10 = sig; - /* Second argument is (siginfo_t *) */ - regs->r11 = (unsigned long)&frame->info; - /* Third argument is unused */ - regs->r12 = 0; - - /* Actually move the usp to reflect the stacked frame */ + regs->irp = (unsigned long) ka->sa.sa_handler; /* what we enter NOW */ + regs->srp = return_ip; /* what we enter LATER */ + regs->r10 = sig; /* first argument is signo */ + regs->r11 = (unsigned long) &frame->info; /* second argument is (siginfo_t *) */ + regs->r12 = 0; /* third argument is unused */ + + /* actually move the usp to reflect the stacked frame */ + wrusp((unsigned long)frame); - return 0; + return; give_sigsegv: force_sigsegv(sig, current); - return -EFAULT; } /* * OK, we're invoking a handler - */ + */ -static inline int handle_signal(int canrestart, unsigned long sig, - siginfo_t *info, struct k_sigaction *ka, - sigset_t *oldset, struct pt_regs *regs) +static inline void +handle_signal(int canrestart, unsigned long sig, + siginfo_t *info, struct k_sigaction *ka, + sigset_t *oldset, struct pt_regs * regs) { - int ret; - /* Are we from a system call? */ if (canrestart) { /* If so, check system call restarting.. */ switch (regs->r10) { - case -ERESTART_RESTARTBLOCK: - case -ERESTARTNOHAND: - /* ERESTARTNOHAND means that the syscall should - * only be restarted if there was no handler for - * the signal, and since we only get here if there - * is a handler, we don't restart */ - regs->r10 = -EINTR; - break; - case -ERESTARTSYS: - /* ERESTARTSYS means to restart the syscall if - * there is no handler or the handler was - * registered with SA_RESTART */ - if (!(ka->sa.sa_flags & SA_RESTART)) { + case -ERESTART_RESTARTBLOCK: + case -ERESTARTNOHAND: + /* ERESTARTNOHAND means that the syscall should only be + restarted if there was no handler for the signal, and since + we only get here if there is a handler, we don't restart */ regs->r10 = -EINTR; break; - } - /* fallthrough */ - case -ERESTARTNOINTR: - /* ERESTARTNOINTR means that the syscall should - * be called again after the signal handler returns. */ - RESTART_CRIS_SYS(regs); + + case -ERESTARTSYS: + /* ERESTARTSYS means to restart the syscall if there is no + handler or the handler was registered with SA_RESTART */ + if (!(ka->sa.sa_flags & SA_RESTART)) { + regs->r10 = -EINTR; + break; + } + /* fallthrough */ + case -ERESTARTNOINTR: + /* ERESTARTNOINTR means that the syscall should be called again + after the signal handler returns. */ + RESTART_CRIS_SYS(regs); } } /* Set up the stack frame */ if (ka->sa.sa_flags & SA_SIGINFO) - ret = setup_rt_frame(sig, ka, info, oldset, regs); + setup_rt_frame(sig, ka, info, oldset, regs); else - ret = setup_frame(sig, ka, oldset, regs); - - if (ret == 0) { - spin_lock_irq(¤t->sighand->siglock); - sigorsets(¤t->blocked, ¤t->blocked, - &ka->sa.sa_mask); - if (!(ka->sa.sa_flags & SA_NODEFER)) - sigaddset(¤t->blocked, sig); - recalc_sigpending(); - spin_unlock_irq(¤t->sighand->siglock); - } - return ret; + setup_frame(sig, ka, oldset, regs); + + if (ka->sa.sa_flags & SA_ONESHOT) + ka->sa.sa_handler = SIG_DFL; + + spin_lock_irq(¤t->sighand->siglock); + sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask); + if (!(ka->sa.sa_flags & SA_NODEFER)) + sigaddset(¤t->blocked,sig); + recalc_sigpending(); + spin_unlock_irq(¤t->sighand->siglock); } /* @@ -492,12 +536,11 @@ static inline int handle_signal(int canrestart, unsigned long sig, * mode below. */ -void do_signal(int canrestart, struct pt_regs *regs) +int do_signal(int canrestart, sigset_t *oldset, struct pt_regs *regs) { siginfo_t info; int signr; struct k_sigaction ka; - sigset_t *oldset; /* * We want the common case to go fast, which @@ -506,26 +549,16 @@ void do_signal(int canrestart, struct pt_regs *regs) * if so. */ if (!user_mode(regs)) - return; + return 1; - if (test_thread_flag(TIF_RESTORE_SIGMASK)) - oldset = ¤t->saved_sigmask; - else + if (!oldset) oldset = ¤t->blocked; signr = get_signal_to_deliver(&info, &ka, regs, NULL); if (signr > 0) { /* Whee! Actually deliver the signal. */ - if (handle_signal(canrestart, signr, &info, &ka, - oldset, regs)) { - /* a signal was successfully delivered; the saved - * sigmask will have been stored in the signal frame, - * and will be restored by sigreturn, so we can simply - * clear the TIF_RESTORE_SIGMASK flag */ - if (test_thread_flag(TIF_RESTORE_SIGMASK)) - clear_thread_flag(TIF_RESTORE_SIGMASK); - } - return; + handle_signal(canrestart, signr, &info, &ka, oldset, regs); + return 1; } /* Did we come from a system call? */ @@ -536,16 +569,10 @@ void do_signal(int canrestart, struct pt_regs *regs) regs->r10 == -ERESTARTNOINTR) { RESTART_CRIS_SYS(regs); } - if (regs->r10 == -ERESTART_RESTARTBLOCK) { + if (regs->r10 == -ERESTART_RESTARTBLOCK){ regs->r10 = __NR_restart_syscall; regs->irp -= 2; } } - - /* if there's no signal to deliver, we just put the saved sigmask - * back */ - if (test_thread_flag(TIF_RESTORE_SIGMASK)) { - clear_thread_flag(TIF_RESTORE_SIGMASK); - sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL); - } + return 0; } diff --git a/trunk/arch/cris/arch-v10/kernel/time.c b/trunk/arch/cris/arch-v10/kernel/time.c index 9310a7b476e9..5976f6199c47 100644 --- a/trunk/arch/cris/arch-v10/kernel/time.c +++ b/trunk/arch/cris/arch-v10/kernel/time.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/x86/kernel/process_32.c b/trunk/arch/x86/kernel/process_32.c index 46d391d49de8..9663c2a74830 100644 --- a/trunk/arch/x86/kernel/process_32.c +++ b/trunk/arch/x86/kernel/process_32.c @@ -204,10 +204,6 @@ void cpu_idle(void) } } -static void do_nothing(void *unused) -{ -} - void cpu_idle_wait(void) { unsigned int cpu, this_cpu = get_cpu(); @@ -232,13 +228,6 @@ void cpu_idle_wait(void) cpu_clear(cpu, map); } cpus_and(map, map, cpu_online_map); - /* - * We waited 1 sec, if a CPU still did not call idle - * it may be because it is in idle and not waking up - * because it has nothing to do. - * Give all the remaining CPUS a kick. - */ - smp_call_function_mask(map, do_nothing, 0, 0); } while (!cpus_empty(map)); set_cpus_allowed(current, tmp); diff --git a/trunk/arch/x86/kernel/process_64.c b/trunk/arch/x86/kernel/process_64.c index ab79e1dfa023..6309b275cb9c 100644 --- a/trunk/arch/x86/kernel/process_64.c +++ b/trunk/arch/x86/kernel/process_64.c @@ -135,10 +135,6 @@ static void poll_idle (void) cpu_relax(); } -static void do_nothing(void *unused) -{ -} - void cpu_idle_wait(void) { unsigned int cpu, this_cpu = get_cpu(); @@ -164,13 +160,6 @@ void cpu_idle_wait(void) cpu_clear(cpu, map); } cpus_and(map, map, cpu_online_map); - /* - * We waited 1 sec, if a CPU still did not call idle - * it may be because it is in idle and not waking up - * because it has nothing to do. - * Give all the remaining CPUS a kick. - */ - smp_call_function_mask(map, do_nothing, 0, 0); } while (!cpus_empty(map)); set_cpus_allowed(current, tmp); diff --git a/trunk/drivers/block/cciss.c b/trunk/drivers/block/cciss.c index 509b6490413b..7d704968765f 100644 --- a/trunk/drivers/block/cciss.c +++ b/trunk/drivers/block/cciss.c @@ -2927,7 +2927,7 @@ static void __devinit cciss_interrupt_mode(ctlr_info_t *c, return; } -static int __devinit cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev) +static int cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev) { ushort subsystem_vendor_id, subsystem_device_id, command; __u32 board_id, scratchpad = 0; diff --git a/trunk/drivers/char/tpm/tpm.c b/trunk/drivers/char/tpm/tpm.c index c88424a0c89b..39564b76d4a3 100644 --- a/trunk/drivers/char/tpm/tpm.c +++ b/trunk/drivers/char/tpm/tpm.c @@ -1046,6 +1046,12 @@ void tpm_remove_hardware(struct device *dev) } EXPORT_SYMBOL_GPL(tpm_remove_hardware); +static u8 savestate[] = { + 0, 193, /* TPM_TAG_RQU_COMMAND */ + 0, 0, 0, 10, /* blob length (in bytes) */ + 0, 0, 0, 152 /* TPM_ORD_SaveState */ +}; + /* * We are about to suspend. Save the TPM state * so that it can be restored. @@ -1053,12 +1059,6 @@ EXPORT_SYMBOL_GPL(tpm_remove_hardware); int tpm_pm_suspend(struct device *dev, pm_message_t pm_state) { struct tpm_chip *chip = dev_get_drvdata(dev); - u8 savestate[] = { - 0, 193, /* TPM_TAG_RQU_COMMAND */ - 0, 0, 0, 10, /* blob length (in bytes) */ - 0, 0, 0, 152 /* TPM_ORD_SaveState */ - }; - if (chip == NULL) return -ENODEV; diff --git a/trunk/drivers/i2c/busses/i2c-omap.c b/trunk/drivers/i2c/busses/i2c-omap.c index cb55cf2ba1e9..f2552b19ea60 100644 --- a/trunk/drivers/i2c/busses/i2c-omap.c +++ b/trunk/drivers/i2c/busses/i2c-omap.c @@ -619,13 +619,13 @@ omap_i2c_probe(struct platform_device *pdev) err_free_irq: free_irq(dev->irq, dev); err_unuse_clocks: + omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 0); omap_i2c_disable_clocks(dev); omap_i2c_put_clocks(dev); err_free_mem: platform_set_drvdata(pdev, NULL); kfree(dev); err_release_region: - omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 0); release_mem_region(mem->start, (mem->end - mem->start) + 1); return r; diff --git a/trunk/drivers/input/gameport/gameport.c b/trunk/drivers/input/gameport/gameport.c index 1dc2ac9f3d1c..bfc6061f1554 100644 --- a/trunk/drivers/input/gameport/gameport.c +++ b/trunk/drivers/input/gameport/gameport.c @@ -38,6 +38,8 @@ EXPORT_SYMBOL(gameport_unregister_driver); EXPORT_SYMBOL(gameport_open); EXPORT_SYMBOL(gameport_close); EXPORT_SYMBOL(gameport_rescan); +EXPORT_SYMBOL(gameport_cooked_read); +EXPORT_SYMBOL(gameport_set_name); EXPORT_SYMBOL(gameport_set_phys); EXPORT_SYMBOL(gameport_start_polling); EXPORT_SYMBOL(gameport_stop_polling); diff --git a/trunk/drivers/input/input.c b/trunk/drivers/input/input.c index a0be978501ff..307c7b5c2b33 100644 --- a/trunk/drivers/input/input.c +++ b/trunk/drivers/input/input.c @@ -235,10 +235,6 @@ static void input_handle_event(struct input_dev *dev, if (value >= 0) disposition = INPUT_PASS_TO_ALL; break; - - case EV_PWR: - disposition = INPUT_PASS_TO_ALL; - break; } if (type != EV_SYN) @@ -1270,10 +1266,6 @@ void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int __set_bit(code, dev->ffbit); break; - case EV_PWR: - /* do nothing */ - break; - default: printk(KERN_ERR "input_set_capability: unknown type %u (code %u)\n", diff --git a/trunk/drivers/input/keyboard/Kconfig b/trunk/drivers/input/keyboard/Kconfig index 086d58c0ccbe..dfa6592c10f6 100644 --- a/trunk/drivers/input/keyboard/Kconfig +++ b/trunk/drivers/input/keyboard/Kconfig @@ -209,22 +209,22 @@ config KEYBOARD_HIL to your machine, so normally you should say Y here. config KEYBOARD_HP6XX - tristate "HP Jornada 6xx keyboard" + tristate "HP Jornada 6XX Keyboard support" depends on SH_HP6XX select INPUT_POLLDEV help - Say Y here if you have a HP Jornada 620/660/680/690 and want to - support the built-in keyboard. + This adds support for the onboard keyboard found on + HP Jornada 620/660/680/690. To compile this driver as a module, choose M here: the module will be called jornada680_kbd. config KEYBOARD_HP7XX - tristate "HP Jornada 7xx keyboard" + tristate "HP Jornada 7XX Keyboard Driver" depends on SA1100_JORNADA720_SSP && SA1100_SSP help - Say Y here if you have a HP Jornada 710/720/728 and want to - support the built-in keyboard. + Say Y here to add support for the HP Jornada 7xx (710/720/728) + onboard keyboard. To compile this driver as a module, choose M here: the module will be called jornada720_kbd. diff --git a/trunk/drivers/input/keyboard/jornada680_kbd.c b/trunk/drivers/input/keyboard/jornada680_kbd.c index a23633a2e1b4..bec1cf483723 100644 --- a/trunk/drivers/input/keyboard/jornada680_kbd.c +++ b/trunk/drivers/input/keyboard/jornada680_kbd.c @@ -16,14 +16,14 @@ * published by the Free Software Foundation. */ -#include #include -#include -#include -#include #include #include +#include +#include +#include #include +#include #include #include @@ -43,22 +43,22 @@ #define PLDR 0xa4000134 static const unsigned short jornada_scancodes[] = { -/* PTD1 */ KEY_CAPSLOCK, KEY_MACRO, KEY_LEFTCTRL, 0, KEY_ESC, KEY_KP5, 0, 0, /* 1 -> 8 */ - KEY_F1, KEY_F2, KEY_F3, KEY_F8, KEY_F7, KEY_F6, KEY_F4, KEY_F5, /* 9 -> 16 */ -/* PTD5 */ KEY_SLASH, KEY_APOSTROPHE, KEY_ENTER, 0, KEY_Z, 0, 0, 0, /* 17 -> 24 */ - KEY_X, KEY_C, KEY_V, KEY_DOT, KEY_COMMA, KEY_M, KEY_B, KEY_N, /* 25 -> 32 */ -/* PTD7 */ KEY_KP2, KEY_KP6, KEY_KP3, 0, 0, 0, 0, 0, /* 33 -> 40 */ - KEY_F10, KEY_RO, KEY_F9, KEY_KP4, KEY_NUMLOCK, KEY_SCROLLLOCK, KEY_LEFTALT, KEY_HANJA, /* 41 -> 48 */ -/* PTE0 */ KEY_KATAKANA, KEY_KP0, KEY_GRAVE, 0, KEY_FINANCE, 0, 0, 0, /* 49 -> 56 */ - KEY_KPMINUS, KEY_HIRAGANA, KEY_SPACE, KEY_KPDOT, KEY_VOLUMEUP, 249, 0, 0, /* 57 -> 64 */ -/* PTE1 */ KEY_SEMICOLON, KEY_RIGHTBRACE, KEY_BACKSLASH, 0, KEY_A, 0, 0, 0, /* 65 -> 72 */ - KEY_S, KEY_D, KEY_F, KEY_L, KEY_K, KEY_J, KEY_G, KEY_H, /* 73 -> 80 */ -/* PTE3 */ KEY_KP8, KEY_LEFTMETA, KEY_RIGHTSHIFT, 0, KEY_TAB, 0, 0, 0, /* 81 -> 88 */ - 0, KEY_LEFTSHIFT, KEY_KP7, KEY_KP9, KEY_KP1, KEY_F11, KEY_KPPLUS, KEY_KPASTERISK, /* 89 -> 96 */ -/* PTE6 */ KEY_P, KEY_LEFTBRACE, KEY_BACKSPACE, 0, KEY_Q, 0, 0, 0, /* 97 -> 104 */ - KEY_W, KEY_E, KEY_R, KEY_O, KEY_I, KEY_U, KEY_T, KEY_Y, /* 105 -> 112 */ -/* PTE7 */ KEY_0, KEY_MINUS, KEY_EQUAL, 0, KEY_1, 0, 0, 0, /* 113 -> 120 */ - KEY_2, KEY_3, KEY_4, KEY_9, KEY_8, KEY_7, KEY_5, KEY_6, /* 121 -> 128 */ +/* PTD1 */ KEY_CAPSLOCK, KEY_MACRO, KEY_LEFTCTRL, 0, KEY_ESC, 0, 0, 0, /* 1 -> 8 */ + KEY_F1, KEY_F2, KEY_F3, KEY_F8, KEY_F7, KEY_F2, KEY_F4, KEY_F5, /* 9 -> 16 */ +/* PTD5 */ KEY_SLASH, KEY_APOSTROPHE, KEY_ENTER, 0, KEY_Z, 0, 0, 0, /* 17 -> 24 */ + KEY_X, KEY_C, KEY_V, KEY_DOT, KEY_COMMA, KEY_M, KEY_B, KEY_N, /* 25 -> 32 */ +/* PTD7 */ KEY_KP2, KEY_KP6, 0, 0, 0, 0, 0, 0, /* 33 -> 40 */ + 0, 0, 0, KEY_KP4, 0, 0, KEY_LEFTALT, KEY_HANJA, /* 41 -> 48 */ +/* PTE0 */ 0, 0, 0, 0, KEY_FINANCE, 0, 0, 0, /* 49 -> 56 */ + KEY_LEFTCTRL, 0, KEY_SPACE, KEY_KPDOT, KEY_VOLUMEUP, 249, 0, 0, /* 57 -> 64 */ +/* PTE1 */ KEY_SEMICOLON, KEY_RIGHTBRACE, KEY_BACKSLASH, 0, KEY_A, 0, 0, 0,/* 65 -> 72 */ + KEY_S, KEY_D, KEY_F, KEY_L, KEY_K, KEY_J, KEY_G, KEY_H, /* 73 -> 80 */ +/* PTE3 */ KEY_KP8, KEY_LEFTMETA, KEY_RIGHTSHIFT, 0, KEY_TAB, 0, 0,0, /* 81 -> 88 */ + 0, KEY_LEFTSHIFT, 0, 0, 0, 0, 0, 0, /* 89 -> 96 */ +/* PTE6 */ KEY_P, KEY_LEFTBRACE, KEY_BACKSPACE, 0, KEY_Q, 0, 0, 0, /* 97 -> 104 */ + KEY_W, KEY_E, KEY_R, KEY_O, KEY_I, KEY_U, KEY_T, KEY_R, /* 105 -> 112 */ +/* PTE7 */ KEY_0, KEY_MINUS, KEY_EQUAL, 0, KEY_1, 0, 0, 0, /* 113 -> 120 */ + KEY_2, KEY_3, KEY_4, KEY_9, KEY_8, KEY_7, KEY_5, KEY_6, /* 121 -> 128 */ /* **** */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; diff --git a/trunk/drivers/input/keyboard/spitzkbd.c b/trunk/drivers/input/keyboard/spitzkbd.c index 1d59a2dc3c17..410d78a774d0 100644 --- a/trunk/drivers/input/keyboard/spitzkbd.c +++ b/trunk/drivers/input/keyboard/spitzkbd.c @@ -391,7 +391,6 @@ static int __init spitzkbd_probe(struct platform_device *dev) for (i = 0; i < ARRAY_SIZE(spitzkbd_keycode); i++) set_bit(spitzkbd->keycode[i], input_dev->keybit); clear_bit(0, input_dev->keybit); - set_bit(KEY_SUSPEND, input_dev->keybit); set_bit(SW_LID, input_dev->swbit); set_bit(SW_TABLET_MODE, input_dev->swbit); set_bit(SW_HEADPHONE_INSERT, input_dev->swbit); diff --git a/trunk/drivers/input/touchscreen/Kconfig b/trunk/drivers/input/touchscreen/Kconfig index 90e8e92dfe47..fa8442b6241c 100644 --- a/trunk/drivers/input/touchscreen/Kconfig +++ b/trunk/drivers/input/touchscreen/Kconfig @@ -115,17 +115,19 @@ config TOUCHSCREEN_MK712 module will be called mk712. config TOUCHSCREEN_HP600 - tristate "HP Jornada 6xx touchscreen" + tristate "HP Jornada 680/690 touchscreen" depends on SH_HP6XX && SH_ADC help - Say Y here if you have a HP Jornada 620/660/680/690 and want to + Say Y here if you have a HP Jornada 680 or 690 and want to support the built-in touchscreen. + If unsure, say N. + To compile this driver as a module, choose M here: the module will be called hp680_ts_input. config TOUCHSCREEN_HP7XX - tristate "HP Jornada 7xx touchscreen" + tristate "HP Jornada 710/720/728 touchscreen" depends on SA1100_JORNADA720_SSP help Say Y here if you have a HP Jornada 710/720/728 and want diff --git a/trunk/drivers/macintosh/adbhid.c b/trunk/drivers/macintosh/adbhid.c index ef4c117ea35f..883da72b5368 100644 --- a/trunk/drivers/macintosh/adbhid.c +++ b/trunk/drivers/macintosh/adbhid.c @@ -322,9 +322,8 @@ adbhid_input_keycode(int id, int scancode, int repeat) input_sync(ahid->input); input_report_key(ahid->input, KEY_CAPSLOCK, 0); input_sync(ahid->input); - return; } - break; + return; #ifdef CONFIG_PPC_PMAC case ADB_KEY_POWER_OLD: /* Power key on PBook 3400 needs remapping */ switch(pmac_call_feature(PMAC_FTR_GET_MB_INFO, diff --git a/trunk/drivers/scsi/advansys.c b/trunk/drivers/scsi/advansys.c index 38a1ee2eacd8..9dd3952516c5 100644 --- a/trunk/drivers/scsi/advansys.c +++ b/trunk/drivers/scsi/advansys.c @@ -13906,7 +13906,7 @@ static int advansys_release(struct Scsi_Host *shost) #define ASC_IOADR_TABLE_MAX_IX 11 -static PortAddr _asc_def_iop_base[ASC_IOADR_TABLE_MAX_IX] = { +static PortAddr _asc_def_iop_base[ASC_IOADR_TABLE_MAX_IX] __devinitdata = { 0x100, 0x0110, 0x120, 0x0130, 0x140, 0x0150, 0x0190, 0x0210, 0x0230, 0x0250, 0x0330 }; diff --git a/trunk/drivers/scsi/qla2xxx/qla_os.c b/trunk/drivers/scsi/qla2xxx/qla_os.c index 8ecc0470b8f3..a5bcf1f390b3 100644 --- a/trunk/drivers/scsi/qla2xxx/qla_os.c +++ b/trunk/drivers/scsi/qla2xxx/qla_os.c @@ -1831,7 +1831,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) return ret; } -static void +static void __devexit qla2x00_remove_one(struct pci_dev *pdev) { scsi_qla_host_t *ha; @@ -2965,7 +2965,7 @@ static struct pci_driver qla2xxx_pci_driver = { }, .id_table = qla2xxx_pci_tbl, .probe = qla2x00_probe_one, - .remove = qla2x00_remove_one, + .remove = __devexit_p(qla2x00_remove_one), .err_handler = &qla2xxx_err_handler, }; diff --git a/trunk/drivers/video/atmel_lcdfb.c b/trunk/drivers/video/atmel_lcdfb.c index 7c30cc8df71e..11a3a222dfc3 100644 --- a/trunk/drivers/video/atmel_lcdfb.c +++ b/trunk/drivers/video/atmel_lcdfb.c @@ -801,5 +801,5 @@ module_init(atmel_lcdfb_init); module_exit(atmel_lcdfb_exit); MODULE_DESCRIPTION("AT91/AT32 LCD Controller framebuffer driver"); -MODULE_AUTHOR("Nicolas Ferre "); +MODULE_AUTHOR("Nicolas Ferre "); MODULE_LICENSE("GPL"); diff --git a/trunk/drivers/video/s3c2410fb.c b/trunk/drivers/video/s3c2410fb.c index ad35033f1a48..5857ccf5f6b1 100644 --- a/trunk/drivers/video/s3c2410fb.c +++ b/trunk/drivers/video/s3c2410fb.c @@ -1026,7 +1026,7 @@ static int s3c2410fb_resume(struct platform_device *dev) clk_enable(info->clk); msleep(1); - s3c2410fb_init_registers(fbinfo); + s3c2410fb_init_registers(info); return 0; } diff --git a/trunk/drivers/video/uvesafb.c b/trunk/drivers/video/uvesafb.c index a14ef894d571..d1d6c0facd54 100644 --- a/trunk/drivers/video/uvesafb.c +++ b/trunk/drivers/video/uvesafb.c @@ -43,7 +43,7 @@ static struct fb_fix_screeninfo uvesafb_fix __devinitdata = { }; static int mtrr __devinitdata = 3; /* enable mtrr by default */ -static int blank = 1; /* enable blanking by default */ +static int blank __devinitdata = 1; /* enable blanking by default */ static int ypan __devinitdata = 1; /* 0: scroll, 1: ypan, 2: ywrap */ static int pmi_setpal __devinitdata = 1; /* use PMI for palette changes */ static int nocrtc __devinitdata; /* ignore CRTC settings */ @@ -1549,7 +1549,7 @@ static void __devinit uvesafb_init_info(struct fb_info *info, info->fbops->fb_pan_display = NULL; } -static void __devinit uvesafb_init_mtrr(struct fb_info *info) +static void uvesafb_init_mtrr(struct fb_info *info) { #ifdef CONFIG_MTRR if (mtrr && !(info->fix.smem_start & (PAGE_SIZE - 1))) { diff --git a/trunk/drivers/w1/w1.c b/trunk/drivers/w1/w1.c index 33e50310e9e0..070217322c9f 100644 --- a/trunk/drivers/w1/w1.c +++ b/trunk/drivers/w1/w1.c @@ -869,9 +869,11 @@ void w1_search_process(struct w1_master *dev, u8 search_type) w1_search_devices(dev, search_type, w1_slave_found); list_for_each_entry_safe(sl, sln, &dev->slist, w1_slave_entry) { - if (!test_bit(W1_SLAVE_ACTIVE, (unsigned long *)&sl->flags) && !--sl->ttl) + if (!test_bit(W1_SLAVE_ACTIVE, (unsigned long *)&sl->flags) && !--sl->ttl) { w1_slave_detach(sl); - else if (test_bit(W1_SLAVE_ACTIVE, (unsigned long *)&sl->flags)) + + dev->slave_count--; + } else if (test_bit(W1_SLAVE_ACTIVE, (unsigned long *)&sl->flags)) sl->ttl = dev->slave_ttl; } diff --git a/trunk/fs/proc/array.c b/trunk/fs/proc/array.c index eb97f2897e2b..810eb8fd6500 100644 --- a/trunk/fs/proc/array.c +++ b/trunk/fs/proc/array.c @@ -426,6 +426,7 @@ static int do_task_stat(struct task_struct *task, char *buffer, int whole) cgtime = gtime = cputime_zero; rcu_read_lock(); + ppid = task_tgid_nr_ns(task->real_parent, ns); if (lock_task_sighand(task, &flags)) { struct signal_struct *sig = task->signal; @@ -464,7 +465,6 @@ static int do_task_stat(struct task_struct *task, char *buffer, int whole) } sid = task_session_nr_ns(task, ns); - ppid = task_tgid_nr_ns(task->real_parent, ns); pgid = task_pgrp_nr_ns(task, ns); unlock_task_sighand(task, &flags); diff --git a/trunk/include/asm-cris/unistd.h b/trunk/include/asm-cris/unistd.h index bd57a7949170..6f2d924f4fd6 100644 --- a/trunk/include/asm-cris/unistd.h +++ b/trunk/include/asm-cris/unistd.h @@ -358,7 +358,6 @@ #define __ARCH_WANT_SYS_SIGPENDING #define __ARCH_WANT_SYS_SIGPROCMASK #define __ARCH_WANT_SYS_RT_SIGACTION -#define __ARCH_WANT_SYS_RT_SIGSUSPEND /* * "Conditional" syscalls diff --git a/trunk/kernel/module.c b/trunk/kernel/module.c index c2e3e2e98801..91fe6958b6e1 100644 --- a/trunk/kernel/module.c +++ b/trunk/kernel/module.c @@ -2214,34 +2214,29 @@ static const char *get_ksymbol(struct module *mod, /* For kallsyms to ask for address resolution. NULL means not found. We don't lock, as this is used for oops resolution and races are a lesser concern. */ -/* FIXME: Risky: returns a pointer into a module w/o lock */ const char *module_address_lookup(unsigned long addr, unsigned long *size, unsigned long *offset, char **modname) { struct module *mod; - const char *ret = NULL; - preempt_disable(); list_for_each_entry(mod, &modules, list) { if (within(addr, mod->module_init, mod->init_size) || within(addr, mod->module_core, mod->core_size)) { if (modname) *modname = mod->name; - ret = get_ksymbol(mod, addr, size, offset); - break; + return get_ksymbol(mod, addr, size, offset); } } - preempt_enable(); - return ret; + return NULL; } int lookup_module_symbol_name(unsigned long addr, char *symname) { struct module *mod; - preempt_disable(); + mutex_lock(&module_mutex); list_for_each_entry(mod, &modules, list) { if (within(addr, mod->module_init, mod->init_size) || within(addr, mod->module_core, mod->core_size)) { @@ -2251,12 +2246,12 @@ int lookup_module_symbol_name(unsigned long addr, char *symname) if (!sym) goto out; strlcpy(symname, sym, KSYM_NAME_LEN); - preempt_enable(); + mutex_unlock(&module_mutex); return 0; } } out: - preempt_enable(); + mutex_unlock(&module_mutex); return -ERANGE; } @@ -2265,7 +2260,7 @@ int lookup_module_symbol_attrs(unsigned long addr, unsigned long *size, { struct module *mod; - preempt_disable(); + mutex_lock(&module_mutex); list_for_each_entry(mod, &modules, list) { if (within(addr, mod->module_init, mod->init_size) || within(addr, mod->module_core, mod->core_size)) { @@ -2278,12 +2273,12 @@ int lookup_module_symbol_attrs(unsigned long addr, unsigned long *size, strlcpy(modname, mod->name, MODULE_NAME_LEN); if (name) strlcpy(name, sym, KSYM_NAME_LEN); - preempt_enable(); + mutex_unlock(&module_mutex); return 0; } } out: - preempt_enable(); + mutex_unlock(&module_mutex); return -ERANGE; } @@ -2292,7 +2287,7 @@ int module_get_kallsym(unsigned int symnum, unsigned long *value, char *type, { struct module *mod; - preempt_disable(); + mutex_lock(&module_mutex); list_for_each_entry(mod, &modules, list) { if (symnum < mod->num_symtab) { *value = mod->symtab[symnum].st_value; @@ -2301,12 +2296,12 @@ int module_get_kallsym(unsigned int symnum, unsigned long *value, char *type, KSYM_NAME_LEN); strlcpy(module_name, mod->name, MODULE_NAME_LEN); *exported = is_exported(name, mod); - preempt_enable(); + mutex_unlock(&module_mutex); return 0; } symnum -= mod->num_symtab; } - preempt_enable(); + mutex_unlock(&module_mutex); return -ERANGE; } @@ -2329,7 +2324,6 @@ unsigned long module_kallsyms_lookup_name(const char *name) unsigned long ret = 0; /* Don't lock: we're in enough trouble already. */ - preempt_disable(); if ((colon = strchr(name, ':')) != NULL) { *colon = '\0'; if ((mod = find_module(name)) != NULL) @@ -2340,7 +2334,6 @@ unsigned long module_kallsyms_lookup_name(const char *name) if ((ret = mod_find_symname(mod, name)) != 0) break; } - preempt_enable(); return ret; } #endif /* CONFIG_KALLSYMS */ diff --git a/trunk/mm/hugetlb.c b/trunk/mm/hugetlb.c index e0fda156f021..7224a4f07106 100644 --- a/trunk/mm/hugetlb.c +++ b/trunk/mm/hugetlb.c @@ -418,14 +418,9 @@ static struct page *alloc_huge_page_private(struct vm_area_struct *vma, if (free_huge_pages > resv_huge_pages) page = dequeue_huge_page(vma, addr); spin_unlock(&hugetlb_lock); - if (!page) { + if (!page) page = alloc_buddy_huge_page(vma, addr); - if (!page) { - hugetlb_put_quota(vma->vm_file->f_mapping, 1); - return ERR_PTR(-VM_FAULT_OOM); - } - } - return page; + return page ? page : ERR_PTR(-VM_FAULT_OOM); } static struct page *alloc_huge_page(struct vm_area_struct *vma, @@ -1211,10 +1206,8 @@ int hugetlb_reserve_pages(struct inode *inode, long from, long to) if (hugetlb_get_quota(inode->i_mapping, chg)) return -ENOSPC; ret = hugetlb_acct_memory(chg); - if (ret < 0) { - hugetlb_put_quota(inode->i_mapping, chg); + if (ret < 0) return ret; - } region_add(&inode->i_mapping->private_list, from, to); return 0; } diff --git a/trunk/mm/quicklist.c b/trunk/mm/quicklist.c index 3f703f7cb398..ae8189c2799e 100644 --- a/trunk/mm/quicklist.c +++ b/trunk/mm/quicklist.c @@ -26,17 +26,9 @@ DEFINE_PER_CPU(struct quicklist, quicklist)[CONFIG_NR_QUICK]; static unsigned long max_pages(unsigned long min_pages) { unsigned long node_free_pages, max; - struct zone *zones = NODE_DATA(numa_node_id())->node_zones; - - node_free_pages = -#ifdef CONFIG_ZONE_DMA - zone_page_state(&zones[ZONE_DMA], NR_FREE_PAGES) + -#endif -#ifdef CONFIG_ZONE_DMA32 - zone_page_state(&zones[ZONE_DMA32], NR_FREE_PAGES) + -#endif - zone_page_state(&zones[ZONE_NORMAL], NR_FREE_PAGES); + node_free_pages = node_page_state(numa_node_id(), + NR_FREE_PAGES); max = node_free_pages / FRACTION_OF_NODE_MEM; return max(max, min_pages); } diff --git a/trunk/sound/oss/msnd.h b/trunk/sound/oss/msnd.h index d0ca582c4583..05cf7865be5e 100644 --- a/trunk/sound/oss/msnd.h +++ b/trunk/sound/oss/msnd.h @@ -233,8 +233,8 @@ typedef struct multisound_dev { spinlock_t lock; int nresets; unsigned long recsrc; - int left_levels[32]; - int right_levels[32]; + int left_levels[16]; + int right_levels[16]; int mixer_mod_count; int calibrate_signal; int play_sample_size, play_sample_rate, play_channels;