From nobody Mon Feb 9 01:06:52 2026 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; dkim=pass; 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=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1614266771; cv=none; d=zohomail.com; s=zohoarc; b=Tuz++S4h0gNF1CeCf9Zub4Vr9tyezBDeM+vhYBxHAoM7sY3SxHEFIY0dJe2EQ4XImP1ALMGf2fsmbf7pIzspjXmHunohKw0Cpt8f0Fhpk8ePNVBhR4+VB2mEIY6G4uet+LyFBKNIn1w0Uo+yotBVfhyLm9+ocSB9rf9wdoJsODE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614266771; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0m5dJDerLXkuZbIjHhNT28vY8++JYdZl1jR5h36Ds1M=; b=mPAH9Z1REcJ2rZiFlkawDqdVDTdhy3q0bk6jVX2znsNSOTck3xPyzQDfkCD3UyggvqSvCpk9eILu+m/NX3zzNoa47asCtXV0/yUzrtgqhWbYSBrHg8DMBvkFiTUuiKe2yOK3nYmEeJ0w7pFZvqFZ9T0KqZjP+zw+0onAC24ahJ0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1614266771971549.3274550935153; Thu, 25 Feb 2021 07:26:11 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.89812.169540 (Exim 4.92) (envelope-from ) id 1lFIWe-0006Oh-MW; Thu, 25 Feb 2021 15:26:00 +0000 Received: by outflank-mailman (output) from mailman id 89812.169540; Thu, 25 Feb 2021 15:26:00 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lFIWe-0006Oa-J1; Thu, 25 Feb 2021 15:26:00 +0000 Received: by outflank-mailman (input) for mailman id 89812; Thu, 25 Feb 2021 15:25:59 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lFIWc-0006Ig-Ts for xen-devel@lists.xenproject.org; Thu, 25 Feb 2021 15:25:58 +0000 Received: from mail-ot1-x332.google.com (unknown [2607:f8b0:4864:20::332]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id b4b25551-09c9-4f5c-a34e-49f38da048f8; Thu, 25 Feb 2021 15:25:50 +0000 (UTC) Received: by mail-ot1-x332.google.com with SMTP id b8so5998917oti.7 for ; Thu, 25 Feb 2021 07:25:50 -0800 (PST) Received: from localhost.localdomain (142-79-211-230.starry-inc.net. [142.79.211.230]) by smtp.gmail.com with ESMTPSA id l4sm1047292ooq.33.2021.02.25.07.25.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Feb 2021 07:25:49 -0800 (PST) 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: b4b25551-09c9-4f5c-a34e-49f38da048f8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0m5dJDerLXkuZbIjHhNT28vY8++JYdZl1jR5h36Ds1M=; b=DPnRPwDD4srYuosEWwZF3X8aPV2fQkhNjtgGjLmOSVKFpg6e9ScPHU+CtJrOvlXwjK zw6DX/D0nL/q2obdwPHzuDL4I27RSfmWPmW7dsGYwX5TtueyQyyiDOqR1SOQQzL3y762 2knRf9Kc0H6zNVVcXXk5uW/n8RcEcugtxrAcSUJZA9NGh3SeRVTqof8mt5GVWenAiwUK tCC8EIuctNupMgWq/rkvVcbbBDHZopFB/tvVVAlIvK2PxCy8NwV3KNu0BOXJwgZfiT3D ScPW8gfhhjeipK9is9hwKEFET8u2n8gSHBqRnQiCjlU5uaiw1YITMfyh01iB41hKM1P8 G0Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0m5dJDerLXkuZbIjHhNT28vY8++JYdZl1jR5h36Ds1M=; b=Ybu4VCE1qo7FESvlUZZWPzZST6MVoChwUMA+yOve+7yuWiSfgcez3VJDkKh+pMiy/4 ImK4Ua1kNl6wNKdWER870o3oKFaiJ8SZOaZozM5FHdepxIdkT7VXAVUQm/iZXn3InPoV HDXFFySmetX664V7+hb+vuDUA9G3vN+cbKkuefJeThlfcATEnpuse2cTDEN++No1QMEq I0UvkQ+gjz2B0h666AXeTe2oRmK1E3kAuUdWuozPZwAcjRZgIgM67BD4PsN4aPmRZfwn OW6nI1ZtjoE6V5gY54WAvoXa+xArg1DTmP+suA/UnygLZN1lbt+9rtttcOJKa3voyq8k r8Kw== X-Gm-Message-State: AOAM533X0nSVce2LmHuf1urYYP77fPEW4m8d1RgV/dEptATBBzEXu89E 1nMS6ce0xzea0qe7Zwql+dOciOOggD0I5iNp X-Google-Smtp-Source: ABdhPJwe4ud8EAoypaTz0SETf6ZK7rHsSPipfZl1/lJrhmpEksqhqzmEj9wNWFTfFbHKwjYYWna+aA== X-Received: by 2002:a05:6830:11c7:: with SMTP id v7mr2694660otq.245.1614266749291; Thu, 25 Feb 2021 07:25:49 -0800 (PST) From: Connor Davis To: xen-devel@lists.xenproject.org Cc: Bobby Eshleman , Connor Davis , George Dunlap , Dario Faggioli Subject: [PATCH for-next 3/6] xen/sched: Fix build when NR_CPUS == 1 Date: Thu, 25 Feb 2021 08:24:02 -0700 Message-Id: X-Mailer: git-send-email 2.27.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) Content-Type: text/plain; charset="utf-8" Return from cpu_schedule_up when either cpu is 0 or NR_CPUS =3D=3D 1. This fixes the following: core.c: In function 'cpu_schedule_up': core.c:2769:19: error: array subscript 1 is above array bounds of 'struct vcpu *[1]' [-Werror=3Darray-bounds] 2769 | if ( idle_vcpu[cpu] =3D=3D NULL ) | Signed-off-by: Connor Davis --- xen/common/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/common/sched/core.c b/xen/common/sched/core.c index 9745a77eee..f5ec65bf9b 100644 --- a/xen/common/sched/core.c +++ b/xen/common/sched/core.c @@ -2763,7 +2763,7 @@ static int cpu_schedule_up(unsigned int cpu) cpumask_set_cpu(cpu, &sched_res_mask); =20 /* Boot CPU is dealt with later in scheduler_init(). */ - if ( cpu =3D=3D 0 ) + if ( cpu =3D=3D 0 || NR_CPUS =3D=3D 1 ) return 0; =20 if ( idle_vcpu[cpu] =3D=3D NULL ) --=20 2.27.0