<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nvidia-tegra-modules.git/include/linux/t19x_mce.h, branch gpu-paging</title>
<subtitle>NVIDIA's kernel modules to support tegra chips (used in Jetson boards)</subtitle>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/nvidia-tegra-modules.git/'/>
<entry>
<title>platform: tegra: Reconstruct mce and cache drivers</title>
<updated>2017-12-05T17:13:14+00:00</updated>
<author>
<name>Nicolin Chen</name>
<email>nicolinc@nvidia.com</email>
</author>
<published>2017-11-22T07:48:15+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/nvidia-tegra-modules.git/commit/?id=aee032f3dda0a8c87e4b9608354acd8390a836e6'/>
<id>aee032f3dda0a8c87e4b9608354acd8390a836e6</id>
<content type='text'>
The tegra-mce driver was designed for T18x only and being selected
based on CONFIG_ARCH_TEGRA_18x_SOC. But Kernel 4.9 uses a unified
defconfig file which means CONFIG_ARCH_TEGRA_18x_SOC is enabled on
platforms like T21x as well. The same thing happends to the system
with CONFIG_ARCH_TEGRA_19x_SOC as well.

This creates a problem that: with previous kernel version the mce
driver was not expected to be compiled while now it's compiled and
its functions are being called by other drivers without caring if
it's fine to execute them or not.

Althouth there are some code being added to the functions based on
the SoC ID so as to make them be NOP functions for older platforms
like T21x, this approach is not only tedious because every exported
function would need an ID check, but also doesn't fix all issues.

The cache functions defined in the tegra-mce driver are using the
same names of those default functions in the arch/arm64/mm/cache.S
file, which means, once the tegra-mce driver gets compiled, these
mce cache functions will override the default ones. On a platform
like T21x, it is supposed to call those default functions but now
they gets NOP functions instead.

So this patch reconstructs the whole mce and cache drivers:
1) Changes tegra-mce driver to be a core driver that runs on all
   platforms and defines corresponding function pointers for the
   running platform: Abstracts similar functions in this file and
   diversifies them in other separate files (eg. tegra18x-mce and
   tegra19x-mce); Shares its header file with other user drivers.
2) Adds a new tegra18x-mce by moving T18x specific functions out
   of the core tegra-mce driver. Renames t19x_mce to tegra19x-mce.
   Allows both of SoC specific drivers and their header files to
   be shared and accessed by tegra-mce core driver only.
3) Adds tegra_ prefixed cache functions by calling different cache
   functions based on SoC ID, instead of overriding default ones.
4) Falls back to default arm64 VA cache functions for T19x instead
   of calling T18x roc functions, since it does not make sense to
   call T18x cache functions on a T19x platform.
5) Raises WARN_ON() if cache flush/clean fails.
6) Fix retry issue in t19x cache functions as retry would be -1
   after the original WARN_ONCE(retry-- == 0).

Bug 200363383
Bug 2017226

Change-Id: I67344ee48cc4faebef91fb7f8cf3b0bd3d4a7cec
Signed-off-by: Nicolin Chen &lt;nicolinc@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/1603072
Reviewed-by: svc-mobile-coverity &lt;svc-mobile-coverity@nvidia.com&gt;
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam &lt;snikam@nvidia.com&gt;
Tested-by: Sachin Nikam &lt;snikam@nvidia.com&gt;
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The tegra-mce driver was designed for T18x only and being selected
based on CONFIG_ARCH_TEGRA_18x_SOC. But Kernel 4.9 uses a unified
defconfig file which means CONFIG_ARCH_TEGRA_18x_SOC is enabled on
platforms like T21x as well. The same thing happends to the system
with CONFIG_ARCH_TEGRA_19x_SOC as well.

This creates a problem that: with previous kernel version the mce
driver was not expected to be compiled while now it's compiled and
its functions are being called by other drivers without caring if
it's fine to execute them or not.

Althouth there are some code being added to the functions based on
the SoC ID so as to make them be NOP functions for older platforms
like T21x, this approach is not only tedious because every exported
function would need an ID check, but also doesn't fix all issues.

The cache functions defined in the tegra-mce driver are using the
same names of those default functions in the arch/arm64/mm/cache.S
file, which means, once the tegra-mce driver gets compiled, these
mce cache functions will override the default ones. On a platform
like T21x, it is supposed to call those default functions but now
they gets NOP functions instead.

So this patch reconstructs the whole mce and cache drivers:
1) Changes tegra-mce driver to be a core driver that runs on all
   platforms and defines corresponding function pointers for the
   running platform: Abstracts similar functions in this file and
   diversifies them in other separate files (eg. tegra18x-mce and
   tegra19x-mce); Shares its header file with other user drivers.
2) Adds a new tegra18x-mce by moving T18x specific functions out
   of the core tegra-mce driver. Renames t19x_mce to tegra19x-mce.
   Allows both of SoC specific drivers and their header files to
   be shared and accessed by tegra-mce core driver only.
3) Adds tegra_ prefixed cache functions by calling different cache
   functions based on SoC ID, instead of overriding default ones.
4) Falls back to default arm64 VA cache functions for T19x instead
   of calling T18x roc functions, since it does not make sense to
   call T18x cache functions on a T19x platform.
5) Raises WARN_ON() if cache flush/clean fails.
6) Fix retry issue in t19x cache functions as retry would be -1
   after the original WARN_ONCE(retry-- == 0).

Bug 200363383
Bug 2017226

Change-Id: I67344ee48cc4faebef91fb7f8cf3b0bd3d4a7cec
Signed-off-by: Nicolin Chen &lt;nicolinc@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/1603072
Reviewed-by: svc-mobile-coverity &lt;svc-mobile-coverity@nvidia.com&gt;
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam &lt;snikam@nvidia.com&gt;
Tested-by: Sachin Nikam &lt;snikam@nvidia.com&gt;
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>t194: mce: update cstats api</title>
<updated>2017-08-11T21:16:43+00:00</updated>
<author>
<name>Krishna Sitaraman</name>
<email>ksitaraman@nvidia.com</email>
</author>
<published>2017-05-30T23:33:20+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/nvidia-tegra-modules.git/commit/?id=e555573dd7f8321817e9e7861cfb26591d63c6f1'/>
<id>e555573dd7f8321817e9e7861cfb26591d63c6f1</id>
<content type='text'>
This patch updates the cstats api to properly read the cpu power
state statistics for t194. It also updates the cstats debugfs
node to read and show all cpu power state statistics.

JIRA: TPM-1059

Change-Id: I708dc9a22f9ee8765517cfd64aaab57385f98e05
Signed-off-by: Krishna Sitaraman &lt;ksitaraman@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/1492473
Reviewed-by: svccoveritychecker &lt;svccoveritychecker@nvidia.com&gt;
Reviewed-by: Alexander Van Brunt &lt;avanbrunt@nvidia.com&gt;
GVS: Gerrit_Virtual_Submit
Reviewed-by: Adeel Raza &lt;araza@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch updates the cstats api to properly read the cpu power
state statistics for t194. It also updates the cstats debugfs
node to read and show all cpu power state statistics.

JIRA: TPM-1059

Change-Id: I708dc9a22f9ee8765517cfd64aaab57385f98e05
Signed-off-by: Krishna Sitaraman &lt;ksitaraman@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/1492473
Reviewed-by: svccoveritychecker &lt;svccoveritychecker@nvidia.com&gt;
Reviewed-by: Alexander Van Brunt &lt;avanbrunt@nvidia.com&gt;
GVS: Gerrit_Virtual_Submit
Reviewed-by: Adeel Raza &lt;araza@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>t19x: mce: Update mce_cc3_ctrl API</title>
<updated>2017-05-26T17:43:36+00:00</updated>
<author>
<name>Hoang Pham</name>
<email>hopham@nvidia.com</email>
</author>
<published>2017-05-16T20:40:50+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/nvidia-tegra-modules.git/commit/?id=996735a71af96a8e37ac32e1a5a83b8b682644e8'/>
<id>996735a71af96a8e37ac32e1a5a83b8b682644e8</id>
<content type='text'>
This patch updates API for cc3 control. T19x does not require
voltage parameter.

JIRA TPM-1062

Change-Id: Ie38cf383efe190904330f4cead00237e4ad86414
Signed-off-by: Hoang Pham &lt;hopham@nvidia.com&gt;
Reviewed-on: http://git-master/r/1483382
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Krishna Sitaraman &lt;ksitaraman@nvidia.com&gt;
Reviewed-by: svccoveritychecker &lt;svccoveritychecker@nvidia.com&gt;
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alexander Van Brunt &lt;avanbrunt@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch updates API for cc3 control. T19x does not require
voltage parameter.

JIRA TPM-1062

Change-Id: Ie38cf383efe190904330f4cead00237e4ad86414
Signed-off-by: Hoang Pham &lt;hopham@nvidia.com&gt;
Reviewed-on: http://git-master/r/1483382
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Krishna Sitaraman &lt;ksitaraman@nvidia.com&gt;
Reviewed-by: svccoveritychecker &lt;svccoveritychecker@nvidia.com&gt;
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alexander Van Brunt &lt;avanbrunt@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>t19x: mce: add mce driver</title>
<updated>2017-02-24T16:43:19+00:00</updated>
<author>
<name>Krishna Sitaraman</name>
<email>ksitaraman@nvidia.com</email>
</author>
<published>2017-01-05T00:44:39+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/nvidia-tegra-modules.git/commit/?id=ddcfffcf6a354492fccda77f75ad51667f661a40'/>
<id>ddcfffcf6a354492fccda77f75ad51667f661a40</id>
<content type='text'>
This patch adds the initial driver for sw interface with the
mts/mce in t19x. The driver provides api's and debugfs nodes
for interaction with the mts/mce.

JIRA TPM-1062

Change-Id: I4a682457a8e28e9b8db2a6a370a756f0d0524830
Signed-off-by: Krishna Sitaraman &lt;ksitaraman@nvidia.com&gt;
Reviewed-on: http://git-master/r/1280452
Reviewed-by: svccoveritychecker &lt;svccoveritychecker@nvidia.com&gt;
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alexander Van Brunt &lt;avanbrunt@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds the initial driver for sw interface with the
mts/mce in t19x. The driver provides api's and debugfs nodes
for interaction with the mts/mce.

JIRA TPM-1062

Change-Id: I4a682457a8e28e9b8db2a6a370a756f0d0524830
Signed-off-by: Krishna Sitaraman &lt;ksitaraman@nvidia.com&gt;
Reviewed-on: http://git-master/r/1280452
Reviewed-by: svccoveritychecker &lt;svccoveritychecker@nvidia.com&gt;
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alexander Van Brunt &lt;avanbrunt@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
