Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/428126/?format=api
{ "id": 428126, "url": "http://patchwork.ozlabs.org/api/patches/428126/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/1421096127-27554-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": "<1421096127-27554-1-git-send-email-arnab_basu@rocketmail.com>", "list_archive_url": null, "date": "2015-01-12T20:55:27", "name": "[U-Boot,v2,3/9] ARMv8/fsl-lsch3: Refactor spin-table code", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "2583c775f1d28bc9f28b00a43440d6138d48b4bb", "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/1421096127-27554-1-git-send-email-arnab_basu@rocketmail.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/428126/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/428126/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 98C4F140146\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 13 Jan 2015 08:01:50 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 8A1174B656;\n\tMon, 12 Jan 2015 22:01:44 +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 Srk0mvH-7-g8; Mon, 12 Jan 2015 22:01:44 +0100 (CET)", "from theia.denx.de (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 11D8E4B657;\n\tMon, 12 Jan 2015 22:01:23 +0100 (CET)", "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 162EA4B608\n\tfor <u-boot@lists.denx.de>; Mon, 12 Jan 2015 21:58:47 +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 GR2Yt0h--hhK for <u-boot@lists.denx.de>;\n\tMon, 12 Jan 2015 21:58:46 +0100 (CET)", "from nm50-vm7.bullet.mail.gq1.yahoo.com\n\t(nm50-vm7.bullet.mail.gq1.yahoo.com [67.195.87.247])\n\tby theia.denx.de (Postfix) with ESMTPS id 74EF04B605\n\tfor <u-boot@lists.denx.de>; Mon, 12 Jan 2015 21:58:42 +0100 (CET)", "from [127.0.0.1] by nm50.bullet.mail.gq1.yahoo.com with NNFMP;\n\t12 Jan 2015 20:58:40 -0000", "from [98.137.12.189] by nm50.bullet.mail.gq1.yahoo.com with NNFMP; \n\t12 Jan 2015 20:55:40 -0000", "from [106.10.166.119] by tm10.bullet.mail.gq1.yahoo.com with NNFMP;\n\t12 Jan 2015 20:55:39 -0000", "from [106.10.167.142] by tm8.bullet.mail.sg3.yahoo.com with NNFMP; \n\t12 Jan 2015 20:55:39 -0000", "from [127.0.0.1] by smtp115.mail.sg3.yahoo.com with NNFMP;\n\t12 Jan 2015 20:55:39 -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=1421096320; bh=lNZ7APpjFjVpP02wkZY1gPmN4nI1ZFFObYww7HwOaXQ=;\n\th=From:To:Cc:Subject:Date:From:Subject;\n\tb=oi5CEcKx7S30VEbh+hkqbHbMifwvi7n5Il6DCCq7E/H4pTVITgXrysvKTCh24q3aLE05gy0TZ4lnDrnGsQcaKJM1SD0FOEGMJhpTfwFtJNUwUKFkQb6nQTSY6NjFA5Ap9w4UQVuTJ3XBJ79j6PV2lyKig8Knr5QInc3uPiUK9zrNY3qRXGdSEmKVLgMl4x04ho0lFGnSNss4UNjIvU9y9ePF1rayoCZ+9tIJbryTCqz0JOBYlSGVwUnBzqmHkv8A9gyz/OoHIgim21qMv01mAETlPVjZJdiYLrl/ChdRel4JV7BGyxPN7bkA9DO+vurhBxQu0ImzFOym7UcjqC8shw==", "DomainKey-Signature": "a=rsa-sha1; q=dns; c=nofws; s=s2048; d=rocketmail.com; \n\tb=gD7kWKi/CMH8umNL4Amk+VBO1vkH4bBl9fznwC29mEWGa4ZtOL7a14jWASOXzj9ETIN3MaxYIHEalB/9jXC1F8+zArbtvfVp0Ht7xTVBUtmrJMx29D6B7eAgqFA48TdYqMDfOzQcND+/DxqvWPzdN5mRuYWnr4IVXJEbmVmYagnIzuRyydNDsSqyDoPgaPQgrEsVmcJFVtF/ZE5xZB9ki/kfKvIJEa7XmBxzwJNjjI1TPXYgpzorx8+pdWRJteCrg2+18OgWyvhWhgoUVvDNZHvHNx+c7mA258qj5Og+pIAGJVClk/vgqfGrer4kEsFg5/vJejveu8xDVjsbfm/teA==;", "X-Yahoo-Newman-Id": "352354.98325.bm@smtp115.mail.sg3.yahoo.com", "X-Yahoo-Newman-Property": "ymail-4", "X-YMail-OSG": "7iQTizQVM1k.NZ6TrRKvDYwJXY6skecGB9qZnaGM434viZD\n\tIB4gQtIxMW5yA8YDobskhgSVx9ii6HPbB8QQwbh1ESK97EOPbKakM.4uA4xZ\n\tezVwO6udwLzWI1Pd3mkq8q_bKYc3Ko_2C4vBt.hpPTWH8cJfgl64eQc8VUYB\n\t5KZDtTyewnqjZFk_TEGaBnh2GYn6vRS3JIy1F82EoN21BLMO.wdea0eOX6g9\n\t0qvKVBv5Rz0le9Jhq.FM878AGteqeO5mPHts6FtUB_CL64rlsyP61DBrkVxy\n\tlEW3BhtUyV86LnecK5HY7C0pTi5WUNDR2fheovwvrj9VlhjD9Ydg0Jq98DmQ\n\th7XJPej7sianGqD5qIvGM3poB5_ZG8okt8ELdbqSRRLJgZgDTuQ3sNS9pcoz\n\tINzaAlFcLv16h9nu7ZiHTLcGh3b10bXPbxNJDOtxZSj.mv0pguxLxg6hr7QU\n\tb1SclU4VYEWVaX6xjryfKQUuRXR.HNj18gsGtDNs1eHnDMp.F8hkGURg93c3\n\t87FdQdMPiEIyIN7gDhjhgla0mWsanwFQRVqD9pcna4NexfR0Xh5hnfnUcn5Q\n\t7I3lQUPkmo7fPZ9z8", "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:25:27 +0530", "Message-Id": "<1421096127-27554-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@arm.com, yorksun@freescale.com", "Subject": "[U-Boot] [PATCH v2 3/9] ARMv8/fsl-lsch3: Refactor spin-table code", "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": "This creates the function cpu_update_dt for ARMv8 which currently patches\nthe cpu node in the device table and sets enable-method to spin-table.\n\nSigned-off-by: Arnab Basu <arnab_basu@rocketmail.com>\nCc: Bhupesh Sharma <bhupesh.sharma@freescale.com>\nCc: York Sun <yorksun@freescale.com>\n---\n arch/arm/cpu/armv8/Makefile | 1 +\n arch/arm/cpu/armv8/{fsl-lsch3/fdt.c => cpu-dt.c} | 32 +++++++++-------\n arch/arm/cpu/armv8/fsl-lsch3/fdt.c | 48 ++++++++----------------\n 3 files changed, 36 insertions(+), 45 deletions(-)\n copy arch/arm/cpu/armv8/{fsl-lsch3/fdt.c => cpu-dt.c} (68%)", "diff": "diff --git a/arch/arm/cpu/armv8/Makefile b/arch/arm/cpu/armv8/Makefile\nindex 0c10223..74c32b2 100644\n--- a/arch/arm/cpu/armv8/Makefile\n+++ b/arch/arm/cpu/armv8/Makefile\n@@ -14,5 +14,6 @@ obj-y\t+= exceptions.o\n obj-y\t+= cache.o\n obj-y\t+= tlb.o\n obj-y\t+= transition.o\n+obj-y\t+= cpu-dt.o\n \n obj-$(CONFIG_FSL_LSCH3) += fsl-lsch3/\ndiff --git a/arch/arm/cpu/armv8/fsl-lsch3/fdt.c b/arch/arm/cpu/armv8/cpu-dt.c\nsimilarity index 68%\ncopy from arch/arm/cpu/armv8/fsl-lsch3/fdt.c\ncopy to arch/arm/cpu/armv8/cpu-dt.c\nindex e392eb9..8833e6a 100644\n--- a/arch/arm/cpu/armv8/fsl-lsch3/fdt.c\n+++ b/arch/arm/cpu/armv8/cpu-dt.c\n@@ -7,17 +7,24 @@\n #include <common.h>\n #include <libfdt.h>\n #include <fdt_support.h>\n-#include \"mp.h\"\n \n #ifdef CONFIG_MP\n-void ft_fixup_cpu(void *blob)\n+\n+__weak u64 arch_get_release_addr(u64 cpu_id)\n+{\n+\treturn 0;\n+}\n+\n+__weak void arch_spin_table_reserve_mem(void *fdt)\n+{\n+}\n+\n+static void cpu_update_dt_spin_table(void *blob)\n {\n \tint off;\n-\t__maybe_unused u64 spin_tbl_addr = (u64)get_spin_tbl_addr();\n-\tfdt32_t *reg;\n+\t__maybe_unused u64 val;\n \tint addr_cells;\n-\tu64 val;\n-\tsize_t *boot_code_size = &(__secondary_boot_code_size);\n+\t__maybe_unused fdt32_t *reg;\n \n \toff = fdt_path_offset(blob, \"/cpus\");\n \tif (off < 0) {\n@@ -30,9 +37,8 @@ void ft_fixup_cpu(void *blob)\n \twhile (off != -FDT_ERR_NOTFOUND) {\n \t\treg = (fdt32_t *)fdt_getprop(blob, off, \"reg\", 0);\n \t\tif (reg) {\n-\t\t\tval = spin_tbl_addr;\n-\t\t\tval += id_to_core(of_read_number(reg, addr_cells))\n-\t\t\t\t* SPIN_TABLE_ELEM_SIZE;\n+\t\t\tval = arch_get_release_addr(\n+\t\t\t\t\tof_read_number(reg, addr_cells));\n \t\t\tval = cpu_to_fdt64(val);\n \t\t\tfdt_setprop_string(blob, off, \"enable-method\",\n \t\t\t\t\t \"spin-table\");\n@@ -45,14 +51,14 @@ void ft_fixup_cpu(void *blob)\n \t\t\t\t\t\t \"cpu\", 4);\n \t}\n \n-\tfdt_add_mem_rsv(blob, (uintptr_t)&secondary_boot_code,\n-\t\t\t*boot_code_size);\n+\tarch_spin_table_reserve_mem(blob);\n }\n #endif\n \n-void ft_cpu_setup(void *blob, bd_t *bd)\n+int cpu_update_dt(void *fdt)\n {\n #ifdef CONFIG_MP\n-\tft_fixup_cpu(blob);\n+\tcpu_update_dt_spin_table(fdt);\n #endif\n+\treturn 0;\n }\ndiff --git a/arch/arm/cpu/armv8/fsl-lsch3/fdt.c b/arch/arm/cpu/armv8/fsl-lsch3/fdt.c\nindex e392eb9..bb35393 100644\n--- a/arch/arm/cpu/armv8/fsl-lsch3/fdt.c\n+++ b/arch/arm/cpu/armv8/fsl-lsch3/fdt.c\n@@ -10,44 +10,28 @@\n #include \"mp.h\"\n \n #ifdef CONFIG_MP\n-void ft_fixup_cpu(void *blob)\n+u64 arch_get_release_addr(u64 cpu_id)\n {\n-\tint off;\n-\t__maybe_unused u64 spin_tbl_addr = (u64)get_spin_tbl_addr();\n-\tfdt32_t *reg;\n-\tint addr_cells;\n \tu64 val;\n+\n+\tval = (u64)get_spin_tbl_addr();\n+\tval += id_to_core(cpu_id) * SPIN_TABLE_ELEM_SIZE;\n+\n+\treturn val;\n+}\n+\n+void arch_spin_table_reserve_mem(void *fdt)\n+{\n \tsize_t *boot_code_size = &(__secondary_boot_code_size);\n \n-\toff = fdt_path_offset(blob, \"/cpus\");\n-\tif (off < 0) {\n-\t\tputs(\"couldn't find /cpus node\\n\");\n-\t\treturn;\n-\t}\n-\tof_bus_default_count_cells(blob, off, &addr_cells, NULL);\n-\n-\toff = fdt_node_offset_by_prop_value(blob, -1, \"device_type\", \"cpu\", 4);\n-\twhile (off != -FDT_ERR_NOTFOUND) {\n-\t\treg = (fdt32_t *)fdt_getprop(blob, off, \"reg\", 0);\n-\t\tif (reg) {\n-\t\t\tval = spin_tbl_addr;\n-\t\t\tval += id_to_core(of_read_number(reg, addr_cells))\n-\t\t\t\t* SPIN_TABLE_ELEM_SIZE;\n-\t\t\tval = cpu_to_fdt64(val);\n-\t\t\tfdt_setprop_string(blob, off, \"enable-method\",\n-\t\t\t\t\t \"spin-table\");\n-\t\t\tfdt_setprop(blob, off, \"cpu-release-addr\",\n-\t\t\t\t &val, sizeof(val));\n-\t\t} else {\n-\t\t\tputs(\"Warning: found cpu node without reg property\\n\");\n-\t\t}\n-\t\toff = fdt_node_offset_by_prop_value(blob, off, \"device_type\",\n-\t\t\t\t\t\t \"cpu\", 4);\n-\t}\n-\n-\tfdt_add_mem_rsv(blob, (uintptr_t)&secondary_boot_code,\n+\tfdt_add_mem_rsv(fdt, (uintptr_t)&secondary_boot_code,\n \t\t\t*boot_code_size);\n }\n+\n+static void ft_fixup_cpu(void *blob)\n+{\n+}\n+\n #endif\n \n void ft_cpu_setup(void *blob, bd_t *bd)\n", "prefixes": [ "U-Boot", "v2", "3/9" ] }