aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/Kconfig1
-rw-r--r--arch/ia64/Makefile5
-rw-r--r--arch/ia64/hp/common/sba_iommu.c2
-rw-r--r--arch/ia64/hp/sim/hpsim_irq.c6
-rw-r--r--arch/ia64/include/asm/Kbuild1
-rw-r--r--arch/ia64/include/asm/bitops.h2
-rw-r--r--arch/ia64/include/asm/dma-mapping.h110
-rw-r--r--arch/ia64/include/asm/fpu.h2
-rw-r--r--arch/ia64/include/asm/gcc_intrin.h18
-rw-r--r--arch/ia64/include/asm/hw_irq.h4
-rw-r--r--arch/ia64/include/asm/iommu.h5
-rw-r--r--arch/ia64/include/asm/mca.h38
-rw-r--r--arch/ia64/include/asm/meminit.h18
-rw-r--r--arch/ia64/include/asm/pal.h24
-rw-r--r--arch/ia64/include/asm/pci.h13
-rw-r--r--arch/ia64/include/asm/pgalloc.h6
-rw-r--r--arch/ia64/include/asm/pgtable.h1
-rw-r--r--arch/ia64/include/asm/processor.h56
-rw-r--r--arch/ia64/include/asm/sal.h8
-rw-r--r--arch/ia64/include/asm/sn/sn_sal.h2
-rw-r--r--arch/ia64/include/asm/thread_info.h2
-rw-r--r--arch/ia64/include/asm/tlb.h12
-rw-r--r--arch/ia64/include/asm/types.h13
-rw-r--r--arch/ia64/include/asm/unistd.h4
-rw-r--r--arch/ia64/include/asm/xen/hypervisor.h1
-rw-r--r--arch/ia64/kernel/acpi-processor.c12
-rw-r--r--arch/ia64/kernel/dma-mapping.c10
-rw-r--r--arch/ia64/kernel/efi.c10
-rw-r--r--arch/ia64/kernel/entry.S1
-rw-r--r--arch/ia64/kernel/esi.c2
-rw-r--r--arch/ia64/kernel/ia64_ksyms.c4
-rw-r--r--arch/ia64/kernel/iosapic.c14
-rw-r--r--arch/ia64/kernel/irq.c2
-rw-r--r--arch/ia64/kernel/irq_ia64.c2
-rw-r--r--arch/ia64/kernel/irq_lsapic.c2
-rw-r--r--arch/ia64/kernel/mca.c20
-rw-r--r--arch/ia64/kernel/module.c14
-rw-r--r--arch/ia64/kernel/msi_ia64.c2
-rw-r--r--arch/ia64/kernel/palinfo.c68
-rw-r--r--arch/ia64/kernel/paravirt_patchlist.c2
-rw-r--r--arch/ia64/kernel/pci-dma.c9
-rw-r--r--arch/ia64/kernel/pci-swiotlb.c2
-rw-r--r--arch/ia64/kernel/perfmon.c8
-rw-r--r--arch/ia64/kernel/ptrace.c1
-rw-r--r--arch/ia64/kernel/salinfo.c2
-rw-r--r--arch/ia64/kernel/setup.c32
-rw-r--r--arch/ia64/kernel/smp.c2
-rw-r--r--arch/ia64/kernel/smpboot.c4
-rw-r--r--arch/ia64/kernel/time.c2
-rw-r--r--arch/ia64/kernel/topology.c10
-rw-r--r--arch/ia64/kernel/uncached.c3
-rw-r--r--arch/ia64/kvm/kvm_lib.c6
-rw-r--r--arch/ia64/kvm/mmio.c6
-rw-r--r--arch/ia64/kvm/process.c6
-rw-r--r--arch/ia64/kvm/vcpu.c8
-rw-r--r--arch/ia64/kvm/vcpu.h13
-rw-r--r--arch/ia64/kvm/vtlb.c4
-rw-r--r--arch/ia64/lib/ip_fast_csum.S8
-rw-r--r--arch/ia64/mm/contig.c9
-rw-r--r--arch/ia64/mm/fault.c2
-rw-r--r--arch/ia64/mm/init.c15
-rw-r--r--arch/ia64/mm/tlb.c4
-rw-r--r--arch/ia64/pci/pci.c18
-rw-r--r--arch/ia64/sn/kernel/io_acpi_init.c4
-rw-r--r--arch/ia64/sn/kernel/io_common.c5
-rw-r--r--arch/ia64/sn/kernel/irq.c6
-rw-r--r--arch/ia64/sn/kernel/sn2/sn_hwperf.c4
-rw-r--r--arch/ia64/sn/kernel/sn2/sn_proc_fs.c2
-rw-r--r--arch/ia64/sn/kernel/tiocx.c2
-rw-r--r--arch/ia64/sn/pci/pcibr/pcibr_provider.c2
-rw-r--r--arch/ia64/sn/pci/tioca_provider.c6
-rw-r--r--arch/ia64/sn/pci/tioce_provider.c6
-rw-r--r--arch/ia64/xen/irq_xen.c2
73 files changed, 337 insertions, 395 deletions
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 294a3b13ecac..170042b420d4 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -28,6 +28,7 @@ config IA64
28 select HAVE_DMA_ATTRS 28 select HAVE_DMA_ATTRS
29 select HAVE_KVM 29 select HAVE_KVM
30 select HAVE_ARCH_TRACEHOOK 30 select HAVE_ARCH_TRACEHOOK
31 select HAVE_DMA_API_DEBUG
31 default y 32 default y
32 help 33 help
33 The Itanium Processor Family is Intel's 64-bit successor to 34 The Itanium Processor Family is Intel's 64-bit successor to
diff --git a/arch/ia64/Makefile b/arch/ia64/Makefile
index 58a7e46affda..e7cbaa02cd0b 100644
--- a/arch/ia64/Makefile
+++ b/arch/ia64/Makefile
@@ -41,11 +41,6 @@ $(error Sorry, you need a newer version of the assember, one that is built from
41 ftp://ftp.hpl.hp.com/pub/linux-ia64/gas-030124.tar.gz) 41 ftp://ftp.hpl.hp.com/pub/linux-ia64/gas-030124.tar.gz)
42endif 42endif
43 43
44ifeq ($(call cc-version),0304)
45 cflags-$(CONFIG_ITANIUM) += -mtune=merced
46 cflags-$(CONFIG_MCKINLEY) += -mtune=mckinley
47endif
48
49KBUILD_CFLAGS += $(cflags-y) 44KBUILD_CFLAGS += $(cflags-y)
50head-y := arch/ia64/kernel/head.o arch/ia64/kernel/init_task.o 45head-y := arch/ia64/kernel/head.o arch/ia64/kernel/init_task.o
51 46
diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c
index fe63b2dc9d07..8cfb001092ab 100644
--- a/arch/ia64/hp/common/sba_iommu.c
+++ b/arch/ia64/hp/common/sba_iommu.c
@@ -1787,7 +1787,7 @@ static struct ioc_iommu ioc_iommu_info[] __initdata = {
1787}; 1787};
1788 1788
1789static struct ioc * __init 1789static struct ioc * __init
1790ioc_init(u64 hpa, void *handle) 1790ioc_init(unsigned long hpa, void *handle)
1791{ 1791{
1792 struct ioc *ioc; 1792 struct ioc *ioc;
1793 struct ioc_iommu *info; 1793 struct ioc_iommu *info;
diff --git a/arch/ia64/hp/sim/hpsim_irq.c b/arch/ia64/hp/sim/hpsim_irq.c
index acb5047ab573..b272261d77cc 100644
--- a/arch/ia64/hp/sim/hpsim_irq.c
+++ b/arch/ia64/hp/sim/hpsim_irq.c
@@ -27,7 +27,7 @@ hpsim_set_affinity_noop(unsigned int a, const struct cpumask *b)
27 return 0; 27 return 0;
28} 28}
29 29
30static struct hw_interrupt_type irq_type_hp_sim = { 30static struct irq_chip irq_type_hp_sim = {
31 .name = "hpsim", 31 .name = "hpsim",
32 .startup = hpsim_irq_startup, 32 .startup = hpsim_irq_startup,
33 .shutdown = hpsim_irq_noop, 33 .shutdown = hpsim_irq_noop,
@@ -41,12 +41,12 @@ static struct hw_interrupt_type irq_type_hp_sim = {
41void __init 41void __init
42hpsim_irq_init (void) 42hpsim_irq_init (void)
43{ 43{
44 irq_desc_t *idesc; 44 struct irq_desc *idesc;
45 int i; 45 int i;
46 46
47 for (i = 0; i < NR_IRQS; ++i) { 47 for (i = 0; i < NR_IRQS; ++i) {
48 idesc = irq_desc + i; 48 idesc = irq_desc + i;
49 if (idesc->chip == &no_irq_type) 49 if (idesc->chip == &no_irq_chip)
50 idesc->chip = &irq_type_hp_sim; 50 idesc->chip = &irq_type_hp_sim;
51 } 51 }
52} 52}
diff --git a/arch/ia64/include/asm/Kbuild b/arch/ia64/include/asm/Kbuild
index ccbe8ae47a61..c7d0a71b9242 100644
--- a/arch/ia64/include/asm/Kbuild
+++ b/arch/ia64/include/asm/Kbuild
@@ -2,7 +2,6 @@ include include/asm-generic/Kbuild.asm
2 2
3header-y += break.h 3header-y += break.h
4header-y += fpu.h 4header-y += fpu.h
5header-y += fpswa.h
6header-y += ia64regs.h 5header-y += ia64regs.h
7header-y += intel_intrin.h 6header-y += intel_intrin.h
8header-y += perfmon_default_smpl.h 7header-y += perfmon_default_smpl.h
diff --git a/arch/ia64/include/asm/bitops.h b/arch/ia64/include/asm/bitops.h
index e2ca80037335..57a2787bc9fb 100644
--- a/arch/ia64/include/asm/bitops.h
+++ b/arch/ia64/include/asm/bitops.h
@@ -286,7 +286,7 @@ __test_and_clear_bit(int nr, volatile void * addr)
286{ 286{
287 __u32 *p = (__u32 *) addr + (nr >> 5); 287 __u32 *p = (__u32 *) addr + (nr >> 5);
288 __u32 m = 1 << (nr & 31); 288 __u32 m = 1 << (nr & 31);
289 int oldbitset = *p & m; 289 int oldbitset = (*p & m) != 0;
290 290
291 *p &= ~m; 291 *p &= ~m;
292 return oldbitset; 292 return oldbitset;
diff --git a/arch/ia64/include/asm/dma-mapping.h b/arch/ia64/include/asm/dma-mapping.h
index 36c0009dbece..5a61b5c2e18f 100644
--- a/arch/ia64/include/asm/dma-mapping.h
+++ b/arch/ia64/include/asm/dma-mapping.h
@@ -8,6 +8,7 @@
8#include <asm/machvec.h> 8#include <asm/machvec.h>
9#include <linux/scatterlist.h> 9#include <linux/scatterlist.h>
10#include <asm/swiotlb.h> 10#include <asm/swiotlb.h>
11#include <linux/dma-debug.h>
11 12
12#define ARCH_HAS_DMA_GET_REQUIRED_MASK 13#define ARCH_HAS_DMA_GET_REQUIRED_MASK
13 14
@@ -24,95 +25,28 @@ static inline void *dma_alloc_coherent(struct device *dev, size_t size,
24 dma_addr_t *daddr, gfp_t gfp) 25 dma_addr_t *daddr, gfp_t gfp)
25{ 26{
26 struct dma_map_ops *ops = platform_dma_get_ops(dev); 27 struct dma_map_ops *ops = platform_dma_get_ops(dev);
27 return ops->alloc_coherent(dev, size, daddr, gfp); 28 void *caddr;
29
30 caddr = ops->alloc_coherent(dev, size, daddr, gfp);
31 debug_dma_alloc_coherent(dev, size, *daddr, caddr);
32 return caddr;
28} 33}
29 34
30static inline void dma_free_coherent(struct device *dev, size_t size, 35static inline void dma_free_coherent(struct device *dev, size_t size,
31 void *caddr, dma_addr_t daddr) 36 void *caddr, dma_addr_t daddr)
32{ 37{
33 struct dma_map_ops *ops = platform_dma_get_ops(dev); 38 struct dma_map_ops *ops = platform_dma_get_ops(dev);
39 debug_dma_free_coherent(dev, size, caddr, daddr);
34 ops->free_coherent(dev, size, caddr, daddr); 40 ops->free_coherent(dev, size, caddr, daddr);
35} 41}
36 42
37#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) 43#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
38#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) 44#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
39 45
40static inline dma_addr_t dma_map_single_attrs(struct device *dev, 46#define get_dma_ops(dev) platform_dma_get_ops(dev)
41 void *caddr, size_t size, 47#define flush_write_buffers()
42 enum dma_data_direction dir,
43 struct dma_attrs *attrs)
44{
45 struct dma_map_ops *ops = platform_dma_get_ops(dev);
46 return ops->map_page(dev, virt_to_page(caddr),
47 (unsigned long)caddr & ~PAGE_MASK, size,
48 dir, attrs);
49}
50
51static inline void dma_unmap_single_attrs(struct device *dev, dma_addr_t daddr,
52 size_t size,
53 enum dma_data_direction dir,
54 struct dma_attrs *attrs)
55{
56 struct dma_map_ops *ops = platform_dma_get_ops(dev);
57 ops->unmap_page(dev, daddr, size, dir, attrs);
58}
59
60#define dma_map_single(d, a, s, r) dma_map_single_attrs(d, a, s, r, NULL)
61#define dma_unmap_single(d, a, s, r) dma_unmap_single_attrs(d, a, s, r, NULL)
62
63static inline int dma_map_sg_attrs(struct device *dev, struct scatterlist *sgl,
64 int nents, enum dma_data_direction dir,
65 struct dma_attrs *attrs)
66{
67 struct dma_map_ops *ops = platform_dma_get_ops(dev);
68 return ops->map_sg(dev, sgl, nents, dir, attrs);
69}
70
71static inline void dma_unmap_sg_attrs(struct device *dev,
72 struct scatterlist *sgl, int nents,
73 enum dma_data_direction dir,
74 struct dma_attrs *attrs)
75{
76 struct dma_map_ops *ops = platform_dma_get_ops(dev);
77 ops->unmap_sg(dev, sgl, nents, dir, attrs);
78}
79
80#define dma_map_sg(d, s, n, r) dma_map_sg_attrs(d, s, n, r, NULL)
81#define dma_unmap_sg(d, s, n, r) dma_unmap_sg_attrs(d, s, n, r, NULL)
82
83static inline void dma_sync_single_for_cpu(struct device *dev, dma_addr_t daddr,
84 size_t size,
85 enum dma_data_direction dir)
86{
87 struct dma_map_ops *ops = platform_dma_get_ops(dev);
88 ops->sync_single_for_cpu(dev, daddr, size, dir);
89}
90
91static inline void dma_sync_sg_for_cpu(struct device *dev,
92 struct scatterlist *sgl,
93 int nents, enum dma_data_direction dir)
94{
95 struct dma_map_ops *ops = platform_dma_get_ops(dev);
96 ops->sync_sg_for_cpu(dev, sgl, nents, dir);
97}
98 48
99static inline void dma_sync_single_for_device(struct device *dev, 49#include <asm-generic/dma-mapping-common.h>
100 dma_addr_t daddr,
101 size_t size,
102 enum dma_data_direction dir)
103{
104 struct dma_map_ops *ops = platform_dma_get_ops(dev);
105 ops->sync_single_for_device(dev, daddr, size, dir);
106}
107
108static inline void dma_sync_sg_for_device(struct device *dev,
109 struct scatterlist *sgl,
110 int nents,
111 enum dma_data_direction dir)
112{
113 struct dma_map_ops *ops = platform_dma_get_ops(dev);
114 ops->sync_sg_for_device(dev, sgl, nents, dir);
115}
116 50
117static inline int dma_mapping_error(struct device *dev, dma_addr_t daddr) 51static inline int dma_mapping_error(struct device *dev, dma_addr_t daddr)
118{ 52{
@@ -120,30 +54,6 @@ static inline int dma_mapping_error(struct device *dev, dma_addr_t daddr)
120 return ops->mapping_error(dev, daddr); 54 return ops->mapping_error(dev, daddr);
121} 55}
122 56
123static inline dma_addr_t dma_map_page(struct device *dev, struct page *page,
124 size_t offset, size_t size,
125 enum dma_data_direction dir)
126{
127 struct dma_map_ops *ops = platform_dma_get_ops(dev);
128 return ops->map_page(dev, page, offset, size, dir, NULL);
129}
130
131static inline void dma_unmap_page(struct device *dev, dma_addr_t addr,
132 size_t size, enum dma_data_direction dir)
133{
134 dma_unmap_single(dev, addr, size, dir);
135}
136
137/*
138 * Rest of this file is part of the "Advanced DMA API". Use at your own risk.
139 * See Documentation/DMA-API.txt for details.
140 */
141
142#define dma_sync_single_range_for_cpu(dev, dma_handle, offset, size, dir) \
143 dma_sync_single_for_cpu(dev, dma_handle, size, dir)
144#define dma_sync_single_range_for_device(dev, dma_handle, offset, size, dir) \
145 dma_sync_single_for_device(dev, dma_handle, size, dir)
146
147static inline int dma_supported(struct device *dev, u64 mask) 57static inline int dma_supported(struct device *dev, u64 mask)
148{ 58{
149 struct dma_map_ops *ops = platform_dma_get_ops(dev); 59 struct dma_map_ops *ops = platform_dma_get_ops(dev);
diff --git a/arch/ia64/include/asm/fpu.h b/arch/ia64/include/asm/fpu.h
index 0c26157cffa5..b6395ad1500a 100644
--- a/arch/ia64/include/asm/fpu.h
+++ b/arch/ia64/include/asm/fpu.h
@@ -6,6 +6,8 @@
6 * David Mosberger-Tang <davidm@hpl.hp.com> 6 * David Mosberger-Tang <davidm@hpl.hp.com>
7 */ 7 */
8 8
9#include <linux/types.h>
10
9/* floating point status register: */ 11/* floating point status register: */
10#define FPSR_TRAP_VD (1 << 0) /* invalid op trap disabled */ 12#define FPSR_TRAP_VD (1 << 0) /* invalid op trap disabled */
11#define FPSR_TRAP_DD (1 << 1) /* denormal trap disabled */ 13#define FPSR_TRAP_DD (1 << 1) /* denormal trap disabled */
diff --git a/arch/ia64/include/asm/gcc_intrin.h b/arch/ia64/include/asm/gcc_intrin.h
index c2c5fd8fcac4..21ddee54adae 100644
--- a/arch/ia64/include/asm/gcc_intrin.h
+++ b/arch/ia64/include/asm/gcc_intrin.h
@@ -388,7 +388,7 @@ register unsigned long ia64_r13 asm ("r13") __used;
388 388
389#define ia64_native_thash(addr) \ 389#define ia64_native_thash(addr) \
390({ \ 390({ \
391 __u64 ia64_intri_res; \ 391 unsigned long ia64_intri_res; \
392 asm volatile ("thash %0=%1" : "=r"(ia64_intri_res) : "r" (addr)); \ 392 asm volatile ("thash %0=%1" : "=r"(ia64_intri_res) : "r" (addr)); \
393 ia64_intri_res; \ 393 ia64_intri_res; \
394}) 394})
@@ -419,7 +419,7 @@ register unsigned long ia64_r13 asm ("r13") __used;
419 419
420#define ia64_tpa(addr) \ 420#define ia64_tpa(addr) \
421({ \ 421({ \
422 __u64 ia64_pa; \ 422 unsigned long ia64_pa; \
423 asm volatile ("tpa %0 = %1" : "=r"(ia64_pa) : "r"(addr) : "memory"); \ 423 asm volatile ("tpa %0 = %1" : "=r"(ia64_pa) : "r"(addr) : "memory"); \
424 ia64_pa; \ 424 ia64_pa; \
425}) 425})
@@ -444,35 +444,35 @@ register unsigned long ia64_r13 asm ("r13") __used;
444 444
445#define ia64_native_get_cpuid(index) \ 445#define ia64_native_get_cpuid(index) \
446({ \ 446({ \
447 __u64 ia64_intri_res; \ 447 unsigned long ia64_intri_res; \
448 asm volatile ("mov %0=cpuid[%r1]" : "=r"(ia64_intri_res) : "rO"(index)); \ 448 asm volatile ("mov %0=cpuid[%r1]" : "=r"(ia64_intri_res) : "rO"(index)); \
449 ia64_intri_res; \ 449 ia64_intri_res; \
450}) 450})
451 451
452#define __ia64_get_dbr(index) \ 452#define __ia64_get_dbr(index) \
453({ \ 453({ \
454 __u64 ia64_intri_res; \ 454 unsigned long ia64_intri_res; \
455 asm volatile ("mov %0=dbr[%1]" : "=r"(ia64_intri_res) : "r"(index)); \ 455 asm volatile ("mov %0=dbr[%1]" : "=r"(ia64_intri_res) : "r"(index)); \
456 ia64_intri_res; \ 456 ia64_intri_res; \
457}) 457})
458 458
459#define ia64_get_ibr(index) \ 459#define ia64_get_ibr(index) \
460({ \ 460({ \
461 __u64 ia64_intri_res; \ 461 unsigned long ia64_intri_res; \
462 asm volatile ("mov %0=ibr[%1]" : "=r"(ia64_intri_res) : "r"(index)); \ 462 asm volatile ("mov %0=ibr[%1]" : "=r"(ia64_intri_res) : "r"(index)); \
463 ia64_intri_res; \ 463 ia64_intri_res; \
464}) 464})
465 465
466#define ia64_get_pkr(index) \ 466#define ia64_get_pkr(index) \
467({ \ 467({ \
468 __u64 ia64_intri_res; \ 468 unsigned long ia64_intri_res; \
469 asm volatile ("mov %0=pkr[%1]" : "=r"(ia64_intri_res) : "r"(index)); \ 469 asm volatile ("mov %0=pkr[%1]" : "=r"(ia64_intri_res) : "r"(index)); \
470 ia64_intri_res; \ 470 ia64_intri_res; \
471}) 471})
472 472
473#define ia64_get_pmc(index) \ 473#define ia64_get_pmc(index) \
474({ \ 474({ \
475 __u64 ia64_intri_res; \ 475 unsigned long ia64_intri_res; \
476 asm volatile ("mov %0=pmc[%1]" : "=r"(ia64_intri_res) : "r"(index)); \ 476 asm volatile ("mov %0=pmc[%1]" : "=r"(ia64_intri_res) : "r"(index)); \
477 ia64_intri_res; \ 477 ia64_intri_res; \
478}) 478})
@@ -480,14 +480,14 @@ register unsigned long ia64_r13 asm ("r13") __used;
480 480
481#define ia64_native_get_pmd(index) \ 481#define ia64_native_get_pmd(index) \
482({ \ 482({ \
483 __u64 ia64_intri_res; \ 483 unsigned long ia64_intri_res; \
484 asm volatile ("mov %0=pmd[%1]" : "=r"(ia64_intri_res) : "r"(index)); \ 484 asm volatile ("mov %0=pmd[%1]" : "=r"(ia64_intri_res) : "r"(index)); \
485 ia64_intri_res; \ 485 ia64_intri_res; \
486}) 486})
487 487
488#define ia64_native_get_rr(index) \ 488#define ia64_native_get_rr(index) \
489({ \ 489({ \
490 __u64 ia64_intri_res; \ 490 unsigned long ia64_intri_res; \
491 asm volatile ("mov %0=rr[%1]" : "=r"(ia64_intri_res) : "r" (index)); \ 491 asm volatile ("mov %0=rr[%1]" : "=r"(ia64_intri_res) : "r" (index)); \
492 ia64_intri_res; \ 492 ia64_intri_res; \
493}) 493})
diff --git a/arch/ia64/include/asm/hw_irq.h b/arch/ia64/include/asm/hw_irq.h
index 5c99cbcb8a0d..91619b31dbf5 100644
--- a/arch/ia64/include/asm/hw_irq.h
+++ b/arch/ia64/include/asm/hw_irq.h
@@ -106,7 +106,7 @@ extern struct irq_cfg irq_cfg[NR_IRQS];
106#define irq_to_domain(x) irq_cfg[(x)].domain 106#define irq_to_domain(x) irq_cfg[(x)].domain
107DECLARE_PER_CPU(int[IA64_NUM_VECTORS], vector_irq); 107DECLARE_PER_CPU(int[IA64_NUM_VECTORS], vector_irq);
108 108
109extern struct hw_interrupt_type irq_type_ia64_lsapic; /* CPU-internal interrupt controller */ 109extern struct irq_chip irq_type_ia64_lsapic; /* CPU-internal interrupt controller */
110 110
111#ifdef CONFIG_PARAVIRT_GUEST 111#ifdef CONFIG_PARAVIRT_GUEST
112#include <asm/paravirt.h> 112#include <asm/paravirt.h>
@@ -146,7 +146,7 @@ static inline void ia64_native_resend_irq(unsigned int vector)
146 * Default implementations for the irq-descriptor API: 146 * Default implementations for the irq-descriptor API:
147 */ 147 */
148 148
149extern irq_desc_t irq_desc[NR_IRQS]; 149extern struct irq_desc irq_desc[NR_IRQS];
150 150
151#ifndef CONFIG_IA64_GENERIC 151#ifndef CONFIG_IA64_GENERIC
152static inline ia64_vector __ia64_irq_to_vector(int irq) 152static inline ia64_vector __ia64_irq_to_vector(int irq)
diff --git a/arch/ia64/include/asm/iommu.h b/arch/ia64/include/asm/iommu.h
index 0490794fe4aa..745e095fe82e 100644
--- a/arch/ia64/include/asm/iommu.h
+++ b/arch/ia64/include/asm/iommu.h
@@ -9,6 +9,11 @@ extern void pci_iommu_shutdown(void);
9extern void no_iommu_init(void); 9extern void no_iommu_init(void);
10extern int force_iommu, no_iommu; 10extern int force_iommu, no_iommu;
11extern int iommu_detected; 11extern int iommu_detected;
12#ifdef CONFIG_DMAR
13extern int iommu_pass_through;
14#else
15#define iommu_pass_through (0)
16#endif
12extern void iommu_dma_init(void); 17extern void iommu_dma_init(void);
13extern void machvec_init(const char *name); 18extern void machvec_init(const char *name);
14 19
diff --git a/arch/ia64/include/asm/mca.h b/arch/ia64/include/asm/mca.h
index 18a4321349a3..44a0b53df900 100644
--- a/arch/ia64/include/asm/mca.h
+++ b/arch/ia64/include/asm/mca.h
@@ -72,39 +72,39 @@ typedef struct ia64_mc_info_s {
72struct ia64_sal_os_state { 72struct ia64_sal_os_state {
73 73
74 /* SAL to OS */ 74 /* SAL to OS */
75 u64 os_gp; /* GP of the os registered with the SAL, physical */ 75 unsigned long os_gp; /* GP of the os registered with the SAL, physical */
76 u64 pal_proc; /* PAL_PROC entry point, physical */ 76 unsigned long pal_proc; /* PAL_PROC entry point, physical */
77 u64 sal_proc; /* SAL_PROC entry point, physical */ 77 unsigned long sal_proc; /* SAL_PROC entry point, physical */
78 u64 rv_rc; /* MCA - Rendezvous state, INIT - reason code */ 78 unsigned long rv_rc; /* MCA - Rendezvous state, INIT - reason code */
79 u64 proc_state_param; /* from R18 */ 79 unsigned long proc_state_param; /* from R18 */
80 u64 monarch; /* 1 for a monarch event, 0 for a slave */ 80 unsigned long monarch; /* 1 for a monarch event, 0 for a slave */
81 81
82 /* common */ 82 /* common */
83 u64 sal_ra; /* Return address in SAL, physical */ 83 unsigned long sal_ra; /* Return address in SAL, physical */
84 u64 sal_gp; /* GP of the SAL - physical */ 84 unsigned long sal_gp; /* GP of the SAL - physical */
85 pal_min_state_area_t *pal_min_state; /* from R17. physical in asm, virtual in C */ 85 pal_min_state_area_t *pal_min_state; /* from R17. physical in asm, virtual in C */
86 /* Previous values of IA64_KR(CURRENT) and IA64_KR(CURRENT_STACK). 86 /* Previous values of IA64_KR(CURRENT) and IA64_KR(CURRENT_STACK).
87 * Note: if the MCA/INIT recovery code wants to resume to a new context 87 * Note: if the MCA/INIT recovery code wants to resume to a new context
88 * then it must change these values to reflect the new kernel stack. 88 * then it must change these values to reflect the new kernel stack.
89 */ 89 */
90 u64 prev_IA64_KR_CURRENT; /* previous value of IA64_KR(CURRENT) */ 90 unsigned long prev_IA64_KR_CURRENT; /* previous value of IA64_KR(CURRENT) */
91 u64 prev_IA64_KR_CURRENT_STACK; 91 unsigned long prev_IA64_KR_CURRENT_STACK;
92 struct task_struct *prev_task; /* previous task, NULL if it is not useful */ 92 struct task_struct *prev_task; /* previous task, NULL if it is not useful */
93 /* Some interrupt registers are not saved in minstate, pt_regs or 93 /* Some interrupt registers are not saved in minstate, pt_regs or
94 * switch_stack. Because MCA/INIT can occur when interrupts are 94 * switch_stack. Because MCA/INIT can occur when interrupts are
95 * disabled, we need to save the additional interrupt registers over 95 * disabled, we need to save the additional interrupt registers over
96 * MCA/INIT and resume. 96 * MCA/INIT and resume.
97 */ 97 */
98 u64 isr; 98 unsigned long isr;
99 u64 ifa; 99 unsigned long ifa;
100 u64 itir; 100 unsigned long itir;
101 u64 iipa; 101 unsigned long iipa;
102 u64 iim; 102 unsigned long iim;
103 u64 iha; 103 unsigned long iha;
104 104
105 /* OS to SAL */ 105 /* OS to SAL */
106 u64 os_status; /* OS status to SAL, enum below */ 106 unsigned long os_status; /* OS status to SAL, enum below */
107 u64 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}; 109};
110 110
@@ -150,7 +150,7 @@ extern void ia64_slave_init_handler(void);
150extern void ia64_mca_cmc_vector_setup(void); 150extern void ia64_mca_cmc_vector_setup(void);
151extern int ia64_reg_MCA_extension(int (*fn)(void *, struct ia64_sal_os_state *)); 151extern int ia64_reg_MCA_extension(int (*fn)(void *, struct ia64_sal_os_state *));
152extern void ia64_unreg_MCA_extension(void); 152extern void ia64_unreg_MCA_extension(void);
153extern u64 ia64_get_rnat(u64 *); 153extern unsigned long ia64_get_rnat(unsigned long *);
154extern void ia64_mca_printk(const char * fmt, ...) 154extern void ia64_mca_printk(const char * fmt, ...)
155 __attribute__ ((format (printf, 1, 2))); 155 __attribute__ ((format (printf, 1, 2)));
156 156
diff --git a/arch/ia64/include/asm/meminit.h b/arch/ia64/include/asm/meminit.h
index c0cea375620a..688a812c017d 100644
--- a/arch/ia64/include/asm/meminit.h
+++ b/arch/ia64/include/asm/meminit.h
@@ -25,8 +25,8 @@
25#define IA64_MAX_RSVD_REGIONS 9 25#define IA64_MAX_RSVD_REGIONS 9
26 26
27struct rsvd_region { 27struct rsvd_region {
28 unsigned long start; /* virtual address of beginning of element */ 28 u64 start; /* virtual address of beginning of element */
29 unsigned long end; /* virtual address of end of element + 1 */ 29 u64 end; /* virtual address of end of element + 1 */
30}; 30};
31 31
32extern struct rsvd_region rsvd_region[IA64_MAX_RSVD_REGIONS + 1]; 32extern struct rsvd_region rsvd_region[IA64_MAX_RSVD_REGIONS + 1];
@@ -35,13 +35,13 @@ extern int num_rsvd_regions;
35extern void find_memory (void); 35extern void find_memory (void);
36extern void reserve_memory (void); 36extern void reserve_memory (void);
37extern void find_initrd (void); 37extern void find_initrd (void);
38extern int filter_rsvd_memory (unsigned long start, unsigned long end, void *arg); 38extern int filter_rsvd_memory (u64 start, u64 end, void *arg);
39extern int filter_memory (unsigned long start, unsigned long end, void *arg); 39extern int filter_memory (u64 start, u64 end, void *arg);
40extern unsigned long efi_memmap_init(unsigned long *s, unsigned long *e); 40extern unsigned long efi_memmap_init(u64 *s, u64 *e);
41extern int find_max_min_low_pfn (unsigned long , unsigned long, void *); 41extern int find_max_min_low_pfn (u64, u64, void *);
42 42
43extern unsigned long vmcore_find_descriptor_size(unsigned long address); 43extern unsigned long vmcore_find_descriptor_size(unsigned long address);
44extern int reserve_elfcorehdr(unsigned long *start, unsigned long *end); 44extern int reserve_elfcorehdr(u64 *start, u64 *end);
45 45
46/* 46/*
47 * For rounding an address to the next IA64_GRANULE_SIZE or order 47 * For rounding an address to the next IA64_GRANULE_SIZE or order
@@ -63,8 +63,8 @@ extern int register_active_ranges(u64 start, u64 len, int nid);
63# define LARGE_GAP 0x40000000 /* Use virtual mem map if hole is > than this */ 63# define LARGE_GAP 0x40000000 /* Use virtual mem map if hole is > than this */
64 extern unsigned long vmalloc_end; 64 extern unsigned long vmalloc_end;
65 extern struct page *vmem_map; 65 extern struct page *vmem_map;
66 extern int find_largest_hole (u64 start, u64 end, void *arg); 66 extern int find_largest_hole(u64 start, u64 end, void *arg);
67 extern int create_mem_map_page_table (u64 start, u64 end, void *arg); 67 extern int create_mem_map_page_table(u64 start, u64 end, void *arg);
68 extern int vmemmap_find_next_valid_pfn(int, int); 68 extern int vmemmap_find_next_valid_pfn(int, int);
69#else 69#else
70static inline int vmemmap_find_next_valid_pfn(int node, int i) 70static inline int vmemmap_find_next_valid_pfn(int node, int i)
diff --git a/arch/ia64/include/asm/pal.h b/arch/ia64/include/asm/pal.h
index 67b02901ead4..6a292505b396 100644
--- a/arch/ia64/include/asm/pal.h
+++ b/arch/ia64/include/asm/pal.h
@@ -989,8 +989,8 @@ ia64_pal_cache_read (pal_cache_line_id_u_t line_id, u64 physical_addr)
989} 989}
990 990
991/* Return summary information about the hierarchy of caches controlled by the processor */ 991/* Return summary information about the hierarchy of caches controlled by the processor */
992static inline s64 992static inline long ia64_pal_cache_summary(unsigned long *cache_levels,
993ia64_pal_cache_summary (u64 *cache_levels, u64 *unique_caches) 993 unsigned long *unique_caches)
994{ 994{
995 struct ia64_pal_retval iprv; 995 struct ia64_pal_retval iprv;
996 PAL_CALL(iprv, PAL_CACHE_SUMMARY, 0, 0, 0); 996 PAL_CALL(iprv, PAL_CACHE_SUMMARY, 0, 0, 0);
@@ -1038,8 +1038,8 @@ ia64_pal_copy_pal (u64 target_addr, u64 alloc_size, u64 processor, u64 *pal_proc
1038} 1038}
1039 1039
1040/* Return the number of instruction and data debug register pairs */ 1040/* Return the number of instruction and data debug register pairs */
1041static inline s64 1041static inline long ia64_pal_debug_info(unsigned long *inst_regs,
1042ia64_pal_debug_info (u64 *inst_regs, u64 *data_regs) 1042 unsigned long *data_regs)
1043{ 1043{
1044 struct ia64_pal_retval iprv; 1044 struct ia64_pal_retval iprv;
1045 PAL_CALL(iprv, PAL_DEBUG_INFO, 0, 0, 0); 1045 PAL_CALL(iprv, PAL_DEBUG_INFO, 0, 0, 0);
@@ -1074,8 +1074,7 @@ ia64_pal_fixed_addr (u64 *global_unique_addr)
1074} 1074}
1075 1075
1076/* Get base frequency of the platform if generated by the processor */ 1076/* Get base frequency of the platform if generated by the processor */
1077static inline s64 1077static inline long ia64_pal_freq_base(unsigned long *platform_base_freq)
1078ia64_pal_freq_base (u64 *platform_base_freq)
1079{ 1078{
1080 struct ia64_pal_retval iprv; 1079 struct ia64_pal_retval iprv;
1081 PAL_CALL(iprv, PAL_FREQ_BASE, 0, 0, 0); 1080 PAL_CALL(iprv, PAL_FREQ_BASE, 0, 0, 0);
@@ -1437,7 +1436,7 @@ ia64_pal_proc_set_features (u64 feature_select)
1437 * possible. 1436 * possible.
1438 */ 1437 */
1439typedef struct ia64_ptce_info_s { 1438typedef struct ia64_ptce_info_s {
1440 u64 base; 1439 unsigned long base;
1441 u32 count[2]; 1440 u32 count[2];
1442 u32 stride[2]; 1441 u32 stride[2];
1443} ia64_ptce_info_t; 1442} ia64_ptce_info_t;
@@ -1478,9 +1477,9 @@ ia64_pal_register_info (u64 info_request, u64 *reg_info_1, u64 *reg_info_2)
1478} 1477}
1479 1478
1480typedef union pal_hints_u { 1479typedef union pal_hints_u {
1481 u64 ph_data; 1480 unsigned long ph_data;
1482 struct { 1481 struct {
1483 u64 si : 1, 1482 unsigned long si : 1,
1484 li : 1, 1483 li : 1,
1485 reserved : 62; 1484 reserved : 62;
1486 } pal_hints_s; 1485 } pal_hints_s;
@@ -1489,8 +1488,8 @@ typedef union pal_hints_u {
1489/* Return information about the register stack and RSE for this processor 1488/* Return information about the register stack and RSE for this processor
1490 * implementation. 1489 * implementation.
1491 */ 1490 */
1492static inline s64 1491static inline long ia64_pal_rse_info(unsigned long *num_phys_stacked,
1493ia64_pal_rse_info (u64 *num_phys_stacked, pal_hints_u_t *hints) 1492 pal_hints_u_t *hints)
1494{ 1493{
1495 struct ia64_pal_retval iprv; 1494 struct ia64_pal_retval iprv;
1496 PAL_CALL(iprv, PAL_RSE_INFO, 0, 0, 0); 1495 PAL_CALL(iprv, PAL_RSE_INFO, 0, 0, 0);
@@ -1608,8 +1607,7 @@ ia64_pal_vm_info (u64 tc_level, u64 tc_type, pal_tc_info_u_t *tc_info, u64 *tc_
1608/* Get page size information about the virtual memory characteristics of the processor 1607/* Get page size information about the virtual memory characteristics of the processor
1609 * implementation. 1608 * implementation.
1610 */ 1609 */
1611static inline s64 1610static inline s64 ia64_pal_vm_page_size(u64 *tr_pages, u64 *vw_pages)
1612ia64_pal_vm_page_size (u64 *tr_pages, u64 *vw_pages)
1613{ 1611{
1614 struct ia64_pal_retval iprv; 1612 struct ia64_pal_retval iprv;
1615 PAL_CALL(iprv, PAL_VM_PAGE_SIZE, 0, 0, 0); 1613 PAL_CALL(iprv, PAL_VM_PAGE_SIZE, 0, 0, 0);
diff --git a/arch/ia64/include/asm/pci.h b/arch/ia64/include/asm/pci.h
index 1d660d89db0d..fcfca56bb850 100644
--- a/arch/ia64/include/asm/pci.h
+++ b/arch/ia64/include/asm/pci.h
@@ -135,19 +135,6 @@ extern void pcibios_resource_to_bus(struct pci_dev *dev,
135extern void pcibios_bus_to_resource(struct pci_dev *dev, 135extern void pcibios_bus_to_resource(struct pci_dev *dev,
136 struct resource *res, struct pci_bus_region *region); 136 struct resource *res, struct pci_bus_region *region);
137 137
138static inline struct resource *
139pcibios_select_root(struct pci_dev *pdev, struct resource *res)
140{
141 struct resource *root = NULL;
142
143 if (res->flags & IORESOURCE_IO)
144 root = &ioport_resource;
145 if (res->flags & IORESOURCE_MEM)
146 root = &iomem_resource;
147
148 return root;
149}
150
151#define pcibios_scan_all_fns(a, b) 0 138#define pcibios_scan_all_fns(a, b) 0
152 139
153#define HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ 140#define HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ
diff --git a/arch/ia64/include/asm/pgalloc.h b/arch/ia64/include/asm/pgalloc.h
index b9ac1a6fc216..96a8d927db28 100644
--- a/arch/ia64/include/asm/pgalloc.h
+++ b/arch/ia64/include/asm/pgalloc.h
@@ -48,7 +48,7 @@ static inline void pud_free(struct mm_struct *mm, pud_t *pud)
48{ 48{
49 quicklist_free(0, NULL, pud); 49 quicklist_free(0, NULL, pud);
50} 50}
51#define __pud_free_tlb(tlb, pud) pud_free((tlb)->mm, pud) 51#define __pud_free_tlb(tlb, pud, address) pud_free((tlb)->mm, pud)
52#endif /* CONFIG_PGTABLE_4 */ 52#endif /* CONFIG_PGTABLE_4 */
53 53
54static inline void 54static inline void
@@ -67,7 +67,7 @@ static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
67 quicklist_free(0, NULL, pmd); 67 quicklist_free(0, NULL, pmd);
68} 68}
69 69
70#define __pmd_free_tlb(tlb, pmd) pmd_free((tlb)->mm, pmd) 70#define __pmd_free_tlb(tlb, pmd, address) pmd_free((tlb)->mm, pmd)
71 71
72static inline void 72static inline void
73pmd_populate(struct mm_struct *mm, pmd_t * pmd_entry, pgtable_t pte) 73pmd_populate(struct mm_struct *mm, pmd_t * pmd_entry, pgtable_t pte)
@@ -117,6 +117,6 @@ static inline void check_pgt_cache(void)
117 quicklist_trim(0, NULL, 25, 16); 117 quicklist_trim(0, NULL, 25, 16);
118} 118}
119 119
120#define __pte_free_tlb(tlb, pte) pte_free((tlb)->mm, pte) 120#define __pte_free_tlb(tlb, pte, address) pte_free((tlb)->mm, pte)
121 121
122#endif /* _ASM_IA64_PGALLOC_H */ 122#endif /* _ASM_IA64_PGALLOC_H */
diff --git a/arch/ia64/include/asm/pgtable.h b/arch/ia64/include/asm/pgtable.h
index 0a9cc73d35c7..8840a690d1e7 100644
--- a/arch/ia64/include/asm/pgtable.h
+++ b/arch/ia64/include/asm/pgtable.h
@@ -155,7 +155,6 @@
155#include <linux/bitops.h> 155#include <linux/bitops.h>
156#include <asm/cacheflush.h> 156#include <asm/cacheflush.h>
157#include <asm/mmu_context.h> 157#include <asm/mmu_context.h>
158#include <asm/processor.h>
159 158
160/* 159/*
161 * Next come the mappings that determine how mmap() protection bits 160 * Next come the mappings that determine how mmap() protection bits
diff --git a/arch/ia64/include/asm/processor.h b/arch/ia64/include/asm/processor.h
index f88fa054d01d..3eaeedf1aef2 100644
--- a/arch/ia64/include/asm/processor.h
+++ b/arch/ia64/include/asm/processor.h
@@ -187,40 +187,40 @@ union ia64_rr {
187 * state comes earlier: 187 * state comes earlier:
188 */ 188 */
189struct cpuinfo_ia64 { 189struct cpuinfo_ia64 {
190 __u32 softirq_pending; 190 unsigned int softirq_pending;
191 __u64 itm_delta; /* # of clock cycles between clock ticks */ 191 unsigned long itm_delta; /* # of clock cycles between clock ticks */
192 __u64 itm_next; /* interval timer mask value to use for next clock tick */ 192 unsigned long itm_next; /* interval timer mask value to use for next clock tick */
193 __u64 nsec_per_cyc; /* (1000000000<<IA64_NSEC_PER_CYC_SHIFT)/itc_freq */ 193 unsigned long nsec_per_cyc; /* (1000000000<<IA64_NSEC_PER_CYC_SHIFT)/itc_freq */
194 __u64 unimpl_va_mask; /* mask of unimplemented virtual address bits (from PAL) */ 194 unsigned long unimpl_va_mask; /* mask of unimplemented virtual address bits (from PAL) */
195 __u64 unimpl_pa_mask; /* mask of unimplemented physical address bits (from PAL) */ 195 unsigned long unimpl_pa_mask; /* mask of unimplemented physical address bits (from PAL) */
196 __u64 itc_freq; /* frequency of ITC counter */ 196 unsigned long itc_freq; /* frequency of ITC counter */
197 __u64 proc_freq; /* frequency of processor */ 197 unsigned long proc_freq; /* frequency of processor */
198 __u64 cyc_per_usec; /* itc_freq/1000000 */ 198 unsigned long cyc_per_usec; /* itc_freq/1000000 */
199 __u64 ptce_base; 199 unsigned long ptce_base;
200 __u32 ptce_count[2]; 200 unsigned int ptce_count[2];
201 __u32 ptce_stride[2]; 201 unsigned int ptce_stride[2];
202 struct task_struct *ksoftirqd; /* kernel softirq daemon for this CPU */ 202 struct task_struct *ksoftirqd; /* kernel softirq daemon for this CPU */
203 203
204#ifdef CONFIG_SMP 204#ifdef CONFIG_SMP
205 __u64 loops_per_jiffy; 205 unsigned long loops_per_jiffy;
206 int cpu; 206 int cpu;
207 __u32 socket_id; /* physical processor socket id */ 207 unsigned int socket_id; /* physical processor socket id */
208 __u16 core_id; /* core id */ 208 unsigned short core_id; /* core id */
209 __u16 thread_id; /* thread id */ 209 unsigned short thread_id; /* thread id */
210 __u16 num_log; /* Total number of logical processors on 210 unsigned short num_log; /* Total number of logical processors on
211 * this socket that were successfully booted */ 211 * this socket that were successfully booted */
212 __u8 cores_per_socket; /* Cores per processor socket */ 212 unsigned char cores_per_socket; /* Cores per processor socket */
213 __u8 threads_per_core; /* Threads per core */ 213 unsigned char threads_per_core; /* Threads per core */
214#endif 214#endif
215 215
216 /* CPUID-derived information: */ 216 /* CPUID-derived information: */
217 __u64 ppn; 217 unsigned long ppn;
218 __u64 features; 218 unsigned long features;
219 __u8 number; 219 unsigned char number;
220 __u8 revision; 220 unsigned char revision;
221 __u8 model; 221 unsigned char model;
222 __u8 family; 222 unsigned char family;
223 __u8 archrev; 223 unsigned char archrev;
224 char vendor[16]; 224 char vendor[16];
225 char *model_name; 225 char *model_name;
226 226
@@ -329,8 +329,8 @@ struct thread_struct {
329#else 329#else
330# define INIT_THREAD_PM 330# define INIT_THREAD_PM
331#endif 331#endif
332 __u64 dbr[IA64_NUM_DBG_REGS]; 332 unsigned long dbr[IA64_NUM_DBG_REGS];
333 __u64 ibr[IA64_NUM_DBG_REGS]; 333 unsigned long ibr[IA64_NUM_DBG_REGS];
334 struct ia64_fpreg fph[96]; /* saved/loaded on demand */ 334 struct ia64_fpreg fph[96]; /* saved/loaded on demand */
335}; 335};
336 336
diff --git a/arch/ia64/include/asm/sal.h b/arch/ia64/include/asm/sal.h
index 966797a97c94..d19ddba4e327 100644
--- a/arch/ia64/include/asm/sal.h
+++ b/arch/ia64/include/asm/sal.h
@@ -106,10 +106,10 @@ struct ia64_sal_retval {
106 * informational value should be printed (e.g., "reboot for 106 * informational value should be printed (e.g., "reboot for
107 * change to take effect"). 107 * change to take effect").
108 */ 108 */
109 s64 status; 109 long status;
110 u64 v0; 110 unsigned long v0;
111 u64 v1; 111 unsigned long v1;
112 u64 v2; 112 unsigned long v2;
113}; 113};
114 114
115typedef struct ia64_sal_retval (*ia64_sal_handler) (u64, ...); 115typedef struct ia64_sal_retval (*ia64_sal_handler) (u64, ...);
diff --git a/arch/ia64/include/asm/sn/sn_sal.h b/arch/ia64/include/asm/sn/sn_sal.h
index e310fc0135dc..1f5ff470a5a1 100644
--- a/arch/ia64/include/asm/sn/sn_sal.h
+++ b/arch/ia64/include/asm/sn/sn_sal.h
@@ -929,7 +929,7 @@ ia64_sn_sysctl_tio_clock_reset(nasid_t nasid)
929/* 929/*
930 * Get the associated ioboard type for a given nasid. 930 * Get the associated ioboard type for a given nasid.
931 */ 931 */
932static inline s64 932static inline long
933ia64_sn_sysctl_ioboard_get(nasid_t nasid, u16 *ioboard) 933ia64_sn_sysctl_ioboard_get(nasid_t nasid, u16 *ioboard)
934{ 934{
935 struct ia64_sal_retval isrv; 935 struct ia64_sal_retval isrv;
diff --git a/arch/ia64/include/asm/thread_info.h b/arch/ia64/include/asm/thread_info.h
index ae6922626bf4..8ce2e388e37c 100644
--- a/arch/ia64/include/asm/thread_info.h
+++ b/arch/ia64/include/asm/thread_info.h
@@ -48,7 +48,7 @@ struct thread_info {
48 .flags = 0, \ 48 .flags = 0, \
49 .cpu = 0, \ 49 .cpu = 0, \
50 .addr_limit = KERNEL_DS, \ 50 .addr_limit = KERNEL_DS, \
51 .preempt_count = 0, \ 51 .preempt_count = INIT_PREEMPT_COUNT, \
52 .restart_block = { \ 52 .restart_block = { \
53 .fn = do_no_restart_syscall, \ 53 .fn = do_no_restart_syscall, \
54 }, \ 54 }, \
diff --git a/arch/ia64/include/asm/tlb.h b/arch/ia64/include/asm/tlb.h
index 20d8a39680c2..85d965cb19a0 100644
--- a/arch/ia64/include/asm/tlb.h
+++ b/arch/ia64/include/asm/tlb.h
@@ -236,22 +236,22 @@ do { \
236 __tlb_remove_tlb_entry(tlb, ptep, addr); \ 236 __tlb_remove_tlb_entry(tlb, ptep, addr); \
237} while (0) 237} while (0)
238 238
239#define pte_free_tlb(tlb, ptep) \ 239#define pte_free_tlb(tlb, ptep, address) \
240do { \ 240do { \
241 tlb->need_flush = 1; \ 241 tlb->need_flush = 1; \
242 __pte_free_tlb(tlb, ptep); \ 242 __pte_free_tlb(tlb, ptep, address); \
243} while (0) 243} while (0)
244 244
245#define pmd_free_tlb(tlb, ptep) \ 245#define pmd_free_tlb(tlb, ptep, address) \
246do { \ 246do { \
247 tlb->need_flush = 1; \ 247 tlb->need_flush = 1; \
248 __pmd_free_tlb(tlb, ptep); \ 248 __pmd_free_tlb(tlb, ptep, address); \
249} while (0) 249} while (0)
250 250
251#define pud_free_tlb(tlb, pudp) \ 251#define pud_free_tlb(tlb, pudp, address) \
252do { \ 252do { \
253 tlb->need_flush = 1; \ 253 tlb->need_flush = 1; \
254 __pud_free_tlb(tlb, pudp); \ 254 __pud_free_tlb(tlb, pudp, address); \
255} while (0) 255} while (0)
256 256
257#endif /* _ASM_IA64_TLB_H */ 257#endif /* _ASM_IA64_TLB_H */
diff --git a/arch/ia64/include/asm/types.h b/arch/ia64/include/asm/types.h
index fbf1ed3b44ce..bcd260e597de 100644
--- a/arch/ia64/include/asm/types.h
+++ b/arch/ia64/include/asm/types.h
@@ -2,10 +2,11 @@
2#define _ASM_IA64_TYPES_H 2#define _ASM_IA64_TYPES_H
3 3
4/* 4/*
5 * This file is never included by application software unless explicitly requested (e.g., 5 * This file is never included by application software unless explicitly
6 * via linux/types.h) in which case the application is Linux specific so (user-) name 6 * requested (e.g., via linux/types.h) in which case the application is
7 * space pollution is not a major issue. However, for interoperability, libraries still 7 * Linux specific so (user-) name space pollution is not a major issue.
8 * need to be careful to avoid a name clashes. 8 * However, for interoperability, libraries still need to be careful to
9 * avoid naming clashes.
9 * 10 *
10 * Based on <asm-alpha/types.h>. 11 * Based on <asm-alpha/types.h>.
11 * 12 *
@@ -13,7 +14,11 @@
13 * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co 14 * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co
14 */ 15 */
15 16
17#ifdef __KERNEL__
18#include <asm-generic/int-ll64.h>
19#else
16#include <asm-generic/int-l64.h> 20#include <asm-generic/int-l64.h>
21#endif
17 22
18#ifdef __ASSEMBLY__ 23#ifdef __ASSEMBLY__
19# define __IA64_UL(x) (x) 24# define __IA64_UL(x) (x)
diff --git a/arch/ia64/include/asm/unistd.h b/arch/ia64/include/asm/unistd.h
index 10a9eb05f74d..5a5347f5c4e4 100644
--- a/arch/ia64/include/asm/unistd.h
+++ b/arch/ia64/include/asm/unistd.h
@@ -310,11 +310,12 @@
310#define __NR_inotify_init1 1318 310#define __NR_inotify_init1 1318
311#define __NR_preadv 1319 311#define __NR_preadv 1319
312#define __NR_pwritev 1320 312#define __NR_pwritev 1320
313#define __NR_rt_tgsigqueueinfo 1321
313 314
314#ifdef __KERNEL__ 315#ifdef __KERNEL__
315 316
316 317
317#define NR_syscalls 297 /* length of syscall table */ 318#define NR_syscalls 298 /* length of syscall table */
318 319
319/* 320/*
320 * The following defines stop scripts/checksyscalls.sh from complaining about 321 * The following defines stop scripts/checksyscalls.sh from complaining about
@@ -328,6 +329,7 @@
328#define __IGNORE_utime /* utimes() */ 329#define __IGNORE_utime /* utimes() */
329#define __IGNORE_getpgrp /* getpgid() */ 330#define __IGNORE_getpgrp /* getpgid() */
330#define __IGNORE_vfork /* clone() */ 331#define __IGNORE_vfork /* clone() */
332#define __IGNORE_umount2 /* umount() */
331 333
332#define __ARCH_WANT_SYS_RT_SIGACTION 334#define __ARCH_WANT_SYS_RT_SIGACTION
333#define __ARCH_WANT_SYS_RT_SIGSUSPEND 335#define __ARCH_WANT_SYS_RT_SIGSUSPEND
diff --git a/arch/ia64/include/asm/xen/hypervisor.h b/arch/ia64/include/asm/xen/hypervisor.h
index e425227a418e..88afb54501e4 100644
--- a/arch/ia64/include/asm/xen/hypervisor.h
+++ b/arch/ia64/include/asm/xen/hypervisor.h
@@ -33,6 +33,7 @@
33#ifndef _ASM_IA64_XEN_HYPERVISOR_H 33#ifndef _ASM_IA64_XEN_HYPERVISOR_H
34#define _ASM_IA64_XEN_HYPERVISOR_H 34#define _ASM_IA64_XEN_HYPERVISOR_H
35 35
36#include <linux/err.h>
36#include <xen/interface/xen.h> 37#include <xen/interface/xen.h>
37#include <xen/interface/version.h> /* to compile feature.c */ 38#include <xen/interface/version.h> /* to compile feature.c */
38#include <xen/features.h> /* to comiple xen-netfront.c */ 39#include <xen/features.h> /* to comiple xen-netfront.c */
diff --git a/arch/ia64/kernel/acpi-processor.c b/arch/ia64/kernel/acpi-processor.c
index cbe6cee5a550..dbda7bde6112 100644
--- a/arch/ia64/kernel/acpi-processor.c
+++ b/arch/ia64/kernel/acpi-processor.c
@@ -71,3 +71,15 @@ void arch_acpi_processor_init_pdc(struct acpi_processor *pr)
71} 71}
72 72
73EXPORT_SYMBOL(arch_acpi_processor_init_pdc); 73EXPORT_SYMBOL(arch_acpi_processor_init_pdc);
74
75void 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
85EXPORT_SYMBOL(arch_acpi_processor_cleanup_pdc);
diff --git a/arch/ia64/kernel/dma-mapping.c b/arch/ia64/kernel/dma-mapping.c
index 086a2aeb0404..f2c1600da097 100644
--- a/arch/ia64/kernel/dma-mapping.c
+++ b/arch/ia64/kernel/dma-mapping.c
@@ -6,6 +6,16 @@ int iommu_detected __read_mostly;
6struct dma_map_ops *dma_ops; 6struct dma_map_ops *dma_ops;
7EXPORT_SYMBOL(dma_ops); 7EXPORT_SYMBOL(dma_ops);
8 8
9#define PREALLOC_DMA_DEBUG_ENTRIES (1 << 16)
10
11static int __init dma_init(void)
12{
13 dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES);
14
15 return 0;
16}
17fs_initcall(dma_init);
18
9struct dma_map_ops *dma_get_ops(struct device *dev) 19struct dma_map_ops *dma_get_ops(struct device *dev)
10{ 20{
11 return dma_ops; 21 return dma_ops;
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c
index 7ef80e8161ce..c745d0aeb6e0 100644
--- a/arch/ia64/kernel/efi.c
+++ b/arch/ia64/kernel/efi.c
@@ -46,7 +46,7 @@ extern efi_status_t efi_call_phys (void *, ...);
46struct efi efi; 46struct efi efi;
47EXPORT_SYMBOL(efi); 47EXPORT_SYMBOL(efi);
48static efi_runtime_services_t *runtime; 48static efi_runtime_services_t *runtime;
49static unsigned long mem_limit = ~0UL, max_addr = ~0UL, min_addr = 0UL; 49static u64 mem_limit = ~0UL, max_addr = ~0UL, min_addr = 0UL;
50 50
51#define efi_call_virt(f, args...) (*(f))(args) 51#define efi_call_virt(f, args...) (*(f))(args)
52 52
@@ -356,7 +356,7 @@ efi_get_pal_addr (void)
356 356
357 if (++pal_code_count > 1) { 357 if (++pal_code_count > 1) {
358 printk(KERN_ERR "Too many EFI Pal Code memory ranges, " 358 printk(KERN_ERR "Too many EFI Pal Code memory ranges, "
359 "dropped @ %lx\n", md->phys_addr); 359 "dropped @ %llx\n", md->phys_addr);
360 continue; 360 continue;
361 } 361 }
362 /* 362 /*
@@ -490,10 +490,10 @@ efi_init (void)
490 } 490 }
491 } 491 }
492 if (min_addr != 0UL) 492 if (min_addr != 0UL)
493 printk(KERN_INFO "Ignoring memory below %luMB\n", 493 printk(KERN_INFO "Ignoring memory below %lluMB\n",
494 min_addr >> 20); 494 min_addr >> 20);
495 if (max_addr != ~0UL) 495 if (max_addr != ~0UL)
496 printk(KERN_INFO "Ignoring memory above %luMB\n", 496 printk(KERN_INFO "Ignoring memory above %lluMB\n",
497 max_addr >> 20); 497 max_addr >> 20);
498 498
499 efi.systab = __va(ia64_boot_param->efi_systab); 499 efi.systab = __va(ia64_boot_param->efi_systab);
@@ -1066,7 +1066,7 @@ find_memmap_space (void)
1066 * parts exist, and are WB. 1066 * parts exist, and are WB.
1067 */ 1067 */
1068unsigned long 1068unsigned long
1069efi_memmap_init(unsigned long *s, unsigned long *e) 1069efi_memmap_init(u64 *s, u64 *e)
1070{ 1070{
1071 struct kern_memdesc *k, *prev = NULL; 1071 struct kern_memdesc *k, *prev = NULL;
1072 u64 contig_low=0, contig_high=0; 1072 u64 contig_low=0, contig_high=0;
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S
index 7bebac0e1d44..d0e7d37017b4 100644
--- a/arch/ia64/kernel/entry.S
+++ b/arch/ia64/kernel/entry.S
@@ -1805,6 +1805,7 @@ sys_call_table:
1805 data8 sys_inotify_init1 1805 data8 sys_inotify_init1
1806 data8 sys_preadv 1806 data8 sys_preadv
1807 data8 sys_pwritev // 1320 1807 data8 sys_pwritev // 1320
1808 data8 sys_rt_tgsigqueueinfo
1808 1809
1809 .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls 1810 .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls
1810#endif /* __IA64_ASM_PARAVIRTUALIZED_NATIVE */ 1811#endif /* __IA64_ASM_PARAVIRTUALIZED_NATIVE */
diff --git a/arch/ia64/kernel/esi.c b/arch/ia64/kernel/esi.c
index ebf4e988e78c..d5764a3d74af 100644
--- a/arch/ia64/kernel/esi.c
+++ b/arch/ia64/kernel/esi.c
@@ -65,7 +65,7 @@ static int __init esi_init (void)
65 } 65 }
66 66
67 if (!esi) 67 if (!esi)
68 return -ENODEV;; 68 return -ENODEV;
69 69
70 systab = __va(esi); 70 systab = __va(esi);
71 71
diff --git a/arch/ia64/kernel/ia64_ksyms.c b/arch/ia64/kernel/ia64_ksyms.c
index 2d311864e359..8ebccb589e1c 100644
--- a/arch/ia64/kernel/ia64_ksyms.c
+++ b/arch/ia64/kernel/ia64_ksyms.c
@@ -21,6 +21,7 @@ EXPORT_SYMBOL(csum_ipv6_magic);
21 21
22#include <asm/page.h> 22#include <asm/page.h>
23EXPORT_SYMBOL(clear_page); 23EXPORT_SYMBOL(clear_page);
24EXPORT_SYMBOL(copy_page);
24 25
25#ifdef CONFIG_VIRTUAL_MEM_MAP 26#ifdef CONFIG_VIRTUAL_MEM_MAP
26#include <linux/bootmem.h> 27#include <linux/bootmem.h>
@@ -60,9 +61,6 @@ EXPORT_SYMBOL(__udivdi3);
60EXPORT_SYMBOL(__moddi3); 61EXPORT_SYMBOL(__moddi3);
61EXPORT_SYMBOL(__umoddi3); 62EXPORT_SYMBOL(__umoddi3);
62 63
63#include <asm/page.h>
64EXPORT_SYMBOL(copy_page);
65
66#if defined(CONFIG_MD_RAID456) || defined(CONFIG_MD_RAID456_MODULE) 64#if defined(CONFIG_MD_RAID456) || defined(CONFIG_MD_RAID456_MODULE)
67extern void xor_ia64_2(void); 65extern void xor_ia64_2(void);
68extern void xor_ia64_3(void); 66extern void xor_ia64_3(void);
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c
index f92cef47bf86..dab4d393908c 100644
--- a/arch/ia64/kernel/iosapic.c
+++ b/arch/ia64/kernel/iosapic.c
@@ -451,7 +451,7 @@ iosapic_startup_edge_irq (unsigned int irq)
451static void 451static void
452iosapic_ack_edge_irq (unsigned int irq) 452iosapic_ack_edge_irq (unsigned int irq)
453{ 453{
454 irq_desc_t *idesc = irq_desc + irq; 454 struct irq_desc *idesc = irq_desc + irq;
455 455
456 irq_complete_move(irq); 456 irq_complete_move(irq);
457 move_native_irq(irq); 457 move_native_irq(irq);
@@ -600,8 +600,8 @@ static int
600register_intr (unsigned int gsi, int irq, unsigned char delivery, 600register_intr (unsigned int gsi, int irq, unsigned char delivery,
601 unsigned long polarity, unsigned long trigger) 601 unsigned long polarity, unsigned long trigger)
602{ 602{
603 irq_desc_t *idesc; 603 struct irq_desc *idesc;
604 struct hw_interrupt_type *irq_type; 604 struct irq_chip *irq_type;
605 int index; 605 int index;
606 struct iosapic_rte_info *rte; 606 struct iosapic_rte_info *rte;
607 607
@@ -650,7 +650,7 @@ register_intr (unsigned int gsi, int irq, unsigned char delivery,
650 650
651 idesc = irq_desc + irq; 651 idesc = irq_desc + irq;
652 if (irq_type != NULL && idesc->chip != irq_type) { 652 if (irq_type != NULL && idesc->chip != irq_type) {
653 if (idesc->chip != &no_irq_type) 653 if (idesc->chip != &no_irq_chip)
654 printk(KERN_WARNING 654 printk(KERN_WARNING
655 "%s: changing vector %d from %s to %s\n", 655 "%s: changing vector %d from %s to %s\n",
656 __func__, irq_to_vector(irq), 656 __func__, irq_to_vector(irq),
@@ -828,7 +828,7 @@ iosapic_unregister_intr (unsigned int gsi)
828{ 828{
829 unsigned long flags; 829 unsigned long flags;
830 int irq, index; 830 int irq, index;
831 irq_desc_t *idesc; 831 struct irq_desc *idesc;
832 u32 low32; 832 u32 low32;
833 unsigned long trigger, polarity; 833 unsigned long trigger, polarity;
834 unsigned int dest; 834 unsigned int dest;
@@ -1072,6 +1072,10 @@ iosapic_init (unsigned long phys_addr, unsigned int gsi_base)
1072 } 1072 }
1073 1073
1074 addr = ioremap(phys_addr, 0); 1074 addr = ioremap(phys_addr, 0);
1075 if (addr == NULL) {
1076 spin_unlock_irqrestore(&iosapic_lock, flags);
1077 return -ENOMEM;
1078 }
1075 ver = iosapic_version(addr); 1079 ver = iosapic_version(addr);
1076 if ((err = iosapic_check_gsi_range(gsi_base, ver))) { 1080 if ((err = iosapic_check_gsi_range(gsi_base, ver))) {
1077 iounmap(addr); 1081 iounmap(addr);
diff --git a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c
index 7429752ef5ad..7d8951229e7c 100644
--- a/arch/ia64/kernel/irq.c
+++ b/arch/ia64/kernel/irq.c
@@ -130,7 +130,7 @@ unsigned int vectors_in_migration[NR_IRQS];
130 */ 130 */
131static void migrate_irqs(void) 131static void migrate_irqs(void)
132{ 132{
133 irq_desc_t *desc; 133 struct irq_desc *desc;
134 int irq, new_cpu; 134 int irq, new_cpu;
135 135
136 for (irq=0; irq < NR_IRQS; irq++) { 136 for (irq=0; irq < NR_IRQS; irq++) {
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c
index b448197728be..dd9d7b54f1a1 100644
--- a/arch/ia64/kernel/irq_ia64.c
+++ b/arch/ia64/kernel/irq_ia64.c
@@ -630,7 +630,7 @@ static struct irqaction tlb_irqaction = {
630void 630void
631ia64_native_register_percpu_irq (ia64_vector vec, struct irqaction *action) 631ia64_native_register_percpu_irq (ia64_vector vec, struct irqaction *action)
632{ 632{
633 irq_desc_t *desc; 633 struct irq_desc *desc;
634 unsigned int irq; 634 unsigned int irq;
635 635
636 irq = vec; 636 irq = vec;
diff --git a/arch/ia64/kernel/irq_lsapic.c b/arch/ia64/kernel/irq_lsapic.c
index e56a7a36aca3..fc1549d4564d 100644
--- a/arch/ia64/kernel/irq_lsapic.c
+++ b/arch/ia64/kernel/irq_lsapic.c
@@ -33,7 +33,7 @@ static int lsapic_retrigger(unsigned int irq)
33 return 1; 33 return 1;
34} 34}
35 35
36struct hw_interrupt_type irq_type_ia64_lsapic = { 36struct irq_chip irq_type_ia64_lsapic = {
37 .name = "LSAPIC", 37 .name = "LSAPIC",
38 .startup = lsapic_noop_startup, 38 .startup = lsapic_noop_startup,
39 .shutdown = lsapic_noop, 39 .shutdown = lsapic_noop,
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
index 5b17bd402275..7b30d21c5190 100644
--- a/arch/ia64/kernel/mca.c
+++ b/arch/ia64/kernel/mca.c
@@ -850,7 +850,7 @@ EXPORT_SYMBOL(ia64_unreg_MCA_extension);
850 850
851 851
852static inline void 852static inline void
853copy_reg(const u64 *fr, u64 fnat, u64 *tr, u64 *tnat) 853copy_reg(const u64 *fr, u64 fnat, unsigned long *tr, unsigned long *tnat)
854{ 854{
855 u64 fslot, tslot, nat; 855 u64 fslot, tslot, nat;
856 *tr = *fr; 856 *tr = *fr;
@@ -914,9 +914,9 @@ ia64_mca_modify_original_stack(struct pt_regs *regs,
914 struct switch_stack *old_sw; 914 struct switch_stack *old_sw;
915 unsigned size = sizeof(struct pt_regs) + 915 unsigned size = sizeof(struct pt_regs) +
916 sizeof(struct switch_stack) + 16; 916 sizeof(struct switch_stack) + 16;
917 u64 *old_bspstore, *old_bsp; 917 unsigned long *old_bspstore, *old_bsp;
918 u64 *new_bspstore, *new_bsp; 918 unsigned long *new_bspstore, *new_bsp;
919 u64 old_unat, old_rnat, new_rnat, nat; 919 unsigned long old_unat, old_rnat, new_rnat, nat;
920 u64 slots, loadrs = regs->loadrs; 920 u64 slots, loadrs = regs->loadrs;
921 u64 r12 = ms->pmsa_gr[12-1], r13 = ms->pmsa_gr[13-1]; 921 u64 r12 = ms->pmsa_gr[12-1], r13 = ms->pmsa_gr[13-1];
922 u64 ar_bspstore = regs->ar_bspstore; 922 u64 ar_bspstore = regs->ar_bspstore;
@@ -968,10 +968,10 @@ ia64_mca_modify_original_stack(struct pt_regs *regs,
968 * loadrs for the new stack and save it in the new pt_regs, where 968 * loadrs for the new stack and save it in the new pt_regs, where
969 * ia64_old_stack() can get it. 969 * ia64_old_stack() can get it.
970 */ 970 */
971 old_bspstore = (u64 *)ar_bspstore; 971 old_bspstore = (unsigned long *)ar_bspstore;
972 old_bsp = (u64 *)ar_bsp; 972 old_bsp = (unsigned long *)ar_bsp;
973 slots = ia64_rse_num_regs(old_bspstore, old_bsp); 973 slots = ia64_rse_num_regs(old_bspstore, old_bsp);
974 new_bspstore = (u64 *)((u64)current + IA64_RBS_OFFSET); 974 new_bspstore = (unsigned long *)((u64)current + IA64_RBS_OFFSET);
975 new_bsp = ia64_rse_skip_regs(new_bspstore, slots); 975 new_bsp = ia64_rse_skip_regs(new_bspstore, slots);
976 regs->loadrs = (new_bsp - new_bspstore) * 8 << 16; 976 regs->loadrs = (new_bsp - new_bspstore) * 8 << 16;
977 977
@@ -1917,9 +1917,9 @@ ia64_mca_init(void)
1917 ia64_fptr_t *init_hldlr_ptr_slave = (ia64_fptr_t *)ia64_os_init_dispatch_slave; 1917 ia64_fptr_t *init_hldlr_ptr_slave = (ia64_fptr_t *)ia64_os_init_dispatch_slave;
1918 ia64_fptr_t *mca_hldlr_ptr = (ia64_fptr_t *)ia64_os_mca_dispatch; 1918 ia64_fptr_t *mca_hldlr_ptr = (ia64_fptr_t *)ia64_os_mca_dispatch;
1919 int i; 1919 int i;
1920 s64 rc; 1920 long rc;
1921 struct ia64_sal_retval isrv; 1921 struct ia64_sal_retval isrv;
1922 u64 timeout = IA64_MCA_RENDEZ_TIMEOUT; /* platform specific */ 1922 unsigned long timeout = IA64_MCA_RENDEZ_TIMEOUT; /* platform specific */
1923 static struct notifier_block default_init_monarch_nb = { 1923 static struct notifier_block default_init_monarch_nb = {
1924 .notifier_call = default_monarch_init_process, 1924 .notifier_call = default_monarch_init_process,
1925 .priority = 0/* we need to notified last */ 1925 .priority = 0/* we need to notified last */
@@ -2092,7 +2092,7 @@ ia64_mca_late_init(void)
2092 cpe_poll_timer.function = ia64_mca_cpe_poll; 2092 cpe_poll_timer.function = ia64_mca_cpe_poll;
2093 2093
2094 { 2094 {
2095 irq_desc_t *desc; 2095 struct irq_desc *desc;
2096 unsigned int irq; 2096 unsigned int irq;
2097 2097
2098 if (cpe_vector >= 0) { 2098 if (cpe_vector >= 0) {
diff --git a/arch/ia64/kernel/module.c b/arch/ia64/kernel/module.c
index da3b0cf495a3..1481b0a28ca0 100644
--- a/arch/ia64/kernel/module.c
+++ b/arch/ia64/kernel/module.c
@@ -171,7 +171,8 @@ apply_imm60 (struct module *mod, struct insn *insn, uint64_t val)
171 return 0; 171 return 0;
172 } 172 }
173 if (val + ((uint64_t) 1 << 59) >= (1UL << 60)) { 173 if (val + ((uint64_t) 1 << 59) >= (1UL << 60)) {
174 printk(KERN_ERR "%s: value %ld out of IMM60 range\n", mod->name, (int64_t) val); 174 printk(KERN_ERR "%s: value %ld out of IMM60 range\n",
175 mod->name, (long) val);
175 return 0; 176 return 0;
176 } 177 }
177 ia64_patch_imm60((u64) insn, val); 178 ia64_patch_imm60((u64) insn, val);
@@ -182,7 +183,8 @@ static int
182apply_imm22 (struct module *mod, struct insn *insn, uint64_t val) 183apply_imm22 (struct module *mod, struct insn *insn, uint64_t val)
183{ 184{
184 if (val + (1 << 21) >= (1 << 22)) { 185 if (val + (1 << 21) >= (1 << 22)) {
185 printk(KERN_ERR "%s: value %li out of IMM22 range\n", mod->name, (int64_t)val); 186 printk(KERN_ERR "%s: value %li out of IMM22 range\n",
187 mod->name, (long)val);
186 return 0; 188 return 0;
187 } 189 }
188 ia64_patch((u64) insn, 0x01fffcfe000UL, ( ((val & 0x200000UL) << 15) /* bit 21 -> 36 */ 190 ia64_patch((u64) insn, 0x01fffcfe000UL, ( ((val & 0x200000UL) << 15) /* bit 21 -> 36 */
@@ -196,7 +198,8 @@ static int
196apply_imm21b (struct module *mod, struct insn *insn, uint64_t val) 198apply_imm21b (struct module *mod, struct insn *insn, uint64_t val)
197{ 199{
198 if (val + (1 << 20) >= (1 << 21)) { 200 if (val + (1 << 20) >= (1 << 21)) {
199 printk(KERN_ERR "%s: value %li out of IMM21b range\n", mod->name, (int64_t)val); 201 printk(KERN_ERR "%s: value %li out of IMM21b range\n",
202 mod->name, (long)val);
200 return 0; 203 return 0;
201 } 204 }
202 ia64_patch((u64) insn, 0x11ffffe000UL, ( ((val & 0x100000UL) << 16) /* bit 20 -> 36 */ 205 ia64_patch((u64) insn, 0x11ffffe000UL, ( ((val & 0x100000UL) << 16) /* bit 20 -> 36 */
@@ -701,8 +704,9 @@ do_reloc (struct module *mod, uint8_t r_type, Elf64_Sym *sym, uint64_t addend,
701 case RV_PCREL2: 704 case RV_PCREL2:
702 if (r_type == R_IA64_PCREL21BI) { 705 if (r_type == R_IA64_PCREL21BI) {
703 if (!is_internal(mod, val)) { 706 if (!is_internal(mod, val)) {
704 printk(KERN_ERR "%s: %s reloc against non-local symbol (%lx)\n", 707 printk(KERN_ERR "%s: %s reloc against "
705 __func__, reloc_name[r_type], val); 708 "non-local symbol (%lx)\n", __func__,
709 reloc_name[r_type], (unsigned long)val);
706 return -ENOEXEC; 710 return -ENOEXEC;
707 } 711 }
708 format = RF_INSN21B; 712 format = RF_INSN21B;
diff --git a/arch/ia64/kernel/msi_ia64.c b/arch/ia64/kernel/msi_ia64.c
index 0f8ade9331ba..6c8922856049 100644
--- a/arch/ia64/kernel/msi_ia64.c
+++ b/arch/ia64/kernel/msi_ia64.c
@@ -158,7 +158,7 @@ static int dmar_msi_set_affinity(unsigned int irq, const struct cpumask *mask)
158} 158}
159#endif /* CONFIG_SMP */ 159#endif /* CONFIG_SMP */
160 160
161struct irq_chip dmar_msi_type = { 161static struct irq_chip dmar_msi_type = {
162 .name = "DMAR_MSI", 162 .name = "DMAR_MSI",
163 .unmask = dmar_msi_unmask, 163 .unmask = dmar_msi_unmask,
164 .mask = dmar_msi_mask, 164 .mask = dmar_msi_mask,
diff --git a/arch/ia64/kernel/palinfo.c b/arch/ia64/kernel/palinfo.c
index a4f19c70aadd..fdf6f9d013e5 100644
--- a/arch/ia64/kernel/palinfo.c
+++ b/arch/ia64/kernel/palinfo.c
@@ -218,10 +218,10 @@ static int
218cache_info(char *page) 218cache_info(char *page)
219{ 219{
220 char *p = page; 220 char *p = page;
221 u64 i, levels, unique_caches; 221 unsigned long i, levels, unique_caches;
222 pal_cache_config_info_t cci; 222 pal_cache_config_info_t cci;
223 int j, k; 223 int j, k;
224 s64 status; 224 long status;
225 225
226 if ((status = ia64_pal_cache_summary(&levels, &unique_caches)) != 0) { 226 if ((status = ia64_pal_cache_summary(&levels, &unique_caches)) != 0) {
227 printk(KERN_ERR "ia64_pal_cache_summary=%ld\n", status); 227 printk(KERN_ERR "ia64_pal_cache_summary=%ld\n", status);
@@ -303,7 +303,7 @@ vm_info(char *page)
303 ia64_ptce_info_t ptce; 303 ia64_ptce_info_t ptce;
304 const char *sep; 304 const char *sep;
305 int i, j; 305 int i, j;
306 s64 status; 306 long status;
307 307
308 if ((status = ia64_pal_vm_summary(&vm_info_1, &vm_info_2)) !=0) { 308 if ((status = ia64_pal_vm_summary(&vm_info_1, &vm_info_2)) !=0) {
309 printk(KERN_ERR "ia64_pal_vm_summary=%ld\n", status); 309 printk(KERN_ERR "ia64_pal_vm_summary=%ld\n", status);
@@ -431,9 +431,9 @@ register_info(char *page)
431 char *p = page; 431 char *p = page;
432 u64 reg_info[2]; 432 u64 reg_info[2];
433 u64 info; 433 u64 info;
434 u64 phys_stacked; 434 unsigned long phys_stacked;
435 pal_hints_u_t hints; 435 pal_hints_u_t hints;
436 u64 iregs, dregs; 436 unsigned long iregs, dregs;
437 char *info_type[]={ 437 char *info_type[]={
438 "Implemented AR(s)", 438 "Implemented AR(s)",
439 "AR(s) with read side-effects", 439 "AR(s) with read side-effects",
@@ -530,8 +530,8 @@ static char **proc_features[]={
530 NULL, NULL, NULL, NULL, 530 NULL, NULL, NULL, NULL,
531}; 531};
532 532
533static char * 533static char * feature_set_info(char *page, u64 avail, u64 status, u64 control,
534feature_set_info(char *page, u64 avail, u64 status, u64 control, u64 set) 534 unsigned long set)
535{ 535{
536 char *p = page; 536 char *p = page;
537 char **vf, **v; 537 char **vf, **v;
@@ -714,7 +714,7 @@ frequency_info(char *page)
714{ 714{
715 char *p = page; 715 char *p = page;
716 struct pal_freq_ratio proc, itc, bus; 716 struct pal_freq_ratio proc, itc, bus;
717 u64 base; 717 unsigned long base;
718 718
719 if (ia64_pal_freq_base(&base) == -1) 719 if (ia64_pal_freq_base(&base) == -1)
720 p += sprintf(p, "Output clock : not implemented\n"); 720 p += sprintf(p, "Output clock : not implemented\n");
@@ -736,43 +736,43 @@ static int
736tr_info(char *page) 736tr_info(char *page)
737{ 737{
738 char *p = page; 738 char *p = page;
739 s64 status; 739 long status;
740 pal_tr_valid_u_t tr_valid; 740 pal_tr_valid_u_t tr_valid;
741 u64 tr_buffer[4]; 741 u64 tr_buffer[4];
742 pal_vm_info_1_u_t vm_info_1; 742 pal_vm_info_1_u_t vm_info_1;
743 pal_vm_info_2_u_t vm_info_2; 743 pal_vm_info_2_u_t vm_info_2;
744 u64 i, j; 744 unsigned long i, j;
745 u64 max[3], pgm; 745 unsigned long max[3], pgm;
746 struct ifa_reg { 746 struct ifa_reg {
747 u64 valid:1; 747 unsigned long valid:1;
748 u64 ig:11; 748 unsigned long ig:11;
749 u64 vpn:52; 749 unsigned long vpn:52;
750 } *ifa_reg; 750 } *ifa_reg;
751 struct itir_reg { 751 struct itir_reg {
752 u64 rv1:2; 752 unsigned long rv1:2;
753 u64 ps:6; 753 unsigned long ps:6;
754 u64 key:24; 754 unsigned long key:24;
755 u64 rv2:32; 755 unsigned long rv2:32;
756 } *itir_reg; 756 } *itir_reg;
757 struct gr_reg { 757 struct gr_reg {
758 u64 p:1; 758 unsigned long p:1;
759 u64 rv1:1; 759 unsigned long rv1:1;
760 u64 ma:3; 760 unsigned long ma:3;
761 u64 a:1; 761 unsigned long a:1;
762 u64 d:1; 762 unsigned long d:1;
763 u64 pl:2; 763 unsigned long pl:2;
764 u64 ar:3; 764 unsigned long ar:3;
765 u64 ppn:38; 765 unsigned long ppn:38;
766 u64 rv2:2; 766 unsigned long rv2:2;
767 u64 ed:1; 767 unsigned long ed:1;
768 u64 ig:11; 768 unsigned long ig:11;
769 } *gr_reg; 769 } *gr_reg;
770 struct rid_reg { 770 struct rid_reg {
771 u64 ig1:1; 771 unsigned long ig1:1;
772 u64 rv1:1; 772 unsigned long rv1:1;
773 u64 ig2:6; 773 unsigned long ig2:6;
774 u64 rid:24; 774 unsigned long rid:24;
775 u64 rv2:32; 775 unsigned long rv2:32;
776 } *rid_reg; 776 } *rid_reg;
777 777
778 if ((status = ia64_pal_vm_summary(&vm_info_1, &vm_info_2)) !=0) { 778 if ((status = ia64_pal_vm_summary(&vm_info_1, &vm_info_2)) !=0) {
diff --git a/arch/ia64/kernel/paravirt_patchlist.c b/arch/ia64/kernel/paravirt_patchlist.c
index b28082a95d45..0a70720662ed 100644
--- a/arch/ia64/kernel/paravirt_patchlist.c
+++ b/arch/ia64/kernel/paravirt_patchlist.c
@@ -19,6 +19,8 @@
19 */ 19 */
20 20
21#include <linux/bug.h> 21#include <linux/bug.h>
22#include <linux/init.h>
23#include <linux/kernel.h>
22#include <asm/paravirt.h> 24#include <asm/paravirt.h>
23 25
24#define DECLARE(name) \ 26#define DECLARE(name) \
diff --git a/arch/ia64/kernel/pci-dma.c b/arch/ia64/kernel/pci-dma.c
index eb987386f691..f6b1ff0aea76 100644
--- a/arch/ia64/kernel/pci-dma.c
+++ b/arch/ia64/kernel/pci-dma.c
@@ -32,6 +32,8 @@ int force_iommu __read_mostly = 1;
32int force_iommu __read_mostly; 32int force_iommu __read_mostly;
33#endif 33#endif
34 34
35int iommu_pass_through;
36
35/* Dummy device used for NULL arguments (normally ISA). Better would 37/* Dummy device used for NULL arguments (normally ISA). Better would
36 be probably a smaller DMA mask, but this is bug-to-bug compatible 38 be probably a smaller DMA mask, but this is bug-to-bug compatible
37 to i386. */ 39 to i386. */
@@ -67,11 +69,6 @@ iommu_dma_init(void)
67 69
68int iommu_dma_supported(struct device *dev, u64 mask) 70int iommu_dma_supported(struct device *dev, u64 mask)
69{ 71{
70 struct dma_map_ops *ops = platform_dma_get_ops(dev);
71
72 if (ops->dma_supported)
73 return ops->dma_supported(dev, mask);
74
75 /* Copied from i386. Doesn't make much sense, because it will 72 /* Copied from i386. Doesn't make much sense, because it will
76 only work for pci_alloc_coherent. 73 only work for pci_alloc_coherent.
77 The caller just has to use GFP_DMA in this case. */ 74 The caller just has to use GFP_DMA in this case. */
@@ -91,7 +88,7 @@ int iommu_dma_supported(struct device *dev, u64 mask)
91 type. Normally this doesn't make any difference, but gives 88 type. Normally this doesn't make any difference, but gives
92 more gentle handling of IOMMU overflow. */ 89 more gentle handling of IOMMU overflow. */
93 if (iommu_sac_force && (mask >= DMA_BIT_MASK(40))) { 90 if (iommu_sac_force && (mask >= DMA_BIT_MASK(40))) {
94 dev_info(dev, "Force SAC with mask %lx\n", mask); 91 dev_info(dev, "Force SAC with mask %llx\n", mask);
95 return 0; 92 return 0;
96 } 93 }
97 94
diff --git a/arch/ia64/kernel/pci-swiotlb.c b/arch/ia64/kernel/pci-swiotlb.c
index 285aae8431c6..223abb134105 100644
--- a/arch/ia64/kernel/pci-swiotlb.c
+++ b/arch/ia64/kernel/pci-swiotlb.c
@@ -46,7 +46,7 @@ void __init swiotlb_dma_init(void)
46 46
47void __init pci_swiotlb_init(void) 47void __init pci_swiotlb_init(void)
48{ 48{
49 if (!iommu_detected) { 49 if (!iommu_detected || iommu_pass_through) {
50#ifdef CONFIG_IA64_GENERIC 50#ifdef CONFIG_IA64_GENERIC
51 swiotlb = 1; 51 swiotlb = 1;
52 printk(KERN_INFO "PCI-DMA: Re-initialize machine vector.\n"); 52 printk(KERN_INFO "PCI-DMA: Re-initialize machine vector.\n");
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
index bdc176cb5e85..f1782705b1f7 100644
--- a/arch/ia64/kernel/perfmon.c
+++ b/arch/ia64/kernel/perfmon.c
@@ -312,7 +312,7 @@ typedef struct pfm_context {
312 unsigned long th_pmcs[PFM_NUM_PMC_REGS]; /* PMC thread save state */ 312 unsigned long th_pmcs[PFM_NUM_PMC_REGS]; /* PMC thread save state */
313 unsigned long th_pmds[PFM_NUM_PMD_REGS]; /* PMD thread save state */ 313 unsigned long th_pmds[PFM_NUM_PMD_REGS]; /* PMD thread save state */
314 314
315 u64 ctx_saved_psr_up; /* only contains psr.up value */ 315 unsigned long ctx_saved_psr_up; /* only contains psr.up value */
316 316
317 unsigned long ctx_last_activation; /* context last activation number for last_cpu */ 317 unsigned long ctx_last_activation; /* context last activation number for last_cpu */
318 unsigned int ctx_last_cpu; /* CPU id of current or last CPU used (SMP only) */ 318 unsigned int ctx_last_cpu; /* CPU id of current or last CPU used (SMP only) */
@@ -5213,8 +5213,8 @@ pfm_end_notify_user(pfm_context_t *ctx)
5213 * main overflow processing routine. 5213 * main overflow processing routine.
5214 * it can be called from the interrupt path or explicitly during the context switch code 5214 * it can be called from the interrupt path or explicitly during the context switch code
5215 */ 5215 */
5216static void 5216static void pfm_overflow_handler(struct task_struct *task, pfm_context_t *ctx,
5217pfm_overflow_handler(struct task_struct *task, pfm_context_t *ctx, u64 pmc0, struct pt_regs *regs) 5217 unsigned long pmc0, struct pt_regs *regs)
5218{ 5218{
5219 pfm_ovfl_arg_t *ovfl_arg; 5219 pfm_ovfl_arg_t *ovfl_arg;
5220 unsigned long mask; 5220 unsigned long mask;
@@ -5603,7 +5603,7 @@ pfm_interrupt_handler(int irq, void *arg)
5603 * /proc/perfmon interface, for debug only 5603 * /proc/perfmon interface, for debug only
5604 */ 5604 */
5605 5605
5606#define PFM_PROC_SHOW_HEADER ((void *)nr_cpu_ids+1) 5606#define PFM_PROC_SHOW_HEADER ((void *)(long)nr_cpu_ids+1)
5607 5607
5608static void * 5608static void *
5609pfm_proc_start(struct seq_file *m, loff_t *pos) 5609pfm_proc_start(struct seq_file *m, loff_t *pos)
diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c
index 92c9689b7d97..9daa87fdb018 100644
--- a/arch/ia64/kernel/ptrace.c
+++ b/arch/ia64/kernel/ptrace.c
@@ -15,7 +15,6 @@
15#include <linux/mm.h> 15#include <linux/mm.h>
16#include <linux/errno.h> 16#include <linux/errno.h>
17#include <linux/ptrace.h> 17#include <linux/ptrace.h>
18#include <linux/smp_lock.h>
19#include <linux/user.h> 18#include <linux/user.h>
20#include <linux/security.h> 19#include <linux/security.h>
21#include <linux/audit.h> 20#include <linux/audit.h>
diff --git a/arch/ia64/kernel/salinfo.c b/arch/ia64/kernel/salinfo.c
index 7053c55b7649..e6676fca4828 100644
--- a/arch/ia64/kernel/salinfo.c
+++ b/arch/ia64/kernel/salinfo.c
@@ -192,7 +192,7 @@ struct salinfo_platform_oemdata_parms {
192static void 192static void
193salinfo_work_to_do(struct salinfo_data *data) 193salinfo_work_to_do(struct salinfo_data *data)
194{ 194{
195 down_trylock(&data->mutex); 195 (void)(down_trylock(&data->mutex) ?: 0);
196 up(&data->mutex); 196 up(&data->mutex);
197} 197}
198 198
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index 714066aeda7f..1b23ec126b63 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -151,9 +151,9 @@ int num_rsvd_regions __initdata;
151 * This routine does not assume the incoming segments are sorted. 151 * This routine does not assume the incoming segments are sorted.
152 */ 152 */
153int __init 153int __init
154filter_rsvd_memory (unsigned long start, unsigned long end, void *arg) 154filter_rsvd_memory (u64 start, u64 end, void *arg)
155{ 155{
156 unsigned long range_start, range_end, prev_start; 156 u64 range_start, range_end, prev_start;
157 void (*func)(unsigned long, unsigned long, int); 157 void (*func)(unsigned long, unsigned long, int);
158 int i; 158 int i;
159 159
@@ -191,7 +191,7 @@ filter_rsvd_memory (unsigned long start, unsigned long end, void *arg)
191 * are not filtered out. 191 * are not filtered out.
192 */ 192 */
193int __init 193int __init
194filter_memory(unsigned long start, unsigned long end, void *arg) 194filter_memory(u64 start, u64 end, void *arg)
195{ 195{
196 void (*func)(unsigned long, unsigned long, int); 196 void (*func)(unsigned long, unsigned long, int);
197 197
@@ -397,7 +397,7 @@ find_initrd (void)
397 initrd_start = (unsigned long)__va(ia64_boot_param->initrd_start); 397 initrd_start = (unsigned long)__va(ia64_boot_param->initrd_start);
398 initrd_end = initrd_start+ia64_boot_param->initrd_size; 398 initrd_end = initrd_start+ia64_boot_param->initrd_size;
399 399
400 printk(KERN_INFO "Initial ramdisk at: 0x%lx (%lu bytes)\n", 400 printk(KERN_INFO "Initial ramdisk at: 0x%lx (%llu bytes)\n",
401 initrd_start, ia64_boot_param->initrd_size); 401 initrd_start, ia64_boot_param->initrd_size);
402 } 402 }
403#endif 403#endif
@@ -505,9 +505,9 @@ static int __init parse_elfcorehdr(char *arg)
505} 505}
506early_param("elfcorehdr", parse_elfcorehdr); 506early_param("elfcorehdr", parse_elfcorehdr);
507 507
508int __init reserve_elfcorehdr(unsigned long *start, unsigned long *end) 508int __init reserve_elfcorehdr(u64 *start, u64 *end)
509{ 509{
510 unsigned long length; 510 u64 length;
511 511
512 /* We get the address using the kernel command line, 512 /* We get the address using the kernel command line,
513 * but the size is extracted from the EFI tables. 513 * but the size is extracted from the EFI tables.
@@ -588,7 +588,7 @@ setup_arch (char **cmdline_p)
588 ia64_patch_rse((u64) __start___rse_patchlist, (u64) __end___rse_patchlist); 588 ia64_patch_rse((u64) __start___rse_patchlist, (u64) __end___rse_patchlist);
589#else 589#else
590 { 590 {
591 u64 num_phys_stacked; 591 unsigned long num_phys_stacked;
592 592
593 if (ia64_pal_rse_info(&num_phys_stacked, 0) == 0 && num_phys_stacked > 96) 593 if (ia64_pal_rse_info(&num_phys_stacked, 0) == 0 && num_phys_stacked > 96)
594 ia64_patch_rse((u64) __start___rse_patchlist, (u64) __end___rse_patchlist); 594 ia64_patch_rse((u64) __start___rse_patchlist, (u64) __end___rse_patchlist);
@@ -872,9 +872,9 @@ static void __cpuinit
872get_cache_info(void) 872get_cache_info(void)
873{ 873{
874 unsigned long line_size, max = 1; 874 unsigned long line_size, max = 1;
875 u64 l, levels, unique_caches; 875 unsigned long l, levels, unique_caches;
876 pal_cache_config_info_t cci; 876 pal_cache_config_info_t cci;
877 s64 status; 877 long status;
878 878
879 status = ia64_pal_cache_summary(&levels, &unique_caches); 879 status = ia64_pal_cache_summary(&levels, &unique_caches);
880 if (status != 0) { 880 if (status != 0) {
@@ -892,9 +892,9 @@ get_cache_info(void)
892 /* cache_type (data_or_unified)=2 */ 892 /* cache_type (data_or_unified)=2 */
893 status = ia64_pal_cache_config_info(l, 2, &cci); 893 status = ia64_pal_cache_config_info(l, 2, &cci);
894 if (status != 0) { 894 if (status != 0) {
895 printk(KERN_ERR 895 printk(KERN_ERR "%s: ia64_pal_cache_config_info"
896 "%s: ia64_pal_cache_config_info(l=%lu, 2) failed (status=%ld)\n", 896 "(l=%lu, 2) failed (status=%ld)\n",
897 __func__, l, status); 897 __func__, l, status);
898 max = SMP_CACHE_BYTES; 898 max = SMP_CACHE_BYTES;
899 /* The safest setup for "flush_icache_range()" */ 899 /* The safest setup for "flush_icache_range()" */
900 cci.pcci_stride = I_CACHE_STRIDE_SHIFT; 900 cci.pcci_stride = I_CACHE_STRIDE_SHIFT;
@@ -914,10 +914,10 @@ get_cache_info(void)
914 /* cache_type (instruction)=1*/ 914 /* cache_type (instruction)=1*/
915 status = ia64_pal_cache_config_info(l, 1, &cci); 915 status = ia64_pal_cache_config_info(l, 1, &cci);
916 if (status != 0) { 916 if (status != 0) {
917 printk(KERN_ERR 917 printk(KERN_ERR "%s: ia64_pal_cache_config_info"
918 "%s: ia64_pal_cache_config_info(l=%lu, 1) failed (status=%ld)\n", 918 "(l=%lu, 1) failed (status=%ld)\n",
919 __func__, l, status); 919 __func__, l, status);
920 /* The safest setup for "flush_icache_range()" */ 920 /* The safest setup for flush_icache_range() */
921 cci.pcci_stride = I_CACHE_STRIDE_SHIFT; 921 cci.pcci_stride = I_CACHE_STRIDE_SHIFT;
922 } 922 }
923 } 923 }
diff --git a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c
index 5230eaafd83f..f0c521b0ba4c 100644
--- a/arch/ia64/kernel/smp.c
+++ b/arch/ia64/kernel/smp.c
@@ -66,7 +66,7 @@ static DEFINE_PER_CPU(unsigned short, shadow_flush_counts[NR_CPUS]) ____cachelin
66#define IPI_KDUMP_CPU_STOP 3 66#define IPI_KDUMP_CPU_STOP 3
67 67
68/* This needs to be cacheline aligned because it is written to by *other* CPUs. */ 68/* This needs to be cacheline aligned because it is written to by *other* CPUs. */
69static DEFINE_PER_CPU_SHARED_ALIGNED(u64, ipi_operation); 69static DEFINE_PER_CPU_SHARED_ALIGNED(unsigned long, ipi_operation);
70 70
71extern void cpu_halt (void); 71extern void cpu_halt (void);
72 72
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c
index 7700e23034bb..de100aa7ff03 100644
--- a/arch/ia64/kernel/smpboot.c
+++ b/arch/ia64/kernel/smpboot.c
@@ -678,7 +678,7 @@ extern void fixup_irqs(void);
678int migrate_platform_irqs(unsigned int cpu) 678int migrate_platform_irqs(unsigned int cpu)
679{ 679{
680 int new_cpei_cpu; 680 int new_cpei_cpu;
681 irq_desc_t *desc = NULL; 681 struct irq_desc *desc = NULL;
682 const struct cpumask *mask; 682 const struct cpumask *mask;
683 int retval = 0; 683 int retval = 0;
684 684
@@ -865,7 +865,7 @@ init_smp_config(void)
865void __devinit 865void __devinit
866identify_siblings(struct cpuinfo_ia64 *c) 866identify_siblings(struct cpuinfo_ia64 *c)
867{ 867{
868 s64 status; 868 long status;
869 u16 pltid; 869 u16 pltid;
870 pal_logical_to_physical_t info; 870 pal_logical_to_physical_t info;
871 871
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c
index 604c1a35db33..4990495d7531 100644
--- a/arch/ia64/kernel/time.c
+++ b/arch/ia64/kernel/time.c
@@ -385,7 +385,7 @@ ia64_init_itm (void)
385 385
386static cycle_t itc_get_cycles(struct clocksource *cs) 386static cycle_t itc_get_cycles(struct clocksource *cs)
387{ 387{
388 u64 lcycle, now, ret; 388 unsigned long lcycle, now, ret;
389 389
390 if (!itc_jitter_data.itc_jitter) 390 if (!itc_jitter_data.itc_jitter)
391 return get_cycles(); 391 return get_cycles();
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c
index a8d61a3e9a94..8f060352e129 100644
--- a/arch/ia64/kernel/topology.c
+++ b/arch/ia64/kernel/topology.c
@@ -306,10 +306,10 @@ static void __cpuinit cpu_cache_sysfs_exit(unsigned int cpu)
306 306
307static int __cpuinit cpu_cache_sysfs_init(unsigned int cpu) 307static int __cpuinit cpu_cache_sysfs_init(unsigned int cpu)
308{ 308{
309 u64 i, levels, unique_caches; 309 unsigned long i, levels, unique_caches;
310 pal_cache_config_info_t cci; 310 pal_cache_config_info_t cci;
311 int j; 311 int j;
312 s64 status; 312 long status;
313 struct cache_info *this_cache; 313 struct cache_info *this_cache;
314 int num_cache_leaves = 0; 314 int num_cache_leaves = 0;
315 315
@@ -372,6 +372,10 @@ static int __cpuinit cache_add_dev(struct sys_device * sys_dev)
372 retval = kobject_init_and_add(&all_cpu_cache_info[cpu].kobj, 372 retval = kobject_init_and_add(&all_cpu_cache_info[cpu].kobj,
373 &cache_ktype_percpu_entry, &sys_dev->kobj, 373 &cache_ktype_percpu_entry, &sys_dev->kobj,
374 "%s", "cache"); 374 "%s", "cache");
375 if (unlikely(retval < 0)) {
376 cpu_cache_sysfs_exit(cpu);
377 return retval;
378 }
375 379
376 for (i = 0; i < all_cpu_cache_info[cpu].num_cache_leaves; i++) { 380 for (i = 0; i < all_cpu_cache_info[cpu].num_cache_leaves; i++) {
377 this_object = LEAF_KOBJECT_PTR(cpu,i); 381 this_object = LEAF_KOBJECT_PTR(cpu,i);
@@ -385,7 +389,7 @@ static int __cpuinit cache_add_dev(struct sys_device * sys_dev)
385 } 389 }
386 kobject_put(&all_cpu_cache_info[cpu].kobj); 390 kobject_put(&all_cpu_cache_info[cpu].kobj);
387 cpu_cache_sysfs_exit(cpu); 391 cpu_cache_sysfs_exit(cpu);
388 break; 392 return retval;
389 } 393 }
390 kobject_uevent(&(this_object->kobj), KOBJ_ADD); 394 kobject_uevent(&(this_object->kobj), KOBJ_ADD);
391 } 395 }
diff --git a/arch/ia64/kernel/uncached.c b/arch/ia64/kernel/uncached.c
index 6ba72ab42fcc..a595823582d9 100644
--- a/arch/ia64/kernel/uncached.c
+++ b/arch/ia64/kernel/uncached.c
@@ -250,8 +250,7 @@ EXPORT_SYMBOL(uncached_free_page);
250 * Called at boot time to build a map of pages that can be used for 250 * Called at boot time to build a map of pages that can be used for
251 * memory special operations. 251 * memory special operations.
252 */ 252 */
253static int __init uncached_build_memmap(unsigned long uc_start, 253static int __init uncached_build_memmap(u64 uc_start, u64 uc_end, void *arg)
254 unsigned long uc_end, void *arg)
255{ 254{
256 int nid = paddr_to_nid(uc_start - __IA64_UNCACHED_OFFSET); 255 int nid = paddr_to_nid(uc_start - __IA64_UNCACHED_OFFSET);
257 struct gen_pool *pool = uncached_pools[nid].pool; 256 struct gen_pool *pool = uncached_pools[nid].pool;
diff --git a/arch/ia64/kvm/kvm_lib.c b/arch/ia64/kvm/kvm_lib.c
index a85cb611ecd7..f1268b8e6f9e 100644
--- a/arch/ia64/kvm/kvm_lib.c
+++ b/arch/ia64/kvm/kvm_lib.c
@@ -11,5 +11,11 @@
11 * 11 *
12 */ 12 */
13#undef CONFIG_MODULES 13#undef CONFIG_MODULES
14#include <linux/module.h>
15#undef CONFIG_KALLSYMS
16#undef EXPORT_SYMBOL
17#undef EXPORT_SYMBOL_GPL
18#define EXPORT_SYMBOL(sym)
19#define EXPORT_SYMBOL_GPL(sym)
14#include "../../../lib/vsprintf.c" 20#include "../../../lib/vsprintf.c"
15#include "../../../lib/ctype.c" 21#include "../../../lib/ctype.c"
diff --git a/arch/ia64/kvm/mmio.c b/arch/ia64/kvm/mmio.c
index 21f63fffc379..9bf55afd08d0 100644
--- a/arch/ia64/kvm/mmio.c
+++ b/arch/ia64/kvm/mmio.c
@@ -247,7 +247,8 @@ void emulate_io_inst(struct kvm_vcpu *vcpu, u64 padr, u64 ma)
247 vcpu_get_fpreg(vcpu, inst.M9.f2, &v); 247 vcpu_get_fpreg(vcpu, inst.M9.f2, &v);
248 /* Write high word. FIXME: this is a kludge! */ 248 /* Write high word. FIXME: this is a kludge! */
249 v.u.bits[1] &= 0x3ffff; 249 v.u.bits[1] &= 0x3ffff;
250 mmio_access(vcpu, padr + 8, &v.u.bits[1], 8, ma, IOREQ_WRITE); 250 mmio_access(vcpu, padr + 8, (u64 *)&v.u.bits[1], 8,
251 ma, IOREQ_WRITE);
251 data = v.u.bits[0]; 252 data = v.u.bits[0];
252 size = 3; 253 size = 3;
253 } else if (inst.M10.major == 7 && inst.M10.x6 == 0x3B) { 254 } else if (inst.M10.major == 7 && inst.M10.x6 == 0x3B) {
@@ -265,7 +266,8 @@ void emulate_io_inst(struct kvm_vcpu *vcpu, u64 padr, u64 ma)
265 266
266 /* Write high word.FIXME: this is a kludge! */ 267 /* Write high word.FIXME: this is a kludge! */
267 v.u.bits[1] &= 0x3ffff; 268 v.u.bits[1] &= 0x3ffff;
268 mmio_access(vcpu, padr + 8, &v.u.bits[1], 8, ma, IOREQ_WRITE); 269 mmio_access(vcpu, padr + 8, (u64 *)&v.u.bits[1],
270 8, ma, IOREQ_WRITE);
269 data = v.u.bits[0]; 271 data = v.u.bits[0];
270 size = 3; 272 size = 3;
271 } else if (inst.M10.major == 7 && inst.M10.x6 == 0x31) { 273 } else if (inst.M10.major == 7 && inst.M10.x6 == 0x31) {
diff --git a/arch/ia64/kvm/process.c b/arch/ia64/kvm/process.c
index a8f84da04b49..bb862fb224f2 100644
--- a/arch/ia64/kvm/process.c
+++ b/arch/ia64/kvm/process.c
@@ -130,7 +130,7 @@ static void collect_interruption(struct kvm_vcpu *vcpu)
130 if (vdcr & IA64_DCR_PP) { 130 if (vdcr & IA64_DCR_PP) {
131 vpsr |= IA64_PSR_PP; 131 vpsr |= IA64_PSR_PP;
132 } else { 132 } else {
133 vpsr &= ~IA64_PSR_PP;; 133 vpsr &= ~IA64_PSR_PP;
134 } 134 }
135 135
136 vcpu_set_psr(vcpu, vpsr); 136 vcpu_set_psr(vcpu, vpsr);
@@ -594,11 +594,11 @@ static void set_pal_call_data(struct kvm_vcpu *vcpu)
594 p->u.pal_data.gr30 = vcpu_get_gr(vcpu, 30); 594 p->u.pal_data.gr30 = vcpu_get_gr(vcpu, 30);
595 break; 595 break;
596 case PAL_BRAND_INFO: 596 case PAL_BRAND_INFO:
597 p->u.pal_data.gr29 = gr29;; 597 p->u.pal_data.gr29 = gr29;
598 p->u.pal_data.gr30 = kvm_trans_pal_call_args(vcpu, gr30); 598 p->u.pal_data.gr30 = kvm_trans_pal_call_args(vcpu, gr30);
599 break; 599 break;
600 default: 600 default:
601 p->u.pal_data.gr29 = gr29;; 601 p->u.pal_data.gr29 = gr29;
602 p->u.pal_data.gr30 = vcpu_get_gr(vcpu, 30); 602 p->u.pal_data.gr30 = vcpu_get_gr(vcpu, 30);
603 } 603 }
604 p->u.pal_data.gr28 = gr28; 604 p->u.pal_data.gr28 = gr28;
diff --git a/arch/ia64/kvm/vcpu.c b/arch/ia64/kvm/vcpu.c
index a2c6c15e4761..cc406d064a09 100644
--- a/arch/ia64/kvm/vcpu.c
+++ b/arch/ia64/kvm/vcpu.c
@@ -406,7 +406,7 @@ void getreg(unsigned long regnum, unsigned long *val,
406 * Now look at registers in [0-31] range and init correct UNAT 406 * Now look at registers in [0-31] range and init correct UNAT
407 */ 407 */
408 addr = (unsigned long)regs; 408 addr = (unsigned long)regs;
409 unat = &regs->eml_unat;; 409 unat = &regs->eml_unat;
410 410
411 addr += gr_info[regnum]; 411 addr += gr_info[regnum];
412 412
@@ -461,7 +461,7 @@ void setreg(unsigned long regnum, unsigned long val,
461u64 vcpu_get_gr(struct kvm_vcpu *vcpu, unsigned long reg) 461u64 vcpu_get_gr(struct kvm_vcpu *vcpu, unsigned long reg)
462{ 462{
463 struct kvm_pt_regs *regs = vcpu_regs(vcpu); 463 struct kvm_pt_regs *regs = vcpu_regs(vcpu);
464 u64 val; 464 unsigned long val;
465 465
466 if (!reg) 466 if (!reg)
467 return 0; 467 return 0;
@@ -469,7 +469,7 @@ u64 vcpu_get_gr(struct kvm_vcpu *vcpu, unsigned long reg)
469 return val; 469 return val;
470} 470}
471 471
472void vcpu_set_gr(struct kvm_vcpu *vcpu, u64 reg, u64 value, int nat) 472void vcpu_set_gr(struct kvm_vcpu *vcpu, unsigned long reg, u64 value, int nat)
473{ 473{
474 struct kvm_pt_regs *regs = vcpu_regs(vcpu); 474 struct kvm_pt_regs *regs = vcpu_regs(vcpu);
475 long sof = (regs->cr_ifs) & 0x7f; 475 long sof = (regs->cr_ifs) & 0x7f;
@@ -1072,7 +1072,7 @@ void kvm_ttag(struct kvm_vcpu *vcpu, INST64 inst)
1072 vcpu_set_gr(vcpu, inst.M46.r1, tag, 0); 1072 vcpu_set_gr(vcpu, inst.M46.r1, tag, 0);
1073} 1073}
1074 1074
1075int vcpu_tpa(struct kvm_vcpu *vcpu, u64 vadr, u64 *padr) 1075int vcpu_tpa(struct kvm_vcpu *vcpu, u64 vadr, unsigned long *padr)
1076{ 1076{
1077 struct thash_data *data; 1077 struct thash_data *data;
1078 union ia64_isr visr, pt_isr; 1078 union ia64_isr visr, pt_isr;
diff --git a/arch/ia64/kvm/vcpu.h b/arch/ia64/kvm/vcpu.h
index 042af92ced83..360724d3ae69 100644
--- a/arch/ia64/kvm/vcpu.h
+++ b/arch/ia64/kvm/vcpu.h
@@ -686,14 +686,15 @@ static inline int highest_inservice_irq(struct kvm_vcpu *vcpu)
686 return highest_bits((int *)&(VMX(vcpu, insvc[0]))); 686 return highest_bits((int *)&(VMX(vcpu, insvc[0])));
687} 687}
688 688
689extern void vcpu_get_fpreg(struct kvm_vcpu *vcpu, u64 reg, 689extern void vcpu_get_fpreg(struct kvm_vcpu *vcpu, unsigned long reg,
690 struct ia64_fpreg *val); 690 struct ia64_fpreg *val);
691extern void vcpu_set_fpreg(struct kvm_vcpu *vcpu, u64 reg, 691extern void vcpu_set_fpreg(struct kvm_vcpu *vcpu, unsigned long reg,
692 struct ia64_fpreg *val); 692 struct ia64_fpreg *val);
693extern u64 vcpu_get_gr(struct kvm_vcpu *vcpu, u64 reg); 693extern u64 vcpu_get_gr(struct kvm_vcpu *vcpu, unsigned long reg);
694extern void vcpu_set_gr(struct kvm_vcpu *vcpu, u64 reg, u64 val, int nat); 694extern void vcpu_set_gr(struct kvm_vcpu *vcpu, unsigned long reg,
695extern u64 vcpu_get_psr(struct kvm_vcpu *vcpu); 695 u64 val, int nat);
696extern void vcpu_set_psr(struct kvm_vcpu *vcpu, u64 val); 696extern unsigned long vcpu_get_psr(struct kvm_vcpu *vcpu);
697extern void vcpu_set_psr(struct kvm_vcpu *vcpu, unsigned long val);
697extern u64 vcpu_thash(struct kvm_vcpu *vcpu, u64 vadr); 698extern u64 vcpu_thash(struct kvm_vcpu *vcpu, u64 vadr);
698extern void vcpu_bsw0(struct kvm_vcpu *vcpu); 699extern void vcpu_bsw0(struct kvm_vcpu *vcpu);
699extern void thash_vhpt_insert(struct kvm_vcpu *v, u64 pte, 700extern void thash_vhpt_insert(struct kvm_vcpu *v, u64 pte,
diff --git a/arch/ia64/kvm/vtlb.c b/arch/ia64/kvm/vtlb.c
index 4290a429bf7c..20b3852f7a6e 100644
--- a/arch/ia64/kvm/vtlb.c
+++ b/arch/ia64/kvm/vtlb.c
@@ -135,7 +135,7 @@ struct thash_data *__vtr_lookup(struct kvm_vcpu *vcpu, u64 va, int type)
135 u64 rid; 135 u64 rid;
136 136
137 rid = vcpu_get_rr(vcpu, va); 137 rid = vcpu_get_rr(vcpu, va);
138 rid = rid & RR_RID_MASK;; 138 rid = rid & RR_RID_MASK;
139 if (type == D_TLB) { 139 if (type == D_TLB) {
140 if (vcpu_quick_region_check(vcpu->arch.dtr_regions, va)) { 140 if (vcpu_quick_region_check(vcpu->arch.dtr_regions, va)) {
141 for (trp = (struct thash_data *)&vcpu->arch.dtrs, i = 0; 141 for (trp = (struct thash_data *)&vcpu->arch.dtrs, i = 0;
@@ -518,7 +518,7 @@ struct thash_data *vtlb_lookup(struct kvm_vcpu *v, u64 va, int is_data)
518 518
519 struct thash_cb *hcb = &v->arch.vtlb; 519 struct thash_cb *hcb = &v->arch.vtlb;
520 520
521 cch = __vtr_lookup(v, va, is_data);; 521 cch = __vtr_lookup(v, va, is_data);
522 if (cch) 522 if (cch)
523 return cch; 523 return cch;
524 524
diff --git a/arch/ia64/lib/ip_fast_csum.S b/arch/ia64/lib/ip_fast_csum.S
index 1f86aeb2c948..620d9dc5220f 100644
--- a/arch/ia64/lib/ip_fast_csum.S
+++ b/arch/ia64/lib/ip_fast_csum.S
@@ -96,20 +96,22 @@ END(ip_fast_csum)
96GLOBAL_ENTRY(csum_ipv6_magic) 96GLOBAL_ENTRY(csum_ipv6_magic)
97 ld4 r20=[in0],4 97 ld4 r20=[in0],4
98 ld4 r21=[in1],4 98 ld4 r21=[in1],4
99 dep r15=in3,in2,32,16 99 zxt4 in2=in2
100 ;; 100 ;;
101 ld4 r22=[in0],4 101 ld4 r22=[in0],4
102 ld4 r23=[in1],4 102 ld4 r23=[in1],4
103 mux1 r15=r15,@rev 103 dep r15=in3,in2,32,16
104 ;; 104 ;;
105 ld4 r24=[in0],4 105 ld4 r24=[in0],4
106 ld4 r25=[in1],4 106 ld4 r25=[in1],4
107 shr.u r15=r15,16 107 mux1 r15=r15,@rev
108 add r16=r20,r21 108 add r16=r20,r21
109 add r17=r22,r23 109 add r17=r22,r23
110 zxt4 in4=in4
110 ;; 111 ;;
111 ld4 r26=[in0],4 112 ld4 r26=[in0],4
112 ld4 r27=[in1],4 113 ld4 r27=[in1],4
114 shr.u r15=r15,16
113 add r18=r24,r25 115 add r18=r24,r25
114 add r8=r16,r17 116 add r8=r16,r17
115 ;; 117 ;;
diff --git a/arch/ia64/mm/contig.c b/arch/ia64/mm/contig.c
index 0ee085efbe29..2f724d2bf299 100644
--- a/arch/ia64/mm/contig.c
+++ b/arch/ia64/mm/contig.c
@@ -107,10 +107,10 @@ unsigned long bootmap_start;
107 * bootmap_start. This address must be page-aligned. 107 * bootmap_start. This address must be page-aligned.
108 */ 108 */
109static int __init 109static int __init
110find_bootmap_location (unsigned long start, unsigned long end, void *arg) 110find_bootmap_location (u64 start, u64 end, void *arg)
111{ 111{
112 unsigned long needed = *(unsigned long *)arg; 112 u64 needed = *(unsigned long *)arg;
113 unsigned long range_start, range_end, free_start; 113 u64 range_start, range_end, free_start;
114 int i; 114 int i;
115 115
116#if IGNORE_PFN0 116#if IGNORE_PFN0
@@ -229,8 +229,7 @@ find_memory (void)
229 alloc_per_cpu_data(); 229 alloc_per_cpu_data();
230} 230}
231 231
232static int 232static int count_pages(u64 start, u64 end, void *arg)
233count_pages (u64 start, u64 end, void *arg)
234{ 233{
235 unsigned long *count = arg; 234 unsigned long *count = arg;
236 235
diff --git a/arch/ia64/mm/fault.c b/arch/ia64/mm/fault.c
index 23088bed111e..19261a99e623 100644
--- a/arch/ia64/mm/fault.c
+++ b/arch/ia64/mm/fault.c
@@ -154,7 +154,7 @@ ia64_do_page_fault (unsigned long address, unsigned long isr, struct pt_regs *re
154 * sure we exit gracefully rather than endlessly redo the 154 * sure we exit gracefully rather than endlessly redo the
155 * fault. 155 * fault.
156 */ 156 */
157 fault = handle_mm_fault(mm, vma, address, (mask & VM_WRITE) != 0); 157 fault = handle_mm_fault(mm, vma, address, (mask & VM_WRITE) ? FAULT_FLAG_WRITE : 0);
158 if (unlikely(fault & VM_FAULT_ERROR)) { 158 if (unlikely(fault & VM_FAULT_ERROR)) {
159 /* 159 /*
160 * We ran out of memory, or some other thing happened 160 * We ran out of memory, or some other thing happened
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
index c0f3bee69042..b115b3bbf04a 100644
--- a/arch/ia64/mm/init.c
+++ b/arch/ia64/mm/init.c
@@ -422,8 +422,7 @@ retry_pte:
422 return hole_next_pfn - pgdat->node_start_pfn; 422 return hole_next_pfn - pgdat->node_start_pfn;
423} 423}
424 424
425int __init 425int __init create_mem_map_page_table(u64 start, u64 end, void *arg)
426create_mem_map_page_table (u64 start, u64 end, void *arg)
427{ 426{
428 unsigned long address, start_page, end_page; 427 unsigned long address, start_page, end_page;
429 struct page *map_start, *map_end; 428 struct page *map_start, *map_end;
@@ -469,7 +468,7 @@ struct memmap_init_callback_data {
469}; 468};
470 469
471static int __meminit 470static int __meminit
472virtual_memmap_init (u64 start, u64 end, void *arg) 471virtual_memmap_init(u64 start, u64 end, void *arg)
473{ 472{
474 struct memmap_init_callback_data *args; 473 struct memmap_init_callback_data *args;
475 struct page *map_start, *map_end; 474 struct page *map_start, *map_end;
@@ -531,8 +530,7 @@ ia64_pfn_valid (unsigned long pfn)
531} 530}
532EXPORT_SYMBOL(ia64_pfn_valid); 531EXPORT_SYMBOL(ia64_pfn_valid);
533 532
534int __init 533int __init find_largest_hole(u64 start, u64 end, void *arg)
535find_largest_hole (u64 start, u64 end, void *arg)
536{ 534{
537 u64 *max_gap = arg; 535 u64 *max_gap = arg;
538 536
@@ -548,8 +546,7 @@ find_largest_hole (u64 start, u64 end, void *arg)
548 546
549#endif /* CONFIG_VIRTUAL_MEM_MAP */ 547#endif /* CONFIG_VIRTUAL_MEM_MAP */
550 548
551int __init 549int __init register_active_ranges(u64 start, u64 len, int nid)
552register_active_ranges(u64 start, u64 len, int nid)
553{ 550{
554 u64 end = start + len; 551 u64 end = start + len;
555 552
@@ -567,7 +564,7 @@ register_active_ranges(u64 start, u64 len, int nid)
567} 564}
568 565
569static int __init 566static int __init
570count_reserved_pages (u64 start, u64 end, void *arg) 567count_reserved_pages(u64 start, u64 end, void *arg)
571{ 568{
572 unsigned long num_reserved = 0; 569 unsigned long num_reserved = 0;
573 unsigned long *count = arg; 570 unsigned long *count = arg;
@@ -580,7 +577,7 @@ count_reserved_pages (u64 start, u64 end, void *arg)
580} 577}
581 578
582int 579int
583find_max_min_low_pfn (unsigned long start, unsigned long end, void *arg) 580find_max_min_low_pfn (u64 start, u64 end, void *arg)
584{ 581{
585 unsigned long pfn_start, pfn_end; 582 unsigned long pfn_start, pfn_end;
586#ifdef CONFIG_FLATMEM 583#ifdef CONFIG_FLATMEM
diff --git a/arch/ia64/mm/tlb.c b/arch/ia64/mm/tlb.c
index b9f3d7bbb338..f426dc78d959 100644
--- a/arch/ia64/mm/tlb.c
+++ b/arch/ia64/mm/tlb.c
@@ -34,7 +34,7 @@
34#include <asm/tlb.h> 34#include <asm/tlb.h>
35 35
36static struct { 36static struct {
37 unsigned long mask; /* mask of supported purge page-sizes */ 37 u64 mask; /* mask of supported purge page-sizes */
38 unsigned long max_bits; /* log2 of largest supported purge page-size */ 38 unsigned long max_bits; /* log2 of largest supported purge page-size */
39} purge; 39} purge;
40 40
@@ -328,7 +328,7 @@ void __devinit
328ia64_tlb_init (void) 328ia64_tlb_init (void)
329{ 329{
330 ia64_ptce_info_t uninitialized_var(ptce_info); /* GCC be quiet */ 330 ia64_ptce_info_t uninitialized_var(ptce_info); /* GCC be quiet */
331 unsigned long tr_pgbits; 331 u64 tr_pgbits;
332 long status; 332 long status;
333 pal_vm_info_1_u_t vm_info_1; 333 pal_vm_info_1_u_t vm_info_1;
334 pal_vm_info_2_u_t vm_info_2; 334 pal_vm_info_2_u_t vm_info_2;
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c
index 61f1af5c23c1..7de76dd352fe 100644
--- a/arch/ia64/pci/pci.c
+++ b/arch/ia64/pci/pci.c
@@ -163,7 +163,7 @@ add_io_space (struct pci_root_info *info, struct acpi_resource_address64 *addr)
163{ 163{
164 struct resource *resource; 164 struct resource *resource;
165 char *name; 165 char *name;
166 u64 base, min, max, base_port; 166 unsigned long base, min, max, base_port;
167 unsigned int sparse = 0, space_nr, len; 167 unsigned int sparse = 0, space_nr, len;
168 168
169 resource = kzalloc(sizeof(*resource), GFP_KERNEL); 169 resource = kzalloc(sizeof(*resource), GFP_KERNEL);
@@ -292,7 +292,7 @@ static __devinit acpi_status add_window(struct acpi_resource *res, void *data)
292 window->offset = offset; 292 window->offset = offset;
293 293
294 if (insert_resource(root, &window->resource)) { 294 if (insert_resource(root, &window->resource)) {
295 printk(KERN_ERR "alloc 0x%lx-0x%lx from %s for %s failed\n", 295 printk(KERN_ERR "alloc 0x%llx-0x%llx from %s for %s failed\n",
296 window->resource.start, window->resource.end, 296 window->resource.start, window->resource.end,
297 root->name, info->name); 297 root->name, info->name);
298 } 298 }
@@ -314,8 +314,8 @@ pcibios_setup_root_windows(struct pci_bus *bus, struct pci_controller *ctrl)
314 (res->end - res->start < 16)) 314 (res->end - res->start < 16))
315 continue; 315 continue;
316 if (j >= PCI_BUS_NUM_RESOURCES) { 316 if (j >= PCI_BUS_NUM_RESOURCES) {
317 printk("Ignoring range [%lx-%lx] (%lx)\n", res->start, 317 printk("Ignoring range [%#llx-%#llx] (%lx)\n",
318 res->end, res->flags); 318 res->start, res->end, res->flags);
319 continue; 319 continue;
320 } 320 }
321 bus->resource[j++] = res; 321 bus->resource[j++] = res;
@@ -371,8 +371,6 @@ pci_acpi_scan_root(struct acpi_device *device, int domain, int bus)
371 * such quirk. So we just ignore the case now. 371 * such quirk. So we just ignore the case now.
372 */ 372 */
373 pbus = pci_scan_bus_parented(NULL, bus, &pci_root_ops, controller); 373 pbus = pci_scan_bus_parented(NULL, bus, &pci_root_ops, controller);
374 if (pbus)
375 pcibios_setup_root_windows(pbus, controller);
376 374
377 return pbus; 375 return pbus;
378 376
@@ -490,6 +488,8 @@ pcibios_fixup_bus (struct pci_bus *b)
490 if (b->self) { 488 if (b->self) {
491 pci_read_bridge_bases(b); 489 pci_read_bridge_bases(b);
492 pcibios_fixup_bridge_resources(b->self); 490 pcibios_fixup_bridge_resources(b->self);
491 } else {
492 pcibios_setup_root_windows(b, b->sysdata);
493 } 493 }
494 list_for_each_entry(dev, &b->devices, bus_list) 494 list_for_each_entry(dev, &b->devices, bus_list)
495 pcibios_fixup_device_resources(dev); 495 pcibios_fixup_device_resources(dev);
@@ -537,7 +537,7 @@ pcibios_align_resource (void *data, struct resource *res,
537/* 537/*
538 * PCI BIOS setup, always defaults to SAL interface 538 * PCI BIOS setup, always defaults to SAL interface
539 */ 539 */
540char * __devinit 540char * __init
541pcibios_setup (char *str) 541pcibios_setup (char *str)
542{ 542{
543 return str; 543 return str;
@@ -728,8 +728,8 @@ extern u8 pci_cache_line_size;
728 */ 728 */
729static void __init set_pci_cacheline_size(void) 729static void __init set_pci_cacheline_size(void)
730{ 730{
731 u64 levels, unique_caches; 731 unsigned long levels, unique_caches;
732 s64 status; 732 long status;
733 pal_cache_config_info_t cci; 733 pal_cache_config_info_t cci;
734 734
735 status = ia64_pal_cache_summary(&levels, &unique_caches); 735 status = ia64_pal_cache_summary(&levels, &unique_caches);
diff --git a/arch/ia64/sn/kernel/io_acpi_init.c b/arch/ia64/sn/kernel/io_acpi_init.c
index d0223abbbbd4..fd50ff94302b 100644
--- a/arch/ia64/sn/kernel/io_acpi_init.c
+++ b/arch/ia64/sn/kernel/io_acpi_init.c
@@ -40,7 +40,7 @@ struct sn_pcidev_match {
40/* 40/*
41 * Perform the early IO init in PROM. 41 * Perform the early IO init in PROM.
42 */ 42 */
43static s64 43static long
44sal_ioif_init(u64 *result) 44sal_ioif_init(u64 *result)
45{ 45{
46 struct ia64_sal_retval isrv = {0,0,0,0}; 46 struct ia64_sal_retval isrv = {0,0,0,0};
@@ -492,7 +492,7 @@ void __init
492sn_io_acpi_init(void) 492sn_io_acpi_init(void)
493{ 493{
494 u64 result; 494 u64 result;
495 s64 status; 495 long status;
496 496
497 /* SN Altix does not follow the IOSAPIC IRQ routing model */ 497 /* SN Altix does not follow the IOSAPIC IRQ routing model */
498 acpi_irq_model = ACPI_IRQ_MODEL_PLATFORM; 498 acpi_irq_model = ACPI_IRQ_MODEL_PLATFORM;
diff --git a/arch/ia64/sn/kernel/io_common.c b/arch/ia64/sn/kernel/io_common.c
index 57f280dd9def..25831c47c579 100644
--- a/arch/ia64/sn/kernel/io_common.c
+++ b/arch/ia64/sn/kernel/io_common.c
@@ -342,7 +342,7 @@ sn_common_bus_fixup(struct pci_bus *bus,
342 struct pcibus_bussoft *b = SN_PCIBUS_BUSSOFT(bus); 342 struct pcibus_bussoft *b = SN_PCIBUS_BUSSOFT(bus);
343 343
344 printk(KERN_WARNING "Device ASIC=%u XID=%u PBUSNUM=%u " 344 printk(KERN_WARNING "Device ASIC=%u XID=%u PBUSNUM=%u "
345 "L_IO=%lx L_MEM=%lx BASE=%lx\n", 345 "L_IO=%llx L_MEM=%llx BASE=%llx\n",
346 b->bs_asic_type, b->bs_xid, b->bs_persist_busnum, 346 b->bs_asic_type, b->bs_xid, b->bs_persist_busnum,
347 b->bs_legacy_io, b->bs_legacy_mem, b->bs_base); 347 b->bs_legacy_io, b->bs_legacy_mem, b->bs_base);
348 printk(KERN_WARNING "on node %d but only %d nodes online." 348 printk(KERN_WARNING "on node %d but only %d nodes online."
@@ -435,7 +435,8 @@ void sn_generate_path(struct pci_bus *pci_bus, char *address)
435 bricktype = MODULE_GET_BTYPE(moduleid); 435 bricktype = MODULE_GET_BTYPE(moduleid);
436 if ((bricktype == L1_BRICKTYPE_191010) || 436 if ((bricktype == L1_BRICKTYPE_191010) ||
437 (bricktype == L1_BRICKTYPE_1932)) 437 (bricktype == L1_BRICKTYPE_1932))
438 sprintf(address, "%s^%d", address, geo_slot(geoid)); 438 sprintf(address + strlen(address), "^%d",
439 geo_slot(geoid));
439} 440}
440 441
441void __devinit 442void __devinit
diff --git a/arch/ia64/sn/kernel/irq.c b/arch/ia64/sn/kernel/irq.c
index 764f26abac05..40d6eeda1c4b 100644
--- a/arch/ia64/sn/kernel/irq.c
+++ b/arch/ia64/sn/kernel/irq.c
@@ -295,13 +295,13 @@ unsigned int sn_local_vector_to_irq(u8 vector)
295void sn_irq_init(void) 295void sn_irq_init(void)
296{ 296{
297 int i; 297 int i;
298 irq_desc_t *base_desc = irq_desc; 298 struct irq_desc *base_desc = irq_desc;
299 299
300 ia64_first_device_vector = IA64_SN2_FIRST_DEVICE_VECTOR; 300 ia64_first_device_vector = IA64_SN2_FIRST_DEVICE_VECTOR;
301 ia64_last_device_vector = IA64_SN2_LAST_DEVICE_VECTOR; 301 ia64_last_device_vector = IA64_SN2_LAST_DEVICE_VECTOR;
302 302
303 for (i = 0; i < NR_IRQS; i++) { 303 for (i = 0; i < NR_IRQS; i++) {
304 if (base_desc[i].chip == &no_irq_type) { 304 if (base_desc[i].chip == &no_irq_chip) {
305 base_desc[i].chip = &irq_type_sn; 305 base_desc[i].chip = &irq_type_sn;
306 } 306 }
307 } 307 }
@@ -377,7 +377,7 @@ void sn_irq_fixup(struct pci_dev *pci_dev, struct sn_irq_info *sn_irq_info)
377 int cpu = nasid_slice_to_cpuid(nasid, slice); 377 int cpu = nasid_slice_to_cpuid(nasid, slice);
378#ifdef CONFIG_SMP 378#ifdef CONFIG_SMP
379 int cpuphys; 379 int cpuphys;
380 irq_desc_t *desc; 380 struct irq_desc *desc;
381#endif 381#endif
382 382
383 pci_dev_get(pci_dev); 383 pci_dev_get(pci_dev);
diff --git a/arch/ia64/sn/kernel/sn2/sn_hwperf.c b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
index 9e6491cf72bd..4c7e74790958 100644
--- a/arch/ia64/sn/kernel/sn2/sn_hwperf.c
+++ b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
@@ -414,7 +414,7 @@ static int sn_topology_show(struct seq_file *s, void *d)
414 } 414 }
415 seq_printf(s, "partition %u %s local " 415 seq_printf(s, "partition %u %s local "
416 "shubtype %s, " 416 "shubtype %s, "
417 "nasid_mask 0x%016lx, " 417 "nasid_mask 0x%016llx, "
418 "nasid_bits %d:%d, " 418 "nasid_bits %d:%d, "
419 "system_size %d, " 419 "system_size %d, "
420 "sharing_size %d, " 420 "sharing_size %d, "
@@ -683,7 +683,7 @@ static int sn_hwperf_map_err(int hwperf_err)
683 * ioctl for "sn_hwperf" misc device 683 * ioctl for "sn_hwperf" misc device
684 */ 684 */
685static int 685static int
686sn_hwperf_ioctl(struct inode *in, struct file *fp, u32 op, u64 arg) 686sn_hwperf_ioctl(struct inode *in, struct file *fp, u32 op, unsigned long arg)
687{ 687{
688 struct sn_hwperf_ioctl_args a; 688 struct sn_hwperf_ioctl_args a;
689 struct cpuinfo_ia64 *cdata; 689 struct cpuinfo_ia64 *cdata;
diff --git a/arch/ia64/sn/kernel/sn2/sn_proc_fs.c b/arch/ia64/sn/kernel/sn2/sn_proc_fs.c
index 2526e5c783a4..c76d8dc3aea3 100644
--- a/arch/ia64/sn/kernel/sn2/sn_proc_fs.c
+++ b/arch/ia64/sn/kernel/sn2/sn_proc_fs.c
@@ -36,7 +36,7 @@ static int system_serial_number_open(struct inode *inode, struct file *file)
36 36
37static int licenseID_show(struct seq_file *s, void *p) 37static int licenseID_show(struct seq_file *s, void *p)
38{ 38{
39 seq_printf(s, "0x%lx\n", sn_partition_serial_number_val()); 39 seq_printf(s, "0x%llx\n", sn_partition_serial_number_val());
40 return 0; 40 return 0;
41} 41}
42 42
diff --git a/arch/ia64/sn/kernel/tiocx.c b/arch/ia64/sn/kernel/tiocx.c
index 3f864238566d..c1bd1cfda327 100644
--- a/arch/ia64/sn/kernel/tiocx.c
+++ b/arch/ia64/sn/kernel/tiocx.c
@@ -368,7 +368,7 @@ static void tio_corelet_reset(nasid_t nasid, int corelet)
368static int is_fpga_tio(int nasid, int *bt) 368static int is_fpga_tio(int nasid, int *bt)
369{ 369{
370 u16 uninitialized_var(ioboard_type); /* GCC be quiet */ 370 u16 uninitialized_var(ioboard_type); /* GCC be quiet */
371 s64 rc; 371 long rc;
372 372
373 rc = ia64_sn_sysctl_ioboard_get(nasid, &ioboard_type); 373 rc = ia64_sn_sysctl_ioboard_get(nasid, &ioboard_type);
374 if (rc) { 374 if (rc) {
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_provider.c b/arch/ia64/sn/pci/pcibr/pcibr_provider.c
index 2c676cc05418..d13e5a22a558 100644
--- a/arch/ia64/sn/pci/pcibr/pcibr_provider.c
+++ b/arch/ia64/sn/pci/pcibr/pcibr_provider.c
@@ -79,7 +79,7 @@ static int sal_pcibr_error_interrupt(struct pcibus_info *soft)
79 79
80u16 sn_ioboard_to_pci_bus(struct pci_bus *pci_bus) 80u16 sn_ioboard_to_pci_bus(struct pci_bus *pci_bus)
81{ 81{
82 s64 rc; 82 long rc;
83 u16 uninitialized_var(ioboard); /* GCC be quiet */ 83 u16 uninitialized_var(ioboard); /* GCC be quiet */
84 nasid_t nasid = NASID_GET(SN_PCIBUS_BUSSOFT(pci_bus)->bs_base); 84 nasid_t nasid = NASID_GET(SN_PCIBUS_BUSSOFT(pci_bus)->bs_base);
85 85
diff --git a/arch/ia64/sn/pci/tioca_provider.c b/arch/ia64/sn/pci/tioca_provider.c
index 79165122501c..35b2a27d2e77 100644
--- a/arch/ia64/sn/pci/tioca_provider.c
+++ b/arch/ia64/sn/pci/tioca_provider.c
@@ -123,7 +123,7 @@ tioca_gart_init(struct tioca_kernel *tioca_kern)
123 123
124 if (!tmp) { 124 if (!tmp) {
125 printk(KERN_ERR "%s: Could not allocate " 125 printk(KERN_ERR "%s: Could not allocate "
126 "%lu bytes (order %d) for GART\n", 126 "%llu bytes (order %d) for GART\n",
127 __func__, 127 __func__,
128 tioca_kern->ca_gart_size, 128 tioca_kern->ca_gart_size,
129 get_order(tioca_kern->ca_gart_size)); 129 get_order(tioca_kern->ca_gart_size));
@@ -348,7 +348,7 @@ tioca_dma_d48(struct pci_dev *pdev, u64 paddr)
348 agp_dma_extn = __sn_readq_relaxed(&ca_base->ca_agp_dma_addr_extn); 348 agp_dma_extn = __sn_readq_relaxed(&ca_base->ca_agp_dma_addr_extn);
349 if (node_upper != (agp_dma_extn >> CA_AGP_DMA_NODE_ID_SHFT)) { 349 if (node_upper != (agp_dma_extn >> CA_AGP_DMA_NODE_ID_SHFT)) {
350 printk(KERN_ERR "%s: coretalk upper node (%u) " 350 printk(KERN_ERR "%s: coretalk upper node (%u) "
351 "mismatch with ca_agp_dma_addr_extn (%lu)\n", 351 "mismatch with ca_agp_dma_addr_extn (%llu)\n",
352 __func__, 352 __func__,
353 node_upper, (agp_dma_extn >> CA_AGP_DMA_NODE_ID_SHFT)); 353 node_upper, (agp_dma_extn >> CA_AGP_DMA_NODE_ID_SHFT));
354 return 0; 354 return 0;
@@ -367,7 +367,7 @@ tioca_dma_d48(struct pci_dev *pdev, u64 paddr)
367 * dma_addr_t is guaranteed to be contiguous in CA bus space. 367 * dma_addr_t is guaranteed to be contiguous in CA bus space.
368 */ 368 */
369static dma_addr_t 369static dma_addr_t
370tioca_dma_mapped(struct pci_dev *pdev, u64 paddr, size_t req_size) 370tioca_dma_mapped(struct pci_dev *pdev, unsigned long paddr, size_t req_size)
371{ 371{
372 int i, ps, ps_shift, entry, entries, mapsize, last_entry; 372 int i, ps, ps_shift, entry, entries, mapsize, last_entry;
373 u64 xio_addr, end_xio_addr; 373 u64 xio_addr, end_xio_addr;
diff --git a/arch/ia64/sn/pci/tioce_provider.c b/arch/ia64/sn/pci/tioce_provider.c
index 94e584527f48..012f3b82ee55 100644
--- a/arch/ia64/sn/pci/tioce_provider.c
+++ b/arch/ia64/sn/pci/tioce_provider.c
@@ -493,7 +493,7 @@ tioce_dma_unmap(struct pci_dev *pdev, dma_addr_t bus_addr, int dir)
493 493
494 if (&map->ce_dmamap_list == &ce_kern->ce_dmamap_list) { 494 if (&map->ce_dmamap_list == &ce_kern->ce_dmamap_list) {
495 printk(KERN_WARNING 495 printk(KERN_WARNING
496 "%s: %s - no map found for bus_addr 0x%lx\n", 496 "%s: %s - no map found for bus_addr 0x%llx\n",
497 __func__, pci_name(pdev), bus_addr); 497 __func__, pci_name(pdev), bus_addr);
498 } else if (--map->refcnt == 0) { 498 } else if (--map->refcnt == 0) {
499 for (i = 0; i < map->ate_count; i++) { 499 for (i = 0; i < map->ate_count; i++) {
@@ -642,7 +642,7 @@ dma_map_done:
642 * in the address. 642 * in the address.
643 */ 643 */
644static u64 644static u64
645tioce_dma(struct pci_dev *pdev, u64 paddr, size_t byte_count, int dma_flags) 645tioce_dma(struct pci_dev *pdev, unsigned long paddr, size_t byte_count, int dma_flags)
646{ 646{
647 return tioce_do_dma_map(pdev, paddr, byte_count, 0, dma_flags); 647 return tioce_do_dma_map(pdev, paddr, byte_count, 0, dma_flags);
648} 648}
@@ -657,7 +657,7 @@ tioce_dma(struct pci_dev *pdev, u64 paddr, size_t byte_count, int dma_flags)
657 * in the address. 657 * in the address.
658 */ 658 */
659static u64 659static u64
660tioce_dma_consistent(struct pci_dev *pdev, u64 paddr, size_t byte_count, int dma_flags) 660tioce_dma_consistent(struct pci_dev *pdev, unsigned long paddr, size_t byte_count, int dma_flags)
661{ 661{
662 return tioce_do_dma_map(pdev, paddr, byte_count, 1, dma_flags); 662 return tioce_do_dma_map(pdev, paddr, byte_count, 1, dma_flags);
663} 663}
diff --git a/arch/ia64/xen/irq_xen.c b/arch/ia64/xen/irq_xen.c
index af93aadb68bb..f042e192d2fe 100644
--- a/arch/ia64/xen/irq_xen.c
+++ b/arch/ia64/xen/irq_xen.c
@@ -138,7 +138,7 @@ static void
138__xen_register_percpu_irq(unsigned int cpu, unsigned int vec, 138__xen_register_percpu_irq(unsigned int cpu, unsigned int vec,
139 struct irqaction *action, int save) 139 struct irqaction *action, int save)
140{ 140{
141 irq_desc_t *desc; 141 struct irq_desc *desc;
142 int irq = 0; 142 int irq = 0;
143 143
144 if (xen_slab_ready) { 144 if (xen_slab_ready) {