From patchwork Mon Jan 25 00:58:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 1431069 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DPBZF4TlWz9sRR for ; Mon, 25 Jan 2021 12:08:21 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=flamingspork.com header.i=@flamingspork.com header.a=rsa-sha256 header.s=mesmtp header.b=S+fdrn8c; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=Bj5Jbsaj; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4DPBZD3djvzDqvj for ; Mon, 25 Jan 2021 12:08:20 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=flamingspork.com (client-ip=64.147.123.20; helo=wout4-smtp.messagingengine.com; envelope-from=stewart@flamingspork.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=flamingspork.com header.i=@flamingspork.com header.a=rsa-sha256 header.s=mesmtp header.b=S+fdrn8c; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=Bj5Jbsaj; dkim-atps=neutral Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4DPBX36zz1zDqnT for ; Mon, 25 Jan 2021 12:06:27 +1100 (AEDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 74F9E709; Sun, 24 Jan 2021 19:58:12 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sun, 24 Jan 2021 19:58:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= flamingspork.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=mesmtp; bh=I8RxKHhmLsei6UVaYoz/nu0A0ZkaoE7kQONc6MZLajQ=; b=S+ fdrn8cWchhFYwTeNyPBFy6aHNnwN0VT1ZznfPXwF9NHG4hsWJPHkLTisyTZFv7aS w/jC0QAkEsXrzlyfjfso/SUI/3xKtb4pn5X986SpDz2POwRr29Tukds+RqEBpSVE pKo8lOY6q4FX/4EUSLfmeOaGGdnrCt/PsJyG8x+6Q= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=I8RxKHhmLsei6UVaYoz/nu0A0ZkaoE7kQONc6MZLajQ=; b=Bj5Jbsaj iM1+RCNZsJiGDbvDBrTIQE6rtKvnFSR32Vb5Ot5KMpoRMRhYazmguRNpaRBEhaXn 10cGeFCeqsCjxepJNzVS5IAnuxXyu3ahm93Rj+raaDhhIjTREX4zTWf9ZjA/EQpI wRGcUov0tw3eBro5n8Fv1Yl8oynWNjZ7jR9GNyMhnnM0dw3QY28cuI7KDpOkWC6e p/z+zU/cFwOm+hLzQiBZ50j4ZThr4zVisUoR1UdEFAoDtCr0jsB6/TEroHXv9u+a qyk826XTc2+KXY+yuxohNO2DH0bRIrpiXfGSc8ZmIKDFLjNfiGXM74H/X3W0qev6 IJpBFTWRWeltOQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvddvgddvjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpefuthgvfigrrhhtucfumhhithhhuceoshhtvgifrghrthesfhhl rghmihhnghhsphhorhhkrdgtohhmqeenucggtffrrghtthgvrhhnpeekgeeggedvfeetge eggedtgfejgeeivdegteehfeelueejfeefieffueehveeuteenucfkphepleejrdduvdei rdduudegrdefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepshhtvgifrghrthesfhhlrghmihhnghhsphhorhhkrdgtohhm X-ME-Proxy: Received: from zoe.tuckerbox.house (97-126-114-3.tukw.qwest.net [97.126.114.3]) by mail.messagingengine.com (Postfix) with ESMTPA id A6CE824005C; Sun, 24 Jan 2021 19:58:11 -0500 (EST) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Sun, 24 Jan 2021 16:58:03 -0800 Message-Id: <20210125005807.3019715-5-stewart@flamingspork.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210125005807.3019715-1-stewart@flamingspork.com> References: <20210125005807.3019715-1-stewart@flamingspork.com> MIME-Version: 1.0 Subject: [Skiboot] [PATCH 3/7] hwprobe: vas_init(), nx_init(), imc_init() X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Signed-off-by: Stewart Smith --- core/init.c | 9 --------- hw/imc.c | 6 ++++++ hw/nx.c | 8 ++++++++ hw/vas.c | 6 ++++++ 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/core/init.c b/core/init.c index 92811aa4..8fa30e95 100644 --- a/core/init.c +++ b/core/init.c @@ -1316,15 +1316,6 @@ void __noreturn __nomcount main_cpu_entry(const void *fdt) /* Catalog decompression routine */ imc_decompress_catalog(); - /* Virtual Accelerator Switchboard */ - vas_init(); - - /* NX init */ - nx_init(); - - /* Init In-Memory Collection related stuff (load the IMC dtb into memory) */ - imc_init(); - /* Probe all hardware we have code linked for (PHBs, NPUs etc)*/ probe_hardware(); diff --git a/hw/imc.c b/hw/imc.c index 63488b9b..e8d658e7 100644 --- a/hw/imc.c +++ b/hw/imc.c @@ -926,3 +926,9 @@ static int64_t opal_imc_counters_stop(uint32_t type, uint64_t cpu_pir) return OPAL_SUCCESS; } opal_call(OPAL_IMC_COUNTERS_STOP, opal_imc_counters_stop, 2); + +DECLARE_HWPROBE(imc) = { + .name = "imc", + .probe = imc_init, + .deps = NULL +}; diff --git a/hw/nx.c b/hw/nx.c index 12204808..4bfc2c53 100644 --- a/hw/nx.c +++ b/hw/nx.c @@ -121,3 +121,11 @@ void nx_init(void) if (proc_gen == proc_gen_p9) p9_darn_init(); } + +static const char* nx_deps[] = { "vas", NULL }; + +DECLARE_HWPROBE(nx) = { + .name = "nx", + .probe = nx_init, + .deps = nx_deps +}; diff --git a/hw/vas.c b/hw/vas.c index c70094b7..7bbd700e 100644 --- a/hw/vas.c +++ b/hw/vas.c @@ -519,3 +519,9 @@ out: vas_err("Disabled (failed initialization)\n"); return; } + +DECLARE_HWPROBE(vas) = { + .name = "vas", + .probe = vas_init, + .deps = NULL +};