diff options
Diffstat (limited to 'arch/ia64')
-rw-r--r-- | arch/ia64/Makefile | 2 | ||||
-rw-r--r-- | arch/ia64/hp/common/sba_iommu.c | 38 | ||||
-rw-r--r-- | arch/ia64/ia32/elfcore32.h | 2 | ||||
-rw-r--r-- | arch/ia64/include/asm/acpi.h | 6 | ||||
-rw-r--r-- | arch/ia64/include/asm/asm-offsets.h | 1 | ||||
-rw-r--r-- | arch/ia64/include/asm/dma-mapping.h | 2 | ||||
-rw-r--r-- | arch/ia64/include/asm/elf.h | 1 | ||||
-rw-r--r-- | arch/ia64/include/asm/hw_irq.h | 6 | ||||
-rw-r--r-- | arch/ia64/include/asm/io.h | 2 | ||||
-rw-r--r-- | arch/ia64/include/asm/irq.h | 2 | ||||
-rw-r--r-- | arch/ia64/include/asm/mca.h | 5 | ||||
-rw-r--r-- | arch/ia64/include/asm/rwsem.h | 2 | ||||
-rw-r--r-- | arch/ia64/kernel/Makefile | 11 | ||||
-rw-r--r-- | arch/ia64/kernel/acpi-processor.c | 85 | ||||
-rw-r--r-- | arch/ia64/kernel/irq_ia64.c | 6 | ||||
-rw-r--r-- | arch/ia64/kernel/mca.c | 11 | ||||
-rw-r--r-- | arch/ia64/kernel/perfmon.c | 15 | ||||
-rw-r--r-- | arch/ia64/kvm/asm-offsets.c | 1 | ||||
-rw-r--r-- | arch/ia64/kvm/vcpu.h | 9 | ||||
-rw-r--r-- | arch/ia64/kvm/vmm.c | 4 | ||||
-rw-r--r-- | arch/ia64/kvm/vtlb.c | 2 | ||||
-rw-r--r-- | arch/ia64/mm/ioremap.c | 11 | ||||
-rw-r--r-- | arch/ia64/sn/pci/tioca_provider.c | 19 |
23 files changed, 97 insertions, 146 deletions
diff --git a/arch/ia64/Makefile b/arch/ia64/Makefile index e7cbaa02cd0b..475e2725fbde 100644 --- a/arch/ia64/Makefile +++ b/arch/ia64/Makefile | |||
@@ -103,4 +103,4 @@ archprepare: make_nr_irqs_h FORCE | |||
103 | PHONY += make_nr_irqs_h FORCE | 103 | PHONY += make_nr_irqs_h FORCE |
104 | 104 | ||
105 | make_nr_irqs_h: FORCE | 105 | make_nr_irqs_h: FORCE |
106 | $(Q)$(MAKE) $(build)=arch/ia64/kernel include/asm-ia64/nr-irqs.h | 106 | $(Q)$(MAKE) $(build)=arch/ia64/kernel include/generated/nr-irqs.h |
diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c index f332e3fe4237..e14c492a8a93 100644 --- a/arch/ia64/hp/common/sba_iommu.c +++ b/arch/ia64/hp/common/sba_iommu.c | |||
@@ -677,12 +677,19 @@ sba_alloc_range(struct ioc *ioc, struct device *dev, size_t size) | |||
677 | spin_unlock_irqrestore(&ioc->saved_lock, flags); | 677 | spin_unlock_irqrestore(&ioc->saved_lock, flags); |
678 | 678 | ||
679 | pide = sba_search_bitmap(ioc, dev, pages_needed, 0); | 679 | pide = sba_search_bitmap(ioc, dev, pages_needed, 0); |
680 | if (unlikely(pide >= (ioc->res_size << 3))) | 680 | if (unlikely(pide >= (ioc->res_size << 3))) { |
681 | panic(__FILE__ ": I/O MMU @ %p is out of mapping resources\n", | 681 | printk(KERN_WARNING "%s: I/O MMU @ %p is" |
682 | ioc->ioc_hpa); | 682 | "out of mapping resources, %u %u %lx\n", |
683 | __func__, ioc->ioc_hpa, ioc->res_size, | ||
684 | pages_needed, dma_get_seg_boundary(dev)); | ||
685 | return -1; | ||
686 | } | ||
683 | #else | 687 | #else |
684 | panic(__FILE__ ": I/O MMU @ %p is out of mapping resources\n", | 688 | printk(KERN_WARNING "%s: I/O MMU @ %p is" |
685 | ioc->ioc_hpa); | 689 | "out of mapping resources, %u %u %lx\n", |
690 | __func__, ioc->ioc_hpa, ioc->res_size, | ||
691 | pages_needed, dma_get_seg_boundary(dev)); | ||
692 | return -1; | ||
686 | #endif | 693 | #endif |
687 | } | 694 | } |
688 | } | 695 | } |
@@ -965,6 +972,8 @@ static dma_addr_t sba_map_page(struct device *dev, struct page *page, | |||
965 | #endif | 972 | #endif |
966 | 973 | ||
967 | pide = sba_alloc_range(ioc, dev, size); | 974 | pide = sba_alloc_range(ioc, dev, size); |
975 | if (pide < 0) | ||
976 | return 0; | ||
968 | 977 | ||
969 | iovp = (dma_addr_t) pide << iovp_shift; | 978 | iovp = (dma_addr_t) pide << iovp_shift; |
970 | 979 | ||
@@ -1320,6 +1329,7 @@ sba_coalesce_chunks(struct ioc *ioc, struct device *dev, | |||
1320 | unsigned long dma_offset, dma_len; /* start/len of DMA stream */ | 1329 | unsigned long dma_offset, dma_len; /* start/len of DMA stream */ |
1321 | int n_mappings = 0; | 1330 | int n_mappings = 0; |
1322 | unsigned int max_seg_size = dma_get_max_seg_size(dev); | 1331 | unsigned int max_seg_size = dma_get_max_seg_size(dev); |
1332 | int idx; | ||
1323 | 1333 | ||
1324 | while (nents > 0) { | 1334 | while (nents > 0) { |
1325 | unsigned long vaddr = (unsigned long) sba_sg_address(startsg); | 1335 | unsigned long vaddr = (unsigned long) sba_sg_address(startsg); |
@@ -1418,16 +1428,22 @@ sba_coalesce_chunks(struct ioc *ioc, struct device *dev, | |||
1418 | vcontig_sg->dma_length = vcontig_len; | 1428 | vcontig_sg->dma_length = vcontig_len; |
1419 | dma_len = (dma_len + dma_offset + ~iovp_mask) & iovp_mask; | 1429 | dma_len = (dma_len + dma_offset + ~iovp_mask) & iovp_mask; |
1420 | ASSERT(dma_len <= DMA_CHUNK_SIZE); | 1430 | ASSERT(dma_len <= DMA_CHUNK_SIZE); |
1421 | dma_sg->dma_address = (dma_addr_t) (PIDE_FLAG | 1431 | idx = sba_alloc_range(ioc, dev, dma_len); |
1422 | | (sba_alloc_range(ioc, dev, dma_len) << iovp_shift) | 1432 | if (idx < 0) { |
1423 | | dma_offset); | 1433 | dma_sg->dma_length = 0; |
1434 | return -1; | ||
1435 | } | ||
1436 | dma_sg->dma_address = (dma_addr_t)(PIDE_FLAG | (idx << iovp_shift) | ||
1437 | | dma_offset); | ||
1424 | n_mappings++; | 1438 | n_mappings++; |
1425 | } | 1439 | } |
1426 | 1440 | ||
1427 | return n_mappings; | 1441 | return n_mappings; |
1428 | } | 1442 | } |
1429 | 1443 | ||
1430 | 1444 | static void sba_unmap_sg_attrs(struct device *dev, struct scatterlist *sglist, | |
1445 | int nents, enum dma_data_direction dir, | ||
1446 | struct dma_attrs *attrs); | ||
1431 | /** | 1447 | /** |
1432 | * sba_map_sg - map Scatter/Gather list | 1448 | * sba_map_sg - map Scatter/Gather list |
1433 | * @dev: instance of PCI owned by the driver that's asking. | 1449 | * @dev: instance of PCI owned by the driver that's asking. |
@@ -1493,6 +1509,10 @@ static int sba_map_sg_attrs(struct device *dev, struct scatterlist *sglist, | |||
1493 | ** Access to the virtual address is what forces a two pass algorithm. | 1509 | ** Access to the virtual address is what forces a two pass algorithm. |
1494 | */ | 1510 | */ |
1495 | coalesced = sba_coalesce_chunks(ioc, dev, sglist, nents); | 1511 | coalesced = sba_coalesce_chunks(ioc, dev, sglist, nents); |
1512 | if (coalesced < 0) { | ||
1513 | sba_unmap_sg_attrs(dev, sglist, nents, dir, attrs); | ||
1514 | return 0; | ||
1515 | } | ||
1496 | 1516 | ||
1497 | /* | 1517 | /* |
1498 | ** Program the I/O Pdir | 1518 | ** Program the I/O Pdir |
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 |
18 | typedef unsigned int elf_greg_t; | 16 | typedef unsigned int elf_greg_t; |
diff --git a/arch/ia64/include/asm/acpi.h b/arch/ia64/include/asm/acpi.h index 91df9686a0da..7ae58892ba8d 100644 --- a/arch/ia64/include/asm/acpi.h +++ b/arch/ia64/include/asm/acpi.h | |||
@@ -132,6 +132,12 @@ extern int __devinitdata pxm_to_nid_map[MAX_PXM_DOMAINS]; | |||
132 | extern int __initdata nid_to_pxm_map[MAX_NUMNODES]; | 132 | extern int __initdata nid_to_pxm_map[MAX_NUMNODES]; |
133 | #endif | 133 | #endif |
134 | 134 | ||
135 | static inline bool arch_has_acpi_pdc(void) { return true; } | ||
136 | static inline void arch_acpi_set_pdc_bits(u32 *buf) | ||
137 | { | ||
138 | buf[2] |= ACPI_PDC_EST_CAPABILITY_SMP; | ||
139 | } | ||
140 | |||
135 | #define acpi_unlazy_tlb(x) | 141 | #define acpi_unlazy_tlb(x) |
136 | 142 | ||
137 | #ifdef CONFIG_ACPI_NUMA | 143 | #ifdef CONFIG_ACPI_NUMA |
diff --git a/arch/ia64/include/asm/asm-offsets.h b/arch/ia64/include/asm/asm-offsets.h new file mode 100644 index 000000000000..d370ee36a182 --- /dev/null +++ b/arch/ia64/include/asm/asm-offsets.h | |||
@@ -0,0 +1 @@ | |||
#include <generated/asm-offsets.h> | |||
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 | ||
79 | static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr) | 79 | static 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/include/asm/hw_irq.h b/arch/ia64/include/asm/hw_irq.h index 91619b31dbf5..bf2e37493e04 100644 --- a/arch/ia64/include/asm/hw_irq.h +++ b/arch/ia64/include/asm/hw_irq.h | |||
@@ -59,7 +59,13 @@ typedef u16 ia64_vector; | |||
59 | extern int ia64_first_device_vector; | 59 | extern int ia64_first_device_vector; |
60 | extern int ia64_last_device_vector; | 60 | extern int ia64_last_device_vector; |
61 | 61 | ||
62 | #if defined(CONFIG_SMP) && (defined(CONFIG_IA64_GENERIC) || defined (CONFIG_IA64_DIG)) | ||
63 | /* Reserve the lower priority vector than device vectors for "move IRQ" IPI */ | ||
64 | #define IA64_IRQ_MOVE_VECTOR 0x30 /* "move IRQ" IPI */ | ||
65 | #define IA64_DEF_FIRST_DEVICE_VECTOR 0x31 | ||
66 | #else | ||
62 | #define IA64_DEF_FIRST_DEVICE_VECTOR 0x30 | 67 | #define IA64_DEF_FIRST_DEVICE_VECTOR 0x30 |
68 | #endif | ||
63 | #define IA64_DEF_LAST_DEVICE_VECTOR 0xe7 | 69 | #define IA64_DEF_LAST_DEVICE_VECTOR 0xe7 |
64 | #define IA64_FIRST_DEVICE_VECTOR ia64_first_device_vector | 70 | #define IA64_FIRST_DEVICE_VECTOR ia64_first_device_vector |
65 | #define IA64_LAST_DEVICE_VECTOR ia64_last_device_vector | 71 | #define IA64_LAST_DEVICE_VECTOR ia64_last_device_vector |
diff --git a/arch/ia64/include/asm/io.h b/arch/ia64/include/asm/io.h index 0d9d16e2d949..cc8335eb3110 100644 --- a/arch/ia64/include/asm/io.h +++ b/arch/ia64/include/asm/io.h | |||
@@ -424,6 +424,8 @@ __writeq (unsigned long val, volatile void __iomem *addr) | |||
424 | extern void __iomem * ioremap(unsigned long offset, unsigned long size); | 424 | extern void __iomem * ioremap(unsigned long offset, unsigned long size); |
425 | extern void __iomem * ioremap_nocache (unsigned long offset, unsigned long size); | 425 | extern void __iomem * ioremap_nocache (unsigned long offset, unsigned long size); |
426 | extern void iounmap (volatile void __iomem *addr); | 426 | extern void iounmap (volatile void __iomem *addr); |
427 | extern void __iomem * early_ioremap (unsigned long phys_addr, unsigned long size); | ||
428 | extern void early_iounmap (volatile void __iomem *addr, unsigned long size); | ||
427 | 429 | ||
428 | /* | 430 | /* |
429 | * String version of IO memory access ops: | 431 | * String version of IO memory access ops: |
diff --git a/arch/ia64/include/asm/irq.h b/arch/ia64/include/asm/irq.h index 5282546cdf82..91b920fd7d53 100644 --- a/arch/ia64/include/asm/irq.h +++ b/arch/ia64/include/asm/irq.h | |||
@@ -13,7 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
15 | #include <linux/cpumask.h> | 15 | #include <linux/cpumask.h> |
16 | #include <asm-ia64/nr-irqs.h> | 16 | #include <generated/nr-irqs.h> |
17 | 17 | ||
18 | static __inline__ int | 18 | static __inline__ int |
19 | irq_canonicalize (int irq) | 19 | irq_canonicalize (int irq) |
diff --git a/arch/ia64/include/asm/mca.h b/arch/ia64/include/asm/mca.h index c171cdf0a789..43f96ab18fa0 100644 --- a/arch/ia64/include/asm/mca.h +++ b/arch/ia64/include/asm/mca.h | |||
@@ -106,6 +106,11 @@ struct ia64_sal_os_state { | |||
106 | unsigned long os_status; /* OS status to SAL, enum below */ | 106 | unsigned long os_status; /* OS status to SAL, enum below */ |
107 | unsigned long context; /* 0 if return to same context | 107 | unsigned long context; /* 0 if return to same context |
108 | 1 if return to new context */ | 108 | 1 if return to new context */ |
109 | |||
110 | /* I-resources */ | ||
111 | unsigned long iip; | ||
112 | unsigned long ipsr; | ||
113 | unsigned long ifs; | ||
109 | }; | 114 | }; |
110 | 115 | ||
111 | enum { | 116 | enum { |
diff --git a/arch/ia64/include/asm/rwsem.h b/arch/ia64/include/asm/rwsem.h index fbee74b15782..e8762688e8e3 100644 --- a/arch/ia64/include/asm/rwsem.h +++ b/arch/ia64/include/asm/rwsem.h | |||
@@ -47,7 +47,7 @@ struct rw_semaphore { | |||
47 | #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) | 47 | #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) |
48 | 48 | ||
49 | #define __RWSEM_INITIALIZER(name) \ | 49 | #define __RWSEM_INITIALIZER(name) \ |
50 | { RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, \ | 50 | { RWSEM_UNLOCKED_VALUE, __SPIN_LOCK_UNLOCKED((name).wait_lock), \ |
51 | LIST_HEAD_INIT((name).wait_list) } | 51 | LIST_HEAD_INIT((name).wait_list) } |
52 | 52 | ||
53 | #define DECLARE_RWSEM(name) \ | 53 | #define DECLARE_RWSEM(name) \ |
diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile index 6b7edcab0cb5..e1236349c99f 100644 --- a/arch/ia64/kernel/Makefile +++ b/arch/ia64/kernel/Makefile | |||
@@ -18,10 +18,6 @@ obj-$(CONFIG_IA64_GENERIC) += acpi-ext.o | |||
18 | obj-$(CONFIG_IA64_HP_ZX1) += acpi-ext.o | 18 | obj-$(CONFIG_IA64_HP_ZX1) += acpi-ext.o |
19 | obj-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += acpi-ext.o | 19 | obj-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += acpi-ext.o |
20 | 20 | ||
21 | ifneq ($(CONFIG_ACPI_PROCESSOR),) | ||
22 | obj-y += acpi-processor.o | ||
23 | endif | ||
24 | |||
25 | obj-$(CONFIG_IA64_PALINFO) += palinfo.o | 21 | obj-$(CONFIG_IA64_PALINFO) += palinfo.o |
26 | obj-$(CONFIG_IOSAPIC) += iosapic.o | 22 | obj-$(CONFIG_IOSAPIC) += iosapic.o |
27 | obj-$(CONFIG_MODULES) += module.o | 23 | obj-$(CONFIG_MODULES) += module.o |
@@ -81,17 +77,14 @@ define cmd_nr_irqs | |||
81 | endef | 77 | endef |
82 | 78 | ||
83 | # We use internal kbuild rules to avoid the "is up to date" message from make | 79 | # We use internal kbuild rules to avoid the "is up to date" message from make |
84 | arch/$(SRCARCH)/kernel/nr-irqs.s: $(srctree)/arch/$(SRCARCH)/kernel/nr-irqs.c \ | 80 | arch/$(SRCARCH)/kernel/nr-irqs.s: arch/$(SRCARCH)/kernel/nr-irqs.c |
85 | $(wildcard $(srctree)/include/asm-ia64/*/irq.h) | ||
86 | $(Q)mkdir -p $(dir $@) | 81 | $(Q)mkdir -p $(dir $@) |
87 | $(call if_changed_dep,cc_s_c) | 82 | $(call if_changed_dep,cc_s_c) |
88 | 83 | ||
89 | include/asm-ia64/nr-irqs.h: arch/$(SRCARCH)/kernel/nr-irqs.s | 84 | include/generated/nr-irqs.h: arch/$(SRCARCH)/kernel/nr-irqs.s |
90 | $(Q)mkdir -p $(dir $@) | 85 | $(Q)mkdir -p $(dir $@) |
91 | $(call cmd,nr_irqs) | 86 | $(call cmd,nr_irqs) |
92 | 87 | ||
93 | clean-files += $(objtree)/include/asm-ia64/nr-irqs.h | ||
94 | |||
95 | # | 88 | # |
96 | # native ivt.S, entry.S and fsys.S | 89 | # native ivt.S, entry.S and fsys.S |
97 | # | 90 | # |
diff --git a/arch/ia64/kernel/acpi-processor.c b/arch/ia64/kernel/acpi-processor.c deleted file mode 100644 index dbda7bde6112..000000000000 --- a/arch/ia64/kernel/acpi-processor.c +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | /* | ||
2 | * arch/ia64/kernel/acpi-processor.c | ||
3 | * | ||
4 | * Copyright (C) 2005 Intel Corporation | ||
5 | * Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> | ||
6 | * - Added _PDC for platforms with Intel CPUs | ||
7 | */ | ||
8 | |||
9 | #include <linux/kernel.h> | ||
10 | #include <linux/module.h> | ||
11 | #include <linux/init.h> | ||
12 | #include <linux/acpi.h> | ||
13 | |||
14 | #include <acpi/processor.h> | ||
15 | #include <asm/acpi.h> | ||
16 | |||
17 | static void init_intel_pdc(struct acpi_processor *pr) | ||
18 | { | ||
19 | struct acpi_object_list *obj_list; | ||
20 | union acpi_object *obj; | ||
21 | u32 *buf; | ||
22 | |||
23 | /* allocate and initialize pdc. It will be used later. */ | ||
24 | obj_list = kmalloc(sizeof(struct acpi_object_list), GFP_KERNEL); | ||
25 | if (!obj_list) { | ||
26 | printk(KERN_ERR "Memory allocation error\n"); | ||
27 | return; | ||
28 | } | ||
29 | |||
30 | obj = kmalloc(sizeof(union acpi_object), GFP_KERNEL); | ||
31 | if (!obj) { | ||
32 | printk(KERN_ERR "Memory allocation error\n"); | ||
33 | kfree(obj_list); | ||
34 | return; | ||
35 | } | ||
36 | |||
37 | buf = kmalloc(12, GFP_KERNEL); | ||
38 | if (!buf) { | ||
39 | printk(KERN_ERR "Memory allocation error\n"); | ||
40 | kfree(obj); | ||
41 | kfree(obj_list); | ||
42 | return; | ||
43 | } | ||
44 | |||
45 | buf[0] = ACPI_PDC_REVISION_ID; | ||
46 | buf[1] = 1; | ||
47 | buf[2] = ACPI_PDC_EST_CAPABILITY_SMP; | ||
48 | /* | ||
49 | * The default of PDC_SMP_T_SWCOORD bit is set for IA64 cpu so | ||
50 | * that OSPM is capable of native ACPI throttling software | ||
51 | * coordination using BIOS supplied _TSD info. | ||
52 | */ | ||
53 | buf[2] |= ACPI_PDC_SMP_T_SWCOORD; | ||
54 | |||
55 | obj->type = ACPI_TYPE_BUFFER; | ||
56 | obj->buffer.length = 12; | ||
57 | obj->buffer.pointer = (u8 *) buf; | ||
58 | obj_list->count = 1; | ||
59 | obj_list->pointer = obj; | ||
60 | pr->pdc = obj_list; | ||
61 | |||
62 | return; | ||
63 | } | ||
64 | |||
65 | /* Initialize _PDC data based on the CPU vendor */ | ||
66 | void arch_acpi_processor_init_pdc(struct acpi_processor *pr) | ||
67 | { | ||
68 | pr->pdc = NULL; | ||
69 | init_intel_pdc(pr); | ||
70 | return; | ||
71 | } | ||
72 | |||
73 | EXPORT_SYMBOL(arch_acpi_processor_init_pdc); | ||
74 | |||
75 | void arch_acpi_processor_cleanup_pdc(struct acpi_processor *pr) | ||
76 | { | ||
77 | if (pr->pdc) { | ||
78 | kfree(pr->pdc->pointer->buffer.pointer); | ||
79 | kfree(pr->pdc->pointer); | ||
80 | kfree(pr->pdc); | ||
81 | pr->pdc = NULL; | ||
82 | } | ||
83 | } | ||
84 | |||
85 | EXPORT_SYMBOL(arch_acpi_processor_cleanup_pdc); | ||
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c index 70e4bad23432..d4093a173a3e 100644 --- a/arch/ia64/kernel/irq_ia64.c +++ b/arch/ia64/kernel/irq_ia64.c | |||
@@ -260,7 +260,6 @@ void __setup_vector_irq(int cpu) | |||
260 | } | 260 | } |
261 | 261 | ||
262 | #if defined(CONFIG_SMP) && (defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_DIG)) | 262 | #if defined(CONFIG_SMP) && (defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_DIG)) |
263 | #define IA64_IRQ_MOVE_VECTOR IA64_DEF_FIRST_DEVICE_VECTOR | ||
264 | 263 | ||
265 | static enum vector_domain_type { | 264 | static enum vector_domain_type { |
266 | VECTOR_DOMAIN_NONE, | 265 | VECTOR_DOMAIN_NONE, |
@@ -659,11 +658,8 @@ init_IRQ (void) | |||
659 | register_percpu_irq(IA64_SPURIOUS_INT_VECTOR, NULL); | 658 | register_percpu_irq(IA64_SPURIOUS_INT_VECTOR, NULL); |
660 | #ifdef CONFIG_SMP | 659 | #ifdef CONFIG_SMP |
661 | #if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_DIG) | 660 | #if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_DIG) |
662 | if (vector_domain_type != VECTOR_DOMAIN_NONE) { | 661 | if (vector_domain_type != VECTOR_DOMAIN_NONE) |
663 | BUG_ON(IA64_FIRST_DEVICE_VECTOR != IA64_IRQ_MOVE_VECTOR); | ||
664 | IA64_FIRST_DEVICE_VECTOR++; | ||
665 | register_percpu_irq(IA64_IRQ_MOVE_VECTOR, &irq_move_irqaction); | 662 | register_percpu_irq(IA64_IRQ_MOVE_VECTOR, &irq_move_irqaction); |
666 | } | ||
667 | #endif | 663 | #endif |
668 | #endif | 664 | #endif |
669 | #ifdef CONFIG_PERFMON | 665 | #ifdef CONFIG_PERFMON |
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c index 496ac7a99488..32f2639e9b0a 100644 --- a/arch/ia64/kernel/mca.c +++ b/arch/ia64/kernel/mca.c | |||
@@ -888,9 +888,10 @@ ia64_mca_modify_comm(const struct task_struct *previous_current) | |||
888 | } | 888 | } |
889 | 889 | ||
890 | static void | 890 | static void |
891 | finish_pt_regs(struct pt_regs *regs, const pal_min_state_area_t *ms, | 891 | finish_pt_regs(struct pt_regs *regs, struct ia64_sal_os_state *sos, |
892 | unsigned long *nat) | 892 | unsigned long *nat) |
893 | { | 893 | { |
894 | const pal_min_state_area_t *ms = sos->pal_min_state; | ||
894 | const u64 *bank; | 895 | const u64 *bank; |
895 | 896 | ||
896 | /* If ipsr.ic then use pmsa_{iip,ipsr,ifs}, else use | 897 | /* If ipsr.ic then use pmsa_{iip,ipsr,ifs}, else use |
@@ -904,6 +905,10 @@ finish_pt_regs(struct pt_regs *regs, const pal_min_state_area_t *ms, | |||
904 | regs->cr_iip = ms->pmsa_xip; | 905 | regs->cr_iip = ms->pmsa_xip; |
905 | regs->cr_ipsr = ms->pmsa_xpsr; | 906 | regs->cr_ipsr = ms->pmsa_xpsr; |
906 | regs->cr_ifs = ms->pmsa_xfs; | 907 | regs->cr_ifs = ms->pmsa_xfs; |
908 | |||
909 | sos->iip = ms->pmsa_iip; | ||
910 | sos->ipsr = ms->pmsa_ipsr; | ||
911 | sos->ifs = ms->pmsa_ifs; | ||
907 | } | 912 | } |
908 | regs->pr = ms->pmsa_pr; | 913 | regs->pr = ms->pmsa_pr; |
909 | regs->b0 = ms->pmsa_br0; | 914 | regs->b0 = ms->pmsa_br0; |
@@ -1079,7 +1084,7 @@ ia64_mca_modify_original_stack(struct pt_regs *regs, | |||
1079 | memcpy(old_regs, regs, sizeof(*regs)); | 1084 | memcpy(old_regs, regs, sizeof(*regs)); |
1080 | old_regs->loadrs = loadrs; | 1085 | old_regs->loadrs = loadrs; |
1081 | old_unat = old_regs->ar_unat; | 1086 | old_unat = old_regs->ar_unat; |
1082 | finish_pt_regs(old_regs, ms, &old_unat); | 1087 | finish_pt_regs(old_regs, sos, &old_unat); |
1083 | 1088 | ||
1084 | /* Next stack a struct switch_stack. mca_asm.S built a partial | 1089 | /* Next stack a struct switch_stack. mca_asm.S built a partial |
1085 | * switch_stack, copy it and fill in the blanks using pt_regs and | 1090 | * switch_stack, copy it and fill in the blanks using pt_regs and |
@@ -1150,7 +1155,7 @@ no_mod: | |||
1150 | mprintk(KERN_INFO "cpu %d, %s %s, original stack not modified\n", | 1155 | mprintk(KERN_INFO "cpu %d, %s %s, original stack not modified\n", |
1151 | smp_processor_id(), type, msg); | 1156 | smp_processor_id(), type, msg); |
1152 | old_unat = regs->ar_unat; | 1157 | old_unat = regs->ar_unat; |
1153 | finish_pt_regs(regs, ms, &old_unat); | 1158 | finish_pt_regs(regs, sos, &old_unat); |
1154 | return previous_current; | 1159 | return previous_current; |
1155 | } | 1160 | } |
1156 | 1161 | ||
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index 599b233bef75..5246285a95fb 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -2200,7 +2200,7 @@ pfm_alloc_file(pfm_context_t *ctx) | |||
2200 | { | 2200 | { |
2201 | struct file *file; | 2201 | struct file *file; |
2202 | struct inode *inode; | 2202 | struct inode *inode; |
2203 | struct dentry *dentry; | 2203 | struct path path; |
2204 | char name[32]; | 2204 | char name[32]; |
2205 | struct qstr this; | 2205 | struct qstr this; |
2206 | 2206 | ||
@@ -2225,18 +2225,19 @@ pfm_alloc_file(pfm_context_t *ctx) | |||
2225 | /* | 2225 | /* |
2226 | * allocate a new dcache entry | 2226 | * allocate a new dcache entry |
2227 | */ | 2227 | */ |
2228 | dentry = d_alloc(pfmfs_mnt->mnt_sb->s_root, &this); | 2228 | path.dentry = d_alloc(pfmfs_mnt->mnt_sb->s_root, &this); |
2229 | if (!dentry) { | 2229 | if (!path.dentry) { |
2230 | iput(inode); | 2230 | iput(inode); |
2231 | return ERR_PTR(-ENOMEM); | 2231 | return ERR_PTR(-ENOMEM); |
2232 | } | 2232 | } |
2233 | path.mnt = mntget(pfmfs_mnt); | ||
2233 | 2234 | ||
2234 | dentry->d_op = &pfmfs_dentry_operations; | 2235 | path.dentry->d_op = &pfmfs_dentry_operations; |
2235 | d_add(dentry, inode); | 2236 | d_add(path.dentry, inode); |
2236 | 2237 | ||
2237 | file = alloc_file(pfmfs_mnt, dentry, FMODE_READ, &pfm_file_ops); | 2238 | file = alloc_file(&path, FMODE_READ, &pfm_file_ops); |
2238 | if (!file) { | 2239 | if (!file) { |
2239 | dput(dentry); | 2240 | path_put(&path); |
2240 | return ERR_PTR(-ENFILE); | 2241 | return ERR_PTR(-ENFILE); |
2241 | } | 2242 | } |
2242 | 2243 | ||
diff --git a/arch/ia64/kvm/asm-offsets.c b/arch/ia64/kvm/asm-offsets.c index 0c3564a7a033..9324c875caf5 100644 --- a/arch/ia64/kvm/asm-offsets.c +++ b/arch/ia64/kvm/asm-offsets.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * | 22 | * |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/autoconf.h> | ||
26 | #include <linux/kvm_host.h> | 25 | #include <linux/kvm_host.h> |
27 | #include <linux/kbuild.h> | 26 | #include <linux/kbuild.h> |
28 | 27 | ||
diff --git a/arch/ia64/kvm/vcpu.h b/arch/ia64/kvm/vcpu.h index 360724d3ae69..988911b4cc7a 100644 --- a/arch/ia64/kvm/vcpu.h +++ b/arch/ia64/kvm/vcpu.h | |||
@@ -388,6 +388,9 @@ static inline u64 __gpfn_is_io(u64 gpfn) | |||
388 | #define _vmm_raw_spin_lock(x) do {}while(0) | 388 | #define _vmm_raw_spin_lock(x) do {}while(0) |
389 | #define _vmm_raw_spin_unlock(x) do {}while(0) | 389 | #define _vmm_raw_spin_unlock(x) do {}while(0) |
390 | #else | 390 | #else |
391 | typedef struct { | ||
392 | volatile unsigned int lock; | ||
393 | } vmm_spinlock_t; | ||
391 | #define _vmm_raw_spin_lock(x) \ | 394 | #define _vmm_raw_spin_lock(x) \ |
392 | do { \ | 395 | do { \ |
393 | __u32 *ia64_spinlock_ptr = (__u32 *) (x); \ | 396 | __u32 *ia64_spinlock_ptr = (__u32 *) (x); \ |
@@ -405,12 +408,12 @@ static inline u64 __gpfn_is_io(u64 gpfn) | |||
405 | 408 | ||
406 | #define _vmm_raw_spin_unlock(x) \ | 409 | #define _vmm_raw_spin_unlock(x) \ |
407 | do { barrier(); \ | 410 | do { barrier(); \ |
408 | ((spinlock_t *)x)->raw_lock.lock = 0; } \ | 411 | ((vmm_spinlock_t *)x)->lock = 0; } \ |
409 | while (0) | 412 | while (0) |
410 | #endif | 413 | #endif |
411 | 414 | ||
412 | void vmm_spin_lock(spinlock_t *lock); | 415 | void vmm_spin_lock(vmm_spinlock_t *lock); |
413 | void vmm_spin_unlock(spinlock_t *lock); | 416 | void vmm_spin_unlock(vmm_spinlock_t *lock); |
414 | enum { | 417 | enum { |
415 | I_TLB = 1, | 418 | I_TLB = 1, |
416 | D_TLB = 2 | 419 | D_TLB = 2 |
diff --git a/arch/ia64/kvm/vmm.c b/arch/ia64/kvm/vmm.c index f4b4c899bb6c..7a62f75778c5 100644 --- a/arch/ia64/kvm/vmm.c +++ b/arch/ia64/kvm/vmm.c | |||
@@ -60,12 +60,12 @@ static void __exit kvm_vmm_exit(void) | |||
60 | return ; | 60 | return ; |
61 | } | 61 | } |
62 | 62 | ||
63 | void vmm_spin_lock(spinlock_t *lock) | 63 | void vmm_spin_lock(vmm_spinlock_t *lock) |
64 | { | 64 | { |
65 | _vmm_raw_spin_lock(lock); | 65 | _vmm_raw_spin_lock(lock); |
66 | } | 66 | } |
67 | 67 | ||
68 | void vmm_spin_unlock(spinlock_t *lock) | 68 | void vmm_spin_unlock(vmm_spinlock_t *lock) |
69 | { | 69 | { |
70 | _vmm_raw_spin_unlock(lock); | 70 | _vmm_raw_spin_unlock(lock); |
71 | } | 71 | } |
diff --git a/arch/ia64/kvm/vtlb.c b/arch/ia64/kvm/vtlb.c index 20b3852f7a6e..4332f7ee5203 100644 --- a/arch/ia64/kvm/vtlb.c +++ b/arch/ia64/kvm/vtlb.c | |||
@@ -182,7 +182,7 @@ void mark_pages_dirty(struct kvm_vcpu *v, u64 pte, u64 ps) | |||
182 | { | 182 | { |
183 | u64 i, dirty_pages = 1; | 183 | u64 i, dirty_pages = 1; |
184 | u64 base_gfn = (pte&_PAGE_PPN_MASK) >> PAGE_SHIFT; | 184 | u64 base_gfn = (pte&_PAGE_PPN_MASK) >> PAGE_SHIFT; |
185 | spinlock_t *lock = __kvm_va(v->arch.dirty_log_lock_pa); | 185 | vmm_spinlock_t *lock = __kvm_va(v->arch.dirty_log_lock_pa); |
186 | void *dirty_bitmap = (void *)KVM_MEM_DIRTY_LOG_BASE; | 186 | void *dirty_bitmap = (void *)KVM_MEM_DIRTY_LOG_BASE; |
187 | 187 | ||
188 | dirty_pages <<= ps <= PAGE_SHIFT ? 0 : ps - PAGE_SHIFT; | 188 | dirty_pages <<= ps <= PAGE_SHIFT ? 0 : ps - PAGE_SHIFT; |
diff --git a/arch/ia64/mm/ioremap.c b/arch/ia64/mm/ioremap.c index 2a140627dfd6..3dccdd8eb275 100644 --- a/arch/ia64/mm/ioremap.c +++ b/arch/ia64/mm/ioremap.c | |||
@@ -22,6 +22,12 @@ __ioremap (unsigned long phys_addr) | |||
22 | } | 22 | } |
23 | 23 | ||
24 | void __iomem * | 24 | void __iomem * |
25 | early_ioremap (unsigned long phys_addr, unsigned long size) | ||
26 | { | ||
27 | return __ioremap(phys_addr); | ||
28 | } | ||
29 | |||
30 | void __iomem * | ||
25 | ioremap (unsigned long phys_addr, unsigned long size) | 31 | ioremap (unsigned long phys_addr, unsigned long size) |
26 | { | 32 | { |
27 | void __iomem *addr; | 33 | void __iomem *addr; |
@@ -102,6 +108,11 @@ ioremap_nocache (unsigned long phys_addr, unsigned long size) | |||
102 | EXPORT_SYMBOL(ioremap_nocache); | 108 | EXPORT_SYMBOL(ioremap_nocache); |
103 | 109 | ||
104 | void | 110 | void |
111 | early_iounmap (volatile void __iomem *addr, unsigned long size) | ||
112 | { | ||
113 | } | ||
114 | |||
115 | void | ||
105 | iounmap (volatile void __iomem *addr) | 116 | iounmap (volatile void __iomem *addr) |
106 | { | 117 | { |
107 | if (REGION_NUMBER(addr) == RGN_GATE) | 118 | if (REGION_NUMBER(addr) == RGN_GATE) |
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) | |||
369 | static dma_addr_t | 370 | static dma_addr_t |
370 | tioca_dma_mapped(struct pci_dev *pdev, unsigned long paddr, size_t req_size) | 371 | tioca_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 | ||