[PATCH v3 4/6] arm64: mmu_change_region_attr() add an option not to break PTEs
Ilias Apalodimas
ilias.apalodimas at linaro.org
Fri Feb 28 08:20:47 CET 2025
Hi,
After a chat with Richard I figured I misunderstood his comment ...
[...]
> +void mmu_change_region_attr_nobreak(phys_addr_t addr, size_t siz, u64 attrs)
> +{
> + int level;
> + u64 r, size, start;
> +
> + /*
> + * Loop through the address range until we find a page granule that fits
> + * our alignment constraints, then set it to the new cache attributes
> + */
> + start = addr;
> + size = siz;
> + while (size > 0) {
> + for (level = 1; level < 4; level++) {
> + /* Set PTE to new attributes */
> + r = set_one_region(start, size, attrs, true, level);
> + if (r) {
> + /* PTE successfully updated */
> + size -= r;
> + start += r;
> + break;
> + }
> + }
> + }
Instead of replicating this, I'll remove this code from
mmu_change_region_attr() and call mmu_change_region_attr_nobreak() in
the next version
[...]
Thanks
/Ilias
More information about the U-Boot
mailing list