qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: chen huacai <zltjiangshi@gmail.com>
To: BALATON Zoltan <balaton@eik.bme.hu>
Cc: "Huacai Chen" <chenhuacai@kernel.org>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: Re: [PATCH 01/12] vt82c686: Add APM and ACPI dependencies for VT82C686
Date: Mon, 28 Dec 2020 10:03:02 +0800	[thread overview]
Message-ID: <CABDp7VpoY=SiTJ2G5DEuyPdfi1j=w7hOt+9L5qD2YXaBe7=Piw@mail.gmail.com> (raw)
In-Reply-To: <1c298c6b-eee-7c3d-87c9-eab53bc43dc1@eik.bme.hu>

OK, just do it as Philippe suggested.

Huacai

On Mon, Dec 28, 2020 at 9:42 AM BALATON Zoltan via
<qemu-devel@nongnu.org> wrote:
>
> Hello,
>
> On Mon, 28 Dec 2020, Huacai Chen wrote:
> > Hi, BALATON
> >
> > On Sun, Dec 27, 2020 at 9:21 AM BALATON Zoltan <balaton@eik.bme.hu> 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 <balaton@eik.bme.hu>
> >> ---
> >>  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
>


-- 
Huacai Chen


  reply	other threads:[~2020-12-28  2:04 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-27  1:10 [PATCH 00/12] Misc vt82c686b clean ups BALATON Zoltan via
2020-12-27  1:10 ` [PATCH 12/12] vt82c686: Do not add floppy BALATON Zoltan via
2020-12-27  1:10 ` [PATCH 07/12] vt82c686: Remove vt82c686b_isa_init() function BALATON Zoltan via
2020-12-27 14:36   ` Philippe Mathieu-Daudé
2020-12-27 16:52     ` BALATON Zoltan via
2020-12-27  1:10 ` [PATCH 02/12] vt82c686: Rename AC97/MC97 parts from VT82C686B to VIA BALATON Zoltan via
2020-12-27 15:04   ` Philippe Mathieu-Daudé
2020-12-27  1:10 ` [PATCH 08/12] vt82c686: Remove vt82c686b_pm_init() function BALATON Zoltan via
2020-12-27 14:39   ` Philippe Mathieu-Daudé
2020-12-27  1:10 ` [PATCH 01/12] vt82c686: Add APM and ACPI dependencies for VT82C686 BALATON Zoltan via
2020-12-28  0:35   ` Huacai Chen
2020-12-28  1:41     ` BALATON Zoltan via
2020-12-28  2:03       ` chen huacai [this message]
2020-12-27  1:10 ` [PATCH 06/12] audio/via-ac97: Simplify code and set user_creatable to false BALATON Zoltan via
2020-12-27 14:56   ` Philippe Mathieu-Daudé
2020-12-27 16:47     ` BALATON Zoltan via
2020-12-27  1:10 ` [PATCH 04/12] vt82c686: Remove vt82c686b_[am]c97_init() functions BALATON Zoltan via
2021-01-01 21:07   ` Philippe Mathieu-Daudé
2020-12-27  1:10 ` [PATCH 03/12] vt82c686: Remove unnecessary _DEVICE suffix from type macros BALATON Zoltan via
2020-12-27 14:29   ` Philippe Mathieu-Daudé
2020-12-27 14:33   ` Philippe Mathieu-Daudé
2020-12-27 16:49     ` BALATON Zoltan via
2020-12-27  1:10 ` [PATCH 11/12] vt82c686: Rename some functions to better show where they belong BALATON Zoltan via
2020-12-27 14:25   ` Philippe Mathieu-Daudé
2020-12-27  1:10 ` [PATCH 10/12] vt82c686: Remove unneeded includes and defines BALATON Zoltan via
2020-12-27 14:51   ` Philippe Mathieu-Daudé
2020-12-27  1:10 ` [PATCH 05/12] vt82c686: Split off via-[am]c97 into separate file in hw/audio BALATON Zoltan via
2020-12-27 15:03   ` Philippe Mathieu-Daudé
2020-12-27  1:10 ` [PATCH 09/12] vt82c686: Convert debug printf to trace points BALATON Zoltan via
2020-12-27 15:08   ` Philippe Mathieu-Daudé
2020-12-27 16:42     ` BALATON Zoltan via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABDp7VpoY=SiTJ2G5DEuyPdfi1j=w7hOt+9L5qD2YXaBe7=Piw@mail.gmail.com' \
    --to=zltjiangshi@gmail.com \
    --cc=balaton@eik.bme.hu \
    --cc=chenhuacai@kernel.org \
    --cc=f4bug@amsat.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).