Skip to contentSkip to conversation

arm:omap2+: put omap_uart_phys/virt/lsr in .text section when ZIMAGE is true

PATCH Superseded Hoeun Ryu 3 participants 5 messages Jun 8, 2017 – Jun 13, 2017 Arm (32-bit)

lore
Share & tools
lore

Hoeun Ryu

author
#0 lore raw

PATCH 1/2 arm:omap2+: put omap_uart_phys/virt/lsr in .text section when ZIMAGE is true

omap_uart_phys, omap_uart_virt and omap_uart_lsr reside in .data section
and it's right implementation. But because of this, we cannot enable CONFIG_DEBUG_UNCOMPRESS. LL_DEBUG and DEBUG_UNCOMPRESS are very useful tools for debugging early boot stage when something goes wrong if you don't have any hardware based debugging tools like a JTAG debugger.
This patch is to put the variables into .text section instead only when the
DEBUG_LL_INCLUDE file is included in the kernel decompressor, which is only when ZIMAGE is defined.
This patch does not change anything when DEBUG_LL_INCLUDE is included in
the other kernel parts like arch/arm/kernel/*

---
 arch/arm/include/debug/omap2plus.S | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm/include/debug/omap2plus.S +11 -0
index 6d867ae..6ce6ef9 100644
@@ -58,11 +58,22 @@
 
 #define UART_OFFSET(addr)	((addr) & 0x00ffffff)
 
+/*
+ * Definition of ZIMAGE is in arch/arm/boot/compressed/Makefile.
+ * Place the following block in .text section only when this file is
+ * included by arch/arm/boot/compressed/* to make it possible to
+ * enable CONFIG_DEBUG_UNCOMPRESS and DEBUG in arch/arm/boot/compressed/head.S
+ * on OMAP2+ SoCs.
+ */
+#ifndef ZIMAGE
 		.pushsection .data
+#endif
 omap_uart_phys:	.word	0
 omap_uart_virt:	.word	0
 omap_uart_lsr:	.word	0
+#ifndef ZIMAGE
 		.popsection
+#endif
 
 		.macro	addruart, rp, rv, tmp
 
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH 2/2 arm:omap2+: drop dependence on DEBUG_OMAP2PLUS_UART for DEBUG_UNCOMPRESS

With a patch 9a5151e1d1ba4df41bc4b8e8c0f17163247645ac, "arm:omap2+: put
omap_uart_phys/virt/lsr in .text section when ZIMAGE is true", the dependence on DEBUG_OMAP2PLUS_UART for DEBUG_UNCOMPRESS can be dropped, because all code of omap2+'s DEBUG_LL_INCLUDE file is in .text section when it's included in the decompressor.

---
 arch/arm/Kconfig.debug | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm/Kconfig.debug +1 -2
index ba2cb63..52eb0bf 100644
@@ -1735,8 +1735,7 @@ config DEBUG_UART_8250_FLOW_CONTROL
 config DEBUG_UNCOMPRESS
 	bool
 	depends on ARCH_MULTIPLATFORM || PLAT_SAMSUNG || ARM_SINGLE_ARMV7M
-	default y if DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \
-		     (!DEBUG_TEGRA_UART || !ZBOOT_ROM) && \
+	default y if DEBUG_LL && (!DEBUG_TEGRA_UART || !ZBOOT_ROM) && \
 		     !DEBUG_BRCMSTB_UART
 	help
 	  This option influences the normal decompressor output for
Signature · 1 line
2.7.4
author
#2 lore raw
In reply to Hoeun Ryu

Hello, Russell.

Would you please review this patch ?

Than you

Quoted 48 lines · Hoeun Ryu

omap_uart_phys, omap_uart_virt and omap_uart_lsr reside in .data section and it's right implementation. But because of this, we cannot enable CONFIG_DEBUG_UNCOMPRESS. LL_DEBUG and DEBUG_UNCOMPRESS are very useful tools for debugging early boot stage when something goes wrong if you don't have any hardware based debugging tools like a JTAG debugger.
This patch is to put the variables into .text section instead only when the DEBUG_LL_INCLUDE file is included in the kernel decompressor, which is only when ZIMAGE is defined.
This patch does not change anything when DEBUG_LL_INCLUDE is included in the other kernel parts like arch/arm/kernel/*

---
arch/arm/include/debug/omap2plus.S | 11 +++++++++++

1 file changed, 11 insertions(+)
arch/arm/include/debug/omap2plus.S +9 -0
index 6d867ae..6ce6ef9 100644
@@ -58,11 +58,22 @@
 
 #define UART_OFFSET(addr)    ((addr) & 0x00ffffff)
 
+/*
+ * Definition of ZIMAGE is in arch/arm/boot/compressed/Makefile.
+ * Place the following block in .text section only when this file is
+ * included by arch/arm/boot/compressed/* to make it possible to
+ * enable CONFIG_DEBUG_UNCOMPRESS and DEBUG in arch/arm/boot/compressed/head.S
+ * on OMAP2+ SoCs.
+ */
+#ifndef ZIMAGE
       .pushsection .data
+#endif
omap_uart_phys:    .word    0
omap_uart_virt:    .word    0
omap_uart_lsr:    .word    0
arch/arm/include/debug/omap2plus.S +2 -0
+#ifndef ZIMAGE
       .popsection
+#endif
 
       .macro    addruart, rp, rv, tmp
Signature · 2 lines
-- 
2.7.4
#3 lore raw
Quoted 3 lines · Hoeun Ryu

Hello, Russell.

Would you please review this patch ?

It's really up to Tony Lindgren, who is the OMAP maintainer.

Quoted 51 lines

Than you

Quoted 48 lines · Hoeun Ryu

omap_uart_phys, omap_uart_virt and omap_uart_lsr reside in .data section and it's right implementation. But because of this, we cannot enable CONFIG_DEBUG_UNCOMPRESS. LL_DEBUG and DEBUG_UNCOMPRESS are very useful tools for debugging early boot stage when something goes wrong if you don't have any hardware based debugging tools like a JTAG debugger.
This patch is to put the variables into .text section instead only when the DEBUG_LL_INCLUDE file is included in the kernel decompressor, which is only when ZIMAGE is defined.
This patch does not change anything when DEBUG_LL_INCLUDE is included in the other kernel parts like arch/arm/kernel/*

---
arch/arm/include/debug/omap2plus.S | 11 +++++++++++

1 file changed, 11 insertions(+)
arch/arm/include/debug/omap2plus.S +9 -0
index 6d867ae..6ce6ef9 100644
@@ -58,11 +58,22 @@
 
 #define UART_OFFSET(addr)    ((addr) & 0x00ffffff)
 
+/*
+ * Definition of ZIMAGE is in arch/arm/boot/compressed/Makefile.
+ * Place the following block in .text section only when this file is
+ * included by arch/arm/boot/compressed/* to make it possible to
+ * enable CONFIG_DEBUG_UNCOMPRESS and DEBUG in arch/arm/boot/compressed/head.S
+ * on OMAP2+ SoCs.
+ */
+#ifndef ZIMAGE
       .pushsection .data
+#endif
omap_uart_phys:    .word    0
omap_uart_virt:    .word    0
omap_uart_lsr:    .word    0
arch/arm/include/debug/omap2plus.S +2 -0
+#ifndef ZIMAGE
       .popsection
+#endif
 
       .macro    addruart, rp, rv, tmp
Signature · 2 lines
-- 
2.7.4
Signature · 3 lines
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
#4 lore raw
Quoted 6 lines · Russell King - ARM Linux
Quoted 3 lines · Hoeun Ryu

Hello, Russell.

Would you please review this patch ?

It's really up to Tony Lindgren, who is the OMAP maintainer.

I'll take a look today. I think we can simplify things quite a bit as we no longer use machine type for configuring the UART.

Regards,

Tony