Messages in this thread | | | Date | Mon, 13 Feb 2023 07:19:18 +0100 | From | Juergen Gross <> | 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 [unhandled content-type:application/pgp-keys][unhandled content-type:application/pgp-signature] | |