Messages in this thread | | | Date | Mon, 09 Mar 2009 21:11:12 -0400 (EDT) | From | Nicolas Pitre <> | Subject | Re: [PATCH] atomic highmem kmap page pinning |
| |
On Mon, 9 Mar 2009, Andrew Morton wrote:
> On Sat, 07 Mar 2009 17:42:44 -0500 (EST) > Nicolas Pitre <nico@cam.org> wrote: > > > > > Discussion about this patch is settling, so I'd like to know if there > > are more comments, or if official ACKs could be provided. If people > > agree I'd like to carry this patch in my ARM highmem patch series since > > a couple things depend on this. > > > > Andrew: You seemed OK with the original one. Does this one pass your > > grottiness test? > > > > Anyone else? > > OK by me.
Thanks.
> > +/* > > + * Most architectures have no use for kmap_high_get(), so let's abstract > > + * the disabling of IRQ out of the locking in that case to save on a > > + * potential useless overhead. > > + */ > > +#ifdef ARCH_NEEDS_KMAP_HIGH_GET > > +#define spin_lock_kmap() spin_lock_irq(&kmap_lock) > > +#define spin_unlock_kmap() spin_unlock_irq(&kmap_lock) > > +#define spin_lock_kmap_any(flags) spin_lock_irqsave(&kmap_lock, flags) > > +#define spin_unlock_kmap_any(flags) spin_unlock_irqrestore(&kmap_lock, flags) > > +#else > > +#define spin_lock_kmap() spin_lock(&kmap_lock) > > +#define spin_unlock_kmap() spin_unlock(&kmap_lock) > > +#define spin_lock_kmap_any(flags) \ > > + do { spin_lock(&kmap_lock); (void)(flags); } while (0) > > +#define spin_unlock_kmap_any(flags) \ > > + do { spin_unlock(&kmap_lock); (void)(flags); } while (0) > > +#endif > > It's a little bit misleading to discover that a "function" called > spin_lock_kmap() secretly does an irq_disable(). Perhaps just remove > the "spin_" from all these identifiers?
OK, done.
Nicolas
| |