ipipe-2.6.38-x86
The following changes since commit c6ef3e86ff13163e416f3f91df8a4df2ca36bcb3:
ipipe: x86: Fix 64-bit IRQ exit path (2011-06-04 16:16:52 +0200)
are available in the git repository at:
git://git.kiszka.org/ipipe queues/2.6.38-x86
Shortened summary below. Excluded:
Jan Kiszka (1):
Merge branch 'queues/2.6.38-noarch' into queues/2.6.38-x86
One last wish: Please create the arch branches by forking off from noarch, not from mainline. That avoids needless merge conflicts when pulling in noarch updates later on. Thanks!
Jan Kiszka (5):
ipipe: x86: Fix irq->vector lookup for IRQ_MOVE_CLEANUP_VECTOR
ipipe: x86: Optimize ipipe_percpu_domain_data::status accesses
ipipe: x86: Fix flags corruption in arch_mangle_irq_bits on 64-bit
systems
ipipe: x86: Unbreak !CONFIG_SPARSE_IRQ build
ipipe: x86: Avoid trashing vector_irq[IRQ_MOVE_CLEANUP_VECTOR] on
migration
arch/x86/include/asm/ipipe_base.h | 2 -- arch/x86/include/asm/irqflags.h | 2 +- arch/x86/kernel/apic/io_apic.c | 11 ++++++++--- arch/x86/kernel/ipipe.c | 4 +++- 4 files changed, 12 insertions(+), 7 deletions(-)
PATCH 1/5 ipipe: x86: Fix irq->vector lookup for IRQ_MOVE_CLEANUP_VECTOR
The IRQ migration IRQ has no irq_cfg and is outside of the range ipipe_apic_irq_vector can handle. This causes oopses when __ipipe_get_ioapic_irq_vector is processing it.
--- arch/x86/kernel/apic/io_apic.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
arch/x86/kernel/apic/io_apic.c +6 -2
@@ -3967,8 +3967,12 @@ int acpi_get_override_irq(u32 gsi, int *trigger, int *polarity)#ifdef CONFIG_IPIPE unsigned __ipipe_get_ioapic_irq_vector (int irq) { -return irq >=IPIPE_FIRST_APIC_IRQ && irq <IPIPE_NR_XIRQS ? -ipipe_apic_irq_vector (irq) :irq_cfg (irq)->vector; +if (irq >=IPIPE_FIRST_APIC_IRQ && irq <IPIPE_NR_XIRQS ) +return ipipe_apic_irq_vector (irq); +else if (irq ==IRQ_MOVE_CLEANUP_VECTOR ) +return irq; +else +return irq_cfg (irq)->vector; }#endif /* CONFIG_IPIPE */
Signature · 1 line
1.7.1
PATCH 2/5 ipipe: x86: Optimize ipipe_percpu_domain_data::status accesses
In reply to Jan KiszkaJust like in the noarch part, drop the remaining atomic ops used for status manipulation.
--- arch/x86/include/asm/ipipe_base.h | 2 -- arch/x86/kernel/ipipe.c | 2 +- 2 files changed, 1 insertions(+), 3 deletions(-)
arch/x86/include/asm/ipipe_base.h +0 -2
@@ -131,7 +131,6 @@static inline void __ipipe_stall_root (void ) { __asm__ __volatile__(GET_ROOT_STATUS_ADDR - LOCK_PREFIX TEST_AND_SET_ROOT_STATUS PUT_ROOT_STATUS_ADDR : : : ROOT_TEST_CLOBBER_LIST, "memory");
@@ -142,7 +141,6 @@ static inline unsigned long __ipipe_test_and_stall_root(void)int oldbit; __asm__ __volatile__(GET_ROOT_STATUS_ADDR - LOCK_PREFIXTEST_AND_SET_ROOT_STATUS "sbbl %0,%0;" PUT_ROOT_STATUS_ADDR
arch/x86/kernel/ipipe.c +1 -1
@@ -420,7 +420,7 @@ void __ipipe_halt_root(void) p =ipipe_root_cpudom_ptr ();trace_hardirqs_on (); -clear_bit (IPIPE_STALL_FLAG , &p->status); +__clear_bit (IPIPE_STALL_FLAG , &p->status);if (unlikely (__ipipe_ipending_p (p))) {__ipipe_sync_pipeline ();
Signature · 1 line
1.7.1
PATCH 3/5 ipipe: x86: Fix flags corruption in arch_mangle_irq_bits on 64-bit systems
In reply to Jan KiszkaDue to unwanted sign extension, we set all high bits in the mangled flags on x86-64. Harmless on current CPUs, but that may change one day.
--- arch/x86/include/asm/irqflags.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/include/asm/irqflags.h +1 -1
@@ -143,7 +143,7 @@ static inline void halt(void)/* Merge virtual+real interrupt mask bits into a single word. */ static inline unsigned long arch_mangle_irq_bits (int virt,unsigned long real) { -return (real & ~(1L <<31 )) | ((virt !=0 ) <<31 ); +return (real & ~(1L <<31 )) | ((unsigned long )(virt !=0 ) <<31 ); }/* Converse operation of arch_mangle_irq_bits() */
Signature · 1 line
1.7.1
PATCH 4/5 ipipe: x86: Unbreak !CONFIG_SPARSE_IRQ build
In reply to Jan Kiszka--- arch/x86/kernel/ipipe.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/x86/kernel/ipipe.c +2 -0
@@ -835,7 +835,9 @@ void update_vsyscall_tz(void)EXPORT_SYMBOL (__ipipe_tick_irq); +#ifdef CONFIG_SPARSE_IRQ EXPORT_SYMBOL_GPL (irq_to_desc); +#endif struct task_struct *__switch_to (struct task_struct *prev_p,struct task_struct *next_p);EXPORT_SYMBOL_GPL (__switch_to);
Signature · 1 line
1.7.1
PATCH 5/5 ipipe: x86: Avoid trashing vector_irq[IRQ_MOVE_CLEANUP_VECTOR] on migration
In reply to Jan Kiszkasmp_irq_move_cleanup_interrupt walks all vectors starting at FIRST_EXTERNAL_VECTOR, checking for vectors on the move. Unfortunately, FIRST_EXTERNAL_VECTOR equals IRQ_MOVE_CLEANUP_VECTOR and is incorrectly identified as a migrating one because we set its vector_irq to something else than -1. The result is that smp_irq_move_cleanup_interrupt sets vector_irq to -1 again, and __ipipe_handle_irq will BUG on the next migration IRQ.
Fix this by starting the vector walk above FIRST_EXTERNAL_VECTOR.
--- arch/x86/kernel/apic/io_apic.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
arch/x86/kernel/apic/io_apic.c +2 -1
@@ -2337,7 +2337,8 @@ asmlinkage void smp_irq_move_cleanup_interrupt(void)irq_enter (); me =smp_processor_id (); -for (vector =FIRST_EXTERNAL_VECTOR ; vector <NR_VECTORS ; vector++) { +for (vector =FIRST_EXTERNAL_VECTOR +1 ; vector <NR_VECTORS ; + vector++) {unsigned int irq;unsigned int irr;struct irq_desc *desc;
Signature · 1 line
1.7.1
Quoted 7 lines · Jan Kiszka
The following changes since commit
c6ef3e86ff13163e416f3f91df8a4df2ca36bcb3:ipipe: x86: Fix 64-bit IRQ exit path (2011-06-04 16:16:52 +0200)
are available in the git repository at:
git://git.kiszka.org/ipipequeues/2.6.38-x86
Quoted 8 lines
Shortened summary below. Excluded:
Jan Kiszka (1):
Merge branch 'queues/2.6.38-noarch' into queues/2.6.38-x86One last wish: Please create the arch branches by forking off from noarch, not from mainline. That avoids needless merge conflicts when pulling in noarch updates later on. Thanks!
That should be always the case since 2005 or so... If 2.6.38 escapes that rule, then this was unintended, because that makes no sense.
Quoted 16 lines
Jan Kiszka (5):
ipipe: x86: Fixirq->vectorlookup forIRQ_MOVE_CLEANUP_VECTOR
ipipe: x86: Optimizeipipe_percpu_domain_data::statusaccesses
ipipe: x86: Fix flags corruption inarch_mangle_irq_bitson 64-bit
systems
ipipe: x86: Unbreak !CONFIG_SPARSE_IRQ build
ipipe: x86: Avoid trashing vector_irq[IRQ_MOVE_CLEANUP_VECTOR] on
migrationarch/x86/include/asm/ipipe_base.h | 2 -- arch/x86/include/asm/irqflags.h | 2 +- arch/x86/kernel/apic/io_apic.c | 11 ++++++++--- arch/x86/kernel/ipipe.c | 4 +++- 4 files changed, 12 insertions(+), 7 deletions(-)
Signature · 1 line
Philippe.