* [PATCH v3 2/9] x86: move common_interrupt to entry.S
@ 2014-04-28 3:14 Feng Wu
2014-04-28 9:16 ` Jan Beulich
2014-04-28 9:25 ` Andrew Cooper
0 siblings, 2 replies; 6+ messages in thread
From: Feng Wu @ 2014-04-28 3:14 UTC (permalink / raw)
To: xen-devel
Cc: kevin.tian, Feng Wu, JBeulich, andrew.cooper3, eddie.dong,
jun.nakajima, ian.campbell
This patch moves label common_interrupt from asm_defns.h to entry.S
Signed-off-by: Feng Wu <feng.wu@intel.com>
---
xen/arch/x86/i8259.c | 4 ----
xen/arch/x86/x86_64/entry.S | 6 ++++++
xen/include/asm-x86/x86_64/asm_defns.h | 9 ---------
3 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/xen/arch/x86/i8259.c b/xen/arch/x86/i8259.c
index 6fdcce8..cd4d097 100644
--- a/xen/arch/x86/i8259.c
+++ b/xen/arch/x86/i8259.c
@@ -33,10 +33,6 @@
* interrupt-controller happy.
*/
-__asm__(".section .text");
-
-BUILD_COMMON_IRQ()
-
#define IRQ_NAME(nr) VEC##nr##_interrupt
#define BI(nr) \
diff --git a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S
index 3ea4683..1c81852 100644
--- a/xen/arch/x86/x86_64/entry.S
+++ b/xen/arch/x86/x86_64/entry.S
@@ -465,6 +465,12 @@ ENTRY(dom_crash_sync_extable)
xorl %edi,%edi
jmp asm_domain_crash_synchronous /* Does not return */
+ENTRY(common_interrupt)
+ SAVE_ALL
+ movq %rsp,%rdi
+ callq do_IRQ
+ jmp ret_from_intr
+
/* No special register assumptions. */
ENTRY(ret_from_intr)
GET_CURRENT(%rbx)
diff --git a/xen/include/asm-x86/x86_64/asm_defns.h b/xen/include/asm-x86/x86_64/asm_defns.h
index bf63ac1..cb5669d 100644
--- a/xen/include/asm-x86/x86_64/asm_defns.h
+++ b/xen/include/asm-x86/x86_64/asm_defns.h
@@ -208,15 +208,6 @@
#define REX64_PREFIX "rex64/"
#endif
-#define BUILD_COMMON_IRQ() \
-__asm__( \
- "\n" __ALIGN_STR"\n" \
- "common_interrupt:\n\t" \
- STR(SAVE_ALL) "\n\t" \
- "movq %rsp,%rdi\n\t" \
- "callq " STR(do_IRQ) "\n\t" \
- "jmp ret_from_intr\n");
-
#define BUILD_IRQ(nr) \
"pushq $0\n\t" \
"movl $"#nr",4(%rsp)\n\t" \
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v3 2/9] x86: move common_interrupt to entry.S
2014-04-28 3:14 [PATCH v3 2/9] x86: move common_interrupt to entry.S Feng Wu
@ 2014-04-28 9:16 ` Jan Beulich
2014-04-28 9:25 ` Wu, Feng
2014-04-28 9:25 ` Andrew Cooper
1 sibling, 1 reply; 6+ messages in thread
From: Jan Beulich @ 2014-04-28 9:16 UTC (permalink / raw)
To: Feng Wu
Cc: kevin.tian, ian.campbell, andrew.cooper3, eddie.dong, xen-devel,
jun.nakajima
>>> On 28.04.14 at 05:14, <feng.wu@intel.com> wrote:
> --- a/xen/arch/x86/i8259.c
> +++ b/xen/arch/x86/i8259.c
> @@ -33,10 +33,6 @@
> * interrupt-controller happy.
> */
>
> -__asm__(".section .text");
I don't think you can remove this without having removed ...
> -
> -BUILD_COMMON_IRQ()
> -
> #define IRQ_NAME(nr) VEC##nr##_interrupt
>
> #define BI(nr) \
... everything from here downwards relating to the entry point
construction.
With that fixed,
Reviewed-by: Jan Beulich <jbeulich@suse.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 2/9] x86: move common_interrupt to entry.S
2014-04-28 9:16 ` Jan Beulich
@ 2014-04-28 9:25 ` Wu, Feng
0 siblings, 0 replies; 6+ messages in thread
From: Wu, Feng @ 2014-04-28 9:25 UTC (permalink / raw)
To: Jan Beulich
Cc: Tian, Kevin, ian.campbell@citrix.com, andrew.cooper3@citrix.com,
Dong, Eddie, xen-devel@lists.xen.org, Nakajima, Jun
> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@suse.com]
> Sent: Monday, April 28, 2014 5:16 PM
> To: Wu, Feng
> Cc: andrew.cooper3@citrix.com; ian.campbell@citrix.com; Dong, Eddie;
> Nakajima, Jun; Tian, Kevin; xen-devel@lists.xen.org
> Subject: Re: [PATCH v3 2/9] x86: move common_interrupt to entry.S
>
> >>> On 28.04.14 at 05:14, <feng.wu@intel.com> wrote:
> > --- a/xen/arch/x86/i8259.c
> > +++ b/xen/arch/x86/i8259.c
> > @@ -33,10 +33,6 @@
> > * interrupt-controller happy.
> > */
> >
> > -__asm__(".section .text");
>
> I don't think you can remove this without having removed ...
>
> > -
> > -BUILD_COMMON_IRQ()
> > -
> > #define IRQ_NAME(nr) VEC##nr##_interrupt
> >
> > #define BI(nr) \
>
> ... everything from here downwards relating to the entry point
> construction.
I will add "__asm__(".section .text");" back.
>
> With that fixed,
> Reviewed-by: Jan Beulich <jbeulich@suse.com>
Thanks,
Feng
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 2/9] x86: move common_interrupt to entry.S
2014-04-28 3:14 [PATCH v3 2/9] x86: move common_interrupt to entry.S Feng Wu
2014-04-28 9:16 ` Jan Beulich
@ 2014-04-28 9:25 ` Andrew Cooper
2014-04-28 9:48 ` Jan Beulich
1 sibling, 1 reply; 6+ messages in thread
From: Andrew Cooper @ 2014-04-28 9:25 UTC (permalink / raw)
To: Feng Wu
Cc: kevin.tian, ian.campbell, eddie.dong, xen-devel, JBeulich,
jun.nakajima
On 28/04/14 04:14, Feng Wu wrote:
> This patch moves label common_interrupt from asm_defns.h to entry.S
>
> Signed-off-by: Feng Wu <feng.wu@intel.com>
I am fairly sure the __asm__(".section .text"); was bogus, given no
obvious special case hacks play with the sections of this file.
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
> xen/arch/x86/i8259.c | 4 ----
> xen/arch/x86/x86_64/entry.S | 6 ++++++
> xen/include/asm-x86/x86_64/asm_defns.h | 9 ---------
> 3 files changed, 6 insertions(+), 13 deletions(-)
>
> diff --git a/xen/arch/x86/i8259.c b/xen/arch/x86/i8259.c
> index 6fdcce8..cd4d097 100644
> --- a/xen/arch/x86/i8259.c
> +++ b/xen/arch/x86/i8259.c
> @@ -33,10 +33,6 @@
> * interrupt-controller happy.
> */
>
> -__asm__(".section .text");
> -
> -BUILD_COMMON_IRQ()
> -
> #define IRQ_NAME(nr) VEC##nr##_interrupt
>
> #define BI(nr) \
> diff --git a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S
> index 3ea4683..1c81852 100644
> --- a/xen/arch/x86/x86_64/entry.S
> +++ b/xen/arch/x86/x86_64/entry.S
> @@ -465,6 +465,12 @@ ENTRY(dom_crash_sync_extable)
> xorl %edi,%edi
> jmp asm_domain_crash_synchronous /* Does not return */
>
> +ENTRY(common_interrupt)
> + SAVE_ALL
> + movq %rsp,%rdi
> + callq do_IRQ
> + jmp ret_from_intr
> +
> /* No special register assumptions. */
> ENTRY(ret_from_intr)
> GET_CURRENT(%rbx)
> diff --git a/xen/include/asm-x86/x86_64/asm_defns.h b/xen/include/asm-x86/x86_64/asm_defns.h
> index bf63ac1..cb5669d 100644
> --- a/xen/include/asm-x86/x86_64/asm_defns.h
> +++ b/xen/include/asm-x86/x86_64/asm_defns.h
> @@ -208,15 +208,6 @@
> #define REX64_PREFIX "rex64/"
> #endif
>
> -#define BUILD_COMMON_IRQ() \
> -__asm__( \
> - "\n" __ALIGN_STR"\n" \
> - "common_interrupt:\n\t" \
> - STR(SAVE_ALL) "\n\t" \
> - "movq %rsp,%rdi\n\t" \
> - "callq " STR(do_IRQ) "\n\t" \
> - "jmp ret_from_intr\n");
> -
> #define BUILD_IRQ(nr) \
> "pushq $0\n\t" \
> "movl $"#nr",4(%rsp)\n\t" \
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 2/9] x86: move common_interrupt to entry.S
2014-04-28 9:25 ` Andrew Cooper
@ 2014-04-28 9:48 ` Jan Beulich
2014-04-28 9:49 ` Andrew Cooper
0 siblings, 1 reply; 6+ messages in thread
From: Jan Beulich @ 2014-04-28 9:48 UTC (permalink / raw)
To: Andrew Cooper, Feng Wu
Cc: kevin.tian, eddie.dong, ian.campbell, jun.nakajima, xen-devel
>>> On 28.04.14 at 11:25, <andrew.cooper3@citrix.com> wrote:
> On 28/04/14 04:14, Feng Wu wrote:
>> This patch moves label common_interrupt from asm_defns.h to entry.S
>>
>> Signed-off-by: Feng Wu <feng.wu@intel.com>
>
> I am fairly sure the __asm__(".section .text"); was bogus, given no
> obvious special case hacks play with the sections of this file.
I'm fairly sure it's needed, and - what may make things worse - only
with some compiler versions: If the compiler emitted any data before
processing the file scope asm()s, the code generated here would end
up in that data section.
Jan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 2/9] x86: move common_interrupt to entry.S
2014-04-28 9:48 ` Jan Beulich
@ 2014-04-28 9:49 ` Andrew Cooper
0 siblings, 0 replies; 6+ messages in thread
From: Andrew Cooper @ 2014-04-28 9:49 UTC (permalink / raw)
To: Jan Beulich
Cc: kevin.tian, Feng Wu, ian.campbell, eddie.dong, xen-devel,
jun.nakajima
On 28/04/14 10:48, Jan Beulich wrote:
>>>> On 28.04.14 at 11:25, <andrew.cooper3@citrix.com> wrote:
>> On 28/04/14 04:14, Feng Wu wrote:
>>> This patch moves label common_interrupt from asm_defns.h to entry.S
>>>
>>> Signed-off-by: Feng Wu <feng.wu@intel.com>
>> I am fairly sure the __asm__(".section .text"); was bogus, given no
>> obvious special case hacks play with the sections of this file.
> I'm fairly sure it's needed, and - what may make things worse - only
> with some compiler versions: If the compiler emitted any data before
> processing the file scope asm()s, the code generated here would end
> up in that data section.
>
> Jan
Ah ok. In which case it needs to be kept until all the interrupt logic
has moved.
~Andrew
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-04-28 9:49 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-28 3:14 [PATCH v3 2/9] x86: move common_interrupt to entry.S Feng Wu
2014-04-28 9:16 ` Jan Beulich
2014-04-28 9:25 ` Wu, Feng
2014-04-28 9:25 ` Andrew Cooper
2014-04-28 9:48 ` Jan Beulich
2014-04-28 9:49 ` Andrew Cooper
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.