Re: [PATCH 4.9 04/21] devres: Align data[] to ARCH_KMALLOC_MINALIGN

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 22 Apr 2020, Greg Kroah-Hartman wrote:

> On Wed, Apr 22, 2020 at 12:19:40PM +0100, Lee Jones wrote:
> > From: Alexey Brodkin <alexey.brodkin@xxxxxxxxxxxx>
> > 
> > [ Upstream commit a66d972465d15b1d89281258805eb8b47d66bd36 ]
> > 
> > Initially we bumped into problem with 32-bit aligned atomic64_t
> > on ARC, see [1]. And then during quite lengthly discussion Peter Z.
> > mentioned ARCH_KMALLOC_MINALIGN which IMHO makes perfect sense.
> > If allocation is done by plain kmalloc() obtained buffer will be
> > ARCH_KMALLOC_MINALIGN aligned and then why buffer obtained via
> > devm_kmalloc() should have any other alignment?
> > 
> > This way we at least get the same behavior for both types of
> > allocation.
> > 
> > [1] http://lists.infradead.org/pipermail/linux-snps-arc/2018-July/004009.html
> > [2] http://lists.infradead.org/pipermail/linux-snps-arc/2018-July/004036.html
> > 
> > Signed-off-by: Alexey Brodkin <abrodkin@xxxxxxxxxxxx>
> > Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> > Cc: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> > Cc: David Laight <David.Laight@xxxxxxxxxx>
> > Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> > Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> > Cc: Vineet Gupta <vgupta@xxxxxxxxxxxx>
> > Cc: Will Deacon <will.deacon@xxxxxxx>
> > Cc: Greg KH <greg@xxxxxxxxx>
> > Cc: <stable@xxxxxxxxxxxxxxx> # 4.8+
> > Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> > Signed-off-by: Lee Jones <lee.jones@xxxxxxxxxx>
> > ---
> >  drivers/base/devres.c | 10 ++++++++--
> >  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> 
> Sony ships this thing?  Wow...  Ok, I'll take it (for the next round),
> but supposidly it only affected ARC systems, which I'm pretty sure are
> not Sony phones :)

Seemingly:

  https://github.com/sonyxperiadev/kernel/blob/aosp/LA.UM.7.1.r1/drivers/base/devres.c#L28

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux