Patchwork [1/2] linux-user: Remove unused code

login
register
mail settings
Submitter Stefan Weil
Date Oct. 3, 2011, 8:43 p.m.
Message ID <1317674600-19083-2-git-send-email-sw@weilnetz.de>
Download mbox | patch
Permalink /patch/117503/
State Accepted
Headers show

Comments

Stefan Weil - Oct. 3, 2011, 8:43 p.m.
The code is unused since 8 years, so remove it.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
 linux-user/signal.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
Stefan Weil - Oct. 3, 2011, 9:12 p.m.
Am 03.10.2011 22:43, schrieb Stefan Weil:
> The code is unused since 8 years, so remove it.
>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
> linux-user/signal.c | 5 +----
> 1 files changed, 1 insertions(+), 4 deletions(-)
>
> diff --git a/linux-user/signal.c b/linux-user/signal.c
> index 89276eb..40c5eb1 100644
> --- a/linux-user/signal.c
> +++ b/linux-user/signal.c
> @@ -1274,10 +1274,7 @@ setup_return(CPUState *env, struct 
> target_sigaction *ka,
>
> if (__put_user(retcodes[idx], rc))
> return 1;
> -#if 0
> - flush_icache_range((abi_ulong)rc,
> - (abi_ulong)(rc + 1));
> -#endif
> +
> retcode = rc_addr + thumb;
> }
>

This is a trivial patch, so I send it to qemu-trivial, too.

The patch is independent of the rest of the series.

Cheers,
Stefan Weil
Peter Maydell - Oct. 4, 2011, 7:56 a.m.
On 3 October 2011 21:43, Stefan Weil <sw@weilnetz.de> wrote:
> The code is unused since 8 years, so remove it.
>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>  linux-user/signal.c |    5 +----
>  1 files changed, 1 insertions(+), 4 deletions(-)
>
> diff --git a/linux-user/signal.c b/linux-user/signal.c
> index 89276eb..40c5eb1 100644
> --- a/linux-user/signal.c
> +++ b/linux-user/signal.c
> @@ -1274,10 +1274,7 @@ setup_return(CPUState *env, struct target_sigaction *ka,
>
>                if (__put_user(retcodes[idx], rc))
>                        return 1;
> -#if 0
> -               flush_icache_range((abi_ulong)rc,
> -                                  (abi_ulong)(rc + 1));
> -#endif
> +
>                retcode = rc_addr + thumb;
>        }

(since this is in the ARM section of this file)

Since this is writing guest code instructions, flushing the host icache
is clearly not the right thing. I'm just wondering how this ensures that
we don't have stale translated code for this address, though...

-- PMM
Stefan Hajnoczi - Oct. 5, 2011, 8:26 a.m.
On Mon, Oct 03, 2011 at 10:43:19PM +0200, Stefan Weil wrote:
> The code is unused since 8 years, so remove it.
> 
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>  linux-user/signal.c |    5 +----
>  1 files changed, 1 insertions(+), 4 deletions(-)

Thanks, applied to the trivial patches tree:
http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/trivial-patches

Stefan

Patch

diff --git a/linux-user/signal.c b/linux-user/signal.c
index 89276eb..40c5eb1 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -1274,10 +1274,7 @@  setup_return(CPUState *env, struct target_sigaction *ka,
 
 		if (__put_user(retcodes[idx], rc))
 			return 1;
-#if 0
-		flush_icache_range((abi_ulong)rc,
-				   (abi_ulong)(rc + 1));
-#endif
+
 		retcode = rc_addr + thumb;
 	}