diff for duplicates of <87bnncq2vz.fsf@linux.vnet.ibm.com> diff --git a/a/1.txt b/N1/1.txt index 543beed..2f7347c 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,8 +1,7 @@ Michael Ellerman <mpe@ellerman.id.au> writes: > On Mon, 2014-08-12 at 14:16:29 UTC, LEROY Christophe wrote: ->> Compilation with #define STRICT_MM_TYPECHECKS in arch/powerpc/include/as= -m/page.h +>> Compilation with #define STRICT_MM_TYPECHECKS in arch/powerpc/include/asm/page.h >> fails due to missing use of pgprot_val() when using pgprot_t objects. > > Hmm, looks like 64 bit doesn't build either. @@ -19,34 +18,29 @@ m/page.h > from ../include/linux/gfp.h:5, > from ../include/linux/mm.h:9, > from ../arch/powerpc/mm/tlb_hash64.c:25: -> ../arch/powerpc/mm/tlb_hash64.c: In function =E2=80=98__flush_hash_table_= -range=E2=80=99: -> ../arch/powerpc/include/asm/page.h:286:24: error: request for member =E2= -=80=98pte=E2=80=99 in something not a structure or union +> ../arch/powerpc/mm/tlb_hash64.c: In function ‘__flush_hash_table_range’: +> ../arch/powerpc/include/asm/page.h:286:24: error: request for member ‘pte’ in something not a structure or union > #define pte_val(x) ((x).pte) -> ^=20=20=20=20 -> ../arch/powerpc/mm/tlb_hash64.c:219:37: note: in expansion of macro =E2= -=80=98pte_val=E2=80=99 +> ^ +> ../arch/powerpc/mm/tlb_hash64.c:219:37: note: in expansion of macro ‘pte_val’ > trace_hugepage_invalidate(start, pte_val(pte)); -> ^=20=20=20=20 +> ^ > make[2]: *** [arch/powerpc/mm/tlb_hash64.o] Error 1 > Will send a proper patch after compile testing with other configs. The -kvm hunk is really ugly, will try to rework.=20 +kvm hunk is really ugly, will try to rework. -diff --git a/arch/powerpc/include/asm/kvm_book3s_64.h b/arch/powerpc/includ= -e/asm/kvm_book3s_64.h +diff --git a/arch/powerpc/include/asm/kvm_book3s_64.h b/arch/powerpc/include/asm/kvm_book3s_64.h index 0aa8179..cd0ff37 100644 --- a/arch/powerpc/include/asm/kvm_book3s_64.h +++ b/arch/powerpc/include/asm/kvm_book3s_64.h -@@ -291,11 +291,11 @@ static inline pte_t kvmppc_read_update_linux_pte(pte_= -t *ptep, int writing, - pte_t old_pte, new_pte =3D __pte(0); -=20 +@@ -291,11 +291,11 @@ static inline pte_t kvmppc_read_update_linux_pte(pte_t *ptep, int writing, + pte_t old_pte, new_pte = __pte(0); + while (1) { -- old_pte =3D pte_val(*ptep); -+ old_pte =3D *ptep; +- old_pte = pte_val(*ptep); ++ old_pte = *ptep; /* * wait until _PAGE_BUSY is clear then set it atomically */ @@ -55,22 +49,21 @@ t *ptep, int writing, cpu_relax(); continue; } -@@ -306,16 +306,18 @@ static inline pte_t kvmppc_read_update_linux_pte(pte_= -t *ptep, int writing, +@@ -306,16 +306,18 @@ static inline pte_t kvmppc_read_update_linux_pte(pte_t *ptep, int writing, return __pte(0); #endif /* If pte is not present return None */ - if (unlikely(!(old_pte & _PAGE_PRESENT))) + if (unlikely(!(pte_val(old_pte) & _PAGE_PRESENT))) return __pte(0); -=20 - new_pte =3D pte_mkyoung(old_pte); + + new_pte = pte_mkyoung(old_pte); if (writing && pte_write(old_pte)) - new_pte =3D pte_mkdirty(new_pte); -=20 -- if (old_pte =3D=3D __cmpxchg_u64((unsigned long *)ptep, old_pte, + new_pte = pte_mkdirty(new_pte); + +- if (old_pte == __cmpxchg_u64((unsigned long *)ptep, old_pte, - new_pte)) -+ if (pte_val(old_pte) =3D=3D __cmpxchg_u64((unsigned long *)ptep, ++ if (pte_val(old_pte) == __cmpxchg_u64((unsigned long *)ptep, + pte_val(old_pte), + pte_val(new_pte))) { break; @@ -78,29 +71,25 @@ t *ptep, int writing, } return new_pte; } -diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/include/asm/pag= -e.h +diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/include/asm/page.h index 26fe1ae..cc62ab9 100644 --- a/arch/powerpc/include/asm/page.h +++ b/arch/powerpc/include/asm/page.h @@ -278,7 +278,7 @@ extern long long virt_phys_offset; -=20 + #ifndef __ASSEMBLY__ -=20 + -#undef STRICT_MM_TYPECHECKS +#define STRICT_MM_TYPECHECKS 1 -=20 + #ifdef STRICT_MM_TYPECHECKS /* These are used to make use of C type-checking. */ -diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/= -pgtable.h +diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h index 316f9a5..3e29088 100644 --- a/arch/powerpc/include/asm/pgtable.h +++ b/arch/powerpc/include/asm/pgtable.h -@@ -77,8 +77,8 @@ static inline void pmdp_set_numa(struct mm_struct *mm, un= -signed long addr, - * which was inherited from x86. For the purposes of powerpc pte_basic_t a= -nd +@@ -77,8 +77,8 @@ static inline void pmdp_set_numa(struct mm_struct *mm, unsigned long addr, + * which was inherited from x86. For the purposes of powerpc pte_basic_t and * pmd_t are equivalent */ -#define pteval_t pte_basic_t @@ -114,8 +103,7 @@ diff --git a/arch/powerpc/mm/pgtable_64.c b/arch/powerpc/mm/pgtable_64.c index c8d709a..5162936 100644 --- a/arch/powerpc/mm/pgtable_64.c +++ b/arch/powerpc/mm/pgtable_64.c -@@ -714,7 +714,7 @@ void set_pmd_at(struct mm_struct *mm, unsigned long add= -r, +@@ -714,7 +714,7 @@ void set_pmd_at(struct mm_struct *mm, unsigned long addr, assert_spin_locked(&mm->page_table_lock); WARN_ON(!pmd_trans_huge(pmd)); #endif @@ -123,15 +111,14 @@ r, + trace_hugepage_set_pmd(addr, pmd_val(pmd)); return set_pte_at(mm, addr, pmdp_ptep(pmdp), pmd_pte(pmd)); } -=20 + diff --git a/arch/powerpc/mm/tlb_hash64.c b/arch/powerpc/mm/tlb_hash64.c index d2a94b8..c522969 100644 --- a/arch/powerpc/mm/tlb_hash64.c +++ b/arch/powerpc/mm/tlb_hash64.c -@@ -216,7 +216,7 @@ void __flush_hash_table_range(struct mm_struct *mm, uns= -igned long start, +@@ -216,7 +216,7 @@ void __flush_hash_table_range(struct mm_struct *mm, unsigned long start, continue; - pte =3D pte_val(*ptep); + pte = pte_val(*ptep); if (hugepage_shift) - trace_hugepage_invalidate(start, pte_val(pte)); + trace_hugepage_invalidate(start, pte); diff --git a/a/content_digest b/N1/content_digest index afbddfb..bf1291f 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -14,8 +14,7 @@ "Michael Ellerman <mpe@ellerman.id.au> writes:\n" "\n" "> On Mon, 2014-08-12 at 14:16:29 UTC, LEROY Christophe wrote:\n" - ">> Compilation with #define STRICT_MM_TYPECHECKS in arch/powerpc/include/as=\n" - "m/page.h\n" + ">> Compilation with #define STRICT_MM_TYPECHECKS in arch/powerpc/include/asm/page.h\n" ">> fails due to missing use of pgprot_val() when using pgprot_t objects.\n" ">\n" "> Hmm, looks like 64 bit doesn't build either.\n" @@ -32,34 +31,29 @@ "> from ../include/linux/gfp.h:5,\n" "> from ../include/linux/mm.h:9,\n" "> from ../arch/powerpc/mm/tlb_hash64.c:25:\n" - "> ../arch/powerpc/mm/tlb_hash64.c: In function =E2=80=98__flush_hash_table_=\n" - "range=E2=80=99:\n" - "> ../arch/powerpc/include/asm/page.h:286:24: error: request for member =E2=\n" - "=80=98pte=E2=80=99 in something not a structure or union\n" + "> ../arch/powerpc/mm/tlb_hash64.c: In function \342\200\230__flush_hash_table_range\342\200\231:\n" + "> ../arch/powerpc/include/asm/page.h:286:24: error: request for member \342\200\230pte\342\200\231 in something not a structure or union\n" "> #define pte_val(x) ((x).pte)\n" - "> ^=20=20=20=20\n" - "> ../arch/powerpc/mm/tlb_hash64.c:219:37: note: in expansion of macro =E2=\n" - "=80=98pte_val=E2=80=99\n" + "> ^ \n" + "> ../arch/powerpc/mm/tlb_hash64.c:219:37: note: in expansion of macro \342\200\230pte_val\342\200\231\n" "> trace_hugepage_invalidate(start, pte_val(pte));\n" - "> ^=20=20=20=20\n" + "> ^ \n" "> make[2]: *** [arch/powerpc/mm/tlb_hash64.o] Error 1\n" ">\n" "\n" "Will send a proper patch after compile testing with other configs. The\n" - "kvm hunk is really ugly, will try to rework.=20\n" + "kvm hunk is really ugly, will try to rework. \n" "\n" - "diff --git a/arch/powerpc/include/asm/kvm_book3s_64.h b/arch/powerpc/includ=\n" - "e/asm/kvm_book3s_64.h\n" + "diff --git a/arch/powerpc/include/asm/kvm_book3s_64.h b/arch/powerpc/include/asm/kvm_book3s_64.h\n" "index 0aa8179..cd0ff37 100644\n" "--- a/arch/powerpc/include/asm/kvm_book3s_64.h\n" "+++ b/arch/powerpc/include/asm/kvm_book3s_64.h\n" - "@@ -291,11 +291,11 @@ static inline pte_t kvmppc_read_update_linux_pte(pte_=\n" - "t *ptep, int writing,\n" - " \tpte_t old_pte, new_pte =3D __pte(0);\n" - "=20\n" + "@@ -291,11 +291,11 @@ static inline pte_t kvmppc_read_update_linux_pte(pte_t *ptep, int writing,\n" + " \tpte_t old_pte, new_pte = __pte(0);\n" + " \n" " \twhile (1) {\n" - "-\t\told_pte =3D pte_val(*ptep);\n" - "+\t\told_pte =3D *ptep;\n" + "-\t\told_pte = pte_val(*ptep);\n" + "+\t\told_pte = *ptep;\n" " \t\t/*\n" " \t\t * wait until _PAGE_BUSY is clear then set it atomically\n" " \t\t */\n" @@ -68,22 +62,21 @@ " \t\t\tcpu_relax();\n" " \t\t\tcontinue;\n" " \t\t}\n" - "@@ -306,16 +306,18 @@ static inline pte_t kvmppc_read_update_linux_pte(pte_=\n" - "t *ptep, int writing,\n" + "@@ -306,16 +306,18 @@ static inline pte_t kvmppc_read_update_linux_pte(pte_t *ptep, int writing,\n" " \t\t\treturn __pte(0);\n" " #endif\n" " \t\t/* If pte is not present return None */\n" "-\t\tif (unlikely(!(old_pte & _PAGE_PRESENT)))\n" "+\t\tif (unlikely(!(pte_val(old_pte) & _PAGE_PRESENT)))\n" " \t\t\treturn __pte(0);\n" - "=20\n" - " \t\tnew_pte =3D pte_mkyoung(old_pte);\n" + " \n" + " \t\tnew_pte = pte_mkyoung(old_pte);\n" " \t\tif (writing && pte_write(old_pte))\n" - " \t\t\tnew_pte =3D pte_mkdirty(new_pte);\n" - "=20\n" - "-\t\tif (old_pte =3D=3D __cmpxchg_u64((unsigned long *)ptep, old_pte,\n" + " \t\t\tnew_pte = pte_mkdirty(new_pte);\n" + " \n" + "-\t\tif (old_pte == __cmpxchg_u64((unsigned long *)ptep, old_pte,\n" "-\t\t\t\t\t new_pte))\n" - "+\t\tif (pte_val(old_pte) =3D=3D __cmpxchg_u64((unsigned long *)ptep,\n" + "+\t\tif (pte_val(old_pte) == __cmpxchg_u64((unsigned long *)ptep,\n" "+\t\t\t\t\t\t pte_val(old_pte),\n" "+\t\t\t\t\t\t pte_val(new_pte))) {\n" " \t\t\tbreak;\n" @@ -91,29 +84,25 @@ " \t}\n" " \treturn new_pte;\n" " }\n" - "diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/include/asm/pag=\n" - "e.h\n" + "diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/include/asm/page.h\n" "index 26fe1ae..cc62ab9 100644\n" "--- a/arch/powerpc/include/asm/page.h\n" "+++ b/arch/powerpc/include/asm/page.h\n" "@@ -278,7 +278,7 @@ extern long long virt_phys_offset;\n" - "=20\n" + " \n" " #ifndef __ASSEMBLY__\n" - "=20\n" + " \n" "-#undef STRICT_MM_TYPECHECKS\n" "+#define STRICT_MM_TYPECHECKS 1\n" - "=20\n" + " \n" " #ifdef STRICT_MM_TYPECHECKS\n" " /* These are used to make use of C type-checking. */\n" - "diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/=\n" - "pgtable.h\n" + "diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h\n" "index 316f9a5..3e29088 100644\n" "--- a/arch/powerpc/include/asm/pgtable.h\n" "+++ b/arch/powerpc/include/asm/pgtable.h\n" - "@@ -77,8 +77,8 @@ static inline void pmdp_set_numa(struct mm_struct *mm, un=\n" - "signed long addr,\n" - " * which was inherited from x86. For the purposes of powerpc pte_basic_t a=\n" - "nd\n" + "@@ -77,8 +77,8 @@ static inline void pmdp_set_numa(struct mm_struct *mm, unsigned long addr,\n" + " * which was inherited from x86. For the purposes of powerpc pte_basic_t and\n" " * pmd_t are equivalent\n" " */\n" "-#define pteval_t pte_basic_t\n" @@ -127,8 +116,7 @@ "index c8d709a..5162936 100644\n" "--- a/arch/powerpc/mm/pgtable_64.c\n" "+++ b/arch/powerpc/mm/pgtable_64.c\n" - "@@ -714,7 +714,7 @@ void set_pmd_at(struct mm_struct *mm, unsigned long add=\n" - "r,\n" + "@@ -714,7 +714,7 @@ void set_pmd_at(struct mm_struct *mm, unsigned long addr,\n" " \tassert_spin_locked(&mm->page_table_lock);\n" " \tWARN_ON(!pmd_trans_huge(pmd));\n" " #endif\n" @@ -136,15 +124,14 @@ "+\ttrace_hugepage_set_pmd(addr, pmd_val(pmd));\n" " \treturn set_pte_at(mm, addr, pmdp_ptep(pmdp), pmd_pte(pmd));\n" " }\n" - "=20\n" + " \n" "diff --git a/arch/powerpc/mm/tlb_hash64.c b/arch/powerpc/mm/tlb_hash64.c\n" "index d2a94b8..c522969 100644\n" "--- a/arch/powerpc/mm/tlb_hash64.c\n" "+++ b/arch/powerpc/mm/tlb_hash64.c\n" - "@@ -216,7 +216,7 @@ void __flush_hash_table_range(struct mm_struct *mm, uns=\n" - "igned long start,\n" + "@@ -216,7 +216,7 @@ void __flush_hash_table_range(struct mm_struct *mm, unsigned long start,\n" " \t\t\tcontinue;\n" - " \t\tpte =3D pte_val(*ptep);\n" + " \t\tpte = pte_val(*ptep);\n" " \t\tif (hugepage_shift)\n" "-\t\t\ttrace_hugepage_invalidate(start, pte_val(pte));\n" "+\t\t\ttrace_hugepage_invalidate(start, pte);\n" @@ -152,4 +139,4 @@ " \t\t\tcontinue;\n" " \t\tif (unlikely(hugepage_shift && pmd_trans_huge(*(pmd_t *)pte)))" -bab8b587bea82abc58b8d3413f277a41c053aee1520d446fd9564af2b452f5b4 +f2cf07eec284b5e6b22461f0edcd322c60ec8efbfd04ca75108ecbca5ce9779d
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.