From patchwork Tue Nov 14 15:13:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksii Kurochko X-Patchwork-Id: 13455494 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9CCADC4332F for ; Tue, 14 Nov 2023 15:14:06 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.632770.987176 (Exim 4.92) (envelope-from ) id 1r2v6y-0008By-Hv; Tue, 14 Nov 2023 15:13:56 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 632770.987176; Tue, 14 Nov 2023 15:13:56 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r2v6y-0008Br-EA; Tue, 14 Nov 2023 15:13:56 +0000 Received: by outflank-mailman (input) for mailman id 632770; Tue, 14 Nov 2023 15:13:54 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r2v6w-0008AQ-I7 for xen-devel@lists.xenproject.org; Tue, 14 Nov 2023 15:13:54 +0000 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [2a00:1450:4864:20::132]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 6c487ea4-8300-11ee-98db-6d05b1d4d9a1; Tue, 14 Nov 2023 16:13:53 +0100 (CET) Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-507cd62472dso7380661e87.0 for ; Tue, 14 Nov 2023 07:13:53 -0800 (PST) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id f18-20020a05651232d200b00507987edd22sm1348822lfg.156.2023.11.14.07.13.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 07:13:51 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 6c487ea4-8300-11ee-98db-6d05b1d4d9a1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699974832; x=1700579632; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=eni2uQcHzPa3p0BXkZBXBU2/wAC0HDdu58dG92X4l7M=; b=Z+wy+1JBsk7MlZpZytGLbrHPQWSsV2MYyUW/RZ642njxYGQaliAoTTP2lsvNYAqWqt MYLA6mw2ERwc1wf6Na4n8JnJTSvQB+kvM8zehF7QYr+ji7AAyDNAtAdCDxwbC8H2el/B DSuP5QyfI5oY4yeyCQNZBY75O+mPgW3wMTNOd17UDG2s6TFRI9QmklBqxTwhy6EQA3JS xMLCusODhqWtmEAJi8OVTLLd9OYk2OMBb2VUuZQR1nXRhRr50hA9WKgg7bvdKZrJxYIu NXm8cKEjSW0eW5Kv4g1ZlVR7NOxWWfKc/6Kd5M7ESiLHFg8Ot2pMiqwJmlcd8zFuGgKO lWNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699974832; x=1700579632; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=eni2uQcHzPa3p0BXkZBXBU2/wAC0HDdu58dG92X4l7M=; b=DGKZFYGwHgV0rcpliKqTtz7xygaJrqin3jRK8B0JY4RQ9O2HMc+gsizJWrt6grIwwZ iWfr0RzVGNLDSbrIbIIUMaNFewS5ihTY+SRH2321PgaceIahRnK4g7HF339cP3n0t5v8 P9ON+x+T1m9iaaiUjSuhpATceUsyOD/6skN/cVSijKYRdu99egTUraOCYc95mkhvKSmX RnWMPCAFNYWLZR9scozNcZbK4YgYX8sM65TBfRkTnvTDVvqD3nIOXsa0XvBbOgnfhfOC vJKdzok5OzmGsn/mzQ6eSFS6JPijs/HoYdYTPhaprIBJHCdDfq9yuucpH8BJ3l740IJs CvLw== X-Gm-Message-State: AOJu0Yw00rRfwWzT1x16Ail0QTh+FaxeYrNeyT02iblnUTb49KUBkBgN MHolKldhIXNKaRP88qf+YDJU92zx8+k= X-Google-Smtp-Source: AGHT+IEzcpy18UDDhhnN+a+RNf+F0kB/z2W2MF5MLcjpqSpUTxrMDiRTRF7evh7oap6bN8DHUtnA5g== X-Received: by 2002:a05:6512:3d1b:b0:500:acae:30c5 with SMTP id d27-20020a0565123d1b00b00500acae30c5mr1275757lfv.15.1699974832143; Tue, 14 Nov 2023 07:13:52 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Tamas K Lengyel , Alexandru Isaila , Petre Pircalabu , Jan Beulich Subject: [PATCH v3] xen/asm-generic: ifdef inclusion of Date: Tue, 14 Nov 2023 17:13:49 +0200 Message-ID: <371c5dd29fa974ca27db1f720f17fb0ffdd667a0.1699974488.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 ifdefing inclusion of in allows to avoid generation of empty header for the case when !CONFIG_MEM_ACCESS. For Arm it was explicitly added inclusion of for p2m.c and traps.c because they require some functions from which aren't available in case of !CONFIG_MEM_ACCESS. Suggested-by: Jan Beulich Signed-off-by: Oleksii Kurochko --- This patch was part of patch series: https://lore.kernel.org/xen-devel/cover.1699633310.git.oleksii.kurochko@gmail.com/ The patch series hasn't been reviewed all yet so send this path separately. --- xen/arch/arm/p2m.c | 6 ++++++ xen/arch/arm/traps.c | 6 ++++++ xen/include/xen/mem_access.h | 2 ++ 3 files changed, 14 insertions(+) diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index de32a2d638..9050c72acf 100644 --- a/xen/arch/arm/p2m.c +++ b/xen/arch/arm/p2m.c @@ -11,6 +11,12 @@ #include #include #include +/* + * Inclusion of in is #ifdef-ed with + * CONFIG_MEM_ACCESS so in case of !CONFIG_MEM_ACCESS will cause a compilation + * issue "implicit declaration of functions 'p2m_mem_access*'. + */ +#include #include #include diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index ce89f16404..5e39b26272 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -35,6 +35,12 @@ #include #include #include +/* + * Inclusion of in is #ifdef-ed with + * CONFIG_MEM_ACCESS so in case of !CONFIG_MEM_ACCESS will cause a compilation + * issue "implicit declaration of functions 'p2m_mem_access*. + */ +#include #include #include #include diff --git a/xen/include/xen/mem_access.h b/xen/include/xen/mem_access.h index 4e4811680d..87d93b31f6 100644 --- a/xen/include/xen/mem_access.h +++ b/xen/include/xen/mem_access.h @@ -33,7 +33,9 @@ */ struct vm_event_st; +#ifdef CONFIG_MEM_ACCESS #include +#endif /* * Additional access types, which are used to further restrict