[parisc-linux] fdisk problems 2.4 <-> 2.6
Grant Grundler
grundler@parisc-linux.org
Sun, 9 Nov 2003 21:45:56 -0700
On Sun, Nov 09, 2003 at 06:59:48PM +0000, Joel Soete wrote:
> Just for remainder here is the alignement of uaccess.h (i just finished
> to test on my c110 :)):
> ----------><----------
> --- uaccess.h.orig 2004-04-20 21:03:59.000000000 +0200
> +++ uaccess.h 2003-11-09 18:47:06.000000000 +0100
> @@ -42,8 +42,8 @@
> #if BITS_PER_LONG == 32
> #define LDD_KERNEL(ptr) __get_kernel_bad();
> #define LDD_USER(ptr) __get_user_bad();
> -#define STD_KERNEL(x, ptr) __put_kernel_asm64((u32)x,ptr)
> -#define STD_USER(x, ptr) __put_user_asm64((u32)x,ptr)
> +#define STD_KERNEL(x, ptr) __put_kernel_asm64((u64)x,ptr)
> +#define STD_USER(x, ptr) __put_user_asm64((u64)x,ptr)
willy just removed the (u32) cast and things seem to work for him.
Do you need the (u64) cast?
...
> -static inline void __put_kernel_asm64(u64 x, void *ptr)
...
> +#define __put_kernel_asm64(x, ptr) \
...
Why replace the static inline with a macro?
static inline provides type checking and
type "coercion" when it's not exactly right.
> + __asm__ __volatile__ ( \
> + "\n1:\tstw\t%2,0(%1)\n" \
> + "2:\tstw\t%R2,4(%1)\n" \
What is "%R2" intended to be?
Randolph pointed out this is broken before and I was wrong
to commit this chunk to the 2.4 tree (I'm working on
removing it now).
thanks,
grant