Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/779965/?format=api
{ "id": 779965, "url": "http://patchwork.ozlabs.org/api/patches/779965/?format=api", "web_url": "http://patchwork.ozlabs.org/project/skiboot/patch/20170623121101.30781-1-npiggin@gmail.com/", "project": { "id": 44, "url": "http://patchwork.ozlabs.org/api/projects/44/?format=api", "name": "skiboot firmware development", "link_name": "skiboot", "list_id": "skiboot.lists.ozlabs.org", "list_email": "skiboot@lists.ozlabs.org", "web_url": "http://github.com/open-power/skiboot", "scm_url": "http://github.com/open-power/skiboot", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170623121101.30781-1-npiggin@gmail.com>", "list_archive_url": null, "date": "2017-06-23T12:11:01", "name": "[RFC] hmi: clear xscom and unknown bits from HMER", "commit_ref": null, "pull_url": null, "state": "rejected", "archived": false, "hash": "b7e9982de9dc3d55576dcf3846819d7eb05af2ae", "submitter": { "id": 69518, "url": "http://patchwork.ozlabs.org/api/people/69518/?format=api", "name": "Nicholas Piggin", "email": "npiggin@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/skiboot/patch/20170623121101.30781-1-npiggin@gmail.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/779965/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/779965/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "skiboot@lists.ozlabs.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "skiboot@lists.ozlabs.org" ], "Received": [ "from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3wvHP31cYHz9s7h\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 23 Jun 2017 22:11:35 +1000 (AEST)", "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3wvHP30bqrzDqpl\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 23 Jun 2017 22:11:35 +1000 (AEST)", "from mail-pf0-x241.google.com (mail-pf0-x241.google.com\n\t[IPv6:2607:f8b0:400e:c00::241])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3wvHNl1zWFzDqhp\n\tfor <skiboot@lists.ozlabs.org>; Fri, 23 Jun 2017 22:11:19 +1000 (AEST)", "by mail-pf0-x241.google.com with SMTP id s66so7074001pfs.2\n\tfor <skiboot@lists.ozlabs.org>; Fri, 23 Jun 2017 05:11:19 -0700 (PDT)", "from roar.au.ibm.com ([210.185.119.63])\n\tby smtp.gmail.com with ESMTPSA id\n\t188sm8367584pgc.49.2017.06.23.05.11.12\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 23 Jun 2017 05:11:16 -0700 (PDT)" ], "Authentication-Results": [ "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"BgnUkd7h\"; dkim-atps=neutral", "lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"BgnUkd7h\"; dkim-atps=neutral", "lists.ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"BgnUkd7h\"; dkim-atps=neutral" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id;\n\tbh=KvAppMiVeBMJjSBKz8Q2hoShk1Mb4eJ3A8wGBHQEWOw=;\n\tb=BgnUkd7hhUL9sp/+DtKmKD9DdNdHF6QXsJKWyyGsDWgs/3/A6F7xEJSjlDkTM/5WH5\n\tAYQNqDMHF41AeEteFghHqr2FEziXoDAfxZfkXyNjhRqoo2RRMyYeiPHLx3UboYmKwZIF\n\t25v8gqzP+NJPtYAbSu17yMz3xqcSR2XDuG5mqRsEzQQSDLyDBqBcVUHEKT9ncCodLR/W\n\thLodLmJVSrIJ33hS8lDLq0+MAYKjFkVgdfRW/4ULPxOakZspMef3VMr0YZlxvilyiqPY\n\tiwM/bEs3D8CnbHze4kNyQpy0HM3RWKh3X+HfKdNWfwM7cg39P4QQNofJK4Pw4LBOnFU3\n\tjdTg==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id;\n\tbh=KvAppMiVeBMJjSBKz8Q2hoShk1Mb4eJ3A8wGBHQEWOw=;\n\tb=K77FjIfm4SSPgEdWLGMxw5uXc5LRSfBZIfHzLJZhGLyGuuNx3z45P1zSqZg8Xd/kQu\n\tSTmxaxwIqDZVXp7aiDPNSMFbO/3kjTXzNK+2g5xiOHzYQiKnsaZWMrdmOyICkeTOc8ip\n\tGAPjAhgjMvB5csiu196UeHqCCG4FZ9rykoVWOMGCrTqmjXRrljGDNU876yJFOyzr952v\n\tcrggpIA+S4u+sQIruI0a6rHSpiysEWnCZm1o/Clyu7v4V+pdI1SLLK1VQnkhDUHnrdnD\n\tAinkMq546YgksxhcdablysrMwmdYx4CdbwYc6DMREcRXJrf7UcN0CTeJxiDq0XlWPtah\n\t7Qdg==", "X-Gm-Message-State": "AKS2vOw2QT93+LUqxviOFA07nfEYrlgn2IR6Dr8SAlw1IKF0c2facP+f\n\tbXvcI+mhMpD3hCSI", "X-Received": "by 10.99.49.20 with SMTP id x20mr7772390pgx.181.1498219877034;\n\tFri, 23 Jun 2017 05:11:17 -0700 (PDT)", "From": "Nicholas Piggin <npiggin@gmail.com>", "To": "skiboot@lists.ozlabs.org", "Date": "Fri, 23 Jun 2017 22:11:01 +1000", "Message-Id": "<20170623121101.30781-1-npiggin@gmail.com>", "X-Mailer": "git-send-email 2.11.0", "Subject": "[Skiboot] [RFC][PATCH] hmi: clear xscom and unknown bits from HMER", "X-BeenThere": "skiboot@lists.ozlabs.org", "X-Mailman-Version": "2.1.23", "Precedence": "list", "List-Id": "Mailing list for skiboot development <skiboot.lists.ozlabs.org>", "List-Unsubscribe": "<https://lists.ozlabs.org/options/skiboot>,\n\t<mailto:skiboot-request@lists.ozlabs.org?subject=unsubscribe>", "List-Archive": "<http://lists.ozlabs.org/pipermail/skiboot/>", "List-Post": "<mailto:skiboot@lists.ozlabs.org>", "List-Help": "<mailto:skiboot-request@lists.ozlabs.org?subject=help>", "List-Subscribe": "<https://lists.ozlabs.org/listinfo/skiboot>,\n\t<mailto:skiboot-request@lists.ozlabs.org?subject=subscribe>", "Cc": "Ryan Grimm <grimm@linux.vnet.ibm.com>, aksadiga@in.ibm.com", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org", "Sender": "\"Skiboot\"\n\t<skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>" }, "content": "It has been observed the xscom bit in HMER gets stuck (as-yet\nunkonwn root cause -- HMEER should disable those exceptions).\nThis causes HMIs to be continually taken.\n\nHMI: Received HMI interrupt: HMER = 0x0040000000000000\n\nAdd some attempt to handle this by clearing the HMER and HMEER.\n\nTry to clear HMER for other unknown HMIs (alternative is to not\nrecover).\n\nThere seems to be no point in continually taking an HMI that will\nnever be handled. By not handling it we already implicitly are\ntrying to \"continue\" without solving anything aren't we?\n\n---\n core/hmi.c | 26 ++++++++++++++++++++++++++\n hw/xscom.c | 5 +----\n include/processor.h | 7 +++++++\n 3 files changed, 34 insertions(+), 4 deletions(-)", "diff": "diff --git a/core/hmi.c b/core/hmi.c\nindex 84f2c2d6..7ab5810d 100644\n--- a/core/hmi.c\n+++ b/core/hmi.c\n@@ -823,6 +823,32 @@ int handle_hmi_exception(uint64_t hmer, struct OpalHMIEvent *hmi_evt)\n \t\t}\n \t}\n \n+\tif (hmer & SPR_HMER_XSCOM_MASK) {\n+\t\thmer &= ~SPR_HMER_XSCOM_MASK;\n+\t\tif (hmi_evt) {\n+\t\t\thmi_evt->severity = OpalHMI_SEV_NO_ERROR;\n+\t\t\thmi_evt->type = OpalHMI_ERROR_XSCOM_DONE;\n+\t\t\tqueue_hmi_event(hmi_evt, recover);\n+\t\t}\n+\t\tsync();\n+\t\tmtspr(SPR_HMEER, mfspr(SPR_HMEER) & ~(SPR_HMER_XSCOM_FAIL |\n+\t\t\t\t\t\t\tSPR_HMER_XSCOM_DONE))\n+\t\tisync();\n+\n+\t\tprlog(PR_DEBUG, \"HMI: Unexpected XSCOM (clearing).\\n\");\n+\t}\n+\n+\tif (hmer) {\n+\t\thmer = 0;\n+\t\tif (hmi_evt) {\n+\t\t\thmi_evt->severity = OpalHMI_SEV_WARNING;\n+\t\t\thmi_evt->type = 0; /* Anything sane we can put here? */\n+\t\t\tqueue_hmi_event(hmi_evt, recover);\n+\t\t}\n+\t\tprlog(PR_DEBUG, \"HMI: Unhandled (attempting to continue).\\n\");\n+\t}\n+\n+\n \tif (recover == 0)\n \t\tdisable_fast_reboot(\"Unrecoverable HMI\");\n \t/*\ndiff --git a/hw/xscom.c b/hw/xscom.c\nindex 63813f1e..47a78e87 100644\n--- a/hw/xscom.c\n+++ b/hw/xscom.c\n@@ -25,10 +25,7 @@\n #include <opal-api.h>\n #include <timebase.h>\n \n-/* Mask of bits to clear in HMER before an access */\n-#define HMER_CLR_MASK\t(~(SPR_HMER_XSCOM_FAIL | \\\n-\t\t\t SPR_HMER_XSCOM_DONE | \\\n-\t\t\t SPR_HMER_XSCOM_STATUS))\n+#define HMER_CLR_MASK (~SPR_HMER_XSCOM_MASK)\n \n DEFINE_LOG_ENTRY(OPAL_RC_XSCOM_RW, OPAL_PLATFORM_ERR_EVT, OPAL_XSCOM,\n \t\tOPAL_CEC_HARDWARE, OPAL_PREDICTIVE_ERR_GENERAL,\ndiff --git a/include/processor.h b/include/processor.h\nindex 5906b865..07111856 100644\n--- a/include/processor.h\n+++ b/include/processor.h\n@@ -150,6 +150,13 @@\n #define SPR_HMER_XSCOM_STATUS\t\tPPC_BITMASK(21,23)\n \n /*\n+ * Mask of bits to clear in HMER before an xscom access\n+ */\n+#define SPR_HMER_XSCOM_MASK\t\t(SPR_HMER_XSCOM_FAIL | \\\n+\t\t\t\t\t SPR_HMER_XSCOM_DONE | \\\n+\t\t\t\t\t SPR_HMER_XSCOM_STATUS)\n+\n+/*\n * HMEER: initial bits for HMI interrupt enable mask.\n * Per Dave Larson, never enable 8,9,21-23\n */\n", "prefixes": [ "RFC" ] }