<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/x86/kernel/irq.c, branch linux-3.17.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.17.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.17.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2014-06-13T03:03:47Z</updated>
<entry>
<title>Merge branch 'x86-irq-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2014-06-13T03:03:47Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2014-06-13T03:03:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=71998d1be4ae70e7d320cdd21595c1a02a29c61e'/>
<id>urn:sha1:71998d1be4ae70e7d320cdd21595c1a02a29c61e</id>
<content type='text'>
Pull x86 irq fixes from Ingo Molnar:
 "Two changes: a cpu-hotplug/irq race fix, plus a HyperV related fix"

* 'x86-irq-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/irq: Fix fixup_irqs() error handling
  x86, irq, pic: Probe for legacy PIC and set legacy_pic appropriately
</content>
</entry>
<entry>
<title>x86: irq: Get correct available vectors for cpu disable</title>
<updated>2014-06-04T12:18:34Z</updated>
<author>
<name>Yinghai Lu</name>
</author>
<published>2014-05-13T15:39:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ac2a55395eddccd6e3e39532df9869d61e97b2ee'/>
<id>urn:sha1:ac2a55395eddccd6e3e39532df9869d61e97b2ee</id>
<content type='text'>
check_irq_vectors_for_cpu_disable() can overestimate the number of
available interrupt vectors, so the check for cpu down succeeds, but
the actual cpu removal fails.

It iterates from FIRST_EXTERNAL_VECTOR to NR_VECTORS, which is wrong
because the systems vectors are not taken into account.

Limit the search to first_system_vector instead of NR_VECTORS.

The second indicator for vector availability the used_vectors bitmap
is not taken into account at all. So system vectors,
e.g. IA32_SYSCALL_VECTOR (0x80) and IRQ_MOVE_CLEANUP_VECTOR (0x20),
are accounted as available.

Add a check for the used_vectors bitmap and do not account vectors
which are marked there.

[ tglx: Simplified code. Rewrote changelog and code comments. ]

Signed-off-by: Yinghai Lu &lt;yinghai@kernel.org&gt;
Acked-by: Prarit Bhargava &lt;prarit@redhat.com&gt;
Cc: Seiji Aguchi &lt;seiji.aguchi@hds.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Cc: Steven Rostedt (Red Hat) &lt;rostedt@goodmis.org&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: "Elliott, Robert (Server Storage)" &lt;Elliott@hp.com&gt;
Cc: x86@kernel.org
Link: http://lkml.kernel.org/r/1400160305-17774-2-git-send-email-prarit@redhat.com
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>x86/irq: Fix fixup_irqs() error handling</title>
<updated>2014-04-16T11:30:49Z</updated>
<author>
<name>Prarit Bhargava</name>
</author>
<published>2014-04-02T12:11:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fb24da805729ee4a83efa34015948f7d64da4b28'/>
<id>urn:sha1:fb24da805729ee4a83efa34015948f7d64da4b28</id>
<content type='text'>
Several patches to fix cpu hotplug and the down'd cpu's irq
relocations have been submitted in the past month or so.  The
patches should resolve the problems with cpu hotplug and irq
relocation, however, there is always a possibility that a bug
still exists.  The big problem with debugging these irq
reassignments is that the cpu down completes and then we get
random stack traces from drivers for which irqs have not been
properly assigned to a new cpu.  The stack traces are a mix of
storage, network, and other kernel subsystem (I once saw the
serial port stop working ...) warnings and failures.

The problem with these failures is that they are difficult to
diagnose. There is no warning in the cpu hotplug down path to
indicate that an IRQ has failed to be assigned to a new cpu, and
all we are left with is a stack trace from a driver, or a
non-functional device.  If we had some information on the
console debugging these situations would be much easier; after
all we can map an IRQ to a device by simply using lspci or
/proc/interrupts.

The current code, fixup_irqs(), which migrates IRQs from the
down'd cpu and is called close to the end of the cpu down path,
calls chip-&gt;set_irq_affinity which eventually calls
__assign_irq_vector(). Errors are not propogated back from this
function call and this results in silent irq relocation
failures.

This patch fixes this issue by returning the error codes up the
call stack and prints out a warning if there is a relocation
failure.

Signed-off-by: Prarit Bhargava &lt;prarit@redhat.com&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Rui Wang &lt;rui.y.wang@intel.com&gt;
Cc: Liu Ping Fan &lt;kernelfans@gmail.com&gt;
Cc: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Cc: Yoshihiro YUNOMAE &lt;yoshihiro.yunomae.ez@hitachi.com&gt;
Cc: Lv Zheng &lt;lv.zheng@intel.com&gt;
Cc: Seiji Aguchi &lt;seiji.aguchi@hds.com&gt;
Cc: Yang Zhang &lt;yang.z.zhang@intel.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Steven Rostedt (Red Hat) &lt;rostedt@goodmis.org&gt;
Cc: Li Fei &lt;fei.li@intel.com&gt;
Cc: gong.chen@linux.intel.com
Link: http://lkml.kernel.org/r/1396440673-18286-1-git-send-email-prarit@redhat.com
[ Made small cleanliness tweaks. ]
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>x86/platform/hyperv: Handle VMBUS driver being a module</title>
<updated>2014-04-02T07:49:47Z</updated>
<author>
<name>K. Y. Srinivasan</name>
</author>
<published>2014-04-02T06:51:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f704a7d7f1d815621cb4c47f7a94787e1bd7c27c'/>
<id>urn:sha1:f704a7d7f1d815621cb4c47f7a94787e1bd7c27c</id>
<content type='text'>
Hyper-V VMBUS driver can be a module; handle this case
correctly. Please apply.

Signed-off-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Cc: olaf@aepfle.de
Cc: apw@canonical.com
Cc: jasowang@redhat.com
Link: http://lkml.kernel.org/r/1396421502-23222-1-git-send-email-kys@microsoft.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>x86: Add proper vector accounting for HYPERVISOR_CALLBACK_VECTOR</title>
<updated>2014-03-04T16:37:54Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2014-02-23T21:40:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=929320e4b4c10708d3477d7e395f0ce7b0cc8744'/>
<id>urn:sha1:929320e4b4c10708d3477d7e395f0ce7b0cc8744</id>
<content type='text'>
HyperV abuses a device interrupt to account for the
HYPERVISOR_CALLBACK_VECTOR.

Provide proper accounting as we have for the other vectors as well.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Cc: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Cc: x86 &lt;x86@kernel.org&gt;
Link: http://lkml.kernel.org/r/20140223212738.681855582@linutronix.de
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>x86, cpu hotplug: Fix stack frame warning in check_irq_vectors_for_cpu_disable()</title>
<updated>2014-01-31T00:40:13Z</updated>
<author>
<name>Prarit Bhargava</name>
</author>
<published>2014-01-28T13:22:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=39424e89d64661faa0a2e00c5ad1e6dbeebfa972'/>
<id>urn:sha1:39424e89d64661faa0a2e00c5ad1e6dbeebfa972</id>
<content type='text'>
Further discussion here: http://marc.info/?l=linux-kernel&amp;m=139073901101034&amp;w=2

kbuild, 0day kernel build service, outputs the warning:

arch/x86/kernel/irq.c:333:1: warning: the frame size of 2056 bytes
is larger than 2048 bytes [-Wframe-larger-than=]

because check_irq_vectors_for_cpu_disable() allocates two cpumasks on the
stack.   Fix this by moving the two cpumasks to a global file context.

Reported-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Tested-by: David Rientjes &lt;rientjes@google.com&gt;
Signed-off-by: Prarit Bhargava &lt;prarit@redhat.com&gt;
Link: http://lkml.kernel.org/r/1390915331-27375-1-git-send-email-prarit@redhat.com
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Michel Lespinasse &lt;walken@google.com&gt;
Cc: Seiji Aguchi &lt;seiji.aguchi@hds.com&gt;
Cc: Yang Zhang &lt;yang.z.zhang@Intel.com&gt;
Cc: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Cc: Janet Morgan &lt;janet.morgan@intel.com&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: Ruiv Wang &lt;ruiv.wang@gmail.com&gt;
Cc: Gong Chen &lt;gong.chen@linux.intel.com&gt;
Cc: Yinghai Lu &lt;yinghai@kernel.org&gt;
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2014-01-20T20:11:41Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2014-01-20T20:11:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7fe67a1180db49d41a3f764c379a08f8e31580ec'/>
<id>urn:sha1:7fe67a1180db49d41a3f764c379a08f8e31580ec</id>
<content type='text'>
Pull leftover x86 fixes from Ingo Molnar:
 "Two leftover fixes that did not make it into v3.13"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86: Add check for number of available vectors before CPU down
  x86, cpu, amd: Add workaround for family 16h, erratum 793
</content>
</entry>
<entry>
<title>x86: Add check for number of available vectors before CPU down</title>
<updated>2014-01-16T06:24:02Z</updated>
<author>
<name>Prarit Bhargava</name>
</author>
<published>2014-01-13T11:51:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=da6139e49c7cb0f4251265cb5243b8d220adb48d'/>
<id>urn:sha1:da6139e49c7cb0f4251265cb5243b8d220adb48d</id>
<content type='text'>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=64791

When a cpu is downed on a system, the irqs on the cpu are assigned to
other cpus.  It is possible, however, that when a cpu is downed there
aren't enough free vectors on the remaining cpus to account for the
vectors from the cpu that is being downed.

This results in an interesting "overflow" condition where irqs are
"assigned" to a CPU but are not handled.

For example, when downing cpus on a 1-64 logical processor system:

&lt;snip&gt;
[  232.021745] smpboot: CPU 61 is now offline
[  238.480275] smpboot: CPU 62 is now offline
[  245.991080] ------------[ cut here ]------------
[  245.996270] WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:264 dev_watchdog+0x246/0x250()
[  246.005688] NETDEV WATCHDOG: p786p1 (ixgbe): transmit queue 0 timed out
[  246.013070] Modules linked in: lockd sunrpc iTCO_wdt iTCO_vendor_support sb_edac ixgbe microcode e1000e pcspkr joydev edac_core lpc_ich ioatdma ptp mdio mfd_core i2c_i801 dca pps_core i2c_core wmi acpi_cpufreq isci libsas scsi_transport_sas
[  246.037633] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.12.0+ #14
[  246.044451] Hardware name: Intel Corporation S4600LH ........../SVRBD-ROW_T, BIOS SE5C600.86B.01.08.0003.022620131521 02/26/2013
[  246.057371]  0000000000000009 ffff88081fa03d40 ffffffff8164fbf6 ffff88081fa0ee48
[  246.065728]  ffff88081fa03d90 ffff88081fa03d80 ffffffff81054ecc ffff88081fa13040
[  246.074073]  0000000000000000 ffff88200cce0000 0000000000000040 0000000000000000
[  246.082430] Call Trace:
[  246.085174]  &lt;IRQ&gt;  [&lt;ffffffff8164fbf6&gt;] dump_stack+0x46/0x58
[  246.091633]  [&lt;ffffffff81054ecc&gt;] warn_slowpath_common+0x8c/0xc0
[  246.098352]  [&lt;ffffffff81054fb6&gt;] warn_slowpath_fmt+0x46/0x50
[  246.104786]  [&lt;ffffffff815710d6&gt;] dev_watchdog+0x246/0x250
[  246.110923]  [&lt;ffffffff81570e90&gt;] ? dev_deactivate_queue.constprop.31+0x80/0x80
[  246.119097]  [&lt;ffffffff8106092a&gt;] call_timer_fn+0x3a/0x110
[  246.125224]  [&lt;ffffffff8106280f&gt;] ? update_process_times+0x6f/0x80
[  246.132137]  [&lt;ffffffff81570e90&gt;] ? dev_deactivate_queue.constprop.31+0x80/0x80
[  246.140308]  [&lt;ffffffff81061db0&gt;] run_timer_softirq+0x1f0/0x2a0
[  246.146933]  [&lt;ffffffff81059a80&gt;] __do_softirq+0xe0/0x220
[  246.152976]  [&lt;ffffffff8165fedc&gt;] call_softirq+0x1c/0x30
[  246.158920]  [&lt;ffffffff810045f5&gt;] do_softirq+0x55/0x90
[  246.164670]  [&lt;ffffffff81059d35&gt;] irq_exit+0xa5/0xb0
[  246.170227]  [&lt;ffffffff8166062a&gt;] smp_apic_timer_interrupt+0x4a/0x60
[  246.177324]  [&lt;ffffffff8165f40a&gt;] apic_timer_interrupt+0x6a/0x70
[  246.184041]  &lt;EOI&gt;  [&lt;ffffffff81505a1b&gt;] ? cpuidle_enter_state+0x5b/0xe0
[  246.191559]  [&lt;ffffffff81505a17&gt;] ? cpuidle_enter_state+0x57/0xe0
[  246.198374]  [&lt;ffffffff81505b5d&gt;] cpuidle_idle_call+0xbd/0x200
[  246.204900]  [&lt;ffffffff8100b7ae&gt;] arch_cpu_idle+0xe/0x30
[  246.210846]  [&lt;ffffffff810a47b0&gt;] cpu_startup_entry+0xd0/0x250
[  246.217371]  [&lt;ffffffff81646b47&gt;] rest_init+0x77/0x80
[  246.223028]  [&lt;ffffffff81d09e8e&gt;] start_kernel+0x3ee/0x3fb
[  246.229165]  [&lt;ffffffff81d0989f&gt;] ? repair_env_string+0x5e/0x5e
[  246.235787]  [&lt;ffffffff81d095a5&gt;] x86_64_start_reservations+0x2a/0x2c
[  246.242990]  [&lt;ffffffff81d0969f&gt;] x86_64_start_kernel+0xf8/0xfc
[  246.249610] ---[ end trace fb74fdef54d79039 ]---
[  246.254807] ixgbe 0000:c2:00.0 p786p1: initiating reset due to tx timeout
[  246.262489] ixgbe 0000:c2:00.0 p786p1: Reset adapter
Last login: Mon Nov 11 08:35:14 from 10.18.17.119
[root@(none) ~]# [  246.792676] ixgbe 0000:c2:00.0 p786p1: detected SFP+: 5
[  249.231598] ixgbe 0000:c2:00.0 p786p1: NIC Link is Up 10 Gbps, Flow Control: RX/TX
[  246.792676] ixgbe 0000:c2:00.0 p786p1: detected SFP+: 5
[  249.231598] ixgbe 0000:c2:00.0 p786p1: NIC Link is Up 10 Gbps, Flow Control: RX/TX

(last lines keep repeating.  ixgbe driver is dead until module reload.)

If the downed cpu has more vectors than are free on the remaining cpus on the
system, it is possible that some vectors are "orphaned" even though they are
assigned to a cpu.  In this case, since the ixgbe driver had a watchdog, the
watchdog fired and notified that something was wrong.

This patch adds a function, check_vectors(), to compare the number of vectors
on the CPU going down and compares it to the number of vectors available on
the system.  If there aren't enough vectors for the CPU to go down, an
error is returned and propogated back to userspace.

v2: Do not need to look at percpu irqs
v3: Need to check affinity to prevent counting of MSIs in IOAPIC Lowest
    Priority Mode
v4: Additional changes suggested by Gong Chen.
v5/v6/v7/v8: Updated comment text

Signed-off-by: Prarit Bhargava &lt;prarit@redhat.com&gt;
Link: http://lkml.kernel.org/r/1389613861-3853-1-git-send-email-prarit@redhat.com
Reviewed-by: Gong Chen &lt;gong.chen@linux.intel.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Michel Lespinasse &lt;walken@google.com&gt;
Cc: Seiji Aguchi &lt;seiji.aguchi@hds.com&gt;
Cc: Yang Zhang &lt;yang.z.zhang@Intel.com&gt;
Cc: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Cc: Janet Morgan &lt;janet.morgan@intel.com&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: Ruiv Wang &lt;ruiv.wang@gmail.com&gt;
Cc: Gong Chen &lt;gong.chen@linux.intel.com&gt;
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
</content>
</entry>
<entry>
<title>x86/irq: Fix do_IRQ() interrupt warning for cpu hotplug retriggered irqs</title>
<updated>2014-01-12T12:13:02Z</updated>
<author>
<name>Prarit Bhargava</name>
</author>
<published>2014-01-05T16:10:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9345005f4eed805308193658d12e4e7e9c261e74'/>
<id>urn:sha1:9345005f4eed805308193658d12e4e7e9c261e74</id>
<content type='text'>
During heavy CPU-hotplug operations the following spurious kernel warnings
can trigger:

  do_IRQ: No ... irq handler for vector (irq -1)

  [ See: https://bugzilla.kernel.org/show_bug.cgi?id=64831 ]

When downing a cpu it is possible that there are unhandled irqs
left in the APIC IRR register.  The following code path shows
how the problem can occur:

 1. CPU 5 is to go down.

 2. cpu_disable() on CPU 5 executes with interrupt flag cleared
    by local_irq_save() via stop_machine().

 3. IRQ 12 asserts on CPU 5, setting IRR but not ISR because
    interrupt flag is cleared (CPU unabled to handle the irq)

 4. IRQs are migrated off of CPU 5, and the vectors' irqs are set
    to -1. 5. stop_machine() finishes cpu_disable()

 6. cpu_die() for CPU 5 executes in normal context.

 7. CPU 5 attempts to handle IRQ 12 because the IRR is set for
    IRQ 12.  The code attempts to find the vector's IRQ and cannot
    because it has been set to -1. 8. do_IRQ() warning displays
    warning about CPU 5 IRQ 12.

I added a debug printk to output which CPU &amp; vector was
retriggered and discovered that that we are getting bogus
events.  I see a 100% correlation between this debug printk in
fixup_irqs() and the do_IRQ() warning.

This patchset resolves this by adding definitions for
VECTOR_UNDEFINED(-1) and VECTOR_RETRIGGERED(-2) and modifying
the code to use them.

Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=64831
Signed-off-by: Prarit Bhargava &lt;prarit@redhat.com&gt;
Reviewed-by: Rui Wang &lt;rui.y.wang@intel.com&gt;
Cc: Michel Lespinasse &lt;walken@google.com&gt;
Cc: Seiji Aguchi &lt;seiji.aguchi@hds.com&gt;
Cc: Yang Zhang &lt;yang.z.zhang@Intel.com&gt;
Cc: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Cc: janet.morgan@Intel.com
Cc: tony.luck@Intel.com
Cc: ruiv.wang@gmail.com
Link: http://lkml.kernel.org/r/1388938252-16627-1-git-send-email-prarit@redhat.com
[ Cleaned up the code a bit. ]
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>x86, asmlinkage: Make all interrupt handlers asmlinkage / __visible</title>
<updated>2013-08-06T21:18:23Z</updated>
<author>
<name>Andi Kleen</name>
</author>
<published>2013-08-05T22:02:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1d9090e2fb32c84277cef6e72a21be7f78c929f4'/>
<id>urn:sha1:1d9090e2fb32c84277cef6e72a21be7f78c929f4</id>
<content type='text'>
These handlers are all referenced from assembler stubs, so need
to be visible.

The handlers without arguments become asmlinkage, the others __visible
to not force regparms(0) on x86-32.

I put it all into a single patch, please let me know if you want
it it split up.

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Link: http://lkml.kernel.org/r/1375740170-7446-4-git-send-email-andi@firstfloor.org
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
</content>
</entry>
</feed>
