From patchwork Fri Sep 22 08:12:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 143457 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp5600659vqi; Fri, 22 Sep 2023 07:04:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFlQo8rObW8GI2rhVmmR0dcf74i5v/a1s5rTXtYh+4dOqUAj5uSB125VsUrhgHLiL3rZ8dC X-Received: by 2002:a17:90b:f12:b0:26f:b733:6887 with SMTP id br18-20020a17090b0f1200b0026fb7336887mr7907398pjb.27.1695391493815; Fri, 22 Sep 2023 07:04:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695391493; cv=none; d=google.com; s=arc-20160816; b=hJ9OuEUGpmIeurE6gzofjHpi/sc0t8777NRR9omFe2qirik1hVdd+ZjDSO7Wk1y6LA MsyUCws3T+y1Etes6nuGfaf4Ejz/MwRh2L1IH/+g2jgh84CWpPhTnwcRsULzrIeXo+Gb 2brvxtg3sI6LMEEjbNe2POCipKPxlVdH6WR+dcXigsQGqfHmdB3pdZK7OFGRXDVGBhPh qoVcE2CYxCPpDzhCXYxpmoG+LqR2ch62Ytc0cHhBBxNNcuOPFuO4BDIgJQjMb9bqHxQd PtsZIGOvbNeUWziGCf1dPQteN7WIBkJGCVhNo5pgZlQRtyi5OkgQ88oQ7UTts3Odu4Jk Dl0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:cc:subject:to:reply-to:sender:from :dkim-signature:dkim-signature:date; bh=1bPKF4uXOWTIoSsqQJPw+pS2Gpmo355eDwJrUxOtjwg=; fh=56ea9MC9/40V/nD0NWXHQM8TJBogw0VBzoE8sbcRL1c=; b=L0U6pOklMmT+StRcZbrti9th83gI6oQDwrXDE60/BxooLPk1MCFUhWnevW9dXkv+2s WxSBg7NBVllk8NEBMREFbQDqkVcksoUoY6Tllf/dcV4Pe+NvroAGXiY1b3SvNbt9coku JfdMfxFrsUOJbxQEpZnuPg+9Uv/iXqDrgY/Xd5ZsLMRuppMrDPlCU1CrPHIUaGLjBlqv GvAkw4K0dVXHUDP2ib0Me0luHzApCGgZOCoOo872pzrJYh09aFFZOa+kbUD0cZyaRJ4L FuKljHJiCSQy7WKtYuM+RMt9M4ZVEM3j8tGFYYZjqNJHw5QSeGG+qA35emI75OhyCdr/ o+3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=xhk+63Cc; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id r7-20020a17090a690700b00274001b10e8si4117180pjj.112.2023.09.22.07.04.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 07:04:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=xhk+63Cc; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 3FF6C83B0059; Fri, 22 Sep 2023 01:14:23 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232689AbjIVIOO (ORCPT + 30 others); Fri, 22 Sep 2023 04:14:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232046AbjIVIN6 (ORCPT ); Fri, 22 Sep 2023 04:13:58 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1B9310CE; Fri, 22 Sep 2023 01:12:55 -0700 (PDT) Date: Fri, 22 Sep 2023 08:12:53 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1695370374; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1bPKF4uXOWTIoSsqQJPw+pS2Gpmo355eDwJrUxOtjwg=; b=xhk+63Cch3cU+uADvC7IlKAW251DYefsBjQKhB36n+0f+s9hGNNL8CJ8PZAsuAyXG79kvS PBgqDAtVuPyuLvshILyqxY4+nauqbn76tvuy8BR9Xut7VdIaURnAvcsBpccLCd6FVa7+eI TybtSMBNNDTYAjt7dm3/ep/3WFTtlFSC6RXjygdKX3DK1fmTDNJtv7St12frs8pXtjHd+X nN0GhK5D9rCxaLjGSMxgKhD8dEnuxRRD3g9v+lju4tvz8mUshzK/atXlrIFtvcc4InucZz Eb93rkDKfS7kIvZEmdpz9sYfRTu93Vlr9j5fOYZBGrP2qwZSdg85sK92vtl27g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1695370374; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1bPKF4uXOWTIoSsqQJPw+pS2Gpmo355eDwJrUxOtjwg=; b=ze/9UF+wpgyZYw2ONIWYn5fw3d5ljqxSZyOkg7xFD8WJEhE6qu8VEY+zntInDYMve+HdNQ c0711NAZvSCtjeBA== From: "tip-bot2 for Ingo Molnar" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/mm] x86/mm: Move arch_memory_failure() and arch_is_platform_page() definitions from to Cc: Ingo Molnar , linux-kernel@vger.kernel.org, x86@kernel.org MIME-Version: 1.0 Message-ID: <169537037363.27769.8863382611473061727.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 22 Sep 2023 01:14:23 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777746830918338003 X-GMAIL-MSGID: 1777746830918338003 The following commit has been merged into the x86/mm branch of tip: Commit-ID: d73a105586434ca919a1a487a467e5664f9300c4 Gitweb: https://git.kernel.org/tip/d73a105586434ca919a1a487a467e5664f9300c4 Author: Ingo Molnar AuthorDate: Fri, 22 Sep 2023 09:29:59 +02:00 Committer: Ingo Molnar CommitterDate: Fri, 22 Sep 2023 09:32:03 +02:00 x86/mm: Move arch_memory_failure() and arch_is_platform_page() definitions from to relies on these definitions being included first, which is true currently due to historic header spaghetti, but in the future will not guaranteed to be included by the MM code. Move these definitions over into a suitable MM header. This is a preparatory patch for x86 header dependency simplifications and reductions. Signed-off-by: Ingo Molnar Cc: linux-kernel@vger.kernel.org --- arch/x86/include/asm/pgtable.h | 8 ++++++++ arch/x86/include/asm/processor.h | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index d6ad98c..1e12e61 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h @@ -1708,6 +1708,14 @@ static inline bool pud_user_accessible_page(pud_t pud) } #endif +#ifdef CONFIG_X86_SGX +int arch_memory_failure(unsigned long pfn, int flags); +#define arch_memory_failure arch_memory_failure + +bool arch_is_platform_page(u64 paddr); +#define arch_is_platform_page arch_is_platform_page +#endif + #endif /* __ASSEMBLY__ */ #endif /* _ASM_X86_PGTABLE_H */ diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index 0086920..1b2b138 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h @@ -726,14 +726,6 @@ enum mds_mitigations { MDS_MITIGATION_VMWERV, }; -#ifdef CONFIG_X86_SGX -int arch_memory_failure(unsigned long pfn, int flags); -#define arch_memory_failure arch_memory_failure - -bool arch_is_platform_page(u64 paddr); -#define arch_is_platform_page arch_is_platform_page -#endif - extern bool gds_ucode_mitigated(void); #endif /* _ASM_X86_PROCESSOR_H */