From patchwork Wed Sep 14 03:01:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 669687 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sYmZP4MF3z9sC3 for ; Wed, 14 Sep 2016 13:03:09 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=ZQgDYUCh; dkim-atps=neutral Received: from ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3sYmZP3F0RzDsVw for ; Wed, 14 Sep 2016 13:03:09 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=ZQgDYUCh; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-pf0-x242.google.com (mail-pf0-x242.google.com [IPv6:2607:f8b0:400e:c00::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3sYmXk6M40zDsF9 for ; Wed, 14 Sep 2016 13:01:42 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=ZQgDYUCh; dkim-atps=neutral Received: by mail-pf0-x242.google.com with SMTP id g202so70128pfb.1 for ; Tue, 13 Sep 2016 20:01:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=3pe5Rrr/SIR1hoenR02ISQt3Vs/Gvq+9A+mVa6QkbII=; b=ZQgDYUChMGNHvXKD3/kFGJuA24YLSkuVqNAB6cy1WXJ81L13r96AR3bDDboZ2o5TIy Bkpx9P4G07o8md0EbjxcqKyAx1IHJN0saCwMdPtZiMpJa2nigLv2slgz3DpDU4oJfcpE HJjqcDh8KDLAHrPpEzuZgegZm8ZXMnJInqTXrc5Yq/XmeS46KebAM/122lBsF96Msut6 0SNOcZD15dMXsvFAXPYsgBXGrDBBBVUvSsXa5O+rpHWPG32D09gPiM2bp2rUQARzkVBR PLN5Q3nb6NdofU4XDaKOrtOE5du/6VdINQjYDJxGj/m6LRTkYh9W+dgY8/uLCZ8JNuy3 wXdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=3pe5Rrr/SIR1hoenR02ISQt3Vs/Gvq+9A+mVa6QkbII=; b=Z+3c4L9SrzL8/4Dx1BPpyg3Pi7q53V1P4xwhSj1430zhZP+uGklvYwpGLvdK48X5sh FeoQ5ZXbcwT2xfqi0DSl1oi38gM21n2gg2sLgeVgMIX4DXZXhu/FWNcU7c2Lm6kCQg62 c80Wwec1oQYspsMQroahB5MYaqtHbNB3ErgXhX3w604HBJ06gkbKvyTJAkudWpSi6NlW hTY1MGek4Ai0GmJjOnMvSkW9VzxdyKMxAjVUL3a+ygIz0QTaybWi6LJtjK88an65HWGq Qk35qW3gx9lxGO2AGBxlANJn//wF3vfHDvDwecmb2zRLvMvrBKuYqOpD0IZ2aIUjw8yt lJCA== X-Gm-Message-State: AE9vXwMN4Ri5xM5dOqIifN/MJEUFxnyAt4h2enDnjYlfDshh6PoDamUgJYwmyjo/B16yRg== X-Received: by 10.98.17.144 with SMTP id 16mr489388pfr.8.1473822100989; Tue, 13 Sep 2016 20:01:40 -0700 (PDT) Received: from roar.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id g10sm33893939pfc.57.2016.09.13.20.01.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Sep 2016 20:01:40 -0700 (PDT) From: Nicholas Piggin To: linuxppc-dev@lists.ozlabs.org, Michael Ellerman Subject: [PATCH] powerpc/64: replay hypervisor maintenance priority Date: Wed, 14 Sep 2016 13:01:21 +1000 Message-Id: <20160914030121.9755-1-npiggin@gmail.com> X-Mailer: git-send-email 2.9.3 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nicholas Piggin Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" The hmi is defined to be higher priority than other maskable interrupts, so replay it first, as a best-effort to replay according to hardware priorities. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/irq.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 3cb46a3..ad1a930 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c @@ -155,6 +155,15 @@ notrace unsigned int __check_irq_replay(void) } /* + * Check if an hypervisor Maintenance interrupt happened. + * This is a higher priority interrupt than the others, so + * replay it first. + */ + local_paca->irq_happened &= ~PACA_IRQ_HMI; + if (happened & PACA_IRQ_HMI) + return 0xe60; + + /* * We may have missed a decrementer interrupt. We check the * decrementer itself rather than the paca irq_happened field * in case we also had a rollover while hard disabled @@ -189,11 +198,6 @@ notrace unsigned int __check_irq_replay(void) } #endif /* CONFIG_PPC_BOOK3E */ - /* Check if an hypervisor Maintenance interrupt happened */ - local_paca->irq_happened &= ~PACA_IRQ_HMI; - if (happened & PACA_IRQ_HMI) - return 0xe60; - /* There should be nothing left ! */ BUG_ON(local_paca->irq_happened != 0);