aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-07-27 07:40:08 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-27 07:40:08 -0400
commit15d3b4a26291c170563e2b25ded5de1324f93959 (patch)
tree9bea548a7de5215c58a091d58f4eefdb92349f2c /arch/ia64
parent2c3abab7c95295f319dc8899b74cbd60140fcdfb (diff)
parent8be1a6d6c77ab4532e4476fdb8177030ef48b52c (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/hp/common/hwsw_iommu.c5
-rw-r--r--arch/ia64/hp/common/sba_iommu.c2
-rw-r--r--arch/ia64/ia32/sys_ia32.c2
-rw-r--r--arch/ia64/kernel/entry.S6
-rw-r--r--arch/ia64/kernel/kprobes.c6
-rw-r--r--arch/ia64/kernel/perfmon.c4
-rw-r--r--arch/ia64/kernel/sys_ia64.c2
-rw-r--r--arch/ia64/mm/discontig.c30
-rw-r--r--arch/ia64/mm/hugetlbpage.c15
-rw-r--r--arch/ia64/sn/pci/pci_dma.c2
10 files changed, 43 insertions, 31 deletions
diff --git a/arch/ia64/hp/common/hwsw_iommu.c b/arch/ia64/hp/common/hwsw_iommu.c
index 1c44ec2a1d58..88b6e6f3fd88 100644
--- a/arch/ia64/hp/common/hwsw_iommu.c
+++ b/arch/ia64/hp/common/hwsw_iommu.c
@@ -186,9 +186,10 @@ hwsw_dma_supported (struct device *dev, u64 mask)
186} 186}
187 187
188int 188int
189hwsw_dma_mapping_error (dma_addr_t dma_addr) 189hwsw_dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
190{ 190{
191 return hwiommu_dma_mapping_error (dma_addr) || swiotlb_dma_mapping_error(dma_addr); 191 return hwiommu_dma_mapping_error(dev, dma_addr) ||
192 swiotlb_dma_mapping_error(dev, dma_addr);
192} 193}
193 194
194EXPORT_SYMBOL(hwsw_dma_mapping_error); 195EXPORT_SYMBOL(hwsw_dma_mapping_error);
diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c
index 34421aed1e2a..4956be40d7b5 100644
--- a/arch/ia64/hp/common/sba_iommu.c
+++ b/arch/ia64/hp/common/sba_iommu.c
@@ -2147,7 +2147,7 @@ sba_dma_supported (struct device *dev, u64 mask)
2147} 2147}
2148 2148
2149int 2149int
2150sba_dma_mapping_error (dma_addr_t dma_addr) 2150sba_dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
2151{ 2151{
2152 return 0; 2152 return 0;
2153} 2153}
diff --git a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c
index 7e028ceb93ba..465116aecb85 100644
--- a/arch/ia64/ia32/sys_ia32.c
+++ b/arch/ia64/ia32/sys_ia32.c
@@ -1139,7 +1139,7 @@ sys32_pipe (int __user *fd)
1139 int retval; 1139 int retval;
1140 int fds[2]; 1140 int fds[2];
1141 1141
1142 retval = do_pipe(fds); 1142 retval = do_pipe_flags(fds, 0);
1143 if (retval) 1143 if (retval)
1144 goto out; 1144 goto out;
1145 if (copy_to_user(fd, fds, sizeof(fds))) 1145 if (copy_to_user(fd, fds, sizeof(fds)))
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S
index 56ab156c48ae..0dd6c1419d8d 100644
--- a/arch/ia64/kernel/entry.S
+++ b/arch/ia64/kernel/entry.S
@@ -1691,6 +1691,12 @@ sys_call_table:
1691 data8 sys_timerfd_create // 1310 1691 data8 sys_timerfd_create // 1310
1692 data8 sys_timerfd_settime 1692 data8 sys_timerfd_settime
1693 data8 sys_timerfd_gettime 1693 data8 sys_timerfd_gettime
1694 data8 sys_signalfd4
1695 data8 sys_eventfd2
1696 data8 sys_epoll_create1 // 1315
1697 data8 sys_dup3
1698 data8 sys_pipe2
1699 data8 sys_inotify_init1
1694 1700
1695 .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls 1701 .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls
1696#endif /* __IA64_ASM_PARAVIRTUALIZED_NATIVE */ 1702#endif /* __IA64_ASM_PARAVIRTUALIZED_NATIVE */
diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c
index 233434f4f88f..f07688da947c 100644
--- a/arch/ia64/kernel/kprobes.c
+++ b/arch/ia64/kernel/kprobes.c
@@ -429,8 +429,7 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs)
429 ((struct fnptr *)kretprobe_trampoline)->ip; 429 ((struct fnptr *)kretprobe_trampoline)->ip;
430 430
431 INIT_HLIST_HEAD(&empty_rp); 431 INIT_HLIST_HEAD(&empty_rp);
432 spin_lock_irqsave(&kretprobe_lock, flags); 432 kretprobe_hash_lock(current, &head, &flags);
433 head = kretprobe_inst_table_head(current);
434 433
435 /* 434 /*
436 * It is possible to have multiple instances associated with a given 435 * It is possible to have multiple instances associated with a given
@@ -485,7 +484,7 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs)
485 kretprobe_assert(ri, orig_ret_address, trampoline_address); 484 kretprobe_assert(ri, orig_ret_address, trampoline_address);
486 485
487 reset_current_kprobe(); 486 reset_current_kprobe();
488 spin_unlock_irqrestore(&kretprobe_lock, flags); 487 kretprobe_hash_unlock(current, &flags);
489 preempt_enable_no_resched(); 488 preempt_enable_no_resched();
490 489
491 hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) { 490 hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) {
@@ -500,7 +499,6 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs)
500 return 1; 499 return 1;
501} 500}
502 501
503/* Called with kretprobe_lock held */
504void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri, 502void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri,
505 struct pt_regs *regs) 503 struct pt_regs *regs)
506{ 504{
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
index 19d4493c6193..fc8f3509df27 100644
--- a/arch/ia64/kernel/perfmon.c
+++ b/arch/ia64/kernel/perfmon.c
@@ -2626,7 +2626,7 @@ pfm_task_incompatible(pfm_context_t *ctx, struct task_struct *task)
2626 /* 2626 /*
2627 * make sure the task is off any CPU 2627 * make sure the task is off any CPU
2628 */ 2628 */
2629 wait_task_inactive(task); 2629 wait_task_inactive(task, 0);
2630 2630
2631 /* more to come... */ 2631 /* more to come... */
2632 2632
@@ -4774,7 +4774,7 @@ recheck:
4774 4774
4775 UNPROTECT_CTX(ctx, flags); 4775 UNPROTECT_CTX(ctx, flags);
4776 4776
4777 wait_task_inactive(task); 4777 wait_task_inactive(task, 0);
4778 4778
4779 PROTECT_CTX(ctx, flags); 4779 PROTECT_CTX(ctx, flags);
4780 4780
diff --git a/arch/ia64/kernel/sys_ia64.c b/arch/ia64/kernel/sys_ia64.c
index 1eda194b9559..bcbb6d8792d3 100644
--- a/arch/ia64/kernel/sys_ia64.c
+++ b/arch/ia64/kernel/sys_ia64.c
@@ -160,7 +160,7 @@ sys_pipe (void)
160 int fd[2]; 160 int fd[2];
161 int retval; 161 int retval;
162 162
163 retval = do_pipe(fd); 163 retval = do_pipe_flags(fd, 0);
164 if (retval) 164 if (retval)
165 goto out; 165 goto out;
166 retval = fd[0]; 166 retval = fd[0];
diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c
index 544dc420c65e..d83125e1ed27 100644
--- a/arch/ia64/mm/discontig.c
+++ b/arch/ia64/mm/discontig.c
@@ -36,7 +36,6 @@ struct early_node_data {
36 struct ia64_node_data *node_data; 36 struct ia64_node_data *node_data;
37 unsigned long pernode_addr; 37 unsigned long pernode_addr;
38 unsigned long pernode_size; 38 unsigned long pernode_size;
39 struct bootmem_data bootmem_data;
40 unsigned long num_physpages; 39 unsigned long num_physpages;
41#ifdef CONFIG_ZONE_DMA 40#ifdef CONFIG_ZONE_DMA
42 unsigned long num_dma_physpages; 41 unsigned long num_dma_physpages;
@@ -75,17 +74,17 @@ pg_data_t *pgdat_list[MAX_NUMNODES];
75static int __init build_node_maps(unsigned long start, unsigned long len, 74static int __init build_node_maps(unsigned long start, unsigned long len,
76 int node) 75 int node)
77{ 76{
78 unsigned long cstart, epfn, end = start + len; 77 unsigned long spfn, epfn, end = start + len;
79 struct bootmem_data *bdp = &mem_data[node].bootmem_data; 78 struct bootmem_data *bdp = &bootmem_node_data[node];
80 79
81 epfn = GRANULEROUNDUP(end) >> PAGE_SHIFT; 80 epfn = GRANULEROUNDUP(end) >> PAGE_SHIFT;
82 cstart = GRANULEROUNDDOWN(start); 81 spfn = GRANULEROUNDDOWN(start) >> PAGE_SHIFT;
83 82
84 if (!bdp->node_low_pfn) { 83 if (!bdp->node_low_pfn) {
85 bdp->node_boot_start = cstart; 84 bdp->node_min_pfn = spfn;
86 bdp->node_low_pfn = epfn; 85 bdp->node_low_pfn = epfn;
87 } else { 86 } else {
88 bdp->node_boot_start = min(cstart, bdp->node_boot_start); 87 bdp->node_min_pfn = min(spfn, bdp->node_min_pfn);
89 bdp->node_low_pfn = max(epfn, bdp->node_low_pfn); 88 bdp->node_low_pfn = max(epfn, bdp->node_low_pfn);
90 } 89 }
91 90
@@ -167,7 +166,7 @@ static void __init fill_pernode(int node, unsigned long pernode,
167{ 166{
168 void *cpu_data; 167 void *cpu_data;
169 int cpus = early_nr_cpus_node(node); 168 int cpus = early_nr_cpus_node(node);
170 struct bootmem_data *bdp = &mem_data[node].bootmem_data; 169 struct bootmem_data *bdp = &bootmem_node_data[node];
171 170
172 mem_data[node].pernode_addr = pernode; 171 mem_data[node].pernode_addr = pernode;
173 mem_data[node].pernode_size = pernodesize; 172 mem_data[node].pernode_size = pernodesize;
@@ -222,20 +221,21 @@ static void __init fill_pernode(int node, unsigned long pernode,
222static int __init find_pernode_space(unsigned long start, unsigned long len, 221static int __init find_pernode_space(unsigned long start, unsigned long len,
223 int node) 222 int node)
224{ 223{
225 unsigned long epfn; 224 unsigned long spfn, epfn;
226 unsigned long pernodesize = 0, pernode, pages, mapsize; 225 unsigned long pernodesize = 0, pernode, pages, mapsize;
227 struct bootmem_data *bdp = &mem_data[node].bootmem_data; 226 struct bootmem_data *bdp = &bootmem_node_data[node];
228 227
228 spfn = start >> PAGE_SHIFT;
229 epfn = (start + len) >> PAGE_SHIFT; 229 epfn = (start + len) >> PAGE_SHIFT;
230 230
231 pages = bdp->node_low_pfn - (bdp->node_boot_start >> PAGE_SHIFT); 231 pages = bdp->node_low_pfn - bdp->node_min_pfn;
232 mapsize = bootmem_bootmap_pages(pages) << PAGE_SHIFT; 232 mapsize = bootmem_bootmap_pages(pages) << PAGE_SHIFT;
233 233
234 /* 234 /*
235 * Make sure this memory falls within this node's usable memory 235 * Make sure this memory falls within this node's usable memory
236 * since we may have thrown some away in build_maps(). 236 * since we may have thrown some away in build_maps().
237 */ 237 */
238 if (start < bdp->node_boot_start || epfn > bdp->node_low_pfn) 238 if (spfn < bdp->node_min_pfn || epfn > bdp->node_low_pfn)
239 return 0; 239 return 0;
240 240
241 /* Don't setup this node's local space twice... */ 241 /* Don't setup this node's local space twice... */
@@ -297,7 +297,7 @@ static void __init reserve_pernode_space(void)
297 bdp = pdp->bdata; 297 bdp = pdp->bdata;
298 298
299 /* First the bootmem_map itself */ 299 /* First the bootmem_map itself */
300 pages = bdp->node_low_pfn - (bdp->node_boot_start>>PAGE_SHIFT); 300 pages = bdp->node_low_pfn - bdp->node_min_pfn;
301 size = bootmem_bootmap_pages(pages) << PAGE_SHIFT; 301 size = bootmem_bootmap_pages(pages) << PAGE_SHIFT;
302 base = __pa(bdp->node_bootmem_map); 302 base = __pa(bdp->node_bootmem_map);
303 reserve_bootmem_node(pdp, base, size, BOOTMEM_DEFAULT); 303 reserve_bootmem_node(pdp, base, size, BOOTMEM_DEFAULT);
@@ -440,7 +440,7 @@ void __init find_memory(void)
440 efi_memmap_walk(find_max_min_low_pfn, NULL); 440 efi_memmap_walk(find_max_min_low_pfn, NULL);
441 441
442 for_each_online_node(node) 442 for_each_online_node(node)
443 if (mem_data[node].bootmem_data.node_low_pfn) { 443 if (bootmem_node_data[node].node_low_pfn) {
444 node_clear(node, memory_less_mask); 444 node_clear(node, memory_less_mask);
445 mem_data[node].min_pfn = ~0UL; 445 mem_data[node].min_pfn = ~0UL;
446 } 446 }
@@ -460,14 +460,14 @@ void __init find_memory(void)
460 else if (node_isset(node, memory_less_mask)) 460 else if (node_isset(node, memory_less_mask))
461 continue; 461 continue;
462 462
463 bdp = &mem_data[node].bootmem_data; 463 bdp = &bootmem_node_data[node];
464 pernode = mem_data[node].pernode_addr; 464 pernode = mem_data[node].pernode_addr;
465 pernodesize = mem_data[node].pernode_size; 465 pernodesize = mem_data[node].pernode_size;
466 map = pernode + pernodesize; 466 map = pernode + pernodesize;
467 467
468 init_bootmem_node(pgdat_list[node], 468 init_bootmem_node(pgdat_list[node],
469 map>>PAGE_SHIFT, 469 map>>PAGE_SHIFT,
470 bdp->node_boot_start>>PAGE_SHIFT, 470 bdp->node_min_pfn,
471 bdp->node_low_pfn); 471 bdp->node_low_pfn);
472 } 472 }
473 473
diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c
index d3ce8f3bcaa6..c45fc7f5a979 100644
--- a/arch/ia64/mm/hugetlbpage.c
+++ b/arch/ia64/mm/hugetlbpage.c
@@ -24,7 +24,7 @@
24unsigned int hpage_shift=HPAGE_SHIFT_DEFAULT; 24unsigned int hpage_shift=HPAGE_SHIFT_DEFAULT;
25 25
26pte_t * 26pte_t *
27huge_pte_alloc (struct mm_struct *mm, unsigned long addr) 27huge_pte_alloc(struct mm_struct *mm, unsigned long addr, unsigned long sz)
28{ 28{
29 unsigned long taddr = htlbpage_to_page(addr); 29 unsigned long taddr = htlbpage_to_page(addr);
30 pgd_t *pgd; 30 pgd_t *pgd;
@@ -75,7 +75,8 @@ int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep)
75 * Don't actually need to do any preparation, but need to make sure 75 * Don't actually need to do any preparation, but need to make sure
76 * the address is in the right region. 76 * the address is in the right region.
77 */ 77 */
78int prepare_hugepage_range(unsigned long addr, unsigned long len) 78int prepare_hugepage_range(struct file *file,
79 unsigned long addr, unsigned long len)
79{ 80{
80 if (len & ~HPAGE_MASK) 81 if (len & ~HPAGE_MASK)
81 return -EINVAL; 82 return -EINVAL;
@@ -106,13 +107,19 @@ int pmd_huge(pmd_t pmd)
106{ 107{
107 return 0; 108 return 0;
108} 109}
110
111int pud_huge(pud_t pud)
112{
113 return 0;
114}
115
109struct page * 116struct page *
110follow_huge_pmd(struct mm_struct *mm, unsigned long address, pmd_t *pmd, int write) 117follow_huge_pmd(struct mm_struct *mm, unsigned long address, pmd_t *pmd, int write)
111{ 118{
112 return NULL; 119 return NULL;
113} 120}
114 121
115void hugetlb_free_pgd_range(struct mmu_gather **tlb, 122void hugetlb_free_pgd_range(struct mmu_gather *tlb,
116 unsigned long addr, unsigned long end, 123 unsigned long addr, unsigned long end,
117 unsigned long floor, unsigned long ceiling) 124 unsigned long floor, unsigned long ceiling)
118{ 125{
@@ -149,7 +156,7 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, u
149 156
150 /* Handle MAP_FIXED */ 157 /* Handle MAP_FIXED */
151 if (flags & MAP_FIXED) { 158 if (flags & MAP_FIXED) {
152 if (prepare_hugepage_range(addr, len)) 159 if (prepare_hugepage_range(file, addr, len))
153 return -EINVAL; 160 return -EINVAL;
154 return addr; 161 return addr;
155 } 162 }
diff --git a/arch/ia64/sn/pci/pci_dma.c b/arch/ia64/sn/pci/pci_dma.c
index 52175af299a0..53ebb6484495 100644
--- a/arch/ia64/sn/pci/pci_dma.c
+++ b/arch/ia64/sn/pci/pci_dma.c
@@ -350,7 +350,7 @@ void sn_dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg,
350} 350}
351EXPORT_SYMBOL(sn_dma_sync_sg_for_device); 351EXPORT_SYMBOL(sn_dma_sync_sg_for_device);
352 352
353int sn_dma_mapping_error(dma_addr_t dma_addr) 353int sn_dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
354{ 354{
355 return 0; 355 return 0;
356} 356}