get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/808011/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 808011,
    "url": "http://patchwork.ozlabs.org/api/patches/808011/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/skiboot/patch/20170831043103.11537-1-oohall@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": "<20170831043103.11537-1-oohall@gmail.com>",
    "list_archive_url": null,
    "date": "2017-08-31T04:31:03",
    "name": "platform/witherspoon: Add slot names to table",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "2d8deda2919206d593da4fe3f37f99e2d24951cf",
    "submitter": {
        "id": 68108,
        "url": "http://patchwork.ozlabs.org/api/people/68108/?format=api",
        "name": "Oliver O'Halloran",
        "email": "oohall@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/skiboot/patch/20170831043103.11537-1-oohall@gmail.com/mbox/",
    "series": [
        {
            "id": 738,
            "url": "http://patchwork.ozlabs.org/api/series/738/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/skiboot/list/?series=738",
            "date": "2017-08-31T04:31:03",
            "name": "platform/witherspoon: Add slot names to table",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/738/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/808011/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/808011/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 [IPv6:2401:3900:2:1::3])\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 3xjTwC2hY6z9s7c\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 14:31:23 +1000 (AEST)",
            "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xjTwC1bbtzDqRM\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 14:31:23 +1000 (AEST)",
            "from mail-pg0-x244.google.com (mail-pg0-x244.google.com\n\t[IPv6:2607:f8b0:400e:c05::244])\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 3xjTw64w6nzDq5b\n\tfor <skiboot@lists.ozlabs.org>; Thu, 31 Aug 2017 14:31:18 +1000 (AEST)",
            "by mail-pg0-x244.google.com with SMTP id m15so6521054pgc.0\n\tfor <skiboot@lists.ozlabs.org>; Wed, 30 Aug 2017 21:31:18 -0700 (PDT)",
            "from flat-canetoad.ozlabs.ibm.com ([122.99.82.10])\n\tby smtp.gmail.com with ESMTPSA id\n\te82sm10909357pfh.51.2017.08.30.21.31.14\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 30 Aug 2017 21:31:15 -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=\"A0D2NLpn\"; 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=\"A0D2NLpn\"; dkim-atps=neutral",
            "lists.ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"A0D2NLpn\"; 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=wecnAsuimW5O3EVNX7iFiAe+cR3Yrd9I+r+oH2ZYubw=;\n\tb=A0D2NLpndEjwPTTjWQPnwirM8leDiDKKP80AxY8T1L2Dgoh90OgYDqsLzSgZm4o4Vh\n\tAb5ZhF8WtZoWBxP6g9Ke+51j5HqB44vYfIR/1H9A3nTE9AvHRheimIpLaVSboyu1N5h1\n\tNFLQaYO/NnVEu614xKKwEfOR3S9zDma/JaqaTHlGmRpfACVeahqp07TxW/5iFRlYTh9n\n\trCuBzby+G31D39itjHBztx9amyN/0Rj3J/oHGc/yYiv3pzmX2+LnE3wg5NDxCWNdjcmk\n\tZE3l3bRl5AkkSTTI5s3lXg8kt8TZ2q6czko6pH3ICoicR/MKNZL8rFFzWwe6LJ83vBMI\n\tdM2w==",
        "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=wecnAsuimW5O3EVNX7iFiAe+cR3Yrd9I+r+oH2ZYubw=;\n\tb=lnH0UELfA1q/UBsUsb358g6gUY86I9cbCVcOiQz2CQGq+02/EhZB2W8NYRnHypQ4Xx\n\tgmU53Thm90il22YR6BmtkKm9VMJlWoLCk3MQ0XWDHEAx2K/K8L3Wtts2BzOlQUeT8rcD\n\t/vgV5NIcCi1aWLA/16o7WlWJqRDpKUvHlBb38DRr+XkN91IDk+w5pBmEQPg0seUVeEGz\n\tYcsTTWUHXpH3Oo7hPRQwZsioK/Tr0IqxFKZ2YOt99y7/s6dYjcJI8oP6tfr9kazEShS7\n\tJfYQSmiOhefi9VGC1ej5apCZkXGgbeDq4b6c7adOp0vW13+nQPw9FLp6XAljwREZZsKq\n\tE0Pw==",
        "X-Gm-Message-State": "AHYfb5i7aM+GOt4qXjUeFWSi6lx1sMvHdE1KFWZMiBaILh06DpQ8gAA2\n\t+mbGtDEnZHFhQMS5",
        "X-Received": "by 10.99.4.81 with SMTP id 78mr987760pge.136.1504153876342;\n\tWed, 30 Aug 2017 21:31:16 -0700 (PDT)",
        "From": "Oliver O'Halloran <oohall@gmail.com>",
        "To": "skiboot@lists.ozlabs.org",
        "Date": "Thu, 31 Aug 2017 14:31:03 +1000",
        "Message-Id": "<20170831043103.11537-1-oohall@gmail.com>",
        "X-Mailer": "git-send-email 2.9.5",
        "Subject": "[Skiboot] [PATCH] platform/witherspoon: Add slot names to table",
        "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>",
        "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": "Add slot names for the pluggable slots to the platform slot table. The\nrecent addition of the IOSLOT HDAT tables was supposed to make this kind\nof addition to the slot tables unnecessary. However, the IOSLOT tables\nonly provides a list of the PCIe slots in the system and we still need\nto use the slot tables to find the associations between GPU (PCIe) and\nNPU (NVLink) devices.\n\nThis patch adds the extra slot table entries to work around this so\nslot names are correct on Sequoia Witherspoon systems, however it\ndoes not address the underlying problem of differentiating between\nRedbus and Sequoia systems.\n\nSigned-off-by: Oliver O'Halloran <oohall@gmail.com>\n---\n platforms/astbmc/astbmc.h      | 10 ++++++\n platforms/astbmc/witherspoon.c | 80 ++++++++++++++++++++++++++++++------------\n 2 files changed, 68 insertions(+), 22 deletions(-)",
    "diff": "diff --git a/platforms/astbmc/astbmc.h b/platforms/astbmc/astbmc.h\nindex d538f97538dc..7da5a0414809 100644\n--- a/platforms/astbmc/astbmc.h\n+++ b/platforms/astbmc/astbmc.h\n@@ -41,6 +41,16 @@ struct slot_table_entry {\n \tconst struct slot_table_entry *children;\n };\n \n+/*\n+ * Helper to reduce the noise in the PHB table\n+ */\n+#define ST_PHB_ENTRY(chip_id, phb_id, child_table) \\\n+{ \\\n+\t.etype = st_phb, \\\n+\t.location = ST_LOC_PHB(chip_id, phb_id), \\\n+\t.children = child_table \\\n+}\n+\n extern const struct bmc_platform astbmc_ami;\n extern const struct bmc_platform astbmc_openbmc;\n \ndiff --git a/platforms/astbmc/witherspoon.c b/platforms/astbmc/witherspoon.c\nindex a987e905642c..7fc86f866e8e 100644\n--- a/platforms/astbmc/witherspoon.c\n+++ b/platforms/astbmc/witherspoon.c\n@@ -30,6 +30,42 @@\n \n #include \"astbmc.h\"\n \n+static const struct slot_table_entry witherspoon_slot1[] = {\n+\t{\n+\t\t.etype = st_pluggable_slot,\n+\t\t.location = ST_LOC_DEVFN(0,0),\n+\t\t.name = \"SLOT1\"\n+\t},\n+\t{ .etype = st_end },\n+};\n+\n+static const struct slot_table_entry witherspoon_slot2_shared[] = {\n+\t{\n+\t\t.etype = st_pluggable_slot,\n+\t\t.location = ST_LOC_DEVFN(0,0),\n+\t\t.name = \"SLOT2\"\n+\t},\n+\t{ .etype = st_end },\n+};\n+\n+static const struct slot_table_entry witherspoon_slot3[] = {\n+\t{\n+\t\t.etype = st_pluggable_slot,\n+\t\t.location = ST_LOC_DEVFN(0,0),\n+\t\t.name = \"SLOT3\"\n+\t},\n+\t{ .etype = st_end },\n+};\n+\n+static const struct slot_table_entry witherspoon_slot4[] = {\n+\t{\n+\t\t.etype = st_pluggable_slot,\n+\t\t.location = ST_LOC_DEVFN(0,0),\n+\t\t.name = \"SLOT4\"\n+\t},\n+\t{ .etype = st_end },\n+};\n+\n static const struct slot_table_entry witherspoon_gpu0[] = {\n \t{\n \t\t.etype = st_pluggable_slot,\n@@ -146,7 +182,7 @@ static const struct slot_table_entry witherspoon_plx1_up[] = {\n \t{ .etype = st_end },\n };\n \n-static const struct slot_table_entry witherspoon_phb0_4_slot[] = {\n+static const struct slot_table_entry witherspoon_plx0_phb[] = {\n \t{\n \t\t.etype = st_builtin_dev,\n \t\t.location = ST_LOC_DEVFN(0,0),\n@@ -155,7 +191,7 @@ static const struct slot_table_entry witherspoon_phb0_4_slot[] = {\n \t{ .etype = st_end },\n };\n \n-static const struct slot_table_entry witherspoon_phb8_5_slot[] = {\n+static const struct slot_table_entry witherspoon_plx1_phb[] = {\n \t{\n \t\t.etype = st_builtin_dev,\n \t\t.location = ST_LOC_DEVFN(0,0),\n@@ -202,27 +238,27 @@ static const struct slot_table_entry witherspoon_npu8_slots[] = {\n \t{ .etype = st_end },\n };\n \n+/*\n+ * Slot numbering:\n+ *\n+ * slot 1 - x4 slot\n+ * slot 2 - shared slot, 8x to each chip's PHB3\n+ * slot 3 - 16x \\w CAPI, second chip\n+ * slot 4 - 16x \\w CAPI, first chip\n+ */\n+\n static const struct slot_table_entry witherspoon_phb_table[] = {\n-\t{\n-\t\t.etype = st_phb,\n-\t\t.location = ST_LOC_PHB(0,4),\n-\t\t.children = witherspoon_phb0_4_slot,\n-\t},\n-\t{\n-\t\t.etype = st_phb,\n-\t\t.location = ST_LOC_PHB(0,7),\n-\t\t.children = witherspoon_npu0_slots,\n-\t},\n-\t{\n-\t\t.etype = st_phb,\n-\t\t.location = ST_LOC_PHB(8,5),\n-\t\t.children = witherspoon_phb8_5_slot,\n-\t},\n-\t{\n-\t\t.etype = st_phb,\n-\t\t.location = ST_LOC_PHB(8,8),\n-\t\t.children = witherspoon_npu8_slots,\n-\t},\n+\tST_PHB_ENTRY(0, 0, witherspoon_slot4),\n+\tST_PHB_ENTRY(0, 3, witherspoon_slot2_shared),\n+\tST_PHB_ENTRY(0, 4, witherspoon_plx0_phb),\n+\tST_PHB_ENTRY(0, 7, witherspoon_npu0_slots),\n+\n+\tST_PHB_ENTRY(8, 0, witherspoon_slot3),\n+\tST_PHB_ENTRY(8, 3, witherspoon_slot2_shared),\n+\tST_PHB_ENTRY(8, 4, witherspoon_slot1),\n+\tST_PHB_ENTRY(8, 5, witherspoon_plx1_phb),\n+\tST_PHB_ENTRY(8, 8, witherspoon_npu8_slots),\n+\n \t{ .etype = st_end },\n };\n \n",
    "prefixes": []
}