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=-0.5 required=3.0 tests=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 C30BCC38A2A for ; Thu, 7 May 2020 20:54:59 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (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 2120C20661 for ; Thu, 7 May 2020 20:54:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="pLECSGx/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2120C20661 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49J5Lm3Lr1zDqvr for ; Fri, 8 May 2020 06:54:56 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux-foundation.org (client-ip=198.145.29.99; helo=mail.kernel.org; envelope-from=akpm@linux-foundation.org; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=default header.b=pLECSGx/; dkim-atps=neutral Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 49J5Jd51YJzDqlm for ; Fri, 8 May 2020 06:53:02 +1000 (AEST) 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 E2E7920735; Thu, 7 May 2020 20:52:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588884780; bh=TyVMubmSwnb6HspI26I671gs2+xz/BioghUujIiqGH8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=pLECSGx/bjY/e6dPZHg/pogKtFknD7CQxEbYnTijPvo31G65TH5qkje/0482SYoYN DUxu9XSArBxL1RHMChRsQBx2Ke74CL6dm6TMRGPJJfX7xkDXTBpZl44fWyvfgMqhU0 epsvy3zKnV8VlRwcWKCyI4E8L4mB8LcbloZDf/RA= Date: Thu, 7 May 2020 13:52:58 -0700 From: Andrew Morton To: ira.weiny@intel.com Subject: Re: [PATCH V3 13/15] parisc/kmap: Remove duplicate kmap code Message-Id: <20200507135258.f430182578c0d63b7488916e@linux-foundation.org> In-Reply-To: <20200507150004.1423069-14-ira.weiny@intel.com> References: <20200507150004.1423069-1-ira.weiny@intel.com> <20200507150004.1423069-14-ira.weiny@intel.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Zijlstra , Dave Hansen , dri-devel@lists.freedesktop.org, linux-mips@vger.kernel.org, "James E.J. Bottomley" , Max Filippov , Paul Mackerras , "H. Peter Anvin" , sparclinux@vger.kernel.org, Thomas Gleixner , Helge Deller , x86@kernel.org, linux-csky@vger.kernel.org, Christoph Hellwig , Ingo Molnar , linux-snps-arc@lists.infradead.org, linux-xtensa@linux-xtensa.org, Borislav Petkov , Al Viro , Andy Lutomirski , Dan Williams , linux-arm-kernel@lists.infradead.org, Chris Zankel , Thomas Bogendoerfer , linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org, Christian Koenig , linuxppc-dev@lists.ozlabs.org, "David S. Miller" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Thu, 7 May 2020 08:00:01 -0700 ira.weiny@intel.com wrote: > parisc reimplements the kmap calls except to flush it's dcache. This is > arguably an abuse of kmap but regardless it is messy and confusing. > > Remove the duplicate code and have parisc define > ARCH_HAS_FLUSH_ON_KUNMAP for a kunmap_flush_on_unmap() architecture > specific call to flush the cache. checkpatch says: ERROR: #define of 'ARCH_HAS_FLUSH_ON_KUNMAP' is wrong - use Kconfig variables or standard guards instead #69: FILE: arch/parisc/include/asm/cacheflush.h:103: +#define ARCH_HAS_FLUSH_ON_KUNMAP which is fair enough, I guess. More conventional would be arch/parisc/include/asm/cacheflush.h: static inline void kunmap_flush_on_unmap(void *addr) { ... } #define kunmap_flush_on_unmap kunmap_flush_on_unmap include/linux/highmem.h: #ifndef kunmap_flush_on_unmap static inline void kunmap_flush_on_unmap(void *addr) { } #define kunmap_flush_on_unmap kunmap_flush_on_unmap #endif static inline void kunmap_atomic_high(void *addr) { /* Mostly nothing to do in the CONFIG_HIGHMEM=n case as kunmap_atomic() * handles re-enabling faults + preemption */ kunmap_flush_on_unmap(addr); } but I don't really think it's worth bothering changing it. (Ditto patch 3/15)