Please pull from 'for_paulus' branch of powerpc

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

6 messages, 3 authors, 2006-05-05 · open the first message on its own page

Please pull from 'for_paulus' branch of powerpc

From: Kumar Gala <hidden>
Date: 2006-05-04 21:32:29

Please pull from 'for_paulus' branch of
master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc.git

to receive the following updates:

 arch/powerpc/kernel/setup-common.c |   17 +++++++++++++++++
 arch/powerpc/kernel/setup_32.c     |    4 ++++
 arch/powerpc/kernel/setup_64.c     |   17 ++---------------
 3 files changed, 23 insertions(+), 15 deletions(-)

Kumar Gala:
      powerpc: provide ppc_md.panic() for both ppc32 & ppc64
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 684ab1d..7a6a883 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -524,3 +524,20 @@ int check_legacy_ioport(unsigned long ba
 	return ppc_md.check_legacy_ioport(base_port);
 }
 EXPORT_SYMBOL(check_legacy_ioport);
+
+static int ppc_panic_event(struct notifier_block *this,
+                             unsigned long event, void *ptr)
+{
+	ppc_md.panic((char *)ptr);  /* May not return */
+	return NOTIFY_DONE;
+}
+
+static struct notifier_block ppc_panic_block = {
+	.notifier_call = ppc_panic_event,
+	.priority = INT_MIN /* may not return; must be done last */
+};
+
+void __init setup_panic(void)
+{
+	atomic_notifier_chain_register(&panic_notifier_list, &ppc_panic_block);
+}
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 69ac257..9d55234 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -236,6 +236,7 @@ arch_initcall(ppc_init);
 void __init setup_arch(char **cmdline_p)
 {
 	extern void do_init_bootmem(void);
+	extern void setup_panic(void);
 
 	/* so udelay does something sensible, assume <= 1000 bogomips */
 	loops_per_jiffy = 500000000 / HZ;
@@ -285,6 +286,9 @@ #endif
 	/* reboot on panic */
 	panic_timeout = 180;
 
+	if (ppc_md.panic)
+		setup_panic();
+
 	init_mm.start_code = PAGE_OFFSET;
 	init_mm.end_code = (unsigned long) _etext;
 	init_mm.end_data = (unsigned long) _edata;
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 4467c49..ff6726f 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -100,12 +100,6 @@ unsigned long SYSRQ_KEY;
 #endif /* CONFIG_MAGIC_SYSRQ */
 
 
-static int ppc64_panic_event(struct notifier_block *, unsigned long, void *);
-static struct notifier_block ppc64_panic_block = {
-	.notifier_call = ppc64_panic_event,
-	.priority = INT_MIN /* may not return; must be done last */
-};
-
 #ifdef CONFIG_SMP
 
 static int smt_enabled_cmdline;
@@ -456,13 +450,6 @@ #endif
 	DBG(" <- setup_system()\n");
 }
 
-static int ppc64_panic_event(struct notifier_block *this,
-                             unsigned long event, void *ptr)
-{
-	ppc_md.panic((char *)ptr);  /* May not return */
-	return NOTIFY_DONE;
-}
-
 #ifdef CONFIG_IRQSTACKS
 static void __init irqstack_early_init(void)
 {
@@ -518,6 +505,7 @@ static void __init emergency_stack_init(
 void __init setup_arch(char **cmdline_p)
 {
 	extern void do_init_bootmem(void);
+	extern void setup_panic(void);
 
 	ppc64_boot_msg(0x12, "Setup Arch");
 
@@ -535,8 +523,7 @@ void __init setup_arch(char **cmdline_p)
 	panic_timeout = 180;
 
 	if (ppc_md.panic)
-		atomic_notifier_chain_register(&panic_notifier_list,
-				&ppc64_panic_block);
+		setup_panic();
 
 	init_mm.start_code = PAGE_OFFSET;
 	init_mm.end_code = (unsigned long) _etext;

Re: Please pull from 'for_paulus' branch of powerpc

From: Segher Boessenkool <hidden>
Date: 2006-05-04 22:10:19

Hi Kumar,
+static int ppc_panic_event(struct notifier_block *this,
+                             unsigned long event, void *ptr)
+{
+	ppc_md.panic((char *)ptr);  /* May not return */
+	return NOTIFY_DONE;
+}
Lose the redundant pointer cast while you're there please?
 void __init setup_arch(char **cmdline_p)
 {
 	extern void do_init_bootmem(void);
+	extern void setup_panic(void);
Can those two go into a header file please?


Segher

Re: Please pull from 'for_paulus' branch of powerpc

From: Kumar Gala <hidden>
Date: 2006-05-04 22:11:05

On May 4, 2006, at 5:09 PM, Segher Boessenkool wrote:
Hi Kumar,
quoted
+static int ppc_panic_event(struct notifier_block *this,
+                             unsigned long event, void *ptr)
+{
+	ppc_md.panic((char *)ptr);  /* May not return */
+	return NOTIFY_DONE;
+}
Lose the redundant pointer cast while you're there please?
quoted
 void __init setup_arch(char **cmdline_p)
 {
 	extern void do_init_bootmem(void);
+	extern void setup_panic(void);
Can those two go into a header file please?
any suggestions on which header?

Re: Please pull from 'for_paulus' branch of powerpc

From: Segher Boessenkool <hidden>
Date: 2006-05-04 22:36:44

quoted
quoted
 void __init setup_arch(char **cmdline_p)
 {
 	extern void do_init_bootmem(void);
+	extern void setup_panic(void);
Can those two go into a header file please?
any suggestions on which header?
The new one should just go into arch/powerpc/kernel/setup.h;
the bootmem thing could go there as well perhaps.


Segher

Re: Please pull from 'for_paulus' branch of powerpc

From: Paul Mackerras <hidden>
Date: 2006-05-04 22:50:17

Kumar Gala writes:
Please pull from 'for_paulus' branch of
master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc.git
quoted hunk
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -236,6 +236,7 @@ arch_initcall(ppc_init);
 void __init setup_arch(char **cmdline_p)
 {
 	extern void do_init_bootmem(void);
+	extern void setup_panic(void);
Urk.
quoted hunk
@@ -285,6 +286,9 @@ #endif
 	/* reboot on panic */
 	panic_timeout = 180;
 
+	if (ppc_md.panic)
+		setup_panic();
Since no 32-bit platform sets ppc_md.panic AFAICS, I guess this
doesn't need to be pushed into 2.6.17.  Please redo with setup_panic
declared in a header file.

Paul.

Re: Please pull from 'for_paulus' branch of powerpc

From: Kumar Gala <hidden>
Date: 2006-05-05 04:59:39

On May 4, 2006, at 5:49 PM, Paul Mackerras wrote:
Kumar Gala writes:
quoted
Please pull from 'for_paulus' branch of
master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc.git
quoted
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -236,6 +236,7 @@ arch_initcall(ppc_init);
 void __init setup_arch(char **cmdline_p)
 {
 	extern void do_init_bootmem(void);
+	extern void setup_panic(void);
Urk.
Yeah didn't care for it either.  Will move to "setup.h"
quoted
@@ -285,6 +286,9 @@ #endif
 	/* reboot on panic */
 	panic_timeout = 180;

+	if (ppc_md.panic)
+		setup_panic();
Since no 32-bit platform sets ppc_md.panic AFAICS, I guess this
doesn't need to be pushed into 2.6.17.  Please redo with setup_panic
declared in a header file.
Yeah, this was for 2.6.18. (will do on the header change)

- k
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help