From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54747) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPsZi-0008F9-JB for qemu-devel@nongnu.org; Fri, 05 Sep 2014 08:25:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPsZc-0006GP-IJ for qemu-devel@nongnu.org; Fri, 05 Sep 2014 08:25:10 -0400 Received: from mail-we0-f182.google.com ([74.125.82.182]:51062) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPsZc-0006Eu-C6 for qemu-devel@nongnu.org; Fri, 05 Sep 2014 08:25:04 -0400 Received: by mail-we0-f182.google.com with SMTP id w62so11735786wes.41 for ; Fri, 05 Sep 2014 05:25:03 -0700 (PDT) From: Ard Biesheuvel Date: Fri, 5 Sep 2014 14:24:53 +0200 Message-Id: <1409919897-360-3-git-send-email-ard.biesheuvel@linaro.org> In-Reply-To: <1409919897-360-1-git-send-email-ard.biesheuvel@linaro.org> References: <1409919897-360-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [Qemu-devel] [PATCH v3 2/6] target-arm: do not set do_interrupt handler for AArch64 user mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: peter.maydell@linaro.org, christoffer.dall@linaro.org, qemu-devel@nongnu.org Cc: Rob Herring , Ard Biesheuvel From: Rob Herring User mode emulation should never get interrupts and thus should not use the system emulation exception handler function. Remove the reference, and '#ifndef USER_MODE_ONLY' the function itself as well, so that we can add system mode only functionality to it. Signed-off-by: Rob Herring Signed-off-by: Ard Biesheuvel --- target-arm/cpu64.c | 2 ++ target-arm/helper-a64.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/target-arm/cpu64.c b/target-arm/cpu64.c index aa42803959be..9f88b9f4eea0 100644 --- a/target-arm/cpu64.c +++ b/target-arm/cpu64.c @@ -196,7 +196,9 @@ static void aarch64_cpu_class_init(ObjectClass *oc, void *data) { CPUClass *cc = CPU_CLASS(oc); +#if !defined(CONFIG_USER_ONLY) cc->do_interrupt = aarch64_cpu_do_interrupt; +#endif cc->set_pc = aarch64_cpu_set_pc; cc->gdb_read_register = aarch64_cpu_gdb_read_register; cc->gdb_write_register = aarch64_cpu_gdb_write_register; diff --git a/target-arm/helper-a64.c b/target-arm/helper-a64.c index 2e9ef64786ae..89b913ee9396 100644 --- a/target-arm/helper-a64.c +++ b/target-arm/helper-a64.c @@ -438,6 +438,8 @@ uint64_t HELPER(crc32c_64)(uint64_t acc, uint64_t val, uint32_t bytes) return crc32c(acc, buf, bytes) ^ 0xffffffff; } +#if !defined(CONFIG_USER_ONLY) + /* Handle a CPU exception. */ void aarch64_cpu_do_interrupt(CPUState *cs) { @@ -512,3 +514,4 @@ void aarch64_cpu_do_interrupt(CPUState *cs) env->pc = addr; cs->interrupt_request |= CPU_INTERRUPT_EXITTB; } +#endif -- 1.8.3.2