From: "J.L. Burr" <jlburr-vna1KIf7WgpBDgjK7y7TUQ@public.gmane.org>
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 1/1 (resend)] mthca: Modify to support embedded PowerPC platforms
Date: Wed, 12 Jan 2011 03:00:45 -0500 [thread overview]
Message-ID: <4D2D5FAD.6030508@cadence.com> (raw)
In-Reply-To: <adafwt06puj.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
On 1/10/2011 11:12 PM, Roland Dreier wrote:
> So I redid your patch by hand (and also fixed it up to apply to the
> current driver -- there were some changes to mthca_eq.c that I think I
> took into account). See below... can I get a "Signed-off-by:" line from
> you for this?
I reviewed your change against the latest tree and it looks fine to me.
I've tried to get my e-mail / news client set-up properly and hope that I'm
now maintaining tab characters! Thanks for shepherding this through for me.
8<--------------------------------------------------
IB/mthca: Fix driver when sizeof (phys_addr_t) > sizeof (long)
Some systems have PCI addresses that don't fit in unsigned long (eg some
32-bit PowerPC 440 systems have 36-bit bus addresses). Fix up the driver
by using phys_addr_t where appropriate, so we don't truncate any PCI
resource addresses before ioremapping them.
[ Update to apply to current driver source. - Roland ]
Signed-off-by: Roland Dreier <rolandd-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
Signed-off-by: John L. Burr <jlburr-vna1KIf7WgpBDgjK7y7TUQ@public.gmane.org>
---
drivers/infiniband/hw/mthca/mthca_catas.c | 5 +++--
drivers/infiniband/hw/mthca/mthca_cmd.c | 2 +-
drivers/infiniband/hw/mthca/mthca_eq.c | 2 +-
drivers/infiniband/hw/mthca/mthca_main.c | 2 +-
drivers/infiniband/hw/mthca/mthca_mr.c | 2 +-
5 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/infiniband/hw/mthca/mthca_catas.c b/drivers/infiniband/hw/mthca/mthca_catas.c
index 0aa0110..e4a08c2 100644
--- a/drivers/infiniband/hw/mthca/mthca_catas.c
+++ b/drivers/infiniband/hw/mthca/mthca_catas.c
@@ -146,7 +146,7 @@ static void poll_catas(unsigned long dev_ptr)
void mthca_start_catas_poll(struct mthca_dev *dev)
{
- unsigned long addr;
+ phys_addr_t addr;
init_timer(&dev->catas_err.timer);
dev->catas_err.map = NULL;
@@ -158,7 +158,8 @@ void mthca_start_catas_poll(struct mthca_dev *dev)
dev->catas_err.map = ioremap(addr, dev->catas_err.size * 4);
if (!dev->catas_err.map) {
mthca_warn(dev, "couldn't map catastrophic error region "
- "at 0x%lx/0x%x\n", addr, dev->catas_err.size * 4);
+ "at 0x%llx/0x%x\n", (unsigned long long) addr,
+ dev->catas_err.size * 4);
return;
}
diff --git a/drivers/infiniband/hw/mthca/mthca_cmd.c b/drivers/infiniband/hw/mthca/mthca_cmd.c
index f4ceecd..7bfa2a1 100644
--- a/drivers/infiniband/hw/mthca/mthca_cmd.c
+++ b/drivers/infiniband/hw/mthca/mthca_cmd.c
@@ -713,7 +713,7 @@ int mthca_RUN_FW(struct mthca_dev *dev, u8 *status)
static void mthca_setup_cmd_doorbells(struct mthca_dev *dev, u64 base)
{
- unsigned long addr;
+ phys_addr_t addr;
u16 max_off = 0;
int i;
diff --git a/drivers/infiniband/hw/mthca/mthca_eq.c b/drivers/infiniband/hw/mthca/mthca_eq.c
index 8e8c728..76785c6 100644
--- a/drivers/infiniband/hw/mthca/mthca_eq.c
+++ b/drivers/infiniband/hw/mthca/mthca_eq.c
@@ -653,7 +653,7 @@ static int mthca_map_reg(struct mthca_dev *dev,
unsigned long offset, unsigned long size,
void __iomem **map)
{
- unsigned long base = pci_resource_start(dev->pdev, 0);
+ phys_addr_t base = pci_resource_start(dev->pdev, 0);
*map = ioremap(base + offset, size);
if (!*map)
diff --git a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c
index 5eee666..8a40cd5 100644
--- a/drivers/infiniband/hw/mthca/mthca_main.c
+++ b/drivers/infiniband/hw/mthca/mthca_main.c
@@ -790,7 +790,7 @@ static int mthca_setup_hca(struct mthca_dev *dev)
goto err_uar_table_free;
}
- dev->kar = ioremap(dev->driver_uar.pfn << PAGE_SHIFT, PAGE_SIZE);
+ dev->kar = ioremap((phys_addr_t) dev->driver_uar.pfn << PAGE_SHIFT, PAGE_SIZE);
if (!dev->kar) {
mthca_err(dev, "Couldn't map kernel access region, "
"aborting.\n");
diff --git a/drivers/infiniband/hw/mthca/mthca_mr.c b/drivers/infiniband/hw/mthca/mthca_mr.c
index 065b208..44045c8 100644
--- a/drivers/infiniband/hw/mthca/mthca_mr.c
+++ b/drivers/infiniband/hw/mthca/mthca_mr.c
@@ -853,7 +853,7 @@ void mthca_arbel_fmr_unmap(struct mthca_dev *dev, struct mthca_fmr *fmr)
int mthca_init_mr_table(struct mthca_dev *dev)
{
- unsigned long addr;
+ phys_addr_t addr;
int mpts, mtts, err, i;
err = mthca_alloc_init(&dev->mr_table.mpt_alloc,
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-01-12 8:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-07 2:59 [PATCH 1/1 (resend)] mthca: Modify to support embedded PowerPC platforms J.L. Burr
2011-01-07 5:59 ` Roland Dreier
2011-01-11 4:12 ` Roland Dreier
[not found] ` <adafwt06puj.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2011-01-12 8:00 ` J.L. Burr [this message]
[not found] ` <4D2D5FAD.6030508-vna1KIf7WgpBDgjK7y7TUQ@public.gmane.org>
2011-01-12 17:53 ` mlx4 fix for 36-bit bus addresses on 32-bit arch (was: [PATCH 1/1 (resend)] mthca: Modify to support embedded PowerPC platforms) Roland Dreier
[not found] ` <adahbde57r7.fsf_-_-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2011-01-13 17:06 ` mlx4 fix for 36-bit bus addresses on 32-bit arch J.L. Burr
[not found] ` <4D2F310B.2010906-vna1KIf7WgpBDgjK7y7TUQ@public.gmane.org>
2011-01-13 18:44 ` Jason Gunthorpe
[not found] ` <20110113184432.GA9681-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2011-01-13 22:10 ` Roland Dreier
[not found] ` <ada62ts316q.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2011-01-13 22:14 ` Jason Gunthorpe
[not found] ` <20110113221454.GB9681-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2011-01-14 12:46 ` J.L. Burr
2011-01-14 13:09 ` mlx4 fix for 36-bit bus addresses on 32-bit arch (was: [PATCH 1/1 (resend)] mthca: Modify to support embedded PowerPC platforms) Eli Cohen
2011-01-14 17:27 ` Jason Gunthorpe
[not found] ` <20110114172721.GB16535-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2011-01-14 21:26 ` mlx4 fix for 36-bit bus addresses on 32-bit arch Roland Dreier
[not found] ` <adawrm718ja.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2011-01-14 22:40 ` Jason Gunthorpe
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=4D2D5FAD.6030508@cadence.com \
--to=jlburr-vna1kif7wgpbdgjk7y7tuq@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.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