Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1576401

Re: [RFC][PATCH] treewide: Move set_memory_* functions away from cacheflush.h

From Will Deacon <will.deacon@arm.com>
Newsgroups linux.kernel
Subject Re: [RFC][PATCH] treewide: Move set_memory_* functions away from cacheflush.h
Date 2017-02-08 10:50 +0100
Message-ID <t8x2X-74c-33@gated-at.bofh.it> (permalink)
References <t8ll7-86g-17@gated-at.bofh.it> <t8lEu-8e1-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Feb 07, 2017 at 01:25:53PM -0800, Kees Cook wrote:
> On Tue, Feb 7, 2017 at 1:10 PM, Laura Abbott <labbott@redhat.com> wrote:
> > The set_memory_* APIs came out of a desire to have a better way to
> > change memory attributes. Many of these attributes were linked to cache
> > functionality so the prototypes were put in cacheflush.h. These days,
> > the APIs have grown and have a much wider use than just cache APIs. To
> > support this growth, split off set_memory_* and friends into a separate
> > header file to avoid growing cacheflush.h for APIs that have nothing to
> > do with caches.
> >
> > Signed-off-by: Laura Abbott <labbott@redhat.com>
> > ---
> > This came out of a comment Russell made while reviewing RODATA test cases
> > http://lists.infradead.org/pipermail/linux-arm-kernel/2017-January/480855.html
> > While the final result of that series was the rodata code was refactored into
> > its own header file, the set_memory_* APIs are still out of place.
> 
> Yeah, this is a nice clean up to start on.
> 
> > This is a simple attempt at moving all the API stubs to their own file.
> > Another idea I had was throwing set_memory_{x,nx,ro,rw} in an asm-generic
> > file since those are commonly used for module setting across all arches.
> 
> It seems like asm-generic would be cleaner, yes? Only a few archs have
> anything "special" happening in the resulting header files.

I'd also prefer the asm-generic approach if it makes the arch part a simple
addition to asm/Kbuild.

Will

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC][PATCH] treewide: Move set_memory_* functions away from cacheflush.h Laura Abbott <labbott@redhat.com> - 2017-02-07 22:20 +0100
  Re: [RFC][PATCH] treewide: Move set_memory_* functions away from cacheflush.h Kees Cook <keescook@chromium.org> - 2017-02-07 22:40 +0100
    Re: [RFC][PATCH] treewide: Move set_memory_* functions away from  cacheflush.h Will Deacon <will.deacon@arm.com> - 2017-02-08 10:50 +0100
  Re: [RFC][PATCH] treewide: Move set_memory_* functions away from  cacheflush.h Ingo Molnar <mingo@kernel.org> - 2017-02-08 08:40 +0100
  Re: [RFC][PATCH] treewide: Move set_memory_* functions away from  cacheflush.h Heiko Carstens <heiko.carstens@de.ibm.com> - 2017-02-09 11:10 +0100

csiph-web