aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh64
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-sh64')
-rw-r--r--include/asm-sh64/atomic.h2
-rw-r--r--include/asm-sh64/cache.h2
-rw-r--r--include/asm-sh64/futex.h49
-rw-r--r--include/asm-sh64/io.h8
-rw-r--r--include/asm-sh64/ioctl.h84
-rw-r--r--include/asm-sh64/mmu_context.h2
-rw-r--r--include/asm-sh64/mutex.h9
-rw-r--r--include/asm-sh64/pgalloc.h14
-rw-r--r--include/asm-sh64/pgtable.h24
-rw-r--r--include/asm-sh64/processor.h4
-rw-r--r--include/asm-sh64/system.h4
-rw-r--r--include/asm-sh64/thread_info.h2
-rw-r--r--include/asm-sh64/tlbflush.h2
-rw-r--r--include/asm-sh64/uaccess.h2
14 files changed, 43 insertions, 165 deletions
diff --git a/include/asm-sh64/atomic.h b/include/asm-sh64/atomic.h
index f3ce5c0df13a..28f2ea9b567b 100644
--- a/include/asm-sh64/atomic.h
+++ b/include/asm-sh64/atomic.h
@@ -113,6 +113,8 @@ static inline int atomic_cmpxchg(atomic_t *v, int old, int new)
113 return ret; 113 return ret;
114} 114}
115 115
116#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
117
116static inline int atomic_add_unless(atomic_t *v, int a, int u) 118static inline int atomic_add_unless(atomic_t *v, int a, int u)
117{ 119{
118 int ret; 120 int ret;
diff --git a/include/asm-sh64/cache.h b/include/asm-sh64/cache.h
index f54e85e8a470..a4f36f0036e1 100644
--- a/include/asm-sh64/cache.h
+++ b/include/asm-sh64/cache.h
@@ -20,8 +20,6 @@
20#define L1_CACHE_ALIGN_MASK (~(L1_CACHE_BYTES - 1)) 20#define L1_CACHE_ALIGN_MASK (~(L1_CACHE_BYTES - 1))
21#define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES - 1)) & L1_CACHE_ALIGN_MASK) 21#define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES - 1)) & L1_CACHE_ALIGN_MASK)
22#define L1_CACHE_SIZE_BYTES (L1_CACHE_BYTES << 10) 22#define L1_CACHE_SIZE_BYTES (L1_CACHE_BYTES << 10)
23/* Largest L1 which this arch supports */
24#define L1_CACHE_SHIFT_MAX 5
25 23
26#ifdef MODULE 24#ifdef MODULE
27#define __cacheline_aligned __attribute__((__aligned__(L1_CACHE_BYTES))) 25#define __cacheline_aligned __attribute__((__aligned__(L1_CACHE_BYTES)))
diff --git a/include/asm-sh64/futex.h b/include/asm-sh64/futex.h
index 9feff4ce1424..6a332a9f099c 100644
--- a/include/asm-sh64/futex.h
+++ b/include/asm-sh64/futex.h
@@ -1,53 +1,6 @@
1#ifndef _ASM_FUTEX_H 1#ifndef _ASM_FUTEX_H
2#define _ASM_FUTEX_H 2#define _ASM_FUTEX_H
3 3
4#ifdef __KERNEL__ 4#include <asm-generic/futex.h>
5 5
6#include <linux/futex.h>
7#include <asm/errno.h>
8#include <asm/uaccess.h>
9
10static inline int
11futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
12{
13 int op = (encoded_op >> 28) & 7;
14 int cmp = (encoded_op >> 24) & 15;
15 int oparg = (encoded_op << 8) >> 20;
16 int cmparg = (encoded_op << 20) >> 20;
17 int oldval = 0, ret;
18 if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
19 oparg = 1 << oparg;
20
21 if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int)))
22 return -EFAULT;
23
24 inc_preempt_count();
25
26 switch (op) {
27 case FUTEX_OP_SET:
28 case FUTEX_OP_ADD:
29 case FUTEX_OP_OR:
30 case FUTEX_OP_ANDN:
31 case FUTEX_OP_XOR:
32 default:
33 ret = -ENOSYS;
34 }
35
36 dec_preempt_count();
37
38 if (!ret) {
39 switch (cmp) {
40 case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break;
41 case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break;
42 case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break;
43 case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break;
44 case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break;
45 case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break;
46 default: ret = -ENOSYS;
47 }
48 }
49 return ret;
50}
51
52#endif
53#endif 6#endif
diff --git a/include/asm-sh64/io.h b/include/asm-sh64/io.h
index cfafaa73b2b0..dee4f77929a4 100644
--- a/include/asm-sh64/io.h
+++ b/include/asm-sh64/io.h
@@ -143,12 +143,12 @@ extern unsigned long pciio_virt;
143 * Change virtual addresses to physical addresses and vv. 143 * Change virtual addresses to physical addresses and vv.
144 * These are trivial on the 1:1 Linux/SuperH mapping 144 * These are trivial on the 1:1 Linux/SuperH mapping
145 */ 145 */
146extern __inline__ unsigned long virt_to_phys(volatile void * address) 146static inline unsigned long virt_to_phys(volatile void * address)
147{ 147{
148 return __pa(address); 148 return __pa(address);
149} 149}
150 150
151extern __inline__ void * phys_to_virt(unsigned long address) 151static inline void * phys_to_virt(unsigned long address)
152{ 152{
153 return __va(address); 153 return __va(address);
154} 154}
@@ -156,12 +156,12 @@ extern __inline__ void * phys_to_virt(unsigned long address)
156extern void * __ioremap(unsigned long phys_addr, unsigned long size, 156extern void * __ioremap(unsigned long phys_addr, unsigned long size,
157 unsigned long flags); 157 unsigned long flags);
158 158
159extern __inline__ void * ioremap(unsigned long phys_addr, unsigned long size) 159static inline void * ioremap(unsigned long phys_addr, unsigned long size)
160{ 160{
161 return __ioremap(phys_addr, size, 1); 161 return __ioremap(phys_addr, size, 1);
162} 162}
163 163
164extern __inline__ void * ioremap_nocache (unsigned long phys_addr, unsigned long size) 164static inline void * ioremap_nocache (unsigned long phys_addr, unsigned long size)
165{ 165{
166 return __ioremap(phys_addr, size, 0); 166 return __ioremap(phys_addr, size, 0);
167} 167}
diff --git a/include/asm-sh64/ioctl.h b/include/asm-sh64/ioctl.h
index c089a6fb78e0..b279fe06dfe5 100644
--- a/include/asm-sh64/ioctl.h
+++ b/include/asm-sh64/ioctl.h
@@ -1,83 +1 @@
1#ifndef __ASM_SH64_IOCTL_H #include <asm-generic/ioctl.h>
2#define __ASM_SH64_IOCTL_H
3
4/*
5 * This file is subject to the terms and conditions of the GNU General Public
6 * License. See the file "COPYING" in the main directory of this archive
7 * for more details.
8 *
9 * include/asm-sh64/ioctl.h
10 *
11 * Copyright (C) 2000, 2001 Paolo Alberelli
12 *
13 * linux/ioctl.h for Linux by H.H. Bergman.
14 *
15 */
16
17/* ioctl command encoding: 32 bits total, command in lower 16 bits,
18 * size of the parameter structure in the lower 14 bits of the
19 * upper 16 bits.
20 * Encoding the size of the parameter structure in the ioctl request
21 * is useful for catching programs compiled with old versions
22 * and to avoid overwriting user space outside the user buffer area.
23 * The highest 2 bits are reserved for indicating the ``access mode''.
24 * NOTE: This limits the max parameter size to 16kB -1 !
25 */
26
27/*
28 * The following is for compatibility across the various Linux
29 * platforms. The i386 ioctl numbering scheme doesn't really enforce
30 * a type field. De facto, however, the top 8 bits of the lower 16
31 * bits are indeed used as a type field, so we might just as well make
32 * this explicit here. Please be sure to use the decoding macros
33 * below from now on.
34 */
35#define _IOC_NRBITS 8
36#define _IOC_TYPEBITS 8
37#define _IOC_SIZEBITS 14
38#define _IOC_DIRBITS 2
39
40#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1)
41#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1)
42#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1)
43#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1)
44
45#define _IOC_NRSHIFT 0
46#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS)
47#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS)
48#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS)
49
50/*
51 * Direction bits.
52 */
53#define _IOC_NONE 0U
54#define _IOC_WRITE 1U
55#define _IOC_READ 2U
56
57#define _IOC(dir,type,nr,size) \
58 (((dir) << _IOC_DIRSHIFT) | \
59 ((type) << _IOC_TYPESHIFT) | \
60 ((nr) << _IOC_NRSHIFT) | \
61 ((size) << _IOC_SIZESHIFT))
62
63/* used to create numbers */
64#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0)
65#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size))
66#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size))
67#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size))
68
69/* used to decode ioctl numbers.. */
70#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK)
71#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK)
72#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK)
73#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK)
74
75/* ...and for the drivers/sound files... */
76
77#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT)
78#define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT)
79#define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT)
80#define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT)
81#define IOCSIZE_SHIFT (_IOC_SIZESHIFT)
82
83#endif /* __ASM_SH64_IOCTL_H */
diff --git a/include/asm-sh64/mmu_context.h b/include/asm-sh64/mmu_context.h
index f062e1513272..991cfda4cdf6 100644
--- a/include/asm-sh64/mmu_context.h
+++ b/include/asm-sh64/mmu_context.h
@@ -50,7 +50,7 @@ extern pgd_t *mmu_pdtp_cache;
50 */ 50 */
51#define MMU_VPN_MASK 0xfffff000 51#define MMU_VPN_MASK 0xfffff000
52 52
53extern __inline__ void 53static inline void
54get_new_mmu_context(struct mm_struct *mm) 54get_new_mmu_context(struct mm_struct *mm)
55{ 55{
56 extern void flush_tlb_all(void); 56 extern void flush_tlb_all(void);
diff --git a/include/asm-sh64/mutex.h b/include/asm-sh64/mutex.h
new file mode 100644
index 000000000000..458c1f7fbc18
--- /dev/null
+++ b/include/asm-sh64/mutex.h
@@ -0,0 +1,9 @@
1/*
2 * Pull in the generic implementation for the mutex fastpath.
3 *
4 * TODO: implement optimized primitives instead, or leave the generic
5 * implementation in place, or pick the atomic_xchg() based generic
6 * implementation. (see asm-generic/mutex-xchg.h for details)
7 */
8
9#include <asm-generic/mutex-dec.h>
diff --git a/include/asm-sh64/pgalloc.h b/include/asm-sh64/pgalloc.h
index b25f5df5535c..678251ac1db8 100644
--- a/include/asm-sh64/pgalloc.h
+++ b/include/asm-sh64/pgalloc.h
@@ -38,14 +38,14 @@ static inline void pgd_init(unsigned long page)
38 * if any. 38 * if any.
39 */ 39 */
40 40
41extern __inline__ pgd_t *get_pgd_slow(void) 41static inline pgd_t *get_pgd_slow(void)
42{ 42{
43 unsigned int pgd_size = (USER_PTRS_PER_PGD * sizeof(pgd_t)); 43 unsigned int pgd_size = (USER_PTRS_PER_PGD * sizeof(pgd_t));
44 pgd_t *ret = (pgd_t *)kmalloc(pgd_size, GFP_KERNEL); 44 pgd_t *ret = (pgd_t *)kmalloc(pgd_size, GFP_KERNEL);
45 return ret; 45 return ret;
46} 46}
47 47
48extern __inline__ pgd_t *get_pgd_fast(void) 48static inline pgd_t *get_pgd_fast(void)
49{ 49{
50 unsigned long *ret; 50 unsigned long *ret;
51 51
@@ -62,14 +62,14 @@ extern __inline__ pgd_t *get_pgd_fast(void)
62 return (pgd_t *)ret; 62 return (pgd_t *)ret;
63} 63}
64 64
65extern __inline__ void free_pgd_fast(pgd_t *pgd) 65static inline void free_pgd_fast(pgd_t *pgd)
66{ 66{
67 *(unsigned long *)pgd = (unsigned long) pgd_quicklist; 67 *(unsigned long *)pgd = (unsigned long) pgd_quicklist;
68 pgd_quicklist = (unsigned long *) pgd; 68 pgd_quicklist = (unsigned long *) pgd;
69 pgtable_cache_size++; 69 pgtable_cache_size++;
70} 70}
71 71
72extern __inline__ void free_pgd_slow(pgd_t *pgd) 72static inline void free_pgd_slow(pgd_t *pgd)
73{ 73{
74 kfree((void *)pgd); 74 kfree((void *)pgd);
75} 75}
@@ -77,7 +77,7 @@ extern __inline__ void free_pgd_slow(pgd_t *pgd)
77extern pte_t *get_pte_slow(pmd_t *pmd, unsigned long address_preadjusted); 77extern pte_t *get_pte_slow(pmd_t *pmd, unsigned long address_preadjusted);
78extern pte_t *get_pte_kernel_slow(pmd_t *pmd, unsigned long address_preadjusted); 78extern pte_t *get_pte_kernel_slow(pmd_t *pmd, unsigned long address_preadjusted);
79 79
80extern __inline__ pte_t *get_pte_fast(void) 80static inline pte_t *get_pte_fast(void)
81{ 81{
82 unsigned long *ret; 82 unsigned long *ret;
83 83
@@ -89,7 +89,7 @@ extern __inline__ pte_t *get_pte_fast(void)
89 return (pte_t *)ret; 89 return (pte_t *)ret;
90} 90}
91 91
92extern __inline__ void free_pte_fast(pte_t *pte) 92static inline void free_pte_fast(pte_t *pte)
93{ 93{
94 *(unsigned long *)pte = (unsigned long) pte_quicklist; 94 *(unsigned long *)pte = (unsigned long) pte_quicklist;
95 pte_quicklist = (unsigned long *) pte; 95 pte_quicklist = (unsigned long *) pte;
@@ -167,7 +167,7 @@ static __inline__ void pmd_free(pmd_t *pmd)
167 167
168extern int do_check_pgt_cache(int, int); 168extern int do_check_pgt_cache(int, int);
169 169
170extern inline void set_pgdir(unsigned long address, pgd_t entry) 170static inline void set_pgdir(unsigned long address, pgd_t entry)
171{ 171{
172 struct task_struct * p; 172 struct task_struct * p;
173 pgd_t *pgd; 173 pgd_t *pgd;
diff --git a/include/asm-sh64/pgtable.h b/include/asm-sh64/pgtable.h
index a1906a772df9..57af6b3eb271 100644
--- a/include/asm-sh64/pgtable.h
+++ b/include/asm-sh64/pgtable.h
@@ -421,18 +421,18 @@ static inline int pte_young(pte_t pte){ return pte_val(pte) & _PAGE_ACCESSED; }
421static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } 421static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; }
422static inline int pte_write(pte_t pte){ return pte_val(pte) & _PAGE_WRITE; } 422static inline int pte_write(pte_t pte){ return pte_val(pte) & _PAGE_WRITE; }
423 423
424extern inline pte_t pte_rdprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_READ)); return pte; } 424static inline pte_t pte_rdprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_READ)); return pte; }
425extern inline pte_t pte_wrprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_WRITE)); return pte; } 425static inline pte_t pte_wrprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_WRITE)); return pte; }
426extern inline pte_t pte_exprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_EXECUTE)); return pte; } 426static inline pte_t pte_exprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_EXECUTE)); return pte; }
427extern inline pte_t pte_mkclean(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_DIRTY)); return pte; } 427static inline pte_t pte_mkclean(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_DIRTY)); return pte; }
428extern inline pte_t pte_mkold(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_ACCESSED)); return pte; } 428static inline pte_t pte_mkold(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_ACCESSED)); return pte; }
429 429
430extern inline pte_t pte_mkread(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_READ)); return pte; } 430static inline pte_t pte_mkread(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_READ)); return pte; }
431extern inline pte_t pte_mkwrite(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_WRITE)); return pte; } 431static inline pte_t pte_mkwrite(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_WRITE)); return pte; }
432extern inline pte_t pte_mkexec(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_EXECUTE)); return pte; } 432static inline pte_t pte_mkexec(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_EXECUTE)); return pte; }
433extern inline pte_t pte_mkdirty(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_DIRTY)); return pte; } 433static inline pte_t pte_mkdirty(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_DIRTY)); return pte; }
434extern inline pte_t pte_mkyoung(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_ACCESSED)); return pte; } 434static inline pte_t pte_mkyoung(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_ACCESSED)); return pte; }
435extern inline pte_t pte_mkhuge(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_SZHUGE)); return pte; } 435static inline pte_t pte_mkhuge(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_SZHUGE)); return pte; }
436 436
437 437
438/* 438/*
@@ -456,7 +456,7 @@ extern inline pte_t pte_mkhuge(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _
456#define mk_pte_phys(physpage, pgprot) \ 456#define mk_pte_phys(physpage, pgprot) \
457({ pte_t __pte; set_pte(&__pte, __pte(physpage | pgprot_val(pgprot))); __pte; }) 457({ pte_t __pte; set_pte(&__pte, __pte(physpage | pgprot_val(pgprot))); __pte; })
458 458
459extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot) 459static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
460{ set_pte(&pte, __pte((pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot))); return pte; } 460{ set_pte(&pte, __pte((pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot))); return pte; }
461 461
462typedef pte_t *pte_addr_t; 462typedef pte_t *pte_addr_t;
diff --git a/include/asm-sh64/processor.h b/include/asm-sh64/processor.h
index a51bd41e6fbc..1bf252dad824 100644
--- a/include/asm-sh64/processor.h
+++ b/include/asm-sh64/processor.h
@@ -228,7 +228,7 @@ extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
228 * FPU lazy state save handling. 228 * FPU lazy state save handling.
229 */ 229 */
230 230
231extern __inline__ void release_fpu(void) 231static inline void release_fpu(void)
232{ 232{
233 unsigned long long __dummy; 233 unsigned long long __dummy;
234 234
@@ -240,7 +240,7 @@ extern __inline__ void release_fpu(void)
240 : "r" (SR_FD)); 240 : "r" (SR_FD));
241} 241}
242 242
243extern __inline__ void grab_fpu(void) 243static inline void grab_fpu(void)
244{ 244{
245 unsigned long long __dummy; 245 unsigned long long __dummy;
246 246
diff --git a/include/asm-sh64/system.h b/include/asm-sh64/system.h
index 42510e496eb5..3002e988180c 100644
--- a/include/asm-sh64/system.h
+++ b/include/asm-sh64/system.h
@@ -132,7 +132,7 @@ static __inline__ void local_irq_disable(void)
132 (flags != 0); \ 132 (flags != 0); \
133}) 133})
134 134
135extern __inline__ unsigned long xchg_u32(volatile int * m, unsigned long val) 135static inline unsigned long xchg_u32(volatile int * m, unsigned long val)
136{ 136{
137 unsigned long flags, retval; 137 unsigned long flags, retval;
138 138
@@ -143,7 +143,7 @@ extern __inline__ unsigned long xchg_u32(volatile int * m, unsigned long val)
143 return retval; 143 return retval;
144} 144}
145 145
146extern __inline__ unsigned long xchg_u8(volatile unsigned char * m, unsigned long val) 146static inline unsigned long xchg_u8(volatile unsigned char * m, unsigned long val)
147{ 147{
148 unsigned long flags, retval; 148 unsigned long flags, retval;
149 149
diff --git a/include/asm-sh64/thread_info.h b/include/asm-sh64/thread_info.h
index 10f024c6a2e3..1f825cb163c3 100644
--- a/include/asm-sh64/thread_info.h
+++ b/include/asm-sh64/thread_info.h
@@ -66,8 +66,6 @@ static inline struct thread_info *current_thread_info(void)
66 66
67#define alloc_thread_info(ti) ((struct thread_info *) __get_free_pages(GFP_KERNEL,1)) 67#define alloc_thread_info(ti) ((struct thread_info *) __get_free_pages(GFP_KERNEL,1))
68#define free_thread_info(ti) free_pages((unsigned long) (ti), 1) 68#define free_thread_info(ti) free_pages((unsigned long) (ti), 1)
69#define get_thread_info(ti) get_task_struct((ti)->task)
70#define put_thread_info(ti) put_task_struct((ti)->task)
71 69
72#endif /* __ASSEMBLY__ */ 70#endif /* __ASSEMBLY__ */
73 71
diff --git a/include/asm-sh64/tlbflush.h b/include/asm-sh64/tlbflush.h
index 15c0719eecc3..e45beadc29ee 100644
--- a/include/asm-sh64/tlbflush.h
+++ b/include/asm-sh64/tlbflush.h
@@ -20,7 +20,7 @@ extern void flush_tlb_mm(struct mm_struct *mm);
20extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, 20extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
21 unsigned long end); 21 unsigned long end);
22extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long page); 22extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long page);
23extern inline void flush_tlb_pgtables(struct mm_struct *mm, 23static inline void flush_tlb_pgtables(struct mm_struct *mm,
24 unsigned long start, unsigned long end) 24 unsigned long start, unsigned long end)
25{ 25{
26} 26}
diff --git a/include/asm-sh64/uaccess.h b/include/asm-sh64/uaccess.h
index 56aa3cf0f273..f4936d8fa617 100644
--- a/include/asm-sh64/uaccess.h
+++ b/include/asm-sh64/uaccess.h
@@ -287,7 +287,7 @@ __sfu_res = __strncpy_from_user((unsigned long) (dest), __sfu_src, __sfu_count);
287 */ 287 */
288extern long __strnlen_user(const char *__s, long __n); 288extern long __strnlen_user(const char *__s, long __n);
289 289
290extern __inline__ long strnlen_user(const char *s, long n) 290static inline long strnlen_user(const char *s, long n)
291{ 291{
292 if (!__addr_ok(s)) 292 if (!__addr_ok(s))
293 return 0; 293 return 0;