[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFzaWQV-f7PynpwCNy2J5WATnYVbfVT_tnq=AJFByd-HrQ@mail.gmail.com>
Date: Tue, 8 Oct 2013 12:05:32 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Fengguang Wu <fengguang.wu@...el.com>,
Richard Henderson <rth@...ddle.net>,
Jakub Jelinek <jakub@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [x86] BUG: unable to handle kernel paging request at 00740060
On Tue, Oct 8, 2013 at 11:51 AM, Oleg Nesterov <oleg@...hat.com> wrote:
>
> I do not really understand inline assembly constraints, but I'll ask
> anyway.
>
> +#define __GEN_RMWcc(fullop, var, cc, ...) \
> +do { \
> + asm volatile goto (fullop "; j" cc " %l[cc_label]" \
> + : : "m" (var), ## __VA_ARGS__ \
> ^^^^^^^^^
>
> don't we need
>
> "+m" (var)
We have a memory clobber instead. So the memory is marked as input and
clobbered.
And we'd love to mark it "+m", but "ask goto" cannot have outputs.
For the serializing ones, the memory clobber is ok - they have barrier
semantics anyway. But we'd actually *want* to use "asm goto" for some
cases where the memory clobber is too big of a hammer, so if we ever
get input/output constraints to "asm goto" we'll be happy.
Of course, right now it looks like we shouldn't be in a rush to use
"asm goto" at all...
Linus
--
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