diff options
author | Richard Lowe <richlowe@richlowe.net> | 2011-05-15 21:34:10 +0100 |
---|---|---|
committer | Richard Lowe <richlowe@richlowe.net> | 2011-05-15 21:34:10 +0100 |
commit | 6b7143d774683daf27dfb2e93ab48d1ade1a3477 (patch) | |
tree | fd02f5632a9d915059daa631435065339fb064db /usr/src/uts/intel/asm/mmu.h | |
parent | 9b7d742f0ee8ff89c05a8b5275d11359920ec60f (diff) | |
download | illumos-joyent-6b7143d774683daf27dfb2e93ab48d1ade1a3477.tar.gz |
2251 kernel inlines should support gcc 4
Reviewed by: Andrew Stormont <Andrew.Stormont@nexenta.com>
Reviewed by: Milan Jurik <milan.jurik@xylab.cz>
Reviewed by: Dan McDonald <danmcd@nexenta.com>
Reviewed by: Joshua M. Clulow <josh@sysmgr.org>
Reviewed by: Gordon Ross <gwr@nexenta.com>
Approved by: Garrett D'Amore <garrett@damore.org>
Diffstat (limited to 'usr/src/uts/intel/asm/mmu.h')
-rw-r--r-- | usr/src/uts/intel/asm/mmu.h | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/usr/src/uts/intel/asm/mmu.h b/usr/src/uts/intel/asm/mmu.h index 68995f2f41..1be654759d 100644 --- a/usr/src/uts/intel/asm/mmu.h +++ b/usr/src/uts/intel/asm/mmu.h @@ -26,8 +26,7 @@ #ifndef _ASM_MMU_H #define _ASM_MMU_H -#pragma ident "%Z%%M% %I% %E% SMI" - +#include <sys/ccompile.h> #include <sys/types.h> #ifdef __cplusplus @@ -38,7 +37,8 @@ extern "C" { #if defined(__amd64) -extern __inline__ ulong_t getcr3(void) +extern __GNU_INLINE ulong_t +getcr3(void) { uint64_t value; @@ -48,7 +48,8 @@ extern __inline__ ulong_t getcr3(void) return (value); } -extern __inline__ void setcr3(ulong_t value) +extern __GNU_INLINE void +setcr3(ulong_t value) { __asm__ __volatile__( "movq %0, %%cr3" @@ -56,14 +57,16 @@ extern __inline__ void setcr3(ulong_t value) : "r" (value)); } -extern __inline__ void reload_cr3(void) +extern __GNU_INLINE void +reload_cr3(void) { setcr3(getcr3()); } #elif defined(__i386) -extern __inline__ ulong_t getcr3(void) +extern __GNU_INLINE ulong_t +getcr3(void) { uint32_t value; @@ -73,7 +76,8 @@ extern __inline__ ulong_t getcr3(void) return (value); } -extern __inline__ void setcr3(ulong_t value) +extern __GNU_INLINE void +setcr3(ulong_t value) { __asm__ __volatile__( "movl %0, %%cr3" @@ -81,7 +85,8 @@ extern __inline__ void setcr3(ulong_t value) : "r" (value)); } -extern __inline__ void reload_cr3(void) +extern __GNU_INLINE void +reload_cr3(void) { setcr3(getcr3()); } |