From patchwork Wed Feb 15 11:27:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 653695 Delivered-To: patch@linaro.org Received: by 2002:adf:f90f:0:0:0:0:0 with SMTP id b15csp280823wrr; Wed, 15 Feb 2023 03:28:57 -0800 (PST) X-Google-Smtp-Source: AK7set++9cM85SZPHCQM2YTQTB4nmT7OlJ6YTUtZfsa8wmL0npp5Q5cpsVSkLkPTX+7aC8FTRvpR X-Received: by 2002:a05:622a:1b8a:b0:3b9:bd28:bb6c with SMTP id bp10-20020a05622a1b8a00b003b9bd28bb6cmr2165168qtb.36.1676460537356; Wed, 15 Feb 2023 03:28:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676460537; cv=none; d=google.com; s=arc-20160816; b=Cxi+ch9DAIO3vdHGzuyMcbRxgDfes2OBZH3JvwPo5sKtBaXJtswptDkUrQdIV2qa3j auGzsyQ9N3Z8HYVkWmDLz25cKSAwofBfuRjdQpvq6mtDxxzEfjMMDTfBcr+yEaFWsLKN xjzZHQhHKS2I89OKSVvZ+WbhY9af+ej8IDON8q3QUOLBN4g/MoSEM3bz7hXwZDMzkKAr xkLBe0ZEOQoCThZLhIV0wNSJ95QBLznGt/FNG4G5zKBiDC11WQNYYrokRsZjapy+hwXh w7D7Kl7Smc6g+FEd/zZXyTme/63C7bEQeD/xOPv6M0AS1JcZ17vA2kjWgs6JnmoLK3lT DyBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=lRBJt3/a5AQkWk6sGB4CY5cBjybxjq8f9nxbechh2uk=; b=H1huRYH059ClEB98ngZRaeA0LodNfxR0/HTjIAnN5Pf24jS6BC5ScH6vRHAr7zAgFu G7Xmp8MQL9ox4sR7Q5Dec/zKk5Pf6VLhs9YSu5ollSLzM/vdE1b9Ule2qzfEX5BKHLeS 13izMwAsYDmKVAJUUcjI0dom7EtQJehv89f6rcyNtZDk9CKexHQWE8blWI4m4OPmD8KR goo9ik/MW0Ox9kkgSsDKEOkA2VVKFqhlx4HYBiRfP90DKpPg+Ix17xIy86ID/l28eHuk iQJtkcKMHYKvzwCaEWQvAweqlsc4b7jNslxrJnoyu/+HueerfVm88ZrQS9phM5tNJSev lblw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=m0H56OuK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z17-20020a05622a061100b003b68cab30a1si14299861qta.741.2023.02.15.03.28.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 Feb 2023 03:28:57 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=m0H56OuK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSFxF-00011c-IN; Wed, 15 Feb 2023 06:28:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSFxB-0000kr-Ba for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:28:01 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pSFx9-0003Pq-80 for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:28:00 -0500 Received: by mail-wr1-x42e.google.com with SMTP id y1so18805465wru.2 for ; Wed, 15 Feb 2023 03:27:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lRBJt3/a5AQkWk6sGB4CY5cBjybxjq8f9nxbechh2uk=; b=m0H56OuK3Ozxw3g8voFeSzoZVdKBd1uACvb2WRFiVbyQuLugAQJJ8lSv3+B6bgM5ea 7u6quTfrZd9r4QJFR4vlcFZpnL1P2+t/6XRQF5b1ifP0DjWimP34FSm3TuHzumyDQpoK u82DF7GsKCuW5oskiBaH6JD9bqsvYdxM7ih599vX+NXlCivyYiUWQnkNlks5QztEHu1x nu4Ut3uWZ0C4DBHdtx6M8DiGPGLHo2euvoy/TxY7Od3uE4lKkDpaE+JZIN44/Ha33jvE MN09QIrquQQaSnJLXJ3du5o48RzmJpX6gJOcTnWozpNkTiEsm+mW7SNXzxbm3EajS5F1 rVkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lRBJt3/a5AQkWk6sGB4CY5cBjybxjq8f9nxbechh2uk=; b=tXc8vI2QbWEIph62b+gbJH0KPpvA7cLajfGqvLtH6jV/yG7knXUE+u/8hT2vwVAS+x q7ztyIHw5AimZE2+HHk5W+dHEp6HPiwdAxkfeuMOQDizCeO3P9p2qu+LJNPzNUCwl74v L1vfaVWD7wrRyyH6g9y2ZM1NI5ssr8j0nvTvEIP6xdg+2SYvYcPgIeKVUE6D+LBKNvV2 P+sV9rTRZ5eYixdzF9dsXtvscQUUt/DvoglrVgHFQHnJjF7T1NFgkp0v7UHbHTQcV75S szGZasR7Zecti4ZckyGFJgrnY2Po9Q4sQV3RNH8aB+ds2H1i/J/dbuel1O3owKPGFxhP e3FA== X-Gm-Message-State: AO0yUKXkZbJWuM0W2jDg2nRSUvdm9C882ABTxddiCR1FpCqRmTl57wKd A+DrdEu+KHcsFOS0wkeqaONeSCgJN46rTcuA X-Received: by 2002:adf:ecc3:0:b0:2c5:4bcf:c62a with SMTP id s3-20020adfecc3000000b002c54bcfc62amr1195934wro.29.1676460478190; Wed, 15 Feb 2023 03:27:58 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id v12-20020a5d610c000000b002c56a991971sm2407905wrt.76.2023.02.15.03.27.57 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Feb 2023 03:27:57 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Eduardo Habkost , John Snow , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Mark Cave-Ayland , Artyom Tarasenko , qemu-ppc@nongnu.org Subject: [PATCH 09/20] hw/ide: Un-inline ide_set_irq() Date: Wed, 15 Feb 2023 12:27:01 +0100 Message-Id: <20230215112712.23110-10-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230215112712.23110-1-philmd@linaro.org> References: <20230215112712.23110-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.google.com 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Only include "hw/irq.h" where appropriate. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/ide/ahci.c | 1 + hw/ide/core.c | 8 ++++++++ hw/ide/ich.c | 1 + hw/ide/macio.c | 1 + hw/ide/microdrive.c | 1 + hw/ide/pci.c | 1 + hw/misc/macio/gpio.c | 1 + hw/sparc64/sun4u.c | 1 + include/hw/ide/internal.h | 9 +-------- 9 files changed, 16 insertions(+), 8 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 7ce001cacd..3e21f607fe 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -22,6 +22,7 @@ */ #include "qemu/osdep.h" +#include "hw/irq.h" #include "hw/pci/msi.h" #include "hw/pci/pci.h" #include "hw/qdev-properties.h" diff --git a/hw/ide/core.c b/hw/ide/core.c index 5d1039378f..1473b6057f 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -24,6 +24,7 @@ */ #include "qemu/osdep.h" +#include "hw/irq.h" #include "hw/isa/isa.h" #include "migration/vmstate.h" #include "qemu/error-report.h" @@ -2782,6 +2783,13 @@ void ide_init2(IDEBus *bus, qemu_irq irq) bus->dma = &ide_dma_nop; } +void ide_set_irq(IDEBus *bus) +{ + if (!(bus->cmd & IDE_CTRL_DISABLE_IRQ)) { + qemu_irq_raise(bus->irq); + } +} + void ide_exit(IDEState *s) { timer_free(s->sector_write_timer); diff --git a/hw/ide/ich.c b/hw/ide/ich.c index 1007a51fcb..d61faab532 100644 --- a/hw/ide/ich.c +++ b/hw/ide/ich.c @@ -61,6 +61,7 @@ */ #include "qemu/osdep.h" +#include "hw/irq.h" #include "hw/pci/msi.h" #include "hw/pci/pci.h" #include "migration/vmstate.h" diff --git a/hw/ide/macio.c b/hw/ide/macio.c index e604466acb..15fd934831 100644 --- a/hw/ide/macio.c +++ b/hw/ide/macio.c @@ -24,6 +24,7 @@ */ #include "qemu/osdep.h" +#include "hw/irq.h" #include "hw/ppc/mac_dbdma.h" #include "hw/qdev-properties.h" #include "migration/vmstate.h" diff --git a/hw/ide/microdrive.c b/hw/ide/microdrive.c index 56c5be3655..b9822b939b 100644 --- a/hw/ide/microdrive.c +++ b/hw/ide/microdrive.c @@ -29,6 +29,7 @@ #include "qapi/error.h" #include "qemu/module.h" #include "sysemu/dma.h" +#include "hw/irq.h" #include "hw/ide/internal.h" #include "qom/object.h" diff --git a/hw/ide/pci.c b/hw/ide/pci.c index 84ba733548..ae638dee0d 100644 --- a/hw/ide/pci.c +++ b/hw/ide/pci.c @@ -24,6 +24,7 @@ */ #include "qemu/osdep.h" +#include "hw/irq.h" #include "hw/pci/pci.h" #include "migration/vmstate.h" #include "sysemu/dma.h" diff --git a/hw/misc/macio/gpio.c b/hw/misc/macio/gpio.c index c8ac5633b2..4deb330471 100644 --- a/hw/misc/macio/gpio.c +++ b/hw/misc/macio/gpio.c @@ -28,6 +28,7 @@ #include "migration/vmstate.h" #include "hw/misc/macio/macio.h" #include "hw/misc/macio/gpio.h" +#include "hw/irq.h" #include "hw/nmi.h" #include "qemu/log.h" #include "qemu/module.h" diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index 387181ff77..cb2d0fbbe7 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -28,6 +28,7 @@ #include "qapi/error.h" #include "qemu/datadir.h" #include "cpu.h" +#include "hw/irq.h" #include "hw/pci/pci.h" #include "hw/pci/pci_bridge.h" #include "hw/pci/pci_bus.h" diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index 84d3722d67..57a6278327 100644 --- a/include/hw/ide/internal.h +++ b/include/hw/ide/internal.h @@ -8,7 +8,6 @@ */ #include "hw/ide.h" -#include "hw/irq.h" #include "sysemu/dma.h" #include "hw/block/block.h" #include "exec/ioport.h" @@ -572,13 +571,6 @@ static inline IDEState *idebus_active_if(IDEBus *bus) return bus->ifs + bus->unit; } -static inline void ide_set_irq(IDEBus *bus) -{ - if (!(bus->cmd & IDE_CTRL_DISABLE_IRQ)) { - qemu_irq_raise(bus->irq); - } -} - /* hw/ide/core.c */ extern const VMStateDescription vmstate_ide_bus; @@ -627,6 +619,7 @@ int ide_init_drive(IDEState *s, BlockBackend *blk, IDEDriveKind kind, void ide_init2(IDEBus *bus, qemu_irq irq); void ide_exit(IDEState *s); int ide_init_ioport(IDEBus *bus, ISADevice *isa, int iobase, int iobase2); +void ide_set_irq(IDEBus *bus); void ide_register_restart_cb(IDEBus *bus); void ide_exec_cmd(IDEBus *bus, uint32_t val);