From patchwork Fri Jun 19 07:21:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Ellerman X-Patchwork-Id: 6643231 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 8A8C39F358 for ; Fri, 19 Jun 2015 07:21:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B6D7720965 for ; Fri, 19 Jun 2015 07:21:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6EF2B20966 for ; Fri, 19 Jun 2015 07:21:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752453AbbFSHVP (ORCPT ); Fri, 19 Jun 2015 03:21:15 -0400 Received: from ozlabs.org ([103.22.144.67]:49592 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751178AbbFSHVO (ORCPT ); Fri, 19 Jun 2015 03:21:14 -0400 Received: by ozlabs.org (Postfix, from userid 1034) id 0AD9B140295; Fri, 19 Jun 2015 17:21:12 +1000 (AEST) From: Michael Ellerman To: will.deacon@arm.com Cc: andre.przywara@arm.com, , , svaidy@linux.vnet.ibm.com, Subject: [PATCH 1/2] powerpc: Define the hcall opcodes & return values we need Date: Fri, 19 Jun 2015 17:21:00 +1000 Message-Id: <1434698461-15539-1-git-send-email-mpe@ellerman.id.au> X-Mailer: git-send-email 2.1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-7.2 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 Now that we don't have the kernel header on hand, just define the minimum set of hcall opcodes and return values we need in order to build. Signed-off-by: Michael Ellerman --- powerpc/spapr.h | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/powerpc/spapr.h b/powerpc/spapr.h index 0537f881c0e4..7a377d093ef4 100644 --- a/powerpc/spapr.h +++ b/powerpc/spapr.h @@ -16,17 +16,32 @@ #include -/* We need some of the H_ hcall defs, but they're __KERNEL__ only. */ -#define __KERNEL__ -#include -#undef __KERNEL__ - #include "kvm/kvm.h" #include "kvm/kvm-cpu.h" typedef unsigned long target_ulong; typedef uintptr_t target_phys_addr_t; +#define H_SUCCESS 0 +#define H_HARDWARE -1 /* Hardware error */ +#define H_FUNCTION -2 /* Function not supported */ +#define H_PARAMETER -4 /* Parameter invalid, out-of-range or conflicting */ + +#define H_SET_DABR 0x28 +#define H_LOGICAL_CI_LOAD 0x3c +#define H_LOGICAL_CI_STORE 0x40 +#define H_LOGICAL_CACHE_LOAD 0x44 +#define H_LOGICAL_CACHE_STORE 0x48 +#define H_LOGICAL_ICBI 0x4c +#define H_LOGICAL_DCBF 0x50 +#define H_GET_TERM_CHAR 0x54 +#define H_PUT_TERM_CHAR 0x58 +#define H_CPPR 0x68 +#define H_EOI 0x64 +#define H_IPI 0x6c +#define H_XIRR 0x74 +#define MAX_HCALL_OPCODE H_XIRR + /* * The hcalls above are standardized in PAPR and implemented by pHyp * as well.