get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 677344,
    "url": "http://patchwork.ozlabs.org/api/patches/677344/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20161001141931.32354-2-paul.burton@imgtec.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": "<20161001141931.32354-2-paul.burton@imgtec.com>",
    "list_archive_url": null,
    "date": "2016-10-01T14:19:04",
    "name": "[U-Boot,01/27] Provide a generic io.h & address mapping functions",
    "commit_ref": null,
    "pull_url": null,
    "state": "deferred",
    "archived": false,
    "hash": "f53cdd0921466bc96d965ddc70b6e8437b5831ad",
    "submitter": {
        "id": 33698,
        "url": "http://patchwork.ozlabs.org/api/people/33698/?format=api",
        "name": "Paul Burton",
        "email": "paul.burton@imgtec.com"
    },
    "delegate": {
        "id": 3651,
        "url": "http://patchwork.ozlabs.org/api/users/3651/?format=api",
        "username": "trini",
        "first_name": "Tom",
        "last_name": "Rini",
        "email": "trini@ti.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20161001141931.32354-2-paul.burton@imgtec.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/677344/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/677344/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 3smVnn196Rz9s2G\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSun,  2 Oct 2016 00:20:13 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 5D60AA756B;\n\tSat,  1 Oct 2016 16:20:10 +0200 (CEST)",
            "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 T4jVSNBSrtGo; Sat,  1 Oct 2016 16:20:10 +0200 (CEST)",
            "from theia.denx.de (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 05F00A757A;\n\tSat,  1 Oct 2016 16:20:10 +0200 (CEST)",
            "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id A9A96A756B\n\tfor <u-boot@lists.denx.de>; Sat,  1 Oct 2016 16:20:06 +0200 (CEST)",
            "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 L8XbhOdxLxN7 for <u-boot@lists.denx.de>;\n\tSat,  1 Oct 2016 16:20:06 +0200 (CEST)",
            "from mailapp01.imgtec.com (mailapp02.imgtec.com [217.156.133.132])\n\tby theia.denx.de (Postfix) with ESMTP id 7AE37A757A\n\tfor <u-boot@lists.denx.de>; Sat,  1 Oct 2016 16:20:05 +0200 (CEST)",
            "from HHMAIL03.hh.imgtec.org (unknown [10.44.0.21])\n\tby Forcepoint Email with ESMTPS id 1E447FA7E21E5;\n\tSat,  1 Oct 2016 15:20:00 +0100 (IST)",
            "from localhost (192.168.159.74) by HHMAIL03.hh.imgtec.org\n\t(10.44.0.22) with Microsoft SMTP Server (TLS) id 14.3.294.0;\n\tSat, 1 Oct 2016 15:20:03 +0100"
        ],
        "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)",
        "From": "Paul Burton <paul.burton@imgtec.com>",
        "To": "<u-boot@lists.denx.de>",
        "Date": "Sat, 1 Oct 2016 15:19:04 +0100",
        "Message-ID": "<20161001141931.32354-2-paul.burton@imgtec.com>",
        "X-Mailer": "git-send-email 2.10.0",
        "In-Reply-To": "<20161001141931.32354-1-paul.burton@imgtec.com>",
        "References": "<20161001141931.32354-1-paul.burton@imgtec.com>",
        "MIME-Version": "1.0",
        "X-Originating-IP": "[192.168.159.74]",
        "Cc": "Scott McNutt <smcnutt@psyent.com>, Mike Frysinger <vapier@gentoo.org>,\n\tAngelo Dureghello <angelo@sysam.it>,\n\tAlexey Brodkin <alexey.brodkin@synopsys.com>,\n\tAlison Wang <alison.wang@freescale.com>,\n\tMacpaul Lin <macpaul@andestech.com>",
        "Subject": "[U-Boot] [PATCH 01/27] Provide a generic io.h & address mapping\n\tfunctions",
        "X-BeenThere": "u-boot@lists.denx.de",
        "X-Mailman-Version": "2.1.15",
        "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>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "u-boot-bounces@lists.denx.de",
        "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>"
    },
    "content": "Most architectures currently supported by U-Boot use trivial\nimplementations of map_to_physmem & virt_to_phys which simply cast a\nphysical address to a pointer for use a virtual address & vice-versa.\nThis results in a lot of duplicate implementations of these mapping\nfunctions.\n\nThe functions provided by different architectures also differs, with\nsome having implementations of phys_to_virt & others not. A later patch\nin this series will make use of phys_to_virt, so requires that it be\nprovided for all architectures.\n\nThis patch introduces an asm-generic/io.h which provides generic\nimplementations of address mapping functions, allowing the duplication\nof them between architectures to be removed. Once architectures are\nconverted to make use of this generic header it will also ensure that\nall of phys_to_virt, virt_to_phys, map_physmem & unmap_physmem are\nprovided. The 2 families of functions differ in that map_physmem may\ncreate dynamic mappings whilst phys_to_virt may not & therefore is more\nlimited in scope but doesn't require information such as a length &\nflags.\n\nThis patch doesn't convert any architectures to make use of this generic\nheader - later patches in the series will do so.\n\nSigned-off-by: Paul Burton <paul.burton@imgtec.com>\nCc: Albert Aribaud <albert.u.boot@aribaud.net>\nCc: Alexey Brodkin <alexey.brodkin@synopsys.com>\nCc: Alison Wang <alison.wang@freescale.com>\nCc: Angelo Dureghello <angelo@sysam.it>\nCc: Bin Meng <bmeng.cn@gmail.com>\nCc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>\nCc: Francois Retief <fgretief@spaceteq.co.za>\nCc: Macpaul Lin <macpaul@andestech.com>\nCc: Michal Simek <monstr@monstr.eu>\nCc: Mike Frysinger <vapier@gentoo.org>\nCc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>\nCc: Scott McNutt <smcnutt@psyent.com>\nCc: Sonic Zhang <sonic.adi@gmail.com>\nCc: Thomas Chou <thomas@wytron.com.tw>\nCc: Wolfgang Denk <wd@denx.de>\n---\n\n include/asm-generic/io.h | 110 +++++++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 110 insertions(+)\n create mode 100644 include/asm-generic/io.h",
    "diff": "diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h\nnew file mode 100644\nindex 0000000..dd3a46d\n--- /dev/null\n+++ b/include/asm-generic/io.h\n@@ -0,0 +1,110 @@\n+/*\n+ * Generic I/O functions.\n+ *\n+ * Copyright (c) 2016 Imagination Technologies Ltd.\n+ *\n+ * SPDX-License-Identifier:\tGPL-2.0+\n+ */\n+\n+#ifndef __ASM_GENERIC_IO_H__\n+#define __ASM_GENERIC_IO_H__\n+\n+/*\n+ * This file should be included at the end of each architecture-specific\n+ * asm/io.h such that we may provide generic implementations without\n+ * conflicting with architecture-specific code.\n+ */\n+\n+#ifndef __ASSEMBLY__\n+\n+/**\n+ * phys_to_virt() - Return a virtual address mapped to a given physical address\n+ * @paddr: the physical address\n+ *\n+ * Returns a virtual address which the CPU can access that maps to the physical\n+ * address @paddr. This should only be used where it is known that no dynamic\n+ * mapping is required. In general, map_physmem should be used instead.\n+ *\n+ * Returns: a virtual address which maps to @paddr\n+ */\n+#ifndef phys_to_virt\n+static inline void *phys_to_virt(phys_addr_t paddr)\n+{\n+\treturn (void *)(unsigned long)paddr;\n+}\n+#endif\n+\n+/**\n+ * virt_to_phys() - Return the physical address that a virtual address maps to\n+ * @vaddr: the virtual address\n+ *\n+ * Returns the physical address which the CPU-accessible virtual address @vaddr\n+ * maps to.\n+ *\n+ * Returns: the physical address which @vaddr maps to\n+ */\n+#ifndef virt_to_phys\n+static inline phys_addr_t virt_to_phys(void *vaddr)\n+{\n+\treturn (phys_addr_t)((unsigned long)vaddr);\n+}\n+#endif\n+\n+/*\n+ * Flags for use with map_physmem() & unmap_physmem(). Architectures need not\n+ * support all of these, in which case they will be defined as zero here &\n+ * ignored. Callers that may run on multiple architectures should therefore\n+ * treat them as hints rather than requirements.\n+ */\n+#ifndef MAP_NOCACHE\n+# define MAP_NOCACHE\t0\t/* Produce an uncached mapping */\n+#endif\n+#ifndef MAP_WRCOMBINE\n+# define MAP_WRCOMBINE\t0\t/* Allow write-combining on the mapping */\n+#endif\n+#ifndef MAP_WRBACK\n+# define MAP_WRBACK\t0\t/* Map using write-back caching */\n+#endif\n+#ifndef MAP_WRTHROUGH\n+# define MAP_WRTHROUGH\t0\t/* Map using write-through caching */\n+#endif\n+\n+/**\n+ * map_physmem() - Return a virtual address mapped to a given physical address\n+ * @paddr: the physical address\n+ * @len: the length of the required mapping\n+ * @flags: flags affecting the type of mapping\n+ *\n+ * Return a virtual address through which the CPU may access the memory at\n+ * physical address @paddr. The mapping will be valid for at least @len bytes,\n+ * and may be affected by flags passed to the @flags argument. This function\n+ * may create new mappings, so should generally be paired with a matching call\n+ * to unmap_physmem once the caller is finished with the memory in question.\n+ *\n+ * Returns: a virtual address suitably mapped to @paddr\n+ */\n+#ifndef map_physmem\n+static inline void *\n+map_physmem(phys_addr_t paddr, unsigned long len, unsigned long flags)\n+{\n+\treturn phys_to_virt(paddr);\n+}\n+#endif\n+\n+/**\n+ * unmap_physmem() - Remove mappings created by a prior call to map_physmem()\n+ * @vaddr: the virtual address which map_physmem() previously returned\n+ * @flags: flags matching those originally passed to map_physmem()\n+ *\n+ * Unmap memory which was previously mapped by a call to map_physmem(). If\n+ * map_physmem() dynamically created a mapping for the memory in question then\n+ * unmap_physmem() will remove that mapping.\n+ */\n+#ifndef unmap_physmem\n+static inline void unmap_physmem(void *vaddr, unsigned long flags)\n+{\n+}\n+#endif\n+\n+#endif /* !__ASSEMBLY__ */\n+#endif /* __ASM_GENERIC_IO_H__ */\n",
    "prefixes": [
        "U-Boot",
        "01/27"
    ]
}