Message ID | 20230523235804.747803-26-richard.henderson@linaro.org |
---|---|
State | Accepted |
Commit | b35b812567f090e41c4b194bb2a752f29e9aedcc |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1990887wrt; Tue, 23 May 2023 17:07:37 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7n5zLukSZz5uPZrVAysgtM2rTKVXXj7U8OZHh45pGaFqQBWL3fw9K3BM9HvpMg+B+CzETs X-Received: by 2002:ac8:5a0e:0:b0:3f5:37eb:1fba with SMTP id n14-20020ac85a0e000000b003f537eb1fbamr24232006qta.23.1684886856756; Tue, 23 May 2023 17:07:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684886856; cv=none; d=google.com; s=arc-20160816; b=TMfRWcPQtdDM07WnXBDOjX3loioRuns5aJfHuBBSyVFXlEsw9rBpNdvMHcH2r0XK4G NSDZwC+hM5cSdR4baUdOPx4EoSntuTefDX+De6zmOfRAw/wJDR7Hh/wnacG6jLaSdY4b DCfgPMmtR3/QXoeCe7q6aTVWnh0Uu3ApEJOwE4bf2D595349W3wo6Kq7r+3PPTtTrfJI JEaCp37PnWtkAbasn/KHPgPJ6+cvX7haiyjIH5E2ab1AYfZfm6kQ8KedhbTsz1n70CTF OtMmkG9+q1EneB6sM+64q/j6SWfNhHxSU/hZPkO26vOd7egM+lDTL/7+XEQLHjokq43v V/qA== 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=3dmtEq6kmVE3RGdrdH/eSfhix7HRQOKB/pXZ4u4czNE=; b=Ckj5dD4WYnFSQe6OXW5yMEfVEKFdYEyGfpDGfk493kbMTL1Ax8Nj/KrQ7f1Knb4JPh 7sGS4vI+g4MbeZhpwuKm9JzZHTSwrkDVPqlBeW0RS7WXq/lNUL1KGPjz8HFulDDsNu/Z zHLiAKm3PzmUWRHeP74T6xDWLn0ishG59ZbGCtgc79Hh9uBARBUbb4SLFQ8Hk/n24zkJ nNvqOQ3l+D/B921HkiKia9/dZvb44UOJ1etkyTKkQA/qS8tGXz1rMBpKTFxnuIXzVLLB TGTAuwqps7G3T6Zg47s/3NJ1kmLXq5fHfUgRsPBqSkF99Rixjg0x0X9ETpCt2zlECyQR pASw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="dxMp/su4"; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g17-20020ac87f51000000b003f6beed5efasi1202993qtk.3.2023.05.23.17.07.36 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 May 2023 17:07:36 -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="dxMp/su4"; 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 <qemu-devel-bounces@nongnu.org>) id 1q1bu7-0004Ou-OM; Tue, 23 May 2023 19:58:59 -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 <richard.henderson@linaro.org>) id 1q1btl-0004J5-Cw for qemu-devel@nongnu.org; Tue, 23 May 2023 19:58:37 -0400 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1q1btc-0001rp-Dr for qemu-devel@nongnu.org; Tue, 23 May 2023 19:58:37 -0400 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-64d5b4c3ffeso102462b3a.2 for <qemu-devel@nongnu.org>; Tue, 23 May 2023 16:58:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684886307; x=1687478307; 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=3dmtEq6kmVE3RGdrdH/eSfhix7HRQOKB/pXZ4u4czNE=; b=dxMp/su4auZGrrxiQBjq4afhP5rhz+Jao3vaoth+fd3PI9eQcjfG9m4Ug3yCYLw7Qc EKoQC/Q/oSIWDLMm8BlgSv/SM5RyV0n8sn2McfQwzkFg+xusYIout824De4/wEtyGuNt f/uvfMpmgbvgNpTtT+Vw0BLeiZTEYolc4SL01V7/En1PQx6nw5D8vyC884vGBLp5CPeL kgaGHSxMGJValIS9hHgFRLsMXL4HHgRrlxx1I6sQDHSOWgRPu+dJ+ewEDlV1J0ieddxM z0FoZ+7oNb/JyIlugY/GaB/xBQ/+olevL/+nJIIN/W99mJaeqeOg4taD/kvV0tnrpfay YHgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684886307; x=1687478307; 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=3dmtEq6kmVE3RGdrdH/eSfhix7HRQOKB/pXZ4u4czNE=; b=hW9xuQa4UUNIOOmbgpLksTni7heLcwmjWBhzfvyms4tpG7TQKPV6A8Im5nk57npMVY Auq0WGRzrxyajA1weKefURbWfA6Os977eK7IM1iOablN8l521IKKe3jXYDmwN2UYtmIc eWTkSIvWQo75JKTMCIC4nj0EHw9eRKPL5Ry8RcMS1zhpPvrbozZ2Op3bzXhRl5663At0 gEtxkQHyXgcjYZu91Kx65ftQIiKuxuhcMBH0LApMaZop+P+polzEm6o2QSlvfmzHxdYS C94vcMW6SUoVLiQIOYargXL/Fddxx2YiY98Vk3bA4L/6JBadZTZtnfRvwHnV79NFqCRH esJg== X-Gm-Message-State: AC+VfDwVq7Z7K1B33utDRvjf+BB54HkzAGDFuShi/R1+v9dxtoiGaUwB iZ/MP0kgW23UY54hCHTE6nzulQuXqdP8VUuvorM= X-Received: by 2002:a05:6a00:2d13:b0:64c:b45f:fc86 with SMTP id fa19-20020a056a002d1300b0064cb45ffc86mr746573pfb.17.1684886307248; Tue, 23 May 2023 16:58:27 -0700 (PDT) Received: from stoup.. ([2602:ae:1598:4c01:c13a:d73:4f88:3654]) by smtp.gmail.com with ESMTPSA id p18-20020aa78612000000b0063b7c42a070sm6285041pfn.68.2023.05.23.16.58.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 May 2023 16:58:26 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org> Subject: [PULL 25/28] qemu/atomic128: Improve cmpxchg fallback for atomic16_set Date: Tue, 23 May 2023 16:58:01 -0700 Message-Id: <20230523235804.747803-26-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230523235804.747803-1-richard.henderson@linaro.org> References: <20230523235804.747803-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::433; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x433.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, T_SCC_BODY_TEXT_LINE=-0.01 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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
[PULL,01/28] util: Introduce host-specific cpuinfo.h
|
expand
|
diff --git a/host/include/generic/host/atomic128-ldst.h b/host/include/generic/host/atomic128-ldst.h index 79d208b7a4..80fff0643a 100644 --- a/host/include/generic/host/atomic128-ldst.h +++ b/host/include/generic/host/atomic128-ldst.h @@ -58,11 +58,14 @@ atomic16_read_rw(Int128 *ptr) static inline void ATTRIBUTE_ATOMIC128_OPT atomic16_set(Int128 *ptr, Int128 val) { - Int128 old = *ptr, cmp; + __int128_t *ptr_align = __builtin_assume_aligned(ptr, 16); + __int128_t old; + Int128Alias new; + + new.s = val; do { - cmp = old; - old = atomic16_cmpxchg(ptr, cmp, val); - } while (int128_ne(old, cmp)); + old = *ptr_align; + } while (!__sync_bool_compare_and_swap_16(ptr_align, old, new.i)); } #else