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, From patchwork Wed Dec 18 15:52:00 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: 851704 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp996723wrq; Wed, 18 Dec 2024 07:54:03 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUupHKdEts8nVDbszOD5JeomXz6nhIvXYNj8oV0vQzHo+dzdiLDdmzGPBrk2R1HtzoQy8MZWg==@linaro.org X-Google-Smtp-Source: AGHT+IEMaaGD3YT48Wj/HrmQgQ6pBMKitYY1rKQFgva0EyoZeG04JW6h3qsJODVKiSyO3iVYh1/w X-Received: by 2002:a05:620a:40c2:b0:7b6:d241:3f0b with SMTP id af79cd13be357-7b8595d4475mr1285321185a.14.1734537242988; Wed, 18 Dec 2024 07:54:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734537242; cv=none; d=google.com; s=arc-20240605; b=WZpXzG0jWvt3gKxVbc4oU88xUR7rejUuWe85UM1yA2Ux5PkLQZNm5tQwIoU9mHX9pd FdXVtaOSqzP8+097PkObfr9wfTCd1sUWD3phUodWn39/NVOeT7QArWnLFbUQgKRa5UfZ 0ZoGkVrnCuLvGqR2cfCMBX4PrPwo+wsgBS/hn0XvAbPRfyv4ZVyu2qJ+2p1EQ1ked/Dj fnjS9k7QpjtkNMiTQM+eGEf5R513Ik+nW/yotYhCKQ2Rp5895/I4o63q8NsXNDB2ZrLY R2TMV5CZadtb5Hat6l++yTPuBo4PM7bkRhk4ne5bCS6Ob8fiRs4B9ixW0QSEUA/wRZkx bG2Q== 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=43o9dEO1jQoTM4ynX/IY3hHbA9yVH/+x2ZTghLcMeMM=; fh=6k0MZVgfsXKcq8uDUDKqeWpuita9EVBGa5i3EnNNhIs=; b=aHJn/i4f8alHxq1USiId/iNLeDbAjxRXT8K200RXRYXAxf9leRruGoS2eZcPe5KJir INVVp+TEMDV5FDrEYEew7RIBXcFeu8pDHX8OIa8yTnUshx4sWz15/D8We3GlFWAw8An4 hVxqdA4JtQ0ZZ4puzJ6FBZ/8LmhB+W/84gJqy0uYLQJ60+Y4sc4fsOSMFI+kPc/d/6yK UAtY3VCDyMncS5ZMROsEivNuFLe9UH5XzBq+lZMGGCO5655G09Z0VNcD8wkeTI2ZelXx HPkO5Pm+DxXkvPqdTRx5y2MAEvfrecokoe5cGHtTn7UX4Miz0+oiWpqwcpqczZnAlIri +Jmw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=olHJO3Sx; 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-7b7048e1f46si1302398785a.521.2024.12.18.07.54.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 18 Dec 2024 07:54:02 -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=olHJO3Sx; 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 1tNwLc-0007WM-HL; Wed, 18 Dec 2024 10:52:28 -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 1tNwLa-0007VI-Ih for qemu-devel@nongnu.org; Wed, 18 Dec 2024 10:52:26 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNwLT-0006LC-Cb for qemu-devel@nongnu.org; Wed, 18 Dec 2024 10:52:25 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4363ae65100so43471445e9.0 for ; Wed, 18 Dec 2024 07:52:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734537133; x=1735141933; 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=43o9dEO1jQoTM4ynX/IY3hHbA9yVH/+x2ZTghLcMeMM=; b=olHJO3Sx/i01QdRhLt+HQLXs0JCTFBHlUp0nljMQAm1pRoI7dXLzVLW1TyfJTPDsKv 3dC5ihedAADI/9DKlV42cZEmmZqg4DbCZzNRKhm/oBaT9MeKe4d7L9oFdaZhRXwCYgnP kvudIVALvh7WE+qHIP5rnXACXGYXHQMm27Pt+nbRSTr/8scPq5PVzXZtV5ODxsvqaxXO t3n4jEdlyJqD7GXMIIytiTeHkc01TRoEplhjpokSASO/V9EhO4qL9Ee0Juhyoc40EGjX sfQW5Ll5hs+u1b4iM23HRtfMtKfAQAu45i2HDcEVlPeLUVceXNb7NRnEPcQ4Ctqlwhyd 9a9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734537133; x=1735141933; 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=43o9dEO1jQoTM4ynX/IY3hHbA9yVH/+x2ZTghLcMeMM=; b=fs0ET3ahrC47U5Oj3++hvgCrMUFjaaBLy+UmWgu4hrmTfxEMHh37xmUJsn4bgxzXRT fkVOJnDPFb/Uj8XHVkRhGp8cn90EkdtiuAe/S7PC72rhQ1t6tABLQvP7uSpOrabAztBj iaAwytfSNjGGAQTsb6+N5JENrLyU1H1Brlq9ll96PIoV0T6uvbvNW4Rh8kzNxi1POAD7 Vp1JLiUlx69Ix5/d4AuS9tXVOLePnWgO1Jh5JgxY7YNvckTybj1ikrrxtdClOpDto7r+ rLdZCf0LxRymgZf6W/axNSZb6Xf+BNIIuV+Kos4R9e8IO6vgEyBTzl3GJlp63/7aVHKC lVXQ== X-Gm-Message-State: AOJu0YxsTsdPxc6lLbb8I8XckgZos9lpVSGmQf5HrqiTUvKQVeFck0Nr xSstGev/PFMjJ5F1I8bplK3f//xawLpC3+lFDy0lLugYjoZcj8Hvw1zOAFqveaUpej3ICvDjiKd Q X-Gm-Gg: ASbGncvYOvlsempbvSsknJRt/AU370A0RYDbciTecXB33KKjnbVEQ+6sT/V/EU968KN /MMmTYS3yhKYC8cNEK52RhiXOomTodmfi3bbs2FC4RuaAq91SUacWsCYE0gfYcKmGYUZ7hhu6sz XCm5M0ipMQTTY/Tca79oitfsMUgrVLMUdvfOv/Mh/nSTR76nyBZs6Fkt7rMJ5LTM/jG2WtWgirC es5cvIhmCYoZRW+sgmHW/q1TCxe5XIJSAMVYa1J1EF6EFPgCFHBJe/gTDxU7mJsMa8vDA/Aa9DN SWEO X-Received: by 2002:a05:600c:468c:b0:431:542d:2599 with SMTP id 5b1f17b1804b1-436553ed055mr29615055e9.22.1734537133598; Wed, 18 Dec 2024 07:52:13 -0800 (PST) Received: from localhost.localdomain ([78.196.4.158]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43656afd57esm24251025e9.5.2024.12.18.07.52.12 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 18 Dec 2024 07:52:13 -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 2/4] tcg/tci: Include missing 'disas/dis-asm.h' header Date: Wed, 18 Dec 2024 16:52:00 +0100 Message-ID: <20241218155202.71931-3-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::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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 "disas/dis-asm.h" defines bfd_vma and disassemble_info, include it in order to avoid (when refactoring other headers): tcg/tci.c:1066:20: error: unknown type name 'bfd_vma' int print_insn_tci(bfd_vma addr, disassemble_info *info) ^ tcg/tci.c:1066:34: error: unknown type name 'disassemble_info' int print_insn_tci(bfd_vma addr, disassemble_info *info) ^ Signed-off-by: Philippe Mathieu-Daudé --- tcg/tci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tcg/tci.c b/tcg/tci.c index 3afb2235285..3eb95e20b65 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -21,6 +21,7 @@ #include "tcg/tcg.h" #include "tcg/helper-info.h" #include "tcg/tcg-ldst.h" +#include "disas/dis-asm.h" #include From patchwork Wed Dec 18 15:52:01 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: 851707 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp996945wrq; Wed, 18 Dec 2024 07:54:37 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVbz3u8m/RKhQNwfkyRmMrjaBKXrO/VGJwRj0ePKAHRCSJSOa6GxPUUu6eJNmNmrHUkSa3/EA==@linaro.org X-Google-Smtp-Source: AGHT+IEvgYpzpq4KGziE3X/L5/vw8h+oLKliuQRQOzJP2fUg2zZsdt+fg4hcMPLKltRdqM5Vqgvk X-Received: by 2002:a05:620a:1924:b0:7b7:67d:b57e with SMTP id af79cd13be357-7b8635fd0a5mr583773985a.15.1734537277683; Wed, 18 Dec 2024 07:54:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734537277; cv=none; d=google.com; s=arc-20240605; b=Roz2qiSpP4qSSHZrLsJS5Srq6WdcA9dP7/y+E2ySasVCT2a7bgmve+5ZGYc6eoCsPB a+nahMKVjFxN6PxrFZQdJNIARSbf069dvCAgpgqSPZNdEacweekyl5VttwvF/w35fHVg fzpqk+jFiB2gGTTopvCZFiOYrBx9cTJd5zH8GnwaEraTJtCsDzdW6sOCeUPwpwZwSNfb d2LYaUdXLHhzdIEYVz7onfbHDAk8wfbHiySonUqasbtmoxvgw58zHVzghqcC8U3AdwxZ AXISEV2uJh61pwW1RdUYKXwB/MbJsxlxVA8bGP/x04rr2I/dxRuEch6GnpoHFNPVbr8/ kduA== 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=ib9+afMAQlHaOpnPQrKm50FlQeuT4/NIcMi4TUV3nMU=; fh=6k0MZVgfsXKcq8uDUDKqeWpuita9EVBGa5i3EnNNhIs=; b=Oi4HV/VIGTYAFtTZ2+CRUG4LIUH1UnlvHpNKf0M1V+Er49K0YKuEDArch6xC0uDqLc m0jvCmhQMdbs4hRIqqkLNJBty2j4swxP/5wbdYuSW53GIRvntjU3lq+xdKSkG/AUi4UP bd5pkRvEItpThKp9APaWd/ZXE54Z5cfS3Ak5lK/K4F+ZoTUgD92c7ZDShLG1WNTAqoCp ZehVh8jHc0pI283iDPgW1tdH6z4/l3LPPi1rw4hrIb3TNlZcM836kL9IlxXU3FL5M+UQ A9LL1YIFpSwidgoVVOLgciwkFPqqkAjTlZ1PfsxcXUgO+BiZ0c5vaNW0BBKS8deawViY m5sg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LjgXGtJK; 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-7b7048f251csi1417450685a.633.2024.12.18.07.54.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 18 Dec 2024 07:54:37 -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=LjgXGtJK; 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 1tNwLe-0007XN-1i; Wed, 18 Dec 2024 10:52:30 -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 1tNwLc-0007WS-5t for qemu-devel@nongnu.org; Wed, 18 Dec 2024 10:52:28 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNwLY-0006QP-Tj for qemu-devel@nongnu.org; Wed, 18 Dec 2024 10:52:27 -0500 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-3863703258fso624677f8f.1 for ; Wed, 18 Dec 2024 07:52:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734537138; x=1735141938; 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=ib9+afMAQlHaOpnPQrKm50FlQeuT4/NIcMi4TUV3nMU=; b=LjgXGtJKT7zOZJOUdMsBIpBQe1wcgl8Tsap8FWqqGrBxqwUMHBMbpFPM7wvruq/c62 SCeE/UqgxnUllBd1UaoOiO3vHUjrHDj1ZRUR5gj15eTKwL2iMlnvUKRdLSFi/CWbGtBE q9GtfJhbsc2FEfMTCsPbq+5NYi3fGKSShh8t4DkDU7+0vOv8jj2ag54tpDu8kIxc2b7K Yet8rgczkMxelGgqUHI2J8iMirnyicg+0rauhr0pmTc2nRIcoFUhpAWKQSoICZXDzoPf dJSGgEad8H3PYxle2JihpQ35Qs00v+wPfR3z06cXWTVO8O6vX+N5T3+kODKihKI05GiK Tl0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734537138; x=1735141938; 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=ib9+afMAQlHaOpnPQrKm50FlQeuT4/NIcMi4TUV3nMU=; b=sp5LcizP7a96zg/JCBKXX4+WmvHZPtS5mtvhbVqZbWEFwxqDV0PEfbUWQlkJP+qrnm Yv+W7njs9YO4aPSclFoTaohWnDh18eqFW1+pvzipZmOO3H6sti/4LeF6e+qHWVyyuA85 uYFDtEYz8g39Q94bgmvZoMqZS0gKtm9MurJTzjdA4VR1NuNtZRbgPtzFRsjPLZ/FoGdY fQvUcQm9+IIrOCrwi3l9rLSIGNGI+fVJ54xwRl+keDmJngCoAhB6p5ftKfUw3I4JBgpZ 5e4xee93GG7fYOPo0XDgd+jHb4+rYe5l1V85vxBWMCE5Zy61645gNUW5GgZcCPL7HOAa wosQ== X-Gm-Message-State: AOJu0YxJdiYPea1io24dIWLYIxjSznoobpNNETgATl0SwvP9+7PjJvZL KLiK8Zmk22eqoVrflqjRul2PqmHL/7qyTVsVceYjwZRFYJNKoIaeuD3/kEeizIVgAbzXJl6eVKr y X-Gm-Gg: ASbGncvWBJPHDpnBJt9nLks+y2zpEAR5leF86qx4Tcfd09sBslg9s4by7124K6jtrmz SNLyjmgWDE+e3FTcfVRKpx22tpUHIGpqRBbd4iclCBlP/bbIoHqv6LKXBBlWNtNLuZkCKpMS3db mNPSGHshe0X27B5d14+XyLaASeiIJ4MAMuyBm+KtZksklVviArfpZxASD1WFyG1LlOATK3netLm xH1urt0FzKeI/x+0i7aYAjZUmFNf1Vqk2RLBq7gWe4MWpynZHhdb8Z7ryAEJMfygIIEBDrnWX88 SXjR X-Received: by 2002:a5d:5f53:0:b0:385:e3e7:547b with SMTP id ffacd0b85a97d-388e4e95107mr3183389f8f.25.1734537138228; Wed, 18 Dec 2024 07:52:18 -0800 (PST) Received: from localhost.localdomain ([78.196.4.158]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-388c80601desm14330975f8f.90.2024.12.18.07.52.17 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 18 Dec 2024 07:52:17 -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 3/4] exec/ram_addr: Include missing 'exec/hwaddr.h' and 'exec/cpu-common.h' Date: Wed, 18 Dec 2024 16:52:01 +0100 Message-ID: <20241218155202.71931-4-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::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.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=unavailable 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 'hwaddr' is defined in "exec/hwaddr.h", 'ram_addr_t' in "exec/cpu-common.h". Include these headers in order to avoid when refactoring unrelated headers: In file included from ../../hw/s390x/s390-virtio-ccw.c:17: include/sysemu/physmem-target.h:37:24: error: unknown type name 'hwaddr' 37 | (MemoryRegion *mr, hwaddr offset, hwaddr length, unsigned client); | ^ In file included from ../../hw/s390x/s390-virtio-ccw.c:16: include/exec/ram_addr.h:52:36: error: unknown type name 'ram_addr_t' 52 | RAMBlock *qemu_ram_alloc_from_file(ram_addr_t size, MemoryRegion *mr, | ^ Signed-off-by: Philippe Mathieu-Daudé --- include/exec/ram_addr.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index 53785cdb87c..ff157c1f42a 100644 --- a/include/exec/ram_addr.h +++ b/include/exec/ram_addr.h @@ -28,6 +28,9 @@ #include "exec/exec-all.h" #include "qemu/rcu.h" +#include "exec/hwaddr.h" +#include "exec/cpu-common.h" + extern uint64_t total_dirty_pages; /** From patchwork Wed Dec 18 15:52:02 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: 851703 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp996524wrq; Wed, 18 Dec 2024 07:53:35 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCW6iBnSqTgEXJk452+0FMFqHYVujlOnrMmpq4yNnaCsGcW020iyuok2r/Dm3M2ThtRdPCQwcA==@linaro.org X-Google-Smtp-Source: AGHT+IFkngNJM1d2P8eM0EqUDvGZ2+RwHsH5myFweXkYFqoXoEep4bFRrdcID6Vn7qpsHDWqRV61 X-Received: by 2002:a05:6214:23c6:b0:6d8:b189:5419 with SMTP id 6a1803df08f44-6dd091a1178mr52047366d6.8.1734537215290; Wed, 18 Dec 2024 07:53:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734537215; cv=none; d=google.com; s=arc-20240605; b=DFLVy83dpX0Sf+3frSKIUduz8YJyS1SuipdIElfeS0Jy/QIF1iQ4xHh3HgG2tmNQz6 mSGjKopaA+doC1cYrFrMiiCH9kUkFZSALOILzScXb8ESyy0hAHnAK5aL6+Y5GGF4VBZ5 vtJm2TdOltaZ8CMxUD5DrkkHah51MpmMI49+9EdZ1XjLQRSwP1i4ng+6kWbXGV9/KMOv qggShc7U0lm462X/b7dd9b/O17TGm4PH1OZS1iyq434cg2trhmMYpShSjCHIuX7DKZW0 a4nUW3geMevTeOBp35C1lLlSNzD+PRGf5/Fzztq3mqcISzHbKV+dSaoSMG9kacnnKNfG BZlw== 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=FFIbomYs8pZjGfIH2n6+AIUHzra8wuOY72Wp0sIRY2c=; fh=6k0MZVgfsXKcq8uDUDKqeWpuita9EVBGa5i3EnNNhIs=; b=lJFZgCfjAhYCD0OgL5eQf7JNlq4sUAk9EBYsTvQGt1TQy+68prj/LbBO1p2oO8iLyJ MkWwDzCFJvovAXrJwlT+65Gqqvi2P/2dXsU14HducExsXf+u2X5zBkNVbYw2p+XBQ6w3 S9jX1uxgcpHCfKiU7dJSEzPsk/W8ptD/iMTr09W8lATCX2O7X2fzp40cy7MfKHalk+ZH ugCEYFdKD+L2byjUwYwsLl0bLPLm+Dzt9RjG9DGWHhsLtgozTYWl4GikTy7IPbHCsxlX Ki+boFyMeZ0b9FO/CvtOs+Ty76hNmaX6Hf8azaP7yAAFrm0WBC0bVAUE+obowjrT1vPj Jdkg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XzTEzZK3; 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 6a1803df08f44-6dccd1bb044si125888536d6.80.2024.12.18.07.53.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 18 Dec 2024 07:53:35 -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=XzTEzZK3; 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 1tNwLo-0007bo-KE; Wed, 18 Dec 2024 10:52:40 -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 1tNwLl-0007as-Jk for qemu-devel@nongnu.org; Wed, 18 Dec 2024 10:52:37 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNwLb-0006Ud-Ke for qemu-devel@nongnu.org; Wed, 18 Dec 2024 10:52:37 -0500 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-385e0e224cbso3498497f8f.2 for ; Wed, 18 Dec 2024 07:52:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734537143; x=1735141943; 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=FFIbomYs8pZjGfIH2n6+AIUHzra8wuOY72Wp0sIRY2c=; b=XzTEzZK3/W5XU1WoGOKuzSEsbOwT/SEpNaKNGxhd1cDz/sGCbpnds8mlzBQ/hFctz4 uiwkYDEWYAQXN7kI9LAwGf/WYf6BOU5tpgxIjmhoeTV5u8i24IyZNHlt2kBKasZ5pyH1 MKxx8DXq+lBssbSK5gE7p88Nkj8n3eWJfn0w6O9f3FwUuGx5d1Vkmm0B6Zvx8Q/nbRpQ fHKq4FRDgVQNfYWWHZNaGEbsOnfQzQRDXpuG5fR9PVgIrfjtqZIUoktfMFPtI26uT7+w CP+XA3XJnfEJd93mcS1KAlz/OKCepNhJj1TLIQIdIzJgCbynr+N3O3X7nH3cG8/NBCh0 GS4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734537143; x=1735141943; 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=FFIbomYs8pZjGfIH2n6+AIUHzra8wuOY72Wp0sIRY2c=; b=LRYLW3V+DuaT78nUjbzS+wTJ1s7ERYCaREfj7yixaY4x72Ool3LAz5/FUk6sfYW70F Pp6O5auN2cQ9ijHvYlzVk5Sy+U6VzQCnwFrT+HLnIbNk9h6Ki5GBjVdJmAB+bm9k3USx tKW1raGmMwwdK9ujHhgmXqmOatG2Yaxv6xIbjWjs4RA4RuXaNX+NTHlCFWB/bFpMhfuV 9XOpkzmWqCsQhRHPvXGHQiYk+NOOu0agUSUgcQU3n7HZXUBskr8cOsHpJ5OUHWdHNmh2 YWO9kyC7aglZJsdVaPqo034ESnc6Vs4cBhv7QphGG+cYKad4u2EG+KZPjqAR8Knjp0Fm SSSg== X-Gm-Message-State: AOJu0YzmnaIntplbFcmjWPulyXOfUTDb6ZUphSFdV9EmZfpZQfQwo56J fndzM377uF3gNinaFLXuubBa2BI8X0wzYAfh0MtkDt915LPsYIAB9diXiaEQigSM/Cz5oJLPF3o x X-Gm-Gg: ASbGncut1zk99Kt1i5fCItkSqCVKx66BjL4SYEM3COVFiMLHjqWt9x5A9FrjDpfiYT/ VqO8F9txjCu1DErDCsptmKYJBPqVyF+fK9+Brbgp4lCWbvfVq9GrPXovASJrE7MnuZRvg7sPZxm nIy8n5/9IxlhgOJ3yqra2G9QLrDbqW3UZTFFDTRQss+qJuj4XHeia8l5/UNTjEVjFRvWUDMzbMi Oj+RiF/iXiSKGczHfxhfnX5ZyszAlR7SBZETIoAMkcxx7T6ORXWEjp0yFb4f85Gfe/V5rBcWsEO wFQK X-Received: by 2002:a05:6000:1a8b:b0:386:1ab1:ee34 with SMTP id ffacd0b85a97d-38a19afa15fmr95332f8f.9.1734537142759; Wed, 18 Dec 2024 07:52:22 -0800 (PST) Received: from localhost.localdomain ([78.196.4.158]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-388c8060566sm14261420f8f.102.2024.12.18.07.52.21 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 18 Dec 2024 07:52:22 -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 4/4] exec/cpu-all: Include 'cpu.h' earlier so MMU_USER_IDX is always defined Date: Wed, 18 Dec 2024 16:52:02 +0100 Message-ID: <20241218155202.71931-5-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::433; envelope-from=philmd@linaro.org; helo=mail-wr1-x433.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 autolearn=no 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 Include "cpu.h" earlier to get the MMU_USER_IDX definition soon enough and avoid when refactoring unrelated headers: In file included from include/exec/translator.h:271, from ../../accel/tcg/translator.c:13: include/exec/cpu-all.h: In function ‘cpu_mmu_index’: include/exec/cpu-all.h:274:12: error: ‘MMU_USER_IDX’ undeclared (first use in this function) 274 | return MMU_USER_IDX; | ^~~~~~~~~~~~ include/exec/cpu-all.h:274:12: note: each undeclared identifier is reported only once for each function it appears in ninja: build stopped: subcommand failed. We need to forward-declare cpu_mmu_index() to avoid on user emulation: In file included from include/exec/cpu-all.h:263, from include/exec/translator.h:271, from ../../accel/tcg/translator.c:13: ../../target/sparc/cpu.h: In function ‘cpu_get_tb_cpu_state’: ../../target/sparc/cpu.h:757:13: error: implicit declaration of function ‘cpu_mmu_index’ [-Werror=implicit-function-declaration] 757 | flags = cpu_mmu_index(env_cpu(env), false); | ^~~~~~~~~~~~~ Signed-off-by: Philippe Mathieu-Daudé --- include/exec/cpu-all.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index f7eea33b101..09f537d06fa 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -180,8 +180,12 @@ CPUArchState *cpu_copy(CPUArchState *env); | CPU_INTERRUPT_TGT_EXT_3 \ | CPU_INTERRUPT_TGT_EXT_4) +#include "cpu.h" + #ifdef CONFIG_USER_ONLY +static inline int cpu_mmu_index(CPUState *cs, bool ifetch); + /* * Allow some level of source compatibility with softmmu. We do not * support any of the more exotic features, so only invalid pages may @@ -271,7 +275,6 @@ static inline bool tlb_hit(uint64_t tlb_addr, vaddr addr) #endif /* !CONFIG_USER_ONLY */ /* Validate correct placement of CPUArchState. */ -#include "cpu.h" QEMU_BUILD_BUG_ON(offsetof(ArchCPU, parent_obj) != 0); QEMU_BUILD_BUG_ON(offsetof(ArchCPU, env) != sizeof(CPUState));