All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Aleksandar Rikalo" <aleksandar.rikalo@syrmia.com>,
	"Alexander von Gluck IV" <kallisti5@unixzen.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Thomas Huth" <thuth@redhat.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Richard Zak" <richard.j.zak@gmail.com>,
	"Leon Alrae" <leon.alrae@imgtec.com>,
	"Aurelien Jarno" <aurelien@aurel32.net>
Subject: [PATCH 1/4] target/mips: Fix UHI error values
Date: Sun,  4 Jul 2021 19:07:33 +0200	[thread overview]
Message-ID: <20210704170736.617895-2-f4bug@amsat.org> (raw)
In-Reply-To: <20210704170736.617895-1-f4bug@amsat.org>

The UHI support was posted *before* [1] the specification was
released, and merged (commit 2c44b19c199) around the same time
[2], using Linux kernel errno values.
Update to use the spec values.

[1] https://lists.gnu.org/archive/html/qemu-devel/2015-02/msg05387.html
[2] https://lists.gnu.org/archive/html/qemu-devel/2015-06/msg05231.html

Fixes: 2c44b19c199 ("target-mips: convert host to MIPS errno values when required")
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 target/mips/tcg/sysemu/mips-semi.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/target/mips/tcg/sysemu/mips-semi.c b/target/mips/tcg/sysemu/mips-semi.c
index 77108b0b1a9..3b1939365c4 100644
--- a/target/mips/tcg/sysemu/mips-semi.c
+++ b/target/mips/tcg/sysemu/mips-semi.c
@@ -1,6 +1,8 @@
 /*
  * Unified Hosting Interface syscalls.
  *
+ * Specifications: MD01069 Reference Manual (rev 1.1.6, 06 Jul 2015)
+ *
  * Copyright (c) 2015 Imagination Technologies
  *
  * This library is free software; you can redistribute it and/or
@@ -74,14 +76,17 @@ enum UHIOpenFlags {
     UHIOpen_EXCL   = 0x800
 };
 
-/* Errno values taken from asm-mips/errno.h */
+/*
+ * Unified Hosting Interface (rev 1.1.6)
+ * Appendix A. "Error values"
+ */
 static const uint16_t host_to_mips_errno[] = {
-    [ENAMETOOLONG] = 78,
+    [ENAMETOOLONG] = 91,
 #ifdef EOVERFLOW
-    [EOVERFLOW]    = 79,
+    [EOVERFLOW]    = 139,
 #endif
 #ifdef ELOOP
-    [ELOOP]        = 90,
+    [ELOOP]        = 92,
 #endif
 };
 
-- 
2.31.1



  reply	other threads:[~2021-07-04 17:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-04 17:07 [PATCH 0/4] target/mips: Rewrite UHI errno_mips() to allow building on Haiku OS Philippe Mathieu-Daudé
2021-07-04 17:07 ` Philippe Mathieu-Daudé [this message]
2021-07-04 17:07 ` [PATCH 2/4] target/mips: Rename UHI err -> host_errno Philippe Mathieu-Daudé
2021-07-04 17:07 ` [PATCH 3/4] target/mips: Rewrite UHI errno_mips() using GHashTable Philippe Mathieu-Daudé
2021-07-04 17:25   ` Peter Maydell
2021-07-04 18:25     ` Philippe Mathieu-Daudé
2021-07-04 18:38   ` Thomas Huth
2021-07-04 18:44     ` Philippe Mathieu-Daudé
2021-07-04 17:07 ` [PATCH 4/4] target/mips: Complete UHI errno list and log unexpected errors Philippe Mathieu-Daudé
2021-07-04 17:23   ` Peter Maydell
2021-07-04 18:25     ` Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210704170736.617895-2-f4bug@amsat.org \
    --to=f4bug@amsat.org \
    --cc=aleksandar.rikalo@syrmia.com \
    --cc=alex.bennee@linaro.org \
    --cc=aurelien@aurel32.net \
    --cc=kallisti5@unixzen.com \
    --cc=leon.alrae@imgtec.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=richard.j.zak@gmail.com \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.