summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2003-04-30 12:23:58 +0000
committermarkm <markm@FreeBSD.org>2003-04-30 12:23:58 +0000
commit5b09b29a7fd0b1a25f9239bd6e0af89c73475f56 (patch)
tree91235c9a23243c43332a93542c9f775a63af2cb7 /sys/i386
parent5c705408fcc2c36b8d9c9eec787903bd6372ab84 (diff)
downloadFreeBSD-src-5b09b29a7fd0b1a25f9239bd6e0af89c73475f56.zip
FreeBSD-src-5b09b29a7fd0b1a25f9239bd6e0af89c73475f56.tar.gz
Warns fixing. Protect against inappropriate linting, and mark
GCC-specific assemble code as such (in #ifdefs). Fix an easy static variable warning while I'm here.
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/i386/identcpu.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/i386/i386/identcpu.c b/sys/i386/i386/identcpu.c
index 45e65ee..0e8d809 100644
--- a/sys/i386/i386/identcpu.c
+++ b/sys/i386/i386/identcpu.c
@@ -705,9 +705,12 @@ void
panicifcpuunsupported(void)
{
+#if !defined(lint)
#if !defined(I386_CPU) && !defined(I486_CPU) && !defined(I586_CPU) && !defined(I686_CPU)
#error This kernel is not configured for one of the supported CPUs
#endif
+#else /* lint */
+#endif /* lint */
#if defined(I386_CPU) && (defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU))
#error I386_CPU is mutually exclusive with the other cpu types.
#endif
@@ -746,6 +749,7 @@ static volatile u_int trap_by_rdmsr;
* be advanced.
*/
inthand_t bluetrap6;
+#ifdef __GNUC__
__asm
(" \
.text; \
@@ -757,12 +761,14 @@ __asm
addl $2, (%esp); /* rdmsr is a 2-byte instruction */ \
iret \
");
+#endif
/*
* Special exception 13 handler.
* Accessing non-existent MSR generates general protection fault.
*/
inthand_t bluetrap13;
+#ifdef __GNUC__
__asm
(" \
.text; \
@@ -775,6 +781,7 @@ __asm
addl $2, (%esp); /* rdmsr is a 2-bytes instruction. */ \
iret; \
");
+#endif
/*
* Distinguish IBM Blue Lightning CPU from Cyrix CPUs that does not
@@ -1100,7 +1107,7 @@ union msrinfo {
u_int32_t regs[2];
};
-u_int32_t longrun_modes[LONGRUN_MODE_MAX][3] = {
+static u_int32_t longrun_modes[LONGRUN_MODE_MAX][3] = {
/* MSR low, MSR high, flags bit0 */
{ 0, 0, 0}, /* LONGRUN_MODE_MINFREQUENCY */
{ 0, 100, 0}, /* LONGRUN_MODE_ECONOMY */
OpenPOWER on IntegriCloud