[PATCH v7 3/6] powerpc/perf: consolidate read_user_stack_32

Michal Suchánek msuchanek at suse.de
Mon Sep 2 18:26:53 AEST 2019


On Mon, 02 Sep 2019 14:01:17 +1000
Michael Ellerman <mpe at ellerman.id.au> wrote:

> Michael Ellerman <mpe at ellerman.id.au> writes:
> > Michal Suchanek <msuchanek at suse.de> writes:  
> ...
> >> @@ -295,6 +279,12 @@ static inline int current_is_64bit(void)
> >>  }
> >>  
> >>  #else  /* CONFIG_PPC64 */
> >> +static int read_user_stack_slow(void __user *ptr, void *buf, int nb)
> >> +{
> >> +	return 0;
> >> +}
> >> +#endif /* CONFIG_PPC64 */  
> >
> > Ending the PPC64 else case here, and then restarting it below with an
> > ifndef means we end up with two parts of the file that define 32-bit
> > code, with a common chunk in the middle, which I dislike.
> >
> > I'd rather you add the empty read_user_stack_slow() in the existing
> > #else section and then move read_user_stack_32() below the whole ifdef
> > PPC64/else/endif section.
> >
> > Is there some reason that doesn't work?  
> 
> Gah, I missed that you split the whole file later in the series. Any
> reason you did it in two steps rather than moving patch 6 earlier in the
> series?

To make this patch readable.

Thanks

Michal


More information about the Linuxppc-dev mailing list