diff options
Diffstat (limited to 'arch/s390/kernel')
-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 |
3 files changed, 22 insertions, 15 deletions
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 |