ACK: [SRU][J/realtime][PATCH 1/1] x86/mm: Include spinlock_t definition in pgtable.

Cengiz Can cengiz.can at canonical.com
Wed May 11 00:55:30 UTC 2022


May 10, 2022 23:09:01 Joseph Salisbury <joseph.salisbury at canonical.com>:

> From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
>
> BugLink: https://bugs.launchpad.net/bugs/1972899
>
> This header file provides forward declartion for pgd_lock but does not
> include the header defining its type. This works since the definition of
> spinlock_t is usually included somehow via printk.
>
> By trying to avoid recursive includes on PREEMPT_RT I avoided the loop
> in printk and as a consequnce kernel/intel.c failed to compile due to
> missing type definition.
>
> Include the needed definition for spinlock_t.
>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
> Signed-off-by: Dave Hansen <dave.hansen at linux.intel.com>
> Link: https://lkml.kernel.org/r/20211102165224.wpz4zyhsvwccx5p3@linutronix.de
> (cherry picked from commit 35fa745286ac44ee26ed100c2bd2553368ad193b)
> Signed-off-by: Joseph Salisbury <joseph.salisbury at canonical.com>

Excellent investigation!

Acked-by: Cengiz Can <cengiz.can at canonical.com>

> ---
> arch/x86/include/asm/pgtable.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
> index 448cd01eb3ec..a34430b7af4a 100644
> --- a/arch/x86/include/asm/pgtable.h
> +++ b/arch/x86/include/asm/pgtable.h
> @@ -22,6 +22,7 @@
> #define pgprot_decrypted(prot) __pgprot(__sme_clr(pgprot_val(prot)))
>
> #ifndef __ASSEMBLY__
> +#include <linux/spinlock.h>
> #include <asm/x86_init.h>
> #include <asm/pkru.h>
> #include <asm/fpu/api.h>
> --
> 2.34.1
>
>
> --
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 854 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20220511/af4b388d/attachment.sig>


More information about the kernel-team mailing list