Re: [PATCH 6/6] [ARM] Use atomic_spin_lock/atomic_spin_unlock for irqdesc lock

Uwe Kleine-König
2009-08-07T20:54:11Z

Hello,

> diff --git a/mm/highmem.c b/mm/highmem.c
> index 66e915a..214eefd 100644
> --- a/mm/highmem.c
> +++ b/mm/highmem.c
> @@ -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;
ups, this hunk doesn't belong here. I will follow up with a corrected
patch.

Sorry
Uwe

--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |