x86: Fixing improper annotation.
Hi Rakib,
Your two patches set for x86 init_thread_xsate function section mismatch is correct to fix the compilation warning, but generates this other one :
Quoted 5 lines
WARNING:
vmlinux.o(.cpuinit.text+0x7de): Section mismatch in reference from the functionxsave_cntxt_init()to the function .init.text:__alloc_bootmem() The function__cpuinitxsave_cntxt_init()references
a function__init__alloc_bootmem().
If__alloc_bootmemis only used byxsave_cntxt_initthen
annotate__alloc_bootmemwith a matching annotation.
Thanks for your good job.
Regards.
Quoted 14 lines · Rufus & Azrael
Hi Rakib,
Your two patches set for x86
init_thread_xsatefunction section mismatch is correct to fix the compilation warning, but generates this other one :Quoted 7 lines
WARNING:
vmlinux.o(.cpuinit.text+0x7de): Section mismatch in reference from the functionxsave_cntxt_init()to the function .init.text:__alloc_bootmem()
The function__cpuinitxsave_cntxt_init()references
a function__init__alloc_bootmem().
If__alloc_bootmemis only used byxsave_cntxt_initthen annotate__alloc_bootmemwith a matching annotation.
that's with both 1/2 and 2/2 applied?
Ingo
Quoted 20 lines · Ingo Molnar
Quoted 16 lines · Rufus& Azrael
Hi Rakib,
Your two patches set for x86
init_thread_xsatefunction section mismatch is correct to fix the compilation warning, but generates this other one :Quoted 8 lines
WARNING:
vmlinux.o(.cpuinit.text+0x7de): Section mismatch in reference from the functionxsave_cntxt_init()to the function .init.text:__alloc_bootmem()
The function__cpuinitxsave_cntxt_init()references
a function__init__alloc_bootmem().
If__alloc_bootmemis only used byxsave_cntxt_initthen annotate__alloc_bootmemwith a matching annotation.
Quoted 5 lines
that's with both 1/2 and 2/2 applied?
Ingo
Yes Ingo with the two patches applied.
Regards.
Quoted 21 lines · Rufus & Azrael
Quoted 20 lines · Ingo Molnar
Quoted 16 lines · Rufus& Azrael
Hi Rakib,
Your two patches set for x86
init_thread_xsatefunction section mismatch is correct to fix the compilation warning, but generates this other one :Quoted 8 lines
WARNING:
vmlinux.o(.cpuinit.text+0x7de): Section mismatch in reference from the functionxsave_cntxt_init()to the function .init.text:__alloc_bootmem()
The function__cpuinitxsave_cntxt_init()references
a function__init__alloc_bootmem().
If__alloc_bootmemis only used byxsave_cntxt_initthen annotate__alloc_bootmemwith a matching annotation.
Quoted 6 lines
Quoted 5 lines
that's with both 1/2 and 2/2 applied?
Ingo
Yes Ingo with the two patches applied.
okay - so i wont apply them until the full scope of the problems here is mapped. We might be best off by marking xsave_cntxt_init() non-init altogether for the time being?
Ingo
Quoted 4 lines · Ingo Molnar
okay - so i wont apply them until the full scope of the problems here
is mapped. We might be best off by markingxsave_cntxt_init()non-init altogether for the time being?
But, it's been called from an __init section, it will also trigger an warning too. So, it
will remain as it was. If we goes to hunt these warnings ( I mean
we've to replace __init __alloc_bootmem() with __cpuinit __alloc_bootmem() ) , it's not certain when it will stop. Likely , we need to replace a lots of __init with __cpuinit.
Rakib
Quoted 3 lines
Ingo
Quoted 7 lines · Rakib Mullick
Quoted 4 lines · Ingo Molnar
okay - so i wont apply them until the full scope of the problems here
is mapped. We might be best off by markingxsave_cntxt_init()non-init altogether for the time being?
Quoted 7 lines
But, it's been called from an
__initsection, it will also trigger an
warning too. So, it
will remain as it was. If we goes to hunt these warnings ( I mean
we've to replace__init__alloc_bootmem()with__cpuinit__alloc_bootmem()) , it's not certain when it will stop. Likely , we need to replace a lots of__initwith__cpuinit.
Actually , if we replace __init __alloc_bootmem() with __cpuinit __alloc_bootmem() that doesn't solve the problem. The mentioned warning generates when CONFIG_ARCH_BOOTMEM_NODE=y is set. I think Ingo is right. We can mark xsave_cntxt_init() as non-init. And we could teach modpost to not to generate the warning
with __ref. Can we, Ingo ?
Quoted 5 lines
Rakib
Quoted 3 lines
Ingo
Quoted 16 lines · Rakib Mullick
Quoted 7 lines · Rakib Mullick
Quoted 4 lines · Ingo Molnar
okay - so i wont apply them until the full scope of the problems here
is mapped. We might be best off by markingxsave_cntxt_init()non-init altogether for the time being?Quoted 7 lines
But, it's been called from an
__initsection, it will also trigger an
warning too. So, it
will remain as it was. If we goes to hunt these warnings ( I mean
we've to replace__init__alloc_bootmem()with__cpuinit__alloc_bootmem()) , it's not certain when it will stop. Likely , we need to replace a lots of__initwith__cpuinit.
Quoted 6 lines
Actually , if we replace
__init__alloc_bootmem()with__cpuinit__alloc_bootmem()that doesn't solve the problem. The mentioned warning generates whenCONFIG_ARCH_BOOTMEM_NODE=yis set. I think Ingo is right. We can markxsave_cntxt_init()as non-init. And we could teach modpost to not to generate the warning with__ref. Can we, Ingo ?
sure. Marking stuff non-init is inherently safe as well.
Ingo