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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F37CC433EF for ; Wed, 18 May 2022 13:45:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238145AbiERNp0 (ORCPT ); Wed, 18 May 2022 09:45:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238104AbiERNpS (ORCPT ); Wed, 18 May 2022 09:45:18 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FD7919CEE4 for ; Wed, 18 May 2022 06:45:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=zHCFhRbJ5KoBP25J/EVA30nZjwejxa0UyBXdd6YAaF4=; b=OfkWNCZWsoLrWqd56zXTPhczAR Xu6/rWTNKrHA5cVITymYCU7C4/BuduKoFrwDVkllDtDmTwQwvpwjUrpdfRvTvtZo8yvfgrRuSRptz dGZzY66n3hdKJFC0dVStt35QHnrIiK2a4cQzs1nuLJ6CLQydPerstjr5JbjRj7wd7gXMeR4XR6Fyl lTd2H2/zzj/WYjDnSh3AMB/sqU3wUqKqGTptHwfo0ecsQnNijGsQ3L3sW4OrscH+mwB3FG0Q48r3G KNYWIuEvYvH1LmuYE5O//C/SHYngGuQagyk3HMLrbcTMYU/L6AP1FKnFK27sU4snqP8olMxHVwBBt SSqd4aWA==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nrJzC-002LqV-JH; Wed, 18 May 2022 13:45:10 +0000 Date: Wed, 18 May 2022 06:45:10 -0700 From: Christoph Hellwig To: Juergen Gross Cc: xen-devel@lists.xenproject.org, x86@kernel.org, linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, jbeulich@suse.com, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Andy Lutomirski , Peter Zijlstra , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter Subject: Re: [PATCH 2/2] x86/pat: add functions to query specific cache mode availability Message-ID: References: <20220503132207.17234-1-jgross@suse.com> <20220503132207.17234-3-jgross@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220503132207.17234-3-jgross@suse.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 03, 2022 at 03:22:07PM +0200, Juergen Gross wrote: > Some drivers are using pat_enabled() in order to test availability of > special caching modes (WC and UC-). This will lead to false negatives > in case the system was booted e.g. with the "nopat" variant and the > BIOS did setup the PAT MSR supporting the queried mode, or if the > system is running as a Xen PV guest. > > Add test functions for those caching modes instead and use them at the > appropriate places. > > For symmetry reasons export the already existing x86_has_pat_wp() for > modules, too. No, we never export unused functionality.