diff options
-rw-r--r-- | i386/configfrag.ac | 1 | ||||
-rw-r--r-- | i386/intel/pmap.c | 4 | ||||
-rw-r--r-- | i386/intel/pmap.h | 4 | ||||
-rw-r--r-- | kern/debug.c | 2 | ||||
-rw-r--r-- | kern/lock.c | 10 |
5 files changed, 10 insertions, 11 deletions
diff --git a/i386/configfrag.ac b/i386/configfrag.ac index 77f66af..1eaabca 100644 --- a/i386/configfrag.ac +++ b/i386/configfrag.ac @@ -23,7 +23,6 @@ dnl USE OF THIS SOFTWARE. # Some of the i386-specific code checks for these. AC_DEFINE([__ELF__], [1], [__ELF__]) - AC_DEFINE([i386], [1], [i386]) # Determines the size of the CPU cache line. AC_DEFINE([CPU_L1_SHIFT], [6], [CPU_L1_SHIFT]) diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c index 7cb990a..3c11d31 100644 --- a/i386/intel/pmap.c +++ b/i386/intel/pmap.c @@ -2787,7 +2787,7 @@ void pmap_update_interrupt() } #endif /* NCPUS > 1 */ -#ifdef i386 +#if defined(__i386__) /* Unmap page 0 to trap NULL references. */ void pmap_unmap_page_zero () @@ -2806,4 +2806,4 @@ pmap_unmap_page_zero () INVALIDATE_TLB(kernel_pmap, 0, PAGE_SIZE); #endif /* MACH_XEN */ } -#endif /* i386 */ +#endif /* __i386__ */ diff --git a/i386/intel/pmap.h b/i386/intel/pmap.h index d2e3b29..2692aae 100644 --- a/i386/intel/pmap.h +++ b/i386/intel/pmap.h @@ -48,7 +48,7 @@ * Define the generic in terms of the specific */ -#if i386 +#if defined(__i386__) #define INTEL_PGBYTES I386_PGBYTES #define INTEL_PGSHIFT I386_PGSHIFT #define intel_btop(x) i386_btop(x) @@ -58,7 +58,7 @@ #define trunc_intel_to_vm(x) trunc_i386_to_vm(x) #define round_intel_to_vm(x) round_i386_to_vm(x) #define vm_to_intel(x) vm_to_i386(x) -#endif /* i386 */ +#endif /* __i386__ */ /* * i386/i486 Page Table Entry diff --git a/kern/debug.c b/kern/debug.c index 26445f8..65c43fb 100644 --- a/kern/debug.c +++ b/kern/debug.c @@ -100,7 +100,7 @@ void SoftDebugger(message) gimmeabreak(); #endif -#ifdef i386 +#if defined(__i386__) asm("int3"); #endif } diff --git a/kern/lock.c b/kern/lock.c index 0c61227..2bcfa8b 100644 --- a/kern/lock.c +++ b/kern/lock.c @@ -162,9 +162,9 @@ void simple_lock( info = &simple_locks_info[simple_locks_taken++]; info->l = l; /* XXX we want our return address, if possible */ -#ifdef i386 +#if defined(__i386__) info->ra = *((unsigned int *)&l - 1); -#endif /* i386 */ +#endif /* __i386__ */ } boolean_t simple_lock_try( @@ -180,9 +180,9 @@ boolean_t simple_lock_try( info = &simple_locks_info[simple_locks_taken++]; info->l = l; /* XXX we want our return address, if possible */ -#ifdef i386 +#if defined(__i386__) info->ra = *((unsigned int *)&l - 1); -#endif /* i386 */ +#endif /* __i386__ */ return TRUE; } @@ -622,7 +622,7 @@ void db_show_all_slocks(void) info = &simple_locks_info[i]; db_printf("%d: ", i); db_printsym(info->l, DB_STGY_ANY); -#if i386 +#if defined(__i386__) db_printf(" locked by "); db_printsym(info->ra, DB_STGY_PROC); #endif |