From patchwork Sat Oct 5 20:05:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 833003 Delivered-To: patch@linaro.org Received: by 2002:adf:8b52:0:b0:367:895a:4699 with SMTP id v18csp1338919wra; Sat, 5 Oct 2024 13:08:44 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV+dKqsjDor5DszANa/n4f6+Bm+x81M84VR8jzv9zfxNu5mgiPDVb7mlBND//wHa3FqgtPJIg==@linaro.org X-Google-Smtp-Source: AGHT+IG1o2EL1ppr3JGJvvl0rgkmB7tG1VD4GpDo6FCRKDSrOlQeaMWjAX9FIrrcpBQmAy6MWtQ4 X-Received: by 2002:ac8:590a:0:b0:45c:9c44:ae8e with SMTP id d75a77b69052e-45d8d145716mr193813861cf.22.1728158924136; Sat, 05 Oct 2024 13:08:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728158924; cv=none; d=google.com; s=arc-20240605; b=c+gHK4++EAjPjAqKnJWrS1GGPeCh8A5u/cIx2mcUcowhsAQWtBS43RNm0vEpE+7oMy f+U5tegFPAEoWAPfzRBqJhf9TlNSPxMfc8ni1tf0uW/ZtvkPGbySU9JPjSeWhRvLXwY1 fNFecHi1sGFToa4293LU1QRVTY/U2o/ZHzX4txd9sRz2IUVg+803z2edQ8MZBdmds00i T1nxqwN3z7cgjxXlcXMNKwBSNDtJlGqLoh0ISIFshhw9NI7PeeVysJgZ6OEsEYO1XcPy 4yBMugUmnKuk5oNU6jPzyZyupjPWFuceP6trUjnujYJtMc4w4emANFm/LY3bnoNewltF UVyQ== 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=MP+WvwE/XecW9wPOVCpjk+gA5jxWiH/v3HQ4ejXK7hQ=; fh=rQg8EQ8KH04w/0VkDYF6/ktgEyHJ2dqn1eatHCfBaLw=; b=Pl/0LQCDYsEROwvLxvEyNPZNK1oejHXES0+VO9WFS6hsjtKpi9hOjZBfemxiRynVcG S4yvHq4iQswDuz3LcHBtnXCOP6sFHDCqQ0uwJ5h6zP+bCGDhsMnkJL2o8KkJQ6ql2hCf XC8NjhbyEHLXB0nwqSJicn3CvuMyDEbeIVWrvlGb8Ahovq7GZXBSm/1/2f9oDT5KUej3 rITgzZixaAg8RvJlKf5LbgP4bTcTCXRRMxLf+xyu17zHwFsuMQ8gf4cEweTDe2UGtxLL B1z5VfxdqY3Sl5GLYWVnamivIyf13cfB1mPXeGXj/qfwXO1Ixjdkqd2PYVtnQZyAjTur DYuQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EVLz97HM; 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 d75a77b69052e-45da76fcfc1si27104051cf.795.2024.10.05.13.08.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 05 Oct 2024 13:08:44 -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=EVLz97HM; 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 1sxB2g-0006PC-7Z; Sat, 05 Oct 2024 16:06:18 -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 1sxB2a-0006Iz-9t for qemu-devel@nongnu.org; Sat, 05 Oct 2024 16:06:12 -0400 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sxB2Y-0001kO-KW for qemu-devel@nongnu.org; Sat, 05 Oct 2024 16:06:12 -0400 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-20bb92346caso20346485ad.0 for ; Sat, 05 Oct 2024 13:06:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728158769; x=1728763569; 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=MP+WvwE/XecW9wPOVCpjk+gA5jxWiH/v3HQ4ejXK7hQ=; b=EVLz97HM2CD2mpwhCWDkHTyy2/CbrlRba2ING9mIH9b2auRpZ8Yo+uu5WwGGjd3w7n rYIoRn86EbWZ2lfu813S3h89xhe5fSBB0W0N+NusIi0U01g9xzA/ptfvTKwRHxxpivay ScT1ZRMprsPhzhDSLGUV6iXrt71q/b/0MKa/SrZDpsPLSuI5n+AwOdY3N7qPf+C2bGK4 XQKEp6+BeDUboeGxSxWNVxF4Z26ZGJRxj4Vn8E7XHdWjzyj1K7bw8S+XKftSt9SzXD6+ oPHXtaUXQS2pqASn9gd+gQRH6882abUpwShsr8I4Tty6DANNH/CF+hgsMs+JL/S/ZQa0 uYuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728158769; x=1728763569; 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=MP+WvwE/XecW9wPOVCpjk+gA5jxWiH/v3HQ4ejXK7hQ=; b=KOuRV1eL+15OJDxUYEBb4PD/5sA8V8WVoEZOGGkBrDzPTZTJ6YaEERvZNvoG0Laawk wnb1MWHLLQIjLtWZSYlfa7eB609OtUtU79WW4ctO8jXV5/nE767bfhJKd8jEhMPYy0C6 DLTDkfFwmxsYg1N3wGxD6tW7EGrpRCuvjfEIacWlYeesnhHcyofPseNORx/4AvAoYeuV Rwr7IICGEZ8dYpyG0Kd3Q8tohvD1TuMhCuSX3NFf+d2Aly7xtmSS+kOrtRt3KSuidfE2 yO3uDLTUqQE26VWZ4UQ+D5YDDK5gX35QSXwsbYpBTcIGXWFpnicxAyHbjFCSe7BbYNJ6 qV8A== X-Gm-Message-State: AOJu0Yykq85BGZx+UFsL40yDOtvZIra9LPGLxM6i223yLBreUzI/LbTn Zn910hnEqXYq/nk8nZswGsjB/ITs6l+lPQPfDd590ZgtUqLX3ahV2mlSr6Ar2/R6zY2V2YnPf96 9 X-Received: by 2002:a17:902:d2cc:b0:20b:7902:3456 with SMTP id d9443c01a7336-20bff37ac46mr105992105ad.1.1728158769036; Sat, 05 Oct 2024 13:06:09 -0700 (PDT) Received: from stoup.. (174-21-81-121.tukw.qwest.net. [174.21.81.121]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20c13931055sm16493405ad.139.2024.10.05.13.06.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Oct 2024 13:06:08 -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 Subject: [PATCH v2 08/21] target/hppa: Add MemOp argument to hppa_get_physical_address Date: Sat, 5 Oct 2024 13:05:47 -0700 Message-ID: <20241005200600.493604-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241005200600.493604-1-richard.henderson@linaro.org> References: <20241005200600.493604-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62e; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62e.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 Just add the argument, unused at this point. Zero is the safe do-nothing value for all callers. Signed-off-by: Richard Henderson Reviewed-by: Helge Deller --- 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));