From: Joel Soete <soete.joel@tiscali.be>
To: Matthew Wilcox <willy@debian.org>
Cc: parisc-linux@lists.parisc-linux.org,
Grant Grundler <grundler@parisc-linux.org>
Subject: Re: [parisc-linux] fdisk problems 2.4 <-> 2.6
Date: Sun, 09 Nov 2003 18:59:48 +0000 [thread overview]
Message-ID: <3FAE8EA4.3050208@tiscali.be> (raw)
In-Reply-To: <20031109175735.GE2014@parcelfarce.linux.theplanet.co.uk>
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)
#else
#define LDD_KERNEL(ptr) __get_kernel_asm("ldd",ptr)
#define LDD_USER(ptr) __get_user_asm("ldd",ptr)
@@ -213,41 +213,33 @@
: "=r"(__pu_err) \
: "r"(ptr), "r"(x), "0"(__pu_err))
-static inline void __put_kernel_asm64(u64 x, void *ptr)
-{
- u32 hi = x>>32;
- u32 lo = x&0xffffffff;
- __asm__ __volatile__ (
- "\n1:\tstw %1,0(%0)\n"
- "\n2:\tstw %2,4(%0)\n"
- "3:\n"
- "\t.section __ex_table,\"a\"\n"
- "\t.word\t1b\n"
- "\t.word\t(3b-1b)+1\n"
- "\t.word\t2b\n"
- "\t.word\t(3b-2b)+1\n"
- "\t.previous"
- : : "r"(ptr), "r"(hi), "r"(lo));
-
-}
-
-static inline void __put_user_asm64(u64 x, void *ptr)
-{
- u32 hi = x>>32;
- u32 lo = x&0xffffffff;
- __asm__ __volatile__ (
- "\n1:\tstw %1,0(%%sr3,%0)\n"
- "\n2:\tstw %2,4(%%sr3,%0)\n"
- "3:\n"
- "\t.section __ex_table,\"a\"\n"
- "\t.word\t1b\n"
- "\t.word\t(3b-1b)+1\n"
- "\t.word\t2b\n"
- "\t.word\t(3b-2b)+1\n"
- "\t.previous"
- : : "r"(ptr), "r"(hi), "r"(lo));
+#define __put_kernel_asm64(x, ptr) \
+ __asm__ __volatile__ ( \
+ "\n1:\tstw\t%2,0(%1)\n" \
+ "2:\tstw\t%R2,4(%1)\n" \
+ "3:\n" \
+ "\t.section __ex_table,\"a\"\n" \
+ "\t.word\t1b\n" \
+ "\t.word\t(3b-1b)+1\n" \
+ "\t.word\t2b\n" \
+ "\t.word\t(3b-2b)+1\n" \
+ "\t.previous" \
+ : "=r"(__pu_err) \
+ : "r"(ptr), "r"(x), "0"(__pu_err))
-}
+#define __put_user_asm64(x, ptr) \
+ __asm__ __volatile__ ( \
+ "\n1:\tstw\t%2,0(%%sr3,%1)\n" \
+ "2:\tstw\t%R2,4(%%sr3,%1)\n" \
+ "3:\n" \
+ "\t.section __ex_table,\"a\"\n" \
+ "\t.word\t1b\n" \
+ "\t.word\t(3b-1b)+1\n" \
+ "\t.word\t2b\n" \
+ "\t.word\t(3b-2b)+1\n" \
+ "\t.previous" \
+ : "=r"(__pu_err) \
+ : "r"(ptr), "r"(x), "0"(__pu_err))
#endif
----------><----------
Cheers,
Joel
PS: I also attach the patch for easy apply
and here I need the cast.
Matthew Wilcox wrote:
> On Sun, Nov 09, 2003 at 01:50:49PM +0000, Joel Soete wrote:
>
>>Joel Soete wrote:
>>
>>>----------><----------
>>>--- uaccess.h.orig 2004-04-20 19:58:08.000000000 +0200
>>>+++ uaccess.h-t2 2004-04-20 20:10:41.000000000 +0200
>>>@@ -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)
>>>#else
>>>#define LDD_KERNEL(ptr) __get_kernel_asm("ldd",ptr)
>>>#define LDD_USER(ptr) __get_user_asm("ldd",ptr)
>>>----------><----------
>>
>>I just test it and it seems to be a fix (among others):
>
>
> I figured this out in Chicago airport yesterday. Grant just pointed
> me to this mail after I checked in the fix deleting the cast entirely.
> Thanks for testing though.
>
next prev parent reply other threads:[~2003-11-09 18:59 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-05 20:21 [parisc-linux] fdisk problems 2.4 <-> 2.6 Ruediger Scholz
2003-11-06 22:29 ` Matthew Wilcox
2003-11-07 17:52 ` Joel Soete
2003-11-08 1:59 ` Grant Grundler
2003-11-08 10:59 ` Joel Soete
2003-11-08 19:48 ` Grant Grundler
2003-11-08 22:15 ` Joel Soete
2003-11-09 13:50 ` Joel Soete
2003-11-09 17:57 ` Matthew Wilcox
2003-11-09 18:59 ` Joel Soete [this message]
2003-11-10 4:45 ` Grant Grundler
2003-11-10 4:55 ` Grant Grundler
2003-11-10 5:01 ` John David Anglin
2003-11-10 5:07 ` Randolph Chung
2003-11-10 5:25 ` John David Anglin
2003-11-10 9:16 ` Joel Soete
2003-11-10 9:47 ` Joel Soete
2003-11-10 18:35 ` Joel Soete
2003-11-11 11:21 ` Joel Soete
2003-11-10 9:51 ` Joel Soete
2003-11-10 16:58 ` Grant Grundler
2003-11-07 20:32 ` Ruediger Scholz
2003-11-10 21:58 ` Ruediger Scholz
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=3FAE8EA4.3050208@tiscali.be \
--to=soete.joel@tiscali.be \
--cc=grundler@parisc-linux.org \
--cc=parisc-linux@lists.parisc-linux.org \
--cc=willy@debian.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.