aboutsummaryrefslogtreecommitdiffstats
path: root/arch/tile
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@tilera.com>2013-09-03 14:41:36 -0400
committerChris Metcalf <cmetcalf@tilera.com>2013-09-03 14:47:34 -0400
commitacbde1db294932623aad15dd8cc6e37b28340f26 (patch)
tree735ae530754f49ecfb006765463defdeea1167cd /arch/tile
parent051168df528fe4456d63f5f65b041c147c26fe97 (diff)
tile: parameterize VA and PA space more cleanly
The existing code relied on the hardware definition (<arch/chip.h>) to specify how much VA and PA space was available. It's convenient to allow customizing this for some configurations, so provide symbols MAX_PA_WIDTH and MAX_VA_WIDTH in <asm/page.h> that can be modified if desired. Additionally, move away from the MEM_XX_INTRPT nomenclature to define the start of various regions within the VA space. In fact the cleaner symbol is, for example, MEM_SV_START, to indicate the start of the area used for supervisor code; the actual address of the interrupt vectors is not as important, and can be changed if desired. As part of this change, convert from "intrpt1" nomenclature (which built in the old privilege-level 1 model) to a simple "intrpt". Also strip out some tilepro-specific code supporting modifying the PL the kernel could run at, since we don't actually support using different PLs in tilepro, only tilegx. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Diffstat (limited to 'arch/tile')
-rw-r--r--arch/tile/include/asm/page.h52
-rw-r--r--arch/tile/include/asm/pgtable_32.h2
-rw-r--r--arch/tile/include/asm/pgtable_64.h3
-rw-r--r--arch/tile/include/asm/processor.h2
-rw-r--r--arch/tile/kernel/head_32.S4
-rw-r--r--arch/tile/kernel/head_64.S6
-rw-r--r--arch/tile/kernel/intvec_32.S6
-rw-r--r--arch/tile/kernel/intvec_64.S8
-rw-r--r--arch/tile/kernel/setup.c8
-rw-r--r--arch/tile/kernel/traps.c2
-rw-r--r--arch/tile/kernel/vmlinux.lds.S10
-rw-r--r--arch/tile/mm/init.c8
12 files changed, 51 insertions, 60 deletions
diff --git a/arch/tile/include/asm/page.h b/arch/tile/include/asm/page.h
index b4f96c0024df..980843dd983e 100644
--- a/arch/tile/include/asm/page.h
+++ b/arch/tile/include/asm/page.h
@@ -148,8 +148,12 @@ static inline __attribute_const__ int get_order(unsigned long size)
148#define HAVE_ARCH_HUGETLB_UNMAPPED_AREA 148#define HAVE_ARCH_HUGETLB_UNMAPPED_AREA
149#endif 149#endif
150 150
151/* Allow overriding how much VA or PA the kernel will use. */
152#define MAX_PA_WIDTH CHIP_PA_WIDTH()
153#define MAX_VA_WIDTH CHIP_VA_WIDTH()
154
151/* Each memory controller has PAs distinct in their high bits. */ 155/* Each memory controller has PAs distinct in their high bits. */
152#define NR_PA_HIGHBIT_SHIFT (CHIP_PA_WIDTH() - CHIP_LOG_NUM_MSHIMS()) 156#define NR_PA_HIGHBIT_SHIFT (MAX_PA_WIDTH - CHIP_LOG_NUM_MSHIMS())
153#define NR_PA_HIGHBIT_VALUES (1 << CHIP_LOG_NUM_MSHIMS()) 157#define NR_PA_HIGHBIT_VALUES (1 << CHIP_LOG_NUM_MSHIMS())
154#define __pa_to_highbits(pa) ((phys_addr_t)(pa) >> NR_PA_HIGHBIT_SHIFT) 158#define __pa_to_highbits(pa) ((phys_addr_t)(pa) >> NR_PA_HIGHBIT_SHIFT)
155#define __pfn_to_highbits(pfn) ((pfn) >> (NR_PA_HIGHBIT_SHIFT - PAGE_SHIFT)) 159#define __pfn_to_highbits(pfn) ((pfn) >> (NR_PA_HIGHBIT_SHIFT - PAGE_SHIFT))
@@ -160,7 +164,7 @@ static inline __attribute_const__ int get_order(unsigned long size)
160 * We reserve the lower half of memory for user-space programs, and the 164 * We reserve the lower half of memory for user-space programs, and the
161 * upper half for system code. We re-map all of physical memory in the 165 * upper half for system code. We re-map all of physical memory in the
162 * upper half, which takes a quarter of our VA space. Then we have 166 * upper half, which takes a quarter of our VA space. Then we have
163 * the vmalloc regions. The supervisor code lives at 0xfffffff700000000, 167 * the vmalloc regions. The supervisor code lives at the highest address,
164 * with the hypervisor above that. 168 * with the hypervisor above that.
165 * 169 *
166 * Loadable kernel modules are placed immediately after the static 170 * Loadable kernel modules are placed immediately after the static
@@ -172,26 +176,19 @@ static inline __attribute_const__ int get_order(unsigned long size)
172 * Similarly, for now we don't play any struct page mapping games. 176 * Similarly, for now we don't play any struct page mapping games.
173 */ 177 */
174 178
175#if CHIP_PA_WIDTH() + 2 > CHIP_VA_WIDTH() 179#if MAX_PA_WIDTH + 2 > MAX_VA_WIDTH
176# error Too much PA to map with the VA available! 180# error Too much PA to map with the VA available!
177#endif 181#endif
178#define HALF_VA_SPACE (_AC(1, UL) << (CHIP_VA_WIDTH() - 1))
179 182
180#define MEM_LOW_END (HALF_VA_SPACE - 1) /* low half */ 183#define PAGE_OFFSET (-(_AC(1, UL) << (MAX_VA_WIDTH - 1)))
181#define MEM_HIGH_START (-HALF_VA_SPACE) /* high half */ 184#define KERNEL_HIGH_VADDR _AC(0xfffffff800000000, UL) /* high 32GB */
182#define PAGE_OFFSET MEM_HIGH_START 185#define FIXADDR_BASE (KERNEL_HIGH_VADDR - 0x400000000) /* 4 GB */
183#define FIXADDR_BASE _AC(0xfffffff400000000, UL) /* 4 GB */ 186#define FIXADDR_TOP (KERNEL_HIGH_VADDR - 0x300000000) /* 4 GB */
184#define FIXADDR_TOP _AC(0xfffffff500000000, UL) /* 4 GB */
185#define _VMALLOC_START FIXADDR_TOP 187#define _VMALLOC_START FIXADDR_TOP
186#define HUGE_VMAP_BASE _AC(0xfffffff600000000, UL) /* 4 GB */ 188#define HUGE_VMAP_BASE (KERNEL_HIGH_VADDR - 0x200000000) /* 4 GB */
187#define MEM_SV_START _AC(0xfffffff700000000, UL) /* 256 MB */ 189#define MEM_SV_START (KERNEL_HIGH_VADDR - 0x100000000) /* 256 MB */
188#define MEM_SV_INTRPT MEM_SV_START 190#define MEM_MODULE_START (MEM_SV_START + (256*1024*1024)) /* 256 MB */
189#define MEM_MODULE_START _AC(0xfffffff710000000, UL) /* 256 MB */
190#define MEM_MODULE_END (MEM_MODULE_START + (256*1024*1024)) 191#define MEM_MODULE_END (MEM_MODULE_START + (256*1024*1024))
191#define MEM_HV_START _AC(0xfffffff800000000, UL) /* 32 GB */
192
193/* Highest DTLB address we will use */
194#define KERNEL_HIGH_VADDR MEM_SV_START
195 192
196#else /* !__tilegx__ */ 193#else /* !__tilegx__ */
197 194
@@ -213,25 +210,18 @@ static inline __attribute_const__ int get_order(unsigned long size)
213 * values, and after that, we show "typical" values, since the actual 210 * values, and after that, we show "typical" values, since the actual
214 * addresses depend on kernel #defines. 211 * addresses depend on kernel #defines.
215 * 212 *
216 * MEM_HV_INTRPT 0xfe000000 213 * MEM_HV_START 0xfe000000
217 * MEM_SV_INTRPT (kernel code) 0xfd000000 214 * MEM_SV_START (kernel code) 0xfd000000
218 * MEM_USER_INTRPT (user vector) 0xfc000000 215 * MEM_USER_INTRPT (user vector) 0xfc000000
219 * FIX_KMAP_xxx 0xf8000000 (via NR_CPUS * KM_TYPE_NR) 216 * FIX_KMAP_xxx 0xfa000000 (via NR_CPUS * KM_TYPE_NR)
220 * PKMAP_BASE 0xf7000000 (via LAST_PKMAP) 217 * PKMAP_BASE 0xf9000000 (via LAST_PKMAP)
221 * HUGE_VMAP 0xf3000000 (via CONFIG_NR_HUGE_VMAPS) 218 * VMALLOC_START 0xf7000000 (via VMALLOC_RESERVE)
222 * VMALLOC_START 0xf0000000 (via __VMALLOC_RESERVE)
223 * mapped LOWMEM 0xc0000000 219 * mapped LOWMEM 0xc0000000
224 */ 220 */
225 221
226#define MEM_USER_INTRPT _AC(0xfc000000, UL) 222#define MEM_USER_INTRPT _AC(0xfc000000, UL)
227#if CONFIG_KERNEL_PL == 1 223#define MEM_SV_START _AC(0xfd000000, UL)
228#define MEM_SV_INTRPT _AC(0xfd000000, UL) 224#define MEM_HV_START _AC(0xfe000000, UL)
229#define MEM_HV_INTRPT _AC(0xfe000000, UL)
230#else
231#define MEM_GUEST_INTRPT _AC(0xfd000000, UL)
232#define MEM_SV_INTRPT _AC(0xfe000000, UL)
233#define MEM_HV_INTRPT _AC(0xff000000, UL)
234#endif
235 225
236#define INTRPT_SIZE 0x4000 226#define INTRPT_SIZE 0x4000
237 227
diff --git a/arch/tile/include/asm/pgtable_32.h b/arch/tile/include/asm/pgtable_32.h
index e5bdc0ea85c6..63142ab3b3dd 100644
--- a/arch/tile/include/asm/pgtable_32.h
+++ b/arch/tile/include/asm/pgtable_32.h
@@ -89,7 +89,7 @@ static inline int pud_huge_page(pud_t pud) { return 0; }
89/* We don't define any pgds for these addresses. */ 89/* We don't define any pgds for these addresses. */
90static inline int pgd_addr_invalid(unsigned long addr) 90static inline int pgd_addr_invalid(unsigned long addr)
91{ 91{
92 return addr >= MEM_HV_INTRPT; 92 return addr >= MEM_HV_START;
93} 93}
94 94
95/* 95/*
diff --git a/arch/tile/include/asm/pgtable_64.h b/arch/tile/include/asm/pgtable_64.h
index 7cb8d355f91b..3421177f7370 100644
--- a/arch/tile/include/asm/pgtable_64.h
+++ b/arch/tile/include/asm/pgtable_64.h
@@ -140,8 +140,7 @@ static inline unsigned long pgd_addr_normalize(unsigned long addr)
140/* We don't define any pgds for these addresses. */ 140/* We don't define any pgds for these addresses. */
141static inline int pgd_addr_invalid(unsigned long addr) 141static inline int pgd_addr_invalid(unsigned long addr)
142{ 142{
143 return addr >= MEM_HV_START || 143 return addr >= KERNEL_HIGH_VADDR || addr != pgd_addr_normalize(addr);
144 (addr > MEM_LOW_END && addr < MEM_HIGH_START);
145} 144}
146 145
147/* 146/*
diff --git a/arch/tile/include/asm/processor.h b/arch/tile/include/asm/processor.h
index c72fcba7016a..5aa54319d2ef 100644
--- a/arch/tile/include/asm/processor.h
+++ b/arch/tile/include/asm/processor.h
@@ -168,7 +168,7 @@ struct thread_struct {
168#ifndef __ASSEMBLY__ 168#ifndef __ASSEMBLY__
169 169
170#ifdef __tilegx__ 170#ifdef __tilegx__
171#define TASK_SIZE_MAX (MEM_LOW_END + 1) 171#define TASK_SIZE_MAX (_AC(1, UL) << (MAX_VA_WIDTH - 1))
172#else 172#else
173#define TASK_SIZE_MAX PAGE_OFFSET 173#define TASK_SIZE_MAX PAGE_OFFSET
174#endif 174#endif
diff --git a/arch/tile/kernel/head_32.S b/arch/tile/kernel/head_32.S
index f3f17b0283ff..8d5b40ff2922 100644
--- a/arch/tile/kernel/head_32.S
+++ b/arch/tile/kernel/head_32.S
@@ -162,8 +162,8 @@ ENTRY(swapper_pg_dir)
162 .set addr, addr + PGDIR_SIZE 162 .set addr, addr + PGDIR_SIZE
163 .endr 163 .endr
164 164
165 /* The true text VAs are mapped as VA = PA + MEM_SV_INTRPT */ 165 /* The true text VAs are mapped as VA = PA + MEM_SV_START */
166 PTE MEM_SV_INTRPT, 0, (1 << (HV_PTE_INDEX_READABLE - 32)) | \ 166 PTE MEM_SV_START, 0, (1 << (HV_PTE_INDEX_READABLE - 32)) | \
167 (1 << (HV_PTE_INDEX_EXECUTABLE - 32)) 167 (1 << (HV_PTE_INDEX_EXECUTABLE - 32))
168 .org swapper_pg_dir + PGDIR_SIZE 168 .org swapper_pg_dir + PGDIR_SIZE
169 END(swapper_pg_dir) 169 END(swapper_pg_dir)
diff --git a/arch/tile/kernel/head_64.S b/arch/tile/kernel/head_64.S
index 652b81426158..bd0e12f283f3 100644
--- a/arch/tile/kernel/head_64.S
+++ b/arch/tile/kernel/head_64.S
@@ -135,9 +135,9 @@ ENTRY(_start)
1351: 1351:
136 136
137 /* Install the interrupt base. */ 137 /* Install the interrupt base. */
138 moveli r0, hw2_last(MEM_SV_START) 138 moveli r0, hw2_last(intrpt_start)
139 shl16insli r0, r0, hw1(MEM_SV_START) 139 shl16insli r0, r0, hw1(intrpt_start)
140 shl16insli r0, r0, hw0(MEM_SV_START) 140 shl16insli r0, r0, hw0(intrpt_start)
141 mtspr SPR_INTERRUPT_VECTOR_BASE_K, r0 141 mtspr SPR_INTERRUPT_VECTOR_BASE_K, r0
142 142
143 /* Get our processor number and save it away in SAVE_K_0. */ 143 /* Get our processor number and save it away in SAVE_K_0. */
diff --git a/arch/tile/kernel/intvec_32.S b/arch/tile/kernel/intvec_32.S
index f3d26f48e659..f084f1c7afde 100644
--- a/arch/tile/kernel/intvec_32.S
+++ b/arch/tile/kernel/intvec_32.S
@@ -353,7 +353,7 @@ intvec_\vecname:
353#ifdef __COLLECT_LINKER_FEEDBACK__ 353#ifdef __COLLECT_LINKER_FEEDBACK__
354 .pushsection .text.intvec_feedback,"ax" 354 .pushsection .text.intvec_feedback,"ax"
355 .org (\vecnum << 5) 355 .org (\vecnum << 5)
356 FEEDBACK_ENTER_EXPLICIT(intvec_\vecname, .intrpt1, 1 << 8) 356 FEEDBACK_ENTER_EXPLICIT(intvec_\vecname, .intrpt, 1 << 8)
357 jrp lr 357 jrp lr
358 .popsection 358 .popsection
359#endif 359#endif
@@ -1890,8 +1890,8 @@ int_unalign:
1890 push_extra_callee_saves r0 1890 push_extra_callee_saves r0
1891 j do_trap 1891 j do_trap
1892 1892
1893/* Include .intrpt1 array of interrupt vectors */ 1893/* Include .intrpt array of interrupt vectors */
1894 .section ".intrpt1", "ax" 1894 .section ".intrpt", "ax"
1895 1895
1896#define op_handle_perf_interrupt bad_intr 1896#define op_handle_perf_interrupt bad_intr
1897#define op_handle_aux_perf_interrupt bad_intr 1897#define op_handle_aux_perf_interrupt bad_intr
diff --git a/arch/tile/kernel/intvec_64.S b/arch/tile/kernel/intvec_64.S
index f020f01960cf..c3a2335fa6a8 100644
--- a/arch/tile/kernel/intvec_64.S
+++ b/arch/tile/kernel/intvec_64.S
@@ -535,7 +535,7 @@ intvec_\vecname:
535#ifdef __COLLECT_LINKER_FEEDBACK__ 535#ifdef __COLLECT_LINKER_FEEDBACK__
536 .pushsection .text.intvec_feedback,"ax" 536 .pushsection .text.intvec_feedback,"ax"
537 .org (\vecnum << 5) 537 .org (\vecnum << 5)
538 FEEDBACK_ENTER_EXPLICIT(intvec_\vecname, .intrpt1, 1 << 8) 538 FEEDBACK_ENTER_EXPLICIT(intvec_\vecname, .intrpt, 1 << 8)
539 jrp lr 539 jrp lr
540 .popsection 540 .popsection
541#endif 541#endif
@@ -1485,8 +1485,10 @@ STD_ENTRY(fill_ra_stack)
1485 __int_hand \vecnum, \vecname, \c_routine, \processing 1485 __int_hand \vecnum, \vecname, \c_routine, \processing
1486 .endm 1486 .endm
1487 1487
1488/* Include .intrpt1 array of interrupt vectors */ 1488/* Include .intrpt array of interrupt vectors */
1489 .section ".intrpt1", "ax" 1489 .section ".intrpt", "ax"
1490 .global intrpt_start
1491intrpt_start:
1490 1492
1491#define op_handle_perf_interrupt bad_intr 1493#define op_handle_perf_interrupt bad_intr
1492#define op_handle_aux_perf_interrupt bad_intr 1494#define op_handle_aux_perf_interrupt bad_intr
diff --git a/arch/tile/kernel/setup.c b/arch/tile/kernel/setup.c
index 774e819f6a5f..10217844052a 100644
--- a/arch/tile/kernel/setup.c
+++ b/arch/tile/kernel/setup.c
@@ -268,7 +268,7 @@ early_param("vmalloc", parse_vmalloc);
268/* 268/*
269 * Determine for each controller where its lowmem is mapped and how much of 269 * Determine for each controller where its lowmem is mapped and how much of
270 * it is mapped there. On controller zero, the first few megabytes are 270 * it is mapped there. On controller zero, the first few megabytes are
271 * already mapped in as code at MEM_SV_INTRPT, so in principle we could 271 * already mapped in as code at MEM_SV_START, so in principle we could
272 * start our data mappings higher up, but for now we don't bother, to avoid 272 * start our data mappings higher up, but for now we don't bother, to avoid
273 * additional confusion. 273 * additional confusion.
274 * 274 *
@@ -1242,7 +1242,7 @@ static void __init validate_va(void)
1242#ifndef __tilegx__ /* FIXME: GX: probably some validation relevant here */ 1242#ifndef __tilegx__ /* FIXME: GX: probably some validation relevant here */
1243 /* 1243 /*
1244 * Similarly, make sure we're only using allowed VAs. 1244 * Similarly, make sure we're only using allowed VAs.
1245 * We assume we can contiguously use MEM_USER_INTRPT .. MEM_HV_INTRPT, 1245 * We assume we can contiguously use MEM_USER_INTRPT .. MEM_HV_START,
1246 * and 0 .. KERNEL_HIGH_VADDR. 1246 * and 0 .. KERNEL_HIGH_VADDR.
1247 * In addition, make sure we CAN'T use the end of memory, since 1247 * In addition, make sure we CAN'T use the end of memory, since
1248 * we use the last chunk of each pgd for the pgd_list. 1248 * we use the last chunk of each pgd for the pgd_list.
@@ -1257,7 +1257,7 @@ static void __init validate_va(void)
1257 if (range.size == 0) 1257 if (range.size == 0)
1258 break; 1258 break;
1259 if (range.start <= MEM_USER_INTRPT && 1259 if (range.start <= MEM_USER_INTRPT &&
1260 range.start + range.size >= MEM_HV_INTRPT) 1260 range.start + range.size >= MEM_HV_START)
1261 user_kernel_ok = 1; 1261 user_kernel_ok = 1;
1262 if (range.start == 0) 1262 if (range.start == 0)
1263 max_va = range.size; 1263 max_va = range.size;
@@ -1693,7 +1693,7 @@ insert_ram_resource(u64 start_pfn, u64 end_pfn, bool reserved)
1693static int __init request_standard_resources(void) 1693static int __init request_standard_resources(void)
1694{ 1694{
1695 int i; 1695 int i;
1696 enum { CODE_DELTA = MEM_SV_INTRPT - PAGE_OFFSET }; 1696 enum { CODE_DELTA = MEM_SV_START - PAGE_OFFSET };
1697 1697
1698#if defined(CONFIG_PCI) && !defined(__tilegx__) 1698#if defined(CONFIG_PCI) && !defined(__tilegx__)
1699 insert_non_bus_resource(); 1699 insert_non_bus_resource();
diff --git a/arch/tile/kernel/traps.c b/arch/tile/kernel/traps.c
index cfff6f958d58..628661f6a929 100644
--- a/arch/tile/kernel/traps.c
+++ b/arch/tile/kernel/traps.c
@@ -30,7 +30,7 @@
30 30
31void __init trap_init(void) 31void __init trap_init(void)
32{ 32{
33 /* Nothing needed here since we link code at .intrpt1 */ 33 /* Nothing needed here since we link code at .intrpt */
34} 34}
35 35
36int unaligned_fixup = 1; 36int unaligned_fixup = 1;
diff --git a/arch/tile/kernel/vmlinux.lds.S b/arch/tile/kernel/vmlinux.lds.S
index c7ae53df429e..8b2016307eb0 100644
--- a/arch/tile/kernel/vmlinux.lds.S
+++ b/arch/tile/kernel/vmlinux.lds.S
@@ -5,7 +5,7 @@
5#include <hv/hypervisor.h> 5#include <hv/hypervisor.h>
6 6
7/* Text loads starting from the supervisor interrupt vector address. */ 7/* Text loads starting from the supervisor interrupt vector address. */
8#define TEXT_OFFSET MEM_SV_INTRPT 8#define TEXT_OFFSET MEM_SV_START
9 9
10OUTPUT_ARCH(tile) 10OUTPUT_ARCH(tile)
11ENTRY(_start) 11ENTRY(_start)
@@ -13,7 +13,7 @@ jiffies = jiffies_64;
13 13
14PHDRS 14PHDRS
15{ 15{
16 intrpt1 PT_LOAD ; 16 intrpt PT_LOAD ;
17 text PT_LOAD ; 17 text PT_LOAD ;
18 data PT_LOAD ; 18 data PT_LOAD ;
19} 19}
@@ -24,11 +24,11 @@ SECTIONS
24 #define LOAD_OFFSET TEXT_OFFSET 24 #define LOAD_OFFSET TEXT_OFFSET
25 25
26 /* Interrupt vectors */ 26 /* Interrupt vectors */
27 .intrpt1 (LOAD_OFFSET) : AT ( 0 ) /* put at the start of physical memory */ 27 .intrpt (LOAD_OFFSET) : AT ( 0 ) /* put at the start of physical memory */
28 { 28 {
29 _text = .; 29 _text = .;
30 *(.intrpt1) 30 *(.intrpt)
31 } :intrpt1 =0 31 } :intrpt =0
32 32
33 /* Hypervisor call vectors */ 33 /* Hypervisor call vectors */
34 . = ALIGN(0x10000); 34 . = ALIGN(0x10000);
diff --git a/arch/tile/mm/init.c b/arch/tile/mm/init.c
index 3bfa1275e333..c6d21601ec4d 100644
--- a/arch/tile/mm/init.c
+++ b/arch/tile/mm/init.c
@@ -234,7 +234,7 @@ static pgprot_t __init init_pgprot(ulong address)
234{ 234{
235 int cpu; 235 int cpu;
236 unsigned long page; 236 unsigned long page;
237 enum { CODE_DELTA = MEM_SV_INTRPT - PAGE_OFFSET }; 237 enum { CODE_DELTA = MEM_SV_START - PAGE_OFFSET };
238 238
239#if CHIP_HAS_CBOX_HOME_MAP() 239#if CHIP_HAS_CBOX_HOME_MAP()
240 /* For kdata=huge, everything is just hash-for-home. */ 240 /* For kdata=huge, everything is just hash-for-home. */
@@ -538,7 +538,7 @@ static void __init kernel_physical_mapping_init(pgd_t *pgd_base)
538 } 538 }
539 } 539 }
540 540
541 address = MEM_SV_INTRPT; 541 address = MEM_SV_START;
542 pmd = get_pmd(pgtables, address); 542 pmd = get_pmd(pgtables, address);
543 pfn = 0; /* code starts at PA 0 */ 543 pfn = 0; /* code starts at PA 0 */
544 if (ktext_small) { 544 if (ktext_small) {
@@ -1021,7 +1021,7 @@ static void free_init_pages(char *what, unsigned long begin, unsigned long end)
1021 1021
1022void free_initmem(void) 1022void free_initmem(void)
1023{ 1023{
1024 const unsigned long text_delta = MEM_SV_INTRPT - PAGE_OFFSET; 1024 const unsigned long text_delta = MEM_SV_START - PAGE_OFFSET;
1025 1025
1026 /* 1026 /*
1027 * Evict the dirty initdata on the boot cpu, evict the w1data 1027 * Evict the dirty initdata on the boot cpu, evict the w1data
@@ -1040,7 +1040,7 @@ void free_initmem(void)
1040 1040
1041 /* 1041 /*
1042 * Free the pages mapped from 0xc0000000 that correspond to code 1042 * Free the pages mapped from 0xc0000000 that correspond to code
1043 * pages from MEM_SV_INTRPT that we won't use again after init. 1043 * pages from MEM_SV_START that we won't use again after init.
1044 */ 1044 */
1045 free_init_pages("unused kernel text", 1045 free_init_pages("unused kernel text",
1046 (unsigned long)_sinittext - text_delta, 1046 (unsigned long)_sinittext - text_delta,