From: Ingo Molnar <mingo@elte.hu>
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: David.Woodhouse@intel.com, tony.luck@intel.com,
linux-kernel@vger.kernel.org,
Jesse Barnes <jbarnes@virtuousgeek.org>,
Suresh Siddha <suresh.b.siddha@intel.com>,
Yinghai Lu <yinghai@kernel.org>,
Fenghua Yu <fenghua.yu@intel.com>,
Youquan Song <youquan.song@intel.com>
Subject: Re: [PATCH] intel-iommu: fix compile warnings
Date: Wed, 19 Nov 2008 09:29:28 +0100 [thread overview]
Message-ID: <20081119082928.GC1078@elte.hu> (raw)
In-Reply-To: <20081119135351M.fujita.tomonori@lab.ntt.co.jp>
* FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> wrote:
> I got the following warnings on IA64:
>
> linux-2.6/drivers/pci/intel-iommu.c: In function 'init_dmars':
> linux-2.6/drivers/pci/intel-iommu.c:1658: warning: format '%Lx' expects type 'long long unsigned int', but argument 2 has type 'u64'
> linux-2.6/drivers/pci/intel-iommu.c:1663: warning: format '%Lx' expects type 'long long unsigned int', but argument 2 has type 'u64'
applied to tip/core/urgent, thanks!
Note, i extended the changelog, see the commit attached below.
I think in 2.6.29 we want to convert struct dmar_drhd_unit's
->reg_base_addr to the phys_addr_t type, and use the %pR extension to
print it out.
There's other files affected as well by this type problem:
drivers/pci/intr_remapping.c for example - it's just not built on ia64
right now because it depends on CONFIG_INTR_REMAP which is only 64-bit
x86.
Some goes for other fields as well:
u64 base_address; /* reserved base address*/
u64 end_address; /* reserved end address */
(and some other variables in dmar.c as well)
Would you be interested in sending a patch for this wider cleanup?
It will be a pure cleanup with no functional complications as DMAR is
only available on 64-bit platforms so phys_addr_t is always 64 bits
wide - but it will help avoid such problems that u64 types
historically have.
Ingo
------------->
>From b4e0f9eb8aeceb22c48fee005378bd19e25216fc Mon Sep 17 00:00:00 2001
From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Date: Wed, 19 Nov 2008 13:53:42 +0900
Subject: [PATCH] intel-iommu: fix compile warnings
Impact: cleanup
I got the following warnings on IA64:
linux-2.6/drivers/pci/intel-iommu.c: In function 'init_dmars':
linux-2.6/drivers/pci/intel-iommu.c:1658: warning: format '%Lx' expects type 'long long unsigned int', but argument 2 has type 'u64'
linux-2.6/drivers/pci/intel-iommu.c:1663: warning: format '%Lx' expects type 'long long unsigned int', but argument 2 has type 'u64'
Another victim of int-ll64.h versus int-l64.h confusion between platforms.
->reg_base_addr has a type of u64 - which can only be printed out
consistently if we cast its type up to LL.
[ Eventually reg_base_addr should be converted to phys_addr_t, for which
we have the %pR printk helper - but that is out of the scope of late
-rc's. ]
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
drivers/pci/intel-iommu.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index a269272..5c8baa4 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -1655,12 +1655,14 @@ int __init init_dmars(void)
iommu->flush.flush_context = __iommu_flush_context;
iommu->flush.flush_iotlb = __iommu_flush_iotlb;
printk(KERN_INFO "IOMMU 0x%Lx: using Register based "
- "invalidation\n", drhd->reg_base_addr);
+ "invalidation\n",
+ (unsigned long long)drhd->reg_base_addr);
} else {
iommu->flush.flush_context = qi_flush_context;
iommu->flush.flush_iotlb = qi_flush_iotlb;
printk(KERN_INFO "IOMMU 0x%Lx: using Queued "
- "invalidation\n", drhd->reg_base_addr);
+ "invalidation\n",
+ (unsigned long long)drhd->reg_base_addr);
}
}
prev parent reply other threads:[~2008-11-19 8:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-19 4:53 [PATCH] intel-iommu: fix compile warnings FUJITA Tomonori
2008-11-19 8:29 ` Ingo Molnar [this message]
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=20081119082928.GC1078@elte.hu \
--to=mingo@elte.hu \
--cc=David.Woodhouse@intel.com \
--cc=fenghua.yu@intel.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=suresh.b.siddha@intel.com \
--cc=tony.luck@intel.com \
--cc=yinghai@kernel.org \
--cc=youquan.song@intel.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.