[PATCH 4/7] Store huge page linux pte in mm_struct

Catalin Marinas catalin.marinas at arm.com
Tue Jan 31 04:37:40 EST 2012


On 30 January 2012 07:57,  <bill4carson at gmail.com> wrote:
> diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
> index 3cc3062..88f76e6 100644
> --- a/include/linux/mm_types.h
> +++ b/include/linux/mm_types.h
> @@ -23,6 +23,11 @@
>  struct address_space;
>
>  #define USE_SPLIT_PTLOCKS      (NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS)
> +#ifdef CONFIG_ARM_HUGETLB_SUPPORT
> +#define HUGE_2M_PTE_SIZE      2
> +#define HUGE_2M_PTE_1ST_ARRAY 0
> +#define HUGE_2M_PTE_2ND_ARRAY 1
> +#endif
>
>  /*
>  * Each physical page in the system has a struct page associated with
> @@ -388,6 +393,12 @@ struct mm_struct {
>  #ifdef CONFIG_CPUMASK_OFFSTACK
>        struct cpumask cpumask_allocation;
>  #endif
> +
> +#ifdef CONFIG_ARM_HUGETLB_SUPPORT
> +       /* we place hugepage linux pte at mm_struct  */
> +       pte_t *huge_2m_pte[HUGE_2M_PTE_SIZE];
> +       pte_t *huge_16m_pte;
> +#endif
>  };
>
>  static inline void mm_init_cpumask(struct mm_struct *mm)

Please don't touch generic code. There is mm_context_t defined in
arch/arm/include/asm/mmu.h, just add the stuff you need there.

-- 
Catalin



More information about the linux-arm-kernel mailing list