Hi Richard, On Thu, 20 Feb 2025 at 20:32, Richard Henderson <richard.hender...@linaro.org> wrote: > > On 2/20/25 05:54, Ilias Apalodimas wrote: > > +++ b/include/cpu_func.h > > @@ -69,6 +69,23 @@ void flush_dcache_range(unsigned long start, unsigned > > long stop); > > void invalidate_dcache_range(unsigned long start, unsigned long stop); > > void invalidate_dcache_all(void); > > void invalidate_icache_all(void); > > + > > +enum pgprot_attrs { > > + MMU_ATTR_RO, > > + MMU_ATTR_RX, > > + MMU_ATTR_RW, > > +}; > > + > > +/** pgprot_set_attrs() - Set page table permissions > > + * > > + * @addr: Physical address start > > + * @size: size of memory to change > > + * @perm: New permissions > > + * > > + * Return: 0 on success, error otherwise. > > + **/ > > +int pgprot_set_attrs(phys_addr_t addr, size_t size, u64 perm); > > Why do you not use the enum for 'perm'? > That's certainly the API you're expecting...
Ah good catch. On the original RFC I didn't have the enum. Instead I had raw values of 1,2,3. I switched it to a proper enum for v1, but missed the function argument. Thanks /Ilias > > > r~