From patchwork Mon Sep 19 14:04:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Rzeszutek Wilk X-Patchwork-Id: 9339537 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6B957607D0 for ; Mon, 19 Sep 2016 14:07:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5C6FE29206 for ; Mon, 19 Sep 2016 14:07:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 50E9529252; Mon, 19 Sep 2016 14:07:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9996129206 for ; Mon, 19 Sep 2016 14:07:40 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1blzC1-0001vw-Tu; Mon, 19 Sep 2016 14:05:09 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1blzC1-0001vn-E5 for xen-devel@lists.xenproject.org; Mon, 19 Sep 2016 14:05:09 +0000 Received: from [85.158.137.68] by server-5.bemta-3.messagelabs.com id D3/43-03281-490FFD75; Mon, 19 Sep 2016 14:05:08 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrMIsWRWlGSWpSXmKPExsUyZ7p8oO6UD/f DDb7O5rH4vmUykwOjx+EPV1gCGKNYM/OS8isSWDOO/3/OVvBKo2LC3Z/sDYx3FbsYuTiEBNqY JHY9vM8I4XxjlPj2agIzhLORUeLWxS5WCKeXUWLukS1AZZwcLAKqEgtm/Qaq4uBgEzCReLPKE SQsIqAu8efCBLBJzAIfGCWeH3rDDpIQFoiUWPPzPiuIzStgKfFq+R42EFtIYBOjxMK7HBBxQY mTM5+wgNjMAloSN/69ZAKZzywgLbH8H1gJp4C1xMHrx8DGiAooSzTMeMAMYksIGEqcfriNcQK j4Cwkk2YhmTQLYdICRuZVjBrFqUVlqUW6RmZ6SUWZ6RkluYmZObqGBsZ6uanFxYnpqTmJScV6 yfm5mxiBgVvPwMC4g7Fhr98hRkkOJiVR3sWz74cL8SXlp1RmJBZnxBeV5qQWH2KU4eBQkuD1f A+UEyxKTU+tSMvMAcYQTFqCg0dJhDcaJM1bXJCYW5yZDpE6xagoJc4rA5IQAElklObBtcHi9h KjrJQwLyMDA4MQT0FqUW5mCar8K0ZxDkYlYV4DkCk8mXklcNNfAS1mAlrM2AO2uCQRISXVwGg vuevU2nO5ovJc39tef+bfI/6sQ/a4kZ2aEuebWN5M88OKtt/PrN2o2tU2u979TDrvQVPXS9mH +sTXFeb+s55g0H57ftozp/aP3y9fKfukd1D3xKwtG7b/yfnbdcA/pCax1dXoePJbfp5tYff+K 024wiajuY7/llKY2oUzAQyTzq5RY7OWcVFiKc5INNRiLipOBADjtWEl1gIAAA== X-Env-Sender: konrad.wilk@oracle.com X-Msg-Ref: server-4.tower-31.messagelabs.com!1474293906!6131442!1 X-Originating-IP: [156.151.31.81] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTU2LjE1MS4zMS44MSA9PiAyODgzMzk=\n X-StarScan-Received: X-StarScan-Version: 8.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 58224 invoked from network); 19 Sep 2016 14:05:07 -0000 Received: from userp1040.oracle.com (HELO userp1040.oracle.com) (156.151.31.81) by server-4.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 19 Sep 2016 14:05:07 -0000 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u8JE4sbQ003950 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 19 Sep 2016 14:04:55 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u8JE4s2x032088 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 19 Sep 2016 14:04:54 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u8JE4pHf024803; Mon, 19 Sep 2016 14:04:52 GMT Received: from localhost.localdomain (/172.58.217.56) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 19 Sep 2016 07:04:51 -0700 Date: Mon, 19 Sep 2016 10:04:41 -0400 From: Konrad Rzeszutek Wilk To: Julien Grall Message-ID: <20160919140436.GA5795@localhost.localdomain> References: <1474043908-12101-1-git-send-email-konrad.wilk@oracle.com> <1474043908-12101-2-git-send-email-konrad.wilk@oracle.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) X-Source-IP: userv0021.oracle.com [156.151.31.71] Cc: sstabellini@kernel.org, Andrew Cooper , Doug Goldstein , ross.lagerwall@citrix.com, Jan Beulich , xen-devel@lists.xenproject.org Subject: Re: [Xen-devel] [PATCH v4 01/16] arm/x86/common: Add HAS_[ALTERNATIVE|EX_TABLE] X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP On Mon, Sep 19, 2016 at 11:26:19AM +0200, Julien Grall wrote: > Hi Konrad, > > On 16/09/2016 18:38, Konrad Rzeszutek Wilk wrote: > > x86 implements all of them by default - and we just > > add two extra HAS_ variables to be declared in autoconf.h. > > > > ARM 64 only has alternative while ARM 32 has none of them. > > > > And while at it change the livepatch common code that > > would benefit from this. > > > > Suggested-by: Julien Grall > > Signed-off-by: Konrad Rzeszutek Wilk > > > > --- > > Cc: Stefano Stabellini > > Cc: Julien Grall > > Cc: Jan Beulich > > Cc: Andrew Cooper > > Cc: Doug Goldstein > > > > v2: First submission > > v3: Move the config options to common code > > Don't include in the file. > > Don't even include in the file as xen/Rules.mk automatically > > includes the config.h for every GCC invocation. > > v4: Depend on "arm64: s/ALTERNATIVE/HAS_ALTERNATIVE/" > > I can't find this patch on the ML. Did you forget to send it? Oh darn. Here it is inline: From 13bc2e2f1082ac72e89c598443781b5141412e9a Mon Sep 17 00:00:00 2001 From: Konrad Rzeszutek Wilk Date: Tue, 13 Sep 2016 12:45:14 -0400 Subject: [PATCH] arm64: s/ALTERNATIVE/HAS_ALTERNATIVE/ No functional change. Also move the entries in the Kconfig file to be more in alphabetical order. Suggested-by: Jan Beulich Signed-off-by: Konrad Rzeszutek Wilk --- Cc: Julien Grall Cc: Stefano Stabellini Cc: Jan Beulich Cc: Andrew Cooper Cc: Doug Goldstein v4: New submission. --- xen/arch/arm/Kconfig | 8 ++++---- xen/arch/arm/Makefile | 2 +- xen/arch/arm/xen.lds.S | 2 +- xen/include/asm-arm/alternative.h | 4 ++-- xen/include/asm-arm/cpuerrata.h | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig index 797c91f..b188293 100644 --- a/xen/arch/arm/Kconfig +++ b/xen/arch/arm/Kconfig @@ -12,8 +12,8 @@ config ARM_32 config ARM_64 def_bool y depends on 64BIT + select HAS_ALTERNATIVE select HAS_GICV3 - select ALTERNATIVE config ARM def_bool y @@ -42,16 +42,16 @@ config ACPI Advanced Configuration and Power Interface (ACPI) support for Xen is an alternative to device tree on ARM64. -config HAS_GICV3 +config HAS_ALTERNATIVE bool -config ALTERNATIVE +config HAS_GICV3 bool endmenu menu "ARM errata workaround via the alternative framework" - depends on ALTERNATIVE + depends on HAS_ALTERNATIVE config ARM64_ERRATUM_827319 bool "Cortex-A53: 827319: Data cache clean instructions might cause overlapping transactions to the interconnect" diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index 64fdf41..61e655b 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -4,7 +4,7 @@ subdir-y += platforms subdir-$(CONFIG_ARM_64) += efi subdir-$(CONFIG_ACPI) += acpi -obj-$(CONFIG_ALTERNATIVE) += alternative.o +obj-$(CONFIG_HAS_ALTERNATIVE) += alternative.o obj-y += bootfdt.o obj-y += cpu.o obj-y += cpuerrata.o diff --git a/xen/arch/arm/xen.lds.S b/xen/arch/arm/xen.lds.S index 3c5e7ba..47b910d 100644 --- a/xen/arch/arm/xen.lds.S +++ b/xen/arch/arm/xen.lds.S @@ -151,7 +151,7 @@ SECTIONS *(.initcall1.init) __initcall_end = .; -#ifdef CONFIG_ALTERNATIVE +#ifdef CONFIG_HAS_ALTERNATIVE . = ALIGN(4); __alt_instructions = .; *(.altinstructions) diff --git a/xen/include/asm-arm/alternative.h b/xen/include/asm-arm/alternative.h index 9f88fd9..6851217 100644 --- a/xen/include/asm-arm/alternative.h +++ b/xen/include/asm-arm/alternative.h @@ -5,7 +5,7 @@ #include #include -#ifdef CONFIG_ALTERNATIVE +#ifdef CONFIG_HAS_ALTERNATIVE #ifndef __ASSEMBLY__ @@ -154,7 +154,7 @@ int apply_alternatives(const struct alt_instr *start, const struct alt_instr *en #define ALTERNATIVE(oldinstr, newinstr, ...) \ _ALTERNATIVE_CFG(oldinstr, newinstr, __VA_ARGS__, 1) -#else /* !CONFIG_ALTERNATIVE */ +#else /* !CONFIG_HAS_ALTERNATIVE */ static inline void apply_alternatives_all(void) { diff --git a/xen/include/asm-arm/cpuerrata.h b/xen/include/asm-arm/cpuerrata.h index 5e35b4f..8c57c6a 100644 --- a/xen/include/asm-arm/cpuerrata.h +++ b/xen/include/asm-arm/cpuerrata.h @@ -7,7 +7,7 @@ void check_local_cpu_errata(void); -#ifdef CONFIG_ALTERNATIVE +#ifdef CONFIG_HAS_ALTERNATIVE #define CHECK_WORKAROUND_HELPER(erratum, feature, arch) \ static inline bool_t check_workaround_##erratum(void) \ @@ -27,7 +27,7 @@ static inline bool_t check_workaround_##erratum(void) \ } \ } -#else /* CONFIG_ALTERNATIVE */ +#else /* CONFIG_HAS_ALTERNATIVE */ #define CHECK_WORKAROUND_HELPER(erratum, feature, arch) \ static inline bool_t check_workaround_##erratum(void) \