From nobody Tue Nov 11 07:09:26 2025 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1569345498; cv=none; d=zoho.com; s=zohoarc; b=W0cWRFXDhd0N0Zc02aGYqgkbdC67QuPnMoIsM3WIYl9Pbtrr8EgM/+CgOOD4SKdeJmQVGUxgdQIT+uZUmBvf7FM9wDMAUoC973yjafDo6umY5NO5W1ObZKd9WqcHWwCQrA4a+7VZTjGauwyK0VMUZ4I0Lsq2RTgRh570o7K3Jjk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569345498; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=7U3+LsLpnOY302daQi6C+XkUYDpiT9HYcJqXuXd7Hms=; b=HVxvrhgaPlW+JUNqQcnSey7FVH605ZnNh346uTvzTBNYBGyidFoapsR06XEqL7p12/cOG/A8IDwl+QLbR8Gyr9wl6dRXOWCtYEkMw4qpYb37bg3+2h3V0OLWT/4vmflRRK+exaxBS+F+hV85EjxIo1FoDsE5s3+HmMo2/8Pvi+U= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 156934549847837.96666845991331; Tue, 24 Sep 2019 10:18:18 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iCoR6-0002af-Ln; Tue, 24 Sep 2019 17:17:12 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iCoR5-0002aW-7h for xen-devel@lists.xenproject.org; Tue, 24 Sep 2019 17:17:11 +0000 Received: from foss.arm.com (unknown [217.140.110.172]) by localhost (Halon) with ESMTP id 22b4a4f2-deef-11e9-bf31-bc764e2007e4; Tue, 24 Sep 2019 17:17:07 +0000 (UTC) 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 EEED3142F; Tue, 24 Sep 2019 10:17:06 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 625E53F694; Tue, 24 Sep 2019 10:17:06 -0700 (PDT) X-Inumbo-ID: 22b4a4f2-deef-11e9-bf31-bc764e2007e4 From: Julien Grall To: xen-devel@lists.xenproject.org Date: Tue, 24 Sep 2019 18:17:02 +0100 Message-Id: <20190924171702.25422-1-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH for-4.13] xen: sched: Fix Arm build after commit f855dd9625 X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: jgross@suse.com, Julien Grall Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Commit f855dd9625 "sched: add minimalistic idle scheduler for free cpus" introduce the use of ZERO_BLOCK_PTR in the scheduler code. However, the define does not exist outside of xmalloc_tsf.c for non-x86 architecture. This will result to a compilation error on Arm: schedule.c: In function =E2=80=98sched_idle_alloc_vdata=E2=80=99: schedule.c:100:12: error: =E2=80=98ZERO_BLOCK_PTR=E2=80=99 undeclared (firs= t use in this function) return ZERO_BLOCK_PTR; ^~~~~~~~~~~~~~ schedule.c:100:12: note: each undeclared identifier is reported only once f= or each function it appears in schedule.c:101:1: error: control reaches end of non-void function [-Werror= =3Dreturn-type] } ^ cc1: all warnings being treated as errors To avoid the compilation error, the default definition for ZERO_BLOCK_PTR is now moved in xen/config.h allowing all the code to use the define. Fixes: f855dd9625 ('sched: add minimalistic idle scheduler for free cpus') Signed-off-by: Julien Grall --- xen/common/xmalloc_tlsf.c | 5 ----- xen/include/xen/config.h | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/xen/common/xmalloc_tlsf.c b/xen/common/xmalloc_tlsf.c index e98ad65455..1e8d72dea2 100644 --- a/xen/common/xmalloc_tlsf.c +++ b/xen/common/xmalloc_tlsf.c @@ -549,11 +549,6 @@ static void tlsf_init(void) * xmalloc() */ =20 -#ifndef ZERO_BLOCK_PTR -/* Return value for zero-size allocation, distinguished from NULL. */ -#define ZERO_BLOCK_PTR ((void *)-1L) -#endif - void *_xmalloc(unsigned long size, unsigned long align) { void *p =3D NULL; diff --git a/xen/include/xen/config.h b/xen/include/xen/config.h index a1d0f970a7..a106380a23 100644 --- a/xen/include/xen/config.h +++ b/xen/include/xen/config.h @@ -86,4 +86,9 @@ #define NDEBUG #endif =20 +#ifndef ZERO_BLOCK_PTR +/* Return value for zero-size allocation, distinguished from NULL. */ +#define ZERO_BLOCK_PTR ((void *)-1L) +#endif + #endif /* __XEN_CONFIG_H__ */ --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel