Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1059855ybj; Thu, 7 May 2020 13:54:54 -0700 (PDT) X-Google-Smtp-Source: APiQypLVsfopjts7KVaDm+iI3kX9KLRlr4zP1eMuoZ+Oq4zN5skOTnCyKB6kUcBThAOc8MVJVd1U X-Received: by 2002:a05:6402:22ed:: with SMTP id dn13mr13581807edb.212.1588884894569; Thu, 07 May 2020 13:54:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588884894; cv=none; d=google.com; s=arc-20160816; b=Yj5Qo06gjQ/4Gg1pwyddU5wb87sm9s8A4uHftEs6A7VW/I6DZ2fLmbHuEnyg0OKGPq 9iISEB0LXIZewouFAVY0QJibh+72ajV7hX6WIoibYiHTYvakduKT63DY6gplfzeKr5rs 6cq+dNQsXFRHj+AJ/QuIAxiC53InwI385Fv4JGSw2drDpRNN5bklNwdR6XIa0Dhy3oM4 2hY82eQW1JRFv50WG0BFBcxyYM096V1gPGVtmtpifwH67pakX5b1lFv3RuWr2mpn0cWh 0yCVfC8hcljJlmAwDFpKzW96geRW/TcwzsNPul+rgmnTxfjjpI6K+jxQWYmsoiGhypaq McRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=64RDgmQ8UhEqfjlZY7CyZzdmh6NknOMAB8G0UaEDWQE=; b=u0QpdMDDeuHRQ5Vf+xCBLptzXTXgjY/z81uxBST8Xg7NMBoG3tnzyd26eXIC+9TyyX 9KPUUdiLnQVvyiYz1vIne8KB1gTcAO8S21VyvORvrFAh2SXfpr7clpcENiALFCCd4iYX XF42SHQ0LfWmuzecPwkdKUwKIkhdCidnpTFbS4TTVAH9ObqiSRHe0LcS/z703AV64WC+ /wQpadekfGJwA3VPFV1/lN/L6msTpk2mmGIDuq6Bucxn2NdCVYPu0Kr/OhZ9PVciPP1j xvpxfQkMlBgugLOlUGUVHlg8efo1R/xxgS6JgnIo1+uvzFGVXz0NbF4x8cK+XEyjoixf oIUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="pLECSGx/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n16si4328170ejl.134.2020.05.07.13.54.31; Thu, 07 May 2020 13:54:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="pLECSGx/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726778AbgEGUxC (ORCPT + 99 others); Thu, 7 May 2020 16:53:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:34952 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726218AbgEGUxC (ORCPT ); Thu, 7 May 2020 16:53:02 -0400 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 Cc: linux-kernel@vger.kernel.org, Al Viro , Thomas Bogendoerfer , "James E.J. Bottomley" , Helge Deller , Benjamin Herrenschmidt , Paul Mackerras , "David S. Miller" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Chris Zankel , Max Filippov , Dan Williams , linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, sparclinux@vger.kernel.org, linux-xtensa@linux-xtensa.org, dri-devel@lists.freedesktop.org, Christian Koenig , Christoph Hellwig 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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)