[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <469f2d34-7a14-b3c1-66d2-18557a9700a9@suse.com>
Date: Mon, 13 Feb 2023 07:19:18 +0100
From: Juergen Gross <jgross@...e.com>
To: Borislav Petkov <bp@...en8.de>
Cc: linux-kernel@...r.kernel.org, x86@...nel.org,
lists@...dbynature.de, mikelley@...rosoft.com,
torvalds@...ux-foundation.org,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH v2 1/8] x86/mtrr: split off physical address size
calculation
On 11.02.23 11:08, Borislav Petkov wrote:
> On Thu, Feb 09, 2023 at 08:22:13AM +0100, Juergen Gross wrote:
>> @@ -654,42 +638,54 @@ void __init mtrr_bp_init(void)
>> (boot_cpu_data.x86_stepping == 0x3 ||
>> boot_cpu_data.x86_stepping == 0x4))
>> phys_addr = 36;
>> -
>> - size_or_mask = SIZE_OR_MASK_BITS(phys_addr);
>> - size_and_mask = ~size_or_mask & 0xfffff00000ULL;
>> } else if (boot_cpu_data.x86_vendor == X86_VENDOR_CENTAUR &&
>> boot_cpu_data.x86 == 6) {
>> /*
>> * VIA C* family have Intel style MTRRs,
>> * but don't support PAE
>> */
>> - size_or_mask = SIZE_OR_MASK_BITS(32);
>> - size_and_mask = 0;
>> phys_addr = 32;
>> }
>> + }
>> +
>> + size_or_mask = ~((1ULL << ((phys_addr) - PAGE_SHIFT)) - 1);
>
> Too many brackets because you've taken the macro and put in the argument
> directly.
Oh, yes.
> In any case, reviewing patches which do code movement *and* changes in
> the same diff is always unnecessarily nasty. Please do the mechanical
> code movement only - cleanups come ontop.
Okay.
Juergen
Download attachment "OpenPGP_0xB0DE9DD628BF132F.asc" of type "application/pgp-keys" (3099 bytes)
Download attachment "OpenPGP_signature" of type "application/pgp-signature" (496 bytes)
Powered by blists - more mailing lists