arm: fix build after c/s 25477:e12e0b038219
PATCH 1/1 arm: fix build after c/s 25477:e12e0b038219
Only x86 currently has a struct vcpu field arch.gdbsx_vcpu_event. But as the whole function domain_pause_for_debugger() is pointless to be compiled when there's no arch support, simply introduce another HAS_* macro, enabled only on x86.
xen/Rules.mk +1 -0
@@ -51,6 +51,7 @@ CFLAGS-$(perfc) += -DPERF_COUNTE CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS CFLAGS-$(lock_profile) += -DLOCK_PROFILE CFLAGS-$(HAS_ACPI) += -DHAS_ACPI +CFLAGS-$(HAS_GDBSX) += -DHAS_GDBSX CFLAGS-$(HAS_PASSTHROUGH) += -DHAS_PASSTHROUGH CFLAGS-$(frame_pointer) += -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER
xen/arch/x86/Rules.mk +1 -0
@@ -9,6 +9,7 @@ HAS_PASSTHROUGH := y HAS_NS16550 := y HAS_EHCI := y HAS_KEXEC := y +HAS_GDBSX := y xenoprof := y #
xen/common/domain.c +2 -0
@@ -612,6 +612,7 @@ void vcpu_end_shutdown_deferral(struct vvcpu_check_shutdown (v); } +#ifdef HAS_GDBSX void domain_pause_for_debugger (void ) {struct domain *d = current->domain;
@@ -628,6 +629,7 @@ void domain_pause_for_debugger(void)if (current->arch.gdbsx_vcpu_event ==0 ) send_global_virq(VIRQ_DEBUGGER); } +#endif /* Complete domain destroy after RCU readers are not holding old references. */ static void complete_domain_destroy (struct rcu_head *head)
arm: fix build after c/s 25477:e12e0b038219
Only x86 currently has a struct vcpu field arch.gdbsx_vcpu_event. But as the whole function domain_pause_for_debugger() is pointless to be compiled when there's no arch support, simply introduce another HAS_* macro, enabled only on x86.
xen/Rules.mk +1 -0
@@ -51,6 +51,7 @@ CFLAGS-$(perfc) += -DPERF_COUNTE CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS CFLAGS-$(lock_profile) += -DLOCK_PROFILE CFLAGS-$(HAS_ACPI) += -DHAS_ACPI +CFLAGS-$(HAS_GDBSX) += -DHAS_GDBSX CFLAGS-$(HAS_PASSTHROUGH) += -DHAS_PASSTHROUGH CFLAGS-$(frame_pointer) += -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER
xen/arch/x86/Rules.mk +1 -0
@@ -9,6 +9,7 @@ HAS_PASSTHROUGH := y HAS_NS16550 := y HAS_EHCI := y HAS_KEXEC := y +HAS_GDBSX := y xenoprof := y #
xen/common/domain.c +2 -0
@@ -612,6 +612,7 @@ void vcpu_end_shutdown_deferral(struct vvcpu_check_shutdown (v); } +#ifdef HAS_GDBSX void domain_pause_for_debugger (void ) {struct domain *d = current->domain;
@@ -628,6 +629,7 @@ void domain_pause_for_debugger(void)if (current->arch.gdbsx_vcpu_event ==0 ) send_global_virq(VIRQ_DEBUGGER); } +#endif /* Complete domain destroy after RCU readers are not holding old references. */ static void complete_domain_destroy (struct rcu_head *head)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 6 lines · Jan Beulich
Only x86 currently has a struct vcpu field arch.gdbsx_vcpu_event. But as the whole function
domain_pause_for_debugger()is pointless to be compiled when there's no arch support, simply introduce another HAS_* macro, enabled only on x86.Signed-off-by Jan Beulich <[email protected]>
Quoted 42 lines
xen/Rules.mk +1
-0@@ -51,6 +51,7 @@ CFLAGS-$(perfc) += -DPERF_COUNTE CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS CFLAGS-$(lock_profile) += -DLOCK_PROFILE CFLAGS-$(HAS_ACPI) += -DHAS_ACPI +CFLAGS-$(HAS_GDBSX) += -DHAS_GDBSX CFLAGS-$(HAS_PASSTHROUGH) += -DHAS_PASSTHROUGH CFLAGS-$(frame_pointer) += -fno-omit-frame-pointer -DCONFIG_FRAME_POINTERxen/arch/x86/Rules.mk +1
-0@@ -9,6 +9,7 @@ HAS_PASSTHROUGH := y HAS_NS16550 := y HAS_EHCI := y HAS_KEXEC := y +HAS_GDBSX := y xenoprof := y #xen/common/domain.c +2
-0@@ -612,6 +612,7 @@ void vcpu_end_shutdown_deferral(struct vvcpu_check_shutdown (v); } +#ifdef HAS_GDBSX void domain_pause_for_debugger (void ) {struct domain *d = current->domain;@@ -628,6 +629,7 @@ void domain_pause_for_debugger(void)if (current->arch.gdbsx_vcpu_event ==0 ) send_global_virq(VIRQ_DEBUGGER); } +#endif /* Complete domain destroy after RCU readers are not holding old references. */ static void complete_domain_destroy (struct rcu_head *head)
Quoted 10 lines
Quoted 1 line
Quoted 1 line · Ian Campbell
Quoted 6 lines · Jan Beulich
Only x86 currently has a struct vcpu field arch.gdbsx_vcpu_event. But as the whole function
domain_pause_for_debugger()is pointless to be compiled when there's no arch support, simply introduce another HAS_* macro, enabled only on x86.Signed-off-by Jan Beulich <[email protected]>Acked-by Ian Campbell <[email protected]>
Hi Keir,
the subject was probably badly chosen to catch your attention, but as the patch touches only non-ARM code (in order to make ARM build again) it needs your approval for me to commit.
Jan
Quoted 42 lines
Quoted 31 lines
xen/Rules.mk +1
-0@@ -51,6 +51,7 @@ CFLAGS-$(perfc) += -DPERF_COUNTE CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS CFLAGS-$(lock_profile) += -DLOCK_PROFILE CFLAGS-$(HAS_ACPI) += -DHAS_ACPI +CFLAGS-$(HAS_GDBSX) += -DHAS_GDBSX CFLAGS-$(HAS_PASSTHROUGH) += -DHAS_PASSTHROUGH CFLAGS-$(frame_pointer) += -fno-omit-frame-pointer -DCONFIG_FRAME_POINTERxen/arch/x86/Rules.mk +1
-0@@ -9,6 +9,7 @@ HAS_PASSTHROUGH := y HAS_NS16550 := y HAS_EHCI := y HAS_KEXEC := y +HAS_GDBSX := y xenoprof := y #xen/common/domain.c +1
-0@@ -612,6 +612,7 @@ void vcpu_end_shutdown_deferral(struct vvcpu_check_shutdown (v); } +#ifdef HAS_GDBSX void domain_pause_for_debugger (void ) {struct domain *d = current->domain;xen/common/domain.c void domain_pause_for_debugger(void) · line 634
Quoted 6 lines
xen/common/domain.c +1
-0@@ -628,6 +629,7 @@ void domain_pause_for_debugger(void)if (current->arch.gdbsx_vcpu_event ==0 ) send_global_virq(VIRQ_DEBUGGER); } +#endif /* Complete domain destroy after RCU readers are not holding old references. */
Quoted 4 lines
xen/common/domain.c +0
-0static void complete_domain_destroy (struct rcu_head *head)
Quoted 6 lines · Jan Beulich
Only x86 currently has a struct vcpu field arch.gdbsx_vcpu_event. But as the whole function
domain_pause_for_debugger()is pointless to be compiled when there's no arch support, simply introduce another HAS_* macro, enabled only on x86.Signed-off-by Jan Beulich <[email protected]>
How did arch/arm build at all then, previously, with this function present for a long time in common code? Would a better fix be just to move the function to arch/x86/domain.c, since it is only called by arch/x86?
-- Keir
Quoted 46 lines
xen/Rules.mk +1
-0@@ -51,6 +51,7 @@ CFLAGS-$(perfc) += -DPERF_COUNTE CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS CFLAGS-$(lock_profile) += -DLOCK_PROFILE CFLAGS-$(HAS_ACPI) += -DHAS_ACPI +CFLAGS-$(HAS_GDBSX) += -DHAS_GDBSX CFLAGS-$(HAS_PASSTHROUGH) += -DHAS_PASSTHROUGH CFLAGS-$(frame_pointer) += -fno-omit-frame-pointer -DCONFIG_FRAME_POINTERxen/arch/x86/Rules.mk +1
-0@@ -9,6 +9,7 @@ HAS_PASSTHROUGH := y HAS_NS16550 := y HAS_EHCI := y HAS_KEXEC := y +HAS_GDBSX := y xenoprof := y #xen/common/domain.c +2
-0@@ -612,6 +612,7 @@ void vcpu_end_shutdown_deferral(struct vvcpu_check_shutdown (v); } +#ifdef HAS_GDBSX void domain_pause_for_debugger (void ) {struct domain *d = current->domain;@@ -628,6 +629,7 @@ void domain_pause_for_debugger(void)if (current->arch.gdbsx_vcpu_event ==0 ) send_global_virq(VIRQ_DEBUGGER); } +#endif /* Complete domain destroy after RCU readers are not holding old references. */ static void
complete_domain_destroy(struct rcu_head *head)_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 8 lines
Quoted 1 line
Quoted 1 line · Keir Fraser
Quoted 5 lines · Jan Beulich
Only x86 currently has a struct vcpu field arch.gdbsx_vcpu_event. But as the whole function
domain_pause_for_debugger()is pointless to be compiled when there's no arch support, simply introduce another HAS_* macro, enabled only on x86.
Quoted 4 lines
Quoted 1 line
Signed-off-by Jan Beulich <[email protected]>How did
arch/armbuild at all then, previously, with this function present for a long time in common code?
Prior to said c/s adding a reference to ->arch.gdbsx_vcpu_event, the function wasn't arch-specific at all.
Quoted 2 lines
Would a better fix be just to move the
function toarch/x86/domain.c, since it is only called byarch/x86?
I'd say no - the function really ought to be generic. Any arch wanting gdbsx support would have to add a respective field to its arch_vcpu. Or alternatively the field itself should get moved into struct vcpu, perhaps dependent upon some CONFIG_*. (This is also why I didn't want to put in e.g. a CONFIG_X86 conditional, which would have been a smaller change.)
Jan
Quoted 47 lines
Quoted 31 lines
xen/Rules.mk +1
-0@@ -51,6 +51,7 @@ CFLAGS-$(perfc) += -DPERF_COUNTE CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS CFLAGS-$(lock_profile) += -DLOCK_PROFILE CFLAGS-$(HAS_ACPI) += -DHAS_ACPI +CFLAGS-$(HAS_GDBSX) += -DHAS_GDBSX CFLAGS-$(HAS_PASSTHROUGH) += -DHAS_PASSTHROUGH CFLAGS-$(frame_pointer) += -fno-omit-frame-pointer -DCONFIG_FRAME_POINTERxen/arch/x86/Rules.mk +1
-0@@ -9,6 +9,7 @@ HAS_PASSTHROUGH := y HAS_NS16550 := y HAS_EHCI := y HAS_KEXEC := y +HAS_GDBSX := y xenoprof := y #xen/common/domain.c +1
-0@@ -612,6 +612,7 @@ void vcpu_end_shutdown_deferral(struct vvcpu_check_shutdown (v); } +#ifdef HAS_GDBSX void domain_pause_for_debugger (void ) {struct domain *d = current->domain;xen/common/domain.c void domain_pause_for_debugger(void) · line 634
Quoted 6 lines
xen/common/domain.c +1
-0@@ -628,6 +629,7 @@ void domain_pause_for_debugger(void)if (current->arch.gdbsx_vcpu_event ==0 ) send_global_virq(VIRQ_DEBUGGER); } +#endif /* Complete domain destroy after RCU readers are not holding old references.
Quoted 9 lines
xen/common/domain.c +0
-0*/ static void
complete_domain_destroy(struct rcu_head *head)_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Keir Fraser
Acked-byQuoted 8 lines · Jan Beulich
Quoted 8 lines
Quoted 1 line
Quoted 1 line · Keir Fraser
Quoted 5 lines · Jan Beulich
Only x86 currently has a struct vcpu field arch.gdbsx_vcpu_event. But as the whole function
domain_pause_for_debugger()is pointless to be compiled when there's no arch support, simply introduce another HAS_* macro, enabled only on x86.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Jan Beulich <[email protected]>How did
arch/armbuild at all then, previously, with this function present for a long time in common code?Prior to said c/s adding a reference to ->arch.gdbsx_vcpu_event, the function wasn't arch-specific at all.
Ah yes, of course. :)
Quoted 9 lines
Quoted 2 lines
Would a better fix be just to move the
function toarch/x86/domain.c, since it is only called byarch/x86?I'd say no - the function really ought to be generic. Any arch wanting gdbsx support would have to add a respective field to its
arch_vcpu. Or alternatively the field itself should get moved into struct vcpu, perhaps dependent upon some CONFIG_*. (This is also why I didn't want to put in e.g. aCONFIG_X86conditional, which would have been a smaller change.)
Well, fine then.
Quoted 52 lines
Jan
Quoted 47 lines
Quoted 31 lines
xen/Rules.mk +1
-0@@ -51,6 +51,7 @@ CFLAGS-$(perfc) += -DPERF_COUNTE CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS CFLAGS-$(lock_profile) += -DLOCK_PROFILE CFLAGS-$(HAS_ACPI) += -DHAS_ACPI +CFLAGS-$(HAS_GDBSX) += -DHAS_GDBSX CFLAGS-$(HAS_PASSTHROUGH) += -DHAS_PASSTHROUGH CFLAGS-$(frame_pointer) += -fno-omit-frame-pointer -DCONFIG_FRAME_POINTERxen/arch/x86/Rules.mk +1
-0@@ -9,6 +9,7 @@ HAS_PASSTHROUGH := y HAS_NS16550 := y HAS_EHCI := y HAS_KEXEC := y +HAS_GDBSX := y xenoprof := y #xen/common/domain.c +1
-0@@ -612,6 +612,7 @@ void vcpu_end_shutdown_deferral(struct vvcpu_check_shutdown (v); } +#ifdef HAS_GDBSX void domain_pause_for_debugger (void ) {struct domain *d = current->domain;xen/common/domain.c void domain_pause_for_debugger(void) · line 634
Quoted 6 lines
xen/common/domain.c +1
-0@@ -628,6 +629,7 @@ void domain_pause_for_debugger(void)if (current->arch.gdbsx_vcpu_event ==0 ) send_global_virq(VIRQ_DEBUGGER); } +#endif /* Complete domain destroy after RCU readers are not holding old references.
Quoted 9 lines
xen/common/domain.c +0
-0*/ static void
complete_domain_destroy(struct rcu_head *head)_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel