qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Cao jin <caoj.fnst@cn.fujitsu.com>,
	Eduardo Habkost <ehabkost@redhat.com>
Subject: [Qemu-devel] [PULL v2 18/51] ich9lpc: fix typo
Date: Tue, 15 Mar 2016 17:01:18 +0200	[thread overview]
Message-ID: <1458053975-2410-19-git-send-email-mst@redhat.com> (raw)
In-Reply-To: <1458053975-2410-1-git-send-email-mst@redhat.com>

From: Cao jin <caoj.fnst@cn.fujitsu.com>

change some "rbca" to "rcrb"(root complex register block) while
the other to "rcba"(root complex base address).
Bonus: add more comments and fix some indentation.

Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 include/hw/i386/ich9.h |  4 ++--
 hw/isa/lpc_ich9.c      | 35 ++++++++++++++++++-----------------
 2 files changed, 20 insertions(+), 19 deletions(-)

diff --git a/include/hw/i386/ich9.h b/include/hw/i386/ich9.h
index b411434..d04dcdc 100644
--- a/include/hw/i386/ich9.h
+++ b/include/hw/i386/ich9.h
@@ -23,7 +23,7 @@ I2CBus *ich9_smb_init(PCIBus *bus, int devfn, uint32_t smb_io_base);
 void ich9_generate_smi(void);
 void ich9_generate_nmi(void);
 
-#define ICH9_CC_SIZE                            (16 * 1024)     /* 16KB */
+#define ICH9_CC_SIZE (16 * 1024) /* 16KB. Chipset configuration registers */
 
 #define TYPE_ICH9_LPC_DEVICE "ICH9-LPC"
 #define ICH9_LPC_DEVICE(obj) \
@@ -65,7 +65,7 @@ typedef struct ICH9LPCState {
 
     /* isa bus */
     ISABus *isa_bus;
-    MemoryRegion rbca_mem;
+    MemoryRegion rcrb_mem; /* root complex register block */
     Notifier machine_ready;
 
     qemu_irq *pic;
diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
index 4e896b2..0ee29c0 100644
--- a/hw/isa/lpc_ich9.c
+++ b/hw/isa/lpc_ich9.c
@@ -409,18 +409,18 @@ ich9_lpc_pmbase_update(ICH9LPCState *lpc)
     ich9_pm_iospace_update(&lpc->pm, pm_io_base);
 }
 
-/* config:RBCA */
-static void ich9_lpc_rcba_update(ICH9LPCState *lpc, uint32_t rbca_old)
+/* config:RCBA */
+static void ich9_lpc_rcba_update(ICH9LPCState *lpc, uint32_t rcba_old)
 {
-    uint32_t rbca = pci_get_long(lpc->d.config + ICH9_LPC_RCBA);
+    uint32_t rcba = pci_get_long(lpc->d.config + ICH9_LPC_RCBA);
 
-    if (rbca_old & ICH9_LPC_RCBA_EN) {
-            memory_region_del_subregion(get_system_memory(), &lpc->rbca_mem);
+    if (rcba_old & ICH9_LPC_RCBA_EN) {
+        memory_region_del_subregion(get_system_memory(), &lpc->rcrb_mem);
     }
-    if (rbca & ICH9_LPC_RCBA_EN) {
-            memory_region_add_subregion_overlap(get_system_memory(),
-                                                rbca & ICH9_LPC_RCBA_BA_MASK,
-                                                &lpc->rbca_mem, 1);
+    if (rcba & ICH9_LPC_RCBA_EN) {
+        memory_region_add_subregion_overlap(get_system_memory(),
+                                            rcba & ICH9_LPC_RCBA_BA_MASK,
+                                            &lpc->rcrb_mem, 1);
     }
 }
 
@@ -444,7 +444,7 @@ static int ich9_lpc_post_load(void *opaque, int version_id)
     ICH9LPCState *lpc = opaque;
 
     ich9_lpc_pmbase_update(lpc);
-    ich9_lpc_rcba_update(lpc, 0 /* disabled ICH9_LPC_RBCA_EN */);
+    ich9_lpc_rcba_update(lpc, 0 /* disabled ICH9_LPC_RCBA_EN */);
     ich9_lpc_pmcon_update(lpc);
     return 0;
 }
@@ -453,14 +453,14 @@ static void ich9_lpc_config_write(PCIDevice *d,
                                   uint32_t addr, uint32_t val, int len)
 {
     ICH9LPCState *lpc = ICH9_LPC_DEVICE(d);
-    uint32_t rbca_old = pci_get_long(d->config + ICH9_LPC_RCBA);
+    uint32_t rcba_old = pci_get_long(d->config + ICH9_LPC_RCBA);
 
     pci_default_write_config(d, addr, val, len);
     if (ranges_overlap(addr, len, ICH9_LPC_PMBASE, 4)) {
         ich9_lpc_pmbase_update(lpc);
     }
     if (ranges_overlap(addr, len, ICH9_LPC_RCBA, 4)) {
-        ich9_lpc_rcba_update(lpc, rbca_old);
+        ich9_lpc_rcba_update(lpc, rcba_old);
     }
     if (ranges_overlap(addr, len, ICH9_LPC_PIRQA_ROUT, 4)) {
         pci_bus_fire_intx_routing_notifier(lpc->d.bus);
@@ -477,7 +477,7 @@ static void ich9_lpc_reset(DeviceState *qdev)
 {
     PCIDevice *d = PCI_DEVICE(qdev);
     ICH9LPCState *lpc = ICH9_LPC_DEVICE(d);
-    uint32_t rbca_old = pci_get_long(d->config + ICH9_LPC_RCBA);
+    uint32_t rcba_old = pci_get_long(d->config + ICH9_LPC_RCBA);
     int i;
 
     for (i = 0; i < 4; i++) {
@@ -496,13 +496,14 @@ static void ich9_lpc_reset(DeviceState *qdev)
     ich9_cc_reset(lpc);
 
     ich9_lpc_pmbase_update(lpc);
-    ich9_lpc_rcba_update(lpc, rbca_old);
+    ich9_lpc_rcba_update(lpc, rcba_old);
 
     lpc->sci_level = 0;
     lpc->rst_cnt = 0;
 }
 
-static const MemoryRegionOps rbca_mmio_ops = {
+/* root complex register block is mapped into memory space */
+static const MemoryRegionOps rcrb_mmio_ops = {
     .read = ich9_cc_read,
     .write = ich9_cc_write,
     .endianness = DEVICE_LITTLE_ENDIAN,
@@ -616,8 +617,8 @@ static void ich9_lpc_realize(PCIDevice *d, Error **errp)
     pci_set_long(d->wmask + ICH9_LPC_PMBASE,
                  ICH9_LPC_PMBASE_BASE_ADDRESS_MASK);
 
-    memory_region_init_io(&lpc->rbca_mem, OBJECT(d), &rbca_mmio_ops, lpc,
-                            "lpc-rbca-mmio", ICH9_CC_SIZE);
+    memory_region_init_io(&lpc->rcrb_mem, OBJECT(d), &rcrb_mmio_ops, lpc,
+                          "lpc-rcrb-mmio", ICH9_CC_SIZE);
 
     lpc->isa_bus = isa_bus;
 
-- 
MST

  parent reply	other threads:[~2016-03-15 15:01 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-15 15:00 [Qemu-devel] [PULL v2 00/51] vhost, virtio, pci, pc, acpi Michael S. Tsirkin
2016-03-15 15:00 ` [Qemu-devel] [PULL v2 01/51] acpi: add aml_create_field() Michael S. Tsirkin
2016-03-15 15:00 ` [Qemu-devel] [PULL v2 02/51] acpi: add aml_concatenate() Michael S. Tsirkin
2016-03-15 15:00 ` [Qemu-devel] [PULL v2 03/51] acpi: allow using object as offset for OperationRegion Michael S. Tsirkin
2016-03-15 15:00 ` [Qemu-devel] [PULL v2 04/51] acpi: add build_append_named_dword, returning an offset in buffer Michael S. Tsirkin
2016-03-15 15:00 ` [Qemu-devel] [PULL v2 05/51] balloon: fix segfault and harden the stats queue Michael S. Tsirkin
2016-03-15 15:00 ` [Qemu-devel] [PULL v2 06/51] hw/virtio: fix double use of a virtio flag Michael S. Tsirkin
2016-03-15 15:00 ` [Qemu-devel] [PULL v2 07/51] hw/virtio: group virtio flags into an enum Michael S. Tsirkin
2016-03-15 15:00 ` [Qemu-devel] [PULL v2 08/51] virtio-balloon: add 'available' counter Michael S. Tsirkin
2016-03-15 15:00 ` [Qemu-devel] [PULL v2 09/51] vhost-user: verify that number of queues is less than MAX_QUEUE_NUM Michael S. Tsirkin
2016-03-15 15:00 ` [Qemu-devel] [PULL v2 10/51] pc-dimm: fix error handling in pc_dimm_check_memdev_is_busy() Michael S. Tsirkin
2016-03-15 15:00 ` [Qemu-devel] [PULL v2 11/51] i386/acpi: make floppy controller object dynamic Michael S. Tsirkin
2016-03-15 15:00 ` [Qemu-devel] [PULL v2 12/51] i386: expose floppy drive CMOS type Michael S. Tsirkin
2016-03-15 15:00 ` [Qemu-devel] [PULL v2 13/51] fdc: add function to determine drive chs limits Michael S. Tsirkin
2016-03-15 15:01 ` [Qemu-devel] [PULL v2 14/51] i386: populate floppy drive information in DSDT Michael S. Tsirkin
2016-03-15 15:01 ` [Qemu-devel] [PULL v2 15/51] i386: update expected DSDT Michael S. Tsirkin
2016-03-15 15:01 ` [Qemu-devel] [PULL v2 16/51] virtio-pci: call pci reset variant when guest requests reset Michael S. Tsirkin
2016-03-15 15:01 ` [Qemu-devel] [PULL v2 17/51] msi_supported -> msi_nonbroken Michael S. Tsirkin
2016-03-15 15:01 ` Michael S. Tsirkin [this message]
2016-03-15 15:01 ` [Qemu-devel] [PULL v2 19/51] hw/acpi: fix Q35 support for legacy Windows OS Michael S. Tsirkin
2016-03-15 15:01 ` [Qemu-devel] [PULL v2 20/51] acpi-test-data: add _DIS methods Michael S. Tsirkin
2016-03-15 15:01 ` [Qemu-devel] [PULL v2 21/51] pci-ids: add virtio 1.0 ids to spec Michael S. Tsirkin
2016-03-15 15:01 ` [Qemu-devel] [PULL v2 22/51] nvdimm acpi: initialize the resource used by NVDIMM ACPI Michael S. Tsirkin
2016-03-15 15:01 ` [Qemu-devel] [PULL v2 23/51] nvdimm acpi: introduce patched dsm memory Michael S. Tsirkin
2016-03-15 15:01 ` [Qemu-devel] [PULL v2 24/51] nvdimm acpi: let qemu handle _DSM method Michael S. Tsirkin
2016-03-15 15:01 ` [Qemu-devel] [PULL v2 25/51] nvdimm acpi: emulate dsm method Michael S. Tsirkin
2016-03-15 15:01 ` [Qemu-devel] [PULL v2 26/51] vhost-user: fix use after free Michael S. Tsirkin
2016-03-15 15:01 ` [Qemu-devel] [PULL v2 27/51] vhost-user: remove useless is_server field Michael S. Tsirkin
2016-03-15 15:01 ` [Qemu-devel] [PULL v2 28/51] qemu-char: avoid potential double-free Michael S. Tsirkin
2016-03-15 15:01 ` [Qemu-devel] [PULL v2 29/51] qemu-char: remove all msgfds on disconnect Michael S. Tsirkin
2016-03-15 15:01 ` [Qemu-devel] [PULL v2 30/51] qemu-char: make tcp_chr_disconnect() reentrant-safe Michael S. Tsirkin
2016-03-15 15:02 ` [Qemu-devel] [PULL v2 31/51] pxb: cleanup Michael S. Tsirkin
2016-03-15 15:02 ` [Qemu-devel] [PULL v2 32/51] pc: acpi: remove NOP assignment Michael S. Tsirkin
2016-03-15 15:02 ` [Qemu-devel] [PULL v2 33/51] pc: init pcms->apic_id_limit once and use it throughout pc.c Michael S. Tsirkin
2016-03-15 15:02 ` [Qemu-devel] [PULL v2 34/51] machine: introduce MachineClass.possible_cpu_arch_ids() hook Michael S. Tsirkin
2016-03-15 15:02 ` [Qemu-devel] [PULL v2 35/51] pc: acpi: cleanup qdev_get_machine() calls Michael S. Tsirkin
2016-03-15 15:02 ` [Qemu-devel] [PULL v2 36/51] pc: acpi: SRAT: create only valid processor lapic entries Michael S. Tsirkin
2016-03-15 15:02 ` [Qemu-devel] [PULL v2 37/51] pc: acpi: create MADT.lapic entries only for valid lapics Michael S. Tsirkin
2016-03-15 15:02 ` [Qemu-devel] [PULL v2 38/51] pc: acpi: create Processor and Notify objects " Michael S. Tsirkin
2016-03-15 15:02 ` [Qemu-devel] [PULL v2 39/51] pc: acpi: drop cpu->found_cpus bitmap Michael S. Tsirkin
2016-03-15 15:02 ` [Qemu-devel] [PULL v2 40/51] pc: acpi: clarify why possible LAPIC entries must be present in MADT Michael S. Tsirkin
2016-03-15 15:02 ` [Qemu-devel] [PULL v2 41/51] MAINTAINERS: Add an entry for virtio header files Michael S. Tsirkin
2016-03-15 15:02 ` [Qemu-devel] [PULL v2 42/51] MAINTAINERS: machine core Michael S. Tsirkin
2016-03-15 15:02 ` [Qemu-devel] [PULL v2 43/51] ipmi: remove IPMI_CHECK_CMD_LEN() macro Michael S. Tsirkin
2016-03-15 15:02 ` [Qemu-devel] [PULL v2 44/51] ipmi: replace IPMI_ADD_RSP_DATA() macro with inline helpers Michael S. Tsirkin
2016-03-15 15:02 ` [Qemu-devel] [PULL v2 45/51] ipmi: remove IPMI_CHECK_RESERVATION() macro Michael S. Tsirkin
2016-03-15 15:03 ` [Qemu-devel] [PULL v2 46/51] ipmi: add rsp_buffer_set_error() helper Michael S. Tsirkin
2016-03-15 15:03 ` [Qemu-devel] [PULL v2 47/51] ipmi: add a realize function to the device class Michael S. Tsirkin
2016-03-15 15:03 ` [Qemu-devel] [PULL v2 48/51] ipmi: use a function to initialize the SDR table Michael S. Tsirkin
2016-03-15 15:03 ` [Qemu-devel] [PULL v2 49/51] ipmi: remove the need of an ending record in " Michael S. Tsirkin
2016-03-15 15:03 ` [Qemu-devel] [PULL v2 50/51] ipmi: add some local variables in ipmi_sdr_init Michael S. Tsirkin
2016-03-15 15:03 ` [Qemu-devel] [PULL v2 51/51] hw/acpi: fix GSI links UID Michael S. Tsirkin
2016-03-15 17:09 ` [Qemu-devel] [PULL v2 00/51] vhost, virtio, pci, pc, acpi Peter Maydell

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=1458053975-2410-19-git-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=caoj.fnst@cn.fujitsu.com \
    --cc=ehabkost@redhat.com \
    --cc=peter.maydell@linaro.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).