diff mbox

powerpc: remove WARN_ON() from dma-noncoherent.c

Message ID 2094bb9371fc6b6c228b.1226363616@localhost.localdomain (mailing list archive)
State Accepted, archived
Commit 7526ff76f84178f8c926de7e590e4c5f9d4a2e62
Delegated to: Paul Mackerras
Headers show

Commit Message

Hollis Blanchard Nov. 11, 2008, 12:33 a.m. UTC
I can't tell why this WARN_ON exists, and there's no comment explaining it.
Whether the pmd is present or not, pte_alloc_kernel() seems to handle both
cases.

Booting a 440 kernel with 64K PAGE_SIZE triggers the warning, but boot
successfully completes and I see no problems beyond that.

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>

---

Large page support is critical for improving KVM performance, so I'd like this
apparently unnecessary warning to be removed to make way for Ilya's patch.

Vitaly, this code was added by you in Feb 2007. Any thoughts?

Comments

Benjamin Herrenschmidt Nov. 11, 2008, 2:09 a.m. UTC | #1
On Mon, 2008-11-10 at 18:33 -0600, Hollis Blanchard wrote:
> I can't tell why this WARN_ON exists, and there's no comment explaining it.
> Whether the pmd is present or not, pte_alloc_kernel() seems to handle both
> cases.
> 
> Booting a 440 kernel with 64K PAGE_SIZE triggers the warning, but boot
> successfully completes and I see no problems beyond that.
> 
> Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>

I can't see any reason neither off hand, so

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

Ben.
> ---
> 
> Large page support is critical for improving KVM performance, so I'd like this
> apparently unnecessary warning to be removed to make way for Ilya's patch.
> 
> Vitaly, this code was added by you in Feb 2007. Any thoughts?
> 
> diff --git a/arch/powerpc/lib/dma-noncoherent.c b/arch/powerpc/lib/dma-noncoherent.c
> --- a/arch/powerpc/lib/dma-noncoherent.c
> +++ b/arch/powerpc/lib/dma-noncoherent.c
> @@ -320,7 +320,6 @@ static int __init dma_alloc_init(void)
>  			ret = -ENOMEM;
>  			break;
>  		}
> -		WARN_ON(!pmd_none(*pmd));
>  
>  		pte = pte_alloc_kernel(pmd, CONSISTENT_BASE);
>  		if (!pte) {
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
diff mbox

Patch

diff --git a/arch/powerpc/lib/dma-noncoherent.c b/arch/powerpc/lib/dma-noncoherent.c
--- a/arch/powerpc/lib/dma-noncoherent.c
+++ b/arch/powerpc/lib/dma-noncoherent.c
@@ -320,7 +320,6 @@  static int __init dma_alloc_init(void)
 			ret = -ENOMEM;
 			break;
 		}
-		WARN_ON(!pmd_none(*pmd));
 
 		pte = pte_alloc_kernel(pmd, CONSISTENT_BASE);
 		if (!pte) {