lkml.org 
[lkml]   [2014]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4 4/7] x86, mm, pat: Add pgprot_writethrough() for WT
From
Date
On Mon, 2014-11-03 at 23:53 +0100, Thomas Gleixner wrote:
> On Mon, 3 Nov 2014, Toshi Kani wrote:
> > On Mon, 2014-11-03 at 22:10 +0000, Elliott, Robert (Server Storage)
> > wrote:
> > :
> > > > Subject: [PATCH v4 4/7] x86, mm, pat: Add pgprot_writethrough() for
> > > > WT
> > > >
> > > > This patch adds pgprot_writethrough() for setting WT to a given
> > > > pgprot_t.
> > > >
> > > > Signed-off-by: Toshi Kani <toshi.kani@hp.com>
> > > > Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> > > ...
> > > > diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
> > > > index a214f5a..a0264d3 100644
> > > > --- a/arch/x86/mm/pat.c
> > > > +++ b/arch/x86/mm/pat.c
> > > > @@ -896,6 +896,16 @@ pgprot_t pgprot_writecombine(pgprot_t prot)
> > > > }
> > > > EXPORT_SYMBOL_GPL(pgprot_writecombine);
> > > >
> > > > +pgprot_t pgprot_writethrough(pgprot_t prot)
> > > > +{
> > > > + if (pat_enabled)
> > > > + return __pgprot(pgprot_val(prot) |
> > > > + cachemode2protval(_PAGE_CACHE_MODE_WT));
> > > > + else
> > > > + return pgprot_noncached(prot);
> > > > +}
> > > > +EXPORT_SYMBOL_GPL(pgprot_writethrough);
> > > ...
> > >
> > > Would you be willing to use EXPORT_SYMBOL for the new
> > > pgprot_writethrough function to provide more flexibility
> > > for modules to utilize the new feature? In x86/mm, 18 of 60
> > > current exports are GPL and 42 are not GPL.
> >
> > I simply used EXPORT_SYMBOL_GPL() since pgprot_writecombine() used
> > it. :-) This interface is intended to be used along with
> > remap_pfn_range() and ioremap_prot(), which are both exported with
> > EXPORT_SYMBOL(). So, it seems reasonable to export it with
> > EXPORT_SYMBOL() as well. I will make this change.
>
> NAK.
>
> This is new functionality and we really have no reason to give the GPL
> circumventors access to it.

Thanks for the background info about EXPORT_SYMBOL. I will keep it no
change.

-Toshi



\
 
 \ /
  Last update: 2014-11-04 02:21    [W:0.067 / U:0.656 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site