From nobody Sat May 18 00:47:13 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1562263588; cv=none; d=zoho.com; s=zohoarc; b=QGk1iQxi7zQe/EPcUktQXESWz0tjR1hayUUe+IwaadpfiB3HwX6LHBDa1ghfvycoh0hLlH4+vK0lmlo4FLN069mY0znFpeuYk6HP+ZWv9wZigKUY9roSlK2Q90d5Ekbm7E2kflg0ketouwcvnfj1vzBtN34eNuMT2BhJAxc8isU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562263588; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=y4EZ4vrOgV4kwNwvS8xXDX5Gi2wRhObhxqjmsERTWwQ=; b=Kxh5ZT5bQoohYqICC2neuLku5e25RoZtrwkV5Q2DB8LLRryBn37scjU4g5zvUAnMYAWUUUnG8l6/ZloysPXrwfIBGtlE6fs8LwjQoBJivsdJKoLJ6b4AIaWEjIWTqFqNTtU7KsY0sBW5Ae+86vN7Eu/QUv+cLkvHIxlwvKniulw= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 156226358870398.4755992032168; Thu, 4 Jul 2019 11:06:28 -0700 (PDT) Received: from localhost ([::1]:48086 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hj67O-0002eO-Uk for importer@patchew.org; Thu, 04 Jul 2019 14:06:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58867) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hj65V-00029D-T9 for qemu-devel@nongnu.org; Thu, 04 Jul 2019 14:04:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hj65U-0003SL-Qi for qemu-devel@nongnu.org; Thu, 04 Jul 2019 14:04:05 -0400 Received: from mga03.intel.com ([134.134.136.65]:59779) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hj65U-0003OE-Hv for qemu-devel@nongnu.org; Thu, 04 Jul 2019 14:04:04 -0400 Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Jul 2019 11:03:56 -0700 Received: from unknown (HELO fedora.zpn.intel.com.) ([10.219.4.39]) by orsmga004.jf.intel.com with ESMTP; 04 Jul 2019 11:03:55 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,451,1557212400"; d="scan'208";a="315909630" From: Julio Montes To: pbonzini@redhat.com, qemu-devel@nongnu.org Date: Thu, 4 Jul 2019 18:03:50 +0000 Message-Id: <20190704180350.2086-1-julio.montes@intel.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 134.134.136.65 Subject: [Qemu-devel] [PATCH] hw/i386: Fix linker error when ISAPC is disabled X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Julio Montes Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" How about a new header file with all devices? (see below patch) --- Makefile.target | 5 +++++ hw/i386/pc_piix.c | 11 ++++++++--- include/qemu/osdep.h | 1 + scripts/create_config | 2 ++ 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Makefile.target b/Makefile.target index a6919e0caf..65eda0994d 100644 --- a/Makefile.target +++ b/Makefile.target @@ -45,6 +45,9 @@ include $(SRC_PATH)/tests/tcg/Makefile.include config-target.h: config-target.h-timestamp config-target.h-timestamp: config-target.mak +config-devices.h: config-devices.h-timestamp +config-devices.h-timestamp: config-devices.mak + ifdef CONFIG_TRACE_SYSTEMTAP stap: $(QEMU_PROG).stp-installed $(QEMU_PROG).stp $(QEMU_PROG)-simpletrace= .stp $(QEMU_PROG)-log.stp @@ -170,6 +173,8 @@ generated-files-y +=3D hmp-commands.h hmp-commands-info= .h endif # CONFIG_SOFTMMU +generated-files-y +=3D config-devices.h + dummy :=3D $(call unnest-vars,,obj-y) all-obj-y :=3D $(obj-y) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index c07c4a5b38..b93f9327be 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -61,9 +61,11 @@ #define MAX_IDE_BUS 2 +#ifdef CONFIG_IDE_ISA static const int ide_iobase[MAX_IDE_BUS] =3D { 0x1f0, 0x170 }; static const int ide_iobase2[MAX_IDE_BUS] =3D { 0x3f6, 0x376 }; static const int ide_irq[MAX_IDE_BUS] =3D { 14, 15 }; +#endif /* PC hardware initialisation */ static void pc_init1(MachineState *machine, @@ -254,7 +256,10 @@ static void pc_init1(MachineState *machine, } idebus[0] =3D qdev_get_child_bus(&dev->qdev, "ide.0"); idebus[1] =3D qdev_get_child_bus(&dev->qdev, "ide.1"); - } else { + pc_cmos_init(pcms, idebus[0], idebus[1], rtc_state); + } +#ifdef CONFIG_IDE_ISA +else { for(i =3D 0; i < MAX_IDE_BUS; i++) { ISADevice *dev; char busname[] =3D "ide.0"; @@ -268,9 +273,9 @@ static void pc_init1(MachineState *machine, busname[4] =3D '0' + i; idebus[i] =3D qdev_get_child_bus(DEVICE(dev), busname); } + pc_cmos_init(pcms, idebus[0], idebus[1], rtc_state); } - - pc_cmos_init(pcms, idebus[0], idebus[1], rtc_state); +#endif if (pcmc->pci_enabled && machine_usb(machine)) { pci_create_simple(pci_bus, piix3_devfn + 2, "piix3-usb-uhci"); diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index af2b91f0b8..83b49a1e63 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -30,6 +30,7 @@ #include "config-host.h" #ifdef NEED_CPU_H #include "config-target.h" +#include "config-devices.h" #else #include "exec/poison.h" #endif diff --git a/scripts/create_config b/scripts/create_config index d727e5e36e..00e86c82b0 100755 --- a/scripts/create_config +++ b/scripts/create_config @@ -58,6 +58,8 @@ case $line in name=3D${line%=3D*} echo "#define $name 1" ;; + CONFIG_*=3Dn) # configuration + ;; CONFIG_*=3D*) # configuration name=3D${line%=3D*} value=3D${line#*=3D} -- 2.17.2