diff options
Diffstat (limited to 'arch')
290 files changed, 397 insertions, 653 deletions
diff --git a/arch/alpha/Kconfig.debug b/arch/alpha/Kconfig.debug index 36d0106c32e..f45f28cc10d 100644 --- a/arch/alpha/Kconfig.debug +++ b/arch/alpha/Kconfig.debug @@ -16,14 +16,6 @@ config DEBUG_RWLOCK too many attempts. If you suspect a rwlock problem or a kernel hacker asks for this option then say Y. Otherwise say N. -config DEBUG_SEMAPHORE - bool "Semaphore debugging" - depends on DEBUG_KERNEL - help - If you say Y here then semaphore processing will issue lots of - verbose debugging messages. If you suspect a semaphore problem or a - kernel hacker asks for this option then say Y. Otherwise say N. - config ALPHA_LEGACY_START_ADDRESS bool "Legacy kernel start address" depends on ALPHA_GENERIC diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index ea405f5713c..ce857158c1e 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c @@ -953,15 +953,25 @@ osf_setitimer(int which, struct itimerval32 __user *in, struct itimerval32 __use asmlinkage int osf_utimes(char __user *filename, struct timeval32 __user *tvs) { - struct timeval ktvs[2]; + struct timespec tv[2]; if (tvs) { + struct timeval ktvs[2]; if (get_tv32(&ktvs[0], &tvs[0]) || get_tv32(&ktvs[1], &tvs[1])) return -EFAULT; + + if (ktvs[0].tv_usec < 0 || ktvs[0].tv_usec >= 1000000 || + ktvs[1].tv_usec < 0 || ktvs[1].tv_usec >= 1000000) + return -EINVAL; + + tv[0].tv_sec = ktvs[0].tv_sec; + tv[0].tv_nsec = 1000 * ktvs[0].tv_usec; + tv[1].tv_sec = ktvs[1].tv_sec; + tv[1].tv_nsec = 1000 * ktvs[1].tv_usec; } - return do_utimes(AT_FDCWD, filename, tvs ? ktvs : NULL); + return do_utimes(AT_FDCWD, filename, tvs ? tv : NULL, 0); } #define MAX_SELECT_SECONDS \ diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c index c1518639069..92b61629fe3 100644 --- a/arch/alpha/kernel/process.c +++ b/arch/alpha/kernel/process.c @@ -14,7 +14,6 @@ #include <linux/kernel.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/stddef.h> #include <linux/unistd.h> #include <linux/ptrace.h> diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c index d352c2b05f1..915f26345c4 100644 --- a/arch/alpha/kernel/setup.c +++ b/arch/alpha/kernel/setup.c @@ -744,15 +744,6 @@ setup_arch(char **cmdline_p) paging_init(); } -void __init -disable_early_printk(void) -{ - if (alpha_using_srm && srmcons_output) { - unregister_srm_console(); - srmcons_output = 0; - } -} - static char sys_unknown[] = "Unknown"; static char systype_names[][16] = { "0", diff --git a/arch/alpha/kernel/signal.c b/arch/alpha/kernel/signal.c index 741da0945dc..7f64aa767d5 100644 --- a/arch/alpha/kernel/signal.c +++ b/arch/alpha/kernel/signal.c @@ -15,7 +15,6 @@ #include <linux/unistd.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/stddef.h> #include <linux/tty.h> #include <linux/binfmts.h> diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c index d1ec4f51df1..80cfb758ee2 100644 --- a/arch/alpha/kernel/smp.c +++ b/arch/alpha/kernel/smp.c @@ -18,7 +18,6 @@ #include <linux/mm.h> #include <linux/threads.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/interrupt.h> #include <linux/init.h> #include <linux/delay.h> diff --git a/arch/alpha/kernel/srmcons.c b/arch/alpha/kernel/srmcons.c index 85a821aaceb..930cedc8be2 100644 --- a/arch/alpha/kernel/srmcons.c +++ b/arch/alpha/kernel/srmcons.c @@ -300,7 +300,7 @@ static struct console srmcons = { .write = srm_console_write, .device = srm_console_device, .setup = srm_console_setup, - .flags = CON_PRINTBUFFER, + .flags = CON_PRINTBUFFER | CON_BOOT, .index = -1, }; diff --git a/arch/alpha/mm/fault.c b/arch/alpha/mm/fault.c index 8aa9db834c1..f5862792a16 100644 --- a/arch/alpha/mm/fault.c +++ b/arch/alpha/mm/fault.c @@ -21,7 +21,6 @@ #include <linux/ptrace.h> #include <linux/mman.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/interrupt.h> #include <linux/module.h> diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c index 13af4006a40..6f2f46c2e40 100644 --- a/arch/arm/kernel/ptrace.c +++ b/arch/arm/kernel/ptrace.c @@ -13,7 +13,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/ptrace.h> #include <linux/user.h> #include <linux/security.h> diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index f05e66b0f86..10ff36e4e41 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c @@ -245,8 +245,8 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err) do_exit(SIGSEGV); } -void notify_die(const char *str, struct pt_regs *regs, struct siginfo *info, - unsigned long err, unsigned long trap) +void arm_notify_die(const char *str, struct pt_regs *regs, + struct siginfo *info, unsigned long err, unsigned long trap) { if (user_mode(regs)) { current->thread.error_code = err; @@ -330,7 +330,7 @@ asmlinkage void __exception do_undefinstr(struct pt_regs *regs) info.si_code = ILL_ILLOPC; info.si_addr = pc; - notify_die("Oops - undefined instruction", regs, &info, 0, 6); + arm_notify_die("Oops - undefined instruction", regs, &info, 0, 6); } asmlinkage void do_unexp_fiq (struct pt_regs *regs) @@ -384,7 +384,7 @@ static int bad_syscall(int n, struct pt_regs *regs) info.si_addr = (void __user *)instruction_pointer(regs) - (thumb_mode(regs) ? 2 : 4); - notify_die("Oops - bad syscall", regs, &info, n, 0); + arm_notify_die("Oops - bad syscall", regs, &info, n, 0); return regs->ARM_r0; } @@ -428,7 +428,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) info.si_code = SEGV_MAPERR; info.si_addr = NULL; - notify_die("branch through zero", regs, &info, 0, 0); + arm_notify_die("branch through zero", regs, &info, 0, 0); return 0; case NR(breakpoint): /* SWI BREAK_POINT */ @@ -564,7 +564,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) info.si_addr = (void __user *)instruction_pointer(regs) - (thumb_mode(regs) ? 2 : 4); - notify_die("Oops - bad syscall(2)", regs, &info, no, 0); + arm_notify_die("Oops - bad syscall(2)", regs, &info, no, 0); return 0; } @@ -638,7 +638,7 @@ baddataabort(int code, unsigned long instr, struct pt_regs *regs) info.si_code = ILL_ILLOPC; info.si_addr = (void __user *)addr; - notify_die("unknown data abort code", regs, &info, instr, 0); + arm_notify_die("unknown data abort code", regs, &info, instr, 0); } void __attribute__((noreturn)) __bug(const char *file, int line) diff --git a/arch/arm/mach-aaec2000/core.c b/arch/arm/mach-aaec2000/core.c index a950160fcfb..0446ef2f5bd 100644 --- a/arch/arm/mach-aaec2000/core.c +++ b/arch/arm/mach-aaec2000/core.c @@ -142,7 +142,7 @@ aaec2000_timer_interrupt(int irq, void *dev_id) static struct irqaction aaec2000_timer_irq = { .name = "AAEC-2000 Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, .handler = aaec2000_timer_interrupt, }; diff --git a/arch/arm/mach-at91/at91rm9200_time.c b/arch/arm/mach-at91/at91rm9200_time.c index 949199a244c..a6340357585 100644 --- a/arch/arm/mach-at91/at91rm9200_time.c +++ b/arch/arm/mach-at91/at91rm9200_time.c @@ -87,7 +87,7 @@ static irqreturn_t at91rm9200_timer_interrupt(int irq, void *dev_id) static struct irqaction at91rm9200_timer_irq = { .name = "at91_tick", - .flags = IRQF_SHARED | IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_SHARED | IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, .handler = at91rm9200_timer_interrupt }; diff --git a/arch/arm/mach-at91/at91sam926x_time.c b/arch/arm/mach-at91/at91sam926x_time.c index a4dded27fa1..5c090c9442f 100644 --- a/arch/arm/mach-at91/at91sam926x_time.c +++ b/arch/arm/mach-at91/at91sam926x_time.c @@ -66,7 +66,7 @@ static irqreturn_t at91sam926x_timer_interrupt(int irq, void *dev_id) static struct irqaction at91sam926x_timer_irq = { .name = "at91_tick", - .flags = IRQF_SHARED | IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_SHARED | IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, .handler = at91sam926x_timer_interrupt }; diff --git a/arch/arm/mach-clps711x/time.c b/arch/arm/mach-clps711x/time.c index 428493dd468..f428af7545b 100644 --- a/arch/arm/mach-clps711x/time.c +++ b/arch/arm/mach-clps711x/time.c @@ -58,7 +58,7 @@ p720t_timer_interrupt(int irq, void *dev_id) static struct irqaction clps711x_timer_irq = { .name = "CLPS711x Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, .handler = p720t_timer_interrupt, }; diff --git a/arch/arm/mach-clps7500/core.c b/arch/arm/mach-clps7500/core.c index 231b9000473..4dde34f25e6 100644 --- a/arch/arm/mach-clps7500/core.c +++ b/arch/arm/mach-clps7500/core.c @@ -316,7 +316,7 @@ clps7500_timer_interrupt(int irq, void *dev_id) static struct irqaction clps7500_timer_irq = { .name = "CLPS7500 Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, .handler = clps7500_timer_interrupt, }; diff --git a/arch/arm/mach-ebsa110/core.c b/arch/arm/mach-ebsa110/core.c index 8459431cfd7..8c1b5690dfe 100644 --- a/arch/arm/mach-ebsa110/core.c +++ b/arch/arm/mach-ebsa110/core.c @@ -199,7 +199,7 @@ ebsa110_timer_interrupt(int irq, void *dev_id) static struct irqaction ebsa110_timer_irq = { .name = "EBSA110 Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, .handler = ebsa110_timer_interrupt, }; diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index 829aed696d9..851cc7158ca 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c @@ -116,7 +116,7 @@ static int ep93xx_timer_interrupt(int irq, void *dev_id) static struct irqaction ep93xx_timer_irq = { .name = "ep93xx timer", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, .handler = ep93xx_timer_interrupt, }; diff --git a/arch/arm/mach-footbridge/dc21285-timer.c b/arch/arm/mach-footbridge/dc21285-timer.c index fa6be870c6c..3a63941d43b 100644 --- a/arch/arm/mach-footbridge/dc21285-timer.c +++ b/arch/arm/mach-footbridge/dc21285-timer.c @@ -44,7 +44,7 @@ timer1_interrupt(int irq, void *dev_id) static struct irqaction footbridge_timer_irq = { .name = "Timer1 timer tick", .handler = timer1_interrupt, - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, }; /* diff --git a/arch/arm/mach-footbridge/isa-timer.c b/arch/arm/mach-footbridge/isa-timer.c index d884a3954fb..d08d64139d0 100644 --- a/arch/arm/mach-footbridge/isa-timer.c +++ b/arch/arm/mach-footbridge/isa-timer.c @@ -73,7 +73,7 @@ isa_timer_interrupt(int irq, void *dev_id) static struct irqaction isa_timer_irq = { .name = "ISA timer tick", .handler = isa_timer_interrupt, - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, }; static void __init isa_timer_init(void) diff --git a/arch/arm/mach-h720x/cpu-h7201.c b/arch/arm/mach-h720x/cpu-h7201.c index 13f76bdb3d9..9107b8e2ad6 100644 --- a/arch/arm/mach-h720x/cpu-h7201.c +++ b/arch/arm/mach-h720x/cpu-h7201.c @@ -41,7 +41,7 @@ h7201_timer_interrupt(int irq, void *dev_id) static struct irqaction h7201_timer_irq = { .name = "h7201 Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, .handler = h7201_timer_interrupt, }; diff --git a/arch/arm/mach-h720x/cpu-h7202.c b/arch/arm/mach-h720x/cpu-h7202.c index 703870f30ad..82e420d6fd1 100644 --- a/arch/arm/mach-h720x/cpu-h7202.c +++ b/arch/arm/mach-h720x/cpu-h7202.c @@ -170,7 +170,7 @@ static struct irq_chip h7202_timerx_chip = { static struct irqaction h7202_timer_irq = { .name = "h7202 Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, .handler = h7202_timer_interrupt, }; diff --git a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c index 2703a730baf..6960a9d0421 100644 --- a/arch/arm/mach-imx/time.c +++ b/arch/arm/mach-imx/time.c @@ -56,7 +56,7 @@ imx_timer_interrupt(int irq, void *dev_id) static struct irqaction imx_timer_irq = { .name = "i.MX Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, .handler = imx_timer_interrupt, }; diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c index 8d880cb9ba3..897c21c2fb5 100644 --- a/arch/arm/mach-integrator/core.c +++ b/arch/arm/mach-integrator/core.c @@ -282,7 +282,7 @@ integrator_timer_interrupt(int irq, void *dev_id) static struct irqaction integrator_timer_irq = { .name = "Integrator Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, .handler = integrator_timer_interrupt, }; diff --git a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c index 9cf2498dc99..cb6ad211887 100644 --- a/arch/arm/mach-ixp2000/core.c +++ b/arch/arm/mach-ixp2000/core.c @@ -224,7 +224,7 @@ static int ixp2000_timer_interrupt(int irq, void *dev_id) static struct irqaction ixp2000_timer_irq = { .name = "IXP2000 Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, .handler = ixp2000_timer_interrupt, }; diff --git a/arch/arm/mach-ixp23xx/core.c b/arch/arm/mach-ixp23xx/core.c index ce6ad635a00..b644bbab7d0 100644 --- a/arch/arm/mach-ixp23xx/core.c +++ b/arch/arm/mach-ixp23xx/core.c @@ -363,7 +363,7 @@ ixp23xx_timer_interrupt(int irq, void *dev_id) static struct irqaction ixp23xx_timer_irq = { .name = "IXP23xx Timer Tick", .handler = ixp23xx_timer_interrupt, - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, }; void __init ixp23xx_init_timer(void) diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c index f5cae1e46b7..64685da1462 100644 --- a/arch/arm/mach-ixp4xx/common.c +++ b/arch/arm/mach-ixp4xx/common.c @@ -279,7 +279,7 @@ static irqreturn_t ixp4xx_timer_interrupt(int irq, void *dev_id) static struct irqaction ixp4xx_timer_irq = { .name = "timer1", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, .handler = ixp4xx_timer_interrupt, }; diff --git a/arch/arm/mach-lh7a40x/time.c b/arch/arm/mach-lh7a40x/time.c index bef3c4b68d3..c25316d0253 100644 --- a/arch/arm/mach-lh7a40x/time.c +++ b/arch/arm/mach-lh7a40x/time.c @@ -53,7 +53,7 @@ lh7a40x_timer_interrupt(int irq, void *dev_id) static struct irqaction lh7a40x_timer_irq = { .name = "LHA740x Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, .handler = lh7a40x_timer_interrupt, }; diff --git a/arch/arm/mach-netx/time.c b/arch/arm/mach-netx/time.c index 7e132fcccd4..4762e207b0b 100644 --- a/arch/arm/mach-netx/time.c +++ b/arch/arm/mach-netx/time.c @@ -47,7 +47,7 @@ netx_timer_interrupt(int irq, void *dev_id) static struct irqaction netx_timer_irq = { .name = "NetX Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, .handler = netx_timer_interrupt, }; diff --git a/arch/arm/mach-ns9xxx/time.c b/arch/arm/mach-ns9xxx/time.c index eec05f18714..dd257084441 100644 --- a/arch/arm/mach-ns9xxx/time.c +++ b/arch/arm/mach-ns9xxx/time.c @@ -53,7 +53,7 @@ static unsigned long ns9xxx_timer_gettimeoffset(void) static struct irqaction ns9xxx_timer_irq = { .name = "NS9xxx Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, .handler = ns9xxx_timer_interrupt, }; diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c index 85e048b259f..3705d20c4e5 100644 --- a/arch/arm/mach-omap1/time.c +++ b/arch/arm/mach-omap1/time.c @@ -179,7 +179,7 @@ static irqreturn_t omap_mpu_timer1_interrupt(int irq, void *dev_id) static struct irqaction omap_mpu_timer1_irq = { .name = "mpu_timer1", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, .handler = omap_mpu_timer1_interrupt, }; diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c index 45d1aaa51b5..62e801ef9ad 100644 --- a/arch/arm/mach-omap2/timer-gp.c +++ b/arch/arm/mach-omap2/timer-gp.c @@ -52,7 +52,7 @@ static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id) static struct irqaction omap2_gp_timer_irq = { .name = "gp timer", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, .handler = omap2_gp_timer_interrupt, }; diff --git a/arch/arm/mach-pnx4008/time.c b/arch/arm/mach-pnx4008/time.c index 8621c206ac8..67e05f005a6 100644 --- a/arch/arm/mach-pnx4008/time.c +++ b/arch/arm/mach-pnx4008/time.c @@ -82,7 +82,7 @@ static irqreturn_t pnx4008_timer_interrupt(int irq, void *dev_id) static struct irqaction pnx4008_timer_irq = { .name = "PNX4008 Tick Timer", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, .handler = pnx4008_timer_interrupt }; diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c index fc3b82a740a..5248abe334d 100644 --- a/arch/arm/mach-pxa/time.c +++ b/arch/arm/mach-pxa/time.c @@ -97,7 +97,7 @@ pxa_timer_interrupt(int irq, void *dev_id) static struct irqaction pxa_timer_irq = { .name = "PXA Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, .handler = pxa_timer_interrupt, }; diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index 84d3fe76e94..c7f1b44da40 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c @@ -549,7 +549,7 @@ static irqreturn_t realview_timer_interrupt(int irq, void *dev_id) static struct irqaction realview_timer_irq = { .name = "RealView Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, .handler = realview_timer_interrupt, }; diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c index b034ad69a32..b72fee0f253 100644 --- a/arch/arm/mach-sa1100/h3600.c +++ b/arch/arm/mach-sa1100/h3600.c @@ -740,7 +740,7 @@ static void h3800_IRQ_demux(unsigned int irq, struct irq_desc *desc) static struct irqaction h3800_irq = { .name = "h3800_asic", .handler = h3800_IRQ_demux, - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, }; u32 kpio_int_shadow = 0; diff --git a/arch/arm/mach-sa1100/time.c b/arch/arm/mach-sa1100/time.c index 29c89f9eb2c..416e277054c 100644 --- a/arch/arm/mach-sa1100/time.c +++ b/arch/arm/mach-sa1100/time.c @@ -111,7 +111,7 @@ sa1100_timer_interrupt(int irq, void *dev_id) static struct irqaction sa1100_timer_irq = { .name = "SA11xx Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, .handler = sa1100_timer_interrupt, }; diff --git a/arch/arm/mach-shark/core.c b/arch/arm/mach-shark/core.c index 0e480fae8ec..a0545db2a34 100644 --- a/arch/arm/mach-shark/core.c +++ b/arch/arm/mach-shark/core.c @@ -90,7 +90,7 @@ shark_timer_interrupt(int irq, void *dev_id) static struct irqaction shark_timer_irq = { .name = "Shark Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, .handler = shark_timer_interrupt, }; diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index 1275aa7d2eb..a7dd09436cb 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c @@ -891,7 +891,7 @@ static irqreturn_t versatile_timer_interrupt(int irq, void *dev_id) static struct irqaction versatile_timer_irq = { .name = "Versatile Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, .handler = versatile_timer_interrupt, }; diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index 5d9ce7deb4a..75d491448e4 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c @@ -453,7 +453,7 @@ do_DataAbort(unsigned long addr, unsigned int fsr, struct pt_regs *regs) info.si_errno = 0; info.si_code = inf->code; info.si_addr = (void __user *)addr; - notify_die("", regs, &info, fsr, 0); + arm_notify_die("", regs, &info, fsr, 0); } asmlinkage void __exception diff --git a/arch/arm/plat-iop/time.c b/arch/arm/plat-iop/time.c index 0cc26da034a..100d57ad98e 100644 --- a/arch/arm/plat-iop/time.c +++ b/arch/arm/plat-iop/time.c @@ -75,7 +75,7 @@ iop_timer_interrupt(int irq, void *dev_id) static struct irqaction iop_timer_irq = { .name = "IOP Timer Tick", .handler = iop_timer_interrupt, - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, }; void __init iop_init_time(unsigned long tick_rate) diff --git a/arch/arm/plat-omap/timer32k.c b/arch/arm/plat-omap/timer32k.c index 114f87151d6..2feceec8ecc 100644 --- a/arch/arm/plat-omap/timer32k.c +++ b/arch/arm/plat-omap/timer32k.c @@ -215,7 +215,7 @@ static irqreturn_t omap_32k_timer_interrupt(int irq, void *dev_id) static struct irqaction omap_32k_timer_irq = { .name = "32KHz timer", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, .handler = omap_32k_timer_interrupt, }; diff --git a/arch/arm/plat-s3c24xx/time.c b/arch/arm/plat-s3c24xx/time.c index c523d1c9cce..b7667375bce 100644 --- a/arch/arm/plat-s3c24xx/time.c +++ b/arch/arm/plat-s3c24xx/time.c @@ -138,7 +138,7 @@ s3c2410_timer_interrupt(int irq, void *dev_id) static struct irqaction s3c2410_timer_irq = { .name = "S3C2410 Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, .handler = s3c2410_timer_interrupt, }; diff --git a/arch/arm26/kernel/armksyms.c b/arch/arm26/kernel/armksyms.c index 93293d04b30..f735d7e018e 100644 --- a/arch/arm26/kernel/armksyms.c +++ b/arch/arm26/kernel/armksyms.c @@ -20,7 +20,6 @@ #include <linux/pm.h> #include <linux/tty.h> #include <linux/vt_kern.h> -#include <linux/smp_lock.h> #include <linux/syscalls.h> #include <asm/byteorder.h> diff --git a/arch/arm26/kernel/ptrace.c b/arch/arm26/kernel/ptrace.c index 9343889b27f..41692795672 100644 --- a/arch/arm26/kernel/ptrace.c +++ b/arch/arm26/kernel/ptrace.c @@ -13,7 +13,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/ptrace.h> #include <linux/user.h> #include <linux/security.h> diff --git a/arch/arm26/kernel/signal.c b/arch/arm26/kernel/signal.c index 6a8ef8da6da..379b82dc645 100644 --- a/arch/arm26/kernel/signal.c +++ b/arch/arm26/kernel/signal.c @@ -13,7 +13,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/kernel.h> #include <linux/errno.h> #include <linux/signal.h> diff --git a/arch/arm26/mm/memc.c b/arch/arm26/mm/memc.c index f2901581d4d..42505541a9b 100644 --- a/arch/arm26/mm/memc.c +++ b/arch/arm26/mm/memc.c @@ -176,13 +176,9 @@ void __init pgtable_cache_init(void) { pte_cache = kmem_cache_create("pte-cache", sizeof(pte_t) * PTRS_PER_PTE, - 0, 0, pte_cache_ctor, NULL); - if (!pte_cache) - BUG(); + 0, SLAB_PANIC, pte_cache_ctor, NULL); pgd_cache = kmem_cache_create("pgd-cache", MEMC_TABLE_SIZE + sizeof(pgd_t) * PTRS_PER_PGD, - 0, 0, pgd_cache_ctor, NULL); - if (!pgd_cache) - BUG(); + 0, SLAB_PANIC, pgd_cache_ctor, NULL); } diff --git a/arch/avr32/kernel/kprobes.c b/arch/avr32/kernel/kprobes.c index d0abbcaf1c1..004c94b6fc1 100644 --- a/arch/avr32/kernel/kprobes.c +++ b/arch/avr32/kernel/kprobes.c @@ -15,7 +15,7 @@ #include <linux/ptrace.h> #include <asm/cacheflush.h> -#include <asm/kdebug.h> +#include <linux/kdebug.h> #include <asm/ocd.h> DEFINE_PER_CPU(struct kprobe *, current_kprobe); diff --git a/arch/avr32/kernel/ptrace.c b/arch/avr32/kernel/ptrace.c index 6f4388f7c20..8ac74dddbbd 100644 --- a/arch/avr32/kernel/ptrace.c +++ b/arch/avr32/kernel/ptrace.c @@ -9,7 +9,6 @@ #include <linux/kernel.h> #include <linux/sched.h> #include <linux/mm.h> -#include <linux/smp_lock.h> #include <linux/ptrace.h> #include <linux/errno.h> #include <linux/user.h> @@ -21,7 +20,7 @@ #include <asm/uaccess.h> #include <asm/ocd.h> #include <asm/mmu_context.h> -#include <asm/kdebug.h> +#include <linux/kdebug.h> static struct pt_regs *get_user_regs(struct task_struct *tsk) { @@ -300,7 +299,7 @@ asmlinkage void do_debug_priv(struct pt_regs *regs) else die_val = DIE_BREAKPOINT; - if (notify_die(die_val, regs, 0, SIGTRAP) == NOTIFY_STOP) + if (notify_die(die_val, "ptrace", regs, 0, 0, SIGTRAP) == NOTIFY_STOP) return; if (likely(ds & DS_SSS)) { diff --git a/arch/avr32/kernel/traps.c b/arch/avr32/kernel/traps.c index 4f0382d8483..4de9edf96ed 100644 --- a/arch/avr32/kernel/traps.c +++ b/arch/avr32/kernel/traps.c @@ -20,20 +20,6 @@ #include <asm/sysreg.h> #include <asm/traps.h> -ATOMIC_NOTIFIER_HEAD(avr32_die_chain); - -int register_die_notifier(struct notifier_block *nb) -{ - return atomic_notifier_chain_register(&avr32_die_chain, nb); -} -EXPORT_SYMBOL(register_die_notifier); - -int unregister_die_notifier(struct notifier_block *nb) -{ - return atomic_notifier_chain_unregister(&avr32_die_chain, nb); -} -EXPORT_SYMBOL(unregister_die_notifier); - static DEFINE_SPINLOCK(die_lock); void NORET_TYPE die(const char *str, struct pt_regs *regs, long err) diff --git a/arch/avr32/mm/fault.c b/arch/avr32/mm/fault.c index 146ebdbdc30..88b00b15970 100644 --- a/arch/avr32/mm/fault.c +++ b/arch/avr32/mm/fault.c @@ -13,7 +13,7 @@ #include <linux/module.h> #include <linux/pagemap.h> -#include <asm/kdebug.h> +#include <linux/kdebug.h> #include <asm/mmu_context.h> #include <asm/sysreg.h> #include <asm/tlb.h> diff --git a/arch/cris/arch-v10/kernel/ptrace.c b/arch/cris/arch-v10/kernel/ptrace.c index 961c0d58ded..fd2129a0458 100644 --- a/arch/cris/arch-v10/kernel/ptrace.c +++ b/arch/cris/arch-v10/kernel/ptrace.c @@ -6,7 +6,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/errno.h> #include <linux/ptrace.h> #include <linux/user.h> diff --git a/arch/cris/arch-v10/kernel/signal.c b/arch/cris/arch-v10/kernel/signal.c index 19bcad05716..41d4a5f9328 100644 --- a/arch/cris/arch-v10/kernel/signal.c +++ b/arch/cris/arch-v10/kernel/signal.c @@ -16,7 +16,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/kernel.h> #include <linux/signal.h> #include <linux/errno.h> diff --git a/arch/cris/arch-v32/drivers/pci/dma.c b/arch/cris/arch-v32/drivers/pci/dma.c index 70d3bf0c92e..832fc63504d 100644 --- a/arch/cris/arch-v32/drivers/pci/dma.c +++ b/arch/cris/arch-v32/drivers/pci/dma.c @@ -76,7 +76,7 @@ int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, { void __iomem *mem_base; int pages = size >> PAGE_SHIFT; - int bitmap_size = (pages + 31)/32; + int bitmap_size = BITS_TO_LONGS(pages) * sizeof(long); if ((flags & (DMA_MEMORY_MAP | DMA_MEMORY_IO)) == 0) goto out; diff --git a/arch/cris/arch-v32/kernel/ptrace.c b/arch/cris/arch-v32/kernel/ptrace.c index 82cf2e3624a..d4d57b74133 100644 --- a/arch/cris/arch-v32/kernel/ptrace.c +++ b/arch/cris/arch-v32/kernel/ptrace.c @@ -6,7 +6,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/errno.h> #include <linux/ptrace.h> #include <linux/user.h> diff --git a/arch/cris/kernel/crisksyms.c b/arch/cris/kernel/crisksyms.c index 1f20c16ac2a..105bb5ed48f 100644 --- a/arch/cris/kernel/crisksyms.c +++ b/arch/cris/kernel/crisksyms.c @@ -4,7 +4,6 @@ #include <linux/sched.h> #include <linux/in6.h> #include <linux/interrupt.h> -#include <linux/smp_lock.h> #include <linux/pm.h> #include <linux/kernel.h> #include <linux/string.h> diff --git a/arch/cris/kernel/ptrace.c b/arch/cris/kernel/ptrace.c index 2b6363cbe98..1085d037027 100644 --- a/arch/cris/kernel/ptrace.c +++ b/arch/cris/kernel/ptrace.c @@ -67,7 +67,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/errno.h> #include <linux/ptrace.h> #include <linux/user.h> diff --git a/arch/frv/kernel/irq.c b/arch/frv/kernel/irq.c index 87f360a4ea2..c7e59dcadee 100644 --- a/arch/frv/kernel/irq.c +++ b/arch/frv/kernel/irq.c @@ -18,7 +18,6 @@ #include <linux/timex.h> #include <linux/slab.h> #include <linux/random.h> -#include <linux/smp_lock.h> #include <linux/init.h> #include <linux/kernel_stat.h> #include <linux/irq.h> diff --git a/arch/frv/kernel/ptrace.c b/arch/frv/kernel/ptrace.c index fcff819b434..ce88fb95ee5 100644 --- a/arch/frv/kernel/ptrace.c +++ b/arch/frv/kernel/ptrace.c @@ -14,7 +14,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/errno.h> #include <linux/ptrace.h> #include <linux/user.h> diff --git a/arch/frv/kernel/semaphore.c b/arch/frv/kernel/semaphore.c index f278cdf3a72..8e182ced1a0 100644 --- a/arch/frv/kernel/semaphore.c +++ b/arch/frv/kernel/semaphore.c @@ -19,7 +19,7 @@ struct sem_waiter { struct task_struct *task; }; -#if SEMAPHORE_DEBUG +#ifdef CONFIG_DEBUG_SEMAPHORE void semtrace(struct semaphore *sem, const char *str) { if (sem->debug) diff --git a/arch/frv/kernel/signal.c b/arch/frv/kernel/signal.c index 85baeae9666..d64bcaff54c 100644 --- a/arch/frv/kernel/signal.c +++ b/arch/frv/kernel/signal.c @@ -13,7 +13,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/kernel.h> #include <linux/signal.h> #include <linux/errno.h> diff --git a/arch/frv/kernel/sys_frv.c b/arch/frv/kernel/sys_frv.c index c4d4348c9e8..26b3df32b9a 100644 --- a/arch/frv/kernel/sys_frv.c +++ b/arch/frv/kernel/sys_frv.c @@ -14,7 +14,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/sem.h> #include <linux/msg.h> #include <linux/shm.h> diff --git a/arch/frv/mm/pgalloc.c b/arch/frv/mm/pgalloc.c index 19b13be114a..598a26ab8ad 100644 --- a/arch/frv/mm/pgalloc.c +++ b/arch/frv/mm/pgalloc.c @@ -151,9 +151,7 @@ void __init pgtable_cache_init(void) pgd_cache = kmem_cache_create("pgd", PTRS_PER_PGD * sizeof(pgd_t), PTRS_PER_PGD * sizeof(pgd_t), - 0, + SLAB_PANIC, pgd_ctor, pgd_dtor); - if (!pgd_cache) - panic("pgtable_cache_init(): Cannot create pgd cache"); } diff --git a/arch/h8300/kernel/ptrace.c b/arch/h8300/kernel/ptrace.c index f6031373dc2..8f2411db7ea 100644 --- a/arch/h8300/kernel/ptrace.c +++ b/arch/h8300/kernel/ptrace.c @@ -19,7 +19,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/errno.h> #include <linux/ptrace.h> #include <linux/user.h> diff --git a/arch/h8300/kernel/sys_h8300.c b/arch/h8300/kernel/sys_h8300.c index 302a2dfe634..11ba75a0522 100644 --- a/arch/h8300/kernel/sys_h8300.c +++ b/arch/h8300/kernel/sys_h8300.c @@ -10,7 +10,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/sem.h> #include <linux/msg.h> #include <linux/shm.h> diff --git a/arch/i386/boot/video.S b/arch/i386/boot/video.S index 8143c9516cb..5e2280cf445 100644 --- a/arch/i386/boot/video.S +++ b/arch/i386/boot/video.S @@ -496,9 +496,11 @@ mode_set: cmpb $VIDEO_FIRST_V7>>8, %ah jz setv7 +#ifdef CONFIG_FB cmpb $VIDEO_FIRST_VESA>>8, %ah jnc check_vesa - +#endif + orb %ah, %ah jz setmenu diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile index 4f98516b9f9..91cff8dc9e1 100644 --- a/arch/i386/kernel/Makefile +++ b/arch/i386/kernel/Makefile @@ -34,6 +34,7 @@ obj-y += sysenter.o vsyscall.o obj-$(CONFIG_ACPI_SRAT) += srat.o obj-$(CONFIG_EFI) += efi.o efi_stub.o obj-$(CONFIG_DOUBLEFAULT) += doublefault.o +obj-$(CONFIG_SERIAL_8250) += legacy_serial.o obj-$(CONFIG_VM86) += vm86.o obj-$(CONFIG_EARLY_PRINTK) += early_printk.o obj-$(CONFIG_HPET_TIMER) += hpet.o diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c index aca054cc055..67824f3bb97 100644 --- a/arch/i386/kernel/apic.c +++ b/arch/i386/kernel/apic.c @@ -19,7 +19,6 @@ #include <linux/mm.h> #include <linux/delay.h> #include <linux/bootmem.h> -#include <linux/smp_lock.h> #include <linux/interrupt.h> #include <linux/mc146818rtc.h> #include <linux/kernel_stat.h> diff --git a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c index 367ff1d930c..4112afe712b 100644 --- a/arch/i386/kernel/apm.c +++ b/arch/i386/kernel/apm.c @@ -223,7 +223,6 @@ #include <linux/device.h> #include <linux/kernel.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/dmi.h> #include <linux/suspend.h> #include <linux/kthread.h> @@ -1173,7 +1172,7 @@ static void reinit_timer(void) unsigned long flags; spin_lock_irqsave(&i8253_lock, flags); - /* set the clock to 100 Hz */ + /* set the clock to HZ */ outb_p(0x34, PIT_MODE); /* binary, mode 2, LSB/MSB, ch 0 */ udelay(10); outb_p(LATCH & 0xff, PIT_CH0); /* LSB */ diff --git a/arch/i386/kernel/crash.c b/arch/i386/kernel/crash.c index a5e0e990ea9..53589d1b1a0 100644 --- a/arch/i386/kernel/crash.c +++ b/arch/i386/kernel/crash.c @@ -22,7 +22,7 @@ #include <asm/nmi.h> #include <asm/hw_irq.h> #include <asm/apic.h> -#include <asm/kdebug.h> +#include <linux/kdebug.h> #include <asm/smp.h> #include <mach_ipi.h> diff --git a/arch/i386/kernel/efi.c b/arch/i386/kernel/efi.c index dd9e7faafa7..a1808022ea1 100644 --- a/arch/i386/kernel/efi.c +++ b/arch/i386/kernel/efi.c @@ -347,14 +347,12 @@ void __init efi_init(void) printk(KERN_ERR PFX "Woah! Couldn't map the EFI system table.\n"); if (efi.systab->hdr.signature != EFI_SYSTEM_TABLE_SIGNATURE) printk(KERN_ERR PFX "Woah! EFI system table signature incorrect\n"); - if ((efi.systab->hdr.revision ^ EFI_SYSTEM_TABLE_REVISION) >> 16 != 0) - printk(KERN_ERR PFX - "Warning: EFI system table major version mismatch: " - "got %d.%02d, expected %d.%02d\n", + if ((efi.systab->hdr.revision >> 16) == 0) + printk(KERN_ERR PFX "Warning: EFI system table version " + "%d.%02d, expected 1.00 or greater\n", efi.systab->hdr.revision >> 16, - efi.systab->hdr.revision & 0xffff, - EFI_SYSTEM_TABLE_REVISION >> 16, - EFI_SYSTEM_TABLE_REVISION & 0xffff); + efi.systab->hdr.revision & 0xffff); + /* * Grab some details from the system table */ diff --git a/arch/i386/kernel/i8259.c b/arch/i386/kernel/i8259.c index 03abfdb1a6e..0499cbe9871 100644 --- a/arch/i386/kernel/i8259.c +++ b/arch/i386/kernel/i8259.c @@ -5,7 +5,6 @@ #include <linux/interrupt.h> #include <linux/slab.h> #include <linux/random.h> -#include <linux/smp_lock.h> #include <linux/init.h> #include <linux/kernel_stat.h> #include <linux/sysdev.h> diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c index 1b623cda3a6..7f8b7af2b95 100644 --- a/arch/i386/kernel/io_apic.c +++ b/arch/i386/kernel/io_apic.c @@ -25,7 +25,6 @@ #include <linux/init.h> #include <linux/delay.h> #include <linux/sched.h> -#include <linux/smp_lock.h> #include <linux/mc146818rtc.h> #include <linux/compiler.h> #include <linux/acpi.h> diff --git a/arch/i386/kernel/ioport.c b/arch/i386/kernel/ioport.c index d1e42e0dbe6..3d310a946d7 100644 --- a/arch/i386/kernel/ioport.c +++ b/arch/i386/kernel/ioport.c @@ -12,7 +12,6 @@ #include <linux/types.h> #include <linux/ioport.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/stddef.h> #include <linux/slab.h> #include <linux/thread_info.h> diff --git a/arch/i386/kernel/kprobes.c b/arch/i386/kernel/kprobes.c index b545bc746fc..dde828a333c 100644 --- a/arch/i386/kernel/kprobes.c +++ b/arch/i386/kernel/kprobes.c @@ -31,8 +31,8 @@ #include <linux/kprobes.h> #include <linux/ptrace.h> #include <linux/preempt.h> +#include <linux/kdebug.h> #include <asm/cacheflush.h> -#include <asm/kdebug.h> #include <asm/desc.h> #include <asm/uaccess.h> @@ -226,24 +226,15 @@ static void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs) } /* Called with kretprobe_lock held */ -void __kprobes arch_prepare_kretprobe(struct kretprobe *rp, +void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri, struct pt_regs *regs) { unsigned long *sara = (unsigned long *)®s->esp; - struct kretprobe_instance *ri; + ri->ret_addr = (kprobe_opcode_t *) *sara; - if ((ri = get_free_rp_inst(rp)) != NULL) { - ri->rp = rp; - ri->task = current; - ri->ret_addr = (kprobe_opcode_t *) *sara; - - /* Replace the return addr with trampoline addr */ - *sara = (unsigned long) &kretprobe_trampoline; - add_rp_inst(ri); - } else { - rp->nmissed++; - } + /* Replace the return addr with trampoline addr */ + *sara = (unsigned long) &kretprobe_trampoline; } /* @@ -449,8 +440,7 @@ fastcall void *__kprobes trampoline_handler(struct pt_regs *regs) break; } - BUG_ON(!orig_ret_address || (orig_ret_address == trampoline_address)); - + kretprobe_assert(ri, orig_ret_address, trampoline_address); spin_unlock_irqrestore(&kretprobe_lock, flags); hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) { @@ -753,6 +743,11 @@ int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs) return 0; } +int __kprobes arch_trampoline_kprobe(struct kprobe *p) +{ + return 0; +} + int __init arch_init_kprobes(void) { return 0; diff --git a/arch/i386/kernel/ldt.c b/arch/i386/kernel/ldt.c index b410e5fb034..e0b2d17f4f1 100644 --- a/arch/i386/kernel/ldt.c +++ b/arch/i386/kernel/ldt.c @@ -10,7 +10,6 @@ #include <linux/string.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/vmalloc.h> #include <linux/slab.h> diff --git a/arch/i386/kernel/legacy_serial.c b/arch/i386/kernel/legacy_serial.c new file mode 100644 index 00000000000..21510118544 --- /dev/null +++ b/arch/i386/kernel/legacy_serial.c @@ -0,0 +1,67 @@ +/* + * Legacy COM port devices for x86 platforms without PNPBIOS or ACPI. + * Data taken from include/asm-i386/serial.h. + * + * (c) Copyright 2007 Hewlett-Packard Development Company, L.P. + * Bjorn Helgaas <bjorn.helgaas@hp.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include <linux/module.h> +#include <linux/init.h> +#include <linux/pnp.h> +#include <linux/serial_8250.h> + +/* Standard COM flags (except for COM4, because of the 8514 problem) */ +#ifdef CONFIG_SERIAL_DETECT_IRQ +#define COM_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_AUTO_IRQ) +#define COM4_FLAGS (UPF_BOOT_AUTOCONF | UPF_AUTO_IRQ) +#else +#define COM_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST) +#define COM4_FLAGS UPF_BOOT_AUTOCONF +#endif + +#define PORT(_base,_irq,_flags) \ + { \ + .iobase = _base, \ + .irq = _irq, \ + .uartclk = 1843200, \ + .iotype = UPIO_PORT, \ + .flags = _flags, \ + } + +static struct plat_serial8250_port x86_com_data[] = { + PORT(0x3F8, 4, COM_FLAGS), + PORT(0x2F8, 3, COM_FLAGS), + PORT(0x3E8, 4, COM_FLAGS), + PORT(0x2E8, 3, COM4_FLAGS), + { }, +}; + +static struct platform_device x86_com_device = { + .name = "serial8250", + .id = PLAT8250_DEV_PLATFORM, + .dev = { + .platform_data = x86_com_data, + }, +}; + +static int force_legacy_probe; +module_param_named(force, force_legacy_probe, bool, 0); +MODULE_PARM_DESC(force, "Force legacy serial port probe"); + +static int __init serial8250_x86_com_init(void) +{ + if (pnp_platform_devices && !force_legacy_probe) + return -ENODEV; + + return platform_device_register(&x86_com_device); +} + +module_init(serial8250_x86_com_init); + +MODULE_AUTHOR("Bjorn Helgaas"); +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("Generic 8250/16x50 legacy probe module"); diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c index 0952eccd8f2..13abb4ebfb7 100644 --- a/arch/i386/kernel/mpparse.c +++ b/arch/i386/kernel/mpparse.c @@ -18,7 +18,6 @@ #include <linux/acpi.h> #include <linux/delay.h> #include <linux/bootmem.h> -#include <linux/smp_lock.h> #include <linux/kernel_stat.h> #include <linux/mc146818rtc.h> #include <linux/bitops.h> diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c index 33cf2f3c444..fba121f7973 100644 --- a/arch/i386/kernel/nmi.c +++ b/arch/i386/kernel/nmi.c @@ -23,10 +23,10 @@ #include <linux/kprobes.h> #include <linux/cpumask.h> #include <linux/kernel_stat.h> +#include <linux/kdebug.h> #include <asm/smp.h> #include <asm/nmi.h> -#include <asm/kdebug.h> #include "mach_traps.h" diff --git a/arch/i386/kernel/pci-dma.c b/arch/i386/kernel/pci-dma.c index 3ebcea03362..30b754f7cbe 100644 --- a/arch/i386/kernel/pci-dma.c +++ b/arch/i386/kernel/pci-dma.c @@ -77,7 +77,7 @@ int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, { void __iomem *mem_base = NULL; int pages = size >> PAGE_SHIFT; - int bitmap_size = (pages + 31)/32; + int bitmap_size = BITS_TO_LONGS(pages) * sizeof(long); if ((flags & (DMA_MEMORY_MAP | DMA_MEMORY_IO)) == 0) goto out; diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c index 61999479b7a..d76d9bc33b3 100644 --- a/arch/i386/kernel/process.c +++ b/arch/i386/kernel/process.c @@ -21,7 +21,6 @@ #include <linux/mm.h> #include <linux/elfcore.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/stddef.h> #include <linux/slab.h> #include <linux/vmalloc.h> diff --git a/arch/i386/kernel/ptrace.c b/arch/i386/kernel/ptrace.c index 4a8f8a25972..0c0ceec5de0 100644 --- a/arch/i386/kernel/ptrace.c +++ b/arch/i386/kernel/ptrace.c @@ -9,7 +9,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/errno.h> #include <linux/ptrace.h> #include <linux/user.h> diff --git a/arch/i386/kernel/signal.c b/arch/i386/kernel/signal.c index 4f99e870c98..d574e38f0f7 100644 --- a/arch/i386/kernel/signal.c +++ b/arch/i386/kernel/signal.c @@ -10,7 +10,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/kernel.h> #include <linux/signal.h> #include <linux/errno.h> diff --git a/arch/i386/kernel/smp.c b/arch/i386/kernel/smp.c index 89a45a9ddcd..93f202a855f 100644 --- a/arch/i386/kernel/smp.c +++ b/arch/i386/kernel/smp.c @@ -13,7 +13,6 @@ #include <linux/mm.h> #include <linux/delay.h> #include <linux/spinlock.h> -#include <linux/smp_lock.h> #include <linux/kernel_stat.h> #include <linux/mc146818rtc.h> #include <linux/cache.h> diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index a4b7ad283f4..b92cc4e8b3b 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c @@ -40,7 +40,6 @@ #include <linux/mm.h> #include <linux/sched.h> #include <linux/kernel_stat.h> -#include <linux/smp_lock.h> #include <linux/bootmem.h> #include <linux/notifier.h> #include <linux/cpu.h> diff --git a/arch/i386/kernel/sys_i386.c b/arch/i386/kernel/sys_i386.c index 4048397f174..e5dcb937901 100644 --- a/arch/i386/kernel/sys_i386.c +++ b/arch/i386/kernel/sys_i386.c @@ -10,7 +10,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/sem.h> #include <linux/msg.h> #include <linux/shm.h> diff --git a/arch/i386/kernel/syscall_table.S b/arch/i386/kernel/syscall_table.S index 2697e9210e9..0772678ceec 100644 --- a/arch/i386/kernel/syscall_table.S +++ b/arch/i386/kernel/syscall_table.S @@ -319,3 +319,4 @@ ENTRY(sys_call_table) .long sys_move_pages .long sys_getcpu .long sys_epoll_pwait + .long sys_utimensat /* 320 */ diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index f21b41e7770..4bec0cbf407 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c @@ -52,7 +52,7 @@ #include <asm/unwind.h> #include <asm/smp.h> #include <asm/arch_hooks.h> -#include <asm/kdebug.h> +#include <linux/kdebug.h> #include <asm/stacktrace.h> #include <linux/module.h> @@ -95,20 +95,6 @@ asmlinkage void machine_check(void); int kstack_depth_to_print = 24; static unsigned int code_bytes = 64; -ATOMIC_NOTIFIER_HEAD(i386die_chain); - -int register_die_notifier(struct notifier_block *nb) -{ - vmalloc_sync_all(); - return atomic_notifier_chain_register(&i386die_chain, nb); -} -EXPORT_SYMBOL(register_die_notifier); /* used modular by kdb */ - -int unregister_die_notifier(struct notifier_block *nb) -{ - return atomic_notifier_chain_unregister(&i386die_chain, nb); -} -EXPORT_SYMBOL(unregister_die_notifier); /* used modular by kdb */ static inline int valid_stack_ptr(struct thread_info *tinfo, void *p) { @@ -747,6 +733,11 @@ static __kprobes void default_do_nmi(struct pt_regs * regs) */ if (nmi_watchdog_tick(regs, reason)) return; +#endif + if (notify_die(DIE_NMI_POST, "nmi_post", regs, reason, 2, 0) + == NOTIFY_STOP) + return; +#ifdef CONFIG_X86_LOCAL_APIC if (!do_nmi_callback(regs, smp_processor_id())) #endif unknown_nmi_error(reason, regs); diff --git a/arch/i386/kernel/vm86.c b/arch/i386/kernel/vm86.c index d1b8f2b7aea..f2dcd1d27c0 100644 --- a/arch/i386/kernel/vm86.c +++ b/arch/i386/kernel/vm86.c @@ -39,7 +39,6 @@ #include <linux/string.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/highmem.h> #include <linux/ptrace.h> #include <linux/audit.h> diff --git a/arch/i386/mach-default/setup.c b/arch/i386/mach-default/setup.c index c7881621070..7f635c7a238 100644 --- a/arch/i386/mach-default/setup.c +++ b/arch/i386/mach-default/setup.c @@ -81,7 +81,7 @@ void __init trap_init_hook(void) static struct irqaction irq0 = { .handler = timer_interrupt, - .flags = IRQF_DISABLED | IRQF_NOBALANCING, + .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_IRQPOLL, .mask = CPU_MASK_NONE, .name = "timer" }; diff --git a/arch/i386/mach-visws/setup.c b/arch/i386/mach-visws/setup.c index 233ee20907b..1f81f10e03a 100644 --- a/arch/i386/mach-visws/setup.c +++ b/arch/i386/mach-visws/setup.c @@ -116,7 +116,7 @@ void __init pre_setup_arch_hook() static struct irqaction irq0 = { .handler = timer_interrupt, - .flags = IRQF_DISABLED, + .flags = IRQF_DISABLED | IRQF_IRQPOLL, .name = "timer", }; diff --git a/arch/i386/mach-visws/visws_apic.c b/arch/i386/mach-visws/visws_apic.c index 38c2b13124d..710faf71a65 100644 --- a/arch/i386/mach-visws/visws_apic.c +++ b/arch/i386/mach-visws/visws_apic.c @@ -18,7 +18,6 @@ #include <linux/kernel_stat.h> #include <linux/interrupt.h> -#include <linux/smp_lock.h> #include <linux/init.h> #include <asm/io.h> diff --git a/arch/i386/mach-voyager/setup.c b/arch/i386/mach-voyager/setup.c index 447bb105cf5..2b55694e640 100644 --- a/arch/i386/mach-voyager/setup.c +++ b/arch/i386/mach-voyager/setup.c @@ -42,7 +42,7 @@ void __init trap_init_hook(void) static struct irqaction irq0 = { .handler = timer_interrupt, - .flags = IRQF_DISABLED | IRQF_NOBALANCING, + .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_IRQPOLL, .mask = CPU_MASK_NONE, .name = "timer" }; diff --git a/arch/i386/mach-voyager/voyager_smp.c b/arch/i386/mach-voyager/voyager_smp.c index 1a5e448a29c..50d9c52070b 100644 --- a/arch/i386/mach-voyager/voyager_smp.c +++ b/arch/i386/mach-voyager/voyager_smp.c @@ -16,7 +16,6 @@ #include <linux/mc146818rtc.h> #include <linux/cache.h> #include <linux/interrupt.h> -#include <linux/smp_lock.h> #include <linux/init.h> #include <linux/kernel.h> #include <linux/bootmem.h> diff --git a/arch/i386/mach-voyager/voyager_thread.c b/arch/i386/mach-voyager/voyager_thread.c index fdc1d926fb2..b4b24e0e45e 100644 --- a/arch/i386/mach-voyager/voyager_thread.c +++ b/arch/i386/mach-voyager/voyager_thread.c @@ -18,7 +18,6 @@ #include <linux/kernel_stat.h> #include <linux/delay.h> #include <linux/mc146818rtc.h> -#include <linux/smp_lock.h> #include <linux/init.h> #include <linux/bootmem.h> #include <linux/kmod.h> diff --git a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c index f534c29e80b..29d7d61543a 100644 --- a/arch/i386/mm/fault.c +++ b/arch/i386/mm/fault.c @@ -14,20 +14,20 @@ #include <linux/mman.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/interrupt.h> #include <linux/init.h> #include <linux/tty.h> #include <linux/vt_kern.h> /* For unblank_screen() */ #include <linux/highmem.h> #include <linux/bootmem.h> /* for max_low_pfn */ +#include <linux/vmalloc.h> #include <linux/module.h> #include <linux/kprobes.h> #include <linux/uaccess.h> +#include <linux/kdebug.h> #include <asm/system.h> #include <asm/desc.h> -#include <asm/kdebug.h> #include <asm/segment.h> extern void die(const char *,struct pt_regs *,long); diff --git a/arch/i386/mm/hugetlbpage.c b/arch/i386/mm/hugetlbpage.c index 6272a4fd9e7..efdf95ac803 100644 --- a/arch/i386/mm/hugetlbpage.c +++ b/arch/i386/mm/hugetlbpage.c @@ -9,7 +9,6 @@ #include <linux/mm.h> #include <linux/hugetlb.h> #include <linux/pagemap.h> -#include <linux/smp_lock.h> #include <linux/slab.h> #include <linux/err.h> #include <linux/sysctl.h> diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c index 1a7197e89eb..c50782efa5c 100644 --- a/arch/i386/mm/init.c +++ b/arch/i386/mm/init.c @@ -751,12 +751,9 @@ void __init pgtable_cache_init(void) pmd_cache = kmem_cache_create("pmd", PTRS_PER_PMD*sizeof(pmd_t), PTRS_PER_PMD*sizeof(pmd_t), - 0, + SLAB_PANIC, pmd_ctor, NULL); - if (!pmd_cache) - panic("pgtable_cache_init(): cannot create pmd cache"); - if (!SHARED_KERNEL_PMD) { /* If we're in PAE mode and have a non-shared kernel pmd, then the pgd size must be a @@ -770,11 +767,9 @@ void __init pgtable_cache_init(void) pgd_cache = kmem_cache_create("pgd", pgd_size, pgd_size, - 0, + SLAB_PANIC, pgd_ctor, (!SHARED_KERNEL_PMD) ? pgd_dtor : NULL); - if (!pgd_cache) - panic("pgtable_cache_init(): Cannot create pgd cache"); } /* diff --git a/arch/i386/oprofile/nmi_int.c b/arch/i386/oprofile/nmi_int.c index 695f737516a..8e185208dfd 100644 --- a/arch/i386/oprofile/nmi_int.c +++ b/arch/i386/oprofile/nmi_int.c @@ -14,10 +14,10 @@ #include <linux/sysdev.h> #include <linux/slab.h> #include <linux/moduleparam.h> +#include <linux/kdebug.h> #include <asm/nmi.h> #include <asm/msr.h> #include <asm/apic.h> -#include <asm/kdebug.h> #include "op_counter.h" #include "op_x86_model.h" diff --git a/arch/i386/oprofile/nmi_timer_int.c b/arch/i386/oprofile/nmi_timer_int.c index abf0ba52a63..1418e36ae7a 100644 --- a/arch/i386/oprofile/nmi_timer_int.c +++ b/arch/i386/oprofile/nmi_timer_int.c @@ -12,12 +12,11 @@ #include <linux/errno.h> #include <linux/oprofile.h> #include <linux/rcupdate.h> - +#include <linux/kdebug.h> #include <asm/nmi.h> #include <asm/apic.h> #include <asm/ptrace.h> -#include <asm/kdebug.h> static int profile_timer_exceptions_notify(struct notifier_block *self, unsigned long val, void *data) diff --git a/arch/ia64/hp/sim/boot/fw-emu.c b/arch/ia64/hp/sim/boot/fw-emu.c index 5a0a7afcfc3..300acd913d9 100644 --- a/arch/ia64/hp/sim/boot/fw-emu.c +++ b/arch/ia64/hp/sim/boot/fw-emu.c @@ -287,7 +287,7 @@ sys_fw_init (const char *args, int arglen) memset(efi_systab, 0, sizeof(efi_systab)); efi_systab->hdr.signature = EFI_SYSTEM_TABLE_SIGNATURE; - efi_systab->hdr.revision = EFI_SYSTEM_TABLE_REVISION; + efi_systab->hdr.revision = ((1 << 16) | 00); efi_systab->hdr.headersize = sizeof(efi_systab->hdr); efi_systab->fw_vendor = __pa("H\0e\0w\0l\0e\0t\0t\0-\0P\0a\0c\0k\0a\0r\0d\0\0"); efi_systab->fw_revision = 1; diff --git a/arch/ia64/ia32/ia32_ldt.c b/arch/ia64/ia32/ia32_ldt.c index a152738c7d0..16d51c14684 100644 --- a/arch/ia64/ia32/ia32_ldt.c +++ b/arch/ia64/ia32/ia32_ldt.c @@ -10,7 +10,6 @@ #include <linux/string.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/vmalloc.h> #include <asm/uaccess.h> diff --git a/arch/ia64/ia32/ia32_signal.c b/arch/ia64/ia32/ia32_signal.c index b3355a9ca2c..10510e58520 100644 --- a/arch/ia64/ia32/ia32_signal.c +++ b/arch/ia64/ia32/ia32_signal.c @@ -18,7 +18,6 @@ #include <linux/sched.h> #include <linux/signal.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/stddef.h> #include <linux/syscalls.h> #include <linux/unistd.h> diff --git a/arch/ia64/ia32/ia32_support.c b/arch/ia64/ia32/ia32_support.c index 6af400a12ca..beea7a0b9dc 100644 --- a/arch/ia64/ia32/ia32_support.c +++ b/arch/ia64/ia32/ia32_support.c @@ -252,10 +252,8 @@ ia32_init (void) extern struct kmem_cache *partial_page_cachep; partial_page_cachep = kmem_cache_create("partial_page_cache", - sizeof(struct partial_page), 0, 0, - NULL, NULL); - if (!partial_page_cachep) - panic("Cannot create partial page SLAB cache"); + sizeof(struct partial_page), + 0, SLAB_PANIC, NULL, NULL); } #endif return 0; diff --git a/arch/ia64/kernel/crash.c b/arch/ia64/kernel/crash.c index 80a94e70782..aeb79fb28f0 100644 --- a/arch/ia64/kernel/crash.c +++ b/arch/ia64/kernel/crash.c @@ -16,8 +16,8 @@ #include <linux/elfcore.h> #include <linux/sysctl.h> #include <linux/init.h> +#include <linux/kdebug.h> -#include <asm/kdebug.h> #include <asm/mca.h> int kdump_status[NR_CPUS]; @@ -74,7 +74,7 @@ crash_save_this_cpu(void) buf = (u64 *) per_cpu_ptr(crash_notes, cpu); if (!buf) return; - buf = append_elf_note(buf, "CORE", NT_PRSTATUS, prstatus, + buf = append_elf_note(buf, KEXEC_CORE_NOTE_NAME, NT_PRSTATUS, prstatus, sizeof(*prstatus)); final_note(buf); } diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c index 78d29b79947..75ec3478d8a 100644 --- a/arch/ia64/kernel/efi.c +++ b/arch/ia64/kernel/efi.c @@ -445,11 +445,11 @@ efi_init (void) panic("Woah! Can't find EFI system table.\n"); if (efi.systab->hdr.signature != EFI_SYSTEM_TABLE_SIGNATURE) panic("Woah! EFI system table signature incorrect\n"); - if ((efi.systab->hdr.revision ^ EFI_SYSTEM_TABLE_REVISION) >> 16 != 0) - printk(KERN_WARNING "Warning: EFI system table major version mismatch: " - "got %d.%02d, expected %d.%02d\n", - efi.systab->hdr.revision >> 16, efi.systab->hdr.revision & 0xffff, - EFI_SYSTEM_TABLE_REVISION >> 16, EFI_SYSTEM_TABLE_REVISION & 0xffff); + if ((efi.systab->hdr.revision >> 16) == 0) + printk(KERN_WARNING "Warning: EFI system table version " + "%d.%02d, expected 1.00 or greater\n", + efi.systab->hdr.revision >> 16, + efi.systab->hdr.revision & 0xffff); config_tables = __va(efi.systab->tables); diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c index dcfbf3e7a9e..93d9ab14ba2 100644 --- a/arch/ia64/kernel/iosapic.c +++ b/arch/ia64/kernel/iosapic.c @@ -87,7 +87,6 @@ #include <linux/list.h> #include <linux/pci.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/string.h> #include <linux/bootmem.h> diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c index 456f57b087c..1c5044a8095 100644 --- a/arch/ia64/kernel/irq_ia64.c +++ b/arch/ia64/kernel/irq_ia64.c @@ -27,7 +27,6 @@ #include <linux/random.h> /* for rand_initialize_irq() */ #include <linux/signal.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/threads.h> #include <linux/bitops.h> #include <linux/irq.h> diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c index 6cb56dd4056..4f5fd0960ba 100644 --- a/arch/ia64/kernel/kprobes.c +++ b/arch/ia64/kernel/kprobes.c @@ -29,9 +29,9 @@ #include <linux/slab.h> #include <linux/preempt.h> #include <linux/moduleloader.h> +#include <linux/kdebug.h> #include <asm/pgtable.h> -#include <asm/kdebug.h> #include <asm/sections.h> #include <asm/uaccess.h> @@ -444,7 +444,8 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs) break; } - BUG_ON(!orig_ret_address || (orig_ret_address == trampoline_address)); + kretprobe_assert(ri, orig_ret_address, trampoline_address); + regs->cr_iip = orig_ret_address; reset_current_kprobe(); @@ -464,23 +465,13 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs) } /* Called with kretprobe_lock held */ -void __kprobes arch_prepare_kretprobe(struct kretprobe *rp, +void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri, struct pt_regs *regs) { - struct kretprobe_instance *ri; - - if ((ri = get_free_rp_inst(rp)) != NULL) { - ri->rp = rp; - ri->task = current; - ri->ret_addr = (kprobe_opcode_t *)regs->b0; - - /* Replace the return addr with trampoline addr */ - regs->b0 = ((struct fnptr *)kretprobe_trampoline)->ip; + ri->ret_addr = (kprobe_opcode_t *)regs->b0; - add_rp_inst(ri); - } else { - rp->nmissed++; - } + /* Replace the return addr with trampoline addr */ + regs->b0 = ((struct fnptr *)kretprobe_trampoline)->ip; } int __kprobes arch_prepare_kprobe(struct kprobe *p) @@ -1021,3 +1012,12 @@ int __init arch_init_kprobes(void) (kprobe_opcode_t *)((struct fnptr *)kretprobe_trampoline)->ip; return register_kprobe(&trampoline_p); } + +int __kprobes arch_trampoline_kprobe(struct kprobe *p) +{ + if (p->addr == + (kprobe_opcode_t *)((struct fnptr *)kretprobe_trampoline)->ip) + return 1; + + return 0; +} diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c index 491687f84fb..1d7cc7e2ce3 100644 --- a/arch/ia64/kernel/mca.c +++ b/arch/ia64/kernel/mca.c @@ -63,7 +63,6 @@ #include <linux/sched.h> #include <linux/interrupt.h> #include <linux/irq.h> -#include <linux/smp_lock.h> #include <linux/bootmem.h> #include <linux/acpi.h> #include <linux/timer.h> @@ -72,9 +71,9 @@ #include <linux/smp.h> #include <linux/workqueue.h> #include <linux/cpumask.h> +#include <linux/kdebug.h> #include <asm/delay.h> -#include <asm/kdebug.h> #include <asm/machvec.h> #include <asm/meminit.h> #include <asm/page.h> diff --git a/arch/ia64/kernel/mca_drv.c b/arch/ia64/kernel/mca_drv.c index 832cf1e647e..70b8bdbb7e6 100644 --- a/arch/ia64/kernel/mca_drv.c +++ b/arch/ia64/kernel/mca_drv.c @@ -14,7 +14,6 @@ #include <linux/interrupt.h> #include <linux/irq.h> #include <linux/kallsyms.h> -#include <linux/smp_lock.h> #include <linux/bootmem.h> #include <linux/acpi.h> #include <linux/timer.h> diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index abc7ad03588..e7191ca30b1 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c @@ -23,7 +23,6 @@ #include <linux/kernel.h> #include <linux/sched.h> #include <linux/interrupt.h> -#include <linux/smp_lock.h> #include <linux/proc_fs.h> #include <linux/seq_file.h> #include <linux/init.h> diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index ae96d417699..8bb571a8a73 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c @@ -20,20 +20,19 @@ #include <linux/personality.h> #include <linux/sched.h> #include <linux/slab.h> -#include <linux/smp_lock.h> #include <linux/stddef.h> #include <linux/thread_info.h> #include <linux/unistd.h> #include <linux/efi.h> #include <linux/interrupt.h> #include <linux/delay.h> +#include <linux/kdebug.h> #include <asm/cpu.h> #include <asm/delay.h> #include <asm/elf.h> #include <asm/ia32.h> #include <asm/irq.h> -#include <asm/kdebug.h> #include <asm/kexec.h> #include <asm/pgalloc.h> #include <asm/processor.h> diff --git a/arch/ia64/kernel/salinfo.c b/arch/ia64/kernel/salinfo.c index af9f8754d84..a51f1d0bfb7 100644 --- a/arch/ia64/kernel/salinfo.c +++ b/arch/ia64/kernel/salinfo.c @@ -42,7 +42,6 @@ #include <linux/proc_fs.h> #include <linux/module.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/timer.h> #include <linux/vmalloc.h> diff --git a/arch/ia64/kernel/signal.c b/arch/ia64/kernel/signal.c index 77f8b49c788..0dcd56da600 100644 --- a/arch/ia64/kernel/signal.c +++ b/arch/ia64/kernel/signal.c @@ -14,7 +14,6 @@ #include <linux/sched.h> #include <linux/signal.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/stddef.h> #include <linux/tty.h> #include <linux/binfmts.h> diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c index ff7df439da6..a44792d0f3a 100644 --- a/arch/ia64/kernel/smpboot.c +++ b/arch/ia64/kernel/smpboot.c @@ -35,7 +35,6 @@ #include <linux/mm.h> #include <linux/notifier.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/spinlock.h> #include <linux/efi.h> #include <linux/percpu.h> diff --git a/arch/ia64/kernel/sys_ia64.c b/arch/ia64/kernel/sys_ia64.c index 2fcaa2051aa..1eda194b955 100644 --- a/arch/ia64/kernel/sys_ia64.c +++ b/arch/ia64/kernel/sys_ia64.c @@ -13,7 +13,6 @@ #include <linux/shm.h> #include <linux/file.h> /* doh, must come after sched.h... */ #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/syscalls.h> #include <linux/highuid.h> #include <linux/hugetlb.h> diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c index 39e0cd3a088..a06667c7acc 100644 --- a/arch/ia64/kernel/time.c +++ b/arch/ia64/kernel/time.c @@ -235,7 +235,7 @@ ia64_init_itm (void) static struct irqaction timer_irqaction = { .handler = timer_interrupt, - .flags = IRQF_DISABLED, + .flags = IRQF_DISABLED | IRQF_IRQPOLL, .name = "timer" }; diff --git a/arch/ia64/kernel/traps.c b/arch/ia64/kernel/traps.c index 765cbe5ba6a..5bfb8be02b7 100644 --- a/arch/ia64/kernel/traps.c +++ b/arch/ia64/kernel/traps.c @@ -16,33 +16,17 @@ #include <linux/hardirq.h> #include <linux/kprobes.h> #include <linux/delay.h> /* for ssleep() */ +#include <linux/kdebug.h> #include <asm/fpswa.h> #include <asm/ia32.h> #include <asm/intrinsics.h> #include <asm/processor.h> #include <asm/uaccess.h> -#include <asm/kdebug.h> fpswa_interface_t *fpswa_interface; EXPORT_SYMBOL(fpswa_interface); -ATOMIC_NOTIFIER_HEAD(ia64die_chain); - -int -register_die_notifier(struct notifier_block *nb) -{ - return atomic_notifier_chain_register(&ia64die_chain, nb); -} -EXPORT_SYMBOL_GPL(register_die_notifier); - -int -unregister_die_notifier(struct notifier_block *nb) -{ - return atomic_notifier_chain_unregister(&ia64die_chain, nb); -} -EXPORT_SYMBOL_GPL(unregister_die_notifier); - void __init trap_init (void) { diff --git a/arch/ia64/kernel/unaligned.c b/arch/ia64/kernel/unaligned.c index 1e357550c77..fe6aa5a9f8f 100644 --- a/arch/ia64/kernel/unaligned.c +++ b/arch/ia64/kernel/unaligned.c @@ -15,7 +15,6 @@ */ #include <linux/kernel.h> #include <linux/sched.h> -#include <linux/smp_lock.h> #include <linux/tty.h> #include <asm/intrinsics.h> diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c index 872da7a2acc..94844442812 100644 --- a/arch/ia64/mm/discontig.c +++ b/arch/ia64/mm/discontig.c @@ -693,6 +693,7 @@ void __init paging_init(void) zero_page_memmap_ptr = virt_to_page(ia64_imva(empty_zero_page)); } +#ifdef CONFIG_MEMORY_HOTPLUG pg_data_t *arch_alloc_nodedata(int nid) { unsigned long size = compute_pernodesize(nid); @@ -710,3 +711,4 @@ void arch_refresh_nodedata(int update_node, pg_data_t *update_pgdat) pgdat_list[update_node] = update_pgdat; scatter_node_data(); } +#endif diff --git a/arch/ia64/mm/fault.c b/arch/ia64/mm/fault.c index 59f3ab93761..21658e02116 100644 --- a/arch/ia64/mm/fault.c +++ b/arch/ia64/mm/fault.c @@ -7,15 +7,14 @@ #include <linux/sched.h> #include <linux/kernel.h> #include <linux/mm.h> -#include <linux/smp_lock.h> #include <linux/interrupt.h> #include <linux/kprobes.h> +#include <linux/kdebug.h> #include <asm/pgtable.h> #include <asm/processor.h> #include <asm/system.h> #include <asm/uaccess.h> -#include <asm/kdebug.h> extern void die (char *, struct pt_regs *, long); diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c index c7c90f4f429..1346b7f0539 100644 --- a/arch/ia64/mm/hugetlbpage.c +++ b/arch/ia64/mm/hugetlbpage.c @@ -13,7 +13,6 @@ #include <linux/mm.h> #include <linux/hugetlb.h> #include <linux/pagemap.h> -#include <linux/smp_lock.h> #include <linux/slab.h> #include <linux/sysctl.h> #include <asm/mman.h> diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index 9f635896d25..3549f3b4259 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c @@ -18,7 +18,6 @@ #include <linux/init.h> #include <linux/ioport.h> #include <linux/slab.h> -#include <linux/smp_lock.h> #include <linux/spinlock.h> #include <asm/machvec.h> diff --git a/arch/ia64/sn/kernel/xpc_main.c b/arch/ia64/sn/kernel/xpc_main.c index 68355ef6f84..e336e1692a7 100644 --- a/arch/ia64/sn/kernel/xpc_main.c +++ b/arch/ia64/sn/kernel/xpc_main.c @@ -55,9 +55,9 @@ #include <linux/delay.h> #include <linux/reboot.h> #include <linux/completion.h> +#include <linux/kdebug.h> #include <asm/sn/intr.h> #include <asm/sn/sn_sal.h> -#include <asm/kdebug.h> #include <asm/uaccess.h> #include <asm/sn/xpc.h> @@ -1332,7 +1332,7 @@ xpc_init(void) dev_warn(xpc_part, "can't register reboot notifier\n"); } - /* add ourselves to the die_notifier list (i.e., ia64die_chain) */ + /* add ourselves to the die_notifier list */ ret = register_die_notifier(&xpc_die_notifier); if (ret != 0) { dev_warn(xpc_part, "can't register die notifier\n"); diff --git a/arch/m32r/kernel/m32r_ksyms.c b/arch/m32r/kernel/m32r_ksyms.c index 8cbbb0b11e0..41a4c95e06d 100644 --- a/arch/m32r/kernel/m32r_ksyms.c +++ b/arch/m32r/kernel/m32r_ksyms.c @@ -5,7 +5,6 @@ #include <linux/sched.h> #include <linux/in6.h> #include <linux/interrupt.h> -#include <linux/smp_lock.h> #include <linux/string.h> #include <asm/semaphore.h> diff --git a/arch/m32r/kernel/signal.c b/arch/m32r/kernel/signal.c index 4b156054baa..916faf6070a 100644 --- a/arch/m32r/kernel/signal.c +++ b/arch/m32r/kernel/signal.c @@ -13,7 +13,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/kernel.h> #include <linux/signal.h> #include <linux/errno.h> diff --git a/arch/m32r/kernel/smpboot.c b/arch/m32r/kernel/smpboot.c index 48d376f47e1..3eb30595349 100644 --- a/arch/m32r/kernel/smpboot.c +++ b/arch/m32r/kernel/smpboot.c @@ -43,7 +43,6 @@ #include <linux/init.h> #include <linux/kernel.h> #include <linux/mm.h> -#include <linux/smp_lock.h> #include <linux/irq.h> #include <linux/bootmem.h> #include <linux/delay.h> diff --git a/arch/m32r/kernel/sys_m32r.c b/arch/m32r/kernel/sys_m32r.c index b4e7bcb4354..bda85548de6 100644 --- a/arch/m32r/kernel/sys_m32r.c +++ b/arch/m32r/kernel/sys_m32r.c @@ -11,7 +11,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/sem.h> #include <linux/msg.h> #include <linux/shm.h> diff --git a/arch/m32r/mm/fault-nommu.c b/arch/m32r/mm/fault-nommu.c index 9880abac3f5..88469178ea6 100644 --- a/arch/m32r/mm/fault-nommu.c +++ b/arch/m32r/mm/fault-nommu.c @@ -17,7 +17,6 @@ #include <linux/mman.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/interrupt.h> #include <linux/init.h> #include <linux/vt_kern.h> /* For unblank_screen() */ diff --git a/arch/m32r/mm/fault.c b/arch/m32r/mm/fault.c index 037d58e82fb..f3935ba2494 100644 --- a/arch/m32r/mm/fault.c +++ b/arch/m32r/mm/fault.c @@ -18,7 +18,6 @@ #include <linux/mman.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/interrupt.h> #include <linux/init.h> #include <linux/tty.h> diff --git a/arch/m68k/kernel/ptrace.c b/arch/m68k/kernel/ptrace.c index 7fd2720c384..cdba9fd6d82 100644 --- a/arch/m68k/kernel/ptrace.c +++ b/arch/m68k/kernel/ptrace.c @@ -14,7 +14,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/errno.h> #include <linux/ptrace.h> #include <linux/user.h> diff --git a/arch/m68k/mvme16x/rtc.c b/arch/m68k/mvme16x/rtc.c index 272d47eac58..e341387787a 100644 --- a/arch/m68k/mvme16x/rtc.c +++ b/arch/m68k/mvme16x/rtc.c @@ -16,7 +16,6 @@ #include <linux/init.h> #include <linux/poll.h> #include <linux/mc146818rtc.h> /* For struct rtc_time and ioctls, etc */ -#include <linux/smp_lock.h> #include <linux/bcd.h> #include <asm/mvme16xhw.h> diff --git a/arch/m68knommu/kernel/ptrace.c b/arch/m68knommu/kernel/ptrace.c index 72d34962357..f54b6a3dfec 100644 --- a/arch/m68knommu/kernel/ptrace.c +++ b/arch/m68knommu/kernel/ptrace.c @@ -14,7 +14,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/errno.h> #include <linux/ptrace.h> #include <linux/user.h> diff --git a/arch/m68knommu/kernel/sys_m68k.c b/arch/m68knommu/kernel/sys_m68k.c index 3265b2d734d..48e6b33e8b4 100644 --- a/arch/m68knommu/kernel/sys_m68k.c +++ b/arch/m68knommu/kernel/sys_m68k.c @@ -10,7 +10,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/sem.h> #include <linux/msg.h> #include <linux/shm.h> diff --git a/arch/mips/kernel/early_printk.c b/arch/mips/kernel/early_printk.c index 304efdc5682..4fa54b230c0 100644 --- a/arch/mips/kernel/early_printk.c +++ b/arch/mips/kernel/early_printk.c @@ -33,8 +33,3 @@ void __init setup_early_printk(void) { register_console(&early_console); } - -void __init disable_early_printk(void) -{ - unregister_console(&early_console); -} diff --git a/arch/mips/kernel/irixelf.c b/arch/mips/kernel/irixelf.c index 3cc25c05d36..403d96f99e7 100644 --- a/arch/mips/kernel/irixelf.c +++ b/arch/mips/kernel/irixelf.c @@ -31,7 +31,6 @@ #include <linux/shm.h> #include <linux/personality.h> #include <linux/elfcore.h> -#include <linux/smp_lock.h> #include <asm/mipsregs.h> #include <asm/namei.h> diff --git a/arch/mips/kernel/irixioctl.c b/arch/mips/kernel/irixioctl.c index e2863821a3d..30f9eb09db3 100644 --- a/arch/mips/kernel/irixioctl.c +++ b/arch/mips/kernel/irixioctl.c @@ -9,7 +9,6 @@ #include <linux/fs.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/sockios.h> #include <linux/syscalls.h> #include <linux/tty.h> diff --git a/arch/mips/kernel/irixsig.c b/arch/mips/kernel/irixsig.c index 2132485caa7..6980deb6dce 100644 --- a/arch/mips/kernel/irixsig.c +++ b/arch/mips/kernel/irixsig.c @@ -10,7 +10,6 @@ #include <linux/mm.h> #include <linux/errno.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/time.h> #include <linux/ptrace.h> #include <linux/resource.h> diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c index 201ae194d1b..b5a7b46bbc4 100644 --- a/arch/mips/kernel/ptrace.c +++ b/arch/mips/kernel/ptrace.c @@ -22,7 +22,6 @@ #include <linux/ptrace.h> #include <linux/audit.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/user.h> #include <linux/security.h> #include <linux/signal.h> diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c index 07d67309451..2a08ce41bf2 100644 --- a/arch/mips/kernel/signal.c +++ b/arch/mips/kernel/signal.c @@ -12,7 +12,6 @@ #include <linux/mm.h> #include <linux/personality.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/kernel.h> #include <linux/signal.h> #include <linux/errno.h> diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c index b9a014411f8..003f8152b9e 100644 --- a/arch/mips/kernel/signal32.c +++ b/arch/mips/kernel/signal32.c @@ -12,7 +12,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/kernel.h> #include <linux/signal.h> #include <linux/syscalls.h> diff --git a/arch/mips/kernel/signal_n32.c b/arch/mips/kernel/signal_n32.c index a9202fa9598..4cf9ff24d1f 100644 --- a/arch/mips/kernel/signal_n32.c +++ b/arch/mips/kernel/signal_n32.c @@ -19,7 +19,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/kernel.h> #include <linux/signal.h> #include <linux/errno.h> diff --git a/arch/mips/kernel/stacktrace.c b/arch/mips/kernel/stacktrace.c index a586aba337a..ebd9db8d1ec 100644 --- a/arch/mips/kernel/stacktrace.c +++ b/arch/mips/kernel/stacktrace.c @@ -31,8 +31,7 @@ static void save_raw_context_stack(struct stack_trace *trace, } } -static void save_context_stack(struct stack_trace *trace, - struct task_struct *task, struct pt_regs *regs) +static void save_context_stack(struct stack_trace *trace, struct pt_regs *regs) { unsigned long sp = regs->regs[29]; #ifdef CONFIG_KALLSYMS @@ -41,7 +40,7 @@ static void save_context_stack(struct stack_trace *trace, if (raw_show_trace || !__kernel_text_address(pc)) { unsigned long stack_page = - (unsigned long)task_stack_page(task); + (unsigned long)task_stack_page(current); if (stack_page && sp >= stack_page && sp <= stack_page + THREAD_SIZE - 32) save_raw_context_stack(trace, sp); @@ -54,7 +53,7 @@ static void save_context_stack(struct stack_trace *trace, trace->entries[trace->nr_entries++] = pc; if (trace->nr_entries >= trace->max_entries) break; - pc = unwind_stack(task, &sp, pc, &ra); + pc = unwind_stack(current, &sp, pc, &ra); } while (pc); #else save_raw_context_stack(trace, sp); @@ -64,22 +63,13 @@ static void save_context_stack(struct stack_trace *trace, /* * Save stack-backtrace addresses into a stack_trace buffer. */ -void save_stack_trace(struct stack_trace *trace, struct task_struct *task) +void save_stack_trace(struct stack_trace *trace) { struct pt_regs dummyregs; struct pt_regs *regs = &dummyregs; WARN_ON(trace->nr_entries || !trace->max_entries); - if (task && task != current) { - regs->regs[29] = task->thread.reg29; - regs->regs[31] = 0; - regs->cp0_epc = task->thread.reg31; - } else { - if (!task) - task = current; - prepare_frametrace(regs); - } - - save_context_stack(trace, task, regs); + prepare_frametrace(regs); + save_context_stack(trace, regs); } diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c index 26e1a7e78d1..9dd5a2df8ea 100644 --- a/arch/mips/kernel/syscall.c +++ b/arch/mips/kernel/syscall.c @@ -13,7 +13,6 @@ #include <linux/linkage.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/mman.h> #include <linux/ptrace.h> #include <linux/sched.h> diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 493cb29b8a4..ff45a4b8fba 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c @@ -16,7 +16,6 @@ #include <linux/module.h> #include <linux/sched.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/spinlock.h> #include <linux/kallsyms.h> #include <linux/bootmem.h> diff --git a/arch/mips/kernel/unaligned.c b/arch/mips/kernel/unaligned.c index 24b7b053cfe..a7d49ae805b 100644 --- a/arch/mips/kernel/unaligned.c +++ b/arch/mips/kernel/unaligned.c @@ -76,7 +76,6 @@ #include <linux/module.h> #include <linux/signal.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <asm/asm.h> #include <asm/branch.h> diff --git a/arch/mips/math-emu/dsemul.c b/arch/mips/math-emu/dsemul.c index 8079f3d1eca..ea6ba724848 100644 --- a/arch/mips/math-emu/dsemul.c +++ b/arch/mips/math-emu/dsemul.c @@ -2,7 +2,6 @@ #include <linux/mm.h> #include <linux/signal.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <asm/asm.h> #include <asm/bootinfo.h> diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c index f9c595dceba..7ebea331edb 100644 --- a/arch/mips/mm/fault.c +++ b/arch/mips/mm/fault.c @@ -16,7 +16,6 @@ #include <linux/mman.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/vt_kern.h> /* For unblank_screen() */ #include <linux/module.h> diff --git a/arch/mips/sgi-ip27/ip27-irq.c b/arch/mips/sgi-ip27/ip27-irq.c index 60ade7690e0..ba8e0794630 100644 --- a/arch/mips/sgi-ip27/ip27-irq.c +++ b/arch/mips/sgi-ip27/ip27-irq.c @@ -19,7 +19,6 @@ #include <linux/timex.h> #include <linux/slab.h> #include <linux/random.h> -#include <linux/smp_lock.h> #include <linux/kernel.h> #include <linux/kernel_stat.h> #include <linux/delay.h> diff --git a/arch/mips/sni/irq.c b/arch/mips/sni/irq.c index ad5fc471a00..9ccffdfb828 100644 --- a/arch/mips/sni/irq.c +++ b/arch/mips/sni/irq.c @@ -42,7 +42,7 @@ static irqreturn_t sni_isa_irq_handler(int dummy, void *p) struct irqaction sni_isa_irq = { .handler = sni_isa_irq_handler, .name = "ISA", - .flags = SA_SHIRQ + .flags = IRQF_SHARED }; /* diff --git a/arch/parisc/hpux/fs.c b/arch/parisc/hpux/fs.c index c7a81a2c014..d86e1577677 100644 --- a/arch/parisc/hpux/fs.c +++ b/arch/parisc/hpux/fs.c @@ -24,7 +24,6 @@ #include <linux/mm.h> #include <linux/sched.h> #include <linux/file.h> -#include <linux/smp_lock.h> #include <linux/slab.h> #include <linux/ptrace.h> #include <asm/errno.h> diff --git a/arch/parisc/hpux/ioctl.c b/arch/parisc/hpux/ioctl.c index b34b4f3c60e..dede4765852 100644 --- a/arch/parisc/hpux/ioctl.c +++ b/arch/parisc/hpux/ioctl.c @@ -34,7 +34,6 @@ */ #include <linux/sched.h> -#include <linux/smp_lock.h> #include <linux/syscalls.h> #include <asm/errno.h> #include <asm/ioctl.h> diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c index e9d09b020e8..c5c9125dace 100644 --- a/arch/parisc/kernel/irq.c +++ b/arch/parisc/kernel/irq.c @@ -388,7 +388,7 @@ void do_cpu_irq_mask(struct pt_regs *regs) static struct irqaction timer_action = { .handler = timer_interrupt, .name = "timer", - .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_PERCPU, + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_PERCPU | IRQF_IRQPOLL, }; #ifdef CONFIG_SMP diff --git a/arch/parisc/kernel/ptrace.c b/arch/parisc/kernel/ptrace.c index 0d0d617b6f2..8a0db376e91 100644 --- a/arch/parisc/kernel/ptrace.c +++ b/arch/parisc/kernel/ptrace.c @@ -10,7 +10,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/errno.h> #include <linux/ptrace.h> #include <linux/user.h> diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c index 9784e405f84..fb35ebc0c4d 100644 --- a/arch/parisc/kernel/signal.c +++ b/arch/parisc/kernel/signal.c @@ -16,7 +16,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/kernel.h> #include <linux/signal.h> #include <linux/errno.h> diff --git a/arch/parisc/kernel/signal32.c b/arch/parisc/kernel/signal32.c index 1c1a37f7305..db94affe5c7 100644 --- a/arch/parisc/kernel/signal32.c +++ b/arch/parisc/kernel/signal32.c @@ -26,7 +26,6 @@ #include <linux/slab.h> #include <linux/module.h> #include <linux/unistd.h> -#include <linux/smp_lock.h> #include <linux/init.h> #include <linux/sched.h> #include <linux/syscalls.h> diff --git a/arch/parisc/kernel/sys_parisc.c b/arch/parisc/kernel/sys_parisc.c index 6fed0803c59..4f589216b39 100644 --- a/arch/parisc/kernel/sys_parisc.c +++ b/arch/parisc/kernel/sys_parisc.c @@ -29,7 +29,6 @@ #include <linux/mm.h> #include <linux/mman.h> #include <linux/shm.h> -#include <linux/smp_lock.h> #include <linux/syscalls.h> #include <linux/utsname.h> #include <linux/personality.h> diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c index 55bc1471967..745ff741490 100644 --- a/arch/parisc/kernel/traps.c +++ b/arch/parisc/kernel/traps.c @@ -20,7 +20,6 @@ #include <linux/mm.h> #include <linux/module.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/spinlock.h> #include <linux/init.h> #include <linux/interrupt.h> diff --git a/arch/parisc/kernel/unwind.c b/arch/parisc/kernel/unwind.c index 5f75b3e6598..89c03707ecc 100644 --- a/arch/parisc/kernel/unwind.c +++ b/arch/parisc/kernel/unwind.c @@ -216,11 +216,8 @@ static void unwind_frame_regs(struct unwind_frame_info *info) /* Handle some frequent special cases.... */ { char symname[KSYM_NAME_LEN+1]; - char *modname; - unsigned long symsize, offset; - kallsyms_lookup(info->ip, &symsize, &offset, - &modname, symname); + kallsyms_lookup(info->ip, NULL, NULL, NULL, symname); dbg("info->ip = 0x%lx, name = %s\n", info->ip, symname); diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c index ef647e7a9dc..088b8c6defa 100644 --- a/arch/powerpc/kernel/kprobes.c +++ b/arch/powerpc/kernel/kprobes.c @@ -30,8 +30,8 @@ #include <linux/ptrace.h> #include <linux/preempt.h> #include <linux/module.h> +#include <linux/kdebug.h> #include <asm/cacheflush.h> -#include <asm/kdebug.h> #include <asm/sstep.h> #include <asm/uaccess.h> @@ -126,22 +126,13 @@ static void __kprobes set_current_kprobe(struct kprobe *p, struct pt_regs *regs, } /* Called with kretprobe_lock held */ -void __kprobes arch_prepare_kretprobe(struct kretprobe *rp, +void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri, struct pt_regs *regs) { - struct kretprobe_instance *ri; - - if ((ri = get_free_rp_inst(rp)) != NULL) { - ri->rp = rp; - ri->task = current; - ri->ret_addr = (kprobe_opcode_t *)regs->link; - - /* Replace the return addr with trampoline addr */ - regs->link = (unsigned long)kretprobe_trampoline; - add_rp_inst(ri); - } else { - rp->nmissed++; - } + ri->ret_addr = (kprobe_opcode_t *)regs->link; + + /* Replace the return addr with trampoline addr */ + regs->link = (unsigned long)kretprobe_trampoline; } static int __kprobes kprobe_handler(struct pt_regs *regs) @@ -336,7 +327,7 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs) break; } - BUG_ON(!orig_ret_address || (orig_ret_address == trampoline_address)); + kretprobe_assert(ri, orig_ret_address, trampoline_address); regs->nip = orig_ret_address; reset_current_kprobe(); @@ -559,3 +550,11 @@ int __init arch_init_kprobes(void) { return register_kprobe(&trampoline_p); } + +int __kprobes arch_trampoline_kprobe(struct kprobe *p) +{ + if (p->addr == (kprobe_opcode_t *)&kretprobe_trampoline) + return 1; + + return 0; +} diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index e509aae2feb..6e2f03566b0 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c @@ -19,7 +19,6 @@ #include <linux/kernel.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/stddef.h> #include <linux/unistd.h> #include <linux/ptrace.h> diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c index cc44c7b975a..f4f391cdd8f 100644 --- a/arch/powerpc/kernel/ptrace.c +++ b/arch/powerpc/kernel/ptrace.c @@ -19,7 +19,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/errno.h> #include <linux/ptrace.h> #include <linux/user.h> diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c index 6b405a3f43f..dd1dca5bfa8 100644 --- a/arch/powerpc/kernel/signal_32.c +++ b/arch/powerpc/kernel/signal_32.c @@ -20,7 +20,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/kernel.h> #include <linux/signal.h> #include <linux/errno.h> diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c index f72e8e823d7..1ce0ae3f6ff 100644 --- a/arch/powerpc/kernel/signal_64.c +++ b/arch/powerpc/kernel/signal_64.c @@ -15,7 +15,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/kernel.h> #include <linux/signal.h> #include <linux/errno.h> diff --git a/arch/powerpc/kernel/syscalls.c b/arch/powerpc/kernel/syscalls.c index d358866b880..fc6647d332c 100644 --- a/arch/powerpc/kernel/syscalls.c +++ b/arch/powerpc/kernel/syscalls.c @@ -24,7 +24,6 @@ #include <linux/syscalls.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/sem.h> #include <linux/msg.h> #include <linux/shm.h> diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index f7862224fe8..bf6445ac9f1 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -33,8 +33,8 @@ #include <linux/kexec.h> #include <linux/backlight.h> #include <linux/bug.h> +#include <linux/kdebug.h> -#include <asm/kdebug.h> #include <asm/pgtable.h> #include <asm/uaccess.h> #include <asm/system.h> @@ -72,20 +72,6 @@ EXPORT_SYMBOL(__debugger_dabr_match); EXPORT_SYMBOL(__debugger_fault_handler); #endif -ATOMIC_NOTIFIER_HEAD(powerpc_die_chain); - -int register_die_notifier(struct notifier_block *nb) -{ - return atomic_notifier_chain_register(&powerpc_die_chain, nb); -} -EXPORT_SYMBOL(register_die_notifier); - -int unregister_die_notifier(struct notifier_block *nb) -{ - return atomic_notifier_chain_unregister(&powerpc_die_chain, nb); -} -EXPORT_SYMBOL(unregister_die_notifier); - /* * Trap & Exception support */ diff --git a/arch/powerpc/kernel/udbg.c b/arch/powerpc/kernel/udbg.c index 7e0971868fc..147a2d83de1 100644 --- a/arch/powerpc/kernel/udbg.c +++ b/arch/powerpc/kernel/udbg.c @@ -142,29 +142,22 @@ static void udbg_console_write(struct console *con, const char *s, static struct console udbg_console = { .name = "udbg", .write = udbg_console_write, - .flags = CON_PRINTBUFFER | CON_ENABLED, + .flags = CON_PRINTBUFFER | CON_ENABLED | CON_BOOT, .index = -1, }; static int early_console_initialized; -void __init disable_early_printk(void) -{ - if (!early_console_initialized) - return; - if (strstr(boot_command_line, "udbg-immortal")) { - printk(KERN_INFO "early console immortal !\n"); - return; - } - unregister_console(&udbg_console); - early_console_initialized = 0; -} - /* called by setup_system */ void register_early_udbg_console(void) { if (early_console_initialized) return; + + if (strstr(boot_command_line, "udbg-immortal")) { + printk(KERN_INFO "early console immortal !\n"); + udbg_console.flags &= ~CON_BOOT; + } early_console_initialized = 1; register_console(&udbg_console); } diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c index e46c31b3664..4245579edb4 100644 --- a/arch/powerpc/kernel/vdso.c +++ b/arch/powerpc/kernel/vdso.c @@ -14,7 +14,6 @@ #include <linux/kernel.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/stddef.h> #include <linux/unistd.h> #include <linux/slab.h> diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c index 03aeb3a4607..bec0cce79a7 100644 --- a/arch/powerpc/mm/fault.c +++ b/arch/powerpc/mm/fault.c @@ -28,6 +28,7 @@ #include <linux/highmem.h> #include <linux/module.h> #include <linux/kprobes.h> +#include <linux/kdebug.h> #include <asm/page.h> #include <asm/pgtable.h> @@ -36,7 +37,6 @@ #include <asm/system.h> #include <asm/uaccess.h> #include <asm/tlbflush.h> -#include <asm/kdebug.h> #include <asm/siginfo.h> #ifdef CONFIG_KPROBES diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index 1f07f70ac89..fb959264c10 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c @@ -12,7 +12,6 @@ #include <linux/mm.h> #include <linux/hugetlb.h> #include <linux/pagemap.h> -#include <linux/smp_lock.h> #include <linux/slab.h> #include <linux/err.h> #include <linux/sysctl.h> diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c index 4416d5140c5..fe1fe852181 100644 --- a/arch/powerpc/mm/init_64.c +++ b/arch/powerpc/mm/init_64.c @@ -183,11 +183,8 @@ void pgtable_cache_init(void) "for size: %08x...\n", name, i, size); pgtable_cache[i] = kmem_cache_create(name, size, size, - 0, + SLAB_PANIC, zero_ctor, NULL); - if (! pgtable_cache[i]) - panic("pgtable_cache_init(): could not create %s!\n", - name); } } diff --git a/arch/powerpc/platforms/cell/spufs/backing_ops.c b/arch/powerpc/platforms/cell/spufs/backing_ops.c index 3322528fa6e..d32db9ffc6e 100644 --- a/arch/powerpc/platforms/cell/spufs/backing_ops.c +++ b/arch/powerpc/platforms/cell/spufs/backing_ops.c @@ -28,7 +28,6 @@ #include <linux/mm.h> #include <linux/vmalloc.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/stddef.h> #include <linux/unistd.h> #include <linux/poll.h> diff --git a/arch/powerpc/platforms/cell/spufs/hw_ops.c b/arch/powerpc/platforms/cell/spufs/hw_ops.c index 428875c5e4e..fc4ed1ffbd4 100644 --- a/arch/powerpc/platforms/cell/spufs/hw_ops.c +++ b/arch/powerpc/platforms/cell/spufs/hw_ops.c @@ -25,7 +25,6 @@ #include <linux/mm.h> #include <linux/poll.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/stddef.h> #include <linux/unistd.h> diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index 91030b8abdc..b6ecb30e7d5 100644 --- a/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c @@ -30,7 +30,6 @@ #include <linux/completion.h> #include <linux/vmalloc.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/stddef.h> #include <linux/unistd.h> #include <linux/numa.h> diff --git a/arch/powerpc/platforms/cell/spufs/switch.c b/arch/powerpc/platforms/cell/spufs/switch.c index 8347c4a3f89..29dc59cefc3 100644 --- a/arch/powerpc/platforms/cell/spufs/switch.c +++ b/arch/powerpc/platforms/cell/spufs/switch.c @@ -39,7 +39,6 @@ #include <linux/mm.h> #include <linux/vmalloc.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/stddef.h> #include <linux/unistd.h> diff --git a/arch/powerpc/platforms/chrp/smp.c b/arch/powerpc/platforms/chrp/smp.c index 1d2307e87c3..3ea0eb78568 100644 --- a/arch/powerpc/platforms/chrp/smp.c +++ b/arch/powerpc/platforms/chrp/smp.c @@ -11,7 +11,6 @@ #include <linux/kernel.h> #include <linux/sched.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/interrupt.h> #include <linux/kernel_stat.h> #include <linux/delay.h> diff --git a/arch/powerpc/platforms/iseries/smp.c b/arch/powerpc/platforms/iseries/smp.c index aee5908df70..722335e32fd 100644 --- a/arch/powerpc/platforms/iseries/smp.c +++ b/arch/powerpc/platforms/iseries/smp.c @@ -18,7 +18,6 @@ #include <linux/module.h> #include <linux/sched.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/interrupt.h> #include <linux/kernel_stat.h> #include <linux/delay.h> diff --git a/arch/powerpc/platforms/iseries/viopath.c b/arch/powerpc/platforms/iseries/viopath.c index 2ca2d8a9de9..354b8dd2a2c 100644 --- a/arch/powerpc/platforms/iseries/viopath.c +++ b/arch/powerpc/platforms/iseries/viopath.c @@ -36,7 +36,6 @@ #include <linux/dma-mapping.h> #include <linux/wait.h> #include <linux/seq_file.h> -#include <linux/smp_lock.h> #include <linux/interrupt.h> #include <asm/system.h> diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c index 6f32c4eca6e..d2cf6136b32 100644 --- a/arch/powerpc/platforms/powermac/smp.c +++ b/arch/powerpc/platforms/powermac/smp.c @@ -24,7 +24,6 @@ #include <linux/kernel.h> #include <linux/sched.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/interrupt.h> #include <linux/kernel_stat.h> #include <linux/delay.h> diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index b481db1dacb..28fdf4f50c2 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c @@ -1217,7 +1217,6 @@ static void get_function_bounds(unsigned long pc, unsigned long *startp, { unsigned long size, offset; const char *name; - char *modname; *startp = *endp = 0; if (pc == 0) @@ -1225,7 +1224,7 @@ static void get_function_bounds(unsigned long pc, unsigned long *startp, if (setjmp(bus_error_jmp) == 0) { catch_memory_errors = 1; sync(); - name = kallsyms_lookup(pc, &size, &offset, &modname, tmpstr); + name = kallsyms_lookup(pc, &size, &offset, NULL, tmpstr); if (name != NULL) { *startp = pc - offset; *endp = pc - offset + size; diff --git a/arch/ppc/kernel/ppc_htab.c b/arch/ppc/kernel/ppc_htab.c index 0a7e42d54ea..aa07b63c0a6 100644 --- a/arch/ppc/kernel/ppc_htab.c +++ b/arch/ppc/kernel/ppc_htab.c @@ -18,7 +18,6 @@ #include <linux/capability.h> #include <linux/ctype.h> #include <linux/threads.h> -#include <linux/smp_lock.h> #include <linux/seq_file.h> #include <linux/init.h> #include <linux/bitops.h> diff --git a/arch/ppc/kernel/smp.c b/arch/ppc/kernel/smp.c index 96a55972b98..055998575cb 100644 --- a/arch/ppc/kernel/smp.c +++ b/arch/ppc/kernel/smp.c @@ -12,7 +12,6 @@ #include <linux/module.h> #include <linux/sched.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/interrupt.h> #include <linux/kernel_stat.h> #include <linux/delay.h> diff --git a/arch/ppc/syslib/virtex_devices.h b/arch/ppc/syslib/virtex_devices.h index 4a17dd3927c..3d4be1412f6 100644 --- a/arch/ppc/syslib/virtex_devices.h +++ b/arch/ppc/syslib/virtex_devices.h @@ -13,6 +13,13 @@ #include <linux/platform_device.h> +/* ML300/403 reference design framebuffer driver platform data struct */ +struct xilinxfb_platform_data { + u32 rotate_screen; + u32 screen_height_mm; + u32 screen_width_mm; +}; + void __init virtex_early_serial_map(void); /* Prototype for device fixup routine. Implement this routine in the diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c index 80a54a0149a..a5692c460ba 100644 --- a/arch/s390/kernel/compat_signal.c +++ b/arch/s390/kernel/compat_signal.c @@ -14,7 +14,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/kernel.h> #include <linux/signal.h> #include <linux/errno.h> diff --git a/arch/s390/kernel/dis.c b/arch/s390/kernel/dis.c index dabaf98943d..a057ebf108a 100644 --- a/arch/s390/kernel/dis.c +++ b/arch/s390/kernel/dis.c @@ -23,6 +23,7 @@ #include <linux/kallsyms.h> #include <linux/reboot.h> #include <linux/kprobes.h> +#include <linux/kdebug.h> #include <asm/system.h> #include <asm/uaccess.h> @@ -33,7 +34,6 @@ #include <asm/s390_ext.h> #include <asm/lowcore.h> #include <asm/debug.h> -#include <asm/kdebug.h> #ifndef CONFIG_64BIT #define ONELONG "%08lx: " diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c index 23c61f6d965..e39333ae0fc 100644 --- a/arch/s390/kernel/kprobes.c +++ b/arch/s390/kernel/kprobes.c @@ -24,8 +24,8 @@ #include <linux/ptrace.h> #include <linux/preempt.h> #include <linux/stop_machine.h> +#include <linux/kdebug.h> #include <asm/cacheflush.h> -#include <asm/kdebug.h> #include <asm/sections.h> #include <asm/uaccess.h> #include <linux/module.h> @@ -271,23 +271,13 @@ static void __kprobes set_current_kprobe(struct kprobe *p, struct pt_regs *regs, } /* Called with kretprobe_lock held */ -void __kprobes arch_prepare_kretprobe(struct kretprobe *rp, +void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri, struct pt_regs *regs) { - struct kretprobe_instance *ri; + ri->ret_addr = (kprobe_opcode_t *) regs->gprs[14]; - if ((ri = get_free_rp_inst(rp)) != NULL) { - ri->rp = rp; - ri->task = current; - ri->ret_addr = (kprobe_opcode_t *) regs->gprs[14]; - - /* Replace the return addr with trampoline addr */ - regs->gprs[14] = (unsigned long)&kretprobe_trampoline; - - add_rp_inst(ri); - } else { - rp->nmissed++; - } + /* Replace the return addr with trampoline addr */ + regs->gprs[14] = (unsigned long)&kretprobe_trampoline; } static int __kprobes kprobe_handler(struct pt_regs *regs) @@ -671,3 +661,10 @@ int __init arch_init_kprobes(void) { return register_kprobe(&trampoline_p); } + +int __kprobes arch_trampoline_kprobe(struct kprobe *p) +{ + if (p->addr == (kprobe_opcode_t *) & kretprobe_trampoline) + return 1; + return 0; +} diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index 11d9b019762..eb43c3b3126 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c @@ -22,7 +22,6 @@ #include <linux/kernel.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/stddef.h> #include <linux/unistd.h> #include <linux/ptrace.h> diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c index 3c41907799a..d264671c1b7 100644 --- a/arch/s390/kernel/signal.c +++ b/arch/s390/kernel/signal.c @@ -14,7 +14,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/kernel.h> #include <linux/signal.h> #include <linux/errno.h> diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 3754e2031b3..b7977027a28 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c @@ -25,7 +25,6 @@ #include <linux/mm.h> #include <linux/spinlock.h> #include <linux/kernel_stat.h> -#include <linux/smp_lock.h> #include <linux/delay.h> #include <linux/cache.h> #include <linux/interrupt.h> diff --git a/arch/s390/kernel/stacktrace.c b/arch/s390/kernel/stacktrace.c index 2e5c65a1863..515ff9011dd 100644 --- a/arch/s390/kernel/stacktrace.c +++ b/arch/s390/kernel/stacktrace.c @@ -59,7 +59,7 @@ static unsigned long save_context_stack(struct stack_trace *trace, } } -void save_stack_trace(struct stack_trace *trace, struct task_struct *task) +void save_stack_trace(struct stack_trace *trace) { register unsigned long sp asm ("15"); unsigned long orig_sp, new_sp; @@ -69,20 +69,16 @@ void save_stack_trace(struct stack_trace *trace, struct task_struct *task) new_sp = save_context_stack(trace, &trace->skip, orig_sp, S390_lowcore.panic_stack - PAGE_SIZE, S390_lowcore.panic_stack); - if ((new_sp != orig_sp) && !trace->all_contexts) + if (new_sp != orig_sp) return; new_sp = save_context_stack(trace, &trace->skip, new_sp, S390_lowcore.async_stack - ASYNC_SIZE, S390_lowcore.async_stack); - if ((new_sp != orig_sp) && !trace->all_contexts) + if (new_sp != orig_sp) return; - if (task) - save_context_stack(trace, &trace->skip, new_sp, - (unsigned long) task_stack_page(task), - (unsigned long) task_stack_page(task) + THREAD_SIZE); - else - save_context_stack(trace, &trace->skip, new_sp, - S390_lowcore.thread_info, - S390_lowcore.thread_info + THREAD_SIZE); + + save_context_stack(trace, &trace->skip, new_sp, + S390_lowcore.thread_info, + S390_lowcore.thread_info + THREAD_SIZE); return; } diff --git a/arch/s390/kernel/sys_s390.c b/arch/s390/kernel/sys_s390.c index 3a77c22cda7..1c90c7e9997 100644 --- a/arch/s390/kernel/sys_s390.c +++ b/arch/s390/kernel/sys_s390.c @@ -17,7 +17,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/sem.h> #include <linux/msg.h> #include <linux/shm.h> diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index 711dae8da7a..9c2872a7cca 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c @@ -21,6 +21,7 @@ #include <linux/mm.h> #include <linux/interrupt.h> #include <linux/time.h> +#include <linux/sysdev.h> #include <linux/delay.h> #include <linux/init.h> #include <linux/smp.h> diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c index 49dec830373..cbfe73034c3 100644 --- a/arch/s390/kernel/traps.c +++ b/arch/s390/kernel/traps.c @@ -22,11 +22,11 @@ #include <linux/timer.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/init.h> #include <linux/interrupt.h> #include <linux/delay.h> #include <linux/module.h> +#include <linux/kdebug.h> #include <linux/kallsyms.h> #include <linux/reboot.h> #include <linux/kprobes.h> @@ -40,7 +40,6 @@ #include <asm/s390_ext.h> #include <asm/lowcore.h> #include <asm/debug.h> -#include <asm/kdebug.h> /* Called from entry.S only */ extern void handle_per_exception(struct pt_regs *regs); @@ -70,20 +69,6 @@ static int kstack_depth_to_print = 12; static int kstack_depth_to_print = 20; #endif /* CONFIG_64BIT */ -ATOMIC_NOTIFIER_HEAD(s390die_chain); - -int register_die_notifier(struct notifier_block *nb) -{ - return atomic_notifier_chain_register(&s390die_chain, nb); -} -EXPORT_SYMBOL(register_die_notifier); - -int unregister_die_notifier(struct notifier_block *nb) -{ - return atomic_notifier_chain_unregister(&s390die_chain, nb); -} -EXPORT_SYMBOL(unregister_die_notifier); - /* * For show_trace we have tree different stack to consider: * - the panic stack which is used if the kernel stack has overflown diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index 91f705adc3f..8b924b35977 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c @@ -20,6 +20,7 @@ #include <linux/mman.h> #include <linux/mm.h> #include <linux/smp.h> +#include <linux/kdebug.h> #include <linux/smp_lock.h> #include <linux/init.h> #include <linux/console.h> @@ -30,7 +31,6 @@ #include <asm/system.h> #include <asm/pgtable.h> -#include <asm/kdebug.h> #include <asm/s390_ext.h> #ifndef CONFIG_64BIT diff --git a/arch/sh/drivers/pci/pci-st40.c b/arch/sh/drivers/pci/pci-st40.c index efecb3d5995..d67656a44b1 100644 --- a/arch/sh/drivers/pci/pci-st40.c +++ b/arch/sh/drivers/pci/pci-st40.c @@ -9,7 +9,6 @@ #include <linux/kernel.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/init.h> #include <linux/errno.h> #include <linux/pci.h> diff --git a/arch/sh/kernel/early_printk.c b/arch/sh/kernel/early_printk.c index 9048c0326d8..9833493d886 100644 --- a/arch/sh/kernel/early_printk.c +++ b/arch/sh/kernel/early_printk.c @@ -192,20 +192,14 @@ int __init setup_early_printk(char *buf) } #endif - if (likely(early_console)) + if (likely(early_console)) { + if (keep_early) + early_console->flags &= ~CON_BOOT; + else + early_console->flags |= CON_BOOT; register_console(early_console); + } return 0; } early_param("earlyprintk", setup_early_printk); - -void __init disable_early_printk(void) -{ - if (!early_console_initialized || !early_console) - return; - if (!keep_early) { - printk("disabling early console\n"); - unregister_console(early_console); - } else - printk("keeping early console\n"); -} diff --git a/arch/sh/kernel/ptrace.c b/arch/sh/kernel/ptrace.c index 855f7246cff..3fb5fc0b550 100644 --- a/arch/sh/kernel/ptrace.c +++ b/arch/sh/kernel/ptrace.c @@ -12,7 +12,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/errno.h> #include <linux/ptrace.h> #include <linux/user.h> diff --git a/arch/sh/kernel/sh_ksyms.c b/arch/sh/kernel/sh_ksyms.c index 17f0b50c567..fa91641c1f6 100644 --- a/arch/sh/kernel/sh_ksyms.c +++ b/arch/sh/kernel/sh_ksyms.c @@ -5,7 +5,6 @@ #include <linux/sched.h> #include <linux/in6.h> #include <linux/interrupt.h> -#include <linux/smp_lock.h> #include <linux/vmalloc.h> #include <linux/pci.h> #include <linux/irq.h> diff --git a/arch/sh/kernel/signal.c b/arch/sh/kernel/signal.c index 9f39ef1f73d..eb0191c374b 100644 --- a/arch/sh/kernel/signal.c +++ b/arch/sh/kernel/signal.c @@ -11,7 +11,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/kernel.h> #include <linux/signal.h> #include <linux/errno.h> diff --git a/arch/sh/kernel/stacktrace.c b/arch/sh/kernel/stacktrace.c index 0d5268afe80..4bdd2f83535 100644 --- a/arch/sh/kernel/stacktrace.c +++ b/arch/sh/kernel/stacktrace.c @@ -19,14 +19,7 @@ */ void save_stack_trace(struct stack_trace *trace, struct task_struct *task) { - unsigned long *sp; - - if (!task) - task = current; - if (task == current) - sp = (unsigned long *)current_stack_pointer; - else - sp = (unsigned long *)task->thread.sp; + unsigned long *sp = (unsigned long *)current_stack_pointer; while (!kstack_end(sp)) { unsigned long addr = *sp++; diff --git a/arch/sh/kernel/sys_sh.c b/arch/sh/kernel/sys_sh.c index e18f183e103..76b1bc7f702 100644 --- a/arch/sh/kernel/sys_sh.c +++ b/arch/sh/kernel/sys_sh.c @@ -12,7 +12,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/sem.h> #include <linux/msg.h> #include <linux/shm.h> diff --git a/arch/sh/kernel/timers/timer-cmt.c b/arch/sh/kernel/timers/timer-cmt.c index a574b93a4e7..82de6895ade 100644 --- a/arch/sh/kernel/timers/timer-cmt.c +++ b/arch/sh/kernel/timers/timer-cmt.c @@ -115,7 +115,7 @@ static irqreturn_t cmt_timer_interrupt(int irq, void *dev_id) static struct irqaction cmt_irq = { .name = "timer", .handler = cmt_timer_interrupt, - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, .mask = CPU_MASK_NONE, }; diff --git a/arch/sh/kernel/timers/timer-mtu2.c b/arch/sh/kernel/timers/timer-mtu2.c index fffcd1c0987..b7499a2a918 100644 --- a/arch/sh/kernel/timers/timer-mtu2.c +++ b/arch/sh/kernel/timers/timer-mtu2.c @@ -110,7 +110,7 @@ static irqreturn_t mtu2_timer_interrupt(int irq, void *dev_id) static struct irqaction mtu2_irq = { .name = "timer", .handler = mtu2_timer_interrupt, - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, .mask = CPU_MASK_NONE, }; diff --git a/arch/sh/kernel/timers/timer-tmu.c b/arch/sh/kernel/timers/timer-tmu.c index ad1ede52fc9..d9e3151c891 100644 --- a/arch/sh/kernel/timers/timer-tmu.c +++ b/arch/sh/kernel/timers/timer-tmu.c @@ -99,7 +99,7 @@ static irqreturn_t tmu_timer_interrupt(int irq, void *dummy) static struct irqaction tmu_irq = { .name = "timer", .handler = tmu_timer_interrupt, - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, .mask = CPU_MASK_NONE, }; diff --git a/arch/sh/mm/fault-nommu.c b/arch/sh/mm/fault-nommu.c index 34d4e0c68fb..923cb456819 100644 --- a/arch/sh/mm/fault-nommu.c +++ b/arch/sh/mm/fault-nommu.c @@ -19,7 +19,6 @@ #include <linux/mman.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/interrupt.h> #include <asm/system.h> diff --git a/arch/sh/mm/hugetlbpage.c b/arch/sh/mm/hugetlbpage.c index cf2c2ee35a3..ae8c321d6e2 100644 --- a/arch/sh/mm/hugetlbpage.c +++ b/arch/sh/mm/hugetlbpage.c @@ -13,7 +13,6 @@ #include <linux/mm.h> #include <linux/hugetlb.h> #include <linux/pagemap.h> -#include <linux/smp_lock.h> #include <linux/slab.h> #include <linux/sysctl.h> diff --git a/arch/sh/mm/pmb.c b/arch/sh/mm/pmb.c index d0d45e2e0ab..02aae06527d 100644 --- a/arch/sh/mm/pmb.c +++ b/arch/sh/mm/pmb.c @@ -311,9 +311,9 @@ static int __init pmb_init(void) BUG_ON(unlikely(nr_entries >= NR_PMB_ENTRIES)); - pmb_cache = kmem_cache_create("pmb", sizeof(struct pmb_entry), - 0, 0, pmb_cache_ctor, pmb_cache_dtor); - BUG_ON(!pmb_cache); + pmb_cache = kmem_cache_create("pmb", sizeof(struct pmb_entry), 0, + SLAB_PANIC, pmb_cache_ctor, + pmb_cache_dtor); jump_to_P2(); diff --git a/arch/sh64/kernel/early_printk.c b/arch/sh64/kernel/early_printk.c index 8c8a76e180a..4f913112367 100644 --- a/arch/sh64/kernel/early_printk.c +++ b/arch/sh64/kernel/early_printk.c @@ -79,7 +79,7 @@ static struct console sh_console = { .name = "scifcon", .write = sh_console_write, .setup = sh_console_setup, - .flags = CON_PRINTBUFFER, + .flags = CON_PRINTBUFFER | CON_BOOT, .index = -1, }; @@ -97,9 +97,3 @@ void __init enable_early_printk(void) register_console(&sh_console); } - -void disable_early_printk(void) -{ - unregister_console(&sh_console); -} - diff --git a/arch/sh64/kernel/irq.c b/arch/sh64/kernel/irq.c index e7e07f8749c..f68b4f6c9b3 100644 --- a/arch/sh64/kernel/irq.c +++ b/arch/sh64/kernel/irq.c @@ -26,7 +26,6 @@ #include <linux/slab.h> #include <linux/random.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/init.h> #include <linux/seq_file.h> #include <linux/bitops.h> diff --git a/arch/sh64/kernel/pci_sh5.c b/arch/sh64/kernel/pci_sh5.c index 9dae689b6a9..49862e165c0 100644 --- a/arch/sh64/kernel/pci_sh5.c +++ b/arch/sh64/kernel/pci_sh5.c @@ -12,7 +12,6 @@ #include <linux/kernel.h> #include <linux/rwsem.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/interrupt.h> #include <linux/init.h> #include <linux/errno.h> diff --git a/arch/sh64/kernel/sh_ksyms.c b/arch/sh64/kernel/sh_ksyms.c index 7aa4b4f7bc5..461ea3de316 100644 --- a/arch/sh64/kernel/sh_ksyms.c +++ b/arch/sh64/kernel/sh_ksyms.c @@ -17,7 +17,6 @@ #include <linux/sched.h> #include <linux/in6.h> #include <linux/interrupt.h> -#include <linux/smp_lock.h> #include <linux/screen_info.h> #include <asm/semaphore.h> diff --git a/arch/sh64/kernel/signal.c b/arch/sh64/kernel/signal.c index 1666d3efb52..b76bdfa473d 100644 --- a/arch/sh64/kernel/signal.c +++ b/arch/sh64/kernel/signal.c @@ -16,7 +16,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/kernel.h> #include <linux/signal.h> #include <linux/errno.h> diff --git a/arch/sh64/kernel/sys_sh64.c b/arch/sh64/kernel/sys_sh64.c index ad0fa4e003e..19126daf9f4 100644 --- a/arch/sh64/kernel/sys_sh64.c +++ b/arch/sh64/kernel/sys_sh64.c @@ -20,7 +20,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/sem.h> #include <linux/msg.h> #include <linux/shm.h> diff --git a/arch/sh64/kernel/traps.c b/arch/sh64/kernel/traps.c index c346d7ef928..9d0d58fb29f 100644 --- a/arch/sh64/kernel/traps.c +++ b/arch/sh64/kernel/traps.c @@ -23,7 +23,6 @@ #include <linux/timer.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/init.h> #include <linux/delay.h> #include <linux/spinlock.h> diff --git a/arch/sh64/kernel/unwind.c b/arch/sh64/kernel/unwind.c index f934f97f9f9..1214c78e358 100644 --- a/arch/sh64/kernel/unwind.c +++ b/arch/sh64/kernel/unwind.c @@ -46,15 +46,15 @@ static int lookup_prev_stack_frame(unsigned long fp, unsigned long pc, struct pt_regs *regs) { const char *sym; - char *modname, namebuf[128]; - unsigned long offset, size; + char namebuf[128]; + unsigned long offset; unsigned long prologue = 0; unsigned long fp_displacement = 0; unsigned long fp_prev = 0; unsigned long offset_r14 = 0, offset_r18 = 0; int i, found_prologue_end = 0; - sym = kallsyms_lookup(pc, &size, &offset, &modname, namebuf); + sym = kallsyms_lookup(pc, NULL, &offset, NULL, namebuf); if (!sym) return -EINVAL; diff --git a/arch/sh64/mm/fault.c b/arch/sh64/mm/fault.c index 4f72ab33bb2..4dd8ee8f01c 100644 --- a/arch/sh64/mm/fault.c +++ b/arch/sh64/mm/fault.c @@ -22,7 +22,6 @@ #include <linux/mman.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/interrupt.h> #include <asm/system.h> diff --git a/arch/sh64/mm/hugetlbpage.c b/arch/sh64/mm/hugetlbpage.c index 4b455f61114..fa66daa2dfa 100644 --- a/arch/sh64/mm/hugetlbpage.c +++ b/arch/sh64/mm/hugetlbpage.c @@ -13,7 +13,6 @@ #include <linux/mm.h> #include <linux/hugetlb.h> #include <linux/pagemap.h> -#include <linux/smp_lock.h> #include <linux/slab.h> #include <linux/sysctl.h> diff --git a/arch/sh64/mm/tlbmiss.c b/arch/sh64/mm/tlbmiss.c index c8615954aaa..d4c5334186d 100644 --- a/arch/sh64/mm/tlbmiss.c +++ b/arch/sh64/mm/tlbmiss.c @@ -32,7 +32,6 @@ #include <linux/mman.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/interrupt.h> #include <asm/system.h> diff --git a/arch/sparc/kernel/head.S b/arch/sparc/kernel/head.S index 9a219e8b5dd..97da13c5256 100644 --- a/arch/sparc/kernel/head.S +++ b/arch/sparc/kernel/head.S @@ -19,7 +19,7 @@ #include <asm/ptrace.h> #include <asm/psr.h> #include <asm/page.h> -#include <asm/kdebug.h> +#include <linux/kdebug.h> #include <asm/winmacro.h> #include <asm/thread_info.h> /* TI_UWINMASK */ #include <asm/errno.h> diff --git a/arch/sparc/kernel/irq.c b/arch/sparc/kernel/irq.c index 5b4841d067c..bdbefa8a974 100644 --- a/arch/sparc/kernel/irq.c +++ b/arch/sparc/kernel/irq.c @@ -24,7 +24,6 @@ #include <linux/random.h> #include <linux/init.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/delay.h> #include <linux/threads.h> #include <linux/spinlock.h> diff --git a/arch/sparc/kernel/process.c b/arch/sparc/kernel/process.c index fc874e63a49..2940d2c1a77 100644 --- a/arch/sparc/kernel/process.c +++ b/arch/sparc/kernel/process.c @@ -23,7 +23,6 @@ #include <linux/user.h> #include <linux/a.out.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/reboot.h> #include <linux/delay.h> #include <linux/pm.h> diff --git a/arch/sparc/kernel/setup.c b/arch/sparc/kernel/setup.c index eccd8e87f52..64c0ed98820 100644 --- a/arch/sparc/kernel/setup.c +++ b/arch/sparc/kernel/setup.c @@ -31,6 +31,7 @@ #include <linux/spinlock.h> #include <linux/root_dev.h> #include <linux/cpu.h> +#include <linux/kdebug.h> #include <asm/system.h> #include <asm/io.h> @@ -40,7 +41,6 @@ #include <asm/pgtable.h> #include <asm/traps.h> #include <asm/vaddrs.h> -#include <asm/kdebug.h> #include <asm/mbus.h> #include <asm/idprom.h> #include <asm/machines.h> diff --git a/arch/sparc/kernel/signal.c b/arch/sparc/kernel/signal.c index c9301b9143c..9994cac9507 100644 --- a/arch/sparc/kernel/signal.c +++ b/arch/sparc/kernel/signal.c @@ -17,7 +17,6 @@ #include <linux/mm.h> #include <linux/tty.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/binfmts.h> /* do_coredum */ #include <linux/bitops.h> diff --git a/arch/sparc/kernel/smp.c b/arch/sparc/kernel/smp.c index 6b5f26b0fb7..4d9ad59031b 100644 --- a/arch/sparc/kernel/smp.c +++ b/arch/sparc/kernel/smp.c @@ -11,7 +11,6 @@ #include <linux/sched.h> #include <linux/threads.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/interrupt.h> #include <linux/kernel_stat.h> #include <linux/init.h> diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c index 0e27e226e0e..116d6a241ca 100644 --- a/arch/sparc/kernel/sun4d_irq.c +++ b/arch/sparc/kernel/sun4d_irq.c @@ -17,7 +17,6 @@ #include <linux/random.h> #include <linux/init.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/spinlock.h> #include <linux/seq_file.h> diff --git a/arch/sparc/kernel/sun4d_smp.c b/arch/sparc/kernel/sun4d_smp.c index c69de5d4863..098c94f1a32 100644 --- a/arch/sparc/kernel/sun4d_smp.c +++ b/arch/sparc/kernel/sun4d_smp.c @@ -12,7 +12,6 @@ #include <linux/sched.h> #include <linux/threads.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/interrupt.h> #include <linux/kernel_stat.h> #include <linux/init.h> diff --git a/arch/sparc/kernel/sun4m_smp.c b/arch/sparc/kernel/sun4m_smp.c index 4e07bdbbfb5..63ed19bfd02 100644 --- a/arch/sparc/kernel/sun4m_smp.c +++ b/arch/sparc/kernel/sun4m_smp.c @@ -9,7 +9,6 @@ #include <linux/sched.h> #include <linux/threads.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/interrupt.h> #include <linux/kernel_stat.h> #include <linux/init.h> diff --git a/arch/sparc/kernel/sunos_ioctl.c b/arch/sparc/kernel/sunos_ioctl.c index 32e8274e435..e613cc6a10b 100644 --- a/arch/sparc/kernel/sunos_ioctl.c +++ b/arch/sparc/kernel/sunos_ioctl.c @@ -21,7 +21,6 @@ #include <linux/fs.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/syscalls.h> #include <linux/file.h> diff --git a/arch/sparc/kernel/sys_solaris.c b/arch/sparc/kernel/sys_solaris.c index 01b07bb440f..2226a599248 100644 --- a/arch/sparc/kernel/sys_solaris.c +++ b/arch/sparc/kernel/sys_solaris.c @@ -12,7 +12,6 @@ #include <linux/ptrace.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/module.h> asmlinkage int diff --git a/arch/sparc/kernel/traps.c b/arch/sparc/kernel/traps.c index 527687afc1c..dc9ffea2a4f 100644 --- a/arch/sparc/kernel/traps.c +++ b/arch/sparc/kernel/traps.c @@ -15,6 +15,7 @@ #include <linux/signal.h> #include <linux/smp.h> #include <linux/smp_lock.h> +#include <linux/kdebug.h> #include <asm/delay.h> #include <asm/system.h> @@ -22,7 +23,6 @@ #include <asm/oplib.h> #include <asm/page.h> #include <asm/pgtable.h> -#include <asm/kdebug.h> #include <asm/unistd.h> #include <asm/traps.h> diff --git a/arch/sparc/lib/bitext.c b/arch/sparc/lib/bitext.c index 2e168d16547..764b3eb7b60 100644 --- a/arch/sparc/lib/bitext.c +++ b/arch/sparc/lib/bitext.c @@ -9,7 +9,6 @@ * fragmentation. */ -#include <linux/smp_lock.h> #include <linux/string.h> #include <linux/bitops.h> diff --git a/arch/sparc/mm/fault.c b/arch/sparc/mm/fault.c index 9eeed3347df..c3483365db4 100644 --- a/arch/sparc/mm/fault.c +++ b/arch/sparc/mm/fault.c @@ -18,9 +18,9 @@ #include <linux/signal.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/interrupt.h> #include <linux/module.h> +#include <linux/kdebug.h> #include <asm/system.h> #include <asm/page.h> @@ -30,7 +30,6 @@ #include <asm/oplib.h> #include <asm/smp.h> #include <asm/traps.h> -#include <asm/kdebug.h> #include <asm/uaccess.h> extern int prom_node_root; diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index 0df7121cef0..e5eaa8072ae 100644 --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c @@ -18,13 +18,13 @@ #include <linux/bootmem.h> #include <linux/fs.h> #include <linux/seq_file.h> +#include <linux/kdebug.h> #include <asm/bitext.h> #include <asm/page.h> #include <asm/pgalloc.h> #include <asm/pgtable.h> #include <asm/io.h> -#include <asm/kdebug.h> #include <asm/vaddrs.h> #include <asm/traps.h> #include <asm/smp.h> diff --git a/arch/sparc64/kernel/kprobes.c b/arch/sparc64/kernel/kprobes.c index ae221f0d4a6..a44fe47a3c2 100644 --- a/arch/sparc64/kernel/kprobes.c +++ b/arch/sparc64/kernel/kprobes.c @@ -6,7 +6,7 @@ #include <linux/kernel.h> #include <linux/kprobes.h> #include <linux/module.h> -#include <asm/kdebug.h> +#include <linux/kdebug.h> #include <asm/signal.h> #include <asm/cacheflush.h> #include <asm/uaccess.h> diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c index af2c7ff01ee..966861b212b 100644 --- a/arch/sparc64/kernel/pci.c +++ b/arch/sparc64/kernel/pci.c @@ -14,7 +14,6 @@ #include <linux/sched.h> #include <linux/capability.h> #include <linux/errno.h> -#include <linux/smp_lock.h> #include <linux/msi.h> #include <linux/irq.h> #include <linux/init.h> diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c index a114151f9fb..8e3c6e43511 100644 --- a/arch/sparc64/kernel/process.c +++ b/arch/sparc64/kernel/process.c @@ -19,7 +19,6 @@ #include <linux/kallsyms.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/stddef.h> #include <linux/ptrace.h> #include <linux/slab.h> diff --git a/arch/sparc64/kernel/signal.c b/arch/sparc64/kernel/signal.c index 96d56a8410a..203e8730100 100644 --- a/arch/sparc64/kernel/signal.c +++ b/arch/sparc64/kernel/signal.c @@ -20,7 +20,6 @@ #include <linux/unistd.h> #include <linux/mm.h> #include <linux/tty.h> -#include <linux/smp_lock.h> #include <linux/binfmts.h> #include <linux/bitops.h> diff --git a/arch/sparc64/kernel/signal32.c b/arch/sparc64/kernel/signal32.c index c45f21b881d..8c1c121330f 100644 --- a/arch/sparc64/kernel/signal32.c +++ b/arch/sparc64/kernel/signal32.c @@ -17,7 +17,6 @@ #include <linux/unistd.h> #include <linux/mm.h> #include <linux/tty.h> -#include <linux/smp_lock.h> #include <linux/binfmts.h> #include <linux/compat.h> #include <linux/bitops.h> diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index 1fac215252e..8087d67a0cf 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c @@ -10,7 +10,6 @@ #include <linux/pagemap.h> #include <linux/threads.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/interrupt.h> #include <linux/kernel_stat.h> #include <linux/delay.h> diff --git a/arch/sparc64/kernel/stacktrace.c b/arch/sparc64/kernel/stacktrace.c index c4d15f2762b..47f92a59be1 100644 --- a/arch/sparc64/kernel/stacktrace.c +++ b/arch/sparc64/kernel/stacktrace.c @@ -3,22 +3,16 @@ #include <linux/thread_info.h> #include <asm/ptrace.h> -void save_stack_trace(struct stack_trace *trace, struct task_struct *task) +void save_stack_trace(struct stack_trace *trace) { unsigned long ksp, fp, thread_base; - struct thread_info *tp; + struct thread_info *tp = task_thread_info(current); - if (!task) - task = current; - tp = task_thread_info(task); - if (task == current) { - flushw_all(); - __asm__ __volatile__( - "mov %%fp, %0" - : "=r" (ksp) - ); - } else - ksp = tp->ksp; + flushw_all(); + __asm__ __volatile__( + "mov %%fp, %0" + : "=r" (ksp) + ); fp = ksp + STACK_BIAS; thread_base = (unsigned long) tp; diff --git a/arch/sparc64/kernel/sunos_ioctl32.c b/arch/sparc64/kernel/sunos_ioctl32.c index a05e43d5175..75d2bad4983 100644 --- a/arch/sparc64/kernel/sunos_ioctl32.c +++ b/arch/sparc64/kernel/sunos_ioctl32.c @@ -22,7 +22,6 @@ #include <linux/file.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/syscalls.h> #include <linux/compat.h> diff --git a/arch/sparc64/kernel/sys_sparc.c b/arch/sparc64/kernel/sys_sparc.c index a53d4abb4b4..d108eeb0734 100644 --- a/arch/sparc64/kernel/sys_sparc.c +++ b/arch/sparc64/kernel/sys_sparc.c @@ -19,7 +19,6 @@ #include <linux/mman.h> #include <linux/utsname.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/slab.h> #include <linux/syscalls.h> #include <linux/ipc.h> diff --git a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c index 7876a022628..692e46a6b8d 100644 --- a/arch/sparc64/kernel/sys_sparc32.c +++ b/arch/sparc64/kernel/sys_sparc32.c @@ -775,15 +775,25 @@ asmlinkage long sys32_settimeofday(struct compat_timeval __user *tv, asmlinkage long sys32_utimes(char __user *filename, struct compat_timeval __user *tvs) { - struct timeval ktvs[2]; + struct timespec tv[2]; if (tvs) { + struct timeval ktvs[2]; if (get_tv32(&ktvs[0], tvs) || get_tv32(&ktvs[1], 1+tvs)) return -EFAULT; + + if (ktvs[0].tv_usec < 0 || ktvs[0].tv_usec >= 1000000 || + ktvs[1].tv_usec < 0 || ktvs[1].tv_usec >= 1000000) + return -EINVAL; + + tv[0].tv_sec = ktvs[0].tv_sec; + tv[0].tv_nsec = 1000 * ktvs[0].tv_usec; + tv[1].tv_sec = ktvs[1].tv_sec; + tv[1].tv_nsec = 1000 * ktvs[1].tv_usec; } - return do_utimes(AT_FDCWD, filename, (tvs ? &ktvs[0] : NULL)); + return do_utimes(AT_FDCWD, filename, tvs ? tv : NULL); } /* These are here just in case some old sparc32 binary calls it. */ diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c index ad67784292d..dc652f21029 100644 --- a/arch/sparc64/kernel/traps.c +++ b/arch/sparc64/kernel/traps.c @@ -15,9 +15,9 @@ #include <linux/kallsyms.h> #include <linux/signal.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/mm.h> #include <linux/init.h> +#include <linux/kdebug.h> #include <asm/delay.h> #include <asm/system.h> @@ -36,26 +36,12 @@ #include <asm/psrcompat.h> #include <asm/processor.h> #include <asm/timer.h> -#include <asm/kdebug.h> #include <asm/head.h> #ifdef CONFIG_KMOD #include <linux/kmod.h> #endif #include <asm/prom.h> -ATOMIC_NOTIFIER_HEAD(sparc64die_chain); - -int register_die_notifier(struct notifier_block *nb) -{ - return atomic_notifier_chain_register(&sparc64die_chain, nb); -} -EXPORT_SYMBOL(register_die_notifier); - -int unregister_die_notifier(struct notifier_block *nb) -{ - return atomic_notifier_chain_unregister(&sparc64die_chain, nb); -} -EXPORT_SYMBOL(unregister_die_notifier); /* When an irrecoverable trap occurs at tl > 0, the trap entry * code logs the trap state registers at every level in the trap diff --git a/arch/sparc64/kernel/unaligned.c b/arch/sparc64/kernel/unaligned.c index bc18d480dd1..953be816fa2 100644 --- a/arch/sparc64/kernel/unaligned.c +++ b/arch/sparc64/kernel/unaligned.c @@ -18,7 +18,6 @@ #include <asm/system.h> #include <asm/uaccess.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/bitops.h> #include <linux/kallsyms.h> #include <asm/fpumacro.h> diff --git a/arch/sparc64/mm/fault.c b/arch/sparc64/mm/fault.c index 55ae802dc0a..c32e309f778 100644 --- a/arch/sparc64/mm/fault.c +++ b/arch/sparc64/mm/fault.c @@ -15,11 +15,11 @@ #include <linux/signal.h> #include <linux/mm.h> #include <linux/module.h> -#include <linux/smp_lock.h> #include <linux/init.h> #include <linux/interrupt.h> #include <linux/kprobes.h> #include <linux/kallsyms.h> +#include <linux/kdebug.h> #include <asm/page.h> #include <asm/pgtable.h> @@ -29,7 +29,6 @@ #include <asm/asi.h> #include <asm/lsu.h> #include <asm/sections.h> -#include <asm/kdebug.h> #include <asm/mmu_context.h> #ifdef CONFIG_KPROBES diff --git a/arch/sparc64/mm/hugetlbpage.c b/arch/sparc64/mm/hugetlbpage.c index e224a94e6a1..eaba9b70b18 100644 --- a/arch/sparc64/mm/hugetlbpage.c +++ b/arch/sparc64/mm/hugetlbpage.c @@ -10,7 +10,6 @@ #include <linux/mm.h> #include <linux/hugetlb.h> #include <linux/pagemap.h> -#include <linux/smp_lock.h> #include <linux/slab.h> #include <linux/sysctl.h> diff --git a/arch/sparc64/solaris/ipc.c b/arch/sparc64/solaris/ipc.c index 8cef5fd57b2..a531a2cdb38 100644 --- a/arch/sparc64/solaris/ipc.c +++ b/arch/sparc64/solaris/ipc.c @@ -6,7 +6,6 @@ #include <linux/kernel.h> #include <linux/types.h> -#include <linux/smp_lock.h> #include <linux/wait.h> #include <linux/mm.h> #include <linux/shm.h> diff --git a/arch/sparc64/solaris/misc.c b/arch/sparc64/solaris/misc.c index 542c808ec2c..3b67de7455f 100644 --- a/arch/sparc64/solaris/misc.c +++ b/arch/sparc64/solaris/misc.c @@ -6,7 +6,6 @@ #include <linux/module.h> #include <linux/types.h> -#include <linux/smp_lock.h> #include <linux/utsname.h> #include <linux/limits.h> #include <linux/mm.h> diff --git a/arch/sparc64/solaris/signal.c b/arch/sparc64/solaris/signal.c index 7fa2634e208..de10c9716cf 100644 --- a/arch/sparc64/solaris/signal.c +++ b/arch/sparc64/solaris/signal.c @@ -5,7 +5,6 @@ */ #include <linux/types.h> -#include <linux/smp_lock.h> #include <linux/errno.h> #include <asm/uaccess.h> diff --git a/arch/sparc64/solaris/socket.c b/arch/sparc64/solaris/socket.c index d3a66ea74a7..cc69847cf24 100644 --- a/arch/sparc64/solaris/socket.c +++ b/arch/sparc64/solaris/socket.c @@ -8,7 +8,6 @@ */ #include <linux/types.h> -#include <linux/smp_lock.h> #include <linux/mm.h> #include <linux/slab.h> #include <linux/socket.h> diff --git a/arch/sparc64/solaris/socksys.c b/arch/sparc64/solaris/socksys.c index c2864447de8..e94f6e5d945 100644 --- a/arch/sparc64/solaris/socksys.c +++ b/arch/sparc64/solaris/socksys.c @@ -17,7 +17,6 @@ #include <linux/kernel.h> #include <linux/sched.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/ioctl.h> #include <linux/fs.h> #include <linux/file.h> diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index baac4ad5e68..72773dd5442 100644 --- a/arch/um/drivers/net_kern.c +++ b/arch/um/drivers/net_kern.c @@ -316,12 +316,14 @@ static void setup_etheraddr(char *str, unsigned char *addr, char *name) } if (!is_local_ether_addr(addr)) { printk(KERN_WARNING - "Warning: attempt to assign a globally valid ethernet address to a " - "device\n"); - printk(KERN_WARNING "You should better enable the 2nd rightmost bit " - "in the first byte of the MAC, i.e. " - "%02x:%02x:%02x:%02x:%02x:%02x\n", - addr[0] | 0x02, addr[1], addr[2], addr[3], addr[4], addr[5]); + "Warning: attempt to assign a globally valid ethernet " + "address to a device\n"); + printk(KERN_WARNING "You should better enable the 2nd " + "rightmost bit in the first byte of the MAC,\n"); + printk(KERN_WARNING "i.e. %02x:%02x:%02x:%02x:%02x:%02x\n", + addr[0] | 0x02, addr[1], addr[2], addr[3], addr[4], + addr[5]); + goto random; } return; @@ -478,6 +480,7 @@ out_undo_user_init: (*transport->user->remove)(&lp->user); out_unregister: platform_device_unregister(&device->pdev); + return; /* platform_device_unregister frees dev and device */ out_free_netdev: free_netdev(dev); out_free_device: diff --git a/arch/um/drivers/pcap_kern.c b/arch/um/drivers/pcap_kern.c index 948849343ca..c329931673d 100644 --- a/arch/um/drivers/pcap_kern.c +++ b/arch/um/drivers/pcap_kern.c @@ -29,21 +29,25 @@ void pcap_init(struct net_device *dev, void *data) ppri->promisc = init->promisc; ppri->optimize = init->optimize; ppri->filter = init->filter; + + printk("pcap backend, host interface %s\n", ppri->host_if); } -static int pcap_read(int fd, struct sk_buff **skb, +static int pcap_read(int fd, struct sk_buff **skb, struct uml_net_private *lp) { *skb = ether_adjust_skb(*skb, ETH_HEADER_OTHER); - if(*skb == NULL) return(-ENOMEM); - return(pcap_user_read(fd, skb_mac_header(*skb), + if(*skb == NULL) + return -ENOMEM; + + return pcap_user_read(fd, skb_mac_header(*skb), (*skb)->dev->mtu + ETH_HEADER_OTHER, - (struct pcap_data *) &lp->user)); + (struct pcap_data *) &lp->user); } static int pcap_write(int fd, struct sk_buff **skb, struct uml_net_private *lp) { - return(-EPERM); + return -EPERM; } static const struct net_kern_info pcap_kern_info = { @@ -65,12 +69,12 @@ int pcap_setup(char *str, char **mac_out, void *data) .optimize = 0, .filter = NULL }); - remain = split_if_spec(str, &host_if, &init->filter, - &options[0], &options[1], NULL); + remain = split_if_spec(str, &host_if, &init->filter, + &options[0], &options[1], mac_out, NULL); if(remain != NULL){ printk(KERN_ERR "pcap_setup - Extra garbage on " "specification : '%s'\n", remain); - return(0); + return 0; } if(host_if != NULL) @@ -87,10 +91,13 @@ int pcap_setup(char *str, char **mac_out, void *data) init->optimize = 1; else if(!strcmp(options[i], "nooptimize")) init->optimize = 0; - else printk("pcap_setup : bad option - '%s'\n", options[i]); + else { + printk("pcap_setup : bad option - '%s'\n", options[i]); + return 0; + } } - return(1); + return 1; } static struct transport pcap_transport = { diff --git a/arch/um/drivers/pcap_user.c b/arch/um/drivers/pcap_user.c index dc0a903ef9a..483aa15222a 100644 --- a/arch/um/drivers/pcap_user.c +++ b/arch/um/drivers/pcap_user.c @@ -13,6 +13,7 @@ #include "pcap_user.h" #include "user.h" #include "um_malloc.h" +#include "kern_constants.h" #define MAX_PACKET (ETH_MAX_PACKET + ETH_HEADER_OTHER) @@ -26,8 +27,8 @@ static int pcap_user_init(void *data, void *dev) p = pcap_open_live(pri->host_if, MAX_PACKET, pri->promisc, 0, errors); if(p == NULL){ - printk("pcap_user_init : pcap_open_live failed - '%s'\n", - errors); + printk(UM_KERN_ERR "pcap_user_init : pcap_open_live failed - " + "'%s'\n", errors); return -EINVAL; } @@ -48,13 +49,13 @@ static int pcap_open(void *data) if(pri->filter != NULL){ err = dev_netmask(pri->dev, &netmask); if(err < 0){ - printk("pcap_open : dev_netmask failed\n"); + printk(UM_KERN_ERR "pcap_open : dev_netmask failed\n"); return -EIO; } pri->compiled = um_kmalloc(sizeof(struct bpf_program)); if(pri->compiled == NULL){ - printk("pcap_open : kmalloc failed\n"); + printk(UM_KERN_ERR "pcap_open : kmalloc failed\n"); return -ENOMEM; } @@ -62,15 +63,15 @@ static int pcap_open(void *data) (struct bpf_program *) pri->compiled, pri->filter, pri->optimize, netmask); if(err < 0){ - printk("pcap_open : pcap_compile failed - '%s'\n", - pcap_geterr(pri->pcap)); + printk(UM_KERN_ERR "pcap_open : pcap_compile failed - " + "'%s'\n", pcap_geterr(pri->pcap)); return -EIO; } err = pcap_setfilter(pri->pcap, pri->compiled); if(err < 0){ - printk("pcap_open : pcap_setfilter failed - '%s'\n", - pcap_geterr(pri->pcap)); + printk(UM_KERN_ERR "pcap_open : pcap_setfilter " + "failed - '%s'\n", pcap_geterr(pri->pcap)); return -EIO; } } @@ -85,7 +86,8 @@ static void pcap_remove(void *data) if(pri->compiled != NULL) pcap_freecode(pri->compiled); - pcap_close(pri->pcap); + if(pri->pcap != NULL) + pcap_close(pri->pcap); } struct pcap_handler_data { @@ -114,7 +116,8 @@ int pcap_user_read(int fd, void *buffer, int len, struct pcap_data *pri) n = pcap_dispatch(pri->pcap, 1, handler, (u_char *) &hdata); if(n < 0){ - printk("pcap_dispatch failed - %s\n", pcap_geterr(pri->pcap)); + printk(UM_KERN_ERR "pcap_dispatch failed - %s\n", + pcap_geterr(pri->pcap)); return -EIO; } else if(n == 0) diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c index cd7349de8ca..259c49da7ff 100644 --- a/arch/um/kernel/time.c +++ b/arch/um/kernel/time.c @@ -177,6 +177,8 @@ int do_settimeofday(struct timespec *tv) void timer_handler(int sig, union uml_pt_regs *regs) { + if(current_thread->cpu == 0) + timer_irq(regs); local_irq_disable(); irq_enter(); update_process_times(CHOOSE_MODE( @@ -184,6 +186,4 @@ void timer_handler(int sig, union uml_pt_regs *regs) (regs)->skas.is_user)); irq_exit(); local_irq_enable(); - if(current_thread->cpu == 0) - timer_irq(regs); } diff --git a/arch/v850/kernel/process.c b/arch/v850/kernel/process.c index c4f844c86e5..e4a4b8e7d5a 100644 --- a/arch/v850/kernel/process.c +++ b/arch/v850/kernel/process.c @@ -16,7 +16,6 @@ #include <linux/kernel.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/stddef.h> #include <linux/unistd.h> #include <linux/ptrace.h> diff --git a/arch/v850/kernel/ptrace.c b/arch/v850/kernel/ptrace.c index 67e05750966..a9b09343097 100644 --- a/arch/v850/kernel/ptrace.c +++ b/arch/v850/kernel/ptrace.c @@ -21,7 +21,6 @@ #include <linux/kernel.h> #include <linux/mm.h> #include <linux/sched.h> -#include <linux/smp_lock.h> #include <linux/ptrace.h> #include <linux/signal.h> diff --git a/arch/v850/kernel/signal.c b/arch/v850/kernel/signal.c index 17c2d4359b0..bf166e7e762 100644 --- a/arch/v850/kernel/signal.c +++ b/arch/v850/kernel/signal.c @@ -17,7 +17,6 @@ #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/kernel.h> #include <linux/signal.h> #include <linux/errno.h> diff --git a/arch/v850/kernel/syscalls.c b/arch/v850/kernel/syscalls.c index d2b1fb19d24..f9f00ccf532 100644 --- a/arch/v850/kernel/syscalls.c +++ b/arch/v850/kernel/syscalls.c @@ -18,7 +18,6 @@ #include <linux/errno.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/syscalls.h> #include <linux/sem.h> #include <linux/msg.h> diff --git a/arch/x86_64/ia32/ia32_signal.c b/arch/x86_64/ia32/ia32_signal.c index 359eacc3850..6ea19c25f90 100644 --- a/arch/x86_64/ia32/ia32_signal.c +++ b/arch/x86_64/ia32/ia32_signal.c @@ -11,7 +11,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/kernel.h> #include <linux/signal.h> #include <linux/errno.h> diff --git a/arch/x86_64/ia32/ia32entry.S b/arch/x86_64/ia32/ia32entry.S index c48087db6f7..f2106837827 100644 --- a/arch/x86_64/ia32/ia32entry.S +++ b/arch/x86_64/ia32/ia32entry.S @@ -710,9 +710,10 @@ ia32_sys_call_table: .quad compat_sys_get_robust_list .quad sys_splice .quad sys_sync_file_range - .quad sys_tee + .quad sys_tee /* 315 */ .quad compat_sys_vmsplice .quad compat_sys_move_pages .quad sys_getcpu .quad sys_epoll_pwait + .quad compat_sys_utimensat /* 320 */ ia32_syscall_end: diff --git a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile index 4d94c51803d..de1de8a2fd8 100644 --- a/arch/x86_64/kernel/Makefile +++ b/arch/x86_64/kernel/Makefile @@ -32,6 +32,7 @@ obj-$(CONFIG_EARLY_PRINTK) += early_printk.o obj-$(CONFIG_IOMMU) += pci-gart.o aperture.o obj-$(CONFIG_CALGARY_IOMMU) += pci-calgary.o tce.o obj-$(CONFIG_SWIOTLB) += pci-swiotlb.o +obj-$(CONFIG_SERIAL_8250) += legacy_serial.o obj-$(CONFIG_KPROBES) += kprobes.o obj-$(CONFIG_X86_PM_TIMER) += pmtimer.o obj-$(CONFIG_X86_VSMP) += vsmp.o @@ -49,6 +50,7 @@ CFLAGS_vsyscall.o := $(PROFILING) -g0 therm_throt-y += ../../i386/kernel/cpu/mcheck/therm_throt.o bootflag-y += ../../i386/kernel/bootflag.o +legacy_serial-y += ../../i386/kernel/legacy_serial.o cpuid-$(subst m,y,$(CONFIG_X86_CPUID)) += ../../i386/kernel/cpuid.o topology-y += ../../i386/kernel/topology.o microcode-$(subst m,y,$(CONFIG_MICROCODE)) += ../../i386/kernel/microcode.o diff --git a/arch/x86_64/kernel/apic.c b/arch/x86_64/kernel/apic.c index d198f7d82e5..1b0e07bb872 100644 --- a/arch/x86_64/kernel/apic.c +++ b/arch/x86_64/kernel/apic.c @@ -19,7 +19,6 @@ #include <linux/mm.h> #include <linux/delay.h> #include <linux/bootmem.h> -#include <linux/smp_lock.h> #include <linux/interrupt.h> #include <linux/mc146818rtc.h> #include <linux/kernel_stat.h> diff --git a/arch/x86_64/kernel/crash.c b/arch/x86_64/kernel/crash.c index 95a7a2c1313..13432a1ae90 100644 --- a/arch/x86_64/kernel/crash.c +++ b/arch/x86_64/kernel/crash.c @@ -17,13 +17,13 @@ #include <linux/delay.h> #include <linux/elf.h> #include <linux/elfcore.h> +#include <linux/kdebug.h> #include <asm/processor.h> #include <asm/hardirq.h> #include <asm/nmi.h> #include <asm/hw_irq.h> #include <asm/mach_apic.h> -#include <asm/kdebug.h> /* This keeps a track of which one is crashing cpu. */ static int crashing_cpu; diff --git a/arch/x86_64/kernel/early_printk.c b/arch/x86_64/kernel/early_printk.c index 92213d2b7c1..56eaa259782 100644 --- a/arch/x86_64/kernel/early_printk.c +++ b/arch/x86_64/kernel/early_printk.c @@ -243,22 +243,12 @@ static int __init setup_early_printk(char *buf) early_console = &simnow_console; keep_early = 1; } + + if (keep_early) + early_console->flags &= ~CON_BOOT; + else + early_console->flags |= CON_BOOT; register_console(early_console); return 0; } - early_param("earlyprintk", setup_early_printk); - -void __init disable_early_printk(void) -{ - if (!early_console_initialized || !early_console) - return; - if (!keep_early) { - printk("disabling early console\n"); - unregister_console(early_console); - early_console_initialized = 0; - } else { - printk("keeping early console\n"); - } -} - diff --git a/arch/x86_64/kernel/i8259.c b/arch/x86_64/kernel/i8259.c index 48942668277..4b326655b20 100644 --- a/arch/x86_64/kernel/i8259.c +++ b/arch/x86_64/kernel/i8259.c @@ -7,7 +7,6 @@ #include <linux/timex.h> #include <linux/slab.h> #include <linux/random.h> -#include <linux/smp_lock.h> #include <linux/init.h> #include <linux/kernel_stat.h> #include <linux/sysdev.h> diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c index 2a2df14dab7..4d582589fa8 100644 --- a/arch/x86_64/kernel/io_apic.c +++ b/arch/x86_64/kernel/io_apic.c @@ -25,7 +25,6 @@ #include <linux/init.h> #include <linux/delay.h> #include <linux/sched.h> -#include <linux/smp_lock.h> #include <linux/pci.h> #include <linux/mc146818rtc.h> #include <linux/acpi.h> diff --git a/arch/x86_64/kernel/ioport.c b/arch/x86_64/kernel/ioport.c index 387d347b0e0..653efa30b0f 100644 --- a/arch/x86_64/kernel/ioport.c +++ b/arch/x86_64/kernel/ioport.c @@ -12,7 +12,6 @@ #include <linux/types.h> #include <linux/ioport.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/stddef.h> #include <linux/slab.h> #include <linux/thread_info.h> diff --git a/arch/x86_64/kernel/kprobes.c b/arch/x86_64/kernel/kprobes.c index 209c8c0bec7..d4a0d0ac993 100644 --- a/arch/x86_64/kernel/kprobes.c +++ b/arch/x86_64/kernel/kprobes.c @@ -37,10 +37,10 @@ #include <linux/slab.h> #include <linux/preempt.h> #include <linux/module.h> +#include <linux/kdebug.h> #include <asm/cacheflush.h> #include <asm/pgtable.h> -#include <asm/kdebug.h> #include <asm/uaccess.h> void jprobe_return_end(void); @@ -266,23 +266,14 @@ static void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs) } /* Called with kretprobe_lock held */ -void __kprobes arch_prepare_kretprobe(struct kretprobe *rp, +void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri, struct pt_regs *regs) { unsigned long *sara = (unsigned long *)regs->rsp; - struct kretprobe_instance *ri; - if ((ri = get_free_rp_inst(rp)) != NULL) { - ri->rp = rp; - ri->task = current; - ri->ret_addr = (kprobe_opcode_t *) *sara; - - /* Replace the return addr with trampoline addr */ - *sara = (unsigned long) &kretprobe_trampoline; - add_rp_inst(ri); - } else { - rp->nmissed++; - } + ri->ret_addr = (kprobe_opcode_t *) *sara; + /* Replace the return addr with trampoline addr */ + *sara = (unsigned long) &kretprobe_trampoline; } int __kprobes kprobe_handler(struct pt_regs *regs) @@ -447,7 +438,7 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs) break; } - BUG_ON(!orig_ret_address || (orig_ret_address == trampoline_address)); + kretprobe_assert(ri, orig_ret_address, trampoline_address); regs->rip = orig_ret_address; reset_current_kprobe(); @@ -752,3 +743,11 @@ int __init arch_init_kprobes(void) { return register_kprobe(&trampoline_p); } + +int __kprobes arch_trampoline_kprobe(struct kprobe *p) +{ + if (p->addr == (kprobe_opcode_t *)&kretprobe_trampoline) + return 1; + + return 0; +} diff --git a/arch/x86_64/kernel/ldt.c b/arch/x86_64/kernel/ldt.c index d7e5d0cf428..bc9ffd5c19c 100644 --- a/arch/x86_64/kernel/ldt.c +++ b/arch/x86_64/kernel/ldt.c @@ -13,7 +13,6 @@ #include <linux/string.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/vmalloc.h> #include <linux/slab.h> diff --git a/arch/x86_64/kernel/mce.c b/arch/x86_64/kernel/mce.c index fa267268247..442169640e4 100644 --- a/arch/x86_64/kernel/mce.c +++ b/arch/x86_64/kernel/mce.c @@ -20,10 +20,10 @@ #include <linux/percpu.h> #include <linux/ctype.h> #include <linux/kmod.h> +#include <linux/kdebug.h> #include <asm/processor.h> #include <asm/msr.h> #include <asm/mce.h> -#include <asm/kdebug.h> #include <asm/uaccess.h> #include <asm/smp.h> diff --git a/arch/x86_64/kernel/mpparse.c b/arch/x86_64/kernel/mpparse.c index d0dc4891599..61ae57eb9e4 100644 --- a/arch/x86_64/kernel/mpparse.c +++ b/arch/x86_64/kernel/mpparse.c @@ -17,7 +17,6 @@ #include <linux/init.h> #include <linux/delay.h> #include <linux/bootmem.h> -#include <linux/smp_lock.h> #include <linux/kernel_stat.h> #include <linux/mc146818rtc.h> #include <linux/acpi.h> diff --git a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c index 6cd2b30e2ff..931c64bad5e 100644 --- a/arch/x86_64/kernel/nmi.c +++ b/arch/x86_64/kernel/nmi.c @@ -21,11 +21,11 @@ #include <linux/sysctl.h> #include <linux/kprobes.h> #include <linux/cpumask.h> +#include <linux/kdebug.h> #include <asm/smp.h> #include <asm/nmi.h> #include <asm/proto.h> -#include <asm/kdebug.h> #include <asm/mce.h> int unknown_nmi_panic; diff --git a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c index 0a762e10f2b..373ef66ca1d 100644 --- a/arch/x86_64/kernel/pci-gart.c +++ b/arch/x86_64/kernel/pci-gart.c @@ -22,13 +22,13 @@ #include <linux/topology.h> #include <linux/interrupt.h> #include <linux/bitops.h> +#include <linux/kdebug.h> #include <asm/atomic.h> #include <asm/io.h> #include <asm/mtrr.h> #include <asm/pgtable.h> #include <asm/proto.h> #include <asm/cacheflush.h> -#include <asm/kdebug.h> #include <asm/swiotlb.h> #include <asm/dma.h> #include <asm/k8.h> diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c index 4f21765078b..5909039f37a 100644 --- a/arch/x86_64/kernel/process.c +++ b/arch/x86_64/kernel/process.c @@ -36,6 +36,7 @@ #include <linux/random.h> #include <linux/notifier.h> #include <linux/kprobes.h> +#include <linux/kdebug.h> #include <asm/uaccess.h> #include <asm/pgtable.h> @@ -46,7 +47,6 @@ #include <asm/mmu_context.h> #include <asm/pda.h> #include <asm/prctl.h> -#include <asm/kdebug.h> #include <asm/desc.h> #include <asm/proto.h> #include <asm/ia32.h> diff --git a/arch/x86_64/kernel/ptrace.c b/arch/x86_64/kernel/ptrace.c index 4326a690a50..9409117b9f1 100644 --- a/arch/x86_64/kernel/ptrace.c +++ b/arch/x86_64/kernel/ptrace.c @@ -11,7 +11,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/errno.h> #include <linux/ptrace.h> #include <linux/user.h> diff --git a/arch/x86_64/kernel/reboot.c b/arch/x86_64/kernel/reboot.c index 2d676984745..c116b54d422 100644 --- a/arch/x86_64/kernel/reboot.c +++ b/arch/x86_64/kernel/reboot.c @@ -7,8 +7,8 @@ #include <linux/ctype.h> #include <linux/string.h> #include <linux/pm.h> +#include <linux/kdebug.h> #include <asm/io.h> -#include <asm/kdebug.h> #include <asm/delay.h> #include <asm/hw_irq.h> #include <asm/system.h> diff --git a/arch/x86_64/kernel/signal.c b/arch/x86_64/kernel/signal.c index c819625f331..290f5d8037c 100644 --- a/arch/x86_64/kernel/signal.c +++ b/arch/x86_64/kernel/signal.c @@ -12,7 +12,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/kernel.h> #include <linux/signal.h> #include <linux/errno.h> diff --git a/arch/x86_64/kernel/smp.c b/arch/x86_64/kernel/smp.c index bd1d123947c..2ff46859162 100644 --- a/arch/x86_64/kernel/smp.c +++ b/arch/x86_64/kernel/smp.c @@ -14,7 +14,6 @@ #include <linux/mm.h> #include <linux/delay.h> #include <linux/spinlock.h> -#include <linux/smp_lock.h> #include <linux/smp.h> #include <linux/kernel_stat.h> #include <linux/mc146818rtc.h> diff --git a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c index 4d9dacfae57..32f50783edc 100644 --- a/arch/x86_64/kernel/smpboot.c +++ b/arch/x86_64/kernel/smpboot.c @@ -42,18 +42,17 @@ #include <linux/mm.h> #include <linux/kernel_stat.h> -#include <linux/smp_lock.h> #include <linux/bootmem.h> #include <linux/thread_info.h> #include <linux/module.h> #include <linux/delay.h> #include <linux/mc146818rtc.h> #include <linux/smp.h> +#include <linux/kdebug.h> #include <asm/mtrr.h> #include <asm/pgalloc.h> #include <asm/desc.h> -#include <asm/kdebug.h> #include <asm/tlbflush.h> #include <asm/proto.h> #include <asm/nmi.h> diff --git a/arch/x86_64/kernel/stacktrace.c b/arch/x86_64/kernel/stacktrace.c index 65ac2c6b34a..cb910911358 100644 --- a/arch/x86_64/kernel/stacktrace.c +++ b/arch/x86_64/kernel/stacktrace.c @@ -21,8 +21,7 @@ save_stack_warning_symbol(void *data, char *msg, unsigned long symbol) static int save_stack_stack(void *data, char *name) { - struct stack_trace *trace = (struct stack_trace *)data; - return trace->all_contexts ? 0 : -1; + return -1; } static void save_stack_address(void *data, unsigned long addr) @@ -46,11 +45,10 @@ static struct stacktrace_ops save_stack_ops = { /* * Save stack-backtrace addresses into a stack_trace buffer. */ -void save_stack_trace(struct stack_trace *trace, struct task_struct *task) +void save_stack_trace(struct stack_trace *trace) { - dump_trace(task, NULL, NULL, &save_stack_ops, trace); + dump_trace(current, NULL, NULL, &save_stack_ops, trace); if (trace->nr_entries < trace->max_entries) trace->entries[trace->nr_entries++] = ULONG_MAX; } EXPORT_SYMBOL(save_stack_trace); - diff --git a/arch/x86_64/kernel/sys_x86_64.c b/arch/x86_64/kernel/sys_x86_64.c index f891931eb75..d067d9a2ad2 100644 --- a/arch/x86_64/kernel/sys_x86_64.c +++ b/arch/x86_64/kernel/sys_x86_64.c @@ -7,7 +7,6 @@ #include <linux/syscalls.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/sem.h> #include <linux/msg.h> #include <linux/shm.h> diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c index 0652e173813..4a0895bacf5 100644 --- a/arch/x86_64/kernel/time.c +++ b/arch/x86_64/kernel/time.c @@ -363,7 +363,10 @@ void stop_timer_interrupt(void) } static struct irqaction irq0 = { - timer_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "timer", NULL, NULL + .handler = timer_interrupt, + .flags = IRQF_DISABLED | IRQF_IRQPOLL, + .mask = CPU_MASK_NONE, + .name = "timer" }; void __init time_init(void) diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c index d76fc32d459..8c2ac41187c 100644 --- a/arch/x86_64/kernel/traps.c +++ b/arch/x86_64/kernel/traps.c @@ -32,6 +32,7 @@ #include <linux/unwind.h> #include <linux/uaccess.h> #include <linux/bug.h> +#include <linux/kdebug.h> #include <asm/system.h> #include <asm/io.h> @@ -39,7 +40,6 @@ #include <asm/debugreg.h> #include <asm/desc.h> #include <asm/i387.h> -#include <asm/kdebug.h> #include <asm/processor.h> #include <asm/unwind.h> #include <asm/smp.h> @@ -71,22 +71,6 @@ asmlinkage void alignment_check(void); asmlinkage void machine_check(void); asmlinkage void spurious_interrupt_bug(void); -ATOMIC_NOTIFIER_HEAD(die_chain); -EXPORT_SYMBOL(die_chain); - -int register_die_notifier(struct notifier_block *nb) -{ - vmalloc_sync_all(); - return atomic_notifier_chain_register(&die_chain, nb); -} -EXPORT_SYMBOL(register_die_notifier); /* used modular by kdb */ - -int unregister_die_notifier(struct notifier_block *nb) -{ - return atomic_notifier_chain_unregister(&die_chain, nb); -} -EXPORT_SYMBOL(unregister_die_notifier); /* used modular by kdb */ - static inline void conditional_sti(struct pt_regs *regs) { if (regs->eflags & X86_EFLAGS_IF) @@ -792,6 +776,8 @@ asmlinkage __kprobes void default_do_nmi(struct pt_regs *regs) */ if (nmi_watchdog_tick(regs,reason)) return; + if (notify_die(DIE_NMI_POST, "nmi_post", regs, reason, 2, 0) + == NOTIFY_STOP) if (!do_nmi_callback(regs,cpu)) unknown_nmi_error(reason, regs); diff --git a/arch/x86_64/mm/fault.c b/arch/x86_64/mm/fault.c index de99dba2c51..bfb62a13d7e 100644 --- a/arch/x86_64/mm/fault.c +++ b/arch/x86_64/mm/fault.c @@ -15,22 +15,22 @@ #include <linux/mman.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/interrupt.h> #include <linux/init.h> #include <linux/tty.h> #include <linux/vt_kern.h> /* For unblank_screen() */ #include <linux/compiler.h> +#include <linux/vmalloc.h> #include <linux/module.h> #include <linux/kprobes.h> #include <linux/uaccess.h> +#include <linux/kdebug.h> #include <asm/system.h> #include <asm/pgalloc.h> #include <asm/smp.h> #include <asm/tlbflush.h> #include <asm/proto.h> -#include <asm/kdebug.h> #include <asm-generic/sections.h> /* Page fault error code bits */ diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c index c0822683b91..1336da8bdee 100644 --- a/arch/x86_64/mm/init.c +++ b/arch/x86_64/mm/init.c @@ -172,7 +172,7 @@ __set_fixmap (enum fixed_addresses idx, unsigned long phys, pgprot_t prot) set_pte_phys(address, phys, prot); } -unsigned long __initdata table_start, table_end; +unsigned long __meminitdata table_start, table_end; static __meminit void *alloc_low_page(unsigned long *phys) { @@ -204,7 +204,7 @@ static __meminit void unmap_low_page(void *adr) } /* Must run before zap_low_mappings */ -__init void *early_ioremap(unsigned long addr, unsigned long size) +__meminit void *early_ioremap(unsigned long addr, unsigned long size) { unsigned long vaddr; pmd_t *pmd, *last_pmd; @@ -233,7 +233,7 @@ __init void *early_ioremap(unsigned long addr, unsigned long size) } /* To avoid virtual aliases later */ -__init void early_iounmap(void *addr, unsigned long size) +__meminit void early_iounmap(void *addr, unsigned long size) { unsigned long vaddr; pmd_t *pmd; diff --git a/arch/xtensa/kernel/process.c b/arch/xtensa/kernel/process.c index 795bd5ac6f4..ce758bab95b 100644 --- a/arch/xtensa/kernel/process.c +++ b/arch/xtensa/kernel/process.c @@ -20,7 +20,6 @@ #include <linux/kernel.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/stddef.h> #include <linux/unistd.h> #include <linux/ptrace.h> diff --git a/arch/xtensa/kernel/ptrace.c b/arch/xtensa/kernel/ptrace.c index 8b6d3d0623b..14104ff6309 100644 --- a/arch/xtensa/kernel/ptrace.c +++ b/arch/xtensa/kernel/ptrace.c @@ -19,7 +19,6 @@ #include <linux/errno.h> #include <linux/ptrace.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/security.h> #include <linux/signal.h> diff --git a/arch/xtensa/kernel/signal.c b/arch/xtensa/kernel/signal.c index c6d9880a4cd..58107672a61 100644 --- a/arch/xtensa/kernel/signal.c +++ b/arch/xtensa/kernel/signal.c @@ -17,7 +17,6 @@ #include <linux/sched.h> #include <linux/mm.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/kernel.h> #include <linux/signal.h> #include <linux/errno.h> |