diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-09-20 14:24:58 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-09-20 14:25:03 -0400 |
commit | bfefb7a0c6e08736f2d5917c468467f134bf28bb (patch) | |
tree | 7aa7084114dc083fe5b4d7b532901bdeb67188e7 /arch/arm/mach-omap2/iommu2.c | |
parent | 8d0cc631f6dd0a9283ceb7d61d8b85ecbcd355ea (diff) | |
parent | 78f28b7c555359c67c2a0d23f7436e915329421e (diff) |
Merge branch 'linus' into x86/urgent
Merge reason: Bring in changes that the next patch will depend on.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/arm/mach-omap2/iommu2.c')
-rw-r--r-- | arch/arm/mach-omap2/iommu2.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c index 015f22a53ead..2d9b5cc981cd 100644 --- a/arch/arm/mach-omap2/iommu2.c +++ b/arch/arm/mach-omap2/iommu2.c | |||
@@ -217,10 +217,19 @@ static ssize_t omap2_dump_cr(struct iommu *obj, struct cr_regs *cr, char *buf) | |||
217 | } | 217 | } |
218 | 218 | ||
219 | #define pr_reg(name) \ | 219 | #define pr_reg(name) \ |
220 | p += sprintf(p, "%20s: %08x\n", \ | 220 | do { \ |
221 | __stringify(name), iommu_read_reg(obj, MMU_##name)); | 221 | ssize_t bytes; \ |
222 | 222 | const char *str = "%20s: %08x\n"; \ | |
223 | static ssize_t omap2_iommu_dump_ctx(struct iommu *obj, char *buf) | 223 | const int maxcol = 32; \ |
224 | bytes = snprintf(p, maxcol, str, __stringify(name), \ | ||
225 | iommu_read_reg(obj, MMU_##name)); \ | ||
226 | p += bytes; \ | ||
227 | len -= bytes; \ | ||
228 | if (len < maxcol) \ | ||
229 | goto out; \ | ||
230 | } while (0) | ||
231 | |||
232 | static ssize_t omap2_iommu_dump_ctx(struct iommu *obj, char *buf, ssize_t len) | ||
224 | { | 233 | { |
225 | char *p = buf; | 234 | char *p = buf; |
226 | 235 | ||
@@ -242,7 +251,7 @@ static ssize_t omap2_iommu_dump_ctx(struct iommu *obj, char *buf) | |||
242 | pr_reg(READ_CAM); | 251 | pr_reg(READ_CAM); |
243 | pr_reg(READ_RAM); | 252 | pr_reg(READ_RAM); |
244 | pr_reg(EMU_FAULT_AD); | 253 | pr_reg(EMU_FAULT_AD); |
245 | 254 | out: | |
246 | return p - buf; | 255 | return p - buf; |
247 | } | 256 | } |
248 | 257 | ||