Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp598464pxx; Mon, 26 Oct 2020 16:25:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyue2V9DGrP/M6+pWHVsrqB3gn0rMeHbuYXWr0OPdj1ghIEOuy6CBVgv7XfDFlX4BV66aaJ X-Received: by 2002:a05:6402:a45:: with SMTP id bt5mr2653646edb.101.1603754707208; Mon, 26 Oct 2020 16:25:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603754707; cv=none; d=google.com; s=arc-20160816; b=Oieh5lit6+4tjU3cuvUsSHL92DRsaIMBPUTwbniS8KQ5j73jTUZ9t7KcJ/j/pE2wlU 0qz4HmrTObyniS9LExNeqtY+JNwCIA9STKi91qYGUb021HPJ9rcP1qtivNVE5q+n5l1j 3GJVJ2jv7lypXhCBbEiHYNlxDyTHjMzxHfS9ydirM2DUL+hV8RDwIe7j/Wg3awmPtoUt tcguQHyTill9Bcm3WCHeuvFEXK0YHGMsDtoIGM3ei+bxzSiRudvqkSEQ3+dU/oSIK+mZ 586qMYUmFl2GniCAf7vicX2z9Xxi1SD5SI7GHwZvr+AZ+JlD+K9GzlV9Bi0prQswg0ac Ojvg== 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:references:cc :to:from:subject; bh=vdEizCNG5SwGV0FES1sa5b7kY1G/zUs7D8M3SMjw0pA=; b=B1EnqXXbr3maMAMnFtd92kJQSnfThjK2BZou+LDQqTIMwZpDx9x+EkruGl2gZ33Cga 2BW7QiHvY3rRPMORKho0E4aR7skCa7KYJecJD/mfq1mjbsjNzKv8psR6gzNDDeF2uu9H H+mEqtLnHjgAaG5vohE1U89YFiq30W3fwRbdVA+4ZjR5ZakOdZuTWgkrGS0TrEthFmmM MwLTvjsv8+T+7qrUgsrTmx1o8d1nWkcWnYx8TX5ec3PpBeHnZsZNsi7G1hOtD+UL78su ZB3YSpDHqTwKxQngYD8fJzSUy04EASjeYmGyyniQrcXmcZS0x+SArpZJ/Rja3t/L+WlI nVPA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n24si8059312ejz.503.2020.10.26.16.24.45; Mon, 26 Oct 2020 16:25:07 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1788104AbgJZRjv (ORCPT + 99 others); Mon, 26 Oct 2020 13:39:51 -0400 Received: from lizzard.sbs.de ([194.138.37.39]:53653 "EHLO lizzard.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2408264AbgJZRjv (ORCPT ); Mon, 26 Oct 2020 13:39:51 -0400 Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by lizzard.sbs.de (8.15.2/8.15.2) with ESMTPS id 09QHdAMQ004526 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 26 Oct 2020 18:39:10 +0100 Received: from [167.87.42.1] ([167.87.42.1]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 09QHd6EJ017254; Mon, 26 Oct 2020 18:39:06 +0100 Subject: [PATCH v2] x86: pat: Do not compile stubbed functions when X86_PAT is off From: Jan Kiszka To: Thomas Gleixner , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" Cc: x86 , Linux Kernel Mailing List References: <198c94a8-12ea-88e7-6f08-b3456473e5c3@siemens.com> <87r1z6xxh5.fsf@nanos.tec.linutronix.de> Message-ID: Date: Mon, 26 Oct 2020 18:39:06 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jan Kiszka Those are already provided by linux/io.h as stubs. The conflict remains invisible until someone would pull linux/io.h into 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, resource_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 = _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) -- 2.26.2