From nobody Tue Nov 11 07:10:52 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=1569345528; cv=none; d=zoho.com; s=zohoarc; b=aXw+veT9euaNpMyrXfBVdzFy1Ly9KASR2rxCbDVqPewSUb4DeiZHtH0VjfuJ0WiYx8UYzTt6kz9mBVy6ehHPVNfGDHxNA8mchNkMjg1CLONPYs5R17n5w7zNqdiHIWcZ/l4kuAmDhF6CbpnQNDvw0TeVeAbNyDEiFLeMbtmcBYY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569345528; 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=nEpbJHeS/yUB+QGzhGR4ARh6nOZf+z5BOT0HMSeSkKLYy2x1gGDuJPWWVd5bfi2dfoIl/JPtBgHIDasMyGpkzEhMfASxoSbshZMhgaL1VB+H70sspxze2VeY/7VdUBPdc3NCT/yTgbGtTbFm1MdVeI/oSeEwaOwx42fwMAJyWgQ= 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 1569345528511162.56599125924208; Tue, 24 Sep 2019 10:18:48 -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 1iCoRj-0002fB-1P; Tue, 24 Sep 2019 17:17:51 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iCoRh-0002ev-60 for xen-devel@lists.xenproject.org; Tue, 24 Sep 2019 17:17:49 +0000 Received: from foss.arm.com (unknown [217.140.110.172]) by localhost (Halon) with ESMTP id 3b2e3e62-deef-11e9-8628-bc764e2007e4; Tue, 24 Sep 2019 17:17:48 +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 20C1D142F; Tue, 24 Sep 2019 10:17:48 -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 A20FE3F694; Tue, 24 Sep 2019 10:17:46 -0700 (PDT) X-Inumbo-ID: 3b2e3e62-deef-11e9-8628-bc764e2007e4 From: Julien Grall To: xen-devel@lists.xenproject.org Date: Tue, 24 Sep 2019 18:17:42 +0100 Message-Id: <20190924171742.25480-1-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Subject: [Xen-devel] [RESEND][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, Stefano Stabellini , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Tim Deegan , Julien Grall , Jan Beulich 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