svn commit: r200342 - projects/mips/sys/mips/mips

Warner Losh imp at FreeBSD.org
Thu Dec 10 01:42:45 UTC 2009


Author: imp
Date: Thu Dec 10 01:42:44 2009
New Revision: 200342
URL: http://svn.freebsd.org/changeset/base/200342

Log:
  app_descriptor_addr is unused (I know it is referened still).  And
  unnecessary since we pass in a3 unmodified to platform_start.
  Eliminate it from here and kill one more TARGET_OCTEON in the process.

Modified:
  projects/mips/sys/mips/mips/locore.S
  projects/mips/sys/mips/mips/machdep.c

Modified: projects/mips/sys/mips/mips/locore.S
==============================================================================
--- projects/mips/sys/mips/mips/locore.S	Thu Dec 10 01:01:53 2009	(r200341)
+++ projects/mips/sys/mips/mips/locore.S	Thu Dec 10 01:42:44 2009	(r200342)
@@ -83,10 +83,6 @@ GLOBAL(cfe_handle)
 GLOBAL(cfe_vector)
 	.space 4
 #endif
-#if defined(TARGET_OCTEON)
-GLOBAL(app_descriptor_addr)
-	.space 8
-#endif
 GLOBAL(stackspace)
 	.space NBPG /* Smaller than it should be since it's temp. */
 	.align 8
@@ -190,10 +186,6 @@ VECTOR(_locore, unknown)
 	sw	a2, _C_LABEL(cfe_vector)/* Firmware entry vector */
 no_cfe:
 #endif
-#if defined(TARGET_OCTEON)
-	PTR_LA	a0, app_descriptor_addr
-	sw	a3, 0(a0)		/* Store app descriptor ptr */
-#endif
 
 	/*
 	 * The following needs to be done differently for each platform and
@@ -203,6 +195,7 @@ no_cfe:
 /*
  * Block all the slave CPUs
  */
+	/* XXX a0, a1, a2 shouldn't be used here */
 	/*
 	 * Read the cpu id from the cp0 config register
 	 * cpuid[9:4], thrid[3: 0]

Modified: projects/mips/sys/mips/mips/machdep.c
==============================================================================
--- projects/mips/sys/mips/mips/machdep.c	Thu Dec 10 01:01:53 2009	(r200341)
+++ projects/mips/sys/mips/mips/machdep.c	Thu Dec 10 01:42:44 2009	(r200342)
@@ -154,7 +154,6 @@ extern char edata[], end[];
 u_int32_t bootdev;
 struct bootinfo bootinfo;
 
-
 static void
 cpu_startup(void *dummy)
 {
@@ -259,17 +258,11 @@ SYSCTL_INT(_machdep, CPU_WALLCLOCK, wall
 void
 mips_proc0_init(void)
 {
-	proc_linkup(&proc0, &thread0);
+	proc_linkup0(&proc0, &thread0);
 
 	thread0.td_kstack = kstack0;
 	thread0.td_kstack_pages = KSTACK_PAGES - 1;
 	thread0.td_md.md_realstack = roundup2(thread0.td_kstack, PAGE_SIZE * 2);
-	/* Initialize pcpu info of cpu-zero */
-#ifdef SMP
-	pcpu_init(&__pcpu[0], 0, sizeof(struct pcpu));
-#else
-	pcpu_init(pcpup, 0, sizeof(struct pcpu));
-#endif
 	/* 
 	 * Do not use cpu_thread_alloc to initialize these fields 
 	 * thread0 is the only thread that has kstack located in KSEG0 
@@ -279,6 +272,13 @@ mips_proc0_init(void)
 	    (thread0.td_kstack_pages - 1) * PAGE_SIZE) - 1;
 	thread0.td_frame = &thread0.td_pcb->pcb_regs;
 
+	/* Initialize pcpu info of cpu-zero */
+#ifdef SMP
+	pcpu_init(&__pcpu[0], 0, sizeof(struct pcpu));
+#else
+	pcpu_init(pcpup, 0, sizeof(struct pcpu));
+#endif
+
 	/* Steal memory for the dynamic per-cpu area. */
 	dpcpu_init((void *)pmap_steal_memory(DPCPU_SIZE), 0);
 
@@ -295,7 +295,7 @@ mips_proc0_init(void)
 void
 cpu_initclocks(void)
 {
-  platform_initclocks();
+	platform_initclocks();
 }
 
 struct msgbuf *msgbufp=0;


More information about the svn-src-projects mailing list