From patchwork Mon Jan 9 20:18:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 640702 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp2341701pvb; Mon, 9 Jan 2023 12:26:18 -0800 (PST) X-Google-Smtp-Source: AMrXdXuZmrWEdiVlkzxa9Uc3RiPemDXiyQs36t+oPqeI5ZUIJOe0T1n2wKT0Gvvsdt8TQd0yii8B X-Received: by 2002:a05:622a:6206:b0:3ae:bd53:dfd2 with SMTP id hj6-20020a05622a620600b003aebd53dfd2mr2021153qtb.41.1673295978088; Mon, 09 Jan 2023 12:26:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673295978; cv=none; d=google.com; s=arc-20160816; b=LUHqqYWwd6TXkhGKHJ0jrIxwg6XvQgBnwBOMNtSwkph8N2L2/phflW+w4VdxHhbTYK Z3hA5GlhAoKdkYp6XJ8WQI8gYPF7xXm4WTAOfPlYyBYjyxcrqLBdjTu2SCbyBu5XJuoe 5Q1vIIQbnR17nIZskCEl1qa1i/9cFDerWwxBK/vC0Eehj88oFhwFmyfD1mmD+19xSnEU GyNVWly1GeqtDTCXn2ieiY31Vx0/BM6qstBSSXBBnelKumF7IObp+r2X4xbBhTSj2AmH zMIsiC+yPuash9zcZc3gkPhtdCxTaUHnA7GIIWenzJ6Adwvp5HNVvQjHjzBPnL2TP9vh iSkw== 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=zltlvjlCUn0zx1Lgpw9up7wSOYc3XGuPw4RO2nRN2MM=; b=wI8oxeTGVRjyA/YPVAXIXpCr/vFWrzHIjyWVqSkGwEKkGpMQuksOoQCK8iKswZSQgb iovRS1Fpv2mI80n3BMopygKaLs9Ttci3HhTt1RzNDMWN9i51hpjtEAI8Qb4TqPbTCLAw bBuKe1bmNFHI3L4GpiojguITegNblQbtOVtuiQoK7ZoORWMVusq37u9CaH/nZsgal6eY 1HP+lHYKProKsjc1A6t/ne/1OUnKv7ZxgsMPnYyQW+gQv1FfCX4XFgo5wq917c63wkYJ SO8RGyIuKWUHAmy62+J6fU3uKIGkRoUiz1OocSwR9p3mDmpi3kL2Zf0+BTFKUMeOVvsF XVSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=W6Ya5WIZ; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u8-20020a05622a17c800b003aeadf20157si756009qtk.656.2023.01.09.12.26.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jan 2023 12:26:18 -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=W6Ya5WIZ; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pEybu-0005FR-60; Mon, 09 Jan 2023 15:19:10 -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 1pEybp-00052q-DI for qemu-devel@nongnu.org; Mon, 09 Jan 2023 15:19:05 -0500 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pEybn-00054B-Sg for qemu-devel@nongnu.org; Mon, 09 Jan 2023 15:19:05 -0500 Received: by mail-pf1-x431.google.com with SMTP id g20so7071612pfb.3 for ; Mon, 09 Jan 2023 12:19:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=zltlvjlCUn0zx1Lgpw9up7wSOYc3XGuPw4RO2nRN2MM=; b=W6Ya5WIZXKBPN3O6d17dcnSVXs8mXsYVsi87ID324ANlXqpEuWgpOpBYp5Lfk3GflV yM7HJZr8W/qKJLdgvaG5otZsDXY5Kxx38nIJNdGEiY38jqsrogBNi1nso4+4gYefpgBz RD5ab23aqr/GcsPhC6g8wQ4UqiVZinPWf1/YEK2QKBBwzYYXJjlgb7lotXK6XR4V8ok4 p8z3lfLX3CsJo+LjS+jtLHRPE8bkzt6qequufwjALnpoQ2rh7ndb51ytY4C8T3kImF1K ByaXU17ifrR3ycihB2nTJnRuJgFgULK2F5IZLMfxFYL2V9GqAFxRZKghJEboiVoQxy4X ntUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=zltlvjlCUn0zx1Lgpw9up7wSOYc3XGuPw4RO2nRN2MM=; b=1rX6oOc5Z58Zn3cLfsvqaVTyJ7JG/YUh40HCgngawvrNRzwCo8upNSSJFHGEPlF5EO u1T5wyYUQCZskc/fgmZpx/E4A1pJmhEeob/tuu7EkzsdbZ8ZjohKJsJ7lJ/LlNf+iwpw BhjVJDhAHBVILB8HI5okhLZ5CfRia9pt94G6zh/Swgz4K4zytn1A3XUoyB+1EHhRP0Nn /MdOLZ7HW1fTvj4em82Jkh+IHxn8e6TEIwuBVDuajh+eBcIYugKosJbgGRHfFthAx5bk 9LwiWtZL7hiLIPv40aLcmGS9N2fxDjuIX45tc6m0/IerSZf1qUfjQraii1qrvha+e7jN b81w== X-Gm-Message-State: AFqh2kpB2Ja60A8jviievmwjup8C9E+k6bUSUj14d0aXwpkzaW8Inzdg xXDwtW+Do2OWuqP/Mqvc/y6uyLAQgAqjgS9G X-Received: by 2002:a62:ed18:0:b0:574:cc3d:a24e with SMTP id u24-20020a62ed18000000b00574cc3da24emr58468547pfh.5.1673295541179; Mon, 09 Jan 2023 12:19:01 -0800 (PST) Received: from stoup.. ([2602:47:d48c:8101:158e:facf:7a46:ba9f]) by smtp.gmail.com with ESMTPSA id c132-20020a621c8a000000b00589a7824703sm1470972pfc.194.2023.01.09.12.19.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Jan 2023 12:19:00 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: david@redhat.com Subject: [PATCH 3/7] target/s390x: Use void* for haddr in S390Access Date: Mon, 9 Jan 2023 12:18:52 -0800 Message-Id: <20230109201856.3916639-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230109201856.3916639-1-richard.henderson@linaro.org> References: <20230109201856.3916639-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::431; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x431.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 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 --- 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 6a50189ef0..0f2830f87c 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) {