linux/arch/sparc/mm
David S. Miller f4142cba4e sparc64: Force the execute bit in OpenFirmware's translation entries.
In the OF 'translations' property, the template TTEs in the mappings
never specify the executable bit.  This is the case even though some
of these mappings are for OF's code segment.

Therefore, we need to force the execute bit on in every mapping.

This problem can only really trigger on Niagara/sun4v machines and the
history behind this is a little complicated.

Previous to sun4v, the sun4u TTE entries lacked a hardware execute
permission bit.  So OF didn't have to ever worry about setting
anything to handle executable pages.  Any valid TTE loaded into the
I-TLB would be respected by the chip.

But sun4v Niagara chips have a real hardware enforced executable bit
in their TTEs.  So it has to be set or else the I-TLB throws an
instruction access exception with type code 6 (protection violation).

We've been extremely fortunate to not get bitten by this in the past.

The best I can tell is that the OF's mappings for it's executable code
were mapped using permanent locked mappings on sun4v in the past.
Therefore, the fact that we didn't have the exec bit set in the OF
translations we would use did not matter in practice.

Thanks to Greg Onufer for helping me track this down.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-09-29 12:18:59 -07:00
..
btfixup.c
extable.c module: trim exception table on init free. 2009-06-12 21:47:04 +09:30
fault_32.c perf: Remove the nmi parameter from the swevent and overflow interface 2011-07-01 11:06:35 +02:00
fault_64.c perf: Remove the nmi parameter from the swevent and overflow interface 2011-07-01 11:06:35 +02:00
generic_32.c thp: pte alloc trans splitting 2011-01-13 17:32:40 -08:00
generic_64.c thp: pte alloc trans splitting 2011-01-13 17:32:40 -08:00
gup.c sparc64: implement get_user_pages_fast() 2011-07-25 20:57:10 -07:00
highmem.c mm: fix race in kunmap_atomic() 2010-10-27 18:03:05 -07:00
hugetlbpage.c thp: pte alloc trans splitting 2011-01-13 17:32:40 -08:00
hypersparc.S
init_32.c sparc: Remove unnecessary semicolons 2011-06-07 16:06:34 -07:00
init_64.c sparc64: Force the execute bit in OpenFirmware's translation entries. 2011-09-29 12:18:59 -07:00
init_64.h sparc64: Fix definition of VMEMMAP_SIZE. 2009-11-23 16:38:56 -08:00
io-unit.c sparc: remove references to of_device and to_of_device 2010-07-24 09:58:22 -06:00
iommu.c Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6 2010-08-05 15:57:35 -07:00
leon_mm.c sparc32,leon: Added __init declaration to leon_flush_needed() 2011-07-06 08:01:52 -07:00
loadmmu.c sparc,leon: Introduce the sparc-leon CPU type. 2009-08-17 18:32:10 -07:00
Makefile sparc64: implement get_user_pages_fast() 2011-07-25 20:57:10 -07:00
nosun4c.c MM: Pass a PTE pointer to update_mmu_cache() rather than the PTE itself 2010-02-20 16:41:46 +00:00
srmmu.c sparc: Remove unnecessary semicolons 2011-06-07 16:06:34 -07:00
sun4c.c sparc: Remove unnecessary semicolons 2011-06-07 16:06:34 -07:00
swift.S
tlb.c sparc: mmu_gather rework 2011-05-25 08:39:13 -07:00
tsb.c sparc64: kill page table quicklists 2011-07-25 20:57:09 -07:00
tsunami.S
ultra.S
viking.S