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.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS 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 96B81C433DF for ; Fri, 21 Aug 2020 20:15:57 +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 60DDE20735 for ; Fri, 21 Aug 2020 20:15:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="vTzwWrgR"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="Jsm0Siwj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 60DDE20735 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org 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:Mime-Version:References:In-Reply-To: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=ftxMNeyh2EoypCBn/zAWwKH/EEjuvS9GKUUlUV9JU3s=; b=vTzwWrgR6dqTLXyHOaNfoatR3 pybAJ6WLRkuU84sZHkeQwA/t9AfXwoNGw5kVgXJa3tqPP9w8w+/3IKFce0khOcZ9+wDHPSM0uRF4D hnAIGwtJrh1TwDVZWgnK2AjIBlk5FcbZEg9wfD/stJPW0KXMrDhPDQA+BIaOH/9+FpHOku7Ix0cMu N/qKzEpvwdHHSCFGyJg1yihegiK3DC9IUhoLYj8ho4gH3H06cOQaH+1jUZaAmq3iLhWx6hzhKiJHM SsKJn0LZ9mudZDqMVirx1H5Bv3gZnFFKGurmEEpgj3AnBP1hOl14zS9t/bom1rbp3oIsg3ZsqnyLZ z//ZxVCcg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k9DQh-0000wG-Po; Fri, 21 Aug 2020 20:14:27 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k9DQe-0000s7-84 for linux-arm-kernel@lists.infradead.org; Fri, 21 Aug 2020 20:14:25 +0000 Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (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 AEE02207CD; Fri, 21 Aug 2020 20:14:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598040863; bh=GIZSv+n11Fktxzw4XltsqI4m6vkx8INTDFrt/8602bc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Jsm0SiwjyjLdaC9x30KSU052qwlMNfDxNbp/v2GTQ314YIOfB5mn0PNyo3a5HyfAT 4sANyMs+iVHal+mEKYqfPdgxvyiLDgv11V+6Lbb/SF/R9PYsMREn8gTcrgWQaSROWb u9xVLheHbRwcaiQ0OLEd29483GS1ksAQUXUfNqp0= Date: Fri, 21 Aug 2020 13:14:22 -0700 From: Andrew Morton To: Nicholas Piggin Subject: Re: [PATCH v6 05/12] mm: HUGE_VMAP arch support cleanup Message-Id: <20200821131422.110abb1a0c0b6a9d378b0e48@linux-foundation.org> In-Reply-To: <20200821151216.1005117-6-npiggin@gmail.com> References: <20200821151216.1005117-1-npiggin@gmail.com> <20200821151216.1005117-6-npiggin@gmail.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200821_161424_406703_0FAA9F9A X-CRM114-Status: GOOD ( 19.04 ) 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, "H. Peter Anvin" , Will Deacon , Catalin Marinas , x86@kernel.org, linux-kernel@vger.kernel.org, Christophe Leroy , Christoph Hellwig , linux-mm@kvack.org, Zefan Li , Borislav Petkov , Jonathan Cameron , Thomas Gleixner , linuxppc-dev@lists.ozlabs.org, Ingo Molnar , 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 Sat, 22 Aug 2020 01:12:09 +1000 Nicholas Piggin wrote: > This changes the awkward approach where architectures provide init > functions to determine which levels they can provide large mappings for, > to one where the arch is queried for each call. > > This removes code and indirection, and allows constant-folding of dead > code for unsupported levels. > > This also adds a prot argument to the arch query. This is unused > currently but could help with some architectures (e.g., some powerpc > processors can't map uncacheable memory with large pages). > > --- a/arch/arm64/include/asm/vmalloc.h > +++ b/arch/arm64/include/asm/vmalloc.h > @@ -1,4 +1,12 @@ > #ifndef _ASM_ARM64_VMALLOC_H > #define _ASM_ARM64_VMALLOC_H > > +#include > + > +#ifdef CONFIG_HAVE_ARCH_HUGE_VMAP > +bool arch_vmap_p4d_supported(pgprot_t prot); > +bool arch_vmap_pud_supported(pgprot_t prot); > +bool arch_vmap_pmd_supported(pgprot_t prot); > +#endif Moving these out of generic code and into multiple arch headers is unfortunate. Can we leave them in include/linux/somewhere? And remove the ifdefs, if so inclined - they just move the build error from link-time to compile-time, and such an error shouldn't occur! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel