Merge 5.5-rc3 into android-mainline
Linux 5.5-rc3 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I1735073980c0168a1ad8bc130fea534dc13f6091
This commit is contained in:
2
.mailmap
2
.mailmap
@@ -152,6 +152,7 @@ Linus Lüssing <linus.luessing@c0d3.blue> <linus.luessing@web.de>
|
|||||||
Linus Lüssing <linus.luessing@c0d3.blue> <linus.luessing@ascom.ch>
|
Linus Lüssing <linus.luessing@c0d3.blue> <linus.luessing@ascom.ch>
|
||||||
Li Yang <leoyang.li@nxp.com> <leo@zh-kernel.org>
|
Li Yang <leoyang.li@nxp.com> <leo@zh-kernel.org>
|
||||||
Li Yang <leoyang.li@nxp.com> <leoli@freescale.com>
|
Li Yang <leoyang.li@nxp.com> <leoli@freescale.com>
|
||||||
|
Lukasz Luba <lukasz.luba@arm.com> <l.luba@partner.samsung.com>
|
||||||
Maciej W. Rozycki <macro@mips.com> <macro@imgtec.com>
|
Maciej W. Rozycki <macro@mips.com> <macro@imgtec.com>
|
||||||
Marc Zyngier <maz@kernel.org> <marc.zyngier@arm.com>
|
Marc Zyngier <maz@kernel.org> <marc.zyngier@arm.com>
|
||||||
Marcin Nowakowski <marcin.nowakowski@mips.com> <marcin.nowakowski@imgtec.com>
|
Marcin Nowakowski <marcin.nowakowski@mips.com> <marcin.nowakowski@imgtec.com>
|
||||||
@@ -265,6 +266,7 @@ Vinod Koul <vkoul@kernel.org> <vkoul@infradead.org>
|
|||||||
Viresh Kumar <vireshk@kernel.org> <viresh.kumar@st.com>
|
Viresh Kumar <vireshk@kernel.org> <viresh.kumar@st.com>
|
||||||
Viresh Kumar <vireshk@kernel.org> <viresh.linux@gmail.com>
|
Viresh Kumar <vireshk@kernel.org> <viresh.linux@gmail.com>
|
||||||
Viresh Kumar <vireshk@kernel.org> <viresh.kumar2@arm.com>
|
Viresh Kumar <vireshk@kernel.org> <viresh.kumar2@arm.com>
|
||||||
|
Vivien Didelot <vivien.didelot@gmail.com> <vivien.didelot@savoirfairelinux.com>
|
||||||
Vlad Dogaru <ddvlad@gmail.com> <vlad.dogaru@intel.com>
|
Vlad Dogaru <ddvlad@gmail.com> <vlad.dogaru@intel.com>
|
||||||
Vladimir Davydov <vdavydov.dev@gmail.com> <vdavydov@virtuozzo.com>
|
Vladimir Davydov <vdavydov.dev@gmail.com> <vdavydov@virtuozzo.com>
|
||||||
Vladimir Davydov <vdavydov.dev@gmail.com> <vdavydov@parallels.com>
|
Vladimir Davydov <vdavydov.dev@gmail.com> <vdavydov@parallels.com>
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
What: /sys/bus/platform/devices/MLNXBF04:00/driver/lifecycle_state
|
What: /sys/bus/platform/devices/MLNXBF04:00/lifecycle_state
|
||||||
Date: Oct 2019
|
Date: Oct 2019
|
||||||
KernelVersion: 5.5
|
KernelVersion: 5.5
|
||||||
Contact: "Liming Sun <lsun@mellanox.com>"
|
Contact: "Liming Sun <lsun@mellanox.com>"
|
||||||
@@ -10,7 +10,7 @@ Description:
|
|||||||
GA Non-Secured - Non-Secure chip and not able to change state
|
GA Non-Secured - Non-Secure chip and not able to change state
|
||||||
RMA - Return Merchandise Authorization
|
RMA - Return Merchandise Authorization
|
||||||
|
|
||||||
What: /sys/bus/platform/devices/MLNXBF04:00/driver/post_reset_wdog
|
What: /sys/bus/platform/devices/MLNXBF04:00/post_reset_wdog
|
||||||
Date: Oct 2019
|
Date: Oct 2019
|
||||||
KernelVersion: 5.5
|
KernelVersion: 5.5
|
||||||
Contact: "Liming Sun <lsun@mellanox.com>"
|
Contact: "Liming Sun <lsun@mellanox.com>"
|
||||||
@@ -19,7 +19,7 @@ Description:
|
|||||||
to reboot the chip and recover it to the old state if the new
|
to reboot the chip and recover it to the old state if the new
|
||||||
boot partition fails.
|
boot partition fails.
|
||||||
|
|
||||||
What: /sys/bus/platform/devices/MLNXBF04:00/driver/reset_action
|
What: /sys/bus/platform/devices/MLNXBF04:00/reset_action
|
||||||
Date: Oct 2019
|
Date: Oct 2019
|
||||||
KernelVersion: 5.5
|
KernelVersion: 5.5
|
||||||
Contact: "Liming Sun <lsun@mellanox.com>"
|
Contact: "Liming Sun <lsun@mellanox.com>"
|
||||||
@@ -30,7 +30,7 @@ Description:
|
|||||||
emmc - boot from the onchip eMMC
|
emmc - boot from the onchip eMMC
|
||||||
emmc_legacy - boot from the onchip eMMC in legacy (slow) mode
|
emmc_legacy - boot from the onchip eMMC in legacy (slow) mode
|
||||||
|
|
||||||
What: /sys/bus/platform/devices/MLNXBF04:00/driver/second_reset_action
|
What: /sys/bus/platform/devices/MLNXBF04:00/second_reset_action
|
||||||
Date: Oct 2019
|
Date: Oct 2019
|
||||||
KernelVersion: 5.5
|
KernelVersion: 5.5
|
||||||
Contact: "Liming Sun <lsun@mellanox.com>"
|
Contact: "Liming Sun <lsun@mellanox.com>"
|
||||||
@@ -44,7 +44,7 @@ Description:
|
|||||||
swap_emmc - swap the primary / secondary boot partition
|
swap_emmc - swap the primary / secondary boot partition
|
||||||
none - cancel the action
|
none - cancel the action
|
||||||
|
|
||||||
What: /sys/bus/platform/devices/MLNXBF04:00/driver/secure_boot_fuse_state
|
What: /sys/bus/platform/devices/MLNXBF04:00/secure_boot_fuse_state
|
||||||
Date: Oct 2019
|
Date: Oct 2019
|
||||||
KernelVersion: 5.5
|
KernelVersion: 5.5
|
||||||
Contact: "Liming Sun <lsun@mellanox.com>"
|
Contact: "Liming Sun <lsun@mellanox.com>"
|
||||||
|
@@ -181,14 +181,17 @@ When mounting an ext4 filesystem, the following option are accepted:
|
|||||||
system after its metadata has been committed to the journal.
|
system after its metadata has been committed to the journal.
|
||||||
|
|
||||||
commit=nrsec (*)
|
commit=nrsec (*)
|
||||||
Ext4 can be told to sync all its data and metadata every 'nrsec'
|
This setting limits the maximum age of the running transaction to
|
||||||
seconds. The default value is 5 seconds. This means that if you lose
|
'nrsec' seconds. The default value is 5 seconds. This means that if
|
||||||
your power, you will lose as much as the latest 5 seconds of work (your
|
you lose your power, you will lose as much as the latest 5 seconds of
|
||||||
filesystem will not be damaged though, thanks to the journaling). This
|
metadata changes (your filesystem will not be damaged though, thanks
|
||||||
default value (or any low value) will hurt performance, but it's good
|
to the journaling). This default value (or any low value) will hurt
|
||||||
for data-safety. Setting it to 0 will have the same effect as leaving
|
performance, but it's good for data-safety. Setting it to 0 will have
|
||||||
it at the default (5 seconds). Setting it to very large values will
|
the same effect as leaving it at the default (5 seconds). Setting it
|
||||||
improve performance.
|
to very large values will improve performance. Note that due to
|
||||||
|
delayed allocation even older data can be lost on power failure since
|
||||||
|
writeback of those data begins only after time set in
|
||||||
|
/proc/sys/vm/dirty_expire_centisecs.
|
||||||
|
|
||||||
barrier=<0|1(*)>, barrier(*), nobarrier
|
barrier=<0|1(*)>, barrier(*), nobarrier
|
||||||
This enables/disables the use of write barriers in the jbd code.
|
This enables/disables the use of write barriers in the jbd code.
|
||||||
|
@@ -253,7 +253,7 @@ The following sysctls are available for the XFS filesystem:
|
|||||||
pool.
|
pool.
|
||||||
|
|
||||||
fs.xfs.speculative_prealloc_lifetime
|
fs.xfs.speculative_prealloc_lifetime
|
||||||
(Units: seconds Min: 1 Default: 300 Max: 86400)
|
(Units: seconds Min: 1 Default: 300 Max: 86400)
|
||||||
The interval at which the background scanning for inodes
|
The interval at which the background scanning for inodes
|
||||||
with unused speculative preallocation runs. The scan
|
with unused speculative preallocation runs. The scan
|
||||||
removes unused preallocation from clean inodes and releases
|
removes unused preallocation from clean inodes and releases
|
||||||
|
@@ -203,12 +203,12 @@ Test Module
|
|||||||
Kselftest tests the kernel from userspace. Sometimes things need
|
Kselftest tests the kernel from userspace. Sometimes things need
|
||||||
testing from within the kernel, one method of doing this is to create a
|
testing from within the kernel, one method of doing this is to create a
|
||||||
test module. We can tie the module into the kselftest framework by
|
test module. We can tie the module into the kselftest framework by
|
||||||
using a shell script test runner. ``kselftest_module.sh`` is designed
|
using a shell script test runner. ``kselftest/module.sh`` is designed
|
||||||
to facilitate this process. There is also a header file provided to
|
to facilitate this process. There is also a header file provided to
|
||||||
assist writing kernel modules that are for use with kselftest:
|
assist writing kernel modules that are for use with kselftest:
|
||||||
|
|
||||||
- ``tools/testing/kselftest/kselftest_module.h``
|
- ``tools/testing/kselftest/kselftest_module.h``
|
||||||
- ``tools/testing/kselftest/kselftest_module.sh``
|
- ``tools/testing/kselftest/kselftest/module.sh``
|
||||||
|
|
||||||
How to use
|
How to use
|
||||||
----------
|
----------
|
||||||
@@ -247,7 +247,7 @@ A bare bones test module might look like this:
|
|||||||
|
|
||||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||||
|
|
||||||
#include "../tools/testing/selftests/kselftest_module.h"
|
#include "../tools/testing/selftests/kselftest/module.h"
|
||||||
|
|
||||||
KSTM_MODULE_GLOBALS();
|
KSTM_MODULE_GLOBALS();
|
||||||
|
|
||||||
@@ -276,7 +276,7 @@ Example test script
|
|||||||
|
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# SPDX-License-Identifier: GPL-2.0+
|
# SPDX-License-Identifier: GPL-2.0+
|
||||||
$(dirname $0)/../kselftest_module.sh "foo" test_foo
|
$(dirname $0)/../kselftest/module.sh "foo" test_foo
|
||||||
|
|
||||||
|
|
||||||
Test Harness
|
Test Harness
|
||||||
|
@@ -9,6 +9,7 @@ KUnit - Unit Testing for the Linux Kernel
|
|||||||
|
|
||||||
start
|
start
|
||||||
usage
|
usage
|
||||||
|
kunit-tool
|
||||||
api/index
|
api/index
|
||||||
faq
|
faq
|
||||||
|
|
||||||
|
57
Documentation/dev-tools/kunit/kunit-tool.rst
Normal file
57
Documentation/dev-tools/kunit/kunit-tool.rst
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
=================
|
||||||
|
kunit_tool How-To
|
||||||
|
=================
|
||||||
|
|
||||||
|
What is kunit_tool?
|
||||||
|
===================
|
||||||
|
|
||||||
|
kunit_tool is a script (``tools/testing/kunit/kunit.py``) that aids in building
|
||||||
|
the Linux kernel as UML (`User Mode Linux
|
||||||
|
<http://user-mode-linux.sourceforge.net/>`_), running KUnit tests, parsing
|
||||||
|
the test results and displaying them in a user friendly manner.
|
||||||
|
|
||||||
|
What is a kunitconfig?
|
||||||
|
======================
|
||||||
|
|
||||||
|
It's just a defconfig that kunit_tool looks for in the base directory.
|
||||||
|
kunit_tool uses it to generate a .config as you might expect. In addition, it
|
||||||
|
verifies that the generated .config contains the CONFIG options in the
|
||||||
|
kunitconfig; the reason it does this is so that it is easy to be sure that a
|
||||||
|
CONFIG that enables a test actually ends up in the .config.
|
||||||
|
|
||||||
|
How do I use kunit_tool?
|
||||||
|
========================
|
||||||
|
|
||||||
|
If a kunitconfig is present at the root directory, all you have to do is:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
./tools/testing/kunit/kunit.py run
|
||||||
|
|
||||||
|
However, you most likely want to use it with the following options:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
./tools/testing/kunit/kunit.py run --timeout=30 --jobs=`nproc --all`
|
||||||
|
|
||||||
|
- ``--timeout`` sets a maximum amount of time to allow tests to run.
|
||||||
|
- ``--jobs`` sets the number of threads to use to build the kernel.
|
||||||
|
|
||||||
|
If you just want to use the defconfig that ships with the kernel, you can
|
||||||
|
append the ``--defconfig`` flag as well:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
./tools/testing/kunit/kunit.py run --timeout=30 --jobs=`nproc --all` --defconfig
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
This command is particularly helpful for getting started because it
|
||||||
|
just works. No kunitconfig needs to be present.
|
||||||
|
|
||||||
|
For a list of all the flags supported by kunit_tool, you can run:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
./tools/testing/kunit/kunit.py run --help
|
@@ -19,11 +19,14 @@ The wrapper can be run with:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
./tools/testing/kunit/kunit.py run
|
./tools/testing/kunit/kunit.py run --defconfig
|
||||||
|
|
||||||
|
For more information on this wrapper (also called kunit_tool) checkout the
|
||||||
|
:doc:`kunit-tool` page.
|
||||||
|
|
||||||
Creating a kunitconfig
|
Creating a kunitconfig
|
||||||
======================
|
======================
|
||||||
The Python script is a thin wrapper around Kbuild as such, it needs to be
|
The Python script is a thin wrapper around Kbuild. As such, it needs to be
|
||||||
configured with a ``kunitconfig`` file. This file essentially contains the
|
configured with a ``kunitconfig`` file. This file essentially contains the
|
||||||
regular Kernel config, with the specific test targets as well.
|
regular Kernel config, with the specific test targets as well.
|
||||||
|
|
||||||
@@ -59,8 +62,8 @@ If everything worked correctly, you should see the following:
|
|||||||
followed by a list of tests that are run. All of them should be passing.
|
followed by a list of tests that are run. All of them should be passing.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
Because it is building a lot of sources for the first time, the ``Building
|
Because it is building a lot of sources for the first time, the
|
||||||
kunit kernel`` step may take a while.
|
``Building KUnit kernel`` step may take a while.
|
||||||
|
|
||||||
Writing your first test
|
Writing your first test
|
||||||
=======================
|
=======================
|
||||||
@@ -159,7 +162,7 @@ Now you can run the test:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
./tools/testing/kunit/kunit.py
|
./tools/testing/kunit/kunit.py run
|
||||||
|
|
||||||
You should see the following failure:
|
You should see the following failure:
|
||||||
|
|
||||||
|
@@ -16,7 +16,7 @@ Organization of this document
|
|||||||
=============================
|
=============================
|
||||||
|
|
||||||
This document is organized into two main sections: Testing and Isolating
|
This document is organized into two main sections: Testing and Isolating
|
||||||
Behavior. The first covers what a unit test is and how to use KUnit to write
|
Behavior. The first covers what unit tests are and how to use KUnit to write
|
||||||
them. The second covers how to use KUnit to isolate code and make it possible
|
them. The second covers how to use KUnit to isolate code and make it possible
|
||||||
to unit test code that was otherwise un-unit-testable.
|
to unit test code that was otherwise un-unit-testable.
|
||||||
|
|
||||||
@@ -174,13 +174,13 @@ Test Suites
|
|||||||
~~~~~~~~~~~
|
~~~~~~~~~~~
|
||||||
|
|
||||||
Now obviously one unit test isn't very helpful; the power comes from having
|
Now obviously one unit test isn't very helpful; the power comes from having
|
||||||
many test cases covering all of your behaviors. Consequently it is common to
|
many test cases covering all of a unit's behaviors. Consequently it is common
|
||||||
have many *similar* tests; in order to reduce duplication in these closely
|
to have many *similar* tests; in order to reduce duplication in these closely
|
||||||
related tests most unit testing frameworks provide the concept of a *test
|
related tests most unit testing frameworks - including KUnit - provide the
|
||||||
suite*, in KUnit we call it a *test suite*; all it is is just a collection of
|
concept of a *test suite*. A *test suite* is just a collection of test cases
|
||||||
test cases for a unit of code with a set up function that gets invoked before
|
for a unit of code with a set up function that gets invoked before every test
|
||||||
every test cases and then a tear down function that gets invoked after every
|
case and then a tear down function that gets invoked after every test case
|
||||||
test case completes.
|
completes.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
@@ -211,7 +211,7 @@ KUnit test framework.
|
|||||||
.. note::
|
.. note::
|
||||||
A test case will only be run if it is associated with a test suite.
|
A test case will only be run if it is associated with a test suite.
|
||||||
|
|
||||||
For a more information on these types of things see the :doc:`api/test`.
|
For more information on these types of things see the :doc:`api/test`.
|
||||||
|
|
||||||
Isolating Behavior
|
Isolating Behavior
|
||||||
==================
|
==================
|
||||||
@@ -338,7 +338,7 @@ We can easily test this code by *faking out* the underlying EEPROM:
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
ssize_t fake_eeprom_write(struct eeprom *this, size_t offset, const char *buffer, size_t count)
|
ssize_t fake_eeprom_write(struct eeprom *parent, size_t offset, const char *buffer, size_t count)
|
||||||
{
|
{
|
||||||
struct fake_eeprom *this = container_of(parent, struct fake_eeprom, parent);
|
struct fake_eeprom *this = container_of(parent, struct fake_eeprom, parent);
|
||||||
|
|
||||||
@@ -454,7 +454,7 @@ KUnit on non-UML architectures
|
|||||||
By default KUnit uses UML as a way to provide dependencies for code under test.
|
By default KUnit uses UML as a way to provide dependencies for code under test.
|
||||||
Under most circumstances KUnit's usage of UML should be treated as an
|
Under most circumstances KUnit's usage of UML should be treated as an
|
||||||
implementation detail of how KUnit works under the hood. Nevertheless, there
|
implementation detail of how KUnit works under the hood. Nevertheless, there
|
||||||
are instances where being able to run architecture specific code, or test
|
are instances where being able to run architecture specific code or test
|
||||||
against real hardware is desirable. For these reasons KUnit supports running on
|
against real hardware is desirable. For these reasons KUnit supports running on
|
||||||
other architectures.
|
other architectures.
|
||||||
|
|
||||||
@@ -557,7 +557,7 @@ run your tests on your hardware setup just by compiling for your architecture.
|
|||||||
.. important::
|
.. important::
|
||||||
Always prefer tests that run on UML to tests that only run under a particular
|
Always prefer tests that run on UML to tests that only run under a particular
|
||||||
architecture, and always prefer tests that run under QEMU or another easy
|
architecture, and always prefer tests that run under QEMU or another easy
|
||||||
(and monitarily free) to obtain software environment to a specific piece of
|
(and monetarily free) to obtain software environment to a specific piece of
|
||||||
hardware.
|
hardware.
|
||||||
|
|
||||||
Nevertheless, there are still valid reasons to write an architecture or hardware
|
Nevertheless, there are still valid reasons to write an architecture or hardware
|
||||||
|
@@ -10,7 +10,6 @@ Required properties:
|
|||||||
- #size-cells: 0
|
- #size-cells: 0
|
||||||
- spi-max-frequency: Maximum frequency of the SPI bus the chip can
|
- spi-max-frequency: Maximum frequency of the SPI bus the chip can
|
||||||
operate at should be less than or equal to 18 MHz.
|
operate at should be less than or equal to 18 MHz.
|
||||||
- device-wake-gpios: Wake up GPIO to wake up the TCAN device.
|
|
||||||
- interrupt-parent: the phandle to the interrupt controller which provides
|
- interrupt-parent: the phandle to the interrupt controller which provides
|
||||||
the interrupt.
|
the interrupt.
|
||||||
- interrupts: interrupt specification for data-ready.
|
- interrupts: interrupt specification for data-ready.
|
||||||
@@ -23,6 +22,7 @@ Optional properties:
|
|||||||
reset.
|
reset.
|
||||||
- device-state-gpios: Input GPIO that indicates if the device is in
|
- device-state-gpios: Input GPIO that indicates if the device is in
|
||||||
a sleep state or if the device is active.
|
a sleep state or if the device is active.
|
||||||
|
- device-wake-gpios: Wake up GPIO to wake up the TCAN device.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
tcan4x5x: tcan4x5x@0 {
|
tcan4x5x: tcan4x5x@0 {
|
||||||
@@ -36,5 +36,5 @@ tcan4x5x: tcan4x5x@0 {
|
|||||||
interrupts = <14 GPIO_ACTIVE_LOW>;
|
interrupts = <14 GPIO_ACTIVE_LOW>;
|
||||||
device-state-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
|
device-state-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
|
||||||
device-wake-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
|
device-wake-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
|
||||||
reset-gpios = <&gpio1 27 GPIO_ACTIVE_LOW>;
|
reset-gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>;
|
||||||
};
|
};
|
||||||
|
@@ -347,6 +347,7 @@ allOf:
|
|||||||
- st,spear600-gmac
|
- st,spear600-gmac
|
||||||
|
|
||||||
then:
|
then:
|
||||||
|
properties:
|
||||||
snps,tso:
|
snps,tso:
|
||||||
$ref: /schemas/types.yaml#definitions/flag
|
$ref: /schemas/types.yaml#definitions/flag
|
||||||
description:
|
description:
|
||||||
|
@@ -22,6 +22,6 @@ Example:
|
|||||||
};
|
};
|
||||||
|
|
||||||
ðernet_switch {
|
ðernet_switch {
|
||||||
resets = <&reset>;
|
resets = <&reset 26>;
|
||||||
reset-names = "switch";
|
reset-names = "switch";
|
||||||
};
|
};
|
||||||
|
@@ -196,14 +196,11 @@ applicable everywhere (see syntax).
|
|||||||
or equal to the first symbol and smaller than or equal to the second
|
or equal to the first symbol and smaller than or equal to the second
|
||||||
symbol.
|
symbol.
|
||||||
|
|
||||||
- help text: "help" or "---help---"
|
- help text: "help"
|
||||||
|
|
||||||
This defines a help text. The end of the help text is determined by
|
This defines a help text. The end of the help text is determined by
|
||||||
the indentation level, this means it ends at the first line which has
|
the indentation level, this means it ends at the first line which has
|
||||||
a smaller indentation than the first line of the help text.
|
a smaller indentation than the first line of the help text.
|
||||||
"---help---" and "help" do not differ in behaviour, "---help---" is
|
|
||||||
used to help visually separate configuration logic from help within
|
|
||||||
the file as an aid to developers.
|
|
||||||
|
|
||||||
- misc options: "option" <symbol>[=<value>]
|
- misc options: "option" <symbol>[=<value>]
|
||||||
|
|
||||||
|
@@ -297,9 +297,19 @@ more details, with real examples.
|
|||||||
If CONFIG_EXT2_FS is set to either 'y' (built-in) or 'm' (modular)
|
If CONFIG_EXT2_FS is set to either 'y' (built-in) or 'm' (modular)
|
||||||
the corresponding obj- variable will be set, and kbuild will descend
|
the corresponding obj- variable will be set, and kbuild will descend
|
||||||
down in the ext2 directory.
|
down in the ext2 directory.
|
||||||
Kbuild only uses this information to decide that it needs to visit
|
|
||||||
the directory, it is the Makefile in the subdirectory that
|
Kbuild uses this information not only to decide that it needs to visit
|
||||||
specifies what is modular and what is built-in.
|
the directory, but also to decide whether or not to link objects from
|
||||||
|
the directory into vmlinux.
|
||||||
|
|
||||||
|
When Kbuild descends into the directory with 'y', all built-in objects
|
||||||
|
from that directory are combined into the built-in.a, which will be
|
||||||
|
eventually linked into vmlinux.
|
||||||
|
|
||||||
|
When Kbuild descends into the directory with 'm', in contrast, nothing
|
||||||
|
from that directory will be linked into vmlinux. If the Makefile in
|
||||||
|
that directory specifies obj-y, those objects will be left orphan.
|
||||||
|
It is very likely a bug of the Makefile or of dependencies in Kconfig.
|
||||||
|
|
||||||
It is good practice to use a `CONFIG_` variable when assigning directory
|
It is good practice to use a `CONFIG_` variable when assigning directory
|
||||||
names. This allows kbuild to totally skip the directory if the
|
names. This allows kbuild to totally skip the directory if the
|
||||||
|
@@ -339,7 +339,7 @@ To claim an address following code example can be used:
|
|||||||
.pgn = J1939_PGN_ADDRESS_CLAIMED,
|
.pgn = J1939_PGN_ADDRESS_CLAIMED,
|
||||||
.pgn_mask = J1939_PGN_PDU1_MAX,
|
.pgn_mask = J1939_PGN_PDU1_MAX,
|
||||||
}, {
|
}, {
|
||||||
.pgn = J1939_PGN_ADDRESS_REQUEST,
|
.pgn = J1939_PGN_REQUEST,
|
||||||
.pgn_mask = J1939_PGN_PDU1_MAX,
|
.pgn_mask = J1939_PGN_PDU1_MAX,
|
||||||
}, {
|
}, {
|
||||||
.pgn = J1939_PGN_ADDRESS_COMMANDED,
|
.pgn = J1939_PGN_ADDRESS_COMMANDED,
|
||||||
|
27
MAINTAINERS
27
MAINTAINERS
@@ -2272,6 +2272,7 @@ F: drivers/*/*s3c64xx*
|
|||||||
F: drivers/*/*s5pv210*
|
F: drivers/*/*s5pv210*
|
||||||
F: drivers/memory/samsung/
|
F: drivers/memory/samsung/
|
||||||
F: drivers/soc/samsung/
|
F: drivers/soc/samsung/
|
||||||
|
F: drivers/tty/serial/samsung*
|
||||||
F: include/linux/soc/samsung/
|
F: include/linux/soc/samsung/
|
||||||
F: Documentation/arm/samsung/
|
F: Documentation/arm/samsung/
|
||||||
F: Documentation/devicetree/bindings/arm/samsung/
|
F: Documentation/devicetree/bindings/arm/samsung/
|
||||||
@@ -5000,7 +5001,7 @@ F: include/linux/dma-mapping.h
|
|||||||
F: include/linux/dma-noncoherent.h
|
F: include/linux/dma-noncoherent.h
|
||||||
|
|
||||||
DMC FREQUENCY DRIVER FOR SAMSUNG EXYNOS5422
|
DMC FREQUENCY DRIVER FOR SAMSUNG EXYNOS5422
|
||||||
M: Lukasz Luba <l.luba@partner.samsung.com>
|
M: Lukasz Luba <lukasz.luba@arm.com>
|
||||||
L: linux-pm@vger.kernel.org
|
L: linux-pm@vger.kernel.org
|
||||||
L: linux-samsung-soc@vger.kernel.org
|
L: linux-samsung-soc@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
@@ -6026,6 +6027,7 @@ M: Yash Shah <yash.shah@sifive.com>
|
|||||||
L: linux-edac@vger.kernel.org
|
L: linux-edac@vger.kernel.org
|
||||||
S: Supported
|
S: Supported
|
||||||
F: drivers/edac/sifive_edac.c
|
F: drivers/edac/sifive_edac.c
|
||||||
|
F: drivers/soc/sifive_l2_cache.c
|
||||||
|
|
||||||
EDAC-SKYLAKE
|
EDAC-SKYLAKE
|
||||||
M: Tony Luck <tony.luck@intel.com>
|
M: Tony Luck <tony.luck@intel.com>
|
||||||
@@ -9039,7 +9041,6 @@ F: include/linux/umh.h
|
|||||||
|
|
||||||
KERNEL VIRTUAL MACHINE (KVM)
|
KERNEL VIRTUAL MACHINE (KVM)
|
||||||
M: Paolo Bonzini <pbonzini@redhat.com>
|
M: Paolo Bonzini <pbonzini@redhat.com>
|
||||||
M: Radim Krčmář <rkrcmar@redhat.com>
|
|
||||||
L: kvm@vger.kernel.org
|
L: kvm@vger.kernel.org
|
||||||
W: http://www.linux-kvm.org
|
W: http://www.linux-kvm.org
|
||||||
T: git git://git.kernel.org/pub/scm/virt/kvm/kvm.git
|
T: git git://git.kernel.org/pub/scm/virt/kvm/kvm.git
|
||||||
@@ -9074,9 +9075,9 @@ F: virt/kvm/arm/
|
|||||||
F: include/kvm/arm_*
|
F: include/kvm/arm_*
|
||||||
|
|
||||||
KERNEL VIRTUAL MACHINE FOR MIPS (KVM/mips)
|
KERNEL VIRTUAL MACHINE FOR MIPS (KVM/mips)
|
||||||
M: James Hogan <jhogan@kernel.org>
|
|
||||||
L: linux-mips@vger.kernel.org
|
L: linux-mips@vger.kernel.org
|
||||||
S: Supported
|
L: kvm@vger.kernel.org
|
||||||
|
S: Orphan
|
||||||
F: arch/mips/include/uapi/asm/kvm*
|
F: arch/mips/include/uapi/asm/kvm*
|
||||||
F: arch/mips/include/asm/kvm*
|
F: arch/mips/include/asm/kvm*
|
||||||
F: arch/mips/kvm/
|
F: arch/mips/kvm/
|
||||||
@@ -9111,7 +9112,6 @@ F: tools/testing/selftests/kvm/*/s390x/
|
|||||||
|
|
||||||
KERNEL VIRTUAL MACHINE FOR X86 (KVM/x86)
|
KERNEL VIRTUAL MACHINE FOR X86 (KVM/x86)
|
||||||
M: Paolo Bonzini <pbonzini@redhat.com>
|
M: Paolo Bonzini <pbonzini@redhat.com>
|
||||||
M: Radim Krčmář <rkrcmar@redhat.com>
|
|
||||||
R: Sean Christopherson <sean.j.christopherson@intel.com>
|
R: Sean Christopherson <sean.j.christopherson@intel.com>
|
||||||
R: Vitaly Kuznetsov <vkuznets@redhat.com>
|
R: Vitaly Kuznetsov <vkuznets@redhat.com>
|
||||||
R: Wanpeng Li <wanpengli@tencent.com>
|
R: Wanpeng Li <wanpengli@tencent.com>
|
||||||
@@ -10109,6 +10109,7 @@ S: Maintained
|
|||||||
F: drivers/media/radio/radio-maxiradio*
|
F: drivers/media/radio/radio-maxiradio*
|
||||||
|
|
||||||
MCAN MMIO DEVICE DRIVER
|
MCAN MMIO DEVICE DRIVER
|
||||||
|
M: Dan Murphy <dmurphy@ti.com>
|
||||||
M: Sriram Dash <sriram.dash@samsung.com>
|
M: Sriram Dash <sriram.dash@samsung.com>
|
||||||
L: linux-can@vger.kernel.org
|
L: linux-can@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
@@ -13709,6 +13710,15 @@ L: linux-arm-msm@vger.kernel.org
|
|||||||
S: Maintained
|
S: Maintained
|
||||||
F: drivers/iommu/qcom_iommu.c
|
F: drivers/iommu/qcom_iommu.c
|
||||||
|
|
||||||
|
QUALCOMM RMNET DRIVER
|
||||||
|
M: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
|
||||||
|
M: Sean Tranchetti <stranche@codeaurora.org>
|
||||||
|
L: netdev@vger.kernel.org
|
||||||
|
S: Maintained
|
||||||
|
F: drivers/net/ethernet/qualcomm/rmnet/
|
||||||
|
F: Documentation/networking/device_drivers/qualcomm/rmnet.txt
|
||||||
|
F: include/linux/if_rmnet.h
|
||||||
|
|
||||||
QUALCOMM TSENS THERMAL DRIVER
|
QUALCOMM TSENS THERMAL DRIVER
|
||||||
M: Amit Kucheria <amit.kucheria@linaro.org>
|
M: Amit Kucheria <amit.kucheria@linaro.org>
|
||||||
L: linux-pm@vger.kernel.org
|
L: linux-pm@vger.kernel.org
|
||||||
@@ -16532,6 +16542,13 @@ L: alsa-devel@alsa-project.org (moderated for non-subscribers)
|
|||||||
S: Odd Fixes
|
S: Odd Fixes
|
||||||
F: sound/soc/codecs/tas571x*
|
F: sound/soc/codecs/tas571x*
|
||||||
|
|
||||||
|
TI TCAN4X5X DEVICE DRIVER
|
||||||
|
M: Dan Murphy <dmurphy@ti.com>
|
||||||
|
L: linux-can@vger.kernel.org
|
||||||
|
S: Maintained
|
||||||
|
F: Documentation/devicetree/bindings/net/can/tcan4x5x.txt
|
||||||
|
F: drivers/net/can/m_can/tcan4x5x.c
|
||||||
|
|
||||||
TI TRF7970A NFC DRIVER
|
TI TRF7970A NFC DRIVER
|
||||||
M: Mark Greer <mgreer@animalcreek.com>
|
M: Mark Greer <mgreer@animalcreek.com>
|
||||||
L: linux-wireless@vger.kernel.org
|
L: linux-wireless@vger.kernel.org
|
||||||
|
5
Makefile
5
Makefile
@@ -2,7 +2,7 @@
|
|||||||
VERSION = 5
|
VERSION = 5
|
||||||
PATCHLEVEL = 5
|
PATCHLEVEL = 5
|
||||||
SUBLEVEL = 0
|
SUBLEVEL = 0
|
||||||
EXTRAVERSION = -rc2
|
EXTRAVERSION = -rc3
|
||||||
NAME = Kleptomaniac Octopus
|
NAME = Kleptomaniac Octopus
|
||||||
|
|
||||||
# *DOCUMENTATION*
|
# *DOCUMENTATION*
|
||||||
@@ -414,6 +414,7 @@ STRIP = $(CROSS_COMPILE)strip
|
|||||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||||
OBJDUMP = $(CROSS_COMPILE)objdump
|
OBJDUMP = $(CROSS_COMPILE)objdump
|
||||||
OBJSIZE = $(CROSS_COMPILE)size
|
OBJSIZE = $(CROSS_COMPILE)size
|
||||||
|
READELF = $(CROSS_COMPILE)readelf
|
||||||
PAHOLE = pahole
|
PAHOLE = pahole
|
||||||
LEX = flex
|
LEX = flex
|
||||||
YACC = bison
|
YACC = bison
|
||||||
@@ -472,7 +473,7 @@ GCC_PLUGINS_CFLAGS :=
|
|||||||
CLANG_FLAGS :=
|
CLANG_FLAGS :=
|
||||||
|
|
||||||
export ARCH SRCARCH CONFIG_SHELL BASH HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE AS LD CC
|
export ARCH SRCARCH CONFIG_SHELL BASH HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE AS LD CC
|
||||||
export CPP AR NM STRIP OBJCOPY OBJDUMP OBJSIZE PAHOLE LEX YACC AWK INSTALLKERNEL
|
export CPP AR NM STRIP OBJCOPY OBJDUMP OBJSIZE READELF PAHOLE LEX YACC AWK INSTALLKERNEL
|
||||||
export PERL PYTHON PYTHON2 PYTHON3 CHECK CHECKFLAGS MAKE UTS_MACHINE HOSTCXX
|
export PERL PYTHON PYTHON2 PYTHON3 CHECK CHECKFLAGS MAKE UTS_MACHINE HOSTCXX
|
||||||
export KBUILD_HOSTCXXFLAGS KBUILD_HOSTLDFLAGS KBUILD_HOSTLDLIBS LDFLAGS_MODULE
|
export KBUILD_HOSTCXXFLAGS KBUILD_HOSTLDFLAGS KBUILD_HOSTLDLIBS LDFLAGS_MODULE
|
||||||
|
|
||||||
|
@@ -108,7 +108,7 @@
|
|||||||
|
|
||||||
&cpsw_emac0 {
|
&cpsw_emac0 {
|
||||||
phy-handle = <ðphy0>;
|
phy-handle = <ðphy0>;
|
||||||
phy-mode = "rgmii-txid";
|
phy-mode = "rgmii-id";
|
||||||
};
|
};
|
||||||
|
|
||||||
&i2c0 {
|
&i2c0 {
|
||||||
|
@@ -86,7 +86,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
lcd0: display {
|
lcd0: display {
|
||||||
compatible = "osddisplays,osd057T0559-34ts", "panel-dpi";
|
compatible = "osddisplays,osd070t1718-19ts", "panel-dpi";
|
||||||
label = "lcd";
|
label = "lcd";
|
||||||
|
|
||||||
backlight = <&lcd_bl>;
|
backlight = <&lcd_bl>;
|
||||||
|
@@ -42,7 +42,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
lcd0: display {
|
lcd0: display {
|
||||||
compatible = "osddisplays,osd057T0559-34ts", "panel-dpi";
|
compatible = "osddisplays,osd070t1718-19ts", "panel-dpi";
|
||||||
label = "lcd";
|
label = "lcd";
|
||||||
|
|
||||||
backlight = <&lcd_bl>;
|
backlight = <&lcd_bl>;
|
||||||
|
@@ -174,8 +174,8 @@
|
|||||||
mdio: mdio@18002000 {
|
mdio: mdio@18002000 {
|
||||||
compatible = "brcm,iproc-mdio";
|
compatible = "brcm,iproc-mdio";
|
||||||
reg = <0x18002000 0x8>;
|
reg = <0x18002000 0x8>;
|
||||||
#size-cells = <1>;
|
#size-cells = <0>;
|
||||||
#address-cells = <0>;
|
#address-cells = <1>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
|
|
||||||
gphy0: ethernet-phy@0 {
|
gphy0: ethernet-phy@0 {
|
||||||
|
@@ -43,7 +43,7 @@
|
|||||||
<0x7c000000 0x0 0xfc000000 0x02000000>,
|
<0x7c000000 0x0 0xfc000000 0x02000000>,
|
||||||
<0x40000000 0x0 0xff800000 0x00800000>;
|
<0x40000000 0x0 0xff800000 0x00800000>;
|
||||||
/* Emulate a contiguous 30-bit address range for DMA */
|
/* Emulate a contiguous 30-bit address range for DMA */
|
||||||
dma-ranges = <0xc0000000 0x0 0x00000000 0x3c000000>;
|
dma-ranges = <0xc0000000 0x0 0x00000000 0x40000000>;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This node is the provider for the enable-method for
|
* This node is the provider for the enable-method for
|
||||||
|
@@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
trips {
|
trips {
|
||||||
cpu-crit {
|
cpu-crit {
|
||||||
temperature = <80000>;
|
temperature = <90000>;
|
||||||
hysteresis = <0>;
|
hysteresis = <0>;
|
||||||
type = "critical";
|
type = "critical";
|
||||||
};
|
};
|
||||||
|
@@ -353,8 +353,8 @@
|
|||||||
mdio: mdio@18003000 {
|
mdio: mdio@18003000 {
|
||||||
compatible = "brcm,iproc-mdio";
|
compatible = "brcm,iproc-mdio";
|
||||||
reg = <0x18003000 0x8>;
|
reg = <0x18003000 0x8>;
|
||||||
#size-cells = <1>;
|
#size-cells = <0>;
|
||||||
#address-cells = <0>;
|
#address-cells = <1>;
|
||||||
};
|
};
|
||||||
|
|
||||||
mdio-bus-mux@18003000 {
|
mdio-bus-mux@18003000 {
|
||||||
|
@@ -265,11 +265,6 @@
|
|||||||
regulator-name = "LDORTC1";
|
regulator-name = "LDORTC1";
|
||||||
regulator-boot-on;
|
regulator-boot-on;
|
||||||
};
|
};
|
||||||
|
|
||||||
ldortc2_reg: LDORTC2 {
|
|
||||||
regulator-name = "LDORTC2";
|
|
||||||
regulator-boot-on;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@@ -30,14 +30,26 @@
|
|||||||
enable-active-high;
|
enable-active-high;
|
||||||
};
|
};
|
||||||
|
|
||||||
reg_sensors: regulator-sensors {
|
reg_peri_3v3: regulator-peri-3v3 {
|
||||||
compatible = "regulator-fixed";
|
compatible = "regulator-fixed";
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&pinctrl_sensors_reg>;
|
pinctrl-0 = <&pinctrl_peri_3v3>;
|
||||||
regulator-name = "sensors-supply";
|
regulator-name = "VPERI_3V3";
|
||||||
regulator-min-microvolt = <3300000>;
|
regulator-min-microvolt = <3300000>;
|
||||||
regulator-max-microvolt = <3300000>;
|
regulator-max-microvolt = <3300000>;
|
||||||
gpio = <&gpio5 2 GPIO_ACTIVE_LOW>;
|
gpio = <&gpio5 2 GPIO_ACTIVE_LOW>;
|
||||||
|
/*
|
||||||
|
* If you want to want to make this dynamic please
|
||||||
|
* check schematics and test all affected peripherals:
|
||||||
|
*
|
||||||
|
* - sensors
|
||||||
|
* - ethernet phy
|
||||||
|
* - can
|
||||||
|
* - bluetooth
|
||||||
|
* - wm8960 audio codec
|
||||||
|
* - ov5640 camera
|
||||||
|
*/
|
||||||
|
regulator-always-on;
|
||||||
};
|
};
|
||||||
|
|
||||||
reg_can_3v3: regulator-can-3v3 {
|
reg_can_3v3: regulator-can-3v3 {
|
||||||
@@ -140,6 +152,7 @@
|
|||||||
pinctrl-0 = <&pinctrl_enet1>;
|
pinctrl-0 = <&pinctrl_enet1>;
|
||||||
phy-mode = "rmii";
|
phy-mode = "rmii";
|
||||||
phy-handle = <ðphy0>;
|
phy-handle = <ðphy0>;
|
||||||
|
phy-supply = <®_peri_3v3>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -148,6 +161,7 @@
|
|||||||
pinctrl-0 = <&pinctrl_enet2>;
|
pinctrl-0 = <&pinctrl_enet2>;
|
||||||
phy-mode = "rmii";
|
phy-mode = "rmii";
|
||||||
phy-handle = <ðphy1>;
|
phy-handle = <ðphy1>;
|
||||||
|
phy-supply = <®_peri_3v3>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
mdio {
|
mdio {
|
||||||
@@ -193,8 +207,8 @@
|
|||||||
magnetometer@e {
|
magnetometer@e {
|
||||||
compatible = "fsl,mag3110";
|
compatible = "fsl,mag3110";
|
||||||
reg = <0x0e>;
|
reg = <0x0e>;
|
||||||
vdd-supply = <®_sensors>;
|
vdd-supply = <®_peri_3v3>;
|
||||||
vddio-supply = <®_sensors>;
|
vddio-supply = <®_peri_3v3>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -227,7 +241,7 @@
|
|||||||
flash0: n25q256a@0 {
|
flash0: n25q256a@0 {
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
compatible = "micron,n25q256a";
|
compatible = "micron,n25q256a", "jedec,spi-nor";
|
||||||
spi-max-frequency = <29000000>;
|
spi-max-frequency = <29000000>;
|
||||||
spi-rx-bus-width = <4>;
|
spi-rx-bus-width = <4>;
|
||||||
spi-tx-bus-width = <4>;
|
spi-tx-bus-width = <4>;
|
||||||
@@ -462,7 +476,7 @@
|
|||||||
>;
|
>;
|
||||||
};
|
};
|
||||||
|
|
||||||
pinctrl_sensors_reg: sensorsreggrp {
|
pinctrl_peri_3v3: peri3v3grp {
|
||||||
fsl,pins = <
|
fsl,pins = <
|
||||||
MX6UL_PAD_SNVS_TAMPER2__GPIO5_IO02 0x1b0b0
|
MX6UL_PAD_SNVS_TAMPER2__GPIO5_IO02 0x1b0b0
|
||||||
>;
|
>;
|
||||||
|
@@ -350,6 +350,7 @@ CONFIG_PRINTK_TIME=y
|
|||||||
CONFIG_DYNAMIC_DEBUG=y
|
CONFIG_DYNAMIC_DEBUG=y
|
||||||
CONFIG_DEBUG_INFO=y
|
CONFIG_DEBUG_INFO=y
|
||||||
CONFIG_MAGIC_SYSRQ=y
|
CONFIG_MAGIC_SYSRQ=y
|
||||||
|
CONFIG_DEBUG_FS=y
|
||||||
CONFIG_DEBUG_KERNEL=y
|
CONFIG_DEBUG_KERNEL=y
|
||||||
CONFIG_SOFTLOCKUP_DETECTOR=y
|
CONFIG_SOFTLOCKUP_DETECTOR=y
|
||||||
# CONFIG_DETECT_HUNG_TASK is not set
|
# CONFIG_DETECT_HUNG_TASK is not set
|
||||||
|
@@ -462,6 +462,7 @@ CONFIG_FONT_8x8=y
|
|||||||
CONFIG_FONT_8x16=y
|
CONFIG_FONT_8x16=y
|
||||||
CONFIG_PRINTK_TIME=y
|
CONFIG_PRINTK_TIME=y
|
||||||
CONFIG_MAGIC_SYSRQ=y
|
CONFIG_MAGIC_SYSRQ=y
|
||||||
|
CONFIG_DEBUG_FS=y
|
||||||
# CONFIG_SCHED_DEBUG is not set
|
# CONFIG_SCHED_DEBUG is not set
|
||||||
CONFIG_PROVE_LOCKING=y
|
CONFIG_PROVE_LOCKING=y
|
||||||
# CONFIG_DEBUG_BUGVERBOSE is not set
|
# CONFIG_DEBUG_BUGVERBOSE is not set
|
||||||
|
@@ -92,6 +92,7 @@ CONFIG_IP_PNP_BOOTP=y
|
|||||||
CONFIG_IP_PNP_RARP=y
|
CONFIG_IP_PNP_RARP=y
|
||||||
CONFIG_NETFILTER=y
|
CONFIG_NETFILTER=y
|
||||||
CONFIG_PHONET=m
|
CONFIG_PHONET=m
|
||||||
|
CONFIG_NET_SWITCHDEV=y
|
||||||
CONFIG_CAN=m
|
CONFIG_CAN=m
|
||||||
CONFIG_CAN_C_CAN=m
|
CONFIG_CAN_C_CAN=m
|
||||||
CONFIG_CAN_C_CAN_PLATFORM=m
|
CONFIG_CAN_C_CAN_PLATFORM=m
|
||||||
@@ -181,6 +182,7 @@ CONFIG_SMSC911X=y
|
|||||||
# CONFIG_NET_VENDOR_STMICRO is not set
|
# CONFIG_NET_VENDOR_STMICRO is not set
|
||||||
CONFIG_TI_DAVINCI_EMAC=y
|
CONFIG_TI_DAVINCI_EMAC=y
|
||||||
CONFIG_TI_CPSW=y
|
CONFIG_TI_CPSW=y
|
||||||
|
CONFIG_TI_CPSW_SWITCHDEV=y
|
||||||
CONFIG_TI_CPTS=y
|
CONFIG_TI_CPTS=y
|
||||||
# CONFIG_NET_VENDOR_VIA is not set
|
# CONFIG_NET_VENDOR_VIA is not set
|
||||||
# CONFIG_NET_VENDOR_WIZNET is not set
|
# CONFIG_NET_VENDOR_WIZNET is not set
|
||||||
@@ -554,6 +556,6 @@ CONFIG_DEBUG_INFO=y
|
|||||||
CONFIG_DEBUG_INFO_SPLIT=y
|
CONFIG_DEBUG_INFO_SPLIT=y
|
||||||
CONFIG_DEBUG_INFO_DWARF4=y
|
CONFIG_DEBUG_INFO_DWARF4=y
|
||||||
CONFIG_MAGIC_SYSRQ=y
|
CONFIG_MAGIC_SYSRQ=y
|
||||||
|
CONFIG_DEBUG_FS=y
|
||||||
CONFIG_SCHEDSTATS=y
|
CONFIG_SCHEDSTATS=y
|
||||||
# CONFIG_DEBUG_BUGVERBOSE is not set
|
# CONFIG_DEBUG_BUGVERBOSE is not set
|
||||||
CONFIG_TI_CPSW_SWITCHDEV=y
|
|
||||||
|
@@ -212,4 +212,5 @@ CONFIG_DMA_CMA=y
|
|||||||
CONFIG_CMA_SIZE_MBYTES=64
|
CONFIG_CMA_SIZE_MBYTES=64
|
||||||
CONFIG_PRINTK_TIME=y
|
CONFIG_PRINTK_TIME=y
|
||||||
# CONFIG_ENABLE_MUST_CHECK is not set
|
# CONFIG_ENABLE_MUST_CHECK is not set
|
||||||
|
CONFIG_DEBUG_FS=y
|
||||||
CONFIG_DEBUG_KERNEL=y
|
CONFIG_DEBUG_KERNEL=y
|
||||||
|
@@ -13,6 +13,7 @@ static const char * const bcm2711_compat[] = {
|
|||||||
#ifdef CONFIG_ARCH_MULTI_V7
|
#ifdef CONFIG_ARCH_MULTI_V7
|
||||||
"brcm,bcm2711",
|
"brcm,bcm2711",
|
||||||
#endif
|
#endif
|
||||||
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
DT_MACHINE_START(BCM2711, "BCM2711")
|
DT_MACHINE_START(BCM2711, "BCM2711")
|
||||||
|
@@ -84,7 +84,7 @@ struct device * __init imx_soc_device_init(void)
|
|||||||
const char *ocotp_compat = NULL;
|
const char *ocotp_compat = NULL;
|
||||||
struct soc_device *soc_dev;
|
struct soc_device *soc_dev;
|
||||||
struct device_node *root;
|
struct device_node *root;
|
||||||
struct regmap *ocotp;
|
struct regmap *ocotp = NULL;
|
||||||
const char *soc_id;
|
const char *soc_id;
|
||||||
u64 soc_uid = 0;
|
u64 soc_uid = 0;
|
||||||
u32 val;
|
u32 val;
|
||||||
@@ -148,11 +148,11 @@ struct device * __init imx_soc_device_init(void)
|
|||||||
soc_id = "i.MX6UL";
|
soc_id = "i.MX6UL";
|
||||||
break;
|
break;
|
||||||
case MXC_CPU_IMX6ULL:
|
case MXC_CPU_IMX6ULL:
|
||||||
ocotp_compat = "fsl,imx6ul-ocotp";
|
ocotp_compat = "fsl,imx6ull-ocotp";
|
||||||
soc_id = "i.MX6ULL";
|
soc_id = "i.MX6ULL";
|
||||||
break;
|
break;
|
||||||
case MXC_CPU_IMX6ULZ:
|
case MXC_CPU_IMX6ULZ:
|
||||||
ocotp_compat = "fsl,imx6ul-ocotp";
|
ocotp_compat = "fsl,imx6ull-ocotp";
|
||||||
soc_id = "i.MX6ULZ";
|
soc_id = "i.MX6ULZ";
|
||||||
break;
|
break;
|
||||||
case MXC_CPU_IMX6SLL:
|
case MXC_CPU_IMX6SLL:
|
||||||
@@ -175,7 +175,9 @@ struct device * __init imx_soc_device_init(void)
|
|||||||
ocotp = syscon_regmap_lookup_by_compatible(ocotp_compat);
|
ocotp = syscon_regmap_lookup_by_compatible(ocotp_compat);
|
||||||
if (IS_ERR(ocotp))
|
if (IS_ERR(ocotp))
|
||||||
pr_err("%s: failed to find %s regmap!\n", __func__, ocotp_compat);
|
pr_err("%s: failed to find %s regmap!\n", __func__, ocotp_compat);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!IS_ERR_OR_NULL(ocotp)) {
|
||||||
regmap_read(ocotp, OCOTP_UID_H, &val);
|
regmap_read(ocotp, OCOTP_UID_H, &val);
|
||||||
soc_uid = val;
|
soc_uid = val;
|
||||||
regmap_read(ocotp, OCOTP_UID_L, &val);
|
regmap_read(ocotp, OCOTP_UID_L, &val);
|
||||||
|
@@ -17,9 +17,9 @@ extern void pxa168_clear_keypad_wakeup(void);
|
|||||||
#include <linux/platform_data/keypad-pxa27x.h>
|
#include <linux/platform_data/keypad-pxa27x.h>
|
||||||
#include <linux/pxa168_eth.h>
|
#include <linux/pxa168_eth.h>
|
||||||
#include <linux/platform_data/mv_usb.h>
|
#include <linux/platform_data/mv_usb.h>
|
||||||
|
#include <linux/soc/mmp/cputype.h>
|
||||||
|
|
||||||
#include "devices.h"
|
#include "devices.h"
|
||||||
#include "cputype.h"
|
|
||||||
|
|
||||||
extern struct pxa_device_desc pxa168_device_uart1;
|
extern struct pxa_device_desc pxa168_device_uart1;
|
||||||
extern struct pxa_device_desc pxa168_device_uart2;
|
extern struct pxa_device_desc pxa168_device_uart2;
|
||||||
|
@@ -551,8 +551,9 @@ static struct clk *ve_spc_clk_register(struct device *cpu_dev)
|
|||||||
|
|
||||||
static int __init ve_spc_clk_init(void)
|
static int __init ve_spc_clk_init(void)
|
||||||
{
|
{
|
||||||
int cpu;
|
int cpu, cluster;
|
||||||
struct clk *clk;
|
struct clk *clk;
|
||||||
|
bool init_opp_table[MAX_CLUSTERS] = { false };
|
||||||
|
|
||||||
if (!info)
|
if (!info)
|
||||||
return 0; /* Continue only if SPC is initialised */
|
return 0; /* Continue only if SPC is initialised */
|
||||||
@@ -578,8 +579,17 @@ static int __init ve_spc_clk_init(void)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cluster = topology_physical_package_id(cpu_dev->id);
|
||||||
|
if (init_opp_table[cluster])
|
||||||
|
continue;
|
||||||
|
|
||||||
if (ve_init_opp_table(cpu_dev))
|
if (ve_init_opp_table(cpu_dev))
|
||||||
pr_warn("failed to initialise cpu%d opp table\n", cpu);
|
pr_warn("failed to initialise cpu%d opp table\n", cpu);
|
||||||
|
else if (dev_pm_opp_set_sharing_cpus(cpu_dev,
|
||||||
|
topology_core_cpumask(cpu_dev->id)))
|
||||||
|
pr_warn("failed to mark OPPs shared for cpu%d\n", cpu);
|
||||||
|
else
|
||||||
|
init_opp_table[cluster] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
platform_device_register_simple("vexpress-spc-cpufreq", -1, NULL, 0);
|
platform_device_register_simple("vexpress-spc-cpufreq", -1, NULL, 0);
|
||||||
|
@@ -88,7 +88,7 @@
|
|||||||
|
|
||||||
reboot {
|
reboot {
|
||||||
compatible ="syscon-reboot";
|
compatible ="syscon-reboot";
|
||||||
regmap = <&dcfg>;
|
regmap = <&rst>;
|
||||||
offset = <0xb0>;
|
offset = <0xb0>;
|
||||||
mask = <0x02>;
|
mask = <0x02>;
|
||||||
};
|
};
|
||||||
@@ -178,6 +178,12 @@
|
|||||||
big-endian;
|
big-endian;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
rst: syscon@1e60000 {
|
||||||
|
compatible = "syscon";
|
||||||
|
reg = <0x0 0x1e60000 0x0 0x10000>;
|
||||||
|
little-endian;
|
||||||
|
};
|
||||||
|
|
||||||
scfg: syscon@1fc0000 {
|
scfg: syscon@1fc0000 {
|
||||||
compatible = "fsl,ls1028a-scfg", "syscon";
|
compatible = "fsl,ls1028a-scfg", "syscon";
|
||||||
reg = <0x0 0x1fc0000 0x0 0x10000>;
|
reg = <0x0 0x1fc0000 0x0 0x10000>;
|
||||||
@@ -584,7 +590,7 @@
|
|||||||
0x00010004 0x0000003d
|
0x00010004 0x0000003d
|
||||||
0x00010005 0x00000045
|
0x00010005 0x00000045
|
||||||
0x00010006 0x0000004d
|
0x00010006 0x0000004d
|
||||||
0x00010007 0x00000045
|
0x00010007 0x00000055
|
||||||
0x00010008 0x0000005e
|
0x00010008 0x0000005e
|
||||||
0x00010009 0x00000066
|
0x00010009 0x00000066
|
||||||
0x0001000a 0x0000006e
|
0x0001000a 0x0000006e
|
||||||
|
@@ -547,6 +547,7 @@ static const struct midr_range spectre_v2_safe_list[] = {
|
|||||||
MIDR_ALL_VERSIONS(MIDR_CORTEX_A53),
|
MIDR_ALL_VERSIONS(MIDR_CORTEX_A53),
|
||||||
MIDR_ALL_VERSIONS(MIDR_CORTEX_A55),
|
MIDR_ALL_VERSIONS(MIDR_CORTEX_A55),
|
||||||
MIDR_ALL_VERSIONS(MIDR_BRAHMA_B53),
|
MIDR_ALL_VERSIONS(MIDR_BRAHMA_B53),
|
||||||
|
MIDR_ALL_VERSIONS(MIDR_HISI_TSV110),
|
||||||
{ /* sentinel */ }
|
{ /* sentinel */ }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -2098,9 +2098,9 @@ static void unhandled_cp_access(struct kvm_vcpu *vcpu,
|
|||||||
WARN_ON(1);
|
WARN_ON(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
kvm_err("Unsupported guest CP%d access at: %08lx [%08lx]\n",
|
print_sys_reg_msg(params,
|
||||||
cp, *vcpu_pc(vcpu), *vcpu_cpsr(vcpu));
|
"Unsupported guest CP%d access at: %08lx [%08lx]\n",
|
||||||
print_sys_reg_instr(params);
|
cp, *vcpu_pc(vcpu), *vcpu_cpsr(vcpu));
|
||||||
kvm_inject_undefined(vcpu);
|
kvm_inject_undefined(vcpu);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2233,6 +2233,12 @@ int kvm_handle_cp14_32(struct kvm_vcpu *vcpu, struct kvm_run *run)
|
|||||||
NULL, 0);
|
NULL, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool is_imp_def_sys_reg(struct sys_reg_params *params)
|
||||||
|
{
|
||||||
|
// See ARM DDI 0487E.a, section D12.3.2
|
||||||
|
return params->Op0 == 3 && (params->CRn & 0b1011) == 0b1011;
|
||||||
|
}
|
||||||
|
|
||||||
static int emulate_sys_reg(struct kvm_vcpu *vcpu,
|
static int emulate_sys_reg(struct kvm_vcpu *vcpu,
|
||||||
struct sys_reg_params *params)
|
struct sys_reg_params *params)
|
||||||
{
|
{
|
||||||
@@ -2248,10 +2254,12 @@ static int emulate_sys_reg(struct kvm_vcpu *vcpu,
|
|||||||
|
|
||||||
if (likely(r)) {
|
if (likely(r)) {
|
||||||
perform_access(vcpu, params, r);
|
perform_access(vcpu, params, r);
|
||||||
|
} else if (is_imp_def_sys_reg(params)) {
|
||||||
|
kvm_inject_undefined(vcpu);
|
||||||
} else {
|
} else {
|
||||||
kvm_err("Unsupported guest sys_reg access at: %lx [%08lx]\n",
|
print_sys_reg_msg(params,
|
||||||
*vcpu_pc(vcpu), *vcpu_cpsr(vcpu));
|
"Unsupported guest sys_reg access at: %lx [%08lx]\n",
|
||||||
print_sys_reg_instr(params);
|
*vcpu_pc(vcpu), *vcpu_cpsr(vcpu));
|
||||||
kvm_inject_undefined(vcpu);
|
kvm_inject_undefined(vcpu);
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
@@ -2360,8 +2368,11 @@ static const struct sys_reg_desc *index_to_sys_reg_desc(struct kvm_vcpu *vcpu,
|
|||||||
if ((id & KVM_REG_ARM_COPROC_MASK) != KVM_REG_ARM64_SYSREG)
|
if ((id & KVM_REG_ARM_COPROC_MASK) != KVM_REG_ARM64_SYSREG)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
if (!index_to_params(id, ¶ms))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
table = get_target_table(vcpu->arch.target, true, &num);
|
table = get_target_table(vcpu->arch.target, true, &num);
|
||||||
r = find_reg_by_id(id, ¶ms, table, num);
|
r = find_reg(¶ms, table, num);
|
||||||
if (!r)
|
if (!r)
|
||||||
r = find_reg(¶ms, sys_reg_descs, ARRAY_SIZE(sys_reg_descs));
|
r = find_reg(¶ms, sys_reg_descs, ARRAY_SIZE(sys_reg_descs));
|
||||||
|
|
||||||
|
@@ -62,11 +62,24 @@ struct sys_reg_desc {
|
|||||||
#define REG_HIDDEN_USER (1 << 0) /* hidden from userspace ioctls */
|
#define REG_HIDDEN_USER (1 << 0) /* hidden from userspace ioctls */
|
||||||
#define REG_HIDDEN_GUEST (1 << 1) /* hidden from guest */
|
#define REG_HIDDEN_GUEST (1 << 1) /* hidden from guest */
|
||||||
|
|
||||||
|
static __printf(2, 3)
|
||||||
|
inline void print_sys_reg_msg(const struct sys_reg_params *p,
|
||||||
|
char *fmt, ...)
|
||||||
|
{
|
||||||
|
va_list va;
|
||||||
|
|
||||||
|
va_start(va, fmt);
|
||||||
|
/* Look, we even formatted it for you to paste into the table! */
|
||||||
|
kvm_pr_unimpl("%pV { Op0(%2u), Op1(%2u), CRn(%2u), CRm(%2u), Op2(%2u), func_%s },\n",
|
||||||
|
&(struct va_format){ fmt, &va },
|
||||||
|
p->Op0, p->Op1, p->CRn, p->CRm, p->Op2, p->is_write ? "write" : "read");
|
||||||
|
va_end(va);
|
||||||
|
}
|
||||||
|
|
||||||
static inline void print_sys_reg_instr(const struct sys_reg_params *p)
|
static inline void print_sys_reg_instr(const struct sys_reg_params *p)
|
||||||
{
|
{
|
||||||
/* Look, we even formatted it for you to paste into the table! */
|
/* GCC warns on an empty format string */
|
||||||
kvm_pr_unimpl(" { Op0(%2u), Op1(%2u), CRn(%2u), CRm(%2u), Op2(%2u), func_%s },\n",
|
print_sys_reg_msg(p, "%s", "");
|
||||||
p->Op0, p->Op1, p->CRn, p->CRm, p->Op2, p->is_write ? "write" : "read");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool ignore_write(struct kvm_vcpu *vcpu,
|
static inline bool ignore_write(struct kvm_vcpu *vcpu,
|
||||||
|
@@ -604,6 +604,7 @@ static void emit_const_to_reg(struct jit_ctx *ctx, int dst, u64 value)
|
|||||||
static int emit_bpf_tail_call(struct jit_ctx *ctx, int this_idx)
|
static int emit_bpf_tail_call(struct jit_ctx *ctx, int this_idx)
|
||||||
{
|
{
|
||||||
int off, b_off;
|
int off, b_off;
|
||||||
|
int tcc_reg;
|
||||||
|
|
||||||
ctx->flags |= EBPF_SEEN_TC;
|
ctx->flags |= EBPF_SEEN_TC;
|
||||||
/*
|
/*
|
||||||
@@ -616,14 +617,14 @@ static int emit_bpf_tail_call(struct jit_ctx *ctx, int this_idx)
|
|||||||
b_off = b_imm(this_idx + 1, ctx);
|
b_off = b_imm(this_idx + 1, ctx);
|
||||||
emit_instr(ctx, bne, MIPS_R_AT, MIPS_R_ZERO, b_off);
|
emit_instr(ctx, bne, MIPS_R_AT, MIPS_R_ZERO, b_off);
|
||||||
/*
|
/*
|
||||||
* if (--TCC < 0)
|
* if (TCC-- < 0)
|
||||||
* goto out;
|
* goto out;
|
||||||
*/
|
*/
|
||||||
/* Delay slot */
|
/* Delay slot */
|
||||||
emit_instr(ctx, daddiu, MIPS_R_T5,
|
tcc_reg = (ctx->flags & EBPF_TCC_IN_V1) ? MIPS_R_V1 : MIPS_R_S4;
|
||||||
(ctx->flags & EBPF_TCC_IN_V1) ? MIPS_R_V1 : MIPS_R_S4, -1);
|
emit_instr(ctx, daddiu, MIPS_R_T5, tcc_reg, -1);
|
||||||
b_off = b_imm(this_idx + 1, ctx);
|
b_off = b_imm(this_idx + 1, ctx);
|
||||||
emit_instr(ctx, bltz, MIPS_R_T5, b_off);
|
emit_instr(ctx, bltz, tcc_reg, b_off);
|
||||||
/*
|
/*
|
||||||
* prog = array->ptrs[index];
|
* prog = array->ptrs[index];
|
||||||
* if (prog == NULL)
|
* if (prog == NULL)
|
||||||
|
@@ -44,8 +44,14 @@ __xchg(unsigned long x, __volatile__ void *ptr, int size)
|
|||||||
** if (((unsigned long)p & 0xf) == 0)
|
** if (((unsigned long)p & 0xf) == 0)
|
||||||
** return __ldcw(p);
|
** return __ldcw(p);
|
||||||
*/
|
*/
|
||||||
#define xchg(ptr, x) \
|
#define xchg(ptr, x) \
|
||||||
((__typeof__(*(ptr)))__xchg((unsigned long)(x), (ptr), sizeof(*(ptr))))
|
({ \
|
||||||
|
__typeof__(*(ptr)) __ret; \
|
||||||
|
__typeof__(*(ptr)) _x_ = (x); \
|
||||||
|
__ret = (__typeof__(*(ptr))) \
|
||||||
|
__xchg((unsigned long)_x_, (ptr), sizeof(*(ptr))); \
|
||||||
|
__ret; \
|
||||||
|
})
|
||||||
|
|
||||||
/* bug catcher for when unsupported size is used - won't link */
|
/* bug catcher for when unsupported size is used - won't link */
|
||||||
extern void __cmpxchg_called_with_bad_pointer(void);
|
extern void __cmpxchg_called_with_bad_pointer(void);
|
||||||
|
@@ -2,8 +2,6 @@
|
|||||||
#ifndef _ASM_PARISC_KEXEC_H
|
#ifndef _ASM_PARISC_KEXEC_H
|
||||||
#define _ASM_PARISC_KEXEC_H
|
#define _ASM_PARISC_KEXEC_H
|
||||||
|
|
||||||
#ifdef CONFIG_KEXEC
|
|
||||||
|
|
||||||
/* Maximum physical address we can use pages from */
|
/* Maximum physical address we can use pages from */
|
||||||
#define KEXEC_SOURCE_MEMORY_LIMIT (-1UL)
|
#define KEXEC_SOURCE_MEMORY_LIMIT (-1UL)
|
||||||
/* Maximum address we can reach in physical address mode */
|
/* Maximum address we can reach in physical address mode */
|
||||||
@@ -32,6 +30,4 @@ static inline void crash_setup_regs(struct pt_regs *newregs,
|
|||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
|
|
||||||
#endif /* CONFIG_KEXEC */
|
|
||||||
|
|
||||||
#endif /* _ASM_PARISC_KEXEC_H */
|
#endif /* _ASM_PARISC_KEXEC_H */
|
||||||
|
@@ -37,5 +37,5 @@ obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o
|
|||||||
obj-$(CONFIG_JUMP_LABEL) += jump_label.o
|
obj-$(CONFIG_JUMP_LABEL) += jump_label.o
|
||||||
obj-$(CONFIG_KGDB) += kgdb.o
|
obj-$(CONFIG_KGDB) += kgdb.o
|
||||||
obj-$(CONFIG_KPROBES) += kprobes.o
|
obj-$(CONFIG_KPROBES) += kprobes.o
|
||||||
obj-$(CONFIG_KEXEC) += kexec.o relocate_kernel.o
|
obj-$(CONFIG_KEXEC_CORE) += kexec.o relocate_kernel.o
|
||||||
obj-$(CONFIG_KEXEC_FILE) += kexec_file.o
|
obj-$(CONFIG_KEXEC_FILE) += kexec_file.o
|
||||||
|
@@ -810,7 +810,7 @@ EXPORT_SYMBOL(device_to_hwpath);
|
|||||||
static void walk_native_bus(unsigned long io_io_low, unsigned long io_io_high,
|
static void walk_native_bus(unsigned long io_io_low, unsigned long io_io_high,
|
||||||
struct device *parent);
|
struct device *parent);
|
||||||
|
|
||||||
static void walk_lower_bus(struct parisc_device *dev)
|
static void __init walk_lower_bus(struct parisc_device *dev)
|
||||||
{
|
{
|
||||||
unsigned long io_io_low, io_io_high;
|
unsigned long io_io_low, io_io_high;
|
||||||
|
|
||||||
|
@@ -327,8 +327,7 @@ static int pdt_mainloop(void *unused)
|
|||||||
((pde & PDT_ADDR_SINGLE_ERR) == 0))
|
((pde & PDT_ADDR_SINGLE_ERR) == 0))
|
||||||
memory_failure(pde >> PAGE_SHIFT, 0);
|
memory_failure(pde >> PAGE_SHIFT, 0);
|
||||||
else
|
else
|
||||||
soft_offline_page(
|
soft_offline_page(pde >> PAGE_SHIFT, 0);
|
||||||
pfn_to_page(pde >> PAGE_SHIFT), 0);
|
|
||||||
#else
|
#else
|
||||||
pr_crit("PDT: memory error at 0x%lx ignored.\n"
|
pr_crit("PDT: memory error at 0x%lx ignored.\n"
|
||||||
"Rebuild kernel with CONFIG_MEMORY_FAILURE=y "
|
"Rebuild kernel with CONFIG_MEMORY_FAILURE=y "
|
||||||
|
@@ -36,10 +36,12 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_PPC_PSERIES
|
#ifdef CONFIG_PPC_PSERIES
|
||||||
|
DECLARE_STATIC_KEY_FALSE(shared_processor);
|
||||||
|
|
||||||
#define vcpu_is_preempted vcpu_is_preempted
|
#define vcpu_is_preempted vcpu_is_preempted
|
||||||
static inline bool vcpu_is_preempted(int cpu)
|
static inline bool vcpu_is_preempted(int cpu)
|
||||||
{
|
{
|
||||||
if (!firmware_has_feature(FW_FEATURE_SPLPAR))
|
if (!static_branch_unlikely(&shared_processor))
|
||||||
return false;
|
return false;
|
||||||
return !!(be32_to_cpu(lppaca_of(cpu).yield_count) & 1);
|
return !!(be32_to_cpu(lppaca_of(cpu).yield_count) & 1);
|
||||||
}
|
}
|
||||||
@@ -110,13 +112,8 @@ static inline void splpar_rw_yield(arch_rwlock_t *lock) {};
|
|||||||
|
|
||||||
static inline bool is_shared_processor(void)
|
static inline bool is_shared_processor(void)
|
||||||
{
|
{
|
||||||
/*
|
#ifdef CONFIG_PPC_SPLPAR
|
||||||
* LPPACA is only available on Pseries so guard anything LPPACA related to
|
return static_branch_unlikely(&shared_processor);
|
||||||
* allow other platforms (which include this common header) to compile.
|
|
||||||
*/
|
|
||||||
#ifdef CONFIG_PPC_PSERIES
|
|
||||||
return (IS_ENABLED(CONFIG_PPC_SPLPAR) &&
|
|
||||||
lppaca_shared_proc(local_paca->lppaca_ptr));
|
|
||||||
#else
|
#else
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
|
@@ -401,7 +401,7 @@ copy_to_user_mcsafe(void __user *to, const void *from, unsigned long n)
|
|||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern unsigned long __clear_user(void __user *addr, unsigned long size);
|
unsigned long __arch_clear_user(void __user *addr, unsigned long size);
|
||||||
|
|
||||||
static inline unsigned long clear_user(void __user *addr, unsigned long size)
|
static inline unsigned long clear_user(void __user *addr, unsigned long size)
|
||||||
{
|
{
|
||||||
@@ -409,12 +409,17 @@ static inline unsigned long clear_user(void __user *addr, unsigned long size)
|
|||||||
might_fault();
|
might_fault();
|
||||||
if (likely(access_ok(addr, size))) {
|
if (likely(access_ok(addr, size))) {
|
||||||
allow_write_to_user(addr, size);
|
allow_write_to_user(addr, size);
|
||||||
ret = __clear_user(addr, size);
|
ret = __arch_clear_user(addr, size);
|
||||||
prevent_write_to_user(addr, size);
|
prevent_write_to_user(addr, size);
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline unsigned long __clear_user(void __user *addr, unsigned long size)
|
||||||
|
{
|
||||||
|
return clear_user(addr, size);
|
||||||
|
}
|
||||||
|
|
||||||
extern long strncpy_from_user(char *dst, const char __user *src, long count);
|
extern long strncpy_from_user(char *dst, const char __user *src, long count);
|
||||||
extern __must_check long strnlen_user(const char __user *str, long n);
|
extern __must_check long strnlen_user(const char __user *str, long n);
|
||||||
|
|
||||||
|
@@ -619,8 +619,6 @@ void __do_irq(struct pt_regs *regs)
|
|||||||
|
|
||||||
trace_irq_entry(regs);
|
trace_irq_entry(regs);
|
||||||
|
|
||||||
check_stack_overflow();
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Query the platform PIC for the interrupt & ack it.
|
* Query the platform PIC for the interrupt & ack it.
|
||||||
*
|
*
|
||||||
@@ -652,6 +650,8 @@ void do_IRQ(struct pt_regs *regs)
|
|||||||
irqsp = hardirq_ctx[raw_smp_processor_id()];
|
irqsp = hardirq_ctx[raw_smp_processor_id()];
|
||||||
sirqsp = softirq_ctx[raw_smp_processor_id()];
|
sirqsp = softirq_ctx[raw_smp_processor_id()];
|
||||||
|
|
||||||
|
check_stack_overflow();
|
||||||
|
|
||||||
/* Already there ? */
|
/* Already there ? */
|
||||||
if (unlikely(cursp == irqsp || cursp == sirqsp)) {
|
if (unlikely(cursp == irqsp || cursp == sirqsp)) {
|
||||||
__do_irq(regs);
|
__do_irq(regs);
|
||||||
|
@@ -4983,7 +4983,8 @@ static void kvmppc_core_destroy_vm_hv(struct kvm *kvm)
|
|||||||
if (nesting_enabled(kvm))
|
if (nesting_enabled(kvm))
|
||||||
kvmhv_release_all_nested(kvm);
|
kvmhv_release_all_nested(kvm);
|
||||||
kvm->arch.process_table = 0;
|
kvm->arch.process_table = 0;
|
||||||
uv_svm_terminate(kvm->arch.lpid);
|
if (kvm->arch.secure_guest)
|
||||||
|
uv_svm_terminate(kvm->arch.lpid);
|
||||||
kvmhv_set_ptbl_entry(kvm->arch.lpid, 0, 0);
|
kvmhv_set_ptbl_entry(kvm->arch.lpid, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1117,7 +1117,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300)
|
|||||||
ld r7, VCPU_GPR(R7)(r4)
|
ld r7, VCPU_GPR(R7)(r4)
|
||||||
bne ret_to_ultra
|
bne ret_to_ultra
|
||||||
|
|
||||||
lwz r0, VCPU_CR(r4)
|
ld r0, VCPU_CR(r4)
|
||||||
mtcr r0
|
mtcr r0
|
||||||
|
|
||||||
ld r0, VCPU_GPR(R0)(r4)
|
ld r0, VCPU_GPR(R0)(r4)
|
||||||
@@ -1137,7 +1137,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300)
|
|||||||
* R3 = UV_RETURN
|
* R3 = UV_RETURN
|
||||||
*/
|
*/
|
||||||
ret_to_ultra:
|
ret_to_ultra:
|
||||||
lwz r0, VCPU_CR(r4)
|
ld r0, VCPU_CR(r4)
|
||||||
mtcr r0
|
mtcr r0
|
||||||
|
|
||||||
ld r0, VCPU_GPR(R3)(r4)
|
ld r0, VCPU_GPR(R3)(r4)
|
||||||
|
@@ -17,7 +17,7 @@ CACHELINE_BYTES = L1_CACHE_BYTES
|
|||||||
LG_CACHELINE_BYTES = L1_CACHE_SHIFT
|
LG_CACHELINE_BYTES = L1_CACHE_SHIFT
|
||||||
CACHELINE_MASK = (L1_CACHE_BYTES-1)
|
CACHELINE_MASK = (L1_CACHE_BYTES-1)
|
||||||
|
|
||||||
_GLOBAL(__clear_user)
|
_GLOBAL(__arch_clear_user)
|
||||||
/*
|
/*
|
||||||
* Use dcbz on the complete cache lines in the destination
|
* Use dcbz on the complete cache lines in the destination
|
||||||
* to set them to zero. This requires that the destination
|
* to set them to zero. This requires that the destination
|
||||||
@@ -87,4 +87,4 @@ _GLOBAL(__clear_user)
|
|||||||
EX_TABLE(8b, 91b)
|
EX_TABLE(8b, 91b)
|
||||||
EX_TABLE(9b, 91b)
|
EX_TABLE(9b, 91b)
|
||||||
|
|
||||||
EXPORT_SYMBOL(__clear_user)
|
EXPORT_SYMBOL(__arch_clear_user)
|
||||||
|
@@ -17,7 +17,7 @@ PPC64_CACHES:
|
|||||||
.section ".text"
|
.section ".text"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* __clear_user: - Zero a block of memory in user space, with less checking.
|
* __arch_clear_user: - Zero a block of memory in user space, with less checking.
|
||||||
* @to: Destination address, in user space.
|
* @to: Destination address, in user space.
|
||||||
* @n: Number of bytes to zero.
|
* @n: Number of bytes to zero.
|
||||||
*
|
*
|
||||||
@@ -58,7 +58,7 @@ err3; stb r0,0(r3)
|
|||||||
mr r3,r4
|
mr r3,r4
|
||||||
blr
|
blr
|
||||||
|
|
||||||
_GLOBAL_TOC(__clear_user)
|
_GLOBAL_TOC(__arch_clear_user)
|
||||||
cmpdi r4,32
|
cmpdi r4,32
|
||||||
neg r6,r3
|
neg r6,r3
|
||||||
li r0,0
|
li r0,0
|
||||||
@@ -181,4 +181,4 @@ err1; dcbz 0,r3
|
|||||||
cmpdi r4,32
|
cmpdi r4,32
|
||||||
blt .Lshort_clear
|
blt .Lshort_clear
|
||||||
b .Lmedium_clear
|
b .Lmedium_clear
|
||||||
EXPORT_SYMBOL(__clear_user)
|
EXPORT_SYMBOL(__arch_clear_user)
|
||||||
|
@@ -289,6 +289,14 @@ void __init mem_init(void)
|
|||||||
BUILD_BUG_ON(MMU_PAGE_COUNT > 16);
|
BUILD_BUG_ON(MMU_PAGE_COUNT > 16);
|
||||||
|
|
||||||
#ifdef CONFIG_SWIOTLB
|
#ifdef CONFIG_SWIOTLB
|
||||||
|
/*
|
||||||
|
* Some platforms (e.g. 85xx) limit DMA-able memory way below
|
||||||
|
* 4G. We force memblock to bottom-up mode to ensure that the
|
||||||
|
* memory allocated in swiotlb_init() is DMA-able.
|
||||||
|
* As it's the last memblock allocation, no need to reset it
|
||||||
|
* back to to-down.
|
||||||
|
*/
|
||||||
|
memblock_set_bottom_up(true);
|
||||||
swiotlb_init(0);
|
swiotlb_init(0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -103,7 +103,7 @@ static void mmu_patch_addis(s32 *site, long simm)
|
|||||||
patch_instruction_site(site, instr);
|
patch_instruction_site(site, instr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void __init mmu_mapin_ram_chunk(unsigned long offset, unsigned long top, pgprot_t prot)
|
static void mmu_mapin_ram_chunk(unsigned long offset, unsigned long top, pgprot_t prot)
|
||||||
{
|
{
|
||||||
unsigned long s = offset;
|
unsigned long s = offset;
|
||||||
unsigned long v = PAGE_OFFSET + s;
|
unsigned long v = PAGE_OFFSET + s;
|
||||||
|
@@ -539,6 +539,16 @@ static int cmm_migratepage(struct balloon_dev_info *b_dev_info,
|
|||||||
/* balloon page list reference */
|
/* balloon page list reference */
|
||||||
get_page(newpage);
|
get_page(newpage);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* When we migrate a page to a different zone, we have to fixup the
|
||||||
|
* count of both involved zones as we adjusted the managed page count
|
||||||
|
* when inflating.
|
||||||
|
*/
|
||||||
|
if (page_zone(page) != page_zone(newpage)) {
|
||||||
|
adjust_managed_page_count(page, 1);
|
||||||
|
adjust_managed_page_count(newpage, -1);
|
||||||
|
}
|
||||||
|
|
||||||
spin_lock_irqsave(&b_dev_info->pages_lock, flags);
|
spin_lock_irqsave(&b_dev_info->pages_lock, flags);
|
||||||
balloon_page_insert(b_dev_info, newpage);
|
balloon_page_insert(b_dev_info, newpage);
|
||||||
balloon_page_delete(page);
|
balloon_page_delete(page);
|
||||||
|
@@ -74,6 +74,9 @@
|
|||||||
#include "pseries.h"
|
#include "pseries.h"
|
||||||
#include "../../../../drivers/pci/pci.h"
|
#include "../../../../drivers/pci/pci.h"
|
||||||
|
|
||||||
|
DEFINE_STATIC_KEY_FALSE(shared_processor);
|
||||||
|
EXPORT_SYMBOL_GPL(shared_processor);
|
||||||
|
|
||||||
int CMO_PrPSP = -1;
|
int CMO_PrPSP = -1;
|
||||||
int CMO_SecPSP = -1;
|
int CMO_SecPSP = -1;
|
||||||
unsigned long CMO_PageSize = (ASM_CONST(1) << IOMMU_PAGE_SHIFT_4K);
|
unsigned long CMO_PageSize = (ASM_CONST(1) << IOMMU_PAGE_SHIFT_4K);
|
||||||
@@ -758,6 +761,10 @@ static void __init pSeries_setup_arch(void)
|
|||||||
|
|
||||||
if (firmware_has_feature(FW_FEATURE_LPAR)) {
|
if (firmware_has_feature(FW_FEATURE_LPAR)) {
|
||||||
vpa_init(boot_cpuid);
|
vpa_init(boot_cpuid);
|
||||||
|
|
||||||
|
if (lppaca_shared_proc(get_lppaca()))
|
||||||
|
static_branch_enable(&shared_processor);
|
||||||
|
|
||||||
ppc_md.power_save = pseries_lpar_idle;
|
ppc_md.power_save = pseries_lpar_idle;
|
||||||
ppc_md.enable_pmcs = pseries_lpar_enable_pmcs;
|
ppc_md.enable_pmcs = pseries_lpar_enable_pmcs;
|
||||||
#ifdef CONFIG_PCI_IOV
|
#ifdef CONFIG_PCI_IOV
|
||||||
|
@@ -154,7 +154,7 @@ config GENERIC_HWEIGHT
|
|||||||
def_bool y
|
def_bool y
|
||||||
|
|
||||||
config FIX_EARLYCON_MEM
|
config FIX_EARLYCON_MEM
|
||||||
def_bool CONFIG_MMU
|
def_bool MMU
|
||||||
|
|
||||||
config PGTABLE_LEVELS
|
config PGTABLE_LEVELS
|
||||||
int
|
int
|
||||||
|
@@ -90,6 +90,27 @@ extern pgd_t swapper_pg_dir[];
|
|||||||
#define __S110 PAGE_SHARED_EXEC
|
#define __S110 PAGE_SHARED_EXEC
|
||||||
#define __S111 PAGE_SHARED_EXEC
|
#define __S111 PAGE_SHARED_EXEC
|
||||||
|
|
||||||
|
#define VMALLOC_SIZE (KERN_VIRT_SIZE >> 1)
|
||||||
|
#define VMALLOC_END (PAGE_OFFSET - 1)
|
||||||
|
#define VMALLOC_START (PAGE_OFFSET - VMALLOC_SIZE)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Roughly size the vmemmap space to be large enough to fit enough
|
||||||
|
* struct pages to map half the virtual address space. Then
|
||||||
|
* position vmemmap directly below the VMALLOC region.
|
||||||
|
*/
|
||||||
|
#define VMEMMAP_SHIFT \
|
||||||
|
(CONFIG_VA_BITS - PAGE_SHIFT - 1 + STRUCT_PAGE_MAX_SHIFT)
|
||||||
|
#define VMEMMAP_SIZE BIT(VMEMMAP_SHIFT)
|
||||||
|
#define VMEMMAP_END (VMALLOC_START - 1)
|
||||||
|
#define VMEMMAP_START (VMALLOC_START - VMEMMAP_SIZE)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Define vmemmap for pfn_to_page & page_to_pfn calls. Needed if kernel
|
||||||
|
* is configured with CONFIG_SPARSEMEM_VMEMMAP enabled.
|
||||||
|
*/
|
||||||
|
#define vmemmap ((struct page *)VMEMMAP_START)
|
||||||
|
|
||||||
static inline int pmd_present(pmd_t pmd)
|
static inline int pmd_present(pmd_t pmd)
|
||||||
{
|
{
|
||||||
return (pmd_val(pmd) & (_PAGE_PRESENT | _PAGE_PROT_NONE));
|
return (pmd_val(pmd) & (_PAGE_PRESENT | _PAGE_PROT_NONE));
|
||||||
@@ -400,23 +421,6 @@ static inline int ptep_clear_flush_young(struct vm_area_struct *vma,
|
|||||||
#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
|
#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
|
||||||
#define __swp_entry_to_pte(x) ((pte_t) { (x).val })
|
#define __swp_entry_to_pte(x) ((pte_t) { (x).val })
|
||||||
|
|
||||||
#define VMALLOC_SIZE (KERN_VIRT_SIZE >> 1)
|
|
||||||
#define VMALLOC_END (PAGE_OFFSET - 1)
|
|
||||||
#define VMALLOC_START (PAGE_OFFSET - VMALLOC_SIZE)
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Roughly size the vmemmap space to be large enough to fit enough
|
|
||||||
* struct pages to map half the virtual address space. Then
|
|
||||||
* position vmemmap directly below the VMALLOC region.
|
|
||||||
*/
|
|
||||||
#define VMEMMAP_SHIFT \
|
|
||||||
(CONFIG_VA_BITS - PAGE_SHIFT - 1 + STRUCT_PAGE_MAX_SHIFT)
|
|
||||||
#define VMEMMAP_SIZE BIT(VMEMMAP_SHIFT)
|
|
||||||
#define VMEMMAP_END (VMALLOC_START - 1)
|
|
||||||
#define VMEMMAP_START (VMALLOC_START - VMEMMAP_SIZE)
|
|
||||||
|
|
||||||
#define vmemmap ((struct page *)VMEMMAP_START)
|
|
||||||
|
|
||||||
#define PCI_IO_SIZE SZ_16M
|
#define PCI_IO_SIZE SZ_16M
|
||||||
#define PCI_IO_END VMEMMAP_START
|
#define PCI_IO_END VMEMMAP_START
|
||||||
#define PCI_IO_START (PCI_IO_END - PCI_IO_SIZE)
|
#define PCI_IO_START (PCI_IO_END - PCI_IO_SIZE)
|
||||||
|
@@ -246,7 +246,7 @@ ENTRY(reset_regs)
|
|||||||
li t4, 0
|
li t4, 0
|
||||||
li t5, 0
|
li t5, 0
|
||||||
li t6, 0
|
li t6, 0
|
||||||
csrw sscratch, 0
|
csrw CSR_SCRATCH, 0
|
||||||
|
|
||||||
#ifdef CONFIG_FPU
|
#ifdef CONFIG_FPU
|
||||||
csrr t0, CSR_MISA
|
csrr t0, CSR_MISA
|
||||||
|
@@ -10,7 +10,6 @@ obj-y += extable.o
|
|||||||
obj-$(CONFIG_MMU) += fault.o
|
obj-$(CONFIG_MMU) += fault.o
|
||||||
obj-y += cacheflush.o
|
obj-y += cacheflush.o
|
||||||
obj-y += context.o
|
obj-y += context.o
|
||||||
obj-y += sifive_l2_cache.o
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_MMU),y)
|
ifeq ($(CONFIG_MMU),y)
|
||||||
obj-$(CONFIG_SMP) += tlbflush.o
|
obj-$(CONFIG_SMP) += tlbflush.o
|
||||||
|
@@ -631,14 +631,14 @@ static int emit_bpf_tail_call(int insn, struct rv_jit_context *ctx)
|
|||||||
return -1;
|
return -1;
|
||||||
emit(rv_bgeu(RV_REG_A2, RV_REG_T1, off >> 1), ctx);
|
emit(rv_bgeu(RV_REG_A2, RV_REG_T1, off >> 1), ctx);
|
||||||
|
|
||||||
/* if (--TCC < 0)
|
/* if (TCC-- < 0)
|
||||||
* goto out;
|
* goto out;
|
||||||
*/
|
*/
|
||||||
emit(rv_addi(RV_REG_T1, tcc, -1), ctx);
|
emit(rv_addi(RV_REG_T1, tcc, -1), ctx);
|
||||||
off = (tc_ninsn - (ctx->ninsns - start_insn)) << 2;
|
off = (tc_ninsn - (ctx->ninsns - start_insn)) << 2;
|
||||||
if (is_13b_check(off, insn))
|
if (is_13b_check(off, insn))
|
||||||
return -1;
|
return -1;
|
||||||
emit(rv_blt(RV_REG_T1, RV_REG_ZERO, off >> 1), ctx);
|
emit(rv_blt(tcc, RV_REG_ZERO, off >> 1), ctx);
|
||||||
|
|
||||||
/* prog = array->ptrs[index];
|
/* prog = array->ptrs[index];
|
||||||
* if (!prog)
|
* if (!prog)
|
||||||
|
@@ -194,9 +194,9 @@ static inline unsigned long long get_tod_clock_monotonic(void)
|
|||||||
{
|
{
|
||||||
unsigned long long tod;
|
unsigned long long tod;
|
||||||
|
|
||||||
preempt_disable();
|
preempt_disable_notrace();
|
||||||
tod = get_tod_clock() - *(unsigned long long *) &tod_clock_base[1];
|
tod = get_tod_clock() - *(unsigned long long *) &tod_clock_base[1];
|
||||||
preempt_enable();
|
preempt_enable_notrace();
|
||||||
return tod;
|
return tod;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -35,6 +35,7 @@ EXPORT_SYMBOL(_mcount)
|
|||||||
ENTRY(ftrace_caller)
|
ENTRY(ftrace_caller)
|
||||||
.globl ftrace_regs_caller
|
.globl ftrace_regs_caller
|
||||||
.set ftrace_regs_caller,ftrace_caller
|
.set ftrace_regs_caller,ftrace_caller
|
||||||
|
stg %r14,(__SF_GPRS+8*8)(%r15) # save traced function caller
|
||||||
lgr %r1,%r15
|
lgr %r1,%r15
|
||||||
#if !(defined(CC_USING_HOTPATCH) || defined(CC_USING_NOP_MCOUNT))
|
#if !(defined(CC_USING_HOTPATCH) || defined(CC_USING_NOP_MCOUNT))
|
||||||
aghi %r0,MCOUNT_RETURN_FIXUP
|
aghi %r0,MCOUNT_RETURN_FIXUP
|
||||||
|
@@ -36,10 +36,17 @@ static bool update_stack_info(struct unwind_state *state, unsigned long sp)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool is_task_pt_regs(struct unwind_state *state,
|
static inline bool is_final_pt_regs(struct unwind_state *state,
|
||||||
struct pt_regs *regs)
|
struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
return task_pt_regs(state->task) == regs;
|
/* user mode or kernel thread pt_regs at the bottom of task stack */
|
||||||
|
if (task_pt_regs(state->task) == regs)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
/* user mode pt_regs at the bottom of irq stack */
|
||||||
|
return state->stack_info.type == STACK_TYPE_IRQ &&
|
||||||
|
state->stack_info.end - sizeof(struct pt_regs) == (unsigned long)regs &&
|
||||||
|
READ_ONCE_NOCHECK(regs->psw.mask) & PSW_MASK_PSTATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool unwind_next_frame(struct unwind_state *state)
|
bool unwind_next_frame(struct unwind_state *state)
|
||||||
@@ -80,7 +87,7 @@ bool unwind_next_frame(struct unwind_state *state)
|
|||||||
if (!on_stack(info, sp, sizeof(struct pt_regs)))
|
if (!on_stack(info, sp, sizeof(struct pt_regs)))
|
||||||
goto out_err;
|
goto out_err;
|
||||||
regs = (struct pt_regs *) sp;
|
regs = (struct pt_regs *) sp;
|
||||||
if (is_task_pt_regs(state, regs))
|
if (is_final_pt_regs(state, regs))
|
||||||
goto out_stop;
|
goto out_stop;
|
||||||
ip = READ_ONCE_NOCHECK(regs->psw.addr);
|
ip = READ_ONCE_NOCHECK(regs->psw.addr);
|
||||||
sp = READ_ONCE_NOCHECK(regs->gprs[15]);
|
sp = READ_ONCE_NOCHECK(regs->gprs[15]);
|
||||||
|
1
arch/s390/purgatory/.gitignore
vendored
1
arch/s390/purgatory/.gitignore
vendored
@@ -1,3 +1,4 @@
|
|||||||
purgatory
|
purgatory
|
||||||
|
purgatory.chk
|
||||||
purgatory.lds
|
purgatory.lds
|
||||||
purgatory.ro
|
purgatory.ro
|
||||||
|
@@ -4,7 +4,7 @@ OBJECT_FILES_NON_STANDARD := y
|
|||||||
|
|
||||||
purgatory-y := head.o purgatory.o string.o sha256.o mem.o
|
purgatory-y := head.o purgatory.o string.o sha256.o mem.o
|
||||||
|
|
||||||
targets += $(purgatory-y) purgatory.lds purgatory purgatory.ro
|
targets += $(purgatory-y) purgatory.lds purgatory purgatory.chk purgatory.ro
|
||||||
PURGATORY_OBJS = $(addprefix $(obj)/,$(purgatory-y))
|
PURGATORY_OBJS = $(addprefix $(obj)/,$(purgatory-y))
|
||||||
|
|
||||||
$(obj)/sha256.o: $(srctree)/lib/crypto/sha256.c FORCE
|
$(obj)/sha256.o: $(srctree)/lib/crypto/sha256.c FORCE
|
||||||
@@ -15,8 +15,10 @@ CFLAGS_sha256.o := -D__DISABLE_EXPORTS
|
|||||||
$(obj)/mem.o: $(srctree)/arch/s390/lib/mem.S FORCE
|
$(obj)/mem.o: $(srctree)/arch/s390/lib/mem.S FORCE
|
||||||
$(call if_changed_rule,as_o_S)
|
$(call if_changed_rule,as_o_S)
|
||||||
|
|
||||||
$(obj)/string.o: $(srctree)/arch/s390/lib/string.c FORCE
|
KCOV_INSTRUMENT := n
|
||||||
$(call if_changed_rule,cc_o_c)
|
GCOV_PROFILE := n
|
||||||
|
UBSAN_SANITIZE := n
|
||||||
|
KASAN_SANITIZE := n
|
||||||
|
|
||||||
KBUILD_CFLAGS := -fno-strict-aliasing -Wall -Wstrict-prototypes
|
KBUILD_CFLAGS := -fno-strict-aliasing -Wall -Wstrict-prototypes
|
||||||
KBUILD_CFLAGS += -Wno-pointer-sign -Wno-sign-compare
|
KBUILD_CFLAGS += -Wno-pointer-sign -Wno-sign-compare
|
||||||
@@ -26,15 +28,22 @@ KBUILD_CFLAGS += $(CLANG_FLAGS)
|
|||||||
KBUILD_CFLAGS += $(call cc-option,-fno-PIE)
|
KBUILD_CFLAGS += $(call cc-option,-fno-PIE)
|
||||||
KBUILD_AFLAGS := $(filter-out -DCC_USING_EXPOLINE,$(KBUILD_AFLAGS))
|
KBUILD_AFLAGS := $(filter-out -DCC_USING_EXPOLINE,$(KBUILD_AFLAGS))
|
||||||
|
|
||||||
LDFLAGS_purgatory := -r --no-undefined -nostdlib -z nodefaultlib -T
|
# Since we link purgatory with -r unresolved symbols are not checked, so we
|
||||||
|
# also link a purgatory.chk binary without -r to check for unresolved symbols.
|
||||||
|
PURGATORY_LDFLAGS := -nostdlib -z nodefaultlib
|
||||||
|
LDFLAGS_purgatory := -r $(PURGATORY_LDFLAGS) -T
|
||||||
|
LDFLAGS_purgatory.chk := -e purgatory_start $(PURGATORY_LDFLAGS)
|
||||||
$(obj)/purgatory: $(obj)/purgatory.lds $(PURGATORY_OBJS) FORCE
|
$(obj)/purgatory: $(obj)/purgatory.lds $(PURGATORY_OBJS) FORCE
|
||||||
$(call if_changed,ld)
|
$(call if_changed,ld)
|
||||||
|
|
||||||
|
$(obj)/purgatory.chk: $(obj)/purgatory FORCE
|
||||||
|
$(call if_changed,ld)
|
||||||
|
|
||||||
OBJCOPYFLAGS_purgatory.ro := -O elf64-s390
|
OBJCOPYFLAGS_purgatory.ro := -O elf64-s390
|
||||||
OBJCOPYFLAGS_purgatory.ro += --remove-section='*debug*'
|
OBJCOPYFLAGS_purgatory.ro += --remove-section='*debug*'
|
||||||
OBJCOPYFLAGS_purgatory.ro += --remove-section='.comment'
|
OBJCOPYFLAGS_purgatory.ro += --remove-section='.comment'
|
||||||
OBJCOPYFLAGS_purgatory.ro += --remove-section='.note.*'
|
OBJCOPYFLAGS_purgatory.ro += --remove-section='.note.*'
|
||||||
$(obj)/purgatory.ro: $(obj)/purgatory FORCE
|
$(obj)/purgatory.ro: $(obj)/purgatory $(obj)/purgatory.chk FORCE
|
||||||
$(call if_changed,objcopy)
|
$(call if_changed,objcopy)
|
||||||
|
|
||||||
$(obj)/kexec-purgatory.o: $(obj)/kexec-purgatory.S $(obj)/purgatory.ro FORCE
|
$(obj)/kexec-purgatory.o: $(obj)/kexec-purgatory.S $(obj)/purgatory.ro FORCE
|
||||||
|
3
arch/s390/purgatory/string.c
Normal file
3
arch/s390/purgatory/string.c
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0
|
||||||
|
#define __HAVE_ARCH_MEMCMP /* arch function */
|
||||||
|
#include "../lib/string.c"
|
@@ -103,7 +103,7 @@ vmlinux-objs-$(CONFIG_EFI_MIXED) += $(obj)/efi_thunk_$(BITS).o
|
|||||||
quiet_cmd_check_data_rel = DATAREL $@
|
quiet_cmd_check_data_rel = DATAREL $@
|
||||||
define cmd_check_data_rel
|
define cmd_check_data_rel
|
||||||
for obj in $(filter %.o,$^); do \
|
for obj in $(filter %.o,$^); do \
|
||||||
${CROSS_COMPILE}readelf -S $$obj | grep -qF .rel.local && { \
|
$(READELF) -S $$obj | grep -qF .rel.local && { \
|
||||||
echo "error: $$obj has data relocations!" >&2; \
|
echo "error: $$obj has data relocations!" >&2; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
} || true; \
|
} || true; \
|
||||||
|
@@ -376,7 +376,7 @@ int x86_add_exclusive(unsigned int what)
|
|||||||
* LBR and BTS are still mutually exclusive.
|
* LBR and BTS are still mutually exclusive.
|
||||||
*/
|
*/
|
||||||
if (x86_pmu.lbr_pt_coexist && what == x86_lbr_exclusive_pt)
|
if (x86_pmu.lbr_pt_coexist && what == x86_lbr_exclusive_pt)
|
||||||
return 0;
|
goto out;
|
||||||
|
|
||||||
if (!atomic_inc_not_zero(&x86_pmu.lbr_exclusive[what])) {
|
if (!atomic_inc_not_zero(&x86_pmu.lbr_exclusive[what])) {
|
||||||
mutex_lock(&pmc_reserve_mutex);
|
mutex_lock(&pmc_reserve_mutex);
|
||||||
@@ -388,6 +388,7 @@ int x86_add_exclusive(unsigned int what)
|
|||||||
mutex_unlock(&pmc_reserve_mutex);
|
mutex_unlock(&pmc_reserve_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
out:
|
||||||
atomic_inc(&active_events);
|
atomic_inc(&active_events);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@@ -398,11 +399,15 @@ fail_unlock:
|
|||||||
|
|
||||||
void x86_del_exclusive(unsigned int what)
|
void x86_del_exclusive(unsigned int what)
|
||||||
{
|
{
|
||||||
|
atomic_dec(&active_events);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* See the comment in x86_add_exclusive().
|
||||||
|
*/
|
||||||
if (x86_pmu.lbr_pt_coexist && what == x86_lbr_exclusive_pt)
|
if (x86_pmu.lbr_pt_coexist && what == x86_lbr_exclusive_pt)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
atomic_dec(&x86_pmu.lbr_exclusive[what]);
|
atomic_dec(&x86_pmu.lbr_exclusive[what]);
|
||||||
atomic_dec(&active_events);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int x86_setup_perfctr(struct perf_event *event)
|
int x86_setup_perfctr(struct perf_event *event)
|
||||||
@@ -1642,9 +1647,12 @@ static struct attribute_group x86_pmu_format_group __ro_after_init = {
|
|||||||
|
|
||||||
ssize_t events_sysfs_show(struct device *dev, struct device_attribute *attr, char *page)
|
ssize_t events_sysfs_show(struct device *dev, struct device_attribute *attr, char *page)
|
||||||
{
|
{
|
||||||
struct perf_pmu_events_attr *pmu_attr = \
|
struct perf_pmu_events_attr *pmu_attr =
|
||||||
container_of(attr, struct perf_pmu_events_attr, attr);
|
container_of(attr, struct perf_pmu_events_attr, attr);
|
||||||
u64 config = x86_pmu.event_map(pmu_attr->id);
|
u64 config = 0;
|
||||||
|
|
||||||
|
if (pmu_attr->id < x86_pmu.max_events)
|
||||||
|
config = x86_pmu.event_map(pmu_attr->id);
|
||||||
|
|
||||||
/* string trumps id */
|
/* string trumps id */
|
||||||
if (pmu_attr->event_str)
|
if (pmu_attr->event_str)
|
||||||
@@ -1713,6 +1721,9 @@ is_visible(struct kobject *kobj, struct attribute *attr, int idx)
|
|||||||
{
|
{
|
||||||
struct perf_pmu_events_attr *pmu_attr;
|
struct perf_pmu_events_attr *pmu_attr;
|
||||||
|
|
||||||
|
if (idx >= x86_pmu.max_events)
|
||||||
|
return 0;
|
||||||
|
|
||||||
pmu_attr = container_of(attr, struct perf_pmu_events_attr, attr.attr);
|
pmu_attr = container_of(attr, struct perf_pmu_events_attr, attr.attr);
|
||||||
/* str trumps id */
|
/* str trumps id */
|
||||||
return pmu_attr->event_str || x86_pmu.event_map(idx) ? attr->mode : 0;
|
return pmu_attr->event_str || x86_pmu.event_map(idx) ? attr->mode : 0;
|
||||||
|
@@ -63,9 +63,17 @@ struct bts_buffer {
|
|||||||
|
|
||||||
static struct pmu bts_pmu;
|
static struct pmu bts_pmu;
|
||||||
|
|
||||||
|
static int buf_nr_pages(struct page *page)
|
||||||
|
{
|
||||||
|
if (!PagePrivate(page))
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
return 1 << page_private(page);
|
||||||
|
}
|
||||||
|
|
||||||
static size_t buf_size(struct page *page)
|
static size_t buf_size(struct page *page)
|
||||||
{
|
{
|
||||||
return 1 << (PAGE_SHIFT + page_private(page));
|
return buf_nr_pages(page) * PAGE_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
@@ -83,9 +91,7 @@ bts_buffer_setup_aux(struct perf_event *event, void **pages,
|
|||||||
/* count all the high order buffers */
|
/* count all the high order buffers */
|
||||||
for (pg = 0, nbuf = 0; pg < nr_pages;) {
|
for (pg = 0, nbuf = 0; pg < nr_pages;) {
|
||||||
page = virt_to_page(pages[pg]);
|
page = virt_to_page(pages[pg]);
|
||||||
if (WARN_ON_ONCE(!PagePrivate(page) && nr_pages > 1))
|
pg += buf_nr_pages(page);
|
||||||
return NULL;
|
|
||||||
pg += 1 << page_private(page);
|
|
||||||
nbuf++;
|
nbuf++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -109,7 +115,7 @@ bts_buffer_setup_aux(struct perf_event *event, void **pages,
|
|||||||
unsigned int __nr_pages;
|
unsigned int __nr_pages;
|
||||||
|
|
||||||
page = virt_to_page(pages[pg]);
|
page = virt_to_page(pages[pg]);
|
||||||
__nr_pages = PagePrivate(page) ? 1 << page_private(page) : 1;
|
__nr_pages = buf_nr_pages(page);
|
||||||
buf->buf[nbuf].page = page;
|
buf->buf[nbuf].page = page;
|
||||||
buf->buf[nbuf].offset = offset;
|
buf->buf[nbuf].offset = offset;
|
||||||
buf->buf[nbuf].displacement = (pad ? BTS_RECORD_SIZE - pad : 0);
|
buf->buf[nbuf].displacement = (pad ? BTS_RECORD_SIZE - pad : 0);
|
||||||
|
@@ -266,10 +266,10 @@ static void smca_configure(unsigned int bank, unsigned int cpu)
|
|||||||
smca_set_misc_banks_map(bank, cpu);
|
smca_set_misc_banks_map(bank, cpu);
|
||||||
|
|
||||||
/* Return early if this bank was already initialized. */
|
/* Return early if this bank was already initialized. */
|
||||||
if (smca_banks[bank].hwid)
|
if (smca_banks[bank].hwid && smca_banks[bank].hwid->hwid_mcatype != 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (rdmsr_safe_on_cpu(cpu, MSR_AMD64_SMCA_MCx_IPID(bank), &low, &high)) {
|
if (rdmsr_safe(MSR_AMD64_SMCA_MCx_IPID(bank), &low, &high)) {
|
||||||
pr_warn("Failed to read MCA_IPID for bank %d\n", bank);
|
pr_warn("Failed to read MCA_IPID for bank %d\n", bank);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -819,8 +819,8 @@ static int mce_no_way_out(struct mce *m, char **msg, unsigned long *validp,
|
|||||||
if (quirk_no_way_out)
|
if (quirk_no_way_out)
|
||||||
quirk_no_way_out(i, m, regs);
|
quirk_no_way_out(i, m, regs);
|
||||||
|
|
||||||
|
m->bank = i;
|
||||||
if (mce_severity(m, mca_cfg.tolerant, &tmp, true) >= MCE_PANIC_SEVERITY) {
|
if (mce_severity(m, mca_cfg.tolerant, &tmp, true) >= MCE_PANIC_SEVERITY) {
|
||||||
m->bank = i;
|
|
||||||
mce_read_aux(m, i);
|
mce_read_aux(m, i);
|
||||||
*msg = tmp;
|
*msg = tmp;
|
||||||
return 1;
|
return 1;
|
||||||
|
@@ -710,8 +710,12 @@ static struct chipset early_qrk[] __initdata = {
|
|||||||
*/
|
*/
|
||||||
{ PCI_VENDOR_ID_INTEL, 0x0f00,
|
{ PCI_VENDOR_ID_INTEL, 0x0f00,
|
||||||
PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, force_disable_hpet},
|
PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, force_disable_hpet},
|
||||||
|
{ PCI_VENDOR_ID_INTEL, 0x3e20,
|
||||||
|
PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, force_disable_hpet},
|
||||||
{ PCI_VENDOR_ID_INTEL, 0x3ec4,
|
{ PCI_VENDOR_ID_INTEL, 0x3ec4,
|
||||||
PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, force_disable_hpet},
|
PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, force_disable_hpet},
|
||||||
|
{ PCI_VENDOR_ID_INTEL, 0x8a12,
|
||||||
|
PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, force_disable_hpet},
|
||||||
{ PCI_VENDOR_ID_BROADCOM, 0x4331,
|
{ PCI_VENDOR_ID_BROADCOM, 0x4331,
|
||||||
PCI_CLASS_NETWORK_OTHER, PCI_ANY_ID, 0, apple_airport_reset},
|
PCI_CLASS_NETWORK_OTHER, PCI_ANY_ID, 0, apple_airport_reset},
|
||||||
{}
|
{}
|
||||||
|
@@ -402,7 +402,8 @@ static inline void do_cpuid_7_mask(struct kvm_cpuid_entry2 *entry, int index)
|
|||||||
entry->edx |= F(SPEC_CTRL);
|
entry->edx |= F(SPEC_CTRL);
|
||||||
if (boot_cpu_has(X86_FEATURE_STIBP))
|
if (boot_cpu_has(X86_FEATURE_STIBP))
|
||||||
entry->edx |= F(INTEL_STIBP);
|
entry->edx |= F(INTEL_STIBP);
|
||||||
if (boot_cpu_has(X86_FEATURE_SSBD))
|
if (boot_cpu_has(X86_FEATURE_SPEC_CTRL_SSBD) ||
|
||||||
|
boot_cpu_has(X86_FEATURE_AMD_SSBD))
|
||||||
entry->edx |= F(SPEC_CTRL_SSBD);
|
entry->edx |= F(SPEC_CTRL_SSBD);
|
||||||
/*
|
/*
|
||||||
* We emulate ARCH_CAPABILITIES in software even
|
* We emulate ARCH_CAPABILITIES in software even
|
||||||
@@ -759,7 +760,8 @@ static inline int __do_cpuid_func(struct kvm_cpuid_entry2 *entry, u32 function,
|
|||||||
entry->ebx |= F(AMD_IBRS);
|
entry->ebx |= F(AMD_IBRS);
|
||||||
if (boot_cpu_has(X86_FEATURE_STIBP))
|
if (boot_cpu_has(X86_FEATURE_STIBP))
|
||||||
entry->ebx |= F(AMD_STIBP);
|
entry->ebx |= F(AMD_STIBP);
|
||||||
if (boot_cpu_has(X86_FEATURE_SSBD))
|
if (boot_cpu_has(X86_FEATURE_SPEC_CTRL_SSBD) ||
|
||||||
|
boot_cpu_has(X86_FEATURE_AMD_SSBD))
|
||||||
entry->ebx |= F(AMD_SSBD);
|
entry->ebx |= F(AMD_SSBD);
|
||||||
if (!boot_cpu_has_bug(X86_BUG_SPEC_STORE_BYPASS))
|
if (!boot_cpu_has_bug(X86_BUG_SPEC_STORE_BYPASS))
|
||||||
entry->ebx |= F(AMD_SSB_NO);
|
entry->ebx |= F(AMD_SSB_NO);
|
||||||
|
@@ -260,10 +260,6 @@ void __init efi_arch_mem_reserve(phys_addr_t addr, u64 size)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* No need to reserve regions that will never be freed. */
|
|
||||||
if (md.attribute & EFI_MEMORY_RUNTIME)
|
|
||||||
return;
|
|
||||||
|
|
||||||
size += addr % EFI_PAGE_SIZE;
|
size += addr % EFI_PAGE_SIZE;
|
||||||
size = round_up(size, EFI_PAGE_SIZE);
|
size = round_up(size, EFI_PAGE_SIZE);
|
||||||
addr = round_down(addr, EFI_PAGE_SIZE);
|
addr = round_down(addr, EFI_PAGE_SIZE);
|
||||||
@@ -293,6 +289,8 @@ void __init efi_arch_mem_reserve(phys_addr_t addr, u64 size)
|
|||||||
early_memunmap(new, new_size);
|
early_memunmap(new, new_size);
|
||||||
|
|
||||||
efi_memmap_install(new_phys, num_entries);
|
efi_memmap_install(new_phys, num_entries);
|
||||||
|
e820__range_update(addr, size, E820_TYPE_RAM, E820_TYPE_RESERVED);
|
||||||
|
e820__update_table(e820_table);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -886,11 +886,14 @@ generic_make_request_checks(struct bio *bio)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For a REQ_NOWAIT based request, return -EOPNOTSUPP
|
* Non-mq queues do not honor REQ_NOWAIT, so complete a bio
|
||||||
* if queue is not a request based queue.
|
* with BLK_STS_AGAIN status in order to catch -EAGAIN and
|
||||||
|
* to give a chance to the caller to repeat request gracefully.
|
||||||
*/
|
*/
|
||||||
if ((bio->bi_opf & REQ_NOWAIT) && !queue_is_mq(q))
|
if ((bio->bi_opf & REQ_NOWAIT) && !queue_is_mq(q)) {
|
||||||
goto not_supported;
|
status = BLK_STS_AGAIN;
|
||||||
|
goto end_io;
|
||||||
|
}
|
||||||
|
|
||||||
if (should_fail_bio(bio))
|
if (should_fail_bio(bio))
|
||||||
goto end_io;
|
goto end_io;
|
||||||
|
@@ -69,6 +69,7 @@
|
|||||||
#include <linux/blkdev.h>
|
#include <linux/blkdev.h>
|
||||||
#include <linux/gfp.h>
|
#include <linux/gfp.h>
|
||||||
#include <linux/blk-mq.h>
|
#include <linux/blk-mq.h>
|
||||||
|
#include <linux/lockdep.h>
|
||||||
|
|
||||||
#include "blk.h"
|
#include "blk.h"
|
||||||
#include "blk-mq.h"
|
#include "blk-mq.h"
|
||||||
@@ -505,6 +506,9 @@ struct blk_flush_queue *blk_alloc_flush_queue(struct request_queue *q,
|
|||||||
INIT_LIST_HEAD(&fq->flush_queue[1]);
|
INIT_LIST_HEAD(&fq->flush_queue[1]);
|
||||||
INIT_LIST_HEAD(&fq->flush_data_in_flight);
|
INIT_LIST_HEAD(&fq->flush_data_in_flight);
|
||||||
|
|
||||||
|
lockdep_register_key(&fq->key);
|
||||||
|
lockdep_set_class(&fq->mq_flush_lock, &fq->key);
|
||||||
|
|
||||||
return fq;
|
return fq;
|
||||||
|
|
||||||
fail_rq:
|
fail_rq:
|
||||||
@@ -519,6 +523,7 @@ void blk_free_flush_queue(struct blk_flush_queue *fq)
|
|||||||
if (!fq)
|
if (!fq)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
lockdep_unregister_key(&fq->key);
|
||||||
kfree(fq->flush_rq);
|
kfree(fq->flush_rq);
|
||||||
kfree(fq);
|
kfree(fq);
|
||||||
}
|
}
|
||||||
|
@@ -1212,7 +1212,7 @@ static enum hrtimer_restart iocg_waitq_timer_fn(struct hrtimer *timer)
|
|||||||
return HRTIMER_NORESTART;
|
return HRTIMER_NORESTART;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void iocg_kick_delay(struct ioc_gq *iocg, struct ioc_now *now, u64 cost)
|
static bool iocg_kick_delay(struct ioc_gq *iocg, struct ioc_now *now, u64 cost)
|
||||||
{
|
{
|
||||||
struct ioc *ioc = iocg->ioc;
|
struct ioc *ioc = iocg->ioc;
|
||||||
struct blkcg_gq *blkg = iocg_to_blkg(iocg);
|
struct blkcg_gq *blkg = iocg_to_blkg(iocg);
|
||||||
@@ -1229,11 +1229,11 @@ static void iocg_kick_delay(struct ioc_gq *iocg, struct ioc_now *now, u64 cost)
|
|||||||
/* clear or maintain depending on the overage */
|
/* clear or maintain depending on the overage */
|
||||||
if (time_before_eq64(vtime, now->vnow)) {
|
if (time_before_eq64(vtime, now->vnow)) {
|
||||||
blkcg_clear_delay(blkg);
|
blkcg_clear_delay(blkg);
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
if (!atomic_read(&blkg->use_delay) &&
|
if (!atomic_read(&blkg->use_delay) &&
|
||||||
time_before_eq64(vtime, now->vnow + vmargin))
|
time_before_eq64(vtime, now->vnow + vmargin))
|
||||||
return;
|
return false;
|
||||||
|
|
||||||
/* use delay */
|
/* use delay */
|
||||||
if (cost) {
|
if (cost) {
|
||||||
@@ -1250,10 +1250,11 @@ static void iocg_kick_delay(struct ioc_gq *iocg, struct ioc_now *now, u64 cost)
|
|||||||
oexpires = ktime_to_ns(hrtimer_get_softexpires(&iocg->delay_timer));
|
oexpires = ktime_to_ns(hrtimer_get_softexpires(&iocg->delay_timer));
|
||||||
if (hrtimer_is_queued(&iocg->delay_timer) &&
|
if (hrtimer_is_queued(&iocg->delay_timer) &&
|
||||||
abs(oexpires - expires) <= margin_ns / 4)
|
abs(oexpires - expires) <= margin_ns / 4)
|
||||||
return;
|
return true;
|
||||||
|
|
||||||
hrtimer_start_range_ns(&iocg->delay_timer, ns_to_ktime(expires),
|
hrtimer_start_range_ns(&iocg->delay_timer, ns_to_ktime(expires),
|
||||||
margin_ns / 4, HRTIMER_MODE_ABS);
|
margin_ns / 4, HRTIMER_MODE_ABS);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static enum hrtimer_restart iocg_delay_timer_fn(struct hrtimer *timer)
|
static enum hrtimer_restart iocg_delay_timer_fn(struct hrtimer *timer)
|
||||||
@@ -1739,7 +1740,9 @@ static void ioc_rqos_throttle(struct rq_qos *rqos, struct bio *bio)
|
|||||||
*/
|
*/
|
||||||
if (bio_issue_as_root_blkg(bio) || fatal_signal_pending(current)) {
|
if (bio_issue_as_root_blkg(bio) || fatal_signal_pending(current)) {
|
||||||
atomic64_add(abs_cost, &iocg->abs_vdebt);
|
atomic64_add(abs_cost, &iocg->abs_vdebt);
|
||||||
iocg_kick_delay(iocg, &now, cost);
|
if (iocg_kick_delay(iocg, &now, cost))
|
||||||
|
blkcg_schedule_throttle(rqos->q,
|
||||||
|
(bio->bi_opf & REQ_SWAP) == REQ_SWAP);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -151,7 +151,7 @@ int blk_rq_map_user_iov(struct request_queue *q, struct request *rq,
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
unmap_rq:
|
unmap_rq:
|
||||||
__blk_rq_unmap_user(bio);
|
blk_rq_unmap_user(bio);
|
||||||
fail:
|
fail:
|
||||||
rq->bio = NULL;
|
rq->bio = NULL;
|
||||||
return ret;
|
return ret;
|
||||||
|
@@ -30,6 +30,7 @@ struct blk_flush_queue {
|
|||||||
* at the same time
|
* at the same time
|
||||||
*/
|
*/
|
||||||
struct request *orig_rq;
|
struct request *orig_rq;
|
||||||
|
struct lock_class_key key;
|
||||||
spinlock_t mq_flush_lock;
|
spinlock_t mq_flush_lock;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -266,7 +266,7 @@ static blk_status_t bsg_queue_rq(struct blk_mq_hw_ctx *hctx,
|
|||||||
struct request *req = bd->rq;
|
struct request *req = bd->rq;
|
||||||
struct bsg_set *bset =
|
struct bsg_set *bset =
|
||||||
container_of(q->tag_set, struct bsg_set, tag_set);
|
container_of(q->tag_set, struct bsg_set, tag_set);
|
||||||
int sts = BLK_STS_IOERR;
|
blk_status_t sts = BLK_STS_IOERR;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
blk_mq_start_request(req);
|
blk_mq_start_request(req);
|
||||||
|
@@ -470,6 +470,7 @@ static int tpm_key_encrypt(struct tpm_key *tk,
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto error_free_tfm;
|
goto error_free_tfm;
|
||||||
|
|
||||||
|
ret = -ENOMEM;
|
||||||
req = akcipher_request_alloc(tfm, GFP_KERNEL);
|
req = akcipher_request_alloc(tfm, GFP_KERNEL);
|
||||||
if (!req)
|
if (!req)
|
||||||
goto error_free_tfm;
|
goto error_free_tfm;
|
||||||
|
@@ -184,6 +184,7 @@ static int software_key_eds_op(struct kernel_pkey_params *params,
|
|||||||
if (IS_ERR(tfm))
|
if (IS_ERR(tfm))
|
||||||
return PTR_ERR(tfm);
|
return PTR_ERR(tfm);
|
||||||
|
|
||||||
|
ret = -ENOMEM;
|
||||||
req = akcipher_request_alloc(tfm, GFP_KERNEL);
|
req = akcipher_request_alloc(tfm, GFP_KERNEL);
|
||||||
if (!req)
|
if (!req)
|
||||||
goto error_free_tfm;
|
goto error_free_tfm;
|
||||||
|
@@ -1296,10 +1296,10 @@ static int nbd_start_device_ioctl(struct nbd_device *nbd, struct block_device *b
|
|||||||
mutex_unlock(&nbd->config_lock);
|
mutex_unlock(&nbd->config_lock);
|
||||||
ret = wait_event_interruptible(config->recv_wq,
|
ret = wait_event_interruptible(config->recv_wq,
|
||||||
atomic_read(&config->recv_threads) == 0);
|
atomic_read(&config->recv_threads) == 0);
|
||||||
if (ret) {
|
if (ret)
|
||||||
sock_shutdown(nbd);
|
sock_shutdown(nbd);
|
||||||
flush_workqueue(nbd->recv_workq);
|
flush_workqueue(nbd->recv_workq);
|
||||||
}
|
|
||||||
mutex_lock(&nbd->config_lock);
|
mutex_lock(&nbd->config_lock);
|
||||||
nbd_bdev_reset(bdev);
|
nbd_bdev_reset(bdev);
|
||||||
/* user requested, ignore socket errors */
|
/* user requested, ignore socket errors */
|
||||||
|
@@ -190,6 +190,9 @@ static int xen_blkif_map(struct xen_blkif_ring *ring, grant_ref_t *gref,
|
|||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
struct xen_blkif *blkif = ring->blkif;
|
struct xen_blkif *blkif = ring->blkif;
|
||||||
|
const struct blkif_common_sring *sring_common;
|
||||||
|
RING_IDX rsp_prod, req_prod;
|
||||||
|
unsigned int size;
|
||||||
|
|
||||||
/* Already connected through? */
|
/* Already connected through? */
|
||||||
if (ring->irq)
|
if (ring->irq)
|
||||||
@@ -200,46 +203,62 @@ static int xen_blkif_map(struct xen_blkif_ring *ring, grant_ref_t *gref,
|
|||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
sring_common = (struct blkif_common_sring *)ring->blk_ring;
|
||||||
|
rsp_prod = READ_ONCE(sring_common->rsp_prod);
|
||||||
|
req_prod = READ_ONCE(sring_common->req_prod);
|
||||||
|
|
||||||
switch (blkif->blk_protocol) {
|
switch (blkif->blk_protocol) {
|
||||||
case BLKIF_PROTOCOL_NATIVE:
|
case BLKIF_PROTOCOL_NATIVE:
|
||||||
{
|
{
|
||||||
struct blkif_sring *sring;
|
struct blkif_sring *sring_native =
|
||||||
sring = (struct blkif_sring *)ring->blk_ring;
|
(struct blkif_sring *)ring->blk_ring;
|
||||||
BACK_RING_INIT(&ring->blk_rings.native, sring,
|
|
||||||
XEN_PAGE_SIZE * nr_grefs);
|
BACK_RING_ATTACH(&ring->blk_rings.native, sring_native,
|
||||||
|
rsp_prod, XEN_PAGE_SIZE * nr_grefs);
|
||||||
|
size = __RING_SIZE(sring_native, XEN_PAGE_SIZE * nr_grefs);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case BLKIF_PROTOCOL_X86_32:
|
case BLKIF_PROTOCOL_X86_32:
|
||||||
{
|
{
|
||||||
struct blkif_x86_32_sring *sring_x86_32;
|
struct blkif_x86_32_sring *sring_x86_32 =
|
||||||
sring_x86_32 = (struct blkif_x86_32_sring *)ring->blk_ring;
|
(struct blkif_x86_32_sring *)ring->blk_ring;
|
||||||
BACK_RING_INIT(&ring->blk_rings.x86_32, sring_x86_32,
|
|
||||||
XEN_PAGE_SIZE * nr_grefs);
|
BACK_RING_ATTACH(&ring->blk_rings.x86_32, sring_x86_32,
|
||||||
|
rsp_prod, XEN_PAGE_SIZE * nr_grefs);
|
||||||
|
size = __RING_SIZE(sring_x86_32, XEN_PAGE_SIZE * nr_grefs);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case BLKIF_PROTOCOL_X86_64:
|
case BLKIF_PROTOCOL_X86_64:
|
||||||
{
|
{
|
||||||
struct blkif_x86_64_sring *sring_x86_64;
|
struct blkif_x86_64_sring *sring_x86_64 =
|
||||||
sring_x86_64 = (struct blkif_x86_64_sring *)ring->blk_ring;
|
(struct blkif_x86_64_sring *)ring->blk_ring;
|
||||||
BACK_RING_INIT(&ring->blk_rings.x86_64, sring_x86_64,
|
|
||||||
XEN_PAGE_SIZE * nr_grefs);
|
BACK_RING_ATTACH(&ring->blk_rings.x86_64, sring_x86_64,
|
||||||
|
rsp_prod, XEN_PAGE_SIZE * nr_grefs);
|
||||||
|
size = __RING_SIZE(sring_x86_64, XEN_PAGE_SIZE * nr_grefs);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
BUG();
|
BUG();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = -EIO;
|
||||||
|
if (req_prod - rsp_prod > size)
|
||||||
|
goto fail;
|
||||||
|
|
||||||
err = bind_interdomain_evtchn_to_irqhandler(blkif->domid, evtchn,
|
err = bind_interdomain_evtchn_to_irqhandler(blkif->domid, evtchn,
|
||||||
xen_blkif_be_int, 0,
|
xen_blkif_be_int, 0,
|
||||||
"blkif-backend", ring);
|
"blkif-backend", ring);
|
||||||
if (err < 0) {
|
if (err < 0)
|
||||||
xenbus_unmap_ring_vfree(blkif->be->dev, ring->blk_ring);
|
goto fail;
|
||||||
ring->blk_rings.common.sring = NULL;
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
ring->irq = err;
|
ring->irq = err;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
fail:
|
||||||
|
xenbus_unmap_ring_vfree(blkif->be->dev, ring->blk_ring);
|
||||||
|
ring->blk_rings.common.sring = NULL;
|
||||||
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int xen_blkif_disconnect(struct xen_blkif *blkif)
|
static int xen_blkif_disconnect(struct xen_blkif *blkif)
|
||||||
@@ -1131,7 +1150,8 @@ static struct xenbus_driver xen_blkbk_driver = {
|
|||||||
.ids = xen_blkbk_ids,
|
.ids = xen_blkbk_ids,
|
||||||
.probe = xen_blkbk_probe,
|
.probe = xen_blkbk_probe,
|
||||||
.remove = xen_blkbk_remove,
|
.remove = xen_blkbk_remove,
|
||||||
.otherend_changed = frontend_changed
|
.otherend_changed = frontend_changed,
|
||||||
|
.allow_rebind = true,
|
||||||
};
|
};
|
||||||
|
|
||||||
int xen_blkif_xenbus_init(void)
|
int xen_blkif_xenbus_init(void)
|
||||||
|
@@ -1113,8 +1113,8 @@ static int xlvbd_alloc_gendisk(blkif_sector_t capacity,
|
|||||||
if (!VDEV_IS_EXTENDED(info->vdevice)) {
|
if (!VDEV_IS_EXTENDED(info->vdevice)) {
|
||||||
err = xen_translate_vdev(info->vdevice, &minor, &offset);
|
err = xen_translate_vdev(info->vdevice, &minor, &offset);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
nr_parts = PARTS_PER_DISK;
|
nr_parts = PARTS_PER_DISK;
|
||||||
} else {
|
} else {
|
||||||
minor = BLKIF_MINOR_EXT(info->vdevice);
|
minor = BLKIF_MINOR_EXT(info->vdevice);
|
||||||
nr_parts = PARTS_PER_EXT_DISK;
|
nr_parts = PARTS_PER_EXT_DISK;
|
||||||
|
@@ -981,7 +981,8 @@ static int sysc_disable_module(struct device *dev)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ddata->cfg.quirks & SYSC_QUIRK_SWSUP_MSTANDBY)
|
if (ddata->cfg.quirks & (SYSC_QUIRK_SWSUP_MSTANDBY) ||
|
||||||
|
ddata->cfg.quirks & (SYSC_QUIRK_FORCE_MSTANDBY))
|
||||||
best_mode = SYSC_IDLE_FORCE;
|
best_mode = SYSC_IDLE_FORCE;
|
||||||
|
|
||||||
reg &= ~(SYSC_IDLE_MASK << regbits->midle_shift);
|
reg &= ~(SYSC_IDLE_MASK << regbits->midle_shift);
|
||||||
@@ -1583,6 +1584,10 @@ static int sysc_reset(struct sysc *ddata)
|
|||||||
sysc_val |= sysc_mask;
|
sysc_val |= sysc_mask;
|
||||||
sysc_write(ddata, sysc_offset, sysc_val);
|
sysc_write(ddata, sysc_offset, sysc_val);
|
||||||
|
|
||||||
|
if (ddata->cfg.srst_udelay)
|
||||||
|
usleep_range(ddata->cfg.srst_udelay,
|
||||||
|
ddata->cfg.srst_udelay * 2);
|
||||||
|
|
||||||
if (ddata->clk_enable_quirk)
|
if (ddata->clk_enable_quirk)
|
||||||
ddata->clk_enable_quirk(ddata);
|
ddata->clk_enable_quirk(ddata);
|
||||||
|
|
||||||
|
@@ -2175,6 +2175,7 @@ const struct file_operations urandom_fops = {
|
|||||||
.read = urandom_read,
|
.read = urandom_read,
|
||||||
.write = random_write,
|
.write = random_write,
|
||||||
.unlocked_ioctl = random_ioctl,
|
.unlocked_ioctl = random_ioctl,
|
||||||
|
.compat_ioctl = compat_ptr_ioctl,
|
||||||
.fasync = random_fasync,
|
.fasync = random_fasync,
|
||||||
.llseek = noop_llseek,
|
.llseek = noop_llseek,
|
||||||
};
|
};
|
||||||
|
@@ -61,6 +61,12 @@ static void tpm_dev_async_work(struct work_struct *work)
|
|||||||
|
|
||||||
mutex_lock(&priv->buffer_mutex);
|
mutex_lock(&priv->buffer_mutex);
|
||||||
priv->command_enqueued = false;
|
priv->command_enqueued = false;
|
||||||
|
ret = tpm_try_get_ops(priv->chip);
|
||||||
|
if (ret) {
|
||||||
|
priv->response_length = ret;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
ret = tpm_dev_transmit(priv->chip, priv->space, priv->data_buffer,
|
ret = tpm_dev_transmit(priv->chip, priv->space, priv->data_buffer,
|
||||||
sizeof(priv->data_buffer));
|
sizeof(priv->data_buffer));
|
||||||
tpm_put_ops(priv->chip);
|
tpm_put_ops(priv->chip);
|
||||||
@@ -68,6 +74,7 @@ static void tpm_dev_async_work(struct work_struct *work)
|
|||||||
priv->response_length = ret;
|
priv->response_length = ret;
|
||||||
mod_timer(&priv->user_read_timer, jiffies + (120 * HZ));
|
mod_timer(&priv->user_read_timer, jiffies + (120 * HZ));
|
||||||
}
|
}
|
||||||
|
out:
|
||||||
mutex_unlock(&priv->buffer_mutex);
|
mutex_unlock(&priv->buffer_mutex);
|
||||||
wake_up_interruptible(&priv->async_wait);
|
wake_up_interruptible(&priv->async_wait);
|
||||||
}
|
}
|
||||||
@@ -204,6 +211,7 @@ ssize_t tpm_common_write(struct file *file, const char __user *buf,
|
|||||||
if (file->f_flags & O_NONBLOCK) {
|
if (file->f_flags & O_NONBLOCK) {
|
||||||
priv->command_enqueued = true;
|
priv->command_enqueued = true;
|
||||||
queue_work(tpm_dev_wq, &priv->async_work);
|
queue_work(tpm_dev_wq, &priv->async_work);
|
||||||
|
tpm_put_ops(priv->chip);
|
||||||
mutex_unlock(&priv->buffer_mutex);
|
mutex_unlock(&priv->buffer_mutex);
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
@@ -218,7 +218,6 @@ int tpm2_pcr_read(struct tpm_chip *chip, u32 pcr_idx,
|
|||||||
int tpm2_pcr_extend(struct tpm_chip *chip, u32 pcr_idx,
|
int tpm2_pcr_extend(struct tpm_chip *chip, u32 pcr_idx,
|
||||||
struct tpm_digest *digests);
|
struct tpm_digest *digests);
|
||||||
int tpm2_get_random(struct tpm_chip *chip, u8 *dest, size_t max);
|
int tpm2_get_random(struct tpm_chip *chip, u8 *dest, size_t max);
|
||||||
void tpm2_flush_context(struct tpm_chip *chip, u32 handle);
|
|
||||||
ssize_t tpm2_get_tpm_pt(struct tpm_chip *chip, u32 property_id,
|
ssize_t tpm2_get_tpm_pt(struct tpm_chip *chip, u32 property_id,
|
||||||
u32 *value, const char *desc);
|
u32 *value, const char *desc);
|
||||||
|
|
||||||
|
@@ -362,6 +362,7 @@ void tpm2_flush_context(struct tpm_chip *chip, u32 handle)
|
|||||||
tpm_transmit_cmd(chip, &buf, 0, "flushing context");
|
tpm_transmit_cmd(chip, &buf, 0, "flushing context");
|
||||||
tpm_buf_destroy(&buf);
|
tpm_buf_destroy(&buf);
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(tpm2_flush_context);
|
||||||
|
|
||||||
struct tpm2_get_cap_out {
|
struct tpm2_get_cap_out {
|
||||||
u8 more_data;
|
u8 more_data;
|
||||||
|
@@ -32,7 +32,7 @@ static const uuid_t ftpm_ta_uuid =
|
|||||||
0x82, 0xCB, 0x34, 0x3F, 0xB7, 0xF3, 0x78, 0x96);
|
0x82, 0xCB, 0x34, 0x3F, 0xB7, 0xF3, 0x78, 0x96);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ftpm_tee_tpm_op_recv - retrieve fTPM response.
|
* ftpm_tee_tpm_op_recv() - retrieve fTPM response.
|
||||||
* @chip: the tpm_chip description as specified in driver/char/tpm/tpm.h.
|
* @chip: the tpm_chip description as specified in driver/char/tpm/tpm.h.
|
||||||
* @buf: the buffer to store data.
|
* @buf: the buffer to store data.
|
||||||
* @count: the number of bytes to read.
|
* @count: the number of bytes to read.
|
||||||
@@ -61,7 +61,7 @@ static int ftpm_tee_tpm_op_recv(struct tpm_chip *chip, u8 *buf, size_t count)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ftpm_tee_tpm_op_send - send TPM commands through the TEE shared memory.
|
* ftpm_tee_tpm_op_send() - send TPM commands through the TEE shared memory.
|
||||||
* @chip: the tpm_chip description as specified in driver/char/tpm/tpm.h
|
* @chip: the tpm_chip description as specified in driver/char/tpm/tpm.h
|
||||||
* @buf: the buffer to send.
|
* @buf: the buffer to send.
|
||||||
* @len: the number of bytes to send.
|
* @len: the number of bytes to send.
|
||||||
@@ -208,7 +208,7 @@ static int ftpm_tee_match(struct tee_ioctl_version_data *ver, const void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ftpm_tee_probe - initialize the fTPM
|
* ftpm_tee_probe() - initialize the fTPM
|
||||||
* @pdev: the platform_device description.
|
* @pdev: the platform_device description.
|
||||||
*
|
*
|
||||||
* Return:
|
* Return:
|
||||||
@@ -298,7 +298,7 @@ out_tee_session:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ftpm_tee_remove - remove the TPM device
|
* ftpm_tee_remove() - remove the TPM device
|
||||||
* @pdev: the platform_device description.
|
* @pdev: the platform_device description.
|
||||||
*
|
*
|
||||||
* Return:
|
* Return:
|
||||||
@@ -328,6 +328,19 @@ static int ftpm_tee_remove(struct platform_device *pdev)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ftpm_tee_shutdown() - shutdown the TPM device
|
||||||
|
* @pdev: the platform_device description.
|
||||||
|
*/
|
||||||
|
static void ftpm_tee_shutdown(struct platform_device *pdev)
|
||||||
|
{
|
||||||
|
struct ftpm_tee_private *pvt_data = dev_get_drvdata(&pdev->dev);
|
||||||
|
|
||||||
|
tee_shm_free(pvt_data->shm);
|
||||||
|
tee_client_close_session(pvt_data->ctx, pvt_data->session);
|
||||||
|
tee_client_close_context(pvt_data->ctx);
|
||||||
|
}
|
||||||
|
|
||||||
static const struct of_device_id of_ftpm_tee_ids[] = {
|
static const struct of_device_id of_ftpm_tee_ids[] = {
|
||||||
{ .compatible = "microsoft,ftpm" },
|
{ .compatible = "microsoft,ftpm" },
|
||||||
{ }
|
{ }
|
||||||
@@ -341,6 +354,7 @@ static struct platform_driver ftpm_tee_driver = {
|
|||||||
},
|
},
|
||||||
.probe = ftpm_tee_probe,
|
.probe = ftpm_tee_probe,
|
||||||
.remove = ftpm_tee_remove,
|
.remove = ftpm_tee_remove,
|
||||||
|
.shutdown = ftpm_tee_shutdown,
|
||||||
};
|
};
|
||||||
|
|
||||||
module_platform_driver(ftpm_tee_driver);
|
module_platform_driver(ftpm_tee_driver);
|
||||||
|
@@ -978,13 +978,13 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
|
|||||||
|
|
||||||
if (wait_startup(chip, 0) != 0) {
|
if (wait_startup(chip, 0) != 0) {
|
||||||
rc = -ENODEV;
|
rc = -ENODEV;
|
||||||
goto out_err;
|
goto err_start;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Take control of the TPM's interrupt hardware and shut it off */
|
/* Take control of the TPM's interrupt hardware and shut it off */
|
||||||
rc = tpm_tis_read32(priv, TPM_INT_ENABLE(priv->locality), &intmask);
|
rc = tpm_tis_read32(priv, TPM_INT_ENABLE(priv->locality), &intmask);
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
goto out_err;
|
goto err_start;
|
||||||
|
|
||||||
intmask |= TPM_INTF_CMD_READY_INT | TPM_INTF_LOCALITY_CHANGE_INT |
|
intmask |= TPM_INTF_CMD_READY_INT | TPM_INTF_LOCALITY_CHANGE_INT |
|
||||||
TPM_INTF_DATA_AVAIL_INT | TPM_INTF_STS_VALID_INT;
|
TPM_INTF_DATA_AVAIL_INT | TPM_INTF_STS_VALID_INT;
|
||||||
@@ -993,21 +993,21 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
|
|||||||
|
|
||||||
rc = tpm_chip_start(chip);
|
rc = tpm_chip_start(chip);
|
||||||
if (rc)
|
if (rc)
|
||||||
goto out_err;
|
goto err_start;
|
||||||
|
|
||||||
rc = tpm2_probe(chip);
|
rc = tpm2_probe(chip);
|
||||||
tpm_chip_stop(chip);
|
|
||||||
if (rc)
|
if (rc)
|
||||||
goto out_err;
|
goto err_probe;
|
||||||
|
|
||||||
rc = tpm_tis_read32(priv, TPM_DID_VID(0), &vendor);
|
rc = tpm_tis_read32(priv, TPM_DID_VID(0), &vendor);
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
goto out_err;
|
goto err_probe;
|
||||||
|
|
||||||
priv->manufacturer_id = vendor;
|
priv->manufacturer_id = vendor;
|
||||||
|
|
||||||
rc = tpm_tis_read8(priv, TPM_RID(0), &rid);
|
rc = tpm_tis_read8(priv, TPM_RID(0), &rid);
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
goto out_err;
|
goto err_probe;
|
||||||
|
|
||||||
dev_info(dev, "%s TPM (device-id 0x%X, rev-id %d)\n",
|
dev_info(dev, "%s TPM (device-id 0x%X, rev-id %d)\n",
|
||||||
(chip->flags & TPM_CHIP_FLAG_TPM2) ? "2.0" : "1.2",
|
(chip->flags & TPM_CHIP_FLAG_TPM2) ? "2.0" : "1.2",
|
||||||
@@ -1016,13 +1016,13 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
|
|||||||
probe = probe_itpm(chip);
|
probe = probe_itpm(chip);
|
||||||
if (probe < 0) {
|
if (probe < 0) {
|
||||||
rc = -ENODEV;
|
rc = -ENODEV;
|
||||||
goto out_err;
|
goto err_probe;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Figure out the capabilities */
|
/* Figure out the capabilities */
|
||||||
rc = tpm_tis_read32(priv, TPM_INTF_CAPS(priv->locality), &intfcaps);
|
rc = tpm_tis_read32(priv, TPM_INTF_CAPS(priv->locality), &intfcaps);
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
goto out_err;
|
goto err_probe;
|
||||||
|
|
||||||
dev_dbg(dev, "TPM interface capabilities (0x%x):\n",
|
dev_dbg(dev, "TPM interface capabilities (0x%x):\n",
|
||||||
intfcaps);
|
intfcaps);
|
||||||
@@ -1056,10 +1056,9 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
|
|||||||
if (tpm_get_timeouts(chip)) {
|
if (tpm_get_timeouts(chip)) {
|
||||||
dev_err(dev, "Could not get TPM timeouts and durations\n");
|
dev_err(dev, "Could not get TPM timeouts and durations\n");
|
||||||
rc = -ENODEV;
|
rc = -ENODEV;
|
||||||
goto out_err;
|
goto err_probe;
|
||||||
}
|
}
|
||||||
|
|
||||||
tpm_chip_start(chip);
|
|
||||||
chip->flags |= TPM_CHIP_FLAG_IRQ;
|
chip->flags |= TPM_CHIP_FLAG_IRQ;
|
||||||
if (irq) {
|
if (irq) {
|
||||||
tpm_tis_probe_irq_single(chip, intmask, IRQF_SHARED,
|
tpm_tis_probe_irq_single(chip, intmask, IRQF_SHARED,
|
||||||
@@ -1070,18 +1069,20 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
|
|||||||
} else {
|
} else {
|
||||||
tpm_tis_probe_irq(chip, intmask);
|
tpm_tis_probe_irq(chip, intmask);
|
||||||
}
|
}
|
||||||
tpm_chip_stop(chip);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tpm_chip_stop(chip);
|
||||||
|
|
||||||
rc = tpm_chip_register(chip);
|
rc = tpm_chip_register(chip);
|
||||||
if (rc)
|
if (rc)
|
||||||
goto out_err;
|
goto err_start;
|
||||||
|
|
||||||
if (chip->ops->clk_enable != NULL)
|
|
||||||
chip->ops->clk_enable(chip, false);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
out_err:
|
|
||||||
|
err_probe:
|
||||||
|
tpm_chip_stop(chip);
|
||||||
|
|
||||||
|
err_start:
|
||||||
if ((chip->ops != NULL) && (chip->ops->clk_enable != NULL))
|
if ((chip->ops != NULL) && (chip->ops->clk_enable != NULL))
|
||||||
chip->ops->clk_enable(chip, false);
|
chip->ops->clk_enable(chip, false);
|
||||||
|
|
||||||
|
@@ -348,7 +348,7 @@ static void __init at91sam926x_pmc_setup(struct device_node *np,
|
|||||||
return;
|
return;
|
||||||
mainxtal_name = of_clk_get_parent_name(np, i);
|
mainxtal_name = of_clk_get_parent_name(np, i);
|
||||||
|
|
||||||
regmap = syscon_node_to_regmap(np);
|
regmap = device_node_to_regmap(np);
|
||||||
if (IS_ERR(regmap))
|
if (IS_ERR(regmap))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@@ -83,7 +83,7 @@ static void __init at91sam9rl_pmc_setup(struct device_node *np)
|
|||||||
return;
|
return;
|
||||||
mainxtal_name = of_clk_get_parent_name(np, i);
|
mainxtal_name = of_clk_get_parent_name(np, i);
|
||||||
|
|
||||||
regmap = syscon_node_to_regmap(np);
|
regmap = device_node_to_regmap(np);
|
||||||
if (IS_ERR(regmap))
|
if (IS_ERR(regmap))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@@ -146,7 +146,7 @@ static void __init at91sam9x5_pmc_setup(struct device_node *np,
|
|||||||
return;
|
return;
|
||||||
mainxtal_name = of_clk_get_parent_name(np, i);
|
mainxtal_name = of_clk_get_parent_name(np, i);
|
||||||
|
|
||||||
regmap = syscon_node_to_regmap(np);
|
regmap = device_node_to_regmap(np);
|
||||||
if (IS_ERR(regmap))
|
if (IS_ERR(regmap))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@@ -275,7 +275,7 @@ static int __init pmc_register_ops(void)
|
|||||||
|
|
||||||
np = of_find_matching_node(NULL, sama5d2_pmc_dt_ids);
|
np = of_find_matching_node(NULL, sama5d2_pmc_dt_ids);
|
||||||
|
|
||||||
pmcreg = syscon_node_to_regmap(np);
|
pmcreg = device_node_to_regmap(np);
|
||||||
if (IS_ERR(pmcreg))
|
if (IS_ERR(pmcreg))
|
||||||
return PTR_ERR(pmcreg);
|
return PTR_ERR(pmcreg);
|
||||||
|
|
||||||
|
@@ -162,7 +162,7 @@ static void __init sama5d2_pmc_setup(struct device_node *np)
|
|||||||
return;
|
return;
|
||||||
mainxtal_name = of_clk_get_parent_name(np, i);
|
mainxtal_name = of_clk_get_parent_name(np, i);
|
||||||
|
|
||||||
regmap = syscon_node_to_regmap(np);
|
regmap = device_node_to_regmap(np);
|
||||||
if (IS_ERR(regmap))
|
if (IS_ERR(regmap))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@@ -136,7 +136,7 @@ static void __init sama5d4_pmc_setup(struct device_node *np)
|
|||||||
return;
|
return;
|
||||||
mainxtal_name = of_clk_get_parent_name(np, i);
|
mainxtal_name = of_clk_get_parent_name(np, i);
|
||||||
|
|
||||||
regmap = syscon_node_to_regmap(np);
|
regmap = device_node_to_regmap(np);
|
||||||
if (IS_ERR(regmap))
|
if (IS_ERR(regmap))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@@ -3259,6 +3259,34 @@ static inline void clk_debug_unregister(struct clk_core *core)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static void clk_core_reparent_orphans_nolock(void)
|
||||||
|
{
|
||||||
|
struct clk_core *orphan;
|
||||||
|
struct hlist_node *tmp2;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* walk the list of orphan clocks and reparent any that newly finds a
|
||||||
|
* parent.
|
||||||
|
*/
|
||||||
|
hlist_for_each_entry_safe(orphan, tmp2, &clk_orphan_list, child_node) {
|
||||||
|
struct clk_core *parent = __clk_init_parent(orphan);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We need to use __clk_set_parent_before() and _after() to
|
||||||
|
* to properly migrate any prepare/enable count of the orphan
|
||||||
|
* clock. This is important for CLK_IS_CRITICAL clocks, which
|
||||||
|
* are enabled during init but might not have a parent yet.
|
||||||
|
*/
|
||||||
|
if (parent) {
|
||||||
|
/* update the clk tree topology */
|
||||||
|
__clk_set_parent_before(orphan, parent);
|
||||||
|
__clk_set_parent_after(orphan, parent, NULL);
|
||||||
|
__clk_recalc_accuracies(orphan);
|
||||||
|
__clk_recalc_rates(orphan, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* __clk_core_init - initialize the data structures in a struct clk_core
|
* __clk_core_init - initialize the data structures in a struct clk_core
|
||||||
* @core: clk_core being initialized
|
* @core: clk_core being initialized
|
||||||
@@ -3269,8 +3297,6 @@ static inline void clk_debug_unregister(struct clk_core *core)
|
|||||||
static int __clk_core_init(struct clk_core *core)
|
static int __clk_core_init(struct clk_core *core)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
struct clk_core *orphan;
|
|
||||||
struct hlist_node *tmp2;
|
|
||||||
unsigned long rate;
|
unsigned long rate;
|
||||||
|
|
||||||
if (!core)
|
if (!core)
|
||||||
@@ -3417,27 +3443,8 @@ static int __clk_core_init(struct clk_core *core)
|
|||||||
clk_enable_unlock(flags);
|
clk_enable_unlock(flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
clk_core_reparent_orphans_nolock();
|
||||||
* walk the list of orphan clocks and reparent any that newly finds a
|
|
||||||
* parent.
|
|
||||||
*/
|
|
||||||
hlist_for_each_entry_safe(orphan, tmp2, &clk_orphan_list, child_node) {
|
|
||||||
struct clk_core *parent = __clk_init_parent(orphan);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* We need to use __clk_set_parent_before() and _after() to
|
|
||||||
* to properly migrate any prepare/enable count of the orphan
|
|
||||||
* clock. This is important for CLK_IS_CRITICAL clocks, which
|
|
||||||
* are enabled during init but might not have a parent yet.
|
|
||||||
*/
|
|
||||||
if (parent) {
|
|
||||||
/* update the clk tree topology */
|
|
||||||
__clk_set_parent_before(orphan, parent);
|
|
||||||
__clk_set_parent_after(orphan, parent, NULL);
|
|
||||||
__clk_recalc_accuracies(orphan);
|
|
||||||
__clk_recalc_rates(orphan, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
kref_init(&core->ref);
|
kref_init(&core->ref);
|
||||||
out:
|
out:
|
||||||
@@ -4189,6 +4196,13 @@ int clk_notifier_unregister(struct clk *clk, struct notifier_block *nb)
|
|||||||
EXPORT_SYMBOL_GPL(clk_notifier_unregister);
|
EXPORT_SYMBOL_GPL(clk_notifier_unregister);
|
||||||
|
|
||||||
#ifdef CONFIG_OF
|
#ifdef CONFIG_OF
|
||||||
|
static void clk_core_reparent_orphans(void)
|
||||||
|
{
|
||||||
|
clk_prepare_lock();
|
||||||
|
clk_core_reparent_orphans_nolock();
|
||||||
|
clk_prepare_unlock();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct of_clk_provider - Clock provider registration structure
|
* struct of_clk_provider - Clock provider registration structure
|
||||||
* @link: Entry in global list of clock providers
|
* @link: Entry in global list of clock providers
|
||||||
@@ -4284,6 +4298,8 @@ int of_clk_add_provider(struct device_node *np,
|
|||||||
mutex_unlock(&of_clk_mutex);
|
mutex_unlock(&of_clk_mutex);
|
||||||
pr_debug("Added clock from %pOF\n", np);
|
pr_debug("Added clock from %pOF\n", np);
|
||||||
|
|
||||||
|
clk_core_reparent_orphans();
|
||||||
|
|
||||||
ret = of_clk_set_defaults(np, true);
|
ret = of_clk_set_defaults(np, true);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
of_clk_del_provider(np);
|
of_clk_del_provider(np);
|
||||||
@@ -4319,6 +4335,8 @@ int of_clk_add_hw_provider(struct device_node *np,
|
|||||||
mutex_unlock(&of_clk_mutex);
|
mutex_unlock(&of_clk_mutex);
|
||||||
pr_debug("Added clk_hw provider from %pOF\n", np);
|
pr_debug("Added clk_hw provider from %pOF\n", np);
|
||||||
|
|
||||||
|
clk_core_reparent_orphans();
|
||||||
|
|
||||||
ret = of_clk_set_defaults(np, true);
|
ret = of_clk_set_defaults(np, true);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
of_clk_del_provider(np);
|
of_clk_del_provider(np);
|
||||||
|
@@ -142,6 +142,7 @@ struct clk *imx8m_clk_composite_flags(const char *name,
|
|||||||
mux->reg = reg;
|
mux->reg = reg;
|
||||||
mux->shift = PCG_PCS_SHIFT;
|
mux->shift = PCG_PCS_SHIFT;
|
||||||
mux->mask = PCG_PCS_MASK;
|
mux->mask = PCG_PCS_MASK;
|
||||||
|
mux->lock = &imx_ccm_lock;
|
||||||
|
|
||||||
div = kzalloc(sizeof(*div), GFP_KERNEL);
|
div = kzalloc(sizeof(*div), GFP_KERNEL);
|
||||||
if (!div)
|
if (!div)
|
||||||
@@ -161,6 +162,7 @@ struct clk *imx8m_clk_composite_flags(const char *name,
|
|||||||
gate_hw = &gate->hw;
|
gate_hw = &gate->hw;
|
||||||
gate->reg = reg;
|
gate->reg = reg;
|
||||||
gate->bit_idx = PCG_CGC_SHIFT;
|
gate->bit_idx = PCG_CGC_SHIFT;
|
||||||
|
gate->lock = &imx_ccm_lock;
|
||||||
|
|
||||||
hw = clk_hw_register_composite(NULL, name, parent_names, num_parents,
|
hw = clk_hw_register_composite(NULL, name, parent_names, num_parents,
|
||||||
mux_hw, &clk_mux_ops, div_hw,
|
mux_hw, &clk_mux_ops, div_hw,
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user