get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 816086,
    "url": "http://patchwork.ozlabs.org/api/patches/816086/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20170920071512.19522-5-bsingharora@gmail.com/",
    "project": {
        "id": 2,
        "url": "http://patchwork.ozlabs.org/api/projects/2/?format=api",
        "name": "Linux PPC development",
        "link_name": "linuxppc-dev",
        "list_id": "linuxppc-dev.lists.ozlabs.org",
        "list_email": "linuxppc-dev@lists.ozlabs.org",
        "web_url": "https://github.com/linuxppc/wiki/wiki",
        "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git",
        "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/",
        "list_archive_url": "https://lore.kernel.org/linuxppc-dev/",
        "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/",
        "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}"
    },
    "msgid": "<20170920071512.19522-5-bsingharora@gmail.com>",
    "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20170920071512.19522-5-bsingharora@gmail.com/",
    "date": "2017-09-20T07:15:11",
    "name": "[v3,4/5] powerpc/mce: Hookup ierror (instruction) UE errors",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "e052de17b18da7677c1cb840f9b92cfe27c30f10",
    "submitter": {
        "id": 9347,
        "url": "http://patchwork.ozlabs.org/api/people/9347/?format=api",
        "name": "Balbir Singh",
        "email": "bsingharora@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20170920071512.19522-5-bsingharora@gmail.com/mbox/",
    "series": [
        {
            "id": 4046,
            "url": "http://patchwork.ozlabs.org/api/series/4046/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=4046",
            "date": "2017-09-20T07:15:07",
            "name": "Revisit MCE handling for UE Errors",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/4046/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/816086/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/816086/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>",
        "X-Original-To": [
            "patchwork-incoming@ozlabs.org",
            "linuxppc-dev@lists.ozlabs.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@ozlabs.org",
            "linuxppc-dev@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 3xxrq340k8z9s81\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 20 Sep 2017 17:24:47 +1000 (AEST)",
            "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xxrq32syCzDqZ9\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 20 Sep 2017 17:24:47 +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 3xxrcT4SKrzDqYR\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tWed, 20 Sep 2017 17:15:37 +1000 (AEST)",
            "by mail-pg0-x244.google.com with SMTP id i130so1197339pgc.0\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tWed, 20 Sep 2017 00:15:37 -0700 (PDT)",
            "from firefly.ozlabs.ibm.com.ozlabs.ibm.com ([122.99.82.10])\n\tby smtp.gmail.com with ESMTPSA id\n\ts68sm7482771pfd.72.2017.09.20.00.15.33\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 20 Sep 2017 00:15:35 -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=\"M4qC42N1\"; 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=\"M4qC42N1\"; dkim-atps=neutral",
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gmail.com\n\t(client-ip=2607:f8b0:400e:c05::244; helo=mail-pg0-x244.google.com;\n\tenvelope-from=bsingharora@gmail.com; receiver=<UNKNOWN>)",
            "lists.ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"M4qC42N1\"; 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:in-reply-to:references;\n\tbh=1Pa3hMDuWuKFStaaiUNRgk+cr5kawv9X9bpWwLOdjEw=;\n\tb=M4qC42N1dIvvdSFMgj7lDh/tNFnp5n0YK4ZnJdAMgEMrTTV68p3D+/vd1AROELmJfO\n\t/658qjifUXUNd4MbamuO9dWVJBF7X0SsoaK9egSF6tct5ULZyo3jLChvwRbmViKiHa/S\n\tcRLVyPv1d7UFf+iIvx36b/vSl0TGR3kVXZn2Rwlz6aMN5mfXkHrfgyf+pY/35+0jbhbS\n\t9PG5jGcr3O4LhQ7lhsPeRsY0ez/dNxB+04Q61nzyGgdXWmksIq1NRFHvNhIDvWQkclXP\n\t6Wx9AD6JCWf5HAGFAgsSiqtNZwBVi5jbWrnDfkdxG0Jpf8C/0keqI6Wk+bm3dybq7Ws4\n\tk1XQ==",
        "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:in-reply-to\n\t:references;\n\tbh=1Pa3hMDuWuKFStaaiUNRgk+cr5kawv9X9bpWwLOdjEw=;\n\tb=BbeTKcDnok8wh7PrAppZYmf2FeLMr6A0yYzvlRtnN0VgGXREE9im3HslRU6pBCFqoE\n\tfw6igWgzdBYA6KHT6DaBXO6zJj8yqmxY92PSgBaYmbv80rq/xKjfVd3F2TRz+66yu/J/\n\tEvwM8cDaZ3Ho1SI3Pd8t6Zggu1y676xdvvT7R9l1/6b1E0Ou2VM7L20EPRgFcPRvbgd3\n\tQG6Sq6q9sYkY6FyxjlZ1uzI9cqyKlc9NltHjDww3bVAN/Xy7deeiBeaFaI0SOaesJmSy\n\tRt6A4mgGdYtGlDU13oGSD2q3Iz3scqOphiMg2Eep441emOM6hZdJb4XJ83Xf/7vaMDZO\n\t5bWw==",
        "X-Gm-Message-State": "AHPjjUiplFl3XyJf23tojhxh3zlv6eQTQLhiXcVWl0TP3VP+jDRfhBCP\n\ty5noJOeFY/ujl+2U7qwyqV4=",
        "X-Google-Smtp-Source": "AOwi7QC/yqG67q+EVXBV5v2qd13W77NmKEwHgBVbeYYM2kc773tUiUdW5C5vu9aRosCKXkRUen3pbA==",
        "X-Received": "by 10.99.132.199 with SMTP id k190mr1238178pgd.25.1505891735936; \n\tWed, 20 Sep 2017 00:15:35 -0700 (PDT)",
        "From": "Balbir Singh <bsingharora@gmail.com>",
        "To": "mpe@ellerman.id.au",
        "Subject": "[PATCH v3 4/5] powerpc/mce: Hookup ierror (instruction) UE errors",
        "Date": "Wed, 20 Sep 2017 17:15:11 +1000",
        "Message-Id": "<20170920071512.19522-5-bsingharora@gmail.com>",
        "X-Mailer": "git-send-email 2.9.5",
        "In-Reply-To": "<20170920071512.19522-1-bsingharora@gmail.com>",
        "References": "<20170920071512.19522-1-bsingharora@gmail.com>",
        "X-BeenThere": "linuxppc-dev@lists.ozlabs.org",
        "X-Mailman-Version": "2.1.24",
        "Precedence": "list",
        "List-Id": "Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>",
        "List-Unsubscribe": "<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.ozlabs.org/pipermail/linuxppc-dev/>",
        "List-Post": "<mailto:linuxppc-dev@lists.ozlabs.org>",
        "List-Help": "<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>",
        "List-Subscribe": "<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>",
        "Cc": "mahesh@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org,\n\tnpiggin@gmail.com",
        "Errors-To": "linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org",
        "Sender": "\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"
    },
    "content": "Hookup instruction errors (UE) for memory offling via memory_failure()\nin a manner similar to load/store errors (derror). Since we have access\nto the NIP, the conversion is a one step process in this case.\n\nSigned-off-by: Balbir Singh <bsingharora@gmail.com>\n---\n arch/powerpc/kernel/mce_power.c | 23 ++++++++++++++++++++---\n 1 file changed, 20 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/arch/powerpc/kernel/mce_power.c b/arch/powerpc/kernel/mce_power.c\nindex 66b0a5d..31ec893 100644\n--- a/arch/powerpc/kernel/mce_power.c\n+++ b/arch/powerpc/kernel/mce_power.c\n@@ -488,7 +488,8 @@ static int mce_find_instr_ea_and_pfn(struct pt_regs *regs, uint64_t *addr,\n \n static int mce_handle_ierror(struct pt_regs *regs,\n \t\tconst struct mce_ierror_table table[],\n-\t\tstruct mce_error_info *mce_err, uint64_t *addr)\n+\t\tstruct mce_error_info *mce_err, uint64_t *addr,\n+\t\tuint64_t *phys_addr)\n {\n \tuint64_t srr1 = regs->msr;\n \tint handled = 0;\n@@ -540,8 +541,23 @@ static int mce_handle_ierror(struct pt_regs *regs,\n \t\t}\n \t\tmce_err->severity = table[i].severity;\n \t\tmce_err->initiator = table[i].initiator;\n-\t\tif (table[i].nip_valid)\n+\t\tif (table[i].nip_valid) {\n \t\t\t*addr = regs->nip;\n+\t\t\tif (mce_err->severity == MCE_SEV_ERROR_SYNC &&\n+\t\t\t\ttable[i].error_type == MCE_ERROR_TYPE_UE) {\n+\t\t\t\tunsigned long pfn;\n+\t\t\t\tstruct mm_struct *mm;\n+\n+\t\t\t\tif (user_mode(regs))\n+\t\t\t\t\tmm = current->mm;\n+\t\t\t\telse\n+\t\t\t\t\tmm = &init_mm;\n+\n+\t\t\t\tpfn = addr_to_pfn(mm, regs->nip);\n+\t\t\t\tif (pfn != ULONG_MAX)\n+\t\t\t\t\t*phys_addr = pfn;\n+\t\t\t}\n+\t\t}\n \t\treturn handled;\n \t}\n \n@@ -675,7 +691,8 @@ static long mce_handle_error(struct pt_regs *regs,\n \t\thandled = mce_handle_derror(regs, dtable, &mce_err, &addr,\n \t\t\t\t&phys_addr);\n \telse\n-\t\thandled = mce_handle_ierror(regs, itable, &mce_err, &addr);\n+\t\thandled = mce_handle_ierror(regs, itable, &mce_err, &addr,\n+\t\t\t\t&phys_addr);\n \n \tif (!handled && mce_err.error_type == MCE_ERROR_TYPE_UE)\n \t\thandled = mce_handle_ue_error(regs);\n",
    "prefixes": [
        "v3",
        "4/5"
    ]
}