[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] x86: don't open-code max_page calculation nor pfn_to_paddr()



commit 05b6368ba01e07aa3b2b1f1856d77332971a7bdf
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Tue Dec 19 13:51:40 2023 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Dec 19 13:51:40 2023 +0100

    x86: don't open-code max_page calculation nor pfn_to_paddr()
    
    As observed by Roger while reviewing a somewhat related change, there's
    no need here either to open-code the (largely, i.e. once setup_max_pdx()
    was called) fixed relationship between max_pdx and max_page. Further we
    can avoid open-coding pfn_to_paddr() here.
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/arch/x86/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 62f4686cae..897b7e9208 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1569,7 +1569,7 @@ void asmlinkage __init noreturn __start_xen(unsigned long 
mbi_p)
                 continue;
             }
             map_e = e;
-            e = (pdx_to_pfn(max_pdx - 1) + 1ULL) << PAGE_SHIFT;
+            e = pfn_to_paddr(max_page);
             printk(XENLOG_WARNING "Ignoring inaccessible memory range"
                                   " %013"PRIx64"-%013"PRIx64"\n",
                    e, map_e);
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.