From: ths Date: Fri, 8 Dec 2006 01:32:58 +0000 (+0000) Subject: Fix fstat for MIPS userland emulation, and add support for a cacheflush X-Git-Tag: release_0_9_1~1661 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=19fe4b7afc35a9042766d3455ab8fdb7abf2b78b;p=qemu-xen-4.5-testing.git Fix fstat for MIPS userland emulation, and add support for a cacheflush syscall, thanks to Dave Denholm. --- diff --git a/linux-user/syscall.c b/linux-user/syscall.c index e95212894..075460bae 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -2933,7 +2933,7 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3, lock_user_struct(target_st, arg2, 0); target_st->st_dev = tswap16(st.st_dev); target_st->st_ino = tswapl(st.st_ino); -#if defined(TARGET_PPC) +#if defined(TARGET_PPC) || defined(TARGET_MIPS) target_st->st_mode = tswapl(st.st_mode); /* XXX: check this */ target_st->st_uid = tswap32(st.st_uid); target_st->st_gid = tswap32(st.st_gid); @@ -3829,6 +3829,12 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3, break; } #endif +#ifdef TARGET_NR_cacheflush + case TARGET_NR_cacheflush: + /* self-modifying code is handled automatically, so nothing needed */ + ret = 0; + break; +#endif #ifdef TARGET_NR_security case TARGET_NR_security: goto unimplemented;