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

Re: [PATCH] xen/acpi: Allow xen/acpi.h to be included on non-ACPI archs


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Henry Wang <xin.wang2@xxxxxxx>
  • Date: Thu, 11 Apr 2024 21:24:41 +0800
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=citrix.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Oe/YMjvQ6OizNvAhPx/8hv5SIrFUnv/3b1wpfD2O0Ww=; b=E35zGzM8NZm7NFwFnw6f/fJxTTDjJmnn8jTb1cBB9iJgj74s/mksFrT2j7USbmN2vA1fqp0AkCYjs9vxs4EsSo9NmmJJFA7k8/1lbKLudkQ+lglItTGUVb0OUNXBJNp5YWpcml7JxL1/psExzL44ljIW9TQKCDJSXgUYL0sdtOl/20yZV2TRddpN3283iqDKY3yizF2Xe+l68IIbmfeOBoAJfLWnI1+0D8++UUDbRH/qFZF+OaHIPsfuC5R408QRYAmIyXocmurN7CfsqCIoH+SbZR2yUDPEsvkbGJm4svU+XXc2fCGNf1Ncx+134y0ixhrAT9LCl3CxGEgi8+IROA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hxJIY3K4xNV0Q3U81C+14ernD/Y2OpLDVmRIM3G8SUp3K2/BOrvAbgJZx126KioqQR3xgtUHBPISxzplheiW/Od+3yAMT6g63s3OqHRtfU1ngCdxfUvg3T+unmfpH7YdILmNSOjlpJMxluU7laJr/8WHffoJ/3JDJt9CDAFSsask0V6XCBfKb7WdjPOmBsRjv6lrw29XOvusrXTMTQMfE0sHL8rr+o4/KBWHzh+8EAO9sglh9v1mv0ArgXCqrzfZKdPK+Ux+GAYToz+lc4GBVDS4qXCkDBFGN8pyyc8aGpvtvjXkZEfgs6AfsNF7bALoy40CItzkhCieZn1wT5EVQA==
  • Cc: <tpearson@xxxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, "Volodymyr Babchuk" <Volodymyr_Babchuk@xxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Dario Faggioli <dfaggioli@xxxxxxxx>
  • Delivery-date: Thu, 11 Apr 2024 13:24:56 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Andrew,

On 4/11/2024 9:15 PM, Andrew Cooper wrote:
On 05/04/2024 7:20 pm, Shawn Anastasio wrote:
Conditionalize xen/acpi.h's inclusion of acpi/acpi.h and asm/acpi.h on
CONFIG_ACPI and import ARM's !CONFIG_ACPI stub for acpi_disabled() so
that the header can be included on architectures without ACPI support,
like ppc.

This change revealed some missing #includes across the ARM tree, so fix
those as well.

Suggested-by: Jan Beulich <jbeulich@xxxxxxxx>
Signed-off-by: Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx>
---
  xen/arch/arm/arm32/mmu/mm.c     | 1 +
  xen/arch/arm/arm64/smpboot.c    | 3 ++-
  xen/arch/arm/domain_build.c     | 1 -
  xen/arch/arm/gic-v2.c           | 1 -
  xen/arch/arm/gic-v3.c           | 2 --
  xen/arch/arm/include/asm/acpi.h | 1 -
  xen/arch/arm/mmu/setup.c        | 1 +
  xen/arch/arm/psci.c             | 1 +
  xen/arch/arm/smpboot.c          | 1 +
  xen/arch/arm/traps.c            | 3 ++-
  xen/common/sched/boot-cpupool.c | 2 +-
  xen/include/xen/acpi.h          | 8 ++++++--
  12 files changed, 15 insertions(+), 10 deletions(-)

Pre-push testing found a randconfig error caused by this:
https://gitlab.com/xen-project/people/andyhhp/xen/-/jobs/6602857882

Henry diagnosed this as "arm asm/acpi.h includes the arm asm/setup.h
then asm/p2m.h then finally asm/current.h".

pt.c uses smp_processor_id() explicitly, so should include
asm/current.h.  I've folded the following delta in to fix the issue,

I tried to build with below diff locally and confirm below diff will fix the build error reported by the randconfig job of gitlab-ci.

Kind regards,
Henry

diff --git a/xen/arch/arm/mmu/pt.c b/xen/arch/arm/mmu/pt.c
index a7755728aeda..da28d669e796 100644
--- a/xen/arch/arm/mmu/pt.c
+++ b/xen/arch/arm/mmu/pt.c
@@ -11,6 +11,7 @@
  #include <xen/sizes.h>
  #include <xen/vmap.h>
+#include <asm/current.h>
  #include <asm/fixmap.h>
 #ifdef NDEBUG


But I suspect this may not be the only instance.

~Andrew





 


Rackspace

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