Skip to contentSkip to conversation

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

PATCH In review George Dunlap 3 participants 3 messages Jun 30, 2023

lore
Share & tools
lore
#0 lore raw

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

From: George Dunlap <[email protected]>

It's only called from another __init function.

---
This is a random patch I found in a branch named "xsa345-post".

CC Andrew Cooper <[email protected]>
CC Jan Beulich <[email protected]>
CC Roger Pau Monne <[email protected]>
CC Stefano Stabellini <[email protected]>
CC Julien Grall <[email protected]>
---
 xen/arch/arm/mm.c | 2 +-
 xen/arch/x86/mm.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
xen/arch/arm/mm.c +1 -1
index 0a3e1f3b64..9b14ae3a5d 100644
@@ -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);
 }
xen/arch/x86/mm.c +1 -1
index 9741d28cbc..be2b10a391 100644
@@ -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);
 }
Signature · 1 line
2.25.1
Acked-by
#2 lore raw

Hi,

Quoted 10 lines · Andrew Cooper
Quoted 7 lines · George Dunlap

From: George Dunlap <[email protected]>

It's only called from another __init function.

---
This is a random patch I found in a branch named "xsa345-post".

I have far too many branches like that...

Same here :).

Quoted 2 lines

Cheers,

Signature · 1 line
Julien Grall