Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp942392pxb; Sun, 11 Apr 2021 02:23:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXnkDeo5uhmW/VWsO8n2982gnRjEgVhQaogTpGTgfFwzJNYC+I5KkDTKqSBPa6aBmegUI+ X-Received: by 2002:a17:90a:4005:: with SMTP id u5mr22702355pjc.6.1618133014145; Sun, 11 Apr 2021 02:23:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618133014; cv=none; d=google.com; s=arc-20160816; b=SmhdAdQwZ56I9NMGE7FZRrpk1xysf8+s5irRZqE+Rag6RTMSFItkPvE3sFT6x1evZK MWXfcKuRKbznnd+bmlkmiVtzg4V6dvPol3VcsrfDmS522fGoRTGirYd9ifAi2D1RA0Qc 1cj1314V5niAjhqyTAURgyNFVfVrPphS8CIY3Q17s2vp6xx2KctPupARyFKOZn5//mNR /83ysRRkE8MLrH0UpNtKl6ueWlv3lKbjgexfx6tYqnr1LGIUF3W1oWiFVKfeVRdmpqFO 5UXYj8yUUUaHVOJtJOi12r1e6F2Jl9b8izbopcFhVw0tPzY+Bv2aAf9Hwq2kVD6izcvy Kf0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=OgHXJfsqvPhu3Y0Ru3uuUQpxKeUyvaWgL7OYdWh2Bko=; b=NakoSdPHIOZX6jwdm67Vs+7yo/zzX/kOgTYmdMNGd1JKq7R5QjAzMJg4WlR/pRqANh jcP/k71BQuX69l6v35Kr6T9n3FOOlvlH4n/oKdShkoixDPkDTwONbrbOppCVW1XnNSHm Wl1FichKw95R08JysAVWELj6gyzY6I2YEPO4Y5NI760UiZXLQCe0eb4GLB+yt/VB3rDv 8/GPcm723AFAo8B6RCz3DkG4qnWL+F3fGjYcDPsrt4+hVALYFZ/1+U7gTUKKZeufkdtp IO3AaUnujiTBgJytZS2Xg0l1ly68CPmDIJ8bk1d+S8DmNOGIfE/FzMBH8N4lOfL0+srV 3y0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@web.de header.s=dbaedf251592 header.b=rZdx1+F0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=web.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bi12si3584375plb.2.2021.04.11.02.23.19; Sun, 11 Apr 2021 02:23:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@web.de header.s=dbaedf251592 header.b=rZdx1+F0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=web.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235211AbhDKJNT (ORCPT + 99 others); Sun, 11 Apr 2021 05:13:19 -0400 Received: from mout.web.de ([212.227.15.4]:43241 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229792AbhDKJNT (ORCPT ); Sun, 11 Apr 2021 05:13:19 -0400 X-Greylist: delayed 3002 seconds by postgrey-1.27 at vger.kernel.org; Sun, 11 Apr 2021 05:13:18 EDT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1618132353; bh=3rMIJcb5GjWas/Zd/eJWhyvFbgoz2c0PEFfSHFr1sRM=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=rZdx1+F0tuEYmTICd2/nBRtJ0jYg9HhGwQ4F6ekjTWrSicYt9d8ZWC5InRKiYy4SC r+GInBMZu0l4qPIwvW4x7Aei3qZYrabnkB43tnt9fX/fE7XMZJiITYgdcmp6kSgB/v ojMFEW8KwQZBDyTjO6ix0rFQYyAt6/z1S+RPtomg= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from [192.168.10.10] ([88.215.87.53]) by smtp.web.de (mrweb001 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MLgCx-1lVFA21jox-000v9Z; Sun, 11 Apr 2021 11:12:33 +0200 Subject: Re: [PATCH v2] x86: pat: Do not compile stubbed functions when X86_PAT is off To: Borislav Petkov Cc: Thomas Gleixner , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Ingo Molnar , "H. Peter Anvin" , x86 , Linux Kernel Mailing List References: <198c94a8-12ea-88e7-6f08-b3456473e5c3@siemens.com> <87r1z6xxh5.fsf@nanos.tec.linutronix.de> <802cefc7-b475-c6d6-ece7-8232d7f3891d@web.de> <20210411091056.GA14022@zn.tnic> From: Jan Kiszka Message-ID: <7c606ebd-e8d8-0853-bab5-5e77b1359dcc@web.de> Date: Sun, 11 Apr 2021 11:12:32 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <20210411091056.GA14022@zn.tnic> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:BhdpBvpVM4hm1VmZgPSIMtkVJHUoiYWZXfXSWabqqyHr6d+hp1L l1E28nRJye3N+BgNiG+6vhsZhPndb0lMV1beddHjL2OLSb4V+tbNmpxndQ0rxDE2ZJzSrl+ 560uNNDFeKYjdI6dVUq7MPoK1CKRFQvpQW+dWg5WQr8dKk4LmhS5FI+yy5gSYhmQiWNGZBP ZkjvmYI3dtQtEfjsfI47Q== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V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BngGDKDI2j4 Kr/Z+M84CWHZkXKYvq0uWhm7kUTEgyEnLPn7te4FK74h9ga7/WNM1UKzXyLiQYy2lgCQeBN5F 1ajze0xN/igek+AukaoQFRyAhVijevPk6EAtBbLHbToMZQOlsPFwf7xWv4l9ZctgJO1hyJoHZ sd4YseZKeqo4UuHRPJb5rieb6MMA6JCWC66LSlICksF31kWXkpBZi5B8LzCyq/nDyxpvE= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11.04.21 11:10, Borislav Petkov wrote: > On Sun, Apr 11, 2021 at 10:22:19AM +0200, Jan Kiszka wrote: >> On 26.10.20 18:39, Jan Kiszka wrote: >>> From: Jan Kiszka >>> >>> Those are already provided by linux/io.h as stubs. >>> >>> The conflict remains invisible until someone would pull linux/io.h int= o >>> memtype.c. >>> >>> Signed-off-by: Jan Kiszka >>> --- >>> >>> Change in v2: >>> - correct commit message >>> >>> arch/x86/mm/pat/memtype.c | 2 ++ >>> 1 file changed, 2 insertions(+) >>> >>> diff --git a/arch/x86/mm/pat/memtype.c b/arch/x86/mm/pat/memtype.c >>> index 8f665c352bf0..41a4ac585af3 100644 >>> --- a/arch/x86/mm/pat/memtype.c >>> +++ b/arch/x86/mm/pat/memtype.c >>> @@ -800,6 +800,7 @@ void memtype_free_io(resource_size_t start, resour= ce_size_t end) >>> memtype_free(start, end); >>> } >>> >>> +#ifdef CONFIG_X86_PAT >>> int arch_io_reserve_memtype_wc(resource_size_t start, resource_size_t= size) >>> { >>> enum page_cache_mode type =3D _PAGE_CACHE_MODE_WC; >>> @@ -813,6 +814,7 @@ void arch_io_free_memtype_wc(resource_size_t start= , resource_size_t size) >>> memtype_free_io(start, start + size); >>> } >>> EXPORT_SYMBOL(arch_io_free_memtype_wc); >>> +#endif >>> >>> pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, >>> unsigned long size, pgprot_t vma_prot) >>> >> >> What happened to this? > > What is this patch and your other asm/proto.h thing fixing? > > Looks like you're using kernel headers in something else and don't want > to include the whole world thus those fixes... so that you can include > upstream kernel headers without having to touch them... > > Or am I way off base here? > The patches are coming from downstream usage, yes, but I think the solutions are relevant cleanups for upstream as well. Jan