xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: xen-devel@lists.xenproject.org
Cc: Andrew.Cooper3@citrix.com, Julien Grall <julien.grall@arm.com>,
	sstabellini@kernel.org, ian.jackson@eu.citrix.com,
	jbeulich@suse.com
Subject: [PATCH] xen/arm: Allow cleaning the directory even when CONFIG_EARLY_PRINTK is set
Date: Mon, 22 Apr 2019 17:41:06 +0100	[thread overview]
Message-ID: <20190422164106.20331-1-julien.grall@arm.com> (raw)

CONFIG_EARLY_PRINTK can only be set when CONFIG_DEBUG is enabled. It can
be quite convenient to only modify the target.

However, the target clean will not include the .config. This means
CONFIG_DEBUG is not enabled and therefore make will throw an error
preventing clean to continue.

The check is not moved at linking time.

Signed-off-by: Julien Grall <julien.grall@arm.com>

---

This code is pretty nasty, but I haven't found a better way for avoiding
to check if CONFIG_DEBUG is enabled when the target clean is called.

Ideally we will want to move CONFIG_EARLY_PRINTK in Kconfig. I haven't
had time yet to look at it properly so far.
---
 xen/arch/arm/Makefile | 5 +++++
 xen/arch/arm/Rules.mk | 7 -------
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile
index cb902cb6fe..fef508c836 100644
--- a/xen/arch/arm/Makefile
+++ b/xen/arch/arm/Makefile
@@ -101,6 +101,11 @@ prelink.o: $(ALL_OBJS)
 endif
 
 $(TARGET)-syms: prelink.o xen.lds
+ifneq ($(CONFIG_EARLY_PRINTK), )
+ifneq ($(CONFIG_DEBUG), y)
+	$(error CONFIG_EARLY_PRINTK enabled for non-debug build)
+endif
+endif
 	$(LD) $(LDFLAGS) -T xen.lds -N prelink.o \
 	    $(BASEDIR)/common/symbols-dummy.o -o $(@D)/.$(@F).0
 	$(NM) -pa --format=sysv $(@D)/.$(@F).0 \
diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk
index f264592aef..12150986c5 100644
--- a/xen/arch/arm/Rules.mk
+++ b/xen/arch/arm/Rules.mk
@@ -80,11 +80,4 @@ CFLAGS-$(EARLY_PRINTK) += -DEARLY_PRINTK_BAUD=$(EARLY_PRINTK_BAUD)
 CFLAGS-$(EARLY_PRINTK) += -DEARLY_UART_BASE_ADDRESS=$(EARLY_UART_BASE_ADDRESS)
 CFLAGS-$(EARLY_PRINTK) += -DEARLY_UART_REG_SHIFT=$(EARLY_UART_REG_SHIFT)
 
-else # !CONFIG_DEBUG
-
-ifneq ($(CONFIG_EARLY_PRINTK),)
-# Early printk is dependant on a debug build.
-$(error CONFIG_EARLY_PRINTK enabled for non-debug build)
-endif
-
 endif
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

WARNING: multiple messages have this Message-ID (diff)
From: Julien Grall <julien.grall@arm.com>
To: xen-devel@lists.xenproject.org
Cc: Andrew.Cooper3@citrix.com, Julien Grall <julien.grall@arm.com>,
	sstabellini@kernel.org, ian.jackson@eu.citrix.com,
	jbeulich@suse.com
Subject: [Xen-devel] [PATCH] xen/arm: Allow cleaning the directory even when CONFIG_EARLY_PRINTK is set
Date: Mon, 22 Apr 2019 17:41:06 +0100	[thread overview]
Message-ID: <20190422164106.20331-1-julien.grall@arm.com> (raw)
Message-ID: <20190422164106.B3WOr1UeePq0o3Tzr9wXwEUDzG1xNfOQxWvhxrscf3k@z> (raw)

CONFIG_EARLY_PRINTK can only be set when CONFIG_DEBUG is enabled. It can
be quite convenient to only modify the target.

However, the target clean will not include the .config. This means
CONFIG_DEBUG is not enabled and therefore make will throw an error
preventing clean to continue.

The check is not moved at linking time.

Signed-off-by: Julien Grall <julien.grall@arm.com>

---

This code is pretty nasty, but I haven't found a better way for avoiding
to check if CONFIG_DEBUG is enabled when the target clean is called.

Ideally we will want to move CONFIG_EARLY_PRINTK in Kconfig. I haven't
had time yet to look at it properly so far.
---
 xen/arch/arm/Makefile | 5 +++++
 xen/arch/arm/Rules.mk | 7 -------
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile
index cb902cb6fe..fef508c836 100644
--- a/xen/arch/arm/Makefile
+++ b/xen/arch/arm/Makefile
@@ -101,6 +101,11 @@ prelink.o: $(ALL_OBJS)
 endif
 
 $(TARGET)-syms: prelink.o xen.lds
+ifneq ($(CONFIG_EARLY_PRINTK), )
+ifneq ($(CONFIG_DEBUG), y)
+	$(error CONFIG_EARLY_PRINTK enabled for non-debug build)
+endif
+endif
 	$(LD) $(LDFLAGS) -T xen.lds -N prelink.o \
 	    $(BASEDIR)/common/symbols-dummy.o -o $(@D)/.$(@F).0
 	$(NM) -pa --format=sysv $(@D)/.$(@F).0 \
diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk
index f264592aef..12150986c5 100644
--- a/xen/arch/arm/Rules.mk
+++ b/xen/arch/arm/Rules.mk
@@ -80,11 +80,4 @@ CFLAGS-$(EARLY_PRINTK) += -DEARLY_PRINTK_BAUD=$(EARLY_PRINTK_BAUD)
 CFLAGS-$(EARLY_PRINTK) += -DEARLY_UART_BASE_ADDRESS=$(EARLY_UART_BASE_ADDRESS)
 CFLAGS-$(EARLY_PRINTK) += -DEARLY_UART_REG_SHIFT=$(EARLY_UART_REG_SHIFT)
 
-else # !CONFIG_DEBUG
-
-ifneq ($(CONFIG_EARLY_PRINTK),)
-# Early printk is dependant on a debug build.
-$(error CONFIG_EARLY_PRINTK enabled for non-debug build)
-endif
-
 endif
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

             reply	other threads:[~2019-04-22 16:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-22 16:41 Julien Grall [this message]
2019-04-22 16:41 ` [Xen-devel] [PATCH] xen/arm: Allow cleaning the directory even when CONFIG_EARLY_PRINTK is set Julien Grall
2019-04-24  0:20 ` Stefano Stabellini
2019-04-24  0:20   ` [Xen-devel] " Stefano Stabellini
2019-04-24 10:47   ` Julien Grall
2019-04-24 10:47     ` [Xen-devel] " Julien Grall
2019-05-23  8:27     ` Jan Beulich
2019-05-23  8:27       ` [Xen-devel] " Jan Beulich
2019-05-23  9:10       ` Julien Grall
2019-05-23  9:10         ` [Xen-devel] " Julien Grall

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=20190422164106.20331-1-julien.grall@arm.com \
    --to=julien.grall@arm.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).