From patchwork Mon Dec 18 16:49:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 122239 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp3068348qgn; Mon, 18 Dec 2017 08:52:22 -0800 (PST) X-Google-Smtp-Source: ACJfBotgKDAcacT2BMT+jLoEw2KZpxqS7Afj67zY6PJ7xWA8RceVBtwN8iGipHQs6/rC37svIM+1 X-Received: by 10.84.130.65 with SMTP id 59mr321975plc.161.1513615942839; Mon, 18 Dec 2017 08:52:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513615942; cv=none; d=google.com; s=arc-20160816; b=EGkQH9Y3plcSX0s7f93CbtLeOwNlZ612/mFv5cqUd1WEtsDQbZnoJldm2tRMjBcNs3 CQMY3WULq7yhaWNOoPROAxD6jZRrf+G5RrL61N5LzItg8GAS0ep10+8ExOHrKidFm7w0 tt/gznIkk3/rFUC5Vy06sQni7eC6LBy3d+1D5nkAfG8gkYCT081FAzfE5kP5GOFpiMsT 83N0IG/WZShj9AkRz8cgznn3GEjSPGAu6Xcc7QFgsBS5t5JM6ABLtDHKKQOl0GzprWEW CN5Jxi6EpZVycGAsxBblfjv/JK9NtyUxJyUlXsut8HZtZI9pLz48yvmmDN2A5s2rTt/W cibQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=KnbzM8H/xkeLwa1jo4pn4Cv/67bIa6NkQ3nB0RS8SOI=; b=xWlnm4fZ+w2XDJ2iZLNYoy6vylsFL9HoiLuVcCBs2trAqMpQS8l0bJeV6HU07Z7T7A BY5vYnTDL8VDdruPcrKyb5rLtHfnYXkZcvTxiH+4t60f+hnyfvXSuDQUL+uEeQhFgubM wRpdiD2n5jO1vh+4lYNkoR6Ob7gKX2beyxoSt0BfAjCz9mFWHLH5JWZGSFARsD+PW57D tZWdlOCdDCRPeZh4yiaymL2+t4bO2eutPPS0Ob6XQY/z6dA4NaAGyH74pCc55UJA9z0h T1AURHyAI25NT0VXU+sOCzIs0+e3oC0jxv2bdk3tHkFdGd4sUqtjQPxrnonko+BYgZkB 2i7w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g19si9658457pfb.379.2017.12.18.08.52.22; Mon, 18 Dec 2017 08:52:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965380AbdLRQwS (ORCPT + 28 others); Mon, 18 Dec 2017 11:52:18 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:52028 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936770AbdLRQwJ (ORCPT ); Mon, 18 Dec 2017 11:52:09 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue005 [212.227.15.129]) with ESMTPA (Nemesis) id 0MH3DS-1eDB6j00oM-00DoL6; Mon, 18 Dec 2017 17:51:03 +0100 From: Arnd Bergmann To: Thomas Gleixner , Ingo Molnar Cc: Arnd Bergmann , "H. Peter Anvin" , x86@kernel.org, Andy Lutomirski , Dave Hansen , Borislav Petkov , linux-kernel@vger.kernel.org Subject: [PATCH] x86/pti: hide unused pti_user_pagetable_walk_pte() function Date: Mon, 18 Dec 2017 17:49:37 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x8k+rezV1t8cG9NjJbMYuA4A gyuBWl/o8JmlQO37moiDcB3GCJ+UDztrzD/f3A== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The new pti_user_pagetable_walk_pte() function is not referenced when CONFIG_X86_VSYSCALL_EMULATION is disabled, so we need to either hide it or make the caller visible to gcc: arch/x86/mm/pti.c:204:15: error: 'pti_user_pagetable_walk_pte' defined but not used [-Werror=unused-function] Fixes: 9d2fdd3ff05d ("x86/pti: Map the vsyscall page if needed") Signed-off-by: Arnd Bergmann --- arch/x86/mm/pti.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.9.0 diff --git a/arch/x86/mm/pti.c b/arch/x86/mm/pti.c index fa22fdc73172..f7c8913d4daa 100644 --- a/arch/x86/mm/pti.c +++ b/arch/x86/mm/pti.c @@ -192,6 +192,7 @@ static pmd_t *pti_user_pagetable_walk_pmd(unsigned long address) return pmd_offset(pud, address); } +#ifdef CONFIG_X86_VSYSCALL_EMULATION /* * Walk the shadow copy of the page tables (optionally) trying to allocate * page table pages on the way down. Does not support large pages. @@ -233,6 +234,7 @@ static pte_t *pti_user_pagetable_walk_pte(unsigned long address) } return pte; } +#endif static void __init pti_clone_pmds(unsigned long start, unsigned long end, pmdval_t clear)