<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/drivers/hwtracing/intel_th/intel_th.h, branch jd/orphan-parallel</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/drivers/hwtracing/intel_th/intel_th.h?h=jd%2Forphan-parallel</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/drivers/hwtracing/intel_th/intel_th.h?h=jd%2Forphan-parallel'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2020-03-18T10:28:22Z</updated>
<entry>
<title>intel_th: Disallow multi mode on devices where it's broken</title>
<updated>2020-03-18T10:28:22Z</updated>
<author>
<name>Alexander Shishkin</name>
<email>alexander.shishkin@linux.intel.com</email>
</author>
<published>2020-03-17T06:22:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=397c7729665a3b07a7b4ce7215173df8e9112809'/>
<id>urn:sha1:397c7729665a3b07a7b4ce7215173df8e9112809</id>
<content type='text'>
Some versions of Intel TH have an issue that prevents the multi mode of
MSU from working correctly, resulting in no trace data and potentially
stuck MSU pipeline.

Disable multi mode on such devices.

Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20200317062215.15598-2-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>intel_th: Fix freeing IRQs</title>
<updated>2019-12-17T14:45:58Z</updated>
<author>
<name>Alexander Shishkin</name>
<email>alexander.shishkin@linux.intel.com</email>
</author>
<published>2019-12-17T11:55:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=ab832e38e4f0f45b16c3633714d868b7ec6b33b4'/>
<id>urn:sha1:ab832e38e4f0f45b16c3633714d868b7ec6b33b4</id>
<content type='text'>
Commit aac8da65174a ("intel_th: msu: Start handling IRQs") implicitly
relies on the use of devm_request_irq() to subsequently free the irqs on
device removal, but in case of the pci_free_irq_vectors() API, the
handlers need to be freed before it is called. Therefore, at the moment
the driver's remove path trips a BUG_ON(irq_has_action()):

&gt; kernel BUG at drivers/pci/msi.c:375!
&gt; invalid opcode: 0000 1 SMP
&gt; CPU: 2 PID: 818 Comm: rmmod Not tainted 5.5.0-rc1+ #1
&gt; RIP: 0010:free_msi_irqs+0x67/0x1c0
&gt; pci_disable_msi+0x116/0x150
&gt; pci_free_irq_vectors+0x1b/0x20
&gt; intel_th_pci_remove+0x22/0x30 [intel_th_pci]
&gt; pci_device_remove+0x3e/0xb0
&gt; device_release_driver_internal+0xf0/0x1c0
&gt; driver_detach+0x4c/0x8f
&gt; bus_remove_driver+0x5c/0xd0
&gt; driver_unregister+0x31/0x50
&gt; pci_unregister_driver+0x40/0x90
&gt; intel_th_pci_driver_exit+0x10/0xad6 [intel_th_pci]
&gt; __x64_sys_delete_module+0x147/0x290
&gt; ? exit_to_usermode_loop+0xd7/0x120
&gt; do_syscall_64+0x57/0x1b0
&gt; entry_SYSCALL_64_after_hwframe+0x44/0xa9

Fix this by explicitly freeing irqs before freeing the vectors. We keep
using the devm_* variants because they are still useful in early error
paths.

Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Fixes: aac8da65174a ("intel_th: msu: Start handling IRQs")
Reported-by: Ammy Yi &lt;ammy.yi@intel.com&gt;
Tested-by: Ammy Yi &lt;ammy.yi@intel.com&gt;
Cc: stable@vger.kernel.org # v5.2+
Link: https://lore.kernel.org/r/20191217115527.74383-4-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>intel_th: Add switch triggering support</title>
<updated>2019-05-03T16:16:21Z</updated>
<author>
<name>Alexander Shishkin</name>
<email>alexander.shishkin@linux.intel.com</email>
</author>
<published>2019-05-03T08:44:48Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=8116db57cf1618cb21dab957952e7bd1395430da'/>
<id>urn:sha1:8116db57cf1618cb21dab957952e7bd1395430da</id>
<content type='text'>
Add support for asserting window switch trigger when tracing to MSU output
ports. This allows for software controlled switching between windows of
the MSU buffer, which can be used for double buffering while exporting the
trace data further from the MSU.

Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>intel_th: msu: Factor out pipeline draining</title>
<updated>2019-05-03T16:16:21Z</updated>
<author>
<name>Alexander Shishkin</name>
<email>alexander.shishkin@linux.intel.com</email>
</author>
<published>2019-05-03T08:44:46Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=8d4155126e32fdceda7e1520e77a7beac2217f4a'/>
<id>urn:sha1:8d4155126e32fdceda7e1520e77a7beac2217f4a</id>
<content type='text'>
The code that waits for the pipeline empty condition of the MSU is
currently called in the path that disables the trace. We will also
need this in the window switch trigger sequence. Therefore, factor
out this code and make it accessible to the GTH device.

Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>intel_th: Only report useful IRQs to subdevices</title>
<updated>2019-05-03T16:14:30Z</updated>
<author>
<name>Alexander Shishkin</name>
<email>alexander.shishkin@linux.intel.com</email>
</author>
<published>2019-05-03T08:44:42Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=4c5bb6eb4055adcefaeb5da56dfbecf7df3695d7'/>
<id>urn:sha1:4c5bb6eb4055adcefaeb5da56dfbecf7df3695d7</id>
<content type='text'>
The only type of IRQ triggering event that is useful to us at the moment
is the "last block" interrupt of the MSU. This interrupt can only be
enabled via "MINTCTL" register that doesn't exist in earlier version of
the Intel TH.

Enumerate the presence of MINTCTL via per-device driver data structure
and only instantiate the IRQ resource for subdevices if this capability
is present.

Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>intel_th: msu: Start handling IRQs</title>
<updated>2019-05-03T16:14:30Z</updated>
<author>
<name>Alexander Shishkin</name>
<email>alexander.shishkin@linux.intel.com</email>
</author>
<published>2019-05-03T08:44:41Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=aac8da65174a35749fcf21dbca4c1be314b562b5'/>
<id>urn:sha1:aac8da65174a35749fcf21dbca4c1be314b562b5</id>
<content type='text'>
We intend to use the interrupt to detect Last Block condition in the MSU
driver, which we can use for double-buffering software-managed data
transfers.

Add an interrupt handler to the MSU driver.

Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>intel_th: pci: Use MSI interrupt signalling</title>
<updated>2019-05-03T16:14:30Z</updated>
<author>
<name>Alexander Shishkin</name>
<email>alexander.shishkin@linux.intel.com</email>
</author>
<published>2019-05-03T08:44:40Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=7b7036d47c356a40818e516a69ac81a5dcc1613f'/>
<id>urn:sha1:7b7036d47c356a40818e516a69ac81a5dcc1613f</id>
<content type='text'>
Since Intel TH is capable of MSI interrupt signalling, make use of it.
The way it works is, each of the 7 interrupt triggering events has its
own vector in this mode, as opposed to interrupt line delivery, where
all events are signalled via the same line. Failing to enable MSI, the
driver falls back to using an interrupt line.

Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>intel_th: Communicate IRQ via resource</title>
<updated>2019-05-03T16:14:29Z</updated>
<author>
<name>Alexander Shishkin</name>
<email>alexander.shishkin@linux.intel.com</email>
</author>
<published>2019-05-03T08:44:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=62a593022c32380d040303a5e3d6b67fd9c415bc'/>
<id>urn:sha1:62a593022c32380d040303a5e3d6b67fd9c415bc</id>
<content type='text'>
Currently, the IRQ is passed between the glue layers and the core as a
separate argument, while the MMIO resources are passed as resources.
This also limits the number of IRQs thus used to one, while the current
versions of Intel TH use a different MSI vector for each interrupt
triggering event, of which there are 7.

Change this to pass IRQ in the resources array.

Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>intel_th: Add "rtit" source device</title>
<updated>2019-05-03T16:14:29Z</updated>
<author>
<name>Alexander Shishkin</name>
<email>alexander.shishkin@linux.intel.com</email>
</author>
<published>2019-05-03T08:44:38Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=fc027f4ce7c718660e046c3269b303bdbe692fda'/>
<id>urn:sha1:fc027f4ce7c718660e046c3269b303bdbe692fda</id>
<content type='text'>
In some versions of Intel TH, the Software Trace Hub (STH) has a second
MMIO BAR dedicated to the input from Intel PT. This calls for a new
subdevice that will be enumerated if the corresponding BAR is present.

Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>intel_th: Rework resource passing between glue layers and core</title>
<updated>2019-05-03T16:14:29Z</updated>
<author>
<name>Alexander Shishkin</name>
<email>alexander.shishkin@linux.intel.com</email>
</author>
<published>2019-05-03T08:44:36Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=db73a059de00eed721f13051c0d6ff3e7de90fe8'/>
<id>urn:sha1:db73a059de00eed721f13051c0d6ff3e7de90fe8</id>
<content type='text'>
Currently, MMIO resource numbers in the TH driver core correspond to
PCI BAR numbers, because in the beginning there was only the PCI glue
layer. This created some confusion when the ACPI glue layer was added.

To avoid confusion and remove glue-specific code from the driver core,
split the resource indices between core and glue layers and change the
API so that the driver core receives the MMIO resources in the same
fixed order. At the same time, make the IRQ always be a parameter to
intel_th_alloc() instead of sometimes passing it as a resource.

Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
