[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20161120.164235.41564426914943042.davem@davemloft.net>
Date: Sun, 20 Nov 2016 16:42:35 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: nitin.m.gupta@...cle.com
Cc: mike.kravetz@...cle.com, akpm@...ux-foundation.org,
julian.calaby@...il.com, hughd@...gle.com,
adam.buchbinder@...il.com, minchan@...nel.org,
kirill.shutemov@...ux.intel.com, sfr@...b.auug.org.au,
paul.gortmaker@...driver.com, chris.hyser@...cle.com,
atish.patra@...cle.com, mhocko@...e.com, toshi.kani@....com,
sparclinux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] sparc64: Multi-page size support
From: Nitin Gupta <nitin.m.gupta@...cle.com>
Date: Wed, 12 Oct 2016 15:58:11 -0700
> @@ -117,26 +117,11 @@ tsb_miss_page_table_walk_sun4v_fastpath:
> /* Valid PTE is now in %g5. */
>
> #if defined(CONFIG_HUGETLB_PAGE) || defined(CONFIG_TRANSPARENT_HUGEPAGE)
> -661: sethi %uhi(_PAGE_SZALL_4U), %g7
> +661: sethi %uhi(_PAGE_PMD_HUGE), %g7
> sllx %g7, 32, %g7
This "661" label only exists for the sake of the code patching
reference, but if you are removing the code patching then this
label should thus be removed too.
> @@ -161,34 +270,51 @@ void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
> pte_t *ptep, pte_t entry)
> {
> pte_t orig;
> + unsigned long size = huge_tte_to_size(entry);
> + unsigned int i, nptes = size >> PMD_SHIFT;
> + unsigned int hugepage_shift;
Please always order local variables from longest to shortest line.
> pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr,
> pte_t *ptep)
> {
> pte_t entry;
> + unsigned long size;
> + unsigned int i, nptes, hugepage_shift;
Likewise.
> +#ifdef CONFIG_HUGETLB_PAGE
> +static int __init setup_hugepagesz(char *string)
> +{
> + int rc = 0;
> + unsigned long long hugepage_size;
> + unsigned int hugepage_shift;
> + unsigned short hv_pgsz_idx;
> + unsigned int hv_pgsz_mask;
Likewise.
> +#if defined(CONFIG_HUGETLB_PAGE) || defined(CONFIG_TRANSPARENT_HUGEPAGE)
> +static void __flush_huge_tsb_one_entry(unsigned long tsb, unsigned long v,
> + unsigned long hash_shift,
> + unsigned long nentries,
> + unsigned int hugepage_shift)
> +{
> + unsigned int i;
> + unsigned int hpage_entries = 1 << (hugepage_shift - REAL_HPAGE_SHIFT);
Likewise.
Powered by blists - more mailing lists