From nobody Tue Nov 26 11:41:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1708692465; cv=none; d=zohomail.com; s=zohoarc; b=bJYselsmA5ftt5VpiMPfBYaaH+F4R39ug3udlXnzpkKi77cWmhwHi6+pvtaalZu3fTuLSf2GiNNL+tDvNu09SHDch55DTYaAK28+FHJHexN+Jwgn/3HLh9aiW9eogvahMbCsSq4IEnlxQUTryTE3I/LI4Fr5udl43zoAxPpNOww= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708692465; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=wdFeJfFPd+rESlH0Stf2Q7C2WzvaU7Ne4mFpQgmpfoM=; b=Hn1MEttoO7/dkpNg1LBL/+dPgXU1gHoU0XpfPyl0ZtjiBI2uP+XiEaag15dhmc3PSBwZFLdZne34jIYJP9xcbB2n0PgcJrcGKSBeBVDMDLt/wmGcLkq/ul3pUdhXebraY6UitaGYx16RbTh9XUmgNeVIOVH/sJ7M2Kz2VKU/IL4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1708692465495232.73914131168533; Fri, 23 Feb 2024 04:47:45 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdUwl-0005e7-Fn; Fri, 23 Feb 2024 07:46:35 -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 1rdUur-0000ob-SL for qemu-devel@nongnu.org; Fri, 23 Feb 2024 07:44:40 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rdUun-0003ub-ST for qemu-devel@nongnu.org; Fri, 23 Feb 2024 07:44:36 -0500 Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-353-Ae52FGZxO_29WQSjnxE78g-1; Fri, 23 Feb 2024 07:44:32 -0500 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-33d23c8694dso130694f8f.1 for ; Fri, 23 Feb 2024 04:44:31 -0800 (PST) Received: from [192.168.10.118] ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id v9-20020a05600c444900b0041228b2e179sm2262252wmn.39.2024.02.23.04.44.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 04:44:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708692273; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wdFeJfFPd+rESlH0Stf2Q7C2WzvaU7Ne4mFpQgmpfoM=; b=RrmFS3hI7BfhZkgdGJdgihNwbeKE0Ma+hgDkXjO3yx3im/8R7iS9Gs+hjJTLEA0gmc/9TX mp+9Kdh9Fn3/+AibmKvoHME1HhiwWEwKdgpmWj1v5dT4oNSK2wIN7GxMaWFSB2hWWKnm2S q8FNT5eKca4Dru4bNBWdShKn0hnTvms= X-MC-Unique: Ae52FGZxO_29WQSjnxE78g-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708692270; x=1709297070; 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=wdFeJfFPd+rESlH0Stf2Q7C2WzvaU7Ne4mFpQgmpfoM=; b=t3BcvK3zIkO4rssli860QT2lff3A4hpPdKCtWFJaY9r+77DAxHfSSDmzVaRuZIzidA FAJLCb1MdRD2eJVCF2n6KXlLdNdbw6FTbtJ7tIPHTa8vINUA+engp598MGXEAMa4CuE7 /VPb9UTbfhjUuSt+569L6wuXaRfVavGBsKSmbeeAMbNbpJOZTKVaeKBVnkVKr67Yx5pH fSxtGewBoPqNNJP2zubBIip94oxYsACALs876WS3mwtPF0RyaKi1rIb/3jPDnPuHqCcB sNU36F1VWaFi/dRr13mHhetH3ccnQcA36RTVigYuHvUt10ez82j1mfDFH2AtJbXtLCSB RBFg== X-Gm-Message-State: AOJu0Yw0MHvvFODUY/hOWyZLofKRalPfgEv20DKMT2BzLdAwG6DJ2Gpo quS7d/7pVB3NVPRq0fV0DXcIXVXsTO3WhKo87cek4pyvu4vDDN7QjeL3GhnIG7y9cKMpUL5urDd RsxGHtVBe/NbWsT5WHuzoM3MvhA1FG8fzPpxrtxapELKsd7HYdxkhYFgdjdgdj//r8sVYjCBzeu 9lX6kzCdrwcTWPcG9WWYkPY750tDQnKm7a9zAu X-Received: by 2002:a5d:4206:0:b0:33b:636e:c967 with SMTP id n6-20020a5d4206000000b0033b636ec967mr1294125wrq.1.1708692269924; Fri, 23 Feb 2024 04:44:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IFS0LU2NZ6+ixSSAqdRDaqXiQKZUgk7K7RMRwoMbR7rTgMASC/o2VDWNaw0NVSYvNF9nkBHzg== X-Received: by 2002:a5d:4206:0:b0:33b:636e:c967 with SMTP id n6-20020a5d4206000000b0033b636ec967mr1294110wrq.1.1708692269551; Fri, 23 Feb 2024 04:44:29 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: philmd@linaro.org, balaton@eik.bme.hu Subject: [PATCH 07/10] pseries: do not require CONFIG_USB Date: Fri, 23 Feb 2024 13:44:03 +0100 Message-ID: <20240223124406.234509-8-pbonzini@redhat.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240223124406.234509-1-pbonzini@redhat.com> References: <20240223124406.234509-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.066, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1708692465670100001 With --without-default-devices it is possible to build a binary that does not include any USB host controller and therefore that does not include the code guarded by CONFIG_USB. While the simpler creation functions such as usb_create_simple can be inlined, this is not true of usb_bus_find(). Remove it, replacing it with a search of the single USB bus on the machine. Suggested-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/ppc/spapr.c | 7 +++---- hw/ppc/Kconfig | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 0d72d286d80..44d339982da 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -3024,10 +3024,9 @@ static void spapr_machine_init(MachineState *machine) } =20 if (has_vga) { - USBBus *usb_bus =3D usb_bus_find(-1); - - usb_create_simple(usb_bus, "usb-kbd"); - usb_create_simple(usb_bus, "usb-mouse"); + Object *usb_bus =3D object_resolve_type_unambiguous(TYPE_USB_B= US, &error_abort); + usb_create_simple(USB_BUS(usb_bus), "usb-kbd"); + usb_create_simple(USB_BUS(usb_bus), "usb-mouse"); } } =20 diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig index 9841c2c9690..d497fa2b825 100644 --- a/hw/ppc/Kconfig +++ b/hw/ppc/Kconfig @@ -1,5 +1,6 @@ config PSERIES bool + imply USB_OHCI_PCI imply PCI_DEVICES imply TEST_DEVICES imply VIRTIO_VGA --=20 2.43.0