aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-12-16 13:06:39 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-16 13:06:39 -0500
commit9cfc86249f32d984339c6d1f8a1fd1326989b3b8 (patch)
tree56428d319483f54949de8d9d0a5b3f715287ed91 /arch/ia64
parentf42647acc4eab1befa9e290691ed7a40f9a7d3cc (diff)
parent243797f59b748f679ab88d456fcc4f92236d724b (diff)
Merge branch 'akpm'
* akpm: (173 commits) genalloc: use bitmap_find_next_zero_area ia64: use bitmap_find_next_zero_area sparc: use bitmap_find_next_zero_area mlx4: use bitmap_find_next_zero_area isp1362-hcd: use bitmap_find_next_zero_area iommu-helper: use bitmap library bitmap: introduce bitmap_set, bitmap_clear, bitmap_find_next_zero_area qnx4: use hweight8 qnx4fs: remove remains of the (defunct) write support resource: constify arg to resource_size() and resource_type() gru: send cross partition interrupts using the gru gru: function to generate chipset IPI values gru: update driver version number gru: improve GRU TLB dropin statistics gru: fix GRU interrupt race at deallocate gru: add hugepage support gru: fix bug in allocation of kernel contexts gru: update GRU structures to match latest hardware spec gru: check for correct GRU chiplet assignment gru: remove stray local_irq_enable ...
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/ia32/elfcore32.h2
-rw-r--r--arch/ia64/include/asm/dma-mapping.h2
-rw-r--r--arch/ia64/include/asm/elf.h1
-rw-r--r--arch/ia64/sn/pci/tioca_provider.c19
4 files changed, 6 insertions, 18 deletions
diff --git a/arch/ia64/ia32/elfcore32.h b/arch/ia64/ia32/elfcore32.h
index 9a3abf58cea3..657725742617 100644
--- a/arch/ia64/ia32/elfcore32.h
+++ b/arch/ia64/ia32/elfcore32.h
@@ -11,8 +11,6 @@
11#include <asm/intrinsics.h> 11#include <asm/intrinsics.h>
12#include <asm/uaccess.h> 12#include <asm/uaccess.h>
13 13
14#define USE_ELF_CORE_DUMP 1
15
16/* Override elfcore.h */ 14/* Override elfcore.h */
17#define _LINUX_ELFCORE_H 1 15#define _LINUX_ELFCORE_H 1
18typedef unsigned int elf_greg_t; 16typedef unsigned int elf_greg_t;
diff --git a/arch/ia64/include/asm/dma-mapping.h b/arch/ia64/include/asm/dma-mapping.h
index 8d3c79cd81e7..7d09a09cdaad 100644
--- a/arch/ia64/include/asm/dma-mapping.h
+++ b/arch/ia64/include/asm/dma-mapping.h
@@ -73,7 +73,7 @@ static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
73 if (!dev->dma_mask) 73 if (!dev->dma_mask)
74 return 0; 74 return 0;
75 75
76 return addr + size <= *dev->dma_mask; 76 return addr + size - 1 <= *dev->dma_mask;
77} 77}
78 78
79static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr) 79static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr)
diff --git a/arch/ia64/include/asm/elf.h b/arch/ia64/include/asm/elf.h
index 86eddee029cb..e14108b19c09 100644
--- a/arch/ia64/include/asm/elf.h
+++ b/arch/ia64/include/asm/elf.h
@@ -25,7 +25,6 @@
25#define ELF_DATA ELFDATA2LSB 25#define ELF_DATA ELFDATA2LSB
26#define ELF_ARCH EM_IA_64 26#define ELF_ARCH EM_IA_64
27 27
28#define USE_ELF_CORE_DUMP
29#define CORE_DUMP_USE_REGSET 28#define CORE_DUMP_USE_REGSET
30 29
31/* Least-significant four bits of ELF header's e_flags are OS-specific. The bits are 30/* Least-significant four bits of ELF header's e_flags are OS-specific. The bits are
diff --git a/arch/ia64/sn/pci/tioca_provider.c b/arch/ia64/sn/pci/tioca_provider.c
index 35b2a27d2e77..efb454534e52 100644
--- a/arch/ia64/sn/pci/tioca_provider.c
+++ b/arch/ia64/sn/pci/tioca_provider.c
@@ -9,6 +9,7 @@
9#include <linux/types.h> 9#include <linux/types.h>
10#include <linux/interrupt.h> 10#include <linux/interrupt.h>
11#include <linux/pci.h> 11#include <linux/pci.h>
12#include <linux/bitmap.h>
12#include <asm/sn/sn_sal.h> 13#include <asm/sn/sn_sal.h>
13#include <asm/sn/addrs.h> 14#include <asm/sn/addrs.h>
14#include <asm/sn/io.h> 15#include <asm/sn/io.h>
@@ -369,7 +370,7 @@ tioca_dma_d48(struct pci_dev *pdev, u64 paddr)
369static dma_addr_t 370static dma_addr_t
370tioca_dma_mapped(struct pci_dev *pdev, unsigned long paddr, size_t req_size) 371tioca_dma_mapped(struct pci_dev *pdev, unsigned long paddr, size_t req_size)
371{ 372{
372 int i, ps, ps_shift, entry, entries, mapsize, last_entry; 373 int ps, ps_shift, entry, entries, mapsize;
373 u64 xio_addr, end_xio_addr; 374 u64 xio_addr, end_xio_addr;
374 struct tioca_common *tioca_common; 375 struct tioca_common *tioca_common;
375 struct tioca_kernel *tioca_kern; 376 struct tioca_kernel *tioca_kern;
@@ -410,23 +411,13 @@ tioca_dma_mapped(struct pci_dev *pdev, unsigned long paddr, size_t req_size)
410 map = tioca_kern->ca_pcigart_pagemap; 411 map = tioca_kern->ca_pcigart_pagemap;
411 mapsize = tioca_kern->ca_pcigart_entries; 412 mapsize = tioca_kern->ca_pcigart_entries;
412 413
413 entry = find_first_zero_bit(map, mapsize); 414 entry = bitmap_find_next_zero_area(map, mapsize, 0, entries, 0);
414 while (entry < mapsize) { 415 if (entry >= mapsize) {
415 last_entry = find_next_bit(map, mapsize, entry);
416
417 if (last_entry - entry >= entries)
418 break;
419
420 entry = find_next_zero_bit(map, mapsize, last_entry);
421 }
422
423 if (entry > mapsize) {
424 kfree(ca_dmamap); 416 kfree(ca_dmamap);
425 goto map_return; 417 goto map_return;
426 } 418 }
427 419
428 for (i = 0; i < entries; i++) 420 bitmap_set(map, entry, entries);
429 set_bit(entry + i, map);
430 421
431 bus_addr = tioca_kern->ca_pciap_base + (entry * ps); 422 bus_addr = tioca_kern->ca_pciap_base + (entry * ps);
432 423