From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8320C43382 for ; Fri, 28 Sep 2018 08:42:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A0A2B2170E for ; Fri, 28 Sep 2018 08:42:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A0A2B2170E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729286AbeI1PFX (ORCPT ); Fri, 28 Sep 2018 11:05:23 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:53963 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728868AbeI1PFX (ORCPT ); Fri, 28 Sep 2018 11:05:23 -0400 Received: from hsi-kbw-5-158-153-52.hsi19.kabel-badenwuerttemberg.de ([5.158.153.52] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1g5oM9-0003gY-5v; Fri, 28 Sep 2018 10:42:37 +0200 Date: Fri, 28 Sep 2018 10:42:36 +0200 (CEST) From: Thomas Gleixner To: Martin Schwidefsky cc: Geert Uytterhoeven , Andy Lutomirski , the arch/x86 maintainers , Peter Zijlstra , Ingo Molnar , Darren Hart , Linux Kernel Mailing List , linux-s390 , Heiko Carstens , Finn Thain Subject: Re: [PATCH] futex: Set USER_DS for the futex_detect_cmpxchg() test In-Reply-To: <20180928103726.07761672@mschwideX1> Message-ID: References: <74fb6ce22f62e0fb48b91ca9918b74cedbcecaf1.1538096323.git.luto@kernel.org> <20180928103726.07761672@mschwideX1> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 28 Sep 2018, Martin Schwidefsky wrote: > On Fri, 28 Sep 2018 09:12:10 +0200 > Geert Uytterhoeven wrote: > > I don't know if that has happened, and whether it would work on s390 now. > > commit 03b8c7b623c80af264c4c8d6111e5c6289933666 > Author: Heiko Carstens > Date: Sun Mar 2 13:09:47 2014 +0100 > > futex: Allow architectures to skip futex_atomic_cmpxchg_inatomic() test > > If an architecture has futex_atomic_cmpxchg_inatomic() implemented and there > is no runtime check necessary, allow to skip the test within futex_init(). > > This allows to get rid of some code which would always give the same result, > and also allows the compiler to optimize a couple of if statements away. > > Signed-off-by: Heiko Carstens > Cc: Finn Thain > Cc: Geert Uytterhoeven > Link: http://lkml.kernel.org/r/20140302120947.GA3641@osiris > Signed-off-by: Thomas Gleixner > > > Heiko created the CONFIG_HAVE_FUTEX_CMPXCHG to get around this issue. > We just skip the runtime check as well as arc, m68k and sh. Not sure > about xtensa, the set it config option only for !MMU. Duh. grep would have told me. -ENOTENOUGHCOFFEE Thanks, tglx