aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew@wil.cx>2009-05-22 16:49:49 -0400
committerTony Luck <tony.luck@intel.com>2009-06-17 12:33:49 -0400
commite088a4ad7fa53c3dc3c29f930025f41ccf01953e (patch)
tree07b012952bbbaccfe4ef3bb44b1ea0a3a3bb3868 /arch
parente56e2dcd381d9ec35379328f332221581eda4787 (diff)
[IA64] Convert ia64 to use int-ll64.h
It is generally agreed that it would be beneficial for u64 to be an unsigned long long on all architectures. ia64 (in common with several other 64-bit architectures) currently uses unsigned long. Migrating piecemeal is too painful; this giant patch fixes all compilation warnings and errors that come as a result of switching to use int-ll64.h. Note that userspace will still see __u64 defined as unsigned long. This is important as it affects C++ name mangling. [Updated by Tony Luck to change efi.h:efi_freemem_callback_t to use u64 for start/end rather than unsigned long] Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/ia64/hp/common/sba_iommu.c2
-rw-r--r--arch/ia64/include/asm/gcc_intrin.h18
-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/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/types.h13
-rw-r--r--arch/ia64/kernel/efi.c10
-rw-r--r--arch/ia64/kernel/mca.c18
-rw-r--r--arch/ia64/kernel/module.c14
-rw-r--r--arch/ia64/kernel/palinfo.c68
-rw-r--r--arch/ia64/kernel/pci-dma.c2
-rw-r--r--arch/ia64/kernel/perfmon.c6
-rw-r--r--arch/ia64/kernel/setup.c32
-rw-r--r--arch/ia64/kernel/smp.c2
-rw-r--r--arch/ia64/kernel/smpboot.c2
-rw-r--r--arch/ia64/kernel/time.c2
-rw-r--r--arch/ia64/kernel/topology.c4
-rw-r--r--arch/ia64/kernel/uncached.c3
-rw-r--r--arch/ia64/mm/contig.c9
-rw-r--r--arch/ia64/mm/init.c15
-rw-r--r--arch/ia64/mm/tlb.c4
-rw-r--r--arch/ia64/pci/pci.c12
-rw-r--r--arch/ia64/sn/kernel/io_acpi_init.c4
-rw-r--r--arch/ia64/sn/kernel/io_common.c2
-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
33 files changed, 206 insertions, 204 deletions
diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c
index 56ceb68eb99d..21c04114ddd2 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/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/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/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/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/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/mca.c b/arch/ia64/kernel/mca.c
index 1cce4ceb48ac..c259b9467fcc 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
@@ -1918,9 +1918,9 @@ ia64_mca_init(void)
1918 ia64_fptr_t *init_hldlr_ptr_slave = (ia64_fptr_t *)ia64_os_init_dispatch_slave; 1918 ia64_fptr_t *init_hldlr_ptr_slave = (ia64_fptr_t *)ia64_os_init_dispatch_slave;
1919 ia64_fptr_t *mca_hldlr_ptr = (ia64_fptr_t *)ia64_os_mca_dispatch; 1919 ia64_fptr_t *mca_hldlr_ptr = (ia64_fptr_t *)ia64_os_mca_dispatch;
1920 int i; 1920 int i;
1921 s64 rc; 1921 long rc;
1922 struct ia64_sal_retval isrv; 1922 struct ia64_sal_retval isrv;
1923 u64 timeout = IA64_MCA_RENDEZ_TIMEOUT; /* platform specific */ 1923 unsigned long timeout = IA64_MCA_RENDEZ_TIMEOUT; /* platform specific */
1924 static struct notifier_block default_init_monarch_nb = { 1924 static struct notifier_block default_init_monarch_nb = {
1925 .notifier_call = default_monarch_init_process, 1925 .notifier_call = default_monarch_init_process,
1926 .priority = 0/* we need to notified last */ 1926 .priority = 0/* we need to notified last */
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/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/pci-dma.c b/arch/ia64/kernel/pci-dma.c
index eb987386f691..1376da45fd08 100644
--- a/arch/ia64/kernel/pci-dma.c
+++ b/arch/ia64/kernel/pci-dma.c
@@ -91,7 +91,7 @@ int iommu_dma_supported(struct device *dev, u64 mask)
91 type. Normally this doesn't make any difference, but gives 91 type. Normally this doesn't make any difference, but gives
92 more gentle handling of IOMMU overflow. */ 92 more gentle handling of IOMMU overflow. */
93 if (iommu_sac_force && (mask >= DMA_BIT_MASK(40))) { 93 if (iommu_sac_force && (mask >= DMA_BIT_MASK(40))) {
94 dev_info(dev, "Force SAC with mask %lx\n", mask); 94 dev_info(dev, "Force SAC with mask %llx\n", mask);
95 return 0; 95 return 0;
96 } 96 }
97 97
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
index 8a06dc480594..89ad0bbb8614 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;
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 2a70af473b36..de100aa7ff03 100644
--- a/arch/ia64/kernel/smpboot.c
+++ b/arch/ia64/kernel/smpboot.c
@@ -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..bc80dff1df7a 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
diff --git a/arch/ia64/kernel/uncached.c b/arch/ia64/kernel/uncached.c
index 8eff8c1d40a6..e6ac3c332d17 100644
--- a/arch/ia64/kernel/uncached.c
+++ b/arch/ia64/kernel/uncached.c
@@ -249,8 +249,7 @@ EXPORT_SYMBOL(uncached_free_page);
249 * Called at boot time to build a map of pages that can be used for 249 * Called at boot time to build a map of pages that can be used for
250 * memory special operations. 250 * memory special operations.
251 */ 251 */
252static int __init uncached_build_memmap(unsigned long uc_start, 252static int __init uncached_build_memmap(u64 uc_start, u64 uc_end, void *arg)
253 unsigned long uc_end, void *arg)
254{ 253{
255 int nid = paddr_to_nid(uc_start - __IA64_UNCACHED_OFFSET); 254 int nid = paddr_to_nid(uc_start - __IA64_UNCACHED_OFFSET);
256 struct gen_pool *pool = uncached_pools[nid].pool; 255 struct gen_pool *pool = uncached_pools[nid].pool;
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/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..e643373e4701 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;
@@ -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..76645cf6ac5d 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."
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}