aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/Kconfig33
-rw-r--r--arch/ia64/configs/generic_defconfig2
-rw-r--r--arch/ia64/configs/gensparse_defconfig1
-rw-r--r--arch/ia64/configs/tiger_defconfig1
-rw-r--r--arch/ia64/configs/xen_domu_defconfig1
-rw-r--r--arch/ia64/configs/zx1_defconfig1
-rw-r--r--arch/ia64/dig/Makefile2
-rw-r--r--arch/ia64/hp/common/hwsw_iommu.c1
-rw-r--r--arch/ia64/hp/common/sba_iommu.c12
-rw-r--r--arch/ia64/hp/sim/simeth.c2
-rw-r--r--arch/ia64/include/asm/atomic.h6
-rw-r--r--arch/ia64/include/asm/bitops.h3
-rw-r--r--arch/ia64/include/asm/clocksource.h10
-rw-r--r--arch/ia64/include/asm/device.h2
-rw-r--r--arch/ia64/include/asm/gpio.h55
-rw-r--r--arch/ia64/include/asm/iommu.h6
-rw-r--r--arch/ia64/include/asm/paravirt.h4
-rw-r--r--arch/ia64/include/asm/pci.h2
-rw-r--r--arch/ia64/include/asm/processor.h2
-rw-r--r--arch/ia64/include/asm/ptrace.h1
-rw-r--r--arch/ia64/include/asm/sn/tioce.h2
-rw-r--r--arch/ia64/include/asm/spinlock.h2
-rw-r--r--arch/ia64/include/asm/unistd.h4
-rw-r--r--arch/ia64/include/asm/xen/grant_table.h29
-rw-r--r--arch/ia64/kernel/Makefile2
-rw-r--r--arch/ia64/kernel/acpi.c4
-rw-r--r--arch/ia64/kernel/cyclone.c2
-rw-r--r--arch/ia64/kernel/dma-mapping.c1
-rw-r--r--arch/ia64/kernel/efi.c2
-rw-r--r--arch/ia64/kernel/entry.S4
-rw-r--r--arch/ia64/kernel/module.c16
-rw-r--r--arch/ia64/kernel/msi_ia64.c4
-rw-r--r--arch/ia64/kernel/paravirt.c2
-rw-r--r--arch/ia64/kernel/pci-dma.c2
-rw-r--r--arch/ia64/kernel/smp.c2
-rw-r--r--arch/ia64/kernel/smpboot.c2
-rw-r--r--arch/ia64/kernel/time.c2
-rw-r--r--arch/ia64/kernel/topology.c1
-rw-r--r--arch/ia64/kernel/uncached.c2
-rw-r--r--arch/ia64/kvm/Kconfig1
-rw-r--r--arch/ia64/kvm/kvm-ia64.c3
-rw-r--r--arch/ia64/pci/pci.c1
-rw-r--r--arch/ia64/sn/kernel/io_acpi_init.c1
-rw-r--r--arch/ia64/sn/kernel/io_init.c1
-rw-r--r--arch/ia64/sn/kernel/irq.c14
-rw-r--r--arch/ia64/sn/kernel/sn2/sn_hwperf.c12
-rw-r--r--arch/ia64/sn/kernel/sn2/timer.c2
-rw-r--r--arch/ia64/sn/pci/pcibr/pcibr_dma.c1
-rw-r--r--arch/ia64/sn/pci/pcibr/pcibr_provider.c1
-rw-r--r--arch/ia64/sn/pci/tioca_provider.c1
-rw-r--r--arch/ia64/xen/grant-table.c62
-rw-r--r--arch/ia64/xen/hypervisor.c1
52 files changed, 146 insertions, 187 deletions
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 38280ef4a2af..27489b6dd533 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -27,6 +27,8 @@ config IA64
27 select GENERIC_PENDING_IRQ if SMP 27 select GENERIC_PENDING_IRQ if SMP
28 select IRQ_PER_CPU 28 select IRQ_PER_CPU
29 select GENERIC_IRQ_SHOW 29 select GENERIC_IRQ_SHOW
30 select ARCH_WANT_OPTIONAL_GPIOLIB
31 select ARCH_HAVE_NMI_SAFE_CMPXCHG
30 default y 32 default y
31 help 33 help
32 The Itanium Processor Family is Intel's 64-bit successor to 34 The Itanium Processor Family is Intel's 64-bit successor to
@@ -89,6 +91,9 @@ config GENERIC_TIME_VSYSCALL
89config HAVE_SETUP_PER_CPU_AREA 91config HAVE_SETUP_PER_CPU_AREA
90 def_bool y 92 def_bool y
91 93
94config GENERIC_GPIO
95 bool
96
92config DMI 97config DMI
93 bool 98 bool
94 default y 99 default y
@@ -101,6 +106,9 @@ config GENERIC_IOMAP
101 bool 106 bool
102 default y 107 default y
103 108
109config ARCH_CLOCKSOURCE_DATA
110 def_bool y
111
104config SCHED_OMIT_FRAME_POINTER 112config SCHED_OMIT_FRAME_POINTER
105 bool 113 bool
106 default y 114 default y
@@ -154,7 +162,6 @@ config IA64_GENERIC
154 select ACPI_NUMA 162 select ACPI_NUMA
155 select SWIOTLB 163 select SWIOTLB
156 select PCI_MSI 164 select PCI_MSI
157 select DMAR
158 help 165 help
159 This selects the system type of your hardware. A "generic" kernel 166 This selects the system type of your hardware. A "generic" kernel
160 will run on any supported IA-64 system. However, if you configure 167 will run on any supported IA-64 system. However, if you configure
@@ -627,27 +634,6 @@ source "drivers/pci/hotplug/Kconfig"
627 634
628source "drivers/pcmcia/Kconfig" 635source "drivers/pcmcia/Kconfig"
629 636
630config DMAR
631 bool "Support for DMA Remapping Devices (EXPERIMENTAL)"
632 depends on IA64_GENERIC && ACPI && EXPERIMENTAL
633 help
634 DMA remapping (DMAR) devices support enables independent address
635 translations for Direct Memory Access (DMA) from devices.
636 These DMA remapping devices are reported via ACPI tables
637 and include PCI device scope covered by these DMA
638 remapping devices.
639
640config DMAR_DEFAULT_ON
641 def_bool y
642 prompt "Enable DMA Remapping Devices by default"
643 depends on DMAR
644 help
645 Selecting this option will enable a DMAR device at boot time if
646 one is found. If this option is not selected, DMAR support can
647 be enabled by passing intel_iommu=on to the kernel. It is
648 recommended you say N here while the DMAR code remains
649 experimental.
650
651endmenu 637endmenu
652 638
653endif 639endif
@@ -681,6 +667,3 @@ source "lib/Kconfig"
681 667
682config IOMMU_HELPER 668config IOMMU_HELPER
683 def_bool (IA64_HP_ZX1 || IA64_HP_ZX1_SWIOTLB || IA64_GENERIC || SWIOTLB) 669 def_bool (IA64_HP_ZX1 || IA64_HP_ZX1_SWIOTLB || IA64_GENERIC || SWIOTLB)
684
685config IOMMU_API
686 def_bool (DMAR)
diff --git a/arch/ia64/configs/generic_defconfig b/arch/ia64/configs/generic_defconfig
index 1d7bca0a396d..954d81e2e837 100644
--- a/arch/ia64/configs/generic_defconfig
+++ b/arch/ia64/configs/generic_defconfig
@@ -87,6 +87,7 @@ CONFIG_NET_ETHERNET=y
87CONFIG_NET_TULIP=y 87CONFIG_NET_TULIP=y
88CONFIG_TULIP=m 88CONFIG_TULIP=m
89CONFIG_NET_PCI=y 89CONFIG_NET_PCI=y
90CONFIG_NET_VENDOR_INTEL=y
90CONFIG_E100=m 91CONFIG_E100=m
91CONFIG_E1000=y 92CONFIG_E1000=y
92CONFIG_IGB=y 93CONFIG_IGB=y
@@ -234,3 +235,4 @@ CONFIG_CRYPTO_MD5=y
234# CONFIG_CRYPTO_ANSI_CPRNG is not set 235# CONFIG_CRYPTO_ANSI_CPRNG is not set
235CONFIG_CRC_T10DIF=y 236CONFIG_CRC_T10DIF=y
236CONFIG_MISC_DEVICES=y 237CONFIG_MISC_DEVICES=y
238CONFIG_INTEL_IOMMU=y
diff --git a/arch/ia64/configs/gensparse_defconfig b/arch/ia64/configs/gensparse_defconfig
index b11fa880e4b6..91c41ecfa6d9 100644
--- a/arch/ia64/configs/gensparse_defconfig
+++ b/arch/ia64/configs/gensparse_defconfig
@@ -75,6 +75,7 @@ CONFIG_NET_ETHERNET=y
75CONFIG_NET_TULIP=y 75CONFIG_NET_TULIP=y
76CONFIG_TULIP=m 76CONFIG_TULIP=m
77CONFIG_NET_PCI=y 77CONFIG_NET_PCI=y
78CONFIG_NET_VENDOR_INTEL=y
78CONFIG_E100=m 79CONFIG_E100=m
79CONFIG_E1000=y 80CONFIG_E1000=y
80CONFIG_TIGON3=y 81CONFIG_TIGON3=y
diff --git a/arch/ia64/configs/tiger_defconfig b/arch/ia64/configs/tiger_defconfig
index 137a453dd508..a5a9e02e60a0 100644
--- a/arch/ia64/configs/tiger_defconfig
+++ b/arch/ia64/configs/tiger_defconfig
@@ -77,6 +77,7 @@ CONFIG_NET_ETHERNET=y
77CONFIG_NET_TULIP=y 77CONFIG_NET_TULIP=y
78CONFIG_TULIP=m 78CONFIG_TULIP=m
79CONFIG_NET_PCI=y 79CONFIG_NET_PCI=y
80CONFIG_NET_VENDOR_INTEL=y
80CONFIG_E100=m 81CONFIG_E100=m
81CONFIG_E1000=y 82CONFIG_E1000=y
82CONFIG_TIGON3=y 83CONFIG_TIGON3=y
diff --git a/arch/ia64/configs/xen_domu_defconfig b/arch/ia64/configs/xen_domu_defconfig
index 2bf76e418bc5..37b9b422caad 100644
--- a/arch/ia64/configs/xen_domu_defconfig
+++ b/arch/ia64/configs/xen_domu_defconfig
@@ -80,6 +80,7 @@ CONFIG_NET_ETHERNET=y
80CONFIG_NET_TULIP=y 80CONFIG_NET_TULIP=y
81CONFIG_TULIP=m 81CONFIG_TULIP=m
82CONFIG_NET_PCI=y 82CONFIG_NET_PCI=y
83CONFIG_NET_VENDOR_INTEL=y
83CONFIG_E100=m 84CONFIG_E100=m
84CONFIG_E1000=y 85CONFIG_E1000=y
85CONFIG_TIGON3=y 86CONFIG_TIGON3=y
diff --git a/arch/ia64/configs/zx1_defconfig b/arch/ia64/configs/zx1_defconfig
index 1d42827f9fa4..fc7aba07c2b4 100644
--- a/arch/ia64/configs/zx1_defconfig
+++ b/arch/ia64/configs/zx1_defconfig
@@ -57,6 +57,7 @@ CONFIG_TULIP_MMIO=y
57CONFIG_TULIP_NAPI=y 57CONFIG_TULIP_NAPI=y
58CONFIG_TULIP_NAPI_HW_MITIGATION=y 58CONFIG_TULIP_NAPI_HW_MITIGATION=y
59CONFIG_NET_PCI=y 59CONFIG_NET_PCI=y
60CONFIG_NET_VENDOR_INTEL=y
60CONFIG_E100=y 61CONFIG_E100=y
61CONFIG_E1000=y 62CONFIG_E1000=y
62CONFIG_TIGON3=y 63CONFIG_TIGON3=y
diff --git a/arch/ia64/dig/Makefile b/arch/ia64/dig/Makefile
index 2f7caddf093e..ae16ec4f6308 100644
--- a/arch/ia64/dig/Makefile
+++ b/arch/ia64/dig/Makefile
@@ -6,7 +6,7 @@
6# 6#
7 7
8obj-y := setup.o 8obj-y := setup.o
9ifeq ($(CONFIG_DMAR), y) 9ifeq ($(CONFIG_INTEL_IOMMU), y)
10obj-$(CONFIG_IA64_GENERIC) += machvec.o machvec_vtd.o 10obj-$(CONFIG_IA64_GENERIC) += machvec.o machvec_vtd.o
11else 11else
12obj-$(CONFIG_IA64_GENERIC) += machvec.o 12obj-$(CONFIG_IA64_GENERIC) += machvec.o
diff --git a/arch/ia64/hp/common/hwsw_iommu.c b/arch/ia64/hp/common/hwsw_iommu.c
index e4a80d82e3d8..1e4cae5ae053 100644
--- a/arch/ia64/hp/common/hwsw_iommu.c
+++ b/arch/ia64/hp/common/hwsw_iommu.c
@@ -15,6 +15,7 @@
15#include <linux/device.h> 15#include <linux/device.h>
16#include <linux/dma-mapping.h> 16#include <linux/dma-mapping.h>
17#include <linux/swiotlb.h> 17#include <linux/swiotlb.h>
18#include <linux/export.h>
18#include <asm/machvec.h> 19#include <asm/machvec.h>
19 20
20extern struct dma_map_ops sba_dma_ops, swiotlb_dma_ops; 21extern struct dma_map_ops sba_dma_ops, swiotlb_dma_ops;
diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c
index 80241fe03f50..f5f4ef149aac 100644
--- a/arch/ia64/hp/common/sba_iommu.c
+++ b/arch/ia64/hp/common/sba_iommu.c
@@ -915,7 +915,7 @@ sba_mark_invalid(struct ioc *ioc, dma_addr_t iova, size_t byte_cnt)
915 * @dir: R/W or both. 915 * @dir: R/W or both.
916 * @attrs: optional dma attributes 916 * @attrs: optional dma attributes
917 * 917 *
918 * See Documentation/PCI/PCI-DMA-mapping.txt 918 * See Documentation/DMA-API-HOWTO.txt
919 */ 919 */
920static dma_addr_t sba_map_page(struct device *dev, struct page *page, 920static dma_addr_t sba_map_page(struct device *dev, struct page *page,
921 unsigned long poff, size_t size, 921 unsigned long poff, size_t size,
@@ -1044,7 +1044,7 @@ sba_mark_clean(struct ioc *ioc, dma_addr_t iova, size_t size)
1044 * @dir: R/W or both. 1044 * @dir: R/W or both.
1045 * @attrs: optional dma attributes 1045 * @attrs: optional dma attributes
1046 * 1046 *
1047 * See Documentation/PCI/PCI-DMA-mapping.txt 1047 * See Documentation/DMA-API-HOWTO.txt
1048 */ 1048 */
1049static void sba_unmap_page(struct device *dev, dma_addr_t iova, size_t size, 1049static void sba_unmap_page(struct device *dev, dma_addr_t iova, size_t size,
1050 enum dma_data_direction dir, struct dma_attrs *attrs) 1050 enum dma_data_direction dir, struct dma_attrs *attrs)
@@ -1127,7 +1127,7 @@ void sba_unmap_single_attrs(struct device *dev, dma_addr_t iova, size_t size,
1127 * @size: number of bytes mapped in driver buffer. 1127 * @size: number of bytes mapped in driver buffer.
1128 * @dma_handle: IOVA of new buffer. 1128 * @dma_handle: IOVA of new buffer.
1129 * 1129 *
1130 * See Documentation/PCI/PCI-DMA-mapping.txt 1130 * See Documentation/DMA-API-HOWTO.txt
1131 */ 1131 */
1132static void * 1132static void *
1133sba_alloc_coherent (struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flags) 1133sba_alloc_coherent (struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flags)
@@ -1190,7 +1190,7 @@ sba_alloc_coherent (struct device *dev, size_t size, dma_addr_t *dma_handle, gfp
1190 * @vaddr: virtual address IOVA of "consistent" buffer. 1190 * @vaddr: virtual address IOVA of "consistent" buffer.
1191 * @dma_handler: IO virtual address of "consistent" buffer. 1191 * @dma_handler: IO virtual address of "consistent" buffer.
1192 * 1192 *
1193 * See Documentation/PCI/PCI-DMA-mapping.txt 1193 * See Documentation/DMA-API-HOWTO.txt
1194 */ 1194 */
1195static void sba_free_coherent (struct device *dev, size_t size, void *vaddr, 1195static void sba_free_coherent (struct device *dev, size_t size, void *vaddr,
1196 dma_addr_t dma_handle) 1196 dma_addr_t dma_handle)
@@ -1453,7 +1453,7 @@ static void sba_unmap_sg_attrs(struct device *dev, struct scatterlist *sglist,
1453 * @dir: R/W or both. 1453 * @dir: R/W or both.
1454 * @attrs: optional dma attributes 1454 * @attrs: optional dma attributes
1455 * 1455 *
1456 * See Documentation/PCI/PCI-DMA-mapping.txt 1456 * See Documentation/DMA-API-HOWTO.txt
1457 */ 1457 */
1458static int sba_map_sg_attrs(struct device *dev, struct scatterlist *sglist, 1458static int sba_map_sg_attrs(struct device *dev, struct scatterlist *sglist,
1459 int nents, enum dma_data_direction dir, 1459 int nents, enum dma_data_direction dir,
@@ -1549,7 +1549,7 @@ static int sba_map_sg_attrs(struct device *dev, struct scatterlist *sglist,
1549 * @dir: R/W or both. 1549 * @dir: R/W or both.
1550 * @attrs: optional dma attributes 1550 * @attrs: optional dma attributes
1551 * 1551 *
1552 * See Documentation/PCI/PCI-DMA-mapping.txt 1552 * See Documentation/DMA-API-HOWTO.txt
1553 */ 1553 */
1554static void sba_unmap_sg_attrs(struct device *dev, struct scatterlist *sglist, 1554static void sba_unmap_sg_attrs(struct device *dev, struct scatterlist *sglist,
1555 int nents, enum dma_data_direction dir, 1555 int nents, enum dma_data_direction dir,
diff --git a/arch/ia64/hp/sim/simeth.c b/arch/ia64/hp/sim/simeth.c
index 7e81966ce481..47afcc61f6e5 100644
--- a/arch/ia64/hp/sim/simeth.c
+++ b/arch/ia64/hp/sim/simeth.c
@@ -172,7 +172,7 @@ static const struct net_device_ops simeth_netdev_ops = {
172 .ndo_stop = simeth_close, 172 .ndo_stop = simeth_close,
173 .ndo_start_xmit = simeth_tx, 173 .ndo_start_xmit = simeth_tx,
174 .ndo_get_stats = simeth_get_stats, 174 .ndo_get_stats = simeth_get_stats,
175 .ndo_set_multicast_list = set_multicast_list, /* not yet used */ 175 .ndo_set_rx_mode = set_multicast_list, /* not yet used */
176 176
177}; 177};
178 178
diff --git a/arch/ia64/include/asm/atomic.h b/arch/ia64/include/asm/atomic.h
index 446881439675..3fad89ee01cb 100644
--- a/arch/ia64/include/asm/atomic.h
+++ b/arch/ia64/include/asm/atomic.h
@@ -90,7 +90,7 @@ ia64_atomic64_sub (__s64 i, atomic64_t *v)
90 (cmpxchg(&((v)->counter), old, new)) 90 (cmpxchg(&((v)->counter), old, new))
91#define atomic64_xchg(v, new) (xchg(&((v)->counter), new)) 91#define atomic64_xchg(v, new) (xchg(&((v)->counter), new))
92 92
93static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) 93static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u)
94{ 94{
95 int c, old; 95 int c, old;
96 c = atomic_read(v); 96 c = atomic_read(v);
@@ -102,10 +102,9 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u)
102 break; 102 break;
103 c = old; 103 c = old;
104 } 104 }
105 return c != (u); 105 return c;
106} 106}
107 107
108#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
109 108
110static __inline__ long atomic64_add_unless(atomic64_t *v, long a, long u) 109static __inline__ long atomic64_add_unless(atomic64_t *v, long a, long u)
111{ 110{
@@ -216,5 +215,4 @@ atomic64_add_negative (__s64 i, atomic64_t *v)
216#define smp_mb__before_atomic_inc() barrier() 215#define smp_mb__before_atomic_inc() barrier()
217#define smp_mb__after_atomic_inc() barrier() 216#define smp_mb__after_atomic_inc() barrier()
218 217
219#include <asm-generic/atomic-long.h>
220#endif /* _ASM_IA64_ATOMIC_H */ 218#endif /* _ASM_IA64_ATOMIC_H */
diff --git a/arch/ia64/include/asm/bitops.h b/arch/ia64/include/asm/bitops.h
index b76f7e009218..8e20bff39f79 100644
--- a/arch/ia64/include/asm/bitops.h
+++ b/arch/ia64/include/asm/bitops.h
@@ -458,8 +458,7 @@ static __inline__ unsigned long __arch_hweight64(unsigned long x)
458 458
459#include <asm-generic/bitops/le.h> 459#include <asm-generic/bitops/le.h>
460 460
461#define ext2_set_bit_atomic(l,n,a) test_and_set_bit(n,a) 461#include <asm-generic/bitops/ext2-atomic-setbit.h>
462#define ext2_clear_bit_atomic(l,n,a) test_and_clear_bit(n,a)
463 462
464#include <asm-generic/bitops/sched.h> 463#include <asm-generic/bitops/sched.h>
465 464
diff --git a/arch/ia64/include/asm/clocksource.h b/arch/ia64/include/asm/clocksource.h
new file mode 100644
index 000000000000..5c8596e4cb02
--- /dev/null
+++ b/arch/ia64/include/asm/clocksource.h
@@ -0,0 +1,10 @@
1/* IA64-specific clocksource additions */
2
3#ifndef _ASM_IA64_CLOCKSOURCE_H
4#define _ASM_IA64_CLOCKSOURCE_H
5
6struct arch_clocksource_data {
7 void *fsys_mmio; /* used by fsyscall asm code */
8};
9
10#endif /* _ASM_IA64_CLOCKSOURCE_H */
diff --git a/arch/ia64/include/asm/device.h b/arch/ia64/include/asm/device.h
index d66d446b127c..d05e78f6db94 100644
--- a/arch/ia64/include/asm/device.h
+++ b/arch/ia64/include/asm/device.h
@@ -10,7 +10,7 @@ struct dev_archdata {
10#ifdef CONFIG_ACPI 10#ifdef CONFIG_ACPI
11 void *acpi_handle; 11 void *acpi_handle;
12#endif 12#endif
13#ifdef CONFIG_DMAR 13#ifdef CONFIG_INTEL_IOMMU
14 void *iommu; /* hook for IOMMU specific extension */ 14 void *iommu; /* hook for IOMMU specific extension */
15#endif 15#endif
16}; 16};
diff --git a/arch/ia64/include/asm/gpio.h b/arch/ia64/include/asm/gpio.h
new file mode 100644
index 000000000000..590a20debc4e
--- /dev/null
+++ b/arch/ia64/include/asm/gpio.h
@@ -0,0 +1,55 @@
1/*
2 * Generic GPIO API implementation for IA-64.
3 *
4 * A stright copy of that for PowerPC which was:
5 *
6 * Copyright (c) 2007-2008 MontaVista Software, Inc.
7 *
8 * Author: Anton Vorontsov <avorontsov@ru.mvista.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef _ASM_IA64_GPIO_H
17#define _ASM_IA64_GPIO_H
18
19#include <linux/errno.h>
20#include <asm-generic/gpio.h>
21
22#ifdef CONFIG_GPIOLIB
23
24/*
25 * We don't (yet) implement inlined/rapid versions for on-chip gpios.
26 * Just call gpiolib.
27 */
28static inline int gpio_get_value(unsigned int gpio)
29{
30 return __gpio_get_value(gpio);
31}
32
33static inline void gpio_set_value(unsigned int gpio, int value)
34{
35 __gpio_set_value(gpio, value);
36}
37
38static inline int gpio_cansleep(unsigned int gpio)
39{
40 return __gpio_cansleep(gpio);
41}
42
43static inline int gpio_to_irq(unsigned int gpio)
44{
45 return __gpio_to_irq(gpio);
46}
47
48static inline int irq_to_gpio(unsigned int irq)
49{
50 return -EINVAL;
51}
52
53#endif /* CONFIG_GPIOLIB */
54
55#endif /* _ASM_IA64_GPIO_H */
diff --git a/arch/ia64/include/asm/iommu.h b/arch/ia64/include/asm/iommu.h
index 745e095fe82e..105c93b00b1b 100644
--- a/arch/ia64/include/asm/iommu.h
+++ b/arch/ia64/include/asm/iommu.h
@@ -7,12 +7,14 @@
7 7
8extern void pci_iommu_shutdown(void); 8extern void pci_iommu_shutdown(void);
9extern void no_iommu_init(void); 9extern void no_iommu_init(void);
10#ifdef CONFIG_INTEL_IOMMU
10extern int force_iommu, no_iommu; 11extern int force_iommu, no_iommu;
11extern int iommu_detected;
12#ifdef CONFIG_DMAR
13extern int iommu_pass_through; 12extern int iommu_pass_through;
13extern int iommu_detected;
14#else 14#else
15#define iommu_pass_through (0) 15#define iommu_pass_through (0)
16#define no_iommu (1)
17#define iommu_detected (0)
16#endif 18#endif
17extern void iommu_dma_init(void); 19extern void iommu_dma_init(void);
18extern void machvec_init(const char *name); 20extern void machvec_init(const char *name);
diff --git a/arch/ia64/include/asm/paravirt.h b/arch/ia64/include/asm/paravirt.h
index 2eb0a981a09a..32551d304cd7 100644
--- a/arch/ia64/include/asm/paravirt.h
+++ b/arch/ia64/include/asm/paravirt.h
@@ -281,6 +281,10 @@ paravirt_init_missing_ticks_accounting(int cpu)
281 pv_time_ops.init_missing_ticks_accounting(cpu); 281 pv_time_ops.init_missing_ticks_accounting(cpu);
282} 282}
283 283
284struct jump_label_key;
285extern struct jump_label_key paravirt_steal_enabled;
286extern struct jump_label_key paravirt_steal_rq_enabled;
287
284static inline int 288static inline int
285paravirt_do_steal_accounting(unsigned long *new_itm) 289paravirt_do_steal_accounting(unsigned long *new_itm)
286{ 290{
diff --git a/arch/ia64/include/asm/pci.h b/arch/ia64/include/asm/pci.h
index 73b5f785e70c..127dd7be346a 100644
--- a/arch/ia64/include/asm/pci.h
+++ b/arch/ia64/include/asm/pci.h
@@ -139,7 +139,7 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
139 return channel ? isa_irq_to_vector(15) : isa_irq_to_vector(14); 139 return channel ? isa_irq_to_vector(15) : isa_irq_to_vector(14);
140} 140}
141 141
142#ifdef CONFIG_DMAR 142#ifdef CONFIG_INTEL_IOMMU
143extern void pci_iommu_alloc(void); 143extern void pci_iommu_alloc(void);
144#endif 144#endif
145#endif /* _ASM_IA64_PCI_H */ 145#endif /* _ASM_IA64_PCI_H */
diff --git a/arch/ia64/include/asm/processor.h b/arch/ia64/include/asm/processor.h
index 03afe7970748..d9f397fae03e 100644
--- a/arch/ia64/include/asm/processor.h
+++ b/arch/ia64/include/asm/processor.h
@@ -75,7 +75,7 @@
75#include <asm/percpu.h> 75#include <asm/percpu.h>
76#include <asm/rse.h> 76#include <asm/rse.h>
77#include <asm/unwind.h> 77#include <asm/unwind.h>
78#include <asm/atomic.h> 78#include <linux/atomic.h>
79#ifdef CONFIG_NUMA 79#ifdef CONFIG_NUMA
80#include <asm/nodedata.h> 80#include <asm/nodedata.h>
81#endif 81#endif
diff --git a/arch/ia64/include/asm/ptrace.h b/arch/ia64/include/asm/ptrace.h
index 7ae9c3f15a1c..f5cb27614e35 100644
--- a/arch/ia64/include/asm/ptrace.h
+++ b/arch/ia64/include/asm/ptrace.h
@@ -286,7 +286,6 @@ static inline unsigned long user_stack_pointer(struct pt_regs *regs)
286 struct task_struct; /* forward decl */ 286 struct task_struct; /* forward decl */
287 struct unw_frame_info; /* forward decl */ 287 struct unw_frame_info; /* forward decl */
288 288
289 extern void show_regs (struct pt_regs *);
290 extern void ia64_do_show_stack (struct unw_frame_info *, void *); 289 extern void ia64_do_show_stack (struct unw_frame_info *, void *);
291 extern unsigned long ia64_get_user_rbs_end (struct task_struct *, struct pt_regs *, 290 extern unsigned long ia64_get_user_rbs_end (struct task_struct *, struct pt_regs *,
292 unsigned long *); 291 unsigned long *);
diff --git a/arch/ia64/include/asm/sn/tioce.h b/arch/ia64/include/asm/sn/tioce.h
index 893468e1b41b..6eae8ada90f0 100644
--- a/arch/ia64/include/asm/sn/tioce.h
+++ b/arch/ia64/include/asm/sn/tioce.h
@@ -467,7 +467,7 @@ typedef volatile struct tioce {
467#define CE_LSI_GB_CFG1_RXL0S_THS_SHFT 0 467#define CE_LSI_GB_CFG1_RXL0S_THS_SHFT 0
468#define CE_LSI_GB_CFG1_RXL0S_THS_MASK (0xffULL << 0) 468#define CE_LSI_GB_CFG1_RXL0S_THS_MASK (0xffULL << 0)
469#define CE_LSI_GB_CFG1_RXL0S_SMP_SHFT 8 469#define CE_LSI_GB_CFG1_RXL0S_SMP_SHFT 8
470#define CE_LSI_GB_CFG1_RXL0S_SMP_MASK (0xfULL << 8); 470#define CE_LSI_GB_CFG1_RXL0S_SMP_MASK (0xfULL << 8)
471#define CE_LSI_GB_CFG1_RXL0S_ADJ_SHFT 12 471#define CE_LSI_GB_CFG1_RXL0S_ADJ_SHFT 12
472#define CE_LSI_GB_CFG1_RXL0S_ADJ_MASK (0x7ULL << 12) 472#define CE_LSI_GB_CFG1_RXL0S_ADJ_MASK (0x7ULL << 12)
473#define CE_LSI_GB_CFG1_RXL0S_FLT_SHFT 15 473#define CE_LSI_GB_CFG1_RXL0S_FLT_SHFT 15
diff --git a/arch/ia64/include/asm/spinlock.h b/arch/ia64/include/asm/spinlock.h
index 1a91c9121d17..b77768d35f93 100644
--- a/arch/ia64/include/asm/spinlock.h
+++ b/arch/ia64/include/asm/spinlock.h
@@ -13,7 +13,7 @@
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/bitops.h> 14#include <linux/bitops.h>
15 15
16#include <asm/atomic.h> 16#include <linux/atomic.h>
17#include <asm/intrinsics.h> 17#include <asm/intrinsics.h>
18#include <asm/system.h> 18#include <asm/system.h>
19 19
diff --git a/arch/ia64/include/asm/unistd.h b/arch/ia64/include/asm/unistd.h
index 7c928da35b17..7617248f0d11 100644
--- a/arch/ia64/include/asm/unistd.h
+++ b/arch/ia64/include/asm/unistd.h
@@ -321,11 +321,13 @@
321#define __NR_syncfs 1329 321#define __NR_syncfs 1329
322#define __NR_setns 1330 322#define __NR_setns 1330
323#define __NR_sendmmsg 1331 323#define __NR_sendmmsg 1331
324#define __NR_process_vm_readv 1332
325#define __NR_process_vm_writev 1333
324 326
325#ifdef __KERNEL__ 327#ifdef __KERNEL__
326 328
327 329
328#define NR_syscalls 308 /* length of syscall table */ 330#define NR_syscalls 310 /* length of syscall table */
329 331
330/* 332/*
331 * The following defines stop scripts/checksyscalls.sh from complaining about 333 * The following defines stop scripts/checksyscalls.sh from complaining about
diff --git a/arch/ia64/include/asm/xen/grant_table.h b/arch/ia64/include/asm/xen/grant_table.h
deleted file mode 100644
index 2b1fae0e2d11..000000000000
--- a/arch/ia64/include/asm/xen/grant_table.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/******************************************************************************
2 * arch/ia64/include/asm/xen/grant_table.h
3 *
4 * Copyright (c) 2008 Isaku Yamahata <yamahata at valinux co jp>
5 * VA Linux Systems Japan K.K.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 *
21 */
22
23#ifndef _ASM_IA64_XEN_GRANT_TABLE_H
24#define _ASM_IA64_XEN_GRANT_TABLE_H
25
26struct vm_struct *xen_alloc_vm_area(unsigned long size);
27void xen_free_vm_area(struct vm_struct *area);
28
29#endif /* _ASM_IA64_XEN_GRANT_TABLE_H */
diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
index 395c2f216dd8..d959c84904be 100644
--- a/arch/ia64/kernel/Makefile
+++ b/arch/ia64/kernel/Makefile
@@ -43,7 +43,7 @@ obj-$(CONFIG_IA64_ESI) += esi.o
43ifneq ($(CONFIG_IA64_ESI),) 43ifneq ($(CONFIG_IA64_ESI),)
44obj-y += esi_stub.o # must be in kernel proper 44obj-y += esi_stub.o # must be in kernel proper
45endif 45endif
46obj-$(CONFIG_DMAR) += pci-dma.o 46obj-$(CONFIG_INTEL_IOMMU) += pci-dma.o
47obj-$(CONFIG_SWIOTLB) += pci-swiotlb.o 47obj-$(CONFIG_SWIOTLB) += pci-swiotlb.o
48 48
49obj-$(CONFIG_BINFMT_ELF) += elfcore.o 49obj-$(CONFIG_BINFMT_ELF) += elfcore.o
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index 3be485a300b1..bfb4d01e0e51 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -88,7 +88,7 @@ acpi_get_sysname(void)
88 struct acpi_table_rsdp *rsdp; 88 struct acpi_table_rsdp *rsdp;
89 struct acpi_table_xsdt *xsdt; 89 struct acpi_table_xsdt *xsdt;
90 struct acpi_table_header *hdr; 90 struct acpi_table_header *hdr;
91#ifdef CONFIG_DMAR 91#ifdef CONFIG_INTEL_IOMMU
92 u64 i, nentries; 92 u64 i, nentries;
93#endif 93#endif
94 94
@@ -125,7 +125,7 @@ acpi_get_sysname(void)
125 return "xen"; 125 return "xen";
126 } 126 }
127 127
128#ifdef CONFIG_DMAR 128#ifdef CONFIG_INTEL_IOMMU
129 /* Look for Intel IOMMU */ 129 /* Look for Intel IOMMU */
130 nentries = (hdr->length - sizeof(*hdr)) / 130 nentries = (hdr->length - sizeof(*hdr)) /
131 sizeof(xsdt->table_offset_entry[0]); 131 sizeof(xsdt->table_offset_entry[0]);
diff --git a/arch/ia64/kernel/cyclone.c b/arch/ia64/kernel/cyclone.c
index f64097b5118a..4826ff957a3d 100644
--- a/arch/ia64/kernel/cyclone.c
+++ b/arch/ia64/kernel/cyclone.c
@@ -115,7 +115,7 @@ int __init init_cyclone_clock(void)
115 } 115 }
116 /* initialize last tick */ 116 /* initialize last tick */
117 cyclone_mc = cyclone_timer; 117 cyclone_mc = cyclone_timer;
118 clocksource_cyclone.fsys_mmio = cyclone_timer; 118 clocksource_cyclone.archdata.fsys_mmio = cyclone_timer;
119 clocksource_register_hz(&clocksource_cyclone, CYCLONE_TIMER_FREQ); 119 clocksource_register_hz(&clocksource_cyclone, CYCLONE_TIMER_FREQ);
120 120
121 return 0; 121 return 0;
diff --git a/arch/ia64/kernel/dma-mapping.c b/arch/ia64/kernel/dma-mapping.c
index f2c1600da097..7f7916238208 100644
--- a/arch/ia64/kernel/dma-mapping.c
+++ b/arch/ia64/kernel/dma-mapping.c
@@ -1,4 +1,5 @@
1#include <linux/dma-mapping.h> 1#include <linux/dma-mapping.h>
2#include <linux/export.h>
2 3
3/* Set this to 1 if there is a HW IOMMU in the system */ 4/* Set this to 1 if there is a HW IOMMU in the system */
4int iommu_detected __read_mostly; 5int iommu_detected __read_mostly;
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c
index 6fc03aff046c..c38d22e5e902 100644
--- a/arch/ia64/kernel/efi.c
+++ b/arch/ia64/kernel/efi.c
@@ -156,7 +156,7 @@ prefix##_get_next_variable (unsigned long *name_size, efi_char16_t *name, \
156#define STUB_SET_VARIABLE(prefix, adjust_arg) \ 156#define STUB_SET_VARIABLE(prefix, adjust_arg) \
157static efi_status_t \ 157static efi_status_t \
158prefix##_set_variable (efi_char16_t *name, efi_guid_t *vendor, \ 158prefix##_set_variable (efi_char16_t *name, efi_guid_t *vendor, \
159 unsigned long attr, unsigned long data_size, \ 159 u32 attr, unsigned long data_size, \
160 void *data) \ 160 void *data) \
161{ \ 161{ \
162 struct ia64_fpreg fr[6]; \ 162 struct ia64_fpreg fr[6]; \
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S
index 97dd2abdeb1a..5b31d46aff67 100644
--- a/arch/ia64/kernel/entry.S
+++ b/arch/ia64/kernel/entry.S
@@ -1614,7 +1614,7 @@ sys_call_table:
1614 data8 sys_sched_get_priority_min 1614 data8 sys_sched_get_priority_min
1615 data8 sys_sched_rr_get_interval 1615 data8 sys_sched_rr_get_interval
1616 data8 sys_nanosleep 1616 data8 sys_nanosleep
1617 data8 sys_nfsservctl 1617 data8 sys_ni_syscall // old nfsservctl
1618 data8 sys_prctl // 1170 1618 data8 sys_prctl // 1170
1619 data8 sys_getpagesize 1619 data8 sys_getpagesize
1620 data8 sys_mmap2 1620 data8 sys_mmap2
@@ -1777,6 +1777,8 @@ sys_call_table:
1777 data8 sys_syncfs 1777 data8 sys_syncfs
1778 data8 sys_setns // 1330 1778 data8 sys_setns // 1330
1779 data8 sys_sendmmsg 1779 data8 sys_sendmmsg
1780 data8 sys_process_vm_readv
1781 data8 sys_process_vm_writev
1780 1782
1781 .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls 1783 .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls
1782#endif /* __IA64_ASM_PARAVIRTUALIZED_NATIVE */ 1784#endif /* __IA64_ASM_PARAVIRTUALIZED_NATIVE */
diff --git a/arch/ia64/kernel/module.c b/arch/ia64/kernel/module.c
index 1481b0a28ca0..24603be24c14 100644
--- a/arch/ia64/kernel/module.c
+++ b/arch/ia64/kernel/module.c
@@ -304,14 +304,6 @@ plt_target (struct plt_entry *plt)
304 304
305#endif /* !USE_BRL */ 305#endif /* !USE_BRL */
306 306
307void *
308module_alloc (unsigned long size)
309{
310 if (!size)
311 return NULL;
312 return vmalloc(size);
313}
314
315void 307void
316module_free (struct module *mod, void *module_region) 308module_free (struct module *mod, void *module_region)
317{ 309{
@@ -853,14 +845,6 @@ apply_relocate_add (Elf64_Shdr *sechdrs, const char *strtab, unsigned int symind
853 return 0; 845 return 0;
854} 846}
855 847
856int
857apply_relocate (Elf64_Shdr *sechdrs, const char *strtab, unsigned int symindex,
858 unsigned int relsec, struct module *mod)
859{
860 printk(KERN_ERR "module %s: REL relocs in section %u unsupported\n", mod->name, relsec);
861 return -ENOEXEC;
862}
863
864/* 848/*
865 * Modules contain a single unwind table which covers both the core and the init text 849 * Modules contain a single unwind table which covers both the core and the init text
866 * sections but since the two are not contiguous, we need to split this table up such that 850 * sections but since the two are not contiguous, we need to split this table up such that
diff --git a/arch/ia64/kernel/msi_ia64.c b/arch/ia64/kernel/msi_ia64.c
index 009df5434a7a..94e0db72d4a6 100644
--- a/arch/ia64/kernel/msi_ia64.c
+++ b/arch/ia64/kernel/msi_ia64.c
@@ -131,7 +131,7 @@ void arch_teardown_msi_irq(unsigned int irq)
131 return ia64_teardown_msi_irq(irq); 131 return ia64_teardown_msi_irq(irq);
132} 132}
133 133
134#ifdef CONFIG_DMAR 134#ifdef CONFIG_INTEL_IOMMU
135#ifdef CONFIG_SMP 135#ifdef CONFIG_SMP
136static int dmar_msi_set_affinity(struct irq_data *data, 136static int dmar_msi_set_affinity(struct irq_data *data,
137 const struct cpumask *mask, bool force) 137 const struct cpumask *mask, bool force)
@@ -210,5 +210,5 @@ int arch_setup_dmar_msi(unsigned int irq)
210 "edge"); 210 "edge");
211 return 0; 211 return 0;
212} 212}
213#endif /* CONFIG_DMAR */ 213#endif /* CONFIG_INTEL_IOMMU */
214 214
diff --git a/arch/ia64/kernel/paravirt.c b/arch/ia64/kernel/paravirt.c
index a21d7bb9c69c..100868216c55 100644
--- a/arch/ia64/kernel/paravirt.c
+++ b/arch/ia64/kernel/paravirt.c
@@ -634,6 +634,8 @@ struct pv_irq_ops pv_irq_ops = {
634 * pv_time_ops 634 * pv_time_ops
635 * time operations 635 * time operations
636 */ 636 */
637struct jump_label_key paravirt_steal_enabled;
638struct jump_label_key paravirt_steal_rq_enabled;
637 639
638static int 640static int
639ia64_native_do_steal_accounting(unsigned long *new_itm) 641ia64_native_do_steal_accounting(unsigned long *new_itm)
diff --git a/arch/ia64/kernel/pci-dma.c b/arch/ia64/kernel/pci-dma.c
index f6b1ff0aea76..c16162c70860 100644
--- a/arch/ia64/kernel/pci-dma.c
+++ b/arch/ia64/kernel/pci-dma.c
@@ -14,7 +14,7 @@
14 14
15#include <asm/system.h> 15#include <asm/system.h>
16 16
17#ifdef CONFIG_DMAR 17#ifdef CONFIG_INTEL_IOMMU
18 18
19#include <linux/kernel.h> 19#include <linux/kernel.h>
20 20
diff --git a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c
index be450a3e9871..0bd537b4ea6b 100644
--- a/arch/ia64/kernel/smp.c
+++ b/arch/ia64/kernel/smp.c
@@ -32,7 +32,7 @@
32#include <linux/bitops.h> 32#include <linux/bitops.h>
33#include <linux/kexec.h> 33#include <linux/kexec.h>
34 34
35#include <asm/atomic.h> 35#include <linux/atomic.h>
36#include <asm/current.h> 36#include <asm/current.h>
37#include <asm/delay.h> 37#include <asm/delay.h>
38#include <asm/machvec.h> 38#include <asm/machvec.h>
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c
index 14ec641003da..559097986672 100644
--- a/arch/ia64/kernel/smpboot.c
+++ b/arch/ia64/kernel/smpboot.c
@@ -40,7 +40,7 @@
40#include <linux/percpu.h> 40#include <linux/percpu.h>
41#include <linux/bitops.h> 41#include <linux/bitops.h>
42 42
43#include <asm/atomic.h> 43#include <linux/atomic.h>
44#include <asm/cache.h> 44#include <asm/cache.h>
45#include <asm/current.h> 45#include <asm/current.h>
46#include <asm/delay.h> 46#include <asm/delay.h>
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c
index 85118dfe9bb5..43920de425f1 100644
--- a/arch/ia64/kernel/time.c
+++ b/arch/ia64/kernel/time.c
@@ -468,7 +468,7 @@ void update_vsyscall(struct timespec *wall, struct timespec *wtm,
468 fsyscall_gtod_data.clk_mask = c->mask; 468 fsyscall_gtod_data.clk_mask = c->mask;
469 fsyscall_gtod_data.clk_mult = mult; 469 fsyscall_gtod_data.clk_mult = mult;
470 fsyscall_gtod_data.clk_shift = c->shift; 470 fsyscall_gtod_data.clk_shift = c->shift;
471 fsyscall_gtod_data.clk_fsys_mmio = c->fsys_mmio; 471 fsyscall_gtod_data.clk_fsys_mmio = c->archdata.fsys_mmio;
472 fsyscall_gtod_data.clk_cycle_last = c->cycle_last; 472 fsyscall_gtod_data.clk_cycle_last = c->cycle_last;
473 473
474 /* copy kernel time structures */ 474 /* copy kernel time structures */
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c
index 0e0e0cc9e392..9be1f11a01d9 100644
--- a/arch/ia64/kernel/topology.c
+++ b/arch/ia64/kernel/topology.c
@@ -22,6 +22,7 @@
22#include <linux/bootmem.h> 22#include <linux/bootmem.h>
23#include <linux/nodemask.h> 23#include <linux/nodemask.h>
24#include <linux/notifier.h> 24#include <linux/notifier.h>
25#include <linux/export.h>
25#include <asm/mmzone.h> 26#include <asm/mmzone.h>
26#include <asm/numa.h> 27#include <asm/numa.h>
27#include <asm/cpu.h> 28#include <asm/cpu.h>
diff --git a/arch/ia64/kernel/uncached.c b/arch/ia64/kernel/uncached.c
index c4696d217ce0..6a867dc45c05 100644
--- a/arch/ia64/kernel/uncached.c
+++ b/arch/ia64/kernel/uncached.c
@@ -25,7 +25,7 @@
25#include <asm/pal.h> 25#include <asm/pal.h>
26#include <asm/system.h> 26#include <asm/system.h>
27#include <asm/pgtable.h> 27#include <asm/pgtable.h>
28#include <asm/atomic.h> 28#include <linux/atomic.h>
29#include <asm/tlbflush.h> 29#include <asm/tlbflush.h>
30#include <asm/sn/arch.h> 30#include <asm/sn/arch.h>
31 31
diff --git a/arch/ia64/kvm/Kconfig b/arch/ia64/kvm/Kconfig
index fa4d1e59deb0..9806e55f91be 100644
--- a/arch/ia64/kvm/Kconfig
+++ b/arch/ia64/kvm/Kconfig
@@ -49,6 +49,5 @@ config KVM_INTEL
49 extensions. 49 extensions.
50 50
51source drivers/vhost/Kconfig 51source drivers/vhost/Kconfig
52source drivers/virtio/Kconfig
53 52
54endif # VIRTUALIZATION 53endif # VIRTUALIZATION
diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c
index 8213efe1998c..43f4c92816ef 100644
--- a/arch/ia64/kvm/kvm-ia64.c
+++ b/arch/ia64/kvm/kvm-ia64.c
@@ -33,6 +33,7 @@
33#include <linux/uaccess.h> 33#include <linux/uaccess.h>
34#include <linux/iommu.h> 34#include <linux/iommu.h>
35#include <linux/intel-iommu.h> 35#include <linux/intel-iommu.h>
36#include <linux/pci.h>
36 37
37#include <asm/pgtable.h> 38#include <asm/pgtable.h>
38#include <asm/gcc_intrin.h> 39#include <asm/gcc_intrin.h>
@@ -204,7 +205,7 @@ int kvm_dev_ioctl_check_extension(long ext)
204 r = KVM_COALESCED_MMIO_PAGE_OFFSET; 205 r = KVM_COALESCED_MMIO_PAGE_OFFSET;
205 break; 206 break;
206 case KVM_CAP_IOMMU: 207 case KVM_CAP_IOMMU:
207 r = iommu_found(); 208 r = iommu_present(&pci_bus_type);
208 break; 209 break;
209 default: 210 default:
210 r = 0; 211 r = 0;
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c
index aa2533ae7e9e..2c27714d7b78 100644
--- a/arch/ia64/pci/pci.c
+++ b/arch/ia64/pci/pci.c
@@ -20,6 +20,7 @@
20#include <linux/slab.h> 20#include <linux/slab.h>
21#include <linux/spinlock.h> 21#include <linux/spinlock.h>
22#include <linux/bootmem.h> 22#include <linux/bootmem.h>
23#include <linux/export.h>
23 24
24#include <asm/machvec.h> 25#include <asm/machvec.h>
25#include <asm/page.h> 26#include <asm/page.h>
diff --git a/arch/ia64/sn/kernel/io_acpi_init.c b/arch/ia64/sn/kernel/io_acpi_init.c
index 8cdcb173a138..b1725398b5af 100644
--- a/arch/ia64/sn/kernel/io_acpi_init.c
+++ b/arch/ia64/sn/kernel/io_acpi_init.c
@@ -14,6 +14,7 @@
14#include "xtalk/hubdev.h" 14#include "xtalk/hubdev.h"
15#include <linux/acpi.h> 15#include <linux/acpi.h>
16#include <linux/slab.h> 16#include <linux/slab.h>
17#include <linux/export.h>
17 18
18 19
19/* 20/*
diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c
index 98079f29d9a9..0a36f082eaf1 100644
--- a/arch/ia64/sn/kernel/io_init.c
+++ b/arch/ia64/sn/kernel/io_init.c
@@ -7,6 +7,7 @@
7 */ 7 */
8 8
9#include <linux/slab.h> 9#include <linux/slab.h>
10#include <linux/export.h>
10#include <asm/sn/types.h> 11#include <asm/sn/types.h>
11#include <asm/sn/addrs.h> 12#include <asm/sn/addrs.h>
12#include <asm/sn/io.h> 13#include <asm/sn/io.h>
diff --git a/arch/ia64/sn/kernel/irq.c b/arch/ia64/sn/kernel/irq.c
index 81a1f4e6bcd8..485c42d97e83 100644
--- a/arch/ia64/sn/kernel/irq.c
+++ b/arch/ia64/sn/kernel/irq.c
@@ -112,8 +112,6 @@ static void sn_ack_irq(struct irq_data *data)
112 irq_move_irq(data); 112 irq_move_irq(data);
113} 113}
114 114
115static void sn_irq_info_free(struct rcu_head *head);
116
117struct sn_irq_info *sn_retarget_vector(struct sn_irq_info *sn_irq_info, 115struct sn_irq_info *sn_retarget_vector(struct sn_irq_info *sn_irq_info,
118 nasid_t nasid, int slice) 116 nasid_t nasid, int slice)
119{ 117{
@@ -177,7 +175,7 @@ struct sn_irq_info *sn_retarget_vector(struct sn_irq_info *sn_irq_info,
177 spin_lock(&sn_irq_info_lock); 175 spin_lock(&sn_irq_info_lock);
178 list_replace_rcu(&sn_irq_info->list, &new_irq_info->list); 176 list_replace_rcu(&sn_irq_info->list, &new_irq_info->list);
179 spin_unlock(&sn_irq_info_lock); 177 spin_unlock(&sn_irq_info_lock);
180 call_rcu(&sn_irq_info->rcu, sn_irq_info_free); 178 kfree_rcu(sn_irq_info, rcu);
181 179
182 180
183finish_up: 181finish_up:
@@ -338,14 +336,6 @@ static void unregister_intr_pda(struct sn_irq_info *sn_irq_info)
338 rcu_read_unlock(); 336 rcu_read_unlock();
339} 337}
340 338
341static void sn_irq_info_free(struct rcu_head *head)
342{
343 struct sn_irq_info *sn_irq_info;
344
345 sn_irq_info = container_of(head, struct sn_irq_info, rcu);
346 kfree(sn_irq_info);
347}
348
349void sn_irq_fixup(struct pci_dev *pci_dev, struct sn_irq_info *sn_irq_info) 339void sn_irq_fixup(struct pci_dev *pci_dev, struct sn_irq_info *sn_irq_info)
350{ 340{
351 nasid_t nasid = sn_irq_info->irq_nasid; 341 nasid_t nasid = sn_irq_info->irq_nasid;
@@ -399,7 +389,7 @@ void sn_irq_unfixup(struct pci_dev *pci_dev)
399 spin_unlock(&sn_irq_info_lock); 389 spin_unlock(&sn_irq_info_lock);
400 if (list_empty(sn_irq_lh[sn_irq_info->irq_irq])) 390 if (list_empty(sn_irq_lh[sn_irq_info->irq_irq]))
401 free_irq_vector(sn_irq_info->irq_irq); 391 free_irq_vector(sn_irq_info->irq_irq);
402 call_rcu(&sn_irq_info->rcu, sn_irq_info_free); 392 kfree_rcu(sn_irq_info, rcu);
403 pci_dev_put(pci_dev); 393 pci_dev_put(pci_dev);
404 394
405} 395}
diff --git a/arch/ia64/sn/kernel/sn2/sn_hwperf.c b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
index 30862c0358cd..2de41d44266e 100644
--- a/arch/ia64/sn/kernel/sn2/sn_hwperf.c
+++ b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
@@ -615,11 +615,15 @@ static int sn_hwperf_op_cpu(struct sn_hwperf_op_info *op_info)
615 } 615 }
616 } 616 }
617 617
618 if (cpu == SN_HWPERF_ARG_ANY_CPU || cpu == get_cpu()) { 618 if (cpu == SN_HWPERF_ARG_ANY_CPU) {
619 /* don't care, or already on correct cpu */ 619 /* don't care which cpu */
620 sn_hwperf_call_sal(op_info); 620 sn_hwperf_call_sal(op_info);
621 } 621 } else if (cpu == get_cpu()) {
622 else { 622 /* already on correct cpu */
623 sn_hwperf_call_sal(op_info);
624 put_cpu();
625 } else {
626 put_cpu();
623 if (use_ipi) { 627 if (use_ipi) {
624 /* use an interprocessor interrupt to call SAL */ 628 /* use an interprocessor interrupt to call SAL */
625 smp_call_function_single(cpu, sn_hwperf_call_sal, 629 smp_call_function_single(cpu, sn_hwperf_call_sal,
diff --git a/arch/ia64/sn/kernel/sn2/timer.c b/arch/ia64/sn/kernel/sn2/timer.c
index c34efda122e1..0f8844e49363 100644
--- a/arch/ia64/sn/kernel/sn2/timer.c
+++ b/arch/ia64/sn/kernel/sn2/timer.c
@@ -54,7 +54,7 @@ ia64_sn_udelay (unsigned long usecs)
54 54
55void __init sn_timer_init(void) 55void __init sn_timer_init(void)
56{ 56{
57 clocksource_sn2.fsys_mmio = RTC_COUNTER_ADDR; 57 clocksource_sn2.archdata.fsys_mmio = RTC_COUNTER_ADDR;
58 clocksource_register_hz(&clocksource_sn2, sn_rtc_cycles_per_second); 58 clocksource_register_hz(&clocksource_sn2, sn_rtc_cycles_per_second);
59 59
60 ia64_udelay = &ia64_sn_udelay; 60 ia64_udelay = &ia64_sn_udelay;
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_dma.c b/arch/ia64/sn/pci/pcibr/pcibr_dma.c
index 33def666a664..1e863b277ac9 100644
--- a/arch/ia64/sn/pci/pcibr/pcibr_dma.c
+++ b/arch/ia64/sn/pci/pcibr/pcibr_dma.c
@@ -8,6 +8,7 @@
8 8
9#include <linux/types.h> 9#include <linux/types.h>
10#include <linux/pci.h> 10#include <linux/pci.h>
11#include <linux/export.h>
11#include <asm/sn/addrs.h> 12#include <asm/sn/addrs.h>
12#include <asm/sn/geo.h> 13#include <asm/sn/geo.h>
13#include <asm/sn/pcibr_provider.h> 14#include <asm/sn/pcibr_provider.h>
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_provider.c b/arch/ia64/sn/pci/pcibr/pcibr_provider.c
index 3cb5cf377644..5698f29d5add 100644
--- a/arch/ia64/sn/pci/pcibr/pcibr_provider.c
+++ b/arch/ia64/sn/pci/pcibr/pcibr_provider.c
@@ -10,6 +10,7 @@
10#include <linux/types.h> 10#include <linux/types.h>
11#include <linux/slab.h> 11#include <linux/slab.h>
12#include <linux/pci.h> 12#include <linux/pci.h>
13#include <linux/export.h>
13#include <asm/sn/addrs.h> 14#include <asm/sn/addrs.h>
14#include <asm/sn/geo.h> 15#include <asm/sn/geo.h>
15#include <asm/sn/pcibr_provider.h> 16#include <asm/sn/pcibr_provider.h>
diff --git a/arch/ia64/sn/pci/tioca_provider.c b/arch/ia64/sn/pci/tioca_provider.c
index 9c271be9919a..642451e770ea 100644
--- a/arch/ia64/sn/pci/tioca_provider.c
+++ b/arch/ia64/sn/pci/tioca_provider.c
@@ -11,6 +11,7 @@
11#include <linux/pci.h> 11#include <linux/pci.h>
12#include <linux/bitmap.h> 12#include <linux/bitmap.h>
13#include <linux/slab.h> 13#include <linux/slab.h>
14#include <linux/export.h>
14#include <asm/sn/sn_sal.h> 15#include <asm/sn/sn_sal.h>
15#include <asm/sn/addrs.h> 16#include <asm/sn/addrs.h>
16#include <asm/sn/io.h> 17#include <asm/sn/io.h>
diff --git a/arch/ia64/xen/grant-table.c b/arch/ia64/xen/grant-table.c
index 48cca37625eb..c18281332f84 100644
--- a/arch/ia64/xen/grant-table.c
+++ b/arch/ia64/xen/grant-table.c
@@ -31,68 +31,6 @@
31 31
32#include <asm/xen/hypervisor.h> 32#include <asm/xen/hypervisor.h>
33 33
34struct vm_struct *xen_alloc_vm_area(unsigned long size)
35{
36 int order;
37 unsigned long virt;
38 unsigned long nr_pages;
39 struct vm_struct *area;
40
41 order = get_order(size);
42 virt = __get_free_pages(GFP_KERNEL, order);
43 if (virt == 0)
44 goto err0;
45 nr_pages = 1 << order;
46 scrub_pages(virt, nr_pages);
47
48 area = kmalloc(sizeof(*area), GFP_KERNEL);
49 if (area == NULL)
50 goto err1;
51
52 area->flags = VM_IOREMAP;
53 area->addr = (void *)virt;
54 area->size = size;
55 area->pages = NULL;
56 area->nr_pages = nr_pages;
57 area->phys_addr = 0; /* xenbus_map_ring_valloc uses this field! */
58
59 return area;
60
61err1:
62 free_pages(virt, order);
63err0:
64 return NULL;
65}
66EXPORT_SYMBOL_GPL(xen_alloc_vm_area);
67
68void xen_free_vm_area(struct vm_struct *area)
69{
70 unsigned int order = get_order(area->size);
71 unsigned long i;
72 unsigned long phys_addr = __pa(area->addr);
73
74 /* This area is used for foreign page mappping.
75 * So underlying machine page may not be assigned. */
76 for (i = 0; i < (1 << order); i++) {
77 unsigned long ret;
78 unsigned long gpfn = (phys_addr >> PAGE_SHIFT) + i;
79 struct xen_memory_reservation reservation = {
80 .nr_extents = 1,
81 .address_bits = 0,
82 .extent_order = 0,
83 .domid = DOMID_SELF
84 };
85 set_xen_guest_handle(reservation.extent_start, &gpfn);
86 ret = HYPERVISOR_memory_op(XENMEM_populate_physmap,
87 &reservation);
88 BUG_ON(ret != 1);
89 }
90 free_pages((unsigned long)area->addr, order);
91 kfree(area);
92}
93EXPORT_SYMBOL_GPL(xen_free_vm_area);
94
95
96/**************************************************************************** 34/****************************************************************************
97 * grant table hack 35 * grant table hack
98 * cmd: GNTTABOP_xxx 36 * cmd: GNTTABOP_xxx
diff --git a/arch/ia64/xen/hypervisor.c b/arch/ia64/xen/hypervisor.c
index cac4d97c0b5a..52172eee8591 100644
--- a/arch/ia64/xen/hypervisor.c
+++ b/arch/ia64/xen/hypervisor.c
@@ -21,6 +21,7 @@
21 */ 21 */
22 22
23#include <linux/efi.h> 23#include <linux/efi.h>
24#include <linux/export.h>
24#include <asm/xen/hypervisor.h> 25#include <asm/xen/hypervisor.h>
25#include <asm/xen/privop.h> 26#include <asm/xen/privop.h>
26 27