diff options
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/appldata/appldata_base.c | 7 | ||||
-rw-r--r-- | arch/s390/kernel/debug.c | 12 | ||||
-rw-r--r-- | arch/s390/kernel/process.c | 24 | ||||
-rw-r--r-- | arch/s390/kernel/smp.c | 1 | ||||
-rw-r--r-- | arch/s390/mm/fault.c | 2 |
5 files changed, 28 insertions, 18 deletions
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c index c9f2f60cfa58..dee6ab54984d 100644 --- a/arch/s390/appldata/appldata_base.c +++ b/arch/s390/appldata/appldata_base.c | |||
@@ -592,12 +592,15 @@ int appldata_register_ops(struct appldata_ops *ops) | |||
592 | */ | 592 | */ |
593 | void appldata_unregister_ops(struct appldata_ops *ops) | 593 | void appldata_unregister_ops(struct appldata_ops *ops) |
594 | { | 594 | { |
595 | void *table; | ||
595 | spin_lock(&appldata_ops_lock); | 596 | spin_lock(&appldata_ops_lock); |
596 | unregister_sysctl_table(ops->sysctl_header); | ||
597 | list_del(&ops->list); | 597 | list_del(&ops->list); |
598 | kfree(ops->ctl_table); | 598 | /* at that point any incoming access will fail */ |
599 | table = ops->ctl_table; | ||
599 | ops->ctl_table = NULL; | 600 | ops->ctl_table = NULL; |
600 | spin_unlock(&appldata_ops_lock); | 601 | spin_unlock(&appldata_ops_lock); |
602 | unregister_sysctl_table(ops->sysctl_header); | ||
603 | kfree(table); | ||
601 | P_INFO("%s-ops unregistered!\n", ops->name); | 604 | P_INFO("%s-ops unregistered!\n", ops->name); |
602 | } | 605 | } |
603 | /********************** module-ops management <END> **************************/ | 606 | /********************** module-ops management <END> **************************/ |
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index bc59282da762..896d39d0e4ce 100644 --- a/arch/s390/kernel/debug.c +++ b/arch/s390/kernel/debug.c | |||
@@ -486,7 +486,7 @@ out: | |||
486 | * - goto next entry in p_info | 486 | * - goto next entry in p_info |
487 | */ | 487 | */ |
488 | 488 | ||
489 | extern inline int | 489 | static inline int |
490 | debug_next_entry(file_private_info_t *p_info) | 490 | debug_next_entry(file_private_info_t *p_info) |
491 | { | 491 | { |
492 | debug_info_t *id; | 492 | debug_info_t *id; |
@@ -800,7 +800,7 @@ debug_set_level(debug_info_t* id, int new_level) | |||
800 | * - set active entry to next in the ring buffer | 800 | * - set active entry to next in the ring buffer |
801 | */ | 801 | */ |
802 | 802 | ||
803 | extern inline void | 803 | static inline void |
804 | proceed_active_entry(debug_info_t * id) | 804 | proceed_active_entry(debug_info_t * id) |
805 | { | 805 | { |
806 | if ((id->active_entries[id->active_area] += id->entry_size) | 806 | if ((id->active_entries[id->active_area] += id->entry_size) |
@@ -817,7 +817,7 @@ proceed_active_entry(debug_info_t * id) | |||
817 | * - set active area to next in the ring buffer | 817 | * - set active area to next in the ring buffer |
818 | */ | 818 | */ |
819 | 819 | ||
820 | extern inline void | 820 | static inline void |
821 | proceed_active_area(debug_info_t * id) | 821 | proceed_active_area(debug_info_t * id) |
822 | { | 822 | { |
823 | id->active_area++; | 823 | id->active_area++; |
@@ -828,7 +828,7 @@ proceed_active_area(debug_info_t * id) | |||
828 | * get_active_entry: | 828 | * get_active_entry: |
829 | */ | 829 | */ |
830 | 830 | ||
831 | extern inline debug_entry_t* | 831 | static inline debug_entry_t* |
832 | get_active_entry(debug_info_t * id) | 832 | get_active_entry(debug_info_t * id) |
833 | { | 833 | { |
834 | return (debug_entry_t *) (((char *) id->areas[id->active_area] | 834 | return (debug_entry_t *) (((char *) id->areas[id->active_area] |
@@ -841,7 +841,7 @@ get_active_entry(debug_info_t * id) | |||
841 | * - set timestamp, caller address, cpu number etc. | 841 | * - set timestamp, caller address, cpu number etc. |
842 | */ | 842 | */ |
843 | 843 | ||
844 | extern inline void | 844 | static inline void |
845 | debug_finish_entry(debug_info_t * id, debug_entry_t* active, int level, | 845 | debug_finish_entry(debug_info_t * id, debug_entry_t* active, int level, |
846 | int exception) | 846 | int exception) |
847 | { | 847 | { |
@@ -971,7 +971,7 @@ debug_entry_t | |||
971 | * counts arguments in format string for sprintf view | 971 | * counts arguments in format string for sprintf view |
972 | */ | 972 | */ |
973 | 973 | ||
974 | extern inline int | 974 | static inline int |
975 | debug_count_numargs(char *string) | 975 | debug_count_numargs(char *string) |
976 | { | 976 | { |
977 | int numargs=0; | 977 | int numargs=0; |
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index 9f3dff6c0b72..78b64fe5e7c2 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c | |||
@@ -99,15 +99,15 @@ void default_idle(void) | |||
99 | { | 99 | { |
100 | int cpu, rc; | 100 | int cpu, rc; |
101 | 101 | ||
102 | /* CPU is going idle. */ | ||
103 | cpu = smp_processor_id(); | ||
104 | |||
102 | local_irq_disable(); | 105 | local_irq_disable(); |
103 | if (need_resched()) { | 106 | if (need_resched()) { |
104 | local_irq_enable(); | 107 | local_irq_enable(); |
105 | schedule(); | 108 | return; |
106 | return; | 109 | } |
107 | } | ||
108 | 110 | ||
109 | /* CPU is going idle. */ | ||
110 | cpu = smp_processor_id(); | ||
111 | rc = notifier_call_chain(&idle_chain, CPU_IDLE, (void *)(long) cpu); | 111 | rc = notifier_call_chain(&idle_chain, CPU_IDLE, (void *)(long) cpu); |
112 | if (rc != NOTIFY_OK && rc != NOTIFY_DONE) | 112 | if (rc != NOTIFY_OK && rc != NOTIFY_DONE) |
113 | BUG(); | 113 | BUG(); |
@@ -120,7 +120,7 @@ void default_idle(void) | |||
120 | __ctl_set_bit(8, 15); | 120 | __ctl_set_bit(8, 15); |
121 | 121 | ||
122 | #ifdef CONFIG_HOTPLUG_CPU | 122 | #ifdef CONFIG_HOTPLUG_CPU |
123 | if (cpu_is_offline(smp_processor_id())) | 123 | if (cpu_is_offline(cpu)) |
124 | cpu_die(); | 124 | cpu_die(); |
125 | #endif | 125 | #endif |
126 | 126 | ||
@@ -139,8 +139,14 @@ void default_idle(void) | |||
139 | 139 | ||
140 | void cpu_idle(void) | 140 | void cpu_idle(void) |
141 | { | 141 | { |
142 | for (;;) | 142 | for (;;) { |
143 | default_idle(); | 143 | while (!need_resched()) |
144 | default_idle(); | ||
145 | |||
146 | preempt_enable_no_resched(); | ||
147 | schedule(); | ||
148 | preempt_disable(); | ||
149 | } | ||
144 | } | 150 | } |
145 | 151 | ||
146 | void show_regs(struct pt_regs *regs) | 152 | void show_regs(struct pt_regs *regs) |
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index e13c87b446b2..5856b3fda6bf 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -533,6 +533,7 @@ int __devinit start_secondary(void *cpuvoid) | |||
533 | { | 533 | { |
534 | /* Setup the cpu */ | 534 | /* Setup the cpu */ |
535 | cpu_init(); | 535 | cpu_init(); |
536 | preempt_disable(); | ||
536 | /* init per CPU timer */ | 537 | /* init per CPU timer */ |
537 | init_cpu_timer(); | 538 | init_cpu_timer(); |
538 | #ifdef CONFIG_VIRT_TIMER | 539 | #ifdef CONFIG_VIRT_TIMER |
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index 64e32da77754..fb2607c369ed 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c | |||
@@ -160,7 +160,7 @@ static void do_sigsegv(struct pt_regs *regs, unsigned long error_code, | |||
160 | * 11 Page translation -> Not present (nullification) | 160 | * 11 Page translation -> Not present (nullification) |
161 | * 3b Region third trans. -> Not present (nullification) | 161 | * 3b Region third trans. -> Not present (nullification) |
162 | */ | 162 | */ |
163 | extern inline void | 163 | static inline void |
164 | do_exception(struct pt_regs *regs, unsigned long error_code, int is_protection) | 164 | do_exception(struct pt_regs *regs, unsigned long error_code, int is_protection) |
165 | { | 165 | { |
166 | struct task_struct *tsk; | 166 | struct task_struct *tsk; |