Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5290720yba; Wed, 10 Apr 2019 16:06:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqxkYZnmw1e0+c/DzoeaZVFCv02m5/H8MW79KWDshbTe++KvTujevJj+n/KfbbDAQRn6YnBJ X-Received: by 2002:a63:3c19:: with SMTP id j25mr44190669pga.365.1554937566993; Wed, 10 Apr 2019 16:06:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554937566; cv=none; d=google.com; s=arc-20160816; b=s3okxMRPXWMnp2wOpjVOKlyWFSmLsSWYVAcwmOofzYkKIT5VM18ii/nHaF0w/rZQtX 1X8x0pkNImW40npYtqdkeluSXGTqjZ9d4l66NtqzrzQC25BYc1lDjzb4/LuzcFWhdiq/ WVBGfX0r3EjRdGN0ssNSg+OhhMe6r1tVcBhF3M2MHMykkE4uFhtCPxq6w1PpE+sVZRq3 jeuVBSmcv96qIa5P1j65k2d6aRTyWdeioFR5F6Mb71s7FbPUvj+rDqjmLqvcu8xIqu42 PC/xe2W3MVjZHdLUIHBfCmXuP8TpXtdJFhF+GzOWfXSLuCg8dZkotXXUlt6CTgV8MH7H pTAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr:dkim-signature; bh=Zylusp+y150MVbPcIEZ4tarTmPOdzuQ/oIbs//WS5GM=; b=cHEvZ8UHy5qT7JtVBjHCkHitTLMt1Ib39qTekJ1v8EORJp2uA7gCOtOeaK5HBVEqvK kZFyb4i/+y8z0084YAjMFu5heF8eEx1n427oIFwXklmw2JHQ/Y1xw/Nocg5a68hOZrBn dNiUuhpjYKIgC31BXLXLNVSUeoweRHGe2vfCSk40RElOuK7oaM0i7zb2uut9J3OvkXWh JDJFhHmn9m27UaphnE1vCCT6a2VoUEO0NwYpe6so5abZ66XPGzppzQjifTjSUJzPzCgm JMqoBmW6vzWXYGpp/2V1/8pwcp8qSM7SZDzoWFdsi1d/ji1N8kQyEzUtHu6BikVb9YXw n84w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=AXO8YCmw; 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 y11si25681794pgp.495.2019.04.10.16.05.51; Wed, 10 Apr 2019 16:06:06 -0700 (PDT) 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=AXO8YCmw; 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 S1726831AbfDJXFM (ORCPT + 99 others); Wed, 10 Apr 2019 19:05:12 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:61696 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725981AbfDJXFA (ORCPT ); Wed, 10 Apr 2019 19:05:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1554937501; x=1586473501; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=lvVtI67GMwWJ9cv03bHsz1eiddUW1dTASmv1umxV15U=; b=AXO8YCmwc7n0WlfaUZxj77/4e1cD+Quf1vokqvOovg5OylXmVxjMFWLo c0WE0tI2I8Y/GY7flmHfk700Oit7HNWhl3nZU1J/dHgi7K+mKXHcAkd3y 2yg1mb+aB8MnMpBjSJRn19+UACkl1XmdGFkmGWjpS2PW988MorfebmYZB Wka8E43T1SKuNXqefELA8nprV4ojCTPaQWdpie5pS9u1u3lqxLGpzEr4h KNDjEtKs214ORdEknW7lQh56VhGZJwdfBVWbTRPFEBHvNhpWiQRTn6xc/ +x+Av9TcvB1Eg/+cpfscT0tl4saXYTZcOU4yCSUjSjoy3LSIs9EwR5QqD w==; X-IronPort-AV: E=Sophos;i="5.60,335,1549900800"; d="scan'208";a="110531209" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 11 Apr 2019 07:05:00 +0800 IronPort-SDR: PB/oPCDfWu7Svyvvzm22TyAkcAzJ5sml3wV4P5R3ueSEExiBj/K7+YiY71mtO5eJVB/eXwPpJf U87g2I9uDDHyQNsHgtgvItulV6D0KCAJPj7CuIQkEsyltkruQU3F0ZPIxLgkOIJTydnmsCltQp N6eFkqfbrzDBeY32eLfiS5W0brgaYCQ2mHkwz6jOYtmMNHjOwdAPIMqGnazebsSNQ+Eaa714YU wH/DS1L9tzcUyQmJWF//Q2++gV7kB5COgwpvoAPmzWjX387IPWStsjd761TWKgPnKx96GyH+AR XMLLH3vp91vs1137puT70A/E Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP; 10 Apr 2019 15:41:53 -0700 IronPort-SDR: R4DRtdzTOmyurz1EQPBXhM/9XFWc6CUxuf9v2Kp3b0td5Fqi+tavjBieLnUnPi83A7TUW9nk13 EPtUWgMqdDypcMSLBXazloG+RUgzgHu6pTEfGFtQum21oOx0s4MGpFkL368hDcuq7k3c6037Xt ixdOeDXxtTYkxtywJEthG4scVYWjjC6xcpDo2biOqG9CK1q37kmmVQfkgAB7XX+kHNXpLZYafa Nwsr5DjYuYPISre5O5vChK7pL93OKJl3eyqE6aD92ebSCwcvEg9rj/0Iq9b/8oZqLp7ypwch4F ffk= Received: from jedi-01.sdcorp.global.sandisk.com (HELO jedi-01.int.fusionio.com) ([10.11.143.218]) by uls-op-cesaip01.wdc.com with ESMTP; 10 Apr 2019 16:04:59 -0700 From: Atish Patra To: linux-kernel@vger.kernel.org Cc: Atish Patra , Albert Ou , Andreas Schwab , Anup Patel , Dmitriy Cherkasov , Johan Hovold , linux-riscv@lists.infradead.org, Palmer Dabbelt , Paul Walmsley Subject: [PATCH v2 2/4] RISC-V: Fix of_get_cpu_node usage Date: Wed, 10 Apr 2019 16:04:41 -0700 Message-Id: <20190410230443.15729-3-atish.patra@wdc.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190410230443.15729-1-atish.patra@wdc.com> References: <20190410230443.15729-1-atish.patra@wdc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org of_get_cpu_node expects a logical cpu id not a hartid. Signed-off-by: Atish Patra --- arch/riscv/kernel/cpu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/riscv/kernel/cpu.c b/arch/riscv/kernel/cpu.c index cf2fca12414a..c8d2a3223099 100644 --- a/arch/riscv/kernel/cpu.c +++ b/arch/riscv/kernel/cpu.c @@ -136,8 +136,7 @@ static void c_stop(struct seq_file *m, void *v) static int c_show(struct seq_file *m, void *v) { unsigned long cpu_id = (unsigned long)v - 1; - struct device_node *node = of_get_cpu_node(cpuid_to_hartid_map(cpu_id), - NULL); + struct device_node *node = of_get_cpu_node(cpu_id, NULL); const char *compat, *isa, *mmu; seq_printf(m, "processor\t: %lu\n", cpu_id); -- 2.21.0