get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 428129,
    "url": "http://patchwork.ozlabs.org/api/patches/428129/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/1421096218-27776-1-git-send-email-arnab_basu@rocketmail.com/",
    "project": {
        "id": 18,
        "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api",
        "name": "U-Boot",
        "link_name": "uboot",
        "list_id": "u-boot.lists.denx.de",
        "list_email": "u-boot@lists.denx.de",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<1421096218-27776-1-git-send-email-arnab_basu@rocketmail.com>",
    "list_archive_url": null,
    "date": "2015-01-12T20:56:58",
    "name": "[U-Boot,v2,7/9] ARMv8: PSCI: Fixup the device tree for PSCI v0.2",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": false,
    "hash": "fa9b18c017848ddc4cad58e98d4ac1650b956a2d",
    "submitter": {
        "id": 65465,
        "url": "http://patchwork.ozlabs.org/api/people/65465/?format=api",
        "name": "Arnab Basu",
        "email": "arnab_basu@rocketmail.com"
    },
    "delegate": {
        "id": 1694,
        "url": "http://patchwork.ozlabs.org/api/users/1694/?format=api",
        "username": "aaribaud",
        "first_name": "Albert",
        "last_name": "ARIBAUD",
        "email": "albert.aribaud@free.fr"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/1421096218-27776-1-git-send-email-arnab_basu@rocketmail.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/428129/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/428129/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<u-boot-bounces@lists.denx.de>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Received": [
            "from theia.denx.de (theia.denx.de [85.214.87.163])\n\tby ozlabs.org (Postfix) with ESMTP id E153C14015A\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 13 Jan 2015 08:02:17 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 4D4CC4B67D;\n\tMon, 12 Jan 2015 22:01:55 +0100 (CET)",
            "from theia.denx.de ([127.0.0.1])\n\tby localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id fzmrud8fYoWO; Mon, 12 Jan 2015 22:01:55 +0100 (CET)",
            "from theia.denx.de (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 1FEEF4B67E;\n\tMon, 12 Jan 2015 22:01:30 +0100 (CET)",
            "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id C598B4B608\n\tfor <u-boot@lists.denx.de>; Mon, 12 Jan 2015 22:00:03 +0100 (CET)",
            "from theia.denx.de ([127.0.0.1])\n\tby localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id xl077lbb4OK3 for <u-boot@lists.denx.de>;\n\tMon, 12 Jan 2015 22:00:03 +0100 (CET)",
            "from nm37-vm4.bullet.mail.ne1.yahoo.com\n\t(nm37-vm4.bullet.mail.ne1.yahoo.com [98.138.229.132])\n\tby theia.denx.de (Postfix) with ESMTPS id 3857D4B605\n\tfor <u-boot@lists.denx.de>; Mon, 12 Jan 2015 22:00:00 +0100 (CET)",
            "from [127.0.0.1] by nm37.bullet.mail.ne1.yahoo.com with NNFMP;\n\t12 Jan 2015 20:59:58 -0000",
            "from [98.138.100.118] by nm37.bullet.mail.ne1.yahoo.com with NNFMP;\n\t12 Jan 2015 20:57:06 -0000",
            "from [106.10.166.123] by tm109.bullet.mail.ne1.yahoo.com with\n\tNNFMP; 12 Jan 2015 20:57:06 -0000",
            "from [106.10.167.146] by tm12.bullet.mail.sg3.yahoo.com with NNFMP;\n\t12 Jan 2015 20:57:05 -0000",
            "from [127.0.0.1] by smtp119.mail.sg3.yahoo.com with NNFMP;\n\t12 Jan 2015 20:57:05 -0000"
        ],
        "X-policyd-weight": "NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5\n\tNOT_IN_BL_NJABL=-1.5 (only DNSBL check requested)",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=rocketmail.com;\n\ts=s2048; \n\tt=1421096398; bh=TYYYegJPxWRpDEl8uVOzO9KRVQ7OkVLw7Lh1EDM3kJ8=;\n\th=From:To:Cc:Subject:Date:From:Subject;\n\tb=PXEOn84NwEfxE5KikTTopTXR9UrGTIYX1XLHAGCGXKb7K22QMO2TIglnyaGZupTUE1OYtHATK8ryzGTlnxHdakznj+6ZLh/Nmei6M5wkUAeFZOhbOIy/47eKspcLVXjKzRkOHZ5XdY+gbN/9rwrglzq41wOw37rEPpXS1pqcIy8rgyvRUhnAg61mT6x+zTGe3qGJt8TlqPoOJ73+tRLEARdmxjeclQQB3yUuQTmhLQlMsTn1udRsrwLpV4+o7f+OciHf/8wNXFjcvJ9CwRLSZSPMgSGseWttYfqdg4iLCQPBKYYJn0aqiSNHfa1b/Pp5OCGBcj+RXLFIYm8ZtH6Y3A==",
        "DomainKey-Signature": "a=rsa-sha1; q=dns; c=nofws; s=s2048; d=rocketmail.com; \n\tb=ppCLE2smmchac5tgNMcuJYFuJQ77p7EyUeP3SegiLrnorutCP+KWXIkWxR4F6s43TLhPtA6Okcqo0yb4U3pdMJvhRDmfeAh/NBlnR1dFeKD2EGbm/NBa0szf3ubw/tbiIuw3Lr8DUjh05UQ8N2cTBy3n1lv0eHP14Juf32SA31LjVuxOGU83lpfISVj4JDYbo00q3Z9XUTJoleNBkvV9O+fSchg5B6TtSrs9loZ/7kcKFsSvbDMQ5DjqRx1Si6uhbS9mT3jOsXpxSENCZkgt1IoWkAt7LexekiFTjM9P7IXWFqcZp1PXUYeR9vWhhEA+zx0GRZmL7bqFoMnRKU4kYg==;",
        "X-Yahoo-Newman-Id": "757816.82257.bm@smtp119.mail.sg3.yahoo.com",
        "X-Yahoo-Newman-Property": "ymail-4",
        "X-YMail-OSG": "yubFsE4VM1nQvskUHdCmZSbcdw1UmKH6nGOmgbJ5F7qAHfI\n\tLYzKjjOndSvJIqPR98tiTYBdEu__LJLFpYiJaBkZFIcl_omYAeRnLoM8OqWK\n\tI.CSDquXcwDnUR7XFVtkRlE6phjEPVkC838ebW3puNfiEh4SKt1NEdoWlg5u\n\ts5EpKnuHUbjY_8aoPVrU5LS.W0rnRIvNPykHIUtPhGTvegFX77oShzLa2kO8\n\tIpfV0W_QSaBV01mD1sz_DL16dpKOf0CgzN89F7cl4qI720qOsN.aBtOi2wuk\n\tzNiwIfWaj6.COcg7A1ZOLzCV8kfCTJ0jugFaEbnC7lIBVT0bRkV6AQ4agAXC\n\tVrobkYk1YtkIrVrF41pImvRdVSRZmXHj1XOYP6CFVA_uBg7CJKIxn4Id5QG8\n\tljtXC.WSR1mZOaLYenV0SKIVpF1eOoRvs9FlSjN8EGlR.plQOw_qG_TC2QRo\n\tkMj959hNWxKhnh1bHkCF_3ayQB.3UHpOSXofWiIEJtcykw3.3SNdQLq8VcDX\n\to8jWio6XuavYdxsjv2t.0qUKGcnK7X6Gdi8td.vSXA5gfB7SFTat16bL6M.1\n\tN4AyZVlWAKYVn2y8V",
        "X-Yahoo-SMTP": "crLrLjSswBAdKO_oWys7UTWLvPXPfbdd3XtEOYM5nEof1j3oy80-",
        "From": "Arnab Basu <arnab_basu@rocketmail.com>",
        "To": "u-boot@lists.denx.de,\n\tAlbert Aribaud <albert.u.boot@aribaud.net>",
        "Date": "Tue, 13 Jan 2015 02:26:58 +0530",
        "Message-Id": "<1421096218-27776-1-git-send-email-arnab_basu@rocketmail.com>",
        "X-Mailer": "git-send-email 1.9.1",
        "X-Mailman-Approved-At": "Mon, 12 Jan 2015 22:01:16 +0100",
        "Cc": "stuart.yoder@freescale.com, Marc Zyngier <marc.zyngier@arm.com>,\n\tyorksun@freescale.com",
        "Subject": "[U-Boot] [PATCH v2 7/9] ARMv8: PSCI: Fixup the device tree for PSCI\n\tv0.2",
        "X-BeenThere": "u-boot@lists.denx.de",
        "X-Mailman-Version": "2.1.13",
        "Precedence": "list",
        "List-Id": "U-Boot discussion <u-boot.lists.denx.de>",
        "List-Unsubscribe": "<http://lists.denx.de/mailman/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>",
        "List-Archive": "<http://lists.denx.de/pipermail/u-boot>",
        "List-Post": "<mailto:u-boot@lists.denx.de>",
        "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>",
        "List-Subscribe": "<http://lists.denx.de/mailman/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Sender": "u-boot-bounces@lists.denx.de",
        "Errors-To": "u-boot-bounces@lists.denx.de"
    },
    "content": "Set the enable-method in the cpu node to psci, create the psci\ndevice tree node and also add a reserved-memory for the psci code\nthat lives in in normal RAM, so that the kernel leaves does not map it\n\nSigned-off-by: Arnab Basu <arnab_basu@rocketmail.com>\nCc: Bhupesh Sharma <bhupesh.sharma@freescale.com>\nCc: Marc Zyngier <marc.zyngier@arm.com>\n---\n arch/arm/cpu/armv8/cpu-dt.c   | 111 ++++++++++++++++++++++++++++++++++++++++++\n arch/arm/include/asm/system.h |   4 ++\n 2 files changed, 115 insertions(+)",
    "diff": "diff --git a/arch/arm/cpu/armv8/cpu-dt.c b/arch/arm/cpu/armv8/cpu-dt.c\nindex ce0e3c6..078a627 100644\n--- a/arch/arm/cpu/armv8/cpu-dt.c\n+++ b/arch/arm/cpu/armv8/cpu-dt.c\n@@ -11,7 +11,113 @@\n \n #ifdef CONFIG_MP\n DECLARE_GLOBAL_DATA_PTR;\n+#ifdef CONFIG_ARMV8_PSCI\n \n+static void psci_reserve_mem(void *fdt)\n+{\n+#ifndef CONFIG_ARMV8_SECURE_BASE\n+\tint nodeoff;\n+\tint na, ns;\n+\tint root;\n+\n+\troot = fdt_path_offset(fdt, \"/\");\n+\tif (root < 0)\n+\t\treturn;\n+\n+\tna = fdt_address_cells(fdt, root);\n+\tns = fdt_size_cells(fdt, root);\n+\n+\tnodeoff = fdt_path_offset(fdt, \"/reserved-memory\");\n+\tif (nodeoff < 0) {\n+\t\tnodeoff = fdt_add_subnode(fdt, root, \"reserved-memory\");\n+\t\tif (nodeoff < 0)\n+\t\t\treturn;\n+\t}\n+\tfdt_setprop_u32(fdt, nodeoff, \"#address-cells\", na);\n+\tfdt_setprop_u32(fdt, nodeoff, \"#size-cells\", ns);\n+\tfdt_setprop(fdt, nodeoff, \"ranges\", 0, 0);\n+\tnodeoff = fdt_add_subnode(fdt, nodeoff, \"psci-area\");\n+\tif (nodeoff < 0)\n+\t\treturn;\n+\tfdt_setprop_u64(fdt, nodeoff, \"reg\", (unsigned long)__secure_start);\n+\tfdt_appendprop_u64(fdt, nodeoff, \"reg\",\n+\t\t\t   (unsigned long)__secure_end\n+\t\t\t   - (unsigned long)__secure_start);\n+\tfdt_setprop(fdt, nodeoff, \"no-map\", 0, 0);\n+#endif\n+}\n+\n+static int cpu_update_dt_psci(void *fdt)\n+{\n+\tint nodeoff;\n+\tint tmp;\n+\n+\tpsci_reserve_mem(fdt);\n+\n+\tnodeoff = fdt_path_offset(fdt, \"/cpus\");\n+\tif (nodeoff < 0) {\n+\t\tprintf(\"couldn't find /cpus\\n\");\n+\t\treturn nodeoff;\n+\t}\n+\n+\t/* add 'enable-method = \"psci\"' to each cpu node */\n+\tfor (tmp = fdt_first_subnode(fdt, nodeoff);\n+\t     tmp >= 0;\n+\t     tmp = fdt_next_subnode(fdt, tmp)) {\n+\t\tconst struct fdt_property *prop;\n+\t\tint len;\n+\n+\t\tprop = fdt_get_property(fdt, tmp, \"device_type\", &len);\n+\t\tif (!prop)\n+\t\t\tcontinue;\n+\t\tif (len < 4)\n+\t\t\tcontinue;\n+\t\tif (strcmp(prop->data, \"cpu\"))\n+\t\t\tcontinue;\n+\n+\t\t/* Not checking rv here, our approach is to skip over errors in\n+\t\t * individual cpu nodes, hopefully some of the nodes are\n+\t\t * processed correctly and those will boot\n+\t\t */\n+\t\tfdt_setprop_string(fdt, tmp, \"enable-method\", \"psci\");\n+\t}\n+\n+\t/* The PSCI node might be called \"/psci\" or might be called something\n+\t * else but contain either of the compatible strings\n+\t * \"arm,psci\"/\"arm,psci-0.2\"\n+\t */\n+\tnodeoff = fdt_path_offset(fdt, \"/psci\");\n+\tif (nodeoff >= 0)\n+\t\tgoto init_psci_node;\n+\n+\tnodeoff = fdt_node_offset_by_compatible(fdt, -1, \"arm,psci\");\n+\tif (nodeoff >= 0)\n+\t\tgoto init_psci_node;\n+\n+\tnodeoff = fdt_node_offset_by_compatible(fdt, -1, \"arm,psci-0.2\");\n+\tif (nodeoff >= 0)\n+\t\tgoto init_psci2_node;\n+\n+\tnodeoff = fdt_path_offset(fdt, \"/\");\n+\tif (nodeoff < 0)\n+\t\treturn nodeoff;\n+\n+\tnodeoff = fdt_add_subnode(fdt, nodeoff, \"psci\");\n+\tif (nodeoff < 0)\n+\t\treturn nodeoff;\n+\n+init_psci_node:\n+\ttmp = fdt_setprop_string(fdt, nodeoff, \"compatible\", \"arm,psci-0.2\");\n+\tif (tmp)\n+\t\treturn tmp;\n+init_psci2_node:\n+\ttmp = fdt_setprop_string(fdt, nodeoff, \"method\", \"smc\");\n+\tif (tmp)\n+\t\treturn tmp;\n+\n+\treturn 0;\n+}\n+#else\n __weak u64 arch_get_release_addr(u64 cpu_id)\n {\n \tu64 val;\n@@ -68,11 +174,16 @@ static void cpu_update_dt_spin_table(void *blob)\n \tarch_spin_table_reserve_mem(blob);\n }\n #endif\n+#endif\n \n int cpu_update_dt(void *fdt)\n {\n #ifdef CONFIG_MP\n+#ifdef CONFIG_ARMV8_PSCI\n+\tcpu_update_dt_psci(fdt);\n+#else\n \tcpu_update_dt_spin_table(fdt);\n #endif\n+#endif\n \treturn 0;\n }\ndiff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h\nindex 89f2294..f3f4ace 100644\n--- a/arch/arm/include/asm/system.h\n+++ b/arch/arm/include/asm/system.h\n@@ -77,6 +77,10 @@ void gic_init(void);\n void gic_send_sgi(unsigned long sgino);\n void wait_for_wakeup(void);\n void smp_kick_all_cpus(void);\n+#ifdef CONFIG_ARMV8_PSCI\n+extern char __secure_start[];\n+extern char __secure_end[];\n+#endif\n \n void flush_l3_cache(void);\n \n",
    "prefixes": [
        "U-Boot",
        "v2",
        "7/9"
    ]
}