1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-03 13:49:49 +00:00

qemu: Really fix arm_nptl.patch

git-svn-id: https://svn.o-hand.com/repos/poky/trunk@944 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
Richard Purdie
2006-11-23 10:55:54 +00:00
parent c344a7ccb3
commit dff9e4b314
+52 -65
View File
@@ -1,38 +1,25 @@
configure | 29 +++++++
exec-all.h | 158 ----------------------------------------
linux-user/arm/syscall.h | 4 -
linux-user/main.c | 94 +++++++++++++++++++++---
linux-user/qemu.h | 3
linux-user/syscall.c | 90 ++++++++++++++++++++---
qemu_spinlock.h | 182 +++++++++++++++++++++++++++++++++++++++++++++++
target-arm/cpu.h | 19 ++++
target-arm/exec.h | 2
target-arm/op.c | 6 +
target-arm/translate.c | 10 ++
11 files changed, 415 insertions(+), 182 deletions(-)
Index: qemu/configure Index: qemu/configure
=================================================================== ===================================================================
--- qemu.orig/configure 2006-11-23 10:48:22.000000000 +0000 --- qemu.orig/configure 2006-08-26 16:31:53.000000000 +0100
+++ qemu/configure 2006-11-23 10:48:25.000000000 +0000 +++ qemu/configure 2006-08-26 16:31:53.000000000 +0100
@@ -95,6 +95,7 @@ softmmu="yes" @@ -97,6 +97,7 @@
user="no"
build_docs="no" build_docs="no"
build_acpi_tables="no"
uname_release="" uname_release=""
+nptl="yes" +nptl="yes"
# OS specific # OS specific
targetos=`uname -s` targetos=`uname -s`
@@ -237,6 +238,8 @@ for opt do @@ -243,6 +244,8 @@
;; ;;
--enable-uname-release=*) uname_release="$optarg" --enable-iasl) build_acpi_tables="yes"
;; ;;
+ --disable-nptl) nptl="no" + --disable-nptl) nptl="no"
+ ;; + ;;
esac esac
done done
@@ -433,6 +436,23 @@ EOF @@ -441,6 +444,23 @@
fi fi
fi fi
@@ -56,7 +43,7 @@ Index: qemu/configure
########################################## ##########################################
# SDL probe # SDL probe
@@ -551,6 +571,7 @@ else @@ -559,6 +579,7 @@
fi fi
echo "FMOD support $fmod $fmod_support" echo "FMOD support $fmod $fmod_support"
echo "kqemu support $kqemu" echo "kqemu support $kqemu"
@@ -64,7 +51,7 @@ Index: qemu/configure
echo "Documentation $build_docs" echo "Documentation $build_docs"
[ ! -z "$uname_release" ] && \ [ ! -z "$uname_release" ] && \
echo "uname -r $uname_release" echo "uname -r $uname_release"
@@ -875,6 +896,14 @@ if test "$target_user_only" = "no"; then @@ -880,6 +901,14 @@
echo "SDL_CFLAGS=`$sdl_config --cflags`" >> $config_mak echo "SDL_CFLAGS=`$sdl_config --cflags`" >> $config_mak
fi fi
fi fi
@@ -81,9 +68,9 @@ Index: qemu/configure
if test "$cocoa" = "yes" ; then if test "$cocoa" = "yes" ; then
Index: qemu/exec-all.h Index: qemu/exec-all.h
=================================================================== ===================================================================
--- qemu.orig/exec-all.h 2006-11-23 10:38:32.000000000 +0000 --- qemu.orig/exec-all.h 2006-08-26 16:28:32.000000000 +0100
+++ qemu/exec-all.h 2006-11-23 10:48:25.000000000 +0000 +++ qemu/exec-all.h 2006-08-26 16:31:53.000000000 +0100
@@ -357,163 +357,7 @@ extern CPUWriteMemoryFunc *io_mem_write[ @@ -347,163 +347,7 @@
extern CPUReadMemoryFunc *io_mem_read[IO_MEM_NB_ENTRIES][4]; extern CPUReadMemoryFunc *io_mem_read[IO_MEM_NB_ENTRIES][4];
extern void *io_mem_opaque[IO_MEM_NB_ENTRIES]; extern void *io_mem_opaque[IO_MEM_NB_ENTRIES];
@@ -250,9 +237,9 @@ Index: qemu/exec-all.h
Index: qemu/linux-user/arm/syscall.h Index: qemu/linux-user/arm/syscall.h
=================================================================== ===================================================================
--- qemu.orig/linux-user/arm/syscall.h 2005-04-27 21:11:21.000000000 +0100 --- qemu.orig/linux-user/arm/syscall.h 2006-03-09 19:18:11.000000000 +0000
+++ qemu/linux-user/arm/syscall.h 2006-11-23 10:48:25.000000000 +0000 +++ qemu/linux-user/arm/syscall.h 2006-08-26 16:31:53.000000000 +0100
@@ -28,7 +28,9 @@ struct target_pt_regs { @@ -28,7 +28,9 @@
#define ARM_SYSCALL_BASE 0x900000 #define ARM_SYSCALL_BASE 0x900000
#define ARM_THUMB_SYSCALL 0 #define ARM_THUMB_SYSCALL 0
@@ -265,9 +252,9 @@ Index: qemu/linux-user/arm/syscall.h
#define ARM_NR_thumb_semihosting 0xAB #define ARM_NR_thumb_semihosting 0xAB
Index: qemu/linux-user/main.c Index: qemu/linux-user/main.c
=================================================================== ===================================================================
--- qemu.orig/linux-user/main.c 2006-11-23 10:38:34.000000000 +0000 --- qemu.orig/linux-user/main.c 2006-08-26 16:28:40.000000000 +0100
+++ qemu/linux-user/main.c 2006-11-23 10:48:25.000000000 +0000 +++ qemu/linux-user/main.c 2006-08-26 16:31:53.000000000 +0100
@@ -313,6 +313,50 @@ static void arm_cache_flush(target_ulong @@ -309,6 +309,50 @@
} }
} }
@@ -318,7 +305,7 @@ Index: qemu/linux-user/main.c
void cpu_loop(CPUARMState *env) void cpu_loop(CPUARMState *env)
{ {
int trapnr; int trapnr;
@@ -369,10 +413,8 @@ void cpu_loop(CPUARMState *env) @@ -365,10 +409,8 @@
} }
} }
@@ -331,7 +318,7 @@ Index: qemu/linux-user/main.c
env->regs[0] = do_arm_semihosting (env); env->regs[0] = do_arm_semihosting (env);
} else if (n == 0 || n >= ARM_SYSCALL_BASE } else if (n == 0 || n >= ARM_SYSCALL_BASE
|| (env->thumb && n == ARM_THUMB_SYSCALL)) { || (env->thumb && n == ARM_THUMB_SYSCALL)) {
@@ -383,14 +425,34 @@ void cpu_loop(CPUARMState *env) @@ -379,14 +421,34 @@
n -= ARM_SYSCALL_BASE; n -= ARM_SYSCALL_BASE;
env->eabi = 0; env->eabi = 0;
} }
@@ -374,7 +361,7 @@ Index: qemu/linux-user/main.c
} else { } else {
goto error; goto error;
} }
@@ -429,6 +491,10 @@ void cpu_loop(CPUARMState *env) @@ -425,6 +487,10 @@
} }
} }
break; break;
@@ -385,7 +372,7 @@ Index: qemu/linux-user/main.c
default: default:
error: error:
fprintf(stderr, "qemu: unhandled CPU exception 0x%x - aborting\n", fprintf(stderr, "qemu: unhandled CPU exception 0x%x - aborting\n",
@@ -1757,6 +1823,10 @@ int main(int argc, char **argv) @@ -1639,6 +1705,10 @@
ts->heap_base = info->brk; ts->heap_base = info->brk;
/* This will be filled in on the first SYS_HEAPINFO call. */ /* This will be filled in on the first SYS_HEAPINFO call. */
ts->heap_limit = 0; ts->heap_limit = 0;
@@ -398,10 +385,10 @@ Index: qemu/linux-user/main.c
{ {
Index: qemu/linux-user/qemu.h Index: qemu/linux-user/qemu.h
=================================================================== ===================================================================
--- qemu.orig/linux-user/qemu.h 2006-11-23 10:38:34.000000000 +0000 --- qemu.orig/linux-user/qemu.h 2006-08-26 16:28:40.000000000 +0100
+++ qemu/linux-user/qemu.h 2006-11-23 10:48:25.000000000 +0000 +++ qemu/linux-user/qemu.h 2006-08-26 16:33:50.000000000 +0100
@@ -79,6 +79,9 @@ typedef struct TaskState { @@ -75,6 +75,9 @@
int sim_syscalls; uint32_t v86mask;
#endif #endif
int used; /* non zero if used */ int used; /* non zero if used */
+#ifdef USE_NPTL +#ifdef USE_NPTL
@@ -412,8 +399,8 @@ Index: qemu/linux-user/qemu.h
} __attribute__((aligned(16))) TaskState; } __attribute__((aligned(16))) TaskState;
Index: qemu/linux-user/syscall.c Index: qemu/linux-user/syscall.c
=================================================================== ===================================================================
--- qemu.orig/linux-user/syscall.c 2006-11-23 10:38:34.000000000 +0000 --- qemu.orig/linux-user/syscall.c 2006-08-26 16:28:40.000000000 +0100
+++ qemu/linux-user/syscall.c 2006-11-23 10:53:48.000000000 +0000 +++ qemu/linux-user/syscall.c 2006-08-26 16:31:53.000000000 +0100
@@ -66,9 +66,18 @@ @@ -66,9 +66,18 @@
#include <linux/kd.h> #include <linux/kd.h>
@@ -430,10 +417,10 @@ Index: qemu/linux-user/syscall.c
+#define CLONE_NPTL_FLAGS2 0 +#define CLONE_NPTL_FLAGS2 0
+#endif +#endif
+ +
#if defined(TARGET_I386) || defined(TARGET_ARM) || defined(TARGET_SPARC) \ #if defined(TARGET_I386) || defined(TARGET_ARM) || defined(TARGET_SPARC)
|| defined(TARGET_M68K)
/* 16 bit uid wrappers emulation */ /* 16 bit uid wrappers emulation */
@@ -1640,20 +1649,38 @@ int do_modify_ldt(CPUX86State *env, int #define USE_UID16
@@ -1602,20 +1611,38 @@
thread/process */ thread/process */
#define NEW_STACK_SIZE 8192 #define NEW_STACK_SIZE 8192
@@ -473,7 +460,7 @@ Index: qemu/linux-user/syscall.c
if (flags & CLONE_VM) { if (flags & CLONE_VM) {
ts = malloc(sizeof(TaskState) + NEW_STACK_SIZE); ts = malloc(sizeof(TaskState) + NEW_STACK_SIZE);
@@ -1709,16 +1736,60 @@ int do_fork(CPUState *env, unsigned int @@ -1665,16 +1692,60 @@
#error unsupported target CPU #error unsupported target CPU
#endif #endif
new_env->opaque = ts; new_env->opaque = ts;
@@ -538,7 +525,7 @@ Index: qemu/linux-user/syscall.c
} }
return ret; return ret;
} }
@@ -1962,7 +2033,7 @@ long do_syscall(void *cpu_env, int num, @@ -1918,7 +1989,7 @@
ret = do_brk(arg1); ret = do_brk(arg1);
break; break;
case TARGET_NR_fork: case TARGET_NR_fork:
@@ -547,7 +534,7 @@ Index: qemu/linux-user/syscall.c
break; break;
case TARGET_NR_waitpid: case TARGET_NR_waitpid:
{ {
@@ -3033,7 +3104,8 @@ long do_syscall(void *cpu_env, int num, @@ -2989,7 +3060,8 @@
ret = get_errno(fsync(arg1)); ret = get_errno(fsync(arg1));
break; break;
case TARGET_NR_clone: case TARGET_NR_clone:
@@ -557,7 +544,7 @@ Index: qemu/linux-user/syscall.c
break; break;
#ifdef __NR_exit_group #ifdef __NR_exit_group
/* new thread calls */ /* new thread calls */
@@ -3383,7 +3455,8 @@ long do_syscall(void *cpu_env, int num, @@ -3339,7 +3411,8 @@
#endif #endif
#ifdef TARGET_NR_vfork #ifdef TARGET_NR_vfork
case TARGET_NR_vfork: case TARGET_NR_vfork:
@@ -567,15 +554,15 @@ Index: qemu/linux-user/syscall.c
break; break;
#endif #endif
#ifdef TARGET_NR_ugetrlimit #ifdef TARGET_NR_ugetrlimit
@@ -3882,4 +3955,3 @@ long do_syscall(void *cpu_env, int num, @@ -3838,4 +3911,3 @@
#endif #endif
return ret; return ret;
} }
- -
Index: qemu/target-arm/cpu.h Index: qemu/target-arm/cpu.h
=================================================================== ===================================================================
--- qemu.orig/target-arm/cpu.h 2006-11-23 10:38:37.000000000 +0000 --- qemu.orig/target-arm/cpu.h 2006-03-09 19:18:27.000000000 +0000
+++ qemu/target-arm/cpu.h 2006-11-23 10:48:25.000000000 +0000 +++ qemu/target-arm/cpu.h 2006-08-26 16:31:53.000000000 +0100
@@ -35,6 +35,9 @@ @@ -35,6 +35,9 @@
#define EXCP_IRQ 5 #define EXCP_IRQ 5
#define EXCP_FIQ 6 #define EXCP_FIQ 6
@@ -586,7 +573,7 @@ Index: qemu/target-arm/cpu.h
/* We currently assume float and double are IEEE single and double /* We currently assume float and double are IEEE single and double
precision respectively. precision respectively.
@@ -85,6 +88,7 @@ typedef struct CPUARMState { @@ -85,6 +88,7 @@
uint32_t c9_data; uint32_t c9_data;
uint32_t c13_fcse; /* FCSE PID. */ uint32_t c13_fcse; /* FCSE PID. */
uint32_t c13_context; /* Context ID. */ uint32_t c13_context; /* Context ID. */
@@ -594,7 +581,7 @@ Index: qemu/target-arm/cpu.h
} cp15; } cp15;
/* Internal CPU feature flags. */ /* Internal CPU feature flags. */
@@ -135,6 +139,15 @@ struct siginfo; @@ -135,6 +139,15 @@
int cpu_arm_signal_handler(int host_signum, struct siginfo *info, int cpu_arm_signal_handler(int host_signum, struct siginfo *info,
void *puc); void *puc);
@@ -610,7 +597,7 @@ Index: qemu/target-arm/cpu.h
#define CPSR_M (0x1f) #define CPSR_M (0x1f)
#define CPSR_T (1 << 5) #define CPSR_T (1 << 5)
#define CPSR_F (1 << 6) #define CPSR_F (1 << 6)
@@ -146,7 +159,11 @@ int cpu_arm_signal_handler(int host_sign @@ -146,7 +159,11 @@
#define CPSR_J (1 << 24) #define CPSR_J (1 << 24)
#define CPSR_IT_0_1 (3 << 25) #define CPSR_IT_0_1 (3 << 25)
#define CPSR_Q (1 << 27) #define CPSR_Q (1 << 27)
@@ -625,9 +612,9 @@ Index: qemu/target-arm/cpu.h
/* Return the current CPSR value. */ /* Return the current CPSR value. */
Index: qemu/target-arm/exec.h Index: qemu/target-arm/exec.h
=================================================================== ===================================================================
--- qemu.orig/target-arm/exec.h 2005-11-26 10:38:39.000000000 +0000 --- qemu.orig/target-arm/exec.h 2006-03-09 19:18:27.000000000 +0000
+++ qemu/target-arm/exec.h 2006-11-23 10:48:25.000000000 +0000 +++ qemu/target-arm/exec.h 2006-08-26 16:31:53.000000000 +0100
@@ -51,8 +51,6 @@ int cpu_arm_handle_mmu_fault (CPUState * @@ -51,8 +51,6 @@
/* In op_helper.c */ /* In op_helper.c */
@@ -638,9 +625,9 @@ Index: qemu/target-arm/exec.h
Index: qemu/target-arm/op.c Index: qemu/target-arm/op.c
=================================================================== ===================================================================
--- qemu.orig/target-arm/op.c 2006-08-26 18:37:27.000000000 +0100 --- qemu.orig/target-arm/op.c 2006-08-26 16:28:48.000000000 +0100
+++ qemu/target-arm/op.c 2006-11-23 10:48:25.000000000 +0000 +++ qemu/target-arm/op.c 2006-08-26 16:31:53.000000000 +0100
@@ -891,6 +891,12 @@ void OPPROTO op_bkpt(void) @@ -891,6 +891,12 @@
cpu_loop_exit(); cpu_loop_exit();
} }
@@ -655,9 +642,9 @@ Index: qemu/target-arm/op.c
"d" suffix. */ "d" suffix. */
Index: qemu/target-arm/translate.c Index: qemu/target-arm/translate.c
=================================================================== ===================================================================
--- qemu.orig/target-arm/translate.c 2006-11-23 10:38:37.000000000 +0000 --- qemu.orig/target-arm/translate.c 2006-08-26 16:28:48.000000000 +0100
+++ qemu/target-arm/translate.c 2006-11-23 10:48:25.000000000 +0000 +++ qemu/target-arm/translate.c 2006-08-26 16:31:53.000000000 +0100
@@ -2382,6 +2382,7 @@ undef: @@ -2382,6 +2382,7 @@
s->is_jmp = DISAS_JUMP; s->is_jmp = DISAS_JUMP;
} }
@@ -665,7 +652,7 @@ Index: qemu/target-arm/translate.c
/* generate intermediate code in gen_opc_buf and gen_opparam_buf for /* generate intermediate code in gen_opc_buf and gen_opparam_buf for
basic block 'tb'. If search_pc is TRUE, also generate PC basic block 'tb'. If search_pc is TRUE, also generate PC
information for each intermediate instruction. */ information for each intermediate instruction. */
@@ -2416,6 +2417,15 @@ static inline int gen_intermediate_code_ @@ -2416,6 +2417,15 @@
nb_gen_labels = 0; nb_gen_labels = 0;
lj = -1; lj = -1;
do { do {
@@ -684,7 +671,7 @@ Index: qemu/target-arm/translate.c
Index: qemu/qemu_spinlock.h Index: qemu/qemu_spinlock.h
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ qemu/qemu_spinlock.h 2006-11-23 10:48:25.000000000 +0000 +++ qemu/qemu_spinlock.h 2006-08-26 16:31:53.000000000 +0100
@@ -0,0 +1,182 @@ @@ -0,0 +1,182 @@
+/* +/*
+ * internal execution defines for qemu + * internal execution defines for qemu