[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [microblaze-uclinux] [PATCH] microblaze: Fix unaligned accesses
Hi,
John did the similar patch some month ago and it is in mmu and master branch
http://developer.petalogix.com/git/gitweb.cgi?p=linux-2.6-microblaze.git;a=commit;h=c6c26dce3f0944971c6bfb76e6667369bec3c210
I added his patch to for-linus too (+ change the commit message a little bit)
http://developer.petalogix.com/git/gitweb.cgi?p=linux-2.6-microblaze.git;a=commit;h=3447ef29a7f3b1fd0d8d58376950e695e04f6f8b
Do you have any reason why to include <linux/unaligned/be_byteshift.h> and use shifts instead of
struct? Do you have any investigation that shifts are faster?
Anyway one patch is there and we should do more tests and of course we can add this patch later in rc.
+ I wanted to sync header style with adding indentation. Please do not revert it.
Thanks,
Michal
Steven.J.Magnani@xxxxxxxxxxxxxxxxxx wrote:
> Microblaze requires special handling of unaligned accesses.
>
> Signed-off-by: Steven J. Magnani <steve@xxxxxxxxxxxxxxx>
> ---
> There may be more efficient choices than byteshift,
> but access_ok is incorrect.
>
> diff -uprN a/arch/microblaze/include/asm/unaligned.h b/arch/microblaze/include/asm/unaligned.h
> --- a/arch/microblaze/include/asm/unaligned.h 2009-06-01 18:17:48.000000000 -0500
> +++ b/arch/microblaze/include/asm/unaligned.h 2009-06-01 18:18:32.000000000 -0500
> @@ -10,13 +10,14 @@
> #ifndef _ASM_MICROBLAZE_UNALIGNED_H
> #define _ASM_MICROBLAZE_UNALIGNED_H
>
> -# ifdef __KERNEL__
> +#ifdef __KERNEL__
>
> -# include <linux/unaligned/access_ok.h>
> -# include <linux/unaligned/generic.h>
> +#include <linux/unaligned/le_byteshift.h>
> +#include <linux/unaligned/be_byteshift.h>
> +#include <linux/unaligned/generic.h>
>
> -# define get_unaligned __get_unaligned_be
> -# define put_unaligned __put_unaligned_be
> +#define get_unaligned __get_unaligned_be
> +#define put_unaligned __put_unaligned_be
>
> -# endif /* __KERNEL__ */
> +#endif /* __KERNEL__ */
> #endif /* _ASM_MICROBLAZE_UNALIGNED_H */
>
> ___________________________
> microblaze-uclinux mailing list
> microblaze-uclinux@xxxxxxxxxxxxxx
> Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
> Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
>
>
--
Michal Simek, Ing. (M.Eng)
PetaLogix - Linux Solutions for a Reconfigurable World
w: www.petalogix.com p: +61-7-30090663,+42-0-721842854 f: +61-7-30090663
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/