Commit 7dd4fcf5 authored by Vijay Kumar's avatar Vijay Kumar Committed by David S. Miller

sparc64: Migrate hvcons irq to panicked cpu

On panic, all other CPUs are stopped except the one which had
hit panic. To keep console alive, we need to migrate hvcons irq
to panicked CPU.
Signed-off-by: default avatarVijay Kumar <vijay.ac.kumar@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cffb3e76
...@@ -59,8 +59,11 @@ extern atomic_t dcpage_flushes; ...@@ -59,8 +59,11 @@ extern atomic_t dcpage_flushes;
extern atomic_t dcpage_flushes_xcall; extern atomic_t dcpage_flushes_xcall;
extern int sysctl_tsb_ratio; extern int sysctl_tsb_ratio;
#endif
#ifdef CONFIG_SERIAL_SUNHV
void sunhv_migrate_hvcons_irq(int cpu);
#endif
#endif
void sun_do_break(void); void sun_do_break(void);
extern int stop_a_enabled; extern int stop_a_enabled;
extern int scons_pwroff; extern int scons_pwroff;
......
...@@ -1452,8 +1452,12 @@ void smp_send_stop(void) ...@@ -1452,8 +1452,12 @@ void smp_send_stop(void)
int cpu; int cpu;
if (tlb_type == hypervisor) { if (tlb_type == hypervisor) {
int this_cpu = smp_processor_id();
#ifdef CONFIG_SERIAL_SUNHV
sunhv_migrate_hvcons_irq(this_cpu);
#endif
for_each_online_cpu(cpu) { for_each_online_cpu(cpu) {
if (cpu == smp_processor_id()) if (cpu == this_cpu)
continue; continue;
set_cpu_online(cpu, false); set_cpu_online(cpu, false);
......
...@@ -398,6 +398,12 @@ static struct uart_driver sunhv_reg = { ...@@ -398,6 +398,12 @@ static struct uart_driver sunhv_reg = {
static struct uart_port *sunhv_port; static struct uart_port *sunhv_port;
void sunhv_migrate_hvcons_irq(int cpu)
{
/* Migrate hvcons irq to param cpu */
irq_force_affinity(sunhv_port->irq, cpumask_of(cpu));
}
/* Copy 's' into the con_write_page, decoding "\n" into /* Copy 's' into the con_write_page, decoding "\n" into
* "\r\n" along the way. We have to return two lengths * "\r\n" along the way. We have to return two lengths
* because the caller needs to know how much to advance * because the caller needs to know how much to advance
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment