diff options
Diffstat (limited to 'arch/ia64/kernel')
-rw-r--r-- | arch/ia64/kernel/Makefile | 1 | ||||
-rw-r--r-- | arch/ia64/kernel/cyclone.c | 2 | ||||
-rw-r--r-- | arch/ia64/kernel/fsys.S | 42 | ||||
-rw-r--r-- | arch/ia64/kernel/iosapic.c | 60 | ||||
-rw-r--r-- | arch/ia64/kernel/irq_ia64.c | 5 | ||||
-rw-r--r-- | arch/ia64/kernel/mca.c | 38 | ||||
-rw-r--r-- | arch/ia64/kernel/palinfo.c | 2 | ||||
-rw-r--r-- | arch/ia64/kernel/perfmon.c | 12 | ||||
-rw-r--r-- | arch/ia64/kernel/salinfo.c | 2 | ||||
-rw-r--r-- | arch/ia64/kernel/setup.c | 4 | ||||
-rw-r--r-- | arch/ia64/kernel/stacktrace.c | 39 |
11 files changed, 93 insertions, 114 deletions
diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile index db10b1e378b0..395c2f216dd8 100644 --- a/arch/ia64/kernel/Makefile +++ b/arch/ia64/kernel/Makefile | |||
@@ -34,6 +34,7 @@ obj-$(CONFIG_AUDIT) += audit.o | |||
34 | obj-$(CONFIG_PCI_MSI) += msi_ia64.o | 34 | obj-$(CONFIG_PCI_MSI) += msi_ia64.o |
35 | mca_recovery-y += mca_drv.o mca_drv_asm.o | 35 | mca_recovery-y += mca_drv.o mca_drv_asm.o |
36 | obj-$(CONFIG_IA64_MC_ERR_INJECT)+= err_inject.o | 36 | obj-$(CONFIG_IA64_MC_ERR_INJECT)+= err_inject.o |
37 | obj-$(CONFIG_STACKTRACE) += stacktrace.o | ||
37 | 38 | ||
38 | obj-$(CONFIG_PARAVIRT) += paravirt.o paravirtentry.o \ | 39 | obj-$(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 71e35864d2e2..d52f1f78eff2 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 471a1e783aca..331d42bda77a 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 7ded76658d2d..22c38404f539 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 | |||
115 | static DEFINE_SPINLOCK(iosapic_lock); | 111 | static 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 | ||
156 | static unsigned char pcat_compat __devinitdata; /* 8259 compatibility flag */ | 151 | static unsigned char pcat_compat __devinitdata; /* 8259 compatibility flag */ |
157 | 152 | ||
158 | static int iosapic_kmalloc_ok; | ||
159 | static LIST_HEAD(free_rte_list); | ||
160 | |||
161 | static inline void | 153 | static inline void |
162 | iosapic_write(struct iosapic *iosapic, unsigned int reg, u32 val) | 154 | iosapic_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 | ||
396 | static void | 388 | static void |
397 | iosapic_end_level_irq (unsigned int irq) | 389 | iosapic_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 | ||
555 | static 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 | |||
586 | static inline int irq_is_shared (int irq) | 547 | static 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 | |||
1165 | static int __init iosapic_enable_kmalloc (void) | ||
1166 | { | ||
1167 | iosapic_kmalloc_ok = 1; | ||
1168 | return 0; | ||
1169 | } | ||
1170 | core_initcall (iosapic_enable_kmalloc); | ||
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c index f14c35f9b03a..9a26015c3e50 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 | ||
640 | void __init | 642 | void __init |
@@ -650,6 +652,9 @@ ia64_native_register_ipi(void) | |||
650 | void __init | 652 | void __init |
651 | init_IRQ (void) | 653 | init_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 a0220dc5ff42..1753f6a30d55 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 fdf6f9d013e5..77597e5ea60a 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 cce050e85c73..6b1852f7f972 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 aa8b5fa1a8de..45d7543b69cc 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 8fb958abf8d0..911cf9749700 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 000000000000..5af2783a87f4 --- /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 | |||
11 | static void | ||
12 | ia64_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 | */ | ||
35 | void save_stack_trace(struct stack_trace *trace) | ||
36 | { | ||
37 | unw_init_running(ia64_do_save_stack, trace); | ||
38 | } | ||
39 | EXPORT_SYMBOL(save_stack_trace); | ||