get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1444211,
    "url": "http://patchwork.ozlabs.org/api/patches/1444211/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/1614244979-48216-17-git-send-email-bmeng.cn@gmail.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": "<1614244979-48216-17-git-send-email-bmeng.cn@gmail.com>",
    "list_archive_url": null,
    "date": "2021-02-25T09:22:37",
    "name": "[v3,16/38] ppc: io.h: Use addrmap_ translation APIs only in post-relocation phase",
    "commit_ref": "3320656944707aff7838b1ccb4c630143a67fe08",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "c49a91b0e8fe5d1097382dd73ddfab0bc19cd5b0",
    "submitter": {
        "id": 64981,
        "url": "http://patchwork.ozlabs.org/api/people/64981/?format=api",
        "name": "Bin Meng",
        "email": "bmeng.cn@gmail.com"
    },
    "delegate": {
        "id": 87636,
        "url": "http://patchwork.ozlabs.org/api/users/87636/?format=api",
        "username": "priyankajain",
        "first_name": "Priyanka",
        "last_name": "Jain",
        "email": "priyanka.jain@nxp.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/1614244979-48216-17-git-send-email-bmeng.cn@gmail.com/mbox/",
    "series": [
        {
            "id": 230985,
            "url": "http://patchwork.ozlabs.org/api/series/230985/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=230985",
            "date": "2021-02-25T09:22:22",
            "name": "ppc: qemu: Convert qemu-ppce500 to driver model and enable additional driver support",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/230985/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1444211/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1444211/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",
        "Authentication-Results": [
            "ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>)",
            "ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20161025 header.b=Tlk+v9yF;\n\tdkim-atps=neutral",
            "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=gmail.com",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de",
            "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.b=\"Tlk+v9yF\";\n\tdkim-atps=neutral",
            "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=gmail.com",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=bmeng.cn@gmail.com"
        ],
        "Received": [
            "from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (4096 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 4DmS9930xnz9s1l\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 25 Feb 2021 20:26:53 +1100 (AEDT)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 6D063819B8;\n\tThu, 25 Feb 2021 10:26:39 +0100 (CET)",
            "by phobos.denx.de (Postfix, from userid 109)\n id DF7CD81DA8; Thu, 25 Feb 2021 10:24:45 +0100 (CET)",
            "from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com\n [IPv6:2a00:1450:4864:20::62e])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 01CF881B94\n for <u-boot@lists.denx.de>; Thu, 25 Feb 2021 10:24:34 +0100 (CET)",
            "by mail-ej1-x62e.google.com with SMTP id w1so7633199ejf.11\n for <u-boot@lists.denx.de>; Thu, 25 Feb 2021 01:24:34 -0800 (PST)",
            "from pek-vx-bsp2.wrs.com\n (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180])\n by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.24.31\n (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);\n Thu, 25 Feb 2021 01:24:34 -0800 (PST)"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham\n autolearn_force=no version=3.4.2",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n h=from:to:cc:subject:date:message-id:in-reply-to:references;\n bh=Db+DiRjNjb3TFDnFXQVxldXKJsFiUuk3kCleUJaBIhM=;\n b=Tlk+v9yFIO1tS4EXAb+5MbK6QjYYFW9eEllLStMZ8R+k2n6WKXzePvEgvDTvuw7/cR\n 1NggCFX4x/lwm7K3836fq1WmYZ5S8o67Jv8+m3c+SEwdz4zwUK6tp3Xp+qYpOz8zIjOE\n VpfidA3GvTSfT4R9ap6BMAAjMc5vBYyIVICE2MH4xHy+QB5RJ8pYnSG65Nmz4Lkz814w\n B4VwK/4b9IcZRHG8BpDkTRazup+M1itA6yu202VUoTK7RqUQhrUHwsxTFzglobEhxHQD\n f3eqr6iM4ZYovljrSZRywOGPYHFxnzZaAwIt80k6IWDa+X3gXmzFp2c381zSOGfZwQDF\n ErRQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references;\n bh=Db+DiRjNjb3TFDnFXQVxldXKJsFiUuk3kCleUJaBIhM=;\n b=Mu31ZeZ6GzsTTF21AvggD89oQWQVPnUoNN8QaPce1qXpk+5X3IDn1at3/JMaYptT73\n zikqtXoL1jlxD2r5iWP+K8d+YkQhbU0bT8BOFibxWin0L0s0Dwl7FH4xvRCXZMohAsAR\n ZkF8hTHfYRVFsbc19Tj3TZ73EDGavkPNzaI5jmoj5o3bjw17cjx+SCU5rJMioenlQWc+\n /utq4vcJ4hMmVMaR6HWJGzmTjqiDAyzA9tl6uZKBECdYVnj1Gzp/NeZXp6h6D5/Uo1Vl\n wp1rP5jRDnzdcJYNIHjw4Mc4X33wRwywjVgaE1oMo8oziMa83rYxsDvfsBSewzr0bly1\n HTeQ==",
        "X-Gm-Message-State": "AOAM5329ali2TFTiAeMJWNjQW9CdamtwheaioBqDsWRLImMomsHWJXkG\n W2hmQdEOWhPmuBScQBTfZB0=",
        "X-Google-Smtp-Source": "\n ABdhPJzIo7N3Zw/VtdJiTDhT/+Dog0sX4ey/SYvHUf3J+fGSkRFpGIqgyrB5BFRP2CRzuW50BAnwyA==",
        "X-Received": "by 2002:a17:906:4e99:: with SMTP id\n v25mr278722eju.532.1614245074624;\n Thu, 25 Feb 2021 01:24:34 -0800 (PST)",
        "From": "Bin Meng <bmeng.cn@gmail.com>",
        "To": "Simon Glass <sjg@chromium.org>, Alexander Graf <agraf@csgraf.de>,\n Priyanka Jain <priyanka.jain@nxp.com>",
        "Cc": "U-Boot Mailing List <u-boot@lists.denx.de>, Tom Rini <trini@konsulko.com>",
        "Subject": "[PATCH v3 16/38] ppc: io.h: Use addrmap_ translation APIs only in\n post-relocation phase",
        "Date": "Thu, 25 Feb 2021 17:22:37 +0800",
        "Message-Id": "<1614244979-48216-17-git-send-email-bmeng.cn@gmail.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1614244979-48216-1-git-send-email-bmeng.cn@gmail.com>",
        "References": "<1614244979-48216-1-git-send-email-bmeng.cn@gmail.com>",
        "X-BeenThere": "u-boot@lists.denx.de",
        "X-Mailman-Version": "2.1.34",
        "Precedence": "list",
        "List-Id": "U-Boot discussion <u-boot.lists.denx.de>",
        "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>",
        "List-Archive": "<https://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": "<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>",
        "Errors-To": "u-boot-bounces@lists.denx.de",
        "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>",
        "X-Virus-Scanned": "clamav-milter 0.102.4 at phobos.denx.de",
        "X-Virus-Status": "Clean"
    },
    "content": "In phys_to_virt() and virt_to_phys(), if CONFIG_ADDR_MAP is defined,\nthey use addrmap_ translation APIs to do the address translation.\nHowever these APIs only work in post-relocation phase.\n\nUpdate the code logic to fall back to use the default one when in\npre-relocation phase.\n\nSigned-off-by: Bin Meng <bmeng.cn@gmail.com>\nReviewed-by: Priyanka Jain <priyanka.jain@nxp.com>\n---\n\n(no changes since v1)\n\n arch/powerpc/include/asm/io.h | 15 +++++++++------\n 1 file changed, 9 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/arch/powerpc/include/asm/io.h b/arch/powerpc/include/asm/io.h\nindex 6d76e3e..998a82a 100644\n--- a/arch/powerpc/include/asm/io.h\n+++ b/arch/powerpc/include/asm/io.h\n@@ -10,7 +10,10 @@\n #include <asm/byteorder.h>\n \n #ifdef CONFIG_ADDR_MAP\n+#include <asm/global_data.h>\n #include <addr_map.h>\n+\n+DECLARE_GLOBAL_DATA_PTR;\n #endif\n \n #define SIO_CONFIG_RA   0x398\n@@ -303,20 +306,20 @@ static inline void out_be32(volatile unsigned __iomem *addr, u32 val)\n static inline void *phys_to_virt(phys_addr_t paddr)\n {\n #ifdef CONFIG_ADDR_MAP\n-\treturn addrmap_phys_to_virt(paddr);\n-#else\n-\treturn (void *)((unsigned long)paddr);\n+\tif (gd->flags & GD_FLG_RELOC)\n+\t\treturn addrmap_phys_to_virt(paddr);\n #endif\n+\treturn (void *)((unsigned long)paddr);\n }\n #define phys_to_virt phys_to_virt\n \n static inline phys_addr_t virt_to_phys(void * vaddr)\n {\n #ifdef CONFIG_ADDR_MAP\n-\treturn addrmap_virt_to_phys(vaddr);\n-#else\n-\treturn (phys_addr_t)((unsigned long)vaddr);\n+\tif (gd->flags & GD_FLG_RELOC)\n+\t\treturn addrmap_virt_to_phys(vaddr);\n #endif\n+\treturn (phys_addr_t)((unsigned long)vaddr);\n }\n #define virt_to_phys virt_to_phys\n \n",
    "prefixes": [
        "v3",
        "16/38"
    ]
}