ia64/xen-unstable

changeset 9475:4109c4e7804a

Change do_IRQ high bit masking.
Allow more than 256 interrupt vectors on native by only setting the
highest bit when marking orig_eax to indicate that we're not within
a system call.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Tue Mar 28 14:19:22 2006 +0100 (2006-03-28)
parents 98eaa430bdf3
children d75a6cc5e68a 5b1a10f9da4c
files linux-2.6-xen-sparse/arch/i386/kernel/entry-xen.S linux-2.6-xen-sparse/arch/i386/kernel/irq-xen.c linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S linux-2.6-xen-sparse/arch/x86_64/kernel/irq-xen.c linux-2.6-xen-sparse/drivers/xen/core/evtchn.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/entry-xen.S	Tue Mar 28 13:45:08 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/entry-xen.S	Tue Mar 28 14:19:22 2006 +0100
     1.3 @@ -462,7 +462,7 @@ vector=0
     1.4  ENTRY(irq_entries_start)
     1.5  .rept NR_IRQS
     1.6  	ALIGN
     1.7 -1:	pushl $vector-256
     1.8 +1:	pushl 0x80000000+$vector
     1.9  	jmp common_interrupt
    1.10  .data
    1.11  	.long 1b
    1.12 @@ -479,7 +479,7 @@ common_interrupt:
    1.13  
    1.14  #define BUILD_INTERRUPT(name, nr)	\
    1.15  ENTRY(name)				\
    1.16 -	pushl $nr-256;			\
    1.17 +	pushl 0x80000000+$nr;		\
    1.18  	SAVE_ALL			\
    1.19  	movl %esp,%eax;			\
    1.20  	call smp_/**/name;		\
     2.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/irq-xen.c	Tue Mar 28 13:45:08 2006 +0100
     2.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/irq-xen.c	Tue Mar 28 14:19:22 2006 +0100
     2.3 @@ -53,8 +53,8 @@ static union irq_ctx *softirq_ctx[NR_CPU
     2.4   */
     2.5  fastcall unsigned int do_IRQ(struct pt_regs *regs)
     2.6  {	
     2.7 -	/* high bits used in ret_from_ code */
     2.8 -	int irq = regs->orig_eax & __IRQ_MASK(HARDIRQ_BITS);
     2.9 +	/* high bit used in ret_from_ code */
    2.10 +	int irq = regs->orig_eax & __IRQ_MASK(BITS_PER_LONG - 1);
    2.11  #ifdef CONFIG_4KSTACKS
    2.12  	union irq_ctx *curctx, *irqctx;
    2.13  	u32 *isp;
     3.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S	Tue Mar 28 13:45:08 2006 +0100
     3.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S	Tue Mar 28 14:19:22 2006 +0100
     3.3 @@ -584,7 +584,7 @@ retint_kernel:
     3.4   */		
     3.5  	.macro apicinterrupt num,func
     3.6  	INTR_FRAME
     3.7 -	pushq $\num-256
     3.8 +	pushq 0x8000000000000000+$\num
     3.9  	CFI_ADJUST_CFA_OFFSET 8
    3.10  	interrupt \func
    3.11  	jmp error_entry
     4.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/irq-xen.c	Tue Mar 28 13:45:08 2006 +0100
     4.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/irq-xen.c	Tue Mar 28 14:19:22 2006 +0100
     4.3 @@ -96,8 +96,8 @@ skip:
     4.4   */
     4.5  asmlinkage unsigned int do_IRQ(struct pt_regs *regs)
     4.6  {	
     4.7 -	/* high bits used in ret_from_ code  */
     4.8 -        int irq = regs->orig_rax & __IRQ_MASK(HARDIRQ_BITS);
     4.9 +	/* high bit used in ret_from_ code  */
    4.10 +        int irq = regs->orig_rax & __IRQ_MASK(BITS_PER_LONG - 1);
    4.11  
    4.12  	exit_idle();
    4.13  	irq_enter();
     5.1 --- a/linux-2.6-xen-sparse/drivers/xen/core/evtchn.c	Tue Mar 28 13:45:08 2006 +0100
     5.2 +++ b/linux-2.6-xen-sparse/drivers/xen/core/evtchn.c	Tue Mar 28 14:19:22 2006 +0100
     5.3 @@ -170,9 +170,9 @@ static inline void exit_idle(void) {}
     5.4  #include <asm/idle.h>
     5.5  #define IRQ_REG orig_rax
     5.6  #endif
     5.7 -#define do_IRQ(irq, regs) do {			\
     5.8 -	(regs)->IRQ_REG = (irq);		\
     5.9 -	do_IRQ((regs));				\
    5.10 +#define do_IRQ(irq, regs) do {					\
    5.11 +	(regs)->IRQ_REG = (irq) | (1UL << (BITS_PER_LONG - 1));	\
    5.12 +	do_IRQ((regs));						\
    5.13  } while (0)
    5.14  #endif
    5.15