diff options
-rw-r--r-- | fs/qnx4/dir.c | 2 | ||||
-rw-r--r-- | fs/qnx4/inode.c | 4 | ||||
-rw-r--r-- | include/asm-i386/string.h | 32 | ||||
-rw-r--r-- | include/linux/qnx4_fs.h | 18 | ||||
-rw-r--r-- | include/linux/qnxtypes.h | 16 |
5 files changed, 42 insertions, 30 deletions
diff --git a/fs/qnx4/dir.c b/fs/qnx4/dir.c index cd66147cca04..7a8f5595c26f 100644 --- a/fs/qnx4/dir.c +++ b/fs/qnx4/dir.c | |||
@@ -61,7 +61,7 @@ static int qnx4_readdir(struct file *filp, void *dirent, filldir_t filldir) | |||
61 | ino = blknum * QNX4_INODES_PER_BLOCK + ix - 1; | 61 | ino = blknum * QNX4_INODES_PER_BLOCK + ix - 1; |
62 | else { | 62 | else { |
63 | le = (struct qnx4_link_info*)de; | 63 | le = (struct qnx4_link_info*)de; |
64 | ino = ( le->dl_inode_blk - 1 ) * | 64 | ino = ( le32_to_cpu(le->dl_inode_blk) - 1 ) * |
65 | QNX4_INODES_PER_BLOCK + | 65 | QNX4_INODES_PER_BLOCK + |
66 | le->dl_inode_ndx; | 66 | le->dl_inode_ndx; |
67 | } | 67 | } |
diff --git a/fs/qnx4/inode.c b/fs/qnx4/inode.c index aa92d6b76a9a..b79162a35478 100644 --- a/fs/qnx4/inode.c +++ b/fs/qnx4/inode.c | |||
@@ -236,7 +236,7 @@ unsigned long qnx4_block_map( struct inode *inode, long iblock ) | |||
236 | struct buffer_head *bh = NULL; | 236 | struct buffer_head *bh = NULL; |
237 | struct qnx4_xblk *xblk = NULL; | 237 | struct qnx4_xblk *xblk = NULL; |
238 | struct qnx4_inode_entry *qnx4_inode = qnx4_raw_inode(inode); | 238 | struct qnx4_inode_entry *qnx4_inode = qnx4_raw_inode(inode); |
239 | qnx4_nxtnt_t nxtnt = le16_to_cpu(qnx4_inode->di_num_xtnts); | 239 | u16 nxtnt = le16_to_cpu(qnx4_inode->di_num_xtnts); |
240 | 240 | ||
241 | if ( iblock < le32_to_cpu(qnx4_inode->di_first_xtnt.xtnt_size) ) { | 241 | if ( iblock < le32_to_cpu(qnx4_inode->di_first_xtnt.xtnt_size) ) { |
242 | // iblock is in the first extent. This is easy. | 242 | // iblock is in the first extent. This is easy. |
@@ -372,7 +372,7 @@ static int qnx4_fill_super(struct super_block *s, void *data, int silent) | |||
372 | printk("qnx4: unable to read the superblock\n"); | 372 | printk("qnx4: unable to read the superblock\n"); |
373 | goto outnobh; | 373 | goto outnobh; |
374 | } | 374 | } |
375 | if ( le32_to_cpu( *(__u32*)bh->b_data ) != QNX4_SUPER_MAGIC ) { | 375 | if ( le32_to_cpup((__le32*) bh->b_data) != QNX4_SUPER_MAGIC ) { |
376 | if (!silent) | 376 | if (!silent) |
377 | printk("qnx4: wrong fsid in superblock.\n"); | 377 | printk("qnx4: wrong fsid in superblock.\n"); |
378 | goto out; | 378 | goto out; |
diff --git a/include/asm-i386/string.h b/include/asm-i386/string.h index 6a78ac58c194..02c8f5d22065 100644 --- a/include/asm-i386/string.h +++ b/include/asm-i386/string.h | |||
@@ -116,7 +116,8 @@ __asm__ __volatile__( | |||
116 | "orb $1,%%al\n" | 116 | "orb $1,%%al\n" |
117 | "3:" | 117 | "3:" |
118 | :"=a" (__res), "=&S" (d0), "=&D" (d1) | 118 | :"=a" (__res), "=&S" (d0), "=&D" (d1) |
119 | :"1" (cs),"2" (ct)); | 119 | :"1" (cs),"2" (ct) |
120 | :"memory"); | ||
120 | return __res; | 121 | return __res; |
121 | } | 122 | } |
122 | 123 | ||
@@ -138,8 +139,9 @@ __asm__ __volatile__( | |||
138 | "3:\tsbbl %%eax,%%eax\n\t" | 139 | "3:\tsbbl %%eax,%%eax\n\t" |
139 | "orb $1,%%al\n" | 140 | "orb $1,%%al\n" |
140 | "4:" | 141 | "4:" |
141 | :"=a" (__res), "=&S" (d0), "=&D" (d1), "=&c" (d2) | 142 | :"=a" (__res), "=&S" (d0), "=&D" (d1), "=&c" (d2) |
142 | :"1" (cs),"2" (ct),"3" (count)); | 143 | :"1" (cs),"2" (ct),"3" (count) |
144 | :"memory"); | ||
143 | return __res; | 145 | return __res; |
144 | } | 146 | } |
145 | 147 | ||
@@ -158,7 +160,9 @@ __asm__ __volatile__( | |||
158 | "movl $1,%1\n" | 160 | "movl $1,%1\n" |
159 | "2:\tmovl %1,%0\n\t" | 161 | "2:\tmovl %1,%0\n\t" |
160 | "decl %0" | 162 | "decl %0" |
161 | :"=a" (__res), "=&S" (d0) : "1" (s),"0" (c)); | 163 | :"=a" (__res), "=&S" (d0) |
164 | :"1" (s),"0" (c) | ||
165 | :"memory"); | ||
162 | return __res; | 166 | return __res; |
163 | } | 167 | } |
164 | 168 | ||
@@ -175,7 +179,9 @@ __asm__ __volatile__( | |||
175 | "leal -1(%%esi),%0\n" | 179 | "leal -1(%%esi),%0\n" |
176 | "2:\ttestb %%al,%%al\n\t" | 180 | "2:\ttestb %%al,%%al\n\t" |
177 | "jne 1b" | 181 | "jne 1b" |
178 | :"=g" (__res), "=&S" (d0), "=&a" (d1) :"0" (0),"1" (s),"2" (c)); | 182 | :"=g" (__res), "=&S" (d0), "=&a" (d1) |
183 | :"0" (0),"1" (s),"2" (c) | ||
184 | :"memory"); | ||
179 | return __res; | 185 | return __res; |
180 | } | 186 | } |
181 | 187 | ||
@@ -189,7 +195,9 @@ __asm__ __volatile__( | |||
189 | "scasb\n\t" | 195 | "scasb\n\t" |
190 | "notl %0\n\t" | 196 | "notl %0\n\t" |
191 | "decl %0" | 197 | "decl %0" |
192 | :"=c" (__res), "=&D" (d0) :"1" (s),"a" (0), "0" (0xffffffffu)); | 198 | :"=c" (__res), "=&D" (d0) |
199 | :"1" (s),"a" (0), "0" (0xffffffffu) | ||
200 | :"memory"); | ||
193 | return __res; | 201 | return __res; |
194 | } | 202 | } |
195 | 203 | ||
@@ -333,7 +341,9 @@ __asm__ __volatile__( | |||
333 | "je 1f\n\t" | 341 | "je 1f\n\t" |
334 | "movl $1,%0\n" | 342 | "movl $1,%0\n" |
335 | "1:\tdecl %0" | 343 | "1:\tdecl %0" |
336 | :"=D" (__res), "=&c" (d0) : "a" (c),"0" (cs),"1" (count)); | 344 | :"=D" (__res), "=&c" (d0) |
345 | :"a" (c),"0" (cs),"1" (count) | ||
346 | :"memory"); | ||
337 | return __res; | 347 | return __res; |
338 | } | 348 | } |
339 | 349 | ||
@@ -369,7 +379,7 @@ __asm__ __volatile__( | |||
369 | "je 2f\n\t" | 379 | "je 2f\n\t" |
370 | "stosb\n" | 380 | "stosb\n" |
371 | "2:" | 381 | "2:" |
372 | : "=&c" (d0), "=&D" (d1) | 382 | :"=&c" (d0), "=&D" (d1) |
373 | :"a" (c), "q" (count), "0" (count/4), "1" ((long) s) | 383 | :"a" (c), "q" (count), "0" (count/4), "1" ((long) s) |
374 | :"memory"); | 384 | :"memory"); |
375 | return (s); | 385 | return (s); |
@@ -392,7 +402,8 @@ __asm__ __volatile__( | |||
392 | "jne 1b\n" | 402 | "jne 1b\n" |
393 | "3:\tsubl %2,%0" | 403 | "3:\tsubl %2,%0" |
394 | :"=a" (__res), "=&d" (d0) | 404 | :"=a" (__res), "=&d" (d0) |
395 | :"c" (s),"1" (count)); | 405 | :"c" (s),"1" (count) |
406 | :"memory"); | ||
396 | return __res; | 407 | return __res; |
397 | } | 408 | } |
398 | /* end of additional stuff */ | 409 | /* end of additional stuff */ |
@@ -473,7 +484,8 @@ static inline void * memscan(void * addr, int c, size_t size) | |||
473 | "dec %%edi\n" | 484 | "dec %%edi\n" |
474 | "1:" | 485 | "1:" |
475 | : "=D" (addr), "=c" (size) | 486 | : "=D" (addr), "=c" (size) |
476 | : "0" (addr), "1" (size), "a" (c)); | 487 | : "0" (addr), "1" (size), "a" (c) |
488 | : "memory"); | ||
477 | return addr; | 489 | return addr; |
478 | } | 490 | } |
479 | 491 | ||
diff --git a/include/linux/qnx4_fs.h b/include/linux/qnx4_fs.h index 22ba580b0ae8..fc610bb0f733 100644 --- a/include/linux/qnx4_fs.h +++ b/include/linux/qnx4_fs.h | |||
@@ -46,11 +46,11 @@ struct qnx4_inode_entry { | |||
46 | char di_fname[QNX4_SHORT_NAME_MAX]; | 46 | char di_fname[QNX4_SHORT_NAME_MAX]; |
47 | qnx4_off_t di_size; | 47 | qnx4_off_t di_size; |
48 | qnx4_xtnt_t di_first_xtnt; | 48 | qnx4_xtnt_t di_first_xtnt; |
49 | __u32 di_xblk; | 49 | __le32 di_xblk; |
50 | __s32 di_ftime; | 50 | __le32 di_ftime; |
51 | __s32 di_mtime; | 51 | __le32 di_mtime; |
52 | __s32 di_atime; | 52 | __le32 di_atime; |
53 | __s32 di_ctime; | 53 | __le32 di_ctime; |
54 | qnx4_nxtnt_t di_num_xtnts; | 54 | qnx4_nxtnt_t di_num_xtnts; |
55 | qnx4_mode_t di_mode; | 55 | qnx4_mode_t di_mode; |
56 | qnx4_muid_t di_uid; | 56 | qnx4_muid_t di_uid; |
@@ -63,18 +63,18 @@ struct qnx4_inode_entry { | |||
63 | 63 | ||
64 | struct qnx4_link_info { | 64 | struct qnx4_link_info { |
65 | char dl_fname[QNX4_NAME_MAX]; | 65 | char dl_fname[QNX4_NAME_MAX]; |
66 | __u32 dl_inode_blk; | 66 | __le32 dl_inode_blk; |
67 | __u8 dl_inode_ndx; | 67 | __u8 dl_inode_ndx; |
68 | __u8 dl_spare[10]; | 68 | __u8 dl_spare[10]; |
69 | __u8 dl_status; | 69 | __u8 dl_status; |
70 | }; | 70 | }; |
71 | 71 | ||
72 | struct qnx4_xblk { | 72 | struct qnx4_xblk { |
73 | __u32 xblk_next_xblk; | 73 | __le32 xblk_next_xblk; |
74 | __u32 xblk_prev_xblk; | 74 | __le32 xblk_prev_xblk; |
75 | __u8 xblk_num_xtnts; | 75 | __u8 xblk_num_xtnts; |
76 | __u8 xblk_spare[3]; | 76 | __u8 xblk_spare[3]; |
77 | __s32 xblk_num_blocks; | 77 | __le32 xblk_num_blocks; |
78 | qnx4_xtnt_t xblk_xtnts[QNX4_MAX_XTNTS_PER_XBLK]; | 78 | qnx4_xtnt_t xblk_xtnts[QNX4_MAX_XTNTS_PER_XBLK]; |
79 | char xblk_signature[8]; | 79 | char xblk_signature[8]; |
80 | qnx4_xtnt_t xblk_first_xtnt; | 80 | qnx4_xtnt_t xblk_first_xtnt; |
diff --git a/include/linux/qnxtypes.h b/include/linux/qnxtypes.h index fb518e318c7c..a3eb1137857b 100644 --- a/include/linux/qnxtypes.h +++ b/include/linux/qnxtypes.h | |||
@@ -12,18 +12,18 @@ | |||
12 | #ifndef _QNX4TYPES_H | 12 | #ifndef _QNX4TYPES_H |
13 | #define _QNX4TYPES_H | 13 | #define _QNX4TYPES_H |
14 | 14 | ||
15 | typedef __u16 qnx4_nxtnt_t; | 15 | typedef __le16 qnx4_nxtnt_t; |
16 | typedef __u8 qnx4_ftype_t; | 16 | typedef __u8 qnx4_ftype_t; |
17 | 17 | ||
18 | typedef struct { | 18 | typedef struct { |
19 | __u32 xtnt_blk; | 19 | __le32 xtnt_blk; |
20 | __u32 xtnt_size; | 20 | __le32 xtnt_size; |
21 | } qnx4_xtnt_t; | 21 | } qnx4_xtnt_t; |
22 | 22 | ||
23 | typedef __u16 qnx4_mode_t; | 23 | typedef __le16 qnx4_mode_t; |
24 | typedef __u16 qnx4_muid_t; | 24 | typedef __le16 qnx4_muid_t; |
25 | typedef __u16 qnx4_mgid_t; | 25 | typedef __le16 qnx4_mgid_t; |
26 | typedef __u32 qnx4_off_t; | 26 | typedef __le32 qnx4_off_t; |
27 | typedef __u16 qnx4_nlink_t; | 27 | typedef __le16 qnx4_nlink_t; |
28 | 28 | ||
29 | #endif | 29 | #endif |