From mboxrd@z Thu Jan 1 00:00:00 1970 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id B26B7C433EF for ; Mon, 25 Apr 2022 07:52:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 18B4C8D0013; Mon, 25 Apr 2022 03:52:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 13B938D0006; Mon, 25 Apr 2022 03:52:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 002AD8D0013; Mon, 25 Apr 2022 03:52:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.28]) by kanga.kvack.org (Postfix) with ESMTP id E546A8D0006 for ; Mon, 25 Apr 2022 03:52:36 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id BD1AC28550 for ; Mon, 25 Apr 2022 07:52:36 +0000 (UTC) X-FDA: 79394634312.02.626AA7E Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf19.hostedemail.com (Postfix) with ESMTP id CDBC11A0039 for ; Mon, 25 Apr 2022 07:52:32 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 127D7B81161; Mon, 25 Apr 2022 07:52:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14306C385A7; Mon, 25 Apr 2022 07:52:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650873152; bh=Fg1WqVAMNY8WOgqmVB7ITNAhO7ifkkAD/qCAn6UEtfQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oSFXlItEEANiPoHLNWdCfffltXjAiNHs7oGX1UrOdmq0rypik/36SmrRxzp7VlX23 H1My8g+yi35giPVFpJD0Gm3ort/FjDvu2v1UR1hF1ly+rFnkZfnUSToQMRwZBX9UM0 iCXwgGFWFPsrvCfOemhTmyQotPmrQwaxBb6wHS4LOGdQ3BLrxpf61e9VZO6RiWPwnK zelJ5GAEzCEG6/Vnm7mOjHeFztYvTr+lg596r2QGxCGMqb6K4QtF6gVVDWxo+iec+5 HcsNQ0ITXgV7z+V52LEbQP3gf4qMJffFW6LnL5gdIjFvpmJ9agE3x1TfJDaxThyosR N8VK7aN8ON6iw== Date: Mon, 25 Apr 2022 10:52:22 +0300 From: Mike Rapoport To: "Kirill A. Shutemov" Cc: Borislav Petkov , Andy Lutomirski , Sean Christopherson , Andrew Morton , Joerg Roedel , Ard Biesheuvel , Andi Kleen , Kuppuswamy Sathyanarayanan , David Rientjes , Vlastimil Babka , Tom Lendacky , Thomas Gleixner , Peter Zijlstra , Paolo Bonzini , Ingo Molnar , Varad Gautam , Dario Faggioli , Dave Hansen , Brijesh Singh , David Hildenbrand , x86@kernel.org, linux-mm@kvack.org, linux-coco@lists.linux.dev, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCHv5 01/12] x86/boot/: Centralize __pa()/__va() definitions Message-ID: References: <20220425033934.68551-1-kirill.shutemov@linux.intel.com> <20220425033934.68551-2-kirill.shutemov@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220425033934.68551-2-kirill.shutemov@linux.intel.com> Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=oSFXlItE; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf19.hostedemail.com: domain of rppt@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=rppt@kernel.org X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: CDBC11A0039 X-Rspam-User: X-Stat-Signature: pui1p7fompxjqza6h7amzaafjzffh6so X-HE-Tag: 1650873152-987372 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Apr 25, 2022 at 06:39:23AM +0300, Kirill A. Shutemov wrote: > Replace multiple __pa()/__va() definitions with a single one in misc.h. > > Signed-off-by: Kirill A. Shutemov Reviewed-by: Mike Rapoport > --- > arch/x86/boot/compressed/ident_map_64.c | 8 -------- > arch/x86/boot/compressed/misc.h | 9 +++++++++ > arch/x86/boot/compressed/sev.c | 2 -- > 3 files changed, 9 insertions(+), 10 deletions(-) > > diff --git a/arch/x86/boot/compressed/ident_map_64.c b/arch/x86/boot/compressed/ident_map_64.c > index f7213d0943b8..fe523ee1a19f 100644 > --- a/arch/x86/boot/compressed/ident_map_64.c > +++ b/arch/x86/boot/compressed/ident_map_64.c > @@ -8,14 +8,6 @@ > * Copyright (C) 2016 Kees Cook > */ > > -/* > - * Since we're dealing with identity mappings, physical and virtual > - * addresses are the same, so override these defines which are ultimately > - * used by the headers in misc.h. > - */ > -#define __pa(x) ((unsigned long)(x)) > -#define __va(x) ((void *)((unsigned long)(x))) > - > /* No PAGE_TABLE_ISOLATION support needed either: */ > #undef CONFIG_PAGE_TABLE_ISOLATION > > diff --git a/arch/x86/boot/compressed/misc.h b/arch/x86/boot/compressed/misc.h > index ea71cf3d64e1..9f7154a30d37 100644 > --- a/arch/x86/boot/compressed/misc.h > +++ b/arch/x86/boot/compressed/misc.h > @@ -19,6 +19,15 @@ > /* cpu_feature_enabled() cannot be used this early */ > #define USE_EARLY_PGTABLE_L5 > > +/* > + * Boot stub deals with identity mappings, physical and virtual addresses are > + * the same, so override these defines. > + * > + * will not define them if they are already defined. > + */ > +#define __pa(x) ((unsigned long)(x)) > +#define __va(x) ((void *)((unsigned long)(x))) > + > #include > #include > #include > diff --git a/arch/x86/boot/compressed/sev.c b/arch/x86/boot/compressed/sev.c > index 28bcf04c022e..4dcea0bc4fe4 100644 > --- a/arch/x86/boot/compressed/sev.c > +++ b/arch/x86/boot/compressed/sev.c > @@ -106,9 +106,7 @@ static enum es_result vc_read_mem(struct es_em_ctxt *ctxt, > } > > #undef __init > -#undef __pa > #define __init > -#define __pa(x) ((unsigned long)(x)) > > #define __BOOT_COMPRESSED > > -- > 2.35.1 > -- Sincerely yours, Mike.