From patchwork Thu Feb 15 17:57:43 2024 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: 772992 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp968508wre; Thu, 15 Feb 2024 10:07:43 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUWTEMngMeU5jBQg4HsyidVKAbuxFUMOHGi8acR7IJ0PWAaTVEAfiwBzSfHIwami5rb1Ng3dRcr3BSBi11WA9bs X-Google-Smtp-Source: AGHT+IGnli1MFdBvPDMr8K/+6SqDqASD+Es6rryWDTPbseqgVgzPDGi31sOcQJ3YUWBt8bNgZaSP X-Received: by 2002:a05:6214:e61:b0:68f:1067:ffa1 with SMTP id jz1-20020a0562140e6100b0068f1067ffa1mr3171794qvb.19.1708020463332; Thu, 15 Feb 2024 10:07:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020463; cv=none; d=google.com; s=arc-20160816; b=PmYyh3ozpsE60bz4OmAUa0pweBCLP7/rzrgeuE6xpawtJ1MWmQyh62sRU0RFx3olwM kJrj4XE5qj+ZGY1pBqpBToi6XP2XzRqHlQS83JB115oVpeM2LidgBGKGtYOO8hOfLvuI 8AyBRkLkXsI1sfx1fyHdo6fZnK//pL3eoQu/hU4NmPeT/hkkQw9lP8MvaK9FR0E6dc45 RHB1qCU+ZvRspuICJmOocaUt27mm6cI54NclN8k67Z1VwxzKC9FVqPud+IpFdQ2Acp5R gz0tedE5oVTNCcsdIwiUnABCYsSB+PZsbmpw+GexcPPvwbVopgVVnvd//5sys7bKeMbd TnxA== 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=Lw97jjpNW0qnluWLs9FH7pp1lrQFlkFyUFYsFWqMU1o=; fh=REc9EJfAq+TSY9126QSZ7oPdaKwxE8j8XYTCCsyur1Y=; b=iT9MFL3hu86I+ifihWx+7/HKnpc4QUEsv3cbLGkp2DF3xnN32MLQJeIPI5IgrNj3KT om/BHGBkAbTcR6ZQSNrCeGqoW6G45RZJxJrN7/2sd0tpnWfk54nNMI2BL5Wb1wMPhInI 7RFK/ef00mqAnORh4vpgQD69vq8kGyDXlfhTgfFd80MUUXZP0y4v04g1LvyUsVGIvMHr dlYMVq4P2MB3IoJMPovn4/AZDBJR2OhThyRbJHKbB9esoAv+EMhTZbB53+cJIv6Meggz FsWmEQp090g1K8JCWELEOYfBuQ5uChqEhMtOu5IFuiQqBCUXl9TKpyy9volQFkEfy84P C8TQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=v28xvI8E; 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 m11-20020ad45dcb000000b0068c489b1f51si1854290qvh.188.2024.02.15.10.07.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:07:43 -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=v28xvI8E; 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 1rag5P-0001wE-Vk; Thu, 15 Feb 2024 13:03:52 -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 1rag54-00017X-Bn for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:03:30 -0500 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag50-000385-4s for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:03:28 -0500 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a3d6d160529so142999066b.0 for ; Thu, 15 Feb 2024 10:03:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020204; x=1708625004; darn=nongnu.org; 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=Lw97jjpNW0qnluWLs9FH7pp1lrQFlkFyUFYsFWqMU1o=; b=v28xvI8EPp4Cg5DXIfPVVTDliY50wUlIWSRMVitpklKSyP3vShtfYSs4KEZL5VGjQt HoYjvJk2zYibKyw0qh/6MOX3TnbkVd7rBtZZC52aSASvG4MeI11sC4eqKLXmbP1TH3+W b+GB0sC1mtRzg0M6Lt12Zh+ELdIFY59nV2CGLoJe0/+L35qcSMEzt4KYfs/0/TiPXYpG 6qGeMcqKTf7/XapkEcZc44vKGBAsepXd8yARdH0DYSft7+HEgzvHcSSwg5gZDDFbg+Nk kgX7dSM1fqJeOLsNakbC8hjZ6/yKOc7jLp0Mz9nMaEL8irUyhHNq3Zxkk0vjTvVFZbBA Z75w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020204; x=1708625004; 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=Lw97jjpNW0qnluWLs9FH7pp1lrQFlkFyUFYsFWqMU1o=; b=EQPCqEspk4HoUlLOJXq6kLsUbkMbtAH4MsNKKzJ3ewQGpdScX4QOsRzS67xyIq+kDU Vcj5EUmKXwMcH8eElMjmiGw9DJc4iSmcYEIJ0MPO52SOsOcXsqkPxg/F010UTsWtNrj1 l2+2hNLH4m7rWT+2zYBBZGrbHoT1i8/ecfwiPr7mFSwNgTPs6P7n8E3tNyJFw8gDU7WR pZXXJtN19bIdTzgE3kHLPmXMNdnlLWaFM1heQihpCymQ7WlaEBhIB2/UHBkvV0rpgTlJ /N9Dfn+MhAzk0U21Fq/QS53NmFyCoo6hbneA3KYfd1kjf8qo3uxIET+AvSGUy77LJ2Q/ RAQA== X-Gm-Message-State: AOJu0YwM3LTTH7flnRdRF8RZUtwU75zF3E31sifhaC7W5NZbyu3Lv7dr jeA2iPYxyjL2CQykSyTYo5Z2ZF2d1qtNSg8yGjSYNvdLo6flnvjFj+rRNkhFcXJLFCNnS3TMFNV zUPU= X-Received: by 2002:a17:906:494e:b0:a3d:88be:94d7 with SMTP id f14-20020a170906494e00b00a3d88be94d7mr1603043ejt.70.1708020204492; Thu, 15 Feb 2024 10:03:24 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id wb13-20020a170907d50d00b00a3d28aa375bsm771690ejc.151.2024.02.15.10.03.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:03:24 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Michael S . Tsirkin" , Richard Henderson , Paolo Bonzini , Eduardo Habkost , Marcel Apfelbaum , Paul Burton , Aleksandar Rikalo Subject: [PULL 49/56] hw/ide/ahci: Rename AHCI PCI function as 'pdev' Date: Thu, 15 Feb 2024 18:57:43 +0100 Message-ID: <20240215175752.82828-50-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::630; envelope-from=philmd@linaro.org; helo=mail-ej1-x630.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, T_SCC_BODY_TEXT_LINE=-0.01 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 We want to access AHCIPCIState::ahci field. In order to keep the code simple (avoiding &ahci->ahci), rename the current 'ahci' variable as 'pdev' Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin Reviewed-by: Richard Henderson Message-Id: <20240213081201.78951-4-philmd@linaro.org> --- hw/i386/pc_q35.c | 15 ++++++++------- hw/mips/boston.c | 10 +++++----- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 76b3b6032b..a89f900c4c 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -134,7 +134,6 @@ static void pc_q35_init(MachineState *machine) GSIState *gsi_state; ISABus *isa_bus; int i; - PCIDevice *ahci; ram_addr_t lowmem; DriveInfo *hd[MAX_SATA_PORTS]; MachineClass *mc = MACHINE_GET_CLASS(machine); @@ -292,16 +291,18 @@ static void pc_q35_init(MachineState *machine) 0xff0104); if (pcms->sata_enabled) { + PCIDevice *pdev; + /* ahci and SATA device, for q35 1 ahci controller is built-in */ - ahci = pci_create_simple_multifunction(host_bus, + pdev = pci_create_simple_multifunction(host_bus, PCI_DEVFN(ICH9_SATA1_DEV, ICH9_SATA1_FUNC), "ich9-ahci"); - idebus[0] = qdev_get_child_bus(DEVICE(ahci), "ide.0"); - idebus[1] = qdev_get_child_bus(DEVICE(ahci), "ide.1"); - g_assert(MAX_SATA_PORTS == ahci_get_num_ports(ahci)); - ide_drive_get(hd, ahci_get_num_ports(ahci)); - ahci_ide_create_devs(ahci, hd); + idebus[0] = qdev_get_child_bus(DEVICE(pdev), "ide.0"); + idebus[1] = qdev_get_child_bus(DEVICE(pdev), "ide.1"); + g_assert(MAX_SATA_PORTS == ahci_get_num_ports(pdev)); + ide_drive_get(hd, ahci_get_num_ports(pdev)); + ahci_ide_create_devs(pdev, hd); } else { idebus[0] = idebus[1] = NULL; } diff --git a/hw/mips/boston.c b/hw/mips/boston.c index cbcefdd693..0ec0b98066 100644 --- a/hw/mips/boston.c +++ b/hw/mips/boston.c @@ -677,7 +677,7 @@ static void boston_mach_init(MachineState *machine) MemoryRegion *flash, *ddr_low_alias, *lcd, *platreg; MemoryRegion *sys_mem = get_system_memory(); XilinxPCIEHost *pcie2; - PCIDevice *ahci; + PCIDevice *pdev; DriveInfo *hd[6]; Chardev *chr; int fw_size, fit_err; @@ -769,11 +769,11 @@ static void boston_mach_init(MachineState *machine) qemu_chr_fe_set_handlers(&s->lcd_display, NULL, NULL, boston_lcd_event, NULL, s, NULL, true); - ahci = pci_create_simple_multifunction(&PCI_BRIDGE(&pcie2->root)->sec_bus, + pdev = pci_create_simple_multifunction(&PCI_BRIDGE(&pcie2->root)->sec_bus, PCI_DEVFN(0, 0), TYPE_ICH9_AHCI); - g_assert(ARRAY_SIZE(hd) == ahci_get_num_ports(ahci)); - ide_drive_get(hd, ahci_get_num_ports(ahci)); - ahci_ide_create_devs(ahci, hd); + g_assert(ARRAY_SIZE(hd) == ahci_get_num_ports(pdev)); + ide_drive_get(hd, ahci_get_num_ports(pdev)); + ahci_ide_create_devs(pdev, hd); if (machine->firmware) { fw_size = load_image_targphys(machine->firmware,