Skip to content

Commit 5b24993

Browse files
Sven Schnellehdeller
authored andcommitted
parisc: mask out enable and reserved bits from sba imask
When using kexec the SBA IOMMU IBASE might still have the RE bit set. This triggers a WARN_ON when trying to write back the IBASE register later, and it also makes some mask calculations fail. Cc: <[email protected]> Signed-off-by: Sven Schnelle <[email protected]> Signed-off-by: Helge Deller <[email protected]>
1 parent 3bc6e3d commit 5b24993

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/parisc/sba_iommu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1270,7 +1270,7 @@ sba_ioc_init_pluto(struct parisc_device *sba, struct ioc *ioc, int ioc_num)
12701270
** (one that doesn't overlap memory or LMMIO space) in the
12711271
** IBASE and IMASK registers.
12721272
*/
1273-
ioc->ibase = READ_REG(ioc->ioc_hpa + IOC_IBASE);
1273+
ioc->ibase = READ_REG(ioc->ioc_hpa + IOC_IBASE) & ~0x1fffffULL;
12741274
iova_space_size = ~(READ_REG(ioc->ioc_hpa + IOC_IMASK) & 0xFFFFFFFFUL) + 1;
12751275

12761276
if ((ioc->ibase < 0xfed00000UL) && ((ioc->ibase + iova_space_size) > 0xfee00000UL)) {

0 commit comments

Comments
 (0)