From owner-svn-src-all@FreeBSD.ORG Sat May 26 13:36:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 08B45106566C; Sat, 26 May 2012 13:36:19 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DDA558FC12; Sat, 26 May 2012 13:36:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4QDaIoX080109; Sat, 26 May 2012 13:36:18 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4QDaIia080105; Sat, 26 May 2012 13:36:18 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201205261336.q4QDaIia080105@svn.freebsd.org> From: Rafal Jaworowski Date: Sat, 26 May 2012 13:36:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r236097 - in head/sys/powerpc: booke powerpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2012 13:36:19 -0000 Author: raj Date: Sat May 26 13:36:18 2012 New Revision: 236097 URL: http://svn.freebsd.org/changeset/base/236097 Log: Rename e500 prefix to match other Book-E CPU variations. CPU id tidbits for the new cores. Obtained from: Freescale, Semihalf. Modified: head/sys/powerpc/booke/machdep.c head/sys/powerpc/booke/platform_bare.c head/sys/powerpc/powerpc/cpu.c Modified: head/sys/powerpc/booke/machdep.c ============================================================================== --- head/sys/powerpc/booke/machdep.c Sat May 26 13:12:14 2012 (r236096) +++ head/sys/powerpc/booke/machdep.c Sat May 26 13:36:18 2012 (r236097) @@ -185,8 +185,8 @@ SYSCTL_INT(_machdep, CPU_CACHELINE, cach int hw_direct_map = 0; -static void cpu_e500_startup(void *); -SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_e500_startup, NULL); +static void cpu_booke_startup(void *); +SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_booke_startup, NULL); void print_kernel_section_addr(void); void print_kenv(void); @@ -195,7 +195,7 @@ u_int booke_init(uint32_t, uint32_t); extern int elf32_nxstack; static void -cpu_e500_startup(void *dummy) +cpu_booke_startup(void *dummy) { int indx, size; @@ -538,7 +538,8 @@ cpu_halt(void) { mtmsr(mfmsr() & ~(PSL_CE | PSL_EE | PSL_ME | PSL_DE)); - while (1); + while (1) + ; } int Modified: head/sys/powerpc/booke/platform_bare.c ============================================================================== --- head/sys/powerpc/booke/platform_bare.c Sat May 26 13:12:14 2012 (r236096) +++ head/sys/powerpc/booke/platform_bare.c Sat May 26 13:36:18 2012 (r236097) @@ -73,7 +73,7 @@ static int bare_smp_next_cpu(platform_t, static int bare_smp_get_bsp(platform_t, struct cpuref *cpuref); static int bare_smp_start_cpu(platform_t, struct pcpu *cpu); -static void e500_reset(platform_t); +static void booke_reset(platform_t); static platform_method_t bare_methods[] = { PLATFORMMETHOD(platform_probe, bare_probe), @@ -85,7 +85,7 @@ static platform_method_t bare_methods[] PLATFORMMETHOD(platform_smp_get_bsp, bare_smp_get_bsp), PLATFORMMETHOD(platform_smp_start_cpu, bare_smp_start_cpu), - PLATFORMMETHOD(platform_reset, e500_reset), + PLATFORMMETHOD(platform_reset, booke_reset), { 0, 0 } }; @@ -307,7 +307,7 @@ bare_smp_start_cpu(platform_t plat, stru } static void -e500_reset(platform_t plat) +booke_reset(platform_t plat) { /* @@ -328,6 +328,7 @@ e500_reset(platform_t plat) mtspr(SPR_DBCR0, mfspr(SPR_DBCR0) | DBCR0_IDM | DBCR0_RST_SYSTEM); printf("Reset failed...\n"); - while (1); + while (1) + ; } Modified: head/sys/powerpc/powerpc/cpu.c ============================================================================== --- head/sys/powerpc/powerpc/cpu.c Sat May 26 13:12:14 2012 (r236096) +++ head/sys/powerpc/powerpc/cpu.c Sat May 26 13:36:18 2012 (r236097) @@ -75,13 +75,13 @@ #include static void cpu_6xx_setup(int cpuid, uint16_t vers); -static void cpu_e500_setup(int cpuid, uint16_t vers); static void cpu_970_setup(int cpuid, uint16_t vers); +static void cpu_booke_setup(int cpuid, uint16_t vers); int powerpc_pow_enabled; void (*cpu_idle_hook)(void) = NULL; static void cpu_idle_60x(void); -static void cpu_idle_e500(void); +static void cpu_idle_booke(void); struct cputab { const char *name; @@ -146,9 +146,13 @@ static const struct cputab models[] = { { "Motorola PowerPC 8245", MPC8245, REVFMT_MAJMIN, PPC_FEATURE_HAS_FPU, cpu_6xx_setup }, { "Freescale e500v1 core", FSL_E500v1, REVFMT_MAJMIN, - 0, cpu_e500_setup }, + 0, cpu_booke_setup }, { "Freescale e500v2 core", FSL_E500v2, REVFMT_MAJMIN, - 0, cpu_e500_setup }, + 0, cpu_booke_setup }, + { "Freescale e500mc core", FSL_E500mc, REVFMT_MAJMIN, + 0, cpu_booke_setup }, + { "Freescale e5500 core", FSL_E5500, REVFMT_MAJMIN, + 0, cpu_booke_setup }, { "IBM Cell Broadband Engine", IBMCELLBE, REVFMT_MAJMIN, PPC_FEATURE_64 | PPC_FEATURE_HAS_ALTIVEC | PPC_FEATURE_HAS_FPU, NULL}, @@ -191,6 +195,8 @@ cpu_setup(u_int cpuid) break; case FSL_E500v1: case FSL_E500v2: + case FSL_E500mc: + case FSL_E5500: maj = (pvr >> 4) & 0xf; min = (pvr >> 0) & 0xf; break; @@ -438,7 +444,7 @@ cpu_6xx_print_cacheinfo(u_int cpuid, uin } static void -cpu_e500_setup(int cpuid, uint16_t vers) +cpu_booke_setup(int cpuid, uint16_t vers) { register_t hid0; @@ -453,7 +459,7 @@ cpu_e500_setup(int cpuid, uint16_t vers) printf("cpu%d: HID0 %b\n", cpuid, (int)hid0, HID0_E500_BITMASK); if (cpu_idle_hook == NULL) - cpu_idle_hook = cpu_idle_e500; + cpu_idle_hook = cpu_idle_booke; } static void @@ -519,6 +525,7 @@ cpu_idle(int busy) CTR2(KTR_SPARE2, "cpu_idle(%d) at %d", busy, curcpu); + if (cpu_idle_hook != NULL) { if (!busy) { critical_enter(); @@ -530,6 +537,7 @@ cpu_idle(int busy) critical_exit(); } } + CTR2(KTR_SPARE2, "cpu_idle(%d) at %d done", busy, curcpu); } @@ -576,7 +584,7 @@ cpu_idle_60x(void) } static void -cpu_idle_e500(void) +cpu_idle_booke(void) { register_t msr;