[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4dc7d5e6-5b35-31ae-b5e9-7c77ed42383b@intel.com>
Date: Tue, 4 Jan 2022 17:38:25 -0800
From: Dave Hansen <dave.hansen@...el.com>
To: "Kirill A. Shutemov" <kirill@...temov.name>
Cc: Borislav Petkov <bp@...en8.de>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Tom Lendacky <thomas.lendacky@....com>, tglx@...utronix.de,
mingo@...hat.com, luto@...nel.org, peterz@...radead.org,
sathyanarayanan.kuppuswamy@...ux.intel.com, aarcange@...hat.com,
ak@...ux.intel.com, dan.j.williams@...el.com, david@...hat.com,
hpa@...or.com, jgross@...e.com, jmattson@...gle.com,
joro@...tes.org, jpoimboe@...hat.com, knsathya@...nel.org,
pbonzini@...hat.com, sdeep@...are.com, seanjc@...gle.com,
tony.luck@...el.com, vkuznets@...hat.com, wanpengli@...cent.com,
x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 19/26] x86/tdx: Make pages shared in ioremap()
On 1/4/22 4:57 PM, Kirill A. Shutemov wrote:
>> My read of STRICT_MM_TYPECHECKS was that "typedef unsigned long
>> pgprot_t" produces better code, but "typedef struct { unsigned long
>> pgprot; } pgprot_t;" produces better type checking.
> Apart from pgprot_t, __pgprot() and pgrot_val() helpers are defined
> differently depending on STRICT_MM_TYPECHECKS.
>
>> I just compiled these patches on sparc with no issues.
> Hm. I can't see how
>
> #define pgprot_val(x) (x)
>
> can work to access value for the pgprot_t defined as a struct.
Oh, I must just be compiling with the strict type checks on all the
time. I do really wonder if these are useful these days or if the hacks
were for ancient compilers.
In any case, this would be pretty easy to fix by just removing the
!STRICT_MM_TYPECHECKS pgprot_val() and defning the STRICT_MM_TYPECHECKS
universally.
Powered by blists - more mailing lists