From patchwork Tue Nov 21 09:32:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Herrenschmidt X-Patchwork-Id: 839940 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yh0pM4Yr9z9s5L for ; Tue, 21 Nov 2017 20:36:27 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3yh0pM2wPkzDrTT for ; Tue, 21 Nov 2017 20:36:27 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=permerror (mailfrom) smtp.mailfrom=kernel.crashing.org (client-ip=63.228.1.57; helo=gate.crashing.org; envelope-from=benh@kernel.crashing.org; receiver=) Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3yh0pG3cvRzDrLV for ; Tue, 21 Nov 2017 20:36:22 +1100 (AEDT) Received: from pasglop.au.ibm.com (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id vAL9Wa5C008691; Tue, 21 Nov 2017 03:32:37 -0600 From: Benjamin Herrenschmidt To: skiboot@lists.ozlabs.org Date: Tue, 21 Nov 2017 20:32:22 +1100 Message-Id: <20171121093231.28909-1-benh@kernel.crashing.org> X-Mailer: git-send-email 2.14.3 Subject: [Skiboot] [PATCH v2 01/10] xive: Define API for single-escalation VP mode X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" This mode allows all queues of a VP to use the same escalation interrupt, at the cost of losing priority 7. This adds the definition and documentation of the API, the implementation will come next. Signed-off-by: Benjamin Herrenschmidt --- doc/xive.rst | 22 +++++++++++++++++++++- include/opal-api.h | 1 + 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/doc/xive.rst b/doc/xive.rst index 8ccba6c4..c4f49501 100644 --- a/doc/xive.rst +++ b/doc/xive.rst @@ -63,7 +63,11 @@ I - Device-tree updates For any of these, a size of 0 means this level is not supported. - 3) Interrupt descriptors + - ``single-escalation-support`` (option). When present, indicatges that + the "single escalation" feature is supported, thus enabling the use + of the OPAL_XIVE_VP_SINGLE_ESCALATION flag. + +3) Interrupt descriptors The interrupt descriptors (aka "interrupts" properties and parts of "interrupt-map" properties) remain 2 cells. The first cell is @@ -506,6 +510,12 @@ with a virtual processor and a priority. XIVE source. Those interrupts have no triggers, and will not be masked by opal_set_irq_config() with a prio of 0xff. + ..note:: The state of the OPAL_XIVE_VP_SINGLE_ESCALATION flag passed to + opal_xive_set_vp_info() can change the escalation irq number, + so make sure you only retrieve this after having set the flag + to the desired value. When set, all priorities will have the + same escalation interrupt. + * out_qflags: will contain flags defined as follow: - OPAL_XIVE_EQ_ENABLED @@ -645,6 +655,16 @@ This call returns information about a VP: This must be set for the VP to be usable and cleared before freeing it + - OPAL_XIVE_VP_SINGLE_ESCALATION (if available) + + If this is set, the queues are configured such that all priorities + turn into a single escalation interrupt. This results in the loss of + priority 7 which can no longer be used. This this needs to be set + before any interrupt is routed to that priority. + + This feature is available if the "single-escalation-property" is + present in the xive device-tree node. + * cam_value: This is the value to program into the thread management area to dispatch that VP (ie, an encoding of the block + index). diff --git a/include/opal-api.h b/include/opal-api.h index 0bc036ed..e0580891 100644 --- a/include/opal-api.h +++ b/include/opal-api.h @@ -1233,6 +1233,7 @@ enum { /* Flags for OPAL_XIVE_GET/SET_VP_INFO */ enum { OPAL_XIVE_VP_ENABLED = 0x00000001, + OPAL_XIVE_VP_SINGLE_ESCALATION = 0x00000002, }; /* "Any chip" replacement for chip ID for allocation functions */