aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonid Yegoshin <Leonid.Yegoshin@imgtec.com>2013-06-20 10:36:30 -0400
committerRalf Baechle <ralf@linux-mips.org>2013-07-01 09:10:58 -0400
commited3ce16c3d2ba7cac321d29ec0a7d21408ea8437 (patch)
tree98f165e9d1f6763b3320c1e66f33ea255bba92fe
parent4287f7915f33c1eb770e22589936cd9cd8a60b45 (diff)
Revert "MIPS: make CAC_ADDR and UNCAC_ADDR account for PHYS_OFFSET"
This reverts commit 3f4579252aa166641861a64f1c2883365ca126c2. It is invalid because the macros CAC_ADDR and UNCAC_ADDR have a kernel virtual address as an argument and also returns a kernel virtual address. Using and physical address PHYS_OFFSET is blatantly wrong for a macro common to multiple platforms. Signed-off-by: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> Acked-by: Steven J. Hill <Steven.Hill@imgtec.com> Cc: linux-mips@linux-mips.org Cc: Florian Fainelli <florian@openwrt.org> Patchwork: https://patchwork.linux-mips.org/patch/5528/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--arch/mips/include/asm/mach-ar7/spaces.h7
-rw-r--r--arch/mips/include/asm/mach-ip28/spaces.h9
-rw-r--r--arch/mips/include/asm/page.h6
3 files changed, 13 insertions, 9 deletions
diff --git a/arch/mips/include/asm/mach-ar7/spaces.h b/arch/mips/include/asm/mach-ar7/spaces.h
index ac28f273449c..660ab64c0fc9 100644
--- a/arch/mips/include/asm/mach-ar7/spaces.h
+++ b/arch/mips/include/asm/mach-ar7/spaces.h
@@ -14,8 +14,11 @@
14 * This handles the memory map. 14 * This handles the memory map.
15 * We handle pages at KSEG0 for kernels with 32 bit address space. 15 * We handle pages at KSEG0 for kernels with 32 bit address space.
16 */ 16 */
17#define PAGE_OFFSET 0x94000000UL 17#define PAGE_OFFSET _AC(0x94000000, UL)
18#define PHYS_OFFSET 0x14000000UL 18#define PHYS_OFFSET _AC(0x14000000, UL)
19
20#define UNCAC_BASE _AC(0xb4000000, UL) /* 0xa0000000 + PHYS_OFFSET */
21#define IO_BASE UNCAC_BASE
19 22
20#include <asm/mach-generic/spaces.h> 23#include <asm/mach-generic/spaces.h>
21 24
diff --git a/arch/mips/include/asm/mach-ip28/spaces.h b/arch/mips/include/asm/mach-ip28/spaces.h
index 5edf05d9dad8..5d6a76434d00 100644
--- a/arch/mips/include/asm/mach-ip28/spaces.h
+++ b/arch/mips/include/asm/mach-ip28/spaces.h
@@ -11,11 +11,14 @@
11#ifndef _ASM_MACH_IP28_SPACES_H 11#ifndef _ASM_MACH_IP28_SPACES_H
12#define _ASM_MACH_IP28_SPACES_H 12#define _ASM_MACH_IP28_SPACES_H
13 13
14#define CAC_BASE 0xa800000000000000 14#define CAC_BASE _AC(0xa800000000000000, UL)
15 15
16#define HIGHMEM_START (~0UL) 16#define HIGHMEM_START (~0UL)
17 17
18#define PHYS_OFFSET _AC(0x20000000, UL) 18#define PHYS_OFFSET _AC(0x20000000, UL)
19
20#define UNCAC_BASE _AC(0xc0000000, UL) /* 0xa0000000 + PHYS_OFFSET */
21#define IO_BASE UNCAC_BASE
19 22
20#include <asm/mach-generic/spaces.h> 23#include <asm/mach-generic/spaces.h>
21 24
diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h
index f59552fae917..f6be4741f7e8 100644
--- a/arch/mips/include/asm/page.h
+++ b/arch/mips/include/asm/page.h
@@ -205,10 +205,8 @@ extern int __virt_addr_valid(const volatile void *kaddr);
205#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ 205#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
206 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) 206 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
207 207
208#define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + UNCAC_BASE + \ 208#define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + UNCAC_BASE)
209 PHYS_OFFSET) 209#define CAC_ADDR(addr) ((addr) - UNCAC_BASE + PAGE_OFFSET)
210#define CAC_ADDR(addr) ((addr) - UNCAC_BASE + PAGE_OFFSET - \
211 PHYS_OFFSET)
212 210
213#include <asm-generic/memory_model.h> 211#include <asm-generic/memory_model.h>
214#include <asm-generic/getorder.h> 212#include <asm-generic/getorder.h>