aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64/kernel')
-rw-r--r--arch/ia64/kernel/cpufreq/acpi-cpufreq.c6
-rw-r--r--arch/ia64/kernel/irq.c5
-rw-r--r--arch/ia64/kernel/mca.c34
-rw-r--r--arch/ia64/kernel/process.c10
-rw-r--r--arch/ia64/kernel/ptrace.c10
-rw-r--r--arch/ia64/kernel/setup.c7
-rw-r--r--arch/ia64/kernel/vmlinux.lds.S12
7 files changed, 54 insertions, 30 deletions
diff --git a/arch/ia64/kernel/cpufreq/acpi-cpufreq.c b/arch/ia64/kernel/cpufreq/acpi-cpufreq.c
index 15c08d52f09f..8c6ec7070844 100644
--- a/arch/ia64/kernel/cpufreq/acpi-cpufreq.c
+++ b/arch/ia64/kernel/cpufreq/acpi-cpufreq.c
@@ -113,10 +113,8 @@ processor_get_freq (
113 113
114 saved_mask = current->cpus_allowed; 114 saved_mask = current->cpus_allowed;
115 set_cpus_allowed(current, cpumask_of_cpu(cpu)); 115 set_cpus_allowed(current, cpumask_of_cpu(cpu));
116 if (smp_processor_id() != cpu) { 116 if (smp_processor_id() != cpu)
117 ret = -EAGAIN;
118 goto migrate_end; 117 goto migrate_end;
119 }
120 118
121 /* processor_get_pstate gets the instantaneous frequency */ 119 /* processor_get_pstate gets the instantaneous frequency */
122 ret = processor_get_pstate(&value); 120 ret = processor_get_pstate(&value);
@@ -125,7 +123,7 @@ processor_get_freq (
125 set_cpus_allowed(current, saved_mask); 123 set_cpus_allowed(current, saved_mask);
126 printk(KERN_WARNING "get performance failed with error %d\n", 124 printk(KERN_WARNING "get performance failed with error %d\n",
127 ret); 125 ret);
128 ret = -EAGAIN; 126 ret = 0;
129 goto migrate_end; 127 goto migrate_end;
130 } 128 }
131 clock_freq = extract_clock(data, value, cpu); 129 clock_freq = extract_clock(data, value, cpu);
diff --git a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c
index cc3ee4ef37af..44be1c952b7c 100644
--- a/arch/ia64/kernel/irq.c
+++ b/arch/ia64/kernel/irq.c
@@ -33,6 +33,11 @@ void ack_bad_irq(unsigned int irq)
33} 33}
34 34
35#ifdef CONFIG_IA64_GENERIC 35#ifdef CONFIG_IA64_GENERIC
36ia64_vector __ia64_irq_to_vector(int irq)
37{
38 return irq_cfg[irq].vector;
39}
40
36unsigned int __ia64_local_vector_to_irq (ia64_vector vec) 41unsigned int __ia64_local_vector_to_irq (ia64_vector vec)
37{ 42{
38 return __get_cpu_var(vector_irq)[vec]; 43 return __get_cpu_var(vector_irq)[vec];
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
index ff28620cb992..63b73f3d4c9f 100644
--- a/arch/ia64/kernel/mca.c
+++ b/arch/ia64/kernel/mca.c
@@ -2018,22 +2018,26 @@ ia64_mca_late_init(void)
2018 2018
2019 if (cpe_vector >= 0) { 2019 if (cpe_vector >= 0) {
2020 /* If platform supports CPEI, enable the irq. */ 2020 /* If platform supports CPEI, enable the irq. */
2021 cpe_poll_enabled = 0; 2021 irq = local_vector_to_irq(cpe_vector);
2022 for (irq = 0; irq < NR_IRQS; ++irq) 2022 if (irq > 0) {
2023 if (irq_to_vector(irq) == cpe_vector) { 2023 cpe_poll_enabled = 0;
2024 desc = irq_desc + irq; 2024 desc = irq_desc + irq;
2025 desc->status |= IRQ_PER_CPU; 2025 desc->status |= IRQ_PER_CPU;
2026 setup_irq(irq, &mca_cpe_irqaction); 2026 setup_irq(irq, &mca_cpe_irqaction);
2027 ia64_cpe_irq = irq; 2027 ia64_cpe_irq = irq;
2028 } 2028 ia64_mca_register_cpev(cpe_vector);
2029 ia64_mca_register_cpev(cpe_vector); 2029 IA64_MCA_DEBUG("%s: CPEI/P setup and enabled.\n",
2030 IA64_MCA_DEBUG("%s: CPEI/P setup and enabled.\n", __FUNCTION__); 2030 __FUNCTION__);
2031 } else { 2031 return 0;
2032 /* If platform doesn't support CPEI, get the timer going. */
2033 if (cpe_poll_enabled) {
2034 ia64_mca_cpe_poll(0UL);
2035 IA64_MCA_DEBUG("%s: CPEP setup and enabled.\n", __FUNCTION__);
2036 } 2032 }
2033 printk(KERN_ERR "%s: Failed to find irq for CPE "
2034 "interrupt handler, vector %d\n",
2035 __FUNCTION__, cpe_vector);
2036 }
2037 /* If platform doesn't support CPEI, get the timer going. */
2038 if (cpe_poll_enabled) {
2039 ia64_mca_cpe_poll(0UL);
2040 IA64_MCA_DEBUG("%s: CPEP setup and enabled.\n", __FUNCTION__);
2037 } 2041 }
2038 } 2042 }
2039#endif 2043#endif
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c
index 4158906c45aa..c613fc0e91cc 100644
--- a/arch/ia64/kernel/process.c
+++ b/arch/ia64/kernel/process.c
@@ -198,9 +198,13 @@ default_idle (void)
198{ 198{
199 local_irq_enable(); 199 local_irq_enable();
200 while (!need_resched()) { 200 while (!need_resched()) {
201 if (can_do_pal_halt) 201 if (can_do_pal_halt) {
202 safe_halt(); 202 local_irq_disable();
203 else 203 if (!need_resched()) {
204 safe_halt();
205 }
206 local_irq_enable();
207 } else
204 cpu_relax(); 208 cpu_relax();
205 } 209 }
206} 210}
diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c
index 00f803246948..122444a97897 100644
--- a/arch/ia64/kernel/ptrace.c
+++ b/arch/ia64/kernel/ptrace.c
@@ -951,10 +951,14 @@ access_uarea (struct task_struct *child, unsigned long addr,
951 return 0; 951 return 0;
952 952
953 case PT_CR_IPSR: 953 case PT_CR_IPSR:
954 if (write_access) 954 if (write_access) {
955 pt->cr_ipsr = ((*data & IPSR_MASK) 955 unsigned long tmp = *data;
956 /* psr.ri==3 is a reserved value: SDM 2:25 */
957 if ((tmp & IA64_PSR_RI) == IA64_PSR_RI)
958 tmp &= ~IA64_PSR_RI;
959 pt->cr_ipsr = ((tmp & IPSR_MASK)
956 | (pt->cr_ipsr & ~IPSR_MASK)); 960 | (pt->cr_ipsr & ~IPSR_MASK));
957 else 961 } else
958 *data = (pt->cr_ipsr & IPSR_MASK); 962 *data = (pt->cr_ipsr & IPSR_MASK);
959 return 0; 963 return 0;
960 964
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index cd9a37a552c3..407efea04bf5 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -389,6 +389,13 @@ early_console_setup (char *cmdline)
389 if (!efi_setup_pcdp_console(cmdline)) 389 if (!efi_setup_pcdp_console(cmdline))
390 earlycons++; 390 earlycons++;
391#endif 391#endif
392#ifdef CONFIG_HP_SIMSERIAL_CONSOLE
393 {
394 extern struct console hpsim_cons;
395 register_console(&hpsim_cons);
396 earlycons++;
397 }
398#endif
392 399
393 return (earlycons) ? 0 : -1; 400 return (earlycons) ? 0 : -1;
394} 401}
diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S
index 83e80677de70..00232b4357ba 100644
--- a/arch/ia64/kernel/vmlinux.lds.S
+++ b/arch/ia64/kernel/vmlinux.lds.S
@@ -20,6 +20,8 @@ PHDRS {
20 code PT_LOAD; 20 code PT_LOAD;
21 percpu PT_LOAD; 21 percpu PT_LOAD;
22 data PT_LOAD; 22 data PT_LOAD;
23 note PT_NOTE;
24 unwind 0x70000001; /* PT_IA_64_UNWIND, but ld doesn't match the name */
23} 25}
24SECTIONS 26SECTIONS
25{ 27{
@@ -62,6 +64,9 @@ SECTIONS
62 64
63 /* Read-only data */ 65 /* Read-only data */
64 66
67 NOTES :code :note /* put .notes in text and mark in PT_NOTE */
68 code_continues : {} :code /* switch back to regular program... */
69
65 /* Exception table */ 70 /* Exception table */
66 . = ALIGN(16); 71 . = ALIGN(16);
67 __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) 72 __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET)
@@ -99,7 +104,8 @@ SECTIONS
99 __start_unwind = .; 104 __start_unwind = .;
100 *(.IA_64.unwind*) 105 *(.IA_64.unwind*)
101 __end_unwind = .; 106 __end_unwind = .;
102 } 107 } :code :unwind
108 code_continues2 : {} : code
103 109
104 RODATA 110 RODATA
105 111
@@ -276,10 +282,6 @@ SECTIONS
276 .debug_typenames 0 : { *(.debug_typenames) } 282 .debug_typenames 0 : { *(.debug_typenames) }
277 .debug_varnames 0 : { *(.debug_varnames) } 283 .debug_varnames 0 : { *(.debug_varnames) }
278 /* These must appear regardless of . */ 284 /* These must appear regardless of . */
279 /* Discard them for now since Intel SoftSDV cannot handle them.
280 .comment 0 : { *(.comment) }
281 .note 0 : { *(.note) }
282 */
283 /DISCARD/ : { *(.comment) } 285 /DISCARD/ : { *(.comment) }
284 /DISCARD/ : { *(.note) } 286 /DISCARD/ : { *(.note) }
285} 287}