Date: Sat, 26 Sep 2009 16:37:23 +0000 (UTC) From: Rui Paulo <rpaulo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r197523 - in head/sys/arm: arm include Message-ID: <200909261637.n8QGbNdL064760@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rpaulo Date: Sat Sep 26 16:37:23 2009 New Revision: 197523 URL: http://svn.freebsd.org/changeset/base/197523 Log: Promote the cpu_class local variable to global and expose it in md_var.h Reviewed by: freebsd-arm Modified: head/sys/arm/arm/identcpu.c head/sys/arm/include/md_var.h Modified: head/sys/arm/arm/identcpu.c ============================================================================== --- head/sys/arm/arm/identcpu.c Sat Sep 26 15:26:32 2009 (r197522) +++ head/sys/arm/arm/identcpu.c Sat Sep 26 16:37:23 2009 (r197523) @@ -54,30 +54,12 @@ __FBSDID("$FreeBSD$"); #include <machine/cpu.h> #include <machine/cpuconf.h> +#include <machine/md_var.h> char machine[] = "arm"; SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, "Machine class"); -enum cpu_class { - CPU_CLASS_NONE, - CPU_CLASS_ARM2, - CPU_CLASS_ARM2AS, - CPU_CLASS_ARM3, - CPU_CLASS_ARM6, - CPU_CLASS_ARM7, - CPU_CLASS_ARM7TDMI, - CPU_CLASS_ARM8, - CPU_CLASS_ARM9TDMI, - CPU_CLASS_ARM9ES, - CPU_CLASS_ARM9EJS, - CPU_CLASS_ARM10E, - CPU_CLASS_ARM10EJ, - CPU_CLASS_SA1, - CPU_CLASS_XSCALE, - CPU_CLASS_ARM11J, - CPU_CLASS_MARVELL -}; static const char * const generic_steppings[16] = { "rev 0", "rev 1", "rev 2", "rev 3", @@ -372,11 +354,11 @@ static const char * const wtnames[] = { extern int ctrl; +enum cpu_class cpu_class = CPU_CLASS_NONE; void identify_arm_cpu(void) { u_int cpuid; - enum cpu_class cpu_class = CPU_CLASS_NONE; int i; cpuid = cpu_id(); Modified: head/sys/arm/include/md_var.h ============================================================================== --- head/sys/arm/include/md_var.h Sat Sep 26 15:26:32 2009 (r197522) +++ head/sys/arm/include/md_var.h Sat Sep 26 16:37:23 2009 (r197523) @@ -48,6 +48,27 @@ extern int _min_bzero_size; #define SRC_IS_USER 0x2 #define IS_PHYSICAL 0x4 +enum cpu_class { + CPU_CLASS_NONE, + CPU_CLASS_ARM2, + CPU_CLASS_ARM2AS, + CPU_CLASS_ARM3, + CPU_CLASS_ARM6, + CPU_CLASS_ARM7, + CPU_CLASS_ARM7TDMI, + CPU_CLASS_ARM8, + CPU_CLASS_ARM9TDMI, + CPU_CLASS_ARM9ES, + CPU_CLASS_ARM9EJS, + CPU_CLASS_ARM10E, + CPU_CLASS_ARM10EJ, + CPU_CLASS_SA1, + CPU_CLASS_XSCALE, + CPU_CLASS_ARM11J, + CPU_CLASS_MARVELL +}; +extern enum cpu_class cpu_class; + struct dumperinfo; extern int busdma_swi_pending; void busdma_swi(void);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909261637.n8QGbNdL064760>