Re: [PATCH 10/10] arch: fix has_transparent_hugepage()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Hugh Dickins <hughd@xxxxxxxxxx> wrote:

> --- a/arch/x86/include/asm/pgtable.h
> +++ b/arch/x86/include/asm/pgtable.h
> @@ -181,6 +181,7 @@ static inline int pmd_trans_huge(pmd_t p
>  	return (pmd_val(pmd) & (_PAGE_PSE|_PAGE_DEVMAP)) == _PAGE_PSE;
>  }
>  
> +#define has_transparent_hugepage has_transparent_hugepage
>  static inline int has_transparent_hugepage(void)
>  {
>  	return cpu_has_pse;

Small nit, just writing:

  #define has_transparent_hugepage

ought to be enough, right?

In any case:

  Acked-by: Ingo Molnar <mingo@xxxxxxxxxx>

Another nit, this:

> --- a/include/asm-generic/pgtable.h
> +++ b/include/asm-generic/pgtable.h
> @@ -806,4 +806,12 @@ static inline int pmd_clear_huge(pmd_t *
>  #define io_remap_pfn_range remap_pfn_range
>  #endif
>  
> +#ifndef has_transparent_hugepage
> +#ifdef CONFIG_TRANSPARENT_HUGEPAGE
> +#define has_transparent_hugepage() 1
> +#else
> +#define has_transparent_hugepage() 0
> +#endif
> +#endif

Looks a bit more structured as:

  #ifndef has_transparent_hugepage
  # ifdef CONFIG_TRANSPARENT_HUGEPAGE
  #  define has_transparent_hugepage() 1
  # else
  #  define has_transparent_hugepage() 0
  # endif
  #endif

BYMMV.

Thanks,

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux