Re: [PATCH v2 2/3] cobalt/rtdm: Prepare for new signature of mm_get_unmapped_area() in 6.19

Jan Kiszka <[email protected]>
Newsgroups dev.linux.lists.xenomai
Message-ID <[email protected]>
On 20.02.26 12:27, Florian Bezdeka wrote:
> Since 6.19 the signature of mm_get_unmapped_area() has one parameter
> less. The (previously) first struct mm_struct *mm parameter has been
> removed.
> 
> Signed-off-by: Florian Bezdeka <[email protected]>
> ---
>  kernel/cobalt/rtdm/drvlib.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/cobalt/rtdm/drvlib.c b/kernel/cobalt/rtdm/drvlib.c
> index 86788743fe47b228662ef16831b4281ddefd04ff..0258100db5bbcc04880ddc71632b7992e50168dc 100644
> --- a/kernel/cobalt/rtdm/drvlib.c
> +++ b/kernel/cobalt/rtdm/drvlib.c
> @@ -1907,8 +1907,12 @@ driver_get_unmapped_area(struct file *filp,
>  
>  #ifdef CONFIG_MMU
>  	/* Run default handler. */
> -	return mm_get_unmapped_area(current->mm, filp, addr, len, pgoff,
> -				    flags);
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(6,19,0)
> +	return mm_get_unmapped_area(current->mm, filp, addr, len, pgoff, flags);
> +#else
> +	return mm_get_unmapped_area(filp, addr, len, pgoff, flags);
> +#endif

-> wrappers.h, extending the existing logic there, using the latest
pattern here.

Jan

> +
>  #else
>  	return -ENODEV;
>  #endif
> 

-- 
Siemens AG, Foundational Technologies
Linux Expert Center
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.