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=-12.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham 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 56560C56202 for ; Wed, 25 Nov 2020 11:23:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C89122145D for ; Wed, 25 Nov 2020 11:23:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Ewexuk4p" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C89122145D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 516956B0075; Wed, 25 Nov 2020 06:23:12 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4C6376B007B; Wed, 25 Nov 2020 06:23:12 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 38E566B007D; Wed, 25 Nov 2020 06:23:12 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0214.hostedemail.com [216.40.44.214]) by kanga.kvack.org (Postfix) with ESMTP id 1C1536B0075 for ; Wed, 25 Nov 2020 06:23:12 -0500 (EST) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id D1C751EE6 for ; Wed, 25 Nov 2020 11:23:11 +0000 (UTC) X-FDA: 77522704182.07.frame89_1d0717a27376 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin07.hostedemail.com (Postfix) with ESMTP id B80E41803F9A0 for ; Wed, 25 Nov 2020 11:23:11 +0000 (UTC) X-HE-Tag: frame89_1d0717a27376 X-Filterd-Recvd-Size: 4660 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by imf47.hostedemail.com (Postfix) with ESMTP for ; Wed, 25 Nov 2020 11:23:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606303390; h=from:from: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; bh=+4cXXjeuoPZcpjvnWwh0t5Ptb6TD0O+4x7YlTnGAxsM=; b=Ewexuk4pjLRQ+tcAJY0bkgaBb7WgufZfy3mrXpCPIMamqBsHbBRLK+A8OnHuJhrmLWBo3+ yon3T/MokKiYGWRxgvkTXoxUmLsdslEvReUIdPt7/vUGRkBEhE3BD3lf1P4WdgkmCodp8B JpERShwOsKdlSVmGz/EfUnRt+KDDDM0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-512-bjy8ViIZMmO_i9Bjy86LLg-1; Wed, 25 Nov 2020 06:23:05 -0500 X-MC-Unique: bjy8ViIZMmO_i9Bjy86LLg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 439F01E7C3; Wed, 25 Nov 2020 11:23:01 +0000 (UTC) Received: from [10.36.112.131] (ovpn-112-131.ams2.redhat.com [10.36.112.131]) by smtp.corp.redhat.com (Postfix) with ESMTP id 48E4A18996; Wed, 25 Nov 2020 11:22:53 +0000 (UTC) Subject: Re: [PATCH v12 04/10] set_memory: allow querying whether set_direct_map_*() is actually enabled To: Mike Rapoport , Andrew Morton Cc: Alexander Viro , Andy Lutomirski , Arnd Bergmann , Borislav Petkov , Catalin Marinas , Christopher Lameter , Dan Williams , Dave Hansen , Elena Reshetova , "H. Peter Anvin" , Ingo Molnar , James Bottomley , "Kirill A. Shutemov" , Matthew Wilcox , Mark Rutland , Mike Rapoport , Michael Kerrisk , Palmer Dabbelt , Paul Walmsley , Peter Zijlstra , Rick Edgecombe , Roman Gushchin , Shuah Khan , Thomas Gleixner , Tycho Andersen , Will Deacon , linux-api@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-nvdimm@lists.01.org, linux-riscv@lists.infradead.org, x86@kernel.org References: <20201125092208.12544-1-rppt@kernel.org> <20201125092208.12544-5-rppt@kernel.org> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: <5ea6eacd-79e8-0645-da39-d3461f60e627@redhat.com> Date: Wed, 25 Nov 2020 12:22:52 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <20201125092208.12544-5-rppt@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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: > #include > > #endif /* __ASM_CACHEFLUSH_H */ > diff --git a/arch/arm64/include/asm/set_memory.h b/arch/arm64/include/asm/set_memory.h > new file mode 100644 > index 000000000000..ecb6b0f449ab > --- /dev/null > +++ b/arch/arm64/include/asm/set_memory.h > @@ -0,0 +1,17 @@ > +/* SPDX-License-Identifier: GPL-2.0-only */ > + > +#ifndef _ASM_ARM64_SET_MEMORY_H > +#define _ASM_ARM64_SET_MEMORY_H > + > +#include > + > +bool can_set_direct_map(void); > +#define can_set_direct_map can_set_direct_map Well, that looks weird. [...] > } > +#else /* CONFIG_ARCH_HAS_SET_DIRECT_MAP */ > +/* > + * Some architectures, e.g. ARM64 can disable direct map modifications at > + * boot time. Let them overrive this query. > + */ > +#ifndef can_set_direct_map > +static inline bool can_set_direct_map(void) > +{ > + return true; > +} I think we prefer __weak functions for something like that, avoids the ifdefery. Apart from that, LGTM. -- Thanks, David / dhildenb