From patchwork Wed Dec 18 15:51:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 851701 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp996220wrq; Wed, 18 Dec 2024 07:52:53 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUnZwL8TM4Z+0xjYahomsJWx77cNvJWvFWCLmnPxrDm2H7ZmWbwL3TcPBTArPuQyMeyq1uB2A==@linaro.org X-Google-Smtp-Source: AGHT+IF7UbHGHUrYf0cxaNAk7OwBCiRbLICjIvWKeiQuCTaPAQaCS8jJXqtyinxrlFL6QDkSXMH9 X-Received: by 2002:a05:620a:372c:b0:7b6:cb3c:d52c with SMTP id af79cd13be357-7b8637b5b7dmr457291885a.38.1734537173043; Wed, 18 Dec 2024 07:52:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734537173; cv=none; d=google.com; s=arc-20240605; b=DglfW7EEP+l/Yu27ILnhVtwQhDVjLtQYUj1v6PPRYrfQrgRD++eywfqG/I3ULQTUT1 Ajn50sSAqgxm3oTCMGr7lvUuttBPYZLVWxPTeQ7LS8GWfqdgUgMmYBDde534obgzyRPL DoZuNJIWXZeXKYNYKq6ilu4+MTAWjro+3E8QNsoerLoFAeFA1Fpz9+PsEX7V3YjwRYQF 372hUxJNcHOK+lcAFhYvwI21UZ+bskyQEERgxvsXzFqGsSkW/u9QyGn7IveEUHRONV1l uxkIi7uR/OOV8z2+X3ykykK+7VtyLDncSyf4Bj3Fsi7Rx+ZbLIknHq5TMwY1Tv34WvoV /Itg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CIxt0xCHnXjAllBjGh6XMGwcFEqpupPAEWRBOMMJJcc=; fh=6k0MZVgfsXKcq8uDUDKqeWpuita9EVBGa5i3EnNNhIs=; b=dJLAMZNkBjLwjJEPs+sy7+pxmIt4RVP81+5Cl54U6g53HLjHQ2fncx6baMxP2r/r0c QxJoQjL0cLqnu0KUBGWmetLa986QgCPT59o2l9y/HV5QNPO5DovmZG7To3M56B/iZMZk vpGQ3bPCM2/tw5QOGhBerrVDkSTuKEudKxO4rBXmHMw09v80AODoHbFbXIQuzsoAzAOH 7YBukc3SIRQz4JHc0qA87JZeiS5U9g84/pJJARgTAVPo4d/ikNsyJXvand7qA+mDSXbx 3HFIiY2oTXVowsYq7WV3FfUnlnGLkL9Gk9OyI9nBf4hUPTPa06YzyT3vg0NZ09RAwL5S gj8A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WJSaWaCf; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b7048e2000si1250283485a.482.2024.12.18.07.52.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 18 Dec 2024 07:52:53 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WJSaWaCf; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNwLS-0007Hx-An; Wed, 18 Dec 2024 10:52:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNwLP-0007Gs-Um for qemu-devel@nongnu.org; Wed, 18 Dec 2024 10:52:16 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNwLO-0006Bu-5r for qemu-devel@nongnu.org; Wed, 18 Dec 2024 10:52:15 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-43622267b2eso69038675e9.0 for ; Wed, 18 Dec 2024 07:52:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734537129; x=1735141929; darn=nongnu.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=CIxt0xCHnXjAllBjGh6XMGwcFEqpupPAEWRBOMMJJcc=; b=WJSaWaCfIxSpwpnzipVZgXq/cWT3RexYMrMCYrXtZ8svGVKJRz1Nldu1odCZ3MA3nf RqIQ/CpmStpl5XEUlZQB95SC1QChEoYCBHXPkkW1nY/qHyJWdZO3/K0MLhjvwXVCczTL TLfH2S2+2n0dR2oc8rNF30I1ZVFwxsTTKe1uc8k3/7hwleUWBRWjTR2BDWZL/8hLgzhH dKfhOFgRcVp0wVazYIYle6OkXpEEsfh3dXz/BJo9nOorY1URYNPTIe2BOfWn+avb2+l2 6iQ6cwUZX+G5zygII/aPCqsn+573zKM9KHBgthe/rquvH1gMI7SpF24iVCzUctNVdQhL +czg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734537129; x=1735141929; 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=CIxt0xCHnXjAllBjGh6XMGwcFEqpupPAEWRBOMMJJcc=; b=uMwS57srNewhoeI8UrgIPhi2Cb2xS3OReHcpKKV06dI2cj684YppGahnkYZXbfe4LF S856/KYXgF8P3dHgLinZb8fjuBBvvtYsklLNnVYwDMs9bgkTFSN03FlxhGjQGyBwmZC/ /k6P2wfJ/NyU8HraXhExI9GckR8p6M5sKNcDD19MZ3dbeFZJjTrcDkGsAAtryUFspbwt 2dwJfy8Nx4vCaFWP8+vyE0USQPdaGrZx8hiTY/0jLylXcI02yt60NZj5jUcptNpa0Hpo SbjLNGNd27zQD/WXI2k+ErC6AnKNDFXy0CzNpQTkTFVvuPbJeZBkf6WHv7BM1+1A7uwN Lm5w== X-Gm-Message-State: AOJu0YyILeHPhfQxOK6beW/4TSJawWEHbyOjzqsK8u/jZ+8qsE9d4IEG Pzz8xBefNBFKKvKa+fKQ8J6N/I9s4V4Q4q6TWaNjHrF47sV9/K/g/ZPrRIiMnBvDScPw8UPTgCS Z X-Gm-Gg: ASbGncuNcCUfeBSpACota3rLZ0hY1T1NF2ilqhqX8Wa0IRyNcNnQjXKapFCxis0BfNn 5P59Y/fugKzTnb+JMZ8EYiYHHUUBPT0Xm3bNyFFluqe5ucgtyQR0hJvSJydFKP/4VNsZHohhWn0 xg81LNOCmLxOKZ7A0ISsIKnmfFpqB/N9YmXuw5uvwcbfJP9fTVqQfqY3+LtPAVblWDZbGCfs/Sn HVszJuiVxpYKciSuOTab20fAERbHi0qwBC0MRP1bdfYUjC9V77/vD1JazMJd/IHX45yoE7O1QC1 3OPz X-Received: by 2002:a05:6000:144a:b0:386:37bb:ddc1 with SMTP id ffacd0b85a97d-388e4da40eamr2751659f8f.56.1734537128946; Wed, 18 Dec 2024 07:52:08 -0800 (PST) Received: from localhost.localdomain ([78.196.4.158]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-388c8060fb3sm14225403f8f.94.2024.12.18.07.52.08 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 18 Dec 2024 07:52:08 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , qemu-ppc@nongnu.org, Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Subject: [PATCH 1/4] target/ppc: Include missing headers in mmu-hash[32,64].h Date: Wed, 18 Dec 2024 16:51:59 +0100 Message-ID: <20241218155202.71931-2-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241218155202.71931-1-philmd@linaro.org> References: <20241218155202.71931-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org CPUState* is dereferenced, so we need the structure definition from "cpu.h". PowerPCCPU is declared in "cpu-qom.h". Include them in order to avoid when refactoring: In file included from ../../target/ppc/cpu_init.c:27: target/ppc/mmu-hash32.h:6:23: error: unknown type name 'PowerPCCPU' 6 | bool ppc_hash32_xlate(PowerPCCPU *cpu, vaddr eaddr, MMUAccessType access_type, | ^ target/ppc/mmu-hash32.h:66:15: error: incomplete definition of type 'struct ArchCPU' 66 | return cpu->env.spr[SPR_SDR1] & SDR_32_HTABORG; | ~~~^ target/ppc/mmu-hash64.h:173:36: error: unknown type name ‘PowerPCCPU’; did you mean ‘PowerPCCPUAlias’? 173 | static inline void ppc_hash64_init(PowerPCCPU *cpu) | ^~~~~~~~~~ | PowerPCCPUAlias Signed-off-by: Philippe Mathieu-Daudé --- target/ppc/mmu-hash32.h | 3 +++ target/ppc/mmu-hash64.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/target/ppc/mmu-hash32.h b/target/ppc/mmu-hash32.h index 2838de031c7..abbff206d4e 100644 --- a/target/ppc/mmu-hash32.h +++ b/target/ppc/mmu-hash32.h @@ -3,6 +3,9 @@ #ifndef CONFIG_USER_ONLY +#include "target/ppc/cpu-qom.h" +#include "cpu.h" + bool ppc_hash32_xlate(PowerPCCPU *cpu, vaddr eaddr, MMUAccessType access_type, hwaddr *raddrp, int *psizep, int *protp, int mmu_idx, bool guest_visible); diff --git a/target/ppc/mmu-hash64.h b/target/ppc/mmu-hash64.h index ae8d4b37aed..b32e17c2c58 100644 --- a/target/ppc/mmu-hash64.h +++ b/target/ppc/mmu-hash64.h @@ -3,6 +3,8 @@ #ifndef CONFIG_USER_ONLY +#include "target/ppc/cpu-qom.h" + #ifdef TARGET_PPC64 void dump_slb(PowerPCCPU *cpu); int ppc_store_slb(PowerPCCPU *cpu, target_ulong slot,