diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-10-12 16:43:47 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-10-14 01:58:36 -0400 |
commit | 8d8997f34e66124577db52f6e7ee10ab5f869e07 (patch) | |
tree | cfca0e3e7251d1a36b311283772725589822b93d /arch | |
parent | aee7a283bb1e7d722f3431e0689c2c281ad0c1f6 (diff) |
powerpc/mm: Fix hang accessing top of vmalloc space
On pSeries, we always force the IO space to be mapped using 4K
pages even with a 64K base page size to cope with some limitations
in the HV interface to some devices.
However, the SLB miss handler code to discriminate between vmalloc
and ioremap space uses a CPU feature section such that the code
is nop'ed out when the processor support large pages non-cachable
mappings.
Thus, we end up always using the ioremap page size for vmalloc
segments on such processors, causing a discrepency between the
segment and the hash table, and thus a hang continously hashing
the page.
It works for the first segment of the vmalloc space since that
segment is "bolted" in by C code correctly, and thankfully we
almost never use the vmalloc space beyond the first segment,
but the new percpu code made the bug happen.
This fixes it by removing the feature section from the assembly,
we now always do the comparison between vmalloc and ioremap.
Signed-off-by; Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/mm/slb_low.S | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/powerpc/mm/slb_low.S b/arch/powerpc/mm/slb_low.S index bc44dc4b5c67..95ce35581696 100644 --- a/arch/powerpc/mm/slb_low.S +++ b/arch/powerpc/mm/slb_low.S | |||
@@ -72,19 +72,17 @@ _GLOBAL(slb_miss_kernel_load_vmemmap) | |||
72 | 1: | 72 | 1: |
73 | #endif /* CONFIG_SPARSEMEM_VMEMMAP */ | 73 | #endif /* CONFIG_SPARSEMEM_VMEMMAP */ |
74 | 74 | ||
75 | /* vmalloc/ioremap mapping encoding bits, the "li" instructions below | 75 | /* vmalloc mapping gets the encoding from the PACA as the mapping |
76 | * will be patched by the kernel at boot | 76 | * can be demoted from 64K -> 4K dynamically on some machines |
77 | */ | 77 | */ |
78 | BEGIN_FTR_SECTION | ||
79 | /* check whether this is in vmalloc or ioremap space */ | ||
80 | clrldi r11,r10,48 | 78 | clrldi r11,r10,48 |
81 | cmpldi r11,(VMALLOC_SIZE >> 28) - 1 | 79 | cmpldi r11,(VMALLOC_SIZE >> 28) - 1 |
82 | bgt 5f | 80 | bgt 5f |
83 | lhz r11,PACAVMALLOCSLLP(r13) | 81 | lhz r11,PACAVMALLOCSLLP(r13) |
84 | b 6f | 82 | b 6f |
85 | 5: | 83 | 5: |
86 | END_FTR_SECTION_IFCLR(CPU_FTR_CI_LARGE_PAGE) | 84 | /* IO mapping */ |
87 | _GLOBAL(slb_miss_kernel_load_io) | 85 | _GLOBAL(slb_miss_kernel_load_io) |
88 | li r11,0 | 86 | li r11,0 |
89 | 6: | 87 | 6: |
90 | BEGIN_FTR_SECTION | 88 | BEGIN_FTR_SECTION |