[Skiboot] [PATCH 04/25] sparse: fix fonction declarations

Cédric Le Goater clg at fr.ibm.com
Tue Feb 24 22:14:18 AEDT 2015


Signed-off-by: Cédric Le Goater <clg at fr.ibm.com>
---
 core/fast-reboot.c |    4 ++--
 core/init.c        |    4 ++--
 include/cpu.h      |    4 ++--
 include/lpc.h      |    2 +-
 include/skiboot.h  |    6 +++---
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/core/fast-reboot.c b/core/fast-reboot.c
index a32bed3d988d..30b77e9bc294 100644
--- a/core/fast-reboot.c
+++ b/core/fast-reboot.c
@@ -247,9 +247,9 @@ static void memory_reset(void)
 #endif /* FAST_REBOOT_CLEARS_MEMORY */
 
 /* Entry from asm after a fast reset */
-void fast_reboot(void);
+void __noreturn fast_reboot(void);
 
-void fast_reboot(void)
+void __noreturn fast_reboot(void)
 {
 	static volatile bool fast_boot_release;
 	struct cpu_thread *cpu;
diff --git a/core/init.c b/core/init.c
index 681fa225f8e6..452d56285af3 100644
--- a/core/init.c
+++ b/core/init.c
@@ -489,7 +489,7 @@ static void dt_init_misc(void)
 }
 
 /* Called from head.S, thus no prototype. */
-void main_cpu_entry(const void *fdt, u32 master_cpu);
+void __noreturn main_cpu_entry(const void *fdt, u32 master_cpu);
 
 void __noreturn main_cpu_entry(const void *fdt, u32 master_cpu)
 {
@@ -719,7 +719,7 @@ void __noreturn __secondary_cpu_entry(void)
 }
 
 /* Called from head.S, thus no prototype. */
-void secondary_cpu_entry(void);
+void __noreturn secondary_cpu_entry(void);
 
 void __noreturn secondary_cpu_entry(void)
 {
diff --git a/include/cpu.h b/include/cpu.h
index 1d7c7c5114ad..54e1b37c81aa 100644
--- a/include/cpu.h
+++ b/include/cpu.h
@@ -214,7 +214,7 @@ static inline void cpu_give_self_os(void)
 	__this_cpu->state = cpu_state_os;
 }
 
-extern unsigned long cpu_stack_bottom(unsigned int pir);
-extern unsigned long cpu_stack_top(unsigned int pir);
+extern unsigned long __attrconst cpu_stack_bottom(unsigned int pir);
+extern unsigned long __attrconst cpu_stack_top(unsigned int pir);
 
 #endif /* __CPU_H */
diff --git a/include/lpc.h b/include/lpc.h
index 632727faf439..5611c549b0ae 100644
--- a/include/lpc.h
+++ b/include/lpc.h
@@ -28,7 +28,7 @@ extern void lpc_init(void);
 extern bool lpc_present(void);
 
 /* Handle the interrupt from LPC source */
-extern void lpc_interrupt(uint32_t chip_id);
+extern void __attrconst lpc_interrupt(uint32_t chip_id);
 
 /* Default bus accessors */
 extern int64_t lpc_write(enum OpalLPCAddressType addr_type, uint32_t addr,
diff --git a/include/skiboot.h b/include/skiboot.h
index a13b43823dcc..392893f91b08 100644
--- a/include/skiboot.h
+++ b/include/skiboot.h
@@ -117,7 +117,7 @@ enum proc_gen {
 extern enum proc_gen proc_gen;
 
 /* Convert a 4-bit number to a hex char */
-extern char tohex(uint8_t nibble);
+extern char __attrconst tohex(uint8_t nibble);
 
 /* Bit position of the most significant 1-bit (LSB=0, MSB=63) */
 static inline int ilog2(unsigned long val)
@@ -180,8 +180,8 @@ extern unsigned long get_symbol(unsigned long addr,
 
 /* Fast reboot support */
 extern void fast_reset(void);
-extern void __secondary_cpu_entry(void);
-extern void load_and_boot_kernel(bool is_reboot);
+extern void __noreturn __secondary_cpu_entry(void);
+extern void __noreturn load_and_boot_kernel(bool is_reboot);
 extern void cleanup_tlb(void);
 extern void init_shared_sprs(void);
 extern void init_replicated_sprs(void);
-- 
1.7.10.4



More information about the Skiboot mailing list