[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <961aa3350806190520m28edf130x3bb40d1ced56a303@mail.gmail.com>
Date: Thu, 19 Jun 2008 21:20:47 +0900
From: "Akinobu Mita" <akinobu.mita@...il.com>
To: "Ingo Molnar" <mingo@...e.hu>
Cc: "Linus Torvalds" <torvalds@...ux-foundation.org>,
"Jeremy Fitzhardinge" <jeremy@...p.org>, benh@...nel.crashing.org,
xen-devel <xen-devel@...ts.xensource.com>,
"Peter Zijlstra" <a.p.zijlstra@...llo.nl>,
kvm-devel <kvm-devel@...ts.sourceforge.net>, x86@...nel.org,
LKML <linux-kernel@...r.kernel.org>,
"Virtualization Mailing List" <virtualization@...ts.osdl.org>,
"Hugh Dickins" <hugh@...itas.com>,
"Thomas Gleixner" <tglx@...utronix.de>
Subject: Re: [PATCH 1 of 4] mm: add a ptep_modify_prot transaction abstraction
> Below is the commit, it needed a small amount of massaging to apply the
> void * -> unsigned long * change in the x86/bitops topic.
So you need to change this line
> +#define CONST_MASK_ADDR BITOP_ADDR(addr + (nr>>3))
to be
#define CONST_MASK_ADDR BITOP_ADDR((void *)addr + (nr>>3))
or something like this. Otherwise it will get wrong address in set_bit
> -static inline void set_bit(int nr, volatile unsigned long *addr)
> +static inline void set_bit(unsigned int nr, volatile unsigned long *addr)
> {
> - asm volatile(LOCK_PREFIX "bts %1,%0" : ADDR : "Ir" (nr) : "memory");
> + if (IS_IMMEDIATE(nr))
> + asm volatile(LOCK_PREFIX "orb %1,%0" : CONST_MASK_ADDR : "i" (CONST_MASK) : "memory");
> + else
> + asm volatile(LOCK_PREFIX "bts %1,%0" : ADDR : "Ir" (nr) : "memory");
> }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists