All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/4] sparc64: Jump to boot prom from console on panic
@ 2017-02-01 19:34 ` Vijay Kumar
  0 siblings, 0 replies; 16+ messages in thread
From: Vijay Kumar @ 2017-02-01 19:34 UTC (permalink / raw)
  To: davem; +Cc: sparclinux, karl.volz, rob.gardner, linux-kernel, vijay.ac.kumar

V3 changes:
  - patch 02/04: Added SERIAL_SUNHV conditional group for
    sunhv_migrate_hvcons_irq in smp_send_stop().
V2 changes:
 -  Added cover letter patch

Hi,

Currently Stop-A (L1A) does not make the kernel switch to OBP on panic. This
patchset addresses this issue. Also, now we can cause a jump to OBP by sending
'break' twice from sunhv console. On bare metal, one can send a break by
typing Esc + 'B' + Sysrq (or whatever). On LDOM, press Ctrl + ] in telnet,
and then "send break" at the telnet prompt.

Thanks.

      sparc64: Set cpu state to offline when stopped
      sparc64: Migrate hvcons irq to panicked cpu
      sparc64: Send break twice from console to return to boot prom
      Documentation/sparc: Steps for sending break on sunhv console

 Documentation/sparc/console.txt |    9 +++++++++
 arch/sparc/include/asm/setup.h  |    1 +
 arch/sparc/kernel/smp_64.c      |    9 ++++++++-
 drivers/tty/serial/sunhv.c      |   12 +++++++++++-
 kernel/panic.c                  |    3 ++-
 5 files changed, 31 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/sparc/console.txt



--
1.7.1

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v3 0/4] sparc64: Jump to boot prom from console on panic
@ 2017-02-01 19:34 ` Vijay Kumar
  0 siblings, 0 replies; 16+ messages in thread
From: Vijay Kumar @ 2017-02-01 19:34 UTC (permalink / raw)
  To: davem; +Cc: sparclinux, karl.volz, rob.gardner, linux-kernel, vijay.ac.kumar

V3 changes:
  - patch 02/04: Added SERIAL_SUNHV conditional group for
    sunhv_migrate_hvcons_irq in smp_send_stop().
V2 changes:
 -  Added cover letter patch

Hi,

Currently Stop-A (L1A) does not make the kernel switch to OBP on panic. This
patchset addresses this issue. Also, now we can cause a jump to OBP by sending
'break' twice from sunhv console. On bare metal, one can send a break by
typing Esc + 'B' + Sysrq (or whatever). On LDOM, press Ctrl + ] in telnet,
and then "send break" at the telnet prompt.

Thanks.

      sparc64: Set cpu state to offline when stopped
      sparc64: Migrate hvcons irq to panicked cpu
      sparc64: Send break twice from console to return to boot prom
      Documentation/sparc: Steps for sending break on sunhv console

 Documentation/sparc/console.txt |    9 +++++++++
 arch/sparc/include/asm/setup.h  |    1 +
 arch/sparc/kernel/smp_64.c      |    9 ++++++++-
 drivers/tty/serial/sunhv.c      |   12 +++++++++++-
 kernel/panic.c                  |    3 ++-
 5 files changed, 31 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/sparc/console.txt



--
1.7.1

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v3 1/4] sparc64: Set cpu state to offline when stopped
  2017-02-01 19:34 ` Vijay Kumar
@ 2017-02-01 19:34   ` Vijay Kumar
  -1 siblings, 0 replies; 16+ messages in thread
From: Vijay Kumar @ 2017-02-01 19:34 UTC (permalink / raw)
  To: davem; +Cc: sparclinux, karl.volz, rob.gardner, linux-kernel, vijay.ac.kumar

CPU needs to be marked offline before stopping it. When not marked
offline, the xcall receives HV_EWOULDBLOCK and so assumes that not all
CPUs received the message, and retries. After 10000 retries, it finally
fails with fatal mondo timeout.

Signed-off-by: Vijay Kumar <vijay.ac.kumar@oracle.com>
---
 arch/sparc/kernel/smp_64.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c
index 0ce347f..712bf1b 100644
--- a/arch/sparc/kernel/smp_64.c
+++ b/arch/sparc/kernel/smp_64.c
@@ -1443,6 +1443,7 @@ void __irq_entry smp_receive_signal_client(int irq, struct pt_regs *regs)
 
 static void stop_this_cpu(void *dummy)
 {
+	set_cpu_online(smp_processor_id(), false);
 	prom_stopself();
 }
 
@@ -1454,6 +1455,8 @@ void smp_send_stop(void)
 		for_each_online_cpu(cpu) {
 			if (cpu == smp_processor_id())
 				continue;
+
+			set_cpu_online(cpu, false);
 #ifdef CONFIG_SUN_LDOMS
 			if (ldom_domaining_enabled) {
 				unsigned long hv_err;
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v3 1/4] sparc64: Set cpu state to offline when stopped
@ 2017-02-01 19:34   ` Vijay Kumar
  0 siblings, 0 replies; 16+ messages in thread
From: Vijay Kumar @ 2017-02-01 19:34 UTC (permalink / raw)
  To: davem; +Cc: sparclinux, karl.volz, rob.gardner, linux-kernel, vijay.ac.kumar

CPU needs to be marked offline before stopping it. When not marked
offline, the xcall receives HV_EWOULDBLOCK and so assumes that not all
CPUs received the message, and retries. After 10000 retries, it finally
fails with fatal mondo timeout.

Signed-off-by: Vijay Kumar <vijay.ac.kumar@oracle.com>
---
 arch/sparc/kernel/smp_64.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c
index 0ce347f..712bf1b 100644
--- a/arch/sparc/kernel/smp_64.c
+++ b/arch/sparc/kernel/smp_64.c
@@ -1443,6 +1443,7 @@ void __irq_entry smp_receive_signal_client(int irq, struct pt_regs *regs)
 
 static void stop_this_cpu(void *dummy)
 {
+	set_cpu_online(smp_processor_id(), false);
 	prom_stopself();
 }
 
@@ -1454,6 +1455,8 @@ void smp_send_stop(void)
 		for_each_online_cpu(cpu) {
 			if (cpu = smp_processor_id())
 				continue;
+
+			set_cpu_online(cpu, false);
 #ifdef CONFIG_SUN_LDOMS
 			if (ldom_domaining_enabled) {
 				unsigned long hv_err;
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v3 2/4] sparc64: Migrate hvcons irq to panicked cpu
  2017-02-01 19:34 ` Vijay Kumar
@ 2017-02-01 19:34   ` Vijay Kumar
  -1 siblings, 0 replies; 16+ messages in thread
From: Vijay Kumar @ 2017-02-01 19:34 UTC (permalink / raw)
  To: davem; +Cc: sparclinux, karl.volz, rob.gardner, linux-kernel, vijay.ac.kumar

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: Vijay Kumar <vijay.ac.kumar@oracle.com>
---
v2->v3: Added SERIAL_SUNHV conditional group for
        sunhv_migrate_hvcons_irq().
---
 arch/sparc/include/asm/setup.h |    5 ++++-
 arch/sparc/kernel/smp_64.c     |    6 +++++-
 drivers/tty/serial/sunhv.c     |    6 ++++++
 3 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/arch/sparc/include/asm/setup.h b/arch/sparc/include/asm/setup.h
index 29d64b1..478bf6b 100644
--- a/arch/sparc/include/asm/setup.h
+++ b/arch/sparc/include/asm/setup.h
@@ -59,8 +59,11 @@ static inline int con_is_present(void)
 extern atomic_t dcpage_flushes_xcall;
 
 extern int sysctl_tsb_ratio;
-#endif
 
+#ifdef CONFIG_SERIAL_SUNHV
+void sunhv_migrate_hvcons_irq(int cpu);
+#endif
+#endif
 void sun_do_break(void);
 extern int stop_a_enabled;
 extern int scons_pwroff;
diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c
index 712bf1b..90a02cb 100644
--- a/arch/sparc/kernel/smp_64.c
+++ b/arch/sparc/kernel/smp_64.c
@@ -1452,8 +1452,12 @@ void smp_send_stop(void)
 	int cpu;
 
 	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) {
-			if (cpu == smp_processor_id())
+			if (cpu == this_cpu)
 				continue;
 
 			set_cpu_online(cpu, false);
diff --git a/drivers/tty/serial/sunhv.c b/drivers/tty/serial/sunhv.c
index 99ef5c6..039ae05 100644
--- a/drivers/tty/serial/sunhv.c
+++ b/drivers/tty/serial/sunhv.c
@@ -398,6 +398,12 @@ static int sunhv_verify_port(struct uart_port *port, struct serial_struct *ser)
 
 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
  * "\r\n" along the way.  We have to return two lengths
  * because the caller needs to know how much to advance
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v3 2/4] sparc64: Migrate hvcons irq to panicked cpu
@ 2017-02-01 19:34   ` Vijay Kumar
  0 siblings, 0 replies; 16+ messages in thread
From: Vijay Kumar @ 2017-02-01 19:34 UTC (permalink / raw)
  To: davem; +Cc: sparclinux, karl.volz, rob.gardner, linux-kernel, vijay.ac.kumar

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: Vijay Kumar <vijay.ac.kumar@oracle.com>
---
v2->v3: Added SERIAL_SUNHV conditional group for
        sunhv_migrate_hvcons_irq().
---
 arch/sparc/include/asm/setup.h |    5 ++++-
 arch/sparc/kernel/smp_64.c     |    6 +++++-
 drivers/tty/serial/sunhv.c     |    6 ++++++
 3 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/arch/sparc/include/asm/setup.h b/arch/sparc/include/asm/setup.h
index 29d64b1..478bf6b 100644
--- a/arch/sparc/include/asm/setup.h
+++ b/arch/sparc/include/asm/setup.h
@@ -59,8 +59,11 @@ static inline int con_is_present(void)
 extern atomic_t dcpage_flushes_xcall;
 
 extern int sysctl_tsb_ratio;
-#endif
 
+#ifdef CONFIG_SERIAL_SUNHV
+void sunhv_migrate_hvcons_irq(int cpu);
+#endif
+#endif
 void sun_do_break(void);
 extern int stop_a_enabled;
 extern int scons_pwroff;
diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c
index 712bf1b..90a02cb 100644
--- a/arch/sparc/kernel/smp_64.c
+++ b/arch/sparc/kernel/smp_64.c
@@ -1452,8 +1452,12 @@ void smp_send_stop(void)
 	int cpu;
 
 	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) {
-			if (cpu = smp_processor_id())
+			if (cpu = this_cpu)
 				continue;
 
 			set_cpu_online(cpu, false);
diff --git a/drivers/tty/serial/sunhv.c b/drivers/tty/serial/sunhv.c
index 99ef5c6..039ae05 100644
--- a/drivers/tty/serial/sunhv.c
+++ b/drivers/tty/serial/sunhv.c
@@ -398,6 +398,12 @@ static int sunhv_verify_port(struct uart_port *port, struct serial_struct *ser)
 
 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
  * "\r\n" along the way.  We have to return two lengths
  * because the caller needs to know how much to advance
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v3 3/4] sparc64: Send break twice from console to return to boot prom
  2017-02-01 19:34 ` Vijay Kumar
@ 2017-02-01 19:34   ` Vijay Kumar
  -1 siblings, 0 replies; 16+ messages in thread
From: Vijay Kumar @ 2017-02-01 19:34 UTC (permalink / raw)
  To: davem; +Cc: sparclinux, karl.volz, rob.gardner, linux-kernel, vijay.ac.kumar

Now we can also jump to boot prom from sunhv console by sending
break twice on console for both running and panicked kernel
cases.

Signed-off-by: Vijay Kumar <vijay.ac.kumar@oracle.com>
---
 drivers/tty/serial/sunhv.c |    6 +++++-
 kernel/panic.c             |    3 ++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/sunhv.c b/drivers/tty/serial/sunhv.c
index 039ae05..8975d9c 100644
--- a/drivers/tty/serial/sunhv.c
+++ b/drivers/tty/serial/sunhv.c
@@ -116,7 +116,7 @@ static int receive_chars_getchar(struct uart_port *port)
 
 static int receive_chars_read(struct uart_port *port)
 {
-	int saw_console_brk = 0;
+	static int saw_console_brk;
 	int limit = 10000;
 
 	while (limit-- > 0) {
@@ -128,6 +128,9 @@ static int receive_chars_read(struct uart_port *port)
 			bytes_read = 0;
 
 			if (stat == CON_BREAK) {
+				if (saw_console_brk)
+					sun_do_break();
+
 				if (uart_handle_break(port))
 					continue;
 				saw_console_brk = 1;
@@ -151,6 +154,7 @@ static int receive_chars_read(struct uart_port *port)
 		if (port->sysrq != 0 &&  *con_read_page) {
 			for (i = 0; i < bytes_read; i++)
 				uart_handle_sysrq_char(port, con_read_page[i]);
+			saw_console_brk = 0;
 		}
 
 		if (port->state == NULL)
diff --git a/kernel/panic.c b/kernel/panic.c
index 08aa88d..70f799d 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -273,7 +273,8 @@ void panic(const char *fmt, ...)
 		extern int stop_a_enabled;
 		/* Make sure the user can actually press Stop-A (L1-A) */
 		stop_a_enabled = 1;
-		pr_emerg("Press Stop-A (L1-A) to return to the boot prom\n");
+		pr_emerg("Press Stop-A (L1-A) from sun keyboard or send break\n"
+			 "twice on console to return to the boot prom\n");
 	}
 #endif
 #if defined(CONFIG_S390)
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v3 3/4] sparc64: Send break twice from console to return to boot prom
@ 2017-02-01 19:34   ` Vijay Kumar
  0 siblings, 0 replies; 16+ messages in thread
From: Vijay Kumar @ 2017-02-01 19:34 UTC (permalink / raw)
  To: davem; +Cc: sparclinux, karl.volz, rob.gardner, linux-kernel, vijay.ac.kumar

Now we can also jump to boot prom from sunhv console by sending
break twice on console for both running and panicked kernel
cases.

Signed-off-by: Vijay Kumar <vijay.ac.kumar@oracle.com>
---
 drivers/tty/serial/sunhv.c |    6 +++++-
 kernel/panic.c             |    3 ++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/sunhv.c b/drivers/tty/serial/sunhv.c
index 039ae05..8975d9c 100644
--- a/drivers/tty/serial/sunhv.c
+++ b/drivers/tty/serial/sunhv.c
@@ -116,7 +116,7 @@ static int receive_chars_getchar(struct uart_port *port)
 
 static int receive_chars_read(struct uart_port *port)
 {
-	int saw_console_brk = 0;
+	static int saw_console_brk;
 	int limit = 10000;
 
 	while (limit-- > 0) {
@@ -128,6 +128,9 @@ static int receive_chars_read(struct uart_port *port)
 			bytes_read = 0;
 
 			if (stat = CON_BREAK) {
+				if (saw_console_brk)
+					sun_do_break();
+
 				if (uart_handle_break(port))
 					continue;
 				saw_console_brk = 1;
@@ -151,6 +154,7 @@ static int receive_chars_read(struct uart_port *port)
 		if (port->sysrq != 0 &&  *con_read_page) {
 			for (i = 0; i < bytes_read; i++)
 				uart_handle_sysrq_char(port, con_read_page[i]);
+			saw_console_brk = 0;
 		}
 
 		if (port->state = NULL)
diff --git a/kernel/panic.c b/kernel/panic.c
index 08aa88d..70f799d 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -273,7 +273,8 @@ void panic(const char *fmt, ...)
 		extern int stop_a_enabled;
 		/* Make sure the user can actually press Stop-A (L1-A) */
 		stop_a_enabled = 1;
-		pr_emerg("Press Stop-A (L1-A) to return to the boot prom\n");
+		pr_emerg("Press Stop-A (L1-A) from sun keyboard or send break\n"
+			 "twice on console to return to the boot prom\n");
 	}
 #endif
 #if defined(CONFIG_S390)
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v3 4/4] Documentation/sparc: Steps for sending break on sunhv console
  2017-02-01 19:34 ` Vijay Kumar
@ 2017-02-01 19:34   ` Vijay Kumar
  -1 siblings, 0 replies; 16+ messages in thread
From: Vijay Kumar @ 2017-02-01 19:34 UTC (permalink / raw)
  To: davem; +Cc: sparclinux, karl.volz, rob.gardner, linux-kernel, vijay.ac.kumar

Documented the steps for sending break on sunhv console.

Signed-off-by: Vijay Kumar <vijay.ac.kumar@oracle.com>
---
 Documentation/sparc/console.txt |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/Documentation/sparc/console.txt b/Documentation/sparc/console.txt
new file mode 100644
index 0000000..5aa735a
--- /dev/null
+++ b/Documentation/sparc/console.txt
@@ -0,0 +1,9 @@
+Steps for sending 'break' on sunhv console:
+===========================================
+
+On Baremetal:
+   1. press   Esc + 'B'
+
+On LDOM:
+   1. press    Ctrl + ']'
+   2. telnet> send  break
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v3 4/4] Documentation/sparc: Steps for sending break on sunhv console
@ 2017-02-01 19:34   ` Vijay Kumar
  0 siblings, 0 replies; 16+ messages in thread
From: Vijay Kumar @ 2017-02-01 19:34 UTC (permalink / raw)
  To: davem; +Cc: sparclinux, karl.volz, rob.gardner, linux-kernel, vijay.ac.kumar

Documented the steps for sending break on sunhv console.

Signed-off-by: Vijay Kumar <vijay.ac.kumar@oracle.com>
---
 Documentation/sparc/console.txt |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/Documentation/sparc/console.txt b/Documentation/sparc/console.txt
new file mode 100644
index 0000000..5aa735a
--- /dev/null
+++ b/Documentation/sparc/console.txt
@@ -0,0 +1,9 @@
+Steps for sending 'break' on sunhv console:
+=====================+
+On Baremetal:
+   1. press   Esc + 'B'
+
+On LDOM:
+   1. press    Ctrl + ']'
+   2. telnet> send  break
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 0/4] sparc64: Jump to boot prom from console on panic
  2017-02-01 19:34 ` Vijay Kumar
@ 2017-02-01 19:50   ` David Miller
  -1 siblings, 0 replies; 16+ messages in thread
From: David Miller @ 2017-02-01 19:50 UTC (permalink / raw)
  To: vijay.ac.kumar; +Cc: sparclinux, karl.volz, rob.gardner, linux-kernel

From: Vijay Kumar <vijay.ac.kumar@oracle.com>
Date: Wed,  1 Feb 2017 11:34:36 -0800

> Currently Stop-A (L1A) does not make the kernel switch to OBP on panic.

This is intentional, the kernel prints a message telling the user to
press break (L1-A) if they want to drop out of the kernel and we force
the break to be allowed by setting stop_a_enabled.

I'm wondering why there is so much effort being directed into BRK
behavior.

If you want to break into the OK prompt, have the reboot-cmd
environment variable set appropriately, and simply hit BRK and it will
work in both ldom and non-ldom environments.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 0/4] sparc64: Jump to boot prom from console on panic
@ 2017-02-01 19:50   ` David Miller
  0 siblings, 0 replies; 16+ messages in thread
From: David Miller @ 2017-02-01 19:50 UTC (permalink / raw)
  To: vijay.ac.kumar; +Cc: sparclinux, karl.volz, rob.gardner, linux-kernel

From: Vijay Kumar <vijay.ac.kumar@oracle.com>
Date: Wed,  1 Feb 2017 11:34:36 -0800

> Currently Stop-A (L1A) does not make the kernel switch to OBP on panic.

This is intentional, the kernel prints a message telling the user to
press break (L1-A) if they want to drop out of the kernel and we force
the break to be allowed by setting stop_a_enabled.

I'm wondering why there is so much effort being directed into BRK
behavior.

If you want to break into the OK prompt, have the reboot-cmd
environment variable set appropriately, and simply hit BRK and it will
work in both ldom and non-ldom environments.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 0/4] sparc64: Jump to boot prom from console on panic
  2017-02-01 19:50   ` David Miller
@ 2017-02-01 21:20     ` Vijay Kumar
  -1 siblings, 0 replies; 16+ messages in thread
From: Vijay Kumar @ 2017-02-01 21:20 UTC (permalink / raw)
  To: David Miller; +Cc: sparclinux, karl.volz, rob.gardner, linux-kernel


On 2/1/2017 1:50 PM, David Miller wrote:
> From: Vijay Kumar <vijay.ac.kumar@oracle.com>
> Date: Wed,  1 Feb 2017 11:34:36 -0800
>
>> Currently Stop-A (L1A) does not make the kernel switch to OBP on panic.
> This is intentional, the kernel prints a message telling the user to
> press break (L1-A) if they want to drop out of the kernel and we force
> the break to be allowed by setting stop_a_enabled.
The problem is that pressing BRK after panic does not drop to OK prompt 
(when
stop_a_enabled is set).  So the kernel message to press Stop-A to return 
to boot
prom is  misleading in this case.
> I'm wondering why there is so much effort being directed into BRK
> behavior.
User can drop into ok prompt from the running kernel and as well as from the
panicked kernel. Pressing single break to jump to ok prompt conflicts with
sysrq key combination (from console, BRK + sysrq_key). To be consistent
across both the cases,  user will have to send BRK twice in order to drop to
ok prompt.  Does this sound reasonable?
>
> If you want to break into the OK prompt, have the reboot-cmd
> environment variable set appropriately, and simply hit BRK and it will
> work in both ldom and non-ldom environments.
Kernel does not print message "Press Stop-A (L1-A) to ..." for the case 
when it is
expected to reboot on panic. Rather, it goes through different path in 
panic() when
kernel.panic is _not_ set to 0. Here, patch is addressing the case when
kernel.panic=0 (i.e not to reboot on panic).

Thanks,
Vijay

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 0/4] sparc64: Jump to boot prom from console on panic
@ 2017-02-01 21:20     ` Vijay Kumar
  0 siblings, 0 replies; 16+ messages in thread
From: Vijay Kumar @ 2017-02-01 21:20 UTC (permalink / raw)
  To: David Miller; +Cc: sparclinux, karl.volz, rob.gardner, linux-kernel


On 2/1/2017 1:50 PM, David Miller wrote:
> From: Vijay Kumar <vijay.ac.kumar@oracle.com>
> Date: Wed,  1 Feb 2017 11:34:36 -0800
>
>> Currently Stop-A (L1A) does not make the kernel switch to OBP on panic.
> This is intentional, the kernel prints a message telling the user to
> press break (L1-A) if they want to drop out of the kernel and we force
> the break to be allowed by setting stop_a_enabled.
The problem is that pressing BRK after panic does not drop to OK prompt 
(when
stop_a_enabled is set).  So the kernel message to press Stop-A to return 
to boot
prom is  misleading in this case.
> I'm wondering why there is so much effort being directed into BRK
> behavior.
User can drop into ok prompt from the running kernel and as well as from the
panicked kernel. Pressing single break to jump to ok prompt conflicts with
sysrq key combination (from console, BRK + sysrq_key). To be consistent
across both the cases,  user will have to send BRK twice in order to drop to
ok prompt.  Does this sound reasonable?
>
> If you want to break into the OK prompt, have the reboot-cmd
> environment variable set appropriately, and simply hit BRK and it will
> work in both ldom and non-ldom environments.
Kernel does not print message "Press Stop-A (L1-A) to ..." for the case 
when it is
expected to reboot on panic. Rather, it goes through different path in 
panic() when
kernel.panic is _not_ set to 0. Here, patch is addressing the case when
kernel.panic=0 (i.e not to reboot on panic).

Thanks,
Vijay

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 0/4] sparc64: Jump to boot prom from console on panic
  2017-02-01 21:20     ` Vijay Kumar
@ 2017-02-23 16:27       ` David Miller
  -1 siblings, 0 replies; 16+ messages in thread
From: David Miller @ 2017-02-23 16:27 UTC (permalink / raw)
  To: vijay.ac.kumar; +Cc: sparclinux, karl.volz, rob.gardner, linux-kernel

From: Vijay Kumar <vijay.ac.kumar@oracle.com>
Date: Wed, 1 Feb 2017 15:20:08 -0600

> 
> On 2/1/2017 1:50 PM, David Miller wrote:
>> From: Vijay Kumar <vijay.ac.kumar@oracle.com>
>> Date: Wed,  1 Feb 2017 11:34:36 -0800
>>
>>> Currently Stop-A (L1A) does not make the kernel switch to OBP on
>>> panic.
>> This is intentional, the kernel prints a message telling the user to
>> press break (L1-A) if they want to drop out of the kernel and we force
>> the break to be allowed by setting stop_a_enabled.
> The problem is that pressing BRK after panic does not drop to OK
> prompt (when
> stop_a_enabled is set).  So the kernel message to press Stop-A to
> return to boot
> prom is  misleading in this case.

Ok, I ended up applying this patch series, thanks.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 0/4] sparc64: Jump to boot prom from console on panic
@ 2017-02-23 16:27       ` David Miller
  0 siblings, 0 replies; 16+ messages in thread
From: David Miller @ 2017-02-23 16:27 UTC (permalink / raw)
  To: vijay.ac.kumar; +Cc: sparclinux, karl.volz, rob.gardner, linux-kernel

From: Vijay Kumar <vijay.ac.kumar@oracle.com>
Date: Wed, 1 Feb 2017 15:20:08 -0600

> 
> On 2/1/2017 1:50 PM, David Miller wrote:
>> From: Vijay Kumar <vijay.ac.kumar@oracle.com>
>> Date: Wed,  1 Feb 2017 11:34:36 -0800
>>
>>> Currently Stop-A (L1A) does not make the kernel switch to OBP on
>>> panic.
>> This is intentional, the kernel prints a message telling the user to
>> press break (L1-A) if they want to drop out of the kernel and we force
>> the break to be allowed by setting stop_a_enabled.
> The problem is that pressing BRK after panic does not drop to OK
> prompt (when
> stop_a_enabled is set).  So the kernel message to press Stop-A to
> return to boot
> prom is  misleading in this case.

Ok, I ended up applying this patch series, thanks.

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2017-02-23 16:37 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-01 19:34 [PATCH v3 0/4] sparc64: Jump to boot prom from console on panic Vijay Kumar
2017-02-01 19:34 ` Vijay Kumar
2017-02-01 19:34 ` [PATCH v3 1/4] sparc64: Set cpu state to offline when stopped Vijay Kumar
2017-02-01 19:34   ` Vijay Kumar
2017-02-01 19:34 ` [PATCH v3 2/4] sparc64: Migrate hvcons irq to panicked cpu Vijay Kumar
2017-02-01 19:34   ` Vijay Kumar
2017-02-01 19:34 ` [PATCH v3 3/4] sparc64: Send break twice from console to return to boot prom Vijay Kumar
2017-02-01 19:34   ` Vijay Kumar
2017-02-01 19:34 ` [PATCH v3 4/4] Documentation/sparc: Steps for sending break on sunhv console Vijay Kumar
2017-02-01 19:34   ` Vijay Kumar
2017-02-01 19:50 ` [PATCH v3 0/4] sparc64: Jump to boot prom from console on panic David Miller
2017-02-01 19:50   ` David Miller
2017-02-01 21:20   ` Vijay Kumar
2017-02-01 21:20     ` Vijay Kumar
2017-02-23 16:27     ` David Miller
2017-02-23 16:27       ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.