diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-29 12:23:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-29 12:23:17 -0400 |
commit | a87451052fb914744571fc3ab39fcbf4fa4ef944 (patch) | |
tree | 94d5d4edded03ffa4340d6486a9e9359abf1ef02 /arch/ia64/kernel | |
parent | 916bb6d76dfa49b540baa3f7262792d1de7f1c24 (diff) | |
parent | 797f6a684f28dbb00f9e9719315574e344fcbf53 (diff) |
Merge tag 'please-pull-misc-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux
Pull ia64 fixes from Tony Luck:
"Bundle of miscellaneous ia64 fixes for 3.10 merge window."
* tag 'please-pull-misc-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux:
Add size restriction to the kdump documentation
Fix example error_injection_tool
Fix build error for numa_clear_node() under IA64
Fix initialization of CMCI/CMCP interrupts
Change "select DMAR" to "select INTEL_IOMMU"
Wrong asm register contraints in the kvm implementation
Wrong asm register contraints in the futex implementation
Remove cast for kmalloc return value
Fix kexec oops when iosapic was removed
iosapic: fix a minor typo in comments
Add WB/UC check for early_ioremap
Fix broken fsys_getppid()
tiocx: check retval from bus_register()
Diffstat (limited to 'arch/ia64/kernel')
-rw-r--r-- | arch/ia64/kernel/fsys.S | 49 | ||||
-rw-r--r-- | arch/ia64/kernel/iosapic.c | 34 | ||||
-rw-r--r-- | arch/ia64/kernel/irq.c | 8 | ||||
-rw-r--r-- | arch/ia64/kernel/mca.c | 37 | ||||
-rw-r--r-- | arch/ia64/kernel/mca_drv.c | 2 |
5 files changed, 66 insertions, 64 deletions
diff --git a/arch/ia64/kernel/fsys.S b/arch/ia64/kernel/fsys.S index c4cd45d97749..abc6dee3799c 100644 --- a/arch/ia64/kernel/fsys.S +++ b/arch/ia64/kernel/fsys.S | |||
@@ -90,53 +90,6 @@ ENTRY(fsys_getpid) | |||
90 | FSYS_RETURN | 90 | FSYS_RETURN |
91 | END(fsys_getpid) | 91 | END(fsys_getpid) |
92 | 92 | ||
93 | ENTRY(fsys_getppid) | ||
94 | .prologue | ||
95 | .altrp b6 | ||
96 | .body | ||
97 | add r17=IA64_TASK_GROUP_LEADER_OFFSET,r16 | ||
98 | ;; | ||
99 | ld8 r17=[r17] // r17 = current->group_leader | ||
100 | add r9=TI_FLAGS+IA64_TASK_SIZE,r16 | ||
101 | ;; | ||
102 | |||
103 | ld4 r9=[r9] | ||
104 | add r17=IA64_TASK_REAL_PARENT_OFFSET,r17 // r17 = ¤t->group_leader->real_parent | ||
105 | ;; | ||
106 | and r9=TIF_ALLWORK_MASK,r9 | ||
107 | |||
108 | 1: ld8 r18=[r17] // r18 = current->group_leader->real_parent | ||
109 | ;; | ||
110 | cmp.ne p8,p0=0,r9 | ||
111 | add r8=IA64_TASK_TGID_OFFSET,r18 // r8 = ¤t->group_leader->real_parent->tgid | ||
112 | ;; | ||
113 | |||
114 | /* | ||
115 | * The .acq is needed to ensure that the read of tgid has returned its data before | ||
116 | * we re-check "real_parent". | ||
117 | */ | ||
118 | ld4.acq r8=[r8] // r8 = current->group_leader->real_parent->tgid | ||
119 | #ifdef CONFIG_SMP | ||
120 | /* | ||
121 | * Re-read current->group_leader->real_parent. | ||
122 | */ | ||
123 | ld8 r19=[r17] // r19 = current->group_leader->real_parent | ||
124 | (p8) br.spnt.many fsys_fallback_syscall | ||
125 | ;; | ||
126 | cmp.ne p6,p0=r18,r19 // did real_parent change? | ||
127 | mov r19=0 // i must not leak kernel bits... | ||
128 | (p6) br.cond.spnt.few 1b // yes -> redo the read of tgid and the check | ||
129 | ;; | ||
130 | mov r17=0 // i must not leak kernel bits... | ||
131 | mov r18=0 // i must not leak kernel bits... | ||
132 | #else | ||
133 | mov r17=0 // i must not leak kernel bits... | ||
134 | mov r18=0 // i must not leak kernel bits... | ||
135 | mov r19=0 // i must not leak kernel bits... | ||
136 | #endif | ||
137 | FSYS_RETURN | ||
138 | END(fsys_getppid) | ||
139 | |||
140 | ENTRY(fsys_set_tid_address) | 93 | ENTRY(fsys_set_tid_address) |
141 | .prologue | 94 | .prologue |
142 | .altrp b6 | 95 | .altrp b6 |
@@ -614,7 +567,7 @@ paravirt_fsyscall_table: | |||
614 | data8 0 // chown | 567 | data8 0 // chown |
615 | data8 0 // lseek // 1040 | 568 | data8 0 // lseek // 1040 |
616 | data8 fsys_getpid // getpid | 569 | data8 fsys_getpid // getpid |
617 | data8 fsys_getppid // getppid | 570 | data8 0 // getppid |
618 | data8 0 // mount | 571 | data8 0 // mount |
619 | data8 0 // umount | 572 | data8 0 // umount |
620 | data8 0 // setuid // 1045 | 573 | data8 0 // setuid // 1045 |
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c index ee33c3aaa2fc..19f107be734e 100644 --- a/arch/ia64/kernel/iosapic.c +++ b/arch/ia64/kernel/iosapic.c | |||
@@ -76,7 +76,7 @@ | |||
76 | * PCI pin -> global system interrupt (GSI) -> IA-64 vector <-> IRQ | 76 | * PCI pin -> global system interrupt (GSI) -> IA-64 vector <-> IRQ |
77 | * | 77 | * |
78 | * Note: The term "IRQ" is loosely used everywhere in Linux kernel to | 78 | * Note: The term "IRQ" is loosely used everywhere in Linux kernel to |
79 | * describeinterrupts. Now we use "IRQ" only for Linux IRQ's. ISA IRQ | 79 | * describe interrupts. Now we use "IRQ" only for Linux IRQ's. ISA IRQ |
80 | * (isa_irq) is the only exception in this source code. | 80 | * (isa_irq) is the only exception in this source code. |
81 | */ | 81 | */ |
82 | 82 | ||
@@ -1010,6 +1010,26 @@ iosapic_check_gsi_range (unsigned int gsi_base, unsigned int ver) | |||
1010 | return 0; | 1010 | return 0; |
1011 | } | 1011 | } |
1012 | 1012 | ||
1013 | static int | ||
1014 | iosapic_delete_rte(unsigned int irq, unsigned int gsi) | ||
1015 | { | ||
1016 | struct iosapic_rte_info *rte, *temp; | ||
1017 | |||
1018 | list_for_each_entry_safe(rte, temp, &iosapic_intr_info[irq].rtes, | ||
1019 | rte_list) { | ||
1020 | if (rte->iosapic->gsi_base + rte->rte_index == gsi) { | ||
1021 | if (rte->refcnt) | ||
1022 | return -EBUSY; | ||
1023 | |||
1024 | list_del(&rte->rte_list); | ||
1025 | kfree(rte); | ||
1026 | return 0; | ||
1027 | } | ||
1028 | } | ||
1029 | |||
1030 | return -EINVAL; | ||
1031 | } | ||
1032 | |||
1013 | int iosapic_init(unsigned long phys_addr, unsigned int gsi_base) | 1033 | int iosapic_init(unsigned long phys_addr, unsigned int gsi_base) |
1014 | { | 1034 | { |
1015 | int num_rte, err, index; | 1035 | int num_rte, err, index; |
@@ -1069,7 +1089,7 @@ int iosapic_init(unsigned long phys_addr, unsigned int gsi_base) | |||
1069 | 1089 | ||
1070 | int iosapic_remove(unsigned int gsi_base) | 1090 | int iosapic_remove(unsigned int gsi_base) |
1071 | { | 1091 | { |
1072 | int index, err = 0; | 1092 | int i, irq, index, err = 0; |
1073 | unsigned long flags; | 1093 | unsigned long flags; |
1074 | 1094 | ||
1075 | spin_lock_irqsave(&iosapic_lock, flags); | 1095 | spin_lock_irqsave(&iosapic_lock, flags); |
@@ -1087,6 +1107,16 @@ int iosapic_remove(unsigned int gsi_base) | |||
1087 | goto out; | 1107 | goto out; |
1088 | } | 1108 | } |
1089 | 1109 | ||
1110 | for (i = gsi_base; i < gsi_base + iosapic_lists[index].num_rte; i++) { | ||
1111 | irq = __gsi_to_irq(i); | ||
1112 | if (irq < 0) | ||
1113 | continue; | ||
1114 | |||
1115 | err = iosapic_delete_rte(irq, i); | ||
1116 | if (err) | ||
1117 | goto out; | ||
1118 | } | ||
1119 | |||
1090 | iounmap(iosapic_lists[index].addr); | 1120 | iounmap(iosapic_lists[index].addr); |
1091 | iosapic_free(index); | 1121 | iosapic_free(index); |
1092 | out: | 1122 | out: |
diff --git a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c index ad69606613eb..f2c418281130 100644 --- a/arch/ia64/kernel/irq.c +++ b/arch/ia64/kernel/irq.c | |||
@@ -23,6 +23,8 @@ | |||
23 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
24 | #include <linux/kernel_stat.h> | 24 | #include <linux/kernel_stat.h> |
25 | 25 | ||
26 | #include <asm/mca.h> | ||
27 | |||
26 | /* | 28 | /* |
27 | * 'what should we do if we get a hw irq event on an illegal vector'. | 29 | * 'what should we do if we get a hw irq event on an illegal vector'. |
28 | * each architecture has to answer this themselves. | 30 | * each architecture has to answer this themselves. |
@@ -83,6 +85,12 @@ bool is_affinity_mask_valid(const struct cpumask *cpumask) | |||
83 | 85 | ||
84 | #endif /* CONFIG_SMP */ | 86 | #endif /* CONFIG_SMP */ |
85 | 87 | ||
88 | int __init arch_early_irq_init(void) | ||
89 | { | ||
90 | ia64_mca_irq_init(); | ||
91 | return 0; | ||
92 | } | ||
93 | |||
86 | #ifdef CONFIG_HOTPLUG_CPU | 94 | #ifdef CONFIG_HOTPLUG_CPU |
87 | unsigned int vectors_in_migration[NR_IRQS]; | 95 | unsigned int vectors_in_migration[NR_IRQS]; |
88 | 96 | ||
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c index 65bf9cd39044..d7396dbb07bb 100644 --- a/arch/ia64/kernel/mca.c +++ b/arch/ia64/kernel/mca.c | |||
@@ -2074,22 +2074,16 @@ ia64_mca_init(void) | |||
2074 | printk(KERN_INFO "MCA related initialization done\n"); | 2074 | printk(KERN_INFO "MCA related initialization done\n"); |
2075 | } | 2075 | } |
2076 | 2076 | ||
2077 | |||
2077 | /* | 2078 | /* |
2078 | * ia64_mca_late_init | 2079 | * These pieces cannot be done in ia64_mca_init() because it is called before |
2079 | * | 2080 | * early_irq_init() which would wipe out our percpu irq registrations. But we |
2080 | * Opportunity to setup things that require initialization later | 2081 | * cannot leave them until ia64_mca_late_init() because by then all the other |
2081 | * than ia64_mca_init. Setup a timer to poll for CPEs if the | 2082 | * processors have been brought online and have set their own CMC vectors to |
2082 | * platform doesn't support an interrupt driven mechanism. | 2083 | * point at a non-existant action. Called from arch_early_irq_init(). |
2083 | * | ||
2084 | * Inputs : None | ||
2085 | * Outputs : Status | ||
2086 | */ | 2084 | */ |
2087 | static int __init | 2085 | void __init ia64_mca_irq_init(void) |
2088 | ia64_mca_late_init(void) | ||
2089 | { | 2086 | { |
2090 | if (!mca_init) | ||
2091 | return 0; | ||
2092 | |||
2093 | /* | 2087 | /* |
2094 | * Configure the CMCI/P vector and handler. Interrupts for CMC are | 2088 | * Configure the CMCI/P vector and handler. Interrupts for CMC are |
2095 | * per-processor, so AP CMC interrupts are setup in smp_callin() (smpboot.c). | 2089 | * per-processor, so AP CMC interrupts are setup in smp_callin() (smpboot.c). |
@@ -2108,6 +2102,23 @@ ia64_mca_late_init(void) | |||
2108 | /* Setup the CPEI/P handler */ | 2102 | /* Setup the CPEI/P handler */ |
2109 | register_percpu_irq(IA64_CPEP_VECTOR, &mca_cpep_irqaction); | 2103 | register_percpu_irq(IA64_CPEP_VECTOR, &mca_cpep_irqaction); |
2110 | #endif | 2104 | #endif |
2105 | } | ||
2106 | |||
2107 | /* | ||
2108 | * ia64_mca_late_init | ||
2109 | * | ||
2110 | * Opportunity to setup things that require initialization later | ||
2111 | * than ia64_mca_init. Setup a timer to poll for CPEs if the | ||
2112 | * platform doesn't support an interrupt driven mechanism. | ||
2113 | * | ||
2114 | * Inputs : None | ||
2115 | * Outputs : Status | ||
2116 | */ | ||
2117 | static int __init | ||
2118 | ia64_mca_late_init(void) | ||
2119 | { | ||
2120 | if (!mca_init) | ||
2121 | return 0; | ||
2111 | 2122 | ||
2112 | register_hotcpu_notifier(&mca_cpu_notifier); | 2123 | register_hotcpu_notifier(&mca_cpu_notifier); |
2113 | 2124 | ||
diff --git a/arch/ia64/kernel/mca_drv.c b/arch/ia64/kernel/mca_drv.c index 9392e021c93b..94f8bf777afa 100644 --- a/arch/ia64/kernel/mca_drv.c +++ b/arch/ia64/kernel/mca_drv.c | |||
@@ -349,7 +349,7 @@ init_record_index_pools(void) | |||
349 | 349 | ||
350 | /* - 3 - */ | 350 | /* - 3 - */ |
351 | slidx_pool.max_idx = (rec_max_size/sect_min_size) * 2 + 1; | 351 | slidx_pool.max_idx = (rec_max_size/sect_min_size) * 2 + 1; |
352 | slidx_pool.buffer = (slidx_list_t *) | 352 | slidx_pool.buffer = |
353 | kmalloc(slidx_pool.max_idx * sizeof(slidx_list_t), GFP_KERNEL); | 353 | kmalloc(slidx_pool.max_idx * sizeof(slidx_list_t), GFP_KERNEL); |
354 | 354 | ||
355 | return slidx_pool.buffer ? 0 : -ENOMEM; | 355 | return slidx_pool.buffer ? 0 : -ENOMEM; |