diff options
author | gallatin <gallatin@FreeBSD.org> | 2003-03-29 18:22:29 +0000 |
---|---|---|
committer | gallatin <gallatin@FreeBSD.org> | 2003-03-29 18:22:29 +0000 |
commit | 9341362461d42776920ab0040995f929409ef9e6 (patch) | |
tree | f498f3ebfdc33b60b14fb4f6953602f2960ff983 /sys/alpha/include | |
parent | e60a42f980067db5924e28c8a23a41768b12cdfe (diff) | |
download | FreeBSD-src-9341362461d42776920ab0040995f929409ef9e6.zip FreeBSD-src-9341362461d42776920ab0040995f929409ef9e6.tar.gz |
Fix the osf1 abi module on SMP systems by making the size of
a struct pmap be the same on both SMP and UP kernels.
It turns out that the size of a struct pmap is much larger on alpha
SMP systems due to the number of pm_asn's being dependant on MAX_CPU.
Since modules are supposed to be SMP agnostic, this has the affect of
moving around the "interesting bits" of the vmspace (daddr, dsize)
that the osf1 module wants to frob. So the module ends up scribbling in a
pmap struct, and the user either sees a panic, or an application failure.
While here, I've also shrunk MAXCPU to 8 now that it affects the size
of pmap structs on UP systesm. This should be plenty, as I'm
unware of any hardware we currently run in which supports more than 8
CPUs.
Diffstat (limited to 'sys/alpha/include')
-rw-r--r-- | sys/alpha/include/param.h | 3 | ||||
-rw-r--r-- | sys/alpha/include/pmap.h | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/sys/alpha/include/param.h b/sys/alpha/include/param.h index 5a286f4..d75b932 100644 --- a/sys/alpha/include/param.h +++ b/sys/alpha/include/param.h @@ -91,8 +91,9 @@ #include <machine/alpha_cpu.h> #include <machine/cpu.h> +#define MAXSMPCPU 8 #ifdef SMP -#define MAXCPU 32 +#define MAXCPU MAXSMPCPU #else #define MAXCPU 1 #endif diff --git a/sys/alpha/include/pmap.h b/sys/alpha/include/pmap.h index 01b29d5..981bea3 100644 --- a/sys/alpha/include/pmap.h +++ b/sys/alpha/include/pmap.h @@ -177,7 +177,7 @@ struct pmap { struct { u_int32_t asn:ASN_BITS; /* address space number */ u_int32_t gen:ASNGEN_BITS; /* generation number */ - } pm_asn[MAXCPU]; + } pm_asn[MAXSMPCPU]; struct pmap_statistics pm_stats; /* pmap statistics */ struct vm_page *pm_ptphint; /* pmap ptp hint */ LIST_ENTRY(pmap) pm_list; /* list of all pmaps. */ |