From patchwork Fri Sep 6 13:13:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Masami Hiramatsu (Google)" X-Patchwork-Id: 11135281 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E823D13BD for ; Fri, 6 Sep 2019 13:16:40 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id C21EF206BB for ; Fri, 6 Sep 2019 13:16:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="C6NY01TI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C21EF206BB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none 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 1i6E3o-0000oQ-E6; Fri, 06 Sep 2019 13:13:56 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1i6E3m-0000oC-Ow for xen-devel@lists.xenproject.org; Fri, 06 Sep 2019 13:13:54 +0000 X-Inumbo-ID: 2d0f1d88-d0a8-11e9-abf5-12813bfff9fa Received: from mail.kernel.org (unknown [198.145.29.99]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 2d0f1d88-d0a8-11e9-abf5-12813bfff9fa; Fri, 06 Sep 2019 13:13:54 +0000 (UTC) Received: from localhost.localdomain (NE2965lan1.rev.em-net.ne.jp [210.141.244.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 00E2E206BB; Fri, 6 Sep 2019 13:13:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567775633; bh=rZzxI9XArt0wbskwU2r8uJHAgPdmUcSFpX/eT3zQGMU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C6NY01TImkhzgeTZiksXsH1gnuCvp59kbibTxZmzs4RbcDHmv/N8J/RTAVQ1u2WUM gNBp8lMkjd6IlByDMIOGHwx0Z7DL/Xa6VMvWQykvlni9e1vmH4ZVGHPTnbOotvK1oO Lmo+YFCSuclG7ZsK7KMSa+YJj0y4flOxq8/Qb3oc= From: Masami Hiramatsu To: Ingo Molnar Date: Fri, 6 Sep 2019 22:13:48 +0900 Message-Id: <156777562873.25081.2288083344657460959.stgit@devnote2> X-Mailer: git-send-email 2.20.1 In-Reply-To: <156777561745.25081.1205321122446165328.stgit@devnote2> References: <156777561745.25081.1205321122446165328.stgit@devnote2> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Subject: [Xen-devel] [PATCH -tip v4 1/4] x86/asm: Allow to pass macros to __ASM_FORM() 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: Juergen Gross , Stefano Stabellini , Peter Zijlstra , Andrew Cooper , Randy Dunlap , x86@kernel.org, linux-kernel@vger.kernel.org, Borislav Petkov , Josh Poimboeuf , xen-devel@lists.xenproject.org, Boris Ostrovsky Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Use __stringify() at __ASM_FORM() so that user can pass code including macros to __ASM_FORM(). Signed-off-by: Masami Hiramatsu --- 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__