x86/xen: fix section of xen_init_time_ops() in header
Subsystems (2)
PATCH 1/1 x86/xen: fix section of xen_init_time_ops() in header
Commit d162809f85b4 ("xen/x86: Do not call xen_init_time_ops() until shared_info is initialized") moved xen_init_time_ops() from __init to __ref without updating xen-ops.h accordingly. Fix this.
shared_info is initialized")
--- arch/x86/xen/xen-ops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/xen/xen-ops.h +1 -1
@@ -69,7 +69,7 @@ void xen_setup_runstate_info(int cpu);void xen_teardown_timer (int cpu);u64 xen_clocksource_read (void );void xen_setup_cpu_clockevents (void ); -void __init xen_init_time_ops (void ); +void __ref xen_init_time_ops (void );void __init xen_hvm_init_time_ops (void );irqreturn_t xen_debug_interrupt (int irq,void *dev_id);
Signature · 1 line
2.14.1
Juergen Gross
maintainerQuoted 16 lines · Nicolas Iooss
Commit
d162809f85b4("xen/x86: Do not callxen_init_time_ops()untilshared_infois initialized") movedxen_init_time_ops()from__initto__refwithout updatingxen-ops.haccordingly. Fix this.Fixes d162809f85b4 ("xen/x86: Do not call xen_init_time_ops() until
shared_infois initialized")Signed-off-by Nicolas Iooss <[email protected]>--- arch/x86/xen/xen-ops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/x86/xen/xen-ops.h +0
-0
arch/x86/xen/xen-ops.h void xen_setup_runstate_info(int cpu); · line 73
Quoted 6 lines
arch/x86/xen/xen-ops.h +1
-1@@ -69,7 +69,7 @@ void xen_setup_runstate_info(int cpu);void xen_teardown_timer (int cpu);u64 xen_clocksource_read (void );void xen_setup_cpu_clockevents (void ); -void __init xen_init_time_ops (void ); +void __ref xen_init_time_ops (void );void __init xen_hvm_init_time_ops (void );
When correcting this could you please modify the prototypes to comply to the intended form as noted in include/linux/init.h (the __ref or __init annotations should be just before the ending semicolon)?
Juergen
Quoted 13 lines
Quoted 1 line
Quoted 1 line · On 04.09.17 at 10:17, <[email protected]> wrote:
Quoted 11 lines · Nicolas Iooss
Commit
d162809f85b4("xen/x86: Do not callxen_init_time_ops()untilshared_infois initialized") movedxen_init_time_ops()from__initto__refwithout updatingxen-ops.haccordingly. Fix this.Fixes d162809f85b4 ("xen/x86: Do not call xen_init_time_ops() until
shared_infois initialized")Signed-off-by Nicolas Iooss <[email protected]>--- arch/x86/xen/xen-ops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 15 lines
arch/x86/xen/xen-ops.h void xen_setup_runstate_info(int cpu); · line 73
Quoted 11 lines
arch/x86/xen/xen-ops.h +1
-1@@ -69,7 +69,7 @@ void xen_setup_runstate_info(int cpu);void xen_teardown_timer (int cpu);u64 xen_clocksource_read (void );void xen_setup_cpu_clockevents (void ); -void __init xen_init_time_ops (void ); +void __ref xen_init_time_ops (void );void __init xen_hvm_init_time_ops (void );When correcting this could you please modify the prototypes to comply to the intended form as noted in
include/linux/init.h(the__refor__initannotations should be just before the ending semicolon)?
Why would these annotations be kept on the declarations anyway? Attributes affecting code/data placement generally belong on the definitions only.
I also question the suggested placement, despite init.h saying so.
Jan
Quoted 27 lines · Jan Beulich
Quoted 13 lines
Quoted 1 line
Quoted 1 line · On 04.09.17 at 10:17, <[email protected]> wrote:
Quoted 11 lines · Nicolas Iooss
Commit
d162809f85b4("xen/x86: Do not callxen_init_time_ops()untilshared_infois initialized") movedxen_init_time_ops()from__initto__refwithout updatingxen-ops.haccordingly. Fix this.Fixes d162809f85b4 ("xen/x86: Do not call xen_init_time_ops() until
shared_infois initialized")Signed-off-by Nicolas Iooss <[email protected]>--- arch/x86/xen/xen-ops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 14 lines
arch/x86/xen/xen-ops.h void xen_setup_runstate_info(int cpu); · line 73
Quoted 11 lines
arch/x86/xen/xen-ops.h +1
-1@@ -69,7 +69,7 @@ void xen_setup_runstate_info(int cpu);void xen_teardown_timer (int cpu);u64 xen_clocksource_read (void );void xen_setup_cpu_clockevents (void ); -void __init xen_init_time_ops (void ); +void __ref xen_init_time_ops (void );void __init xen_hvm_init_time_ops (void );When correcting this could you please modify the prototypes to comply to the intended form as noted in
include/linux/init.h(the__refor__initannotations should be just before the ending semicolon)?
Quoted 3 lines
Why would these annotations be kept on the declarations anyway? Attributes affecting code/data placement generally belong on the definitions only.
Because:
a) That’s what the coding style says, and
b) So various static analysis can be done (e.g. sparse) on an individual translation unit basis.
Your objection to having annotations on declarations is why I've never got around to adding sparse to the hypervisor build.
~Andrew
Quoted 35 lines
Quoted 1 line
Quoted 1 line · On 04.09.17 at 12:35, <[email protected]> wrote:
Quoted 27 lines · Jan Beulich
Quoted 13 lines
Quoted 1 line
Quoted 1 line · On 04.09.17 at 10:17, <[email protected]> wrote:
Quoted 11 lines · Nicolas Iooss
Commit
d162809f85b4("xen/x86: Do not callxen_init_time_ops()untilshared_infois initialized") movedxen_init_time_ops()from__initto__refwithout updatingxen-ops.haccordingly. Fix this.Fixes d162809f85b4 ("xen/x86: Do not call xen_init_time_ops() until
shared_infois initialized")Signed-off-by Nicolas Iooss <[email protected]>--- arch/x86/xen/xen-ops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 14 lines
arch/x86/xen/xen-ops.h void xen_setup_runstate_info(int cpu); · line 73
Quoted 11 lines
arch/x86/xen/xen-ops.h +1
-1@@ -69,7 +69,7 @@ void xen_setup_runstate_info(int cpu);void xen_teardown_timer (int cpu);u64 xen_clocksource_read (void );void xen_setup_cpu_clockevents (void ); -void __init xen_init_time_ops (void ); +void __ref xen_init_time_ops (void );void __init xen_hvm_init_time_ops (void );When correcting this could you please modify the prototypes to comply to the intended form as noted in
include/linux/init.h(the__refor__initannotations should be just before the ending semicolon)?Quoted 3 lines
Why would these annotations be kept on the declarations anyway? Attributes affecting code/data placement generally belong on the definitions only.
Because:
Quoted 8 lines
a) That’s what the coding style says, and
b) So various static analysis can be done (e.g. sparse) on an individual translation unit basis.
Your objection to having annotations on declarations is why I've never got around to adding sparse to the hypervisor build.
Would you mind educating me what use these annotations can be for static analysis? If they're useful in headers, I would stop objecting to them being added there, but I'd then demand for them to never be present on non-static definitions (unless there are attributes where the compiler requires them to be repeated, but I think all attributes are cumulative).
Jan
Quoted 40 lines · Jan Beulich
Quoted 40 lines
Quoted 1 line
Quoted 1 line · On 04.09.17 at 12:35, <[email protected]> wrote:
Quoted 27 lines · Jan Beulich
Quoted 13 lines
Quoted 1 line
Quoted 1 line · On 04.09.17 at 10:17, <[email protected]> wrote:
Quoted 11 lines · Nicolas Iooss
Commit
d162809f85b4("xen/x86: Do not callxen_init_time_ops()untilshared_infois initialized") movedxen_init_time_ops()from__initto__refwithout updatingxen-ops.haccordingly. Fix this.Fixes d162809f85b4 ("xen/x86: Do not call xen_init_time_ops() until
shared_infois initialized")Signed-off-by Nicolas Iooss <[email protected]>--- arch/x86/xen/xen-ops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 14 lines
arch/x86/xen/xen-ops.h void xen_setup_runstate_info(int cpu); · line 73
Quoted 11 lines
arch/x86/xen/xen-ops.h +1
-1@@ -69,7 +69,7 @@ void xen_setup_runstate_info(int cpu);void xen_teardown_timer (int cpu);u64 xen_clocksource_read (void );void xen_setup_cpu_clockevents (void ); -void __init xen_init_time_ops (void ); +void __ref xen_init_time_ops (void );void __init xen_hvm_init_time_ops (void );When correcting this could you please modify the prototypes to comply to the intended form as noted in
include/linux/init.h(the__refor__initannotations should be just before the ending semicolon)?Quoted 3 lines
Why would these annotations be kept on the declarations anyway? Attributes affecting code/data placement generally belong on the definitions only.
Because:
a) That’s what the coding style says, and
b) So various static analysis can be done (e.g. sparse) on an individual translation unit basis.
Quoted 8 lines
Quoted 2 lines
Your objection to having annotations on declarations is why I've never got around to adding sparse to the hypervisor build.
Would you mind educating me what use these annotations can be for static analysis? If they're useful in headers, I would stop objecting to them being added there, but I'd then demand for them to never be present on non-static definitions (unless there are attributes where the compiler requires them to be repeated, but I think all attributes are cumulative).
For one, finding calls to __init functions from non __init functions.
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 40 lines · Jan Beulich
Quoted 40 lines
Quoted 1 line
Quoted 1 line · On 04.09.17 at 12:35, <[email protected]> wrote:
Quoted 27 lines · Jan Beulich
Quoted 13 lines
Quoted 1 line
Quoted 1 line · On 04.09.17 at 10:17, <[email protected]> wrote:
Quoted 11 lines · Nicolas Iooss
Commit
d162809f85b4("xen/x86: Do not callxen_init_time_ops()untilshared_infois initialized") movedxen_init_time_ops()from__initto__refwithout updatingxen-ops.haccordingly. Fix this.Fixes d162809f85b4 ("xen/x86: Do not call xen_init_time_ops() until
shared_infois initialized")Signed-off-by Nicolas Iooss <[email protected]>--- arch/x86/xen/xen-ops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 14 lines
arch/x86/xen/xen-ops.h void xen_setup_runstate_info(int cpu); · line 73
Quoted 11 lines
arch/x86/xen/xen-ops.h +1
-1@@ -69,7 +69,7 @@ void xen_setup_runstate_info(int cpu);void xen_teardown_timer (int cpu);u64 xen_clocksource_read (void );void xen_setup_cpu_clockevents (void ); -void __init xen_init_time_ops (void ); +void __ref xen_init_time_ops (void );void __init xen_hvm_init_time_ops (void );When correcting this could you please modify the prototypes to comply to the intended form as noted in
include/linux/init.h(the__refor__initannotations should be just before the ending semicolon)?Quoted 3 lines
Why would these annotations be kept on the declarations anyway? Attributes affecting code/data placement generally belong on the definitions only.
Because:
a) That’s what the coding style says, and
b) So various static analysis can be done (e.g. sparse) on an individual translation unit basis.
Quoted 8 lines
Quoted 2 lines
Your objection to having annotations on declarations is why I've never got around to adding sparse to the hypervisor build.
Would you mind educating me what use these annotations can be for static analysis? If they're useful in headers, I would stop objecting to them being added there, but I'd then demand for them to never be present on non-static definitions (unless there are attributes where the compiler requires them to be repeated, but I think all attributes are cumulative).
For one, finding calls to __init functions from non __init functions.
~Andrew
Quoted 44 lines
Quoted 1 line
Quoted 1 line · On 04.09.17 at 14:43, <[email protected]> wrote:
Quoted 42 lines · Jan Beulich
Quoted 42 lines
Quoted 1 line
Quoted 1 line · On 04.09.17 at 12:35, <[email protected]> wrote:
Quoted 27 lines · Jan Beulich
Quoted 13 lines
Quoted 1 line
Quoted 1 line · On 04.09.17 at 10:17, <[email protected]> wrote:
Quoted 11 lines · Nicolas Iooss
Commit
d162809f85b4("xen/x86: Do not callxen_init_time_ops()untilshared_infois initialized") movedxen_init_time_ops()from__initto__refwithout updatingxen-ops.haccordingly. Fix this.Fixes d162809f85b4 ("xen/x86: Do not call xen_init_time_ops() until
shared_infois initialized")Signed-off-by Nicolas Iooss <[email protected]>--- arch/x86/xen/xen-ops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 14 lines
arch/x86/xen/xen-ops.h void xen_setup_runstate_info(int cpu); · line 73
Quoted 11 lines
arch/x86/xen/xen-ops.h +1
-1@@ -69,7 +69,7 @@ void xen_setup_runstate_info(int cpu);void xen_teardown_timer (int cpu);u64 xen_clocksource_read (void );void xen_setup_cpu_clockevents (void ); -void __init xen_init_time_ops (void ); +void __ref xen_init_time_ops (void );void __init xen_hvm_init_time_ops (void );When correcting this could you please modify the prototypes to comply to the intended form as noted in
include/linux/init.h(the__refor__initannotations should be just before the ending semicolon)?Quoted 3 lines
Why would these annotations be kept on the declarations anyway? Attributes affecting code/data placement generally belong on the definitions only.
Because:
a) That’s what the coding style says, and
b) So various static analysis can be done (e.g. sparse) on an individual translation unit basis.
Your objection to having annotations on declarations is why I've never got around to adding sparse to the hypervisor build.
Quoted 8 lines
Quoted 6 lines
Would you mind educating me what use these annotations can be for static analysis? If they're useful in headers, I would stop objecting to them being added there, but I'd then demand for them to never be present on non-static definitions (unless there are attributes where the compiler requires them to be repeated, but I think all attributes are cumulative).
For one, finding calls to
__initfunctions from non__initfunctions.
Hmm, that's been solved differently on Linux, so I wouldn't have assumed this is something to use sparse for.
Jan
Quoted 44 lines
Quoted 1 line
Quoted 1 line · On 04.09.17 at 14:43, <[email protected]> wrote:
Quoted 42 lines · Jan Beulich
Quoted 42 lines
Quoted 1 line
Quoted 1 line · On 04.09.17 at 12:35, <[email protected]> wrote:
Quoted 27 lines · Jan Beulich
Quoted 13 lines
Quoted 1 line
Quoted 1 line · On 04.09.17 at 10:17, <[email protected]> wrote:
Quoted 11 lines · Nicolas Iooss
Commit
d162809f85b4("xen/x86: Do not callxen_init_time_ops()untilshared_infois initialized") movedxen_init_time_ops()from__initto__refwithout updatingxen-ops.haccordingly. Fix this.Fixes d162809f85b4 ("xen/x86: Do not call xen_init_time_ops() until
shared_infois initialized")Signed-off-by Nicolas Iooss <[email protected]>--- arch/x86/xen/xen-ops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 14 lines
arch/x86/xen/xen-ops.h void xen_setup_runstate_info(int cpu); · line 73
Quoted 11 lines
arch/x86/xen/xen-ops.h +1
-1@@ -69,7 +69,7 @@ void xen_setup_runstate_info(int cpu);void xen_teardown_timer (int cpu);u64 xen_clocksource_read (void );void xen_setup_cpu_clockevents (void ); -void __init xen_init_time_ops (void ); +void __ref xen_init_time_ops (void );void __init xen_hvm_init_time_ops (void );When correcting this could you please modify the prototypes to comply to the intended form as noted in
include/linux/init.h(the__refor__initannotations should be just before the ending semicolon)?Quoted 3 lines
Why would these annotations be kept on the declarations anyway? Attributes affecting code/data placement generally belong on the definitions only.
Because:
a) That’s what the coding style says, and
b) So various static analysis can be done (e.g. sparse) on an individual translation unit basis.
Your objection to having annotations on declarations is why I've never got around to adding sparse to the hypervisor build.
Quoted 8 lines
Quoted 6 lines
Would you mind educating me what use these annotations can be for static analysis? If they're useful in headers, I would stop objecting to them being added there, but I'd then demand for them to never be present on non-static definitions (unless there are attributes where the compiler requires them to be repeated, but I think all attributes are cumulative).
For one, finding calls to
__initfunctions from non__initfunctions.
Hmm, that's been solved differently on Linux, so I wouldn't have assumed this is something to use sparse for.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 35 lines
Quoted 1 line
Quoted 1 line · On 04.09.17 at 12:35, <[email protected]> wrote:
Quoted 27 lines · Jan Beulich
Quoted 13 lines
Quoted 1 line
Quoted 1 line · On 04.09.17 at 10:17, <[email protected]> wrote:
Quoted 11 lines · Nicolas Iooss
Commit
d162809f85b4("xen/x86: Do not callxen_init_time_ops()untilshared_infois initialized") movedxen_init_time_ops()from__initto__refwithout updatingxen-ops.haccordingly. Fix this.Fixes d162809f85b4 ("xen/x86: Do not call xen_init_time_ops() until
shared_infois initialized")Signed-off-by Nicolas Iooss <[email protected]>--- arch/x86/xen/xen-ops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 14 lines
arch/x86/xen/xen-ops.h void xen_setup_runstate_info(int cpu); · line 73
Quoted 11 lines
arch/x86/xen/xen-ops.h +1
-1@@ -69,7 +69,7 @@ void xen_setup_runstate_info(int cpu);void xen_teardown_timer (int cpu);u64 xen_clocksource_read (void );void xen_setup_cpu_clockevents (void ); -void __init xen_init_time_ops (void ); +void __ref xen_init_time_ops (void );void __init xen_hvm_init_time_ops (void );When correcting this could you please modify the prototypes to comply to the intended form as noted in
include/linux/init.h(the__refor__initannotations should be just before the ending semicolon)?Quoted 3 lines
Why would these annotations be kept on the declarations anyway? Attributes affecting code/data placement generally belong on the definitions only.
Because:
Quoted 8 lines
a) That’s what the coding style says, and
b) So various static analysis can be done (e.g. sparse) on an individual translation unit basis.
Your objection to having annotations on declarations is why I've never got around to adding sparse to the hypervisor build.
Would you mind educating me what use these annotations can be for static analysis? If they're useful in headers, I would stop objecting to them being added there, but I'd then demand for them to never be present on non-static definitions (unless there are attributes where the compiler requires them to be repeated, but I think all attributes are cumulative).
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 27 lines · Jan Beulich
Quoted 13 lines
Quoted 1 line
Quoted 1 line · On 04.09.17 at 10:17, <[email protected]> wrote:
Quoted 11 lines · Nicolas Iooss
Commit
d162809f85b4("xen/x86: Do not callxen_init_time_ops()untilshared_infois initialized") movedxen_init_time_ops()from__initto__refwithout updatingxen-ops.haccordingly. Fix this.Fixes d162809f85b4 ("xen/x86: Do not call xen_init_time_ops() until
shared_infois initialized")Signed-off-by Nicolas Iooss <[email protected]>--- arch/x86/xen/xen-ops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 14 lines
arch/x86/xen/xen-ops.h void xen_setup_runstate_info(int cpu); · line 73
Quoted 11 lines
arch/x86/xen/xen-ops.h +1
-1@@ -69,7 +69,7 @@ void xen_setup_runstate_info(int cpu);void xen_teardown_timer (int cpu);u64 xen_clocksource_read (void );void xen_setup_cpu_clockevents (void ); -void __init xen_init_time_ops (void ); +void __ref xen_init_time_ops (void );void __init xen_hvm_init_time_ops (void );When correcting this could you please modify the prototypes to comply to the intended form as noted in
include/linux/init.h(the__refor__initannotations should be just before the ending semicolon)?
Quoted 3 lines
Why would these annotations be kept on the declarations anyway? Attributes affecting code/data placement generally belong on the definitions only.
Because:
a) That’s what the coding style says, and
b) So various static analysis can be done (e.g. sparse) on an individual translation unit basis.
Your objection to having annotations on declarations is why I've never got around to adding sparse to the hypervisor build.
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 13 lines
Quoted 1 line
Quoted 1 line · On 04.09.17 at 10:17, <[email protected]> wrote:
Quoted 11 lines · Nicolas Iooss
Commit
d162809f85b4("xen/x86: Do not callxen_init_time_ops()untilshared_infois initialized") movedxen_init_time_ops()from__initto__refwithout updatingxen-ops.haccordingly. Fix this.Fixes d162809f85b4 ("xen/x86: Do not call xen_init_time_ops() until
shared_infois initialized")Signed-off-by Nicolas Iooss <[email protected]>--- arch/x86/xen/xen-ops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 15 lines
arch/x86/xen/xen-ops.h void xen_setup_runstate_info(int cpu); · line 73
Quoted 11 lines
arch/x86/xen/xen-ops.h +1
-1@@ -69,7 +69,7 @@ void xen_setup_runstate_info(int cpu);void xen_teardown_timer (int cpu);u64 xen_clocksource_read (void );void xen_setup_cpu_clockevents (void ); -void __init xen_init_time_ops (void ); +void __ref xen_init_time_ops (void );void __init xen_hvm_init_time_ops (void );When correcting this could you please modify the prototypes to comply to the intended form as noted in
include/linux/init.h(the__refor__initannotations should be just before the ending semicolon)?
Why would these annotations be kept on the declarations anyway? Attributes affecting code/data placement generally belong on the definitions only.
I also question the suggested placement, despite init.h saying so.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Juergen Gross
maintainerQuoted 16 lines · Nicolas Iooss
Commit
d162809f85b4("xen/x86: Do not callxen_init_time_ops()untilshared_infois initialized") movedxen_init_time_ops()from__initto__refwithout updatingxen-ops.haccordingly. Fix this.Fixes d162809f85b4 ("xen/x86: Do not call xen_init_time_ops() until
shared_infois initialized")Signed-off-by Nicolas Iooss <[email protected]>--- arch/x86/xen/xen-ops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/x86/xen/xen-ops.h +0
-0
arch/x86/xen/xen-ops.h void xen_setup_runstate_info(int cpu); · line 73
Quoted 6 lines
arch/x86/xen/xen-ops.h +1
-1@@ -69,7 +69,7 @@ void xen_setup_runstate_info(int cpu);void xen_teardown_timer (int cpu);u64 xen_clocksource_read (void );void xen_setup_cpu_clockevents (void ); -void __init xen_init_time_ops (void ); +void __ref xen_init_time_ops (void );void __init xen_hvm_init_time_ops (void );
When correcting this could you please modify the prototypes to comply to the intended form as noted in include/linux/init.h (the __ref or __init annotations should be just before the ending semicolon)?
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel