Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4530881imu; Tue, 8 Jan 2019 01:42:15 -0800 (PST) X-Google-Smtp-Source: ALg8bN6OUNYxJSgxNPG0qKJhCkYUUTG1/aGT4z9KP59CkNEpnjVEdtzSLPepl8kVG6Kaq6Tv8G0b X-Received: by 2002:a17:902:c505:: with SMTP id o5mr74882plx.172.1546940535602; Tue, 08 Jan 2019 01:42:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546940535; cv=none; d=google.com; s=arc-20160816; b=oMdTNqx+Rw21MI+m1irO2R0tyB+eIaLLdkshP7SMWvQXHLa7p93MnglMIdsDIFfJhj LUrX8H9qX09/YKLHSNdDrU90Rnu0O/+exC5Ne6N+58KZJVF7MlagBGOBSU9TbL4es2OK EKLxjaqh1HwDfEc/uG4jy29lxhUa9ik32Ef7AYvikh5Cn3g3JjtRqDO3urw/nkt8P0eU mfNlkn4YpPzu2aXVnIbko3m7jdIe4viruuAGeKvkmgkDT0vB2kvdJIFGrwEcuHSwCBsQ FMZwWQZuRt9NjOyvVuiVOTnK5uj0FV7H6ay8TRVU5PLKtUdbw47ikuGt4lop3rQLEIqv wMaw== 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=mj+nIbDvMzbtU+EDmka9Co6k0ilLIv6rY5fuz3/kSSw=; b=yCgMR8UmIobL/fhzN0MOEnXjjoSp2hslxkfldGtKd0Twy62m/sKJe0IZHkc8u2GjZD fK6spyHlu7GWHPhlz5ukefrnGGz4H0UVERYJYtyC2Qi4ltjZ3rBwyZibtn5qyzTEsDkl 7/WxUE9kfGDTo7aO+vnXTajWIkAS4/yVAPVvUIBu09YA86K16pdH1qFewc6ky/DvFaV5 tlN+5Sf690gFqp3xo9P2HlS4N+PrOpJ/FU1y+vdT2yCtcdWpBUnWM9fbyHWdD/1X2ERW DCPJuTj3JzPbvavKH4nTqMCui9Y/ydexs1f1M6y8mPM8Jf8g6qrdJ9E4bMnc9hXZbwaL e0vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=Aib92XpY; 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 f17si11947851pgj.208.2019.01.08.01.42.00; Tue, 08 Jan 2019 01:42:15 -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=Aib92XpY; 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 S1728549AbfAHJix (ORCPT + 99 others); Tue, 8 Jan 2019 04:38:53 -0500 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:8878 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728142AbfAHJir (ORCPT ); Tue, 8 Jan 2019 04:38:47 -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=1546940327; x=1578476327; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=m/8wk+BMZ6U5qeF6LVioutsW76YRgCcFXfZnC5OB1os=; b=Aib92XpY6nOVzMdXVAfutH/QpwGCaxaSGUfaO06G+SO3Ptp8IdzbqdAr Kn5yyPXwOzfCV9WNzn1CFGV/lcJSk+0IZAZZ/eNQMhsmR+OTego6OwT1e TJlyDoRBEPW/gijrXEoL1rpJw8xXsT1oigdH5T5Z6EW7tuUysENqC0NeV raZPVI9Flbm5kiWW2RtXltNAEg10XufcoKnUI1UTr02YvtqjD6fAeifZl HZF6J5ErwKx33KRVDIqjV7hME2PzwucCX69eejAEcMEo+z41IcJKZEDhC 2KK3tm+Erj6VyeqmNnHf1TUxpURRhhwsl2Mx6FvNF9DDTyvkyNyf+qrhu w==; X-IronPort-AV: E=Sophos;i="5.56,453,1539619200"; d="scan'208";a="99458405" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 08 Jan 2019 17:38:46 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP; 08 Jan 2019 01:18:51 -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; 08 Jan 2019 01:38:46 -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 , linux-kernel@vger.kernel.org, Marc Zyngier , Michael Clark , Palmer Dabbelt , =?UTF-8?q?Patrick=20St=C3=A4hlin?= , Thomas Gleixner , Zong Li Subject: [PATCH v2 3/8] RISC-V: Remove NR_CPUs check during hartid search from DT Date: Tue, 8 Jan 2019 01:38:33 -0800 Message-Id: <1546940318-9752-4-git-send-email-atish.patra@wdc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1546940318-9752-1-git-send-email-atish.patra@wdc.com> References: <1546940318-9752-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 --- 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 f8fa2c63..19edaeae 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_property_read_string(node, "status", &status)) { pr_warn("CPU with hartid=%d has no \"status\" property\n", hart); -- 2.7.4