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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE6CECFB420 for ; Sat, 5 Oct 2024 17:14:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4D70F6B034A; Sat, 5 Oct 2024 13:14:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4873E6B034B; Sat, 5 Oct 2024 13:14:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 34FE66B034C; Sat, 5 Oct 2024 13:14:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 13D4C6B034A for ; Sat, 5 Oct 2024 13:14:07 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 8614E1606AD for ; Sat, 5 Oct 2024 17:14:06 +0000 (UTC) X-FDA: 82640196492.18.3F8D184 Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) by imf19.hostedemail.com (Postfix) with ESMTP id 8E8091A0007 for ; Sat, 5 Oct 2024 17:14:04 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=linaro.org header.s=google header.b=I+NGdETe; spf=pass (imf19.hostedemail.com: domain of richard.henderson@linaro.org designates 209.85.215.180 as permitted sender) smtp.mailfrom=richard.henderson@linaro.org; dmarc=pass (policy=none) header.from=linaro.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1728148313; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=d+vL4rnKAcRWy/BUE6jAqCKdidayjqwnsDQnh1rx2zc=; b=O2CXnKfnyi67s6x47Ha4uNjtYrJuVzlMjWZ7MHARQp+LKT1jDuc3gdJeAy5hd9l+m81LMF JrTjgkIaCogVkSWJaajPe2bOO0YMhIW69m4SGVbnGq2/adpgShZ/a0z7yDf0x7eFQV3wj8 cAO5Tjc8pOd1rN8uLwzr/3enjt3RY6Q= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1728148313; a=rsa-sha256; cv=none; b=kj9oIhsrx3C4Blb8gtoNVupfKLgEAyswRdwi/ryJDwcplGuGVLauIaLkR1BhPSZYV/8/za sgvTkuyIgUcvMIH/c/pYvIq6VMv6hna2GpuzETvl4arOTtxQ0RjbayriL0lLMT4ZuPqcz8 o2ZxD8PMBz5rH51kaSK9PlIlUSgJBew= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=linaro.org header.s=google header.b=I+NGdETe; spf=pass (imf19.hostedemail.com: domain of richard.henderson@linaro.org designates 209.85.215.180 as permitted sender) smtp.mailfrom=richard.henderson@linaro.org; dmarc=pass (policy=none) header.from=linaro.org Received: by mail-pg1-f180.google.com with SMTP id 41be03b00d2f7-7e6d04f74faso2634261a12.1 for ; Sat, 05 Oct 2024 10:14:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728148443; x=1728753243; darn=kvack.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=d+vL4rnKAcRWy/BUE6jAqCKdidayjqwnsDQnh1rx2zc=; b=I+NGdETeKuQLSHFCztha2OLIYlq9cvYqPoxzYgaUdVq9CidHJ4O+3Ua8GPhV34qne2 Y/4KISFD+mhGfz+T3c4LI7pYqEaz35sGq+ahUV6K1R2gqVTCyfoY43iy9UbY0SYW+3pt vnSyTPj1kr/X3iYdSSpZjM+ZMNr02NjsXzI85CHSxD/IOVufjgXTLYuj/+Jx5waN3UyD OCtSZcC/FB4YQjrSiV1X3MLtFvpcJBoovAO1rQ23GAACrmSBiVmNp2Qq73k7OWERbw/6 0ZMGkcU0Lt7FYLU0B7thwIkp1R8GOm46mGzcxUJXtnpkOldk8LS0vkT0kDyD3dxosbD3 JcYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728148443; x=1728753243; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=d+vL4rnKAcRWy/BUE6jAqCKdidayjqwnsDQnh1rx2zc=; b=rApPjyDiJM3TGlNactiE3+xdhNpGsH/S/lIL4wZZa1fsaBQgzjJeS8u/wlGX1duJ2g w0XRSoxnI9E3b4JdQ4gPx/xkhVaFhLPudsINO1jgX3sMFhLNWrKWNnPfe4h+36+VeiLk 8rkQTZBnVxVVPHQ/FA5BTJaquAhJJnN04LgeeATvQHihaqvSkuUH3PWKbDgJO+skvUnK i8uyR6NwOtr8Xzw9QExowG/DNVYCiyjRlTLYQsWg6aiOo8tz3y2hT8L4NBZW0Una6SNg dfn1YynWC3KfAIOyw+e28GzoPCy6Amn+PogoNNv+SbVqI3sgZfogIUXcVUXu7r/SrxR1 ei6g== X-Forwarded-Encrypted: i=1; AJvYcCXHjMKwEiufTKXEG7FnGEe0PZz48UV28qVJHwxNJmdYsRpyk+hNULnTdukXxBolvNeD9kkez7sqow==@kvack.org X-Gm-Message-State: AOJu0YwuBciOL5JtGV/B/7BwxYpsNORhNugjIljYPx5pfzzD5x9jcjN8 gKFMpkx5e0difNyJZoI0h/UtlkQ74BYIfOIj68MF3p5phImH0P9pIPK7RHKBiCI= X-Google-Smtp-Source: AGHT+IFyeSaZ/mX0gHS9Rgt1KvLjRdPDDqOZ19D3tlNlq221lO03ztxwxmd18OQJDpTQCgw1WknJ4g== X-Received: by 2002:a05:6a20:9144:b0:1c6:8c89:88c9 with SMTP id adf61e73a8af0-1d6d3ae1752mr16549274637.18.1728148443249; Sat, 05 Oct 2024 10:14:03 -0700 (PDT) Received: from [192.168.0.4] (174-21-81-121.tukw.qwest.net. [174.21.81.121]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71df0d7cfa4sm1697426b3a.196.2024.10.05.10.14.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 05 Oct 2024 10:14:02 -0700 (PDT) Message-ID: <24761ba0-99bc-4637-a76c-f29be10a1753@linaro.org> Date: Sat, 5 Oct 2024 10:13:49 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/5] asm-generic: use asm-generic/mman-common.h on mips and xtensa To: Arnd Bergmann , linux-mm@kvack.org Cc: Arnd Bergmann , "Jason A. Donenfeld" , Alexander Viro , Alexandre Torgue , Andreas Larsson , Andrew Morton , Ard Biesheuvel , Christian Brauner , Christoph Hellwig , Christophe Leroy , Damien Le Moal , David Hildenbrand , Greg Ungerer , Helge Deller , Kees Cook , "Liam R . Howlett" , Lorenzo Stoakes , Matt Turner , Max Filippov , Michael Ellerman , Michal Hocko , Nicholas Piggin , Thomas Bogendoerfer , Vladimir Murzin , Vlastimil Babka , linux-stm32@st-md-mailman.stormreply.com, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-arch@vger.kernel.org References: <20240925210615.2572360-1-arnd@kernel.org> <20240925210615.2572360-4-arnd@kernel.org> Content-Language: en-US From: Richard Henderson In-Reply-To: <20240925210615.2572360-4-arnd@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 8E8091A0007 X-Stat-Signature: hzjib1rzt4fugfqyj7c7ox8tueu58r71 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csqRutv1ZQM0VLsz8d2uUyHrk1rzJOwXww+nfHk3u3QipHzEMxohKALwjTpFajG+YVzuLWy0L//2ppoLKMbgaP8WeAFVgdRDnbl6TbqsIQBuPf2jZF3EXEgidvxofTa+RmWXz8X5Jt+3i3QWYUC7kX0n94Ggb/76gldRVFRhHtkUeUPUIhwtCqlUL8qMWP0kQcGajZY9ArJpNnxFXc92lyK+P4f9jvnUYnaYBISdHOtphvucVLP1hHopcQ2lWEVHJwGFtkeCra0TKUduqs5xQ9o7izEj+grLFTe8u3Yr121oq78 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On 9/25/24 14:06, Arnd Bergmann wrote: > From: Arnd Bergmann > > mips and xtensa have almost the same asm/mman.h, aside from an > unintentional difference in MAP_UNINITIALIZED that has no effect in > practice. > > Now that the MAP_* flags are moved out of asm-generic/mman-common.h, > the only difference from the its contents and the mips/xtensa version > is the PROT_SEM definition that is one bit off from the rest. > > Make the generic PROT_SEM definition conditional on it already being > defined and then include that header from both architectures, to > remove the bulk of the contents. > > Signed-off-by: Arnd Bergmann > --- > arch/alpha/include/uapi/asm/mman.h | 2 + > arch/mips/include/uapi/asm/mman.h | 65 +------------------------ > arch/parisc/include/uapi/asm/mman.h | 3 ++ > arch/xtensa/include/uapi/asm/mman.h | 66 +------------------------- > include/uapi/asm-generic/mman-common.h | 2 + > 5 files changed, 9 insertions(+), 129 deletions(-) > > diff --git a/arch/alpha/include/uapi/asm/mman.h b/arch/alpha/include/uapi/asm/mman.h > index 8946a13ce858..1f1c03c047ce 100644 > --- a/arch/alpha/include/uapi/asm/mman.h > +++ b/arch/alpha/include/uapi/asm/mman.h > @@ -5,7 +5,9 @@ > #define PROT_READ 0x1 /* page can be read */ > #define PROT_WRITE 0x2 /* page can be written */ > #define PROT_EXEC 0x4 /* page can be executed */ > +#ifndef PROT_SEM /* different on mips and xtensa */ > #define PROT_SEM 0x8 /* page may be used for atomic ops */ > +#endif Surely not conditional within arch/alpha/... > --- a/include/uapi/asm-generic/mman-common.h > +++ b/include/uapi/asm-generic/mman-common.h > @@ -10,7 +10,9 @@ > #define PROT_READ 0x1 /* page can be read */ > #define PROT_WRITE 0x2 /* page can be written */ > #define PROT_EXEC 0x4 /* page can be executed */ > +#ifndef PROT_SEM /* different on mips and xtensa */ > #define PROT_SEM 0x8 /* page may be used for atomic ops */ > +#endif ... only conditional here in asm-generic. r~