powerpc: Build fix for non SPARSEMEM_VMEMAP config
PATCH 1/1 powerpc: Build fix for non SPARSEMEM_VMEMAP config
We can use pfn_to_page in realmode for other configs. Hence remove the CONFIG_FLATMEM ifdef
--- arch/powerpc/mm/init_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/mm/init_64.c +1 -1
@@ -322,7 +322,7 @@ struct page *realmode_pfn_to_page(unsigned long pfn) }EXPORT_SYMBOL_GPL (realmode_pfn_to_page); -#elif defined(CONFIG_FLATMEM) +#else struct page *realmode_pfn_to_page (unsigned long pfn) {
Signature · 1 line
2.7.4
Quoted 2 lines · Aneesh Kumar K.V
We can use
pfn_to_pagein realmode for other configs. Hence remove theCONFIG_FLATMEMifdef
For CONFIG_SPARSEMEM and CONFIG_DISCONTIGMEM and others (I am struggling to find the full list :) )? Are you sure about that? If I recall correctly, at the time realmode_pfn_to_page() could not work for all of them, what changed?
Quoted 14 lines
Fixes 8e0861fa3c4ed (powerpc: Prepare to support kernel handling of IOMMU map/unmap)Cc Alexey Kardashevskiy <[email protected]>Signed-off-by Aneesh Kumar K.V <[email protected]>--- arch/powerpc/mm/init_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/powerpc/mm/init_64.c +0
-0
arch/powerpc/mm/init_64.c struct page *realmode_pfn_to_page(unsigned long pfn) · line 325
Quoted 5 lines
arch/powerpc/mm/init_64.c +1
-1@@ -322,7 +322,7 @@ struct page *realmode_pfn_to_page(unsigned long pfn) }EXPORT_SYMBOL_GPL (realmode_pfn_to_page); -#elif defined(CONFIG_FLATMEM) +#else
There is also a comment at the #endif with "FLATMEM", needs to be updated.
Quoted 4 lines
arch/powerpc/mm/init_64.c +0
-0struct page *realmode_pfn_to_page (unsigned long pfn) {
Signature · 1 line
Alexey
Quoted 8 lines · Alexey Kardashevskiy
Quoted 2 lines · Aneesh Kumar K.V
We can use
pfn_to_pagein realmode for other configs. Hence remove theCONFIG_FLATMEMifdefFor
CONFIG_SPARSEMEMandCONFIG_DISCONTIGMEMand others (I am struggling to find the full list :) )? Are you sure about that? If I recall correctly, at the timerealmode_pfn_to_page()could not work for all of them, what changed?
That is one thing I wanted to check. Everything other than SPARSEMEM_VMEMMAP should use linear mapping which can work with real mode also right ? Or am i missing something ?
Quoted 30 lines
Quoted 15 lines
Fixes 8e0861fa3c4ed (powerpc: Prepare to support kernel handling of IOMMU map/unmap)Cc Alexey Kardashevskiy <[email protected]>Signed-off-by Aneesh Kumar K.V <[email protected]>--- arch/powerpc/mm/init_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/powerpc/mm/init_64.c +0
-0arch/powerpc/mm/init_64.c struct page *realmode_pfn_to_page(unsigned long pfn) · line 325
Quoted 5 lines
arch/powerpc/mm/init_64.c +1
-1@@ -322,7 +322,7 @@ struct page *realmode_pfn_to_page(unsigned long pfn) }EXPORT_SYMBOL_GPL (realmode_pfn_to_page); -#elif defined(CONFIG_FLATMEM) +#else There is also a comment at the #endif with "FLATMEM", needs to be updated.
Quoted 4 lines
arch/powerpc/mm/init_64.c +0
-0struct page *realmode_pfn_to_page (unsigned long pfn) {
Michael Ellerman
reviewerQuoted 5 lines · Aneesh Kumar K.V
Quoted 4 lines · Alexey Kardashevskiy
Quoted 2 lines · Aneesh Kumar K.V
We can use
pfn_to_pagein realmode for other configs. Hence remove theCONFIG_FLATMEMifdef
Quoted 7 lines
Quoted 3 lines
For
CONFIG_SPARSEMEMandCONFIG_DISCONTIGMEMand others (I am struggling to find the full list :) )? Are you sure about that? If I recall correctly, at the timerealmode_pfn_to_page()could not work for all of them, what changed?That is one thing I wanted to check. Everything other than
SPARSEMEM_VMEMMAPshould use linear mapping which can work with real mode also right ? Or am i missing something ?
I think that's right. But I'm going to make you test it anyway :)
cheers
Quoted 11 lines · Michael Ellerman
Quoted 9 lines · Aneesh Kumar K.V
Quoted 7 lines · Alexey Kardashevskiy
Quoted 2 lines · Aneesh Kumar K.V
We can use
pfn_to_pagein realmode for other configs. Hence remove theCONFIG_FLATMEMifdefFor
CONFIG_SPARSEMEMandCONFIG_DISCONTIGMEMand others (I am struggling to find the full list :) )? Are you sure about that? If I recall correctly, at the timerealmode_pfn_to_page()could not work for all of them, what changed?
Quoted 5 lines
Quoted 3 lines
That is one thing I wanted to check. Everything other than
SPARSEMEM_VMEMMAPshould use linear mapping which can work with real mode also right ? Or am i missing something ?I think that's right. But I'm going to make you test it anyway :)
Tested this by printing page->flags with FLATMEM, SPARSEMEM and SPARSEMEM_VMEMMAP in kvm real mode handler.
-aneesh
Michael Ellerman
AppliedQuoted 7 lines · Aneesh Kumar K.V
We can use
pfn_to_pagein realmode for other configs. Hence remove theCONFIG_FLATMEMifdefFixes 8e0861fa3c4ed (powerpc: Prepare to support kernel handling of IOMMU map/unmap)Cc Alexey Kardashevskiy <[email protected]>Signed-off-by Aneesh Kumar K.V <[email protected]>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/7e7dc66adcf490a619bc3c7763a8ce
cheers