[PATCH][PPC32] Fix prototypes & externs in e500 oprofile support

Kumar Gala galak at somerset.sps.mot.com
Fri Dec 3 04:10:18 EST 2004


Andrew,

Remove prototypes and externs out of the .c files

Signed-off-by: Andy Fleming <afleming at freescale.com> 
Signed-off-by: Kumar Gala <kumar.gala at freescale.com>

--


diff -Nru a/arch/ppc/kernel/perfmon_fsl_booke.c b/arch/ppc/kernel/perfmon_fsl_booke.c
--- a/arch/ppc/kernel/perfmon_fsl_booke.c	2004-12-02 10:44:03 -06:00
+++ b/arch/ppc/kernel/perfmon_fsl_booke.c	2004-12-02 10:44:03 -06:00
@@ -32,15 +32,7 @@
 #include <asm/io.h>
 #include <asm/reg.h>
 #include <asm/xmon.h>
-
-void init_pmc_stop(int ctr);
-void set_pmc_event(int ctr, int event);
-void set_pmc_user_kernel(int ctr, int user, int kernel);
-void set_pmc_marked(int ctr, int mark0, int mark1);
-void pmc_start_ctr(int ctr, int enable);
-void pmc_start_ctrs(int enable);
-void pmc_stop_ctrs(void);
-void dump_pmcs(void);
+#include <asm/perfmon.h>
 
 static inline u32 get_pmlca(int ctr);
 static inline void set_pmlca(int ctr, u32 pmlca);
diff -Nru a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c
--- a/arch/ppc/kernel/traps.c	2004-12-02 10:44:03 -06:00
+++ b/arch/ppc/kernel/traps.c	2004-12-02 10:44:03 -06:00
@@ -41,6 +41,7 @@
 #ifdef CONFIG_PMAC_BACKLIGHT
 #include <asm/backlight.h>
 #endif
+#include <asm/perfmon.h>
 
 #ifdef CONFIG_XMON
 void (*debugger)(struct pt_regs *regs) = xmon;
@@ -70,8 +71,6 @@
 /*
  * Trap & Exception support
  */
-
-extern void (*perf_irq)(struct pt_regs *);
 
 spinlock_t die_lock = SPIN_LOCK_UNLOCKED;
 
diff -Nru a/arch/ppc/oprofile/common.c b/arch/ppc/oprofile/common.c
--- a/arch/ppc/oprofile/common.c	2004-12-02 10:44:03 -06:00
+++ b/arch/ppc/oprofile/common.c	2004-12-02 10:44:03 -06:00
@@ -25,7 +25,6 @@
 
 #include "op_impl.h"
 
-extern struct op_ppc32_model op_model_fsl_booke;
 static struct op_ppc32_model *model;
 
 static struct op_counter_config ctr[OP_MAX_COUNTER];
diff -Nru a/include/asm-ppc/perfmon.h b/include/asm-ppc/perfmon.h
--- a/include/asm-ppc/perfmon.h	2004-12-02 10:44:03 -06:00
+++ b/include/asm-ppc/perfmon.h	2004-12-02 10:44:03 -06:00
@@ -1,6 +1,8 @@
 #ifndef __PERFMON_H
 #define __PERFMON_H
 
+extern void (*perf_irq)(struct pt_regs *);
+
 int request_perfmon_irq(void (*handler)(struct pt_regs *));
 void free_perfmon_irq(void);
 
@@ -13,6 +15,8 @@
 void pmc_start_ctrs(int enable);
 void pmc_stop_ctrs(void);
 void dump_pmcs(void);
+
+extern struct op_ppc32_model op_model_fsl_booke;
 #endif
 
 #endif /* __PERFMON_H */



More information about the Linuxppc-embedded mailing list