All of lore.kernel.org
 help / color / mirror / Atom feed
* Issue With real-time patches on 5.15.y
@ 2022-05-05 23:18 Joseph Salisbury
  2022-05-05 23:20 ` Joseph Salisbury
  2022-05-05 23:35 ` Dave Hansen
  0 siblings, 2 replies; 6+ messages in thread
From: Joseph Salisbury @ 2022-05-05 23:18 UTC (permalink / raw)
  To: tglx; +Cc: linux-kernel, dave.hansen, linux-rt-users

Hello,

I ran into a build failure after applying the rt40 real-time patches[0] 
to an Ubuntu 22.04 kernel. The Ubuntu kernel is based on upstream stable 
5.15.y(5.15.34 currently).  I believe this patch is the specific one 
that introduces the build issue: 
0086-locking-Allow-to-include-asm-spinlock_types.h-from-l.patch.

After a bisect, the following commit was identified as the cause for the 
build failure:
b50854eca0e0 ("x86/pkru: Remove useless include")

This commit was added to mainline as of 5.16-rc1 and not Cc'd to stable, 
so it should not exist in 5.15.y.  However, it was purposely added to 
the Ubuntu kernel to enable x86 AMX support[1].

The real-time kernel build failure can be resolved by reverting commit 
b50854eca0e0.  The failure seems to be due to the removal of an include 
of xstate.h from pkru.h and caused spinlock_t to not be defined.  The 
commit would only be reverted for the real-time kernel and not any other 
kernels.  I wanted to see if reverting the commit is the proper 
approach, or if cherry-picking additional commits might be a better 
solution in preparation for additional changes that might be coming in 
the future?

Any suggestions would be greatly appreciated.

Thanks,

Joe


[0] 
https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.34-rt40.tar.gz
[1] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1967750

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Issue With real-time patches on 5.15.y
  2022-05-05 23:18 Issue With real-time patches on 5.15.y Joseph Salisbury
@ 2022-05-05 23:20 ` Joseph Salisbury
  2022-05-09 10:14   ` Mike Galbraith
  2022-05-05 23:35 ` Dave Hansen
  1 sibling, 1 reply; 6+ messages in thread
From: Joseph Salisbury @ 2022-05-05 23:20 UTC (permalink / raw)
  To: tglx; +Cc: linux-kernel, dave.hansen, linux-rt-users



On 5/5/22 19:18, Joseph Salisbury wrote:
> Hello,
>
> I ran into a build failure after applying the rt40 real-time 
> patches[0] to an Ubuntu 22.04 kernel. The Ubuntu kernel is based on 
> upstream stable 5.15.y(5.15.34 currently).  I believe this patch is 
> the specific one that introduces the build issue: 
> 0086-locking-Allow-to-include-asm-spinlock_types.h-from-l.patch.
>
> After a bisect, the following commit was identified as the cause for 
> the build failure:
> b50854eca0e0 ("x86/pkru: Remove useless include")
>
> This commit was added to mainline as of 5.16-rc1 and not Cc'd to 
> stable, so it should not exist in 5.15.y.  However, it was purposely 
> added to the Ubuntu kernel to enable x86 AMX support[1].
>
> The real-time kernel build failure can be resolved by reverting commit 
> b50854eca0e0.  The failure seems to be due to the removal of an 
> include of xstate.h from pkru.h and caused spinlock_t to not be 
> defined.  The commit would only be reverted for the real-time kernel 
> and not any other kernels.  I wanted to see if reverting the commit is 
> the proper approach, or if cherry-picking additional commits might be 
> a better solution in preparation for additional changes that might be 
> coming in the future?
>
> Any suggestions would be greatly appreciated.
>
> Thanks,
>
> Joe
>
>
> [0] 
> https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.34-rt40.tar.gz
> [1] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1967750
Also, the following is the build failure that happens:
arch/x86/include/asm/pgtable.h:55:8: error: unknown type name 'spinlock_t'
    55 | extern spinlock_t pgd_lock;
       |        ^~~~~~~~~~

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Issue With real-time patches on 5.15.y
  2022-05-05 23:18 Issue With real-time patches on 5.15.y Joseph Salisbury
  2022-05-05 23:20 ` Joseph Salisbury
@ 2022-05-05 23:35 ` Dave Hansen
  2022-05-06 19:15   ` Joseph Salisbury
  1 sibling, 1 reply; 6+ messages in thread
From: Dave Hansen @ 2022-05-05 23:35 UTC (permalink / raw)
  To: Joseph Salisbury, tglx; +Cc: linux-kernel, dave.hansen, linux-rt-users

On 5/5/22 16:18, Joseph Salisbury wrote:
> The real-time kernel build failure can be resolved by reverting commit
> b50854eca0e0.  The failure seems to be due to the removal of an include
> of xstate.h from pkru.h and caused spinlock_t to not be defined.  The
> commit would only be reverted for the real-time kernel and not any other
> kernels.  I wanted to see if reverting the commit is the proper
> approach, or if cherry-picking additional commits might be a better
> solution in preparation for additional changes that might be coming in
> the future?
> 
> Any suggestions would be greatly appreciated.

I thought you distro folks were the franenkernel experts. :)

But, seriously...  This isn't rocket science.  Just look at the pkru.h
in your tree and figure out what includes it needs.  If it needs FPU
gunk, include the FPU header.  If you get a compile error for spinlock_t
...  well ...  find the code using spinlock_t and make sure it includes
spinlock.h.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Issue With real-time patches on 5.15.y
  2022-05-05 23:35 ` Dave Hansen
@ 2022-05-06 19:15   ` Joseph Salisbury
  0 siblings, 0 replies; 6+ messages in thread
From: Joseph Salisbury @ 2022-05-06 19:15 UTC (permalink / raw)
  To: Dave Hansen, tglx; +Cc: linux-kernel, dave.hansen, linux-rt-users



On 5/5/22 19:35, Dave Hansen wrote:
> On 5/5/22 16:18, Joseph Salisbury wrote:
>> The real-time kernel build failure can be resolved by reverting commit
>> b50854eca0e0.  The failure seems to be due to the removal of an include
>> of xstate.h from pkru.h and caused spinlock_t to not be defined.  The
>> commit would only be reverted for the real-time kernel and not any other
>> kernels.  I wanted to see if reverting the commit is the proper
>> approach, or if cherry-picking additional commits might be a better
>> solution in preparation for additional changes that might be coming in
>> the future?
>>
>> Any suggestions would be greatly appreciated.
> I thought you distro folks were the franenkernel experts. :)
>
> But, seriously...  This isn't rocket science.  Just look at the pkru.h
> in your tree and figure out what includes it needs.  If it needs FPU
> gunk, include the FPU header.  If you get a compile error for spinlock_t
> ...  well ...  find the code using spinlock_t and make sure it includes
> spinlock.h.
>
Thanks for the advice, Dave.

Your suggestion will probably be the easiest approach.  I was just 
trying to limit the amount of frankenkernel changes, since there are 
already so many  :-)  It's always best to stay as close to mainline as 
possible.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Issue With real-time patches on 5.15.y
  2022-05-05 23:20 ` Joseph Salisbury
@ 2022-05-09 10:14   ` Mike Galbraith
  2022-05-10 20:00     ` Joseph Salisbury
  0 siblings, 1 reply; 6+ messages in thread
From: Mike Galbraith @ 2022-05-09 10:14 UTC (permalink / raw)
  To: Joseph Salisbury, tglx; +Cc: linux-kernel, dave.hansen, linux-rt-users

On Thu, 2022-05-05 at 19:20 -0400, Joseph Salisbury wrote:
> ...
> Also, the following is the build failure that happens:
> arch/x86/include/asm/pgtable.h:55:8: error: unknown type name 'spinlock_t'
>     55 | extern spinlock_t pgd_lock;
>        |        ^~~~~~~~~~

35fa745286ac4 was merged into mainline 5.17-rc1 to squash that buglet.

	-Mike

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Issue With real-time patches on 5.15.y
  2022-05-09 10:14   ` Mike Galbraith
@ 2022-05-10 20:00     ` Joseph Salisbury
  0 siblings, 0 replies; 6+ messages in thread
From: Joseph Salisbury @ 2022-05-10 20:00 UTC (permalink / raw)
  To: Mike Galbraith, tglx; +Cc: linux-kernel, dave.hansen, linux-rt-users



On 5/9/22 06:14, Mike Galbraith wrote:
> On Thu, 2022-05-05 at 19:20 -0400, Joseph Salisbury wrote:
>> ...
>> Also, the following is the build failure that happens:
>> arch/x86/include/asm/pgtable.h:55:8: error: unknown type name 'spinlock_t'
>>      55 | extern spinlock_t pgd_lock;
>>         |        ^~~~~~~~~~
> 35fa745286ac4 was merged into mainline 5.17-rc1 to squash that buglet.
>
> 	-Mike
Thank you for the pointer, Mike!  This commit fixes the build issue I 
was seeing.

Thanks,

Joe


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-05-10 20:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-05 23:18 Issue With real-time patches on 5.15.y Joseph Salisbury
2022-05-05 23:20 ` Joseph Salisbury
2022-05-09 10:14   ` Mike Galbraith
2022-05-10 20:00     ` Joseph Salisbury
2022-05-05 23:35 ` Dave Hansen
2022-05-06 19:15   ` Joseph Salisbury

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.