From patchwork Thu May 19 11:18:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 9126631 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DA1079F1C3 for ; Thu, 19 May 2016 11:32:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4DF292020F for ; Thu, 19 May 2016 11:32:36 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8BD91201FE for ; Thu, 19 May 2016 11:32:35 +0000 (UTC) Received: from localhost ([::1]:49749 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3MBu-0007u2-Gy for patchwork-qemu-devel@patchwork.kernel.org; Thu, 19 May 2016 07:32:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36746) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3Lys-00047c-UD for qemu-devel@nongnu.org; Thu, 19 May 2016 07:19:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b3Lyq-00045H-Nr for qemu-devel@nongnu.org; Thu, 19 May 2016 07:19:05 -0400 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:33734) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3Lyq-000451-0R for qemu-devel@nongnu.org; Thu, 19 May 2016 07:19:04 -0400 Received: by mail-wm0-x241.google.com with SMTP id r12so20127209wme.0 for ; Thu, 19 May 2016 04:19:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=546OOoiix5fDC2NuRcFxs4hw55AA7uufXJR/o72Xzn4=; b=xRBj1HjPKMxKC31AyxiPivB9Ymz5h3axnDJUJKLTLNMxAla6uPO3DMhbJYV2vhJ9NY 0Ck4REyV4DtehweSy4bBSQgwcd/p8KQSCdOgtkKPGWcUhd4I86ex6xtbGCbgyS+qIMFN fdpgH+lSnCSB8SBpuTyyhqitHz/XFnaB5rZ2RY9qQ3IQULaB/i/ItgblwqnTyhTVgB4V gDTMEr+5kksP/KoiQ+tPqC2SukUweXdTKhGs4fRHPIpzxF5chHSL/mw4r/WeSlb8iIZF HDAdTvaEBKqiH0vv57cNpHSA9PsX2st88Vni1GhOZVSXj65WpdNqMoe/ICP63f886/no 6dKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references; bh=546OOoiix5fDC2NuRcFxs4hw55AA7uufXJR/o72Xzn4=; b=ILQ3LHfcBthy3PqCxpodGh8/szDvzLB8/CL/ZyKRXWofmAnZIsasCJxjGBDEzaQMUz B4z6lXiuSqGIUUB7dMdJkI82gLbqI/EstdzFiglnpl88D3iC6EEpzNmqK6cz0h5AMWqU l+WDAW6EHD7Rfa+SvYxpjkF+2j5rxJTO6k/1+SVi6iZdLY4j37qJKvep8mpEhMUpEzm1 RPDcAm8gYz9MLk3HAJWBPEcX5CCQYDEJLXqI9Q3mLeyIk6x6AXZYBTO1Xm+YW2XhJvgK sK/FTXMYe7OE1o/lGcOBYeV7Mlc1yolIl+vnjtOEMY8BzSHYvOJRF0OePEUCD50z/CWV lmyw== X-Gm-Message-State: AOPr4FVXdYxsSvqq4LqUFKnBbtUdji8GUPMnDe/SB0oEaMtDddqY+wXAvior0i9ZNHd9Zw== X-Received: by 10.28.222.69 with SMTP id v66mr13518985wmg.84.1463656743532; Thu, 19 May 2016 04:19:03 -0700 (PDT) Received: from 640k.lan (dynamic-adsl-78-12-252-58.clienti.tiscali.it. [78.12.252.58]) by smtp.gmail.com with ESMTPSA id c7sm8374317wji.38.2016.05.19.04.19.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 May 2016 04:19:02 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 19 May 2016 13:18:08 +0200 Message-Id: <1463656726-35952-15-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1463656726-35952-1-git-send-email-pbonzini@redhat.com> References: <1463656726-35952-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::241 Subject: [Qemu-devel] [PULL 14/52] target-ppc: do not use target_ulong in cpu-qom.h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Bring the PowerPCCPUClass handle_mmu_fault method type into line with the one in CPUClass. Using vaddr also makes the cpu-qom.h file target independent. Signed-off-by: Paolo Bonzini --- target-ppc/cpu-qom.h | 3 +-- target-ppc/mmu-hash32.c | 2 +- target-ppc/mmu-hash32.h | 2 +- target-ppc/mmu-hash64.c | 2 +- target-ppc/mmu-hash64.h | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/target-ppc/cpu-qom.h b/target-ppc/cpu-qom.h index eb822a3..bab501f 100644 --- a/target-ppc/cpu-qom.h +++ b/target-ppc/cpu-qom.h @@ -73,8 +73,7 @@ typedef struct PowerPCCPUClass { void (*init_proc)(CPUPPCState *env); int (*check_pow)(CPUPPCState *env); #if defined(CONFIG_SOFTMMU) - int (*handle_mmu_fault)(PowerPCCPU *cpu, target_ulong eaddr, int rwx, - int mmu_idx); + int (*handle_mmu_fault)(PowerPCCPU *cpu, vaddr eaddr, int rwx, int mmu_idx); #endif bool (*interrupts_big_endian)(PowerPCCPU *cpu); } PowerPCCPUClass; diff --git a/target-ppc/mmu-hash32.c b/target-ppc/mmu-hash32.c index 39abb2f..06ce4d6 100644 --- a/target-ppc/mmu-hash32.c +++ b/target-ppc/mmu-hash32.c @@ -383,7 +383,7 @@ static hwaddr ppc_hash32_pte_raddr(target_ulong sr, ppc_hash_pte32_t pte, return (rpn & ~mask) | (eaddr & mask); } -int ppc_hash32_handle_mmu_fault(PowerPCCPU *cpu, target_ulong eaddr, int rwx, +int ppc_hash32_handle_mmu_fault(PowerPCCPU *cpu, vaddr eaddr, int rwx, int mmu_idx) { CPUState *cs = CPU(cpu); diff --git a/target-ppc/mmu-hash32.h b/target-ppc/mmu-hash32.h index afbb9dd..aaceacd 100644 --- a/target-ppc/mmu-hash32.h +++ b/target-ppc/mmu-hash32.h @@ -5,7 +5,7 @@ hwaddr get_pteg_offset32(PowerPCCPU *cpu, hwaddr hash); hwaddr ppc_hash32_get_phys_page_debug(PowerPCCPU *cpu, target_ulong addr); -int ppc_hash32_handle_mmu_fault(PowerPCCPU *cpu, target_ulong address, int rw, +int ppc_hash32_handle_mmu_fault(PowerPCCPU *cpu, vaddr address, int rw, int mmu_idx); /* diff --git a/target-ppc/mmu-hash64.c b/target-ppc/mmu-hash64.c index 72c4ab5..5184626 100644 --- a/target-ppc/mmu-hash64.c +++ b/target-ppc/mmu-hash64.c @@ -589,7 +589,7 @@ unsigned ppc_hash64_hpte_page_shift_noslb(PowerPCCPU *cpu, return 0; } -int ppc_hash64_handle_mmu_fault(PowerPCCPU *cpu, target_ulong eaddr, +int ppc_hash64_handle_mmu_fault(PowerPCCPU *cpu, vaddr eaddr, int rwx, int mmu_idx) { CPUState *cs = CPU(cpu); diff --git a/target-ppc/mmu-hash64.h b/target-ppc/mmu-hash64.h index 9bf8b9b..6423b9f 100644 --- a/target-ppc/mmu-hash64.h +++ b/target-ppc/mmu-hash64.h @@ -9,7 +9,7 @@ void dump_slb(FILE *f, fprintf_function cpu_fprintf, PowerPCCPU *cpu); int ppc_store_slb(PowerPCCPU *cpu, target_ulong slot, target_ulong esid, target_ulong vsid); hwaddr ppc_hash64_get_phys_page_debug(PowerPCCPU *cpu, target_ulong addr); -int ppc_hash64_handle_mmu_fault(PowerPCCPU *cpu, target_ulong address, int rw, +int ppc_hash64_handle_mmu_fault(PowerPCCPU *cpu, vaddr address, int rw, int mmu_idx); void ppc_hash64_store_hpte(PowerPCCPU *cpu, target_ulong index, target_ulong pte0, target_ulong pte1);