From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31C8DC433E0 for ; Mon, 28 Dec 2020 01:43:01 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5673222522 for ; Mon, 28 Dec 2020 01:43:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5673222522 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=nongnu.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:53156 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kthYp-0006D9-0h for qemu-devel@archiver.kernel.org; Sun, 27 Dec 2020 20:42:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36254) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kthXs-0005mT-9n for qemu-devel@nongnu.org; Sun, 27 Dec 2020 20:42:00 -0500 Received: from zero.eik.bme.hu ([2001:738:2001:2001::2001]:24337) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kthXo-0006iq-V4 for qemu-devel@nongnu.org; Sun, 27 Dec 2020 20:41:59 -0500 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 57E5D74646C; Mon, 28 Dec 2020 02:41:50 +0100 (CET) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 0C40E74645F; Mon, 28 Dec 2020 02:41:50 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zero.eik.bme.hu (Postfix) with ESMTP id 06F1A74645B; Mon, 28 Dec 2020 02:41:50 +0100 (CET) Date: Mon, 28 Dec 2020 02:41:49 +0100 (CET) To: Huacai Chen Subject: Re: [PATCH 01/12] vt82c686: Add APM and ACPI dependencies for VT82C686 In-Reply-To: Message-ID: <1c298c6b-eee-7c3d-87c9-eab53bc43dc1@eik.bme.hu> References: <2157782addb379824c71edd301108f7799302694.1609031406.git.balaton@eik.bme.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Received-SPF: pass client-ip=2001:738:2001:2001::2001; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: QEMU Developers , =?ISO-8859-15?Q?Philippe_Mathieu-Daud=E9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reply-to: BALATON Zoltan From: BALATON Zoltan via Hello, On Mon, 28 Dec 2020, Huacai Chen wrote: > Hi, BALATON > > On Sun, Dec 27, 2020 at 9:21 AM BALATON Zoltan wrote: >> >> Compiling vt82c686.c fails without APM and ACPI_PM functions. Add >> dependency on these in Kconfig to fix this. >> >> Signed-off-by: BALATON Zoltan >> --- >> hw/isa/Kconfig | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/hw/isa/Kconfig b/hw/isa/Kconfig >> index c7f07854f7..2ca2593ee6 100644 >> --- a/hw/isa/Kconfig >> +++ b/hw/isa/Kconfig >> @@ -47,6 +47,8 @@ config VT82C686 >> select ACPI_SMBUS >> select SERIAL_ISA >> select FDC >> + select APM >> + select ACPI_X86 > I feel a bit uncomfortable with ACPI_X86 in the MIPS code, can we just > select ACPI? And if that is not enough, can we select more options? This patch is not new, I've tried submitting it before but got rejeceted for similar reason: https://lists.nongnu.org/archive/html/qemu-devel/2019-03/msg03428.html Then Philippe said he had a better alternative but it's still not fixed in master so this patch is needed and you likely already depend on X86 without knowing as something is pulling these in for MIPS. This can be reproduced e,g, by adding this device to PPC as: diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig index d235a096c6..90b53d40c2 100644 --- a/hw/ppc/Kconfig +++ b/hw/ppc/Kconfig @@ -64,6 +64,7 @@ config SAM460EX select SMBUS_EEPROM select USB_EHCI_SYSBUS select USB_OHCI + select VT82C686 config PREP bool then compiling --target-list=ppc-softmmu Even after: diff --git a/hw/isa/Kconfig b/hw/isa/Kconfig index c7f07854f7..75986671b9 100644 --- a/hw/isa/Kconfig +++ b/hw/isa/Kconfig @@ -47,6 +47,8 @@ config VT82C686 select ACPI_SMBUS select SERIAL_ISA select FDC + select APM + select ACPI config SMC37C669 bool I get: [] Linking target qemu-system-ppc FAILED: qemu-system-ppc ld: libcommon.fa.p/hw_isa_vt82c686.c.o: in function `vt82c686b_pm_realize': hw/isa/vt82c686.c:378: undefined reference to `acpi_pm_tmr_init' ld: hw/isa/vt82c686.c:379: undefined reference to `acpi_pm1_evt_init' ld: libcommon.fa.p/hw_isa_vt82c686.c.o: in function `pm_update_sci': hw/isa/vt82c686.c:192: undefined reference to `acpi_pm1_evt_get_sts' ld: libcommon.fa.p/hw_isa_vt82c686.c.o: in function `vt82c686b_pm_realize': hw/isa/vt82c686.c:380: undefined reference to `acpi_pm1_cnt_init' ld: libcommon.fa.p/hw_isa_vt82c686.c.o: in function `pm_update_sci': hw/isa/vt82c686.c:200: undefined reference to `acpi_pm_tmr_update' collect2: error: ld returned 1 exit status So my patch just makes existing dependencies explicit and allows this to build but I'm OK with any other fix you propose that fixes the above case as that's how I'll try to use this in the future. (I did look at this when first found it and concluded that I could not make a better fix than depending on ACPI_X86 here. I forgot the details but it was way more work than I want to take up for this so please propose a better fix if you can't accept this patch.) Maybe Philippe remembers some more. Regards, BALATON Zoltan