Re: Oops with DCACHE_WORD_ACCESS and ocfs2, autofs4

From: Linus Torvalds
Date: Thu May 03 2012 - 14:24:12 EST


On Thu, May 3, 2012 at 11:13 AM, H. Peter Anvin <hpa@xxxxxxxxx> wrote:
>
> Just from a cleanliness point of view, I don't think you need the
> __WORDSUFFIX for any of these instructions (it is only required if it
> would be ambiguous, but the register names should deal with it.)

I get nervous about those kinds of things, but you are probably right.

> I think you want to drop the shl instruction.  You're loading what
> should end up at the LSB end of the register into the MSB end of the
> register, so shr is all you should need.

Right you are.

Jana - never mind that patch. It will avoid the page fault, but try to
use the wrong (truncated) name due to the extraneous left-shift of the
loaded value.

So use the attached one instead. It just removes the extra shift that
Peter noticed, and also allows the use of the word-at-a-time code with
DEBUG_PAGEALLOC so that I can test it myself too.

I left the instruction suffixes in place, although Peter is probably
right that the assembler will do the right thing.

Linus

Attachment: patch.diff
Description: Binary data