Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Revert "[POWERPC] Fix RTAS os-term usage on kernel panic"

This reverts commit a2b51812a4dc5db09ab4d4638d4d8ed456e2457e.

It turns out that this change caused some machines to fail to come
back up when being rebooted, and generated an error in the hypervisor
error log on some machines. The platform architecture (PAPR) is a
little unclear on exactly when the RTAS ibm,os-term function should be
called. Until that is clarified I'm reverting this commit.

Signed-off-by: Paul Mackerras <paulus@samba.org>

+8 -10
+6 -6
arch/powerpc/kernel/rtas.c
··· 638 638 /* Must be in the RMO region, so we place it here */ 639 639 static char rtas_os_term_buf[2048]; 640 640 641 - void rtas_panic_msg(char *str) 642 - { 643 - snprintf(rtas_os_term_buf, 2048, "OS panic: %s", str); 644 - } 645 - 646 - void rtas_os_term(void) 641 + void rtas_os_term(char *str) 647 642 { 648 643 int status; 649 644 645 + if (panic_timeout) 646 + return; 647 + 650 648 if (RTAS_UNKNOWN_SERVICE == rtas_token("ibm,os-term")) 651 649 return; 650 + 651 + snprintf(rtas_os_term_buf, 2048, "OS panic: %s", str); 652 652 653 653 do { 654 654 status = rtas_call(rtas_token("ibm,os-term"), 1, 1, NULL,
+1 -2
arch/powerpc/platforms/pseries/setup.c
··· 507 507 .restart = rtas_restart, 508 508 .power_off = pSeries_power_off, 509 509 .halt = rtas_halt, 510 - .panic = rtas_panic_msg, 511 - .machine_shutdown = rtas_os_term, 510 + .panic = rtas_os_term, 512 511 .get_boot_time = rtas_get_boot_time, 513 512 .get_rtc_time = rtas_get_rtc_time, 514 513 .set_rtc_time = rtas_set_rtc_time,
+1 -2
include/asm-powerpc/rtas.h
··· 164 164 extern void rtas_restart(char *cmd); 165 165 extern void rtas_power_off(void); 166 166 extern void rtas_halt(void); 167 - extern void rtas_panic_msg(char *str); 168 - extern void rtas_os_term(void); 167 + extern void rtas_os_term(char *str); 169 168 extern int rtas_get_sensor(int sensor, int index, int *state); 170 169 extern int rtas_get_power_level(int powerdomain, int *level); 171 170 extern int rtas_set_power_level(int powerdomain, int level, int *setlevel);