From nobody Thu May 2 07:45:09 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=arm.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 165876035559522.185972792725124; Mon, 25 Jul 2022 07:45:55 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.374634.606743 (Exim 4.92) (envelope-from ) id 1oFzKX-0001LU-8x; Mon, 25 Jul 2022 14:45:09 +0000 Received: by outflank-mailman (output) from mailman id 374634.606743; Mon, 25 Jul 2022 14:45:09 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oFzKX-0001LN-4g; Mon, 25 Jul 2022 14:45:09 +0000 Received: by outflank-mailman (input) for mailman id 374634; Mon, 25 Jul 2022 14:45:08 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oFzKW-0001LH-5l for xen-devel@lists.xenproject.org; Mon, 25 Jul 2022 14:45:08 +0000 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by se1-gles-flk1.inumbo.com (Halon) with ESMTP id 5f2daa38-0c28-11ed-924f-1f966e50362f; Mon, 25 Jul 2022 16:45:06 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 74B8E2B; Mon, 25 Jul 2022 07:45:05 -0700 (PDT) Received: from e125770.cambridge.arm.com (e125770.cambridge.arm.com [10.1.195.16]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A89783F73D; Mon, 25 Jul 2022 07:45:03 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 5f2daa38-0c28-11ed-924f-1f966e50362f From: Luca Fancellu To: xen-devel@lists.xenproject.org Cc: bertrand.marquis@arm.com, wei.chen@arm.com, Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [PATCH] common/memory: Fix ifdefs for ptdom_max_order Date: Mon, 25 Jul 2022 15:44:55 +0100 Message-Id: <20220725144455.7666-1-luca.fancellu@arm.com> X-Mailer: git-send-email 2.17.1 X-ZM-MESSAGEID: 1658760358047100001 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" In common/memory.c the ifdef code surrounding ptdom_max_order is using HAS_PASSTHROUGH instead of CONFIG_HAS_PASSTHROUGH, fix the problem using the correct macro. Fixes: e0d44c1f9461 ("build: convert HAS_PASSTHROUGH use to Kconfig") Signed-off-by: Luca Fancellu Reviewed-by: Jan Beulich --- xen/common/memory.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/common/memory.c b/xen/common/memory.c index f6f794914dfd..bc89442ba53f 100644 --- a/xen/common/memory.c +++ b/xen/common/memory.c @@ -58,7 +58,7 @@ struct memop_args { static unsigned int __read_mostly domu_max_order =3D CONFIG_DOMU_MAX_ORDER; static unsigned int __read_mostly ctldom_max_order =3D CONFIG_CTLDOM_MAX_O= RDER; static unsigned int __read_mostly hwdom_max_order =3D CONFIG_HWDOM_MAX_ORD= ER; -#ifdef HAS_PASSTHROUGH +#ifdef CONFIG_HAS_PASSTHROUGH static unsigned int __read_mostly ptdom_max_order =3D CONFIG_PTDOM_MAX_ORD= ER; #endif =20 @@ -70,7 +70,7 @@ static int __init cf_check parse_max_order(const char *s) ctldom_max_order =3D simple_strtoul(s, &s, 0); if ( *s =3D=3D ',' && *++s !=3D ',' ) hwdom_max_order =3D simple_strtoul(s, &s, 0); -#ifdef HAS_PASSTHROUGH +#ifdef CONFIG_HAS_PASSTHROUGH if ( *s =3D=3D ',' && *++s !=3D ',' ) ptdom_max_order =3D simple_strtoul(s, &s, 0); #endif @@ -83,7 +83,7 @@ static unsigned int max_order(const struct domain *d) { unsigned int order =3D domu_max_order; =20 -#ifdef HAS_PASSTHROUGH +#ifdef CONFIG_HAS_PASSTHROUGH if ( cache_flush_permitted(d) && order < ptdom_max_order ) order =3D ptdom_max_order; #endif --=20 2.17.1