* [Xenomai] too few arguments to function ‘handle_mm_fault`
@ 2017-05-15 14:43 Giulio Moro
2017-05-15 14:56 ` Philippe Gerum
0 siblings, 1 reply; 2+ messages in thread
From: Giulio Moro @ 2017-05-15 14:43 UTC (permalink / raw)
To: xenomai
The recent commit
9a865549170f82561389eaa6d4dbda6f8a46d2e1
" cobalt/arm: fixups for kernel 4.8+"
seems to have broken 4.4 kernel, see build log below:
arch/arm/xenomai/machine.c: In function ‘mach_arm_prefault’:
arch/arm/xenomai/machine.c:38:20: warning: passing argument 1 of ‘handle_mm_fault’ from incompatible pointer type [-Wincompatible-pointer-types]
handle_mm_fault(vma, addr, flags);
^
In file included from arch/arm/xenomai/machine.c:21:0:
include/linux/mm.h:1165:12: note: expected ‘struct mm_struct *’ but argument is of type ‘struct vm_area_struct *’
extern int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
^
arch/arm/xenomai/machine.c:38:25: warning: passing argument 2 of ‘handle_mm_fault’ makes pointer from integer without a cast [-Wint-conversion]
handle_mm_fault(vma, addr, flags);
^
In file included from arch/arm/xenomai/machine.c:21:0:
include/linux/mm.h:1165:12: note: expected ‘struct vm_area_struct *’ but argument is of type ‘long unsigned int’
extern int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
^
arch/arm/xenomai/machine.c:38:4: error: too few arguments to function ‘handle_mm_fault’
handle_mm_fault(vma, addr, flags);
^
In file included from arch/arm/xenomai/machine.c:21:0:
include/linux/mm.h:1165:12: note: declared here
extern int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
scripts/Makefile.build:258: recipe for target 'arch/arm/xenomai/machine.o' failed
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Xenomai] too few arguments to function ‘handle_mm_fault`
2017-05-15 14:43 [Xenomai] too few arguments to function ‘handle_mm_fault` Giulio Moro
@ 2017-05-15 14:56 ` Philippe Gerum
0 siblings, 0 replies; 2+ messages in thread
From: Philippe Gerum @ 2017-05-15 14:56 UTC (permalink / raw)
To: Giulio Moro, xenomai
On 05/15/2017 04:43 PM, Giulio Moro wrote:
> The recent commit
> 9a865549170f82561389eaa6d4dbda6f8a46d2e1
> " cobalt/arm: fixups for kernel 4.8+"
> seems to have broken 4.4 kernel, see build log below:
>
> arch/arm/xenomai/machine.c: In function ‘mach_arm_prefault’:
> arch/arm/xenomai/machine.c:38:20: warning: passing argument 1 of ‘handle_mm_fault’ from incompatible pointer type [-Wincompatible-pointer-types]
> handle_mm_fault(vma, addr, flags);
> ^
> In file included from arch/arm/xenomai/machine.c:21:0:
> include/linux/mm.h:1165:12: note: expected ‘struct mm_struct *’ but argument is of type ‘struct vm_area_struct *’
> extern int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
> ^
> arch/arm/xenomai/machine.c:38:25: warning: passing argument 2 of ‘handle_mm_fault’ makes pointer from integer without a cast [-Wint-conversion]
> handle_mm_fault(vma, addr, flags);
> ^
> In file included from arch/arm/xenomai/machine.c:21:0:
> include/linux/mm.h:1165:12: note: expected ‘struct vm_area_struct *’ but argument is of type ‘long unsigned int’
> extern int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
> ^
> arch/arm/xenomai/machine.c:38:4: error: too few arguments to function ‘handle_mm_fault’
> handle_mm_fault(vma, addr, flags);
> ^
> In file included from arch/arm/xenomai/machine.c:21:0:
> include/linux/mm.h:1165:12: note: declared here
> extern int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
> scripts/Makefile.build:258: recipe for target 'arch/arm/xenomai/machine.o' failed
>
>
diff --git a/kernel/cobalt/arch/arm/machine.c b/kernel/cobalt/arch/arm/machine.c
index 6768f90..50c14b4 100644
--- a/kernel/cobalt/arch/arm/machine.c
+++ b/kernel/cobalt/arch/arm/machine.c
@@ -35,7 +35,11 @@ static void mach_arm_prefault(struct vm_area_struct *vma)
flags = (vma->vm_flags & VM_MAYWRITE) ? FAULT_FLAG_WRITE : 0;
for (addr = vma->vm_start;
addr != vma->vm_end; addr += PAGE_SIZE)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,8,0)
+ handle_mm_fault(vma->vm_mm, vma, addr, flags);
+#else
handle_mm_fault(vma, addr, flags);
+#endif
}
}
--
Philippe.
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-05-15 14:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-15 14:43 [Xenomai] too few arguments to function ‘handle_mm_fault` Giulio Moro
2017-05-15 14:56 ` Philippe Gerum
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.