Module Name:    src
Committed By:   matt
Date:           Wed Jun 15 15:18:20 UTC 2011

Modified Files:
        src/sys/arch/evbppc/mpc85xx: machdep.c
        src/sys/arch/powerpc/include: cpu.h
        src/sys/arch/powerpc/include/booke: cpuvar.h
        src/sys/arch/powerpc/powerpc: fixup.c

Log Message:
Move booke_fixup_stubs() to fixup.c and rename it to cpu_fixup_stubs().
This makes it easier for other PPC variants to use it.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbppc/mpc85xx/machdep.c
cvs rdiff -u -r1.80 -r1.81 src/sys/arch/powerpc/include/cpu.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/powerpc/include/booke/cpuvar.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/powerpc/fixup.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/evbppc/mpc85xx/machdep.c
diff -u src/sys/arch/evbppc/mpc85xx/machdep.c:1.10 src/sys/arch/evbppc/mpc85xx/machdep.c:1.11
--- src/sys/arch/evbppc/mpc85xx/machdep.c:1.10	Tue Jun 14 05:32:59 2011
+++ src/sys/arch/evbppc/mpc85xx/machdep.c	Wed Jun 15 15:18:20 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.10 2011/06/14 05:32:59 matt Exp $	*/
+/*	$NetBSD: machdep.c,v 1.11 2011/06/15 15:18:20 matt Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -912,7 +912,7 @@
 	 * Let's take all the indirect calls via our stubs and patch 
 	 * them to be direct calls.
 	 */
-	booke_fixup_stubs();
+	cpu_fixup_stubs();
 #if 0
 	/*
 	 * As a debug measure we can change the TLB entry that maps all of

Index: src/sys/arch/powerpc/include/cpu.h
diff -u src/sys/arch/powerpc/include/cpu.h:1.80 src/sys/arch/powerpc/include/cpu.h:1.81
--- src/sys/arch/powerpc/include/cpu.h:1.80	Tue Jun 14 22:36:12 2011
+++ src/sys/arch/powerpc/include/cpu.h	Wed Jun 15 15:18:20 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.80 2011/06/14 22:36:12 matt Exp $	*/
+/*	$NetBSD: cpu.h,v 1.81 2011/06/15 15:18:20 matt Exp $	*/
 
 /*
  * Copyright (C) 1999 Wolfgang Solfrank.
@@ -404,6 +404,8 @@
 void	cpu_need_proftick(struct lwp *);
 #define	cpu_did_resched(l)			((l)->l_md.md_astpending = 0)
 
+void	cpu_fixup_stubs(void);
+
 #if !defined(PPC_IBM4XX) && !defined(PPC_BOOKE)
 void oea_init(void (*)(void));
 void oea_startup(const char *);

Index: src/sys/arch/powerpc/include/booke/cpuvar.h
diff -u src/sys/arch/powerpc/include/booke/cpuvar.h:1.7 src/sys/arch/powerpc/include/booke/cpuvar.h:1.8
--- src/sys/arch/powerpc/include/booke/cpuvar.h:1.7	Tue Jun 14 22:36:12 2011
+++ src/sys/arch/powerpc/include/booke/cpuvar.h	Wed Jun 15 15:18:20 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpuvar.h,v 1.7 2011/06/14 22:36:12 matt Exp $	*/
+/*	$NetBSD: cpuvar.h,v 1.8 2011/06/15 15:18:20 matt Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -161,7 +161,6 @@
 struct trapframe;
 void	booke_sstep(struct trapframe *);
 
-void	booke_fixup_stubs(void);
 void	booke_cpu_startup(const char *);	/* model name */
 struct powerpc_bus_dma_tag booke_bus_dma_tag;
 

Index: src/sys/arch/powerpc/powerpc/fixup.c
diff -u src/sys/arch/powerpc/powerpc/fixup.c:1.3 src/sys/arch/powerpc/powerpc/fixup.c:1.4
--- src/sys/arch/powerpc/powerpc/fixup.c:1.3	Sat Feb 12 18:23:10 2011
+++ src/sys/arch/powerpc/powerpc/fixup.c	Wed Jun 15 15:18:20 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: fixup.c,v 1.3 2011/02/12 18:23:10 matt Exp $	*/
+/*	$NetBSD: fixup.c,v 1.4 2011/06/15 15:18:20 matt Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -36,7 +36,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: fixup.c,v 1.3 2011/02/12 18:23:10 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fixup.c,v 1.4 2011/06/15 15:18:20 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -209,3 +209,12 @@
 	    cycles);
 #endif
 }
+
+void
+cpu_fixup_stubs(void)
+{
+	extern uint32_t _ftext[];
+	extern uint32_t _etext[];
+
+	powerpc_fixup_stubs(_ftext, _etext, NULL, NULL);
+}

Reply via email to