All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Dooks <ben.dooks@sifive.com>
To: qemu-devel@nongnu.org
Cc: qemu-arm@nongnu.org,
	Jude Onyenegecha <jude.onyenegecha@sifive.com>,
	Sudip Mukherjee <sudip.mukherjee@sifive.com>,
	William Salmon <william.salmon@sifive.com>,
	Adnan Chowdhury <adnan.chowdhury@sifive.com>,
	Ben Dooks <ben.dooks@sifive.com>
Subject: [PATCH 2/7] pci: designware: fix DESIGNWARE_PCIE_ATU_UPPER_TARGET
Date: Wed, 13 Jul 2022 17:54:44 +0100	[thread overview]
Message-ID: <20220713165449.37433-3-ben.dooks@sifive.com> (raw)
In-Reply-To: <20220713165449.37433-1-ben.dooks@sifive.com>

By inspection DESIGNWARE_PCIE_ATU_UPPER_TARGET should be writing to
the upper 32-bits of viewport->target, so fix this by shifting the
32-bit value before the or.

Signed-off-by: Ben Dooks <ben.dooks@sifive.com>
---
 hw/pci-host/designware.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/pci-host/designware.c b/hw/pci-host/designware.c
index 296f1b9760..d213d7324c 100644
--- a/hw/pci-host/designware.c
+++ b/hw/pci-host/designware.c
@@ -365,7 +365,7 @@ static void designware_pcie_root_config_write(PCIDevice *d, uint32_t address,
 
     case DESIGNWARE_PCIE_ATU_UPPER_TARGET:
         viewport->target &= 0x00000000FFFFFFFFULL;
-        viewport->target |= val;
+        viewport->target |= (uint64_t)val << 32;
         break;
 
     case DESIGNWARE_PCIE_ATU_UPPER_LIMIT:
-- 
2.35.1



  parent reply	other threads:[~2022-07-13 20:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-13 16:54 updates for designware pci-host Ben Dooks
2022-07-13 16:54 ` [PATCH 1/7] pci: designware: add 64-bit viewport limit Ben Dooks
2022-07-18 10:03   ` Ben Dooks
2022-07-13 16:54 ` Ben Dooks [this message]
2022-07-13 16:54 ` [PATCH 3/7] pci: designware: clamp viewport index Ben Dooks
2022-07-13 16:54 ` [PATCH 4/7] pci: designware: ignore new bits in ATU CR1 Ben Dooks
2022-07-13 16:54 ` [PATCH 5/7] pci: designware: move msi to entry 5 Ben Dooks
2022-07-13 16:54 ` [PATCH 6/7] pci: designware: correct host's class_id Ben Dooks
2022-07-13 16:54 ` [PATCH 7/7] pci: designware: add initial tracing events Ben Dooks
2022-07-27 11:13 ` updates for designware pci-host Ben Dooks
2022-07-27 12:56   ` Peter Maydell
2022-07-27 13:20     ` Ben Dooks
2022-07-27 13:29     ` Ben Dooks

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=20220713165449.37433-3-ben.dooks@sifive.com \
    --to=ben.dooks@sifive.com \
    --cc=adnan.chowdhury@sifive.com \
    --cc=jude.onyenegecha@sifive.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sudip.mukherjee@sifive.com \
    --cc=william.salmon@sifive.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.