* [PATCH] powerpc: Build fix for non SPARSEMEM_VMEMAP config
@ 2017-06-28 6:09 Aneesh Kumar K.V
2017-06-28 7:18 ` Alexey Kardashevskiy
2017-07-27 12:37 ` Michael Ellerman
0 siblings, 2 replies; 6+ messages in thread
From: Aneesh Kumar K.V @ 2017-06-28 6:09 UTC (permalink / raw)
To: benh, paulus, mpe; +Cc: linuxppc-dev, Aneesh Kumar K.V, Alexey Kardashevskiy
We can use pfn_to_page in realmode for other configs. Hence remove the
CONFIG_FLATMEM ifdef
Fixes: 8e0861fa3c4ed (powerpc: Prepare to support kernel handling of IOMMU map/unmap)
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
arch/powerpc/mm/init_64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c
index ec84b31c6c86..3dd507b4f8cd 100644
--- a/arch/powerpc/mm/init_64.c
+++ b/arch/powerpc/mm/init_64.c
@@ -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)
{
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc: Build fix for non SPARSEMEM_VMEMAP config
2017-06-28 6:09 [PATCH] powerpc: Build fix for non SPARSEMEM_VMEMAP config Aneesh Kumar K.V
@ 2017-06-28 7:18 ` Alexey Kardashevskiy
2017-06-28 10:25 ` Aneesh Kumar K.V
2017-07-27 12:37 ` Michael Ellerman
1 sibling, 1 reply; 6+ messages in thread
From: Alexey Kardashevskiy @ 2017-06-28 7:18 UTC (permalink / raw)
To: Aneesh Kumar K.V, benh, paulus, mpe; +Cc: linuxppc-dev
On 28/06/17 16:09, Aneesh Kumar K.V wrote:
> We can use pfn_to_page in realmode for other configs. Hence remove the
> CONFIG_FLATMEM ifdef
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?
>
> Fixes: 8e0861fa3c4ed (powerpc: Prepare to support kernel handling of IOMMU map/unmap)
>
> Cc: Alexey Kardashevskiy <aik@ozlabs.ru>
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> ---
> arch/powerpc/mm/init_64.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c
> index ec84b31c6c86..3dd507b4f8cd 100644
> --- a/arch/powerpc/mm/init_64.c
> +++ b/arch/powerpc/mm/init_64.c
> @@ -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.
>
> struct page *realmode_pfn_to_page(unsigned long pfn)
> {
>
--
Alexey
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc: Build fix for non SPARSEMEM_VMEMAP config
2017-06-28 7:18 ` Alexey Kardashevskiy
@ 2017-06-28 10:25 ` Aneesh Kumar K.V
2017-06-29 5:50 ` Michael Ellerman
0 siblings, 1 reply; 6+ messages in thread
From: Aneesh Kumar K.V @ 2017-06-28 10:25 UTC (permalink / raw)
To: Alexey Kardashevskiy, benh, paulus, mpe; +Cc: linuxppc-dev
On Wednesday 28 June 2017 12:48 PM, Alexey Kardashevskiy wrote:
> On 28/06/17 16:09, Aneesh Kumar K.V wrote:
>> We can use pfn_to_page in realmode for other configs. Hence remove the
>> CONFIG_FLATMEM ifdef
>
>
> 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?
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 ?
>
>>
>> Fixes: 8e0861fa3c4ed (powerpc: Prepare to support kernel handling of IOMMU map/unmap)
>>
>> Cc: Alexey Kardashevskiy <aik@ozlabs.ru>
>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
>> ---
>> arch/powerpc/mm/init_64.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c
>> index ec84b31c6c86..3dd507b4f8cd 100644
>> --- a/arch/powerpc/mm/init_64.c
>> +++ b/arch/powerpc/mm/init_64.c
>> @@ -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.
>
>
>>
>> struct page *realmode_pfn_to_page(unsigned long pfn)
>> {
>>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc: Build fix for non SPARSEMEM_VMEMAP config
2017-06-28 10:25 ` Aneesh Kumar K.V
@ 2017-06-29 5:50 ` Michael Ellerman
2017-07-24 9:19 ` Aneesh Kumar K.V
0 siblings, 1 reply; 6+ messages in thread
From: Michael Ellerman @ 2017-06-29 5:50 UTC (permalink / raw)
To: Aneesh Kumar K.V, Alexey Kardashevskiy, benh, paulus; +Cc: linuxppc-dev
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> writes:
> On Wednesday 28 June 2017 12:48 PM, Alexey Kardashevskiy wrote:
>> On 28/06/17 16:09, Aneesh Kumar K.V wrote:
>>> We can use pfn_to_page in realmode for other configs. Hence remove the
>>> CONFIG_FLATMEM ifdef
>>
>> 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?
>
> 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 ?
I think that's right. But I'm going to make you test it anyway :)
cheers
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc: Build fix for non SPARSEMEM_VMEMAP config
2017-06-29 5:50 ` Michael Ellerman
@ 2017-07-24 9:19 ` Aneesh Kumar K.V
0 siblings, 0 replies; 6+ messages in thread
From: Aneesh Kumar K.V @ 2017-07-24 9:19 UTC (permalink / raw)
To: Michael Ellerman, Alexey Kardashevskiy, benh, paulus; +Cc: linuxppc-dev
Michael Ellerman <mpe@ellerman.id.au> writes:
> "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> writes:
>
>> On Wednesday 28 June 2017 12:48 PM, Alexey Kardashevskiy wrote:
>>> On 28/06/17 16:09, Aneesh Kumar K.V wrote:
>>>> We can use pfn_to_page in realmode for other configs. Hence remove the
>>>> CONFIG_FLATMEM ifdef
>>>
>>> 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?
>>
>> 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 ?
>
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: powerpc: Build fix for non SPARSEMEM_VMEMAP config
2017-06-28 6:09 [PATCH] powerpc: Build fix for non SPARSEMEM_VMEMAP config Aneesh Kumar K.V
2017-06-28 7:18 ` Alexey Kardashevskiy
@ 2017-07-27 12:37 ` Michael Ellerman
1 sibling, 0 replies; 6+ messages in thread
From: Michael Ellerman @ 2017-07-27 12:37 UTC (permalink / raw)
To: Aneesh Kumar K.V, benh, paulus
Cc: Alexey Kardashevskiy, linuxppc-dev, Aneesh Kumar K.V
On Wed, 2017-06-28 at 06:09:28 UTC, "Aneesh Kumar K.V" wrote:
> We can use pfn_to_page in realmode for other configs. Hence remove the
> CONFIG_FLATMEM ifdef
>
> Fixes: 8e0861fa3c4ed (powerpc: Prepare to support kernel handling of IOMMU map/unmap)
>
> Cc: Alexey Kardashevskiy <aik@ozlabs.ru>
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/7e7dc66adcf490a619bc3c7763a8ce
cheers
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-07-27 12:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-28 6:09 [PATCH] powerpc: Build fix for non SPARSEMEM_VMEMAP config Aneesh Kumar K.V
2017-06-28 7:18 ` Alexey Kardashevskiy
2017-06-28 10:25 ` Aneesh Kumar K.V
2017-06-29 5:50 ` Michael Ellerman
2017-07-24 9:19 ` Aneesh Kumar K.V
2017-07-27 12:37 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).