Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1211270imm; Fri, 28 Sep 2018 14:08:54 -0700 (PDT) X-Google-Smtp-Source: ACcGV61FcIoG4+A7HujQM7QnZK3pM+qAZ90l8g+Ugp01RHGQ8yOL8HwXo6P39aozrobRg7IJN+5k X-Received: by 2002:a17:902:8a89:: with SMTP id p9-v6mr333537plo.183.1538168934666; Fri, 28 Sep 2018 14:08:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538168934; cv=none; d=google.com; s=arc-20160816; b=AiTN58WGnTI8+9xYrgOaJP7dLrCAqO/V27xwYhQkHR0ifzXIY+cKI3mAhX9Xppy/cq tuUcEALhjEACpk1bKA2Leeb7SXwPceAGF1yUPsVl7IOglrf80299oVJvFVDHvGFgg5ZM W71gw0aT7Pu8wlSuEJM/CshCz/2b8vjwb9BDgWGo0Q4Mn77LAtMh+CWKAPDleBTr/5/U i1tm8W+dBZjs1J7hnejSCC5DAJ0MRFQg0/NjQSDgKs5RpcXp6ATrXVT1/y4dyQG5rsaN 9yZ7E7/WxXWqCTXiAzyYA/PZu4d3iRty7PyXAM8buFye/5ZmAb8ehP+LB4ids89KAl3z Lqag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=cy6m3+19iPAV89xjvtxNobg8u1DCt9a+TuM7sS4wT1A=; b=b7oungRnGHaPZvW9zRHEOnQ4YmxbFgVVbM8fqebX3LCMfrH2jX8WVPC9glnGZ9YBaF MojPo8f7E7TMBtAh/Jtg9nQ+DZGUKa61Rxii/JvBluAPoJHpY5ry+8ru4fL8nS5sbAtU UUmjsFFZbgprZvssVH15HYVUNyyJTpUEiyNAzVlbaXTwTp6PVYZUK1YmCcHGQl19pDgX Vxm+if38qpfnE2PLBMAjPf8XPTCFi5v5sWmCW45l1NzhE8iafTqGqV4LRSlk9HvA5oRg carYfypZESZtQa3z82Sm8ftlOBrpnYraCrlK//6onzsanjKko4ZizWzjGari17kcb0hR lepQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=glvSTSWz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f62-v6si5721728pfg.35.2018.09.28.14.08.39; Fri, 28 Sep 2018 14:08:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=glvSTSWz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727325AbeI2Ddr (ORCPT + 99 others); Fri, 28 Sep 2018 23:33:47 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:39383 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726496AbeI2Ddq (ORCPT ); Fri, 28 Sep 2018 23:33:46 -0400 Received: by mail-pg1-f196.google.com with SMTP id r9-v6so1435658pgv.6 for ; Fri, 28 Sep 2018 14:08:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=cy6m3+19iPAV89xjvtxNobg8u1DCt9a+TuM7sS4wT1A=; b=glvSTSWz1mTQRpN3OnMRcBbkTby8lT1VO2XSDGaNwmEoRg+hhByPPKa7UfTzK19+dj qeOKEJUgUg0JBi4Ev0aZlYSNsvsEhIDteHoOprLRE8dB2ZL1ZC2i/kChwtg96GodeEAJ b3j/q22QOVx5UJgtOyEWav2yqf1VfncL7ebaIRdbMwZDCPTWDlof9FmJvMrlB1d3isAC qPbBPfUuHSHiisvUo4gBSPyHtA8qorb8il6iKRtd88oEixgoN4FA20rjgVleMjYv3Ebq hTtdsr7tk6LU1tu8xPa+vXPwrKfRsx2R1uHrnTkbosbHGxCfCyvlp0qFIlGFf77hkizg ccSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=cy6m3+19iPAV89xjvtxNobg8u1DCt9a+TuM7sS4wT1A=; b=XFHCo/EdSgS4YwGgY9jwKk3PvtY8zq2vYYz2NT2Wpgsh9narIGOMRS1BE+a5xtxVh8 H9fkH5o/Tj+08Nn3SRJ9tybUVoNFHB/LggvAKJVHD4Ial8Oq/Gw7QCIU7sK2IHLLoUH8 OIIpBn66On5kVR3SykGSlbkUR655uxTLTomOS028XSUZZpg1LpfH90/ruyDX8HNLEtnP 2orGayayOXGN6iCRruVINlCWoX/9l9HvA7cCoF2kmTu+f8eG534vOn7OKJW8aoGzH5fc 8u56Pm3Mg+5oXH55PBjOi4uHcx9Cvm4ctqAByzvZcN7NkS4hbT6C0edHpfDWFU70FwpE r0Pw== X-Gm-Message-State: ABuFfoh6vFpT117V9/NdLMSMEETdMiw5CT7Ee8dEoRjD4I+MOn68M34L W1vDzu8mOB9RifPEzC6VQp6XDg== X-Received: by 2002:a62:c60e:: with SMTP id m14-v6mr374666pfg.40.1538168893063; Fri, 28 Sep 2018 14:08:13 -0700 (PDT) Received: from ?IPv6:2600:1010:b029:4fc8:d7f:8889:342e:40b? ([2600:1010:b029:4fc8:d7f:8889:342e:40b]) by smtp.gmail.com with ESMTPSA id y19-v6sm13303840pff.14.2018.09.28.14.08.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Sep 2018 14:08:11 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) Subject: Re: [PATCH] futex: Set USER_DS for the futex_detect_cmpxchg() test From: Andy Lutomirski X-Mailer: iPhone Mail (16A366) In-Reply-To: Date: Fri, 28 Sep 2018 14:08:10 -0700 Cc: Max Filippov , Martin Schwidefsky , Geert Uytterhoeven , Andrew Lutomirski , X86 ML , Peter Zijlstra , Ingo Molnar , Darren Hart , LKML , linux-s390 , Heiko Carstens , fthain@telegraphics.com.au Content-Transfer-Encoding: quoted-printable Message-Id: References: <74fb6ce22f62e0fb48b91ca9918b74cedbcecaf1.1538096323.git.luto@kernel.org> <20180928103726.07761672@mschwideX1> <0B38810F-3E22-45A8-9D5D-EDEABD214148@amacapital.net> <20180928165321.0ddaf948@mschwideX1> To: Thomas Gleixner Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Sep 28, 2018, at 1:26 PM, Thomas Gleixner wrote: >=20 >> On Fri, 28 Sep 2018, Max Filippov wrote: >>=20 >>> On Fri, Sep 28, 2018 at 11:02 AM, Andy Lutomirski w= rote: >>> There may be a much nicer solution. Unless I missed something, only >>> mips and xtensa even have the possibility of cmpxchg being missing. >>> We could just make those arches supply a futex-detecting helper. >>=20 >> In case of xtensa availability of cmpxchg is known at build time. >=20 > That makes it even simpler. Could you provide a patch which selects > CONFIG_HAVE_FUTEX_CMPXCHG for the right set of CPUs please? >=20 >=20 I think that=E2=80=99s the wrong approach, since it won=E2=80=99t cover mips= . How about adding this to mips and xtensa only: static inline void arch_have_futex_cmpxchg(void) {...}; #define arch_have_futex_cmpxchg arch_have_futex_cmpxchg And getting rid of the config option.=