Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp21727262ybl; Mon, 6 Jan 2020 10:01:44 -0800 (PST) X-Google-Smtp-Source: APXvYqz+kmKaQvIl3ylOfcKr2Djwf5o3LZdEpY+aDn0Y4OunVlzgvxcHwO7d1Z4jR2Rtbttao2Q1 X-Received: by 2002:aca:b984:: with SMTP id j126mr6288716oif.174.1578333704120; Mon, 06 Jan 2020 10:01:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578333704; cv=none; d=google.com; s=arc-20160816; b=I4Sm00QlXR/rCgCGFb/pkKGe6jQJJh76VLV8Jr9CSjDYxNawyXJeDBYxwxZX6zfsW7 xOlb9ESpl3Uhe0pMfAUruMJx2FKhFP0LnECqjTGSto/xgru6Im116nGJ0Y05q1IyX6l+ ahGkNTg/4Sf1QA3hD4CZ7tCFEyMbltjTd2oI1/4JndaTYrfbYziBaTzeculGiAxSnzIN PcBb4thvVTOgAPlmsHjGgUjZkKx1VzRdOYT1lXhBm1/8bNQp6l1hipF5Q3Z7gjJROtqQ X5GX0CA/TAITg3Zc5slAvY5bKKrT7E4jVTn4Bc9ixWNR13TFfytQt1QEIJjkR4noJ64L 3Jig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature:dkim-filter; bh=uFGtgLW/eUGZosJDUZ4/JsFg07VyLBe7Sl07+mpDDgQ=; b=ZAGNBr7t6BtqjNl/Sg6og8z2b5ZY7xoOlOeTYtKS9AKcqZby3DR1O8hAykrJJgXrbf omkCVcjCKRRNU2A0RFM2aJTnrs1HiyEgzep3CpaWPEsU9PLMzXndX5sVxtB/gLRjyngK AjoIWGcg7NVF9F4/cTSEAsiE7mHj3jI6Nw6ZMfkSq5mVP+m2Rp2mEiP9woi3kbVZxOoD EWsV+p70z9yPmRasTOdlfK3uMAUfa56wEbgUGh/FSgOtIkOCKm/a88nZebxQfJ8CyWHB L5OwigPfsfwfeFmHvLpgKVa7/5WmzZxuKtpLlkPKTHsfEPeLd25fxRCZYgykj8RgLfpT 1eyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zytor.com header.s=2019122001 header.b=ZMVxUZ9J; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l14si26164057oic.222.2020.01.06.10.01.30; Mon, 06 Jan 2020 10:01:44 -0800 (PST) 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=@zytor.com header.s=2019122001 header.b=ZMVxUZ9J; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726683AbgAFSAq (ORCPT + 99 others); Mon, 6 Jan 2020 13:00:46 -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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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