From 33dc5c1000c193084a70ffd8f3bd9c67d19f9159 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Tue, 10 Jan 2012 16:24:11 +0900 Subject: sh: Fix up store queue code for subsys_interface changes. Fixes up a number of build and section mismatch errors introduced by the subsys_interface conversion. Signed-off-by: Paul Mundt --- arch/sh/kernel/cpu/sh4/sq.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/sh/kernel/cpu/sh4/sq.c b/arch/sh/kernel/cpu/sh4/sq.c index a8140f0bbf6..0a47bd3e7be 100644 --- a/arch/sh/kernel/cpu/sh4/sq.c +++ b/arch/sh/kernel/cpu/sh4/sq.c @@ -337,7 +337,7 @@ static struct kobj_type ktype_percpu_entry = { .default_attrs = sq_sysfs_attrs, }; -static int __devinit sq_dev_add(struct device *dev) +static int sq_dev_add(struct device *dev, struct subsys_interface *sif) { unsigned int cpu = dev->id; struct kobject *kobj; @@ -355,7 +355,7 @@ static int __devinit sq_dev_add(struct device *dev) return error; } -static int __devexit sq_dev_remove(struct device *dev) +static int sq_dev_remove(struct device *dev, struct subsys_interface *sif) { unsigned int cpu = dev->id; struct kobject *kobj = sq_kobject[cpu]; @@ -365,10 +365,10 @@ static int __devexit sq_dev_remove(struct device *dev) } static struct subsys_interface sq_interface = { - .name = "sq" + .name = "sq", .subsys = &cpu_subsys, .add_dev = sq_dev_add, - .remove_dev = __devexit_p(sq_dev_remove), + .remove_dev = sq_dev_remove, }; static int __init sq_api_init(void) -- cgit v1.2.3 From 6330c04bb455e10eb6cc6d2552a593af54c6dd96 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Tue, 10 Jan 2012 16:30:37 +0900 Subject: sh: Ensure IRQs are enabled across do_notify_resume(). do_notify_resume() can trigger the freezer via the try_to_freeze() path (both explicitly through a redundant call in do_signal() or via get_signal_to_deliver()). That IRQs were disabled across this callsite became apparent with the might_sleep() introduction in try_to_freeze() by Tejun in a0acae0e886d44bd5ce6d2f173c1ace0fcf0d9f6, resulting in: BUG: sleeping function called from invalid context at include/linux/freezer.h:45 in_atomic(): 0, irqs_disabled(): 1, pid: 819, name: ntpd no locks held by ntpd/819. Stack: (0x9c81be80 to 0x9c81c000) ... Signed-off-by: Paul Mundt --- arch/sh/kernel/entry-common.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/sh/kernel/entry-common.S b/arch/sh/kernel/entry-common.S index 2b15ae60c3a..f67601cb3f1 100644 --- a/arch/sh/kernel/entry-common.S +++ b/arch/sh/kernel/entry-common.S @@ -145,6 +145,7 @@ work_notifysig: mov r15, r4 mov r12, r5 ! set arg1(save_r0) mov r0, r6 + sti mov.l 2f, r1 mov.l 3f, r0 jmp @r1 -- cgit v1.2.3 From abef364050bcf8f46b0cb4bd47947ec2951664d3 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Tue, 10 Jan 2012 16:37:06 +0900 Subject: sh: Remove redundant try_to_freeze() invocations. get_signal_to_deliver() takes care of this, kill off the redundancies, as per the avr32 change. Signed-off-by: Paul Mundt --- arch/sh/kernel/signal_32.c | 4 ---- arch/sh/kernel/signal_64.c | 4 ---- 2 files changed, 8 deletions(-) diff --git a/arch/sh/kernel/signal_32.c b/arch/sh/kernel/signal_32.c index 579cd2ca358..a7a55ed43a5 100644 --- a/arch/sh/kernel/signal_32.c +++ b/arch/sh/kernel/signal_32.c @@ -588,9 +588,6 @@ static void do_signal(struct pt_regs *regs, unsigned int save_r0) if (!user_mode(regs)) return; - if (try_to_freeze()) - goto no_signal; - if (current_thread_info()->status & TS_RESTORE_SIGMASK) oldset = ¤t->saved_sigmask; else @@ -618,7 +615,6 @@ static void do_signal(struct pt_regs *regs, unsigned int save_r0) return; } -no_signal: /* Did we come from a system call? */ if (regs->tra >= 0) { /* Restart the system call - no handlers present */ diff --git a/arch/sh/kernel/signal_64.c b/arch/sh/kernel/signal_64.c index 5a9f1f10ebf..6b5603fe274 100644 --- a/arch/sh/kernel/signal_64.c +++ b/arch/sh/kernel/signal_64.c @@ -98,9 +98,6 @@ static int do_signal(struct pt_regs *regs, sigset_t *oldset) if (!user_mode(regs)) return 1; - if (try_to_freeze()) - goto no_signal; - if (current_thread_info()->status & TS_RESTORE_SIGMASK) oldset = ¤t->saved_sigmask; else if (!oldset) @@ -125,7 +122,6 @@ static int do_signal(struct pt_regs *regs, sigset_t *oldset) } } -no_signal: /* Did we come from a system call? */ if (regs->syscall_nr >= 0) { /* Restart the system call - no handlers present */ -- cgit v1.2.3