On Fri, 2023-05-19 at 15:02 +1000, Benjamin Gray wrote: > The functions here use struct thread_struct fields, so need to import > the full definition from <linux/sched.h>. The <asm/current.h> header > that defines current only forward declares struct thread_struct.
AFAICT, struct thread_struct is defined in arch/powerpc/include/asm/processor.h? I think you mean struct task_struct (which is what's forward declared in asm/current.h, not thread_struct). > > Failing to include this <linux/sched.h> header leads to a compilation > error when a translation unit does not also include <linux/sched.h> > indirectly. > > Signed-off-by: Benjamin Gray <bg...@linux.ibm.com> > Reviewed-by: Nicholas Piggin <npig...@gmail.com> > Reviewed-by: Russell Currey <rus...@russell.cc> > > --- > > v3: * Add ruscur reviewed-by > v1: * Add npiggin reviewed-by > --- > arch/powerpc/include/asm/book3s/64/kup.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/powerpc/include/asm/book3s/64/kup.h > b/arch/powerpc/include/asm/book3s/64/kup.h > index 54cf46808157..84c09e546115 100644 > --- a/arch/powerpc/include/asm/book3s/64/kup.h > +++ b/arch/powerpc/include/asm/book3s/64/kup.h > @@ -194,6 +194,7 @@ > #else /* !__ASSEMBLY__ */ > > #include <linux/jump_label.h> > +#include <linux/sched.h> > > DECLARE_STATIC_KEY_FALSE(uaccess_flush_key); > -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited