From patchwork Wed Jun 26 11:06:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 1952526 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=daynix-com.20230601.gappssmtp.com header.i=@daynix-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=PPauVM+U; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W8JpT6STjz20X1 for ; Wed, 26 Jun 2024 21:08:17 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sMQUU-0005YY-1I; Wed, 26 Jun 2024 07:07:06 -0400 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 1sMQUO-0005OR-7M for qemu-ppc@nongnu.org; Wed, 26 Jun 2024 07:07:00 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sMQUM-0004gR-Lg for qemu-ppc@nongnu.org; Wed, 26 Jun 2024 07:06:59 -0400 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1fa07e4f44eso36444285ad.2 for ; Wed, 26 Jun 2024 04:06:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1719400017; x=1720004817; darn=nongnu.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=NdtXuYtoYpM+68cWqs8hQd4tffE/iSVor/TSMG9jMpE=; b=PPauVM+UgMUALgAr2fPV8PkAPs0l5wP4h749VNITr2FVNnIZj9Vjp9bDeD5Enqgi1e zKzqgow6MU7nCBGtWauC0qWWuCCNbC4EaAAJQpCLy3P4Rplcfn+h5KWDU46JbmJfG5JC HJHjNXi26vgwn0ryQpxYpnFNnZVA0ndESeppXClx8QKUqRk1h2n/FUM1SeiUAKSYk3IL 1ORmS4qWGyTolpD7fUc79OP7QiWEPsFG9stszDntRN8lVHu5kjYpIpAvkuVNXJCAKHmK ABGk4R5CH4QR4ZIIcFd1aFBDiucay75pDnt8t70Ft7+yhjCjiy5SAQZrbhFU2Gi/emDR JITw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719400017; x=1720004817; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NdtXuYtoYpM+68cWqs8hQd4tffE/iSVor/TSMG9jMpE=; b=rnghK5dfvq6BvTz35M0rMa8tANKd5btvR7ekv6BR5Mzwjw26EKorA7LgS/16gtfYWt +QRmIdlXt3rHU8ssBT6SeZ6KzUHDL/vIXOaPZPCUCl7QdGXi46w5mqFygqry1CZDA4Nb 0r2c9ZsbhH0Q9JvlTPl4QasDZUSyqObLWM+slGi5P1QzyBAXXTbcBp5sPbaXq9T9sDCw wJQnzOVkRs8CvlZp1fq2AwdVyMDijd4xV340J+STJc/+2NamQA9plw7NnhER5XkPgRKn zJVpiuberaY0SD9P4ZXRAHt8piI3Fs37OAGy0DSaJlG57ZSeKHdGu9VaLLPSSGM3OixW NCug== X-Forwarded-Encrypted: i=1; AJvYcCXNX69eAZhAhNpwZC3BEmiaa+2RcYxVjA/xC2uz4eA2o/2TBO/li/4QZ4fie3uLX9zEQmg4U1OICGzF99NkS3iFjkPY X-Gm-Message-State: AOJu0Yy1GNwO0/9Fr4HUCNROiCDRFRGOJVsEtISm1hA+X4sXoAuGHQs5 1ijzt+WXLoecJzJ0mFatcVjqWwxGYo05oRo/A9OUWzlVGwo01VClTN/RCIige04= X-Google-Smtp-Source: AGHT+IFg1T+vqFnUee178oY9EUIeMhokug+RTUydh6dLIMpcg1X+lIRMwce+VWX5z7BcMoNNVng/8A== X-Received: by 2002:a17:902:ea01:b0:1f7:3a5b:2f0 with SMTP id d9443c01a7336-1fa23ef7803mr126640085ad.44.1719400017213; Wed, 26 Jun 2024 04:06:57 -0700 (PDT) Received: from localhost ([157.82.204.135]) by smtp.gmail.com with UTF8SMTPSA id d9443c01a7336-1fa2ac93ad8sm62979925ad.266.2024.06.26.04.06.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Jun 2024 04:06:56 -0700 (PDT) From: Akihiko Odaki Date: Wed, 26 Jun 2024 20:06:26 +0900 Subject: [PATCH 03/14] hw/isa/vt82c686: Free irqs MIME-Version: 1.0 Message-Id: <20240626-san-v1-3-f3cc42302189@daynix.com> References: <20240626-san-v1-0-f3cc42302189@daynix.com> In-Reply-To: <20240626-san-v1-0-f3cc42302189@daynix.com> To: Eduardo Habkost , Marcel Apfelbaum , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= , Yanan Wang , John Snow , BALATON Zoltan , Jiaxun Yang , Nicholas Piggin , Daniel Henrique Barboza , David Gibson , Harsh Prateek Bora , Alexey Kardashevskiy , "Michael S. Tsirkin" , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Xu , Fabiano Rosas , Paolo Bonzini , David Hildenbrand , Thomas Huth , Laurent Vivier Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, qemu-ppc@nongnu.org, Akihiko Odaki X-Mailer: b4 0.14-dev-fd6e3 Received-SPF: none client-ip=2607:f8b0:4864:20::62c; envelope-from=akihiko.odaki@daynix.com; helo=mail-pl1-x62c.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-ppc@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-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org This suppresses LeakSanitizer warnings. Signed-off-by: Akihiko Odaki --- hw/isa/vt82c686.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 8582ac0322eb..189b487f1d22 100644 --- a/hw/isa/vt82c686.c +++ b/hw/isa/vt82c686.c @@ -721,7 +721,6 @@ static void via_isa_realize(PCIDevice *d, Error **errp) qdev_init_gpio_out(dev, &s->cpu_intr, 1); qdev_init_gpio_in_named(dev, via_isa_pirq, "pirq", PCI_NUM_PINS); - isa_irq = qemu_allocate_irqs(via_isa_request_i8259_irq, s, 1); isa_bus = isa_bus_new(dev, pci_address_space(d), pci_address_space_io(d), errp); @@ -729,7 +728,9 @@ static void via_isa_realize(PCIDevice *d, Error **errp) return; } + isa_irq = qemu_allocate_irqs(via_isa_request_i8259_irq, s, 1); s->isa_irqs_in = i8259_init(isa_bus, *isa_irq); + qemu_free_irqs(isa_irq, 1); isa_bus_register_input_irqs(isa_bus, s->isa_irqs_in); i8254_pit_init(isa_bus, 0x40, 0, NULL); i8257_dma_init(OBJECT(d), isa_bus, 0);