Re: [Qemu-devel] [PATCH 00/19] uninorth fixes/mac_newworld board wiring improvements
On Tue, Mar 06, 2018 at 08:30:44PM +, Mark Cave-Ayland wrote: > [This is for New World Machines: there is a follow-up patch for Old World > Machines] > > This patchset is a combination of uninorth fixes/cleanup with the final aim > of removing the remaining custom init functions and switching IRQ arrays over > to qdev GPIOs. > > The first couple of patches apply some style fixups and remove what appears to > be an obsolete set of uninorth registers according to my testing. > > Following on from this, the next few patches QOMify the PCI/AGP host bridges > and change the existing _init() functions to return the device itself. This > allows the memory regions to be setup during device init, and using a > temporary > qdev pointer property allows moving the remaining initialisation to device > realize. > > Next we fix the mixup between the PCI/AGP host bridges making sure that the > correct > PCI bus instance is instantiated for the corresponding host bridge , and > enabling > the third PCI host bridge. This allows potential handling of any accesses > although > it should be ignored for all OSs that correctly parse the DT since OpenBIOS > currently > only supports (and exposes) a single PCI host bridge. > > Once the legacy _init() functions have been removed and all devices are > instantiated via the qdev API, it is then possible to wire up the PCI IO > space to the relevant PCI bus. > > After this we implement a separate uninorth device (equivalent to uni-n in the > Mac New World DT) as suggested by the TODO comment and wire it up as part of > the > board initialisation. > > Finally once this is done we can remove the temporary pics IRQ array and > instead > wire up the macio_newworld device to the PIC directly using the existing > object > link. > > Signed-off-by: Mark Cave-AylandI've applied the patches up to 16/19 to ppc-for-2.13. > > Mark Cave-Ayland (19): > uninorth: trivial style fixups > uninorth: remove second set of uninorth token registers > uninorth: QOMify PCI and AGP host bridges > uninorth: remove stray PCIBus realize from mac_newworld.c > uninorth: move uninorth definitions into uninorth.h > uninorth: alter pci_pmac_init() and pci_pmac_u3_init() to return > uninorth device > uninorth: move PCI mmio memory region initialisation into init > function > uninorth: introduce temporary pic_irqs device property > uninorth: move PCI host bridge bus initialisation into device realize > uninorth: fix PCI and AGP bus mixup > uninorth: enable internal PCI host bridge > uninorth: remove obsolete pci_pmac_init() function > uninorth: remove obsolete pci_pmac_u3_init() function > uninorth: use object link to pass OpenPIC object to uninorth > uninorth: move PCI IO (ISA) memory region into the uninorth device > uninorth: rename UNINState to UNINHostState > uninorth: create new uninorth device > mac_newworld: remove pics IRQ array and wire up macio to OpenPIC > directly > mac_newworld: move wiring of macio IRQs to macio_newworld_realize() > > hw/misc/macio/macio.c | 37 ++-- > hw/pci-host/trace-events | 2 + > hw/pci-host/uninorth.c | 415 > - > hw/ppc/mac.h | 20 +- > hw/ppc/mac_newworld.c | 124 ++-- > hw/ppc/trace-events| 4 - > include/hw/misc/macio/macio.h | 1 - > include/hw/pci-host/uninorth.h | 65 +++ > 8 files changed, 404 insertions(+), 264 deletions(-) > create mode 100644 include/hw/pci-host/uninorth.h > -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson signature.asc Description: PGP signature
Re: [Qemu-devel] [PATCH 00/19] uninorth fixes/mac_newworld board wiring improvements
On Tue, Mar 06, 2018 at 08:30:44PM +, Mark Cave-Ayland wrote: > [This is for New World Machines: there is a follow-up patch for Old World > Machines] > > This patchset is a combination of uninorth fixes/cleanup with the final aim > of removing the remaining custom init functions and switching IRQ arrays over > to qdev GPIOs. > > The first couple of patches apply some style fixups and remove what appears to > be an obsolete set of uninorth registers according to my testing. > > Following on from this, the next few patches QOMify the PCI/AGP host bridges > and change the existing _init() functions to return the device itself. This > allows the memory regions to be setup during device init, and using a > temporary > qdev pointer property allows moving the remaining initialisation to device > realize. > > Next we fix the mixup between the PCI/AGP host bridges making sure that the > correct > PCI bus instance is instantiated for the corresponding host bridge , and > enabling > the third PCI host bridge. This allows potential handling of any accesses > although > it should be ignored for all OSs that correctly parse the DT since OpenBIOS > currently > only supports (and exposes) a single PCI host bridge. > > Once the legacy _init() functions have been removed and all devices are > instantiated via the qdev API, it is then possible to wire up the PCI IO > space to the relevant PCI bus. > > After this we implement a separate uninorth device (equivalent to uni-n in the > Mac New World DT) as suggested by the TODO comment and wire it up as part of > the > board initialisation. > > Finally once this is done we can remove the temporary pics IRQ array and > instead > wire up the macio_newworld device to the PIC directly using the existing > object > link. > > Signed-off-by: Mark Cave-AylandI'm afraid I haven't been able to have enough of a look at these in time for the 2.12 soft freeze, so they'll have to wait until 2.13. I have started a ppc-for-2.13 tree though. > > Mark Cave-Ayland (19): > uninorth: trivial style fixups > uninorth: remove second set of uninorth token registers > uninorth: QOMify PCI and AGP host bridges > uninorth: remove stray PCIBus realize from mac_newworld.c > uninorth: move uninorth definitions into uninorth.h > uninorth: alter pci_pmac_init() and pci_pmac_u3_init() to return > uninorth device > uninorth: move PCI mmio memory region initialisation into init > function > uninorth: introduce temporary pic_irqs device property > uninorth: move PCI host bridge bus initialisation into device realize > uninorth: fix PCI and AGP bus mixup > uninorth: enable internal PCI host bridge > uninorth: remove obsolete pci_pmac_init() function > uninorth: remove obsolete pci_pmac_u3_init() function > uninorth: use object link to pass OpenPIC object to uninorth > uninorth: move PCI IO (ISA) memory region into the uninorth device > uninorth: rename UNINState to UNINHostState > uninorth: create new uninorth device > mac_newworld: remove pics IRQ array and wire up macio to OpenPIC > directly > mac_newworld: move wiring of macio IRQs to macio_newworld_realize() > > hw/misc/macio/macio.c | 37 ++-- > hw/pci-host/trace-events | 2 + > hw/pci-host/uninorth.c | 415 > - > hw/ppc/mac.h | 20 +- > hw/ppc/mac_newworld.c | 124 ++-- > hw/ppc/trace-events| 4 - > include/hw/misc/macio/macio.h | 1 - > include/hw/pci-host/uninorth.h | 65 +++ > 8 files changed, 404 insertions(+), 264 deletions(-) > create mode 100644 include/hw/pci-host/uninorth.h > -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson signature.asc Description: PGP signature
Re: [Qemu-devel] [PATCH 00/19] uninorth fixes/mac_newworld board wiring improvements
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20180306203103.25563-1-mark.cave-ayl...@ilande.co.uk Subject: [Qemu-devel] [PATCH 00/19] uninorth fixes/mac_newworld board wiring improvements === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$(git log --oneline $BASE.. | wc -l) failed=0 git config --local diff.renamelimit 0 git config --local diff.renames True git config --local diff.algorithm histogram commits="$(git log --format=%H --reverse $BASE..)" for c in $commits; do echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..." if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then failed=1 echo fi n=$((n+1)) done exit $failed === TEST SCRIPT END === Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 From https://github.com/patchew-project/qemu * [new tag] patchew/20180306203103.25563-1-mark.cave-ayl...@ilande.co.uk -> patchew/20180306203103.25563-1-mark.cave-ayl...@ilande.co.uk Switched to a new branch 'test' e7f510fb1c mac_newworld: move wiring of macio IRQs to macio_newworld_realize() e1cb6af9a4 mac_newworld: remove pics IRQ array and wire up macio to OpenPIC directly cf16eb0223 uninorth: create new uninorth device 9a29524fc9 uninorth: rename UNINState to UNINHostState bd3653709a uninorth: move PCI IO (ISA) memory region into the uninorth device f1020004d7 uninorth: use object link to pass OpenPIC object to uninorth 000b78ebf1 uninorth: remove obsolete pci_pmac_u3_init() function 019ce970d1 uninorth: remove obsolete pci_pmac_init() function d74cd9a986 uninorth: enable internal PCI host bridge eb2d8bcf25 uninorth: fix PCI and AGP bus mixup a444eabfcb uninorth: move PCI host bridge bus initialisation into device realize 6401c9c37f uninorth: introduce temporary pic_irqs device property 0f5fb4ec70 uninorth: move PCI mmio memory region initialisation into init function 2f7a628836 uninorth: alter pci_pmac_init() and pci_pmac_u3_init() to return uninorth device 780535bf21 uninorth: move uninorth definitions into uninorth.h d8816bc167 uninorth: remove stray PCIBus realize from mac_newworld.c f82a1a6d5c uninorth: QOMify PCI and AGP host bridges a0c06c803b uninorth: remove second set of uninorth token registers 4baa7ecf3b uninorth: trivial style fixups === OUTPUT BEGIN === Checking PATCH 1/19: uninorth: trivial style fixups... Checking PATCH 2/19: uninorth: remove second set of uninorth token registers... Checking PATCH 3/19: uninorth: QOMify PCI and AGP host bridges... Checking PATCH 4/19: uninorth: remove stray PCIBus realize from mac_newworld.c... Checking PATCH 5/19: uninorth: move uninorth definitions into uninorth.h... Checking PATCH 6/19: uninorth: alter pci_pmac_init() and pci_pmac_u3_init() to return uninorth device... Checking PATCH 7/19: uninorth: move PCI mmio memory region initialisation into init function... Checking PATCH 8/19: uninorth: introduce temporary pic_irqs device property... Checking PATCH 9/19: uninorth: move PCI host bridge bus initialisation into device realize... ERROR: if this code is redundant consider removing it #41: FILE: hw/pci-host/uninorth.c:127: +#if 0 total: 1 errors, 0 warnings, 221 lines checked Your patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. Checking PATCH 10/19: uninorth: fix PCI and AGP bus mixup... Checking PATCH 11/19: uninorth: enable internal PCI host bridge... Checking PATCH 12/19: uninorth: remove obsolete pci_pmac_init() function... Checking PATCH 13/19: uninorth: remove obsolete pci_pmac_u3_init() function... Checking PATCH 14/19: uninorth: use object link to pass OpenPIC object to uninorth... Checking PATCH 15/19: uninorth: move PCI IO (ISA) memory region into the uninorth device... Checking PATCH 16/19: uninorth: rename UNINState to UNINHostState... Checking PATCH 17/19: uninorth: create new uninorth device... Checking PATCH 18/19: mac_newworld: remove pics IRQ array and wire up macio to OpenPIC directly... Checking PATCH 19/19: mac_newworld: move wiring of macio IRQs to macio_newworld_realize()... === OUTPUT END === Test command exited with code: 1 --- Email generated automatically by Patchew [http://patchew.org/]. Please send your feedback to patchew-de...@freelists.org
Re: [Qemu-devel] [PATCH 00/19] uninorth fixes/mac_newworld board wiring improvements
On 06/03/18 20:59, no-re...@patchew.org wrote: Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20180306203103.25563-1-mark.cave-ayl...@ilande.co.uk Subject: [Qemu-devel] [PATCH 00/19] uninorth fixes/mac_newworld board wiring improvements === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$(git log --oneline $BASE.. | wc -l) failed=0 git config --local diff.renamelimit 0 git config --local diff.renames True git config --local diff.algorithm histogram commits="$(git log --format=%H --reverse $BASE..)" for c in $commits; do echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..." if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then failed=1 echo fi n=$((n+1)) done exit $failed === TEST SCRIPT END === Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 From https://github.com/patchew-project/qemu * [new tag] patchew/20180306203103.25563-1-mark.cave-ayl...@ilande.co.uk -> patchew/20180306203103.25563-1-mark.cave-ayl...@ilande.co.uk Switched to a new branch 'test' e7f510fb1c mac_newworld: move wiring of macio IRQs to macio_newworld_realize() e1cb6af9a4 mac_newworld: remove pics IRQ array and wire up macio to OpenPIC directly cf16eb0223 uninorth: create new uninorth device 9a29524fc9 uninorth: rename UNINState to UNINHostState bd3653709a uninorth: move PCI IO (ISA) memory region into the uninorth device f1020004d7 uninorth: use object link to pass OpenPIC object to uninorth 000b78ebf1 uninorth: remove obsolete pci_pmac_u3_init() function 019ce970d1 uninorth: remove obsolete pci_pmac_init() function d74cd9a986 uninorth: enable internal PCI host bridge eb2d8bcf25 uninorth: fix PCI and AGP bus mixup a444eabfcb uninorth: move PCI host bridge bus initialisation into device realize 6401c9c37f uninorth: introduce temporary pic_irqs device property 0f5fb4ec70 uninorth: move PCI mmio memory region initialisation into init function 2f7a628836 uninorth: alter pci_pmac_init() and pci_pmac_u3_init() to return uninorth device 780535bf21 uninorth: move uninorth definitions into uninorth.h d8816bc167 uninorth: remove stray PCIBus realize from mac_newworld.c f82a1a6d5c uninorth: QOMify PCI and AGP host bridges a0c06c803b uninorth: remove second set of uninorth token registers 4baa7ecf3b uninorth: trivial style fixups === OUTPUT BEGIN === Checking PATCH 1/19: uninorth: trivial style fixups... Checking PATCH 2/19: uninorth: remove second set of uninorth token registers... Checking PATCH 3/19: uninorth: QOMify PCI and AGP host bridges... Checking PATCH 4/19: uninorth: remove stray PCIBus realize from mac_newworld.c... Checking PATCH 5/19: uninorth: move uninorth definitions into uninorth.h... Checking PATCH 6/19: uninorth: alter pci_pmac_init() and pci_pmac_u3_init() to return uninorth device... Checking PATCH 7/19: uninorth: move PCI mmio memory region initialisation into init function... Checking PATCH 8/19: uninorth: introduce temporary pic_irqs device property... Checking PATCH 9/19: uninorth: move PCI host bridge bus initialisation into device realize... ERROR: if this code is redundant consider removing it #41: FILE: hw/pci-host/uninorth.c:127: +#if 0 total: 1 errors, 0 warnings, 221 lines checked This is a false alarm since this #if 0 ... #endif block is removed in patch 11. Your patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. Checking PATCH 10/19: uninorth: fix PCI and AGP bus mixup... Checking PATCH 11/19: uninorth: enable internal PCI host bridge... Checking PATCH 12/19: uninorth: remove obsolete pci_pmac_init() function... Checking PATCH 13/19: uninorth: remove obsolete pci_pmac_u3_init() function... Checking PATCH 14/19: uninorth: use object link to pass OpenPIC object to uninorth... Checking PATCH 15/19: uninorth: move PCI IO (ISA) memory region into the uninorth device... Checking PATCH 16/19: uninorth: rename UNINState to UNINHostState... Checking PATCH 17/19: uninorth: create new uninorth device... Checking PATCH 18/19: mac_newworld: remove pics IRQ array and wire up macio to OpenPIC directly... Checking PATCH 19/19: mac_newworld: move wiring of macio IRQs to macio_newworld_realize()... === OUTPUT END === Test command exited with code: 1 --- Email generated automatically by Patchew [http://patchew.org/]. Please send your feedback to patchew-de...@freelists.org ATB, Mark.
[Qemu-devel] [PATCH 00/19] uninorth fixes/mac_newworld board wiring improvements
[This is for New World Machines: there is a follow-up patch for Old World Machines] This patchset is a combination of uninorth fixes/cleanup with the final aim of removing the remaining custom init functions and switching IRQ arrays over to qdev GPIOs. The first couple of patches apply some style fixups and remove what appears to be an obsolete set of uninorth registers according to my testing. Following on from this, the next few patches QOMify the PCI/AGP host bridges and change the existing _init() functions to return the device itself. This allows the memory regions to be setup during device init, and using a temporary qdev pointer property allows moving the remaining initialisation to device realize. Next we fix the mixup between the PCI/AGP host bridges making sure that the correct PCI bus instance is instantiated for the corresponding host bridge , and enabling the third PCI host bridge. This allows potential handling of any accesses although it should be ignored for all OSs that correctly parse the DT since OpenBIOS currently only supports (and exposes) a single PCI host bridge. Once the legacy _init() functions have been removed and all devices are instantiated via the qdev API, it is then possible to wire up the PCI IO space to the relevant PCI bus. After this we implement a separate uninorth device (equivalent to uni-n in the Mac New World DT) as suggested by the TODO comment and wire it up as part of the board initialisation. Finally once this is done we can remove the temporary pics IRQ array and instead wire up the macio_newworld device to the PIC directly using the existing object link. Signed-off-by: Mark Cave-AylandMark Cave-Ayland (19): uninorth: trivial style fixups uninorth: remove second set of uninorth token registers uninorth: QOMify PCI and AGP host bridges uninorth: remove stray PCIBus realize from mac_newworld.c uninorth: move uninorth definitions into uninorth.h uninorth: alter pci_pmac_init() and pci_pmac_u3_init() to return uninorth device uninorth: move PCI mmio memory region initialisation into init function uninorth: introduce temporary pic_irqs device property uninorth: move PCI host bridge bus initialisation into device realize uninorth: fix PCI and AGP bus mixup uninorth: enable internal PCI host bridge uninorth: remove obsolete pci_pmac_init() function uninorth: remove obsolete pci_pmac_u3_init() function uninorth: use object link to pass OpenPIC object to uninorth uninorth: move PCI IO (ISA) memory region into the uninorth device uninorth: rename UNINState to UNINHostState uninorth: create new uninorth device mac_newworld: remove pics IRQ array and wire up macio to OpenPIC directly mac_newworld: move wiring of macio IRQs to macio_newworld_realize() hw/misc/macio/macio.c | 37 ++-- hw/pci-host/trace-events | 2 + hw/pci-host/uninorth.c | 415 - hw/ppc/mac.h | 20 +- hw/ppc/mac_newworld.c | 124 ++-- hw/ppc/trace-events| 4 - include/hw/misc/macio/macio.h | 1 - include/hw/pci-host/uninorth.h | 65 +++ 8 files changed, 404 insertions(+), 264 deletions(-) create mode 100644 include/hw/pci-host/uninorth.h -- 2.11.0