On 14.04.2025 13:48, Oleksii Kurochko wrote:
> 
> On 4/10/25 10:48 AM, Jan Beulich wrote:
>> On 09.04.2025 21:01, Oleksii Kurochko wrote:
>>> --- a/xen/arch/riscv/include/asm/mm.h
>>> +++ b/xen/arch/riscv/include/asm/mm.h
>>> @@ -9,6 +9,7 @@
>>>   #include <xen/mm-frame.h>
>>>   #include <xen/pdx.h>
>>>   #include <xen/pfn.h>
>>> +#include <xen/sections.h>
>>>   #include <xen/types.h>
>>>   
>>>   #include <asm/page-bits.h>
>>> @@ -35,6 +36,11 @@ static inline void *maddr_to_virt(paddr_t ma)
>>>       return (void *)va;
>>>   }
>>>   
>>> +#define is_init_section(p) ({                   \
>>> +    char *p_ = (char *)(unsigned long)(p);      \
>>> +    (p_ >= __init_begin) && (p_ < __init_end);  \
>>> +})
>> I think this wants to be put in xen/sections.h, next to where 
>> __init_{begin,end}
>> are declared. But first it wants making const-correct, to eliminate the 
>> potential
>> of it indirectly casting away const-ness from the incoming argument.
>>
>> (At some point related stuff wants moving from kernel.h to sections.h, I 
>> suppose.
>> And at that point they will all want to have const added.)
> 
> Sure, I'll change to 'const char *p_ = (const char*)(unsigned long)(p)'.

And hopefully without forgetting the blank ahead of the *.

Jan

Reply via email to