Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1594015imm; Fri, 28 Sep 2018 23:33:22 -0700 (PDT) X-Google-Smtp-Source: ACcGV61zHSZ0o3s42H7S/R15pdrEJiPW/8xxrU1r/6HO9K1HwjCU/VwNsNEPS2tk02GyKj4Umylu X-Received: by 2002:a63:4a5a:: with SMTP id j26-v6mr1745516pgl.168.1538202802715; Fri, 28 Sep 2018 23:33:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538202802; cv=none; d=google.com; s=arc-20160816; b=p4LewF9owhWcDVS0e/zK7fKac+wd00/J3RzYgnbVvLdzQEwTeGoLhtZlM667F9QdCP k0nMEefqO4fnzrRknCmkWwDP5DCjC1l/8N0mvyyn1ryMgJ6jybBNuJnSMHFLLKsej00I yymhlMjXZbX9c8ZVohZSkL8tAhxZMjS+uPxkAIjKBqLVn+hM/OqiHFxGI/SKRqY8cRc9 WHTcIz+sNKx5RS1oo1Bb7I572+GUTyuk8/UVQGrn2VirBmC5TgKx5r8LGZLzaBJ9Cowv CfF7Wh2nOPg5s83VYmCgiA/VFV9cDq0MoDzl2qYJyBmBoLqheHj7Ljqkx80ONHMG1NBe 4iMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=YP3KoTJ+tTwFj5woHEXY/gJNU7uumAik6JMdkOOg7hA=; b=ZHgl2kk5ZFbRR1PDYlsN/ftC9j1an7GPgq5eyGYf68vMcKQQGcGF93/xmHb+AghioE z0bbPynkVSkFD4JX1EX2amSkFN2KGmxnZPE4npe7ib200gbb7uLN2MBmrCmK3BRngNwK um7+QWx0jNtJqZ92ZMnGgw7OJlNjmLmQezMYkO1+uWsfPuMbeGUTztA4tTarxYmaPv3C woHcug6HDv4TDh57Gi6JvIhYNFVAod7czsD5i6ewUQd2GhvfUtcmnUg3qPULsizS1yUd FOp2ZoBM++t7tik0sdJhH1b3Y0R7WfFPji6vwKiGuCw3D3onpP3mHd2Z18Mwnj8oskTZ tMWA== ARC-Authentication-Results: i=1; mx.google.com; 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 x6-v6si3158128pfd.219.2018.09.28.23.33.06; Fri, 28 Sep 2018 23:33:22 -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; 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 S1727533AbeI2NAO (ORCPT + 99 others); Sat, 29 Sep 2018 09:00:14 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:55513 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727393AbeI2NAN (ORCPT ); Sat, 29 Sep 2018 09:00:13 -0400 Received: from p5492e4c1.dip0.t-ipconnect.de ([84.146.228.193] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1g68oB-0001N5-RJ; Sat, 29 Sep 2018 08:32:56 +0200 Date: Sat, 29 Sep 2018 08:32:55 +0200 (CEST) From: Thomas Gleixner To: Max Filippov cc: Andy Lutomirski , Martin Schwidefsky , Geert Uytterhoeven , Andrew Lutomirski , X86 ML , Peter Zijlstra , Ingo Molnar , Darren Hart , LKML , linux-s390 , Heiko Carstens , fthain@telegraphics.com.au Subject: Re: [PATCH] futex: Set USER_DS for the futex_detect_cmpxchg() test In-Reply-To: Message-ID: References: <74fb6ce22f62e0fb48b91ca9918b74cedbcecaf1.1538096323.git.luto@kernel.org> <20180928103726.07761672@mschwideX1> <0B38810F-3E22-45A8-9D5D-EDEABD214148@amacapital.net> <20180928165321.0ddaf948@mschwideX1> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-1766059854-1538202775=:1432" X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1766059854-1538202775=:1432 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT On Fri, 28 Sep 2018, Max Filippov wrote: > On Fri, Sep 28, 2018 at 2:08 PM, Andy Lutomirski wrote: > >> On Sep 28, 2018, at 1:26 PM, Thomas Gleixner wrote: > >> > >>> On Fri, 28 Sep 2018, Max Filippov wrote: > >>> > >>>> On Fri, Sep 28, 2018 at 11:02 AM, Andy Lutomirski wrote: > >>>> 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. > >>> > >>> In case of xtensa availability of cmpxchg is known at build time. > >> > >> That makes it even simpler. Could you provide a patch which selects > >> CONFIG_HAVE_FUTEX_CMPXCHG for the right set of CPUs please? > >> > >> > > > > I think that’s the wrong approach, since it won’t 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. > > I'd rather do that, given that defining Kconfig entries that describe > parts of xtensa configuration is somewhat awkward and redundant. Fair enough. Thanks, tglx --8323329-1766059854-1538202775=:1432--