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=-5.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 AAA33C33C8C for ; Mon, 6 Jan 2020 18:55:15 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 28B33208C4 for ; Mon, 6 Jan 2020 18:55:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b="ZMVxUZ9J" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 28B33208C4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=zytor.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 47s4Sw3yg4zDqGM for ; Tue, 7 Jan 2020 05:55:12 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=zytor.com (client-ip=198.137.202.136; helo=mail.zytor.com; envelope-from=hpa@zytor.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=zytor.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=zytor.com header.i=@zytor.com header.b="ZMVxUZ9J"; dkim-atps=neutral X-Greylist: delayed 3192 seconds by postgrey-1.36 at bilbo; Tue, 07 Jan 2020 05:53:23 AEDT Received: from mail.zytor.com (terminus.zytor.com [198.137.202.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 47s4Qq6fVPzDq9l for ; Tue, 7 Jan 2020 05:53:23 +1100 (AEDT) Received: from carbon-x1.hos.anvin.org ([IPv6:2601:646:8600:3280:1098:42a1:36db:233c]) (authenticated bits=0) by mail.zytor.com (8.15.2/8.15.2) with ESMTPSA id 006HxLts2985803 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Mon, 6 Jan 2020 09:59:21 -0800 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 006HxLts2985803 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2019122001; t=1578333565; bh=uFGtgLW/eUGZosJDUZ4/JsFg07VyLBe7Sl07+mpDDgQ=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=ZMVxUZ9JlU6up34Nb4pGcpMjDZpUuWN8ck9Y4jYgVb+4bZERRqJiFzIJhbIfziB1k ZNW7gtaTuWxOa78mC5Z+zWvyvNL35mkSsEZQpPBJS0ncqNieAs6YCfbCKRbkrwQtVp RcNn3KAZoKEYAi4ef6eQLTWSuxUbKuM7RXuWfbUO5ZflxcLL1hn2UBbGPOSqDE+xOY wijrfyuPLvBiBZoiKnCdjHJ9U/s6x0xqbbT7g3nNy9Gk9o9TiqnutL8djSuCUX49Qi Oy4XDW1jzUdxSDSG813dTCGe2xdRD1rCCDjOpb+PwCTaq1SfwtxgOn+n2Mp0OYFc4L +gnXlUsMkLtVw== Subject: Re: [PATCH v3 02/22] compat: provide compat_ptr() on all architectures To: Arnd Bergmann , "James E.J. Bottomley" , "Martin K. Petersen" References: <20200102145552.1853992-1-arnd@arndb.de> <20200102145552.1853992-3-arnd@arndb.de> From: "H. Peter Anvin" Message-ID: Date: Mon, 6 Jan 2020 09:59:16 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <20200102145552.1853992-3-arnd@arndb.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Carstens , linux-mips@vger.kernel.org, "James E.J. Bottomley" , Paul Mackerras , sparclinux@vger.kernel.org, Will Deacon , linux-s390@vger.kernel.org, Paul Burton , Helge Deller , x86@kernel.org, Christian Borntraeger , Ingo Molnar , oprofile-list@lists.sf.net, Catalin Marinas , James Hogan , Robert Richter , Vasily Gorbik , Borislav Petkov , Thomas Gleixner , linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org, Ralf Baechle , linuxppc-dev@lists.ozlabs.org, "David S. Miller" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On 2020-01-02 06:55, Arnd Bergmann wrote: > In order to avoid needless #ifdef CONFIG_COMPAT checks, > move the compat_ptr() definition to linux/compat.h > where it can be seen by any file regardless of the > architecture. > > Only s390 needs a special definition, this can use the > self-#define trick we have elsewhere. > > Signed-off-by: Arnd Bergmann > --- > arch/arm64/include/asm/compat.h | 17 ----------------- > arch/mips/include/asm/compat.h | 18 ------------------ > arch/parisc/include/asm/compat.h | 17 ----------------- > arch/powerpc/include/asm/compat.h | 17 ----------------- > arch/powerpc/oprofile/backtrace.c | 2 +- > arch/s390/include/asm/compat.h | 6 +----- > arch/sparc/include/asm/compat.h | 17 ----------------- > arch/x86/include/asm/compat.h | 17 ----------------- > include/linux/compat.h | 18 ++++++++++++++++++ > 9 files changed, 20 insertions(+), 109 deletions(-) > For x86: Reviewed-by: H. Peter Anvin It still suffers from the zero-one-infinity rule failure of the compat architecture as a whole, but that is a very different problem. In this case "compat" is obviously meaning "a 32-on-64 ABI" and simply centralizes a common API, which is a Good Thing[TM]. -hpa