From patchwork Wed Sep 6 10:10:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 1830315 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=20221208 header.b=sg5dDUnO; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RgdSk1RXhz1yh5 for ; Wed, 6 Sep 2023 20:11:34 +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=20221208 header.b=sg5dDUnO; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4RgdSk0Kxgz3cHF for ; Wed, 6 Sep 2023 20:11:34 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org 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=20221208 header.b=sg5dDUnO; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::102f; helo=mail-pj1-x102f.google.com; envelope-from=npiggin@gmail.com; receiver=lists.ozlabs.org) Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) (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 4RgdRp2hGHz3bw9 for ; Wed, 6 Sep 2023 20:10:46 +1000 (AEST) Received: by mail-pj1-x102f.google.com with SMTP id 98e67ed59e1d1-26f3e26e55aso2245193a91.3 for ; Wed, 06 Sep 2023 03:10:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693995044; x=1694599844; darn=lists.ozlabs.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ca7NgLDv56GGkmWsJtOwDocYaek7g/n7kxOqw7LaHlE=; b=sg5dDUnOHFmelDc9iNYiXi/wvbZNfyLwI23sfwOXg1rvdZxGKYjoJ357gm595RMZxQ rCvro/RBa0o3NGGL9/k7P5IwSEWjHFjuaIjcQ68hrYD1Qsypgf5iofcT3VEQdaRxej3w GTpwZly1Vh1quVmS4qD2tAhIJro97+YIQGxEJVcIrIeYdZpRIeorwQsN7R2+g/DOW6hh SpM1EPl4JQv27jcrHnJ6uhpgcvsNN0j3Gi2gtT5xYdKrHQV82aQIPwkSd79cg3HRhBx9 CCYTTenjNububl9O8iCaoz0sYIyN9n1YV5J5ugCAwNtggFkuS0FlRz73R+EEdUUr7XWd t3kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693995044; x=1694599844; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ca7NgLDv56GGkmWsJtOwDocYaek7g/n7kxOqw7LaHlE=; b=WIa9wgd1ABYSHlHBuznPzNDb/xotYiwmuKsMjPsJG6JIq29nTfkMFq0TvxlmLHO2dY 4qHuKZKvbxRj7XB2xFw4YSYNAJWlLV3qn4YYTQixC/4gSEKsiJ+AXRerYocUtLfNQOhx Lu0MMue/ocC9PDATjyDzIqag30JNc0bgCnf6F0l19san2T8CFPg/cLhqHA4cs2Tu2bUt uFdMlDlpjk9yw9kohOhH85vmFeFUOB//P33AHh0V2H7d9fjiL2mQNSG5AKb60HoW+okI 3L62waV1K4Ri+K7ZWVmGE6SLI6z0/h1fzRW8SEnMe05hQ2LpYo6f84TZLYNb0dBdc4Cy k9xQ== X-Gm-Message-State: AOJu0Yw94VPQMlUHc+sEwezZ+Aw2WlOSJAyYko+7Y9j1+decu4ZhWP1g BlBohqZPwDF4BWysJNk+tK7IACnz/XY= X-Google-Smtp-Source: AGHT+IG7q8ekTKQWOfDMR9PNEGfq6joba7G1+JQkhBQEQdNE/sjGBj5E6f3bG42LVw7Ny0AWxlOCTw== X-Received: by 2002:a17:90b:817:b0:268:d716:4b62 with SMTP id bk23-20020a17090b081700b00268d7164b62mr12026665pjb.0.1693995043757; Wed, 06 Sep 2023 03:10:43 -0700 (PDT) Received: from wheely.local0.net (193-116-105-24.tpgi.com.au. [193.116.105.24]) by smtp.gmail.com with ESMTPSA id m13-20020a17090a7f8d00b002609cadc56esm10639705pjl.11.2023.09.06.03.10.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Sep 2023 03:10:43 -0700 (PDT) From: Nicholas Piggin To: skiboot@lists.ozlabs.org Date: Wed, 6 Sep 2023 20:10:16 +1000 Message-Id: <20230906101017.130276-7-npiggin@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230906101017.130276-1-npiggin@gmail.com> References: <20230906101017.130276-1-npiggin@gmail.com> MIME-Version: 1.0 Subject: [Skiboot] [PATCH 6/7] hdata: make for_each_pcia take spiras as an argument 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" Have for_each_pcia take spiras as an argument rather than use the global variable. Signed-off-by: Nicholas Piggin --- hdata/memory.c | 2 +- hdata/pcia.c | 2 +- hdata/spira.c | 2 +- hdata/spira.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hdata/memory.c b/hdata/memory.c index 0b4e78585..53a16253a 100755 --- a/hdata/memory.c +++ b/hdata/memory.c @@ -243,7 +243,7 @@ static void add_bus_freq_to_ram_area(struct dt_node *ram_node, u32 chip_id) return; } - for_each_pcia(pcia) { + for_each_pcia(spiras, pcia) { const struct sppcia_core_unique *id; id = HDIF_get_idata(pcia, SPPCIA_IDATA_CORE_UNIQUE, &size); diff --git a/hdata/pcia.c b/hdata/pcia.c index 47f40cfec..36fc84c3a 100644 --- a/hdata/pcia.c +++ b/hdata/pcia.c @@ -190,7 +190,7 @@ bool pcia_parse(void) dt_add_property_cells(cpus, "#address-cells", 1); dt_add_property_cells(cpus, "#size-cells", 0); - for_each_pcia(pcia) { + for_each_pcia(spiras, pcia) { const struct sppcia_core_unique *id; u32 size, ve_flags; bool okay; diff --git a/hdata/spira.c b/hdata/spira.c index 500d317a1..d9325a0b4 100644 --- a/hdata/spira.c +++ b/hdata/spira.c @@ -529,7 +529,7 @@ static void add_xscom_add_pcia_assoc(struct dt_node *np, uint32_t pcid) if (!hdr) return; - for_each_pcia(hdr) { + for_each_pcia(spiras, hdr) { const struct sppcia_core_unique *id; id = HDIF_get_idata(hdr, SPPCIA_IDATA_CORE_UNIQUE, &size); diff --git a/hdata/spira.h b/hdata/spira.h index 1789de1b5..9db9d599f 100644 --- a/hdata/spira.h +++ b/hdata/spira.h @@ -123,7 +123,7 @@ extern struct HDIF_common_hdr *__get_hdif(struct spira_ntuple *n, be32_to_cpu((_ntuples)->alloc_len)); \ _p = (void *)_p + be32_to_cpu((_ntuples)->alloc_len)) -#define for_each_pcia(p) for_each_ntuple(&spiras->ntuples.pcia, p, SPPCIA_HDIF_SIG) +#define for_each_pcia(s, p) for_each_ntuple(&(s)->ntuples.pcia, p, SPPCIA_HDIF_SIG) /* We override these for testing. */ #ifndef ntuple_addr