linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL] Driver core fix for 4.20-rc5
@ 2018-11-30 16:06 Greg KH
  2018-11-30 20:40 ` Linus Torvalds
  2018-11-30 21:00 ` pr-tracker-bot
  0 siblings, 2 replies; 3+ messages in thread
From: Greg KH @ 2018-11-30 16:06 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel

The following changes since commit 651022382c7f8da46cb4872a545ee1da6d097d2a:

  Linux 4.20-rc1 (2018-11-04 15:37:52 -0800)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git tags/driver-core-4.20-rc5

for you to fetch changes up to a66d972465d15b1d89281258805eb8b47d66bd36:

  devres: Align data[] to ARCH_KMALLOC_MINALIGN (2018-11-11 11:40:04 -0800)

----------------------------------------------------------------
Driver core fix for 4.20-rc5

Here is a single driver core fix for 4.20-rc5

It resolves an issue with the data alignment in 'struct devres' for the
ARC platform.  The full details are in the commit changelog, but the
short summary is the change is a single line:
-       unsigned long long              data[]; /* guarantee ull alignment */
+       u8 __aligned(ARCH_KMALLOC_MINALIGN) data[];

This has been in linux-next for a while with no reported issues.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

----------------------------------------------------------------
Alexey Brodkin (1):
      devres: Align data[] to ARCH_KMALLOC_MINALIGN

 drivers/base/devres.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [GIT PULL] Driver core fix for 4.20-rc5
  2018-11-30 16:06 [GIT PULL] Driver core fix for 4.20-rc5 Greg KH
@ 2018-11-30 20:40 ` Linus Torvalds
  2018-11-30 21:00 ` pr-tracker-bot
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Torvalds @ 2018-11-30 20:40 UTC (permalink / raw)
  To: Greg KH; +Cc: Andrew Morton, Linux List Kernel Mailing

On Fri, Nov 30, 2018 at 8:06 AM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> It resolves an issue with the data alignment in 'struct devres' for the
> ARC platform.  The full details are in the commit changelog, but the
> short summary is the change is a single line:
>
> -       unsigned long long              data[]; /* guarantee ull alignment */
> +       u8 __aligned(ARCH_KMALLOC_MINALIGN) data[];

Hmm.

Are you aware that this is up to 128 bytes? Including on common
architectures like ARM64?

I've done the pull, but honestly, that seems a bit excessive, when a
fair amount of devres users seem to have fairly small data (ie looking
at "size", I see things like

    p = devres_alloc(dmam_device_release, sizeof(void *), GFP_KERNEL);

or

    dr = devres_alloc(devm_gpio_release, sizeof(unsigned), GFP_KERNEL);

that have allocations of a couple of bytes, and the new model means
that those allocations will be aligned to 128-byte boundaries, and
then (because ARCH_KMALLOC_MINALIGN, again) you'll end up actually
wasting 256 bytes for a tiny structure on ARM64.

Maybe it doesn't matter. But it does seem somewhat excessive to do
things like this.

Yeah, on x86, the alignment isn't even noticeable, being just 8 bytes.

                   Linus

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [GIT PULL] Driver core fix for 4.20-rc5
  2018-11-30 16:06 [GIT PULL] Driver core fix for 4.20-rc5 Greg KH
  2018-11-30 20:40 ` Linus Torvalds
@ 2018-11-30 21:00 ` pr-tracker-bot
  1 sibling, 0 replies; 3+ messages in thread
From: pr-tracker-bot @ 2018-11-30 21:00 UTC (permalink / raw)
  To: Greg KH; +Cc: Linus Torvalds, Andrew Morton, linux-kernel

The pull request you sent on Fri, 30 Nov 2018 17:06:05 +0100:

> git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git tags/driver-core-4.20-rc5

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/d7aca8a78c8bc5d3707691aab13cb4f7f6de696f

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/prtracker

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-11-30 21:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-30 16:06 [GIT PULL] Driver core fix for 4.20-rc5 Greg KH
2018-11-30 20:40 ` Linus Torvalds
2018-11-30 21:00 ` pr-tracker-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).