diff options
| author | Richard Lowe <richlowe@richlowe.net> | 2011-05-15 09:25:05 +0100 |
|---|---|---|
| committer | John Sonnenschein <johns@joyent.com> | 2012-03-13 02:59:51 +0000 |
| commit | e9d887d525f283d917272dba108034637e937879 (patch) | |
| tree | 59d7621dbbc85a4a0d51ba87eac7bd5b4758a4dd /usr/src/uts/intel/sys/segments.h | |
| parent | f77e5a9efd27f14ef64b409a216efdd57530c681 (diff) | |
| download | illumos-joyent-e9d887d525f283d917272dba108034637e937879.tar.gz | |
1971 i86 kernel should be more careful when casting pointers
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Jason King <jason.brian.king@gmail.com>
Approved by: Garrett D'Amore <garrett@nexenta.com>
Diffstat (limited to 'usr/src/uts/intel/sys/segments.h')
| -rw-r--r-- | usr/src/uts/intel/sys/segments.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr/src/uts/intel/sys/segments.h b/usr/src/uts/intel/sys/segments.h index 165fe40e00..c4b194fcd8 100644 --- a/usr/src/uts/intel/sys/segments.h +++ b/usr/src/uts/intel/sys/segments.h @@ -352,8 +352,8 @@ typedef struct gate_desc { uint32_t sgd_hioffset:16; /* code seg off 31:16 */ } gate_desc_t; -#define GATESEG_GETOFFSET(sgd) ((sgd)->sgd_looffset | \ - (sgd)->sgd_hioffset << 16) +#define GATESEG_GETOFFSET(sgd) ((uintptr_t)((sgd)->sgd_looffset | \ + (sgd)->sgd_hioffset << 16)) #else /* __amd64 */ @@ -380,9 +380,9 @@ typedef struct gate_desc { uint64_t sgd_resv3:19; /* unused, ignored */ } gate_desc_t; -#define GATESEG_GETOFFSET(sgd) ((sgd)->sgd_looffset | \ - (sgd)->sgd_hioffset << 16 | \ - (uint64_t)(sgd)->sgd_hi64offset << 32) +#define GATESEG_GETOFFSET(sgd) ((uintptr_t)((sgd)->sgd_looffset | \ + (sgd)->sgd_hioffset << 16 | \ + (uint64_t)((sgd)->sgd_hi64offset) << 32)) #endif /* __amd64 */ |
