Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3711650imj; Tue, 12 Feb 2019 03:26:33 -0800 (PST) X-Google-Smtp-Source: AHgI3IYzLXROOZNaTeJtdkBoR0siRSUwYIjGKhP+7XzQrXFcx0A3tlqYe9dy8v1JjmiX6IHndK/i X-Received: by 2002:a62:3888:: with SMTP id f130mr3446440pfa.132.1549970793799; Tue, 12 Feb 2019 03:26:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549970793; cv=none; d=google.com; s=arc-20160816; b=LV5vsUryECVRc7u/ETzyUrEas4K4zwmrTmDFaVn8eSzAFgSWL6wR+sF/HJNQY7jN6+ fKMOP0qu+qRX/OPrcbchZD0CIPXPCNX+GyL0Rgm9NrOITjryS34lSDP64d08C19wXDX/ qLrcbbIwkTWk8Bn2omqlj6La4zZj8IpaWfsoPs3VhcTurdgUfjWFkIRmSXN3Rx4nl1A7 mlDpFpMtaPYiEJbBreZlZC1IorGzY13DjSiuYrQ+NBG05VD+k5QNV3yMNe5r7Cjok1zk 4e131gvCF2Gv7dmi/wlp06R9x3Y8atq7HiI3t1KsBRhCa1rYl8fmZhLWxzusLLsAlRjk zTxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=hV56yyANK+jU6N3ENP7QQh9M0rHMij3nkJjoDopAWhY=; b=KjELRd4cgv2lWTQwTU25UMiyq+nKf5OVcNURjOfxEsPHIg7sviBL5jvdKZAXuOuHLQ APVW524JW0Fx/uljHOjNyIiKvB586LD90jY3Wx3HFFueu01xYrij8ejsLDyCx2qv2SpW R96CFO3BgQuWpLcsozWU89FGlVmowlcc0aGFKrw5PQPitas1rUt89NHAbWv1Jt4fjcnh wSogisEz+ztBmdxYQ05dp8TVzA1YWL79vNIwhWp2LFlTYud25jZF5pOfLxZeT5varR2H N2MPUDC19mVQAD+gEKGHR6CMwxGdqli5561eRiqlmypKSUqR1Y/KJkEtbDqvl3y2vUfM dpMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=gMFu8fFA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x14si12702910pln.27.2019.02.12.03.26.18; Tue, 12 Feb 2019 03:26:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=gMFu8fFA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729315AbfBLLKe (ORCPT + 99 others); Tue, 12 Feb 2019 06:10:34 -0500 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:42875 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729288AbfBLLKd (ORCPT ); Tue, 12 Feb 2019 06:10:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1549969889; x=1581505889; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=dA6aSe5XZKK9jbqPUE7aSPe08mUJ7TsRaBX9UTEfvg4=; b=gMFu8fFAS2d5FkYeaAKs97wA8Xp3P9EMmmZ0Koe6Sx0SQv6EkwSHOD1d J3OdENDFPG2ZBqEq0h9rjVeY+iTswuIrYOq+U6WyFFxMXGx3ji0EokeZl 4d/Gz8k7aW9RYTjO1QeJfy0TtV+nlSdX9lhBi1ysDbFHTboCwUPTDTN85 pYqclYebcjOR0HqgWJGlYevNpfjIehfYbU0PB5dUghpQQmfnhn4FgOhGo UbM+3XxSz3Ts7K3Jy0ulB9Y/yn7fRYRrI221a1O7C2vFVIYpRRF0Irdqq xeqqZ5wMcN4Ll45zLb2l/z3t5IcZINuzv/CLfSLQzQs6kVTZdcFPiPgS0 Q==; X-IronPort-AV: E=Sophos;i="5.58,361,1544457600"; d="scan'208";a="199201829" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 12 Feb 2019 19:11:10 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 12 Feb 2019 02:50:57 -0800 Received: from jedi-01.sdcorp.global.sandisk.com (HELO jedi-01.int.fusionio.com) ([10.11.143.218]) by uls-op-cesaip02.wdc.com with ESMTP; 12 Feb 2019 03:10:21 -0800 From: Atish Patra To: linux-riscv@lists.infradead.org Cc: Atish Patra , Alan Kao , Albert Ou , Andreas Schwab , Anup Patel , Daniel Lezcano , Dmitriy Cherkasov , Jason Cooper , Johan Hovold , linux-kernel@vger.kernel.org, Marc Zyngier , Palmer Dabbelt , Paul Walmsley , Rob Herring , Thomas Gleixner Subject: [v4 PATCH 3/8] RISC-V: Remove NR_CPUs check during hartid search from DT Date: Tue, 12 Feb 2019 03:10:07 -0800 Message-Id: <1549969812-22502-4-git-send-email-atish.patra@wdc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1549969812-22502-1-git-send-email-atish.patra@wdc.com> References: <1549969812-22502-1-git-send-email-atish.patra@wdc.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In non-smp configuration, hartid can be higher that NR_CPUS. riscv_of_processor_hartid should not be compared to hartid to NR_CPUS in that case. Moreover, this function checks all the DT properties of a hart node. NR_CPUS comparison seems out of place. Signed-off-by: Atish Patra Reviewed-by: Christoph Hellwig Reviewed-by: Anup Patel --- arch/riscv/kernel/cpu.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/arch/riscv/kernel/cpu.c b/arch/riscv/kernel/cpu.c index d1d9bfd5..cf2fca12 100644 --- a/arch/riscv/kernel/cpu.c +++ b/arch/riscv/kernel/cpu.c @@ -34,10 +34,6 @@ int riscv_of_processor_hartid(struct device_node *node) pr_warn("Found CPU without hart ID\n"); return -ENODEV; } - if (hart >= NR_CPUS) { - pr_info("Found hart ID %d, which is above NR_CPUs. Disabling this hart\n", hart); - return -ENODEV; - } if (!of_device_is_available(node)) { pr_info("CPU with hartid=%d is not available\n", hart); -- 2.7.4