qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] hw/alpha/typhoon: simplify using the "unimplemented" sysbus device
@ 2017-10-17 22:50 Philippe Mathieu-Daudé
  2017-10-17 23:49 ` no-reply
  2017-10-19 23:15 ` Richard Henderson
  0 siblings, 2 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-10-17 22:50 UTC (permalink / raw)
  To: Richard Henderson, Peter Maydell
  Cc: Philippe Mathieu-Daudé, qemu-devel, qemu-trivial

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/alpha/alpha_sys.h |  1 -
 hw/alpha/pci.c       | 26 --------------------------
 hw/alpha/typhoon.c   |  6 ++----
 3 files changed, 2 insertions(+), 31 deletions(-)

diff --git a/hw/alpha/alpha_sys.h b/hw/alpha/alpha_sys.h
index b6d8369ed7..9e67f78c60 100644
--- a/hw/alpha/alpha_sys.h
+++ b/hw/alpha/alpha_sys.h
@@ -15,7 +15,6 @@ PCIBus *typhoon_init(ram_addr_t, ISABus **, qemu_irq *, AlphaCPU *[4],
                      pci_map_irq_fn);
 
 /* alpha_pci.c.  */
-extern const MemoryRegionOps alpha_pci_ignore_ops;
 extern const MemoryRegionOps alpha_pci_conf1_ops;
 extern const MemoryRegionOps alpha_pci_iack_ops;
 
diff --git a/hw/alpha/pci.c b/hw/alpha/pci.c
index 8dde637bfe..e0bcde9f70 100644
--- a/hw/alpha/pci.c
+++ b/hw/alpha/pci.c
@@ -14,32 +14,6 @@
 #include "trace.h"
 
 
-/* Fallback for unassigned PCI I/O operations.  Avoids MCHK.  */
-
-static uint64_t ignore_read(void *opaque, hwaddr addr, unsigned size)
-{
-    return 0;
-}
-
-static void ignore_write(void *opaque, hwaddr addr, uint64_t v, unsigned size)
-{
-}
-
-const MemoryRegionOps alpha_pci_ignore_ops = {
-    .read = ignore_read,
-    .write = ignore_write,
-    .endianness = DEVICE_LITTLE_ENDIAN,
-    .valid = {
-        .min_access_size = 1,
-        .max_access_size = 8,
-    },
-    .impl = {
-        .min_access_size = 1,
-        .max_access_size = 8,
-    },
-};
-
-
 /* PCI config space reads/writes, to byte-word addressable memory.  */
 static uint64_t bw_conf1_read(void *opaque, hwaddr addr,
                               unsigned size)
diff --git a/hw/alpha/typhoon.c b/hw/alpha/typhoon.c
index ae11e012c7..5852d6c582 100644
--- a/hw/alpha/typhoon.c
+++ b/hw/alpha/typhoon.c
@@ -11,6 +11,7 @@
 #include "cpu.h"
 #include "hw/hw.h"
 #include "hw/devices.h"
+#include "hw/misc/unimp.h"
 #include "sysemu/sysemu.h"
 #include "alpha_sys.h"
 #include "exec/address-spaces.h"
@@ -876,10 +877,7 @@ PCIBus *typhoon_init(ram_addr_t ram_size, ISABus **isa_bus,
                                 &s->pchip.reg_mem);
 
     /* Pchip0 PCI I/O, 0x801.FC00.0000, 32MB.  */
-    memory_region_init_io(&s->pchip.reg_io, OBJECT(s), &alpha_pci_ignore_ops,
-                          NULL, "pci0-io", 32*MB);
-    memory_region_add_subregion(addr_space, 0x801fc000000ULL,
-                                &s->pchip.reg_io);
+    create_unimplemented_device("pci0-io", 0x801fc000000ULL, 32*MB);
 
     b = pci_register_bus(dev, "pci",
                          typhoon_set_irq, sys_map_irq, s,
-- 
2.15.0.rc0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/alpha/typhoon: simplify using the "unimplemented" sysbus device
  2017-10-17 22:50 [Qemu-devel] [PATCH] hw/alpha/typhoon: simplify using the "unimplemented" sysbus device Philippe Mathieu-Daudé
@ 2017-10-17 23:49 ` no-reply
  2017-10-19 23:15 ` Richard Henderson
  1 sibling, 0 replies; 3+ messages in thread
From: no-reply @ 2017-10-17 23:49 UTC (permalink / raw)
  To: f4bug; +Cc: famz, rth, peter.maydell, qemu-trivial, qemu-devel

Hi,

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

Type: series
Message-id: 20171017225025.25451-1-f4bug@amsat.org
Subject: [Qemu-devel] [PATCH] hw/alpha/typhoon: simplify using the "unimplemented" sysbus device

=== 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
From https://github.com/patchew-project/qemu
 t [tag update]            patchew/cover.1508279421.git.alistair.francis@xilinx.com -> patchew/cover.1508279421.git.alistair.francis@xilinx.com
Switched to a new branch 'test'
7a3910f7b2 hw/alpha/typhoon: simplify using the "unimplemented" sysbus device

=== OUTPUT BEGIN ===
Checking PATCH 1/1: hw/alpha/typhoon: simplify using the "unimplemented" sysbus device...
ERROR: spaces required around that '*' (ctx:VxV)
#82: FILE: hw/alpha/typhoon.c:880:
+    create_unimplemented_device("pci0-io", 0x801fc000000ULL, 32*MB);
                                                                ^

total: 1 errors, 0 warnings, 57 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.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/alpha/typhoon: simplify using the "unimplemented" sysbus device
  2017-10-17 22:50 [Qemu-devel] [PATCH] hw/alpha/typhoon: simplify using the "unimplemented" sysbus device Philippe Mathieu-Daudé
  2017-10-17 23:49 ` no-reply
@ 2017-10-19 23:15 ` Richard Henderson
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2017-10-19 23:15 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, Richard Henderson, Peter Maydell
  Cc: qemu-trivial, qemu-devel

On 10/17/2017 03:50 PM, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  hw/alpha/alpha_sys.h |  1 -
>  hw/alpha/pci.c       | 26 --------------------------
>  hw/alpha/typhoon.c   |  6 ++----
>  3 files changed, 2 insertions(+), 31 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-10-19 23:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-17 22:50 [Qemu-devel] [PATCH] hw/alpha/typhoon: simplify using the "unimplemented" sysbus device Philippe Mathieu-Daudé
2017-10-17 23:49 ` no-reply
2017-10-19 23:15 ` Richard Henderson

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).