unsigned int reg, u32 data)
{
if (domain->mmu != domain->mmu->root)
-- -------- ipmmu_write(domain->mmu,
-- -------- domain->context_id * IM_CTX_SIZE + reg, data);
++ ++++++++ ipmmu_ctx_write(domain->mmu, domain->context_id, reg, data);
+ ++++++++
- ipmmu_write(domain->mmu->root,
- domain->context_id * IM_CTX_SIZE + reg, data);
++ ++++++++ ipmmu_ctx_write(domain->mmu->root, domain->context_id, reg, data);
++ ++++++++}
++ ++++++++
++ ++++++++static u32 ipmmu_utlb_reg(struct ipmmu_vmsa_device *mmu, unsigned int reg)
++ ++++++++{
++ ++++++++ return mmu->features->utlb_offset_base + reg;
++ ++++++++}
++ ++++++++
++ ++++++++static void ipmmu_imuasid_write(struct ipmmu_vmsa_device *mmu,
++ ++++++++ unsigned int utlb, u32 data)
++ ++++++++{
++ ++++++++ ipmmu_write(mmu, ipmmu_utlb_reg(mmu, IMUASID(utlb)), data);
++ ++++++++}
+
- -------- ipmmu_write(domain->mmu->root,
- -------- domain->context_id * IM_CTX_SIZE + reg, data);
++ ++++++++static void ipmmu_imuctr_write(struct ipmmu_vmsa_device *mmu,
++ ++++++++ unsigned int utlb, u32 data)
++ ++++++++{
++ ++++++++ ipmmu_write(mmu, ipmmu_utlb_reg(mmu, IMUCTR(utlb)), data);
}
/* -----------------------------------------------------------------------------