Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3698233imj; Tue, 19 Feb 2019 07:58:58 -0800 (PST) X-Google-Smtp-Source: AHgI3IbEC9F1onw3GJDFW2OgW2/22hS+eUxVIp8BZdgucRD1YwkoESMgBhMVkNuUo8zYwr8zPsmt X-Received: by 2002:a62:7086:: with SMTP id l128mr29999291pfc.68.1550591938436; Tue, 19 Feb 2019 07:58:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550591938; cv=none; d=google.com; s=arc-20160816; b=xvzx+q3bOXtqOyIg/DnPgP+iOp+PuECsoVIeSN8I69XXG9KQKVAYqmPpD9QYIwtOpH C57GBrSkMyW0EcWXyNvOA+Bz+ML9GtHohUg+nXQfUgCpm/2WwfwJy/Jina/5NDopQ/iF av7+KkDYq9qnweMVFWVoto1vytFHyZPI7XxVP2oPq017oLa4DYS+RXF2ivFfPqJ3ArGp O3WIDG3UpFPSl5FTsXDdB+jrh+EgRv9NaQSvi4uQDxfcxVQNMF1l+IF+r0xEgFIIWXNs dukqu1JSD+qSoD+zEbPFI+nFDhpFGFpWRaehoAPeAPY/9mDlTnYDxG590HyFOo94F8Ip 0SfQ== 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:to:from; bh=dVMoQ6s/mVGW+nqVxMrL7RIP3mmKjOky4kfOtQ1a9XQ=; b=SCWzptRunBzESFm0X21Za8do8RU8m9HnGcwniaS61PtWVKsQdXC3QV80ezqRVZpsJq rJof+QNUQL9S55x5pydfhJb8SgYDhdpO1jAkvgUfrqSIUCqnwt5UB1CmHCgUUWKT5/sH TrHjOQc3Tj+EXjHwzmc/HNANJZGmdu6xI0+i+O2p3z5T/qtVF1WrLQwa8M/Mdv6tPKpy vFzLlgNimWJ++xFhdcJ1h2Ao0qAspvAEkdZ8Z0tA6fJZTdW8eHE1ohUXFqKHA5qL1+nz Cgh8m01mR1ZfzwGOb/YjVEiQ9l1YokLLsU9YH01Vd7HkvdVy+02lw2nt4nl8ZpDiL1Q0 z0Sg== 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 i35si14853285plg.396.2019.02.19.07.58.43; Tue, 19 Feb 2019 07:58:58 -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 S1726385AbfBSP5k (ORCPT + 99 others); Tue, 19 Feb 2019 10:57:40 -0500 Received: from mx2.suse.de ([195.135.220.15]:51906 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726357AbfBSP5i (ORCPT ); Tue, 19 Feb 2019 10:57:38 -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 D4A6AAE5C; Tue, 19 Feb 2019 15:57:36 +0000 (UTC) From: Thomas Bogendoerfer To: Ralf Baechle , Paul Burton , James Hogan , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 04/10] MIPS: SGI-IP27: do xtalk scanning later Date: Tue, 19 Feb 2019 16:57:18 +0100 Message-Id: <20190219155728.19163-5-tbogendoerfer@suse.de> X-Mailer: git-send-email 2.13.7 In-Reply-To: <20190219155728.19163-1-tbogendoerfer@suse.de> References: <20190219155728.19163-1-tbogendoerfer@suse.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Move xtalk scanning to a later boot stage to be able using things like kmalloc and friends. Signed-off-by: Thomas Bogendoerfer --- arch/mips/sgi-ip27/ip27-init.c | 3 --- arch/mips/sgi-ip27/ip27-xtalk.c | 13 ++++++++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/arch/mips/sgi-ip27/ip27-init.c b/arch/mips/sgi-ip27/ip27-init.c index 83399e578b61..aba985cf07c0 100644 --- a/arch/mips/sgi-ip27/ip27-init.c +++ b/arch/mips/sgi-ip27/ip27-init.c @@ -52,8 +52,6 @@ EXPORT_SYMBOL_GPL(sn_cpu_info); extern void pcibr_setup(cnodeid_t); -extern void xtalk_probe_node(cnodeid_t nid); - static void per_hub_init(cnodeid_t cnode) { struct hub_data *hub = hub_data(cnode); @@ -71,7 +69,6 @@ static void per_hub_init(cnodeid_t cnode) REMOTE_HUB_S(nasid, IIO_ICTO, 0xff); hub_rtc_init(cnode); - xtalk_probe_node(cnode); #ifdef CONFIG_REPLICATE_EXHANDLERS /* diff --git a/arch/mips/sgi-ip27/ip27-xtalk.c b/arch/mips/sgi-ip27/ip27-xtalk.c index 4fe5678ba74d..ce06aaa115ae 100644 --- a/arch/mips/sgi-ip27/ip27-xtalk.c +++ b/arch/mips/sgi-ip27/ip27-xtalk.c @@ -99,7 +99,7 @@ static int xbow_probe(nasid_t nasid) return 0; } -void xtalk_probe_node(cnodeid_t nid) +static void xtalk_probe_node(cnodeid_t nid) { volatile u64 hubreg; nasid_t nasid; @@ -133,3 +133,14 @@ void xtalk_probe_node(cnodeid_t nid) break; } } + +static int __init xtalk_init(void) +{ + cnodeid_t cnode; + + for_each_online_node(cnode) + xtalk_probe_node(cnode); + + return 0; +} +arch_initcall(xtalk_init); -- 2.13.7