diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2002-11-26 01:35:24 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2002-11-26 01:35:24 +0000 |
commit | 031108f2a9aa7af8876902287e0785030d665aa7 (patch) | |
tree | 12affc17ba1c4b23adf80fdee1554aaee9b675f2 /sys/arch | |
parent | b1e77718707e10a0c0765dcf39e3e0299a0abbb1 (diff) |
Make the PTE constants unsigned long with UL.
The macro PG_PALCODE in pte.h is supposed to be used when comparing
two ptes to see if we need a tlb flush. For that it uses the macro
ALPHA_PTE_PALCODE which in turn is defined to ~ALPHA_PTE_SOFTWARE.
Unfortunately ALPHA_PTE_SOFTWARE is small enough to fit in an int,
so ALPHA_PTE_PALCODE becomes an int to and the masking in PG_PALCODE
masks off the pfn in the pte and pmap_enter will then fail to flush
certain TLB entries when it needs to (this situation shouldn't
happen too often).
This might or might not be the solution for the memory corruption
bug I've been hunting for the last three months (the machine still
borks up, but in different ways now).
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/alpha/include/alpha_cpu.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/sys/arch/alpha/include/alpha_cpu.h b/sys/arch/alpha/include/alpha_cpu.h index 6c44a5437be..bb3a6fa3f54 100644 --- a/sys/arch/alpha/include/alpha_cpu.h +++ b/sys/arch/alpha/include/alpha_cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: alpha_cpu.h,v 1.7 2002/05/10 10:14:48 art Exp $ */ +/* $OpenBSD: alpha_cpu.h,v 1.8 2002/11/26 01:35:23 art Exp $ */ /* $NetBSD: alpha_cpu.h,v 1.43 2001/12/18 04:18:22 thorpej Exp $ */ /* @@ -208,27 +208,27 @@ struct alpha_logout_area { #define ALPHA_K0SEG_TO_PHYS(x) ((x) & ~ALPHA_K0SEG_BASE) #define ALPHA_PHYS_TO_K0SEG(x) ((x) | ALPHA_K0SEG_BASE) -#define ALPHA_PTE_VALID 0x0001 +#define ALPHA_PTE_VALID 0x0001UL -#define ALPHA_PTE_FAULT_ON_READ 0x0002 -#define ALPHA_PTE_FAULT_ON_WRITE 0x0004 -#define ALPHA_PTE_FAULT_ON_EXECUTE 0x0008 +#define ALPHA_PTE_FAULT_ON_READ 0x0002UL +#define ALPHA_PTE_FAULT_ON_WRITE 0x0004UL +#define ALPHA_PTE_FAULT_ON_EXECUTE 0x0008UL -#define ALPHA_PTE_ASM 0x0010 /* addr. space match */ -#define ALPHA_PTE_GRANULARITY 0x0060 /* granularity hint */ +#define ALPHA_PTE_ASM 0x0010UL /* addr. space match */ +#define ALPHA_PTE_GRANULARITY 0x0060UL /* granularity hint */ -#define ALPHA_PTE_PROT 0xff00 -#define ALPHA_PTE_KR 0x0100 -#define ALPHA_PTE_UR 0x0200 -#define ALPHA_PTE_KW 0x1000 -#define ALPHA_PTE_UW 0x2000 +#define ALPHA_PTE_PROT 0xff00UL +#define ALPHA_PTE_KR 0x0100UL +#define ALPHA_PTE_UR 0x0200UL +#define ALPHA_PTE_KW 0x1000UL +#define ALPHA_PTE_UW 0x2000UL #define ALPHA_PTE_WRITE (ALPHA_PTE_KW | ALPHA_PTE_UW) -#define ALPHA_PTE_SOFTWARE 0x00000000ffff0000 +#define ALPHA_PTE_SOFTWARE 0x00000000ffff0000UL #define ALPHA_PTE_PALCODE (~ALPHA_PTE_SOFTWARE) /* shorthand */ -#define ALPHA_PTE_PFN 0xffffffff00000000 +#define ALPHA_PTE_PFN 0xffffffff00000000UL #define ALPHA_PTE_TO_PFN(pte) ((pte) >> 32) #define ALPHA_PTE_FROM_PFN(pfn) ((pfn) << 32) |