LKML Archive on lore.kernel.org
 help / Atom feed
* linux-next: manual merge of the akpm-current tree with the powerpc tree
@ 2018-12-06  6:44 Stephen Rothwell
  2018-12-07  1:40 ` Joel Fernandes
  0 siblings, 1 reply; 12+ messages in thread
From: Stephen Rothwell @ 2018-12-06  6:44 UTC (permalink / raw)
  To: Andrew Morton, Michael Ellerman, Benjamin Herrenschmidt, PowerPC
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Joel Fernandes (Google),
	Christophe Leroy

[-- Attachment #1: Type: text/plain, Size: 5611 bytes --]

Hi Andrew,

Today's linux-next merge of the akpm-current tree got conflicts in:

  arch/powerpc/include/asm/book3s/32/pgalloc.h
  arch/powerpc/include/asm/nohash/32/pgalloc.h
  arch/powerpc/mm/pgtable-book3s64.c

between commits:

  a95d133c8643 ("powerpc/mm: Move pte_fragment_alloc() to a common location")
  32ea4c149990 ("powerpc/mm: Extend pte_fragment functionality to PPC32")

from the powerpc tree and commit:

  913c2d755b39 ("mm: treewide: remove unused address argument from pte_alloc functions")

from the akpm-current tree.

I fixed it up (see below, plus the extra merge fix patch) and can
carry the fix as necessary. This is now fixed as far as linux-next is
concerned, but any non trivial conflicts should be mentioned to your
upstream maintainer when your tree is submitted for merging.  You may
also want to consider cooperating with the maintainer of the conflicting
tree to minimise any particularly complex conflicts.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 6 Dec 2018 17:41:27 +1100
Subject: [PATCH] fix up for "mm: treewide: remove unused address argument from
 pte_alloc functions"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/mm/pgtable-frag.c | 2 +-
 arch/powerpc/mm/pgtable_32.c   | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/mm/pgtable-frag.c b/arch/powerpc/mm/pgtable-frag.c
index af23a587f019..a7b05214760c 100644
--- a/arch/powerpc/mm/pgtable-frag.c
+++ b/arch/powerpc/mm/pgtable-frag.c
@@ -95,7 +95,7 @@ static pte_t *__alloc_for_ptecache(struct mm_struct *mm, int kernel)
 	return (pte_t *)ret;
 }
 
-pte_t *pte_fragment_alloc(struct mm_struct *mm, unsigned long vmaddr, int kernel)
+pte_t *pte_fragment_alloc(struct mm_struct *mm, int kernel)
 {
 	pte_t *pte;
 
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c
index deda68e02338..5b1e1adeb4d2 100644
--- a/arch/powerpc/mm/pgtable_32.c
+++ b/arch/powerpc/mm/pgtable_32.c
@@ -48,12 +48,12 @@ __ref pte_t *pte_alloc_one_kernel(struct mm_struct *mm)
 	if (!slab_is_available())
 		return memblock_alloc(PTE_FRAG_SIZE, PTE_FRAG_SIZE);
 
-	return (pte_t *)pte_fragment_alloc(mm, address, 1);
+	return (pte_t *)pte_fragment_alloc(mm, 1);
 }
 
 pgtable_t pte_alloc_one(struct mm_struct *mm)
 {
-	return (pgtable_t)pte_fragment_alloc(mm, address, 0);
+	return (pgtable_t)pte_fragment_alloc(mm, 0);
 }
 
 void __iomem *
-- 
2.19.1

-- 
Cheers,
Stephen Rothwell

diff --cc arch/powerpc/include/asm/book3s/32/pgalloc.h
index b5b955eb2fb7,af9e13555d95..000000000000
--- a/arch/powerpc/include/asm/book3s/32/pgalloc.h
+++ b/arch/powerpc/include/asm/book3s/32/pgalloc.h
@@@ -56,16 -61,29 +56,16 @@@ static inline void pmd_populate_kernel(
  static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmdp,
  				pgtable_t pte_page)
  {
 -	*pmdp = __pmd((page_to_pfn(pte_page) << PAGE_SHIFT) | _PMD_PRESENT);
 -}
 -
 -#define pmd_pgtable(pmd) pmd_page(pmd)
 -#else
 -
 -static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp,
 -				       pte_t *pte)
 -{
 -	*pmdp = __pmd((unsigned long)pte | _PMD_PRESENT);
 -}
 -
 -static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmdp,
 -				pgtable_t pte_page)
 -{
 -	*pmdp = __pmd((unsigned long)lowmem_page_address(pte_page) | _PMD_PRESENT);
 +	*pmdp = __pmd(__pa(pte_page) | _PMD_PRESENT);
  }
  
 -#define pmd_pgtable(pmd) pmd_page(pmd)
 -#endif
 +#define pmd_pgtable(pmd) ((pgtable_t)pmd_page_vaddr(pmd))
  
- extern pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr);
- extern pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long addr);
+ extern pte_t *pte_alloc_one_kernel(struct mm_struct *mm);
+ extern pgtable_t pte_alloc_one(struct mm_struct *mm);
 +void pte_frag_destroy(void *pte_frag);
- pte_t *pte_fragment_alloc(struct mm_struct *mm, unsigned long vmaddr, int kernel);
++pte_t *pte_fragment_alloc(struct mm_struct *mm, int kernel);
 +void pte_fragment_free(unsigned long *table, int kernel);
  
  static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
  {
diff --cc arch/powerpc/include/asm/nohash/32/pgalloc.h
index 17963951bdb0,16623f53f0d4..000000000000
--- a/arch/powerpc/include/asm/nohash/32/pgalloc.h
+++ b/arch/powerpc/include/asm/nohash/32/pgalloc.h
@@@ -73,17 -77,14 +73,17 @@@ static inline void pmd_populate_kernel(
  static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmdp,
  				pgtable_t pte_page)
  {
 -	*pmdp = __pmd((unsigned long)lowmem_page_address(pte_page) | _PMD_PRESENT);
 +	*pmdp = __pmd((unsigned long)pte_page | _PMD_PRESENT);
  }
  
 -#define pmd_pgtable(pmd) pmd_page(pmd)
 +#define pmd_pgtable(pmd) ((pgtable_t)pmd_page_vaddr(pmd))
  #endif
  
- extern pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr);
- extern pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long addr);
+ extern pte_t *pte_alloc_one_kernel(struct mm_struct *mm);
+ extern pgtable_t pte_alloc_one(struct mm_struct *mm);
 +void pte_frag_destroy(void *pte_frag);
- pte_t *pte_fragment_alloc(struct mm_struct *mm, unsigned long vmaddr, int kernel);
++pte_t *pte_fragment_alloc(struct mm_struct *mm, int kernel);
 +void pte_fragment_free(unsigned long *table, int kernel);
  
  static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
  {
diff --cc arch/powerpc/mm/pgtable-book3s64.c
index f3c31f5e1026,6f9d434b0a4c..000000000000
--- a/arch/powerpc/mm/pgtable-book3s64.c
+++ b/arch/powerpc/mm/pgtable-book3s64.c

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: linux-next: manual merge of the akpm-current tree with the powerpc tree
  2018-12-06  6:44 linux-next: manual merge of the akpm-current tree with the powerpc tree Stephen Rothwell
@ 2018-12-07  1:40 ` Joel Fernandes
  0 siblings, 0 replies; 12+ messages in thread
From: Joel Fernandes @ 2018-12-07  1:40 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Michael Ellerman, Benjamin Herrenschmidt, PowerPC,
	Linux Next Mailing List, Linux Kernel Mailing List,
	Christophe Leroy

On Thu, Dec 06, 2018 at 05:44:17PM +1100, Stephen Rothwell wrote:
> Hi Andrew,
> 
> Today's linux-next merge of the akpm-current tree got conflicts in:
> 
>   arch/powerpc/include/asm/book3s/32/pgalloc.h
>   arch/powerpc/include/asm/nohash/32/pgalloc.h
>   arch/powerpc/mm/pgtable-book3s64.c
> 
> between commits:
> 
>   a95d133c8643 ("powerpc/mm: Move pte_fragment_alloc() to a common location")
>   32ea4c149990 ("powerpc/mm: Extend pte_fragment functionality to PPC32")
> 
> from the powerpc tree and commit:
> 
>   913c2d755b39 ("mm: treewide: remove unused address argument from pte_alloc functions")
> 
> from the akpm-current tree.
> 
> I fixed it up (see below, plus the extra merge fix patch) and can
> carry the fix as necessary. This is now fixed as far as linux-next is
> concerned, but any non trivial conflicts should be mentioned to your
> upstream maintainer when your tree is submitted for merging.  You may
> also want to consider cooperating with the maintainer of the conflicting
> tree to minimise any particularly complex conflicts.

The conflict resolution looks good to me.

Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>

thanks,

 - Joel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: linux-next: manual merge of the akpm-current tree with the powerpc tree
  2016-05-02  7:20 Stephen Rothwell
@ 2016-05-02 11:17 ` Aneesh Kumar K.V
  0 siblings, 0 replies; 12+ messages in thread
From: Aneesh Kumar K.V @ 2016-05-02 11:17 UTC (permalink / raw)
  To: Stephen Rothwell, Andrew Morton; +Cc: linux-next, linux-kernel, Hugh Dickins

Stephen Rothwell <sfr@canb.auug.org.au> writes:

> Hi Andrew,
>
> Today's linux-next merge of the akpm-current tree got a conflict in:
>
>   arch/powerpc/include/asm/book3s/64/pgtable.h
>
> between commit:
>
>   dbaba7a16b7b ("powerpc/mm: THP is only available on hash64 as of now")
>
> from the powerpc tree and commit:
>
>   383b50a4e356 ("arch: fix has_transparent_hugepage()")
>
> from the akpm-current tree.
>
> I fixed it up (see below - the code moved) and can carry the fix as
> necessary. This is now fixed as far as linux-next is concerned, but any
> non trivial conflicts should be mentioned to your upstream maintainer
> when your tree is submitted for merging.  You may also want to consider
> cooperating with the maintainer of the conflicting tree to minimise any
> particularly complex conflicts.
>


looks good.

> -- 
> Cheers,
> Stephen Rothwell
>
> diff --cc arch/powerpc/include/asm/book3s/64/pgtable.h
> index 48dc76c13094,8fe6f6b48aa5..000000000000
> --- a/arch/powerpc/include/asm/book3s/64/pgtable.h
> +++ b/arch/powerpc/include/asm/book3s/64/pgtable.h
> @@@ -820,86 -265,9 +820,87 @@@ static inline int pmd_protnone(pmd_t pm
>   #define __HAVE_ARCH_PMD_WRITE
>   #define pmd_write(pmd)		pte_write(pmd_pte(pmd))
>   
>  +#ifdef CONFIG_TRANSPARENT_HUGEPAGE
>  +extern pmd_t pfn_pmd(unsigned long pfn, pgprot_t pgprot);
>  +extern pmd_t mk_pmd(struct page *page, pgprot_t pgprot);
>  +extern pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot);
>  +extern void set_pmd_at(struct mm_struct *mm, unsigned long addr,
>  +		       pmd_t *pmdp, pmd_t pmd);
>  +extern void update_mmu_cache_pmd(struct vm_area_struct *vma, unsigned long addr,
>  +				 pmd_t *pmd);
>  +extern int hash__has_transparent_hugepage(void);
> ++#define has_transparent_hugepage has_transparent_hugepage
>  +static inline int has_transparent_hugepage(void)
>  +{
>  +	if (radix_enabled())
>  +		return radix__has_transparent_hugepage();
>  +	return hash__has_transparent_hugepage();
>  +}
>  +
>  +static inline unsigned long
>  +pmd_hugepage_update(struct mm_struct *mm, unsigned long addr, pmd_t *pmdp,
>  +		    unsigned long clr, unsigned long set)
>  +{
>  +	if (radix_enabled())
>  +		return radix__pmd_hugepage_update(mm, addr, pmdp, clr, set);
>  +	return hash__pmd_hugepage_update(mm, addr, pmdp, clr, set);
>  +}
>  +
>  +static inline int pmd_large(pmd_t pmd)
>  +{
>  +	return !!(pmd_val(pmd) & _PAGE_PTE);
>  +}
>  +
>  +static inline pmd_t pmd_mknotpresent(pmd_t pmd)
>  +{
>  +	return __pmd(pmd_val(pmd) & ~_PAGE_PRESENT);
>  +}
>  +/*
>  + * For radix we should always find H_PAGE_HASHPTE zero. Hence
>  + * the below will work for radix too
>  + */
>  +static inline int __pmdp_test_and_clear_young(struct mm_struct *mm,
>  +					      unsigned long addr, pmd_t *pmdp)
>  +{
>  +	unsigned long old;
>  +
>  +	if ((pmd_val(*pmdp) & (_PAGE_ACCESSED | H_PAGE_HASHPTE)) == 0)
>  +		return 0;
>  +	old = pmd_hugepage_update(mm, addr, pmdp, _PAGE_ACCESSED, 0);
>  +	return ((old & _PAGE_ACCESSED) != 0);
>  +}
>  +
>  +#define __HAVE_ARCH_PMDP_SET_WRPROTECT
>  +static inline void pmdp_set_wrprotect(struct mm_struct *mm, unsigned long addr,
>  +				      pmd_t *pmdp)
>  +{
>  +
>  +	if ((pmd_val(*pmdp) & _PAGE_WRITE) == 0)
>  +		return;
>  +
>  +	pmd_hugepage_update(mm, addr, pmdp, _PAGE_WRITE, 0);
>  +}
>  +
>  +static inline int pmd_trans_huge(pmd_t pmd)
>  +{
>  +	if (radix_enabled())
>  +		return radix__pmd_trans_huge(pmd);
>  +	return hash__pmd_trans_huge(pmd);
>  +}
>  +
>  +#define __HAVE_ARCH_PMD_SAME
>  +static inline int pmd_same(pmd_t pmd_a, pmd_t pmd_b)
>  +{
>  +	if (radix_enabled())
>  +		return radix__pmd_same(pmd_a, pmd_b);
>  +	return hash__pmd_same(pmd_a, pmd_b);
>  +}
>  +
>   static inline pmd_t pmd_mkhuge(pmd_t pmd)
>   {
>  -	return __pmd(pmd_val(pmd) | (_PAGE_PTE | _PAGE_THP_HUGE));
>  +	if (radix_enabled())
>  +		return radix__pmd_mkhuge(pmd);
>  +	return hash__pmd_mkhuge(pmd);
>   }
>   
>   #define __HAVE_ARCH_PMDP_SET_ACCESS_FLAGS

^ permalink raw reply	[flat|nested] 12+ messages in thread

* linux-next: manual merge of the akpm-current tree with the powerpc tree
@ 2016-05-02  7:20 Stephen Rothwell
  2016-05-02 11:17 ` Aneesh Kumar K.V
  0 siblings, 1 reply; 12+ messages in thread
From: Stephen Rothwell @ 2016-05-02  7:20 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Hugh Dickins, Aneesh Kumar K.V

Hi Andrew,

Today's linux-next merge of the akpm-current tree got a conflict in:

  arch/powerpc/include/asm/book3s/64/pgtable.h

between commit:

  dbaba7a16b7b ("powerpc/mm: THP is only available on hash64 as of now")

from the powerpc tree and commit:

  383b50a4e356 ("arch: fix has_transparent_hugepage()")

from the akpm-current tree.

I fixed it up (see below - the code moved) and can carry the fix as
necessary. This is now fixed as far as linux-next is concerned, but any
non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging.  You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc arch/powerpc/include/asm/book3s/64/pgtable.h
index 48dc76c13094,8fe6f6b48aa5..000000000000
--- a/arch/powerpc/include/asm/book3s/64/pgtable.h
+++ b/arch/powerpc/include/asm/book3s/64/pgtable.h
@@@ -820,86 -265,9 +820,87 @@@ static inline int pmd_protnone(pmd_t pm
  #define __HAVE_ARCH_PMD_WRITE
  #define pmd_write(pmd)		pte_write(pmd_pte(pmd))
  
 +#ifdef CONFIG_TRANSPARENT_HUGEPAGE
 +extern pmd_t pfn_pmd(unsigned long pfn, pgprot_t pgprot);
 +extern pmd_t mk_pmd(struct page *page, pgprot_t pgprot);
 +extern pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot);
 +extern void set_pmd_at(struct mm_struct *mm, unsigned long addr,
 +		       pmd_t *pmdp, pmd_t pmd);
 +extern void update_mmu_cache_pmd(struct vm_area_struct *vma, unsigned long addr,
 +				 pmd_t *pmd);
 +extern int hash__has_transparent_hugepage(void);
++#define has_transparent_hugepage has_transparent_hugepage
 +static inline int has_transparent_hugepage(void)
 +{
 +	if (radix_enabled())
 +		return radix__has_transparent_hugepage();
 +	return hash__has_transparent_hugepage();
 +}
 +
 +static inline unsigned long
 +pmd_hugepage_update(struct mm_struct *mm, unsigned long addr, pmd_t *pmdp,
 +		    unsigned long clr, unsigned long set)
 +{
 +	if (radix_enabled())
 +		return radix__pmd_hugepage_update(mm, addr, pmdp, clr, set);
 +	return hash__pmd_hugepage_update(mm, addr, pmdp, clr, set);
 +}
 +
 +static inline int pmd_large(pmd_t pmd)
 +{
 +	return !!(pmd_val(pmd) & _PAGE_PTE);
 +}
 +
 +static inline pmd_t pmd_mknotpresent(pmd_t pmd)
 +{
 +	return __pmd(pmd_val(pmd) & ~_PAGE_PRESENT);
 +}
 +/*
 + * For radix we should always find H_PAGE_HASHPTE zero. Hence
 + * the below will work for radix too
 + */
 +static inline int __pmdp_test_and_clear_young(struct mm_struct *mm,
 +					      unsigned long addr, pmd_t *pmdp)
 +{
 +	unsigned long old;
 +
 +	if ((pmd_val(*pmdp) & (_PAGE_ACCESSED | H_PAGE_HASHPTE)) == 0)
 +		return 0;
 +	old = pmd_hugepage_update(mm, addr, pmdp, _PAGE_ACCESSED, 0);
 +	return ((old & _PAGE_ACCESSED) != 0);
 +}
 +
 +#define __HAVE_ARCH_PMDP_SET_WRPROTECT
 +static inline void pmdp_set_wrprotect(struct mm_struct *mm, unsigned long addr,
 +				      pmd_t *pmdp)
 +{
 +
 +	if ((pmd_val(*pmdp) & _PAGE_WRITE) == 0)
 +		return;
 +
 +	pmd_hugepage_update(mm, addr, pmdp, _PAGE_WRITE, 0);
 +}
 +
 +static inline int pmd_trans_huge(pmd_t pmd)
 +{
 +	if (radix_enabled())
 +		return radix__pmd_trans_huge(pmd);
 +	return hash__pmd_trans_huge(pmd);
 +}
 +
 +#define __HAVE_ARCH_PMD_SAME
 +static inline int pmd_same(pmd_t pmd_a, pmd_t pmd_b)
 +{
 +	if (radix_enabled())
 +		return radix__pmd_same(pmd_a, pmd_b);
 +	return hash__pmd_same(pmd_a, pmd_b);
 +}
 +
  static inline pmd_t pmd_mkhuge(pmd_t pmd)
  {
 -	return __pmd(pmd_val(pmd) | (_PAGE_PTE | _PAGE_THP_HUGE));
 +	if (radix_enabled())
 +		return radix__pmd_mkhuge(pmd);
 +	return hash__pmd_mkhuge(pmd);
  }
  
  #define __HAVE_ARCH_PMDP_SET_ACCESS_FLAGS

^ permalink raw reply	[flat|nested] 12+ messages in thread

* linux-next: manual merge of the akpm-current tree with the powerpc tree
@ 2016-03-04  7:49 Stephen Rothwell
  0 siblings, 0 replies; 12+ messages in thread
From: Stephen Rothwell @ 2016-03-04  7:49 UTC (permalink / raw)
  To: Andrew Morton, Michael Ellerman, Benjamin Herrenschmidt, linuxppc-dev
  Cc: linux-next, linux-kernel, Kirill A. Shutemov, Ebru Akagunduz

Hi all,

Today's linux-next merge of the akpm-current tree got a conflict in:

  mm/huge_memory.c

between commit:

  ff20c2e0acc5 ("mm: Some arch may want to use HPAGE_PMD related values as variables")

from the powerpc tree and commit:

  82fdbe051e29 ("mm: make optimistic check for swapin readahead")

from the akpm-current tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell

diff --cc mm/huge_memory.c
index 43b11a695113,5b38aa24566f..000000000000
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@@ -98,7 -100,8 +100,8 @@@ static DECLARE_WAIT_QUEUE_HEAD(khugepag
   * it would have happened if the vma was large enough during page
   * fault.
   */
 -static unsigned int khugepaged_max_ptes_none __read_mostly = HPAGE_PMD_NR-1;
 -static unsigned int khugepaged_max_ptes_swap __read_mostly = HPAGE_PMD_NR/8;
 +static unsigned int khugepaged_max_ptes_none __read_mostly;
++static unsigned int khugepaged_max_ptes_swap __read_mostly;
  
  static int khugepaged(void *none);
  static int khugepaged_slab_init(void);
@@@ -660,18 -691,6 +691,19 @@@ static int __init hugepage_init(void
  		return -EINVAL;
  	}
  
 +	khugepaged_pages_to_scan = HPAGE_PMD_NR * 8;
 +	khugepaged_max_ptes_none = HPAGE_PMD_NR - 1;
++	khugepaged_max_ptes_swap = HPAGE_PMD_NR / 8;
 +	/*
 +	 * hugepages can't be allocated by the buddy allocator
 +	 */
 +	MAYBE_BUILD_BUG_ON(HPAGE_PMD_ORDER >= MAX_ORDER);
 +	/*
 +	 * we use page->mapping and page->index in second tail page
 +	 * as list_head: assuming THP order >= 2
 +	 */
 +	MAYBE_BUILD_BUG_ON(HPAGE_PMD_ORDER < 2);
 +
  	err = hugepage_init_sysfs(&hugepage_kobj);
  	if (err)
  		goto err_sysfs;

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: linux-next: manual merge of the akpm-current tree with the powerpc tree
  2016-01-07 17:15   ` Aneesh Kumar K.V
@ 2016-01-07 20:03     ` Stephen Rothwell
  0 siblings, 0 replies; 12+ messages in thread
From: Stephen Rothwell @ 2016-01-07 20:03 UTC (permalink / raw)
  To: Aneesh Kumar K.V
  Cc: Andrew Morton, Michael Ellerman, Benjamin Herrenschmidt,
	linuxppc-dev, linux-next, linux-kernel

Hi Aneesh,

On Thu, 07 Jan 2016 22:45:19 +0530 "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> wrote:
>
> Stephen Rothwell <sfr@canb.auug.org.au> writes:
> 
> > This merge fix up patch now looks like this:  
> 
> 
> What about the #define pfn_pte part ? We don't need that now ?

That is done as part of the merge conflict resolution.  This is an
extra needed merge resolution patch due to code being moved between
files.  You can see the entire merge resolution using

  git diff-tree --cc 5a028bd9b7de

in next-20160107.

The #defines are there in

  arch/powerpc/include/asm/book3s/32/pgtable.h
  arch/powerpc/include/asm/book3s/64/hash.h
  arch/powerpc/include/asm/nohash/pgtable.h

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: linux-next: manual merge of the akpm-current tree with the powerpc tree
  2016-01-07  9:15 ` Stephen Rothwell
@ 2016-01-07 17:15   ` Aneesh Kumar K.V
  2016-01-07 20:03     ` Stephen Rothwell
  0 siblings, 1 reply; 12+ messages in thread
From: Aneesh Kumar K.V @ 2016-01-07 17:15 UTC (permalink / raw)
  To: Stephen Rothwell, Andrew Morton, Michael Ellerman,
	Benjamin Herrenschmidt, linuxppc-dev
  Cc: linux-next, linux-kernel

Stephen Rothwell <sfr@canb.auug.org.au> writes:

> This merge fix up patch now looks like this:


What about the #define pfn_pte part ? We don't need that now ?

>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Tue, 15 Dec 2015 16:50:42 +1100
> Subject: [PATCH] merge fix for "powerpc, thp: remove infrastructure for handling splitting PMDs"
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  arch/powerpc/include/asm/book3s/64/hash-64k.h | 12 ------------
>  arch/powerpc/include/asm/book3s/64/hash.h     | 11 +++--------
>  arch/powerpc/include/asm/book3s/64/pgtable.h  |  4 ----
>  3 files changed, 2 insertions(+), 24 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/book3s/64/hash-64k.h b/arch/powerpc/include/asm/book3s/64/hash-64k.h
> index 9e55e3b1fef0..849bbec80f7b 100644
> --- a/arch/powerpc/include/asm/book3s/64/hash-64k.h
> +++ b/arch/powerpc/include/asm/book3s/64/hash-64k.h
> @@ -256,13 +256,6 @@ static inline int pmd_trans_huge(pmd_t pmd)
>  		  (_PAGE_PTE | _PAGE_THP_HUGE));
>  }
>
> -static inline int pmd_trans_splitting(pmd_t pmd)
> -{
> -	if (pmd_trans_huge(pmd))
> -		return pmd_val(pmd) & _PAGE_SPLITTING;
> -	return 0;
> -}
> -
>  static inline int pmd_large(pmd_t pmd)
>  {
>  	return !!(pmd_val(pmd) & _PAGE_PTE);
> @@ -273,11 +266,6 @@ static inline pmd_t pmd_mknotpresent(pmd_t pmd)
>  	return __pmd(pmd_val(pmd) & ~_PAGE_PRESENT);
>  }
>
> -static inline pmd_t pmd_mksplitting(pmd_t pmd)
> -{
> -	return __pmd(pmd_val(pmd) | _PAGE_SPLITTING);
> -}
> -
>  #define __HAVE_ARCH_PMD_SAME
>  static inline int pmd_same(pmd_t pmd_a, pmd_t pmd_b)
>  {
> diff --git a/arch/powerpc/include/asm/book3s/64/hash.h b/arch/powerpc/include/asm/book3s/64/hash.h
> index 9e861b4378bd..b6827603e613 100644
> --- a/arch/powerpc/include/asm/book3s/64/hash.h
> +++ b/arch/powerpc/include/asm/book3s/64/hash.h
> @@ -36,11 +36,6 @@
>  #define _PAGE_SOFT_DIRTY	0x20000 /* software: software dirty tracking */
>
>  /*
> - * THP pages can't be special. So use the _PAGE_SPECIAL
> - */
> -#define _PAGE_SPLITTING _PAGE_SPECIAL
> -
> -/*
>   * We need to differentiate between explicit huge page and THP huge
>   * page, since THP huge page also need to track real subpage details
>   */
> @@ -49,9 +44,9 @@
>  /*
>   * set of bits not changed in pmd_modify.
>   */
> -#define _HPAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS |		\
> -			 _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_SPLITTING | \
> -			 _PAGE_THP_HUGE | _PAGE_PTE | _PAGE_SOFT_DIRTY)
> +#define _HPAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS | _PAGE_DIRTY | \
> +			 _PAGE_ACCESSED | _PAGE_THP_HUGE | _PAGE_PTE | \
> +			 _PAGE_SOFT_DIRTY)
>
>  #ifdef CONFIG_PPC_64K_PAGES
>  #include <asm/book3s/64/hash-64k.h>
> diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h
> index 03c1a5a21c0c..04022fad3708 100644
> --- a/arch/powerpc/include/asm/book3s/64/pgtable.h
> +++ b/arch/powerpc/include/asm/book3s/64/pgtable.h
> @@ -258,10 +258,6 @@ extern int pmdp_clear_flush_young(struct vm_area_struct *vma,
>  extern pmd_t pmdp_huge_get_and_clear(struct mm_struct *mm,
>  				     unsigned long addr, pmd_t *pmdp);
>
> -#define __HAVE_ARCH_PMDP_SPLITTING_FLUSH
> -extern void pmdp_splitting_flush(struct vm_area_struct *vma,
> -				 unsigned long address, pmd_t *pmdp);
> -
>  extern pmd_t pmdp_collapse_flush(struct vm_area_struct *vma,
>  				 unsigned long address, pmd_t *pmdp);
>  #define pmdp_collapse_flush pmdp_collapse_flush
>
>
> -- 
> Cheers,
> Stephen Rothwell                    sfr@canb.auug.org.au


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: linux-next: manual merge of the akpm-current tree with the powerpc tree
  2015-12-18  5:33 Stephen Rothwell
@ 2016-01-07  9:15 ` Stephen Rothwell
  2016-01-07 17:15   ` Aneesh Kumar K.V
  0 siblings, 1 reply; 12+ messages in thread
From: Stephen Rothwell @ 2016-01-07  9:15 UTC (permalink / raw)
  To: Andrew Morton, Michael Ellerman, Benjamin Herrenschmidt, linuxppc-dev
  Cc: linux-next, linux-kernel, Aneesh Kumar K.V

Hi all,

On Fri, 18 Dec 2015 16:33:51 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the akpm-current tree got a conflict in:
> 
>   arch/powerpc/include/asm/pgtable.h
> 
> between commit:
> 
>   ee4889c7bc2a ("powerpc/mm: Don't have generic headers introduce functions touching pte bits")
> 
> from the powerpc tree and commit:
> 
>   e0e8474c0d55 ("mm, dax, gpu: convert vm_insert_mixed to pfn_t")
> 
> from the akpm-current tree.
> 
> I fixed it up (the code being changed was moved from this file - I added
> the fix up patch below) and can carry the fix as necessary (no action
> is required).
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Fri, 18 Dec 2015 16:30:47 +1100
> Subject: [PATCH] mm, dax, gpu: merge fix for convert vm_insert_mixed to pfn_t
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  arch/powerpc/include/asm/book3s/32/pgtable.h | 1 +
>  arch/powerpc/include/asm/book3s/64/hash.h    | 1 +
>  arch/powerpc/include/asm/nohash/pgtable.h    | 1 +
>  3 files changed, 3 insertions(+)
> 
> diff --git a/arch/powerpc/include/asm/book3s/32/pgtable.h b/arch/powerpc/include/asm/book3s/32/pgtable.h
> index 38b33dcfcc9d..3ed3303c1295 100644
> --- a/arch/powerpc/include/asm/book3s/32/pgtable.h
> +++ b/arch/powerpc/include/asm/book3s/32/pgtable.h
> @@ -313,6 +313,7 @@ static inline int pte_present(pte_t pte)
>   * Even if PTEs can be unsigned long long, a PFN is always an unsigned
>   * long for now.
>   */
> +#define pfn_pte pfn_pte
>  static inline pte_t pfn_pte(unsigned long pfn, pgprot_t pgprot)
>  {
>  	return __pte(((pte_basic_t)(pfn) << PTE_RPN_SHIFT) |
> diff --git a/arch/powerpc/include/asm/book3s/64/hash.h b/arch/powerpc/include/asm/book3s/64/hash.h
> index 9e861b4378bd..6ab967d0da00 100644
> --- a/arch/powerpc/include/asm/book3s/64/hash.h
> +++ b/arch/powerpc/include/asm/book3s/64/hash.h
> @@ -410,6 +410,7 @@ static inline int pte_present(pte_t pte)
>   * Even if PTEs can be unsigned long long, a PFN is always an unsigned
>   * long for now.
>   */
> +#define pfn_pte pfn_pte
>  static inline pte_t pfn_pte(unsigned long pfn, pgprot_t pgprot)
>  {
>  	return __pte(((pte_basic_t)(pfn) << PTE_RPN_SHIFT) |
> diff --git a/arch/powerpc/include/asm/nohash/pgtable.h b/arch/powerpc/include/asm/nohash/pgtable.h
> index 1263c22d60d8..11e3767216c0 100644
> --- a/arch/powerpc/include/asm/nohash/pgtable.h
> +++ b/arch/powerpc/include/asm/nohash/pgtable.h
> @@ -49,6 +49,7 @@ static inline int pte_present(pte_t pte)
>   * Even if PTEs can be unsigned long long, a PFN is always an unsigned
>   * long for now.
>   */
> +#define pfn_pte pfn_pte
>  static inline pte_t pfn_pte(unsigned long pfn, pgprot_t pgprot) {
>  	return __pte(((pte_basic_t)(pfn) << PTE_RPN_SHIFT) |
>  		     pgprot_val(pgprot)); }
> -- 
> 2.6.2

This merge fix up patch now looks like this:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 15 Dec 2015 16:50:42 +1100
Subject: [PATCH] merge fix for "powerpc, thp: remove infrastructure for handling splitting PMDs"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/include/asm/book3s/64/hash-64k.h | 12 ------------
 arch/powerpc/include/asm/book3s/64/hash.h     | 11 +++--------
 arch/powerpc/include/asm/book3s/64/pgtable.h  |  4 ----
 3 files changed, 2 insertions(+), 24 deletions(-)

diff --git a/arch/powerpc/include/asm/book3s/64/hash-64k.h b/arch/powerpc/include/asm/book3s/64/hash-64k.h
index 9e55e3b1fef0..849bbec80f7b 100644
--- a/arch/powerpc/include/asm/book3s/64/hash-64k.h
+++ b/arch/powerpc/include/asm/book3s/64/hash-64k.h
@@ -256,13 +256,6 @@ static inline int pmd_trans_huge(pmd_t pmd)
 		  (_PAGE_PTE | _PAGE_THP_HUGE));
 }
 
-static inline int pmd_trans_splitting(pmd_t pmd)
-{
-	if (pmd_trans_huge(pmd))
-		return pmd_val(pmd) & _PAGE_SPLITTING;
-	return 0;
-}
-
 static inline int pmd_large(pmd_t pmd)
 {
 	return !!(pmd_val(pmd) & _PAGE_PTE);
@@ -273,11 +266,6 @@ static inline pmd_t pmd_mknotpresent(pmd_t pmd)
 	return __pmd(pmd_val(pmd) & ~_PAGE_PRESENT);
 }
 
-static inline pmd_t pmd_mksplitting(pmd_t pmd)
-{
-	return __pmd(pmd_val(pmd) | _PAGE_SPLITTING);
-}
-
 #define __HAVE_ARCH_PMD_SAME
 static inline int pmd_same(pmd_t pmd_a, pmd_t pmd_b)
 {
diff --git a/arch/powerpc/include/asm/book3s/64/hash.h b/arch/powerpc/include/asm/book3s/64/hash.h
index 9e861b4378bd..b6827603e613 100644
--- a/arch/powerpc/include/asm/book3s/64/hash.h
+++ b/arch/powerpc/include/asm/book3s/64/hash.h
@@ -36,11 +36,6 @@
 #define _PAGE_SOFT_DIRTY	0x20000 /* software: software dirty tracking */
 
 /*
- * THP pages can't be special. So use the _PAGE_SPECIAL
- */
-#define _PAGE_SPLITTING _PAGE_SPECIAL
-
-/*
  * We need to differentiate between explicit huge page and THP huge
  * page, since THP huge page also need to track real subpage details
  */
@@ -49,9 +44,9 @@
 /*
  * set of bits not changed in pmd_modify.
  */
-#define _HPAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS |		\
-			 _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_SPLITTING | \
-			 _PAGE_THP_HUGE | _PAGE_PTE | _PAGE_SOFT_DIRTY)
+#define _HPAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS | _PAGE_DIRTY | \
+			 _PAGE_ACCESSED | _PAGE_THP_HUGE | _PAGE_PTE | \
+			 _PAGE_SOFT_DIRTY)
 
 #ifdef CONFIG_PPC_64K_PAGES
 #include <asm/book3s/64/hash-64k.h>
diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h
index 03c1a5a21c0c..04022fad3708 100644
--- a/arch/powerpc/include/asm/book3s/64/pgtable.h
+++ b/arch/powerpc/include/asm/book3s/64/pgtable.h
@@ -258,10 +258,6 @@ extern int pmdp_clear_flush_young(struct vm_area_struct *vma,
 extern pmd_t pmdp_huge_get_and_clear(struct mm_struct *mm,
 				     unsigned long addr, pmd_t *pmdp);
 
-#define __HAVE_ARCH_PMDP_SPLITTING_FLUSH
-extern void pmdp_splitting_flush(struct vm_area_struct *vma,
-				 unsigned long address, pmd_t *pmdp);
-
 extern pmd_t pmdp_collapse_flush(struct vm_area_struct *vma,
 				 unsigned long address, pmd_t *pmdp);
 #define pmdp_collapse_flush pmdp_collapse_flush


-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

^ permalink raw reply	[flat|nested] 12+ messages in thread

* linux-next: manual merge of the akpm-current tree with the powerpc tree
@ 2015-12-18  5:33 Stephen Rothwell
  2016-01-07  9:15 ` Stephen Rothwell
  0 siblings, 1 reply; 12+ messages in thread
From: Stephen Rothwell @ 2015-12-18  5:33 UTC (permalink / raw)
  To: Andrew Morton, Michael Ellerman, Benjamin Herrenschmidt, linuxppc-dev
  Cc: linux-next, linux-kernel, Aneesh Kumar K.V

Hi Andrew,

Today's linux-next merge of the akpm-current tree got a conflict in:

  arch/powerpc/include/asm/pgtable.h

between commit:

  ee4889c7bc2a ("powerpc/mm: Don't have generic headers introduce functions touching pte bits")

from the powerpc tree and commit:

  e0e8474c0d55 ("mm, dax, gpu: convert vm_insert_mixed to pfn_t")

from the akpm-current tree.

I fixed it up (the code being changed was moved from this file - I added
the fix up patch below) and can carry the fix as necessary (no action
is required).

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 18 Dec 2015 16:30:47 +1100
Subject: [PATCH] mm, dax, gpu: merge fix for convert vm_insert_mixed to pfn_t

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/include/asm/book3s/32/pgtable.h | 1 +
 arch/powerpc/include/asm/book3s/64/hash.h    | 1 +
 arch/powerpc/include/asm/nohash/pgtable.h    | 1 +
 3 files changed, 3 insertions(+)

diff --git a/arch/powerpc/include/asm/book3s/32/pgtable.h b/arch/powerpc/include/asm/book3s/32/pgtable.h
index 38b33dcfcc9d..3ed3303c1295 100644
--- a/arch/powerpc/include/asm/book3s/32/pgtable.h
+++ b/arch/powerpc/include/asm/book3s/32/pgtable.h
@@ -313,6 +313,7 @@ static inline int pte_present(pte_t pte)
  * Even if PTEs can be unsigned long long, a PFN is always an unsigned
  * long for now.
  */
+#define pfn_pte pfn_pte
 static inline pte_t pfn_pte(unsigned long pfn, pgprot_t pgprot)
 {
 	return __pte(((pte_basic_t)(pfn) << PTE_RPN_SHIFT) |
diff --git a/arch/powerpc/include/asm/book3s/64/hash.h b/arch/powerpc/include/asm/book3s/64/hash.h
index 9e861b4378bd..6ab967d0da00 100644
--- a/arch/powerpc/include/asm/book3s/64/hash.h
+++ b/arch/powerpc/include/asm/book3s/64/hash.h
@@ -410,6 +410,7 @@ static inline int pte_present(pte_t pte)
  * Even if PTEs can be unsigned long long, a PFN is always an unsigned
  * long for now.
  */
+#define pfn_pte pfn_pte
 static inline pte_t pfn_pte(unsigned long pfn, pgprot_t pgprot)
 {
 	return __pte(((pte_basic_t)(pfn) << PTE_RPN_SHIFT) |
diff --git a/arch/powerpc/include/asm/nohash/pgtable.h b/arch/powerpc/include/asm/nohash/pgtable.h
index 1263c22d60d8..11e3767216c0 100644
--- a/arch/powerpc/include/asm/nohash/pgtable.h
+++ b/arch/powerpc/include/asm/nohash/pgtable.h
@@ -49,6 +49,7 @@ static inline int pte_present(pte_t pte)
  * Even if PTEs can be unsigned long long, a PFN is always an unsigned
  * long for now.
  */
+#define pfn_pte pfn_pte
 static inline pte_t pfn_pte(unsigned long pfn, pgprot_t pgprot) {
 	return __pte(((pte_basic_t)(pfn) << PTE_RPN_SHIFT) |
 		     pgprot_val(pgprot)); }
-- 
2.6.2

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: linux-next: manual merge of the akpm-current tree with the powerpc tree
  2015-12-15  5:53 Stephen Rothwell
  2015-12-15  6:44 ` Stephen Rothwell
@ 2015-12-15  9:37 ` Aneesh Kumar K.V
  1 sibling, 0 replies; 12+ messages in thread
From: Aneesh Kumar K.V @ 2015-12-15  9:37 UTC (permalink / raw)
  To: Stephen Rothwell, Andrew Morton, Michael Ellerman,
	Benjamin Herrenschmidt, linuxppc-dev
  Cc: linux-next, linux-kernel, Kirill A. Shutemov

Stephen Rothwell <sfr@canb.auug.org.au> writes:

> Hi Andrew,
>
> Today's linux-next merge of the akpm-current tree got conflicts in:
>
>   arch/powerpc/include/asm/nohash/64/pgtable.h
>   arch/powerpc/mm/pgtable_64.c
>
> between various commits from the powerpc tree and commits:
>
>   e56ebae0dd4c ("powerpc, thp: remove infrastructure for handling splitting PMDs")


For reference the web url for the patch

http://article.gmane.org/gmane.linux.kernel.mm/139654


>
> from the akpm-current tree.
>
> I used the powerpc tree version of the first and the akpm-current tree
> version of the second and then I applied the following merge fix patch:
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Tue, 15 Dec 2015 16:50:42 +1100
> Subject: [PATCH] merge fix for "powerpc, thp: remove infrastructure for
>  handling splitting PMDs"
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>


Looks good.
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>



> ---
>  arch/powerpc/include/asm/book3s/64/hash-64k.h | 12 ------------
>  arch/powerpc/include/asm/book3s/64/hash.h     | 10 ++--------
>  arch/powerpc/include/asm/book3s/64/pgtable.h  |  4 ----
>  3 files changed, 2 insertions(+), 24 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/book3s/64/hash-64k.h b/arch/powerpc/include/asm/book3s/64/hash-64k.h
> index 9f9942998587..f2072a4ca9e3 100644
> --- a/arch/powerpc/include/asm/book3s/64/hash-64k.h
> +++ b/arch/powerpc/include/asm/book3s/64/hash-64k.h
> @@ -256,13 +256,6 @@ static inline int pmd_trans_huge(pmd_t pmd)
>  		  (_PAGE_PTE | _PAGE_THP_HUGE));
>  }
>
> -static inline int pmd_trans_splitting(pmd_t pmd)
> -{
> -	if (pmd_trans_huge(pmd))
> -		return pmd_val(pmd) & _PAGE_SPLITTING;
> -	return 0;
> -}
> -
>  static inline int pmd_large(pmd_t pmd)
>  {
>  	return !!(pmd_val(pmd) & _PAGE_PTE);
> @@ -273,11 +266,6 @@ static inline pmd_t pmd_mknotpresent(pmd_t pmd)
>  	return __pmd(pmd_val(pmd) & ~_PAGE_PRESENT);
>  }
>
> -static inline pmd_t pmd_mksplitting(pmd_t pmd)
> -{
> -	return __pmd(pmd_val(pmd) | _PAGE_SPLITTING);
> -}
> -
>  #define __HAVE_ARCH_PMD_SAME
>  static inline int pmd_same(pmd_t pmd_a, pmd_t pmd_b)
>  {
> diff --git a/arch/powerpc/include/asm/book3s/64/hash.h b/arch/powerpc/include/asm/book3s/64/hash.h
> index 8b929e531758..4e69d9a273ed 100644
> --- a/arch/powerpc/include/asm/book3s/64/hash.h
> +++ b/arch/powerpc/include/asm/book3s/64/hash.h
> @@ -35,11 +35,6 @@
>  #define _PAGE_SPECIAL		0x10000 /* software: special page */
>
>  /*
> - * THP pages can't be special. So use the _PAGE_SPECIAL
> - */
> -#define _PAGE_SPLITTING _PAGE_SPECIAL
> -
> -/*
>   * We need to differentiate between explicit huge page and THP huge
>   * page, since THP huge page also need to track real subpage details
>   */
> @@ -48,9 +43,8 @@
>  /*
>   * set of bits not changed in pmd_modify.
>   */
> -#define _HPAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS |		\
> -			 _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_SPLITTING | \
> -			 _PAGE_THP_HUGE | _PAGE_PTE)
> +#define _HPAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS | _PAGE_DIRTY |
> +			 _PAGE_ACCESSED | _PAGE_THP_HUGE | _PAGE_PTE)
>
>  #ifdef CONFIG_PPC_64K_PAGES
>  #include <asm/book3s/64/hash-64k.h>
> diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h
> index a2d4e0e37067..6306d6565ee0 100644
> --- a/arch/powerpc/include/asm/book3s/64/pgtable.h
> +++ b/arch/powerpc/include/asm/book3s/64/pgtable.h
> @@ -232,10 +232,6 @@ extern int pmdp_clear_flush_young(struct vm_area_struct *vma,
>  extern pmd_t pmdp_huge_get_and_clear(struct mm_struct *mm,
>  				     unsigned long addr, pmd_t *pmdp);
>
> -#define __HAVE_ARCH_PMDP_SPLITTING_FLUSH
> -extern void pmdp_splitting_flush(struct vm_area_struct *vma,
> -				 unsigned long address, pmd_t *pmdp);
> -
>  extern pmd_t pmdp_collapse_flush(struct vm_area_struct *vma,
>  				 unsigned long address, pmd_t *pmdp);
>  #define pmdp_collapse_flush pmdp_collapse_flush
> -- 
> 2.6.2
>
> -- 
> Cheers,
> Stephen Rothwell                    sfr@canb.auug.org.au


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: linux-next: manual merge of the akpm-current tree with the powerpc tree
  2015-12-15  5:53 Stephen Rothwell
@ 2015-12-15  6:44 ` Stephen Rothwell
  2015-12-15  9:37 ` Aneesh Kumar K.V
  1 sibling, 0 replies; 12+ messages in thread
From: Stephen Rothwell @ 2015-12-15  6:44 UTC (permalink / raw)
  To: Andrew Morton, Michael Ellerman, Benjamin Herrenschmidt, linuxppc-dev
  Cc: linux-next, linux-kernel, Aneesh Kumar K.V, Kirill A. Shutemov

Hi Andrew,

On Tue, 15 Dec 2015 16:53:42 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> diff --git a/arch/powerpc/include/asm/book3s/64/hash.h b/arch/powerpc/include/asm/book3s/64/hash.h
> index 8b929e531758..4e69d9a273ed 100644
> --- a/arch/powerpc/include/asm/book3s/64/hash.h
> +++ b/arch/powerpc/include/asm/book3s/64/hash.h
> @@ -48,9 +43,8 @@
>  /*
>   * set of bits not changed in pmd_modify.
>   */
> -#define _HPAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS |		\
> -			 _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_SPLITTING | \
> -			 _PAGE_THP_HUGE | _PAGE_PTE)
> +#define _HPAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS | _PAGE_DIRTY |
                                                                           ^
I missed a backslash here which I fixed up in my tree.

> +			 _PAGE_ACCESSED | _PAGE_THP_HUGE | _PAGE_PTE)
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

^ permalink raw reply	[flat|nested] 12+ messages in thread

* linux-next: manual merge of the akpm-current tree with the powerpc tree
@ 2015-12-15  5:53 Stephen Rothwell
  2015-12-15  6:44 ` Stephen Rothwell
  2015-12-15  9:37 ` Aneesh Kumar K.V
  0 siblings, 2 replies; 12+ messages in thread
From: Stephen Rothwell @ 2015-12-15  5:53 UTC (permalink / raw)
  To: Andrew Morton, Michael Ellerman, Benjamin Herrenschmidt, linuxppc-dev
  Cc: linux-next, linux-kernel, Aneesh Kumar K.V, Kirill A. Shutemov

Hi Andrew,

Today's linux-next merge of the akpm-current tree got conflicts in:

  arch/powerpc/include/asm/nohash/64/pgtable.h
  arch/powerpc/mm/pgtable_64.c

between various commits from the powerpc tree and commits:

  e56ebae0dd4c ("powerpc, thp: remove infrastructure for handling splitting PMDs")

from the akpm-current tree.

I used the powerpc tree version of the first and the akpm-current tree
version of the second and then I applied the following merge fix patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 15 Dec 2015 16:50:42 +1100
Subject: [PATCH] merge fix for "powerpc, thp: remove infrastructure for
 handling splitting PMDs"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/include/asm/book3s/64/hash-64k.h | 12 ------------
 arch/powerpc/include/asm/book3s/64/hash.h     | 10 ++--------
 arch/powerpc/include/asm/book3s/64/pgtable.h  |  4 ----
 3 files changed, 2 insertions(+), 24 deletions(-)

diff --git a/arch/powerpc/include/asm/book3s/64/hash-64k.h b/arch/powerpc/include/asm/book3s/64/hash-64k.h
index 9f9942998587..f2072a4ca9e3 100644
--- a/arch/powerpc/include/asm/book3s/64/hash-64k.h
+++ b/arch/powerpc/include/asm/book3s/64/hash-64k.h
@@ -256,13 +256,6 @@ static inline int pmd_trans_huge(pmd_t pmd)
 		  (_PAGE_PTE | _PAGE_THP_HUGE));
 }
 
-static inline int pmd_trans_splitting(pmd_t pmd)
-{
-	if (pmd_trans_huge(pmd))
-		return pmd_val(pmd) & _PAGE_SPLITTING;
-	return 0;
-}
-
 static inline int pmd_large(pmd_t pmd)
 {
 	return !!(pmd_val(pmd) & _PAGE_PTE);
@@ -273,11 +266,6 @@ static inline pmd_t pmd_mknotpresent(pmd_t pmd)
 	return __pmd(pmd_val(pmd) & ~_PAGE_PRESENT);
 }
 
-static inline pmd_t pmd_mksplitting(pmd_t pmd)
-{
-	return __pmd(pmd_val(pmd) | _PAGE_SPLITTING);
-}
-
 #define __HAVE_ARCH_PMD_SAME
 static inline int pmd_same(pmd_t pmd_a, pmd_t pmd_b)
 {
diff --git a/arch/powerpc/include/asm/book3s/64/hash.h b/arch/powerpc/include/asm/book3s/64/hash.h
index 8b929e531758..4e69d9a273ed 100644
--- a/arch/powerpc/include/asm/book3s/64/hash.h
+++ b/arch/powerpc/include/asm/book3s/64/hash.h
@@ -35,11 +35,6 @@
 #define _PAGE_SPECIAL		0x10000 /* software: special page */
 
 /*
- * THP pages can't be special. So use the _PAGE_SPECIAL
- */
-#define _PAGE_SPLITTING _PAGE_SPECIAL
-
-/*
  * We need to differentiate between explicit huge page and THP huge
  * page, since THP huge page also need to track real subpage details
  */
@@ -48,9 +43,8 @@
 /*
  * set of bits not changed in pmd_modify.
  */
-#define _HPAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS |		\
-			 _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_SPLITTING | \
-			 _PAGE_THP_HUGE | _PAGE_PTE)
+#define _HPAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS | _PAGE_DIRTY |
+			 _PAGE_ACCESSED | _PAGE_THP_HUGE | _PAGE_PTE)
 
 #ifdef CONFIG_PPC_64K_PAGES
 #include <asm/book3s/64/hash-64k.h>
diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h
index a2d4e0e37067..6306d6565ee0 100644
--- a/arch/powerpc/include/asm/book3s/64/pgtable.h
+++ b/arch/powerpc/include/asm/book3s/64/pgtable.h
@@ -232,10 +232,6 @@ extern int pmdp_clear_flush_young(struct vm_area_struct *vma,
 extern pmd_t pmdp_huge_get_and_clear(struct mm_struct *mm,
 				     unsigned long addr, pmd_t *pmdp);
 
-#define __HAVE_ARCH_PMDP_SPLITTING_FLUSH
-extern void pmdp_splitting_flush(struct vm_area_struct *vma,
-				 unsigned long address, pmd_t *pmdp);
-
 extern pmd_t pmdp_collapse_flush(struct vm_area_struct *vma,
 				 unsigned long address, pmd_t *pmdp);
 #define pmdp_collapse_flush pmdp_collapse_flush
-- 
2.6.2

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, back to index

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-06  6:44 linux-next: manual merge of the akpm-current tree with the powerpc tree Stephen Rothwell
2018-12-07  1:40 ` Joel Fernandes
  -- strict thread matches above, loose matches on Subject: below --
2016-05-02  7:20 Stephen Rothwell
2016-05-02 11:17 ` Aneesh Kumar K.V
2016-03-04  7:49 Stephen Rothwell
2015-12-18  5:33 Stephen Rothwell
2016-01-07  9:15 ` Stephen Rothwell
2016-01-07 17:15   ` Aneesh Kumar K.V
2016-01-07 20:03     ` Stephen Rothwell
2015-12-15  5:53 Stephen Rothwell
2015-12-15  6:44 ` Stephen Rothwell
2015-12-15  9:37 ` Aneesh Kumar K.V

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org linux-kernel@archiver.kernel.org
	public-inbox-index lkml


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox