[PATCH v3 3/4] powerpc/64: make buildable without CONFIG_COMPAT

Arnd Bergmann arnd at arndb.de
Thu Aug 29 18:01:16 AEST 2019


On Thu, Aug 29, 2019 at 8:46 AM Christoph Hellwig <hch at infradead.org> wrote:

> > @@ -277,7 +277,7 @@ static void do_signal(struct task_struct *tsk)
> >
> >       rseq_signal_deliver(&ksig, tsk->thread.regs);
> >
> > -     if (is32) {
> > +     if ((IS_ENABLED(CONFIG_PPC32) || IS_ENABLED(CONFIG_COMPAT)) && is32) {
>
> I think we should fix the is_32bit_task definitions instead so that
> callers don't need this mess.  I'd suggest something like:
>
> #ifdef CONFIG_COMPAT
> #define is_32bit_task()         test_thread_flag(TIF_32BIT)
> #else
> #define is_32bit_task()         IS_ENABLED(CONFIG_PPC32)
> #endif

Are there actually any (correct) uses of is_32bit_task() outside of
#ifdef CONFIG_PPC64?

I suspect most if not all could be changed to the generic
in_compat_syscall() that we use outside of architecture specific
code.

       Arnd


More information about the Linuxppc-dev mailing list