From patchwork Mon Feb 27 11:36:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 656953 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2299801wrb; Mon, 27 Feb 2023 03:38:39 -0800 (PST) X-Google-Smtp-Source: AK7set8/m4frssWP1SnE6khN9TVD+Vw6gl59Ws7BOGMsiEUQ0QKxid58ED1EowO7FObTOFimh914 X-Received: by 2002:ad4:5f87:0:b0:56f:5466:20dc with SMTP id jp7-20020ad45f87000000b0056f546620dcmr45319244qvb.4.1677497919058; Mon, 27 Feb 2023 03:38:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677497919; cv=none; d=google.com; s=arc-20160816; b=t0pL43fs2RmXebO4jGUyGKE5LiKoSAFlVnJgEtQPWl5zv5iLo/TcZB55yYyV9uMIi6 NhsqZ2I2A85Zqvb2PURrMmC+0VXeMYGW1k/FTv5bzLTndKVE3bxRclm0DJRBDnSJXel6 rPGG7WG+mZXrRC8zNyEg0tExhM8EWzDgf4jzzKKOP2Fijo5TIorLbw+LRfdHnLyxqdyH xOgGq/mmOxOO62EBrb3qwzsAtzBmtGpeEpKYBbxLAho8sSvN9wJIanelpj6Nof9CRQoC 5SLOQMRmh32MVC6H9ti8Qx7Lw4ORgCPls1153oqSG0/ymBFe2NeTk8CdW+P4pluEx50N EWOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=PCSd52Fbr0D7r676adp3wM+pVSJrvc7Kl8d9UhYqqXU=; b=D/ejXjBeFigU6zMrpaV5Zx9LDIOlfg1ZUjrn6YranEQV9rB+y56A7fJpuWXu+tUWsX ZNNgbmYdspIA/dDIqIO//UtGqrlr8RJ3JbX1VxJiheNOIxcx/ipVmXD56ktH1RxHX2e8 eN4B3/XUQ0SNXqWF9BTABzkEBF4z6FVPDbnVim1shjsTuJGmrEchCOEJTqKrBQm4HDPd iupJ58mlGZjaGALqOSNKyzMqAUO+1ztwTDtO0gJdy7OCWQ24eKZ/IdCkrG6Rte5EBLmR zP5/bY8VoLqxfMUk2YU7OiB4KN/amwdg6MBFDgofRZFEyOoxToofVDYOVPHP6jWGACsY +HTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BQMXRWU8; 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=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id j3-20020a0cf503000000b0056eb364bd4bsi6335064qvm.203.2023.02.27.03.38.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 03:38:39 -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=@redhat.com header.s=mimecast20190719 header.b=BQMXRWU8; 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=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWboD-0005Xy-Ib; Mon, 27 Feb 2023 06:36:45 -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 1pWboB-0005W2-Uk for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:43 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pWboA-0005g9-7m for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PCSd52Fbr0D7r676adp3wM+pVSJrvc7Kl8d9UhYqqXU=; b=BQMXRWU8wpTTgXG17rdtZz5yYJvfjWt8xmvf5b24KUUxHDlceBWJs1PXSqxvTUDb/P/Lw1 BvsJ421sL8vC32gbi4UXDpz2Zn8vHWA27dfptjjiUQSdfRd9wtrmY7lxioGwRkRCUeRXv4 1vMknjyOy91gzwoHJZXyff1y+Ru+9Yw= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-158-SAO2k0WjNwKSZhZOq0aZ0w-1; Mon, 27 Feb 2023 06:36:38 -0500 X-MC-Unique: SAO2k0WjNwKSZhZOq0aZ0w-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0328F95D60A; Mon, 27 Feb 2023 11:36:38 +0000 (UTC) Received: from thuth.com (unknown [10.45.227.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1B0E11121314; Mon, 27 Feb 2023 11:36:36 +0000 (UTC) From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: Richard Henderson , David Hildenbrand Subject: [PULL 12/33] target/s390x: Use void* for haddr in S390Access Date: Mon, 27 Feb 2023 12:36:00 +0100 Message-Id: <20230227113621.58468-13-thuth@redhat.com> In-Reply-To: <20230227113621.58468-1-thuth@redhat.com> References: <20230227113621.58468-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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 From: Richard Henderson The interface from probe_access_flags is void*, and matching that will be helpful. We already rely on the gcc extension for byte arithmetic on void*. Signed-off-by: Richard Henderson Reviewed-by: David Hildenbrand Message-Id: <20230109201856.3916639-4-richard.henderson@linaro.org> Signed-off-by: Thomas Huth --- target/s390x/tcg/mem_helper.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c index 28bf3bd53c..4d157ba9cf 100644 --- a/target/s390x/tcg/mem_helper.c +++ b/target/s390x/tcg/mem_helper.c @@ -114,8 +114,8 @@ static inline void cpu_stsize_data_ra(CPUS390XState *env, uint64_t addr, typedef struct S390Access { target_ulong vaddr1; target_ulong vaddr2; - char *haddr1; - char *haddr2; + void *haddr1; + void *haddr2; uint16_t size1; uint16_t size2; /* @@ -268,8 +268,9 @@ static void access_memset(CPUS390XState *env, S390Access *desta, desta->mmu_idx, ra); } -static uint8_t do_access_get_byte(CPUS390XState *env, vaddr vaddr, char **haddr, - int offset, int mmu_idx, uintptr_t ra) +static uint8_t do_access_get_byte(CPUS390XState *env, vaddr vaddr, + void **haddr, int offset, + int mmu_idx, uintptr_t ra) { #ifdef CONFIG_USER_ONLY return ldub_p(*haddr + offset); @@ -301,7 +302,7 @@ static uint8_t access_get_byte(CPUS390XState *env, S390Access *access, offset - access->size1, access->mmu_idx, ra); } -static void do_access_set_byte(CPUS390XState *env, vaddr vaddr, char **haddr, +static void do_access_set_byte(CPUS390XState *env, vaddr vaddr, void **haddr, int offset, uint8_t byte, int mmu_idx, uintptr_t ra) {