From patchwork Wed Mar 16 10:46:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 8598371 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 420F79F3D1 for ; Wed, 16 Mar 2016 11:07:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 59BA52022A for ; Wed, 16 Mar 2016 11:07:47 +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 7756120218 for ; Wed, 16 Mar 2016 11:07:46 +0000 (UTC) Received: from localhost ([::1]:55109 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ag9In-0006DT-Pq for patchwork-qemu-devel@patchwork.kernel.org; Wed, 16 Mar 2016 07:07:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37222) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ag8zP-0003bp-Vh for qemu-devel@nongnu.org; Wed, 16 Mar 2016 06:47:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ag8zO-0002GE-I5 for qemu-devel@nongnu.org; Wed, 16 Mar 2016 06:47:43 -0400 Received: from mail-wm0-x234.google.com ([2a00:1450:400c:c09::234]:36154) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ag8zO-0002Fy-8P for qemu-devel@nongnu.org; Wed, 16 Mar 2016 06:47:42 -0400 Received: by mail-wm0-x234.google.com with SMTP id l124so43291518wmf.1 for ; Wed, 16 Mar 2016 03:47:42 -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=8gavWz/BC2zOY1eB9P7Vk1nVt/zv3AOloxoI7TmgGxc=; b=i92IurwchORwNduAZwzn/XI1xK4v1rcF4HrQFykIOXAZBFdytbv4681OBEUc/azWDz p08YuYkGRu3d/ZS7I30g6aR10NX39I0FFEmSeD4kxzBgoWKCVdXsuqbW8YVkrbUbLHAK Bj9x/9toMWn/NRD8rcY2QW4nDHge9NJteVVamt7OTWacWEuXTDn4x2SBaDz2lHdYJcgP gjt50fBUnqgHWpPeueUTnhGTwNXrBXp3+LE4qT0T9DyeaGhXW+ASu32yVfX8SKanrS5J nnKeqUO8rVDJ4G3Hk48NfoQTN5VuTHpyOw3uKv8k5baYo+ijFr6RiP3AbURYnaO+4P8q dmzw== 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=8gavWz/BC2zOY1eB9P7Vk1nVt/zv3AOloxoI7TmgGxc=; b=LrxpLC0ENVeUsozEzaUYi1geZyTKiOzldA7pgbO5usjI6HhR9nQzE1u5acLtlsyMhc A2tvmirozGmX1K/zzm4SH3tcZuCaHOusYSaQ8gl8DX5H/CdTEsCNM1/J5rovaqHJdGSb LuW6WAnFlFM+9gnxNDBvJbfTJb51e8tJ2LJfoiAkVdDTFVgfA1LY6Q/XFcUL8Pto07Re VElupjMJTc1TpPqfjWbH2vNyFvJraaQKFZ2b3C27f7d+jimAEbIfMOKl4ClQOnOaJLLG yFCF9FgFUOILqVo/EEjEef286IhOWky1RjShBetZ5jjjbYWeezs8h/IUqb5XWONJxBf9 8JxQ== X-Gm-Message-State: AD7BkJLjgmFmNRsQaJpl6W/UWYoVwfmD4kEtOabXwqPot0X15M1yaIpniHCLkmVOqZxtww== X-Received: by 10.195.13.16 with SMTP id eu16mr3291889wjd.140.1458125261659; Wed, 16 Mar 2016 03:47:41 -0700 (PDT) Received: from 640k.lan (94-39-161-17.adsl-ull.clienti.tiscali.it. [94.39.161.17]) by smtp.gmail.com with ESMTPSA id wr2sm2418094wjc.49.2016.03.16.03.47.40 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Mar 2016 03:47:41 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Wed, 16 Mar 2016 11:46:46 +0100 Message-Id: <1458125219-131698-37-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1458125219-131698-1-git-send-email-pbonzini@redhat.com> References: <1458125219-131698-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::234 Subject: [Qemu-devel] [PATCH 36/49] cpu: move endian-dependent load/store functions to cpu-all.h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 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-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org 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 Disentangle cpu-common.h and memory.h from NEED_CPU_H. Prototypes are not defined for !NEED_CPU_H, so remove them from poison.h too. Only macros need poisoning. Signed-off-by: Paolo Bonzini --- include/exec/cpu-all.h | 25 +++++++++++++++++++++++++ include/exec/cpu-common.h | 10 ---------- include/exec/memory.h | 17 ----------------- include/exec/poison.h | 8 -------- 4 files changed, 25 insertions(+), 35 deletions(-) diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 08e5093..3911576 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -165,6 +165,31 @@ extern unsigned long reserved_va; #define GUEST_ADDR_MAX (reserved_va ? reserved_va : \ (1ul << TARGET_VIRT_ADDR_SPACE_BITS) - 1) +#else + +#include "exec/hwaddr.h" +uint32_t lduw_phys(AddressSpace *as, hwaddr addr); +uint32_t ldl_phys(AddressSpace *as, hwaddr addr); +uint64_t ldq_phys(AddressSpace *as, hwaddr addr); +void stl_phys_notdirty(AddressSpace *as, hwaddr addr, uint32_t val); +void stw_phys(AddressSpace *as, hwaddr addr, uint32_t val); +void stl_phys(AddressSpace *as, hwaddr addr, uint32_t val); +void stq_phys(AddressSpace *as, hwaddr addr, uint64_t val); + +uint32_t address_space_lduw(AddressSpace *as, hwaddr addr, + MemTxAttrs attrs, MemTxResult *result); +uint32_t address_space_ldl(AddressSpace *as, hwaddr addr, + MemTxAttrs attrs, MemTxResult *result); +uint64_t address_space_ldq(AddressSpace *as, hwaddr addr, + MemTxAttrs attrs, MemTxResult *result); +void address_space_stl_notdirty(AddressSpace *as, hwaddr addr, uint32_t val, + MemTxAttrs attrs, MemTxResult *result); +void address_space_stw(AddressSpace *as, hwaddr addr, uint32_t val, + MemTxAttrs attrs, MemTxResult *result); +void address_space_stl(AddressSpace *as, hwaddr addr, uint32_t val, + MemTxAttrs attrs, MemTxResult *result); +void address_space_stq(AddressSpace *as, hwaddr addr, uint64_t val, + MemTxAttrs attrs, MemTxResult *result); #endif /* page related stuff */ diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index 4f59034..04eade5 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -109,16 +109,6 @@ void stl_be_phys(AddressSpace *as, hwaddr addr, uint32_t val); void stq_le_phys(AddressSpace *as, hwaddr addr, uint64_t val); void stq_be_phys(AddressSpace *as, hwaddr addr, uint64_t val); -#ifdef NEED_CPU_H -uint32_t lduw_phys(AddressSpace *as, hwaddr addr); -uint32_t ldl_phys(AddressSpace *as, hwaddr addr); -uint64_t ldq_phys(AddressSpace *as, hwaddr addr); -void stl_phys_notdirty(AddressSpace *as, hwaddr addr, uint32_t val); -void stw_phys(AddressSpace *as, hwaddr addr, uint32_t val); -void stl_phys(AddressSpace *as, hwaddr addr, uint32_t val); -void stq_phys(AddressSpace *as, hwaddr addr, uint64_t val); -#endif - void cpu_physical_memory_write_rom(AddressSpace *as, hwaddr addr, const uint8_t *buf, int len); void cpu_flush_icache_range(hwaddr start, int len); diff --git a/include/exec/memory.h b/include/exec/memory.h index e2a3e99..7fb9188 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -1292,23 +1292,6 @@ void address_space_stq_le(AddressSpace *as, hwaddr addr, uint64_t val, void address_space_stq_be(AddressSpace *as, hwaddr addr, uint64_t val, MemTxAttrs attrs, MemTxResult *result); -#ifdef NEED_CPU_H -uint32_t address_space_lduw(AddressSpace *as, hwaddr addr, - MemTxAttrs attrs, MemTxResult *result); -uint32_t address_space_ldl(AddressSpace *as, hwaddr addr, - MemTxAttrs attrs, MemTxResult *result); -uint64_t address_space_ldq(AddressSpace *as, hwaddr addr, - MemTxAttrs attrs, MemTxResult *result); -void address_space_stl_notdirty(AddressSpace *as, hwaddr addr, uint32_t val, - MemTxAttrs attrs, MemTxResult *result); -void address_space_stw(AddressSpace *as, hwaddr addr, uint32_t val, - MemTxAttrs attrs, MemTxResult *result); -void address_space_stl(AddressSpace *as, hwaddr addr, uint32_t val, - MemTxAttrs attrs, MemTxResult *result); -void address_space_stq(AddressSpace *as, hwaddr addr, uint64_t val, - MemTxAttrs attrs, MemTxResult *result); -#endif - /* address_space_translate: translate an address range into an address space * into a MemoryRegion and an address range into that section. Should be * called from an RCU critical section, to avoid that the last reference diff --git a/include/exec/poison.h b/include/exec/poison.h index a4b1eca..3ca7929 100644 --- a/include/exec/poison.h +++ b/include/exec/poison.h @@ -37,14 +37,6 @@ #pragma GCC poison CPUArchState -#pragma GCC poison lduw_phys -#pragma GCC poison ldl_phys -#pragma GCC poison ldq_phys -#pragma GCC poison stl_phys_notdirty -#pragma GCC poison stw_phys -#pragma GCC poison stl_phys -#pragma GCC poison stq_phys - #pragma GCC poison CPU_INTERRUPT_HARD #pragma GCC poison CPU_INTERRUPT_EXITTB #pragma GCC poison CPU_INTERRUPT_HALT