[Qemu-devel] [PATCH 00/11] sun4u: APB tidy-up/rename and tracepoint conversions

Mark Cave-Ayland posted 11 patches 6 years, 3 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180114104751.21965-1-mark.cave-ayland@ilande.co.uk
Test checkpatch failed
Test docker passed
Test ppc passed
Test s390x passed
Makefile.objs                          |   1 +
default-configs/sparc64-softmmu.mak    |   3 +-
hw/pci-bridge/Makefile.objs            |   2 +
hw/pci-bridge/simba.c                  | 101 ++++++++++++
hw/pci-host/Makefile.objs              |   2 +-
hw/pci-host/{apb.c => sabre.c}         | 270 ++++++++++++---------------------
hw/pci-host/trace-events               |  11 ++
hw/sparc64/sparc64.c                   |  85 +++++------
hw/sparc64/sun4u.c                     |  45 +++---
hw/sparc64/trace-events                |  18 +++
include/hw/pci-bridge/simba.h          |  38 +++++
include/hw/pci-host/{apb.h => sabre.h} |  26 ++--
12 files changed, 342 insertions(+), 260 deletions(-)
create mode 100644 hw/pci-bridge/simba.c
rename hw/pci-host/{apb.c => sabre.c} (62%)
create mode 100644 hw/pci-host/trace-events
create mode 100644 include/hw/pci-bridge/simba.h
rename include/hw/pci-host/{apb.h => sabre.h} (69%)
[Qemu-devel] [PATCH 00/11] sun4u: APB tidy-up/rename and tracepoint conversions
Posted by Mark Cave-Ayland 6 years, 3 months ago
This patchset is the next round of sun4u tidy-ups mostly centered around the
APB (PCI host bridge). In its current form apb.c contains both the PCI host
bridge and the secondary PCI bridge, so we split the PCI bridge into a new
file and move it under hw/pci-bridge.

To order to avoid further confusion between PBM/APB naming I've gone for using
the Sun internal code names, sabre and simba for the two PCI bridges to keep
things consistent.

Finally there are a couple of conversions to trace-events for sabre and the
sparc CPU as used when debugging this patchset. Note that as hw/pci-host is
listed as having no maintainers, I've CCd the PCI bridge maintainers on the
hw/pci-host tracepoint conversion which I hope is reasonable.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>

Mark Cave-Ayland (11):
  apb: split simba PCI bridge into hw/pci-bridge/simba.c
  simba: rename PBMPCIBridge and QOM types to reflect simba naming
  apb: rename APB functions to use sabre prefix
  apb: change pbm_pci_host prefix functions to use sabre_pci prefix
  apb: QOMify sabre PCI host bridge
  apb: rename QOM type from TYPE_APB to TYPE_SABRE
  sun4u: rename apb variables and constants
  apb: rename apb.c to sabre.c
  pci: add trace-events support for hw/pci-host
  sabre: convert from SABRE_DPRINTF macro to trace-events
  sparc64: convert hw/sparc64/sparc64.c from DPRINTF macros to trace
    events

 Makefile.objs                          |   1 +
 default-configs/sparc64-softmmu.mak    |   3 +-
 hw/pci-bridge/Makefile.objs            |   2 +
 hw/pci-bridge/simba.c                  | 101 ++++++++++++
 hw/pci-host/Makefile.objs              |   2 +-
 hw/pci-host/{apb.c => sabre.c}         | 270 ++++++++++++---------------------
 hw/pci-host/trace-events               |  11 ++
 hw/sparc64/sparc64.c                   |  85 +++++------
 hw/sparc64/sun4u.c                     |  45 +++---
 hw/sparc64/trace-events                |  18 +++
 include/hw/pci-bridge/simba.h          |  38 +++++
 include/hw/pci-host/{apb.h => sabre.h} |  26 ++--
 12 files changed, 342 insertions(+), 260 deletions(-)
 create mode 100644 hw/pci-bridge/simba.c
 rename hw/pci-host/{apb.c => sabre.c} (62%)
 create mode 100644 hw/pci-host/trace-events
 create mode 100644 include/hw/pci-bridge/simba.h
 rename include/hw/pci-host/{apb.h => sabre.h} (69%)

-- 
2.11.0


Re: [Qemu-devel] [PATCH 00/11] sun4u: APB tidy-up/rename and tracepoint conversions
Posted by no-reply@patchew.org 6 years, 3 months ago
Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20180114104751.21965-1-mark.cave-ayland@ilande.co.uk
Subject: [Qemu-devel] [PATCH 00/11] sun4u: APB tidy-up/rename and tracepoint conversions

=== 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

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
Switched to a new branch 'test'
68e33f523f sparc64: convert hw/sparc64/sparc64.c from DPRINTF macros to trace events
3ac895348d sabre: convert from SABRE_DPRINTF macro to trace-events
5b44f0019e pci: add trace-events support for hw/pci-host
a625765105 apb: rename apb.c to sabre.c
8ef3083a55 sun4u: rename apb variables and constants
349fc89fe8 apb: rename QOM type from TYPE_APB to TYPE_SABRE
74cbac48cd apb: QOMify sabre PCI host bridge
787f76fc03 apb: change pbm_pci_host prefix functions to use sabre_pci prefix
65b67f4892 apb: rename APB functions to use sabre prefix
3bdf1030e7 simba: rename PBMPCIBridge and QOM types to reflect simba naming
b645abcfb6 apb: split simba PCI bridge into hw/pci-bridge/simba.c

=== OUTPUT BEGIN ===
Checking PATCH 1/11: apb: split simba PCI bridge into hw/pci-bridge/simba.c...
Checking PATCH 2/11: simba: rename PBMPCIBridge and QOM types to reflect simba naming...
Checking PATCH 3/11: apb: rename APB functions to use sabre prefix...
Checking PATCH 4/11: apb: change pbm_pci_host prefix functions to use sabre_pci prefix...
Checking PATCH 5/11: apb: QOMify sabre PCI host bridge...
Checking PATCH 6/11: apb: rename QOM type from TYPE_APB to TYPE_SABRE...
Checking PATCH 7/11: sun4u: rename apb variables and constants...
Checking PATCH 8/11: apb: rename apb.c to sabre.c...
ERROR: do not use C99 // comments
#86: FILE: hw/pci-host/sabre.c:41:
+//#define DEBUG_SABRE

total: 1 errors, 0 warnings, 188 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 9/11: pci: add trace-events support for hw/pci-host...
Checking PATCH 10/11: sabre: convert from SABRE_DPRINTF macro to trace-events...
Checking PATCH 11/11: sparc64: convert hw/sparc64/sparc64.c from DPRINTF macros to trace events...
=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org
Re: [Qemu-devel] [PATCH 00/11] sun4u: APB tidy-up/rename and tracepoint conversions
Posted by Mark Cave-Ayland 6 years, 3 months ago
On 14/01/18 11:15, no-reply@patchew.org wrote:
> Hi,
> 
> This series seems to have some coding style problems. See output below for
> more information:
> 
> Type: series
> Message-id: 20180114104751.21965-1-mark.cave-ayland@ilande.co.uk
> Subject: [Qemu-devel] [PATCH 00/11] sun4u: APB tidy-up/rename and tracepoint conversions

(lots cut)

> === OUTPUT BEGIN ===
> Checking PATCH 1/11: apb: split simba PCI bridge into hw/pci-bridge/simba.c...
> Checking PATCH 2/11: simba: rename PBMPCIBridge and QOM types to reflect simba naming...
> Checking PATCH 3/11: apb: rename APB functions to use sabre prefix...
> Checking PATCH 4/11: apb: change pbm_pci_host prefix functions to use sabre_pci prefix...
> Checking PATCH 5/11: apb: QOMify sabre PCI host bridge...
> Checking PATCH 6/11: apb: rename QOM type from TYPE_APB to TYPE_SABRE...
> Checking PATCH 7/11: sun4u: rename apb variables and constants...
> Checking PATCH 8/11: apb: rename apb.c to sabre.c...
> ERROR: do not use C99 // comments
> #86: FILE: hw/pci-host/sabre.c:41:
> +//#define DEBUG_SABRE
> 
> total: 1 errors, 0 warnings, 188 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 9/11: pci: add trace-events support for hw/pci-host...
> Checking PATCH 10/11: sabre: convert from SABRE_DPRINTF macro to trace-events...
> Checking PATCH 11/11: sparc64: convert hw/sparc64/sparc64.c from DPRINTF macros to trace events...
> === OUTPUT END ===
> 
> Test command exited with code: 1

This is fine - it's just a side-effect of renaming DEBUG_APB to 
DEBUG_SABRE as part of the APB to sabre rename, and in fact this code is 
completely removed in patch 10 with the conversion to tracepoints.


ATB,

Mark.

Re: [Qemu-devel] [PATCH 00/11] sun4u: APB tidy-up/rename and tracepoint conversions
Posted by Philippe Mathieu-Daudé 6 years, 3 months ago
On 01/14/2018 08:21 AM, Mark Cave-Ayland wrote:
> On 14/01/18 11:15, no-reply@patchew.org wrote:
>> Hi,
>>
>> This series seems to have some coding style problems. See output below
>> for
>> more information:
>>
>> Type: series
>> Message-id: 20180114104751.21965-1-mark.cave-ayland@ilande.co.uk
>> Subject: [Qemu-devel] [PATCH 00/11] sun4u: APB tidy-up/rename and
>> tracepoint conversions
> 
> (lots cut)
> 
>> === OUTPUT BEGIN ===
>> Checking PATCH 1/11: apb: split simba PCI bridge into
>> hw/pci-bridge/simba.c...
>> Checking PATCH 2/11: simba: rename PBMPCIBridge and QOM types to
>> reflect simba naming...
>> Checking PATCH 3/11: apb: rename APB functions to use sabre prefix...
>> Checking PATCH 4/11: apb: change pbm_pci_host prefix functions to use
>> sabre_pci prefix...
>> Checking PATCH 5/11: apb: QOMify sabre PCI host bridge...
>> Checking PATCH 6/11: apb: rename QOM type from TYPE_APB to TYPE_SABRE...
>> Checking PATCH 7/11: sun4u: rename apb variables and constants...
>> Checking PATCH 8/11: apb: rename apb.c to sabre.c...
>> ERROR: do not use C99 // comments
>> #86: FILE: hw/pci-host/sabre.c:41:
>> +//#define DEBUG_SABRE
>>
>> total: 1 errors, 0 warnings, 188 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 9/11: pci: add trace-events support for hw/pci-host...
>> Checking PATCH 10/11: sabre: convert from SABRE_DPRINTF macro to
>> trace-events...
>> Checking PATCH 11/11: sparc64: convert hw/sparc64/sparc64.c from
>> DPRINTF macros to trace events...
>> === OUTPUT END ===
>>
>> Test command exited with code: 1
> 
> This is fine - it's just a side-effect of renaming DEBUG_APB to
> DEBUG_SABRE as part of the APB to sabre rename, and in fact this code is
> completely removed in patch 10 with the conversion to tracepoints.

This can be avoided moving patch #8 after #10, although not worthy IMHO.

Re: [Qemu-devel] [PATCH 00/11] sun4u: APB tidy-up/rename and tracepoint conversions
Posted by Mark Cave-Ayland 6 years, 3 months ago
On 14/01/18 13:25, Philippe Mathieu-Daudé wrote:

> On 01/14/2018 08:21 AM, Mark Cave-Ayland wrote:
>> On 14/01/18 11:15, no-reply@patchew.org wrote:
>>> Hi,
>>>
>>> This series seems to have some coding style problems. See output below
>>> for
>>> more information:
>>>
>>> Type: series
>>> Message-id: 20180114104751.21965-1-mark.cave-ayland@ilande.co.uk
>>> Subject: [Qemu-devel] [PATCH 00/11] sun4u: APB tidy-up/rename and
>>> tracepoint conversions
>>
>> (lots cut)
>>
>>> === OUTPUT BEGIN ===
>>> Checking PATCH 1/11: apb: split simba PCI bridge into
>>> hw/pci-bridge/simba.c...
>>> Checking PATCH 2/11: simba: rename PBMPCIBridge and QOM types to
>>> reflect simba naming...
>>> Checking PATCH 3/11: apb: rename APB functions to use sabre prefix...
>>> Checking PATCH 4/11: apb: change pbm_pci_host prefix functions to use
>>> sabre_pci prefix...
>>> Checking PATCH 5/11: apb: QOMify sabre PCI host bridge...
>>> Checking PATCH 6/11: apb: rename QOM type from TYPE_APB to TYPE_SABRE...
>>> Checking PATCH 7/11: sun4u: rename apb variables and constants...
>>> Checking PATCH 8/11: apb: rename apb.c to sabre.c...
>>> ERROR: do not use C99 // comments
>>> #86: FILE: hw/pci-host/sabre.c:41:
>>> +//#define DEBUG_SABRE
>>>
>>> total: 1 errors, 0 warnings, 188 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 9/11: pci: add trace-events support for hw/pci-host...
>>> Checking PATCH 10/11: sabre: convert from SABRE_DPRINTF macro to
>>> trace-events...
>>> Checking PATCH 11/11: sparc64: convert hw/sparc64/sparc64.c from
>>> DPRINTF macros to trace events...
>>> === OUTPUT END ===
>>>
>>> Test command exited with code: 1
>>
>> This is fine - it's just a side-effect of renaming DEBUG_APB to
>> DEBUG_SABRE as part of the APB to sabre rename, and in fact this code is
>> completely removed in patch 10 with the conversion to tracepoints.
> 
> This can be avoided moving patch #8 after #10, although not worthy IMHO.

Thanks once again for the review. It was quite a tricky patchset to 
order in the end because of the rename, and there wasn't really one 
ordering which I found completely satisfactory.

Given that you're generally happy with the patches, I'm inclined to keep 
the patchset in its current form, pending any further comments from Artyom.


ATB,

Mark.

Re: [Qemu-devel] [PATCH 00/11] sun4u: APB tidy-up/rename and tracepoint conversions
Posted by Artyom Tarasenko 6 years, 3 months ago
On Mon, Jan 15, 2018 at 7:38 PM, Mark Cave-Ayland
<mark.cave-ayland@ilande.co.uk> wrote:
> On 14/01/18 13:25, Philippe Mathieu-Daudé wrote:
>
>> On 01/14/2018 08:21 AM, Mark Cave-Ayland wrote:
>>>
>>> On 14/01/18 11:15, no-reply@patchew.org wrote:
>>>>
>>>> Hi,
>>>>
>>>> This series seems to have some coding style problems. See output below
>>>> for
>>>> more information:
>>>>
>>>> Type: series
>>>> Message-id: 20180114104751.21965-1-mark.cave-ayland@ilande.co.uk
>>>> Subject: [Qemu-devel] [PATCH 00/11] sun4u: APB tidy-up/rename and
>>>> tracepoint conversions
>>>
>>>
>>> (lots cut)
>>>
>>>> === OUTPUT BEGIN ===
>>>> Checking PATCH 1/11: apb: split simba PCI bridge into
>>>> hw/pci-bridge/simba.c...
>>>> Checking PATCH 2/11: simba: rename PBMPCIBridge and QOM types to
>>>> reflect simba naming...
>>>> Checking PATCH 3/11: apb: rename APB functions to use sabre prefix...
>>>> Checking PATCH 4/11: apb: change pbm_pci_host prefix functions to use
>>>> sabre_pci prefix...
>>>> Checking PATCH 5/11: apb: QOMify sabre PCI host bridge...
>>>> Checking PATCH 6/11: apb: rename QOM type from TYPE_APB to TYPE_SABRE...
>>>> Checking PATCH 7/11: sun4u: rename apb variables and constants...
>>>> Checking PATCH 8/11: apb: rename apb.c to sabre.c...
>>>> ERROR: do not use C99 // comments
>>>> #86: FILE: hw/pci-host/sabre.c:41:
>>>> +//#define DEBUG_SABRE
>>>>
>>>> total: 1 errors, 0 warnings, 188 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 9/11: pci: add trace-events support for hw/pci-host...
>>>> Checking PATCH 10/11: sabre: convert from SABRE_DPRINTF macro to
>>>> trace-events...
>>>> Checking PATCH 11/11: sparc64: convert hw/sparc64/sparc64.c from
>>>> DPRINTF macros to trace events...
>>>> === OUTPUT END ===
>>>>
>>>> Test command exited with code: 1
>>>
>>>
>>> This is fine - it's just a side-effect of renaming DEBUG_APB to
>>> DEBUG_SABRE as part of the APB to sabre rename, and in fact this code is
>>> completely removed in patch 10 with the conversion to tracepoints.
>>
>>
>> This can be avoided moving patch #8 after #10, although not worthy IMHO.
>
>
> Thanks once again for the review. It was quite a tricky patchset to order in
> the end because of the rename, and there wasn't really one ordering which I
> found completely satisfactory.
>
> Given that you're generally happy with the patches, I'm inclined to keep the
> patchset in its current form, pending any further comments from Artyom.
>

The whole series does look good to me. The new naming conventions are
really a lot cleaner than what we used to have. Well done!

Acked-by: Artyom Tarasenko <atar4qemu@gmail.com>


-- 
Regards,
Artyom Tarasenko

SPARC and PPC PReP under qemu blog: http://tyom.blogspot.com/search/label/qemu