lkml.org 
[lkml]   [2014]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: mmotm 2014-04-22-15-20 uploaded (uml 32- and 64-bit defconfigs)
On 24.04.2014 [08:10:19 +1000], Stephen Rothwell wrote:
> Hi all,
>
> On Wed, 23 Apr 2014 11:24:42 -0700 Andrew Morton <akpm@linux-foundation.org> wrote:
> >
> > I'll try moving hugepages_supported() into the #ifdef
> > CONFIG_HUGETLB_PAGE section.
> >
> > --- a/include/linux/hugetlb.h~hugetlb-ensure-hugepage-access-is-denied-if-hugepages-are-not-supported-fix-fix
> > +++ a/include/linux/hugetlb.h
> > @@ -412,6 +412,16 @@ static inline spinlock_t *huge_pte_lockp
> > return &mm->page_table_lock;
> > }
> >
> > +static inline bool hugepages_supported(void)
> > +{
> > + /*
> > + * Some platform decide whether they support huge pages at boot
> > + * time. On these, such as powerpc, HPAGE_SHIFT is set to 0 when
> > + * there is no such support
> > + */
> > + return HPAGE_SHIFT != 0;
> > +}
> > +
> > #else /* CONFIG_HUGETLB_PAGE */
> > struct hstate {};
> > #define alloc_huge_page_node(h, nid) NULL
> > @@ -460,14 +470,4 @@ static inline spinlock_t *huge_pte_lock(
> > return ptl;
> > }
> >
> > -static inline bool hugepages_supported(void)
> > -{
> > - /*
> > - * Some platform decide whether they support huge pages at boot
> > - * time. On these, such as powerpc, HPAGE_SHIFT is set to 0 when
> > - * there is no such support
> > - */
> > - return HPAGE_SHIFT != 0;
> > -}
> > -
> > #endif /* _LINUX_HUGETLB_H */
>
> Clearly, noone reads my emails :-(
>
> This is exactly what I reported and the fix I applied to yesterday's
> linux-next ...

Actually, I think (based upon the context) that your fix is slightly
different. Your fix puts hugepages_supported() under CONFIG_HUGETLBFS.
Andrew's puts it under CONFIG_HUGETLB_PAGE. I think they are effectively
tied together as options go, but it semantically makes more sense with
CONFIG_HUGETLB_PAGE.

Thanks,
Nish



\
 
 \ /
  Last update: 2014-04-24 01:41    [W:0.071 / U:1.816 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site