Skip to contentSkip to conversation

: sparc64: Implement SSTATE purely using notifiers and

PATCH New David Miller 1 participant 1 message Sep 2, 2008 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore

David Miller

author maintainer
#0 lore raw

PATCH 1/1 : sparc64: Implement SSTATE purely using notifiers and

sparc64: Implement SSTATE purely using notifiers and initcalls.

Don't clutter up the tree with sstate_blah() scattered all over the place.

---
 arch/sparc/include/asm/bugs.h   |    7 ----
 arch/sparc/include/asm/sstate.h |   13 -------
 arch/sparc64/kernel/hvapi.c     |    3 --
 arch/sparc64/kernel/reboot.c    |    4 --
 arch/sparc64/kernel/sstate.c    |   67 ++++++++++++++++++++++++++-------------
 arch/sparc64/mm/init.c          |    3 --
 6 files changed, 45 insertions(+), 52 deletions(-)
 delete mode 100644 arch/sparc/include/asm/sstate.h
arch/sparc/include/asm/bugs.h +0 -7
index e179bc1..61d86bb 100644
@@ -7,10 +7,6 @@
 #include <asm/cpudata.h>
 #endif
 
-#ifdef CONFIG_SPARC64
-#include <asm/sstate.h>
-#endif
-
 extern unsigned long loops_per_jiffy;
 
 static void __init check_bugs(void)
@@ -18,7 +14,4 @@ static void __init check_bugs(void)
 #if defined(CONFIG_SPARC32) && !defined(CONFIG_SMP)
 	cpu_data(0).udelay_val = loops_per_jiffy;
 #endif
-#ifdef CONFIG_SPARC64
-	sstate_running();
-#endif
 }
arch/sparc/include/asm/sstate.h deleted +0 -13
deleted file mode 100644
index a7c35db..0000000
@@ -1,13 +0,0 @@
-#ifndef _SPARC64_SSTATE_H
-#define _SPARC64_SSTATE_H
-
-extern void sstate_booting(void);
-extern void sstate_running(void);
-extern void sstate_halt(void);
-extern void sstate_poweroff(void);
-extern void sstate_panic(void);
-extern void sstate_reboot(void);
-
-extern void sun4v_sstate_init(void);
-
-#endif /* _SPARC64_SSTATE_H */
arch/sparc64/kernel/hvapi.c +0 -3
index 691760b..1d272c3 100644
@@ -9,7 +9,6 @@
 
 #include <asm/hypervisor.h>
 #include <asm/oplib.h>
-#include <asm/sstate.h>
 
 /* If the hypervisor indicates that the API setting
  * calls are unsupported, by returning HV_EBADTRAP or
@@ -184,8 +183,6 @@ void __init sun4v_hvapi_init(void)
 	if (sun4v_hvapi_register(group, major, &minor))
 		goto bad;
 
-	sun4v_sstate_init();
-
 	return;
 
 bad:
arch/sparc64/kernel/reboot.c +0 -4
index 04dd34c..11f2496 100644
@@ -7,7 +7,6 @@
 #include <linux/module.h>
 #include <linux/pm.h>
 
-#include <asm/sstate.h>
 #include <asm/oplib.h>
 #include <asm/prom.h>
 
@@ -24,7 +23,6 @@ EXPORT_SYMBOL(pm_power_off);
 
 void machine_power_off(void)
 {
-	sstate_poweroff();
 	if (strcmp(of_console_device->type, "serial") || scons_pwroff)
 		prom_halt_power_off();
 
@@ -33,7 +31,6 @@ void machine_power_off(void)
 
 void machine_halt(void)
 {
-	sstate_halt();
 	prom_halt();
 	panic("Halt failed!");
 }
@@ -42,7 +39,6 @@ void machine_restart(char *cmd)
 {
 	char *p;
 
-	sstate_reboot();
 	p = strchr(reboot_command, '\n');
 	if (p)
 		*p = 0;
arch/sparc64/kernel/sstate.c +45 -22

106 lines not on this page · raw message

arch/sparc64/mm/init.c +0 -3
index 54193f2..7c3c81f 100644
@@ -46,7 +46,6 @@
 #include <asm/tsb.h>
 #include <asm/hypervisor.h>
 #include <asm/prom.h>
-#include <asm/sstate.h>
 #include <asm/mdesc.h>
 #include <asm/cpudata.h>
 #include <asm/irq.h>
@@ -1717,8 +1716,6 @@ void __init paging_init(void)
 	kern_base = (prom_boot_mapping_phys_low >> 22UL) << 22UL;
 	kern_size = (unsigned long)&_end - (unsigned long)KERNBASE;
 
-	sstate_booting();
-
 	/* Invalidate both kernel TSBs.  */
 	memset(swapper_tsb, 0x40, sizeof(swapper_tsb));
 #ifndef CONFIG_DEBUG_PAGEALLOC
Signature · 1 line
1.5.6.5.GIT