From patchwork Sat Jun 26 02:38:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 1497532 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=IdwPlaKb; 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) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GBdNQ6353z9sWl for ; Sat, 26 Jun 2021 12:38:46 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4GBdNN6zpFz3btd for ; Sat, 26 Jun 2021 12:38:44 +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=IdwPlaKb; 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::535; helo=mail-pg1-x535.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=IdwPlaKb; dkim-atps=neutral Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) (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 4GBdNG5KCGz304G for ; Sat, 26 Jun 2021 12:38:37 +1000 (AEST) Received: by mail-pg1-x535.google.com with SMTP id v7so9798473pgl.2 for ; Fri, 25 Jun 2021 19:38:36 -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:mime-version :content-transfer-encoding; bh=9NN/mvvU53iur/lKQ+2g0CIC3fp9myDgbgGtowIgFzc=; b=IdwPlaKb4YRNQDUsC/6ylwhQRpJFlFZ/RMVL5Vwi6D/GR6Cn03MpUNsKlcqwCe//iI jBM7pzpODvcKOXvSPFJ/M3d++8ba7F69Kx5RB3vZbSuRfLremFGzvtb4g03oPUb3JyGm V/1KbH+ui/XGRQjR1hh25NjANpibgKEGicORxnq9IcmTERH1yYDE6fP33lz4pYUb7JxQ 25GOBxD9CQiWv0mMJ6NTsmCOWNdzp86VOy4+hVidA/JnyqEP2qrRN055hso2Eo3bI5PU f4hNhdccd9A+I8fwgW2rt4p580a02FVAHUDNDXjtMgLXQqPNPHheazcyj9Z/Fbm2iSLa lu5g== 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:mime-version :content-transfer-encoding; bh=9NN/mvvU53iur/lKQ+2g0CIC3fp9myDgbgGtowIgFzc=; b=csKncMpLTxQWXrPuP0HQJmiip8bqjWAfx+0KiofN0pYgTTcc4VXRru0QJSKeCBjKW4 r/hdNgvmnBHP19A0Jv2ZHveoRzsDQPc4FEaAsmhpu+KEB0NKdH/WC+0BicYKdI5jlVd2 PCB3Td9cG+FDRZESRN4eDdattjvrghTrwEzPqAJnI1DbW6n2p4+qBE6sd1w3CRiBwhwG E6MEYSbBnGRrRoSf6hTAxgBlUF65g+JGK56G9RfFen+3PgdoArLzthl93AxtXn5mKjCK x5CPoUPWra1t5QNYibBKd5UpQkLS3nh4bO59VHiGfPTw/xqOTnDY1dCoTlmp+O0Kxfj5 59Gg== X-Gm-Message-State: AOAM530LofXkRV0k9CtPG71v+RmXU1j9Ezr6xm2ACXdD7qDVNgd4A54C ogtnGZtSUOal06GTVaLNDndU/RZwU44= X-Google-Smtp-Source: ABdhPJwszp27P9angB9zX3K4bZgeZQwnJjJ6HVsuEaqlSYzCiG+b/3Pttcixto8yKsZ9C9Ib4FAXGA== X-Received: by 2002:a63:e04e:: with SMTP id n14mr12035622pgj.324.1624675112316; Fri, 25 Jun 2021 19:38:32 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (60-242-147-73.tpgi.com.au. [60.242.147.73]) by smtp.gmail.com with ESMTPSA id u10sm7010014pfh.123.2021.06.25.19.38.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Jun 2021 19:38:31 -0700 (PDT) From: Nicholas Piggin To: skiboot@lists.ozlabs.org Date: Sat, 26 Jun 2021 12:38:14 +1000 Message-Id: <20210626023824.1124164-1-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Subject: [Skiboot] [PATCH 00/10] hwprobe patches 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" I've kept these patches going and made some small changes here and there. The series also removes POWER8 DD1 in order to move P8 specific SLW code under CONFIG_P8 without causing a lot of clashes with POWER8 DD1 removal that I want to do for a later patch (rewriting OPAL_REINIT_CPUS code) so I thought it could just go here. This is not based on the patches Vasant just submitted, I'm happy to rebase it, just wanted to post it out now as is to see if people are happy with it. The main non-cosmetic change is adding CONFIG_P8/NPU defines to the preprocessor, which allows a lot more flexibility with modularising stuff. Thanks, Nick Nicholas Piggin (2): Remove support for POWER8 DD1 hw/slw: Move P8 bits behind CONFIG_P8 Stewart Smith (8): Introduce hwprobe facility to avoid hard-coding probe functions hwprobe: convert PHB, NPU subsystems to hwprobe Add CONFIG_P8 with PHB3 behind it hwprobe: convert vas_init(), nx_init() npu: move npu_set_fence_state() to phb_ops npu: Move npu.o and npu-hw-procedules.o under CONIFG_P8 platforms: put P8 platforms behind CONFIG_P8 npu: Add CONFIG_NPU to optionally skip NPU code Makefile | 4 + Makefile.main | 19 +- core/Makefile.inc | 1 + core/cpu.c | 21 +- core/fast-reboot.c | 2 + core/hmi.c | 12 +- core/hwprobe.c | 70 ++++++ core/init.c | 18 +- core/platform.c | 1 - hw/Makefile.inc | 20 +- hw/npu.c | 9 +- hw/npu2-common.c | 2 + hw/npu2.c | 1 + hw/npu3.c | 2 + hw/nx.c | 2 + hw/phb3.c | 2 +- hw/phb4.c | 2 + hw/slw.c | 437 +++++---------------------------- hw/vas.c | 2 + include/npu.h | 1 - include/npu2.h | 6 + include/pci.h | 6 + include/skiboot.h | 42 +++- libpore/Makefile.inc | 8 +- platforms/astbmc/Makefile.inc | 22 +- platforms/ibm-fsp/Makefile.inc | 7 +- skiboot.lds.S | 6 + 27 files changed, 301 insertions(+), 424 deletions(-) create mode 100644 core/hwprobe.c Reviewed-by: Dan HorĂ¡k