aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-10-31 15:14:56 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-10-31 15:14:56 -0400
commit7d531a7e519406c4bb2501a66e3da5ba39280739 (patch)
treec849a010de055dd77b020e40b8fc5c71303ee77e /arch
parenta80a66caf8110fc33af8013353fe0da0ae553a13 (diff)
parentb3dcf3de8e4d71d79235fc67b6c5def6506c27f8 (diff)
Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6: [S390] smp: fix sigp sense handling [S390] smp: fix sigp stop handling [S390] cputime: fix overflow on 31 bit systems [S390] call home: fix string length handling [S390] call home: fix error handling in init function [S390] smp: fix prefix handling of offlined cpus [S390] s/r: cmm resume fix [S390] call home: fix local buffer usage in proc handler
Diffstat (limited to 'arch')
-rw-r--r--arch/s390/include/asm/cputime.h6
-rw-r--r--arch/s390/kernel/ipl.c7
-rw-r--r--arch/s390/kernel/smp.c7
-rw-r--r--arch/s390/kernel/swsusp_asm64.S2
4 files changed, 12 insertions, 10 deletions
diff --git a/arch/s390/include/asm/cputime.h b/arch/s390/include/asm/cputime.h
index 24b1244aadb9..f23961ada7fb 100644
--- a/arch/s390/include/asm/cputime.h
+++ b/arch/s390/include/asm/cputime.h
@@ -78,7 +78,7 @@ cputime64_to_jiffies64(cputime64_t cputime)
78static inline unsigned int 78static inline unsigned int
79cputime_to_msecs(const cputime_t cputime) 79cputime_to_msecs(const cputime_t cputime)
80{ 80{
81 return __div(cputime, 4096000); 81 return cputime_div(cputime, 4096000);
82} 82}
83 83
84static inline cputime_t 84static inline cputime_t
@@ -160,7 +160,7 @@ cputime_to_timeval(const cputime_t cputime, struct timeval *value)
160static inline clock_t 160static inline clock_t
161cputime_to_clock_t(cputime_t cputime) 161cputime_to_clock_t(cputime_t cputime)
162{ 162{
163 return __div(cputime, 4096000000ULL / USER_HZ); 163 return cputime_div(cputime, 4096000000ULL / USER_HZ);
164} 164}
165 165
166static inline cputime_t 166static inline cputime_t
@@ -175,7 +175,7 @@ clock_t_to_cputime(unsigned long x)
175static inline clock_t 175static inline clock_t
176cputime64_to_clock_t(cputime64_t cputime) 176cputime64_to_clock_t(cputime64_t cputime)
177{ 177{
178 return __div(cputime, 4096000000ULL / USER_HZ); 178 return cputime_div(cputime, 4096000000ULL / USER_HZ);
179} 179}
180 180
181struct s390_idle_data { 181struct s390_idle_data {
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c
index ee57a42e6e93..4890ac6d7faa 100644
--- a/arch/s390/kernel/ipl.c
+++ b/arch/s390/kernel/ipl.c
@@ -1595,10 +1595,9 @@ static void stop_run(struct shutdown_trigger *trigger)
1595{ 1595{
1596 if (strcmp(trigger->name, ON_PANIC_STR) == 0) 1596 if (strcmp(trigger->name, ON_PANIC_STR) == 0)
1597 disabled_wait((unsigned long) __builtin_return_address(0)); 1597 disabled_wait((unsigned long) __builtin_return_address(0));
1598 else { 1598 while (signal_processor(smp_processor_id(), sigp_stop) == sigp_busy)
1599 signal_processor(smp_processor_id(), sigp_stop); 1599 cpu_relax();
1600 for (;;); 1600 for (;;);
1601 }
1602} 1601}
1603 1602
1604static struct shutdown_action stop_action = {SHUTDOWN_ACTION_STOP_STR, 1603static struct shutdown_action stop_action = {SHUTDOWN_ACTION_STOP_STR,
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index c932caa5e850..93e52039321b 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -76,7 +76,6 @@ static int cpu_stopped(int cpu)
76 __u32 status; 76 __u32 status;
77 77
78 switch (signal_processor_ps(&status, 0, cpu, sigp_sense)) { 78 switch (signal_processor_ps(&status, 0, cpu, sigp_sense)) {
79 case sigp_order_code_accepted:
80 case sigp_status_stored: 79 case sigp_status_stored:
81 /* Check for stopped and check stop state */ 80 /* Check for stopped and check stop state */
82 if (status & 0x50) 81 if (status & 0x50)
@@ -638,6 +637,8 @@ void __cpu_die(unsigned int cpu)
638 /* Wait until target cpu is down */ 637 /* Wait until target cpu is down */
639 while (!cpu_stopped(cpu)) 638 while (!cpu_stopped(cpu))
640 cpu_relax(); 639 cpu_relax();
640 while (signal_processor_p(0, cpu, sigp_set_prefix) == sigp_busy)
641 udelay(10);
641 smp_free_lowcore(cpu); 642 smp_free_lowcore(cpu);
642 pr_info("Processor %d stopped\n", cpu); 643 pr_info("Processor %d stopped\n", cpu);
643} 644}
@@ -645,8 +646,8 @@ void __cpu_die(unsigned int cpu)
645void cpu_die(void) 646void cpu_die(void)
646{ 647{
647 idle_task_exit(); 648 idle_task_exit();
648 signal_processor(smp_processor_id(), sigp_stop); 649 while (signal_processor(smp_processor_id(), sigp_stop) == sigp_busy)
649 BUG(); 650 cpu_relax();
650 for (;;); 651 for (;;);
651} 652}
652 653
diff --git a/arch/s390/kernel/swsusp_asm64.S b/arch/s390/kernel/swsusp_asm64.S
index 7c8653e27db6..0c26cc1898ec 100644
--- a/arch/s390/kernel/swsusp_asm64.S
+++ b/arch/s390/kernel/swsusp_asm64.S
@@ -199,6 +199,7 @@ pgm_check_entry:
199 brc 2,4b /* busy, try again */ 199 brc 2,4b /* busy, try again */
2005: 2005:
201 sigp %r9,%r2,__SIGP_STOP /* stop resume (current) CPU */ 201 sigp %r9,%r2,__SIGP_STOP /* stop resume (current) CPU */
202 brc 2,5b /* busy, try again */
2026: j 6b 2036: j 6b
203 204
204restart_suspend: 205restart_suspend:
@@ -206,6 +207,7 @@ restart_suspend:
206 llgh %r2,0(%r1) 207 llgh %r2,0(%r1)
2077: 2087:
208 sigp %r9,%r2,__SIGP_SENSE /* Wait for resume CPU */ 209 sigp %r9,%r2,__SIGP_SENSE /* Wait for resume CPU */
210 brc 8,7b /* accepted, status 0, still running */
209 brc 2,7b /* busy, try again */ 211 brc 2,7b /* busy, try again */
210 tmll %r9,0x40 /* Test if resume CPU is stopped */ 212 tmll %r9,0x40 /* Test if resume CPU is stopped */
211 jz 7b 213 jz 7b