* [PATCH] asm-generic: allow generic unaligned access if the arch supports it
[not found] ` <20140331172436.GL29871@arm.com>
@ 2014-03-31 18:22 ` Ard Biesheuvel
2014-03-31 18:36 ` Russell King - ARM Linux
0 siblings, 1 reply; 5+ messages in thread
From: Ard Biesheuvel @ 2014-03-31 18:22 UTC (permalink / raw)
To: linux-arm-kernel
On 31 March 2014 19:24, Catalin Marinas <catalin.marinas@arm.com> wrote:
> On Mon, Mar 31, 2014 at 11:07:54AM +0100, Ard Biesheuvel wrote:
>> On 31 March 2014 11:59, Catalin Marinas <catalin.marinas@arm.com> wrote:
>> > On Fri, Mar 28, 2014 at 06:24:04PM +0000, Ard Biesheuvel wrote:
>> >> On 28 March 2014 19:14, Arnd Bergmann <arnd@arndb.de> wrote:
>> >> > On Thursday 27 March 2014, Ard Biesheuvel wrote:
>> >> >> Switch the default unaligned access method to 'hardware implemented'
>> >> >> if HAVE_EFFICIENT_UNALIGNED_ACCESS is set.
>> >> >>
>> >> >> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>> >> >
>> >> > Acked-by: Arnd Bergmann <arnd@arndb.de>
>> >> >
>> >> > Is this part of a longer series of patches? If so, please keep
>> >> > the patch with the others and merge it through an appropriate
>> >> > tree.
>> >> >
>> >>
>> >> No, not really. I ran into the alignment issue while working on the
>> >> arm64 crypto stuff, but it is unclear when that will be going in.
>> >>
>> >> > If not, I guess I'll have to send it myself, but it will be
>> >> > the only asm-generic patch for the merge window ;-)
>> >>
>> >> Perhaps Catalin is interested in taking it, as arm64 is the only arch
>> >> that defines HAVE_EFFICIENT_UNALIGNED_ACCESS /and/ uses the
>> >> asm-generic version of unaligned.h.
>> >>
>> >> @Catalin?
>> >>
>> >> http://marc.info/?l=linux-arch&m=139594237116121&w=2
>> >
>> > I can take this, providing it doesn't break anything else. I'll push it
>> > to -next but won't send it with the first arm64 pull request.
>>
>> Yes, please.
>>
>> As I said, it can only affect arm64, and only users of
>> get_unaligned_xx/put_unaligned_xx so it should be safe as far as I can
>> tell.
>
> 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?
@Arnd: anyone else you feel should be cc'ed on this?
Regards,
Ard.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] asm-generic: allow generic unaligned access if the arch supports it
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
0 siblings, 1 reply; 5+ messages in thread
From: Russell King - ARM Linux @ 2014-03-31 18:36 UTC (permalink / raw)
To: linux-arm-kernel
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.
--
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] asm-generic: allow generic unaligned access if the arch supports it
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
0 siblings, 1 reply; 5+ messages in thread
From: Ard Biesheuvel @ 2014-03-31 18:51 UTC (permalink / raw)
To: linux-arm-kernel
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?
Regards,
Ard.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] asm-generic: allow generic unaligned access if the arch supports it
[not found] ` <20140331095941.GA29871@arm.com>
[not found] ` <CAKv+Gu_05nmZrQxwELXae4tiK=-MpjUjmEKrULdg+6YuC-DW8Q@mail.gmail.com>
@ 2014-04-08 6:48 ` Ard Biesheuvel
1 sibling, 0 replies; 5+ messages in thread
From: Ard Biesheuvel @ 2014-04-08 6:48 UTC (permalink / raw)
To: linux-arm-kernel
On 31 March 2014 11:59, Catalin Marinas <catalin.marinas@arm.com> wrote:
> On Fri, Mar 28, 2014 at 06:24:04PM +0000, Ard Biesheuvel wrote:
>> On 28 March 2014 19:14, Arnd Bergmann <arnd@arndb.de> wrote:
>> > On Thursday 27 March 2014, Ard Biesheuvel wrote:
>> >> Switch the default unaligned access method to 'hardware implemented'
>> >> if HAVE_EFFICIENT_UNALIGNED_ACCESS is set.
>> >>
>> >> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>> >
>> > Acked-by: Arnd Bergmann <arnd@arndb.de>
>> >
>> > Is this part of a longer series of patches? If so, please keep
>> > the patch with the others and merge it through an appropriate
>> > tree.
>> >
>>
>> No, not really. I ran into the alignment issue while working on the
>> arm64 crypto stuff, but it is unclear when that will be going in.
>>
>> > If not, I guess I'll have to send it myself, but it will be
>> > the only asm-generic patch for the merge window ;-)
>>
>> Perhaps Catalin is interested in taking it, as arm64 is the only arch
>> that defines HAVE_EFFICIENT_UNALIGNED_ACCESS /and/ uses the
>> asm-generic version of unaligned.h.
>>
>> @Catalin?
>>
>> http://marc.info/?l=linux-arch&m=139594237116121&w=2
>
> I can take this, providing it doesn't break anything else. I'll push it
> to -next but won't send it with the first arm64 pull request.
>
Are you still interested in taking this? Russell doesn't appear
particularly unhappy with it, so I guess it should sit in -next for a
bit before getting it merged.
--
Ard.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] asm-generic: allow generic unaligned access if the arch supports it
2014-03-31 18:51 ` Ard Biesheuvel
@ 2014-04-08 9:49 ` Russell King - ARM Linux
0 siblings, 0 replies; 5+ messages in thread
From: Russell King - ARM Linux @ 2014-04-08 9:49 UTC (permalink / raw)
To: linux-arm-kernel
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-04-08 9:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[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
2014-04-08 6:48 ` Ard Biesheuvel
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).