Lines Matching refs:baser
1653 static u64 its_read_baser(struct its_node *its, struct its_baser *baser) in its_read_baser() argument
1655 u32 idx = baser - its->tables; in its_read_baser()
1660 static void its_write_baser(struct its_node *its, struct its_baser *baser, in its_write_baser() argument
1663 u32 idx = baser - its->tables; in its_write_baser()
1666 baser->val = its_read_baser(its, baser); in its_write_baser()
1669 static int its_setup_baser(struct its_node *its, struct its_baser *baser, in its_setup_baser() argument
1673 u64 val = its_read_baser(its, baser); in its_setup_baser()
1733 its_write_baser(its, baser, val); in its_setup_baser()
1734 tmp = baser->val; in its_setup_baser()
1759 baser->base = NULL; in its_setup_baser()
1779 baser->order = order; in its_setup_baser()
1780 baser->base = base; in its_setup_baser()
1781 baser->psz = psz; in its_setup_baser()
1795 struct its_baser *baser, in its_parse_indirect_baser() argument
1798 u64 tmp = its_read_baser(its, baser); in its_parse_indirect_baser()
1811 its_write_baser(its, baser, val | GITS_BASER_INDIRECT); in its_parse_indirect_baser()
1812 indirect = !!(baser->val & GITS_BASER_INDIRECT); in its_parse_indirect_baser()
1873 struct its_baser *baser = its->tables + i; in its_alloc_tables() local
1874 u64 val = its_read_baser(its, baser); in its_alloc_tables()
1884 indirect = its_parse_indirect_baser(its, baser, in its_alloc_tables()
1888 indirect = its_parse_indirect_baser(its, baser, in its_alloc_tables()
1894 err = its_setup_baser(its, baser, cache, shr, psz, order, indirect); in its_alloc_tables()
1901 psz = baser->psz; in its_alloc_tables()
1902 cache = baser->val & GITS_BASER_CACHEABILITY_MASK; in its_alloc_tables()
1903 shr = baser->val & GITS_BASER_SHAREABILITY_MASK; in its_alloc_tables()
2107 static bool its_alloc_table_entry(struct its_baser *baser, u32 id) in its_alloc_table_entry() argument
2114 esz = GITS_BASER_ENTRY_SIZE(baser->val); in its_alloc_table_entry()
2115 if (!(baser->val & GITS_BASER_INDIRECT)) in its_alloc_table_entry()
2116 return (id < (PAGE_ORDER_TO_SIZE(baser->order) / esz)); in its_alloc_table_entry()
2119 idx = id >> ilog2(baser->psz / esz); in its_alloc_table_entry()
2120 if (idx >= (PAGE_ORDER_TO_SIZE(baser->order) / GITS_LVL1_ENTRY_SIZE)) in its_alloc_table_entry()
2123 table = baser->base; in its_alloc_table_entry()
2127 page = alloc_pages(GFP_KERNEL | __GFP_ZERO, get_order(baser->psz)); in its_alloc_table_entry()
2132 if (!(baser->val & GITS_BASER_SHAREABILITY_MASK)) in its_alloc_table_entry()
2133 gic_flush_dcache_to_poc(page_address(page), baser->psz); in its_alloc_table_entry()
2138 if (!(baser->val & GITS_BASER_SHAREABILITY_MASK)) in its_alloc_table_entry()
2150 struct its_baser *baser; in its_alloc_device_table() local
2152 baser = its_get_baser(its, GITS_BASER_TYPE_DEVICE); in its_alloc_device_table()
2155 if (!baser) in its_alloc_device_table()
2158 return its_alloc_table_entry(baser, dev_id); in its_alloc_device_table()
2173 struct its_baser *baser; in its_alloc_vpe_table() local
2178 baser = its_get_baser(its, GITS_BASER_TYPE_VCPU); in its_alloc_vpe_table()
2179 if (!baser) in its_alloc_vpe_table()
2182 if (!its_alloc_table_entry(baser, vpe_id)) in its_alloc_vpe_table()
3220 struct its_baser *baser = &its->tables[i]; in its_restore_enable() local
3222 if (!(baser->val & GITS_BASER_VALID)) in its_restore_enable()
3225 its_write_baser(its, baser, baser->val); in its_restore_enable()
3356 u64 baser, tmp, typer; in its_probe_one() local
3433 baser = (virt_to_phys(its->cmd_base) | in its_probe_one()
3439 gits_write_cbaser(baser, its->base + GITS_CBASER); in its_probe_one()
3442 if ((tmp ^ baser) & GITS_CBASER_SHAREABILITY_MASK) { in its_probe_one()
3449 baser &= ~(GITS_CBASER_SHAREABILITY_MASK | in its_probe_one()
3451 baser |= GITS_CBASER_nC; in its_probe_one()
3452 gits_write_cbaser(baser, its->base + GITS_CBASER); in its_probe_one()