qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] linux-user: Add support for /proc/cpuinfo on hppa platform
@ 2020-04-24 21:06 Helge Deller
  2020-04-24 21:50 ` Richard Henderson
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Helge Deller @ 2020-04-24 21:06 UTC (permalink / raw)
  To: Riku Voipio, Laurent Vivier, qemu-devel

Provide an own /proc/cpuinfo file for the hppa (parisc) platform.

Signed-off-by: Helge Deller <deller@gmx.de>

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 05f03919ff..ebf0d38321 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -7438,6 +7435,18 @@ static int open_cpuinfo(void *cpu_env, int fd)
 }
 #endif

+#if defined(TARGET_HPPA)
+static int open_cpuinfo(void *cpu_env, int fd)
+{
+    dprintf(fd, "cpu family\t: PA-RISC 1.1e\n");
+    dprintf(fd, "cpu\t\t: PA7300LC (PCX-L2)\n");
+    dprintf(fd, "capabilities\t: os32\n");
+    dprintf(fd, "model\t\t: 9000/778/B160L\n");
+    dprintf(fd, "model name\t: Merlin L2 160 QEMU (9000/778/B160L)\n");
+    return 0;
+}
+#endif
+
 #if defined(TARGET_M68K)
 static int open_hardware(void *cpu_env, int fd)
 {
@@ -7462,7 +7471,7 @@ static int do_openat(void *cpu_env, int dirfd, const char *pathname, int flags,
 #if defined(HOST_WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN)
         { "/proc/net/route", open_net_route, is_proc },
 #endif
-#if defined(TARGET_SPARC)
+#if defined(TARGET_SPARC) || defined(TARGET_HPPA)
         { "/proc/cpuinfo", open_cpuinfo, is_proc },
 #endif
 #if defined(TARGET_M68K)


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

* Re: [PATCH] linux-user: Add support for /proc/cpuinfo on hppa platform
  2020-04-24 21:06 [PATCH] linux-user: Add support for /proc/cpuinfo on hppa platform Helge Deller
@ 2020-04-24 21:50 ` Richard Henderson
  2020-04-25  8:14 ` Laurent Vivier
  2020-05-27 14:34 ` Laurent Vivier
  2 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2020-04-24 21:50 UTC (permalink / raw)
  To: Helge Deller, Riku Voipio, Laurent Vivier, qemu-devel

On 4/24/20 2:06 PM, Helge Deller wrote:
> Provide an own /proc/cpuinfo file for the hppa (parisc) platform.

"our own" perhaps?

> Signed-off-by: Helge Deller <deller@gmx.de>

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~


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

* Re: [PATCH] linux-user: Add support for /proc/cpuinfo on hppa platform
  2020-04-24 21:06 [PATCH] linux-user: Add support for /proc/cpuinfo on hppa platform Helge Deller
  2020-04-24 21:50 ` Richard Henderson
@ 2020-04-25  8:14 ` Laurent Vivier
  2020-05-27 14:34 ` Laurent Vivier
  2 siblings, 0 replies; 4+ messages in thread
From: Laurent Vivier @ 2020-04-25  8:14 UTC (permalink / raw)
  To: Helge Deller, Riku Voipio, qemu-devel

Le 24/04/2020 à 23:06, Helge Deller a écrit :
> Provide an own /proc/cpuinfo file for the hppa (parisc) platform.
> 
> Signed-off-by: Helge Deller <deller@gmx.de>
> 
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 05f03919ff..ebf0d38321 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -7438,6 +7435,18 @@ static int open_cpuinfo(void *cpu_env, int fd)
>  }
>  #endif
> 
> +#if defined(TARGET_HPPA)
> +static int open_cpuinfo(void *cpu_env, int fd)
> +{
> +    dprintf(fd, "cpu family\t: PA-RISC 1.1e\n");
> +    dprintf(fd, "cpu\t\t: PA7300LC (PCX-L2)\n");
> +    dprintf(fd, "capabilities\t: os32\n");
> +    dprintf(fd, "model\t\t: 9000/778/B160L\n");
> +    dprintf(fd, "model name\t: Merlin L2 160 QEMU (9000/778/B160L)\n");
> +    return 0;
> +}
> +#endif
> +
>  #if defined(TARGET_M68K)
>  static int open_hardware(void *cpu_env, int fd)
>  {
> @@ -7462,7 +7471,7 @@ static int do_openat(void *cpu_env, int dirfd, const char *pathname, int flags,
>  #if defined(HOST_WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN)
>          { "/proc/net/route", open_net_route, is_proc },
>  #endif
> -#if defined(TARGET_SPARC)
> +#if defined(TARGET_SPARC) || defined(TARGET_HPPA)
>          { "/proc/cpuinfo", open_cpuinfo, is_proc },
>  #endif
>  #if defined(TARGET_M68K)
> 

Reviewed-by: Laurent Vivier <laurent@vivier.eu>


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

* Re: [PATCH] linux-user: Add support for /proc/cpuinfo on hppa platform
  2020-04-24 21:06 [PATCH] linux-user: Add support for /proc/cpuinfo on hppa platform Helge Deller
  2020-04-24 21:50 ` Richard Henderson
  2020-04-25  8:14 ` Laurent Vivier
@ 2020-05-27 14:34 ` Laurent Vivier
  2 siblings, 0 replies; 4+ messages in thread
From: Laurent Vivier @ 2020-05-27 14:34 UTC (permalink / raw)
  To: Helge Deller, Riku Voipio, qemu-devel

Le 24/04/2020 à 23:06, Helge Deller a écrit :
> Provide an own /proc/cpuinfo file for the hppa (parisc) platform.
> 
> Signed-off-by: Helge Deller <deller@gmx.de>
> 
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 05f03919ff..ebf0d38321 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -7438,6 +7435,18 @@ static int open_cpuinfo(void *cpu_env, int fd)
>  }
>  #endif
> 
> +#if defined(TARGET_HPPA)
> +static int open_cpuinfo(void *cpu_env, int fd)
> +{
> +    dprintf(fd, "cpu family\t: PA-RISC 1.1e\n");
> +    dprintf(fd, "cpu\t\t: PA7300LC (PCX-L2)\n");
> +    dprintf(fd, "capabilities\t: os32\n");
> +    dprintf(fd, "model\t\t: 9000/778/B160L\n");
> +    dprintf(fd, "model name\t: Merlin L2 160 QEMU (9000/778/B160L)\n");
> +    return 0;
> +}
> +#endif
> +
>  #if defined(TARGET_M68K)
>  static int open_hardware(void *cpu_env, int fd)
>  {
> @@ -7462,7 +7471,7 @@ static int do_openat(void *cpu_env, int dirfd, const char *pathname, int flags,
>  #if defined(HOST_WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN)
>          { "/proc/net/route", open_net_route, is_proc },
>  #endif
> -#if defined(TARGET_SPARC)
> +#if defined(TARGET_SPARC) || defined(TARGET_HPPA)
>          { "/proc/cpuinfo", open_cpuinfo, is_proc },
>  #endif
>  #if defined(TARGET_M68K)
> 

Applied to my linux-user branch.

Thanks,
Laurent



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

end of thread, other threads:[~2020-05-27 14:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-24 21:06 [PATCH] linux-user: Add support for /proc/cpuinfo on hppa platform Helge Deller
2020-04-24 21:50 ` Richard Henderson
2020-04-25  8:14 ` Laurent Vivier
2020-05-27 14:34 ` Laurent Vivier

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).