linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] MIPS: tools: Show result for loongson3-llsc-check
@ 2020-05-02  3:55 Tiezhu Yang
  2020-05-02  4:13 ` Jiaxun Yang
  2020-05-02  9:50 ` Thomas Bogendoerfer
  0 siblings, 2 replies; 3+ messages in thread
From: Tiezhu Yang @ 2020-05-02  3:55 UTC (permalink / raw)
  To: Thomas Bogendoerfer; +Cc: linux-mips, linux-kernel, Xuefeng Li, Sergei Shtylyov

It is better to show the result before loongson3-llsc-check exit,
otherwise we can see nothing if the return status is EXIT_SUCCESS,
it seems confusing.

E.g. without this patch:

[loongson@localhost tools]$ ./loongson3-llsc-check ../../../vmlinux
[loongson@localhost tools]$

With this patch:

[loongson@localhost tools]$ ./loongson3-llsc-check ../../../vmlinux
loongson3-llsc-check returns success
[loongson@localhost tools]$

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---

v2:
  - move "returns" after "loongson3-llsc-check" suggested by Sergei

 arch/mips/tools/loongson3-llsc-check.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/mips/tools/loongson3-llsc-check.c b/arch/mips/tools/loongson3-llsc-check.c
index 0ebddd0..bdbc7b4 100644
--- a/arch/mips/tools/loongson3-llsc-check.c
+++ b/arch/mips/tools/loongson3-llsc-check.c
@@ -303,5 +303,7 @@ int main(int argc, char *argv[])
 out_close:
 	close(vmlinux_fd);
 out_ret:
+	fprintf(stdout, "loongson3-llsc-check returns %s\n",
+		status ? "failure" : "success");
 	return status;
 }
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] MIPS: tools: Show result for loongson3-llsc-check
  2020-05-02  3:55 [PATCH v2] MIPS: tools: Show result for loongson3-llsc-check Tiezhu Yang
@ 2020-05-02  4:13 ` Jiaxun Yang
  2020-05-02  9:50 ` Thomas Bogendoerfer
  1 sibling, 0 replies; 3+ messages in thread
From: Jiaxun Yang @ 2020-05-02  4:13 UTC (permalink / raw)
  To: Tiezhu Yang, Thomas Bogendoerfer
  Cc: linux-mips, linux-kernel, Xuefeng Li, Sergei Shtylyov



于 2020年5月2日 GMT+08:00 上午11:55:01, Tiezhu Yang <yangtiezhu@loongson.cn> 写到:
>It is better to show the result before loongson3-llsc-check exit,
>otherwise we can see nothing if the return status is EXIT_SUCCESS,
>it seems confusing.
>
>E.g. without this patch:
>
>[loongson@localhost tools]$ ./loongson3-llsc-check ../../../vmlinux
>[loongson@localhost tools]$
>
>With this patch:
>
>[loongson@localhost tools]$ ./loongson3-llsc-check ../../../vmlinux
>loongson3-llsc-check returns success
>[loongson@localhost tools]$
>
>Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>

Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>

Btw,
Just learned from Loongson that the latest generation of Loongson-3
doesn't have LLSC errata, also for Loongson 3A R2/R3, use synci instead
of sync would give better performance.

For performance approach, we'd better develop a method
to enable/disable these workarounds at runtime, looks like smp_alternative[1]
that was already employed by x86 and arm64 can be ported to MIPS and
serves to this target.

I'm struggling with device drivers recently so wish somebody
can take a look at it.

Thanks.

[1]: https://lwn.net/Articles/164121/

>---
>
>v2:
>  - move "returns" after "loongson3-llsc-check" suggested by Sergei
>
> arch/mips/tools/loongson3-llsc-check.c | 2 ++
> 1 file changed, 2 insertions(+)
>
>diff --git a/arch/mips/tools/loongson3-llsc-check.c b/arch/mips/tools/loongson3-llsc-check.c
>index 0ebddd0..bdbc7b4 100644
>--- a/arch/mips/tools/loongson3-llsc-check.c
>+++ b/arch/mips/tools/loongson3-llsc-check.c
>@@ -303,5 +303,7 @@ int main(int argc, char *argv[])
> out_close:
> 	close(vmlinux_fd);
> out_ret:
>+	fprintf(stdout, "loongson3-llsc-check returns %s\n",
>+		status ? "failure" : "success");
> 	return status;
> }

-- 
Jiaxun Yang

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] MIPS: tools: Show result for loongson3-llsc-check
  2020-05-02  3:55 [PATCH v2] MIPS: tools: Show result for loongson3-llsc-check Tiezhu Yang
  2020-05-02  4:13 ` Jiaxun Yang
@ 2020-05-02  9:50 ` Thomas Bogendoerfer
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Bogendoerfer @ 2020-05-02  9:50 UTC (permalink / raw)
  To: Tiezhu Yang; +Cc: linux-mips, linux-kernel, Xuefeng Li, Sergei Shtylyov

On Sat, May 02, 2020 at 11:55:01AM +0800, Tiezhu Yang wrote:
> It is better to show the result before loongson3-llsc-check exit,
> otherwise we can see nothing if the return status is EXIT_SUCCESS,
> it seems confusing.
> 
> E.g. without this patch:
> 
> [loongson@localhost tools]$ ./loongson3-llsc-check ../../../vmlinux
> [loongson@localhost tools]$
> 
> With this patch:
> 
> [loongson@localhost tools]$ ./loongson3-llsc-check ../../../vmlinux
> loongson3-llsc-check returns success
> [loongson@localhost tools]$
> 
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> ---
> 
> v2:
>   - move "returns" after "loongson3-llsc-check" suggested by Sergei
> 
>  arch/mips/tools/loongson3-llsc-check.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/mips/tools/loongson3-llsc-check.c b/arch/mips/tools/loongson3-llsc-check.c
> index 0ebddd0..bdbc7b4 100644
> --- a/arch/mips/tools/loongson3-llsc-check.c
> +++ b/arch/mips/tools/loongson3-llsc-check.c
> @@ -303,5 +303,7 @@ int main(int argc, char *argv[])
>  out_close:
>  	close(vmlinux_fd);
>  out_ret:
> +	fprintf(stdout, "loongson3-llsc-check returns %s\n",
> +		status ? "failure" : "success");
>  	return status;
>  }
> -- 
> 2.1.0

I've applied your first version, please rebase to mips-next.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-02  9:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-02  3:55 [PATCH v2] MIPS: tools: Show result for loongson3-llsc-check Tiezhu Yang
2020-05-02  4:13 ` Jiaxun Yang
2020-05-02  9:50 ` Thomas Bogendoerfer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).