From patchwork Thu May 12 13:56:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maximilian Heyne X-Patchwork-Id: 12847735 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5B1FDC433EF for ; Thu, 12 May 2022 13:58:26 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.327683.550528 (Exim 4.92) (envelope-from ) id 1np9KV-0005Hb-Bu; Thu, 12 May 2022 13:58:11 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 327683.550528; Thu, 12 May 2022 13:58:11 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1np9KV-0005Gj-6p; Thu, 12 May 2022 13:58:11 +0000 Received: by outflank-mailman (input) for mailman id 327683; Thu, 12 May 2022 13:58:10 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1np9KU-0005De-5V for xen-devel@lists.xenproject.org; Thu, 12 May 2022 13:58:10 +0000 Received: from smtp-fw-6002.amazon.com (smtp-fw-6002.amazon.com [52.95.49.90]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 86e4e187-d1fb-11ec-8fc4-03012f2f19d4; Thu, 12 May 2022 15:57:57 +0200 (CEST) Received: from iad12-co-svc-p1-lb1-vlan2.amazon.com (HELO email-inbound-relay-pdx-2c-d9fba5dd.us-west-2.amazon.com) ([10.43.8.2]) by smtp-border-fw-6002.iad6.amazon.com with ESMTP; 12 May 2022 13:57:52 +0000 Received: from EX13D08EUC001.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan2.pdx.amazon.com [10.236.137.194]) by email-inbound-relay-pdx-2c-d9fba5dd.us-west-2.amazon.com (Postfix) with ESMTPS id 5307941DA5; Thu, 12 May 2022 13:57:50 +0000 (UTC) Received: from EX13MTAUEE002.ant.amazon.com (10.43.62.24) by EX13D08EUC001.ant.amazon.com (10.43.164.184) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Thu, 12 May 2022 13:57:48 +0000 Received: from dev-dsk-mheyne-1b-c1524648.eu-west-1.amazon.com (10.15.60.66) by mail-relay.amazon.com (10.43.62.224) with Microsoft SMTP Server id 15.0.1497.32 via Frontend Transport; Thu, 12 May 2022 13:57:48 +0000 Received: by dev-dsk-mheyne-1b-c1524648.eu-west-1.amazon.com (Postfix, from userid 5466572) id 01C5341131; Thu, 12 May 2022 13:57:48 +0000 (UTC) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Inumbo-ID: 86e4e187-d1fb-11ec-8fc4-03012f2f19d4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.de; i=@amazon.de; q=dns/txt; s=amazon201209; t=1652363889; x=1683899889; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=TwU6CtF1V9/2Y57AY/B4As4rfmtIlL8LhHI2uYJkLIs=; b=hU1FQ2GESOUzT3kx9A0eSnDbmLrgdyNRIv2iYOGL90OR9SsSDPe/xajw Dslzd8Oj4ElADdqlKZFoY4WR0mRbRycA+lBvOQ4F9PWbx9QbYp3GKf08V 9U/ZDIVd7MzkFI6pcADarLQo8fLCjeq7Vsqb8xc6VvVMrTs3hAUscu8XV A=; X-IronPort-AV: E=Sophos;i="5.91,220,1647302400"; d="scan'208";a="201008279" From: Maximilian Heyne To: CC: Masami Hiramatsu , Peter Zijlstra , Juergen Gross , , Boris Ostrovsky , Ingo Molnar , Stefano Stabellini , Andrew Cooper , Borislav Petkov , , Randy Dunlap , Josh Poimboeuf , Maximilian Heyne , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Paolo Bonzini , =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Sasha Levin , , Subject: [PATCH 1/4] x86/asm: Allow to pass macros to __ASM_FORM() Date: Thu, 12 May 2022 13:56:48 +0000 Message-ID: <20220512135654.119791-2-mheyne@amazon.de> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220512135654.119791-1-mheyne@amazon.de> References: <20220512135654.119791-1-mheyne@amazon.de> MIME-Version: 1.0 Precedence: Bulk From: Masami Hiramatsu commit f7919fd943abf0c77aed4441ea9897a323d132f5 upstream Use __stringify() at __ASM_FORM() so that user can pass code including macros to __ASM_FORM(). Signed-off-by: Masami Hiramatsu Signed-off-by: Peter Zijlstra (Intel) Cc: Juergen Gross Cc: x86@kernel.org Cc: Boris Ostrovsky Cc: Ingo Molnar Cc: Stefano Stabellini Cc: Andrew Cooper Cc: Borislav Petkov Cc: xen-devel@lists.xenproject.org Cc: Randy Dunlap Cc: Josh Poimboeuf Link: https://lkml.kernel.org/r/156777562873.25081.2288083344657460959.stgit@devnote2 Signed-off-by: Maximilian Heyne Cc: stable@vger.kernel.org # 5.4.x --- arch/x86/include/asm/asm.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/x86/include/asm/asm.h b/arch/x86/include/asm/asm.h index 3ff577c0b102..1b563f9167ea 100644 --- a/arch/x86/include/asm/asm.h +++ b/arch/x86/include/asm/asm.h @@ -7,9 +7,11 @@ # define __ASM_FORM_RAW(x) x # define __ASM_FORM_COMMA(x) x, #else -# define __ASM_FORM(x) " " #x " " -# define __ASM_FORM_RAW(x) #x -# define __ASM_FORM_COMMA(x) " " #x "," +#include + +# define __ASM_FORM(x) " " __stringify(x) " " +# define __ASM_FORM_RAW(x) __stringify(x) +# define __ASM_FORM_COMMA(x) " " __stringify(x) "," #endif #ifndef __x86_64__