get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2229185,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2229185/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260427210133.6016-6-deller@kernel.org/",
    "project": {
        "id": 14,
        "url": "http://patchwork.ozlabs.org/api/1.1/projects/14/?format=api",
        "name": "QEMU Development",
        "link_name": "qemu-devel",
        "list_id": "qemu-devel.nongnu.org",
        "list_email": "qemu-devel@nongnu.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20260427210133.6016-6-deller@kernel.org>",
    "date": "2026-04-27T21:01:23",
    "name": "[PULL,v2,05/15] linux-user/arm/nwfpe: Replace user_registers with current_cpu",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "be46ae36a9bfb4d6e609380a01cd238d77506a67",
    "submitter": {
        "id": 87076,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/87076/?format=api",
        "name": "Helge Deller",
        "email": "deller@kernel.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260427210133.6016-6-deller@kernel.org/mbox/",
    "series": [
        {
            "id": 501726,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/501726/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=501726",
            "date": "2026-04-27T21:01:22",
            "name": "[PULL,v2,01/15] MAINTAINERS: Add myself as maintainer for linux-user",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/501726/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2229185/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2229185/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=BwGpa9rK;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g4GK64lcPz1yHX\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 28 Apr 2026 07:04:26 +1000 (AEST)",
            "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wHT5b-0000Ru-3i; Mon, 27 Apr 2026 17:01:59 -0400",
            "from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <deller@kernel.org>) id 1wHT5T-0000GC-DU\n for qemu-devel@nongnu.org; Mon, 27 Apr 2026 17:01:52 -0400",
            "from tor.source.kernel.org ([172.105.4.254])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <deller@kernel.org>) id 1wHT5Q-0003US-0J\n for qemu-devel@nongnu.org; Mon, 27 Apr 2026 17:01:50 -0400",
            "from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58])\n by tor.source.kernel.org (Postfix) with ESMTP id 6CAFD60139;\n Mon, 27 Apr 2026 21:01:46 +0000 (UTC)",
            "by smtp.kernel.org (Postfix) with ESMTPSA id B0928C2BCB6;\n Mon, 27 Apr 2026 21:01:44 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n s=k20201202; t=1777323706;\n bh=QIFtf3dqQlSgmjSkVvwlhh3G2J8OJkshPhuv1bYI+XA=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=BwGpa9rKG0c/BwdWPvOypSZsNdaD6tBR8ALcRoshODu1Es/RR4C9B31SpTqjnVDSn\n iv9kAFJpmiZV7QJmlxTrZoXuxMBMdfJ0JRaggO5Lao2FgYZ1Un0ExwvSTnFxJb0KLg\n MsjNyuqQfdQVDZ0CAIRhvC6ex0FrTiu/Su9lp57fgrlkFoz1GErpPOOwlfF02ylDza\n 1ABkl9ovhG5nmjGi82G0DojfyXL4F/IBrpwXrXZVFamRqAe7xdevotMMlu5IiGRi3x\n sdcPAVpQ0QzFLe9tAlxs0BKVSbK6PnMuK8YYEg7jrqWmfC3d/roYmeFssOjU6gzWof\n 8SmaJKMz/MAQw==",
        "From": "Helge Deller <deller@kernel.org>",
        "To": "qemu-devel@nongnu.org",
        "Cc": "Laurent Vivier <laurent@vivier.eu>, =?utf-8?q?Philippe_Mathieu-Daud?=\n\t=?utf-8?q?=C3=A9?= <philmd@linaro.org>, Helge Deller <deller@gmx.de>,\n Jiaxun Yang <jiaxun.yang@flygoat.com>,\n Pierrick Bouvier <pierrick.bouvier@linaro.org>",
        "Subject": "[PULL v2 05/15] linux-user/arm/nwfpe: Replace user_registers with\n current_cpu",
        "Date": "Mon, 27 Apr 2026 23:01:23 +0200",
        "Message-ID": "<20260427210133.6016-6-deller@kernel.org>",
        "X-Mailer": "git-send-email 2.53.0",
        "In-Reply-To": "<20260427210133.6016-1-deller@kernel.org>",
        "References": "<20260427210133.6016-1-deller@kernel.org>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "Received-SPF": "pass client-ip=172.105.4.254; envelope-from=deller@kernel.org;\n helo=tor.source.kernel.org",
        "X-Spam_score_int": "-20",
        "X-Spam_score": "-2.1",
        "X-Spam_bar": "--",
        "X-Spam_report": "(-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001,\n DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no",
        "X-Spam_action": "no action",
        "X-BeenThere": "qemu-devel@nongnu.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "qemu development <qemu-devel.nongnu.org>",
        "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>",
        "List-Post": "<mailto:qemu-devel@nongnu.org>",
        "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>",
        "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>",
        "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org",
        "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"
    },
    "content": "From: Richard Henderson <richard.henderson@linaro.org>\n\nUse the thread-local variable current_cpu instead of\na global variable to access the general registers.\nThis also means we don't need to pass env to EmulateAll.\n\nSigned-off-by: Richard Henderson <richard.henderson@linaro.org>\nReviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>\nSigned-off-by: Helge Deller <deller@gmx.de>\n---\n linux-user/arm/cpu_loop.c    |  2 +-\n linux-user/arm/nwfpe/fpa11.c |  9 +--------\n linux-user/arm/nwfpe/fpa11.h | 23 +++++++----------------\n 3 files changed, 9 insertions(+), 25 deletions(-)",
    "diff": "diff --git a/linux-user/arm/cpu_loop.c b/linux-user/arm/cpu_loop.c\nindex 19874f4c72..262ab5cc41 100644\n--- a/linux-user/arm/cpu_loop.c\n+++ b/linux-user/arm/cpu_loop.c\n@@ -215,7 +215,7 @@ static bool insn_is_linux_bkpt(uint32_t opcode, bool is_thumb)\n static bool emulate_arm_fpa11(CPUARMState *env, uint32_t opcode)\n {\n     TaskState *ts = get_task_state(env_cpu(env));\n-    int rc = EmulateAll(opcode, &ts->fpa, env);\n+    int rc = EmulateAll(opcode, &ts->fpa);\n     int raise, enabled;\n \n     if (rc == 0) {\ndiff --git a/linux-user/arm/nwfpe/fpa11.c b/linux-user/arm/nwfpe/fpa11.c\nindex 0f1afbd91d..44783934b2 100644\n--- a/linux-user/arm/nwfpe/fpa11.c\n+++ b/linux-user/arm/nwfpe/fpa11.c\n@@ -30,7 +30,6 @@\n \n \n FPA11* qemufpa = NULL;\n-CPUARMState* user_registers;\n \n /* Reset the FPA11 chip.  Called to initialize and reset the emulator. */\n void resetFPA11(void)\n@@ -156,7 +155,7 @@ void SetRoundingPrecision(const unsigned int opcode)\n \n /* Emulate the instruction in the opcode. */\n /* ??? This is not thread safe.  */\n-unsigned int EmulateAll(unsigned int opcode, FPA11* qfpa, CPUARMState* qregs)\n+unsigned int EmulateAll(unsigned int opcode, FPA11* qfpa)\n {\n   unsigned int nRc = 0;\n //  unsigned long flags;\n@@ -173,12 +172,6 @@ unsigned int EmulateAll(unsigned int opcode, FPA11* qfpa, CPUARMState* qregs)\n   }\n \n   qemufpa=qfpa;\n-  user_registers=qregs;\n-\n-#if 0\n-  fprintf(stderr,\"emulating FP insn 0x%08x, PC=0x%08x\\n\",\n-          opcode, qregs[ARM_REG_PC]);\n-#endif\n   fpa11 = GET_FPA11();\n \n   if (fpa11->initflag == 0)\t\t/* good place for __builtin_expect */\ndiff --git a/linux-user/arm/nwfpe/fpa11.h b/linux-user/arm/nwfpe/fpa11.h\nindex d459c5da02..20f9d2eb81 100644\n--- a/linux-user/arm/nwfpe/fpa11.h\n+++ b/linux-user/arm/nwfpe/fpa11.h\n@@ -25,15 +25,6 @@\n \n #define GET_FPA11() (qemufpa)\n \n-/*\n- * The processes registers are always at the very top of the 8K\n- * stack+task struct.  Use the same method as 'current' uses to\n- * reach them.\n- */\n-extern CPUARMState *user_registers;\n-\n-#define GET_USERREG() (user_registers)\n-\n /* Need task_struct */\n //#include <linux/sched.h>\n \n@@ -91,25 +82,25 @@ void SetRoundingPrecision(const unsigned int);\n \n static inline unsigned int readRegister(unsigned int reg)\n {\n-    return (user_registers->regs[(reg)]);\n+    CPUARMState *env = cpu_env(current_cpu);\n+    return env->regs[reg];\n }\n \n static inline void writeRegister(unsigned int x, unsigned int y)\n {\n-#if 0\n-\tprintf(\"writing %d to r%d\\n\",y,x);\n-#endif\n-        user_registers->regs[(x)]=(y);\n+    CPUARMState *env = cpu_env(current_cpu);\n+    env->regs[x] = y;\n }\n \n static inline void writeConditionCodes(unsigned int x)\n {\n-    cpsr_write(user_registers, x, CPSR_NZCV, CPSRWriteByInstr);\n+    CPUARMState *env = cpu_env(current_cpu);\n+    cpsr_write(env, x, CPSR_NZCV, CPSRWriteByInstr);\n }\n \n #define ARM_REG_PC 15\n \n-unsigned int EmulateAll(unsigned int opcode, FPA11* qfpa, CPUARMState* qregs);\n+unsigned int EmulateAll(unsigned int opcode, FPA11* qfpa);\n \n unsigned int EmulateCPDO(const unsigned int);\n unsigned int EmulateCPDT(const unsigned int);\n",
    "prefixes": [
        "PULL",
        "v2",
        "05/15"
    ]
}