get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 804026,
    "url": "http://patchwork.ozlabs.org/api/patches/804026/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20170821134951.18848-1-lvivier@redhat.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": "<20170821134951.18848-1-lvivier@redhat.com>",
    "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20170821134951.18848-1-lvivier@redhat.com/",
    "date": "2017-08-21T13:49:50",
    "name": "[1/2] powerpc/workqueue: update list of possible CPUs",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": false,
    "hash": "b451ade9a9dbf00af7d3b1de686843ce1cda0e4c",
    "submitter": {
        "id": 66421,
        "url": "http://patchwork.ozlabs.org/api/people/66421/?format=api",
        "name": "Laurent Vivier",
        "email": "lvivier@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20170821134951.18848-1-lvivier@redhat.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/804026/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/804026/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 [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 3xbZpv2hc7z9s78\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 21 Aug 2017 23:51:19 +1000 (AEST)",
            "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xbZpv1rbwzDqZw\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 21 Aug 2017 23:51:19 +1000 (AEST)",
            "from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xbZnK2RQZzDqZ7\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tMon, 21 Aug 2017 23:49:57 +1000 (AEST)",
            "from smtp.corp.redhat.com\n\t(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id D9AAC4A6E7;\n\tMon, 21 Aug 2017 13:49:54 +0000 (UTC)",
            "from thinkpad.redhat.com (ovpn-116-24.ams2.redhat.com\n\t[10.36.116.24])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id C56DD600C8;\n\tMon, 21 Aug 2017 13:49:52 +0000 (UTC)"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.3.2 mx1.redhat.com D9AAC4A6E7",
        "Authentication-Results": [
            "ext-mx09.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com",
            "ext-mx09.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=lvivier@redhat.com"
        ],
        "From": "Laurent Vivier <lvivier@redhat.com>",
        "To": "linux-kernel@vger.kernel.org",
        "Subject": "[PATCH 1/2] powerpc/workqueue: update list of possible CPUs",
        "Date": "Mon, 21 Aug 2017 15:49:50 +0200",
        "Message-Id": "<20170821134951.18848-1-lvivier@redhat.com>",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.11",
        "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.38]); Mon, 21 Aug 2017 13:49:55 +0000 (UTC)",
        "X-BeenThere": "linuxppc-dev@lists.ozlabs.org",
        "X-Mailman-Version": "2.1.23",
        "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": "Jens Axboe <axboe@kernel.dk>, Lai Jiangshan <jiangshanlai@gmail.com>,\n\tlinux-block@vger.kernel.org, Tejun Heo <tj@kernel.org>,\n\tlinuxppc-dev@lists.ozlabs.org",
        "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": "In wq_numa_init() a list of NUMA nodes with their list of possible CPUs\nis built.\n\nUnfortunately, on powerpc, the Firmware is only able to provide the\nnode of a CPU if the CPU is present. So, in our case (possible CPU)\nCPU ids are known, but as the CPU is not present, the node id is\nunknown and all the unplugged CPUs are attached to node 0.\n\nWhen we hotplugged CPU, there can be an inconsistency between\nthe node id known by the workqueue, and the real node id of\nthe CPU.\n\nThis patch adds a hotplug handler to add the hotplugged CPU to\nupdate the node entry in wq_numa_possible_cpumask array.\n\nSigned-off-by: Laurent Vivier <lvivier@redhat.com>\n---\n arch/powerpc/kernel/smp.c |  1 +\n include/linux/workqueue.h |  1 +\n kernel/workqueue.c        | 21 +++++++++++++++++++++\n 3 files changed, 23 insertions(+)",
    "diff": "diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c\nindex 8d3320562c70..abc533146514 100644\n--- a/arch/powerpc/kernel/smp.c\n+++ b/arch/powerpc/kernel/smp.c\n@@ -964,6 +964,7 @@ void start_secondary(void *unused)\n \n \tset_numa_node(numa_cpu_lookup_table[cpu]);\n \tset_numa_mem(local_memory_node(numa_cpu_lookup_table[cpu]));\n+\twq_numa_add_possible_cpu(cpu);\n \n \tsmp_wmb();\n \tnotify_cpu_starting(cpu);\ndiff --git a/include/linux/workqueue.h b/include/linux/workqueue.h\nindex db6dc9dc0482..4ef030dae22c 100644\n--- a/include/linux/workqueue.h\n+++ b/include/linux/workqueue.h\n@@ -644,6 +644,7 @@ int workqueue_online_cpu(unsigned int cpu);\n int workqueue_offline_cpu(unsigned int cpu);\n #endif\n \n+void wq_numa_add_possible_cpu(unsigned int cpu);\n int __init workqueue_init_early(void);\n int __init workqueue_init(void);\n \ndiff --git a/kernel/workqueue.c b/kernel/workqueue.c\nindex ca937b0c3a96..d1a99e25d5da 100644\n--- a/kernel/workqueue.c\n+++ b/kernel/workqueue.c\n@@ -5486,6 +5486,27 @@ static inline void wq_watchdog_init(void) { }\n \n #endif\t/* CONFIG_WQ_WATCHDOG */\n \n+void wq_numa_add_possible_cpu(unsigned int cpu)\n+{\n+\tint node;\n+\n+\tif (num_possible_nodes() <= 1)\n+\t\treturn;\n+\n+\tif (wq_disable_numa)\n+\t\treturn;\n+\n+\tif (!wq_numa_enabled)\n+\t\treturn;\n+\n+\tnode = cpu_to_node(cpu);\n+\tif (node == NUMA_NO_NODE)\n+\t\treturn;\n+\n+\tcpumask_set_cpu(cpu, wq_numa_possible_cpumask[node]);\n+}\n+EXPORT_SYMBOL_GPL(wq_numa_add_possible_cpu);\n+\n static void __init wq_numa_init(void)\n {\n \tcpumask_var_t *tbl;\n",
    "prefixes": [
        "1/2"
    ]
}