Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Sep 2009 12:48:40 +0100
From:      Rui Paulo <rpaulo@freebsd.org>
To:        freebsd-arm@freebsd.org
Subject:   Exporting cpu_class
Message-ID:  <A8F7E0EF-8536-40E4-A4BD-3C8C8FE40C1D@freebsd.org>

next in thread | raw e-mail | index | archive | help

--Apple-Mail-9-694213771
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=us-ascii;
	format=flowed;
	delsp=yes

Hi,
I need to export cpu_class to the outside world, so I plan to commit  
the attached patch soon. If you don't like it, please speak up.

Thanks,
--
Rui Paulo

--Apple-Mail-9-694213771
Content-Disposition: attachment;
	filename=exportcpuclass.diff
Content-Type: application/octet-stream;
	name="exportcpuclass.diff"
Content-Transfer-Encoding: 7bit

Index: arm/identcpu.c
===================================================================
--- arm/identcpu.c	(revision 197454)
+++ arm/identcpu.c	(working copy)
@@ -54,30 +54,12 @@
 #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 @@
 
 
 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();
Index: include/md_var.h
===================================================================
--- include/md_var.h	(revision 197454)
+++ include/md_var.h	(working copy)
@@ -48,6 +48,27 @@
 #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);

--Apple-Mail-9-694213771
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=us-ascii;
	format=flowed





--Apple-Mail-9-694213771--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A8F7E0EF-8536-40E4-A4BD-3C8C8FE40C1D>