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=-3.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,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 2C431C433E1 for ; Fri, 21 Aug 2020 22:45:57 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E06C42067C for ; Fri, 21 Aug 2020 22:45:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Aaem4Vn0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E06C42067C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 79D618D0091; Fri, 21 Aug 2020 18:45:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 74D358D004C; Fri, 21 Aug 2020 18:45:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 63B708D0091; Fri, 21 Aug 2020 18:45:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0041.hostedemail.com [216.40.44.41]) by kanga.kvack.org (Postfix) with ESMTP id 4A3188D004C for ; Fri, 21 Aug 2020 18:45:56 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 11F9E824556B for ; Fri, 21 Aug 2020 22:45:56 +0000 (UTC) X-FDA: 77176059912.19.rat10_3a186742703c Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin19.hostedemail.com (Postfix) with ESMTP id DA4B61ACC2B for ; Fri, 21 Aug 2020 22:45:55 +0000 (UTC) X-HE-Tag: rat10_3a186742703c X-Filterd-Recvd-Size: 5114 Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by imf06.hostedemail.com (Postfix) with ESMTP for ; Fri, 21 Aug 2020 22:45:55 +0000 (UTC) Received: by mail-pg1-f195.google.com with SMTP id i10so1675046pgk.1 for ; Fri, 21 Aug 2020 15:45:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:subject:to:cc:references:in-reply-to:mime-version :message-id:content-transfer-encoding; bh=XRteHtv7uQmPq//ewuwrb7IZate8ro17vyeajkupG2I=; b=Aaem4Vn0bTEhViBFnc9tNsPPZfZuxBSub2f1nuc4MmLrKJfehNNHC9FP58+Q99TpoJ CpyvdmR758FAbXUk+bZELWHzl0ZBJJHNrJ0o1OiFr5aEhnPiK7JAYnBYHuFlc87PBxMw 5CkKUufHHUze0EbfKk5GkR4Sze0bxy10EoqSvehwLcZJivmtaCviba+jHzYG29+4F1hR kqoGu7zsi8jiLTa8Ca1bap7yXXxhgWrpwIC4iek8D8rNgLuKpNWAQMCj6+Sri3WvOUGr ZpkrJVq6T11xVJA0tVsLBKFfIsFV+B/n1jrQ+SlwybFHe3e4OAiIp0iV880jRDPNyHar P9TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:subject:to:cc:references:in-reply-to :mime-version:message-id:content-transfer-encoding; bh=XRteHtv7uQmPq//ewuwrb7IZate8ro17vyeajkupG2I=; b=PAiO1i0toS9SjGzqWE7W1lK+Qo7HYm9KojtVWkhGzp+i2rYkJvnXpsILLRtg4Afuxu AoVMn4EFwZoVDhnIFjSlhslqsKRosOMg0ihZnMMDKo0JmrnBhWk76FO5ETh6kpfLhTSN 61lRUsroTNGYqjEliXJz2ZYpNEwUZuD+GwRiS2h2IbJX35+Z0wm6pmi/BC8IjjR/ln+s u10fqmwjLiTwggjWAmRYpwDzn62JSa0ug8GXGTqKBXVjxqYfnKtKQlhonuqHdVGE0Qgq pOPWnMk+zMFS/iKoK+QZ8XH+42GNZJS4ClhTHbN0d+I6i7o3Lp/9eaMUcCBmfQ7Tx3a8 sBVA== X-Gm-Message-State: AOAM531ePWRsQqfk3trFD/F3VWAw0ymI+5VoKl9UcMQ/0sU6l0iDpe+A RTTFImuVH5lRbidqCIvLo2I= X-Google-Smtp-Source: ABdhPJy7krGSqdemncjBBCsDGsMdylWo6zM9qjg4SD8PzW/+V58PKpTZD+S3JHXtmZJ0AJ7MWzK3TQ== X-Received: by 2002:a62:7acb:: with SMTP id v194mr4142526pfc.302.1598049954288; Fri, 21 Aug 2020 15:45:54 -0700 (PDT) Received: from localhost (61-68-212-105.tpgi.com.au. [61.68.212.105]) by smtp.gmail.com with ESMTPSA id w130sm3564073pfd.104.2020.08.21.15.45.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Aug 2020 15:45:53 -0700 (PDT) Date: Sat, 22 Aug 2020 08:45:48 +1000 From: Nicholas Piggin Subject: Re: [PATCH v6 05/12] mm: HUGE_VMAP arch support cleanup To: Andrew Morton Cc: =?iso-8859-1?q?Borislav=0A?= Petkov , Catalin Marinas , Christophe Leroy , Christoph Hellwig , "H. Peter Anvin" , Jonathan Cameron , linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, Zefan Li , Ingo Molnar , =?iso-8859-1?q?Thomas=0A?= Gleixner , Will Deacon , x86@kernel.org References: <20200821151216.1005117-1-npiggin@gmail.com> <20200821151216.1005117-6-npiggin@gmail.com> <20200821131422.110abb1a0c0b6a9d378b0e48@linux-foundation.org> In-Reply-To: <20200821131422.110abb1a0c0b6a9d378b0e48@linux-foundation.org> MIME-Version: 1.0 Message-Id: <1598049779.exwra3cjwe.astroid@bobo.none> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: DA4B61ACC2B X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 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: Excerpts from Andrew Morton's message of August 22, 2020 6:14 am: > On Sat, 22 Aug 2020 01:12:09 +1000 Nicholas Piggin wr= ote: >=20 >> 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. >>=20 >> This removes code and indirection, and allows constant-folding of dead >> code for unsupported levels. >>=20 >> 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). >>=20 >> --- 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 >> =20 >> +#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 >=20 > 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! Yeah this was just an intermediate step as you saw. It's a bit=20 unfortunate, but I thought it made the arch changes clearer. Thanks, Nick