From patchwork Mon Apr 22 16:41:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 162598 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp2794336jan; Mon, 22 Apr 2019 09:43:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqyKIAts3OYIpE0zIoBbWt6F+36Rxbo+NBJbrRea1aDJrNt65Gn9IM+K+6KuPjLEHnZ/XMqP X-Received: by 2002:a0d:db05:: with SMTP id d5mr85466ywe.197.1555951406752; Mon, 22 Apr 2019 09:43:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555951406; cv=none; d=google.com; s=arc-20160816; b=ZozTHS2xqdUBR6tTpgaVpw5FEOES12b5AG4YU68NuQ6s5a6KjqhZaI2o70DGpr9uz8 CU+4Hw3RLU6Eo+DHs6zVMNfMq/ETM4QMoBMRgqVfCPSYjBuJeg0B7x9XoXBvad+NYeHT HXvhPMX71nksJfhJQwmWBnxQO0xtOXZC4hh+DwsHGUkz3HNYyaTbm6icxBOETbqNmJFy 32J3+SVneKVwtkde5eJ8sM8dcrRFe/yBeUDKLCqq17TP5PIcf5k5KP1KrEOa5Q8a2sW9 QaEkoskEQYSucPlC6r+9CYmNtrEQlJ1K4yZTKTYheWAyLECFSU/AOAIKB1pLlN5pkLby lrtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:message-id:date:to:from; bh=jr+ELKhZchDAuTudjtlKfRBV9Qhi/sqAoyd1T9oeKkQ=; b=QQ8xORqmaSlrdevY7yIPPwHxg/7od48KR51BN5Y3LRFF+ivqD8MMv1tclGUYJ/KWBd sR5KnCyZP1dUF68CndBGHISqjOxuKbrya3q+d9CIfqVydhhGd4qbPKHKYCRwuk9CplDE nJI6H84CG/7df0ayiqM1N/zRy1Tndf75p8/Q7lisLJxBn2PXrFhxVywoFv5Xifph0N9x Et1gSB7fw2GC0CfQGQ9lGWq9gUxLjUdSQWPfcSI7zGdCf8lIr5i8n3VGKaNlp4KxgAcC n6VZK1azqmARm0Zu8osDnw38nBI9GabR4WePisyZdd22Hlof6NM5UG3DHc45F6zMHH0+ ZX7A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id u33si10085607ywh.191.2019.04.22.09.43.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Apr 2019 09:43:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hIc0c-0004BK-GQ; Mon, 22 Apr 2019 16:41:34 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hIc0b-0004BF-Ph for xen-devel@lists.xenproject.org; Mon, 22 Apr 2019 16:41:33 +0000 X-Inumbo-ID: 7bbdcc50-651d-11e9-92d7-bc764e045a96 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTP id 7bbdcc50-651d-11e9-92d7-bc764e045a96; Mon, 22 Apr 2019 16:41:31 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 69801374; Mon, 22 Apr 2019 09:41:31 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 354533F557; Mon, 22 Apr 2019 09:41:30 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Mon, 22 Apr 2019 17:41:06 +0100 Message-Id: <20190422164106.20331-1-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 Subject: [Xen-devel] [PATCH] xen/arm: Allow cleaning the directory even when CONFIG_EARLY_PRINTK is set X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Andrew.Cooper3@citrix.com, Julien Grall , sstabellini@kernel.org, ian.jackson@eu.citrix.com, jbeulich@suse.com MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" 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 --- 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