lkml.org 
[lkml]   [2020]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V3 13/15] parisc/kmap: Remove duplicate kmap code
On Thu, May 07, 2020 at 01:52:58PM -0700, Andrew Morton wrote:
> 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)

Yes I was following the pattern already there.

I'll fix up the last patch now.
Ira

\
 
 \ /
  Last update: 2020-05-08 00:51    [W:0.071 / U:0.852 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site