2017-06-01 07:49:28

by Ian W MORRISON

[permalink] [raw]
Subject: Re: [tip:x86/urgent] x86/PAT: Fix Xorg regression on CPUs that don't support PAT

On 31 May 2017 at 10:53, Doug Smythies <[email protected]> wrote:
> Note Before:
> I might not have the address list correct, as I have re-created this
> e-mail from the web page archive, having found the thread after bisecting the
> kernel.
>
> On 2017.05.29 18:50:57 -0400 (EDT) Mikulas Patocka wrote:
>> On Sun, 28 May 2017, Andy Lutomirski wrote:
>>> On Sun, May 28, 2017 at 11:18 AM, Bernhard Held <[email protected]> wrote:
>>>> Hi,
>>>>
>>>> this patch breaks the boot of my kernel. The last message is "Booting
>>>> the kernel.".
>
> It breaks my kernel boot also, and I know of at least two others with
> the same, or similar, problem as of kernel 4.12-rc3.
>

Just to add that I cannot boot v4.12-rc3 kernel with any Intel Atom
(BYT and CHT) Intel Compute Sticks. Adding 'earlyprintk=efi' confirms
kernel panic with
[ 0.000000] Kernel panic - not syncing: x86/PAT: PAT enabled, but not
supported by secondary CPU


<snip>


2017-06-01 14:48:49

by Ian W MORRISON

[permalink] [raw]
Subject: Re: [tip:x86/urgent] x86/PAT: Fix Xorg regression on CPUs that don't support PAT

On 6/1/17 5:49 PM, Ian W MORRISON wrote:
> On 31 May 2017 at 10:53, Doug Smythies <[email protected]> wrote:
>> Note Before:
>> I might not have the address list correct, as I have re-created this
>> e-mail from the web page archive, having found the thread after bisecting the
>> kernel.
>>
>> On 2017.05.29 18:50:57 -0400 (EDT) Mikulas Patocka wrote:
>>> On Sun, 28 May 2017, Andy Lutomirski wrote:
>>>> On Sun, May 28, 2017 at 11:18 AM, Bernhard Held <[email protected]> wrote:
>>>>> Hi,
>>>>>
>>>>> this patch breaks the boot of my kernel. The last message is "Booting
>>>>> the kernel.".
>>
>> It breaks my kernel boot also, and I know of at least two others with
>> the same, or similar, problem as of kernel 4.12-rc3.
>>
>
> Just to add that I cannot boot v4.12-rc3 kernel with any Intel Atom
> (BYT and CHT) Intel Compute Sticks. Adding 'earlyprintk=efi' confirms
> kernel panic with
> [ 0.000000] Kernel panic - not syncing: x86/PAT: PAT enabled, but not
> supported by secondary CPU
>
>
> <snip>
>

Confirmed that following patch fixes boot of v4.12-rc3 for Intel Atom Compute Sticks:

[PATCH] Fix X86_FEATURE_PAT regression bug

Early kernel panic caused by checking for X86_FEATURE_PAT when enabled but not supported by secondary CPU.

Fixes cbed27cdf0e3 ("x86/PAT: Fix Xorg regression on CPUs that don't support PAT")
Signed-off-by: Ian W Morrison <[email protected]>
---
arch/x86/mm/pat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
index 83a59a6..c537bfb 100644
--- a/arch/x86/mm/pat.c
+++ b/arch/x86/mm/pat.c
@@ -234,7 +234,7 @@ static void pat_bsp_init(u64 pat)

static void pat_ap_init(u64 pat)
{
- if (!this_cpu_has(X86_FEATURE_PAT)) {
+ if (!boot_cpu_has(X86_FEATURE_PAT)) {
/*
* If this happens we are on a secondary CPU, but switched to
* PAT on the boot CPU. We have no way to undo PAT.
--
1.9.1