[PATCH] {x86,arm}/mm.c: Make populate_pt_range __init

George Dunlap posted 1 patch 10 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20230630124509.730368-1-george.dunlap@cloud.com
xen/arch/arm/mm.c | 2 +-
xen/arch/x86/mm.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
[PATCH] {x86,arm}/mm.c: Make populate_pt_range __init
Posted by George Dunlap 10 months, 1 week ago
From: George Dunlap <george.dunlap@citrix.com>

It's only called from another __init function.

Signed-off-by: George Dunlap <george.dunlap@citrix.com>
---
This is a random patch I found in a branch named "xsa345-post".

CC: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Jan Beulich <jbeulich@suse.com>
CC: Roger Pau Monne <roger.pau@citrix.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Julien Grall <julien@xen.org>
---
 xen/arch/arm/mm.c | 2 +-
 xen/arch/x86/mm.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
index 0a3e1f3b64..9b14ae3a5d 100644
--- a/xen/arch/arm/mm.c
+++ b/xen/arch/arm/mm.c
@@ -1218,7 +1218,7 @@ int map_pages_to_xen(unsigned long virt,
     return xen_pt_update(virt, mfn, nr_mfns, flags);
 }
 
-int populate_pt_range(unsigned long virt, unsigned long nr_mfns)
+int __init populate_pt_range(unsigned long virt, unsigned long nr_mfns)
 {
     return xen_pt_update(virt, INVALID_MFN, nr_mfns, _PAGE_POPULATE);
 }
diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index 9741d28cbc..be2b10a391 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -5574,7 +5574,7 @@ int map_pages_to_xen(
     return rc;
 }
 
-int populate_pt_range(unsigned long virt, unsigned long nr_mfns)
+int __init populate_pt_range(unsigned long virt, unsigned long nr_mfns)
 {
     return map_pages_to_xen(virt, INVALID_MFN, nr_mfns, MAP_SMALL_PAGES);
 }
-- 
2.25.1
Re: [PATCH] {x86,arm}/mm.c: Make populate_pt_range __init
Posted by Andrew Cooper 10 months, 1 week ago
On 30/06/2023 1:45 pm, George Dunlap wrote:
> From: George Dunlap <george.dunlap@citrix.com>
>
> It's only called from another __init function.
>
> Signed-off-by: George Dunlap <george.dunlap@citrix.com>
> ---
> This is a random patch I found in a branch named "xsa345-post".

I have far too many branches like that...

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Re: [PATCH] {x86,arm}/mm.c: Make populate_pt_range __init
Posted by Julien Grall 10 months, 1 week ago
Hi,

On 30/06/2023 13:57, Andrew Cooper wrote:
> On 30/06/2023 1:45 pm, George Dunlap wrote:
>> From: George Dunlap <george.dunlap@citrix.com>
>>
>> It's only called from another __init function.
>>
>> Signed-off-by: George Dunlap <george.dunlap@citrix.com>
>> ---
>> This is a random patch I found in a branch named "xsa345-post".
> 
> I have far too many branches like that...

Same here :).

> 
> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>

Acked-by: Julien Grall <jgrall@amazon.com>

Cheers,

-- 
Julien Grall