[PATCH RT 9/6] [RFH] Build failure on 2.6.31-rc4-rt1 in mm/highmem.c
From: Uwe Kleine-König <hidden>
Date: 2009-08-09 09:37:07
Also in:
linux-mm, lkml
Subsystem:
memory management, memory management - core, the rest · Maintainers:
Andrew Morton, David Hildenbrand, Linus Torvalds
The two commits b38cb5a (mm: remove kmap_lock) and 3297e76 (highmem: atomic highmem kmap page pinning) conflict (without causing a text based conflict) because the latter introduces a usage of kmap_lock. The actual compiler output is (e.g. for ARCH=arm, stmp378x_defconfig): CC mm/highmem.o mm/highmem.c: In function 'pkmap_try_free': mm/highmem.c:116: warning: unused variable 'addr' mm/highmem.c: In function 'kmap_high_get': mm/highmem.c:372: error: 'kmap_lock' undeclared (first use in this function) mm/highmem.c:372: error: (Each undeclared identifier is reported only once mm/highmem.c:372: error: for each function it appears in.) mm/highmem.c:375: error: invalid operands to binary < (have 'atomic_t' and 'int') mm/highmem.c:376: error: wrong type argument to increment The problems in lines 116 and 375f are resolved by the patch below, but I don't know highmem enough to fix the remaining error. Moreover I don't have a machine that makes use of highmem. Signed-off-by: Uwe Kleine-König <redacted> Cc: Nicolas Pitre <redacted> Cc: MinChan Kim <redacted> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <redacted> Cc: Ingo Molnar <redacted> Cc: Thomas Gleixner <redacted> Cc: Li Zefan <redacted> Cc: Jens Axboe <redacted> Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org --- mm/highmem.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/mm/highmem.c b/mm/highmem.c
index 66e915a..4aa9eea 100644
--- a/mm/highmem.c
+++ b/mm/highmem.c@@ -113,10 +113,10 @@ static int pkmap_try_free(int pos) */ if (!pte_none(pkmap_page_table[pos])) { struct page *page = pte_page(pkmap_page_table[pos]); - unsigned long addr = PKMAP_ADDR(pos); pte_t *ptep = &pkmap_page_table[pos]; - VM_BUG_ON(addr != (unsigned long)page_address(page)); + VM_BUG_ON((unsigned long)PKMAP_ADDR(pos) != + (unsigned long)page_address(page)); if (!__set_page_address(page, NULL, pos)) BUG();
@@ -372,8 +372,8 @@ void *kmap_high_get(struct page *page) lock_kmap_any(flags); vaddr = (unsigned long)page_address(page); if (vaddr) { - BUG_ON(pkmap_count[PKMAP_NR(vaddr)] < 1); - pkmap_count[PKMAP_NR(vaddr)]++; + BUG_ON(atomic_read(&pkmap_count[PKMAP_NR(vaddr)]) < 1); + atomic_add(1, pkmap_count[PKMAP_NR(vaddr)]); } unlock_kmap_any(flags); return (void*) vaddr;
--
1.6.3.3
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>