diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /arch/arm/mach-omap2/iommu2.c | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'arch/arm/mach-omap2/iommu2.c')
-rw-r--r-- | arch/arm/mach-omap2/iommu2.c | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c index 14ee686b6492..adb083e41acd 100644 --- a/arch/arm/mach-omap2/iommu2.c +++ b/arch/arm/mach-omap2/iommu2.c | |||
@@ -145,35 +145,32 @@ static void omap2_iommu_set_twl(struct iommu *obj, bool on) | |||
145 | 145 | ||
146 | static u32 omap2_iommu_fault_isr(struct iommu *obj, u32 *ra) | 146 | static u32 omap2_iommu_fault_isr(struct iommu *obj, u32 *ra) |
147 | { | 147 | { |
148 | int i; | ||
149 | u32 stat, da; | 148 | u32 stat, da; |
150 | const char *err_msg[] = { | 149 | u32 errs = 0; |
151 | "tlb miss", | ||
152 | "translation fault", | ||
153 | "emulation miss", | ||
154 | "table walk fault", | ||
155 | "multi hit fault", | ||
156 | }; | ||
157 | 150 | ||
158 | stat = iommu_read_reg(obj, MMU_IRQSTATUS); | 151 | stat = iommu_read_reg(obj, MMU_IRQSTATUS); |
159 | stat &= MMU_IRQ_MASK; | 152 | stat &= MMU_IRQ_MASK; |
160 | if (!stat) | 153 | if (!stat) { |
154 | *ra = 0; | ||
161 | return 0; | 155 | return 0; |
156 | } | ||
162 | 157 | ||
163 | da = iommu_read_reg(obj, MMU_FAULT_AD); | 158 | da = iommu_read_reg(obj, MMU_FAULT_AD); |
164 | *ra = da; | 159 | *ra = da; |
165 | 160 | ||
166 | dev_err(obj->dev, "%s:\tda:%08x ", __func__, da); | 161 | if (stat & MMU_IRQ_TLBMISS) |
167 | 162 | errs |= OMAP_IOMMU_ERR_TLB_MISS; | |
168 | for (i = 0; i < ARRAY_SIZE(err_msg); i++) { | 163 | if (stat & MMU_IRQ_TRANSLATIONFAULT) |
169 | if (stat & (1 << i)) | 164 | errs |= OMAP_IOMMU_ERR_TRANS_FAULT; |
170 | printk("%s ", err_msg[i]); | 165 | if (stat & MMU_IRQ_EMUMISS) |
171 | } | 166 | errs |= OMAP_IOMMU_ERR_EMU_MISS; |
172 | printk("\n"); | 167 | if (stat & MMU_IRQ_TABLEWALKFAULT) |
173 | 168 | errs |= OMAP_IOMMU_ERR_TBLWALK_FAULT; | |
169 | if (stat & MMU_IRQ_MULTIHITFAULT) | ||
170 | errs |= OMAP_IOMMU_ERR_MULTIHIT_FAULT; | ||
174 | iommu_write_reg(obj, stat, MMU_IRQSTATUS); | 171 | iommu_write_reg(obj, stat, MMU_IRQSTATUS); |
175 | 172 | ||
176 | return stat; | 173 | return errs; |
177 | } | 174 | } |
178 | 175 | ||
179 | static void omap2_tlb_read_cr(struct iommu *obj, struct cr_regs *cr) | 176 | static void omap2_tlb_read_cr(struct iommu *obj, struct cr_regs *cr) |