[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdWhPn4KJhzWz-QXwLMJ_N7+8FOdKMf-wnyRwwyqGt0aOA@mail.gmail.com>
Date: Thu, 9 Jul 2015 09:16:52 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: "H. Mijail" <hmijail@...il.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
David Howells <dhowells@...hat.com>,
Vivek Goyal <vgoyal@...hat.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Jiri Kosina <trivial@...nel.org>, Joe Perches <joe@...ches.com>
Subject: Re: [RESEND 2][PATCH v4] hexdump: fix for non-aligned buffers
On Thu, Jul 9, 2015 at 4:07 AM, Andrew Morton <akpm@...ux-foundation.org> wrote:
>> The other alternative in Documentation/unaligned-memory-access.txt is the
>> macro get_unaligned() from asm/unaligned.h. However, using get_unaligned()
>> would mean a much more intrusive patch, since each case of the groupsize
>> would be changed, and anyway we would still need to check
>> CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS to avoid penalising everyone.
>
> Actually, I think using get_unaligned() would be a better solution.
> For architectures which have CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y,
> get_unaligned() should be fast - just one instruction.
>
> This way we avoid having different-appearing output on different
> architectures.
Definitely.
A less optimal get_unaligned() will just be noise in the snprintf() processing
time.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists