Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp48728img; Tue, 19 Mar 2019 15:22:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqzAwerL06qqY5iEM2Y34tSc1z4hbKF8ex/yQt7i6so5BwjnTKU+1OtEvuq24nZwtrJ31CJ4 X-Received: by 2002:a62:205c:: with SMTP id g89mr4130123pfg.34.1553034125323; Tue, 19 Mar 2019 15:22:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553034125; cv=none; d=google.com; s=arc-20160816; b=b606LW1dCpXGWW615yUEDG4VDPG38rhxSfM30f20yJB9gLG2oMkwXhoD0IeyOJhuw3 PfHGRGAczHj18vp1N+gDh2oFWd6p9xUWGX63RCPAA1R/ZMee6eNWc1q88xQU5jGZ20hQ 29SysGcrajtbAJ1BwIb5ub92fnVmdKYHUeAfEnJ+VF6kNSq0S336gFvCaUXX1xYam0zX Ga67cErWtY+pA0K5VwVQdg29X70pBBVV16X9j3NXUD6DAZgeNRGzxIdcYS4pXoul82o4 1lcDBdSz93pkS1XqgGWSHzL1Pb5GROqDu+KhDkMSmCeCplV6jKTwdIw3zwcy226qiDWF Ya/g== 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=FZQ9k0DAZuzOV68NYNgzpvS1gDhHIkOT1ZxLkyYTJTs=; b=Jyq8Xk2iBk2uVEbCZ1zoA5w2JFT7OvVdGaFEJT/yypqZZ0J6N1P3xeaA1I33We6nxJ b7LB4x1fJiuT/nxKNuWyFPCaZI4K8jRg7G3mwdM9bJjXgQ80QyqTAsEQIoxgEF6/d8SP inBws8hDWX6Vpa2Q5mFHCq1tgcK7ElNqAOR2HO7KIqMTnAA3B+O4jzb+ZG76C3n7VMzr TEUmBhUkU716EL/GoPSmKMaN7pzsgBOYdE3mGFhBCGMXhsGigTBhfmmTwligKXFIu8PK 4Hkn67H5vJhuIZ5uFV0Eb1DDFJeFytLRQZqB9UqLJewDK+yTRIwiPZAEhXHVJwZU9U0a RXkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=oOTPxjsu; 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 k16si67668pfj.174.2019.03.19.15.21.50; Tue, 19 Mar 2019 15:22:05 -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=oOTPxjsu; 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 S1727700AbfCSWUq (ORCPT + 99 others); Tue, 19 Mar 2019 18:20:46 -0400 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:6004 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727043AbfCSWUn (ORCPT ); Tue, 19 Mar 2019 18:20:43 -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=1553034043; x=1584570043; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JHyZqNF9UsH7+ClJFH5uWEO14tdxMwlKOp4HiqDbalc=; b=oOTPxjsuWeZ0SrPT2DwVs+biy0zrUVAf8208LMIqM/2l54p+UtgoA/C3 lu1CV0RgSporZ0hCVDiK/v2jIspmJej2t5tYeSgD6YvQjb9YevYwNiKER kxW9gzRiYZF8WREjdbjSbtxKnx0DLirIHPG0BUHzbBcOzcRNJCWdiuEbb h7Wa0/QfM4UPM0/MKqNHiauPuGUg0DuIIAqLcmx7WJ4hXZHFGA9ak+849 w6NIKeeT/qK5wPCpj5XvM7wgz+RMR2ybVS7OartKqfHDUAv+6jGbmJmol UdQDRZ3LZhECZYO1MQpesKfat0yxyGpdM4spXw0J/OMJGlb0Aqotf3K7n A==; X-IronPort-AV: E=Sophos;i="5.60,246,1549900800"; d="scan'208";a="105523537" 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; 20 Mar 2019 06:20:43 +0800 IronPort-SDR: psqnDJD2qlvku8FdKa/30sWoObUwOHnqxjySRMDvdimSGHpypHRVfOKD551gkXukVUqxriVGx7 3VZZRu8wsL8IqcHOEOOKanbEgLh8hg5AEfoXWB4fHJwq1h8cMhp5K3mv+ryZYuEKWk4dJRpfz0 9k9deCuoQTkiAUsjo/9xBFAhIrP4wFGWBAyTqq0kBF9iteqqY/zYvSp5ihji60tLnfA7CTTKDj X01/6EBsVpaLZsN4/vEi1lIUXdnkQr4AzxnziL2zikhxI/dVx6dZxGJfZ1MdtliOMjPPFKUREi nOnA+EHPzuPFxFcTR6bEX8oM Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP; 19 Mar 2019 14:58:20 -0700 IronPort-SDR: S/UjAAnMnYpTs6jw+2waR06og3vocMTSGYhml767rgnlKG6Me1JB88TbVoMAk17uXmElwqXLaA gI4TXxJd1JDa65Y2Bq/3HjT2BiVEMRBwAWuhKY0hh9C0dQM75Fy4eAPBB42p1sm14vdcOJSIp6 cH8FQfT41ZIQw3GTWW+6CRUmPTyjza1E2p85LNIeZy/EqtO82bpQv5Wk1FJKFJ13KgivPq1SDq QdsxQB5aMRkfQ43vPujqsRVFIPbwqmIGRza9NhQTmbO2aFNY3wosWgiWP1AwcUAmYMUxrQf5zP sSo= 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; 19 Mar 2019 15:20:43 -0700 From: Atish Patra To: linux-riscv@lists.infradead.org Cc: Atish Patra , Albert Ou , Andreas Schwab , Anup Patel , Dmitriy Cherkasov , Johan Hovold , linux-kernel@vger.kernel.org, Palmer Dabbelt , Paul Walmsley , Damien Le Moal , Anup Patel Subject: [v1 PATCH 2/4] RISC-V: Fix of_get_cpu_node usage Date: Tue, 19 Mar 2019 15:20:26 -0700 Message-Id: <20190319222028.4293-2-atish.patra@wdc.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190319222028.4293-1-atish.patra@wdc.com> References: <20190319222028.4293-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 cf2fca12..c8d2a322 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