On 2019-01-25 11:06, Paolo Bonzini wrote:
> This is not needed on ARM, and brings in ISA bus code which is otherwise not
> necessary.
> 
> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
> ---
>  hw/ide/Makefile.objs |  6 ++---
>  hw/ide/core.c        | 25 --------------------
>  hw/ide/ioport.c      | 67 
> ++++++++++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 70 insertions(+), 28 deletions(-)
>  create mode 100644 hw/ide/ioport.c
> 
> diff --git a/hw/ide/Makefile.objs b/hw/ide/Makefile.objs
> index fc328ff..3f3edd10 100644
> --- a/hw/ide/Makefile.objs
> +++ b/hw/ide/Makefile.objs
> @@ -1,12 +1,12 @@
>  common-obj-$(CONFIG_IDE_CORE) += core.o atapi.o
>  common-obj-$(CONFIG_IDE_QDEV) += qdev.o
> -common-obj-$(CONFIG_IDE_PCI) += pci.o
> -common-obj-$(CONFIG_IDE_ISA) += isa.o
> +common-obj-$(CONFIG_IDE_PCI) += pci.o ioport.o
> +common-obj-$(CONFIG_IDE_ISA) += isa.o ioport.o
>  common-obj-$(CONFIG_IDE_PIIX) += piix.o
>  common-obj-$(CONFIG_IDE_CMD646) += cmd646.o
>  common-obj-$(CONFIG_IDE_MACIO) += macio.o
>  common-obj-$(CONFIG_IDE_MMIO) += mmio.o
> -common-obj-$(CONFIG_IDE_VIA) += via.o
> +common-obj-$(CONFIG_IDE_VIA) += via.o ioport.o
>  common-obj-$(CONFIG_MICRODRIVE) += microdrive.o
>  common-obj-$(CONFIG_AHCI) += ahci.o
>  common-obj-$(CONFIG_AHCI) += ich.o

This caused some trouble in the "ppc: Express dependencies of the
Sam460EX machines with kconfig" patch - I had to select ISA_BUS there to
avoid linker problems, even though the machine does not use ISA.

I think adding ioport.o to IDE_PCI and IDE_VIA is wrong. The
ide_init_ioport() function is only used by isa.c and piix.c, so it
should only be added for IDE_ISA and IDE_PIIX here.

 Thomas

Reply via email to