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=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 CE19BC433DF for ; Fri, 26 Jun 2020 10:34:55 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 8D8E320768 for ; Fri, 26 Jun 2020 10:34:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Xb3UToke"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="c+irviIo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8D8E320768 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=agE2yXlmWIyQnICiPRT+3zxMNcB9AKHOOfv7nSw1mUI=; b=Xb3UTokedRy8QO+EV2vLKXw0e lflQZQPTRFZYtgaid/LJQC1QGAQfZQEMJgKbaZDYQaBvy1nyMeENdVkkG7p2QwsRK0lNGGeYWO28z hVgEwE7p1oCsbY13TqZED8a0vBXsBrNDA8ossJiA+fI4ZgzpB8VVQ/16f+oNszr/RXfCZfnue+Ub0 P2MeTQPJyuAM6OKejAYOezzQrAk/UJ11rzSr/8bKemV9vNhI9ejmwPDnBTGebTRUZDGFgOj8UABbt TGBBG0qYxVl4c6OEExsTPGa7itXVr7YKPZIsACSfYKJTGRwHL+5Dg7wwb6oDAsC60FDtLcXMU1o5U IxThUok/Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jolfA-0005zN-DC; Fri, 26 Jun 2020 10:32:52 +0000 Received: from casper.infradead.org ([90.155.50.34]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jolND-0000YK-W8 for linux-arm-kernel@merlin.infradead.org; Fri, 26 Jun 2020 10:14:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=N7Z8VjowFZFuvczFqY35p435OO0vlHtLn2bKbwpchYw=; b=c+irviIozD2b84+pq2XkgvuriC fv3e2mhVjcdbiWnSeeFKLR0cGWjGdeE+K77sEu08DzQlZbmF4cLFcsTLuazEvDBpjY5imv21EY+lk WwXvcC4/ZRIxSBJruY0aNOGtF/3XEBNlYs01EB7D2JkF8P/roKMtz54oYmdxTr82w+87zIf5r0H3K A/ewAvctFxm8vRSWj/0pKBCeahGfaZv01sPWKTnwbMf9qhGVdtg9LJzYwKiNOJdkfgZIRDKZYramv WDbGizUTMnkH2z1WWxF5NxPHdJlIv3wB9g0bjN8+PA+TlQROU1XpUKgduhTtDkRqoyCGGqyZyyHzZ h3rHZT+A==; Received: from mail.kernel.org ([198.145.29.99]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1joVlI-0002E2-NG for linux-arm-kernel@lists.infradead.org; Thu, 25 Jun 2020 17:34:11 +0000 Received: from gaia (unknown [2.26.170.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B952320789; Thu, 25 Jun 2020 17:34:04 +0000 (UTC) Date: Thu, 25 Jun 2020 18:34:02 +0100 From: Catalin Marinas To: Andrew Morton Subject: Re: [PATCH v5 11/25] mm: Introduce arch_calc_vm_flag_bits() Message-ID: <20200625173344.GF14812@gaia> References: <20200624175244.25837-1-catalin.marinas@arm.com> <20200624175244.25837-12-catalin.marinas@arm.com> <20200624113611.2cf12da3a325d03a862c0adf@linux-foundation.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200624113611.2cf12da3a325d03a862c0adf@linux-foundation.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200625_183409_135512_46ED6E39 X-CRM114-Status: GOOD ( 19.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, Szabolcs Nagy , Andrey Konovalov , Kevin Brodsky , Peter Collingbourne , linux-mm@kvack.org, Vincenzo Frascino , Will Deacon , Dave P Martin , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jun 24, 2020 at 11:36:11AM -0700, Andrew Morton wrote: > On Wed, 24 Jun 2020 18:52:30 +0100 Catalin Marinas wrote: > > From: Kevin Brodsky > > Similarly to arch_calc_vm_prot_bits(), introduce a dummy > > arch_calc_vm_flag_bits() invoked from calc_vm_flag_bits(). This macro > > can be overridden by architectures to insert specific VM_* flags derived > > from the mmap() MAP_* flags. > > > > ... > > > > --- a/include/linux/mman.h > > +++ b/include/linux/mman.h > > @@ -74,13 +74,17 @@ static inline void vm_unacct_memory(long pages) > > } > > > > /* > > - * Allow architectures to handle additional protection bits > > + * Allow architectures to handle additional protection and flag bits > > */ > > > > #ifndef arch_calc_vm_prot_bits > > #define arch_calc_vm_prot_bits(prot, pkey) 0 > > #endif > > > > +#ifndef arch_calc_vm_flag_bits > > +#define arch_calc_vm_flag_bits(flags) 0 > > +#endif > > It would be helpful to add a comment specifying which arch header file > is responsible for defining arch_calc_vm_flag_bits. Because in the > past we've messed this sort of thing up and had different architectures > define things in different header files, resulting in build issues as > code evolves. I'll add a comment that the overriding definitions need to go in the arch asm/mman.h file. Thanks. -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel