Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/805764/?format=api
{ "id": 805764, "url": "http://patchwork.ozlabs.org/api/1.2/patches/805764/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/1503639722-19121-4-git-send-email-paulus@ozlabs.org/", "project": { "id": 2, "url": "http://patchwork.ozlabs.org/api/1.2/projects/2/?format=api", "name": "Linux PPC development", "link_name": "linuxppc-dev", "list_id": "linuxppc-dev.lists.ozlabs.org", "list_email": "linuxppc-dev@lists.ozlabs.org", "web_url": "https://github.com/linuxppc/wiki/wiki", "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git", "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/", "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/", "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}" }, "msgid": "<1503639722-19121-4-git-send-email-paulus@ozlabs.org>", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/1503639722-19121-4-git-send-email-paulus@ozlabs.org/", "date": "2017-08-25T05:41:55", "name": "[v2,03/10] powerpc: Fix emulation of the isel instruction", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "7f2d3f93f3a1914c31f5ac22e2dfe95f597c02f1", "submitter": { "id": 67079, "url": "http://patchwork.ozlabs.org/api/1.2/people/67079/?format=api", "name": "Paul Mackerras", "email": "paulus@ozlabs.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/1503639722-19121-4-git-send-email-paulus@ozlabs.org/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/805764/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/805764/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>", "X-Original-To": [ "patchwork-incoming@ozlabs.org", "linuxppc-dev@lists.ozlabs.org" ], "Delivered-To": [ "patchwork-incoming@ozlabs.org", "linuxppc-dev@lists.ozlabs.org", "linuxppc-dev@ozlabs.org" ], "Received": [ "from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xdrNk1YPlz9sxR\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 25 Aug 2017 16:09:58 +1000 (AEST)", "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xdrNk0PP9zDrTg\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 25 Aug 2017 16:09:58 +1000 (AEST)", "from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xdrDV6bJmzDrS2\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tFri, 25 Aug 2017 16:02:50 +1000 (AEST)", "by ozlabs.org (Postfix)\n\tid 3xdrDV60tqz9sR9; Fri, 25 Aug 2017 16:02:50 +1000 (AEST)", "from authenticated.ozlabs.org (localhost [127.0.0.1])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPSA id 3xdrDV5By7z9sRY\n\tfor <linuxppc-dev@ozlabs.org>; Fri, 25 Aug 2017 16:02:50 +1000 (AEST)" ], "Authentication-Results": [ "ozlabs.org; dkim=pass (2048-bit key;\n\tsecure) header.d=ozlabs.org header.i=@ozlabs.org header.b=\"ANjidpPg\";\n\tdkim-atps=neutral", "lists.ozlabs.org; dkim=pass (2048-bit key;\n\tsecure) header.d=ozlabs.org header.i=@ozlabs.org header.b=\"ANjidpPg\";\n\tdkim-atps=neutral", "lists.ozlabs.org; dkim=pass (2048-bit key;\n\tsecure) header.d=ozlabs.org header.i=@ozlabs.org header.b=\"ANjidpPg\"; \n\tdkim-atps=neutral" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; \n\tt=1503640970; bh=709g3IUdaiuu08rgF89bwsWedebMJqGrTLuWbtQkacw=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=ANjidpPg1kZEd4RLF+H8vSDTFSGTOpUehWuj86jKe4St6BhJX6gcLj2nYhU2xKJYq\n\tpv9Z7SBK7lG3+xPp6VbyPbxRg1UaAKUwq91gmAHBpW0nv1IRwKXq4zIb6KmU16wD4K\n\t7HC4KijCYnvivPDpSK1VFUgq2FdanxI6z0rGcBfsPjxdaHYwK2ByY473pp80aka9Qe\n\trIGbEuFFXA+BzGdOdVaDekIUkYTvtSu6QDkgPbzKmdNOqNwtn4RgQ2NvMf11+Yh1vf\n\tJPtDNQKXlZq+LaBoSE/7ZXWt6kES2cV7Z/IuWLhxYp6HBTNH9a2GPpq8PPMjjrzNRM\n\tyfnJMbyjYgI8g==", "From": "Paul Mackerras <paulus@ozlabs.org>", "To": "linuxppc-dev@ozlabs.org", "Subject": "[PATCH v2 03/10] powerpc: Fix emulation of the isel instruction", "Date": "Fri, 25 Aug 2017 15:41:55 +1000", "Message-Id": "<1503639722-19121-4-git-send-email-paulus@ozlabs.org>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1503639722-19121-1-git-send-email-paulus@ozlabs.org>", "References": "<1503639722-19121-1-git-send-email-paulus@ozlabs.org>", "X-BeenThere": "linuxppc-dev@lists.ozlabs.org", "X-Mailman-Version": "2.1.23", "Precedence": "list", "List-Id": "Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>", "List-Unsubscribe": "<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>", "List-Archive": "<http://lists.ozlabs.org/pipermail/linuxppc-dev/>", "List-Post": "<mailto:linuxppc-dev@lists.ozlabs.org>", "List-Help": "<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>", "List-Subscribe": "<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>", "Errors-To": "linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org", "Sender": "\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>" }, "content": "The case added for the isel instruction was added inside a switch\nstatement which uses the 10-bit minor opcode field in the 0x7fe\nbits of the instruction word. However, for the isel instruction,\nthe minor opcode field is only the 0x3e bits, and the 0x7c0 bits\nare used for the \"BC\" field, which indicates which CR bit to use\nto select the result.\n\nTherefore, for the isel emulation to work correctly when BC != 0,\nwe need to match on ((instr >> 1) & 0x1f) == 15). To do this, we\npull the isel case out of the switch statement and put it in an\nif statement of its own.\n\nSigned-off-by: Paul Mackerras <paulus@ozlabs.org>\n---\n arch/powerpc/lib/sstep.c | 18 ++++++++++--------\n 1 file changed, 10 insertions(+), 8 deletions(-)", "diff": "diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c\nindex f9c973c..7921b2a 100644\n--- a/arch/powerpc/lib/sstep.c\n+++ b/arch/powerpc/lib/sstep.c\n@@ -1219,6 +1219,16 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs,\n \t\treturn 0;\n \n \tcase 31:\n+\t\t/* isel occupies 32 minor opcodes */\n+\t\tif (((instr >> 1) & 0x1f) == 15) {\n+\t\t\tmb = (instr >> 6) & 0x1f; /* bc field */\n+\t\t\tval = (regs->ccr >> (31 - mb)) & 1;\n+\t\t\tval2 = (ra) ? regs->gpr[ra] : 0;\n+\n+\t\t\top->val = (val) ? val2 : regs->gpr[rb];\n+\t\t\tgoto compute_done;\n+\t\t}\n+\n \t\tswitch ((instr >> 1) & 0x3ff) {\n \t\tcase 4:\t\t/* tw */\n \t\t\tif (rd == 0x1f ||\n@@ -1444,14 +1454,6 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs,\n /*\n * Logical instructions\n */\n-\t\tcase 15:\t/* isel */\n-\t\t\tmb = (instr >> 6) & 0x1f; /* bc */\n-\t\t\tval = (regs->ccr >> (31 - mb)) & 1;\n-\t\t\tval2 = (ra) ? regs->gpr[ra] : 0;\n-\n-\t\t\top->val = (val) ? val2 : regs->gpr[rb];\n-\t\t\tgoto compute_done;\n-\n \t\tcase 26:\t/* cntlzw */\n \t\t\top->val = __builtin_clz((unsigned int) regs->gpr[rd]);\n \t\t\tgoto logical_done;\n", "prefixes": [ "v2", "03/10" ] }