<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/hwtracing/intel_th/sth.c, branch linux-6.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2020-08-23T22:36:59Z</updated>
<entry>
<title>treewide: Use fallthrough pseudo-keyword</title>
<updated>2020-08-23T22:36:59Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavoars@kernel.org</email>
</author>
<published>2020-08-23T22:36:59Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=df561f6688fef775baa341a0f5d960becd248b11'/>
<id>urn:sha1:df561f6688fef775baa341a0f5d960becd248b11</id>
<content type='text'>
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.

[1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
</content>
</entry>
<entry>
<title>intel_th: Fix a NULL dereference when hub driver is not loaded</title>
<updated>2020-07-10T13:12:48Z</updated>
<author>
<name>Alexander Shishkin</name>
<email>alexander.shishkin@linux.intel.com</email>
</author>
<published>2020-07-06T16:13:39Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e78e1fdb282726beaf88aa75943682217e6ded0e'/>
<id>urn:sha1:e78e1fdb282726beaf88aa75943682217e6ded0e</id>
<content type='text'>
Connecting master to an output port when GTH driver module is not loaded
triggers a NULL dereference:

&gt; RIP: 0010:intel_th_set_output+0x35/0x70 [intel_th]
&gt; Call Trace:
&gt;  ? sth_stm_link+0x12/0x20 [intel_th_sth]
&gt;  stm_source_link_store+0x164/0x270 [stm_core]
&gt;  dev_attr_store+0x17/0x30
&gt;  sysfs_kf_write+0x3e/0x50
&gt;  kernfs_fop_write+0xda/0x1b0
&gt;  __vfs_write+0x1b/0x40
&gt;  vfs_write+0xb9/0x1a0
&gt;  ksys_write+0x67/0xe0
&gt;  __x64_sys_write+0x1a/0x20
&gt;  do_syscall_64+0x57/0x1d0
&gt;  entry_SYSCALL_64_after_hwframe+0x44/0xa9

Make sure the module in question is loaded and return an error if not.

Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Fixes: 39f4034693b7c ("intel_th: Add driver infrastructure for Intel(R) Trace Hub devices")
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
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 # v4.4
Link: https://lore.kernel.org/r/20200706161339.55468-5-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>intel_th: Mark expected switch fall-throughs</title>
<updated>2019-02-21T13:04:36Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2019-02-12T21:43:02Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8d86f6b4306f4be38b39d420456edf61a7b7119e'/>
<id>urn:sha1:8d86f6b4306f4be38b39d420456edf61a7b7119e</id>
<content type='text'>
In preparation to enabling -Wimplicit-fallthrough, mark switch
cases where we are expecting to fall through.

This patch fixes the following warnings:

drivers/hwtracing/intel_th/sth.c: In function ‘sth_stm_packet’:
drivers/hwtracing/intel_th/sth.c:86:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
   reg += 4;
   ~~~~^~~~
drivers/hwtracing/intel_th/sth.c:87:2: note: here
  case STP_PACKET_XSYNC:
  ^~~~
drivers/hwtracing/intel_th/sth.c:88:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
   reg += 8;
   ~~~~^~~~
drivers/hwtracing/intel_th/sth.c:89:2: note: here
  case STP_PACKET_TRIG:
  ^~~~

Warning level 3 was used: -Wimplicit-fallthrough=3

This patch is part of the ongoing efforts to enable
-Wimplicit-fallthrough.

Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>intel_th: Add SPDX GPL-2.0 header to replace GPLv2 boilerplate</title>
<updated>2018-03-28T15:47:19Z</updated>
<author>
<name>Alexander Shishkin</name>
<email>alexander.shishkin@linux.intel.com</email>
</author>
<published>2018-03-28T15:46:15Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=50352fa730328b2e946fb912d495653b627c0bf9'/>
<id>urn:sha1:50352fa730328b2e946fb912d495653b627c0bf9</id>
<content type='text'>
This adds SPDX GPL-2.0 header to the Trace Hub driver and removes the
GPLv2 boilerplate text.

Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>intel_th: Mark sth_stm_packet() with notrace</title>
<updated>2016-11-22T22:47:56Z</updated>
<author>
<name>Chunyan Zhang</name>
<email>zhang.chunyan@linaro.org</email>
</author>
<published>2016-11-21T07:57:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=22975be20f40616420dc4b26e8c1fe84e9f68427'/>
<id>urn:sha1:22975be20f40616420dc4b26e8c1fe84e9f68427</id>
<content type='text'>
If CONFIG_STM_SOURCE_FTRACE is selected, Function trace data can be
writen to sink via STM, all functions that related to writing data
packets to STM should be marked 'notrace' to avoid being traced by
Ftrace, otherwise the program would stall into an endless loop.

Link: http://lkml.kernel.org/r/1479715043-6534-5-git-send-email-zhang.chunyan@linaro.org

Signed-off-by: Chunyan Zhang &lt;zhang.chunyan@linaro.org&gt;
Acked-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>intel_th: sth: Sanitize packet callback's return values</title>
<updated>2016-02-20T22:09:14Z</updated>
<author>
<name>Alexander Shishkin</name>
<email>alexander.shishkin@linux.intel.com</email>
</author>
<published>2016-02-15T17:11:58Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=97007500ec3f9b08913ebec986068b9d250a6eed'/>
<id>urn:sha1:97007500ec3f9b08913ebec986068b9d250a6eed</id>
<content type='text'>
According to the stm class interface, the packet callback should return
an error if it is asked to generate packets that it doesn't support.
When it succeeds, it should return number of bytes consumed from its
payload. Currently, for FLAG packet it mistakenly returns 1.

This patch addresses these issues.

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: Check for NULL instead of ERR_PTR</title>
<updated>2015-10-17T06:25:48Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2015-10-16T14:09:13Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=73061da07d28ac6724bcd9ce4b51cf51a8b6b40e'/>
<id>urn:sha1:73061da07d28ac6724bcd9ce4b51cf51a8b6b40e</id>
<content type='text'>
devm_ioremap() returns NULL on error, it doesn't return an ERR_PTR,
which is what the current code does. This patch corrects these
checks.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
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 Software Trace Hub driver</title>
<updated>2015-10-04T19:28:58Z</updated>
<author>
<name>Alexander Shishkin</name>
<email>alexander.shishkin@linux.intel.com</email>
</author>
<published>2015-09-22T12:47:17Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f04e449fc76e7bfd1b8ed11967ab092d05355b6b'/>
<id>urn:sha1:f04e449fc76e7bfd1b8ed11967ab092d05355b6b</id>
<content type='text'>
Software Trace Hub (STH) is a trace source device in the Intel TH
architecture, it generates data that then goes through the switch into
one or several output ports.

STH collects data from software sources using the stm device class
abstraction.

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>
