From patchwork Sat Aug 7 04:20:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 1514562 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=L3s8Qw/w; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 4GhTgd3qhZz9sRK for ; Sat, 7 Aug 2021 14:21:33 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4GhTgd2SL2z3dC4 for ; Sat, 7 Aug 2021 14:21:33 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=L3s8Qw/w; dkim-atps=neutral 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=gmail.com (client-ip=2607:f8b0:4864:20::62e; helo=mail-pl1-x62e.google.com; envelope-from=npiggin@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=L3s8Qw/w; dkim-atps=neutral Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4GhTgN5HCzz3cXV for ; Sat, 7 Aug 2021 14:21:20 +1000 (AEST) Received: by mail-pl1-x62e.google.com with SMTP id i10so9837767pla.3 for ; Fri, 06 Aug 2021 21:21:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=njkxOSGzjHQXDTR35Evk9383wWe6Qgf8y1DmTlldaKc=; b=L3s8Qw/ws+t8mGR8uqQt/mttQ6LUtpHgVKIOWZssPT881c1Onq3sNHAshbSUMi7H1d VTuhXdglhDdoTHqUe+eU+BDJiWBn59DKVbvO/DKmm703G/jafK0fmab7EuU577tcjIhH JhDtK/uvObIs5EH1SnnnH8Ca/oGoCRXR2Vb+A7Xt7uEF3zRfLP0gvBPpgs6wJgus2ol9 t8j85Hoqw2GkoLtYk48haeAhH959JXNV1LhVa25C4gMTKGadDaAmbz31zRHfLAWfrqBj r9WKmFi/9XH1/xYSZt2vpxX6PTasfRjwGEXupN5LOmqxE8WTvdY3CEozHMqFV22oAFPZ dUXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=njkxOSGzjHQXDTR35Evk9383wWe6Qgf8y1DmTlldaKc=; b=UDm2ZdRqW/5SExSpuRqLDDnrymzSvoVTNcWHlW6YBSbKboJ0fyXXmhV56z/Vw+HeYp ScSewk4kb/O9+b9Rojt24M9u8yFSJmux3MlQ8baQMP5xOEtA9SRqpoUCoHB75HPVX/OR aMb5S2bj9aAqHzhMMtk8f/4UDQCi0j42lXy+tA2/w6txKR2TkU3srewrj2qluFHeAGe7 hn40InjX5wjdHdAYnjHM4qhrSZ7u6T4gY0V5OOkLDLtn5xW7nLFGs5ZqXsPExGEmfxNb +MBV0u8aOUyHb0g29l93XfcBb3/+RI8kDIwnIKzRFxp0SReBFoXgHu4WzfyP9R3Or38L Y3gw== X-Gm-Message-State: AOAM533QyyiA/1WrjzUGtegsN40Dpw5eYFPinOADF8W7j90DlYVzzbII qdwCFgwDuFFhv8fLYQWBBn9uBkhnSgA= X-Google-Smtp-Source: ABdhPJw3sg/Zkg4ijjV2GilMitrWJLqKZfXHNIufXQ/jYq/E2jqMlj/42sd0b8NpkP6JOSzIsH3B/g== X-Received: by 2002:a05:6a00:ccb:b029:3c6:803d:8e3 with SMTP id b11-20020a056a000ccbb02903c6803d08e3mr14083661pfv.0.1628310078371; Fri, 06 Aug 2021 21:21:18 -0700 (PDT) Received: from bobo.ozlabs.ibm.com ([118.210.97.79]) by smtp.gmail.com with ESMTPSA id x25sm12086574pfq.28.2021.08.06.21.21.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Aug 2021 21:21:18 -0700 (PDT) From: Nicholas Piggin To: skiboot@lists.ozlabs.org Date: Sat, 7 Aug 2021 14:20:53 +1000 Message-Id: <20210807042100.399449-4-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20210807042100.399449-1-npiggin@gmail.com> References: <20210807042100.399449-1-npiggin@gmail.com> MIME-Version: 1.0 Subject: [Skiboot] [PATCH v2 03/10] hwprobe: convert PHB, NPU subsystems to hwprobe 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" From: Stewart Smith [npiggin: split out from initial hwprobe pach] Signed-off-by: Stewart Smith --- core/init.c | 13 +------------ hw/npu.c | 2 ++ hw/npu2-common.c | 2 ++ hw/npu3.c | 2 ++ hw/phb3.c | 2 +- hw/phb4.c | 2 ++ 6 files changed, 10 insertions(+), 13 deletions(-) diff --git a/core/init.c b/core/init.c index 61934c9fe..5e2b18d85 100644 --- a/core/init.c +++ b/core/init.c @@ -1361,18 +1361,7 @@ void __noreturn __nomcount main_cpu_entry(const void *fdt) /* NX init */ nx_init(); - /* Probe PHB3 on P8 */ - probe_phb3(); - - /* Probe PHB4 on P9 and PHB5 on P10 */ - probe_phb4(); - - /* Probe NPUs */ - probe_npu(); - probe_npu2(); - probe_npu3(); - - /* Probe all HWPROBE hardware we have code linked for*/ + /* Probe all HWPROBE hardware we have code linked for */ probe_hardware(); /* Initialize PCI */ diff --git a/hw/npu.c b/hw/npu.c index dba7ee50f..2b5364c33 100644 --- a/hw/npu.c +++ b/hw/npu.c @@ -1691,3 +1691,5 @@ void probe_npu(void) dt_for_each_compatible(dt_root, np, "ibm,power8-npu-pciex") npu_create_phb(np); } + +DEFINE_HWPROBE_DEPS(npu, probe_npu, "phb3"); diff --git a/hw/npu2-common.c b/hw/npu2-common.c index 3bc9bcee6..87ebf8232 100644 --- a/hw/npu2-common.c +++ b/hw/npu2-common.c @@ -679,3 +679,5 @@ void probe_npu2(void) setup_devices(npu); } } + +DEFINE_HWPROBE_DEPS(npu2, probe_npu2, "phb4"); diff --git a/hw/npu3.c b/hw/npu3.c index 03461373e..92af96b23 100644 --- a/hw/npu3.c +++ b/hw/npu3.c @@ -547,3 +547,5 @@ void probe_npu3(void) npu3_init(npu); } } + +DEFINE_HWPROBE_DEPS(npu3, probe_npu3, "phb4"); diff --git a/hw/phb3.c b/hw/phb3.c index 8af6b6164..320023e57 100644 --- a/hw/phb3.c +++ b/hw/phb3.c @@ -5049,4 +5049,4 @@ void probe_phb3(void) phb3_create(np); } - +DEFINE_HWPROBE(phb3, probe_phb3); diff --git a/hw/phb4.c b/hw/phb4.c index 79083d4a1..ec07fe2bb 100644 --- a/hw/phb4.c +++ b/hw/phb4.c @@ -6398,3 +6398,5 @@ void probe_phb4(void) phb4_create(np); } } + +DEFINE_HWPROBE(phb4, probe_phb4);