diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2009-07-29 18:31:12 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2009-07-29 18:31:12 +0000 |
commit | ac24c148389b1e7d3cadced1d7cd219e3ca280a5 (patch) | |
tree | 5d8afa506fd09ec8e8515d01617c9ffc5f76b674 /sys/arch/hppa/include | |
parent | 2d8712c8ebf00810368617a9f970123259391500 (diff) |
Get rid of non-equivalent aliases of the pcb by moving the fpu state out
of the pcb and using the p_addr member of 'struct proc' to calculate the
address of the kernel stack when switching to virtual mode after taking a trap.
Remove the now unecessary cache flushes; they're actually harmful since they
create non-equivalent aliases. This seems to fix the memory corruption we
have been observing from time to time.
This diff does not rename fpu_curpcb, which is now somewhat incorrectly named.
I hope to change things back again as soon as we are able to map the pcb 1:1.
Diffstat (limited to 'sys/arch/hppa/include')
-rw-r--r-- | sys/arch/hppa/include/pcb.h | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/sys/arch/hppa/include/pcb.h b/sys/arch/hppa/include/pcb.h index 68d7a0ba384..d6032d20412 100644 --- a/sys/arch/hppa/include/pcb.h +++ b/sys/arch/hppa/include/pcb.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pcb.h,v 1.11 2007/07/29 20:15:56 kettenis Exp $ */ +/* $OpenBSD: pcb.h,v 1.12 2009/07/29 18:31:11 kettenis Exp $ */ /* * Copyright (c) 1999-2004 Michael Shalayeff @@ -33,19 +33,7 @@ #include <machine/reg.h> struct pcb { - u_int64_t pcb_fpregs[HPPA_NFPREGS+1]; /* not in the trapframe */ - vaddr_t pcb_uva; /* KVA for U-area */ - - /* - * The members above are primarily accessed by there physical - * address, wheras the members below are accessed exclusively - * by there virtual address. Unfortunately this structure - * ends up being non-equivalently mapped, which will cause - * data corruption if those members share a cache line. Since - * the maximum cache line size is 64 bytes, adding 64 bytes of - * padding makes sure that will never happen. - */ - u_char pcb_pad[64]; + struct fpreg *pcb_fpregs; /* not in the trapframe */ u_int pcb_ksp; /* kernel sp for ctxsw */ u_int pcb_onfault; /* SW copy fault handler */ |