diff options
author | peter <peter@FreeBSD.org> | 2002-08-30 00:29:52 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2002-08-30 00:29:52 +0000 |
commit | f96820418edc4a1b13d0df8d42df2d1c5d558e8e (patch) | |
tree | 9882637f2ae8e334c2d31ccfddf4df97021419b5 | |
parent | b085f4e6d284cf69ff73ce1640a38c562547f8bc (diff) | |
download | FreeBSD-src-f96820418edc4a1b13d0df8d42df2d1c5d558e8e.zip FreeBSD-src-f96820418edc4a1b13d0df8d42df2d1c5d558e8e.tar.gz |
AARGH! btoc() is used in the MI buffer sizing routines to calculate
the minimum of either physmem or KVA. But.. btoc() casts the address
to (unsigned int). This is NOT GOOD on 64 bit machines and on alpha and
ia64, this results in a buffer limit of around 500K (not megs). This
causes extreme disk access problems on alpha and ia64. Since this cast
is simply to ensure that it is unsigned, use 'vm_offset_t' instead. This
is available because it is already defined in types.h.
Alpha has been suffering from this for ages. It always felt like the
caching wasn't working, and unfortunately it turned out that way. :-(
-rw-r--r-- | sys/sys/param.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/sys/param.h b/sys/sys/param.h index e45a6ea..e875740 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -152,7 +152,7 @@ /* bytes to clicks */ #ifndef btoc -#define btoc(x) (((unsigned)(x)+PAGE_MASK)>>PAGE_SHIFT) +#define btoc(x) (((vm_offset_t)(x)+PAGE_MASK)>>PAGE_SHIFT) #endif /* |