lkml.org 
[lkml]   [2023]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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
[unhandled content-type:application/pgp-keys][unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2023-03-27 00:19    [W:0.075 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site