aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2007-05-16 16:50:37 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-05-16 16:50:37 -0400
commit55d3ecab2d16be3525ba24a96ba3a67692af1f09 (patch)
tree7e81977adbd73e154f53861d8577d3ab92611c8c /include
parent6684e323a236d40461f27d36b38c6b70aabc9e71 (diff)
parent7b104bcb8e460e45a1aebe3da9b86aacdb4cab12 (diff)
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/
Diffstat (limited to 'include')
-rw-r--r--include/asm-m32r/system.h3
-rw-r--r--include/asm-sh64/dma-mapping.h14
-rw-r--r--include/asm-sh64/irq_regs.h1
-rw-r--r--include/asm-sh64/pgalloc.h100
-rw-r--r--include/asm-sh64/sci.h1
-rw-r--r--include/asm-sh64/thread_info.h6
-rw-r--r--include/asm-sh64/unistd.h43
-rw-r--r--include/linux/ide.h3
8 files changed, 79 insertions, 92 deletions
diff --git a/include/asm-m32r/system.h b/include/asm-m32r/system.h
index b291b2f72954..8ee73d3f316d 100644
--- a/include/asm-m32r/system.h
+++ b/include/asm-m32r/system.h
@@ -10,6 +10,7 @@
10 * Copyright (C) 2004, 2006 Hirokazu Takata <takata at linux-m32r.org> 10 * Copyright (C) 2004, 2006 Hirokazu Takata <takata at linux-m32r.org>
11 */ 11 */
12 12
13#include <linux/compiler.h>
13#include <asm/assembler.h> 14#include <asm/assembler.h>
14 15
15#ifdef __KERNEL__ 16#ifdef __KERNEL__
@@ -154,7 +155,7 @@ extern void __xchg_called_with_bad_pointer(void);
154#define DCACHE_CLEAR(reg0, reg1, addr) 155#define DCACHE_CLEAR(reg0, reg1, addr)
155#endif /* CONFIG_CHIP_M32700_TS1 */ 156#endif /* CONFIG_CHIP_M32700_TS1 */
156 157
157static inline unsigned long 158static __always_inline unsigned long
158__xchg(unsigned long x, volatile void * ptr, int size) 159__xchg(unsigned long x, volatile void * ptr, int size)
159{ 160{
160 unsigned long flags; 161 unsigned long flags;
diff --git a/include/asm-sh64/dma-mapping.h b/include/asm-sh64/dma-mapping.h
index 5efe906c59f7..c7c0f059cdc4 100644
--- a/include/asm-sh64/dma-mapping.h
+++ b/include/asm-sh64/dma-mapping.h
@@ -35,6 +35,10 @@ static inline void dma_free_coherent(struct device *dev, size_t size,
35 consistent_free(NULL, size, vaddr, dma_handle); 35 consistent_free(NULL, size, vaddr, dma_handle);
36} 36}
37 37
38#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
39#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
40#define dma_is_consistent(d, h) (1)
41
38static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size, 42static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
39 enum dma_data_direction dir) 43 enum dma_data_direction dir)
40{ 44{
@@ -49,7 +53,7 @@ static inline dma_addr_t dma_map_single(struct device *dev,
49 if (dev->bus == &pci_bus_type) 53 if (dev->bus == &pci_bus_type)
50 return virt_to_bus(ptr); 54 return virt_to_bus(ptr);
51#endif 55#endif
52 dma_cache_sync(ptr, size, dir); 56 dma_cache_sync(dev, ptr, size, dir);
53 57
54 return virt_to_bus(ptr); 58 return virt_to_bus(ptr);
55} 59}
@@ -63,7 +67,7 @@ static inline int dma_map_sg(struct device *dev, struct scatterlist *sg,
63 67
64 for (i = 0; i < nents; i++) { 68 for (i = 0; i < nents; i++) {
65#if !defined(CONFIG_PCI) || defined(CONFIG_SH_PCIDMA_NONCOHERENT) 69#if !defined(CONFIG_PCI) || defined(CONFIG_SH_PCIDMA_NONCOHERENT)
66 dma_cache_sync(page_address(sg[i].page) + sg[i].offset, 70 dma_cache_sync(dev, page_address(sg[i].page) + sg[i].offset,
67 sg[i].length, dir); 71 sg[i].length, dir);
68#endif 72#endif
69 sg[i].dma_address = page_to_phys(sg[i].page) + sg[i].offset; 73 sg[i].dma_address = page_to_phys(sg[i].page) + sg[i].offset;
@@ -94,7 +98,7 @@ static inline void dma_sync_single(struct device *dev, dma_addr_t dma_handle,
94 if (dev->bus == &pci_bus_type) 98 if (dev->bus == &pci_bus_type)
95 return; 99 return;
96#endif 100#endif
97 dma_cache_sync(bus_to_virt(dma_handle), size, dir); 101 dma_cache_sync(dev, bus_to_virt(dma_handle), size, dir);
98} 102}
99 103
100static inline void dma_sync_single_range(struct device *dev, 104static inline void dma_sync_single_range(struct device *dev,
@@ -106,7 +110,7 @@ static inline void dma_sync_single_range(struct device *dev,
106 if (dev->bus == &pci_bus_type) 110 if (dev->bus == &pci_bus_type)
107 return; 111 return;
108#endif 112#endif
109 dma_cache_sync(bus_to_virt(dma_handle) + offset, size, dir); 113 dma_cache_sync(dev, bus_to_virt(dma_handle) + offset, size, dir);
110} 114}
111 115
112static inline void dma_sync_sg(struct device *dev, struct scatterlist *sg, 116static inline void dma_sync_sg(struct device *dev, struct scatterlist *sg,
@@ -116,7 +120,7 @@ static inline void dma_sync_sg(struct device *dev, struct scatterlist *sg,
116 120
117 for (i = 0; i < nelems; i++) { 121 for (i = 0; i < nelems; i++) {
118#if !defined(CONFIG_PCI) || defined(CONFIG_SH_PCIDMA_NONCOHERENT) 122#if !defined(CONFIG_PCI) || defined(CONFIG_SH_PCIDMA_NONCOHERENT)
119 dma_cache_sync(page_address(sg[i].page) + sg[i].offset, 123 dma_cache_sync(dev, page_address(sg[i].page) + sg[i].offset,
120 sg[i].length, dir); 124 sg[i].length, dir);
121#endif 125#endif
122 sg[i].dma_address = page_to_phys(sg[i].page) + sg[i].offset; 126 sg[i].dma_address = page_to_phys(sg[i].page) + sg[i].offset;
diff --git a/include/asm-sh64/irq_regs.h b/include/asm-sh64/irq_regs.h
new file mode 100644
index 000000000000..3dd9c0b70270
--- /dev/null
+++ b/include/asm-sh64/irq_regs.h
@@ -0,0 +1 @@
#include <asm-generic/irq_regs.h>
diff --git a/include/asm-sh64/pgalloc.h b/include/asm-sh64/pgalloc.h
index cb803e56cb64..6eccab770a6d 100644
--- a/include/asm-sh64/pgalloc.h
+++ b/include/asm-sh64/pgalloc.h
@@ -14,13 +14,9 @@
14 * 14 *
15 */ 15 */
16 16
17#include <linux/threads.h>
18#include <linux/mm.h> 17#include <linux/mm.h>
19 18#include <linux/quicklist.h>
20#define pgd_quicklist (current_cpu_data.pgd_quick) 19#include <asm/page.h>
21#define pmd_quicklist (current_cpu_data.pmd_quick)
22#define pte_quicklist (current_cpu_data.pte_quick)
23#define pgtable_cache_size (current_cpu_data.pgtable_cache_sz)
24 20
25static inline void pgd_init(unsigned long page) 21static inline void pgd_init(unsigned long page)
26{ 22{
@@ -45,84 +41,37 @@ static inline pgd_t *get_pgd_slow(void)
45 return ret; 41 return ret;
46} 42}
47 43
48static inline pgd_t *get_pgd_fast(void) 44static inline pgd_t *pgd_alloc(struct mm_struct *mm)
49{
50 unsigned long *ret;
51
52 if ((ret = pgd_quicklist) != NULL) {
53 pgd_quicklist = (unsigned long *)(*ret);
54 ret[0] = 0;
55 pgtable_cache_size--;
56 } else
57 ret = (unsigned long *)get_pgd_slow();
58
59 if (ret) {
60 memset(ret, 0, USER_PTRS_PER_PGD * sizeof(pgd_t));
61 }
62 return (pgd_t *)ret;
63}
64
65static inline void free_pgd_fast(pgd_t *pgd)
66{
67 *(unsigned long *)pgd = (unsigned long) pgd_quicklist;
68 pgd_quicklist = (unsigned long *) pgd;
69 pgtable_cache_size++;
70}
71
72static inline void free_pgd_slow(pgd_t *pgd)
73{ 45{
74 kfree((void *)pgd); 46 return quicklist_alloc(0, GFP_KERNEL, NULL);
75} 47}
76 48
77extern pte_t *get_pte_slow(pmd_t *pmd, unsigned long address_preadjusted); 49static inline void pgd_free(pgd_t *pgd)
78extern pte_t *get_pte_kernel_slow(pmd_t *pmd, unsigned long address_preadjusted);
79
80static inline pte_t *get_pte_fast(void)
81{ 50{
82 unsigned long *ret; 51 quicklist_free(0, NULL, pgd);
83
84 if((ret = (unsigned long *)pte_quicklist) != NULL) {
85 pte_quicklist = (unsigned long *)(*ret);
86 ret[0] = ret[1];
87 pgtable_cache_size--;
88 }
89 return (pte_t *)ret;
90} 52}
91 53
92static inline void free_pte_fast(pte_t *pte) 54static inline struct page *pte_alloc_one(struct mm_struct *mm,
55 unsigned long address)
93{ 56{
94 *(unsigned long *)pte = (unsigned long) pte_quicklist; 57 void *pg = quicklist_alloc(0, GFP_KERNEL, NULL);
95 pte_quicklist = (unsigned long *) pte; 58 return pg ? virt_to_page(pg) : NULL;
96 pgtable_cache_size++;
97} 59}
98 60
99static inline void pte_free_kernel(pte_t *pte) 61static inline void pte_free_kernel(pte_t *pte)
100{ 62{
101 free_page((unsigned long)pte); 63 quicklist_free(0, NULL, pte);
102} 64}
103 65
104static inline void pte_free(struct page *pte) 66static inline void pte_free(struct page *pte)
105{ 67{
106 __free_page(pte); 68 quicklist_free_page(0, NULL, pte);
107} 69}
108 70
109static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, 71static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
110 unsigned long address) 72 unsigned long address)
111{ 73{
112 pte_t *pte; 74 return quicklist_alloc(0, GFP_KERNEL, NULL);
113
114 pte = (pte_t *)__get_free_page(GFP_KERNEL | __GFP_REPEAT|__GFP_ZERO);
115
116 return pte;
117}
118
119static inline struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address)
120{
121 struct page *pte;
122
123 pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO, 0);
124
125 return pte;
126} 75}
127 76
128#define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte)) 77#define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte))
@@ -142,31 +91,23 @@ static inline struct page *pte_alloc_one(struct mm_struct *mm, unsigned long add
142 91
143#elif defined(CONFIG_SH64_PGTABLE_3_LEVEL) 92#elif defined(CONFIG_SH64_PGTABLE_3_LEVEL)
144 93
145static __inline__ pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address) 94static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address)
146{ 95{
147 pmd_t *pmd; 96 return quicklist_alloc(0, GFP_KERNEL, NULL);
148 pmd = (pmd_t *) __get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO);
149 return pmd;
150} 97}
151 98
152static __inline__ void pmd_free(pmd_t *pmd) 99static inline void pmd_free(pmd_t *pmd)
153{ 100{
154 free_page((unsigned long) pmd); 101 quicklist_free(0, NULL, pmd);
155} 102}
156 103
157#define pgd_populate(mm, pgd, pmd) pgd_set(pgd, pmd) 104#define pgd_populate(mm, pgd, pmd) pgd_set(pgd, pmd)
158#define __pmd_free_tlb(tlb,pmd) pmd_free(pmd) 105#define __pmd_free_tlb(tlb,pmd) pmd_free(pmd)
159 106
160#else 107#else
161#error "No defined page table size" 108#error "No defined page table size"
162#endif 109#endif
163 110
164#define check_pgt_cache() do { } while (0)
165#define pgd_free(pgd) free_pgd_slow(pgd)
166#define pgd_alloc(mm) get_pgd_fast()
167
168extern int do_check_pgt_cache(int, int);
169
170#define pmd_populate_kernel(mm, pmd, pte) \ 111#define pmd_populate_kernel(mm, pmd, pte) \
171 set_pmd(pmd, __pmd(_PAGE_TABLE + (unsigned long) (pte))) 112 set_pmd(pmd, __pmd(_PAGE_TABLE + (unsigned long) (pte)))
172 113
@@ -176,4 +117,9 @@ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd,
176 set_pmd(pmd, __pmd(_PAGE_TABLE + (unsigned long) page_address (pte))); 117 set_pmd(pmd, __pmd(_PAGE_TABLE + (unsigned long) page_address (pte)));
177} 118}
178 119
120static inline void check_pgt_cache(void)
121{
122 quicklist_trim(0, NULL, 25, 16);
123}
124
179#endif /* __ASM_SH64_PGALLOC_H */ 125#endif /* __ASM_SH64_PGALLOC_H */
diff --git a/include/asm-sh64/sci.h b/include/asm-sh64/sci.h
new file mode 100644
index 000000000000..793c568b7820
--- /dev/null
+++ b/include/asm-sh64/sci.h
@@ -0,0 +1 @@
#include <asm-sh/sci.h>
diff --git a/include/asm-sh64/thread_info.h b/include/asm-sh64/thread_info.h
index 1f825cb163c3..f6d5117c53af 100644
--- a/include/asm-sh64/thread_info.h
+++ b/include/asm-sh64/thread_info.h
@@ -78,7 +78,13 @@ static inline struct thread_info *current_thread_info(void)
78#define TIF_SIGPENDING 2 /* signal pending */ 78#define TIF_SIGPENDING 2 /* signal pending */
79#define TIF_NEED_RESCHED 3 /* rescheduling necessary */ 79#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
80#define TIF_MEMDIE 4 80#define TIF_MEMDIE 4
81#define TIF_RESTORE_SIGMASK 5 /* Restore signal mask in do_signal */
81 82
83#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
84#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
85#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
86#define _TIF_MEMDIE (1 << TIF_MEMDIE)
87#define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK)
82 88
83#endif /* __KERNEL__ */ 89#endif /* __KERNEL__ */
84 90
diff --git a/include/asm-sh64/unistd.h b/include/asm-sh64/unistd.h
index 1f38a7aacaaf..ea3adc600b41 100644
--- a/include/asm-sh64/unistd.h
+++ b/include/asm-sh64/unistd.h
@@ -9,14 +9,14 @@
9 * include/asm-sh64/unistd.h 9 * include/asm-sh64/unistd.h
10 * 10 *
11 * Copyright (C) 2000, 2001 Paolo Alberelli 11 * Copyright (C) 2000, 2001 Paolo Alberelli
12 * Copyright (C) 2003 Paul Mundt 12 * Copyright (C) 2003 - 2007 Paul Mundt
13 * Copyright (C) 2004 Sean McGoogan 13 * Copyright (C) 2004 Sean McGoogan
14 * 14 *
15 * This file contains the system call numbers. 15 * This file contains the system call numbers.
16 * 16 *
17 */ 17 */
18 18
19#define __NR_setup 0 /* used only by init, to get system going */ 19#define __NR_restart_syscall 0
20#define __NR_exit 1 20#define __NR_exit 1
21#define __NR_fork 2 21#define __NR_fork 2
22#define __NR_read 3 22#define __NR_read 3
@@ -196,8 +196,8 @@
196#define __NR_rt_sigtimedwait 177 196#define __NR_rt_sigtimedwait 177
197#define __NR_rt_sigqueueinfo 178 197#define __NR_rt_sigqueueinfo 178
198#define __NR_rt_sigsuspend 179 198#define __NR_rt_sigsuspend 179
199#define __NR_pread 180 199#define __NR_pread64 180
200#define __NR_pwrite 181 200#define __NR_pwrite64 181
201#define __NR_chown 182 201#define __NR_chown 182
202#define __NR_getcwd 183 202#define __NR_getcwd 183
203#define __NR_capget 184 203#define __NR_capget 184
@@ -343,10 +343,41 @@
343#define __NR_inotify_init 318 343#define __NR_inotify_init 318
344#define __NR_inotify_add_watch 319 344#define __NR_inotify_add_watch 319
345#define __NR_inotify_rm_watch 320 345#define __NR_inotify_rm_watch 320
346/* 321 is unused */
347#define __NR_migrate_pages 322
348#define __NR_openat 323
349#define __NR_mkdirat 324
350#define __NR_mknodat 325
351#define __NR_fchownat 326
352#define __NR_futimesat 327
353#define __NR_fstatat64 328
354#define __NR_unlinkat 329
355#define __NR_renameat 330
356#define __NR_linkat 331
357#define __NR_symlinkat 332
358#define __NR_readlinkat 333
359#define __NR_fchmodat 334
360#define __NR_faccessat 335
361#define __NR_pselect6 336
362#define __NR_ppoll 337
363#define __NR_unshare 338
364#define __NR_set_robust_list 339
365#define __NR_get_robust_list 340
366#define __NR_splice 341
367#define __NR_sync_file_range 342
368#define __NR_tee 343
369#define __NR_vmsplice 344
370#define __NR_move_pages 345
371#define __NR_getcpu 346
372#define __NR_epoll_pwait 347
373#define __NR_utimensat 348
374#define __NR_signalfd 349
375#define __NR_timerfd 350
376#define __NR_eventfd 351
346 377
347#ifdef __KERNEL__ 378#ifdef __KERNEL__
348 379
349#define NR_syscalls 321 380#define NR_syscalls 352
350 381
351#define __ARCH_WANT_IPC_PARSE_VERSION 382#define __ARCH_WANT_IPC_PARSE_VERSION
352#define __ARCH_WANT_OLD_READDIR 383#define __ARCH_WANT_OLD_READDIR
diff --git a/include/linux/ide.h b/include/linux/ide.h
index df4e6a510310..07aba87d369d 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -1281,7 +1281,6 @@ struct drive_list_entry {
1281int ide_in_drive_list(struct hd_driveid *, const struct drive_list_entry *); 1281int ide_in_drive_list(struct hd_driveid *, const struct drive_list_entry *);
1282int __ide_dma_bad_drive(ide_drive_t *); 1282int __ide_dma_bad_drive(ide_drive_t *);
1283int __ide_dma_good_drive(ide_drive_t *); 1283int __ide_dma_good_drive(ide_drive_t *);
1284int ide_use_dma(ide_drive_t *);
1285u8 ide_max_dma_mode(ide_drive_t *); 1284u8 ide_max_dma_mode(ide_drive_t *);
1286int ide_tune_dma(ide_drive_t *); 1285int ide_tune_dma(ide_drive_t *);
1287void ide_dma_off(ide_drive_t *); 1286void ide_dma_off(ide_drive_t *);
@@ -1309,7 +1308,6 @@ extern int __ide_dma_timeout(ide_drive_t *);
1309#endif /* CONFIG_BLK_DEV_IDEDMA_PCI */ 1308#endif /* CONFIG_BLK_DEV_IDEDMA_PCI */
1310 1309
1311#else 1310#else
1312static inline int ide_use_dma(ide_drive_t *drive) { return 0; }
1313static inline u8 ide_max_dma_mode(ide_drive_t *drive) { return 0; } 1311static inline u8 ide_max_dma_mode(ide_drive_t *drive) { return 0; }
1314static inline int ide_tune_dma(ide_drive_t *drive) { return 0; } 1312static inline int ide_tune_dma(ide_drive_t *drive) { return 0; }
1315static inline void ide_dma_off(ide_drive_t *drive) { ; } 1313static inline void ide_dma_off(ide_drive_t *drive) { ; }
@@ -1357,7 +1355,6 @@ static inline void ide_set_hwifdata (ide_hwif_t * hwif, void *data)
1357 1355
1358/* ide-lib.c */ 1356/* ide-lib.c */
1359u8 ide_rate_filter(ide_drive_t *, u8); 1357u8 ide_rate_filter(ide_drive_t *, u8);
1360extern int ide_dma_enable(ide_drive_t *drive);
1361extern char *ide_xfer_verbose(u8 xfer_rate); 1358extern char *ide_xfer_verbose(u8 xfer_rate);
1362extern void ide_toggle_bounce(ide_drive_t *drive, int on); 1359extern void ide_toggle_bounce(ide_drive_t *drive, int on);
1363extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate); 1360extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate);