From owner-svn-src-projects@FreeBSD.ORG Thu Dec 10 01:42:44 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB75D1065695; Thu, 10 Dec 2009 01:42:44 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C1D708FC08; Thu, 10 Dec 2009 01:42:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBA1giaF046939; Thu, 10 Dec 2009 01:42:44 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBA1gilB046936; Thu, 10 Dec 2009 01:42:44 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200912100142.nBA1gilB046936@svn.freebsd.org> From: Warner Losh Date: Thu, 10 Dec 2009 01:42:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200342 - projects/mips/sys/mips/mips X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2009 01:42:45 -0000 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;