All of lore.kernel.org
 help / color / mirror / Atom feed
From: shawn.guo@linaro.org (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 2/2] ARM: uncompress debug support for multiplatform build
Date: Fri, 8 Feb 2013 19:44:52 +0800	[thread overview]
Message-ID: <1360323892-2860-1-git-send-email-shawn.guo@linaro.org> (raw)
In-Reply-To: <20130206093236.GD17833@n2100.arm.linux.org.uk>

Instead of giving zero support of uncompress debug for multiplatform
build, the patch turns uncompress debug into one part of DEBUG_LL
support.  When DEBUG_LL is turned on for a particular platform,
uncompress debug works too for that platform.

It reuses the platform DEBUG_LL macros by creating a simple
arch/arm/boot/compressed/debug.S with CONFIG_DEBUG_LL_INCLUDE
included there, and implements a generic putc() using those macros.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Olof Johansson <olof@lixom.net>
---
Changes since v2:
 * Build arch/arm/boot/compressed/debug.S only for multiplatform kernel
   to fix the breakage on traditional platform build
 * Include asm/assembler.h in arch/arm/boot/compressed/debug.S, as it
   may commonly be needed by platforms to be converted to multiplatform

Russell,

I will put it into patch system if I do not receive any comment
tomorrow.

Shawn

 arch/arm/boot/compressed/Makefile   |    5 +++++
 arch/arm/boot/compressed/debug.S    |   12 ++++++++++++
 arch/arm/include/debug/uncompress.h |    4 ++++
 3 files changed, 21 insertions(+)
 create mode 100644 arch/arm/boot/compressed/debug.S

diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index 5cad8a6..13bdd10 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -24,6 +24,11 @@ endif
 AFLAGS_head.o += -DTEXT_OFFSET=$(TEXT_OFFSET)
 HEAD	= head.o
 OBJS	+= misc.o decompress.o
+ifeq ($(CONFIG_ARCH_MULTIPLATFORM),y)
+ifeq ($(CONFIG_DEBUG_LL),y)
+OBJS	+= debug.o
+endif
+endif
 FONTC	= $(srctree)/drivers/video/console/font_acorn_8x8.c
 
 # string library code (-Os is enforced to keep it much smaller)
diff --git a/arch/arm/boot/compressed/debug.S b/arch/arm/boot/compressed/debug.S
new file mode 100644
index 0000000..6e8382d
--- /dev/null
+++ b/arch/arm/boot/compressed/debug.S
@@ -0,0 +1,12 @@
+#include <linux/linkage.h>
+#include <asm/assembler.h>
+
+#include CONFIG_DEBUG_LL_INCLUDE
+
+ENTRY(putc)
+	addruart r1, r2, r3
+	waituart r3, r1
+	senduart r0, r1
+	busyuart r3, r1
+	mov	 pc, lr
+ENDPROC(putc)
diff --git a/arch/arm/include/debug/uncompress.h b/arch/arm/include/debug/uncompress.h
index e19955d..9aa5314 100644
--- a/arch/arm/include/debug/uncompress.h
+++ b/arch/arm/include/debug/uncompress.h
@@ -1,3 +1,7 @@
+#ifdef CONFIG_DEBUG_LL
+extern void putc(int c);
+#else
 static inline void putc(int c) {}
+#endif
 static inline void flush(void) {}
 static inline void arch_decomp_setup(void) {}
-- 
1.7.9.5

  parent reply	other threads:[~2013-02-08 11:44 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-17 15:21 [PATCH 0/2] Uncompress debug for multiplatform Shawn Guo
2013-01-17 15:21 ` [PATCH 1/2] ARM: use Kconfig to select uncompress.h Shawn Guo
2013-01-17 16:00   ` Arnd Bergmann
2013-01-17 15:21 ` [PATCH 2/2] ARM: use DEBUG_LL infrastructural for multiplatform uncompress debug Shawn Guo
2013-01-17 15:33   ` Shawn Guo
2013-01-17 16:25   ` Arnd Bergmann
2013-01-18  2:49     ` Shawn Guo
2013-01-18  2:45   ` [PATCH v2 2/2] ARM: uncompress debug support for multiplatform build Shawn Guo
2013-01-18  8:47     ` Arnd Bergmann
2013-01-18 10:42       ` Russell King - ARM Linux
2013-01-18 11:15       ` Shawn Guo
2013-01-18 18:03     ` Olof Johansson
2013-02-04 16:01     ` Russell King - ARM Linux
2013-02-06  9:32       ` Russell King - ARM Linux
2013-02-06 19:04         ` Stephen Warren
2013-02-07  5:04           ` Shawn Guo
2013-02-07 16:36             ` Stephen Warren
2013-02-08 12:59             ` Russell King - ARM Linux
2013-02-08 11:44         ` Shawn Guo [this message]
2013-02-08 12:27           ` [PATCH v3 " Russell King - ARM Linux
2013-02-08 12:45             ` Shawn Guo
     [not found] ` <20130128141947.GA11626@S2101-09.ap.freescale.net>
2013-01-28 14:22   ` [PATCH 0/2] Uncompress debug for multiplatform Shawn Guo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1360323892-2860-1-git-send-email-shawn.guo@linaro.org \
    --to=shawn.guo@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.