aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/memory.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/include/asm/memory.h')
-rw-r--r--arch/arm/include/asm/memory.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
index 652fccca4952..a8997d71084e 100644
--- a/arch/arm/include/asm/memory.h
+++ b/arch/arm/include/asm/memory.h
@@ -16,9 +16,12 @@
16#include <linux/compiler.h> 16#include <linux/compiler.h>
17#include <linux/const.h> 17#include <linux/const.h>
18#include <linux/types.h> 18#include <linux/types.h>
19#include <mach/memory.h>
20#include <asm/sizes.h> 19#include <asm/sizes.h>
21 20
21#ifdef CONFIG_NEED_MACH_MEMORY_H
22#include <mach/memory.h>
23#endif
24
22/* 25/*
23 * Allow for constants defined here to be used from assembly code 26 * Allow for constants defined here to be used from assembly code
24 * by prepending the UL suffix only with actual C code compilation. 27 * by prepending the UL suffix only with actual C code compilation.
@@ -151,7 +154,6 @@
151 * so that all we need to do is modify the 8-bit constant field. 154 * so that all we need to do is modify the 8-bit constant field.
152 */ 155 */
153#define __PV_BITS_31_24 0x81000000 156#define __PV_BITS_31_24 0x81000000
154#define __PV_BITS_23_16 0x00810000
155 157
156extern unsigned long __pv_phys_offset; 158extern unsigned long __pv_phys_offset;
157#define PHYS_OFFSET __pv_phys_offset 159#define PHYS_OFFSET __pv_phys_offset
@@ -169,9 +171,6 @@ static inline unsigned long __virt_to_phys(unsigned long x)
169{ 171{
170 unsigned long t; 172 unsigned long t;
171 __pv_stub(x, t, "add", __PV_BITS_31_24); 173 __pv_stub(x, t, "add", __PV_BITS_31_24);
172#ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT
173 __pv_stub(t, t, "add", __PV_BITS_23_16);
174#endif
175 return t; 174 return t;
176} 175}
177 176
@@ -179,9 +178,6 @@ static inline unsigned long __phys_to_virt(unsigned long x)
179{ 178{
180 unsigned long t; 179 unsigned long t;
181 __pv_stub(x, t, "sub", __PV_BITS_31_24); 180 __pv_stub(x, t, "sub", __PV_BITS_31_24);
182#ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT
183 __pv_stub(t, t, "sub", __PV_BITS_23_16);
184#endif
185 return t; 181 return t;
186} 182}
187#else 183#else
@@ -191,7 +187,11 @@ static inline unsigned long __phys_to_virt(unsigned long x)
191#endif 187#endif
192 188
193#ifndef PHYS_OFFSET 189#ifndef PHYS_OFFSET
190#ifdef PLAT_PHYS_OFFSET
194#define PHYS_OFFSET PLAT_PHYS_OFFSET 191#define PHYS_OFFSET PLAT_PHYS_OFFSET
192#else
193#define PHYS_OFFSET UL(CONFIG_PHYS_OFFSET)
194#endif
195#endif 195#endif
196 196
197/* 197/*