aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeoff Levand <geoffrey.levand@am.sony.com>2008-01-18 15:32:59 -0500
committerPaul Mackerras <paulus@samba.org>2008-01-25 06:52:53 -0500
commita628df1e9dd0d3de540bf0b7d8c6ea4896539bbb (patch)
treecbd275f7af5a082deda36dd20aa09abfd8e7010b
parentc4e6752dd4f249d6797146d655973bc0bde4c26e (diff)
[POWERPC] PS3: Remove lpar address workaround
Remove the PS3 workaround needed to support sparsemem SPU mappings. The SPU mappings no longer use sparsemem, so this workaround is no longer needed. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r--arch/powerpc/platforms/ps3/Kconfig11
-rw-r--r--arch/powerpc/platforms/ps3/mm.c16
-rw-r--r--include/asm-powerpc/sparsemem.h5
3 files changed, 4 insertions, 28 deletions
diff --git a/arch/powerpc/platforms/ps3/Kconfig b/arch/powerpc/platforms/ps3/Kconfig
index a3d708fe5709..a5f4e95dfc3d 100644
--- a/arch/powerpc/platforms/ps3/Kconfig
+++ b/arch/powerpc/platforms/ps3/Kconfig
@@ -61,17 +61,6 @@ config PS3_DYNAMIC_DMA
61 This support is mainly for Linux kernel development. If unsure, 61 This support is mainly for Linux kernel development. If unsure,
62 say N. 62 say N.
63 63
64config PS3_USE_LPAR_ADDR
65 depends on PPC_PS3 && EXPERIMENTAL
66 bool "PS3 use lpar address space"
67 default y
68 help
69 This option is solely for experimentation by experts. Disables
70 translation of lpar addresses. SPE support currently won't work
71 without this set to y.
72
73 If you have any doubt, choose the default y.
74
75config PS3_VUART 64config PS3_VUART
76 depends on PPC_PS3 65 depends on PPC_PS3
77 tristate 66 tristate
diff --git a/arch/powerpc/platforms/ps3/mm.c b/arch/powerpc/platforms/ps3/mm.c
index 6ce2fabd745c..68900476c842 100644
--- a/arch/powerpc/platforms/ps3/mm.c
+++ b/arch/powerpc/platforms/ps3/mm.c
@@ -36,11 +36,6 @@
36#endif 36#endif
37 37
38enum { 38enum {
39#if defined(CONFIG_PS3_USE_LPAR_ADDR)
40 USE_LPAR_ADDR = 1,
41#else
42 USE_LPAR_ADDR = 0,
43#endif
44#if defined(CONFIG_PS3_DYNAMIC_DMA) 39#if defined(CONFIG_PS3_DYNAMIC_DMA)
45 USE_DYNAMIC_DMA = 1, 40 USE_DYNAMIC_DMA = 1,
46#else 41#else
@@ -137,11 +132,8 @@ static struct map map;
137unsigned long ps3_mm_phys_to_lpar(unsigned long phys_addr) 132unsigned long ps3_mm_phys_to_lpar(unsigned long phys_addr)
138{ 133{
139 BUG_ON(is_kernel_addr(phys_addr)); 134 BUG_ON(is_kernel_addr(phys_addr));
140 if (USE_LPAR_ADDR) 135 return (phys_addr < map.rm.size || phys_addr >= map.total)
141 return phys_addr; 136 ? phys_addr : phys_addr + map.r1.offset;
142 else
143 return (phys_addr < map.rm.size || phys_addr >= map.total)
144 ? phys_addr : phys_addr + map.r1.offset;
145} 137}
146 138
147EXPORT_SYMBOL(ps3_mm_phys_to_lpar); 139EXPORT_SYMBOL(ps3_mm_phys_to_lpar);
@@ -309,7 +301,7 @@ static int __init ps3_mm_add_memory(void)
309 301
310 BUG_ON(!mem_init_done); 302 BUG_ON(!mem_init_done);
311 303
312 start_addr = USE_LPAR_ADDR ? map.r1.base : map.rm.size; 304 start_addr = map.rm.size;
313 start_pfn = start_addr >> PAGE_SHIFT; 305 start_pfn = start_addr >> PAGE_SHIFT;
314 nr_pages = (map.r1.size + PAGE_SIZE - 1) >> PAGE_SHIFT; 306 nr_pages = (map.r1.size + PAGE_SIZE - 1) >> PAGE_SHIFT;
315 307
@@ -1007,7 +999,7 @@ static int dma_sb_region_create_linear(struct ps3_dma_region *r)
1007 999
1008 if (r->offset + r->len > map.rm.size) { 1000 if (r->offset + r->len > map.rm.size) {
1009 /* Map (part of) 2nd RAM chunk */ 1001 /* Map (part of) 2nd RAM chunk */
1010 virt_addr = USE_LPAR_ADDR ? map.r1.base : map.rm.size; 1002 virt_addr = map.rm.size;
1011 len = r->len; 1003 len = r->len;
1012 if (r->offset >= map.rm.size) 1004 if (r->offset >= map.rm.size)
1013 virt_addr += r->offset - map.rm.size; 1005 virt_addr += r->offset - map.rm.size;
diff --git a/include/asm-powerpc/sparsemem.h b/include/asm-powerpc/sparsemem.h
index 48ad807a0b8a..e8b493d52b4f 100644
--- a/include/asm-powerpc/sparsemem.h
+++ b/include/asm-powerpc/sparsemem.h
@@ -10,13 +10,8 @@
10 */ 10 */
11#define SECTION_SIZE_BITS 24 11#define SECTION_SIZE_BITS 24
12 12
13#if defined(CONFIG_PS3_USE_LPAR_ADDR)
14#define MAX_PHYSADDR_BITS 47
15#define MAX_PHYSMEM_BITS 47
16#else
17#define MAX_PHYSADDR_BITS 44 13#define MAX_PHYSADDR_BITS 44
18#define MAX_PHYSMEM_BITS 44 14#define MAX_PHYSMEM_BITS 44
19#endif
20 15
21#ifdef CONFIG_MEMORY_HOTPLUG 16#ifdef CONFIG_MEMORY_HOTPLUG
22extern void create_section_mapping(unsigned long start, unsigned long end); 17extern void create_section_mapping(unsigned long start, unsigned long end);