Lines Matching refs:baser

2306 static u64 its_read_baser(struct its_node *its, struct its_baser *baser)  in its_read_baser()  argument
2308 u32 idx = baser - its->tables; in its_read_baser()
2313 static void its_write_baser(struct its_node *its, struct its_baser *baser, in its_write_baser() argument
2316 u32 idx = baser - its->tables; in its_write_baser()
2319 baser->val = its_read_baser(its, baser); in its_write_baser()
2322 static int its_setup_baser(struct its_node *its, struct its_baser *baser, in its_setup_baser() argument
2325 u64 val = its_read_baser(its, baser); in its_setup_baser()
2333 psz = baser->psz; in its_setup_baser()
2390 its_write_baser(its, baser, val); in its_setup_baser()
2391 tmp = baser->val; in its_setup_baser()
2416 baser->order = order; in its_setup_baser()
2417 baser->base = base; in its_setup_baser()
2418 baser->psz = psz; in its_setup_baser()
2432 struct its_baser *baser, in its_parse_indirect_baser() argument
2435 u64 tmp = its_read_baser(its, baser); in its_parse_indirect_baser()
2440 u32 psz = baser->psz; in its_parse_indirect_baser()
2449 its_write_baser(its, baser, val | GITS_BASER_INDIRECT); in its_parse_indirect_baser()
2450 indirect = !!(baser->val & GITS_BASER_INDIRECT); in its_parse_indirect_baser()
2523 u64 baser; in find_sibling_its() local
2535 baser = its->tables[2].val; in find_sibling_its()
2536 if (!(baser & GITS_BASER_VALID)) in find_sibling_its()
2558 static int its_probe_baser_psz(struct its_node *its, struct its_baser *baser) in its_probe_baser_psz() argument
2565 val = its_read_baser(its, baser); in its_probe_baser_psz()
2584 its_write_baser(its, baser, val); in its_probe_baser_psz()
2586 if (FIELD_GET(GITS_BASER_PAGE_SIZE_MASK, baser->val) == gpsz) in its_probe_baser_psz()
2602 baser->psz = psz; in its_probe_baser_psz()
2622 struct its_baser *baser = its->tables + i; in its_alloc_tables() local
2623 u64 val = its_read_baser(its, baser); in its_alloc_tables()
2631 if (its_probe_baser_psz(its, baser)) { in its_alloc_tables()
2636 order = get_order(baser->psz); in its_alloc_tables()
2640 indirect = its_parse_indirect_baser(its, baser, &order, in its_alloc_tables()
2650 *baser = sibling->tables[2]; in its_alloc_tables()
2651 its_write_baser(its, baser, baser->val); in its_alloc_tables()
2656 indirect = its_parse_indirect_baser(its, baser, &order, in its_alloc_tables()
2661 err = its_setup_baser(its, baser, cache, shr, order, indirect); in its_alloc_tables()
2668 cache = baser->val & GITS_BASER_CACHEABILITY_MASK; in its_alloc_tables()
2669 shr = baser->val & GITS_BASER_SHAREABILITY_MASK; in its_alloc_tables()
2685 u64 baser, addr; in inherit_vpe_l1_table_from_its() local
2697 baser = its->tables[2].val; in inherit_vpe_l1_table_from_its()
2698 if (!(baser & GITS_BASER_VALID)) in inherit_vpe_l1_table_from_its()
2705 if (baser & GITS_BASER_INDIRECT) in inherit_vpe_l1_table_from_its()
2708 FIELD_GET(GITS_BASER_PAGE_SIZE_MASK, baser)); in inherit_vpe_l1_table_from_its()
2709 switch (FIELD_GET(GITS_BASER_PAGE_SIZE_MASK, baser)) { in inherit_vpe_l1_table_from_its()
2711 addr = GITS_BASER_ADDR_48_to_52(baser); in inherit_vpe_l1_table_from_its()
2714 addr = baser & GENMASK_ULL(47, 12); in inherit_vpe_l1_table_from_its()
2720 FIELD_GET(GITS_BASER_SHAREABILITY_MASK, baser)); in inherit_vpe_l1_table_from_its()
2722 FIELD_GET(GITS_BASER_INNER_CACHEABILITY_MASK, baser)); in inherit_vpe_l1_table_from_its()
2724 val |= FIELD_PREP(GICR_VPROPBASER_4_1_SIZE, GITS_BASER_NR_PAGES(baser) - 1); in inherit_vpe_l1_table_from_its()
3311 struct its_baser *baser, u32 id) in its_alloc_table_entry() argument
3318 esz = GITS_BASER_ENTRY_SIZE(baser->val); in its_alloc_table_entry()
3319 if (!(baser->val & GITS_BASER_INDIRECT)) in its_alloc_table_entry()
3320 return (id < (PAGE_ORDER_TO_SIZE(baser->order) / esz)); in its_alloc_table_entry()
3323 idx = id >> ilog2(baser->psz / esz); in its_alloc_table_entry()
3324 if (idx >= (PAGE_ORDER_TO_SIZE(baser->order) / GITS_LVL1_ENTRY_SIZE)) in its_alloc_table_entry()
3327 table = baser->base; in its_alloc_table_entry()
3332 get_order(baser->psz)); in its_alloc_table_entry()
3337 if (!(baser->val & GITS_BASER_SHAREABILITY_MASK)) in its_alloc_table_entry()
3338 gic_flush_dcache_to_poc(page_address(page), baser->psz); in its_alloc_table_entry()
3343 if (!(baser->val & GITS_BASER_SHAREABILITY_MASK)) in its_alloc_table_entry()
3355 struct its_baser *baser; in its_alloc_device_table() local
3357 baser = its_get_baser(its, GITS_BASER_TYPE_DEVICE); in its_alloc_device_table()
3360 if (!baser) in its_alloc_device_table()
3363 return its_alloc_table_entry(its, baser, dev_id); in its_alloc_device_table()
3379 struct its_baser *baser; in its_alloc_vpe_table() local
3384 baser = its_get_baser(its, GITS_BASER_TYPE_VCPU); in its_alloc_vpe_table()
3385 if (!baser) in its_alloc_vpe_table()
3388 if (!its_alloc_table_entry(its, baser, vpe_id)) in its_alloc_vpe_table()
4931 struct its_baser *baser = &its->tables[i]; in its_restore_enable() local
4933 if (!(baser->val & GITS_BASER_VALID)) in its_restore_enable()
4936 its_write_baser(its, baser, baser->val); in its_restore_enable()
5093 u64 baser, tmp; in its_probe_one() local
5147 baser = (virt_to_phys(its->cmd_base) | in its_probe_one()
5153 gits_write_cbaser(baser, its->base + GITS_CBASER); in its_probe_one()
5159 if ((tmp ^ baser) & GITS_CBASER_SHAREABILITY_MASK) { in its_probe_one()
5166 baser &= ~(GITS_CBASER_SHAREABILITY_MASK | in its_probe_one()
5168 baser |= GITS_CBASER_nC; in its_probe_one()
5169 gits_write_cbaser(baser, its->base + GITS_CBASER); in its_probe_one()