From patchwork Tue Mar 1 09:35:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 8463391 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 722D9C0553 for ; Tue, 1 Mar 2016 09:35:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 93692202E5 for ; Tue, 1 Mar 2016 09:35:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 73278202FF for ; Tue, 1 Mar 2016 09:35:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752287AbcCAJfl (ORCPT ); Tue, 1 Mar 2016 04:35:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33715 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751456AbcCAJfk (ORCPT ); Tue, 1 Mar 2016 04:35:40 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id A2D717F080; Tue, 1 Mar 2016 09:35:39 +0000 (UTC) Received: from thinkpad.redhat.com (ovpn-112-43.ams2.redhat.com [10.36.112.43]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u219ZX0n012938; Tue, 1 Mar 2016 04:35:36 -0500 From: Laurent Vivier To: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org Cc: drjones@redhat.com, thuth@redhat.com, dgibson@redhat.com, agraf@suse.de, pbonzini@redhat.com, Laurent Vivier Subject: [kvm-unit-tests PATCH v4 1/2] powerpc: add asm/ppc_asm.h Date: Tue, 1 Mar 2016 10:35:29 +0100 Message-Id: <1456824930-15078-2-git-send-email-lvivier@redhat.com> In-Reply-To: <1456824930-15078-1-git-send-email-lvivier@redhat.com> References: <1456824930-15078-1-git-send-email-lvivier@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Move LOAD_REG_IMMEDIATE() and LOAD_REG_ADDR() from cstart64.S to ppc_asm.h Signed-off-by: Laurent Vivier Reviewed-by: Andrew Jones Reviewed-by: Thomas Huth --- lib/powerpc/asm/ppc_asm.h | 14 ++++++++++++++ lib/ppc64/asm/ppc_asm.h | 1 + powerpc/cstart64.S | 11 +---------- 3 files changed, 16 insertions(+), 10 deletions(-) create mode 100644 lib/powerpc/asm/ppc_asm.h create mode 100644 lib/ppc64/asm/ppc_asm.h diff --git a/lib/powerpc/asm/ppc_asm.h b/lib/powerpc/asm/ppc_asm.h new file mode 100644 index 0000000..f63bb72 --- /dev/null +++ b/lib/powerpc/asm/ppc_asm.h @@ -0,0 +1,14 @@ +#ifndef _ASMPOWERPC_PPC_ASM_H +#define _ASMPOWERPC_PPC_ASM_H + +#define LOAD_REG_IMMEDIATE(reg,expr) \ + lis reg,(expr)@highest; \ + ori reg,reg,(expr)@higher; \ + rldicr reg,reg,32,31; \ + oris reg,reg,(expr)@h; \ + ori reg,reg,(expr)@l; + +#define LOAD_REG_ADDR(reg,name) \ + ld reg,name@got(r2) + +#endif /* _ASMPOWERPC_PPC_ASM_H */ diff --git a/lib/ppc64/asm/ppc_asm.h b/lib/ppc64/asm/ppc_asm.h new file mode 100644 index 0000000..e3929ee --- /dev/null +++ b/lib/ppc64/asm/ppc_asm.h @@ -0,0 +1 @@ +#include "../../powerpc/asm/ppc_asm.h" diff --git a/powerpc/cstart64.S b/powerpc/cstart64.S index 4693ba1..6072597 100644 --- a/powerpc/cstart64.S +++ b/powerpc/cstart64.S @@ -7,16 +7,7 @@ */ #define __ASSEMBLY__ #include - -#define LOAD_REG_IMMEDIATE(reg,expr) \ - lis reg,(expr)@highest; \ - ori reg,reg,(expr)@higher; \ - rldicr reg,reg,32,31; \ - oris reg,reg,(expr)@h; \ - ori reg,reg,(expr)@l; - -#define LOAD_REG_ADDR(reg,name) \ - ld reg,name@got(r2) +#include .section .init