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