All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] openrisc: remove bogus nops and shutdowns
@ 2022-05-04 11:09 ` Jason A. Donenfeld
  0 siblings, 0 replies; 9+ messages in thread
From: Jason A. Donenfeld @ 2022-05-04 11:09 UTC (permalink / raw)
  To: openrisc, linux-kernel; +Cc: Jason A. Donenfeld, Stafford Horne

Nop 42 is some leftover debugging thing by the looks of it. Nop 1 will
shut down the simulator, which isn't what we want, since it makes it
possible to handle errors.

Cc: Stafford Horne <shorne@gmail.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
 arch/openrisc/mm/fault.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/arch/openrisc/mm/fault.c b/arch/openrisc/mm/fault.c
index 80bb66ad42f6..860da58d7509 100644
--- a/arch/openrisc/mm/fault.c
+++ b/arch/openrisc/mm/fault.c
@@ -223,8 +223,6 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long address,
 	{
 		const struct exception_table_entry *entry;
 
-		__asm__ __volatile__("l.nop 42");
-
 		if ((entry = search_exception_tables(regs->pc)) != NULL) {
 			/* Adjust the instruction pointer in the stackframe */
 			regs->pc = entry->fixup;
@@ -252,9 +250,6 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long address,
 	 */
 
 out_of_memory:
-	__asm__ __volatile__("l.nop 42");
-	__asm__ __volatile__("l.nop 1");
-
 	mmap_read_unlock(mm);
 	if (!user_mode(regs))
 		goto no_context;
-- 
2.35.1


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

* [PATCH] openrisc: remove bogus nops and shutdowns
@ 2022-05-04 11:09 ` Jason A. Donenfeld
  0 siblings, 0 replies; 9+ messages in thread
From: Jason A. Donenfeld @ 2022-05-04 11:09 UTC (permalink / raw)
  To: openrisc

Nop 42 is some leftover debugging thing by the looks of it. Nop 1 will
shut down the simulator, which isn't what we want, since it makes it
possible to handle errors.

Cc: Stafford Horne <shorne@gmail.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
 arch/openrisc/mm/fault.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/arch/openrisc/mm/fault.c b/arch/openrisc/mm/fault.c
index 80bb66ad42f6..860da58d7509 100644
--- a/arch/openrisc/mm/fault.c
+++ b/arch/openrisc/mm/fault.c
@@ -223,8 +223,6 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long address,
 	{
 		const struct exception_table_entry *entry;
 
-		__asm__ __volatile__("l.nop 42");
-
 		if ((entry = search_exception_tables(regs->pc)) != NULL) {
 			/* Adjust the instruction pointer in the stackframe */
 			regs->pc = entry->fixup;
@@ -252,9 +250,6 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long address,
 	 */
 
 out_of_memory:
-	__asm__ __volatile__("l.nop 42");
-	__asm__ __volatile__("l.nop 1");
-
 	mmap_read_unlock(mm);
 	if (!user_mode(regs))
 		goto no_context;
-- 
2.35.1


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

* Re: [PATCH] openrisc: remove bogus nops and shutdowns
  2022-05-04 11:09 ` Jason A. Donenfeld
@ 2022-05-04 22:24   ` Stafford Horne
  -1 siblings, 0 replies; 9+ messages in thread
From: Stafford Horne @ 2022-05-04 22:24 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: openrisc, linux-kernel

On Wed, May 04, 2022 at 01:09:11PM +0200, Jason A. Donenfeld wrote:
> Nop 42 is some leftover debugging thing by the looks of it. Nop 1 will
> shut down the simulator, which isn't what we want, since it makes it
> possible to handle errors.

Do you mean impossible to handler errors?

> Cc: Stafford Horne <shorne@gmail.com>
> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>

This looks good to me, I didn't add these debug's I think we can remove them.

-Stafford

> ---
>  arch/openrisc/mm/fault.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/arch/openrisc/mm/fault.c b/arch/openrisc/mm/fault.c
> index 80bb66ad42f6..860da58d7509 100644
> --- a/arch/openrisc/mm/fault.c
> +++ b/arch/openrisc/mm/fault.c
> @@ -223,8 +223,6 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long address,
>  	{
>  		const struct exception_table_entry *entry;
>  
> -		__asm__ __volatile__("l.nop 42");
> -
>  		if ((entry = search_exception_tables(regs->pc)) != NULL) {
>  			/* Adjust the instruction pointer in the stackframe */
>  			regs->pc = entry->fixup;
> @@ -252,9 +250,6 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long address,
>  	 */
>  
>  out_of_memory:
> -	__asm__ __volatile__("l.nop 42");
> -	__asm__ __volatile__("l.nop 1");
> -
>  	mmap_read_unlock(mm);
>  	if (!user_mode(regs))
>  		goto no_context;
> -- 
> 2.35.1
> 

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

* [PATCH] openrisc: remove bogus nops and shutdowns
@ 2022-05-04 22:24   ` Stafford Horne
  0 siblings, 0 replies; 9+ messages in thread
From: Stafford Horne @ 2022-05-04 22:24 UTC (permalink / raw)
  To: openrisc

On Wed, May 04, 2022 at 01:09:11PM +0200, Jason A. Donenfeld wrote:
> Nop 42 is some leftover debugging thing by the looks of it. Nop 1 will
> shut down the simulator, which isn't what we want, since it makes it
> possible to handle errors.

Do you mean impossible to handler errors?

> Cc: Stafford Horne <shorne@gmail.com>
> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>

This looks good to me, I didn't add these debug's I think we can remove them.

-Stafford

> ---
>  arch/openrisc/mm/fault.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/arch/openrisc/mm/fault.c b/arch/openrisc/mm/fault.c
> index 80bb66ad42f6..860da58d7509 100644
> --- a/arch/openrisc/mm/fault.c
> +++ b/arch/openrisc/mm/fault.c
> @@ -223,8 +223,6 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long address,
>  	{
>  		const struct exception_table_entry *entry;
>  
> -		__asm__ __volatile__("l.nop 42");
> -
>  		if ((entry = search_exception_tables(regs->pc)) != NULL) {
>  			/* Adjust the instruction pointer in the stackframe */
>  			regs->pc = entry->fixup;
> @@ -252,9 +250,6 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long address,
>  	 */
>  
>  out_of_memory:
> -	__asm__ __volatile__("l.nop 42");
> -	__asm__ __volatile__("l.nop 1");
> -
>  	mmap_read_unlock(mm);
>  	if (!user_mode(regs))
>  		goto no_context;
> -- 
> 2.35.1
> 

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

* Re: [PATCH] openrisc: remove bogus nops and shutdowns
  2022-05-04 22:24   ` Stafford Horne
@ 2022-05-04 23:19     ` Jason A. Donenfeld
  -1 siblings, 0 replies; 9+ messages in thread
From: Jason A. Donenfeld @ 2022-05-04 23:19 UTC (permalink / raw)
  To: Stafford Horne; +Cc: openrisc, linux-kernel

On Thu, May 05, 2022 at 07:24:50AM +0900, Stafford Horne wrote:
> On Wed, May 04, 2022 at 01:09:11PM +0200, Jason A. Donenfeld wrote:
> > Nop 42 is some leftover debugging thing by the looks of it. Nop 1 will
> > shut down the simulator, which isn't what we want, since it makes it
> > possible to handle errors.
> 
> Do you mean impossible to handler errors?

Whoops, yes.

> 
> > Cc: Stafford Horne <shorne@gmail.com>
> > Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
> 
> This looks good to me, I didn't add these debug's I think we can remove them.
> 


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

* [PATCH] openrisc: remove bogus nops and shutdowns
@ 2022-05-04 23:19     ` Jason A. Donenfeld
  0 siblings, 0 replies; 9+ messages in thread
From: Jason A. Donenfeld @ 2022-05-04 23:19 UTC (permalink / raw)
  To: openrisc

On Thu, May 05, 2022 at 07:24:50AM +0900, Stafford Horne wrote:
> On Wed, May 04, 2022 at 01:09:11PM +0200, Jason A. Donenfeld wrote:
> > Nop 42 is some leftover debugging thing by the looks of it. Nop 1 will
> > shut down the simulator, which isn't what we want, since it makes it
> > possible to handle errors.
> 
> Do you mean impossible to handler errors?

Whoops, yes.

> 
> > Cc: Stafford Horne <shorne@gmail.com>
> > Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
> 
> This looks good to me, I didn't add these debug's I think we can remove them.
> 


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

* [PATCH v2] openrisc: remove bogus nops and shutdowns
  2022-05-04 23:19     ` Jason A. Donenfeld
@ 2022-05-11 13:35       ` Jason A. Donenfeld
  -1 siblings, 0 replies; 9+ messages in thread
From: Jason A. Donenfeld @ 2022-05-11 13:35 UTC (permalink / raw)
  To: openrisc, linux-kernel; +Cc: Jason A. Donenfeld, Stafford Horne

Nop 42 is some leftover debugging thing by the looks of it. Nop 1 will
shut down the simulator, which isn't what we want, since it makes it
impossible to handle errors.

Cc: Stafford Horne <shorne@gmail.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
Changes v1->v2:
- Fixed typo in commit message.

 arch/openrisc/mm/fault.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/arch/openrisc/mm/fault.c b/arch/openrisc/mm/fault.c
index 80bb66ad42f6..860da58d7509 100644
--- a/arch/openrisc/mm/fault.c
+++ b/arch/openrisc/mm/fault.c
@@ -223,8 +223,6 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long address,
 	{
 		const struct exception_table_entry *entry;
 
-		__asm__ __volatile__("l.nop 42");
-
 		if ((entry = search_exception_tables(regs->pc)) != NULL) {
 			/* Adjust the instruction pointer in the stackframe */
 			regs->pc = entry->fixup;
@@ -252,9 +250,6 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long address,
 	 */
 
 out_of_memory:
-	__asm__ __volatile__("l.nop 42");
-	__asm__ __volatile__("l.nop 1");
-
 	mmap_read_unlock(mm);
 	if (!user_mode(regs))
 		goto no_context;
-- 
2.35.1


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

* [PATCH v2] openrisc: remove bogus nops and shutdowns
@ 2022-05-11 13:35       ` Jason A. Donenfeld
  0 siblings, 0 replies; 9+ messages in thread
From: Jason A. Donenfeld @ 2022-05-11 13:35 UTC (permalink / raw)
  To: openrisc, linux-kernel; +Cc: Jason A. Donenfeld

Nop 42 is some leftover debugging thing by the looks of it. Nop 1 will
shut down the simulator, which isn't what we want, since it makes it
impossible to handle errors.

Cc: Stafford Horne <shorne@gmail.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
Changes v1->v2:
- Fixed typo in commit message.

 arch/openrisc/mm/fault.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/arch/openrisc/mm/fault.c b/arch/openrisc/mm/fault.c
index 80bb66ad42f6..860da58d7509 100644
--- a/arch/openrisc/mm/fault.c
+++ b/arch/openrisc/mm/fault.c
@@ -223,8 +223,6 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long address,
 	{
 		const struct exception_table_entry *entry;
 
-		__asm__ __volatile__("l.nop 42");
-
 		if ((entry = search_exception_tables(regs->pc)) != NULL) {
 			/* Adjust the instruction pointer in the stackframe */
 			regs->pc = entry->fixup;
@@ -252,9 +250,6 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long address,
 	 */
 
 out_of_memory:
-	__asm__ __volatile__("l.nop 42");
-	__asm__ __volatile__("l.nop 1");
-
 	mmap_read_unlock(mm);
 	if (!user_mode(regs))
 		goto no_context;
-- 
2.35.1


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

* Re: [PATCH v2] openrisc: remove bogus nops and shutdowns
  2022-05-11 13:35       ` Jason A. Donenfeld
  (?)
@ 2022-05-11 20:54       ` Stafford Horne
  -1 siblings, 0 replies; 9+ messages in thread
From: Stafford Horne @ 2022-05-11 20:54 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: openrisc, linux-kernel

On Wed, May 11, 2022 at 03:35:50PM +0200, Jason A. Donenfeld wrote:
> Nop 42 is some leftover debugging thing by the looks of it. Nop 1 will
> shut down the simulator, which isn't what we want, since it makes it
> impossible to handle errors.
> 
> Cc: Stafford Horne <shorne@gmail.com>
> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>

Thanks, this looks good now. I will queue it.

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

end of thread, other threads:[~2022-05-11 20:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-04 11:09 [PATCH] openrisc: remove bogus nops and shutdowns Jason A. Donenfeld
2022-05-04 11:09 ` Jason A. Donenfeld
2022-05-04 22:24 ` Stafford Horne
2022-05-04 22:24   ` Stafford Horne
2022-05-04 23:19   ` Jason A. Donenfeld
2022-05-04 23:19     ` Jason A. Donenfeld
2022-05-11 13:35     ` [PATCH v2] " Jason A. Donenfeld
2022-05-11 13:35       ` Jason A. Donenfeld
2022-05-11 20:54       ` Stafford Horne

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.