Re: Why does test_bit() take a volatile addr?

2013-09-22 Thread Rusty Russell
Rob Landley writes: > On 09/15/2013 11:08:35 PM, Rusty Russell wrote: >> Predates git, does anyone remember the rationale? > > Depends which git: http://landley.net/kdocs/fullhist/ :) Not useful. See Geert's more helpful response. Cheers, Rusty. -- To unsubscribe from this list: send the line

Re: Why does test_bit() take a volatile addr?

2013-09-22 Thread Rob Landley
On 09/15/2013 11:08:35 PM, Rusty Russell wrote: Predates git, does anyone remember the rationale? Depends which git: http://landley.net/kdocs/fullhist/ :) Rob-- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More

Re: Why does test_bit() take a volatile addr?

2013-09-22 Thread Rob Landley
On 09/15/2013 11:08:35 PM, Rusty Russell wrote: Predates git, does anyone remember the rationale? Depends which git: http://landley.net/kdocs/fullhist/ :) Rob-- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More

Re: Why does test_bit() take a volatile addr?

2013-09-22 Thread Rusty Russell
Rob Landley r...@landley.net writes: On 09/15/2013 11:08:35 PM, Rusty Russell wrote: Predates git, does anyone remember the rationale? Depends which git: http://landley.net/kdocs/fullhist/ :) Not useful. See Geert's more helpful response. Cheers, Rusty. -- To unsubscribe from this list:

Re: Why does test_bit() take a volatile addr?

2013-09-16 Thread Linus Torvalds
On Mon, Sep 16, 2013 at 12:08 AM, Rusty Russell wrote: > Predates git, does anyone remember the rationale? > > ie: > int test_bit(int nr, const volatile unsigned long *addr) Both of Stephen Rothwell's guesses are correct. One reason is that we used to use "volatile" a lot more than we

Re: Why does test_bit() take a volatile addr?

2013-09-16 Thread Oliver Neukum
On Mon, 2013-09-16 at 11:44 +0300, Michael S. Tsirkin wrote: > On Mon, Sep 16, 2013 at 10:40:00AM +0200, Oliver Neukum wrote: > > On Mon, 2013-09-16 at 13:38 +0930, Rusty Russell wrote: > > > Predates git, does anyone remember the rationale? > > > > > > ie: > > > int test_bit(int nr,

Re: Why does test_bit() take a volatile addr?

2013-09-16 Thread Michael S. Tsirkin
On Mon, Sep 16, 2013 at 06:02:31PM +1000, Stephen Rothwell wrote: > Hi Michael, > > On Mon, 16 Sep 2013 10:26:03 +0300 "Michael S. Tsirkin" > wrote: > > > > On Mon, Sep 16, 2013 at 04:53:44PM +1000, Stephen Rothwell wrote: > > > > > > On Mon, 16 Sep 2013 13:38:35 +0930 Rusty Russell > > >

Re: Why does test_bit() take a volatile addr?

2013-09-16 Thread Michael S. Tsirkin
On Mon, Sep 16, 2013 at 10:40:00AM +0200, Oliver Neukum wrote: > On Mon, 2013-09-16 at 13:38 +0930, Rusty Russell wrote: > > Predates git, does anyone remember the rationale? > > > > ie: > > int test_bit(int nr, const volatile unsigned long *addr) > > > > I noticed because gcc failed to

Re: Why does test_bit() take a volatile addr?

2013-09-16 Thread Oliver Neukum
On Mon, 2013-09-16 at 13:38 +0930, Rusty Russell wrote: > Predates git, does anyone remember the rationale? > > ie: > int test_bit(int nr, const volatile unsigned long *addr) > > I noticed because gcc failed to elimiate some code in a patch I was > playing with. > > I'm nervous about

Re: Why does test_bit() take a volatile addr?

2013-09-16 Thread Michael S. Tsirkin
On Mon, Sep 16, 2013 at 01:38:35PM +0930, Rusty Russell wrote: > Predates git, does anyone remember the rationale? > > ie: > int test_bit(int nr, const volatile unsigned long *addr) > > I noticed because gcc failed to elimiate some code in a patch I was > playing with. > > I'm nervous

Re: Why does test_bit() take a volatile addr?

2013-09-16 Thread Geert Uytterhoeven
On Mon, Sep 16, 2013 at 6:08 AM, Rusty Russell wrote: > Predates git, does anyone remember the rationale? > > ie: > int test_bit(int nr, const volatile unsigned long *addr) That's why we have full-history-linux ;-) Unfortunately it doesn't show the rationale, as this change also

Re: Why does test_bit() take a volatile addr?

2013-09-16 Thread Stephen Rothwell
Hi Michael, On Mon, 16 Sep 2013 10:26:03 +0300 "Michael S. Tsirkin" wrote: > > On Mon, Sep 16, 2013 at 04:53:44PM +1000, Stephen Rothwell wrote: > > > > On Mon, 16 Sep 2013 13:38:35 +0930 Rusty Russell > > wrote: > > > > > > Predates git, does anyone remember the rationale? > > > > > > ie: >

Re: Why does test_bit() take a volatile addr?

2013-09-16 Thread Michael S. Tsirkin
On Mon, Sep 16, 2013 at 04:53:44PM +1000, Stephen Rothwell wrote: > Hi Rusty, > > On Mon, 16 Sep 2013 13:38:35 +0930 Rusty Russell > wrote: > > > > Predates git, does anyone remember the rationale? > > > > ie: > > int test_bit(int nr, const volatile unsigned long *addr) > > Because we

Re: Why does test_bit() take a volatile addr?

2013-09-16 Thread Stephen Rothwell
Hi Rusty, On Mon, 16 Sep 2013 13:38:35 +0930 Rusty Russell wrote: > > Predates git, does anyone remember the rationale? > > ie: > int test_bit(int nr, const volatile unsigned long *addr) Because we sometimes pass volatile pointers to it and gcc will complain if you pass a volatile to a

Why does test_bit() take a volatile addr?

2013-09-16 Thread Rusty Russell
Predates git, does anyone remember the rationale? ie: int test_bit(int nr, const volatile unsigned long *addr) I noticed because gcc failed to elimiate some code in a patch I was playing with. I'm nervous about subtle bugs involved in ripping it out, even if noone knows why. Should I

Why does test_bit() take a volatile addr?

2013-09-16 Thread Rusty Russell
Predates git, does anyone remember the rationale? ie: int test_bit(int nr, const volatile unsigned long *addr) I noticed because gcc failed to elimiate some code in a patch I was playing with. I'm nervous about subtle bugs involved in ripping it out, even if noone knows why. Should I

Re: Why does test_bit() take a volatile addr?

2013-09-16 Thread Stephen Rothwell
Hi Rusty, On Mon, 16 Sep 2013 13:38:35 +0930 Rusty Russell ru...@rustcorp.com.au wrote: Predates git, does anyone remember the rationale? ie: int test_bit(int nr, const volatile unsigned long *addr) Because we sometimes pass volatile pointers to it and gcc will complain if you pass

Re: Why does test_bit() take a volatile addr?

2013-09-16 Thread Michael S. Tsirkin
On Mon, Sep 16, 2013 at 04:53:44PM +1000, Stephen Rothwell wrote: Hi Rusty, On Mon, 16 Sep 2013 13:38:35 +0930 Rusty Russell ru...@rustcorp.com.au wrote: Predates git, does anyone remember the rationale? ie: int test_bit(int nr, const volatile unsigned long *addr)

Re: Why does test_bit() take a volatile addr?

2013-09-16 Thread Stephen Rothwell
Hi Michael, On Mon, 16 Sep 2013 10:26:03 +0300 Michael S. Tsirkin m...@redhat.com wrote: On Mon, Sep 16, 2013 at 04:53:44PM +1000, Stephen Rothwell wrote: On Mon, 16 Sep 2013 13:38:35 +0930 Rusty Russell ru...@rustcorp.com.au wrote: Predates git, does anyone remember the

Re: Why does test_bit() take a volatile addr?

2013-09-16 Thread Geert Uytterhoeven
On Mon, Sep 16, 2013 at 6:08 AM, Rusty Russell ru...@rustcorp.com.au wrote: Predates git, does anyone remember the rationale? ie: int test_bit(int nr, const volatile unsigned long *addr) That's why we have full-history-linux ;-) Unfortunately it doesn't show the rationale, as this

Re: Why does test_bit() take a volatile addr?

2013-09-16 Thread Michael S. Tsirkin
On Mon, Sep 16, 2013 at 01:38:35PM +0930, Rusty Russell wrote: Predates git, does anyone remember the rationale? ie: int test_bit(int nr, const volatile unsigned long *addr) I noticed because gcc failed to elimiate some code in a patch I was playing with. I'm nervous about

Re: Why does test_bit() take a volatile addr?

2013-09-16 Thread Oliver Neukum
On Mon, 2013-09-16 at 13:38 +0930, Rusty Russell wrote: Predates git, does anyone remember the rationale? ie: int test_bit(int nr, const volatile unsigned long *addr) I noticed because gcc failed to elimiate some code in a patch I was playing with. I'm nervous about subtle bugs

Re: Why does test_bit() take a volatile addr?

2013-09-16 Thread Michael S. Tsirkin
On Mon, Sep 16, 2013 at 10:40:00AM +0200, Oliver Neukum wrote: On Mon, 2013-09-16 at 13:38 +0930, Rusty Russell wrote: Predates git, does anyone remember the rationale? ie: int test_bit(int nr, const volatile unsigned long *addr) I noticed because gcc failed to elimiate some

Re: Why does test_bit() take a volatile addr?

2013-09-16 Thread Michael S. Tsirkin
On Mon, Sep 16, 2013 at 06:02:31PM +1000, Stephen Rothwell wrote: Hi Michael, On Mon, 16 Sep 2013 10:26:03 +0300 Michael S. Tsirkin m...@redhat.com wrote: On Mon, Sep 16, 2013 at 04:53:44PM +1000, Stephen Rothwell wrote: On Mon, 16 Sep 2013 13:38:35 +0930 Rusty Russell

Re: Why does test_bit() take a volatile addr?

2013-09-16 Thread Oliver Neukum
On Mon, 2013-09-16 at 11:44 +0300, Michael S. Tsirkin wrote: On Mon, Sep 16, 2013 at 10:40:00AM +0200, Oliver Neukum wrote: On Mon, 2013-09-16 at 13:38 +0930, Rusty Russell wrote: Predates git, does anyone remember the rationale? ie: int test_bit(int nr, const volatile

Re: Why does test_bit() take a volatile addr?

2013-09-16 Thread Linus Torvalds
On Mon, Sep 16, 2013 at 12:08 AM, Rusty Russell ru...@rustcorp.com.au wrote: Predates git, does anyone remember the rationale? ie: int test_bit(int nr, const volatile unsigned long *addr) Both of Stephen Rothwell's guesses are correct. One reason is that we used to use volatile a lot