[lkml]   [2009]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH RT 9/6] [RFH] Build failure on 2.6.31-rc4-rt1 in mm/highmem.c
The two commits

b38cb5a (mm: remove kmap_lock)


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 <>
Cc: Nicolas Pitre <>
Cc: MinChan Kim <>
Cc: Andrew Morton <>
Cc: Peter Zijlstra <>
Cc: Ingo Molnar <>
Cc: Thomas Gleixner <>
Cc: Li Zefan <>
Cc: Jens Axboe <>
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))
@@ -372,8 +372,8 @@ void *kmap_high_get(struct page *page)
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)]);
return (void*) vaddr;
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2009-08-09 11:41    [W:0.238 / U:0.068 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site