From patchwork Tue Sep 24 17:17:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 174293 Delivered-To: patch@linaro.org Received: by 2002:ac9:19ad:0:0:0:0:0 with SMTP id d45csp4108565oce; Tue, 24 Sep 2019 10:19:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqwjcKyNnj63BA728wc+UDmcLYZnV9wWw39nQlyNuQqaFCIQeb+k4jgJLk1a3C58D71ny/5l X-Received: by 2002:a02:5585:: with SMTP id e127mr4751420jab.25.1569345551378; Tue, 24 Sep 2019 10:19:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569345551; cv=none; d=google.com; s=arc-20160816; b=tX6XYOj4fr2LTsD1VlS2/jeKCqT50DoUyi4Wi9hxaI+PYEpZlovUL3HpkOB3PGl19W LB0bR/GZ0vk/QDwwn5Mqf70RejyH1tfRv8U/mdTDMLo0vplW/qzS4s5OJd+5r53lIKkq hZrBMxPE+Kc+CmI8fDUAmH1nKC6RdveYJmNfrOW94Sn5Y9iue9Clh0JF16kOH0WdnVA4 Yw3sUZ3lBSUrPzJ+X+/o0Qvea8E2/B8/ZFOy1JqbXT7Wwu4P6j9XSq1ZV7gw7PQAQRKK llrX1TBk/Pe56VBSCHzZiJa4TI005lTCq1sT+bmYtDwHPwdAcg29oSM+/owHhuAC5tiZ 5ukQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from; bh=7U3+LsLpnOY302daQi6C+XkUYDpiT9HYcJqXuXd7Hms=; b=dp5JKhmeyz74RqjRHzb5Cn7o0BOkyvsYqMgRrD0qxk8B4d7MHdoCAcOhJFkM4eIWXN 4oqBZyhtjLUOTgXgDPoDKKyFJkSKWZu1BS/enFSWijHO39rn1UWVFO+MbnkUxXkvhdAZ guID1gj61KqSNdztVuLfyjjdGR8IOzJmy9WLJGh52GQYmocMRwHCcsEzwUD7U+Arj22g zAD2AUOQ4SZn9Ufs1Sssl38bKY2ftBHsn9L5nHihtCbKCq90mPTs5C+/PSyo8GUwqzZy VFws5Db76KoBtBpPtCWhJ1IDfqM4iML3F/porZPc659fXKFVWWNAEJ56SbPi4DwwiJls jGpg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id d2si3125056iod.69.2019.09.24.10.19.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 Sep 2019 10:19:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org 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 X-Inumbo-ID: 3b2e3e62-deef-11e9-8628-bc764e2007e4 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) 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 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 ‘sched_idle_alloc_vdata’: schedule.c:100:12: error: ‘ZERO_BLOCK_PTR’ undeclared (first use in this function) return ZERO_BLOCK_PTR; ^~~~~~~~~~~~~~ schedule.c:100:12: note: each undeclared identifier is reported only once for each function it appears in schedule.c:101:1: error: control reaches end of non-void function [-Werror=return-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() */ -#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 = 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 +#ifndef ZERO_BLOCK_PTR +/* Return value for zero-size allocation, distinguished from NULL. */ +#define ZERO_BLOCK_PTR ((void *)-1L) +#endif + #endif /* __XEN_CONFIG_H__ */