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.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 53051C43464 for ; Mon, 21 Sep 2020 12:22:05 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 7A24420EDD for ; Mon, 21 Sep 2020 12:22:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="eHeD509S" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7A24420EDD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9207C6E07F; Mon, 21 Sep 2020 12:22:03 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7E67789257; Mon, 21 Sep 2020 06:28:43 +0000 (UTC) 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=Tci2tqg3leIbmrKKmdytiLIb3svt+yq3AUhipK0JnoY=; b=eHeD509SDxyAiHGiTwo9U9RK6O BdV0ol0+bUl0JcuR4cH5K4iJppCvrjMC+FXmd1lF9otzHdHbgaqWCPBbYEVccspM4hNb0ELFrDX41 s330N9PwkKFmY1+L4xtZqC6TuuZXPpHTsXwNy2mxRh6hHZxeOvX7QA3hIrIh11xqjXXtgY0KOrH1g TAa/FH4UUQzLwOqDXwmFk20iXdkTE1C5bNJ47X+kA8GBuFsMKdIwnr8VE2F05aYZUn3BWrCVUA/8S mbIk+BpzsIVAf7vJcwgjD0vdvWTXz3H9YwI8DG/vud/142FwM17JAPgxfqgTAucNSaDR8ooXWbNYe L6UrCpkA==; Received: from hch by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKFJD-0000eG-TH; Mon, 21 Sep 2020 06:28:19 +0000 Date: Mon, 21 Sep 2020 07:28:19 +0100 From: Christoph Hellwig To: Thomas Gleixner Message-ID: <20200921062819.GB32081@infradead.org> References: <20200919091751.011116649@linutronix.de> <20200919092615.990731525@linutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200919092615.990731525@linutronix.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html X-Mailman-Approved-At: Mon, 21 Sep 2020 12:22:02 +0000 Subject: Re: [Intel-gfx] [patch RFC 02/15] highmem: Provide generic variant of kmap_atomic* X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Juri Lelli , Peter Zijlstra , Benjamin Herrenschmidt , Sebastian Andrzej Siewior , dri-devel , linux-mips@vger.kernel.org, Ben Segall , Max Filippov , Guo Ren , sparclinux@vger.kernel.org, Vincent Chen , Will Deacon , Ard Biesheuvel , linux-arch@vger.kernel.org, Herbert Xu , Michael Ellerman , x86@kernel.org, Russell King , linux-csky@vger.kernel.org, David Airlie , Mel Gorman , linux-snps-arc@lists.infradead.org, linux-xtensa@linux-xtensa.org, Paul McKenney , intel-gfx , linuxppc-dev@lists.ozlabs.org, Steven Rostedt , Linus Torvalds , Dietmar Eggemann , Linux ARM , Chris Zankel , Michal Simek , Thomas Bogendoerfer , Nick Hu , Linux-MM , Vineet Gupta , LKML , Arnd Bergmann , Paul Mackerras , Andrew Morton , Daniel Bristot de Oliveira , "David S. Miller" , Greentime Hu Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" > +# ifndef ARCH_NEEDS_KMAP_HIGH_GET > +static inline void *arch_kmap_temporary_high_get(struct page *page) > +{ > + return NULL; > +} > +# endif Turn this into a macro and use #ifndef on the symbol name? > +static inline void __kunmap_atomic(void *addr) > +{ > + kumap_atomic_indexed(addr); > +} > + > + > +#endif /* CONFIG_KMAP_ATOMIC_GENERIC */ Stange double empty line above the endif. > -#define kunmap_atomic(addr) \ > -do { \ > - BUILD_BUG_ON(__same_type((addr), struct page *)); \ > - kunmap_atomic_high(addr); \ > - pagefault_enable(); \ > - preempt_enable(); \ > -} while (0) > - > +#define kunmap_atomic(addr) \ > + do { \ > + BUILD_BUG_ON(__same_type((addr), struct page *)); \ > + __kunmap_atomic(addr); \ > + preempt_enable(); \ > + } while (0) Why the strange re-indent to a form that is much less common and less readable? > +void *kmap_atomic_pfn_prot(unsigned long pfn, pgprot_t prot) > +{ > + pagefault_disable(); > + return __kmap_atomic_pfn_prot(pfn, prot); > +} > +EXPORT_SYMBOL(kmap_atomic_pfn_prot); The existing kmap_atomic_pfn & co implementation is EXPORT_SYMBOL_GPL, and this stuff should preferably stay that way. _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx