linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] asm-generic: allow generic unaligned access if the arch supports it
Date: Tue, 8 Apr 2014 10:49:42 +0100	[thread overview]
Message-ID: <20140408094942.GC16119@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <CAKv+Gu9TkLSivLuJH-oWnK0xpFb4jrhYDx6bTZBKUSmSJftCbQ@mail.gmail.com>

On Mon, Mar 31, 2014 at 08:51:54PM +0200, Ard Biesheuvel wrote:
> On 31 March 2014 20:36, Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> > On Mon, Mar 31, 2014 at 08:22:43PM +0200, Ard Biesheuvel wrote:
> >> On 31 March 2014 19:24, Catalin Marinas <catalin.marinas@arm.com> wrote:
> >> > It actually affects arch/arm as well which selects
> >> > HAVE_EFFICIENT_UNALIGNED_ACCESS for v6/v7 and uses the generic
> >> > unaligned.h
> >> >
> >>
> >> Oops, my bad. I did a quick 'find -name unaligned.h' but misread 'arc'
> >> for 'arm'.
> >>
> >> @Russell: ARM is a user of asm-generic/unaligned.h, and I proposed a
> >> patch to asm-generic that switches to unaligned accesses if
> >> HAVE_EFFICIENT_UNALIGNED_ACCESS is set by the arch. This should affect
> >> a fair amount of code living under net/ and drivers/ that don't test
> >> for the Kconfig symbol but expect get_unaligned_xx/put_unaligned_xx to
> >> turn into something suitable depending on the arch. Any objections?
> >
> > I'm not sure what you're talking about here, or what change you're
> > proposing.  Without any kind of frame of reference, I can't comment.
> > Sorry.
> >
> 
> My apologies. I assumed the mail thread including a link to the patch
> would be clear enough.
> 
> Currently, asm-generic's version of unaligned.h (defining stuff like
> get_unaligned() and put_unaligned()) unconditionally defaults to the
> most cautious method of performing unaligned memory accesses, even if
> the Kconfig symbol HAVE_EFFICIENT_UNALIGNED_ACCESS is defined.
> However, in that case, it makes sense to use a definition for
> get_unaligned()/put_unaligned() that lets the hardware perform the
> unaligned accesses instead.
> 
> So that is what I proposed here
> 
> http://marc.info/?l=linux-arch&m=139594237116121&w=2
> 
> and in the mail exchange that followed, I stated that arm64 should be
> the only arch affected by this change. However, I didn't look
> carefully enough and, as Catalin pointed out, ARM will also be
> affected by it.
> 
> So that is why I redirected this thread to you: would you object to
> changing asm-generic/unaligned.h so that calls to
> get_aligned()/put_aligned() on ARM v6/v7 will let the CPU perform the
> unaligned access?

The change looks fine to me, but given where we are in the cycle, I'd
rather hold off until after the merge window before queuing this up.

-- 
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.

  reply	other threads:[~2014-04-08  9:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1395942387-14177-1-git-send-email-ard.biesheuvel@linaro.org>
     [not found] ` <201403281914.20201.arnd@arndb.de>
     [not found]   ` <CAKv+Gu_9yD1jWhxkPxSUbwjJk4QxPNXBR=EXfmfCgzD1Pdig2g@mail.gmail.com>
     [not found]     ` <20140331095941.GA29871@arm.com>
     [not found]       ` <CAKv+Gu_05nmZrQxwELXae4tiK=-MpjUjmEKrULdg+6YuC-DW8Q@mail.gmail.com>
     [not found]         ` <20140331172436.GL29871@arm.com>
2014-03-31 18:22           ` [PATCH] asm-generic: allow generic unaligned access if the arch supports it Ard Biesheuvel
2014-03-31 18:36             ` Russell King - ARM Linux
2014-03-31 18:51               ` Ard Biesheuvel
2014-04-08  9:49                 ` Russell King - ARM Linux [this message]
2014-04-08  6:48       ` Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140408094942.GC16119@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).