diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2016-09-30 12:38:28 +0200 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2016-09-30 12:38:28 +0200 |
| commit | d7e25c66c9bf882450060fd9464e784bd229d3ae (patch) | |
| tree | 0fb9525f91b11226a5a4b861cefd9fc5679f5c9b /arch/mips/mm/init.c | |
| parent | 907241dccb4ce5d9413cf3c030b32b0cfc184914 (diff) | |
| parent | e4aad64597d7a2455a541f904365b48d607916db (diff) | |
| download | linux-d7e25c66c9bf882450060fd9464e784bd229d3ae.tar.gz linux-d7e25c66c9bf882450060fd9464e784bd229d3ae.tar.bz2 linux-d7e25c66c9bf882450060fd9464e784bd229d3ae.zip | |
Merge branch 'x86/urgent' into x86/asm
Get the cr4 fixes so we can apply the final cleanup
Diffstat (limited to 'arch/mips/mm/init.c')
| -rw-r--r-- | arch/mips/mm/init.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index a5509e7dcad2..2c3749d98f04 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c @@ -261,7 +261,6 @@ unsigned __weak platform_maar_init(unsigned num_pairs) { struct maar_config cfg[BOOT_MEM_MAP_MAX]; unsigned i, num_configured, num_cfg = 0; - phys_addr_t skip; for (i = 0; i < boot_mem_map.nr_map; i++) { switch (boot_mem_map.map[i].type) { @@ -272,14 +271,14 @@ unsigned __weak platform_maar_init(unsigned num_pairs) continue; } - skip = 0x10000 - (boot_mem_map.map[i].addr & 0xffff); - + /* Round lower up */ cfg[num_cfg].lower = boot_mem_map.map[i].addr; - cfg[num_cfg].lower += skip; + cfg[num_cfg].lower = (cfg[num_cfg].lower + 0xffff) & ~0xffff; - cfg[num_cfg].upper = cfg[num_cfg].lower; - cfg[num_cfg].upper += boot_mem_map.map[i].size - 1; - cfg[num_cfg].upper -= skip; + /* Round upper down */ + cfg[num_cfg].upper = boot_mem_map.map[i].addr + + boot_mem_map.map[i].size; + cfg[num_cfg].upper = (cfg[num_cfg].upper & ~0xffff) - 1; cfg[num_cfg].attrs = MIPS_MAAR_S; num_cfg++; |
