Commit c6ea2f56 authored by Zheng Chongzhen's avatar Zheng Chongzhen Committed by guzitao
Browse files

sw64: iommu: fix the mask of physical address when flushing pcache

Sunway inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6ILC2



--------------------------------

PCACHE_FLUSHPADDR reg specifies addr[47:7] of the physical address
of the pte to be flushed, and other bits reserved, so we can write
the physical address directly into the reg.

Signed-off-by: default avatarZheng Chongzhen <zhengchongzhen@wxiat.com>
Reviewed-by: default avatarHe Sheng <hesheng@wxiat.com>
Signed-off-by: default avatarGu Zitao <guzitao@wxiat.com>
parent d703008e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -167,7 +167,7 @@ flush_device_tlb(struct sunway_iommu_domain *sdomain,

	switch (hflush_addr) {
	case PCACHE_FLUSHPADDR:
		flush_addr = __pa(flush_addr) & 0xffffffff80;
		flush_addr = __pa(flush_addr);
		/* Set memory bar here */
		mb();
		write_piu_ior0(hose->node, hose->index,