From patchwork Wed Oct 9 00:04:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 833813 Delivered-To: patch@linaro.org Received: by 2002:adf:a1d9:0:b0:367:895a:4699 with SMTP id v25csp555829wrv; Tue, 8 Oct 2024 17:06:23 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU7Jm6hczL/9V55SuS/0BrLAyHs25bj+p9h0V+We2DcFAyaskG1VC8Xjjwq/PbdzumN0M/LCA==@linaro.org X-Google-Smtp-Source: AGHT+IHdLmfg2f1HGkXKiEM40nkp/3jEwZ+pxwOH3I5Cb/8/eBlQ4khYKuOUz7zmIbCjQgnRSovs X-Received: by 2002:a05:620a:3908:b0:7a9:bdd4:b4ea with SMTP id af79cd13be357-7b0795277d9mr111274485a.9.1728432383783; Tue, 08 Oct 2024 17:06:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728432383; cv=none; d=google.com; s=arc-20240605; b=kL92ZXSxx3A6T8s/sgy/lPGV+peERbdP/7gxZMplV23JcbPgtayV5eHyByKTWb0M51 lMH7oWgw7k1VRFvLDUUIsDZKCi8pkzeUh89ER/ph1ES+y3YC8SSh92fYZvBnAXL5p5sN U8g2qbpLhpe2hCCl/y5acsq7GQCyT0fLM5CcDY1fabJxLt9zLkzAoa25MisRAsbIEZ1d ziWaDErOlqnbOR7X2n77fkbvcQwA1GBCxScE4pN4IZeI5Ps3orE3MyVuDKorTWtY3tEF SACp7TjiOt/Sgvvj1SpoJr3ntGASVBRBTVJkFdSMhbvQx3+ETSe3ZISpli3A2ilfHeHM uk/A== 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=ZMaSkZRoz5YPXdGi4Fagk1yb2WqLYDqE0+TVeXDEoMY=; fh=3RK8noKPsRgJpwHDkrKY6p9N6ePZuLOt1ZjdS1VodvU=; b=lqnVR4y8/6UlghLvrJySX71LxLK+tOcHf4NpMsAAxL92yjX+stPeZo13TD7ur1SMQ8 GDGUXAC+JOWxRuWS+sBFQUI3KcoXJPgjNNCP0BGl0BHCN9ijuITDKX9/OeDYODdJPtHa 68k6Vj6glq9Ij3Ckf6J5Jsz9Ycn+0BDmKpmX83VnsqvxLI2InDXH/CLCC4nGBvAnAiOK YqANiyXD22Kmr6L6F0SCVvi9V/ggSBoaYdVs9NHSA9rFEtL/IR/yKwFLR38mEC8wh1BO /8nKeJ8BtXogBEVHWfoKfepZQ1uLzDNcJRI7+5zDrXGr2Hf3MAIxAY1C6CUruHZNJc3i qfQQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IzYQGvb6; 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-7ae7561695asi943423385a.21.2024.10.08.17.06.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 08 Oct 2024 17:06:23 -0700 (PDT) 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=IzYQGvb6; 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 1syKCT-0004LT-LE; Tue, 08 Oct 2024 20:05:09 -0400 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 1syKCP-0004Gk-St for qemu-devel@nongnu.org; Tue, 08 Oct 2024 20:05:05 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1syKCN-0002gh-Q0 for qemu-devel@nongnu.org; Tue, 08 Oct 2024 20:05:05 -0400 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-20b5affde14so45286485ad.3 for ; Tue, 08 Oct 2024 17:05:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728432302; x=1729037102; 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=ZMaSkZRoz5YPXdGi4Fagk1yb2WqLYDqE0+TVeXDEoMY=; b=IzYQGvb67muLzWl9axxKoEmUVOIB98dwkIiWwVc+CtnuHIrmfEse0w0f43TtSo9+rt eICVhEIlpyC0agnscpAVQPgr97bs90aZ5BLeMaLLui7vdqP5m6vu3zsf9ZUNcSzu+7ql GlKgsun00ujfZA3V6l9tvsNng4YSkNwlf30aTKQSudbkXkxNkoUjWhUHdA90NON6B75s cpjLfLjRE3N55Q9BtTt/M+W1lA8F0uFrRT5G5WA6r2gCX8g0H/napOzzDCZKU5I1K8ir Fr0f/Re58kKG0RiPE8j3bPNTwlrzRhMrg052qYkV01v7Zi4BVsAIyNwQqqpo/+O7NSDZ QaTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728432302; x=1729037102; 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=ZMaSkZRoz5YPXdGi4Fagk1yb2WqLYDqE0+TVeXDEoMY=; b=fMcsJHQUQBSuXfC8yMlP+43IB14L59Kvm0YItWDqcFAvInnRfQt/D9S6vqhIKp16u6 0Gx8KqCRWoeswTcpprQwLq3513BRPJx8HaXDb8C7544pAjoDMLm6vAYdeoev+hi20wOB C2ktU930Ym1soYRJtuHyukMC4PqoYf985LIUnNAQfdz+Jf7RBdPrGnzGWF9EnkaRRmkZ TU09Jxt+SQgWYVmzd93DpnksZ4l4OoX7akfaLC2A+3DePjAqjXRPoyah/GZw98zi3yP2 LuJ+3Uoo63hLFcZaLc/les1W7OFbqL31LrKGhZti2zBV8wH0kYCJDrwpQpK+LiNJPmRN 3U9Q== X-Gm-Message-State: AOJu0YxsH/93IlughEv1vmyiKMqhs47HP9biETa14LdsX3u9zpHWlrmc QpQXtHcvmsIspB6keNOcQNLopQcXimKa4q9wxHE1PhHKqiwSxhaNFqnlsVUDr5dBhoAJDyET99x N X-Received: by 2002:a17:902:f54c:b0:20b:79cb:492f with SMTP id d9443c01a7336-20c63780152mr9718395ad.43.1728432302402; Tue, 08 Oct 2024 17:05:02 -0700 (PDT) Received: from stoup.. (174-21-81-121.tukw.qwest.net. [174.21.81.121]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20c138cecf2sm60705105ad.104.2024.10.08.17.05.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Oct 2024 17:05:02 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: deller@kernel.org, peter.maydell@linaro.org, alex.bennee@linaro.org, linux-parisc@vger.kernel.org, qemu-arm@nongnu.org, Helge Deller , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 07/20] target/hppa: Add MemOp argument to hppa_get_physical_address Date: Tue, 8 Oct 2024 17:04:40 -0700 Message-ID: <20241009000453.315652-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241009000453.315652-1-richard.henderson@linaro.org> References: <20241009000453.315652-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62a.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 Just add the argument, unused at this point. Zero is the safe do-nothing value for all callers. Reviewed-by: Helge Deller Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/hppa/cpu.h | 2 +- target/hppa/int_helper.c | 2 +- target/hppa/mem_helper.c | 9 +++++---- target/hppa/op_helper.c | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/target/hppa/cpu.h b/target/hppa/cpu.h index f4e051f176..526855f982 100644 --- a/target/hppa/cpu.h +++ b/target/hppa/cpu.h @@ -369,7 +369,7 @@ bool hppa_cpu_tlb_fill(CPUState *cs, vaddr address, int size, void hppa_cpu_do_interrupt(CPUState *cpu); bool hppa_cpu_exec_interrupt(CPUState *cpu, int int_req); int hppa_get_physical_address(CPUHPPAState *env, vaddr addr, int mmu_idx, - int type, hwaddr *pphys, int *pprot); + int type, MemOp mop, hwaddr *pphys, int *pprot); void hppa_cpu_do_transaction_failed(CPUState *cs, hwaddr physaddr, vaddr addr, unsigned size, MMUAccessType access_type, diff --git a/target/hppa/int_helper.c b/target/hppa/int_helper.c index 391f32f27d..58695def82 100644 --- a/target/hppa/int_helper.c +++ b/target/hppa/int_helper.c @@ -167,7 +167,7 @@ void hppa_cpu_do_interrupt(CPUState *cs) vaddr = hppa_form_gva_psw(old_psw, env->iasq_f, vaddr); t = hppa_get_physical_address(env, vaddr, MMU_KERNEL_IDX, - 0, &paddr, &prot); + 0, 0, &paddr, &prot); if (t >= 0) { /* We can't re-load the instruction. */ env->cr[CR_IIR] = 0; diff --git a/target/hppa/mem_helper.c b/target/hppa/mem_helper.c index b984f730aa..a386c80fa4 100644 --- a/target/hppa/mem_helper.c +++ b/target/hppa/mem_helper.c @@ -197,7 +197,7 @@ static int match_prot_id64(CPUHPPAState *env, uint32_t access_id) } int hppa_get_physical_address(CPUHPPAState *env, vaddr addr, int mmu_idx, - int type, hwaddr *pphys, int *pprot) + int type, MemOp mop, hwaddr *pphys, int *pprot) { hwaddr phys; int prot, r_prot, w_prot, x_prot, priv; @@ -340,7 +340,7 @@ hwaddr hppa_cpu_get_phys_page_debug(CPUState *cs, vaddr addr) mmu_idx = (cpu->env.psw & PSW_D ? MMU_KERNEL_IDX : cpu->env.psw & PSW_W ? MMU_ABS_W_IDX : MMU_ABS_IDX); - excp = hppa_get_physical_address(&cpu->env, addr, mmu_idx, 0, + excp = hppa_get_physical_address(&cpu->env, addr, mmu_idx, 0, 0, &phys, &prot); /* Since we're translating for debugging, the only error that is a @@ -438,7 +438,8 @@ bool hppa_cpu_tlb_fill(CPUState *cs, vaddr addr, int size, break; } - excp = hppa_get_physical_address(env, addr, mmu_idx, a_prot, &phys, &prot); + excp = hppa_get_physical_address(env, addr, mmu_idx, a_prot, 0, + &phys, &prot); if (unlikely(excp >= 0)) { if (probe) { return false; @@ -678,7 +679,7 @@ target_ulong HELPER(lpa)(CPUHPPAState *env, target_ulong addr) hwaddr phys; int prot, excp; - excp = hppa_get_physical_address(env, addr, MMU_KERNEL_IDX, 0, + excp = hppa_get_physical_address(env, addr, MMU_KERNEL_IDX, 0, 0, &phys, &prot); if (excp >= 0) { if (excp == EXCP_DTLB_MISS) { diff --git a/target/hppa/op_helper.c b/target/hppa/op_helper.c index 7f79196fff..744325969f 100644 --- a/target/hppa/op_helper.c +++ b/target/hppa/op_helper.c @@ -334,7 +334,7 @@ target_ulong HELPER(probe)(CPUHPPAState *env, target_ulong addr, } mmu_idx = PRIV_P_TO_MMU_IDX(level, env->psw & PSW_P); - excp = hppa_get_physical_address(env, addr, mmu_idx, 0, &phys, &prot); + excp = hppa_get_physical_address(env, addr, mmu_idx, 0, 0, &phys, &prot); if (excp >= 0) { cpu_restore_state(env_cpu(env), GETPC()); hppa_set_ior_and_isr(env, addr, MMU_IDX_MMU_DISABLED(mmu_idx));