get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 807967,
    "url": "http://patchwork.ozlabs.org/api/patches/807967/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170830225225.27925-7-f4bug@amsat.org/",
    "project": {
        "id": 14,
        "url": "http://patchwork.ozlabs.org/api/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": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20170830225225.27925-7-f4bug@amsat.org>",
    "list_archive_url": null,
    "date": "2017-08-30T22:52:24",
    "name": "[v2,6/7] mips: replace cpu_mips_init() with cpu_generic_init()",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "454758b5c4a4779c6af350b01b8afd7d63477ad5",
    "submitter": {
        "id": 70924,
        "url": "http://patchwork.ozlabs.org/api/people/70924/?format=api",
        "name": "Philippe Mathieu-Daudé",
        "email": "f4bug@amsat.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170830225225.27925-7-f4bug@amsat.org/mbox/",
    "series": [
        {
            "id": 718,
            "url": "http://patchwork.ozlabs.org/api/series/718/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=718",
            "date": "2017-08-30T22:52:19",
            "name": "[v2,1/7] mips: move hw/mips/cputimer.c to target/mips/",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/718/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/807967/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/807967/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"ORjUMa11\"; dkim-atps=neutral"
        ],
        "Received": [
            "from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjLWb5rkhz9s65\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 08:58:03 +1000 (AEST)",
            "from localhost ([::1]:53126 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dnBvu-0008Cm-0Q\n\tfor incoming@patchwork.ozlabs.org; Wed, 30 Aug 2017 18:58:02 -0400",
            "from eggs.gnu.org ([2001:4830:134:3::10]:34751)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1dnBr7-0003ch-0p\n\tfor qemu-devel@nongnu.org; Wed, 30 Aug 2017 18:53:06 -0400",
            "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1dnBr2-0002HQ-Kc\n\tfor qemu-devel@nongnu.org; Wed, 30 Aug 2017 18:53:05 -0400",
            "from mail-qt0-x242.google.com ([2607:f8b0:400d:c0d::242]:35789)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1dnBr2-0002HL-F0\n\tfor qemu-devel@nongnu.org; Wed, 30 Aug 2017 18:53:00 -0400",
            "by mail-qt0-x242.google.com with SMTP id u11so6363325qtu.2\n\tfor <qemu-devel@nongnu.org>; Wed, 30 Aug 2017 15:53:00 -0700 (PDT)",
            "from yoga.offpageads.com ([181.93.89.178])\n\tby smtp.gmail.com with ESMTPSA id\n\t54sm4449874qts.31.2017.08.30.15.52.56\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 30 Aug 2017 15:52:59 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=sender:from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=c/I9sMzA/Ya2vf9phDQ3P04q5oVTTq9LilKHu23k6Kw=;\n\tb=ORjUMa11Xf41wtOOzdixtN46vmc5Z0LMTuB8zwkqD2t8fwicS7sfIz+QZAWQuZdq+b\n\tBoLr5nCTVSVL8ik/I4lbB8aqZrDPBk9PVL5PL+j1b2k7ToYzs0Ln0HbYFWqSovyVgRTv\n\t6qJkFQLInk/2arWHv21WDtav2OkMpRIXswoxK9Fd+gw7Z5iIbJkhh3NJrBzA0hmW65uu\n\t6ov6M8iwRqspCFGuSzGqVfNOFb9YkMj7ljBHZX+8WOkOpFRYgAfZChxWpqNfx3DTS+7i\n\t8yvW1c09dr5fJDFEkh3pKWshgLWpTwdC86q3yyGFQt+dIqLzfmvqVEuWEf5bOrPv+dZy\n\tYkPQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:sender:from:to:cc:subject:date:message-id\n\t:in-reply-to:references:mime-version:content-transfer-encoding;\n\tbh=c/I9sMzA/Ya2vf9phDQ3P04q5oVTTq9LilKHu23k6Kw=;\n\tb=unkD/81m8Lm6jp3Wn6Q+O0VOU4gugPKkeTaVyYbY6ffYjnNZOudgtFmtfp380fwFZS\n\twqFlXRP7EVeK3DV1HoFzojLvkwP6O8ClhE8VHhvVQN7oIwtsFeg6s2kWnyqJPNeaMxFa\n\tNZO16IU9T+AdPEFYbV7TX6Bua9fJxCyvtu9qV9Q4Z6v7ZRC4yi3r/WKKj30ISf94q4AH\n\tprurN17sx2/B7w1FhRZlmWDKneRBuNbEgkXsdxnFsduhruPrH3OLuYjaZ7S61W9vHyhs\n\tYcLcBcxNmlWsO1pdoUpz7QVvV0kLjo6A8/c3Jl8ieixjAdyamk2SyKadNb/0HBF3GsU+\n\tgDcQ==",
        "X-Gm-Message-State": "AHYfb5hQYb6t7YXQM5loT3zG70TOGVasWTe0YWomyYXrLKwFfMTvEfut\n\tBqE/qvSayYRoyw==",
        "X-Received": "by 10.200.45.218 with SMTP id q26mr4287849qta.102.1504133579810; \n\tWed, 30 Aug 2017 15:52:59 -0700 (PDT)",
        "From": "=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <f4bug@amsat.org>",
        "To": "Igor Mammedov <imammedo@redhat.com>, =?utf-8?q?Herv=C3=A9_Poussineau?=\n\t<hpoussin@reactos.org>, \tAurelien Jarno <aurelien@aurel32.net>,\n\tEduardo Habkost <ehabkost@redhat.com>, \n\tMarcel Apfelbaum <marcel@redhat.com>,\n\tJames Hogan <james.hogan@imgtec.com>, Yongbok Kim\n\t<yongbok.kim@imgtec.com>",
        "Date": "Wed, 30 Aug 2017 19:52:24 -0300",
        "Message-Id": "<20170830225225.27925-7-f4bug@amsat.org>",
        "X-Mailer": "git-send-email 2.14.1",
        "In-Reply-To": "<20170830225225.27925-1-f4bug@amsat.org>",
        "References": "<20170830225225.27925-1-f4bug@amsat.org>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "X-detected-operating-system": "by eggs.gnu.org: Genre and OS details not\n\trecognized.",
        "X-Received-From": "2607:f8b0:400d:c0d::242",
        "Subject": "[Qemu-devel] [PATCH v2 6/7] mips: replace cpu_mips_init() with\n\tcpu_generic_init()",
        "X-BeenThere": "qemu-devel@nongnu.org",
        "X-Mailman-Version": "2.1.21",
        "Precedence": "list",
        "List-Id": "<qemu-devel.nongnu.org>",
        "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>",
        "List-Archive": "<http://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\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>",
        "Cc": "Thomas Huth <thuth@redhat.com>, qemu-devel@nongnu.org, =?utf-8?q?Phili?=\n\t=?utf-8?q?ppe_Mathieu-Daud=C3=A9?= <f4bug@amsat.org>",
        "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org",
        "Sender": "\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"
    },
    "content": "From: Igor Mammedov <imammedo@redhat.com>\n\nnow cpu_mips_init() reimplements subset of cpu_generic_init()\ntasks, so just drop it and use cpu_generic_init() directly.\n\nSigned-off-by: Igor Mammedov <imammedo@redhat.com>\nReviewed-by: Hervé Poussineau <hpoussin@reactos.org>\nSigned-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>\n[PMD: use internal.h instead of cpu.h]\nTested-by: James Hogan <james.hogan@imgtec.com>\n---\n target/mips/cpu.h       |  3 +--\n hw/mips/cps.c           |  2 +-\n hw/mips/mips_fulong2e.c |  2 +-\n hw/mips/mips_jazz.c     |  2 +-\n hw/mips/mips_malta.c    |  2 +-\n hw/mips/mips_mipssim.c  |  2 +-\n hw/mips/mips_r4k.c      |  2 +-\n target/mips/translate.c | 17 -----------------\n 8 files changed, 7 insertions(+), 25 deletions(-)",
    "diff": "diff --git a/target/mips/cpu.h b/target/mips/cpu.h\nindex 2f81e0f950..66265e4eb6 100644\n--- a/target/mips/cpu.h\n+++ b/target/mips/cpu.h\n@@ -737,10 +737,9 @@ enum {\n  */\n #define CPU_INTERRUPT_WAKE CPU_INTERRUPT_TGT_INT_0\n \n-MIPSCPU *cpu_mips_init(const char *cpu_model);\n int cpu_mips_signal_handler(int host_signum, void *pinfo, void *puc);\n \n-#define cpu_init(cpu_model) CPU(cpu_mips_init(cpu_model))\n+#define cpu_init(cpu_model) cpu_generic_init(TYPE_MIPS_CPU, cpu_model)\n bool cpu_supports_cps_smp(const char *cpu_model);\n bool cpu_supports_isa(const char *cpu_model, unsigned int isa);\n void cpu_set_exception_base(int vp_index, target_ulong address);\ndiff --git a/hw/mips/cps.c b/hw/mips/cps.c\nindex 4ef337d5c4..708899cf92 100644\n--- a/hw/mips/cps.c\n+++ b/hw/mips/cps.c\n@@ -71,7 +71,7 @@ static void mips_cps_realize(DeviceState *dev, Error **errp)\n     bool itu_present = false;\n \n     for (i = 0; i < s->num_vp; i++) {\n-        cpu = cpu_mips_init(s->cpu_model);\n+        cpu = MIPS_CPU(cpu_generic_init(TYPE_MIPS_CPU, s->cpu_model));\n         if (cpu == NULL) {\n             error_setg(errp, \"%s: CPU initialization failed\",  __func__);\n             return;\ndiff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c\nindex 3532399a13..5d9462ec35 100644\n--- a/hw/mips/mips_fulong2e.c\n+++ b/hw/mips/mips_fulong2e.c\n@@ -280,7 +280,7 @@ static void mips_fulong2e_init(MachineState *machine)\n     if (cpu_model == NULL) {\n         cpu_model = \"Loongson-2E\";\n     }\n-    cpu = cpu_mips_init(cpu_model);\n+    cpu = MIPS_CPU(cpu_generic_init(TYPE_MIPS_CPU, cpu_model));\n     if (cpu == NULL) {\n         fprintf(stderr, \"Unable to find CPU definition\\n\");\n         exit(1);\ndiff --git a/hw/mips/mips_jazz.c b/hw/mips/mips_jazz.c\nindex df2262a2a8..c1402de1ce 100644\n--- a/hw/mips/mips_jazz.c\n+++ b/hw/mips/mips_jazz.c\n@@ -151,7 +151,7 @@ static void mips_jazz_init(MachineState *machine,\n     if (cpu_model == NULL) {\n         cpu_model = \"R4000\";\n     }\n-    cpu = cpu_mips_init(cpu_model);\n+    cpu = MIPS_CPU(cpu_generic_init(TYPE_MIPS_CPU, cpu_model));\n     if (cpu == NULL) {\n         fprintf(stderr, \"Unable to find CPU definition\\n\");\n         exit(1);\ndiff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c\nindex af678f5784..9ecdc818b1 100644\n--- a/hw/mips/mips_malta.c\n+++ b/hw/mips/mips_malta.c\n@@ -931,7 +931,7 @@ static void create_cpu_without_cps(const char *cpu_model,\n     int i;\n \n     for (i = 0; i < smp_cpus; i++) {\n-        cpu = cpu_mips_init(cpu_model);\n+        cpu = MIPS_CPU(cpu_generic_init(TYPE_MIPS_CPU, cpu_model));\n         if (cpu == NULL) {\n             fprintf(stderr, \"Unable to find CPU definition\\n\");\n             exit(1);\ndiff --git a/hw/mips/mips_mipssim.c b/hw/mips/mips_mipssim.c\nindex 07fc4c2300..1166834f54 100644\n--- a/hw/mips/mips_mipssim.c\n+++ b/hw/mips/mips_mipssim.c\n@@ -163,7 +163,7 @@ mips_mipssim_init(MachineState *machine)\n         cpu_model = \"24Kf\";\n #endif\n     }\n-    cpu = cpu_mips_init(cpu_model);\n+    cpu = MIPS_CPU(cpu_generic_init(TYPE_MIPS_CPU, cpu_model));\n     if (cpu == NULL) {\n         fprintf(stderr, \"Unable to find CPU definition\\n\");\n         exit(1);\ndiff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c\nindex 2f5ced7409..de212f5c13 100644\n--- a/hw/mips/mips_r4k.c\n+++ b/hw/mips/mips_r4k.c\n@@ -193,7 +193,7 @@ void mips_r4k_init(MachineState *machine)\n         cpu_model = \"24Kf\";\n #endif\n     }\n-    cpu = cpu_mips_init(cpu_model);\n+    cpu = MIPS_CPU(cpu_generic_init(TYPE_MIPS_CPU, cpu_model));\n     if (cpu == NULL) {\n         fprintf(stderr, \"Unable to find CPU definition\\n\");\n         exit(1);\ndiff --git a/target/mips/translate.c b/target/mips/translate.c\nindex f7128bc91d..d16d879df7 100644\n--- a/target/mips/translate.c\n+++ b/target/mips/translate.c\n@@ -20523,23 +20523,6 @@ void cpu_mips_realize_env(CPUMIPSState *env)\n     mvp_init(env, env->cpu_model);\n }\n \n-MIPSCPU *cpu_mips_init(const char *cpu_model)\n-{\n-    ObjectClass *oc;\n-    MIPSCPU *cpu;\n-\n-    oc = cpu_class_by_name(TYPE_MIPS_CPU, cpu_model);\n-    if (oc == NULL) {\n-        return NULL;\n-    }\n-\n-    cpu = MIPS_CPU(object_new(object_class_get_name(oc)));\n-\n-    object_property_set_bool(OBJECT(cpu), true, \"realized\", NULL);\n-\n-    return cpu;\n-}\n-\n bool cpu_supports_cps_smp(const char *cpu_model)\n {\n     const mips_def_t *def = cpu_mips_find_by_name(cpu_model);\n",
    "prefixes": [
        "v2",
        "6/7"
    ]
}