Muli Ben-Yehuda wrote: > > Ok, let's try again: > > You're changing this (pageattr.c) > > asm volatile("clflush (%0)" :: "r" (adr + i)); > > into this: > > asm volatile("clflush %0" : "+m" (*(char __force*)(adr + i))); > > The original one calls clflush with (adr + i), the new one with (*(adr > + i)). Are these calls equivalent? Yes, they are. The parentheses which are part of the old assembly string has the same effect as the asterisk operator in C. The difference between the two is that the latter form allows the C compiler to select the addressing mode, which allows the full range of addressing modes, whereas the former forces it to use a single register indirect. -hpa - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH] x86: Create clflush() inline, remove hardcoded wbinvd
- From: Muli Ben-Yehuda <[email protected]>
- Re: [PATCH] x86: Create clflush() inline, remove hardcoded wbinvd
- From: "H. Peter Anvin" <[email protected]>
- Re: [PATCH] x86: Create clflush() inline, remove hardcoded wbinvd
- References:
- [PATCH] Use wbinvd() macro instead of raw inline assembly in .c files
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH] x86: Create clflush() inline, remove hardcoded wbinvd
- From: "H. Peter Anvin" <[email protected]>
- Re: [PATCH] x86: Create clflush() inline, remove hardcoded wbinvd
- From: Muli Ben-Yehuda <[email protected]>
- Re: [PATCH] x86: Create clflush() inline, remove hardcoded wbinvd
- From: "H. Peter Anvin" <[email protected]>
- Re: [PATCH] x86: Create clflush() inline, remove hardcoded wbinvd
- From: Muli Ben-Yehuda <[email protected]>
- Re: [PATCH] x86: Create clflush() inline, remove hardcoded wbinvd
- From: "H. Peter Anvin" <[email protected]>
- Re: [PATCH] x86: Create clflush() inline, remove hardcoded wbinvd
- From: Muli Ben-Yehuda <[email protected]>
- [PATCH] Use wbinvd() macro instead of raw inline assembly in .c files
- Prev by Date: RE: from where comes "__moddi3"?
- Next by Date: sound is interrupting with new kernels
- Previous by thread: Re: [PATCH] x86: Create clflush() inline, remove hardcoded wbinvd
- Next by thread: Re: [PATCH] x86: Create clflush() inline, remove hardcoded wbinvd
- Index(es):