Lines Matching full:region
19 struct region { struct
25 static struct region __initdata mem[MPU_MAX_REGIONS]; argument
27 static struct region __initdata xip[MPU_MAX_REGIONS];
46 /* Region number */
52 /* Data-side / unified region attributes */
54 /* Region access control register */
60 /* Region size register */
66 /* Region base address register */
76 /* Optional instruction-side region attributes */
78 /* I-side Region access control register */
84 /* I-side Region size register */
90 /* I-side Region base address register */
108 /* Data-side / unified region attributes */
110 /* Region access control register */
118 /* Region size register */
126 /* Region base address register */
146 static bool __init try_split_region(phys_addr_t base, phys_addr_t size, struct region *region) in try_split_region() argument
177 _set_bit(i, ®ion->subreg); in try_split_region()
180 _set_bit(PMSAv7_NR_SUBREGS - i, ®ion->subreg); in try_split_region()
183 region->base = abase; in try_split_region()
184 region->size = p2size; in try_split_region()
190 unsigned int limit, struct region *regions) in allocate_region()
197 /* Try cover region as is (maybe with help of subregions) */ in allocate_region()
205 * Maximum aligned region might overflow phys_addr_t in allocate_region()
207 * until we take the smaller of the aligned region in allocate_region()
208 * size ("asize") and rounded region size ("p2size"), in allocate_region()
250 /* We need to keep one slot for background region */ in pmsav7_adjust_lowmem_bounds()
306 pr_warn("Truncating memory from %pa to %pa (MPU region constraints)", in pmsav7_adjust_lowmem_bounds()
344 /* We've kept a region free for this probing */ in __mpu_min_region_order()
349 * region order in __mpu_min_region_order()
360 isb(); /* Ensure that MPU region operations have completed */ in __mpu_min_region_order()
372 /* We kept a region free for probing resolution of MPU regions*/ in mpu_setup_region()
383 /* Writing N to bits 5:1 (RSR_SZ) specifies region size 2^N+1 */ in mpu_setup_region()
395 isb(); /* Propagate properties before enabling region */ in mpu_setup_region()
407 /* Store region info (we treat i/d side the same, so only store d) */ in mpu_setup_region()
422 int i, region = 0, err = 0; in pmsav7_setup() local
427 err |= mpu_setup_region(region++, 0, 32, in pmsav7_setup()
435 * In case we overwrite RAM region we set earlier in in pmsav7_setup()
438 * with BG region (which is uncachable), thus we need in pmsav7_setup()
441 bool need_flush = region == PMSAv7_RAM_REGION; in pmsav7_setup()
446 err |= mpu_setup_region(region++, xip[i].base, ilog2(xip[i].size), in pmsav7_setup()
457 err |= mpu_setup_region(region++, mem[i].base, ilog2(mem[i].size), in pmsav7_setup()
464 err |= mpu_setup_region(region++, vectors_base, ilog2(2 * PAGE_SIZE), in pmsav7_setup()
469 panic("MPU region initialization failure! %d", err); in pmsav7_setup()
472 "Region independence: %s, Used %d of %d regions\n", in pmsav7_setup()