From patchwork Mon Feb 29 17:49:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 8456821 Return-Path: X-Original-To: patchwork-kvm@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 0B1CB9F2F0 for ; Mon, 29 Feb 2016 17:49:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3A6CE2010C for ; Mon, 29 Feb 2016 17:49:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5A9E02011B for ; Mon, 29 Feb 2016 17:49:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753409AbcB2RtU (ORCPT ); Mon, 29 Feb 2016 12:49:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49027 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753258AbcB2RtS (ORCPT ); Mon, 29 Feb 2016 12:49:18 -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 F3BD3C00B8F2; Mon, 29 Feb 2016 17:49:17 +0000 (UTC) Received: from thinkpad.redhat.com (ovpn-112-40.ams2.redhat.com [10.36.112.40]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u1THn9vf010574; Mon, 29 Feb 2016 12:49:14 -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 v3 1/2] powerpc: add asm/ppc_asm.h Date: Mon, 29 Feb 2016 18:49:05 +0100 Message-Id: <1456768146-10136-2-git-send-email-lvivier@redhat.com> In-Reply-To: <1456768146-10136-1-git-send-email-lvivier@redhat.com> References: <1456768146-10136-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