From patchwork Thu Mar 2 22:40:47 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: 658166 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp145434wrb; Thu, 2 Mar 2023 14:43:56 -0800 (PST) X-Google-Smtp-Source: AK7set/9OPvXS2PAgb5TTEftMce61p6QY42/hB8NXKdu/YtE551KtFbUY+cg0qr+Rml2fYXhh2GE X-Received: by 2002:a05:622a:1356:b0:3af:b6bd:aba7 with SMTP id w22-20020a05622a135600b003afb6bdaba7mr21255366qtk.43.1677797036179; Thu, 02 Mar 2023 14:43:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677797036; cv=none; d=google.com; s=arc-20160816; b=usMaeCE4rnZQfFpMwYQdqY7gwJpHIj4xD4QEPCxD3iTof5cRSULsHcSOP4heLmZwj3 snC7Iu7MoE0qjP2x08vVZodgWd1Ev2VhxT53rRK1ICKLEdhDUy4ix15r1vzWmYy7meZh TWcWC8WcMwzAMaNw6thezEyboIx65INvHtdXBFpcsPN+DWvXtD16RxO+5a8BVbVw2KNt z/d0aXkZV2tE3qhWPMpJImbphOfJ8So8zo9jY+CC/6r2UvLQ+2t9eVEwc/k/zXuze8IF ldKT3pnK44J1x/Q/u4/QQBehJuur0U5CA0VfuPaMMDMAcNoqd7ij8wVAWs3OU8W9H0LW NbdQ== 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=WBH0OC00WXelyQU0Dru5HltuKOYgUwSjsFr5h9b93CI=; b=cyI4ezcjdojf5FXlaA+2CNCEdHmATxGNIc8QQHd3pQLRZYal2jSuGZ7vwp2epOpeSU scbDVKaX2ZKVUjg9Z3ppyEhKiC957G1cTEOyf1DEjzVAw1VmlsKicG2i9v5EXgZO6/JT iM0/VUKvRdfmcDrxObCf55sGnDoUFDiQ9eAkXDZG0rr1eqmfJlKtio8Ovjms4iD6k7rs +5kZU4BIsuoIUQ//Suup3+3QBivzbJ369FHmrPjdpeQo6CPmkhn1RZcDCl3TONMTQnVk LG2d9OEoYTlMjoEXPtifU0LrXVL1bbbKPbOK7gGRfCkv4yzSRjI5sjCXoCcMtzErODAE KXhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rZvVoTx7; 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 v22-20020a05622a131600b003bfc34fe064si593229qtk.111.2023.03.02.14.43.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 Mar 2023 14:43:56 -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=rZvVoTx7; 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 1pXrcc-0007St-67; Thu, 02 Mar 2023 17:41:58 -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 1pXrcb-0007R5-EA for qemu-devel@nongnu.org; Thu, 02 Mar 2023 17:41:57 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pXrcZ-0008VE-Rv for qemu-devel@nongnu.org; Thu, 02 Mar 2023 17:41:57 -0500 Received: by mail-wm1-x32a.google.com with SMTP id o38-20020a05600c512600b003e8320d1c11so2650160wms.1 for ; Thu, 02 Mar 2023 14:41:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1677796914; 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=WBH0OC00WXelyQU0Dru5HltuKOYgUwSjsFr5h9b93CI=; b=rZvVoTx7mcGvLx5x4cGyfQyxRwvVXY/carR2VREyOo3wVQgHk27crXiiT/wIPyRrYU Y3pZRYeGvFcRQcLyAVgIek6tGqjydvyRrlLwM+rXzGhQm3eo+7ssqhJyHv3TDsWpaeVL 6SuGNnFgQjT+kH3nANQN7QBLq0wfWNCgrevj8nogbRUNBMZLUN8Sn/bvnbT0mAyvEBIz 0EpNWeLktE5hKDFT0MQcDILMTagM0bHgb77+ZmQWC4C4yQi6NU1BUYeH39MdnNs4phMI 59iH7DZILzpx3CjPifQ/QSgU+G+xGEHY4nxum2qV3wsKfRZN3KhzYtZf8D/iGLFI4xgu jWTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677796914; 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=WBH0OC00WXelyQU0Dru5HltuKOYgUwSjsFr5h9b93CI=; b=fqdUBaArJFV3buzf6IErOicJI4tzHjJ9TFq3ogM73r270N1U7JJFBcG+L11gr4vkeb /11tpBZoOrnqx1az4EfwDy4Nls3Vu8gtr64JQ4USpPG+x0YB3Eqmv+V/IeRV3YUsVapV IwnhfV2+9sBgbUpGWy1PBpCYw6qPcbz7lbOw9/U7KRpqtEhiM0rY6l26BKeT0ZPJb/tI 1Trdt1fU0MgiEup6qossZIysSudcYjZhlbR0WDNuBXcfcgUVaWT+gXqSts8lGnc9mx2Y qdkbgImnUekLif4+QuAHWXxZ5NfKim7hR0LLfDCFJO495VX5llcBc1lb5c88901U0dE8 mxLQ== X-Gm-Message-State: AO0yUKVTIeKzwv44fCwAkwR1T0loihf0IDGtukX5gSOd4wc+v6En8LZL mLgjB5krGwAltGcf8YTLIvQzOoPz2TN1/RwU X-Received: by 2002:a05:600c:1c8e:b0:3e0:98c:dd93 with SMTP id k14-20020a05600c1c8e00b003e0098cdd93mr8804092wms.29.1677796914201; Thu, 02 Mar 2023 14:41:54 -0800 (PST) Received: from localhost.localdomain (43.red-95-127-39.staticip.rima-tde.net. [95.127.39.43]) by smtp.gmail.com with ESMTPSA id he11-20020a05600c540b00b003daf7721bb3sm4397190wmb.12.2023.03.02.14.41.52 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 02 Mar 2023 14:41:53 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Bernhard Beschow Cc: John Snow , David Woodhouse , BALATON Zoltan , =?utf-8?q?Herv=C3=A9_Poussineau?= , qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 07/18] hw/isa: Deprecate isa_get_irq() in favor of isa_bus_get_irq() Date: Thu, 2 Mar 2023 23:40:47 +0100 Message-Id: <20230302224058.43315-8-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230302224058.43315-1-philmd@linaro.org> References: <20230302224058.43315-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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 Last commit removed the last use of isa_get_irq(NULL). Add an assertion to ensure we won't use that hack again. Deprecate in favor of the BUS API: isa_bus_get_irq(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland --- hw/isa/isa-bus.c | 6 +++--- include/hw/isa/isa.h | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index a289eccfb1..081bac18ee 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@ -85,10 +85,10 @@ qemu_irq isa_bus_get_irq(ISABus *bus, unsigned irqnum) * This function is only for special cases such as the 'ferr', and * temporary use for normal devices until they are converted to qdev. */ -qemu_irq isa_get_irq(ISADevice *dev, unsigned isairq) +qemu_irq isa_get_irq(ISADevice *dev, unsigned irqnum) { - assert(!dev || ISA_BUS(qdev_get_parent_bus(DEVICE(dev))) == isabus); - return isa_bus_get_irq(isabus, isairq); + assert(dev); + return isa_bus_get_irq(ISA_BUS(qdev_get_parent_bus(DEVICE(dev))), irqnum); } void isa_connect_gpio_out(ISADevice *isadev, int gpioirq, unsigned isairq) diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h index 40d6224a4e..75fb620782 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -87,7 +87,8 @@ ISADevice *isa_create_simple(ISABus *bus, const char *name); ISADevice *isa_vga_init(ISABus *bus); -qemu_irq isa_get_irq(ISADevice *dev, unsigned isairq); +/* isa_get_irq() is deprecated, please use isa_bus_get_irq() instead. */ +qemu_irq isa_get_irq(ISADevice *dev, unsigned irqnum); void isa_connect_gpio_out(ISADevice *isadev, int gpioirq, unsigned isairq); MemoryRegion *isa_address_space(ISADevice *dev); MemoryRegion *isa_address_space_io(ISADevice *dev);