From nobody Tue Feb 10 09:40:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.54 as permitted sender) client-ip=209.85.128.54; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f54.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.54 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1613918136; cv=none; d=zohomail.com; s=zohoarc; b=GqMnlEFxXNrIWJyOgpwuSX0sTDlNsf0ujHf3/5D1E3PIr1/jvXBBDfto2r8NiRS2p35bCHsjF17kQ3Ji6zu+nuj9jOkGgITuPJEPbMwWoBpUWqtSIK/r7DtbMaLgaJNGj0YPUA3qFeIpUIpjPDk/Hln1J43HghsDJjGAHdY1cSU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613918136; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Kvgdf6CrEywh2p1Z7lUVw89ToUYIfaIA15k0msXPWKQ=; b=Y1oF9lkWZK98WApjveieMYnrb4VrtBUWdsyVxeOX2w4Qy4pchZlnePJx1kIlVr0jR7yEsnY8aWcEZNGZjo0Yw9AZAJNFDtMkaj+9kVALVdQorY7/PsMtbtadlYBXu542OrLz7M0tfvfKZJ0cShU89JVoJnNjC8LzsR3PZskT3eo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.54 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by mx.zohomail.com with SMTPS id 1613918136001518.5982417644418; Sun, 21 Feb 2021 06:35:36 -0800 (PST) Received: by mail-wm1-f54.google.com with SMTP id m1so12068473wml.2 for ; Sun, 21 Feb 2021 06:35:35 -0800 (PST) Return-Path: Return-Path: Received: from localhost.localdomain (68.red-83-57-175.dynamicip.rima-tde.net. [83.57.175.68]) by smtp.gmail.com with ESMTPSA id j17sm21874256wmc.28.2021.02.21.06.35.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Feb 2021 06:35:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Kvgdf6CrEywh2p1Z7lUVw89ToUYIfaIA15k0msXPWKQ=; b=JHC1Bndyw69cHqot8243bASvuNju7MoSv6/TNf5JFEVwXnD5XaF8pZXpy/fYVESeXT 1qXIGnmbBCDzZAJZMBCCUHip61/332MUn7cRTzaI/n00Qb3rSQJyJLD/qKNvIAKUdZal uNyJtJ65brswp6tDBIbstfSZbjvKkNLrx0Wd0WkrPVDKiZMq4arwv5FWCf0DWrEYnxRh H6TDcQtH+U8blBqb6Ie5sY3iij3bwg838+iNIeW2cayGQujRi0rwhQkym+baxnop+keb nu3S5pBKy00Tp+XehX2tZquB3XAxE2El4YV+Se4+TVrttDHmJUV+NrnMWus6Po4tlpHl 6j6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Kvgdf6CrEywh2p1Z7lUVw89ToUYIfaIA15k0msXPWKQ=; b=TEi2ArpVplaQB1vWkyQ/Db/FBd8veArZ2e5B3X60gPEx2RZRdKPKC37PrM9n7cVYVJ MagXfJszc2633wEVK7H+h6KgVxcTINElo34T5jDjvSlK7P21sKMPxX4T2N1PA+3DlBGY B03dA4zvzukNuto+ucy4tOJg/72cueD5L3oDBD+Hnma6+7wWyFl1FD2WRcrZn3X+BxTv J7uogl+pqUKfH2RDYZGN/nE3lDmICL1hygQljVe+erHSpTnlqIO/axL9akCg8V5QayP1 NaAQCPbecgZs/hhnE3M004ZDWwkLOx644ToLeamSaP9WyfAZY0+d3Tf1Lur0IRwdzToX Yh8w== X-Gm-Message-State: AOAM533nQ/LE7FRD6NEAP6PEfBudvzuZ679rET7UysI0zCbAk1hv7eHe 29AxjZmDNs46Z1yMLRAe3tI= X-Google-Smtp-Source: ABdhPJx5GCwILYx/0Fs9vJRxtSvGWNRuYNUHCVJxkGiRl+k8zi51ZaXFVsI1jrxl+xWz6s0ZoFM2YA== X-Received: by 2002:a1c:28c1:: with SMTP id o184mr15886861wmo.183.1613918134319; Sun, 21 Feb 2021 06:35:34 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paul Burton , Wainer dos Santos Moschetta , Aleksandar Rikalo , Aurelien Jarno , Marcel Apfelbaum , Cleber Rosa , "Michael S. Tsirkin" , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Huacai Chen , Jiaxun Yang , Richard Henderson Subject: [PULL 12/43] target/mips: Remove access_type argument from get_physical_address() Date: Sun, 21 Feb 2021 15:34:01 +0100 Message-Id: <20210221143432.2468220-13-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210221143432.2468220-1-f4bug@amsat.org> References: <20210221143432.2468220-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) get_physical_address() doesn't use the 'access_type' argument, remove it to simplify. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Jiaxun Yang Message-Id: <20210128144125.3696119-5-f4bug@amsat.org> --- target/mips/tlb_helper.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/target/mips/tlb_helper.c b/target/mips/tlb_helper.c index d89ad87cb9d..c9535b7f72f 100644 --- a/target/mips/tlb_helper.c +++ b/target/mips/tlb_helper.c @@ -259,7 +259,7 @@ static int get_segctl_physical_address(CPUMIPSState *en= v, hwaddr *physical, =20 static int get_physical_address(CPUMIPSState *env, hwaddr *physical, int *prot, target_ulong real_address, - int rw, int access_type, int mmu_idx) + int rw, int mmu_idx) { /* User mode can only access useg/xuseg */ #if defined(TARGET_MIPS64) @@ -492,7 +492,7 @@ hwaddr mips_cpu_get_phys_page_debug(CPUState *cs, vaddr= addr) hwaddr phys_addr; int prot; =20 - if (get_physical_address(env, &phys_addr, &prot, addr, 0, ACCESS_INT, + if (get_physical_address(env, &phys_addr, &prot, addr, 0, cpu_mmu_index(env, false)) !=3D 0) { return -1; } @@ -570,7 +570,7 @@ static int walk_directory(CPUMIPSState *env, uint64_t *= vaddr, uint64_t w =3D 0; =20 if (get_physical_address(env, &paddr, &prot, *vaddr, MMU_DATA_LOAD, - ACCESS_INT, cpu_mmu_index(env, false)) !=3D + cpu_mmu_index(env, false)) !=3D TLBRET_MATCH) { /* wrong base address */ return 0; @@ -598,7 +598,7 @@ static int walk_directory(CPUMIPSState *env, uint64_t *= vaddr, *pw_entrylo0 =3D entry; } if (get_physical_address(env, &paddr, &prot, vaddr2, MMU_DATA_= LOAD, - ACCESS_INT, cpu_mmu_index(env, false)= ) !=3D + cpu_mmu_index(env, false)) !=3D TLBRET_MATCH) { return 0; } @@ -752,7 +752,7 @@ static bool page_table_walk_refill(CPUMIPSState *env, v= addr address, int rw, /* Leaf Level Page Table - First half of PTE pair */ vaddr |=3D ptoffset0; if (get_physical_address(env, &paddr, &prot, vaddr, MMU_DATA_LOAD, - ACCESS_INT, cpu_mmu_index(env, false)) !=3D + cpu_mmu_index(env, false)) !=3D TLBRET_MATCH) { return false; } @@ -765,7 +765,7 @@ static bool page_table_walk_refill(CPUMIPSState *env, v= addr address, int rw, /* Leaf Level Page Table - Second half of PTE pair */ vaddr |=3D ptoffset1; if (get_physical_address(env, &paddr, &prot, vaddr, MMU_DATA_LOAD, - ACCESS_INT, cpu_mmu_index(env, false)) !=3D + cpu_mmu_index(env, false)) !=3D TLBRET_MATCH) { return false; } @@ -843,16 +843,14 @@ bool mips_cpu_tlb_fill(CPUState *cs, vaddr address, i= nt size, #if !defined(CONFIG_USER_ONLY) hwaddr physical; int prot; - int mips_access_type; #endif int ret =3D TLBRET_BADADDR; =20 /* data access */ #if !defined(CONFIG_USER_ONLY) /* XXX: put correct access by using cpu_restore_state() correctly */ - mips_access_type =3D ACCESS_INT; ret =3D get_physical_address(env, &physical, &prot, address, - access_type, mips_access_type, mmu_idx); + access_type, mmu_idx); switch (ret) { case TLBRET_MATCH: qemu_log_mask(CPU_LOG_MMU, @@ -884,7 +882,7 @@ bool mips_cpu_tlb_fill(CPUState *cs, vaddr address, int= size, env->hflags |=3D mode; if (ret_walker) { ret =3D get_physical_address(env, &physical, &prot, address, - access_type, mips_access_type, mmu_= idx); + access_type, mmu_idx); if (ret =3D=3D TLBRET_MATCH) { tlb_set_page(cs, address & TARGET_PAGE_MASK, physical & TARGET_PAGE_MASK, prot, @@ -909,12 +907,10 @@ hwaddr cpu_mips_translate_address(CPUMIPSState *env, = target_ulong address, { hwaddr physical; int prot; - int access_type; int ret =3D 0; =20 /* data access */ - access_type =3D ACCESS_INT; - ret =3D get_physical_address(env, &physical, &prot, address, rw, acces= s_type, + ret =3D get_physical_address(env, &physical, &prot, address, rw, cpu_mmu_index(env, false)); if (ret !=3D TLBRET_MATCH) { raise_mmu_exception(env, address, rw, ret); --=20 2.26.2