From patchwork Wed Jul 10 03:28:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 811769 Delivered-To: patch@linaro.org Received: by 2002:adf:ee12:0:b0:367:895a:4699 with SMTP id y18csp571773wrn; Tue, 9 Jul 2024 20:31:19 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXl1UZipj6G9ja6QmgGpG6vffgtREgv7TZp8UCeyhMja9WCatRTZn1AU7m/Oe7s+5tXXP7gf7pJYMOL7RNwfwgu X-Google-Smtp-Source: AGHT+IE4puiPQ7z9aPOW0jpZfQ6LYhx1CowHtO7qRoUQCTKoLdO1FPjwNGcl0o4BaaST/w0/CIOU X-Received: by 2002:ac8:584a:0:b0:446:5aa4:c428 with SMTP id d75a77b69052e-447fa8adb5bmr51005301cf.9.1720582278907; Tue, 09 Jul 2024 20:31:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720582278; cv=none; d=google.com; s=arc-20160816; b=D3Ep2+x2hgWGFWloJjTvOJASholhWGjjednwAvMII+2zkFUN/po2I9jwaLkS0gTAVL N0YZNUrMEVIWv+jVfV45T1Dm6LKissS8eS3Evz/b5e/+6u2tZnVsiDLEkS+7e+FFHb4M CPcakH8CvgVWPcPv712H+UAfWvrLUWzYJofIDB2Kbw3CDvcXn/SnMoo/0EKcr1JJAnrY kjd/DmVqpSaB0fPkilhiKtpSwtG99QmBr9GRd4JkCuidNRxV168SNO+A3fBxJAgjiDXc aSC2mcEi/sehWAqcE6+s2W68ejxTuqpwLU9cdfm8IyzqqHiFfD6em53NIfYk0reNZubY hvTA== 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=GQAO0KTgjbZehDr4himFsvAKyM+WWXiQ7FDysfKIpGc=; fh=ghNV7mL7MT64gEZ5PHgzOSgxQoCZ3IZKAHIIlbKGaqE=; b=g6RVGqkJjAInQ/eP0DWetO6T5hCxWibofEvVzW4QHgVqADrWlVpY/X0ragJ6L09Na0 p1ELLv34PpxClw7sHIZ8h8pYM3L53LeDdcxPombs+mIhj72XKJ6HZTawCB47+Z4MfH9e wv6FnBxTNGrowHJaE2xGIcGx9CgKO+E55dTsLNUvbPD2AxCkZ6CRBqzc20/1pyqpjiyJ hy7PkvW8n0ggemFXVt2D7HuDL0XaWwYYfdgo+R/QB0U5zwRTxeuh0thEplpsBn/37LQZ 6AMWGdS3ijv/IaSCe80UKz+8cvivBii9VYnNY4Nsa1BfW8BCTpe9o92zEI7cuKZipQFL d3vA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=f2TsoLXl; 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 d75a77b69052e-447f9af5d54si646541cf.18.2024.07.09.20.31.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 09 Jul 2024 20:31:18 -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=f2TsoLXl; 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 1sRO0W-0000hg-A2; Tue, 09 Jul 2024 23:28:40 -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 1sRO0U-0000ax-Sf for qemu-devel@nongnu.org; Tue, 09 Jul 2024 23:28:38 -0400 Received: from mail-oi1-x234.google.com ([2607:f8b0:4864:20::234]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sRO0J-0003nW-Qf for qemu-devel@nongnu.org; Tue, 09 Jul 2024 23:28:38 -0400 Received: by mail-oi1-x234.google.com with SMTP id 5614622812f47-3d92aa6b62bso1981106b6e.2 for ; Tue, 09 Jul 2024 20:28:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720582106; x=1721186906; 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=GQAO0KTgjbZehDr4himFsvAKyM+WWXiQ7FDysfKIpGc=; b=f2TsoLXlnDKs/MybgMNR9+aWPfJiRBZJ/cH+fB8CoAwZGzaiAho67LLPsPwLp1fUYL J7m7P3ZfPdEDAt0Nrpzuq0Z5tI5rKvGdLkRkccfgd42Va7ebhoD/ls7gXpTZxsNoCG8Q qZNMA4yurnB7edptnenOmBU4QGgMFtt3sw7IXdsSDqkQOViviP+ppXGtNz5vbs1c68TH zu0QD57qPDUuchR7p3m0V+Rvod+c8doZJVtLnW58dL56ZkE8Z+neeSxDZ0h9u9kG/bju PtVkum0v00zAftLaygpJLjybUANjYlOoMgWRsow5kLORa5uiH5bNRJXu1LdwV2x0iC4r +Ybw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720582106; x=1721186906; 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=GQAO0KTgjbZehDr4himFsvAKyM+WWXiQ7FDysfKIpGc=; b=AqXYKiTPvrV0KP0MUyyDzVUI05XPSW0YooZ6h0N/lNe7TEo7O9RVVQF/I4NmOkhV7r OgcPi4lunQHOiKhAtlGfAMbYvvgw2kvU3Wv4mJ6ATcbx/v9c9xC7bHppIQGn7MvRj3R1 9JwM4IuOPKhiGbfLGbTdizl/19m2AQfaf6Ld1ET5tH88b/OBldKohRAcfKwvWCtizdMf ndQBtQcYFGOmc+aR4gyhcxDnseTA3s5gAXzXjfovNtZp8YXiYo70iUoWE4eAQdBLqJDZ uV7hvWqAHkXYowEg9bm6ABlmBxpLJqKKImxpbfHu+UeVnvoK2FxnYkXh2QkTgr8B8FkQ yFJA== X-Gm-Message-State: AOJu0YyedpzY/E5cODIPeFOxztQWNMKvwRno5/rMURaq6KtIuiagoQvq wq1uzVmhT9U82rRkcPlO26pKbm+L6h/A/xxS77lG8Kmituw8FpyUXl44/0yXBOiWyc9o8dfIOOB VJDo= X-Received: by 2002:a05:6808:148b:b0:3d9:26d6:c70f with SMTP id 5614622812f47-3d93bee9516mr5121280b6e.7.1720582105753; Tue, 09 Jul 2024 20:28:25 -0700 (PDT) Received: from stoup.. (174-21-76-141.tukw.qwest.net. [174.21.76.141]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70b438f5679sm2687280b3a.90.2024.07.09.20.28.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jul 2024 20:28:25 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongu.org, qemu-s390x@nongnu.org, qemu-riscv@nongnu.org, balaton@eik.bme.hu, max.chou@sifive.com Subject: [PATCH v2 10/13] target/s390x: Use user_or_likely in do_access_memset Date: Tue, 9 Jul 2024 20:28:11 -0700 Message-ID: <20240710032814.104643-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240710032814.104643-1-richard.henderson@linaro.org> References: <20240710032814.104643-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::234; envelope-from=richard.henderson@linaro.org; helo=mail-oi1-x234.google.com X-Spam_score_int: 4 X-Spam_score: 0.4 X-Spam_bar: / X-Spam_report: (0.4 / 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, SUSPICIOUS_RECIPS=2.51 autolearn=no 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 Eliminate the ifdef by using a predicate that is always true with CONFIG_USER_ONLY. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/s390x/tcg/mem_helper.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c index 6cdbc34178..5311a15a09 100644 --- a/target/s390x/tcg/mem_helper.c +++ b/target/s390x/tcg/mem_helper.c @@ -225,10 +225,7 @@ static void do_access_memset(CPUS390XState *env, vaddr vaddr, char *haddr, uint8_t byte, uint16_t size, int mmu_idx, uintptr_t ra) { -#ifdef CONFIG_USER_ONLY - memset(haddr, byte, size); -#else - if (likely(haddr)) { + if (user_or_likely(haddr)) { memset(haddr, byte, size); } else { MemOpIdx oi = make_memop_idx(MO_UB, mmu_idx); @@ -236,7 +233,6 @@ static void do_access_memset(CPUS390XState *env, vaddr vaddr, char *haddr, cpu_stb_mmu(env, vaddr + i, byte, oi, ra); } } -#endif } static void access_memset(CPUS390XState *env, S390Access *desta,