Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2582028imj; Mon, 11 Feb 2019 05:24:17 -0800 (PST) X-Google-Smtp-Source: AHgI3IYBRrHtaRvvmd5rLlreWQCjthjKUEO4J6kUaRqby920ZuMacTx8oAo9jng2zk5dq+fl+zKV X-Received: by 2002:a17:902:bcc6:: with SMTP id o6mr16711688pls.39.1549891457306; Mon, 11 Feb 2019 05:24:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549891457; cv=none; d=google.com; s=arc-20160816; b=Jg0TlotQ82Mvbjs3B54vFnlgpKkYufA6VnInPRw7v3qUUn6p6SxnLtdd2FWC0esnCg faSCx0MbFXw8W9KeiKAVAV5qc75+mq3mRuQNYMBuSKtc3ZvK6va6y3hejW/QToRW/OOE HCGoSSzB3cctKp3R6Fce18W8c3ssD6Y/J0oAXFolyR6NUFh+XqSjzga7n25Rwy/0EAM4 y5IAwFOqMP1TuPuwDZLkXGmStVndVSfLttGm/u6UJ+toNWGLJgTpxzNNjDPF9h6N34gc r1GgGRobwtSdEH8gE2w036s/arJEkaw/Zv9gQlye5J16xXJ1oPW0X5DV2oUA39XmHUlq ex1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from; bh=TZdk7FUpfz6Z0OGP+RydPFSXMlWfnb8PnsRK0HD0miI=; b=UmM5Niijd1MfkxbqEppcBwawy194AsEkeP597QKDSrqg0ceo3h/wfoCJgO9ZeZgSQD uzH9NtnX6+rq67YKsvF3FlvbSd1lsOP38Uc8uMfBhYNJHG2ZCVa6cfbSDY3mTNOkEvho toQDQj1P9/bzfGtRbj8AKl4LMsN6zbF9DZoSUuaw8Guoj8pwbXlDkfpVwfdUIIpLPSq/ QcRVSJrw80N63scrSgID4WoVGgG0eH/DkbbxxXn+eNA2UMRsIt+hffgfgB1/Q7Mr6XiW ptLuTxL9Vi77Bz441PQQB7MMIk3DAAQrVLd8bnqY04W2EzX3IlJTOpnaKQ2eK7furBLC BDHw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ay1si6997913plb.165.2019.02.11.05.24.01; Mon, 11 Feb 2019 05:24:17 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727744AbfBKNXT (ORCPT + 99 others); Mon, 11 Feb 2019 08:23:19 -0500 Received: from mx2.suse.de ([195.135.220.15]:43170 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727490AbfBKNXT (ORCPT ); Mon, 11 Feb 2019 08:23:19 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id AD3C2AED6; Mon, 11 Feb 2019 13:23:17 +0000 (UTC) From: Andreas Schwab To: Atish Patra Cc: linux-riscv@lists.infradead.org, Alan Kao , Albert Ou , Anup Patel , Daniel Lezcano , Dmitriy Cherkasov , Jason Cooper , linux-kernel@vger.kernel.org, Marc Zyngier , Palmer Dabbelt , Patrick =?utf-8?Q?St=C3=A4hlin?= , Paul Walmsley , Thomas Gleixner , Zong Li , Damien Le Moal Subject: Re: [v3 PATCH 8/8] RISC-V: Assign hwcap only according to boot cpu. References: <1549590681-24125-1-git-send-email-atish.patra@wdc.com> <1549590681-24125-9-git-send-email-atish.patra@wdc.com> X-Yow: I just heard the SEVENTIES were over!! And I was just getting in touch with my LEISURE SUIT!! Date: Mon, 11 Feb 2019 14:23:15 +0100 In-Reply-To: <1549590681-24125-9-git-send-email-atish.patra@wdc.com> (Atish Patra's message of "Thu, 7 Feb 2019 17:51:21 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Feb 07 2019, Atish Patra wrote: > + while ((node = of_find_node_by_type(node, "cpu"))) { > + if (!node) { That can never be true. > + pr_warn("Unable to find \"cpu\" devicetree entry"); > + return; > + } > + > + hartid = riscv_of_processor_hartid(node); > + if (hartid < 0) > + continue; > > - if (of_property_read_string(node, "riscv,isa", &isa)) { > - pr_warning("Unable to find \"riscv,isa\" devicetree entry"); > + if (of_property_read_string(node, "riscv,isa", &isa)) { > + pr_warn("Unable to find \"riscv,isa\" devicetree entry"); > + of_node_put(node); > + return; > + } > of_node_put(node); [ 0.000000] OF: ERROR: Bad of_node_put() on /cpus/cpu@1 [ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 5.0.0-rc6-00020-g5903f30f1310 #12 [ 0.000000] Call Trace: [ 0.000000] [] walk_stackframe+0x0/0xa4 [ 0.000000] [] show_stack+0x2a/0x34 [ 0.000000] [] dump_stack+0x62/0x7c [ 0.000000] [] of_node_release+0xbe/0xc0 [ 0.000000] [] kobject_put+0xa6/0x1e8 [ 0.000000] [] of_node_put+0x16/0x20 [ 0.000000] [] of_find_node_by_type+0x66/0xa4 [ 0.000000] [] riscv_fill_hwcap+0x14c/0x1ce [ 0.000000] [] 0xffffffe0000026d4 [ 0.000000] [] 0xffffffe0000006ec [ 0.000000] [] 0xffffffe000000076 Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."