* [PATCHv2 1/2] ARM: Set proper TEXT_OFFSET for newer MSMs
@ 2011-07-25 17:19 ` Stephen Boyd
0 siblings, 0 replies; 17+ messages in thread
From: Stephen Boyd @ 2011-07-25 17:19 UTC (permalink / raw)
To: Russell King, David Brown
Cc: linux-kernel, linux-arm-msm, linux-arm-kernel, Nicolas Pitre
MSMs post 8x50 have 2Mb at the beginning of RAM reserved for
shared memory. Since the kernel hasn't typically been told this
RAM exists, PHYS_OFFSET has been set to 0xN0200000 and the memory
atags passed to the kernel have matched. This doesn't play nicely
with things such as AUTO_ZRELADDR, which doesn't work at all, and
dynamic phys to virt, which requires an MSM specific workaround.
Work around these issues by telling the kernel RAM starts at
0xN0000000 (it actually does) and fixup the atags from the
bootloader (if necessary) to say the same. In addition, make sure
to set TEXT_OFFSET at least 2Mb beyond the start of RAM so that
the kernel doesn't end up being decompressed into shared memory.
After doing this, AUTO_ZRELADDR should work on MSM with no
problems and ARM_PATCH_PHYS_VIRT_16BIT should no longer be
necessary.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
---
Changes since v1:
- Add 2MB to the fixed-up atag's size
arch/arm/Makefile | 3 +++
arch/arm/mach-msm/board-msm7x30.c | 22 ++++++++++++++++++++++
arch/arm/mach-msm/board-msm8960.c | 22 ++++++++++++++++++++++
arch/arm/mach-msm/board-msm8x60.c | 25 +++++++++++++++++++++++++
arch/arm/mach-msm/include/mach/memory.h | 6 +++---
5 files changed, 75 insertions(+), 3 deletions(-)
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 3a4a04b..8c35e19 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -128,6 +128,9 @@ textofs-$(CONFIG_PM_H1940) := 0x00108000
ifeq ($(CONFIG_ARCH_SA1100),y)
textofs-$(CONFIG_SA1111) := 0x00208000
endif
+textofs-$(CONFIG_ARCH_MSM7X30) := 0x00208000
+textofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000
+textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000
# Machine directory name. This list is sorted alphanumerically
# by CONFIG_* macro name.
diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c
index 8d21769..240d562 100644
--- a/arch/arm/mach-msm/board-msm7x30.c
+++ b/arch/arm/mach-msm/board-msm7x30.c
@@ -24,6 +24,7 @@
#include <linux/smsc911x.h>
#include <linux/usb/msm_hsusb.h>
#include <linux/clkdev.h>
+#include <linux/memblock.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -42,6 +43,21 @@
extern struct sys_timer msm_timer;
+static void __init msm7x30_fixup(struct machine_desc *desc, struct tag *tag,
+ char **cmdline, struct meminfo *mi)
+{
+ for (; tag->hdr.size; tag = tag_next(tag))
+ if (tag->hdr.tag == ATAG_MEM && tag->u.mem.start == 0x200000) {
+ tag->u.mem.start = 0;
+ tag->u.mem.size += SZ_2M;
+ }
+}
+
+static void __init msm7x30_reserve(void)
+{
+ memblock_remove(0x0, SZ_2M);
+}
+
static int hsusb_phy_init_seq[] = {
0x30, 0x32, /* Enable and set Pre-Emphasis Depth to 20% */
0x02, 0x36, /* Disable CDR Auto Reset feature */
@@ -108,6 +124,8 @@ static void __init msm7x30_map_io(void)
MACHINE_START(MSM7X30_SURF, "QCT MSM7X30 SURF")
.boot_params = PLAT_PHYS_OFFSET + 0x100,
+ .fixup = msm7x30_fixup,
+ .reserve = msm7x30_reserve,
.map_io = msm7x30_map_io,
.init_irq = msm7x30_init_irq,
.init_machine = msm7x30_init,
@@ -116,6 +134,8 @@ MACHINE_END
MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA")
.boot_params = PLAT_PHYS_OFFSET + 0x100,
+ .fixup = msm7x30_fixup,
+ .reserve = msm7x30_reserve,
.map_io = msm7x30_map_io,
.init_irq = msm7x30_init_irq,
.init_machine = msm7x30_init,
@@ -124,6 +144,8 @@ MACHINE_END
MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID")
.boot_params = PLAT_PHYS_OFFSET + 0x100,
+ .fixup = msm7x30_fixup,
+ .reserve = msm7x30_reserve,
.map_io = msm7x30_map_io,
.init_irq = msm7x30_init_irq,
.init_machine = msm7x30_init,
diff --git a/arch/arm/mach-msm/board-msm8960.c b/arch/arm/mach-msm/board-msm8960.c
index 8294692..dab58ef 100644
--- a/arch/arm/mach-msm/board-msm8960.c
+++ b/arch/arm/mach-msm/board-msm8960.c
@@ -20,16 +20,34 @@
#include <linux/io.h>
#include <linux/irq.h>
#include <linux/clkdev.h>
+#include <linux/memblock.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/hardware/gic.h>
+#include <asm/setup.h>
#include <mach/board.h>
#include <mach/msm_iomap.h>
#include "devices.h"
+static void __init msm8960_fixup(struct machine_desc *desc, struct tag *tag,
+ char **cmdline, struct meminfo *mi)
+{
+ for (; tag->hdr.size; tag = tag_next(tag))
+ if (tag->hdr.tag == ATAG_MEM &&
+ tag->u.mem.start == 0x40200000) {
+ tag->u.mem.start = 0x40000000;
+ tag->u.mem.size += SZ_2M;
+ }
+}
+
+static void __init msm8960_reserve(void)
+{
+ memblock_remove(0x40000000, SZ_2M);
+}
+
static void __init msm8960_map_io(void)
{
msm_map_msm8960_io();
@@ -92,6 +110,8 @@ static void __init msm8960_rumi3_init(void)
}
MACHINE_START(MSM8960_SIM, "QCT MSM8960 SIMULATOR")
+ .fixup = msm8960_fixup,
+ .reserve = msm8960_reserve,
.map_io = msm8960_map_io,
.init_early = msm8960_init_early,
.init_irq = msm8960_init_irq,
@@ -100,6 +120,8 @@ MACHINE_START(MSM8960_SIM, "QCT MSM8960 SIMULATOR")
MACHINE_END
MACHINE_START(MSM8960_RUMI3, "QCT MSM8960 RUMI3")
+ .fixup = msm8960_fixup,
+ .reserve = msm8960_reserve,
.map_io = msm8960_map_io,
.init_early = msm8960_init_early,
.init_irq = msm8960_init_irq,
diff --git a/arch/arm/mach-msm/board-msm8x60.c b/arch/arm/mach-msm/board-msm8x60.c
index 98c47ce..5b47ec8 100644
--- a/arch/arm/mach-msm/board-msm8x60.c
+++ b/arch/arm/mach-msm/board-msm8x60.c
@@ -20,15 +20,32 @@
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/irq.h>
+#include <linux/memblock.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/hardware/gic.h>
+#include <asm/setup.h>
#include <mach/board.h>
#include <mach/msm_iomap.h>
#include "devices.h"
+static void __init msm8x60_fixup(struct machine_desc *desc, struct tag *tag,
+ char **cmdline, struct meminfo *mi)
+{
+ for (; tag->hdr.size; tag = tag_next(tag))
+ if (tag->hdr.tag == ATAG_MEM &&
+ tag->u.mem.start == 0x40200000) {
+ tag->u.mem.start = 0x40000000;
+ tag->u.mem.size += SZ_2M;
+ }
+}
+
+static void __init msm8x60_reserve(void)
+{
+ memblock_remove(0x40000000, SZ_2M);
+}
static void __init msm8x60_map_io(void)
{
@@ -72,6 +89,8 @@ static void __init msm8x60_init(void)
}
MACHINE_START(MSM8X60_RUMI3, "QCT MSM8X60 RUMI3")
+ .fixup = msm8x60_fixup,
+ .reserve = msm8x60_reserve,
.map_io = msm8x60_map_io,
.init_irq = msm8x60_init_irq,
.init_machine = msm8x60_init,
@@ -79,6 +98,8 @@ MACHINE_START(MSM8X60_RUMI3, "QCT MSM8X60 RUMI3")
MACHINE_END
MACHINE_START(MSM8X60_SURF, "QCT MSM8X60 SURF")
+ .fixup = msm8x60_fixup,
+ .reserve = msm8x60_reserve,
.map_io = msm8x60_map_io,
.init_irq = msm8x60_init_irq,
.init_machine = msm8x60_init,
@@ -86,6 +107,8 @@ MACHINE_START(MSM8X60_SURF, "QCT MSM8X60 SURF")
MACHINE_END
MACHINE_START(MSM8X60_SIM, "QCT MSM8X60 SIMULATOR")
+ .fixup = msm8x60_fixup,
+ .reserve = msm8x60_reserve,
.map_io = msm8x60_map_io,
.init_irq = msm8x60_init_irq,
.init_machine = msm8x60_init,
@@ -93,6 +116,8 @@ MACHINE_START(MSM8X60_SIM, "QCT MSM8X60 SIMULATOR")
MACHINE_END
MACHINE_START(MSM8X60_FFA, "QCT MSM8X60 FFA")
+ .fixup = msm8x60_fixup,
+ .reserve = msm8x60_reserve,
.map_io = msm8x60_map_io,
.init_irq = msm8x60_init_irq,
.init_machine = msm8x60_init,
diff --git a/arch/arm/mach-msm/include/mach/memory.h b/arch/arm/mach-msm/include/mach/memory.h
index f2f8d29..58d5e7e 100644
--- a/arch/arm/mach-msm/include/mach/memory.h
+++ b/arch/arm/mach-msm/include/mach/memory.h
@@ -22,11 +22,11 @@
#elif defined(CONFIG_ARCH_QSD8X50)
#define PLAT_PHYS_OFFSET UL(0x20000000)
#elif defined(CONFIG_ARCH_MSM7X30)
-#define PLAT_PHYS_OFFSET UL(0x00200000)
+#define PLAT_PHYS_OFFSET UL(0x00000000)
#elif defined(CONFIG_ARCH_MSM8X60)
-#define PLAT_PHYS_OFFSET UL(0x40200000)
+#define PLAT_PHYS_OFFSET UL(0x40000000)
#elif defined(CONFIG_ARCH_MSM8960)
-#define PLAT_PHYS_OFFSET UL(0x40200000)
+#define PLAT_PHYS_OFFSET UL(0x40000000)
#else
#define PLAT_PHYS_OFFSET UL(0x10000000)
#endif
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCHv2 1/2] ARM: Set proper TEXT_OFFSET for newer MSMs
@ 2011-07-25 17:19 ` Stephen Boyd
0 siblings, 0 replies; 17+ messages in thread
From: Stephen Boyd @ 2011-07-25 17:19 UTC (permalink / raw)
To: linux-arm-kernel
MSMs post 8x50 have 2Mb at the beginning of RAM reserved for
shared memory. Since the kernel hasn't typically been told this
RAM exists, PHYS_OFFSET has been set to 0xN0200000 and the memory
atags passed to the kernel have matched. This doesn't play nicely
with things such as AUTO_ZRELADDR, which doesn't work at all, and
dynamic phys to virt, which requires an MSM specific workaround.
Work around these issues by telling the kernel RAM starts at
0xN0000000 (it actually does) and fixup the atags from the
bootloader (if necessary) to say the same. In addition, make sure
to set TEXT_OFFSET at least 2Mb beyond the start of RAM so that
the kernel doesn't end up being decompressed into shared memory.
After doing this, AUTO_ZRELADDR should work on MSM with no
problems and ARM_PATCH_PHYS_VIRT_16BIT should no longer be
necessary.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
---
Changes since v1:
- Add 2MB to the fixed-up atag's size
arch/arm/Makefile | 3 +++
arch/arm/mach-msm/board-msm7x30.c | 22 ++++++++++++++++++++++
arch/arm/mach-msm/board-msm8960.c | 22 ++++++++++++++++++++++
arch/arm/mach-msm/board-msm8x60.c | 25 +++++++++++++++++++++++++
arch/arm/mach-msm/include/mach/memory.h | 6 +++---
5 files changed, 75 insertions(+), 3 deletions(-)
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 3a4a04b..8c35e19 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -128,6 +128,9 @@ textofs-$(CONFIG_PM_H1940) := 0x00108000
ifeq ($(CONFIG_ARCH_SA1100),y)
textofs-$(CONFIG_SA1111) := 0x00208000
endif
+textofs-$(CONFIG_ARCH_MSM7X30) := 0x00208000
+textofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000
+textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000
# Machine directory name. This list is sorted alphanumerically
# by CONFIG_* macro name.
diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c
index 8d21769..240d562 100644
--- a/arch/arm/mach-msm/board-msm7x30.c
+++ b/arch/arm/mach-msm/board-msm7x30.c
@@ -24,6 +24,7 @@
#include <linux/smsc911x.h>
#include <linux/usb/msm_hsusb.h>
#include <linux/clkdev.h>
+#include <linux/memblock.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -42,6 +43,21 @@
extern struct sys_timer msm_timer;
+static void __init msm7x30_fixup(struct machine_desc *desc, struct tag *tag,
+ char **cmdline, struct meminfo *mi)
+{
+ for (; tag->hdr.size; tag = tag_next(tag))
+ if (tag->hdr.tag == ATAG_MEM && tag->u.mem.start == 0x200000) {
+ tag->u.mem.start = 0;
+ tag->u.mem.size += SZ_2M;
+ }
+}
+
+static void __init msm7x30_reserve(void)
+{
+ memblock_remove(0x0, SZ_2M);
+}
+
static int hsusb_phy_init_seq[] = {
0x30, 0x32, /* Enable and set Pre-Emphasis Depth to 20% */
0x02, 0x36, /* Disable CDR Auto Reset feature */
@@ -108,6 +124,8 @@ static void __init msm7x30_map_io(void)
MACHINE_START(MSM7X30_SURF, "QCT MSM7X30 SURF")
.boot_params = PLAT_PHYS_OFFSET + 0x100,
+ .fixup = msm7x30_fixup,
+ .reserve = msm7x30_reserve,
.map_io = msm7x30_map_io,
.init_irq = msm7x30_init_irq,
.init_machine = msm7x30_init,
@@ -116,6 +134,8 @@ MACHINE_END
MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA")
.boot_params = PLAT_PHYS_OFFSET + 0x100,
+ .fixup = msm7x30_fixup,
+ .reserve = msm7x30_reserve,
.map_io = msm7x30_map_io,
.init_irq = msm7x30_init_irq,
.init_machine = msm7x30_init,
@@ -124,6 +144,8 @@ MACHINE_END
MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID")
.boot_params = PLAT_PHYS_OFFSET + 0x100,
+ .fixup = msm7x30_fixup,
+ .reserve = msm7x30_reserve,
.map_io = msm7x30_map_io,
.init_irq = msm7x30_init_irq,
.init_machine = msm7x30_init,
diff --git a/arch/arm/mach-msm/board-msm8960.c b/arch/arm/mach-msm/board-msm8960.c
index 8294692..dab58ef 100644
--- a/arch/arm/mach-msm/board-msm8960.c
+++ b/arch/arm/mach-msm/board-msm8960.c
@@ -20,16 +20,34 @@
#include <linux/io.h>
#include <linux/irq.h>
#include <linux/clkdev.h>
+#include <linux/memblock.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/hardware/gic.h>
+#include <asm/setup.h>
#include <mach/board.h>
#include <mach/msm_iomap.h>
#include "devices.h"
+static void __init msm8960_fixup(struct machine_desc *desc, struct tag *tag,
+ char **cmdline, struct meminfo *mi)
+{
+ for (; tag->hdr.size; tag = tag_next(tag))
+ if (tag->hdr.tag == ATAG_MEM &&
+ tag->u.mem.start == 0x40200000) {
+ tag->u.mem.start = 0x40000000;
+ tag->u.mem.size += SZ_2M;
+ }
+}
+
+static void __init msm8960_reserve(void)
+{
+ memblock_remove(0x40000000, SZ_2M);
+}
+
static void __init msm8960_map_io(void)
{
msm_map_msm8960_io();
@@ -92,6 +110,8 @@ static void __init msm8960_rumi3_init(void)
}
MACHINE_START(MSM8960_SIM, "QCT MSM8960 SIMULATOR")
+ .fixup = msm8960_fixup,
+ .reserve = msm8960_reserve,
.map_io = msm8960_map_io,
.init_early = msm8960_init_early,
.init_irq = msm8960_init_irq,
@@ -100,6 +120,8 @@ MACHINE_START(MSM8960_SIM, "QCT MSM8960 SIMULATOR")
MACHINE_END
MACHINE_START(MSM8960_RUMI3, "QCT MSM8960 RUMI3")
+ .fixup = msm8960_fixup,
+ .reserve = msm8960_reserve,
.map_io = msm8960_map_io,
.init_early = msm8960_init_early,
.init_irq = msm8960_init_irq,
diff --git a/arch/arm/mach-msm/board-msm8x60.c b/arch/arm/mach-msm/board-msm8x60.c
index 98c47ce..5b47ec8 100644
--- a/arch/arm/mach-msm/board-msm8x60.c
+++ b/arch/arm/mach-msm/board-msm8x60.c
@@ -20,15 +20,32 @@
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/irq.h>
+#include <linux/memblock.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/hardware/gic.h>
+#include <asm/setup.h>
#include <mach/board.h>
#include <mach/msm_iomap.h>
#include "devices.h"
+static void __init msm8x60_fixup(struct machine_desc *desc, struct tag *tag,
+ char **cmdline, struct meminfo *mi)
+{
+ for (; tag->hdr.size; tag = tag_next(tag))
+ if (tag->hdr.tag == ATAG_MEM &&
+ tag->u.mem.start == 0x40200000) {
+ tag->u.mem.start = 0x40000000;
+ tag->u.mem.size += SZ_2M;
+ }
+}
+
+static void __init msm8x60_reserve(void)
+{
+ memblock_remove(0x40000000, SZ_2M);
+}
static void __init msm8x60_map_io(void)
{
@@ -72,6 +89,8 @@ static void __init msm8x60_init(void)
}
MACHINE_START(MSM8X60_RUMI3, "QCT MSM8X60 RUMI3")
+ .fixup = msm8x60_fixup,
+ .reserve = msm8x60_reserve,
.map_io = msm8x60_map_io,
.init_irq = msm8x60_init_irq,
.init_machine = msm8x60_init,
@@ -79,6 +98,8 @@ MACHINE_START(MSM8X60_RUMI3, "QCT MSM8X60 RUMI3")
MACHINE_END
MACHINE_START(MSM8X60_SURF, "QCT MSM8X60 SURF")
+ .fixup = msm8x60_fixup,
+ .reserve = msm8x60_reserve,
.map_io = msm8x60_map_io,
.init_irq = msm8x60_init_irq,
.init_machine = msm8x60_init,
@@ -86,6 +107,8 @@ MACHINE_START(MSM8X60_SURF, "QCT MSM8X60 SURF")
MACHINE_END
MACHINE_START(MSM8X60_SIM, "QCT MSM8X60 SIMULATOR")
+ .fixup = msm8x60_fixup,
+ .reserve = msm8x60_reserve,
.map_io = msm8x60_map_io,
.init_irq = msm8x60_init_irq,
.init_machine = msm8x60_init,
@@ -93,6 +116,8 @@ MACHINE_START(MSM8X60_SIM, "QCT MSM8X60 SIMULATOR")
MACHINE_END
MACHINE_START(MSM8X60_FFA, "QCT MSM8X60 FFA")
+ .fixup = msm8x60_fixup,
+ .reserve = msm8x60_reserve,
.map_io = msm8x60_map_io,
.init_irq = msm8x60_init_irq,
.init_machine = msm8x60_init,
diff --git a/arch/arm/mach-msm/include/mach/memory.h b/arch/arm/mach-msm/include/mach/memory.h
index f2f8d29..58d5e7e 100644
--- a/arch/arm/mach-msm/include/mach/memory.h
+++ b/arch/arm/mach-msm/include/mach/memory.h
@@ -22,11 +22,11 @@
#elif defined(CONFIG_ARCH_QSD8X50)
#define PLAT_PHYS_OFFSET UL(0x20000000)
#elif defined(CONFIG_ARCH_MSM7X30)
-#define PLAT_PHYS_OFFSET UL(0x00200000)
+#define PLAT_PHYS_OFFSET UL(0x00000000)
#elif defined(CONFIG_ARCH_MSM8X60)
-#define PLAT_PHYS_OFFSET UL(0x40200000)
+#define PLAT_PHYS_OFFSET UL(0x40000000)
#elif defined(CONFIG_ARCH_MSM8960)
-#define PLAT_PHYS_OFFSET UL(0x40200000)
+#define PLAT_PHYS_OFFSET UL(0x40000000)
#else
#define PLAT_PHYS_OFFSET UL(0x10000000)
#endif
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCHv2 2/2] ARM: ARM_PATCH_PHYS_VIRT_16BIT no longer depends on MSM
2011-07-25 17:19 ` Stephen Boyd
@ 2011-07-25 17:19 ` Stephen Boyd
-1 siblings, 0 replies; 17+ messages in thread
From: Stephen Boyd @ 2011-07-25 17:19 UTC (permalink / raw)
To: Russell King
Cc: linux-kernel, linux-arm-msm, linux-arm-kernel, Nicolas Pitre,
David Brown
MSM no longer requires the 16bit version of dynamic P2V. Drop the
dependency.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: David Brown <davidb@codeaurora.org>
---
arch/arm/Kconfig | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index c24f97a..da4508d 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -209,8 +209,8 @@ config ARM_PATCH_PHYS_VIRT
for the MSM machine class.
config ARM_PATCH_PHYS_VIRT_16BIT
- def_bool y
- depends on ARM_PATCH_PHYS_VIRT && ARCH_MSM
+ bool
+ depends on ARM_PATCH_PHYS_VIRT
help
This option extends the physical to virtual translation patching
to allow physical memory down to a theoretical minimum of 64K
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCHv2 2/2] ARM: ARM_PATCH_PHYS_VIRT_16BIT no longer depends on MSM
@ 2011-07-25 17:19 ` Stephen Boyd
0 siblings, 0 replies; 17+ messages in thread
From: Stephen Boyd @ 2011-07-25 17:19 UTC (permalink / raw)
To: linux-arm-kernel
MSM no longer requires the 16bit version of dynamic P2V. Drop the
dependency.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: David Brown <davidb@codeaurora.org>
---
arch/arm/Kconfig | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index c24f97a..da4508d 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -209,8 +209,8 @@ config ARM_PATCH_PHYS_VIRT
for the MSM machine class.
config ARM_PATCH_PHYS_VIRT_16BIT
- def_bool y
- depends on ARM_PATCH_PHYS_VIRT && ARCH_MSM
+ bool
+ depends on ARM_PATCH_PHYS_VIRT
help
This option extends the physical to virtual translation patching
to allow physical memory down to a theoretical minimum of 64K
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCHv2 2/2] ARM: ARM_PATCH_PHYS_VIRT_16BIT no longer depends on MSM
2011-07-25 17:19 ` Stephen Boyd
@ 2011-07-25 20:25 ` Nicolas Pitre
-1 siblings, 0 replies; 17+ messages in thread
From: Nicolas Pitre @ 2011-07-25 20:25 UTC (permalink / raw)
To: Stephen Boyd
Cc: Russell King, linux-kernel, linux-arm-msm, linux-arm-kernel, David Brown
On Mon, 25 Jul 2011, Stephen Boyd wrote:
> MSM no longer requires the 16bit version of dynamic P2V. Drop the
> dependency.
>
> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
> Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
> Cc: David Brown <davidb@codeaurora.org>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
> ---
> arch/arm/Kconfig | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index c24f97a..da4508d 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -209,8 +209,8 @@ config ARM_PATCH_PHYS_VIRT
> for the MSM machine class.
>
> config ARM_PATCH_PHYS_VIRT_16BIT
> - def_bool y
> - depends on ARM_PATCH_PHYS_VIRT && ARCH_MSM
> + bool
> + depends on ARM_PATCH_PHYS_VIRT
> help
> This option extends the physical to virtual translation patching
> to allow physical memory down to a theoretical minimum of 64K
> --
> Sent by an employee of the Qualcomm Innovation Center, Inc.
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCHv2 2/2] ARM: ARM_PATCH_PHYS_VIRT_16BIT no longer depends on MSM
@ 2011-07-25 20:25 ` Nicolas Pitre
0 siblings, 0 replies; 17+ messages in thread
From: Nicolas Pitre @ 2011-07-25 20:25 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, 25 Jul 2011, Stephen Boyd wrote:
> MSM no longer requires the 16bit version of dynamic P2V. Drop the
> dependency.
>
> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
> Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
> Cc: David Brown <davidb@codeaurora.org>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
> ---
> arch/arm/Kconfig | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index c24f97a..da4508d 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -209,8 +209,8 @@ config ARM_PATCH_PHYS_VIRT
> for the MSM machine class.
>
> config ARM_PATCH_PHYS_VIRT_16BIT
> - def_bool y
> - depends on ARM_PATCH_PHYS_VIRT && ARCH_MSM
> + bool
> + depends on ARM_PATCH_PHYS_VIRT
> help
> This option extends the physical to virtual translation patching
> to allow physical memory down to a theoretical minimum of 64K
> --
> Sent by an employee of the Qualcomm Innovation Center, Inc.
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCHv2 2/2] ARM: ARM_PATCH_PHYS_VIRT_16BIT no longer depends on MSM
2011-07-25 20:25 ` Nicolas Pitre
(?)
@ 2011-07-25 20:31 ` Russell King - ARM Linux
-1 siblings, 0 replies; 17+ messages in thread
From: Russell King - ARM Linux @ 2011-07-25 20:31 UTC (permalink / raw)
To: Nicolas Pitre
Cc: linux-arm-msm, David Brown, Stephen Boyd, linux-kernel, linux-arm-kernel
On Mon, Jul 25, 2011 at 04:25:26PM -0400, Nicolas Pitre wrote:
> On Mon, 25 Jul 2011, Stephen Boyd wrote:
>
> > MSM no longer requires the 16bit version of dynamic P2V. Drop the
> > dependency.
> >
> > Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
> > Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
> > Cc: David Brown <davidb@codeaurora.org>
>
> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
As it's now unused, we can kill the additional code which makes things
needlessly more complex...
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCHv2 2/2] ARM: ARM_PATCH_PHYS_VIRT_16BIT no longer depends on MSM
@ 2011-07-25 20:31 ` Russell King - ARM Linux
0 siblings, 0 replies; 17+ messages in thread
From: Russell King - ARM Linux @ 2011-07-25 20:31 UTC (permalink / raw)
To: Nicolas Pitre
Cc: Stephen Boyd, linux-kernel, linux-arm-msm, linux-arm-kernel, David Brown
On Mon, Jul 25, 2011 at 04:25:26PM -0400, Nicolas Pitre wrote:
> On Mon, 25 Jul 2011, Stephen Boyd wrote:
>
> > MSM no longer requires the 16bit version of dynamic P2V. Drop the
> > dependency.
> >
> > Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
> > Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
> > Cc: David Brown <davidb@codeaurora.org>
>
> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
As it's now unused, we can kill the additional code which makes things
needlessly more complex...
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCHv2 2/2] ARM: ARM_PATCH_PHYS_VIRT_16BIT no longer depends on MSM
@ 2011-07-25 20:31 ` Russell King - ARM Linux
0 siblings, 0 replies; 17+ messages in thread
From: Russell King - ARM Linux @ 2011-07-25 20:31 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jul 25, 2011 at 04:25:26PM -0400, Nicolas Pitre wrote:
> On Mon, 25 Jul 2011, Stephen Boyd wrote:
>
> > MSM no longer requires the 16bit version of dynamic P2V. Drop the
> > dependency.
> >
> > Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
> > Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
> > Cc: David Brown <davidb@codeaurora.org>
>
> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
As it's now unused, we can kill the additional code which makes things
needlessly more complex...
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCHv2 2/2] ARM: ARM_PATCH_PHYS_VIRT_16BIT no longer depends on MSM
2011-07-25 20:31 ` Russell King - ARM Linux
@ 2011-07-26 17:40 ` Stephen Boyd
-1 siblings, 0 replies; 17+ messages in thread
From: Stephen Boyd @ 2011-07-26 17:40 UTC (permalink / raw)
To: Russell King - ARM Linux
Cc: Nicolas Pitre, linux-kernel, linux-arm-msm, linux-arm-kernel,
David Brown
On 07/25/2011 01:31 PM, Russell King - ARM Linux wrote:
> On Mon, Jul 25, 2011 at 04:25:26PM -0400, Nicolas Pitre wrote:
>> On Mon, 25 Jul 2011, Stephen Boyd wrote:
>>
>>> MSM no longer requires the 16bit version of dynamic P2V. Drop the
>>> dependency.
>>>
>>> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
>>> Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
>>> Cc: David Brown <davidb@codeaurora.org>
>> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
> As it's now unused, we can kill the additional code which makes things
> needlessly more complex...
Ok. I'll remove the extra code in v3.
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCHv2 2/2] ARM: ARM_PATCH_PHYS_VIRT_16BIT no longer depends on MSM
@ 2011-07-26 17:40 ` Stephen Boyd
0 siblings, 0 replies; 17+ messages in thread
From: Stephen Boyd @ 2011-07-26 17:40 UTC (permalink / raw)
To: linux-arm-kernel
On 07/25/2011 01:31 PM, Russell King - ARM Linux wrote:
> On Mon, Jul 25, 2011 at 04:25:26PM -0400, Nicolas Pitre wrote:
>> On Mon, 25 Jul 2011, Stephen Boyd wrote:
>>
>>> MSM no longer requires the 16bit version of dynamic P2V. Drop the
>>> dependency.
>>>
>>> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
>>> Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
>>> Cc: David Brown <davidb@codeaurora.org>
>> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
> As it's now unused, we can kill the additional code which makes things
> needlessly more complex...
Ok. I'll remove the extra code in v3.
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCHv2 2/2] ARM: ARM_PATCH_PHYS_VIRT_16BIT no longer depends on MSM
2011-07-26 17:40 ` Stephen Boyd
@ 2011-07-26 18:24 ` Nicolas Pitre
-1 siblings, 0 replies; 17+ messages in thread
From: Nicolas Pitre @ 2011-07-26 18:24 UTC (permalink / raw)
To: Stephen Boyd
Cc: Russell King - ARM Linux, lkml, linux-arm-msm, linux-arm-kernel,
David Brown
On Tue, 26 Jul 2011, Stephen Boyd wrote:
> On 07/25/2011 01:31 PM, Russell King - ARM Linux wrote:
> > On Mon, Jul 25, 2011 at 04:25:26PM -0400, Nicolas Pitre wrote:
> >> On Mon, 25 Jul 2011, Stephen Boyd wrote:
> >>
> >>> MSM no longer requires the 16bit version of dynamic P2V. Drop the
> >>> dependency.
> >>>
> >>> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
> >>> Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
> >>> Cc: David Brown <davidb@codeaurora.org>
> >> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
> > As it's now unused, we can kill the additional code which makes things
> > needlessly more complex...
>
> Ok. I'll remove the extra code in v3.
Something like this (untested):
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index ec1c799..e4c784c 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -208,14 +208,5 @@ config ARM_PATCH_PHYS_VIRT
kernel in system memory.
This can only be used with non-XIP MMU kernels where the base
- of physical memory is at a 16MB boundary, or theoretically 64K
- for the MSM machine class.
-
-config ARM_PATCH_PHYS_VIRT_16BIT
- def_bool y
- depends on ARM_PATCH_PHYS_VIRT && ARCH_MSM
- help
- This option extends the physical to virtual translation patching
- to allow physical memory down to a theoretical minimum of 64K
- boundaries.
+ of physical memory is at a 16MB boundary.
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
index 005f884..c626a04 100644
--- a/arch/arm/include/asm/memory.h
+++ b/arch/arm/include/asm/memory.h
@@ -159,7 +159,6 @@
* so that all we need to do is modify the 8-bit constant field.
*/
#define __PV_BITS_31_24 0x81000000
-#define __PV_BITS_23_16 0x00810000
extern unsigned long __pv_phys_offset;
#define PHYS_OFFSET __pv_phys_offset
@@ -177,9 +176,6 @@ static inline unsigned long __virt_to_phys(unsigned long x)
{
unsigned long t;
__pv_stub(x, t, "add", __PV_BITS_31_24);
-#ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT
- __pv_stub(t, t, "add", __PV_BITS_23_16);
-#endif
return t;
}
@@ -187,9 +183,6 @@ static inline unsigned long __phys_to_virt(unsigned long x)
{
unsigned long t;
__pv_stub(x, t, "sub", __PV_BITS_31_24);
-#ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT
- __pv_stub(t, t, "sub", __PV_BITS_23_16);
-#endif
return t;
}
#else
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index 278c1b0..3320a2d 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -480,13 +480,8 @@ __fixup_pv_table:
add r5, r5, r3 @ adjust table end address
add r7, r7, r3 @ adjust __pv_phys_offset address
str r8, [r7] @ save computed PHYS_OFFSET to __pv_phys_offset
-#ifndef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT
mov r6, r3, lsr #24 @ constant for add/sub instructions
teq r3, r6, lsl #24 @ must be 16MiB aligned
-#else
- mov r6, r3, lsr #16 @ constant for add/sub instructions
- teq r3, r6, lsl #16 @ must be 64kiB aligned
-#endif
THUMB( it ne @ cross section branch )
bne __error
str r6, [r7, #4] @ save to __pv_offset
@@ -502,20 +497,8 @@ ENDPROC(__fixup_pv_table)
.text
__fixup_a_pv_table:
#ifdef CONFIG_THUMB2_KERNEL
-#ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT
- lsls r0, r6, #24
- lsr r6, #8
- beq 1f
- clz r7, r0
- lsr r0, #24
- lsl r0, r7
- bic r0, 0x0080
- lsrs r7, #1
- orrcs r0, #0x0080
- orr r0, r0, r7, lsl #12
-#endif
-1: lsls r6, #24
- beq 4f
+ lsls r6, #24
+ beq 2f
clz r7, r6
lsr r6, #24
lsl r6, r7
@@ -524,43 +507,25 @@ __fixup_a_pv_table:
orrcs r6, #0x0080
orr r6, r6, r7, lsl #12
orr r6, #0x4000
- b 4f
-2: @ at this point the C flag is always clear
- add r7, r3
-#ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT
- ldrh ip, [r7]
- tst ip, 0x0400 @ the i bit tells us LS or MS byte
- beq 3f
- cmp r0, #0 @ set C flag, and ...
- biceq ip, 0x0400 @ immediate zero value has a special encoding
- streqh ip, [r7] @ that requires the i bit cleared
-#endif
-3: ldrh ip, [r7, #2]
+ b 2f
+1: add r7, r3
+ ldrh ip, [r7, #2]
and ip, 0x8f00
- orrcc ip, r6 @ mask in offset bits 31-24
- orrcs ip, r0 @ mask in offset bits 23-16
+ orr ip, r6 @ mask in offset bits 31-24
strh ip, [r7, #2]
-4: cmp r4, r5
+2: cmp r4, r5
ldrcc r7, [r4], #4 @ use branch for delay slot
- bcc 2b
+ bcc 1b
bx lr
#else
-#ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT
- and r0, r6, #255 @ offset bits 23-16
- mov r6, r6, lsr #8 @ offset bits 31-24
-#else
- mov r0, #0 @ just in case...
-#endif
- b 3f
-2: ldr ip, [r7, r3]
+ b 2f
+1: ldr ip, [r7, r3]
bic ip, ip, #0x000000ff
- tst ip, #0x400 @ rotate shift tells us LS or MS byte
- orrne ip, ip, r6 @ mask in offset bits 31-24
- orreq ip, ip, r0 @ mask in offset bits 23-16
+ orr ip, ip, r6 @ mask in offset bits 31-24
str ip, [r7, r3]
-3: cmp r4, r5
+2: cmp r4, r5
ldrcc r7, [r4], #4 @ use branch for delay slot
- bcc 2b
+ bcc 1b
mov pc, lr
#endif
ENDPROC(__fixup_a_pv_table)
>
> --
> Sent by an employee of the Qualcomm Innovation Center, Inc.
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
>
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCHv2 2/2] ARM: ARM_PATCH_PHYS_VIRT_16BIT no longer depends on MSM
@ 2011-07-26 18:24 ` Nicolas Pitre
0 siblings, 0 replies; 17+ messages in thread
From: Nicolas Pitre @ 2011-07-26 18:24 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, 26 Jul 2011, Stephen Boyd wrote:
> On 07/25/2011 01:31 PM, Russell King - ARM Linux wrote:
> > On Mon, Jul 25, 2011 at 04:25:26PM -0400, Nicolas Pitre wrote:
> >> On Mon, 25 Jul 2011, Stephen Boyd wrote:
> >>
> >>> MSM no longer requires the 16bit version of dynamic P2V. Drop the
> >>> dependency.
> >>>
> >>> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
> >>> Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
> >>> Cc: David Brown <davidb@codeaurora.org>
> >> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
> > As it's now unused, we can kill the additional code which makes things
> > needlessly more complex...
>
> Ok. I'll remove the extra code in v3.
Something like this (untested):
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index ec1c799..e4c784c 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -208,14 +208,5 @@ config ARM_PATCH_PHYS_VIRT
kernel in system memory.
This can only be used with non-XIP MMU kernels where the base
- of physical memory is at a 16MB boundary, or theoretically 64K
- for the MSM machine class.
-
-config ARM_PATCH_PHYS_VIRT_16BIT
- def_bool y
- depends on ARM_PATCH_PHYS_VIRT && ARCH_MSM
- help
- This option extends the physical to virtual translation patching
- to allow physical memory down to a theoretical minimum of 64K
- boundaries.
+ of physical memory is at a 16MB boundary.
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
index 005f884..c626a04 100644
--- a/arch/arm/include/asm/memory.h
+++ b/arch/arm/include/asm/memory.h
@@ -159,7 +159,6 @@
* so that all we need to do is modify the 8-bit constant field.
*/
#define __PV_BITS_31_24 0x81000000
-#define __PV_BITS_23_16 0x00810000
extern unsigned long __pv_phys_offset;
#define PHYS_OFFSET __pv_phys_offset
@@ -177,9 +176,6 @@ static inline unsigned long __virt_to_phys(unsigned long x)
{
unsigned long t;
__pv_stub(x, t, "add", __PV_BITS_31_24);
-#ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT
- __pv_stub(t, t, "add", __PV_BITS_23_16);
-#endif
return t;
}
@@ -187,9 +183,6 @@ static inline unsigned long __phys_to_virt(unsigned long x)
{
unsigned long t;
__pv_stub(x, t, "sub", __PV_BITS_31_24);
-#ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT
- __pv_stub(t, t, "sub", __PV_BITS_23_16);
-#endif
return t;
}
#else
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index 278c1b0..3320a2d 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -480,13 +480,8 @@ __fixup_pv_table:
add r5, r5, r3 @ adjust table end address
add r7, r7, r3 @ adjust __pv_phys_offset address
str r8, [r7] @ save computed PHYS_OFFSET to __pv_phys_offset
-#ifndef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT
mov r6, r3, lsr #24 @ constant for add/sub instructions
teq r3, r6, lsl #24 @ must be 16MiB aligned
-#else
- mov r6, r3, lsr #16 @ constant for add/sub instructions
- teq r3, r6, lsl #16 @ must be 64kiB aligned
-#endif
THUMB( it ne @ cross section branch )
bne __error
str r6, [r7, #4] @ save to __pv_offset
@@ -502,20 +497,8 @@ ENDPROC(__fixup_pv_table)
.text
__fixup_a_pv_table:
#ifdef CONFIG_THUMB2_KERNEL
-#ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT
- lsls r0, r6, #24
- lsr r6, #8
- beq 1f
- clz r7, r0
- lsr r0, #24
- lsl r0, r7
- bic r0, 0x0080
- lsrs r7, #1
- orrcs r0, #0x0080
- orr r0, r0, r7, lsl #12
-#endif
-1: lsls r6, #24
- beq 4f
+ lsls r6, #24
+ beq 2f
clz r7, r6
lsr r6, #24
lsl r6, r7
@@ -524,43 +507,25 @@ __fixup_a_pv_table:
orrcs r6, #0x0080
orr r6, r6, r7, lsl #12
orr r6, #0x4000
- b 4f
-2: @ at this point the C flag is always clear
- add r7, r3
-#ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT
- ldrh ip, [r7]
- tst ip, 0x0400 @ the i bit tells us LS or MS byte
- beq 3f
- cmp r0, #0 @ set C flag, and ...
- biceq ip, 0x0400 @ immediate zero value has a special encoding
- streqh ip, [r7] @ that requires the i bit cleared
-#endif
-3: ldrh ip, [r7, #2]
+ b 2f
+1: add r7, r3
+ ldrh ip, [r7, #2]
and ip, 0x8f00
- orrcc ip, r6 @ mask in offset bits 31-24
- orrcs ip, r0 @ mask in offset bits 23-16
+ orr ip, r6 @ mask in offset bits 31-24
strh ip, [r7, #2]
-4: cmp r4, r5
+2: cmp r4, r5
ldrcc r7, [r4], #4 @ use branch for delay slot
- bcc 2b
+ bcc 1b
bx lr
#else
-#ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT
- and r0, r6, #255 @ offset bits 23-16
- mov r6, r6, lsr #8 @ offset bits 31-24
-#else
- mov r0, #0 @ just in case...
-#endif
- b 3f
-2: ldr ip, [r7, r3]
+ b 2f
+1: ldr ip, [r7, r3]
bic ip, ip, #0x000000ff
- tst ip, #0x400 @ rotate shift tells us LS or MS byte
- orrne ip, ip, r6 @ mask in offset bits 31-24
- orreq ip, ip, r0 @ mask in offset bits 23-16
+ orr ip, ip, r6 @ mask in offset bits 31-24
str ip, [r7, r3]
-3: cmp r4, r5
+2: cmp r4, r5
ldrcc r7, [r4], #4 @ use branch for delay slot
- bcc 2b
+ bcc 1b
mov pc, lr
#endif
ENDPROC(__fixup_a_pv_table)
>
> --
> Sent by an employee of the Qualcomm Innovation Center, Inc.
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
>
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCHv2 2/2] ARM: ARM_PATCH_PHYS_VIRT_16BIT no longer depends on MSM
2011-07-26 18:24 ` Nicolas Pitre
@ 2011-07-26 21:39 ` David Brown
-1 siblings, 0 replies; 17+ messages in thread
From: David Brown @ 2011-07-26 21:39 UTC (permalink / raw)
To: Nicolas Pitre
Cc: Stephen Boyd, Russell King - ARM Linux, lkml, linux-arm-msm,
linux-arm-kernel, David Brown
On Tue, Jul 26, 2011 at 02:24:26PM -0400, Nicolas Pitre wrote:
> On Tue, 26 Jul 2011, Stephen Boyd wrote:
>
> > On 07/25/2011 01:31 PM, Russell King - ARM Linux wrote:
> > > On Mon, Jul 25, 2011 at 04:25:26PM -0400, Nicolas Pitre wrote:
> > >> On Mon, 25 Jul 2011, Stephen Boyd wrote:
> > >>
> > >>> MSM no longer requires the 16bit version of dynamic P2V. Drop the
> > >>> dependency.
> > >>>
> > >>> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
> > >>> Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
> > >>> Cc: David Brown <davidb@codeaurora.org>
> > >> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
> > > As it's now unused, we can kill the additional code which makes things
> > > needlessly more complex...
> >
> > Ok. I'll remove the extra code in v3.
>
> Something like this (untested):
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
I've tested this on MSM8660. Works with CONFIG_ARM_PATCH_PHYS_VIRT
enabled (but an offset of zero).
I'd like to make this up into a patch, Nicolas, do you want to be the
author (and do you sign-off)?
Thanks,
David
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCHv2 2/2] ARM: ARM_PATCH_PHYS_VIRT_16BIT no longer depends on MSM
@ 2011-07-26 21:39 ` David Brown
0 siblings, 0 replies; 17+ messages in thread
From: David Brown @ 2011-07-26 21:39 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jul 26, 2011 at 02:24:26PM -0400, Nicolas Pitre wrote:
> On Tue, 26 Jul 2011, Stephen Boyd wrote:
>
> > On 07/25/2011 01:31 PM, Russell King - ARM Linux wrote:
> > > On Mon, Jul 25, 2011 at 04:25:26PM -0400, Nicolas Pitre wrote:
> > >> On Mon, 25 Jul 2011, Stephen Boyd wrote:
> > >>
> > >>> MSM no longer requires the 16bit version of dynamic P2V. Drop the
> > >>> dependency.
> > >>>
> > >>> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
> > >>> Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
> > >>> Cc: David Brown <davidb@codeaurora.org>
> > >> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
> > > As it's now unused, we can kill the additional code which makes things
> > > needlessly more complex...
> >
> > Ok. I'll remove the extra code in v3.
>
> Something like this (untested):
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
I've tested this on MSM8660. Works with CONFIG_ARM_PATCH_PHYS_VIRT
enabled (but an offset of zero).
I'd like to make this up into a patch, Nicolas, do you want to be the
author (and do you sign-off)?
Thanks,
David
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCHv2 2/2] ARM: ARM_PATCH_PHYS_VIRT_16BIT no longer depends on MSM
2011-07-26 21:39 ` David Brown
@ 2011-07-26 21:52 ` Nicolas Pitre
-1 siblings, 0 replies; 17+ messages in thread
From: Nicolas Pitre @ 2011-07-26 21:52 UTC (permalink / raw)
To: David Brown
Cc: Stephen Boyd, Russell King - ARM Linux, lkml, linux-arm-msm,
linux-arm-kernel
On Tue, 26 Jul 2011, David Brown wrote:
> On Tue, Jul 26, 2011 at 02:24:26PM -0400, Nicolas Pitre wrote:
> > On Tue, 26 Jul 2011, Stephen Boyd wrote:
> >
> > > On 07/25/2011 01:31 PM, Russell King - ARM Linux wrote:
> > > > On Mon, Jul 25, 2011 at 04:25:26PM -0400, Nicolas Pitre wrote:
> > > >> On Mon, 25 Jul 2011, Stephen Boyd wrote:
> > > >>
> > > >>> MSM no longer requires the 16bit version of dynamic P2V. Drop the
> > > >>> dependency.
> > > >>>
> > > >>> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
> > > >>> Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
> > > >>> Cc: David Brown <davidb@codeaurora.org>
> > > >> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
> > > > As it's now unused, we can kill the additional code which makes things
> > > > needlessly more complex...
> > >
> > > Ok. I'll remove the extra code in v3.
> >
> > Something like this (untested):
> >
> > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> > diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
>
> I've tested this on MSM8660. Works with CONFIG_ARM_PATCH_PHYS_VIRT
> enabled (but an offset of zero).
>
> I'd like to make this up into a patch, Nicolas, do you want to be the
> author (and do you sign-off)?
Sure.
Nicolas
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCHv2 2/2] ARM: ARM_PATCH_PHYS_VIRT_16BIT no longer depends on MSM
@ 2011-07-26 21:52 ` Nicolas Pitre
0 siblings, 0 replies; 17+ messages in thread
From: Nicolas Pitre @ 2011-07-26 21:52 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, 26 Jul 2011, David Brown wrote:
> On Tue, Jul 26, 2011 at 02:24:26PM -0400, Nicolas Pitre wrote:
> > On Tue, 26 Jul 2011, Stephen Boyd wrote:
> >
> > > On 07/25/2011 01:31 PM, Russell King - ARM Linux wrote:
> > > > On Mon, Jul 25, 2011 at 04:25:26PM -0400, Nicolas Pitre wrote:
> > > >> On Mon, 25 Jul 2011, Stephen Boyd wrote:
> > > >>
> > > >>> MSM no longer requires the 16bit version of dynamic P2V. Drop the
> > > >>> dependency.
> > > >>>
> > > >>> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
> > > >>> Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
> > > >>> Cc: David Brown <davidb@codeaurora.org>
> > > >> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
> > > > As it's now unused, we can kill the additional code which makes things
> > > > needlessly more complex...
> > >
> > > Ok. I'll remove the extra code in v3.
> >
> > Something like this (untested):
> >
> > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> > diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
>
> I've tested this on MSM8660. Works with CONFIG_ARM_PATCH_PHYS_VIRT
> enabled (but an offset of zero).
>
> I'd like to make this up into a patch, Nicolas, do you want to be the
> author (and do you sign-off)?
Sure.
Nicolas
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2011-07-26 21:53 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-25 17:19 [PATCHv2 1/2] ARM: Set proper TEXT_OFFSET for newer MSMs Stephen Boyd
2011-07-25 17:19 ` Stephen Boyd
2011-07-25 17:19 ` [PATCHv2 2/2] ARM: ARM_PATCH_PHYS_VIRT_16BIT no longer depends on MSM Stephen Boyd
2011-07-25 17:19 ` Stephen Boyd
2011-07-25 20:25 ` Nicolas Pitre
2011-07-25 20:25 ` Nicolas Pitre
2011-07-25 20:31 ` Russell King - ARM Linux
2011-07-25 20:31 ` Russell King - ARM Linux
2011-07-25 20:31 ` Russell King - ARM Linux
2011-07-26 17:40 ` Stephen Boyd
2011-07-26 17:40 ` Stephen Boyd
2011-07-26 18:24 ` Nicolas Pitre
2011-07-26 18:24 ` Nicolas Pitre
2011-07-26 21:39 ` David Brown
2011-07-26 21:39 ` David Brown
2011-07-26 21:52 ` Nicolas Pitre
2011-07-26 21:52 ` Nicolas Pitre
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.