Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1156991 > unrolled thread
| Started by | David Daney <ddaney.cavm@gmail.com> |
|---|---|
| First post | 2015-06-03 02:00 +0200 |
| Last post | 2015-06-03 04:00 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 1/3] MIPS: R6: Use lightweight SYNC instruction in smp_* memory barriers David Daney <ddaney.cavm@gmail.com> - 2015-06-03 02:00 +0200
Re: [PATCH 1/3] MIPS: R6: Use lightweight SYNC instruction in smp_* memory barriers Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> - 2015-06-03 04:00 +0200
| From | David Daney <ddaney.cavm@gmail.com> |
|---|---|
| Date | 2015-06-03 02:00 +0200 |
| Subject | Re: [PATCH 1/3] MIPS: R6: Use lightweight SYNC instruction in smp_* memory barriers |
| Message-ID | <px4g9-8sG-13@gated-at.bofh.it> |
On 06/02/2015 09:15 AM, Maciej W. Rozycki wrote:
> On Tue, 2 Jun 2015, James Hogan wrote:
>
>>> diff --git a/arch/mips/include/asm/barrier.h b/arch/mips/include/asm/barrier.h
>>> index 2b8bbbcb9be0..d2a63abfc7c6 100644
>>> --- a/arch/mips/include/asm/barrier.h
>>> +++ b/arch/mips/include/asm/barrier.h
>>> @@ -96,9 +96,15 @@
>>> # define smp_rmb() barrier()
>>> # define smp_wmb() __syncw()
>>> # else
>>> +# ifdef CONFIG_MIPS_LIGHTWEIGHT_SYNC
>>> +# define smp_mb() __asm__ __volatile__("sync 0x10" : : :"memory")
>>> +# define smp_rmb() __asm__ __volatile__("sync 0x13" : : :"memory")
>>> +# define smp_wmb() __asm__ __volatile__("sync 0x4" : : :"memory")
>>
>> binutils appears to support the sync_mb, sync_rmb, sync_wmb aliases
>> since version 2.21. Can we safely use them?
>
> I suggest that we don't -- we still officially support binutils 2.12 and
> have other places where we even use `.word' to insert instructions current
> versions of binutils properly handle. It may be worth noting in a comment
> though that these encodings correspond to these operations that you named.
>
Surely the other MIPSr6 instructions are not supported in binutils 2.12
either. So if it is for r6, why not require modern tools, and put
something user readable in here?
David Daney
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> |
|---|---|
| Date | 2015-06-03 04:00 +0200 |
| Message-ID | <px68i-2Kb-3@gated-at.bofh.it> |
| In reply to | #1156991 |
On 06/02/2015 04:56 PM, David Daney wrote: > On 06/02/2015 09:15 AM, Maciej W. Rozycki wrote: >> On Tue, 2 Jun 2015, James Hogan wrote: >> >>> >>> binutils appears to support the sync_mb, sync_rmb, sync_wmb aliases >>> since version 2.21. Can we safely use them? >> >> I suggest that we don't -- we still officially support binutils >> 2.12 and >> have other places where we even use `.word' to insert instructions >> current >> versions of binutils properly handle. It may be worth noting in a >> comment >> though that these encodings correspond to these operations that you >> named. >> > > Surely the other MIPSr6 instructions are not supported in binutils > 2.12 either. So if it is for r6, why not require modern tools, and > put something user readable in here? > > No, it can be used for MIPS R2 also. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web