* [PATCH 1/2] thp: fix update_mmu_cache_pmd() calls
@ 2012-11-16 9:55 Kirill A. Shutemov
2012-11-16 9:55 ` [PATCH 2/2] x86: convert update_mmu_cache() and update_mmu_cache_pmd() to functions Kirill A. Shutemov
2012-11-16 19:28 ` [PATCH 1/2] thp: fix update_mmu_cache_pmd() calls David Rientjes
0 siblings, 2 replies; 4+ messages in thread
From: Kirill A. Shutemov @ 2012-11-16 9:55 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-mm, Kirill A. Shutemov, Xiao Guangrong, Ingo Molnar,
Andrea Arcangeli, Peter Zijlstra, linux-kernel
From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
update_mmu_cache_pmd() takes pointer to pmd_t as third, not pmd_t.
mm/huge_memory.c: In function 'do_huge_pmd_numa_page':
mm/huge_memory.c:825:2: error: incompatible type for argument 3 of 'update_mmu_cache_pmd'
In file included from include/linux/mm.h:44:0,
from mm/huge_memory.c:8:
arch/mips/include/asm/pgtable.h:385:20: note: expected 'struct pmd_t *' but argument is of type 'pmd_t'
mm/huge_memory.c:895:2: error: incompatible type for argument 3 of 'update_mmu_cache_pmd'
In file included from include/linux/mm.h:44:0,
from mm/huge_memory.c:8:
arch/mips/include/asm/pgtable.h:385:20: note: expected 'struct pmd_t *' but argument is of type 'pmd_t'
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
---
mm/huge_memory.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 4489e16..2401a16 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -886,7 +886,7 @@ fixup:
/* change back to regular protection */
entry = pmd_modify(entry, vma->vm_page_prot);
set_pmd_at(mm, haddr, pmd, entry);
- update_mmu_cache_pmd(vma, address, entry);
+ update_mmu_cache_pmd(vma, address, &entry);
unlock:
spin_unlock(&mm->page_table_lock);
@@ -956,7 +956,7 @@ migrate:
page_add_new_anon_rmap(new_page, vma, haddr);
set_pmd_at(mm, haddr, pmd, entry);
- update_mmu_cache_pmd(vma, address, entry);
+ update_mmu_cache_pmd(vma, address, &entry);
page_remove_rmap(page);
spin_unlock(&mm->page_table_lock);
--
1.7.11.7
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] x86: convert update_mmu_cache() and update_mmu_cache_pmd() to functions
2012-11-16 9:55 [PATCH 1/2] thp: fix update_mmu_cache_pmd() calls Kirill A. Shutemov
@ 2012-11-16 9:55 ` Kirill A. Shutemov
2012-11-16 19:26 ` David Rientjes
2012-11-16 19:28 ` [PATCH 1/2] thp: fix update_mmu_cache_pmd() calls David Rientjes
1 sibling, 1 reply; 4+ messages in thread
From: Kirill A. Shutemov @ 2012-11-16 9:55 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-mm, Kirill A. Shutemov, Thomas Gleixner, Ingo Molnar,
H. Peter Anvin, x86, Rik van Riel, Peter Zijlstra,
Paul E. McKenney, David S. Miller, Joe Perches, linux-kernel
From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Converting macros to functions unhide type problems before changes will
be integrated and trigger problems on other architectures.
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
---
arch/x86/include/asm/pgtable.h | 12 ++++++++++++
arch/x86/include/asm/pgtable_32.h | 7 -------
arch/x86/include/asm/pgtable_64.h | 3 ---
3 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index a984cf9..ec08b47 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -775,6 +775,18 @@ static inline void clone_pgd_range(pgd_t *dst, pgd_t *src, int count)
memcpy(dst, src, count * sizeof(pgd_t));
}
+/*
+ * The x86 doesn't have any external MMU info: the kernel page
+ * tables contain all the necessary information.
+ */
+static inline void update_mmu_cache(struct vm_area_struct *vma,
+ unsigned long addr, pte_t *ptep)
+{
+}
+static inline void update_mmu_cache_pmd(struct vm_area_struct *vma,
+ unsigned long addr, pmd_t *pmd)
+{
+}
#include <asm-generic/pgtable.h>
#endif /* __ASSEMBLY__ */
diff --git a/arch/x86/include/asm/pgtable_32.h b/arch/x86/include/asm/pgtable_32.h
index 8faa215..9ee3221 100644
--- a/arch/x86/include/asm/pgtable_32.h
+++ b/arch/x86/include/asm/pgtable_32.h
@@ -66,13 +66,6 @@ do { \
__flush_tlb_one((vaddr)); \
} while (0)
-/*
- * The i386 doesn't have any external MMU info: the kernel page
- * tables contain all the necessary information.
- */
-#define update_mmu_cache(vma, address, ptep) do { } while (0)
-#define update_mmu_cache_pmd(vma, address, pmd) do { } while (0)
-
#endif /* !__ASSEMBLY__ */
/*
diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h
index 47356f9..615b0c7 100644
--- a/arch/x86/include/asm/pgtable_64.h
+++ b/arch/x86/include/asm/pgtable_64.h
@@ -142,9 +142,6 @@ static inline int pgd_large(pgd_t pgd) { return 0; }
#define pte_offset_map(dir, address) pte_offset_kernel((dir), (address))
#define pte_unmap(pte) ((void)(pte))/* NOP */
-#define update_mmu_cache(vma, address, ptep) do { } while (0)
-#define update_mmu_cache_pmd(vma, address, pmd) do { } while (0)
-
/* Encode and de-code a swap entry */
#if _PAGE_BIT_FILE < _PAGE_BIT_PROTNONE
#define SWP_TYPE_BITS (_PAGE_BIT_FILE - _PAGE_BIT_PRESENT - 1)
--
1.7.11.7
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] x86: convert update_mmu_cache() and update_mmu_cache_pmd() to functions
2012-11-16 9:55 ` [PATCH 2/2] x86: convert update_mmu_cache() and update_mmu_cache_pmd() to functions Kirill A. Shutemov
@ 2012-11-16 19:26 ` David Rientjes
0 siblings, 0 replies; 4+ messages in thread
From: David Rientjes @ 2012-11-16 19:26 UTC (permalink / raw)
To: Kirill A. Shutemov, Ingo Molnar, H. Peter Anvin, Thomas Gleixner
Cc: Andrew Morton, linux-mm, Rik van Riel, Peter Zijlstra,
Paul E. McKenney, David S. Miller, Joe Perches, x86,
linux-kernel
On Fri, 16 Nov 2012, Kirill A. Shutemov wrote:
> From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
>
> Converting macros to functions unhide type problems before changes will
> be integrated and trigger problems on other architectures.
>
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
[routing to x86 maintainers]
Acked-by: David Rientjes <rientjes@google.com>
Do you want to fix arch/s390/include/asm/pgtable.h in the same way in a
separate patch and send it to Martin Schwidefsky <schwidefsky@de.ibm.com>
and Heiko Carstens <heiko.carstens@de.ibm.com>?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] thp: fix update_mmu_cache_pmd() calls
2012-11-16 9:55 [PATCH 1/2] thp: fix update_mmu_cache_pmd() calls Kirill A. Shutemov
2012-11-16 9:55 ` [PATCH 2/2] x86: convert update_mmu_cache() and update_mmu_cache_pmd() to functions Kirill A. Shutemov
@ 2012-11-16 19:28 ` David Rientjes
1 sibling, 0 replies; 4+ messages in thread
From: David Rientjes @ 2012-11-16 19:28 UTC (permalink / raw)
To: Kirill A. Shutemov, Ingo Molnar, Peter Zijlstra
Cc: Andrew Morton, linux-mm, Xiao Guangrong, Andrea Arcangeli, linux-kernel
On Fri, 16 Nov 2012, Kirill A. Shutemov wrote:
> From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
>
> update_mmu_cache_pmd() takes pointer to pmd_t as third, not pmd_t.
>
> mm/huge_memory.c: In function 'do_huge_pmd_numa_page':
> mm/huge_memory.c:825:2: error: incompatible type for argument 3 of 'update_mmu_cache_pmd'
> In file included from include/linux/mm.h:44:0,
> from mm/huge_memory.c:8:
> arch/mips/include/asm/pgtable.h:385:20: note: expected 'struct pmd_t *' but argument is of type 'pmd_t'
> mm/huge_memory.c:895:2: error: incompatible type for argument 3 of 'update_mmu_cache_pmd'
> In file included from include/linux/mm.h:44:0,
> from mm/huge_memory.c:8:
> arch/mips/include/asm/pgtable.h:385:20: note: expected 'struct pmd_t *' but argument is of type 'pmd_t'
>
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
[routing to Ingo for numa/core, which this is based on]
Acked-by: David Rientjes <rientjes@google.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-11-16 19:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-16 9:55 [PATCH 1/2] thp: fix update_mmu_cache_pmd() calls Kirill A. Shutemov
2012-11-16 9:55 ` [PATCH 2/2] x86: convert update_mmu_cache() and update_mmu_cache_pmd() to functions Kirill A. Shutemov
2012-11-16 19:26 ` David Rientjes
2012-11-16 19:28 ` [PATCH 1/2] thp: fix update_mmu_cache_pmd() calls David Rientjes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).