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

Re: [PATCH v5 11/44] x86/boot: split bootstrap_map_addr() out of bootstrap_map()


  • To: Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Date: Wed, 9 Oct 2024 21:16:40 -0400
  • Arc-authentication-results: i=1; mx.zohomail.com; dkim=pass header.i=apertussolutions.com; spf=pass smtp.mailfrom=dpsmith@xxxxxxxxxxxxxxxxxxxx; dmarc=pass header.from=<dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728523004; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=Ju0UhVNKZoMwSk5KZ/O1SjYW87TL5jGlRXVopgZClyI=; b=CFlHzFhyBZhvKeMQ/hwJpcyKu5OEqiu4J0NXS6Ady0RmaFgBcFvoTjhUqKZGVs+ItGq7Nws6WfBg2mWnvQ5HgPQWiI17gcRTh/uExnsTl4qWpukGei4EDddK2BKAs0xvgkOYBktQap+Rg8Y7g0rpxHvOX9AclX+AVuuB6g1WB/w=
  • Arc-seal: i=1; a=rsa-sha256; t=1728523004; cv=none; d=zohomail.com; s=zohoarc; b=GY84kFPTDga4aBd693P4926mZdf6FpPUxEW+mjYbyCGrttxskc/mM4b35huVhkLYwcFalDzpuyz5HLO/DyRwrZSR+w71mVyq8oOaox9knzHNM7kbm4PuB9Ig40rUxoyL9GaRwROQ8ztuad6arqmXEcTJJ1PrbvmTgmHrUjF3Hgc=
  • Cc: jason.andryuk@xxxxxxx, christopher.w.clark@xxxxxxxxx, stefano.stabellini@xxxxxxx, Roger Pau Monné <roger.pau@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 10 Oct 2024 01:16:57 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 10/9/24 11:38, Jan Beulich wrote:
On 06.10.2024 23:49, Daniel P. Smith wrote:
From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Using an interface based on addresses directly, not modules.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Signed-off-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
---
  xen/arch/x86/include/asm/setup.h |  1 +
  xen/arch/x86/setup.c             | 19 +++++++++++++------
  2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/xen/arch/x86/include/asm/setup.h b/xen/arch/x86/include/asm/setup.h
index 3d189521189d..213584b05fb2 100644
--- a/xen/arch/x86/include/asm/setup.h
+++ b/xen/arch/x86/include/asm/setup.h
@@ -36,6 +36,7 @@ extern struct boot_info xen_boot_info;
unsigned long initial_images_nrpages(nodeid_t node);
  void discard_initial_images(void);
+void *bootstrap_map_addr(paddr_t start, paddr_t end);

Nothing is being said about why this function needs a declaration here
and ...

You are correct, as far as this series is concerned, nothing external uses this. Will drop this declaration....

--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -437,24 +437,22 @@ static void __init normalise_cpu_order(void)
   * Ensure a given physical memory range is present in the bootstrap mappings.
   * Use superpage mappings to ensure that pagetable memory needn't be 
allocated.
   */
-void *__init bootstrap_map(const module_t *mod)
+void *__init bootstrap_map_addr(paddr_t start, paddr_t end)

... isn't instead static here. Bugseng folks have put in quite a bit of
effort to remove such anomalies (which Misra doesn't like) from the code
base; I don't think we should introduce new ones. I didn't peek ahead
further than just the next patch, where the function gains a new use,
but could still be static, so it's possible I'm simply missing a
subsequent use from another CU. Yet then the function ought to become
non-static only there.

...and will make this static.

v/r,
dps



 


Rackspace

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