lkml.org 
[lkml]   [2009]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH RT 9/6] [RFH] Build failure on 2.6.31-rc4-rt1 in mm/highmem.c
Date
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 <u.kleine-koenig@pengutronix.de>
Cc: Nicolas Pitre <nico@marvell.com>
Cc: MinChan Kim <minchan.kim@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  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