Re: [PATCH] m32r: Fix clearing of thread info fault code

2015-11-21 Thread Michael Büsch
On Thu, 19 Nov 2015 15:08:32 -0800 Andrew Morton wrote: > I don't think we should apply this unless someone can runtime test it. > Presumably the current code works OK, but we just don't know what > nasties the fixed version might expose. I fully agree. But who can test it? > The best I can

Re: [PATCH] m32r: Fix clearing of thread info fault code

2015-11-21 Thread Michael Büsch
On Thu, 19 Nov 2015 15:08:32 -0800 Andrew Morton wrote: > I don't think we should apply this unless someone can runtime test it. > Presumably the current code works OK, but we just don't know what > nasties the fixed version might expose. I fully agree. But who can

Re: [PATCH] m32r: Fix clearing of thread info fault code

2015-11-19 Thread Andrew Morton
On Thu, 19 Nov 2015 21:13:19 +0100 Michael B__sch wrote: > The expression (~0 >> x) will always yield all-ones, because the right > shift is an arithmetic right shift that will always shift ones in. > Hence the old fault code bits will not be cleared before being ORed > with the new fault code.

[PATCH] m32r: Fix clearing of thread info fault code

2015-11-19 Thread Michael Büsch
The expression (~0 >> x) will always yield all-ones, because the right shift is an arithmetic right shift that will always shift ones in. Hence the old fault code bits will not be cleared before being ORed with the new fault code. Fix this by forcing a logical right shift instead of an arithmetic

[PATCH] m32r: Fix clearing of thread info fault code

2015-11-19 Thread Michael Büsch
The expression (~0 >> x) will always yield all-ones, because the right shift is an arithmetic right shift that will always shift ones in. Hence the old fault code bits will not be cleared before being ORed with the new fault code. Fix this by forcing a logical right shift instead of an arithmetic

[PATCH] m32r: Fix clearing of thread info fault code

2015-11-19 Thread Michael Büsch
The expression (~0 >> x) will always yield all-ones, because the right shift is an arithmetic right shift that will always shift ones in. Hence the old fault code bits will not be cleared before being ORed with the new fault code. Fix this by forcing a logical right shift instead of an arithmetic

[PATCH] m32r: Fix clearing of thread info fault code

2015-11-19 Thread Michael Büsch
The expression (~0 >> x) will always yield all-ones, because the right shift is an arithmetic right shift that will always shift ones in. Hence the old fault code bits will not be cleared before being ORed with the new fault code. Fix this by forcing a logical right shift instead of an arithmetic

Re: [PATCH] m32r: Fix clearing of thread info fault code

2015-11-19 Thread Andrew Morton
On Thu, 19 Nov 2015 21:13:19 +0100 Michael B__sch wrote: > The expression (~0 >> x) will always yield all-ones, because the right > shift is an arithmetic right shift that will always shift ones in. > Hence the old fault code bits will not be cleared before being ORed > with the

[PATCH] m32r: Fix clearing of thread info fault code

2015-06-18 Thread Michael Büsch
The expression (~0 >> x) will always yield all-ones, because the right shift is an arithmetic right shift that will always shift ones in. Hence the old fault code bits will not be cleared before being ORed with the new fault code. Fix this by forcing a logical right shift instead of an arithmetic

[PATCH] m32r: Fix clearing of thread info fault code

2015-06-18 Thread Michael Büsch
The expression (~0 x) will always yield all-ones, because the right shift is an arithmetic right shift that will always shift ones in. Hence the old fault code bits will not be cleared before being ORed with the new fault code. Fix this by forcing a logical right shift instead of an arithmetic