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.3 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 74D7BC33C8C for ; Mon, 6 Jan 2020 18:00:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 45293206E6 for ; Mon, 6 Jan 2020 18:00:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b="ZMVxUZ9J" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726641AbgAFSAp (ORCPT ); Mon, 6 Jan 2020 13:00:45 -0500 Received: from terminus.zytor.com ([198.137.202.136]:41273 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726448AbgAFSAp (ORCPT ); Mon, 6 Jan 2020 13:00:45 -0500 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" Cc: Catalin Marinas , Will Deacon , Ralf Baechle , Paul Burton , James Hogan , "James E.J. Bottomley" , Helge Deller , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Robert Richter , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , "David S. Miller" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, oprofile-list@lists.sf.net, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org 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 Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org 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