Re: [powerpc][next-20210727] Boot failure - kernel BUG at arch/powerpc/kernel/interrupt.c:98!

From
Sachin Sant <hidden>
Date
2021-07-30 05:18:20
Also in
linux-iommu, linux-next
Reply to
Will Deacon, 2021-07-29
On 29-Jul-2021, at 9:43 PM, Will Deacon [off-list ref] wrote:

On Wed, Jul 28, 2021 at 10:35:34AM -0700, Nathan Chancellor wrote:
quoted
On Wed, Jul 28, 2021 at 01:31:06PM +0530, Sachin Sant wrote:
quoted
next-20210723 was good. The boot failure seems to have been introduced with next-20210726.

I have attached the boot log.
I noticed this with OpenSUSE's ppc64le config [1] and my bisect landed on
commit ad6c00283163 ("swiotlb: Free tbl memory in swiotlb_exit()"). That
series just keeps on giving...
Yes, but look how handy our new print is!

[    0.010799] software IO TLB: tearing down default memory pool
[    0.010805] ------------[ cut here ]------------
[    0.010808] kernel BUG at arch/powerpc/kernel/interrupt.c:98!

Following Nick's suggestion, the diff below should help? I don't have a
relevant box on which I can test it though.
Thanks for the fix. This fixes the reported problem for me.
Tested successfully on both PowerVM LPAR as well as bare metal environment.

Reported-by: Sachin Sant <redacted>
Tested-by: Sachin Sant <redacted>
quoted hunk ↗ jump to hunk
Will

--->8
diff --git a/arch/powerpc/platforms/pseries/svm.c b/arch/powerpc/platforms/pseries/svm.c
index 1d829e257996..87f001b4c4e4 100644
--- a/arch/powerpc/platforms/pseries/svm.c
+++ b/arch/powerpc/platforms/pseries/svm.c
@@ -63,6 +63,9 @@ void __init svm_swiotlb_init(void)
int set_memory_encrypted(unsigned long addr, int numpages)
{
+       if (!mem_encrypt_active())
+               return 0;
+
       if (!PAGE_ALIGNED(addr))
               return -EINVAL;
@@ -73,6 +76,9 @@ int set_memory_encrypted(unsigned long addr, int numpages)
int set_memory_decrypted(unsigned long addr, int numpages)
{
+       if (!mem_encrypt_active())
+               return 0;
+
       if (!PAGE_ALIGNED(addr))
               return -EINVAL;
  
Thread (8 messages) 8 messages, 5 authors, last reply 2021-07-30
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help