linux-mips
[Top] [All Lists]

Re: [PATCH 1/2] MIPS: Loongson, add sync before target of branch between

To: YunQiang Su <syq@debian.org>
Subject: Re: [PATCH 1/2] MIPS: Loongson, add sync before target of branch between llsc
From: Paul Burton <paul.burton@mips.com>
Date: Wed, 9 Jan 2019 22:08:46 +0000
Accept-language: en-US
Authentication-results: spf=none (sender IP is ) smtp.mailfrom=pburton@wavecomp.com;
Cc: Paul Burton <pburton@wavecomp.com>, "linux-mips@vger.kernel.org" <linux-mips@vger.kernel.org>, "chehc@lemote.com" <chehc@lemote.com>, "zhangfx@lemote.com" <zhangfx@lemote.com>, "wuzhangjin@gmail.com" <wuzhangjin@gmail.com>, "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>, Yunqiang Su <ysu@wavecomp.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wavesemi.onmicrosoft.com; s=selector1-wavecomp-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mmFQ8mKLGAVs8zlbYM1iB7Fs2xvPKMo4VMrMyCL1wd4=; b=os2s35l/RFPEANpSJcorxVDdhNWqL9EL6XtjbI4fCwh5Cr6MxO4OYckznLk5BqqV4RPfxv9zB6hYcAgKxCupIhmYBiF3HaaR2ykARMEEZjKtOeKJfULTqjyZlWAg03JxLE9kQ3gNgpQ7ksdM5qTqIC3+SHvlPdv4qxICqlvF7V8=
In-reply-to: <20190105150037.30261-1-syq@debian.org>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20190105150037.30261-1-syq@debian.org>
Sender: linux-mips-bounce@linux-mips.org
Spamdiagnosticmetadata: NSPM
Spamdiagnosticoutput: 1:99
Thread-index: AQHUpQeBAWrYYUkmtUGq4PuZ5oHDz6WnhbYA
Thread-topic: [PATCH 1/2] MIPS: Loongson, add sync before target of branch between llsc
User-agent: NeoMutt/20180716
Hi YunQiang,

On Sat, Jan 05, 2019 at 11:00:36PM +0800, YunQiang Su wrote:
> Loongson 2G/2H/3A/3B is quite weak sync'ed. If there is a branch,
> and the target is not in the scope of ll/sc or lld/scd, a sync is
> needed at the postion of target.

OK, so is this the same issue that the second patch in the series is
working around or a different one?

I'm pretty confused at this point about what the actual bugs are in
these various Loongson CPUs. Could someone provide an actual errata
writeup describing the bugs in detail?

What does "in the scope of ll/sc" mean?

What happens if a branch target is not "in the scope of ll/sc"?

How does the sync help?

Are jumps affected, or just branches?

Does this affect userland as well as the kernel?

...and probably more questions depending upon the answers to these ones.

> Loongson doesn't plan to fix this problem in future, so we add the
> sync here for any condition.

So are you saying that future Loongson CPUs will all be buggy too, and
someone there has said that they consider this to be OK..? I really
really hope that is not true.

If hardware people say they're not going to fix their bugs then working
around them is definitely not going to be a priority. It's one thing if
a CPU designer says "oops, my bad, work around this & I'll fix it next
time". It's quite another for them to say they're not interested in
fixing their bugs at all.

Thanks,
    Paul

<Prev in Thread] Current Thread [Next in Thread>