* Xenomai 3.1 x86: Duplicate definition of arch_io_reserve_memtype_wc() and arch_io_free_memtype_wc() when CONFIG_X86_PAT is disabled
@ 2020-02-06 10:44 Yuri Zaporozhets
2020-02-06 14:39 ` Jan Kiszka
0 siblings, 1 reply; 3+ messages in thread
From: Yuri Zaporozhets @ 2020-02-06 10:44 UTC (permalink / raw
To: xenomai
Hello all,
Compilation of Linux kernel 4.19.94 with Xenomai-3.1 for x86_64 (with
the latest i-pipe CIP patch for 4.19) cannot be successfully done
because of two functions mentioned in Subject are doubly-defined.
ipipe.h includes irq.h which in turn includes "include/linux/io.h",
where these two functions are defined as stubs. But pat.c also defines
them, and they are not stubs.
A quick solution would be to surround these two functions in pat.c
with #ifdef CONFIG_X86_PAT.
This problem is not present in Xenomai-3.0.10.
Full inclusion list:
In file included from ./include/linux/irq.h:20:0,
from ./include/linux/ipipe.h:29,
from ./arch/x86/include/asm/uaccess.h:10,
from ./include/linux/uaccess.h:14,
from ./include/linux/compat.h:19,
from ./arch/x86/include/asm/mtrr.h:99,
from arch/x86/mm/pat.c:28:
./include/linux/io.h:177:19: note: previous definition of
‘arch_io_reserve_memtype_wc’ was here:
static inline int arch_io_reserve_memtype_wc(...)
--
Regards,
Yuri
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Xenomai 3.1 x86: Duplicate definition of arch_io_reserve_memtype_wc() and arch_io_free_memtype_wc() when CONFIG_X86_PAT is disabled
2020-02-06 10:44 Xenomai 3.1 x86: Duplicate definition of arch_io_reserve_memtype_wc() and arch_io_free_memtype_wc() when CONFIG_X86_PAT is disabled Yuri Zaporozhets
@ 2020-02-06 14:39 ` Jan Kiszka
2020-02-06 14:46 ` Jan Kiszka
0 siblings, 1 reply; 3+ messages in thread
From: Jan Kiszka @ 2020-02-06 14:39 UTC (permalink / raw
To: Yuri Zaporozhets, xenomai
On 06.02.20 11:44, Yuri Zaporozhets via Xenomai wrote:
> Hello all,
>
> Compilation of Linux kernel 4.19.94 with Xenomai-3.1 for x86_64 (with
> the latest i-pipe CIP patch for 4.19) cannot be successfully done
> because of two functions mentioned in Subject are doubly-defined.
>
> ipipe.h includes irq.h which in turn includes "include/linux/io.h",
> where these two functions are defined as stubs. But pat.c also defines
> them, and they are not stubs.
>
> A quick solution would be to surround these two functions in pat.c
> with #ifdef CONFIG_X86_PAT.
>
> This problem is not present in Xenomai-3.0.10.
You likely meant 4.14 or older kernels. It's unrelated to Xenomai,
purely an I-pipe + kernel version thing.
>
> Full inclusion list:
>
> In file included from ./include/linux/irq.h:20:0,
> from ./include/linux/ipipe.h:29,
> from ./arch/x86/include/asm/uaccess.h:10,
> from ./include/linux/uaccess.h:14,
> from ./include/linux/compat.h:19,
> from ./arch/x86/include/asm/mtrr.h:99,
> from arch/x86/mm/pat.c:28:
> ./include/linux/io.h:177:19: note: previous definition of
> ‘arch_io_reserve_memtype_wc’ was here:
> static inline int arch_io_reserve_memtype_wc(...)
>
This looks more and more like an upstream issue that I-pipe happened to
surfaced. I'll write a patch to #ifdef the duplicate functions out in
case X86_PAT is off (which it should not be, in 99.9% of practical
cases), suggest that upstream and put it into our 4.19 kernel as well.
Thanks for reporting,
Jan
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Xenomai 3.1 x86: Duplicate definition of arch_io_reserve_memtype_wc() and arch_io_free_memtype_wc() when CONFIG_X86_PAT is disabled
2020-02-06 14:39 ` Jan Kiszka
@ 2020-02-06 14:46 ` Jan Kiszka
0 siblings, 0 replies; 3+ messages in thread
From: Jan Kiszka @ 2020-02-06 14:46 UTC (permalink / raw
To: Yuri Zaporozhets, xenomai
On 06.02.20 15:39, Jan Kiszka via Xenomai wrote:
> On 06.02.20 11:44, Yuri Zaporozhets via Xenomai wrote:
>> Hello all,
>>
>> Compilation of Linux kernel 4.19.94 with Xenomai-3.1 for x86_64 (with
>> the latest i-pipe CIP patch for 4.19) cannot be successfully done
>> because of two functions mentioned in Subject are doubly-defined.
>>
>> ipipe.h includes irq.h which in turn includes "include/linux/io.h",
>> where these two functions are defined as stubs. But pat.c also defines
>> them, and they are not stubs.
>>
>> A quick solution would be to surround these two functions in pat.c
>> with #ifdef CONFIG_X86_PAT.
>>
>> This problem is not present in Xenomai-3.0.10.
>
> You likely meant 4.14 or older kernels. It's unrelated to Xenomai,
> purely an I-pipe + kernel version thing.
Actually, 4.4: The upstream commit introducing this dates back to 4.9.
Jan
>
>>
>> Full inclusion list:
>>
>> In file included from ./include/linux/irq.h:20:0,
>> from ./include/linux/ipipe.h:29,
>> from ./arch/x86/include/asm/uaccess.h:10,
>> from ./include/linux/uaccess.h:14,
>> from ./include/linux/compat.h:19,
>> from ./arch/x86/include/asm/mtrr.h:99,
>> from arch/x86/mm/pat.c:28:
>> ./include/linux/io.h:177:19: note: previous definition of
>> ‘arch_io_reserve_memtype_wc’ was here:
>> static inline int arch_io_reserve_memtype_wc(...)
>>
>
> This looks more and more like an upstream issue that I-pipe happened to
> surfaced. I'll write a patch to #ifdef the duplicate functions out in
> case X86_PAT is off (which it should not be, in 99.9% of practical
> cases), suggest that upstream and put it into our 4.19 kernel as well.
>
> Thanks for reporting,
> Jan
>
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-02-06 14:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-06 10:44 Xenomai 3.1 x86: Duplicate definition of arch_io_reserve_memtype_wc() and arch_io_free_memtype_wc() when CONFIG_X86_PAT is disabled Yuri Zaporozhets
2020-02-06 14:39 ` Jan Kiszka
2020-02-06 14:46 ` Jan Kiszka
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.