From nobody Fri May 3 14:20:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1582302254; cv=none; d=zohomail.com; s=zohoarc; b=iYhR54mStC4vbZTIr9tLKD5H23VCzTub8WKGq835WV0HQL6qxLesoP+h5yw7f+LalAYrRZyxv6qBMItEkxEz0nC0419X4xolCw4S5fMhWxkcC7SWW+W2KqDSryGDL0eERrZ0kGDqCJ7/PkNsw617z0Jqw6KLyTPnvVUCeq3rBvY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582302254; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=vFiPRvFKVsbNzmJDjMRO2L9Swvm9SGW0hfm4mbSD9HI=; b=ETwcJ2ifIe1LCEeqrGOogx9Ke8AYNxYNf9E+TYzYwSe3D/vpWPDz5fMXsa/N8qBM8DdQir6IQ5CdJ1Wu3q+SkBaUrswpc0CycydauwTvsBbCvyU03okVKXbEal9bKBCfUD1c6uev4MBHmtQJ66QGlnpySQbvJL8KJLmF2F7A0tE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1582302254661969.5142522077385; Fri, 21 Feb 2020 08:24:14 -0800 (PST) Received: from localhost ([::1]:60810 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j5B65-0004zO-KI for importer@patchew.org; Fri, 21 Feb 2020 11:24:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46431) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j5B5P-0004PI-T6 for qemu-devel@nongnu.org; Fri, 21 Feb 2020 11:23:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j5B5O-0003ZX-PG for qemu-devel@nongnu.org; Fri, 21 Feb 2020 11:23:31 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:23144 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j5B5O-0003ZN-Cg for qemu-devel@nongnu.org; Fri, 21 Feb 2020 11:23:30 -0500 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-275-5YnrrlNENWmrczHBJ2yaJQ-1; Fri, 21 Feb 2020 11:23:28 -0500 Received: by mail-wr1-f69.google.com with SMTP id m15so1216678wrs.22 for ; Fri, 21 Feb 2020 08:23:28 -0800 (PST) Received: from x1w.redhat.com (78.red-88-21-202.staticip.rima-tde.net. [88.21.202.78]) by smtp.gmail.com with ESMTPSA id t81sm4367414wmg.6.2020.02.21.08.23.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Feb 2020 08:23:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582302209; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vFiPRvFKVsbNzmJDjMRO2L9Swvm9SGW0hfm4mbSD9HI=; b=YW/i+5dfh2Gdx8Z1kdxgkhFgPVxQsWyYl4ZtatLfWLKQrGOOpLZCtCOJ+hqca48n1/KxdS sJObzTbuuOPynIn4zvvR8RGupJH6lnS7XsZrUmQdfsZzCKgq0zz86vCAF/oFDeTLFjAEr5 mAo48T5Bno5fI4C+mafoAPD4+i5PM9s= X-MC-Unique: 5YnrrlNENWmrczHBJ2yaJQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NcTfhGykjxqUJHmU3wSmXTaQacdRKcUuYEHPVWON51c=; b=R+7wqdMKln0oVIQV2gGJj/pNWTlM6A8SlVenp0trWY+2TQ1hOrB5f6az5WK6JEtZlT bj632ZotVHSwripb+0DauV/XJ43KNSpPHKtDsHqlMsDTrQ4h2geT+ri6hicK9Oifht20 o6qBq4CwOgcA2pn5CuO1DFCdwt3mwfRhrAAE0n+XvB2HghShtUhf9dIZc/Yx0e8LdOZq P4ArEgzipqFQMyPLtWAQ1NPVyvGFG8raZtYFijEIkZzNA79Vs6c8luapgPLaJU4bN2xU PMgKDevwvlhvSUfZIqqd35qTbWWfu6stTLlVg2fkf5IPhffYgeXJKUasPiGmdkjk1t85 7umQ== X-Gm-Message-State: APjAAAU2yr5Fb/OU+UUKvP+9Zox313Xl3+Ci1XoNlPCnjNuLPVEIJEqe cc9kVw39bdomarMdCQtVJVVG4cKklJndQXuvvHpYYNbaz0wMCthgX1rNXjDAM0Wwsp4AB6zUEiV wNgK0l1lRmY595Mg= X-Received: by 2002:a05:600c:34b:: with SMTP id u11mr4630259wmd.69.1582302206919; Fri, 21 Feb 2020 08:23:26 -0800 (PST) X-Google-Smtp-Source: APXvYqzPW6MlDqjpVahUai1trotfdKv5CNBBce8BJNdWrULkYlCfHaQVRs9HWS27lBbyek3/wKN6Lg== X-Received: by 2002:a05:600c:34b:: with SMTP id u11mr4630240wmd.69.1582302206723; Fri, 21 Feb 2020 08:23:26 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH] hw/unicore32/puv3: Simplify puv3_soc_init() Date: Fri, 21 Feb 2020 17:23:25 +0100 Message-Id: <20200221162325.28194-1-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Alistair Francis , Guan Xuetao , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Since commit d8ed887bdc, the puv3_intc_cpu_handler handler takes a pointer to UniCore32CPU in its opaque argument. Directly pass the cpu pointer. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/unicore32/puv3.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/unicore32/puv3.c b/hw/unicore32/puv3.c index 7e933de228..eec7f561eb 100644 --- a/hw/unicore32/puv3.c +++ b/hw/unicore32/puv3.c @@ -48,7 +48,7 @@ static void puv3_intc_cpu_handler(void *opaque, int irq, = int level) } } =20 -static void puv3_soc_init(CPUUniCore32State *env) +static void puv3_soc_init(UniCore32CPU *cpu) { qemu_irq cpu_intc, irqs[PUV3_IRQS_NR]; DeviceState *dev; @@ -56,8 +56,7 @@ static void puv3_soc_init(CPUUniCore32State *env) int i; =20 /* Initialize interrupt controller */ - cpu_intc =3D qemu_allocate_irq(puv3_intc_cpu_handler, - env_archcpu(env), 0); + cpu_intc =3D qemu_allocate_irq(puv3_intc_cpu_handler, cpu, 0); dev =3D sysbus_create_simple("puv3_intc", PUV3_INTC_BASE, cpu_intc); for (i =3D 0; i < PUV3_IRQS_NR; i++) { irqs[i] =3D qdev_get_gpio_in(dev, i); @@ -131,7 +130,7 @@ static void puv3_init(MachineState *machine) cpu =3D UNICORE32_CPU(cpu_create(machine->cpu_type)); env =3D &cpu->env; =20 - puv3_soc_init(env); + puv3_soc_init(cpu); puv3_board_init(env, ram_size); puv3_load_kernel(kernel_filename); } --=20 2.21.1