From: "J.L. Burr" <jlburr-vna1KIf7WgpBDgjK7y7TUQ@public.gmane.org>
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH 1/1 (resend)] mthca: Modify to support embedded PowerPC platforms
Date: Thu, 6 Jan 2011 21:59:06 -0500 [thread overview]
Message-ID: <ig5vl1$j0$1@dough.gmane.org> (raw)
Resending to fix mangling of patch.
---
Here's the patch described in part 0.
Use phys_addr_t, rather than unsigned long, for physical addresses to
accommodate embedded PowerPC processors which use a 36-bit physical address
on a 32-bit CPU. phys_addr_t will be 64-bits on these platforms.
This patch is for Linux kernel 2.6.26.
---
diff -rup a/drivers/infiniband/hw/mthca/mthca_catas.c b/drivers/infiniband/hw/mthca/mthca_catas.c
--- a/drivers/infiniband/hw/mthca/mthca_catas.c
+++ b/drivers/infiniband/hw/mthca/mthca_catas.c
@@ -148,7 +148,7 @@ static void poll_catas(unsigned long dev
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.stop = 0;
@@ -161,14 +161,14 @@ void mthca_start_catas_poll(struct mthca
if (!request_mem_region(addr, dev->catas_err.size * 4,
DRV_NAME)) {
mthca_warn(dev, "couldn't request 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;
}
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);
release_mem_region(addr, dev->catas_err.size * 4);
return;
}
diff -rup a/drivers/infiniband/hw/mthca/mthca_cmd.c b/drivers/infiniband/hw/mthca/mthca_cmd.c
--- a/drivers/infiniband/hw/mthca/mthca_cmd.c
+++ b/drivers/infiniband/hw/mthca/mthca_cmd.c
@@ -712,7 +712,7 @@ int mthca_RUN_FW(struct mthca_dev *dev,
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 -rup a/drivers/infiniband/hw/mthca/mthca_eq.c b/drivers/infiniband/hw/mthca/mthca_eq.c
--- a/drivers/infiniband/hw/mthca/mthca_eq.c
+++ b/drivers/infiniband/hw/mthca/mthca_eq.c
@@ -652,7 +652,7 @@ static int mthca_map_reg(struct mthca_de
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);
if (!request_mem_region(base + offset, size, DRV_NAME))
return -EBUSY;
@@ -669,7 +669,7 @@ static int mthca_map_reg(struct mthca_de
static void mthca_unmap_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);
release_mem_region(base + offset, size);
iounmap(map);
diff -rup a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c
--- a/drivers/infiniband/hw/mthca/mthca_main.c
+++ b/drivers/infiniband/hw/mthca/mthca_main.c
@@ -786,7 +786,7 @@ static int mthca_setup_hca(struct mthca_
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 -rup a/drivers/infiniband/hw/mthca/mthca_mr.c b/drivers/infiniband/hw/mthca/mthca_mr.c
--- a/drivers/infiniband/hw/mthca/mthca_mr.c
+++ b/drivers/infiniband/hw/mthca/mthca_mr.c
@@ -838,7 +838,7 @@ void mthca_arbel_fmr_unmap(struct mthca_
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 reply other threads:[~2011-01-07 2:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-07 2:59 J.L. Burr [this message]
2011-01-07 5:59 ` [PATCH 1/1 (resend)] mthca: Modify to support embedded PowerPC platforms 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
[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='ig5vl1$j0$1@dough.gmane.org' \
--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