aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/Kconfig12
-rw-r--r--arch/ia64/include/asm/compat.h208
-rw-r--r--arch/ia64/include/asm/hardirq.h11
-rw-r--r--arch/ia64/include/asm/iommu_table.h6
-rw-r--r--arch/ia64/kernel/Makefile1
-rw-r--r--arch/ia64/kernel/cyclone.c2
-rw-r--r--arch/ia64/kernel/fsys.S42
-rw-r--r--arch/ia64/kernel/iosapic.c60
-rw-r--r--arch/ia64/kernel/irq_ia64.c5
-rw-r--r--arch/ia64/kernel/mca.c38
-rw-r--r--arch/ia64/kernel/palinfo.c2
-rw-r--r--arch/ia64/kernel/perfmon.c12
-rw-r--r--arch/ia64/kernel/salinfo.c2
-rw-r--r--arch/ia64/kernel/setup.c4
-rw-r--r--arch/ia64/kernel/stacktrace.c39
-rw-r--r--arch/ia64/xen/xen_pv_ops.c5
16 files changed, 116 insertions, 333 deletions
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index ba22849ee3e..7c82fa1fc91 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -53,6 +53,9 @@ config MMU
53 bool 53 bool
54 default y 54 default y
55 55
56config ARCH_DMA_ADDR_T_64BIT
57 def_bool y
58
56config NEED_DMA_MAP_STATE 59config NEED_DMA_MAP_STATE
57 def_bool y 60 def_bool y
58 61
@@ -62,6 +65,9 @@ config NEED_SG_DMA_LENGTH
62config SWIOTLB 65config SWIOTLB
63 bool 66 bool
64 67
68config STACKTRACE_SUPPORT
69 def_bool y
70
65config GENERIC_LOCKBREAK 71config GENERIC_LOCKBREAK
66 def_bool n 72 def_bool n
67 73
@@ -683,8 +689,10 @@ source "lib/Kconfig"
683# Use the generic interrupt handling code in kernel/irq/: 689# Use the generic interrupt handling code in kernel/irq/:
684# 690#
685config GENERIC_HARDIRQS 691config GENERIC_HARDIRQS
686 bool 692 def_bool y
687 default y 693
694config GENERIC_HARDIRQS_NO__DO_IRQ
695 def_bool y
688 696
689config GENERIC_IRQ_PROBE 697config GENERIC_IRQ_PROBE
690 bool 698 bool
diff --git a/arch/ia64/include/asm/compat.h b/arch/ia64/include/asm/compat.h
deleted file mode 100644
index f90edc85b50..00000000000
--- a/arch/ia64/include/asm/compat.h
+++ /dev/null
@@ -1,208 +0,0 @@
1#ifndef _ASM_IA64_COMPAT_H
2#define _ASM_IA64_COMPAT_H
3/*
4 * Architecture specific compatibility types
5 */
6#include <linux/types.h>
7
8#define COMPAT_USER_HZ 100
9#define COMPAT_UTS_MACHINE "i686\0\0\0"
10
11typedef u32 compat_size_t;
12typedef s32 compat_ssize_t;
13typedef s32 compat_time_t;
14typedef s32 compat_clock_t;
15typedef s32 compat_key_t;
16typedef s32 compat_pid_t;
17typedef u16 __compat_uid_t;
18typedef u16 __compat_gid_t;
19typedef u32 __compat_uid32_t;
20typedef u32 __compat_gid32_t;
21typedef u16 compat_mode_t;
22typedef u32 compat_ino_t;
23typedef u16 compat_dev_t;
24typedef s32 compat_off_t;
25typedef s64 compat_loff_t;
26typedef u16 compat_nlink_t;
27typedef u16 compat_ipc_pid_t;
28typedef s32 compat_daddr_t;
29typedef u32 compat_caddr_t;
30typedef __kernel_fsid_t compat_fsid_t;
31typedef s32 compat_timer_t;
32
33typedef s32 compat_int_t;
34typedef s32 compat_long_t;
35typedef s64 __attribute__((aligned(4))) compat_s64;
36typedef u32 compat_uint_t;
37typedef u32 compat_ulong_t;
38typedef u64 __attribute__((aligned(4))) compat_u64;
39
40struct compat_timespec {
41 compat_time_t tv_sec;
42 s32 tv_nsec;
43};
44
45struct compat_timeval {
46 compat_time_t tv_sec;
47 s32 tv_usec;
48};
49
50struct compat_stat {
51 compat_dev_t st_dev;
52 u16 __pad1;
53 compat_ino_t st_ino;
54 compat_mode_t st_mode;
55 compat_nlink_t st_nlink;
56 __compat_uid_t st_uid;
57 __compat_gid_t st_gid;
58 compat_dev_t st_rdev;
59 u16 __pad2;
60 u32 st_size;
61 u32 st_blksize;
62 u32 st_blocks;
63 u32 st_atime;
64 u32 st_atime_nsec;
65 u32 st_mtime;
66 u32 st_mtime_nsec;
67 u32 st_ctime;
68 u32 st_ctime_nsec;
69 u32 __unused4;
70 u32 __unused5;
71};
72
73struct compat_flock {
74 short l_type;
75 short l_whence;
76 compat_off_t l_start;
77 compat_off_t l_len;
78 compat_pid_t l_pid;
79};
80
81#define F_GETLK64 12
82#define F_SETLK64 13
83#define F_SETLKW64 14
84
85/*
86 * IA32 uses 4 byte alignment for 64 bit quantities,
87 * so we need to pack this structure.
88 */
89struct compat_flock64 {
90 short l_type;
91 short l_whence;
92 compat_loff_t l_start;
93 compat_loff_t l_len;
94 compat_pid_t l_pid;
95} __attribute__((packed));
96
97struct compat_statfs {
98 int f_type;
99 int f_bsize;
100 int f_blocks;
101 int f_bfree;
102 int f_bavail;
103 int f_files;
104 int f_ffree;
105 compat_fsid_t f_fsid;
106 int f_namelen; /* SunOS ignores this field. */
107 int f_frsize;
108 int f_spare[5];
109};
110
111#define COMPAT_RLIM_OLD_INFINITY 0x7fffffff
112#define COMPAT_RLIM_INFINITY 0xffffffff
113
114typedef u32 compat_old_sigset_t; /* at least 32 bits */
115
116#define _COMPAT_NSIG 64
117#define _COMPAT_NSIG_BPW 32
118
119typedef u32 compat_sigset_word;
120
121#define COMPAT_OFF_T_MAX 0x7fffffff
122#define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL
123
124struct compat_ipc64_perm {
125 compat_key_t key;
126 __compat_uid32_t uid;
127 __compat_gid32_t gid;
128 __compat_uid32_t cuid;
129 __compat_gid32_t cgid;
130 unsigned short mode;
131 unsigned short __pad1;
132 unsigned short seq;
133 unsigned short __pad2;
134 compat_ulong_t unused1;
135 compat_ulong_t unused2;
136};
137
138struct compat_semid64_ds {
139 struct compat_ipc64_perm sem_perm;
140 compat_time_t sem_otime;
141 compat_ulong_t __unused1;
142 compat_time_t sem_ctime;
143 compat_ulong_t __unused2;
144 compat_ulong_t sem_nsems;
145 compat_ulong_t __unused3;
146 compat_ulong_t __unused4;
147};
148
149struct compat_msqid64_ds {
150 struct compat_ipc64_perm msg_perm;
151 compat_time_t msg_stime;
152 compat_ulong_t __unused1;
153 compat_time_t msg_rtime;
154 compat_ulong_t __unused2;
155 compat_time_t msg_ctime;
156 compat_ulong_t __unused3;
157 compat_ulong_t msg_cbytes;
158 compat_ulong_t msg_qnum;
159 compat_ulong_t msg_qbytes;
160 compat_pid_t msg_lspid;
161 compat_pid_t msg_lrpid;
162 compat_ulong_t __unused4;
163 compat_ulong_t __unused5;
164};
165
166struct compat_shmid64_ds {
167 struct compat_ipc64_perm shm_perm;
168 compat_size_t shm_segsz;
169 compat_time_t shm_atime;
170 compat_ulong_t __unused1;
171 compat_time_t shm_dtime;
172 compat_ulong_t __unused2;
173 compat_time_t shm_ctime;
174 compat_ulong_t __unused3;
175 compat_pid_t shm_cpid;
176 compat_pid_t shm_lpid;
177 compat_ulong_t shm_nattch;
178 compat_ulong_t __unused4;
179 compat_ulong_t __unused5;
180};
181
182/*
183 * A pointer passed in from user mode. This should not be used for syscall parameters,
184 * just declare them as pointers because the syscall entry code will have appropriately
185 * converted them already.
186 */
187typedef u32 compat_uptr_t;
188
189static inline void __user *
190compat_ptr (compat_uptr_t uptr)
191{
192 return (void __user *) (unsigned long) uptr;
193}
194
195static inline compat_uptr_t
196ptr_to_compat(void __user *uptr)
197{
198 return (u32)(unsigned long)uptr;
199}
200
201static __inline__ void __user *
202compat_alloc_user_space (long len)
203{
204 struct pt_regs *regs = task_pt_regs(current);
205 return (void __user *) (((regs->r12 & 0xffffffff) & -16) - len);
206}
207
208#endif /* _ASM_IA64_COMPAT_H */
diff --git a/arch/ia64/include/asm/hardirq.h b/arch/ia64/include/asm/hardirq.h
index d514cd9edb4..8fb7d33a661 100644
--- a/arch/ia64/include/asm/hardirq.h
+++ b/arch/ia64/include/asm/hardirq.h
@@ -6,12 +6,6 @@
6 * David Mosberger-Tang <davidm@hpl.hp.com> 6 * David Mosberger-Tang <davidm@hpl.hp.com>
7 */ 7 */
8 8
9
10#include <linux/threads.h>
11#include <linux/irq.h>
12
13#include <asm/processor.h>
14
15/* 9/*
16 * No irq_cpustat_t for IA-64. The data is held in the per-CPU data structure. 10 * No irq_cpustat_t for IA-64. The data is held in the per-CPU data structure.
17 */ 11 */
@@ -20,6 +14,11 @@
20 14
21#define local_softirq_pending() (local_cpu_data->softirq_pending) 15#define local_softirq_pending() (local_cpu_data->softirq_pending)
22 16
17#include <linux/threads.h>
18#include <linux/irq.h>
19
20#include <asm/processor.h>
21
23extern void __iomem *ipi_base_addr; 22extern void __iomem *ipi_base_addr;
24 23
25void ack_bad_irq(unsigned int irq); 24void ack_bad_irq(unsigned int irq);
diff --git a/arch/ia64/include/asm/iommu_table.h b/arch/ia64/include/asm/iommu_table.h
new file mode 100644
index 00000000000..92c8d36ae5a
--- /dev/null
+++ b/arch/ia64/include/asm/iommu_table.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_IA64_IOMMU_TABLE_H
2#define _ASM_IA64_IOMMU_TABLE_H
3
4#define IOMMU_INIT_POST(_detect)
5
6#endif /* _ASM_IA64_IOMMU_TABLE_H */
diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
index db10b1e378b..395c2f216dd 100644
--- a/arch/ia64/kernel/Makefile
+++ b/arch/ia64/kernel/Makefile
@@ -34,6 +34,7 @@ obj-$(CONFIG_AUDIT) += audit.o
34obj-$(CONFIG_PCI_MSI) += msi_ia64.o 34obj-$(CONFIG_PCI_MSI) += msi_ia64.o
35mca_recovery-y += mca_drv.o mca_drv_asm.o 35mca_recovery-y += mca_drv.o mca_drv_asm.o
36obj-$(CONFIG_IA64_MC_ERR_INJECT)+= err_inject.o 36obj-$(CONFIG_IA64_MC_ERR_INJECT)+= err_inject.o
37obj-$(CONFIG_STACKTRACE) += stacktrace.o
37 38
38obj-$(CONFIG_PARAVIRT) += paravirt.o paravirtentry.o \ 39obj-$(CONFIG_PARAVIRT) += paravirt.o paravirtentry.o \
39 paravirt_patch.o 40 paravirt_patch.o
diff --git a/arch/ia64/kernel/cyclone.c b/arch/ia64/kernel/cyclone.c
index 71e35864d2e..d52f1f78eff 100644
--- a/arch/ia64/kernel/cyclone.c
+++ b/arch/ia64/kernel/cyclone.c
@@ -59,13 +59,13 @@ int __init init_cyclone_clock(void)
59 return -ENODEV; 59 return -ENODEV;
60 } 60 }
61 base = readq(reg); 61 base = readq(reg);
62 iounmap(reg);
62 if(!base){ 63 if(!base){
63 printk(KERN_ERR "Summit chipset: Could not find valid CBAR" 64 printk(KERN_ERR "Summit chipset: Could not find valid CBAR"
64 " value.\n"); 65 " value.\n");
65 use_cyclone = 0; 66 use_cyclone = 0;
66 return -ENODEV; 67 return -ENODEV;
67 } 68 }
68 iounmap(reg);
69 69
70 /* setup PMCC */ 70 /* setup PMCC */
71 offset = (base + CYCLONE_PMCC_OFFSET); 71 offset = (base + CYCLONE_PMCC_OFFSET);
diff --git a/arch/ia64/kernel/fsys.S b/arch/ia64/kernel/fsys.S
index 471a1e783ac..331d42bda77 100644
--- a/arch/ia64/kernel/fsys.S
+++ b/arch/ia64/kernel/fsys.S
@@ -420,34 +420,31 @@ EX(.fail_efault, ld8 r14=[r33]) // r14 <- *set
420 ;; 420 ;;
421 421
422 RSM_PSR_I(p0, r18, r19) // mask interrupt delivery 422 RSM_PSR_I(p0, r18, r19) // mask interrupt delivery
423 mov ar.ccv=0
424 andcm r14=r14,r17 // filter out SIGKILL & SIGSTOP 423 andcm r14=r14,r17 // filter out SIGKILL & SIGSTOP
424 mov r8=EINVAL // default to EINVAL
425 425
426#ifdef CONFIG_SMP 426#ifdef CONFIG_SMP
427 // __ticket_spin_trylock(r31) 427 // __ticket_spin_trylock(r31)
428 ld4 r17=[r31] 428 ld4 r17=[r31]
429 mov r8=EINVAL // default to EINVAL
430 ;;
431 extr r9=r17,17,15
432 ;; 429 ;;
433 xor r18=r17,r9 430 mov.m ar.ccv=r17
431 extr.u r9=r17,17,15
434 adds r19=1,r17 432 adds r19=1,r17
433 extr.u r18=r17,0,15
435 ;; 434 ;;
436 extr.u r18=r18,0,15 435 cmp.eq p6,p7=r9,r18
437 ;; 436 ;;
438 cmp.eq p0,p7=0,r18 437(p6) cmpxchg4.acq r9=[r31],r19,ar.ccv
438(p6) dep.z r20=r19,1,15 // next serving ticket for unlock
439(p7) br.cond.spnt.many .lock_contention 439(p7) br.cond.spnt.many .lock_contention
440 mov.m ar.ccv=r17
441 ;;
442 cmpxchg4.acq r9=[r31],r19,ar.ccv
443 ;; 440 ;;
444 cmp4.eq p0,p7=r9,r17 441 cmp4.eq p0,p7=r9,r17
442 adds r31=2,r31
445(p7) br.cond.spnt.many .lock_contention 443(p7) br.cond.spnt.many .lock_contention
446 ld8 r3=[r2] // re-read current->blocked now that we hold the lock 444 ld8 r3=[r2] // re-read current->blocked now that we hold the lock
447 ;; 445 ;;
448#else 446#else
449 ld8 r3=[r2] // re-read current->blocked now that we hold the lock 447 ld8 r3=[r2] // re-read current->blocked now that we hold the lock
450 mov r8=EINVAL // default to EINVAL
451#endif 448#endif
452 add r18=IA64_TASK_PENDING_OFFSET+IA64_SIGPENDING_SIGNAL_OFFSET,r16 449 add r18=IA64_TASK_PENDING_OFFSET+IA64_SIGPENDING_SIGNAL_OFFSET,r16
453 add r19=IA64_TASK_SIGNAL_OFFSET,r16 450 add r19=IA64_TASK_SIGNAL_OFFSET,r16
@@ -503,16 +500,8 @@ EX(.fail_efault, ld8 r14=[r33]) // r14 <- *set
503 500
504#ifdef CONFIG_SMP 501#ifdef CONFIG_SMP
505 // __ticket_spin_unlock(r31) 502 // __ticket_spin_unlock(r31)
506 adds r31=2,r31 503 st2.rel [r31]=r20
507 ;; 504 mov r20=0 // i must not leak kernel bits...
508 ld2.bias r2=[r31]
509 mov r3=65534
510 ;;
511 adds r2=2,r2
512 ;;
513 and r3=r3,r2
514 ;;
515 st2.rel [r31]=r3
516#endif 505#endif
517 SSM_PSR_I(p0, p9, r31) 506 SSM_PSR_I(p0, p9, r31)
518 ;; 507 ;;
@@ -535,16 +524,7 @@ EX(.fail_efault, (p15) st8 [r34]=r3)
535.sig_pending: 524.sig_pending:
536#ifdef CONFIG_SMP 525#ifdef CONFIG_SMP
537 // __ticket_spin_unlock(r31) 526 // __ticket_spin_unlock(r31)
538 adds r31=2,r31 527 st2.rel [r31]=r20 // release the lock
539 ;;
540 ld2.bias r2=[r31]
541 mov r3=65534
542 ;;
543 adds r2=2,r2
544 ;;
545 and r3=r3,r2
546 ;;
547 st2.rel [r31]=r3
548#endif 528#endif
549 SSM_PSR_I(p0, p9, r17) 529 SSM_PSR_I(p0, p9, r17)
550 ;; 530 ;;
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c
index 7ded76658d2..22c38404f53 100644
--- a/arch/ia64/kernel/iosapic.c
+++ b/arch/ia64/kernel/iosapic.c
@@ -108,10 +108,6 @@
108#define DBG(fmt...) 108#define DBG(fmt...)
109#endif 109#endif
110 110
111#define NR_PREALLOCATE_RTE_ENTRIES \
112 (PAGE_SIZE / sizeof(struct iosapic_rte_info))
113#define RTE_PREALLOCATED (1)
114
115static DEFINE_SPINLOCK(iosapic_lock); 111static DEFINE_SPINLOCK(iosapic_lock);
116 112
117/* 113/*
@@ -136,7 +132,6 @@ struct iosapic_rte_info {
136 struct list_head rte_list; /* RTEs sharing the same vector */ 132 struct list_head rte_list; /* RTEs sharing the same vector */
137 char rte_index; /* IOSAPIC RTE index */ 133 char rte_index; /* IOSAPIC RTE index */
138 int refcnt; /* reference counter */ 134 int refcnt; /* reference counter */
139 unsigned int flags; /* flags */
140 struct iosapic *iosapic; 135 struct iosapic *iosapic;
141} ____cacheline_aligned; 136} ____cacheline_aligned;
142 137
@@ -155,9 +150,6 @@ static struct iosapic_intr_info {
155 150
156static unsigned char pcat_compat __devinitdata; /* 8259 compatibility flag */ 151static unsigned char pcat_compat __devinitdata; /* 8259 compatibility flag */
157 152
158static int iosapic_kmalloc_ok;
159static LIST_HEAD(free_rte_list);
160
161static inline void 153static inline void
162iosapic_write(struct iosapic *iosapic, unsigned int reg, u32 val) 154iosapic_write(struct iosapic *iosapic, unsigned int reg, u32 val)
163{ 155{
@@ -394,7 +386,7 @@ iosapic_startup_level_irq (unsigned int irq)
394} 386}
395 387
396static void 388static void
397iosapic_end_level_irq (unsigned int irq) 389iosapic_unmask_level_irq (unsigned int irq)
398{ 390{
399 ia64_vector vec = irq_to_vector(irq); 391 ia64_vector vec = irq_to_vector(irq);
400 struct iosapic_rte_info *rte; 392 struct iosapic_rte_info *rte;
@@ -404,7 +396,8 @@ iosapic_end_level_irq (unsigned int irq)
404 if (unlikely(irq_desc[irq].status & IRQ_MOVE_PENDING)) { 396 if (unlikely(irq_desc[irq].status & IRQ_MOVE_PENDING)) {
405 do_unmask_irq = 1; 397 do_unmask_irq = 1;
406 mask_irq(irq); 398 mask_irq(irq);
407 } 399 } else
400 unmask_irq(irq);
408 401
409 list_for_each_entry(rte, &iosapic_intr_info[irq].rtes, rte_list) 402 list_for_each_entry(rte, &iosapic_intr_info[irq].rtes, rte_list)
410 iosapic_eoi(rte->iosapic->addr, vec); 403 iosapic_eoi(rte->iosapic->addr, vec);
@@ -427,9 +420,8 @@ static struct irq_chip irq_type_iosapic_level = {
427 .enable = iosapic_enable_level_irq, 420 .enable = iosapic_enable_level_irq,
428 .disable = iosapic_disable_level_irq, 421 .disable = iosapic_disable_level_irq,
429 .ack = iosapic_ack_level_irq, 422 .ack = iosapic_ack_level_irq,
430 .end = iosapic_end_level_irq,
431 .mask = mask_irq, 423 .mask = mask_irq,
432 .unmask = unmask_irq, 424 .unmask = iosapic_unmask_level_irq,
433 .set_affinity = iosapic_set_affinity 425 .set_affinity = iosapic_set_affinity
434}; 426};
435 427
@@ -552,37 +544,6 @@ iosapic_reassign_vector (int irq)
552 } 544 }
553} 545}
554 546
555static struct iosapic_rte_info * __init_refok iosapic_alloc_rte (void)
556{
557 int i;
558 struct iosapic_rte_info *rte;
559 int preallocated = 0;
560
561 if (!iosapic_kmalloc_ok && list_empty(&free_rte_list)) {
562 rte = alloc_bootmem(sizeof(struct iosapic_rte_info) *
563 NR_PREALLOCATE_RTE_ENTRIES);
564 for (i = 0; i < NR_PREALLOCATE_RTE_ENTRIES; i++, rte++)
565 list_add(&rte->rte_list, &free_rte_list);
566 }
567
568 if (!list_empty(&free_rte_list)) {
569 rte = list_entry(free_rte_list.next, struct iosapic_rte_info,
570 rte_list);
571 list_del(&rte->rte_list);
572 preallocated++;
573 } else {
574 rte = kmalloc(sizeof(struct iosapic_rte_info), GFP_ATOMIC);
575 if (!rte)
576 return NULL;
577 }
578
579 memset(rte, 0, sizeof(struct iosapic_rte_info));
580 if (preallocated)
581 rte->flags |= RTE_PREALLOCATED;
582
583 return rte;
584}
585
586static inline int irq_is_shared (int irq) 547static inline int irq_is_shared (int irq)
587{ 548{
588 return (iosapic_intr_info[irq].count > 1); 549 return (iosapic_intr_info[irq].count > 1);
@@ -615,7 +576,7 @@ register_intr (unsigned int gsi, int irq, unsigned char delivery,
615 576
616 rte = find_rte(irq, gsi); 577 rte = find_rte(irq, gsi);
617 if (!rte) { 578 if (!rte) {
618 rte = iosapic_alloc_rte(); 579 rte = kzalloc(sizeof (*rte), GFP_ATOMIC);
619 if (!rte) { 580 if (!rte) {
620 printk(KERN_WARNING "%s: cannot allocate memory\n", 581 printk(KERN_WARNING "%s: cannot allocate memory\n",
621 __func__); 582 __func__);
@@ -658,6 +619,10 @@ register_intr (unsigned int gsi, int irq, unsigned char delivery,
658 idesc->chip->name, irq_type->name); 619 idesc->chip->name, irq_type->name);
659 idesc->chip = irq_type; 620 idesc->chip = irq_type;
660 } 621 }
622 if (trigger == IOSAPIC_EDGE)
623 __set_irq_handler_unlocked(irq, handle_edge_irq);
624 else
625 __set_irq_handler_unlocked(irq, handle_level_irq);
661 return 0; 626 return 0;
662} 627}
663 628
@@ -1161,10 +1126,3 @@ map_iosapic_to_node(unsigned int gsi_base, int node)
1161 return; 1126 return;
1162} 1127}
1163#endif 1128#endif
1164
1165static int __init iosapic_enable_kmalloc (void)
1166{
1167 iosapic_kmalloc_ok = 1;
1168 return 0;
1169}
1170core_initcall (iosapic_enable_kmalloc);
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c
index f14c35f9b03..9a26015c3e5 100644
--- a/arch/ia64/kernel/irq_ia64.c
+++ b/arch/ia64/kernel/irq_ia64.c
@@ -30,6 +30,7 @@
30#include <linux/bitops.h> 30#include <linux/bitops.h>
31#include <linux/irq.h> 31#include <linux/irq.h>
32#include <linux/ratelimit.h> 32#include <linux/ratelimit.h>
33#include <linux/acpi.h>
33 34
34#include <asm/delay.h> 35#include <asm/delay.h>
35#include <asm/intrinsics.h> 36#include <asm/intrinsics.h>
@@ -635,6 +636,7 @@ ia64_native_register_percpu_irq (ia64_vector vec, struct irqaction *action)
635 desc->chip = &irq_type_ia64_lsapic; 636 desc->chip = &irq_type_ia64_lsapic;
636 if (action) 637 if (action)
637 setup_irq(irq, action); 638 setup_irq(irq, action);
639 set_irq_handler(irq, handle_percpu_irq);
638} 640}
639 641
640void __init 642void __init
@@ -650,6 +652,9 @@ ia64_native_register_ipi(void)
650void __init 652void __init
651init_IRQ (void) 653init_IRQ (void)
652{ 654{
655#ifdef CONFIG_ACPI
656 acpi_boot_init();
657#endif
653 ia64_register_ipi(); 658 ia64_register_ipi();
654 register_percpu_irq(IA64_SPURIOUS_INT_VECTOR, NULL); 659 register_percpu_irq(IA64_SPURIOUS_INT_VECTOR, NULL);
655#ifdef CONFIG_SMP 660#ifdef CONFIG_SMP
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
index a0220dc5ff4..1753f6a30d5 100644
--- a/arch/ia64/kernel/mca.c
+++ b/arch/ia64/kernel/mca.c
@@ -2055,25 +2055,6 @@ ia64_mca_init(void)
2055 2055
2056 IA64_MCA_DEBUG("%s: registered OS INIT handler with SAL\n", __func__); 2056 IA64_MCA_DEBUG("%s: registered OS INIT handler with SAL\n", __func__);
2057 2057
2058 /*
2059 * Configure the CMCI/P vector and handler. Interrupts for CMC are
2060 * per-processor, so AP CMC interrupts are setup in smp_callin() (smpboot.c).
2061 */
2062 register_percpu_irq(IA64_CMC_VECTOR, &cmci_irqaction);
2063 register_percpu_irq(IA64_CMCP_VECTOR, &cmcp_irqaction);
2064 ia64_mca_cmc_vector_setup(); /* Setup vector on BSP */
2065
2066 /* Setup the MCA rendezvous interrupt vector */
2067 register_percpu_irq(IA64_MCA_RENDEZ_VECTOR, &mca_rdzv_irqaction);
2068
2069 /* Setup the MCA wakeup interrupt vector */
2070 register_percpu_irq(IA64_MCA_WAKEUP_VECTOR, &mca_wkup_irqaction);
2071
2072#ifdef CONFIG_ACPI
2073 /* Setup the CPEI/P handler */
2074 register_percpu_irq(IA64_CPEP_VECTOR, &mca_cpep_irqaction);
2075#endif
2076
2077 /* Initialize the areas set aside by the OS to buffer the 2058 /* Initialize the areas set aside by the OS to buffer the
2078 * platform/processor error states for MCA/INIT/CMC 2059 * platform/processor error states for MCA/INIT/CMC
2079 * handling. 2060 * handling.
@@ -2103,6 +2084,25 @@ ia64_mca_late_init(void)
2103 if (!mca_init) 2084 if (!mca_init)
2104 return 0; 2085 return 0;
2105 2086
2087 /*
2088 * Configure the CMCI/P vector and handler. Interrupts for CMC are
2089 * per-processor, so AP CMC interrupts are setup in smp_callin() (smpboot.c).
2090 */
2091 register_percpu_irq(IA64_CMC_VECTOR, &cmci_irqaction);
2092 register_percpu_irq(IA64_CMCP_VECTOR, &cmcp_irqaction);
2093 ia64_mca_cmc_vector_setup(); /* Setup vector on BSP */
2094
2095 /* Setup the MCA rendezvous interrupt vector */
2096 register_percpu_irq(IA64_MCA_RENDEZ_VECTOR, &mca_rdzv_irqaction);
2097
2098 /* Setup the MCA wakeup interrupt vector */
2099 register_percpu_irq(IA64_MCA_WAKEUP_VECTOR, &mca_wkup_irqaction);
2100
2101#ifdef CONFIG_ACPI
2102 /* Setup the CPEI/P handler */
2103 register_percpu_irq(IA64_CPEP_VECTOR, &mca_cpep_irqaction);
2104#endif
2105
2106 register_hotcpu_notifier(&mca_cpu_notifier); 2106 register_hotcpu_notifier(&mca_cpu_notifier);
2107 2107
2108 /* Setup the CMCI/P vector and handler */ 2108 /* Setup the CMCI/P vector and handler */
diff --git a/arch/ia64/kernel/palinfo.c b/arch/ia64/kernel/palinfo.c
index fdf6f9d013e..77597e5ea60 100644
--- a/arch/ia64/kernel/palinfo.c
+++ b/arch/ia64/kernel/palinfo.c
@@ -434,7 +434,7 @@ register_info(char *page)
434 unsigned long phys_stacked; 434 unsigned long phys_stacked;
435 pal_hints_u_t hints; 435 pal_hints_u_t hints;
436 unsigned long iregs, dregs; 436 unsigned long iregs, dregs;
437 char *info_type[]={ 437 static const char * const info_type[] = {
438 "Implemented AR(s)", 438 "Implemented AR(s)",
439 "AR(s) with read side-effects", 439 "AR(s) with read side-effects",
440 "Implemented CR(s)", 440 "Implemented CR(s)",
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
index cce050e85c7..6b1852f7f97 100644
--- a/arch/ia64/kernel/perfmon.c
+++ b/arch/ia64/kernel/perfmon.c
@@ -1573,7 +1573,7 @@ pfm_read(struct file *filp, char __user *buf, size_t size, loff_t *ppos)
1573 return -EINVAL; 1573 return -EINVAL;
1574 } 1574 }
1575 1575
1576 ctx = (pfm_context_t *)filp->private_data; 1576 ctx = filp->private_data;
1577 if (ctx == NULL) { 1577 if (ctx == NULL) {
1578 printk(KERN_ERR "perfmon: pfm_read: NULL ctx [%d]\n", task_pid_nr(current)); 1578 printk(KERN_ERR "perfmon: pfm_read: NULL ctx [%d]\n", task_pid_nr(current));
1579 return -EINVAL; 1579 return -EINVAL;
@@ -1673,7 +1673,7 @@ pfm_poll(struct file *filp, poll_table * wait)
1673 return 0; 1673 return 0;
1674 } 1674 }
1675 1675
1676 ctx = (pfm_context_t *)filp->private_data; 1676 ctx = filp->private_data;
1677 if (ctx == NULL) { 1677 if (ctx == NULL) {
1678 printk(KERN_ERR "perfmon: pfm_poll: NULL ctx [%d]\n", task_pid_nr(current)); 1678 printk(KERN_ERR "perfmon: pfm_poll: NULL ctx [%d]\n", task_pid_nr(current));
1679 return 0; 1679 return 0;
@@ -1733,7 +1733,7 @@ pfm_fasync(int fd, struct file *filp, int on)
1733 return -EBADF; 1733 return -EBADF;
1734 } 1734 }
1735 1735
1736 ctx = (pfm_context_t *)filp->private_data; 1736 ctx = filp->private_data;
1737 if (ctx == NULL) { 1737 if (ctx == NULL) {
1738 printk(KERN_ERR "perfmon: pfm_fasync NULL ctx [%d]\n", task_pid_nr(current)); 1738 printk(KERN_ERR "perfmon: pfm_fasync NULL ctx [%d]\n", task_pid_nr(current));
1739 return -EBADF; 1739 return -EBADF;
@@ -1841,7 +1841,7 @@ pfm_flush(struct file *filp, fl_owner_t id)
1841 return -EBADF; 1841 return -EBADF;
1842 } 1842 }
1843 1843
1844 ctx = (pfm_context_t *)filp->private_data; 1844 ctx = filp->private_data;
1845 if (ctx == NULL) { 1845 if (ctx == NULL) {
1846 printk(KERN_ERR "perfmon: pfm_flush: NULL ctx [%d]\n", task_pid_nr(current)); 1846 printk(KERN_ERR "perfmon: pfm_flush: NULL ctx [%d]\n", task_pid_nr(current));
1847 return -EBADF; 1847 return -EBADF;
@@ -1984,7 +1984,7 @@ pfm_close(struct inode *inode, struct file *filp)
1984 return -EBADF; 1984 return -EBADF;
1985 } 1985 }
1986 1986
1987 ctx = (pfm_context_t *)filp->private_data; 1987 ctx = filp->private_data;
1988 if (ctx == NULL) { 1988 if (ctx == NULL) {
1989 printk(KERN_ERR "perfmon: pfm_close: NULL ctx [%d]\n", task_pid_nr(current)); 1989 printk(KERN_ERR "perfmon: pfm_close: NULL ctx [%d]\n", task_pid_nr(current));
1990 return -EBADF; 1990 return -EBADF;
@@ -4907,7 +4907,7 @@ restart_args:
4907 goto error_args; 4907 goto error_args;
4908 } 4908 }
4909 4909
4910 ctx = (pfm_context_t *)file->private_data; 4910 ctx = file->private_data;
4911 if (unlikely(ctx == NULL)) { 4911 if (unlikely(ctx == NULL)) {
4912 DPRINT(("no context for fd %d\n", fd)); 4912 DPRINT(("no context for fd %d\n", fd));
4913 goto error_args; 4913 goto error_args;
diff --git a/arch/ia64/kernel/salinfo.c b/arch/ia64/kernel/salinfo.c
index aa8b5fa1a8d..45d7543b69c 100644
--- a/arch/ia64/kernel/salinfo.c
+++ b/arch/ia64/kernel/salinfo.c
@@ -642,7 +642,7 @@ salinfo_init(void)
642 for (i = 0; i < ARRAY_SIZE(salinfo_log_name); i++) { 642 for (i = 0; i < ARRAY_SIZE(salinfo_log_name); i++) {
643 data = salinfo_data + i; 643 data = salinfo_data + i;
644 data->type = i; 644 data->type = i;
645 init_MUTEX(&data->mutex); 645 sema_init(&data->mutex, 1);
646 dir = proc_mkdir(salinfo_log_name[i], salinfo_dir); 646 dir = proc_mkdir(salinfo_log_name[i], salinfo_dir);
647 if (!dir) 647 if (!dir)
648 continue; 648 continue;
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index 8fb958abf8d..911cf974970 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -594,10 +594,6 @@ setup_arch (char **cmdline_p)
594 cpu_init(); /* initialize the bootstrap CPU */ 594 cpu_init(); /* initialize the bootstrap CPU */
595 mmu_context_init(); /* initialize context_id bitmap */ 595 mmu_context_init(); /* initialize context_id bitmap */
596 596
597#ifdef CONFIG_ACPI
598 acpi_boot_init();
599#endif
600
601 paravirt_banner(); 597 paravirt_banner();
602 paravirt_arch_setup_console(cmdline_p); 598 paravirt_arch_setup_console(cmdline_p);
603 599
diff --git a/arch/ia64/kernel/stacktrace.c b/arch/ia64/kernel/stacktrace.c
new file mode 100644
index 00000000000..5af2783a87f
--- /dev/null
+++ b/arch/ia64/kernel/stacktrace.c
@@ -0,0 +1,39 @@
1/*
2 * arch/ia64/kernel/stacktrace.c
3 *
4 * Stack trace management functions
5 *
6 */
7#include <linux/sched.h>
8#include <linux/stacktrace.h>
9#include <linux/module.h>
10
11static void
12ia64_do_save_stack(struct unw_frame_info *info, void *arg)
13{
14 struct stack_trace *trace = arg;
15 unsigned long ip;
16 int skip = trace->skip;
17
18 trace->nr_entries = 0;
19 do {
20 unw_get_ip(info, &ip);
21 if (ip == 0)
22 break;
23 if (skip == 0) {
24 trace->entries[trace->nr_entries++] = ip;
25 if (trace->nr_entries == trace->max_entries)
26 break;
27 } else
28 skip--;
29 } while (unw_unwind(info) >= 0);
30}
31
32/*
33 * Save stack-backtrace addresses into a stack_trace buffer.
34 */
35void save_stack_trace(struct stack_trace *trace)
36{
37 unw_init_running(ia64_do_save_stack, trace);
38}
39EXPORT_SYMBOL(save_stack_trace);
diff --git a/arch/ia64/xen/xen_pv_ops.c b/arch/ia64/xen/xen_pv_ops.c
index 8adc6a14272..3e8d350fdf3 100644
--- a/arch/ia64/xen/xen_pv_ops.c
+++ b/arch/ia64/xen/xen_pv_ops.c
@@ -1136,7 +1136,6 @@ __initconst = {
1136static void __init 1136static void __init
1137xen_patch_branch(unsigned long tag, unsigned long type) 1137xen_patch_branch(unsigned long tag, unsigned long type)
1138{ 1138{
1139 const unsigned long nelem = 1139 __paravirt_patch_apply_branch(tag, type, xen_branch_target,
1140 sizeof(xen_branch_target) / sizeof(xen_branch_target[0]); 1140 ARRAY_SIZE(xen_branch_target));
1141 __paravirt_patch_apply_branch(tag, type, xen_branch_target, nelem);
1142} 1141}