linux/arch/mips
David Daney 6dd9344cfc MIPS: Implement Read Inhibit/eXecute Inhibit
The SmartMIPS ASE specifies how Read Inhibit (RI) and eXecute Inhibit
(XI) bits in the page tables work.  The upper two bits of EntryLo{0,1}
are RI and XI when the feature is enabled in the PageGrain register.
SmartMIPS only covers 32-bit systems.  Cavium Octeon+ extends this to
64-bit systems by continuing to place the RI and XI bits in the top of
EntryLo even when EntryLo is 64-bits wide.

Because we need to carry the RI and XI bits in the PTE, the layout of
the PTE is changed.  There is a two instruction overhead in the TLB
refill hot path to get the EntryLo bits into the proper position.
Also the TLB load exception has to probe the TLB to check if RI or XI
caused the exception.

Also of note is that the layout of the PTE bits is done at compile and
runtime rather than statically.  In the 32-bit case this allows for
the same number of PFN bits as before the patch as the _PAGE_HUGE is
not supported in 32-bit kernels (we have _PAGE_NO_EXEC and
_PAGE_NO_READ instead of _PAGE_READ and _PAGE_HUGE).

The patch is tested on Cavium Octeon+, but should also work on 32-bit
systems with the Smart-MIPS ASE.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/952/
Patchwork: http://patchwork.linux-mips.org/patch/956/
Patchwork: http://patchwork.linux-mips.org/patch/962/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2010-02-27 12:53:26 +01:00
..
alchemy MIPS: Remove trailing space in messages 2010-02-27 12:53:25 +01:00
ar7 MIPS: AR7: Make ar7_register_devices much more durable 2010-02-27 12:53:22 +01:00
bcm47xx MIPS: Nuke trailing blank lines 2010-02-27 12:53:14 +01:00
bcm63xx MIPS: Nuke trailing blank lines 2010-02-27 12:53:14 +01:00
boot MIPS: Make the debugging of compressed kernel configurable 2010-02-27 12:53:24 +01:00
cavium-octeon MIPS: Remove trailing space in messages 2010-02-27 12:53:25 +01:00
cobalt MIPS: Cobalt use strlcat() for the command line arguments 2010-01-12 18:19:34 +01:00
configs MIPS: Loongson: Lemote-2F: update defconfig 2010-02-27 12:53:12 +01:00
dec MIPS: Nuke trailing blank lines 2010-02-27 12:53:14 +01:00
emma MIPS: Remove useless zero initializations. 2009-09-17 20:07:51 +02:00
fw MIPS: IP22: Remove an unused function 2009-12-17 01:56:56 +00:00
gt64120/wrppmc Update Yoichi Yuasa's e-mail address 2009-07-03 15:45:29 +01:00
include/asm MIPS: Implement Read Inhibit/eXecute Inhibit 2010-02-27 12:53:26 +01:00
jazz MIPS: Add IRQF_TIMER flag for timer interrupts 2009-11-02 12:00:02 +01:00
kernel MIPS: Set __elf_platform for Octeon. 2010-02-27 12:53:20 +01:00
lasat MIPS: Nuke trailing blank lines 2010-02-27 12:53:14 +01:00
lib MIPS: Fix __ndelay build error and add 'ull' suffix for 32-bit kernel 2009-06-17 11:06:24 +01:00
loongson MIPS: Loongson: Cleanup the halt and poweroff action 2010-02-27 12:53:17 +01:00
math-emu MIPS: Nuke trailing blank lines 2010-02-27 12:53:14 +01:00
mipssim MIPS: Malta, PowerTV: Remove unnecessary "Linux started" 2010-01-12 18:19:36 +01:00
mm MIPS: Implement Read Inhibit/eXecute Inhibit 2010-02-27 12:53:26 +01:00
mti-malta MIPS: Malta, PowerTV: Remove unnecessary "Linux started" 2010-01-12 18:19:36 +01:00
nxp MIPS: PNX8550: Remove unnecessary export prom_getcmdline() 2010-02-27 12:53:18 +01:00
oprofile MIPS: Simplify the weak annotation with __weak 2010-02-27 12:53:17 +01:00
pci MIPS: Nuke trailing blank lines 2010-02-27 12:53:14 +01:00
pmc-sierra MIPS: Remove trailing space in messages 2010-02-27 12:53:25 +01:00
power MIPS: Loongson: Change the Email address of Wu Zhangjin 2010-02-27 12:53:12 +01:00
powertv MIPS: Cleanup switches with cases that can be merged 2010-02-27 12:53:14 +01:00
rb532 MIPS: Replace all usages of CL_SIZE by COMMAND_LINE_SIZE 2009-12-17 01:56:56 +00:00
sgi-ip22 MIPS: Move several variables from .bss to .init.data 2009-12-17 01:57:27 +00:00
sgi-ip27 MIPS: Nuke trailing blank lines 2010-02-27 12:53:14 +01:00
sgi-ip32 MIPS: Cleanup switches with cases that can be merged 2010-02-27 12:53:14 +01:00
sibyte MIPS: Don't include <linux/smp_lock.h> unnecessarily. 2010-02-27 12:52:57 +01:00
sni MIPS: SNI: Correct NULL test 2010-02-10 22:15:45 +01:00
txx9 MIPS: TXx9: Remove forced serial console setting 2010-02-27 12:53:22 +01:00
vr41xx MIPS: VR41xx: Use strlcat() for the command line arguments 2010-01-12 18:19:30 +01:00
Kconfig MIPS: Support 36-bit iomem on 32-bit Au1x00 2010-02-27 12:53:17 +01:00
Kconfig.debug MIPS: Make the debugging of compressed kernel configurable 2010-02-27 12:53:24 +01:00
Makefile MIPS: Loongson: arch/mips/Makefile: Add missing whitespace 2010-02-27 12:53:11 +01:00