Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/814716/?format=api
{ "id": 814716, "url": "http://patchwork.ozlabs.org/api/patches/814716/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170917232010.14183-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": "<20170917232010.14183-7-f4bug@amsat.org>", "list_archive_url": null, "date": "2017-09-17T23:20:10", "name": "[v3,6/6] mips: replace cpu_mips_init() with cpu_generic_init()", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "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/20170917232010.14183-7-f4bug@amsat.org/mbox/", "series": [ { "id": 3548, "url": "http://patchwork.ozlabs.org/api/series/3548/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=3548", "date": "2017-09-17T23:20:04", "name": "QOMify MIPS cpu", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/3548/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/814716/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/814716/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=\"mq9LjwSO\"; 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 3xwQJC3jr8z9s7G\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 18 Sep 2017 09:26:31 +1000 (AEST)", "from localhost ([::1]:33982 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 1dtixJ-0007KI-KV\n\tfor incoming@patchwork.ozlabs.org; Sun, 17 Sep 2017 19:26:29 -0400", "from eggs.gnu.org ([2001:4830:134:3::10]:42742)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1dtiru-0003WM-FS\n\tfor qemu-devel@nongnu.org; Sun, 17 Sep 2017 19:20:56 -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 1dtirp-0007dg-CT\n\tfor qemu-devel@nongnu.org; Sun, 17 Sep 2017 19:20:54 -0400", "from mail-qk0-x244.google.com ([2607:f8b0:400d:c09::244]:33399)\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 1dtirp-0007dP-7K\n\tfor qemu-devel@nongnu.org; Sun, 17 Sep 2017 19:20:49 -0400", "by mail-qk0-x244.google.com with SMTP id g128so4581394qke.0\n\tfor <qemu-devel@nongnu.org>; Sun, 17 Sep 2017 16:20:49 -0700 (PDT)", "from yoga.offpageads.com ([181.93.89.178])\n\tby smtp.gmail.com with ESMTPSA id\n\tz75sm4132114qkb.71.2017.09.17.16.20.45\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tSun, 17 Sep 2017 16:20:48 -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=24AR0rOjPLMwZxFexDLWbEfXb9RyQkC+gx7GSKodcaU=;\n\tb=mq9LjwSOX+UdLA8QWg+5OKFD0rVnkZWl9EWw9e0GnL3PRZhKwzIMTKSZTJXGY07Qf8\n\tPxVa9OH141R6k0s704180lRblEXnNsboC0kweGuts4Og6bR7vPiJtVmnNHyYLWoFwxTN\n\tx4ZI4lz97FUK4zXNfPm00XXWZAUBdADbvuMlpI5BEFx/G4pSGTmgus4xQbmFfYcS96Rf\n\tuPsThT4k9qlw1TYdYbvOzoI7o09HfI954aSHHsz/ZtX+qUFIoEi+56VBJwno57Y2gDUb\n\trM3c2VUJs2ALYp8GZEarKJvYs8kpEHPqLe/IuQwkjksEIaOIMNxcXLeFiaMgn4avWUkh\n\tsP9Q==", "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=24AR0rOjPLMwZxFexDLWbEfXb9RyQkC+gx7GSKodcaU=;\n\tb=DLtQK/Y1dYc18y7RbZ4D48MeSv5PH+ZAjGKwej+MySTdihTHxDyMxq2r+e7UTtRw2o\n\tQc8xu28R2o8PtRZgYrU8ysNm4AT9o5KmFEH4Ii00XRBkRh8oNnSOtqBKHzxpKJEToOho\n\tCgs8qbgiQgUroONflBtWijndP0SYm1tBZzGLXXV613/wYEWZ5lTgNuDagy1NZscaVYRL\n\txyl7iaMOJM2GtRmJ3qw9QIR0WIZTMq6afVvLJxo5g+4YybgGiNpqnd6AUUQYAeFanZsZ\n\tLeKAPPO6rqnanPzN2jzOJnMaxl1DwHNbblMGsj8UC4tBg9W75dW9r+eFwav3FL3N6m7S\n\thN9g==", "X-Gm-Message-State": "AHPjjUh+uC4PDwmPv5Da6KXrBsmAyXC6xdB1//AivaGoVIzoKbUfXoUY\n\t9AjlDhTNkKPPcg==", "X-Google-Smtp-Source": "AOwi7QANnlSXo49XA7WmP2M4lopPfQrKCwEe+sij54pm46NMeEDZTrI4tzjHfM0PjKPAPZkJqQAfcw==", "X-Received": "by 10.55.186.1 with SMTP id k1mr18107649qkf.28.1505690448699;\n\tSun, 17 Sep 2017 16:20:48 -0700 (PDT)", "From": "=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <f4bug@amsat.org>", "To": "Igor Mammedov <imammedo@redhat.com>,\n\tEduardo Habkost <ehabkost@redhat.com>, \n\tAurelien Jarno <aurelien@aurel32.net>,\n\tYongbok Kim <yongbok.kim@imgtec.com>,\n\tMarcel Apfelbaum <marcel@redhat.com>", "Date": "Sun, 17 Sep 2017 20:20:10 -0300", "Message-Id": "<20170917232010.14183-7-f4bug@amsat.org>", "X-Mailer": "git-send-email 2.14.1", "In-Reply-To": "<20170917232010.14183-1-f4bug@amsat.org>", "References": "<20170917232010.14183-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:c09::244", "Subject": "[Qemu-devel] [PATCH v3 6/6] 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>, James Hogan <james.hogan@imgtec.com>,\n\t=?utf-8?q?Herv=C3=A9_Poussineau?= <hpoussin@reactos.org>,\n\tqemu-devel@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?=\n\t<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>\nReviewed-by: Eduardo Habkost <ehabkost@redhat.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": [ "v3", "6/6" ] }