aboutsummaryrefslogtreecommitdiffstats
path: root/arch/tile/mm
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/mm
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/mm')
-rw-r--r--arch/tile/mm/init.c8
1 files changed, 4 insertions, 4 deletions
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,