Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1444200/?format=api
{ "id": 1444200, "url": "http://patchwork.ozlabs.org/api/patches/1444200/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/1614244979-48216-5-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-5-git-send-email-bmeng.cn@gmail.com>", "list_archive_url": null, "date": "2021-02-25T09:22:25", "name": "[v3,04/38] ppc: qemu: Support non-identity PCI bus address", "commit_ref": "84912a78644b68de4117dab2570f71cea2bd745a", "pull_url": null, "state": "accepted", "archived": false, "hash": "ee4a6a31dc9e3586aea0f54615a5f354f25632ee", "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-5-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/1444200/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1444200/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=85.214.62.61; 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=e2IxN4W6;\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=\"e2IxN4W6\";\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 [85.214.62.61])\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 4DmS6V6FDXz9sVR\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 25 Feb 2021 20:24:34 +1100 (AEDT)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 604E78120B;\n\tThu, 25 Feb 2021 10:24:24 +0100 (CET)", "by phobos.denx.de (Postfix, from userid 109)\n id 9E873812B7; Thu, 25 Feb 2021 10:23:52 +0100 (CET)", "from mail-ed1-x530.google.com (mail-ed1-x530.google.com\n [IPv6:2a00:1450:4864:20::530])\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 3A77880EF2\n for <u-boot@lists.denx.de>; Thu, 25 Feb 2021 10:23:44 +0100 (CET)", "by mail-ed1-x530.google.com with SMTP id p2so5874179edm.12\n for <u-boot@lists.denx.de>; Thu, 25 Feb 2021 01:23:44 -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.23.40\n (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);\n Thu, 25 Feb 2021 01:23:43 -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=VoxSxgrJVz+pq1vxzRQwMCZkMRh9wbQkwkmlcHTJKbY=;\n b=e2IxN4W6fWWeQ4LAXh02N8qZAdwJEeVcPTLszvWdrqYhiGSxmYERvOw8QZ9uXRNsfc\n bT7yRUyIsppJECfA1u2g2btqnCYIwrH4aHmnmEVQratju8vYTi6lNSsUHo+wZgkl2knO\n 6Gd3Cu4j/GGQCzmOiBzDlg1Lts1tzgJZBE6CbiPOZqM4IKJNskclMYUSnY1JCCs3hMSv\n ZgsmCa6fO/ahMjKkkLdiJtmRl0kwbGChV2IpLitkigSmUXkOQhSHLefAcY3/c5liOQYa\n 98iTBqv4B7BXZ84+bPmRAWD0BOPZ6CDfjU+SlmUE08BxwJSpOW8R1L5XTc0brYyMXAJE\n ITMQ==", "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=VoxSxgrJVz+pq1vxzRQwMCZkMRh9wbQkwkmlcHTJKbY=;\n b=ATf10/FoKWb9V2kbompEKFBLz1RTsIkzqM0Z4FNslHExru3ieeTRpjjYapxxfP2+WU\n vHG3OnoHerg1yxFHIGLcahcuLI6S8FJcpf378m85jSIhiprmSdotlzpPfMHU75t5UsxB\n A11tEYWD9P2iLGOoK/etrtt/1Ww5wBMOaSkIpi1+13cgn0LrZ0muFBhkB+PwFLv34YYf\n qy1+3E3MqfelGGvdktxAwdaqIzQEKSQWRNt+GSaDii1JWh9vHLKhPJCn7Ozk/dXn80Dt\n GfLxvWwBGCE5DmQQ5jNZvtcQWT0knipCUT5oLkTXZDGa8UlB/Bd2Ij0wg9MlGG2kGJ7I\n WQxQ==", "X-Gm-Message-State": "AOAM5313uAL71fwdYT3E9+MvAgwiUSNEaAU2ifTV0GKKq2SvQeYOuEmn\n C+PxMspP6EvRDeN0s7+LHqSLMWFOaew=", "X-Google-Smtp-Source": "\n ABdhPJxHwomRGVZdCDyg9BZME3lsevhv5v/ibGAk2TxvRE4J4ycs3ORTLrgwW0xCBTBDXAjQ9nuv9g==", "X-Received": "by 2002:a05:6402:304b:: with SMTP id\n bu11mr1821599edb.157.1614245023919;\n Thu, 25 Feb 2021 01:23:43 -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 04/38] ppc: qemu: Support non-identity PCI bus address", "Date": "Thu, 25 Feb 2021 17:22:25 +0800", "Message-Id": "<1614244979-48216-5-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": "When QEMU originally supported the ppce500 machine back in Jan 2014,\nit was created with a 1:1 mapping of PCI bus address. Things seemed\nto change rapidly that in Nov 2014 with the following QEMU commits:\n\ncommit e6b4e5f4795b (\"PPC: e500: Move CCSR and MMIO space to upper end of address space\")\n\nand\n\ncommit cb3778a0455a (\"PPC: e500 pci host: Add support for ATMUs\")\n\nthe PCI memory and IO physical address were moved to beyond 4 GiB,\nbut PCI bus address remained below 4 GiB, hence a non-identity\nmapping was created. Unfortunately corresponding U-Boot updates\nwere missed along with the QEMU changes and the U-Boot QEMU ppce500\nPCI support has been broken since then.\n\nThis commit makes the PCI (non-DM version) work again.\n\nSigned-off-by: Bin Meng <bmeng.cn@gmail.com>\n---\n\n(no changes since v1)\n\n board/freescale/qemu-ppce500/qemu-ppce500.c | 29 ++++++++++++++---------------\n 1 file changed, 14 insertions(+), 15 deletions(-)", "diff": "diff --git a/board/freescale/qemu-ppce500/qemu-ppce500.c b/board/freescale/qemu-ppce500/qemu-ppce500.c\nindex aa5774f..1d68d30 100644\n--- a/board/freescale/qemu-ppce500/qemu-ppce500.c\n+++ b/board/freescale/qemu-ppce500/qemu-ppce500.c\n@@ -85,20 +85,24 @@ int checkboard(void)\n }\n \n static int pci_map_region(void *fdt, int pci_node, int range_id,\n-\t\t\t phys_size_t *ppaddr, pci_addr_t *pvaddr,\n-\t\t\t pci_size_t *psize, ulong *pmap_addr)\n+\t\t\t phys_addr_t *pbaddr, phys_size_t *ppaddr,\n+\t\t\t pci_addr_t *pvaddr, pci_size_t *psize,\n+\t\t\t ulong *pmap_addr)\n {\n-\tuint64_t addr;\n+\tuint64_t baddr;\n+\tuint64_t paddr;\n \tuint64_t size;\n \tulong map_addr;\n \tint r;\n \n-\tr = fdt_read_range(fdt, pci_node, range_id, NULL, &addr, &size);\n+\tr = fdt_read_range(fdt, pci_node, range_id, &baddr, &paddr, &size);\n \tif (r)\n \t\treturn r;\n \n+\tif (pbaddr)\n+\t\t*pbaddr = baddr;\n \tif (ppaddr)\n-\t\t*ppaddr = addr;\n+\t\t*ppaddr = paddr;\n \tif (psize)\n \t\t*psize = size;\n \n@@ -115,7 +119,7 @@ static int pci_map_region(void *fdt, int pci_node, int range_id,\n \t\treturn -1;\n \n \t/* Map virtual memory for range */\n-\tassert(!tlb_map_range(map_addr, addr, size, TLB_MAP_IO));\n+\tassert(!tlb_map_range(map_addr, paddr, size, TLB_MAP_IO));\n \t*pmap_addr = map_addr + size;\n \n \tif (pvaddr)\n@@ -166,24 +170,19 @@ void pci_init_board(void)\n \t\tpci_info.regs = fdt_translate_address(fdt, pci_node, reg);\n \n \t\t/* Map MMIO range */\n-\t\tr = pci_map_region(fdt, pci_node, 0, &pci_info.mem_phys, NULL,\n+\t\tr = pci_map_region(fdt, pci_node, 0, &pci_info.mem_bus,\n+\t\t\t\t &pci_info.mem_phys, NULL,\n \t\t\t\t &pci_info.mem_size, &map_addr);\n \t\tif (r)\n \t\t\tbreak;\n \n \t\t/* Map PIO range */\n-\t\tr = pci_map_region(fdt, pci_node, 1, &pci_info.io_phys, NULL,\n+\t\tr = pci_map_region(fdt, pci_node, 1, &pci_info.io_bus,\n+\t\t\t\t &pci_info.io_phys, NULL,\n \t\t\t\t &pci_info.io_size, &map_addr);\n \t\tif (r)\n \t\t\tbreak;\n \n-\t\t/*\n-\t\t * The PCI framework finds virtual addresses for the buses\n-\t\t * through our address map, so tell it the physical addresses.\n-\t\t */\n-\t\tpci_info.mem_bus = pci_info.mem_phys;\n-\t\tpci_info.io_bus = pci_info.io_phys;\n-\n \t\t/* Instantiate */\n \t\tpci_info.pci_num = pci_num + 1;\n \n", "prefixes": [ "v3", "04/38" ] }