Merge tag 'v5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into drm-next

Backmerge v5.11-rc5 into drm-next to clean up a bunch of conflicts we are dragging around.

Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Dave Airlie
2021-01-25 14:35:44 +10:00
1002 changed files with 10864 additions and 5872 deletions

View File

@@ -55,6 +55,8 @@ Bart Van Assche <bvanassche@acm.org> <bart.vanassche@wdc.com>
Ben Gardner <bgardner@wabtec.com> Ben Gardner <bgardner@wabtec.com>
Ben M Cahill <ben.m.cahill@intel.com> Ben M Cahill <ben.m.cahill@intel.com>
Björn Steinbrink <B.Steinbrink@gmx.de> Björn Steinbrink <B.Steinbrink@gmx.de>
Björn Töpel <bjorn@kernel.org> <bjorn.topel@gmail.com>
Björn Töpel <bjorn@kernel.org> <bjorn.topel@intel.com>
Boris Brezillon <bbrezillon@kernel.org> <b.brezillon.dev@gmail.com> Boris Brezillon <bbrezillon@kernel.org> <b.brezillon.dev@gmail.com>
Boris Brezillon <bbrezillon@kernel.org> <b.brezillon@overkiz.com> Boris Brezillon <bbrezillon@kernel.org> <b.brezillon@overkiz.com>
Boris Brezillon <bbrezillon@kernel.org> <boris.brezillon@bootlin.com> Boris Brezillon <bbrezillon@kernel.org> <boris.brezillon@bootlin.com>

24
CREDITS
View File

@@ -710,6 +710,10 @@ S: Las Cuevas 2385 - Bo Guemes
S: Las Heras, Mendoza CP 5539 S: Las Heras, Mendoza CP 5539
S: Argentina S: Argentina
N: Jay Cliburn
E: jcliburn@gmail.com
D: ATLX Ethernet drivers
N: Steven P. Cole N: Steven P. Cole
E: scole@lanl.gov E: scole@lanl.gov
E: elenstev@mesatop.com E: elenstev@mesatop.com
@@ -1284,6 +1288,10 @@ D: Major kbuild rework during the 2.5 cycle
D: ISDN Maintainer D: ISDN Maintainer
S: USA S: USA
N: Gerrit Renker
E: gerrit@erg.abdn.ac.uk
D: DCCP protocol support.
N: Philip Gladstone N: Philip Gladstone
E: philip@gladstonefamily.net E: philip@gladstonefamily.net
D: Kernel / timekeeping stuff D: Kernel / timekeeping stuff
@@ -2138,6 +2146,10 @@ E: seasons@falcon.sch.bme.hu
E: seasons@makosteszta.sote.hu E: seasons@makosteszta.sote.hu
D: Original author of software suspend D: Original author of software suspend
N: Alexey Kuznetsov
E: kuznet@ms2.inr.ac.ru
D: Author and maintainer of large parts of the networking stack
N: Jaroslav Kysela N: Jaroslav Kysela
E: perex@perex.cz E: perex@perex.cz
W: https://www.perex.cz W: https://www.perex.cz
@@ -2696,6 +2708,10 @@ N: Wolfgang Muees
E: wolfgang@iksw-muees.de E: wolfgang@iksw-muees.de
D: Auerswald USB driver D: Auerswald USB driver
N: Shrijeet Mukherjee
E: shrijeet@gmail.com
D: Network routing domains (VRF).
N: Paul Mundt N: Paul Mundt
E: paul.mundt@gmail.com E: paul.mundt@gmail.com
D: SuperH maintainer D: SuperH maintainer
@@ -4110,6 +4126,10 @@ S: B-1206 Jingmao Guojigongyu
S: 16 Baliqiao Nanjie, Beijing 101100 S: 16 Baliqiao Nanjie, Beijing 101100
S: People's Repulic of China S: People's Repulic of China
N: Aviad Yehezkel
E: aviadye@nvidia.com
D: Kernel TLS implementation and offload support.
N: Victor Yodaiken N: Victor Yodaiken
E: yodaiken@fsmlabs.com E: yodaiken@fsmlabs.com
D: RTLinux (RealTime Linux) D: RTLinux (RealTime Linux)
@@ -4167,6 +4187,10 @@ S: 1507 145th Place SE #B5
S: Bellevue, Washington 98007 S: Bellevue, Washington 98007
S: USA S: USA
N: Wensong Zhang
E: wensong@linux-vs.org
D: IP virtual server (IPVS).
N: Haojian Zhuang N: Haojian Zhuang
E: haojian.zhuang@gmail.com E: haojian.zhuang@gmail.com
D: MMP support D: MMP support

View File

@@ -5,8 +5,8 @@ Description:
Provide a place in sysfs for the device link objects in the Provide a place in sysfs for the device link objects in the
kernel at any given time. The name of a device link directory, kernel at any given time. The name of a device link directory,
denoted as ... above, is of the form <supplier>--<consumer> denoted as ... above, is of the form <supplier>--<consumer>
where <supplier> is the supplier device name and <consumer> is where <supplier> is the supplier bus:device name and <consumer>
the consumer device name. is the consumer bus:device name.
What: /sys/class/devlink/.../auto_remove_on What: /sys/class/devlink/.../auto_remove_on
Date: May 2020 Date: May 2020

View File

@@ -4,5 +4,6 @@ Contact: Saravana Kannan <saravanak@google.com>
Description: Description:
The /sys/devices/.../consumer:<consumer> are symlinks to device The /sys/devices/.../consumer:<consumer> are symlinks to device
links where this device is the supplier. <consumer> denotes the links where this device is the supplier. <consumer> denotes the
name of the consumer in that device link. There can be zero or name of the consumer in that device link and is of the form
more of these symlinks for a given device. bus:device name. There can be zero or more of these symlinks
for a given device.

View File

@@ -4,5 +4,6 @@ Contact: Saravana Kannan <saravanak@google.com>
Description: Description:
The /sys/devices/.../supplier:<supplier> are symlinks to device The /sys/devices/.../supplier:<supplier> are symlinks to device
links where this device is the consumer. <supplier> denotes the links where this device is the consumer. <supplier> denotes the
name of the supplier in that device link. There can be zero or name of the supplier in that device link and is of the form
more of these symlinks for a given device. bus:device name. There can be zero or more of these symlinks
for a given device.

View File

@@ -916,21 +916,25 @@ Date: September 2014
Contact: Subhash Jadavani <subhashj@codeaurora.org> Contact: Subhash Jadavani <subhashj@codeaurora.org>
Description: This entry could be used to set or show the UFS device Description: This entry could be used to set or show the UFS device
runtime power management level. The current driver runtime power management level. The current driver
implementation supports 6 levels with next target states: implementation supports 7 levels with next target states:
== ==================================================== == ====================================================
0 an UFS device will stay active, an UIC link will 0 UFS device will stay active, UIC link will
stay active stay active
1 an UFS device will stay active, an UIC link will 1 UFS device will stay active, UIC link will
hibernate hibernate
2 an UFS device will moved to sleep, an UIC link will 2 UFS device will be moved to sleep, UIC link will
stay active stay active
3 an UFS device will moved to sleep, an UIC link will 3 UFS device will be moved to sleep, UIC link will
hibernate hibernate
4 an UFS device will be powered off, an UIC link will 4 UFS device will be powered off, UIC link will
hibernate hibernate
5 an UFS device will be powered off, an UIC link will 5 UFS device will be powered off, UIC link will
be powered off be powered off
6 UFS device will be moved to deep sleep, UIC link
will be powered off. Note, deep sleep might not be
supported in which case this value will not be
accepted
== ==================================================== == ====================================================
What: /sys/bus/platform/drivers/ufshcd/*/rpm_target_dev_state What: /sys/bus/platform/drivers/ufshcd/*/rpm_target_dev_state
@@ -954,21 +958,25 @@ Date: September 2014
Contact: Subhash Jadavani <subhashj@codeaurora.org> Contact: Subhash Jadavani <subhashj@codeaurora.org>
Description: This entry could be used to set or show the UFS device Description: This entry could be used to set or show the UFS device
system power management level. The current driver system power management level. The current driver
implementation supports 6 levels with next target states: implementation supports 7 levels with next target states:
== ==================================================== == ====================================================
0 an UFS device will stay active, an UIC link will 0 UFS device will stay active, UIC link will
stay active stay active
1 an UFS device will stay active, an UIC link will 1 UFS device will stay active, UIC link will
hibernate hibernate
2 an UFS device will moved to sleep, an UIC link will 2 UFS device will be moved to sleep, UIC link will
stay active stay active
3 an UFS device will moved to sleep, an UIC link will 3 UFS device will be moved to sleep, UIC link will
hibernate hibernate
4 an UFS device will be powered off, an UIC link will 4 UFS device will be powered off, UIC link will
hibernate hibernate
5 an UFS device will be powered off, an UIC link will 5 UFS device will be powered off, UIC link will
be powered off be powered off
6 UFS device will be moved to deep sleep, UIC link
will be powered off. Note, deep sleep might not be
supported in which case this value will not be
accepted
== ==================================================== == ====================================================
What: /sys/bus/platform/drivers/ufshcd/*/spm_target_dev_state What: /sys/bus/platform/drivers/ufshcd/*/spm_target_dev_state

View File

@@ -473,7 +473,7 @@ read-side critical sections that follow the idle period (the oval near
the bottom of the diagram above). the bottom of the diagram above).
Plumbing this into the full grace-period execution is described Plumbing this into the full grace-period execution is described
`below <#Forcing%20Quiescent%20States>`__. `below <Forcing Quiescent States_>`__.
CPU-Hotplug Interface CPU-Hotplug Interface
^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^
@@ -494,7 +494,7 @@ mask to detect CPUs having gone offline since the beginning of this
grace period. grace period.
Plumbing this into the full grace-period execution is described Plumbing this into the full grace-period execution is described
`below <#Forcing%20Quiescent%20States>`__. `below <Forcing Quiescent States_>`__.
Forcing Quiescent States Forcing Quiescent States
^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -532,7 +532,7 @@ from other CPUs.
| RCU. But this diagram is complex enough as it is, so simplicity | | RCU. But this diagram is complex enough as it is, so simplicity |
| overrode accuracy. You can think of it as poetic license, or you can | | overrode accuracy. You can think of it as poetic license, or you can |
| think of it as misdirection that is resolved in the | | think of it as misdirection that is resolved in the |
| `stitched-together diagram <#Putting%20It%20All%20Together>`__. | | `stitched-together diagram <Putting It All Together_>`__. |
+-----------------------------------------------------------------------+ +-----------------------------------------------------------------------+
Grace-Period Cleanup Grace-Period Cleanup
@@ -596,7 +596,7 @@ maintain ordering. For example, if the callback function wakes up a task
that runs on some other CPU, proper ordering must in place in both the that runs on some other CPU, proper ordering must in place in both the
callback function and the task being awakened. To see why this is callback function and the task being awakened. To see why this is
important, consider the top half of the `grace-period important, consider the top half of the `grace-period
cleanup <#Grace-Period%20Cleanup>`__ diagram. The callback might be cleanup`_ diagram. The callback might be
running on a CPU corresponding to the leftmost leaf ``rcu_node`` running on a CPU corresponding to the leftmost leaf ``rcu_node``
structure, and awaken a task that is to run on a CPU corresponding to structure, and awaken a task that is to run on a CPU corresponding to
the rightmost leaf ``rcu_node`` structure, and the grace-period kernel the rightmost leaf ``rcu_node`` structure, and the grace-period kernel

View File

@@ -45,7 +45,7 @@ requirements:
#. `Other RCU Flavors`_ #. `Other RCU Flavors`_
#. `Possible Future Changes`_ #. `Possible Future Changes`_
This is followed by a `summary <#Summary>`__, however, the answers to This is followed by a summary_, however, the answers to
each quick quiz immediately follows the quiz. Select the big white space each quick quiz immediately follows the quiz. Select the big white space
with your mouse to see the answer. with your mouse to see the answer.
@@ -1096,7 +1096,7 @@ memory barriers.
| case, voluntary context switch) within an RCU read-side critical | | case, voluntary context switch) within an RCU read-side critical |
| section. However, sleeping locks may be used within userspace RCU | | section. However, sleeping locks may be used within userspace RCU |
| read-side critical sections, and also within Linux-kernel sleepable | | read-side critical sections, and also within Linux-kernel sleepable |
| RCU `(SRCU) <#Sleepable%20RCU>`__ read-side critical sections. In | | RCU `(SRCU) <Sleepable RCU_>`__ read-side critical sections. In |
| addition, the -rt patchset turns spinlocks into a sleeping locks so | | addition, the -rt patchset turns spinlocks into a sleeping locks so |
| that the corresponding critical sections can be preempted, which also | | that the corresponding critical sections can be preempted, which also |
| means that these sleeplockified spinlocks (but not other sleeping | | means that these sleeplockified spinlocks (but not other sleeping |
@@ -1186,7 +1186,7 @@ non-preemptible (``CONFIG_PREEMPT=n``) kernels, and thus `tiny
RCU <https://lkml.kernel.org/g/20090113221724.GA15307@linux.vnet.ibm.com>`__ RCU <https://lkml.kernel.org/g/20090113221724.GA15307@linux.vnet.ibm.com>`__
was born. Josh Triplett has since taken over the small-memory banner was born. Josh Triplett has since taken over the small-memory banner
with his `Linux kernel tinification <https://tiny.wiki.kernel.org/>`__ with his `Linux kernel tinification <https://tiny.wiki.kernel.org/>`__
project, which resulted in `SRCU <#Sleepable%20RCU>`__ becoming optional project, which resulted in `SRCU <Sleepable RCU_>`__ becoming optional
for those kernels not needing it. for those kernels not needing it.
The remaining performance requirements are, for the most part, The remaining performance requirements are, for the most part,
@@ -1457,8 +1457,8 @@ will vary as the value of ``HZ`` varies, and can also be changed using
the relevant Kconfig options and kernel boot parameters. RCU currently the relevant Kconfig options and kernel boot parameters. RCU currently
does not do much sanity checking of these parameters, so please use does not do much sanity checking of these parameters, so please use
caution when changing them. Note that these forward-progress measures caution when changing them. Note that these forward-progress measures
are provided only for RCU, not for `SRCU <#Sleepable%20RCU>`__ or `Tasks are provided only for RCU, not for `SRCU <Sleepable RCU_>`__ or `Tasks
RCU <#Tasks%20RCU>`__. RCU`_.
RCU takes the following steps in ``call_rcu()`` to encourage timely RCU takes the following steps in ``call_rcu()`` to encourage timely
invocation of callbacks when any given non-\ ``rcu_nocbs`` CPU has invocation of callbacks when any given non-\ ``rcu_nocbs`` CPU has
@@ -1477,8 +1477,8 @@ encouragement was provided:
Again, these are default values when running at ``HZ=1000``, and can be Again, these are default values when running at ``HZ=1000``, and can be
overridden. Again, these forward-progress measures are provided only for overridden. Again, these forward-progress measures are provided only for
RCU, not for `SRCU <#Sleepable%20RCU>`__ or `Tasks RCU, not for `SRCU <Sleepable RCU_>`__ or `Tasks
RCU <#Tasks%20RCU>`__. Even for RCU, callback-invocation forward RCU`_. Even for RCU, callback-invocation forward
progress for ``rcu_nocbs`` CPUs is much less well-developed, in part progress for ``rcu_nocbs`` CPUs is much less well-developed, in part
because workloads benefiting from ``rcu_nocbs`` CPUs tend to invoke because workloads benefiting from ``rcu_nocbs`` CPUs tend to invoke
``call_rcu()`` relatively infrequently. If workloads emerge that need ``call_rcu()`` relatively infrequently. If workloads emerge that need
@@ -1920,7 +1920,7 @@ Hotplug CPU
The Linux kernel supports CPU hotplug, which means that CPUs can come The Linux kernel supports CPU hotplug, which means that CPUs can come
and go. It is of course illegal to use any RCU API member from an and go. It is of course illegal to use any RCU API member from an
offline CPU, with the exception of `SRCU <#Sleepable%20RCU>`__ read-side offline CPU, with the exception of `SRCU <Sleepable RCU_>`__ read-side
critical sections. This requirement was present from day one in critical sections. This requirement was present from day one in
DYNIX/ptx, but on the other hand, the Linux kernel's CPU-hotplug DYNIX/ptx, but on the other hand, the Linux kernel's CPU-hotplug
implementation is “interesting.” implementation is “interesting.”
@@ -2177,7 +2177,7 @@ handles these states differently:
However, RCU must be reliably informed as to whether any given CPU is However, RCU must be reliably informed as to whether any given CPU is
currently in the idle loop, and, for ``NO_HZ_FULL``, also whether that currently in the idle loop, and, for ``NO_HZ_FULL``, also whether that
CPU is executing in usermode, as discussed CPU is executing in usermode, as discussed
`earlier <#Energy%20Efficiency>`__. It also requires that the `earlier <Energy Efficiency_>`__. It also requires that the
scheduling-clock interrupt be enabled when RCU needs it to be: scheduling-clock interrupt be enabled when RCU needs it to be:
#. If a CPU is either idle or executing in usermode, and RCU believes it #. If a CPU is either idle or executing in usermode, and RCU believes it
@@ -2294,7 +2294,7 @@ Performance, Scalability, Response Time, and Reliability
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expanding on the `earlier Expanding on the `earlier
discussion <#Performance%20and%20Scalability>`__, RCU is used heavily by discussion <Performance and Scalability_>`__, RCU is used heavily by
hot code paths in performance-critical portions of the Linux kernel's hot code paths in performance-critical portions of the Linux kernel's
networking, security, virtualization, and scheduling code paths. RCU networking, security, virtualization, and scheduling code paths. RCU
must therefore use efficient implementations, especially in its must therefore use efficient implementations, especially in its

View File

@@ -23,7 +23,7 @@ Here is what the fields mean:
- ``name`` - ``name``
is an identifier string. A new /proc file will be created with this is an identifier string. A new /proc file will be created with this
``name below /proc/sys/fs/binfmt_misc``; cannot contain slashes ``/`` for name below ``/proc/sys/fs/binfmt_misc``; cannot contain slashes ``/`` for
obvious reasons. obvious reasons.
- ``type`` - ``type``
is the type of recognition. Give ``M`` for magic and ``E`` for extension. is the type of recognition. Give ``M`` for magic and ``E`` for extension.
@@ -83,7 +83,7 @@ Here is what the fields mean:
``F`` - fix binary ``F`` - fix binary
The usual behaviour of binfmt_misc is to spawn the The usual behaviour of binfmt_misc is to spawn the
binary lazily when the misc format file is invoked. However, binary lazily when the misc format file is invoked. However,
this doesn``t work very well in the face of mount namespaces and this doesn't work very well in the face of mount namespaces and
changeroots, so the ``F`` mode opens the binary as soon as the changeroots, so the ``F`` mode opens the binary as soon as the
emulation is installed and uses the opened image to spawn the emulation is installed and uses the opened image to spawn the
emulator, meaning it is always available once installed, emulator, meaning it is always available once installed,

View File

@@ -154,7 +154,7 @@ get the boot configuration data.
Because of this "piggyback" method, there is no need to change or Because of this "piggyback" method, there is no need to change or
update the boot loader and the kernel image itself as long as the boot update the boot loader and the kernel image itself as long as the boot
loader passes the correct initrd file size. If by any chance, the boot loader passes the correct initrd file size. If by any chance, the boot
loader passes a longer size, the kernel feils to find the bootconfig data. loader passes a longer size, the kernel fails to find the bootconfig data.
To do this operation, Linux kernel provides "bootconfig" command under To do this operation, Linux kernel provides "bootconfig" command under
tools/bootconfig, which allows admin to apply or delete the config file tools/bootconfig, which allows admin to apply or delete the config file

View File

@@ -177,14 +177,20 @@ bitmap_flush_interval:number
The bitmap flush interval in milliseconds. The metadata buffers The bitmap flush interval in milliseconds. The metadata buffers
are synchronized when this interval expires. are synchronized when this interval expires.
allow_discards
Allow block discard requests (a.k.a. TRIM) for the integrity device.
Discards are only allowed to devices using internal hash.
fix_padding fix_padding
Use a smaller padding of the tag area that is more Use a smaller padding of the tag area that is more
space-efficient. If this option is not present, large padding is space-efficient. If this option is not present, large padding is
used - that is for compatibility with older kernels. used - that is for compatibility with older kernels.
allow_discards legacy_recalculate
Allow block discard requests (a.k.a. TRIM) for the integrity device. Allow recalculating of volumes with HMAC keys. This is disabled by
Discards are only allowed to devices using internal hash. default for security reasons - an attacker could modify the volume,
set recalc_sector to zero, and the kernel would not detect the
modification.
The journal mode (D/J), buffer_sectors, journal_watermark, commit_time and The journal mode (D/J), buffer_sectors, journal_watermark, commit_time and
allow_discards can be changed when reloading the target (load an inactive allow_discards can be changed when reloading the target (load an inactive

View File

@@ -3,8 +3,8 @@
The kernel's command-line parameters The kernel's command-line parameters
==================================== ====================================
The following is a consolidated list of the kernel parameters as The following is a consolidated list of the kernel parameters as implemented
implemented by the __setup(), core_param() and module_param() macros by the __setup(), early_param(), core_param() and module_param() macros
and sorted into English Dictionary order (defined as ignoring all and sorted into English Dictionary order (defined as ignoring all
punctuation and sorting digits before letters in a case insensitive punctuation and sorting digits before letters in a case insensitive
manner), and with descriptions where known. manner), and with descriptions where known.

View File

@@ -1385,7 +1385,7 @@
ftrace_filter=[function-list] ftrace_filter=[function-list]
[FTRACE] Limit the functions traced by the function [FTRACE] Limit the functions traced by the function
tracer at boot up. function-list is a comma separated tracer at boot up. function-list is a comma-separated
list of functions. This list can be changed at run list of functions. This list can be changed at run
time by the set_ftrace_filter file in the debugfs time by the set_ftrace_filter file in the debugfs
tracing directory. tracing directory.
@@ -1399,13 +1399,13 @@
ftrace_graph_filter=[function-list] ftrace_graph_filter=[function-list]
[FTRACE] Limit the top level callers functions traced [FTRACE] Limit the top level callers functions traced
by the function graph tracer at boot up. by the function graph tracer at boot up.
function-list is a comma separated list of functions function-list is a comma-separated list of functions
that can be changed at run time by the that can be changed at run time by the
set_graph_function file in the debugfs tracing directory. set_graph_function file in the debugfs tracing directory.
ftrace_graph_notrace=[function-list] ftrace_graph_notrace=[function-list]
[FTRACE] Do not trace from the functions specified in [FTRACE] Do not trace from the functions specified in
function-list. This list is a comma separated list of function-list. This list is a comma-separated list of
functions that can be changed at run time by the functions that can be changed at run time by the
set_graph_notrace file in the debugfs tracing directory. set_graph_notrace file in the debugfs tracing directory.
@@ -2421,7 +2421,7 @@
when set. when set.
Format: <int> Format: <int>
libata.force= [LIBATA] Force configurations. The format is comma libata.force= [LIBATA] Force configurations. The format is comma-
separated list of "[ID:]VAL" where ID is separated list of "[ID:]VAL" where ID is
PORT[.DEVICE]. PORT and DEVICE are decimal numbers PORT[.DEVICE]. PORT and DEVICE are decimal numbers
matching port, link or device. Basically, it matches matching port, link or device. Basically, it matches
@@ -5145,7 +5145,7 @@
stacktrace_filter=[function-list] stacktrace_filter=[function-list]
[FTRACE] Limit the functions that the stack tracer [FTRACE] Limit the functions that the stack tracer
will trace at boot up. function-list is a comma separated will trace at boot up. function-list is a comma-separated
list of functions. This list can be changed at run list of functions. This list can be changed at run
time by the stack_trace_filter file in the debugfs time by the stack_trace_filter file in the debugfs
tracing directory. Note, this enables stack tracing tracing directory. Note, this enables stack tracing
@@ -5348,7 +5348,7 @@
trace_event=[event-list] trace_event=[event-list]
[FTRACE] Set and start specified trace events in order [FTRACE] Set and start specified trace events in order
to facilitate early boot debugging. The event-list is a to facilitate early boot debugging. The event-list is a
comma separated list of trace events to enable. See comma-separated list of trace events to enable. See
also Documentation/trace/events.rst also Documentation/trace/events.rst
trace_options=[option-list] trace_options=[option-list]
@@ -5972,6 +5972,10 @@
This option is obsoleted by the "nopv" option, which This option is obsoleted by the "nopv" option, which
has equivalent effect for XEN platform. has equivalent effect for XEN platform.
xen_no_vector_callback
[KNL,X86,XEN] Disable the vector callback for Xen
event channel interrupts.
xen_scrub_pages= [XEN] xen_scrub_pages= [XEN]
Boolean option to control scrubbing pages before giving them back Boolean option to control scrubbing pages before giving them back
to Xen, for use by other domains. Can be also changed at runtime to Xen, for use by other domains. Can be also changed at runtime

View File

@@ -184,7 +184,7 @@ pages either asynchronously or synchronously, depending on the state
of the system. When the system is not loaded, most of the memory is free of the system. When the system is not loaded, most of the memory is free
and allocation requests will be satisfied immediately from the free and allocation requests will be satisfied immediately from the free
pages supply. As the load increases, the amount of the free pages goes pages supply. As the load increases, the amount of the free pages goes
down and when it reaches a certain threshold (high watermark), an down and when it reaches a certain threshold (low watermark), an
allocation request will awaken the ``kswapd`` daemon. It will allocation request will awaken the ``kswapd`` daemon. It will
asynchronously scan memory pages and either just free them if the data asynchronously scan memory pages and either just free them if the data
they contain is available elsewhere, or evict to the backing storage they contain is available elsewhere, or evict to the backing storage

View File

@@ -53,7 +53,6 @@ How Linux keeps everything from happening at the same time. See
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1
atomic_ops
refcount-vs-atomic refcount-vs-atomic
irq/index irq/index
local_ops local_ops

View File

@@ -160,29 +160,14 @@ intended for use in production as a security mitigation. Therefore it supports
boot parameters that allow to disable KASAN competely or otherwise control boot parameters that allow to disable KASAN competely or otherwise control
particular KASAN features. particular KASAN features.
The things that can be controlled are: - ``kasan=off`` or ``=on`` controls whether KASAN is enabled (default: ``on``).
1. Whether KASAN is enabled at all. - ``kasan.stacktrace=off`` or ``=on`` disables or enables alloc and free stack
2. Whether KASAN collects and saves alloc/free stacks. traces collection (default: ``on`` for ``CONFIG_DEBUG_KERNEL=y``, otherwise
3. Whether KASAN panics on a detected bug or not. ``off``).
The ``kasan.mode`` boot parameter allows to choose one of three main modes: - ``kasan.fault=report`` or ``=panic`` controls whether to only print a KASAN
report or also panic the kernel (default: ``report``).
- ``kasan.mode=off`` - KASAN is disabled, no tag checks are performed
- ``kasan.mode=prod`` - only essential production features are enabled
- ``kasan.mode=full`` - all KASAN features are enabled
The chosen mode provides default control values for the features mentioned
above. However it's also possible to override the default values by providing:
- ``kasan.stacktrace=off`` or ``=on`` - enable alloc/free stack collection
(default: ``on`` for ``mode=full``,
otherwise ``off``)
- ``kasan.fault=report`` or ``=panic`` - only print KASAN report or also panic
(default: ``report``)
If ``kasan.mode`` parameter is not provided, it defaults to ``full`` when
``CONFIG_DEBUG_KERNEL`` is enabled, and to ``prod`` otherwise.
For developers For developers
~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~

View File

@@ -522,6 +522,63 @@ There's more boilerplate involved, but it can:
* E.g. if we wanted to also test ``sha256sum``, we could add a ``sha256`` * E.g. if we wanted to also test ``sha256sum``, we could add a ``sha256``
field and reuse ``cases``. field and reuse ``cases``.
* be converted to a "parameterized test", see below.
Parameterized Testing
~~~~~~~~~~~~~~~~~~~~~
The table-driven testing pattern is common enough that KUnit has special
support for it.
Reusing the same ``cases`` array from above, we can write the test as a
"parameterized test" with the following.
.. code-block:: c
// This is copy-pasted from above.
struct sha1_test_case {
const char *str;
const char *sha1;
};
struct sha1_test_case cases[] = {
{
.str = "hello world",
.sha1 = "2aae6c35c94fcfb415dbe95f408b9ce91ee846ed",
},
{
.str = "hello world!",
.sha1 = "430ce34d020724ed75a196dfc2ad67c77772d169",
},
};
// Need a helper function to generate a name for each test case.
static void case_to_desc(const struct sha1_test_case *t, char *desc)
{
strcpy(desc, t->str);
}
// Creates `sha1_gen_params()` to iterate over `cases`.
KUNIT_ARRAY_PARAM(sha1, cases, case_to_desc);
// Looks no different from a normal test.
static void sha1_test(struct kunit *test)
{
// This function can just contain the body of the for-loop.
// The former `cases[i]` is accessible under test->param_value.
char out[40];
struct sha1_test_case *test_param = (struct sha1_test_case *)(test->param_value);
sha1sum(test_param->str, out);
KUNIT_EXPECT_STREQ_MSG(test, (char *)out, test_param->sha1,
"sha1sum(%s)", test_param->str);
}
// Instead of KUNIT_CASE, we use KUNIT_CASE_PARAM and pass in the
// function declared by KUNIT_ARRAY_PARAM.
static struct kunit_case sha1_test_cases[] = {
KUNIT_CASE_PARAM(sha1_test, sha1_gen_params),
{}
};
.. _kunit-on-non-uml: .. _kunit-on-non-uml:
KUnit on non-UML architectures KUnit on non-UML architectures

View File

@@ -1,4 +1,6 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
# Copyright (C) 2020 Texas Instruments Incorporated
# Author: Peter Ujfalusi <peter.ujfalusi@ti.com>
%YAML 1.2 %YAML 1.2
--- ---
$id: http://devicetree.org/schemas/dma/ti/k3-bcdma.yaml# $id: http://devicetree.org/schemas/dma/ti/k3-bcdma.yaml#
@@ -7,7 +9,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments K3 DMSS BCDMA Device Tree Bindings title: Texas Instruments K3 DMSS BCDMA Device Tree Bindings
maintainers: maintainers:
- Peter Ujfalusi <peter.ujfalusi@ti.com> - Peter Ujfalusi <peter.ujfalusi@gmail.com>
description: | description: |
The Block Copy DMA (BCDMA) is intended to perform similar functions as the TR The Block Copy DMA (BCDMA) is intended to perform similar functions as the TR

View File

@@ -1,4 +1,6 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
# Copyright (C) 2020 Texas Instruments Incorporated
# Author: Peter Ujfalusi <peter.ujfalusi@ti.com>
%YAML 1.2 %YAML 1.2
--- ---
$id: http://devicetree.org/schemas/dma/ti/k3-pktdma.yaml# $id: http://devicetree.org/schemas/dma/ti/k3-pktdma.yaml#
@@ -7,7 +9,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments K3 DMSS PKTDMA Device Tree Bindings title: Texas Instruments K3 DMSS PKTDMA Device Tree Bindings
maintainers: maintainers:
- Peter Ujfalusi <peter.ujfalusi@ti.com> - Peter Ujfalusi <peter.ujfalusi@gmail.com>
description: | description: |
The Packet DMA (PKTDMA) is intended to perform similar functions as the packet The Packet DMA (PKTDMA) is intended to perform similar functions as the packet

View File

@@ -1,4 +1,6 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
# Copyright (C) 2019 Texas Instruments Incorporated
# Author: Peter Ujfalusi <peter.ujfalusi@ti.com>
%YAML 1.2 %YAML 1.2
--- ---
$id: http://devicetree.org/schemas/dma/ti/k3-udma.yaml# $id: http://devicetree.org/schemas/dma/ti/k3-udma.yaml#
@@ -7,7 +9,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments K3 NAVSS Unified DMA Device Tree Bindings title: Texas Instruments K3 NAVSS Unified DMA Device Tree Bindings
maintainers: maintainers:
- Peter Ujfalusi <peter.ujfalusi@ti.com> - Peter Ujfalusi <peter.ujfalusi@gmail.com>
description: | description: |
The UDMA-P is intended to perform similar (but significantly upgraded) The UDMA-P is intended to perform similar (but significantly upgraded)

View File

@@ -16,8 +16,8 @@ description:
properties: properties:
compatible: compatible:
enum: enum:
- bosch,bmc150 - bosch,bmc150_accel
- bosch,bmi055 - bosch,bmi055_accel
- bosch,bma255 - bosch,bma255
- bosch,bma250e - bosch,bma250e
- bosch,bma222 - bosch,bma222

View File

@@ -163,6 +163,7 @@ allOf:
enum: enum:
- renesas,etheravb-r8a774a1 - renesas,etheravb-r8a774a1
- renesas,etheravb-r8a774b1 - renesas,etheravb-r8a774b1
- renesas,etheravb-r8a774e1
- renesas,etheravb-r8a7795 - renesas,etheravb-r8a7795
- renesas,etheravb-r8a7796 - renesas,etheravb-r8a7796
- renesas,etheravb-r8a77961 - renesas,etheravb-r8a77961

View File

@@ -161,7 +161,8 @@ properties:
* snps,route-dcbcp, DCB Control Packets * snps,route-dcbcp, DCB Control Packets
* snps,route-up, Untagged Packets * snps,route-up, Untagged Packets
* snps,route-multi-broad, Multicast & Broadcast Packets * snps,route-multi-broad, Multicast & Broadcast Packets
* snps,priority, RX queue priority (Range 0x0 to 0xF) * snps,priority, bitmask of the tagged frames priorities assigned to
the queue
snps,mtl-tx-config: snps,mtl-tx-config:
$ref: /schemas/types.yaml#/definitions/phandle $ref: /schemas/types.yaml#/definitions/phandle
@@ -188,7 +189,10 @@ properties:
* snps,idle_slope, unlock on WoL * snps,idle_slope, unlock on WoL
* snps,high_credit, max write outstanding req. limit * snps,high_credit, max write outstanding req. limit
* snps,low_credit, max read outstanding req. limit * snps,low_credit, max read outstanding req. limit
* snps,priority, TX queue priority (Range 0x0 to 0xF) * snps,priority, bitmask of the priorities assigned to the queue.
When a PFC frame is received with priorities matching the bitmask,
the queue is blocked from transmitting for the pause time specified
in the PFC frame.
snps,reset-gpio: snps,reset-gpio:
deprecated: true deprecated: true

View File

@@ -19,7 +19,9 @@ description: |
properties: properties:
compatible: compatible:
enum: enum:
- nxp,pf8x00 - nxp,pf8100
- nxp,pf8121a
- nxp,pf8200
reg: reg:
maxItems: 1 maxItems: 1
@@ -118,7 +120,7 @@ examples:
#size-cells = <0>; #size-cells = <0>;
pmic@8 { pmic@8 {
compatible = "nxp,pf8x00"; compatible = "nxp,pf8100";
reg = <0x08>; reg = <0x08>;
regulators { regulators {

View File

@@ -44,6 +44,7 @@ First Level Nodes - PMIC
Definition: Must be one of below: Definition: Must be one of below:
"qcom,pm8005-rpmh-regulators" "qcom,pm8005-rpmh-regulators"
"qcom,pm8009-rpmh-regulators" "qcom,pm8009-rpmh-regulators"
"qcom,pm8009-1-rpmh-regulators"
"qcom,pm8150-rpmh-regulators" "qcom,pm8150-rpmh-regulators"
"qcom,pm8150l-rpmh-regulators" "qcom,pm8150l-rpmh-regulators"
"qcom,pm8350-rpmh-regulators" "qcom,pm8350-rpmh-regulators"

View File

@@ -1,4 +1,6 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
# Copyright (C) 2020 Texas Instruments Incorporated
# Author: Peter Ujfalusi <peter.ujfalusi@ti.com>
%YAML 1.2 %YAML 1.2
--- ---
$id: http://devicetree.org/schemas/sound/ti,j721e-cpb-audio.yaml# $id: http://devicetree.org/schemas/sound/ti,j721e-cpb-audio.yaml#
@@ -7,7 +9,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments J721e Common Processor Board Audio Support title: Texas Instruments J721e Common Processor Board Audio Support
maintainers: maintainers:
- Peter Ujfalusi <peter.ujfalusi@ti.com> - Peter Ujfalusi <peter.ujfalusi@gmail.com>
description: | description: |
The audio support on the board is using pcm3168a codec connected to McASP10 The audio support on the board is using pcm3168a codec connected to McASP10

View File

@@ -1,4 +1,6 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
# Copyright (C) 2020 Texas Instruments Incorporated
# Author: Peter Ujfalusi <peter.ujfalusi@ti.com>
%YAML 1.2 %YAML 1.2
--- ---
$id: http://devicetree.org/schemas/sound/ti,j721e-cpb-ivi-audio.yaml# $id: http://devicetree.org/schemas/sound/ti,j721e-cpb-ivi-audio.yaml#
@@ -7,7 +9,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments J721e Common Processor Board Audio Support title: Texas Instruments J721e Common Processor Board Audio Support
maintainers: maintainers:
- Peter Ujfalusi <peter.ujfalusi@ti.com> - Peter Ujfalusi <peter.ujfalusi@gmail.com>
description: | description: |
The Infotainment board plugs into the Common Processor Board, the support of the The Infotainment board plugs into the Common Processor Board, the support of the

View File

@@ -11,8 +11,12 @@ maintainers:
properties: properties:
compatible: compatible:
items: oneOf:
- const: ti,j721e-usb - const: ti,j721e-usb
- const: ti,am64-usb
- items:
- const: ti,j721e-usb
- const: ti,am64-usb
reg: reg:
description: module registers description: module registers

View File

@@ -48,12 +48,12 @@ or ``virtualenv``, depending on how your distribution packaged Python 3.
those versions, you should run ``pip install 'docutils==0.12'``. those versions, you should run ``pip install 'docutils==0.12'``.
#) It is recommended to use the RTD theme for html output. Depending #) It is recommended to use the RTD theme for html output. Depending
on the Sphinx version, it should be installed in separate, on the Sphinx version, it should be installed separately,
with ``pip install sphinx_rtd_theme``. with ``pip install sphinx_rtd_theme``.
#) Some ReST pages contain math expressions. Due to the way Sphinx work, #) Some ReST pages contain math expressions. Due to the way Sphinx works,
those expressions are written using LaTeX notation. It needs texlive those expressions are written using LaTeX notation. It needs texlive
installed with amdfonts and amsmath in order to evaluate them. installed with amsfonts and amsmath in order to evaluate them.
In summary, if you want to install Sphinx version 1.7.9, you should do:: In summary, if you want to install Sphinx version 1.7.9, you should do::
@@ -128,7 +128,7 @@ Sphinx Build
============ ============
The usual way to generate the documentation is to run ``make htmldocs`` or The usual way to generate the documentation is to run ``make htmldocs`` or
``make pdfdocs``. There are also other formats available, see the documentation ``make pdfdocs``. There are also other formats available: see the documentation
section of ``make help``. The generated documentation is placed in section of ``make help``. The generated documentation is placed in
format-specific subdirectories under ``Documentation/output``. format-specific subdirectories under ``Documentation/output``.
@@ -303,17 +303,17 @@ and *targets* (e.g. a ref to ``:ref:`last row <last row>``` / :ref:`last row
- head col 3 - head col 3
- head col 4 - head col 4
* - column 1 * - row 1
- field 1.1 - field 1.1
- field 1.2 with autospan - field 1.2 with autospan
* - column 2 * - row 2
- field 2.1 - field 2.1
- :rspan:`1` :cspan:`1` field 2.2 - 3.3 - :rspan:`1` :cspan:`1` field 2.2 - 3.3
* .. _`last row`: * .. _`last row`:
- column 3 - row 3
Rendered as: Rendered as:
@@ -325,17 +325,17 @@ Rendered as:
- head col 3 - head col 3
- head col 4 - head col 4
* - column 1 * - row 1
- field 1.1 - field 1.1
- field 1.2 with autospan - field 1.2 with autospan
* - column 2 * - row 2
- field 2.1 - field 2.1
- :rspan:`1` :cspan:`1` field 2.2 - 3.3 - :rspan:`1` :cspan:`1` field 2.2 - 3.3
* .. _`last row`: * .. _`last row`:
- column 3 - row 3
Cross-referencing Cross-referencing
----------------- -----------------
@@ -361,7 +361,7 @@ Figures & Images
If you want to add an image, you should use the ``kernel-figure`` and If you want to add an image, you should use the ``kernel-figure`` and
``kernel-image`` directives. E.g. to insert a figure with a scalable ``kernel-image`` directives. E.g. to insert a figure with a scalable
image format use SVG (:ref:`svg_image_example`):: image format, use SVG (:ref:`svg_image_example`)::
.. kernel-figure:: svg_image.svg .. kernel-figure:: svg_image.svg
:alt: simple SVG image :alt: simple SVG image
@@ -375,7 +375,7 @@ image format use SVG (:ref:`svg_image_example`)::
SVG image example SVG image example
The kernel figure (and image) directive support **DOT** formatted files, see The kernel figure (and image) directive supports **DOT** formatted files, see
* DOT: http://graphviz.org/pdf/dotguide.pdf * DOT: http://graphviz.org/pdf/dotguide.pdf
* Graphviz: http://www.graphviz.org/content/dot-language * Graphviz: http://www.graphviz.org/content/dot-language
@@ -394,7 +394,7 @@ A simple example (:ref:`hello_dot_file`)::
DOT's hello world example DOT's hello world example
Embed *render* markups (or languages) like Graphviz's **DOT** is provided by the Embedded *render* markups (or languages) like Graphviz's **DOT** are provided by the
``kernel-render`` directives.:: ``kernel-render`` directives.::
.. kernel-render:: DOT .. kernel-render:: DOT
@@ -406,7 +406,7 @@ Embed *render* markups (or languages) like Graphviz's **DOT** is provided by the
} }
How this will be rendered depends on the installed tools. If Graphviz is How this will be rendered depends on the installed tools. If Graphviz is
installed, you will see an vector image. If not the raw markup is inserted as installed, you will see a vector image. If not, the raw markup is inserted as
*literal-block* (:ref:`hello_dot_render`). *literal-block* (:ref:`hello_dot_render`).
.. _hello_dot_render: .. _hello_dot_render:
@@ -421,8 +421,8 @@ installed, you will see an vector image. If not the raw markup is inserted as
The *render* directive has all the options known from the *figure* directive, The *render* directive has all the options known from the *figure* directive,
plus option ``caption``. If ``caption`` has a value, a *figure* node is plus option ``caption``. If ``caption`` has a value, a *figure* node is
inserted. If not, a *image* node is inserted. A ``caption`` is also needed, if inserted. If not, an *image* node is inserted. A ``caption`` is also needed, if
you want to refer it (:ref:`hello_svg_render`). you want to refer to it (:ref:`hello_svg_render`).
Embedded **SVG**:: Embedded **SVG**::

View File

@@ -50,8 +50,8 @@ The following files belong to it:
0x00000010 Memory Uncorrectable non-fatal 0x00000010 Memory Uncorrectable non-fatal
0x00000020 Memory Uncorrectable fatal 0x00000020 Memory Uncorrectable fatal
0x00000040 PCI Express Correctable 0x00000040 PCI Express Correctable
0x00000080 PCI Express Uncorrectable fatal 0x00000080 PCI Express Uncorrectable non-fatal
0x00000100 PCI Express Uncorrectable non-fatal 0x00000100 PCI Express Uncorrectable fatal
0x00000200 Platform Correctable 0x00000200 Platform Correctable
0x00000400 Platform Uncorrectable non-fatal 0x00000400 Platform Uncorrectable non-fatal
0x00000800 Platform Uncorrectable fatal 0x00000800 Platform Uncorrectable fatal

View File

@@ -1,7 +1,7 @@
.. SPDX-License-Identifier: GPL-2.0-or-later .. SPDX-License-Identifier: GPL-2.0-or-later
Kernel driver sbtsi_temp Kernel driver sbtsi_temp
================== ========================
Supported hardware: Supported hardware:

View File

@@ -598,7 +598,7 @@ more details, with real examples.
explicitly added to $(targets). explicitly added to $(targets).
Assignments to $(targets) are without $(obj)/ prefix. if_changed may be Assignments to $(targets) are without $(obj)/ prefix. if_changed may be
used in conjunction with custom rules as defined in "3.9 Custom Rules". used in conjunction with custom rules as defined in "3.11 Custom Rules".
Note: It is a typical mistake to forget the FORCE prerequisite. Note: It is a typical mistake to forget the FORCE prerequisite.
Another common pitfall is that whitespace is sometimes significant; for Another common pitfall is that whitespace is sometimes significant; for

View File

@@ -118,11 +118,11 @@ spinlock, but you may block holding a mutex. If you can't lock a mutex,
your task will suspend itself, and be woken up when the mutex is your task will suspend itself, and be woken up when the mutex is
released. This means the CPU can do something else while you are released. This means the CPU can do something else while you are
waiting. There are many cases when you simply can't sleep (see waiting. There are many cases when you simply can't sleep (see
`What Functions Are Safe To Call From Interrupts? <#sleeping-things>`__), `What Functions Are Safe To Call From Interrupts?`_),
and so have to use a spinlock instead. and so have to use a spinlock instead.
Neither type of lock is recursive: see Neither type of lock is recursive: see
`Deadlock: Simple and Advanced <#deadlock>`__. `Deadlock: Simple and Advanced`_.
Locks and Uniprocessor Kernels Locks and Uniprocessor Kernels
------------------------------ ------------------------------
@@ -179,7 +179,7 @@ perfect world).
Note that you can also use spin_lock_irq() or Note that you can also use spin_lock_irq() or
spin_lock_irqsave() here, which stop hardware interrupts spin_lock_irqsave() here, which stop hardware interrupts
as well: see `Hard IRQ Context <#hard-irq-context>`__. as well: see `Hard IRQ Context`_.
This works perfectly for UP as well: the spin lock vanishes, and this This works perfectly for UP as well: the spin lock vanishes, and this
macro simply becomes local_bh_disable() macro simply becomes local_bh_disable()
@@ -230,7 +230,7 @@ The Same Softirq
~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~
The same softirq can run on the other CPUs: you can use a per-CPU array The same softirq can run on the other CPUs: you can use a per-CPU array
(see `Per-CPU Data <#per-cpu-data>`__) for better performance. If you're (see `Per-CPU Data`_) for better performance. If you're
going so far as to use a softirq, you probably care about scalable going so far as to use a softirq, you probably care about scalable
performance enough to justify the extra complexity. performance enough to justify the extra complexity.

View File

@@ -164,46 +164,56 @@ Devlink health reporters
NPA Reporters NPA Reporters
------------- -------------
The NPA reporters are responsible for reporting and recovering the following group of errors The NPA reporters are responsible for reporting and recovering the following group of errors:
1. GENERAL events 1. GENERAL events
- Error due to operation of unmapped PF. - Error due to operation of unmapped PF.
- Error due to disabled alloc/free for other HW blocks (NIX, SSO, TIM, DPI and AURA). - Error due to disabled alloc/free for other HW blocks (NIX, SSO, TIM, DPI and AURA).
2. ERROR events 2. ERROR events
- Fault due to NPA_AQ_INST_S read or NPA_AQ_RES_S write. - Fault due to NPA_AQ_INST_S read or NPA_AQ_RES_S write.
- AQ Doorbell Error. - AQ Doorbell Error.
3. RAS events 3. RAS events
- RAS Error Reporting for NPA_AQ_INST_S/NPA_AQ_RES_S. - RAS Error Reporting for NPA_AQ_INST_S/NPA_AQ_RES_S.
4. RVU events 4. RVU events
- Error due to unmapped slot. - Error due to unmapped slot.
Sample Output Sample Output::
-------------
~# devlink health ~# devlink health
pci/0002:01:00.0: pci/0002:01:00.0:
reporter hw_npa_intr reporter hw_npa_intr
state healthy error 2872 recover 2872 last_dump_date 2020-12-10 last_dump_time 09:39:09 grace_period 0 auto_recover true auto_dump true state healthy error 2872 recover 2872 last_dump_date 2020-12-10 last_dump_time 09:39:09 grace_period 0 auto_recover true auto_dump true
reporter hw_npa_gen reporter hw_npa_gen
state healthy error 2872 recover 2872 last_dump_date 2020-12-11 last_dump_time 04:43:04 grace_period 0 auto_recover true auto_dump true state healthy error 2872 recover 2872 last_dump_date 2020-12-11 last_dump_time 04:43:04 grace_period 0 auto_recover true auto_dump true
reporter hw_npa_err reporter hw_npa_err
state healthy error 2871 recover 2871 last_dump_date 2020-12-10 last_dump_time 09:39:17 grace_period 0 auto_recover true auto_dump true state healthy error 2871 recover 2871 last_dump_date 2020-12-10 last_dump_time 09:39:17 grace_period 0 auto_recover true auto_dump true
reporter hw_npa_ras reporter hw_npa_ras
state healthy error 0 recover 0 last_dump_date 2020-12-10 last_dump_time 09:32:40 grace_period 0 auto_recover true auto_dump true state healthy error 0 recover 0 last_dump_date 2020-12-10 last_dump_time 09:32:40 grace_period 0 auto_recover true auto_dump true
Each reporter dumps the Each reporter dumps the
- Error Type - Error Type
- Error Register value - Error Register value
- Reason in words - Reason in words
For eg: For example::
~# devlink health dump show pci/0002:01:00.0 reporter hw_npa_gen
NPA_AF_GENERAL: ~# devlink health dump show pci/0002:01:00.0 reporter hw_npa_gen
NPA General Interrupt Reg : 1 NPA_AF_GENERAL:
NIX0: free disabled RX NPA General Interrupt Reg : 1
~# devlink health dump show pci/0002:01:00.0 reporter hw_npa_intr NIX0: free disabled RX
NPA_AF_RVU: ~# devlink health dump show pci/0002:01:00.0 reporter hw_npa_intr
NPA RVU Interrupt Reg : 1 NPA_AF_RVU:
Unmap Slot Error NPA RVU Interrupt Reg : 1
~# devlink health dump show pci/0002:01:00.0 reporter hw_npa_err Unmap Slot Error
NPA_AF_ERR: ~# devlink health dump show pci/0002:01:00.0 reporter hw_npa_err
NPA Error Interrupt Reg : 4096 NPA_AF_ERR:
AQ Doorbell Error NPA Error Interrupt Reg : 4096
AQ Doorbell Error

View File

@@ -6,9 +6,9 @@
netdev FAQ netdev FAQ
========== ==========
Q: What is netdev? What is netdev?
------------------ ---------------
A: It is a mailing list for all network-related Linux stuff. This It is a mailing list for all network-related Linux stuff. This
includes anything found under net/ (i.e. core code like IPv6) and includes anything found under net/ (i.e. core code like IPv6) and
drivers/net (i.e. hardware specific drivers) in the Linux source tree. drivers/net (i.e. hardware specific drivers) in the Linux source tree.
@@ -25,9 +25,9 @@ Aside from subsystems like that mentioned above, all network-related
Linux development (i.e. RFC, review, comments, etc.) takes place on Linux development (i.e. RFC, review, comments, etc.) takes place on
netdev. netdev.
Q: How do the changes posted to netdev make their way into Linux? How do the changes posted to netdev make their way into Linux?
----------------------------------------------------------------- --------------------------------------------------------------
A: There are always two trees (git repositories) in play. Both are There are always two trees (git repositories) in play. Both are
driven by David Miller, the main network maintainer. There is the driven by David Miller, the main network maintainer. There is the
``net`` tree, and the ``net-next`` tree. As you can probably guess from ``net`` tree, and the ``net-next`` tree. As you can probably guess from
the names, the ``net`` tree is for fixes to existing code already in the the names, the ``net`` tree is for fixes to existing code already in the
@@ -37,9 +37,9 @@ for the future release. You can find the trees here:
- https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git - https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git
- https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git - https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git
Q: How often do changes from these trees make it to the mainline Linus tree? How often do changes from these trees make it to the mainline Linus tree?
---------------------------------------------------------------------------- -------------------------------------------------------------------------
A: To understand this, you need to know a bit of background information on To understand this, you need to know a bit of background information on
the cadence of Linux development. Each new release starts off with a the cadence of Linux development. Each new release starts off with a
two week "merge window" where the main maintainers feed their new stuff two week "merge window" where the main maintainers feed their new stuff
to Linus for merging into the mainline tree. After the two weeks, the to Linus for merging into the mainline tree. After the two weeks, the
@@ -81,7 +81,8 @@ focus for ``net`` is on stabilization and bug fixes.
Finally, the vX.Y gets released, and the whole cycle starts over. Finally, the vX.Y gets released, and the whole cycle starts over.
Q: So where are we now in this cycle? So where are we now in this cycle?
----------------------------------
Load the mainline (Linus) page here: Load the mainline (Linus) page here:
@@ -91,9 +92,9 @@ and note the top of the "tags" section. If it is rc1, it is early in
the dev cycle. If it was tagged rc7 a week ago, then a release is the dev cycle. If it was tagged rc7 a week ago, then a release is
probably imminent. probably imminent.
Q: How do I indicate which tree (net vs. net-next) my patch should be in? How do I indicate which tree (net vs. net-next) my patch should be in?
------------------------------------------------------------------------- ----------------------------------------------------------------------
A: Firstly, think whether you have a bug fix or new "next-like" content. Firstly, think whether you have a bug fix or new "next-like" content.
Then once decided, assuming that you use git, use the prefix flag, i.e. Then once decided, assuming that you use git, use the prefix flag, i.e.
:: ::
@@ -105,48 +106,45 @@ in the above is just the subject text of the outgoing e-mail, and you
can manually change it yourself with whatever MUA you are comfortable can manually change it yourself with whatever MUA you are comfortable
with. with.
Q: I sent a patch and I'm wondering what happened to it? I sent a patch and I'm wondering what happened to it - how can I tell whether it got merged?
-------------------------------------------------------- --------------------------------------------------------------------------------------------
Q: How can I tell whether it got merged? Start by looking at the main patchworks queue for netdev:
A: Start by looking at the main patchworks queue for netdev:
https://patchwork.kernel.org/project/netdevbpf/list/ https://patchwork.kernel.org/project/netdevbpf/list/
The "State" field will tell you exactly where things are at with your The "State" field will tell you exactly where things are at with your
patch. patch.
Q: The above only says "Under Review". How can I find out more? The above only says "Under Review". How can I find out more?
---------------------------------------------------------------- -------------------------------------------------------------
A: Generally speaking, the patches get triaged quickly (in less than Generally speaking, the patches get triaged quickly (in less than
48h). So be patient. Asking the maintainer for status updates on your 48h). So be patient. Asking the maintainer for status updates on your
patch is a good way to ensure your patch is ignored or pushed to the patch is a good way to ensure your patch is ignored or pushed to the
bottom of the priority list. bottom of the priority list.
Q: I submitted multiple versions of the patch series I submitted multiple versions of the patch series. Should I directly update patchwork for the previous versions of these patch series?
---------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------
Q: should I directly update patchwork for the previous versions of these No, please don't interfere with the patch status on patchwork, leave
patch series?
A: No, please don't interfere with the patch status on patchwork, leave
it to the maintainer to figure out what is the most recent and current it to the maintainer to figure out what is the most recent and current
version that should be applied. If there is any doubt, the maintainer version that should be applied. If there is any doubt, the maintainer
will reply and ask what should be done. will reply and ask what should be done.
Q: I made changes to only a few patches in a patch series should I resend only those changed? I made changes to only a few patches in a patch series should I resend only those changed?
--------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------
A: No, please resend the entire patch series and make sure you do number your No, please resend the entire patch series and make sure you do number your
patches such that it is clear this is the latest and greatest set of patches patches such that it is clear this is the latest and greatest set of patches
that can be applied. that can be applied.
Q: I submitted multiple versions of a patch series and it looks like a version other than the last one has been accepted, what should I do? I submitted multiple versions of a patch series and it looks like a version other than the last one has been accepted, what should I do?
------------------------------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------------------------
A: There is no revert possible, once it is pushed out, it stays like that. There is no revert possible, once it is pushed out, it stays like that.
Please send incremental versions on top of what has been merged in order to fix Please send incremental versions on top of what has been merged in order to fix
the patches the way they would look like if your latest patch series was to be the patches the way they would look like if your latest patch series was to be
merged. merged.
Q: How can I tell what patches are queued up for backporting to the various stable releases? How can I tell what patches are queued up for backporting to the various stable releases?
-------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------
A: Normally Greg Kroah-Hartman collects stable commits himself, but for Normally Greg Kroah-Hartman collects stable commits himself, but for
networking, Dave collects up patches he deems critical for the networking, Dave collects up patches he deems critical for the
networking subsystem, and then hands them off to Greg. networking subsystem, and then hands them off to Greg.
@@ -169,11 +167,9 @@ simply clone the repo, and then git grep the mainline commit ID, e.g.
releases/3.9.8/ipv6-fix-possible-crashes-in-ip6_cork_release.patch releases/3.9.8/ipv6-fix-possible-crashes-in-ip6_cork_release.patch
stable/stable-queue$ stable/stable-queue$
Q: I see a network patch and I think it should be backported to stable. I see a network patch and I think it should be backported to stable. Should I request it via stable@vger.kernel.org like the references in the kernel's Documentation/process/stable-kernel-rules.rst file say?
----------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Q: Should I request it via stable@vger.kernel.org like the references in No, not for networking. Check the stable queues as per above first
the kernel's Documentation/process/stable-kernel-rules.rst file say?
A: No, not for networking. Check the stable queues as per above first
to see if it is already queued. If not, then send a mail to netdev, to see if it is already queued. If not, then send a mail to netdev,
listing the upstream commit ID and why you think it should be a stable listing the upstream commit ID and why you think it should be a stable
candidate. candidate.
@@ -190,11 +186,9 @@ mainline, the better the odds that it is an OK candidate for stable. So
scrambling to request a commit be added the day after it appears should scrambling to request a commit be added the day after it appears should
be avoided. be avoided.
Q: I have created a network patch and I think it should be backported to stable. I have created a network patch and I think it should be backported to stable. Should I add a Cc: stable@vger.kernel.org like the references in the kernel's Documentation/ directory say?
-------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Q: Should I add a Cc: stable@vger.kernel.org like the references in the No. See above answer. In short, if you think it really belongs in
kernel's Documentation/ directory say?
A: No. See above answer. In short, if you think it really belongs in
stable, then ensure you write a decent commit log that describes who stable, then ensure you write a decent commit log that describes who
gets impacted by the bug fix and how it manifests itself, and when the gets impacted by the bug fix and how it manifests itself, and when the
bug was introduced. If you do that properly, then the commit will get bug was introduced. If you do that properly, then the commit will get
@@ -207,18 +201,18 @@ marker line as described in
:ref:`Documentation/process/submitting-patches.rst <the_canonical_patch_format>` :ref:`Documentation/process/submitting-patches.rst <the_canonical_patch_format>`
to temporarily embed that information into the patch that you send. to temporarily embed that information into the patch that you send.
Q: Are all networking bug fixes backported to all stable releases? Are all networking bug fixes backported to all stable releases?
------------------------------------------------------------------ ---------------------------------------------------------------
A: Due to capacity, Dave could only take care of the backports for the Due to capacity, Dave could only take care of the backports for the
last two stable releases. For earlier stable releases, each stable last two stable releases. For earlier stable releases, each stable
branch maintainer is supposed to take care of them. If you find any branch maintainer is supposed to take care of them. If you find any
patch is missing from an earlier stable branch, please notify patch is missing from an earlier stable branch, please notify
stable@vger.kernel.org with either a commit ID or a formal patch stable@vger.kernel.org with either a commit ID or a formal patch
backported, and CC Dave and other relevant networking developers. backported, and CC Dave and other relevant networking developers.
Q: Is the comment style convention different for the networking content? Is the comment style convention different for the networking content?
------------------------------------------------------------------------ ---------------------------------------------------------------------
A: Yes, in a largely trivial way. Instead of this:: Yes, in a largely trivial way. Instead of this::
/* /*
* foobar blah blah blah * foobar blah blah blah
@@ -231,32 +225,30 @@ it is requested that you make it look like this::
* another line of text * another line of text
*/ */
Q: I am working in existing code that has the former comment style and not the latter. I am working in existing code that has the former comment style and not the latter. Should I submit new code in the former style or the latter?
-------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------------------------------------------------------
Q: Should I submit new code in the former style or the latter? Make it the latter style, so that eventually all code in the domain
A: Make it the latter style, so that eventually all code in the domain
of netdev is of this format. of netdev is of this format.
Q: I found a bug that might have possible security implications or similar. I found a bug that might have possible security implications or similar. Should I mail the main netdev maintainer off-list?
--------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------
Q: Should I mail the main netdev maintainer off-list?** No. The current netdev maintainer has consistently requested that
A: No. The current netdev maintainer has consistently requested that
people use the mailing lists and not reach out directly. If you aren't people use the mailing lists and not reach out directly. If you aren't
OK with that, then perhaps consider mailing security@kernel.org or OK with that, then perhaps consider mailing security@kernel.org or
reading about http://oss-security.openwall.org/wiki/mailing-lists/distros reading about http://oss-security.openwall.org/wiki/mailing-lists/distros
as possible alternative mechanisms. as possible alternative mechanisms.
Q: What level of testing is expected before I submit my change? What level of testing is expected before I submit my change?
--------------------------------------------------------------- ------------------------------------------------------------
A: If your changes are against ``net-next``, the expectation is that you If your changes are against ``net-next``, the expectation is that you
have tested by layering your changes on top of ``net-next``. Ideally have tested by layering your changes on top of ``net-next``. Ideally
you will have done run-time testing specific to your change, but at a you will have done run-time testing specific to your change, but at a
minimum, your changes should survive an ``allyesconfig`` and an minimum, your changes should survive an ``allyesconfig`` and an
``allmodconfig`` build without new warnings or failures. ``allmodconfig`` build without new warnings or failures.
Q: How do I post corresponding changes to user space components? How do I post corresponding changes to user space components?
---------------------------------------------------------------- -------------------------------------------------------------
A: User space code exercising kernel features should be posted User space code exercising kernel features should be posted
alongside kernel patches. This gives reviewers a chance to see alongside kernel patches. This gives reviewers a chance to see
how any new interface is used and how well it works. how any new interface is used and how well it works.
@@ -280,9 +272,9 @@ to the mailing list, e.g.::
Posting as one thread is discouraged because it confuses patchwork Posting as one thread is discouraged because it confuses patchwork
(as of patchwork 2.2.2). (as of patchwork 2.2.2).
Q: Any other tips to help ensure my net/net-next patch gets OK'd? Any other tips to help ensure my net/net-next patch gets OK'd?
----------------------------------------------------------------- --------------------------------------------------------------
A: Attention to detail. Re-read your own work as if you were the Attention to detail. Re-read your own work as if you were the
reviewer. You can start with using ``checkpatch.pl``, perhaps even with reviewer. You can start with using ``checkpatch.pl``, perhaps even with
the ``--strict`` flag. But do not be mindlessly robotic in doing so. the ``--strict`` flag. But do not be mindlessly robotic in doing so.
If your change is a bug fix, make sure your commit log indicates the If your change is a bug fix, make sure your commit log indicates the

View File

@@ -10,18 +10,177 @@ Introduction
The following is a random collection of documentation regarding The following is a random collection of documentation regarding
network devices. network devices.
struct net_device allocation rules struct net_device lifetime rules
================================== ================================
Network device structures need to persist even after module is unloaded and Network device structures need to persist even after module is unloaded and
must be allocated with alloc_netdev_mqs() and friends. must be allocated with alloc_netdev_mqs() and friends.
If device has registered successfully, it will be freed on last use If device has registered successfully, it will be freed on last use
by free_netdev(). This is required to handle the pathologic case cleanly by free_netdev(). This is required to handle the pathological case cleanly
(example: rmmod mydriver </sys/class/net/myeth/mtu ) (example: ``rmmod mydriver </sys/class/net/myeth/mtu``)
alloc_netdev_mqs()/alloc_netdev() reserve extra space for driver alloc_netdev_mqs() / alloc_netdev() reserve extra space for driver
private data which gets freed when the network device is freed. If private data which gets freed when the network device is freed. If
separately allocated data is attached to the network device separately allocated data is attached to the network device
(netdev_priv(dev)) then it is up to the module exit handler to free that. (netdev_priv()) then it is up to the module exit handler to free that.
There are two groups of APIs for registering struct net_device.
First group can be used in normal contexts where ``rtnl_lock`` is not already
held: register_netdev(), unregister_netdev().
Second group can be used when ``rtnl_lock`` is already held:
register_netdevice(), unregister_netdevice(), free_netdevice().
Simple drivers
--------------
Most drivers (especially device drivers) handle lifetime of struct net_device
in context where ``rtnl_lock`` is not held (e.g. driver probe and remove paths).
In that case the struct net_device registration is done using
the register_netdev(), and unregister_netdev() functions:
.. code-block:: c
int probe()
{
struct my_device_priv *priv;
int err;
dev = alloc_netdev_mqs(...);
if (!dev)
return -ENOMEM;
priv = netdev_priv(dev);
/* ... do all device setup before calling register_netdev() ...
*/
err = register_netdev(dev);
if (err)
goto err_undo;
/* net_device is visible to the user! */
err_undo:
/* ... undo the device setup ... */
free_netdev(dev);
return err;
}
void remove()
{
unregister_netdev(dev);
free_netdev(dev);
}
Note that after calling register_netdev() the device is visible in the system.
Users can open it and start sending / receiving traffic immediately,
or run any other callback, so all initialization must be done prior to
registration.
unregister_netdev() closes the device and waits for all users to be done
with it. The memory of struct net_device itself may still be referenced
by sysfs but all operations on that device will fail.
free_netdev() can be called after unregister_netdev() returns on when
register_netdev() failed.
Device management under RTNL
----------------------------
Registering struct net_device while in context which already holds
the ``rtnl_lock`` requires extra care. In those scenarios most drivers
will want to make use of struct net_device's ``needs_free_netdev``
and ``priv_destructor`` members for freeing of state.
Example flow of netdev handling under ``rtnl_lock``:
.. code-block:: c
static void my_setup(struct net_device *dev)
{
dev->needs_free_netdev = true;
}
static void my_destructor(struct net_device *dev)
{
some_obj_destroy(priv->obj);
some_uninit(priv);
}
int create_link()
{
struct my_device_priv *priv;
int err;
ASSERT_RTNL();
dev = alloc_netdev(sizeof(*priv), "net%d", NET_NAME_UNKNOWN, my_setup);
if (!dev)
return -ENOMEM;
priv = netdev_priv(dev);
/* Implicit constructor */
err = some_init(priv);
if (err)
goto err_free_dev;
priv->obj = some_obj_create();
if (!priv->obj) {
err = -ENOMEM;
goto err_some_uninit;
}
/* End of constructor, set the destructor: */
dev->priv_destructor = my_destructor;
err = register_netdevice(dev);
if (err)
/* register_netdevice() calls destructor on failure */
goto err_free_dev;
/* If anything fails now unregister_netdevice() (or unregister_netdev())
* will take care of calling my_destructor and free_netdev().
*/
return 0;
err_some_uninit:
some_uninit(priv);
err_free_dev:
free_netdev(dev);
return err;
}
If struct net_device.priv_destructor is set it will be called by the core
some time after unregister_netdevice(), it will also be called if
register_netdevice() fails. The callback may be invoked with or without
``rtnl_lock`` held.
There is no explicit constructor callback, driver "constructs" the private
netdev state after allocating it and before registration.
Setting struct net_device.needs_free_netdev makes core call free_netdevice()
automatically after unregister_netdevice() when all references to the device
are gone. It only takes effect after a successful call to register_netdevice()
so if register_netdevice() fails driver is responsible for calling
free_netdev().
free_netdev() is safe to call on error paths right after unregister_netdevice()
or when register_netdevice() fails. Parts of netdev (de)registration process
happen after ``rtnl_lock`` is released, therefore in those cases free_netdev()
will defer some of the processing until ``rtnl_lock`` is released.
Devices spawned from struct rtnl_link_ops should never free the
struct net_device directly.
.ndo_init and .ndo_uninit
~~~~~~~~~~~~~~~~~~~~~~~~~
``.ndo_init`` and ``.ndo_uninit`` callbacks are called during net_device
registration and de-registration, under ``rtnl_lock``. Drivers can use
those e.g. when parts of their init process need to run under ``rtnl_lock``.
``.ndo_init`` runs before device is visible in the system, ``.ndo_uninit``
runs during de-registering after device is closed but other subsystems
may still have outstanding references to the netdevice.
MTU MTU
=== ===
@@ -64,8 +223,8 @@ ndo_do_ioctl:
Context: process Context: process
ndo_get_stats: ndo_get_stats:
Synchronization: dev_base_lock rwlock. Synchronization: rtnl_lock() semaphore, dev_base_lock rwlock, or RCU.
Context: nominally process, but don't sleep inside an rwlock Context: atomic (can't sleep under rwlock or RCU)
ndo_start_xmit: ndo_start_xmit:
Synchronization: __netif_tx_lock spinlock. Synchronization: __netif_tx_lock spinlock.

View File

@@ -8,7 +8,7 @@ Abstract
======== ========
This file documents the mmap() facility available with the PACKET This file documents the mmap() facility available with the PACKET
socket interface on 2.4/2.6/3.x kernels. This type of sockets is used for socket interface. This type of sockets is used for
i) capture network traffic with utilities like tcpdump, i) capture network traffic with utilities like tcpdump,
ii) transmit network traffic, or any other that needs raw ii) transmit network traffic, or any other that needs raw
@@ -25,12 +25,12 @@ Please send your comments to
Why use PACKET_MMAP Why use PACKET_MMAP
=================== ===================
In Linux 2.4/2.6/3.x if PACKET_MMAP is not enabled, the capture process is very Non PACKET_MMAP capture process (plain AF_PACKET) is very
inefficient. It uses very limited buffers and requires one system call to inefficient. It uses very limited buffers and requires one system call to
capture each packet, it requires two if you want to get packet's timestamp capture each packet, it requires two if you want to get packet's timestamp
(like libpcap always does). (like libpcap always does).
In the other hand PACKET_MMAP is very efficient. PACKET_MMAP provides a size On the other hand PACKET_MMAP is very efficient. PACKET_MMAP provides a size
configurable circular buffer mapped in user space that can be used to either configurable circular buffer mapped in user space that can be used to either
send or receive packets. This way reading packets just needs to wait for them, send or receive packets. This way reading packets just needs to wait for them,
most of the time there is no need to issue a single system call. Concerning most of the time there is no need to issue a single system call. Concerning
@@ -252,8 +252,7 @@ PACKET_MMAP setting constraints
In kernel versions prior to 2.4.26 (for the 2.4 branch) and 2.6.5 (2.6 branch), In kernel versions prior to 2.4.26 (for the 2.4 branch) and 2.6.5 (2.6 branch),
the PACKET_MMAP buffer could hold only 32768 frames in a 32 bit architecture or the PACKET_MMAP buffer could hold only 32768 frames in a 32 bit architecture or
16384 in a 64 bit architecture. For information on these kernel versions 16384 in a 64 bit architecture.
see http://pusa.uv.es/~ulisses/packet_mmap/packet_mmap.pre-2.4.26_2.6.5.txt
Block size limit Block size limit
---------------- ----------------
@@ -437,7 +436,7 @@ and the following flags apply:
Capture process Capture process
^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
from include/linux/if_packet.h From include/linux/if_packet.h::
#define TP_STATUS_COPY (1 << 1) #define TP_STATUS_COPY (1 << 1)
#define TP_STATUS_LOSING (1 << 2) #define TP_STATUS_LOSING (1 << 2)

View File

@@ -530,7 +530,10 @@ TLS device feature flags only control adding of new TLS connection
offloads, old connections will remain active after flags are cleared. offloads, old connections will remain active after flags are cleared.
TLS encryption cannot be offloaded to devices without checksum calculation TLS encryption cannot be offloaded to devices without checksum calculation
offload. Hence, TLS TX device feature flag requires NETIF_F_HW_CSUM being set. offload. Hence, TLS TX device feature flag requires TX csum offload being set.
Disabling the latter implies clearing the former. Disabling TX checksum offload Disabling the latter implies clearing the former. Disabling TX checksum offload
should not affect old connections, and drivers should make sure checksum should not affect old connections, and drivers should make sure checksum
calculation does not break for them. calculation does not break for them.
Similarly, device-offloaded TLS decryption implies doing RXCSUM. If the user
does not want to enable RX csum offload, TLS RX device feature is disabled
as well.

View File

@@ -249,10 +249,8 @@ features; most of these are found in the "kernel hacking" submenu. Several
of these options should be turned on for any kernel used for development or of these options should be turned on for any kernel used for development or
testing purposes. In particular, you should turn on: testing purposes. In particular, you should turn on:
- ENABLE_MUST_CHECK and FRAME_WARN to get an - FRAME_WARN to get warnings for stack frames larger than a given amount.
extra set of warnings for problems like the use of deprecated interfaces The output generated can be verbose, but one need not worry about
or ignoring an important return value from a function. The output
generated by these warnings can be verbose, but one need not worry about
warnings from other parts of the kernel. warnings from other parts of the kernel.
- DEBUG_OBJECTS will add code to track the lifetime of various objects - DEBUG_OBJECTS will add code to track the lifetime of various objects

View File

@@ -1501,7 +1501,7 @@ Module for Digigram miXart8 sound cards.
This module supports multiple cards. This module supports multiple cards.
Note: One miXart8 board will be represented as 4 alsa cards. Note: One miXart8 board will be represented as 4 alsa cards.
See MIXART.txt for details. See Documentation/sound/cards/mixart.rst for details.
When the driver is compiled as a module and the hotplug firmware When the driver is compiled as a module and the hotplug firmware
is supported, the firmware data is loaded via hotplug automatically. is supported, the firmware data is loaded via hotplug automatically.

View File

@@ -71,7 +71,7 @@ core/oss
The codes for PCM and mixer OSS emulation modules are stored in this The codes for PCM and mixer OSS emulation modules are stored in this
directory. The rawmidi OSS emulation is included in the ALSA rawmidi directory. The rawmidi OSS emulation is included in the ALSA rawmidi
code since it's quite small. The sequencer code is stored in code since it's quite small. The sequencer code is stored in
``core/seq/oss`` directory (see `below <#core-seq-oss>`__). ``core/seq/oss`` directory (see `below <core/seq/oss_>`__).
core/seq core/seq
~~~~~~~~ ~~~~~~~~
@@ -382,7 +382,7 @@ where ``enable[dev]`` is the module option.
Each time the ``probe`` callback is called, check the availability of Each time the ``probe`` callback is called, check the availability of
the device. If not available, simply increment the device index and the device. If not available, simply increment the device index and
returns. dev will be incremented also later (`step 7 returns. dev will be incremented also later (`step 7
<#set-the-pci-driver-data-and-return-zero>`__). <7) Set the PCI driver data and return zero._>`__).
2) Create a card instance 2) Create a card instance
~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -450,10 +450,10 @@ field contains the information shown in ``/proc/asound/cards``.
5) Create other components, such as mixer, MIDI, etc. 5) Create other components, such as mixer, MIDI, etc.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Here you define the basic components such as `PCM <#PCM-Interface>`__, Here you define the basic components such as `PCM <PCM Interface_>`__,
mixer (e.g. `AC97 <#API-for-AC97-Codec>`__), MIDI (e.g. mixer (e.g. `AC97 <API for AC97 Codec_>`__), MIDI (e.g.
`MPU-401 <#MIDI-MPU401-UART-Interface>`__), and other interfaces. `MPU-401 <MIDI (MPU401-UART) Interface_>`__), and other interfaces.
Also, if you want a `proc file <#Proc-Interface>`__, define it here, Also, if you want a `proc file <Proc Interface_>`__, define it here,
too. too.
6) Register the card instance. 6) Register the card instance.
@@ -941,7 +941,7 @@ The allocation of an interrupt source is done like this:
chip->irq = pci->irq; chip->irq = pci->irq;
where :c:func:`snd_mychip_interrupt()` is the interrupt handler where :c:func:`snd_mychip_interrupt()` is the interrupt handler
defined `later <#pcm-interface-interrupt-handler>`__. Note that defined `later <PCM Interrupt Handler_>`__. Note that
``chip->irq`` should be defined only when :c:func:`request_irq()` ``chip->irq`` should be defined only when :c:func:`request_irq()`
succeeded. succeeded.
@@ -3104,7 +3104,7 @@ processing the output stream in the irq handler.
If the MPU-401 interface shares its interrupt with the other logical If the MPU-401 interface shares its interrupt with the other logical
devices on the card, set ``MPU401_INFO_IRQ_HOOK`` (see devices on the card, set ``MPU401_INFO_IRQ_HOOK`` (see
`below <#MIDI-Interrupt-Handler>`__). `below <MIDI Interrupt Handler_>`__).
Usually, the port address corresponds to the command port and port + 1 Usually, the port address corresponds to the command port and port + 1
corresponds to the data port. If not, you may change the ``cport`` corresponds to the data port. If not, you may change the ``cport``

View File

@@ -392,9 +392,14 @@ This ioctl is obsolete and has been removed.
Errors: Errors:
===== ============================= ======= ==============================================================
EINTR an unmasked signal is pending EINTR an unmasked signal is pending
===== ============================= ENOEXEC the vcpu hasn't been initialized or the guest tried to execute
instructions from device memory (arm64)
ENOSYS data abort outside memslots with no syndrome info and
KVM_CAP_ARM_NISV_TO_USER not enabled (arm64)
EPERM SVE feature set but not finalized (arm64)
======= ==============================================================
This ioctl is used to run a guest virtual cpu. While there are no This ioctl is used to run a guest virtual cpu. While there are no
explicit parameters, there is an implicit parameter block that can be explicit parameters, there is an implicit parameter block that can be

View File

@@ -203,8 +203,8 @@ F: include/uapi/linux/nl80211.h
F: net/wireless/ F: net/wireless/
8169 10/100/1000 GIGABIT ETHERNET DRIVER 8169 10/100/1000 GIGABIT ETHERNET DRIVER
M: Realtek linux nic maintainers <nic_swsd@realtek.com>
M: Heiner Kallweit <hkallweit1@gmail.com> M: Heiner Kallweit <hkallweit1@gmail.com>
M: nic_swsd@realtek.com
L: netdev@vger.kernel.org L: netdev@vger.kernel.org
S: Maintained S: Maintained
F: drivers/net/ethernet/realtek/r8169* F: drivers/net/ethernet/realtek/r8169*
@@ -820,7 +820,6 @@ M: Netanel Belgazal <netanel@amazon.com>
M: Arthur Kiyanovski <akiyano@amazon.com> M: Arthur Kiyanovski <akiyano@amazon.com>
R: Guy Tzalik <gtzalik@amazon.com> R: Guy Tzalik <gtzalik@amazon.com>
R: Saeed Bishara <saeedb@amazon.com> R: Saeed Bishara <saeedb@amazon.com>
R: Zorik Machulsky <zorik@amazon.com>
L: netdev@vger.kernel.org L: netdev@vger.kernel.org
S: Supported S: Supported
F: Documentation/networking/device_drivers/ethernet/amazon/ena.rst F: Documentation/networking/device_drivers/ethernet/amazon/ena.rst
@@ -2119,7 +2118,7 @@ N: atmel
ARM/Microchip Sparx5 SoC support ARM/Microchip Sparx5 SoC support
M: Lars Povlsen <lars.povlsen@microchip.com> M: Lars Povlsen <lars.povlsen@microchip.com>
M: Steen Hegelund <Steen.Hegelund@microchip.com> M: Steen Hegelund <Steen.Hegelund@microchip.com>
M: Microchip Linux Driver Support <UNGLinuxDriver@microchip.com> M: UNGLinuxDriver@microchip.com
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Supported S: Supported
T: git git://github.com/microchip-ung/linux-upstream.git T: git git://github.com/microchip-ung/linux-upstream.git
@@ -2942,7 +2941,6 @@ S: Maintained
F: drivers/hwmon/asus_atk0110.c F: drivers/hwmon/asus_atk0110.c
ATLX ETHERNET DRIVERS ATLX ETHERNET DRIVERS
M: Jay Cliburn <jcliburn@gmail.com>
M: Chris Snook <chris.snook@gmail.com> M: Chris Snook <chris.snook@gmail.com>
L: netdev@vger.kernel.org L: netdev@vger.kernel.org
S: Maintained S: Maintained
@@ -3336,7 +3334,7 @@ F: arch/riscv/net/
X: arch/riscv/net/bpf_jit_comp64.c X: arch/riscv/net/bpf_jit_comp64.c
BPF JIT for RISC-V (64-bit) BPF JIT for RISC-V (64-bit)
M: Björn Töpel <bjorn.topel@gmail.com> M: Björn Töpel <bjorn@kernel.org>
L: netdev@vger.kernel.org L: netdev@vger.kernel.org
L: bpf@vger.kernel.org L: bpf@vger.kernel.org
S: Maintained S: Maintained
@@ -3556,7 +3554,7 @@ S: Supported
F: drivers/net/ethernet/broadcom/bnxt/ F: drivers/net/ethernet/broadcom/bnxt/
BROADCOM BRCM80211 IEEE802.11n WIRELESS DRIVER BROADCOM BRCM80211 IEEE802.11n WIRELESS DRIVER
M: Arend van Spriel <arend.vanspriel@broadcom.com> M: Arend van Spriel <aspriel@gmail.com>
M: Franky Lin <franky.lin@broadcom.com> M: Franky Lin <franky.lin@broadcom.com>
M: Hante Meuleman <hante.meuleman@broadcom.com> M: Hante Meuleman <hante.meuleman@broadcom.com>
M: Chi-hsien Lin <chi-hsien.lin@infineon.com> M: Chi-hsien Lin <chi-hsien.lin@infineon.com>
@@ -3881,9 +3879,9 @@ F: Documentation/devicetree/bindings/mtd/cadence-nand-controller.txt
F: drivers/mtd/nand/raw/cadence-nand-controller.c F: drivers/mtd/nand/raw/cadence-nand-controller.c
CADENCE USB3 DRD IP DRIVER CADENCE USB3 DRD IP DRIVER
M: Peter Chen <peter.chen@nxp.com> M: Peter Chen <peter.chen@kernel.org>
M: Pawel Laszczak <pawell@cadence.com> M: Pawel Laszczak <pawell@cadence.com>
M: Roger Quadros <rogerq@ti.com> R: Roger Quadros <rogerq@kernel.org>
R: Aswath Govindraju <a-govindraju@ti.com> R: Aswath Govindraju <a-govindraju@ti.com>
L: linux-usb@vger.kernel.org L: linux-usb@vger.kernel.org
S: Maintained S: Maintained
@@ -3961,7 +3959,7 @@ F: net/can/
CAN-J1939 NETWORK LAYER CAN-J1939 NETWORK LAYER
M: Robin van der Gracht <robin@protonic.nl> M: Robin van der Gracht <robin@protonic.nl>
M: Oleksij Rempel <o.rempel@pengutronix.de> M: Oleksij Rempel <o.rempel@pengutronix.de>
R: Pengutronix Kernel Team <kernel@pengutronix.de> R: kernel@pengutronix.de
L: linux-can@vger.kernel.org L: linux-can@vger.kernel.org
S: Maintained S: Maintained
F: Documentation/networking/j1939.rst F: Documentation/networking/j1939.rst
@@ -4163,7 +4161,7 @@ S: Maintained
F: Documentation/translations/zh_CN/ F: Documentation/translations/zh_CN/
CHIPIDEA USB HIGH SPEED DUAL ROLE CONTROLLER CHIPIDEA USB HIGH SPEED DUAL ROLE CONTROLLER
M: Peter Chen <Peter.Chen@nxp.com> M: Peter Chen <peter.chen@kernel.org>
L: linux-usb@vger.kernel.org L: linux-usb@vger.kernel.org
S: Maintained S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git
@@ -4313,7 +4311,9 @@ W: https://clangbuiltlinux.github.io/
B: https://github.com/ClangBuiltLinux/linux/issues B: https://github.com/ClangBuiltLinux/linux/issues
C: irc://chat.freenode.net/clangbuiltlinux C: irc://chat.freenode.net/clangbuiltlinux
F: Documentation/kbuild/llvm.rst F: Documentation/kbuild/llvm.rst
F: include/linux/compiler-clang.h
F: scripts/clang-tools/ F: scripts/clang-tools/
F: scripts/clang-version.sh
F: scripts/lld-version.sh F: scripts/lld-version.sh
K: \b(?i:clang|llvm)\b K: \b(?i:clang|llvm)\b
@@ -4922,9 +4922,8 @@ F: Documentation/scsi/dc395x.rst
F: drivers/scsi/dc395x.* F: drivers/scsi/dc395x.*
DCCP PROTOCOL DCCP PROTOCOL
M: Gerrit Renker <gerrit@erg.abdn.ac.uk>
L: dccp@vger.kernel.org L: dccp@vger.kernel.org
S: Maintained S: Orphan
W: http://www.linuxfoundation.org/collaborate/workgroups/networking/dccp W: http://www.linuxfoundation.org/collaborate/workgroups/networking/dccp
F: include/linux/dccp.h F: include/linux/dccp.h
F: include/linux/tfrc.h F: include/linux/tfrc.h
@@ -7364,7 +7363,6 @@ L: linux-hardening@vger.kernel.org
S: Maintained S: Maintained
F: Documentation/kbuild/gcc-plugins.rst F: Documentation/kbuild/gcc-plugins.rst
F: scripts/Makefile.gcc-plugins F: scripts/Makefile.gcc-plugins
F: scripts/gcc-plugin.sh
F: scripts/gcc-plugins/ F: scripts/gcc-plugins/
GCOV BASED KERNEL PROFILING GCOV BASED KERNEL PROFILING
@@ -9241,7 +9239,7 @@ F: tools/testing/selftests/sgx/*
K: \bSGX_ K: \bSGX_
INTERCONNECT API INTERCONNECT API
M: Georgi Djakov <georgi.djakov@linaro.org> M: Georgi Djakov <djakov@kernel.org>
L: linux-pm@vger.kernel.org L: linux-pm@vger.kernel.org
S: Maintained S: Maintained
F: Documentation/devicetree/bindings/interconnect/ F: Documentation/devicetree/bindings/interconnect/
@@ -9274,7 +9272,7 @@ F: drivers/net/ethernet/sgi/ioc3-eth.c
IOMAP FILESYSTEM LIBRARY IOMAP FILESYSTEM LIBRARY
M: Christoph Hellwig <hch@infradead.org> M: Christoph Hellwig <hch@infradead.org>
M: Darrick J. Wong <darrick.wong@oracle.com> M: Darrick J. Wong <djwong@kernel.org>
M: linux-xfs@vger.kernel.org M: linux-xfs@vger.kernel.org
M: linux-fsdevel@vger.kernel.org M: linux-fsdevel@vger.kernel.org
L: linux-xfs@vger.kernel.org L: linux-xfs@vger.kernel.org
@@ -9328,7 +9326,6 @@ W: http://www.adaptec.com/
F: drivers/scsi/ips* F: drivers/scsi/ips*
IPVS IPVS
M: Wensong Zhang <wensong@linux-vs.org>
M: Simon Horman <horms@verge.net.au> M: Simon Horman <horms@verge.net.au>
M: Julian Anastasov <ja@ssi.bg> M: Julian Anastasov <ja@ssi.bg>
L: netdev@vger.kernel.org L: netdev@vger.kernel.org
@@ -9777,7 +9774,7 @@ 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>
R: Sean Christopherson <sean.j.christopherson@intel.com> R: Sean Christopherson <seanjc@google.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>
R: Jim Mattson <jmattson@google.com> R: Jim Mattson <jmattson@google.com>
@@ -10261,7 +10258,6 @@ S: Supported
T: git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev T: git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev
F: Documentation/atomic_bitops.txt F: Documentation/atomic_bitops.txt
F: Documentation/atomic_t.txt F: Documentation/atomic_t.txt
F: Documentation/core-api/atomic_ops.rst
F: Documentation/core-api/refcount-vs-atomic.rst F: Documentation/core-api/refcount-vs-atomic.rst
F: Documentation/litmus-tests/ F: Documentation/litmus-tests/
F: Documentation/memory-barriers.txt F: Documentation/memory-barriers.txt
@@ -10848,7 +10844,7 @@ F: drivers/media/radio/radio-maxiradio*
MCAN MMIO DEVICE DRIVER MCAN MMIO DEVICE DRIVER
M: Dan Murphy <dmurphy@ti.com> M: Dan Murphy <dmurphy@ti.com>
M: Sriram Dash <sriram.dash@samsung.com> M: Pankaj Sharma <pankj.sharma@samsung.com>
L: linux-can@vger.kernel.org L: linux-can@vger.kernel.org
S: Maintained S: Maintained
F: Documentation/devicetree/bindings/net/can/bosch,m_can.yaml F: Documentation/devicetree/bindings/net/can/bosch,m_can.yaml
@@ -11668,7 +11664,7 @@ F: drivers/media/platform/atmel/atmel-isi.h
MICROCHIP KSZ SERIES ETHERNET SWITCH DRIVER MICROCHIP KSZ SERIES ETHERNET SWITCH DRIVER
M: Woojung Huh <woojung.huh@microchip.com> M: Woojung Huh <woojung.huh@microchip.com>
M: Microchip Linux Driver Support <UNGLinuxDriver@microchip.com> M: UNGLinuxDriver@microchip.com
L: netdev@vger.kernel.org L: netdev@vger.kernel.org
S: Maintained S: Maintained
F: Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml F: Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml
@@ -11678,7 +11674,7 @@ F: net/dsa/tag_ksz.c
MICROCHIP LAN743X ETHERNET DRIVER MICROCHIP LAN743X ETHERNET DRIVER
M: Bryan Whitehead <bryan.whitehead@microchip.com> M: Bryan Whitehead <bryan.whitehead@microchip.com>
M: Microchip Linux Driver Support <UNGLinuxDriver@microchip.com> M: UNGLinuxDriver@microchip.com
L: netdev@vger.kernel.org L: netdev@vger.kernel.org
S: Maintained S: Maintained
F: drivers/net/ethernet/microchip/lan743x_* F: drivers/net/ethernet/microchip/lan743x_*
@@ -11772,7 +11768,7 @@ F: drivers/net/wireless/microchip/wilc1000/
MICROSEMI MIPS SOCS MICROSEMI MIPS SOCS
M: Alexandre Belloni <alexandre.belloni@bootlin.com> M: Alexandre Belloni <alexandre.belloni@bootlin.com>
M: Microchip Linux Driver Support <UNGLinuxDriver@microchip.com> M: UNGLinuxDriver@microchip.com
L: linux-mips@vger.kernel.org L: linux-mips@vger.kernel.org
S: Supported S: Supported
F: Documentation/devicetree/bindings/mips/mscc.txt F: Documentation/devicetree/bindings/mips/mscc.txt
@@ -12419,7 +12415,6 @@ F: tools/testing/selftests/net/ipsec.c
NETWORKING [IPv4/IPv6] NETWORKING [IPv4/IPv6]
M: "David S. Miller" <davem@davemloft.net> M: "David S. Miller" <davem@davemloft.net>
M: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
M: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org> M: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
L: netdev@vger.kernel.org L: netdev@vger.kernel.org
S: Maintained S: Maintained
@@ -12476,7 +12471,6 @@ F: net/ipv6/tcp*.c
NETWORKING [TLS] NETWORKING [TLS]
M: Boris Pismenny <borisp@nvidia.com> M: Boris Pismenny <borisp@nvidia.com>
M: Aviad Yehezkel <aviadye@nvidia.com>
M: John Fastabend <john.fastabend@gmail.com> M: John Fastabend <john.fastabend@gmail.com>
M: Daniel Borkmann <daniel@iogearbox.net> M: Daniel Borkmann <daniel@iogearbox.net>
M: Jakub Kicinski <kuba@kernel.org> M: Jakub Kicinski <kuba@kernel.org>
@@ -12826,10 +12820,10 @@ F: tools/objtool/
F: include/linux/objtool.h F: include/linux/objtool.h
OCELOT ETHERNET SWITCH DRIVER OCELOT ETHERNET SWITCH DRIVER
M: Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>
M: Vladimir Oltean <vladimir.oltean@nxp.com> M: Vladimir Oltean <vladimir.oltean@nxp.com>
M: Claudiu Manoil <claudiu.manoil@nxp.com> M: Claudiu Manoil <claudiu.manoil@nxp.com>
M: Alexandre Belloni <alexandre.belloni@bootlin.com> M: Alexandre Belloni <alexandre.belloni@bootlin.com>
M: UNGLinuxDriver@microchip.com
L: netdev@vger.kernel.org L: netdev@vger.kernel.org
S: Supported S: Supported
F: drivers/net/dsa/ocelot/* F: drivers/net/dsa/ocelot/*
@@ -12851,7 +12845,7 @@ F: include/misc/ocxl*
F: include/uapi/misc/ocxl.h F: include/uapi/misc/ocxl.h
OMAP AUDIO SUPPORT OMAP AUDIO SUPPORT
M: Peter Ujfalusi <peter.ujfalusi@ti.com> M: Peter Ujfalusi <peter.ujfalusi@gmail.com>
M: Jarkko Nikula <jarkko.nikula@bitmer.com> M: Jarkko Nikula <jarkko.nikula@bitmer.com>
L: alsa-devel@alsa-project.org (moderated for non-subscribers) L: alsa-devel@alsa-project.org (moderated for non-subscribers)
L: linux-omap@vger.kernel.org L: linux-omap@vger.kernel.org
@@ -13891,7 +13885,7 @@ F: drivers/platform/x86/peaq-wmi.c
PENSANDO ETHERNET DRIVERS PENSANDO ETHERNET DRIVERS
M: Shannon Nelson <snelson@pensando.io> M: Shannon Nelson <snelson@pensando.io>
M: Pensando Drivers <drivers@pensando.io> M: drivers@pensando.io
L: netdev@vger.kernel.org L: netdev@vger.kernel.org
S: Supported S: Supported
F: Documentation/networking/device_drivers/ethernet/pensando/ionic.rst F: Documentation/networking/device_drivers/ethernet/pensando/ionic.rst
@@ -14513,10 +14507,18 @@ S: Supported
F: drivers/crypto/qat/ F: drivers/crypto/qat/
QCOM AUDIO (ASoC) DRIVERS QCOM AUDIO (ASoC) DRIVERS
M: Patrick Lai <plai@codeaurora.org> M: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
M: Banajit Goswami <bgoswami@codeaurora.org> M: Banajit Goswami <bgoswami@codeaurora.org>
L: alsa-devel@alsa-project.org (moderated for non-subscribers) L: alsa-devel@alsa-project.org (moderated for non-subscribers)
S: Supported S: Supported
F: sound/soc/codecs/lpass-va-macro.c
F: sound/soc/codecs/lpass-wsa-macro.*
F: sound/soc/codecs/msm8916-wcd-analog.c
F: sound/soc/codecs/msm8916-wcd-digital.c
F: sound/soc/codecs/wcd9335.*
F: sound/soc/codecs/wcd934x.c
F: sound/soc/codecs/wcd-clsh-v2.*
F: sound/soc/codecs/wsa881x.c
F: sound/soc/qcom/ F: sound/soc/qcom/
QCOM IPA DRIVER QCOM IPA DRIVER
@@ -14670,7 +14672,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
F: drivers/net/wireless/ath/ath11k/ F: drivers/net/wireless/ath/ath11k/
QUALCOMM ATHEROS ATH9K WIRELESS DRIVER QUALCOMM ATHEROS ATH9K WIRELESS DRIVER
M: QCA ath9k Development <ath9k-devel@qca.qualcomm.com> M: ath9k-devel@qca.qualcomm.com
L: linux-wireless@vger.kernel.org L: linux-wireless@vger.kernel.org
S: Supported S: Supported
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath9k W: https://wireless.wiki.kernel.org/en/users/Drivers/ath9k
@@ -16322,6 +16324,7 @@ M: Pekka Enberg <penberg@kernel.org>
M: David Rientjes <rientjes@google.com> M: David Rientjes <rientjes@google.com>
M: Joonsoo Kim <iamjoonsoo.kim@lge.com> M: Joonsoo Kim <iamjoonsoo.kim@lge.com>
M: Andrew Morton <akpm@linux-foundation.org> M: Andrew Morton <akpm@linux-foundation.org>
M: Vlastimil Babka <vbabka@suse.cz>
L: linux-mm@kvack.org L: linux-mm@kvack.org
S: Maintained S: Maintained
F: include/linux/sl?b*.h F: include/linux/sl?b*.h
@@ -16711,6 +16714,8 @@ M: Samuel Thibault <samuel.thibault@ens-lyon.org>
L: speakup@linux-speakup.org L: speakup@linux-speakup.org
S: Odd Fixes S: Odd Fixes
W: http://www.linux-speakup.org/ W: http://www.linux-speakup.org/
W: https://github.com/linux-speakup/speakup
B: https://github.com/linux-speakup/speakup/issues
F: drivers/accessibility/speakup/ F: drivers/accessibility/speakup/
SPEAR CLOCK FRAMEWORK SUPPORT SPEAR CLOCK FRAMEWORK SUPPORT
@@ -16965,7 +16970,7 @@ M: Olivier Moysan <olivier.moysan@st.com>
M: Arnaud Pouliquen <arnaud.pouliquen@st.com> M: Arnaud Pouliquen <arnaud.pouliquen@st.com>
L: alsa-devel@alsa-project.org (moderated for non-subscribers) L: alsa-devel@alsa-project.org (moderated for non-subscribers)
S: Maintained S: Maintained
F: Documentation/devicetree/bindings/sound/st,stm32-*.txt F: Documentation/devicetree/bindings/iio/adc/st,stm32-*.yaml
F: sound/soc/stm/ F: sound/soc/stm/
STM32 TIMER/LPTIMER DRIVERS STM32 TIMER/LPTIMER DRIVERS
@@ -17542,7 +17547,7 @@ F: arch/xtensa/
F: drivers/irqchip/irq-xtensa-* F: drivers/irqchip/irq-xtensa-*
TEXAS INSTRUMENTS ASoC DRIVERS TEXAS INSTRUMENTS ASoC DRIVERS
M: Peter Ujfalusi <peter.ujfalusi@ti.com> M: Peter Ujfalusi <peter.ujfalusi@gmail.com>
L: alsa-devel@alsa-project.org (moderated for non-subscribers) L: alsa-devel@alsa-project.org (moderated for non-subscribers)
S: Maintained S: Maintained
F: sound/soc/ti/ F: sound/soc/ti/
@@ -17554,6 +17559,19 @@ S: Supported
F: Documentation/devicetree/bindings/iio/dac/ti,dac7612.txt F: Documentation/devicetree/bindings/iio/dac/ti,dac7612.txt
F: drivers/iio/dac/ti-dac7612.c F: drivers/iio/dac/ti-dac7612.c
TEXAS INSTRUMENTS DMA DRIVERS
M: Peter Ujfalusi <peter.ujfalusi@gmail.com>
L: dmaengine@vger.kernel.org
S: Maintained
F: Documentation/devicetree/bindings/dma/ti-dma-crossbar.txt
F: Documentation/devicetree/bindings/dma/ti-edma.txt
F: Documentation/devicetree/bindings/dma/ti/
F: drivers/dma/ti/
X: drivers/dma/ti/cppi41.c
F: include/linux/dma/k3-udma-glue.h
F: include/linux/dma/ti-cppi5.h
F: include/linux/dma/k3-psil.h
TEXAS INSTRUMENTS' SYSTEM CONTROL INTERFACE (TISCI) PROTOCOL DRIVER TEXAS INSTRUMENTS' SYSTEM CONTROL INTERFACE (TISCI) PROTOCOL DRIVER
M: Nishanth Menon <nm@ti.com> M: Nishanth Menon <nm@ti.com>
M: Tero Kristo <t-kristo@ti.com> M: Tero Kristo <t-kristo@ti.com>
@@ -17839,7 +17857,7 @@ F: Documentation/devicetree/bindings/net/nfc/trf7970a.txt
F: drivers/nfc/trf7970a.c F: drivers/nfc/trf7970a.c
TI TWL4030 SERIES SOC CODEC DRIVER TI TWL4030 SERIES SOC CODEC DRIVER
M: Peter Ujfalusi <peter.ujfalusi@ti.com> M: Peter Ujfalusi <peter.ujfalusi@gmail.com>
L: alsa-devel@alsa-project.org (moderated for non-subscribers) L: alsa-devel@alsa-project.org (moderated for non-subscribers)
S: Maintained S: Maintained
F: sound/soc/codecs/twl4030* F: sound/soc/codecs/twl4030*
@@ -18371,7 +18389,7 @@ F: include/linux/usb/isp116x.h
USB LAN78XX ETHERNET DRIVER USB LAN78XX ETHERNET DRIVER
M: Woojung Huh <woojung.huh@microchip.com> M: Woojung Huh <woojung.huh@microchip.com>
M: Microchip Linux Driver Support <UNGLinuxDriver@microchip.com> M: UNGLinuxDriver@microchip.com
L: netdev@vger.kernel.org L: netdev@vger.kernel.org
S: Maintained S: Maintained
F: Documentation/devicetree/bindings/net/microchip,lan78xx.txt F: Documentation/devicetree/bindings/net/microchip,lan78xx.txt
@@ -18405,7 +18423,7 @@ F: Documentation/usb/ohci.rst
F: drivers/usb/host/ohci* F: drivers/usb/host/ohci*
USB OTG FSM (Finite State Machine) USB OTG FSM (Finite State Machine)
M: Peter Chen <Peter.Chen@nxp.com> M: Peter Chen <peter.chen@kernel.org>
L: linux-usb@vger.kernel.org L: linux-usb@vger.kernel.org
S: Maintained S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git
@@ -18485,7 +18503,7 @@ F: drivers/net/usb/smsc75xx.*
USB SMSC95XX ETHERNET DRIVER USB SMSC95XX ETHERNET DRIVER
M: Steve Glendinning <steve.glendinning@shawell.net> M: Steve Glendinning <steve.glendinning@shawell.net>
M: Microchip Linux Driver Support <UNGLinuxDriver@microchip.com> M: UNGLinuxDriver@microchip.com
L: netdev@vger.kernel.org L: netdev@vger.kernel.org
S: Maintained S: Maintained
F: drivers/net/usb/smsc95xx.* F: drivers/net/usb/smsc95xx.*
@@ -19032,7 +19050,7 @@ F: drivers/input/mouse/vmmouse.h
VMWARE VMXNET3 ETHERNET DRIVER VMWARE VMXNET3 ETHERNET DRIVER
M: Ronak Doshi <doshir@vmware.com> M: Ronak Doshi <doshir@vmware.com>
M: "VMware, Inc." <pv-drivers@vmware.com> M: pv-drivers@vmware.com
L: netdev@vger.kernel.org L: netdev@vger.kernel.org
S: Maintained S: Maintained
F: drivers/net/vmxnet3/ F: drivers/net/vmxnet3/
@@ -19059,7 +19077,6 @@ K: regulator_get_optional
VRF VRF
M: David Ahern <dsahern@kernel.org> M: David Ahern <dsahern@kernel.org>
M: Shrijeet Mukherjee <shrijeet@gmail.com>
L: netdev@vger.kernel.org L: netdev@vger.kernel.org
S: Maintained S: Maintained
F: Documentation/networking/vrf.rst F: Documentation/networking/vrf.rst
@@ -19410,7 +19427,7 @@ F: drivers/net/ethernet/*/*/*xdp*
K: (?:\b|_)xdp(?:\b|_) K: (?:\b|_)xdp(?:\b|_)
XDP SOCKETS (AF_XDP) XDP SOCKETS (AF_XDP)
M: Björn Töpel <bjorn.topel@intel.com> M: Björn Töpel <bjorn@kernel.org>
M: Magnus Karlsson <magnus.karlsson@intel.com> M: Magnus Karlsson <magnus.karlsson@intel.com>
R: Jonathan Lemon <jonathan.lemon@gmail.com> R: Jonathan Lemon <jonathan.lemon@gmail.com>
L: netdev@vger.kernel.org L: netdev@vger.kernel.org
@@ -19506,7 +19523,7 @@ F: arch/x86/xen/*swiotlb*
F: drivers/xen/*swiotlb* F: drivers/xen/*swiotlb*
XFS FILESYSTEM XFS FILESYSTEM
M: Darrick J. Wong <darrick.wong@oracle.com> M: Darrick J. Wong <djwong@kernel.org>
M: linux-xfs@vger.kernel.org M: linux-xfs@vger.kernel.org
L: linux-xfs@vger.kernel.org L: linux-xfs@vger.kernel.org
S: Supported S: Supported

View File

@@ -2,7 +2,7 @@
VERSION = 5 VERSION = 5
PATCHLEVEL = 11 PATCHLEVEL = 11
SUBLEVEL = 0 SUBLEVEL = 0
EXTRAVERSION = -rc2 EXTRAVERSION = -rc5
NAME = Kleptomaniac Octopus NAME = Kleptomaniac Octopus
# *DOCUMENTATION* # *DOCUMENTATION*

View File

@@ -1105,6 +1105,12 @@ config HAVE_ARCH_PFN_VALID
config ARCH_SUPPORTS_DEBUG_PAGEALLOC config ARCH_SUPPORTS_DEBUG_PAGEALLOC
bool bool
config ARCH_SPLIT_ARG64
bool
help
If a 32-bit architecture requires 64-bit arguments to be split into
pairs of 32-bit arguments, select this option.
source "kernel/gcov/Kconfig" source "kernel/gcov/Kconfig"
source "scripts/gcc-plugins/Kconfig" source "scripts/gcc-plugins/Kconfig"

View File

@@ -102,16 +102,22 @@ libs-y += arch/arc/lib/ $(LIBGCC)
boot := arch/arc/boot boot := arch/arc/boot
#default target for make without any arguments. boot_targets := uImage.bin uImage.gz uImage.lzma
KBUILD_IMAGE := $(boot)/bootpImage
all: bootpImage
bootpImage: vmlinux
boot_targets += uImage uImage.bin uImage.gz
PHONY += $(boot_targets)
$(boot_targets): vmlinux $(boot_targets): vmlinux
$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
uimage-default-y := uImage.bin
uimage-default-$(CONFIG_KERNEL_GZIP) := uImage.gz
uimage-default-$(CONFIG_KERNEL_LZMA) := uImage.lzma
PHONY += uImage
uImage: $(uimage-default-y)
@ln -sf $< $(boot)/uImage
@$(kecho) ' Image $(boot)/uImage is ready'
CLEAN_FILES += $(boot)/uImage
archclean: archclean:
$(Q)$(MAKE) $(clean)=$(boot) $(Q)$(MAKE) $(clean)=$(boot)

View File

@@ -1,5 +1,4 @@
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
targets := vmlinux.bin vmlinux.bin.gz uImage
# uImage build relies on mkimage being availble on your host for ARC target # uImage build relies on mkimage being availble on your host for ARC target
# You will need to build u-boot for ARC, rename mkimage to arc-elf32-mkimage # You will need to build u-boot for ARC, rename mkimage to arc-elf32-mkimage
@@ -7,23 +6,18 @@ targets := vmlinux.bin vmlinux.bin.gz uImage
OBJCOPYFLAGS= -O binary -R .note -R .note.gnu.build-id -R .comment -S OBJCOPYFLAGS= -O binary -R .note -R .note.gnu.build-id -R .comment -S
LINUX_START_TEXT = $$(readelf -h vmlinux | \ LINUX_START_TEXT = $$($(READELF) -h vmlinux | \
grep "Entry point address" | grep -o 0x.*) grep "Entry point address" | grep -o 0x.*)
UIMAGE_LOADADDR = $(CONFIG_LINUX_LINK_BASE) UIMAGE_LOADADDR = $(CONFIG_LINUX_LINK_BASE)
UIMAGE_ENTRYADDR = $(LINUX_START_TEXT) UIMAGE_ENTRYADDR = $(LINUX_START_TEXT)
suffix-y := bin targets += vmlinux.bin
suffix-$(CONFIG_KERNEL_GZIP) := gz targets += vmlinux.bin.gz
suffix-$(CONFIG_KERNEL_LZMA) := lzma targets += vmlinux.bin.lzma
targets += uImage
targets += uImage.bin targets += uImage.bin
targets += uImage.gz targets += uImage.gz
targets += uImage.lzma targets += uImage.lzma
extra-y += vmlinux.bin
extra-y += vmlinux.bin.gz
extra-y += vmlinux.bin.lzma
$(obj)/vmlinux.bin: vmlinux FORCE $(obj)/vmlinux.bin: vmlinux FORCE
$(call if_changed,objcopy) $(call if_changed,objcopy)
@@ -42,7 +36,3 @@ $(obj)/uImage.gz: $(obj)/vmlinux.bin.gz FORCE
$(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma FORCE $(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma FORCE
$(call if_changed,uimage,lzma) $(call if_changed,uimage,lzma)
$(obj)/uImage: $(obj)/uImage.$(suffix-y)
@ln -sf $(notdir $<) $@
@echo ' Image $@ is ready'

View File

@@ -10,6 +10,7 @@
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#define clear_page(paddr) memset((paddr), 0, PAGE_SIZE) #define clear_page(paddr) memset((paddr), 0, PAGE_SIZE)
#define copy_user_page(to, from, vaddr, pg) copy_page(to, from)
#define copy_page(to, from) memcpy((to), (from), PAGE_SIZE) #define copy_page(to, from) memcpy((to), (from), PAGE_SIZE)
struct vm_area_struct; struct vm_area_struct;

View File

@@ -307,7 +307,7 @@ resume_user_mode_begin:
mov r0, sp ; pt_regs for arg to do_signal()/do_notify_resume() mov r0, sp ; pt_regs for arg to do_signal()/do_notify_resume()
GET_CURR_THR_INFO_FLAGS r9 GET_CURR_THR_INFO_FLAGS r9
and.f 0, r9, TIF_SIGPENDING|TIF_NOTIFY_SIGNAL and.f 0, r9, _TIF_SIGPENDING|_TIF_NOTIFY_SIGNAL
bz .Lchk_notify_resume bz .Lchk_notify_resume
; Normal Trap/IRQ entry only saves Scratch (caller-saved) regs ; Normal Trap/IRQ entry only saves Scratch (caller-saved) regs

View File

@@ -7,6 +7,7 @@ menuconfig ARC_SOC_HSDK
depends on ISA_ARCV2 depends on ISA_ARCV2
select ARC_HAS_ACCL_REGS select ARC_HAS_ACCL_REGS
select ARC_IRQ_NO_AUTOSAVE select ARC_IRQ_NO_AUTOSAVE
select ARC_FPU_SAVE_RESTORE
select CLK_HSDK select CLK_HSDK
select RESET_CONTROLLER select RESET_CONTROLLER
select RESET_HSDK select RESET_HSDK

View File

@@ -494,3 +494,11 @@
clock-names = "sysclk"; clock-names = "sysclk";
}; };
}; };
&aes1_target {
status = "disabled";
};
&aes2_target {
status = "disabled";
};

View File

@@ -45,18 +45,21 @@
emac: gem@30000 { emac: gem@30000 {
compatible = "cadence,gem"; compatible = "cadence,gem";
reg = <0x30000 0x10000>; reg = <0x30000 0x10000>;
interrupt-parent = <&vic0>;
interrupts = <31>; interrupts = <31>;
}; };
dmac1: dmac@40000 { dmac1: dmac@40000 {
compatible = "snps,dw-dmac"; compatible = "snps,dw-dmac";
reg = <0x40000 0x10000>; reg = <0x40000 0x10000>;
interrupt-parent = <&vic0>;
interrupts = <25>; interrupts = <25>;
}; };
dmac2: dmac@50000 { dmac2: dmac@50000 {
compatible = "snps,dw-dmac"; compatible = "snps,dw-dmac";
reg = <0x50000 0x10000>; reg = <0x50000 0x10000>;
interrupt-parent = <&vic0>;
interrupts = <26>; interrupts = <26>;
}; };
@@ -233,6 +236,7 @@
axi2pico@c0000000 { axi2pico@c0000000 {
compatible = "picochip,axi2pico-pc3x2"; compatible = "picochip,axi2pico-pc3x2";
reg = <0xc0000000 0x10000>; reg = <0xc0000000 0x10000>;
interrupt-parent = <&vic0>;
interrupts = <13 14 15 16 17 18 19 20 21>; interrupts = <13 14 15 16 17 18 19 20 21>;
}; };
}; };

View File

@@ -329,6 +329,7 @@
panel@0 { panel@0 {
compatible = "samsung,s6e63m0"; compatible = "samsung,s6e63m0";
reg = <0>; reg = <0>;
max-brightness = <15>;
vdd3-supply = <&panel_reg_3v0>; vdd3-supply = <&panel_reg_3v0>;
vci-supply = <&panel_reg_1v8>; vci-supply = <&panel_reg_1v8>;
reset-gpios = <&gpio4 11 GPIO_ACTIVE_LOW>; reset-gpios = <&gpio4 11 GPIO_ACTIVE_LOW>;

View File

@@ -279,6 +279,7 @@ CONFIG_SERIAL_OMAP_CONSOLE=y
CONFIG_SERIAL_DEV_BUS=y CONFIG_SERIAL_DEV_BUS=y
CONFIG_I2C_CHARDEV=y CONFIG_I2C_CHARDEV=y
CONFIG_SPI=y CONFIG_SPI=y
CONFIG_SPI_GPIO=m
CONFIG_SPI_OMAP24XX=y CONFIG_SPI_OMAP24XX=y
CONFIG_SPI_TI_QSPI=m CONFIG_SPI_TI_QSPI=m
CONFIG_HSI=m CONFIG_HSI=m
@@ -296,7 +297,6 @@ CONFIG_GPIO_TWL4030=y
CONFIG_W1=m CONFIG_W1=m
CONFIG_HDQ_MASTER_OMAP=m CONFIG_HDQ_MASTER_OMAP=m
CONFIG_W1_SLAVE_DS250X=m CONFIG_W1_SLAVE_DS250X=m
CONFIG_POWER_AVS=y
CONFIG_POWER_RESET=y CONFIG_POWER_RESET=y
CONFIG_POWER_RESET_GPIO=y CONFIG_POWER_RESET_GPIO=y
CONFIG_BATTERY_BQ27XXX=m CONFIG_BATTERY_BQ27XXX=m

View File

@@ -60,6 +60,7 @@ static void chacha_doneon(u32 *state, u8 *dst, const u8 *src,
chacha_block_xor_neon(state, d, s, nrounds); chacha_block_xor_neon(state, d, s, nrounds);
if (d != dst) if (d != dst)
memcpy(dst, buf, bytes); memcpy(dst, buf, bytes);
state[12]++;
} }
} }

View File

@@ -230,10 +230,12 @@ static int _omap_device_notifier_call(struct notifier_block *nb,
break; break;
case BUS_NOTIFY_BIND_DRIVER: case BUS_NOTIFY_BIND_DRIVER:
od = to_omap_device(pdev); od = to_omap_device(pdev);
if (od && (od->_state == OMAP_DEVICE_STATE_ENABLED) && if (od) {
pm_runtime_status_suspended(dev)) {
od->_driver_status = BUS_NOTIFY_BIND_DRIVER; od->_driver_status = BUS_NOTIFY_BIND_DRIVER;
pm_runtime_set_active(dev); if (od->_state == OMAP_DEVICE_STATE_ENABLED &&
pm_runtime_status_suspended(dev)) {
pm_runtime_set_active(dev);
}
} }
break; break;
case BUS_NOTIFY_ADD_DEVICE: case BUS_NOTIFY_ADD_DEVICE:

View File

@@ -71,7 +71,7 @@ static struct omap_voltdm_pmic omap_cpcap_iva = {
.vp_vstepmin = OMAP4_VP_VSTEPMIN_VSTEPMIN, .vp_vstepmin = OMAP4_VP_VSTEPMIN_VSTEPMIN,
.vp_vstepmax = OMAP4_VP_VSTEPMAX_VSTEPMAX, .vp_vstepmax = OMAP4_VP_VSTEPMAX_VSTEPMAX,
.vddmin = 900000, .vddmin = 900000,
.vddmax = 1350000, .vddmax = 1375000,
.vp_timeout_us = OMAP4_VP_VLIMITTO_TIMEOUT_US, .vp_timeout_us = OMAP4_VP_VLIMITTO_TIMEOUT_US,
.i2c_slave_addr = 0x44, .i2c_slave_addr = 0x44,
.volt_reg_addr = 0x0, .volt_reg_addr = 0x0,

View File

@@ -371,7 +371,7 @@ static int __init xen_guest_init(void)
} }
gnttab_init(); gnttab_init();
if (!xen_initial_domain()) if (!xen_initial_domain())
xenbus_probe(NULL); xenbus_probe();
/* /*
* Making sure board specific code will not set up ops for * Making sure board specific code will not set up ops for

View File

@@ -174,8 +174,6 @@ config ARM64
select HAVE_NMI select HAVE_NMI
select HAVE_PATA_PLATFORM select HAVE_PATA_PLATFORM
select HAVE_PERF_EVENTS select HAVE_PERF_EVENTS
select HAVE_PERF_EVENTS_NMI if ARM64_PSEUDO_NMI && HW_PERF_EVENTS
select HAVE_HARDLOCKUP_DETECTOR_PERF if PERF_EVENTS && HAVE_PERF_EVENTS_NMI
select HAVE_PERF_REGS select HAVE_PERF_REGS
select HAVE_PERF_USER_STACK_DUMP select HAVE_PERF_USER_STACK_DUMP
select HAVE_REGS_AND_STACK_ACCESS_API select HAVE_REGS_AND_STACK_ACCESS_API

View File

@@ -10,7 +10,7 @@
# #
# Copyright (C) 1995-2001 by Russell King # Copyright (C) 1995-2001 by Russell King
LDFLAGS_vmlinux :=--no-undefined -X -z norelro LDFLAGS_vmlinux :=--no-undefined -X
ifeq ($(CONFIG_RELOCATABLE), y) ifeq ($(CONFIG_RELOCATABLE), y)
# Pass --no-apply-dynamic-relocs to restore pre-binutils-2.27 behaviour # Pass --no-apply-dynamic-relocs to restore pre-binutils-2.27 behaviour
@@ -115,16 +115,20 @@ KBUILD_CPPFLAGS += -mbig-endian
CHECKFLAGS += -D__AARCH64EB__ CHECKFLAGS += -D__AARCH64EB__
# Prefer the baremetal ELF build target, but not all toolchains include # Prefer the baremetal ELF build target, but not all toolchains include
# it so fall back to the standard linux version if needed. # it so fall back to the standard linux version if needed.
KBUILD_LDFLAGS += -EB $(call ld-option, -maarch64elfb, -maarch64linuxb) KBUILD_LDFLAGS += -EB $(call ld-option, -maarch64elfb, -maarch64linuxb -z norelro)
UTS_MACHINE := aarch64_be UTS_MACHINE := aarch64_be
else else
KBUILD_CPPFLAGS += -mlittle-endian KBUILD_CPPFLAGS += -mlittle-endian
CHECKFLAGS += -D__AARCH64EL__ CHECKFLAGS += -D__AARCH64EL__
# Same as above, prefer ELF but fall back to linux target if needed. # Same as above, prefer ELF but fall back to linux target if needed.
KBUILD_LDFLAGS += -EL $(call ld-option, -maarch64elf, -maarch64linux) KBUILD_LDFLAGS += -EL $(call ld-option, -maarch64elf, -maarch64linux -z norelro)
UTS_MACHINE := aarch64 UTS_MACHINE := aarch64
endif endif
ifeq ($(CONFIG_LD_IS_LLD), y)
KBUILD_LDFLAGS += -z norelro
endif
CHECKFLAGS += -D__aarch64__ CHECKFLAGS += -D__aarch64__
ifeq ($(CONFIG_DYNAMIC_FTRACE_WITH_REGS),y) ifeq ($(CONFIG_DYNAMIC_FTRACE_WITH_REGS),y)

View File

@@ -127,7 +127,7 @@
compatible = "snps,dw-apb-gpio-port"; compatible = "snps,dw-apb-gpio-port";
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
snps,nr-gpios = <32>; ngpios = <32>;
reg = <0>; reg = <0>;
interrupt-controller; interrupt-controller;
#interrupt-cells = <2>; #interrupt-cells = <2>;
@@ -145,7 +145,7 @@
compatible = "snps,dw-apb-gpio-port"; compatible = "snps,dw-apb-gpio-port";
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
snps,nr-gpios = <32>; ngpios = <32>;
reg = <0>; reg = <0>;
interrupt-controller; interrupt-controller;
#interrupt-cells = <2>; #interrupt-cells = <2>;
@@ -163,7 +163,7 @@
compatible = "snps,dw-apb-gpio-port"; compatible = "snps,dw-apb-gpio-port";
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
snps,nr-gpios = <8>; ngpios = <8>;
reg = <0>; reg = <0>;
interrupt-controller; interrupt-controller;
#interrupt-cells = <2>; #interrupt-cells = <2>;

View File

@@ -17,7 +17,7 @@
#include <asm/lse.h> #include <asm/lse.h>
#define ATOMIC_OP(op) \ #define ATOMIC_OP(op) \
static inline void arch_##op(int i, atomic_t *v) \ static __always_inline void arch_##op(int i, atomic_t *v) \
{ \ { \
__lse_ll_sc_body(op, i, v); \ __lse_ll_sc_body(op, i, v); \
} }
@@ -32,7 +32,7 @@ ATOMIC_OP(atomic_sub)
#undef ATOMIC_OP #undef ATOMIC_OP
#define ATOMIC_FETCH_OP(name, op) \ #define ATOMIC_FETCH_OP(name, op) \
static inline int arch_##op##name(int i, atomic_t *v) \ static __always_inline int arch_##op##name(int i, atomic_t *v) \
{ \ { \
return __lse_ll_sc_body(op##name, i, v); \ return __lse_ll_sc_body(op##name, i, v); \
} }
@@ -56,7 +56,7 @@ ATOMIC_FETCH_OPS(atomic_sub_return)
#undef ATOMIC_FETCH_OPS #undef ATOMIC_FETCH_OPS
#define ATOMIC64_OP(op) \ #define ATOMIC64_OP(op) \
static inline void arch_##op(long i, atomic64_t *v) \ static __always_inline void arch_##op(long i, atomic64_t *v) \
{ \ { \
__lse_ll_sc_body(op, i, v); \ __lse_ll_sc_body(op, i, v); \
} }
@@ -71,7 +71,7 @@ ATOMIC64_OP(atomic64_sub)
#undef ATOMIC64_OP #undef ATOMIC64_OP
#define ATOMIC64_FETCH_OP(name, op) \ #define ATOMIC64_FETCH_OP(name, op) \
static inline long arch_##op##name(long i, atomic64_t *v) \ static __always_inline long arch_##op##name(long i, atomic64_t *v) \
{ \ { \
return __lse_ll_sc_body(op##name, i, v); \ return __lse_ll_sc_body(op##name, i, v); \
} }
@@ -94,7 +94,7 @@ ATOMIC64_FETCH_OPS(atomic64_sub_return)
#undef ATOMIC64_FETCH_OP #undef ATOMIC64_FETCH_OP
#undef ATOMIC64_FETCH_OPS #undef ATOMIC64_FETCH_OPS
static inline long arch_atomic64_dec_if_positive(atomic64_t *v) static __always_inline long arch_atomic64_dec_if_positive(atomic64_t *v)
{ {
return __lse_ll_sc_body(atomic64_dec_if_positive, v); return __lse_ll_sc_body(atomic64_dec_if_positive, v);
} }

View File

@@ -17,6 +17,7 @@
#include <linux/jump_label.h> #include <linux/jump_label.h>
#include <linux/kvm_types.h> #include <linux/kvm_types.h>
#include <linux/percpu.h> #include <linux/percpu.h>
#include <linux/psci.h>
#include <asm/arch_gicv3.h> #include <asm/arch_gicv3.h>
#include <asm/barrier.h> #include <asm/barrier.h>
#include <asm/cpufeature.h> #include <asm/cpufeature.h>
@@ -240,6 +241,28 @@ struct kvm_host_data {
struct kvm_pmu_events pmu_events; struct kvm_pmu_events pmu_events;
}; };
struct kvm_host_psci_config {
/* PSCI version used by host. */
u32 version;
/* Function IDs used by host if version is v0.1. */
struct psci_0_1_function_ids function_ids_0_1;
bool psci_0_1_cpu_suspend_implemented;
bool psci_0_1_cpu_on_implemented;
bool psci_0_1_cpu_off_implemented;
bool psci_0_1_migrate_implemented;
};
extern struct kvm_host_psci_config kvm_nvhe_sym(kvm_host_psci_config);
#define kvm_host_psci_config CHOOSE_NVHE_SYM(kvm_host_psci_config)
extern s64 kvm_nvhe_sym(hyp_physvirt_offset);
#define hyp_physvirt_offset CHOOSE_NVHE_SYM(hyp_physvirt_offset)
extern u64 kvm_nvhe_sym(hyp_cpu_logical_map)[NR_CPUS];
#define hyp_cpu_logical_map CHOOSE_NVHE_SYM(hyp_cpu_logical_map)
struct vcpu_reset_state { struct vcpu_reset_state {
unsigned long pc; unsigned long pc;
unsigned long r0; unsigned long r0;

View File

@@ -176,10 +176,21 @@ static inline void __uaccess_enable_hw_pan(void)
* The Tag check override (TCO) bit disables temporarily the tag checking * The Tag check override (TCO) bit disables temporarily the tag checking
* preventing the issue. * preventing the issue.
*/ */
static inline void uaccess_disable_privileged(void) static inline void __uaccess_disable_tco(void)
{ {
asm volatile(ALTERNATIVE("nop", SET_PSTATE_TCO(0), asm volatile(ALTERNATIVE("nop", SET_PSTATE_TCO(0),
ARM64_MTE, CONFIG_KASAN_HW_TAGS)); ARM64_MTE, CONFIG_KASAN_HW_TAGS));
}
static inline void __uaccess_enable_tco(void)
{
asm volatile(ALTERNATIVE("nop", SET_PSTATE_TCO(1),
ARM64_MTE, CONFIG_KASAN_HW_TAGS));
}
static inline void uaccess_disable_privileged(void)
{
__uaccess_disable_tco();
if (uaccess_ttbr0_disable()) if (uaccess_ttbr0_disable())
return; return;
@@ -189,8 +200,7 @@ static inline void uaccess_disable_privileged(void)
static inline void uaccess_enable_privileged(void) static inline void uaccess_enable_privileged(void)
{ {
asm volatile(ALTERNATIVE("nop", SET_PSTATE_TCO(1), __uaccess_enable_tco();
ARM64_MTE, CONFIG_KASAN_HW_TAGS));
if (uaccess_ttbr0_enable()) if (uaccess_ttbr0_enable())
return; return;

View File

@@ -75,7 +75,7 @@ int main(void)
DEFINE(S_SDEI_TTBR1, offsetof(struct pt_regs, sdei_ttbr1)); DEFINE(S_SDEI_TTBR1, offsetof(struct pt_regs, sdei_ttbr1));
DEFINE(S_PMR_SAVE, offsetof(struct pt_regs, pmr_save)); DEFINE(S_PMR_SAVE, offsetof(struct pt_regs, pmr_save));
DEFINE(S_STACKFRAME, offsetof(struct pt_regs, stackframe)); DEFINE(S_STACKFRAME, offsetof(struct pt_regs, stackframe));
DEFINE(S_FRAME_SIZE, sizeof(struct pt_regs)); DEFINE(PT_REGS_SIZE, sizeof(struct pt_regs));
BLANK(); BLANK();
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
DEFINE(COMPAT_SIGFRAME_REGS_OFFSET, offsetof(struct compat_sigframe, uc.uc_mcontext.arm_r0)); DEFINE(COMPAT_SIGFRAME_REGS_OFFSET, offsetof(struct compat_sigframe, uc.uc_mcontext.arm_r0));

View File

@@ -2568,7 +2568,7 @@ static void verify_hyp_capabilities(void)
int parange, ipa_max; int parange, ipa_max;
unsigned int safe_vmid_bits, vmid_bits; unsigned int safe_vmid_bits, vmid_bits;
if (!IS_ENABLED(CONFIG_KVM) || !IS_ENABLED(CONFIG_KVM_ARM_HOST)) if (!IS_ENABLED(CONFIG_KVM))
return; return;
safe_mmfr1 = read_sanitised_ftr_reg(SYS_ID_AA64MMFR1_EL1); safe_mmfr1 = read_sanitised_ftr_reg(SYS_ID_AA64MMFR1_EL1);

View File

@@ -35,7 +35,7 @@
*/ */
.macro ftrace_regs_entry, allregs=0 .macro ftrace_regs_entry, allregs=0
/* Make room for pt_regs, plus a callee frame */ /* Make room for pt_regs, plus a callee frame */
sub sp, sp, #(S_FRAME_SIZE + 16) sub sp, sp, #(PT_REGS_SIZE + 16)
/* Save function arguments (and x9 for simplicity) */ /* Save function arguments (and x9 for simplicity) */
stp x0, x1, [sp, #S_X0] stp x0, x1, [sp, #S_X0]
@@ -61,15 +61,15 @@
.endif .endif
/* Save the callsite's SP and LR */ /* Save the callsite's SP and LR */
add x10, sp, #(S_FRAME_SIZE + 16) add x10, sp, #(PT_REGS_SIZE + 16)
stp x9, x10, [sp, #S_LR] stp x9, x10, [sp, #S_LR]
/* Save the PC after the ftrace callsite */ /* Save the PC after the ftrace callsite */
str x30, [sp, #S_PC] str x30, [sp, #S_PC]
/* Create a frame record for the callsite above pt_regs */ /* Create a frame record for the callsite above pt_regs */
stp x29, x9, [sp, #S_FRAME_SIZE] stp x29, x9, [sp, #PT_REGS_SIZE]
add x29, sp, #S_FRAME_SIZE add x29, sp, #PT_REGS_SIZE
/* Create our frame record within pt_regs. */ /* Create our frame record within pt_regs. */
stp x29, x30, [sp, #S_STACKFRAME] stp x29, x30, [sp, #S_STACKFRAME]
@@ -120,7 +120,7 @@ ftrace_common_return:
ldr x9, [sp, #S_PC] ldr x9, [sp, #S_PC]
/* Restore the callsite's SP */ /* Restore the callsite's SP */
add sp, sp, #S_FRAME_SIZE + 16 add sp, sp, #PT_REGS_SIZE + 16
ret x9 ret x9
SYM_CODE_END(ftrace_common) SYM_CODE_END(ftrace_common)
@@ -130,7 +130,7 @@ SYM_CODE_START(ftrace_graph_caller)
ldr x0, [sp, #S_PC] ldr x0, [sp, #S_PC]
sub x0, x0, #AARCH64_INSN_SIZE // ip (callsite's BL insn) sub x0, x0, #AARCH64_INSN_SIZE // ip (callsite's BL insn)
add x1, sp, #S_LR // parent_ip (callsite's LR) add x1, sp, #S_LR // parent_ip (callsite's LR)
ldr x2, [sp, #S_FRAME_SIZE] // parent fp (callsite's FP) ldr x2, [sp, #PT_REGS_SIZE] // parent fp (callsite's FP)
bl prepare_ftrace_return bl prepare_ftrace_return
b ftrace_common_return b ftrace_common_return
SYM_CODE_END(ftrace_graph_caller) SYM_CODE_END(ftrace_graph_caller)

View File

@@ -75,7 +75,7 @@ alternative_else_nop_endif
.endif .endif
#endif #endif
sub sp, sp, #S_FRAME_SIZE sub sp, sp, #PT_REGS_SIZE
#ifdef CONFIG_VMAP_STACK #ifdef CONFIG_VMAP_STACK
/* /*
* Test whether the SP has overflowed, without corrupting a GPR. * Test whether the SP has overflowed, without corrupting a GPR.
@@ -96,7 +96,7 @@ alternative_else_nop_endif
* userspace, and can clobber EL0 registers to free up GPRs. * userspace, and can clobber EL0 registers to free up GPRs.
*/ */
/* Stash the original SP (minus S_FRAME_SIZE) in tpidr_el0. */ /* Stash the original SP (minus PT_REGS_SIZE) in tpidr_el0. */
msr tpidr_el0, x0 msr tpidr_el0, x0
/* Recover the original x0 value and stash it in tpidrro_el0 */ /* Recover the original x0 value and stash it in tpidrro_el0 */
@@ -182,7 +182,6 @@ alternative_else_nop_endif
mrs_s \tmp2, SYS_GCR_EL1 mrs_s \tmp2, SYS_GCR_EL1
bfi \tmp2, \tmp, #0, #16 bfi \tmp2, \tmp, #0, #16
msr_s SYS_GCR_EL1, \tmp2 msr_s SYS_GCR_EL1, \tmp2
isb
#endif #endif
.endm .endm
@@ -194,6 +193,7 @@ alternative_else_nop_endif
ldr_l \tmp, gcr_kernel_excl ldr_l \tmp, gcr_kernel_excl
mte_set_gcr \tmp, \tmp2 mte_set_gcr \tmp, \tmp2
isb
1: 1:
#endif #endif
.endm .endm
@@ -253,7 +253,7 @@ alternative_else_nop_endif
scs_load tsk, x20 scs_load tsk, x20
.else .else
add x21, sp, #S_FRAME_SIZE add x21, sp, #PT_REGS_SIZE
get_current_task tsk get_current_task tsk
.endif /* \el == 0 */ .endif /* \el == 0 */
mrs x22, elr_el1 mrs x22, elr_el1
@@ -377,7 +377,7 @@ alternative_else_nop_endif
ldp x26, x27, [sp, #16 * 13] ldp x26, x27, [sp, #16 * 13]
ldp x28, x29, [sp, #16 * 14] ldp x28, x29, [sp, #16 * 14]
ldr lr, [sp, #S_LR] ldr lr, [sp, #S_LR]
add sp, sp, #S_FRAME_SIZE // restore sp add sp, sp, #PT_REGS_SIZE // restore sp
.if \el == 0 .if \el == 0
alternative_insn eret, nop, ARM64_UNMAP_KERNEL_AT_EL0 alternative_insn eret, nop, ARM64_UNMAP_KERNEL_AT_EL0
@@ -580,12 +580,12 @@ __bad_stack:
/* /*
* Store the original GPRs to the new stack. The orginal SP (minus * Store the original GPRs to the new stack. The orginal SP (minus
* S_FRAME_SIZE) was stashed in tpidr_el0 by kernel_ventry. * PT_REGS_SIZE) was stashed in tpidr_el0 by kernel_ventry.
*/ */
sub sp, sp, #S_FRAME_SIZE sub sp, sp, #PT_REGS_SIZE
kernel_entry 1 kernel_entry 1
mrs x0, tpidr_el0 mrs x0, tpidr_el0
add x0, x0, #S_FRAME_SIZE add x0, x0, #PT_REGS_SIZE
str x0, [sp, #S_SP] str x0, [sp, #S_SP]
/* Stash the regs for handle_bad_stack */ /* Stash the regs for handle_bad_stack */

View File

@@ -23,8 +23,6 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/sched_clock.h> #include <linux/sched_clock.h>
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/nmi.h>
#include <linux/cpufreq.h>
/* ARMv8 Cortex-A53 specific event types. */ /* ARMv8 Cortex-A53 specific event types. */
#define ARMV8_A53_PERFCTR_PREF_LINEFILL 0xC2 #define ARMV8_A53_PERFCTR_PREF_LINEFILL 0xC2
@@ -1250,21 +1248,10 @@ static struct platform_driver armv8_pmu_driver = {
static int __init armv8_pmu_driver_init(void) static int __init armv8_pmu_driver_init(void)
{ {
int ret;
if (acpi_disabled) if (acpi_disabled)
ret = platform_driver_register(&armv8_pmu_driver); return platform_driver_register(&armv8_pmu_driver);
else else
ret = arm_pmu_acpi_probe(armv8_pmuv3_init); return arm_pmu_acpi_probe(armv8_pmuv3_init);
/*
* Try to re-initialize lockup detector after PMU init in
* case PMU events are triggered via NMIs.
*/
if (ret == 0 && arm_pmu_irq_is_nmi())
lockup_detector_init();
return ret;
} }
device_initcall(armv8_pmu_driver_init) device_initcall(armv8_pmu_driver_init)
@@ -1322,27 +1309,3 @@ void arch_perf_update_userpage(struct perf_event *event,
userpg->cap_user_time_zero = 1; userpg->cap_user_time_zero = 1;
userpg->cap_user_time_short = 1; userpg->cap_user_time_short = 1;
} }
#ifdef CONFIG_HARDLOCKUP_DETECTOR_PERF
/*
* Safe maximum CPU frequency in case a particular platform doesn't implement
* cpufreq driver. Although, architecture doesn't put any restrictions on
* maximum frequency but 5 GHz seems to be safe maximum given the available
* Arm CPUs in the market which are clocked much less than 5 GHz. On the other
* hand, we can't make it much higher as it would lead to a large hard-lockup
* detection timeout on parts which are running slower (eg. 1GHz on
* Developerbox) and doesn't possess a cpufreq driver.
*/
#define SAFE_MAX_CPU_FREQ 5000000000UL // 5 GHz
u64 hw_nmi_get_sample_period(int watchdog_thresh)
{
unsigned int cpu = smp_processor_id();
unsigned long max_cpu_freq;
max_cpu_freq = cpufreq_get_hw_max_freq(cpu) * 1000UL;
if (!max_cpu_freq)
max_cpu_freq = SAFE_MAX_CPU_FREQ;
return (u64)max_cpu_freq * watchdog_thresh;
}
#endif

View File

@@ -352,8 +352,8 @@ kprobe_breakpoint_ss_handler(struct pt_regs *regs, unsigned int esr)
unsigned long addr = instruction_pointer(regs); unsigned long addr = instruction_pointer(regs);
struct kprobe *cur = kprobe_running(); struct kprobe *cur = kprobe_running();
if (cur && (kcb->kprobe_status == KPROBE_HIT_SS) if (cur && (kcb->kprobe_status & (KPROBE_HIT_SS | KPROBE_REENTER)) &&
&& ((unsigned long)&cur->ainsn.api.insn[1] == addr)) { ((unsigned long)&cur->ainsn.api.insn[1] == addr)) {
kprobes_restore_local_irqflag(kcb, regs); kprobes_restore_local_irqflag(kcb, regs);
post_kprobe_handler(cur, kcb, regs); post_kprobe_handler(cur, kcb, regs);

View File

@@ -25,7 +25,7 @@
stp x24, x25, [sp, #S_X24] stp x24, x25, [sp, #S_X24]
stp x26, x27, [sp, #S_X26] stp x26, x27, [sp, #S_X26]
stp x28, x29, [sp, #S_X28] stp x28, x29, [sp, #S_X28]
add x0, sp, #S_FRAME_SIZE add x0, sp, #PT_REGS_SIZE
stp lr, x0, [sp, #S_LR] stp lr, x0, [sp, #S_LR]
/* /*
* Construct a useful saved PSTATE * Construct a useful saved PSTATE
@@ -62,7 +62,7 @@
.endm .endm
SYM_CODE_START(kretprobe_trampoline) SYM_CODE_START(kretprobe_trampoline)
sub sp, sp, #S_FRAME_SIZE sub sp, sp, #PT_REGS_SIZE
save_all_base_regs save_all_base_regs
@@ -76,7 +76,7 @@ SYM_CODE_START(kretprobe_trampoline)
restore_all_base_regs restore_all_base_regs
add sp, sp, #S_FRAME_SIZE add sp, sp, #PT_REGS_SIZE
ret ret
SYM_CODE_END(kretprobe_trampoline) SYM_CODE_END(kretprobe_trampoline)

View File

@@ -914,13 +914,6 @@ static void do_signal(struct pt_regs *regs)
asmlinkage void do_notify_resume(struct pt_regs *regs, asmlinkage void do_notify_resume(struct pt_regs *regs,
unsigned long thread_flags) unsigned long thread_flags)
{ {
/*
* The assembly code enters us with IRQs off, but it hasn't
* informed the tracing code of that for efficiency reasons.
* Update the trace code with the current status.
*/
trace_hardirqs_off();
do { do {
if (thread_flags & _TIF_NEED_RESCHED) { if (thread_flags & _TIF_NEED_RESCHED) {
/* Unmask Debug and SError for the next task */ /* Unmask Debug and SError for the next task */

View File

@@ -434,7 +434,7 @@ static void __init hyp_mode_check(void)
"CPU: CPUs started in inconsistent modes"); "CPU: CPUs started in inconsistent modes");
else else
pr_info("CPU: All CPU(s) started at EL1\n"); pr_info("CPU: All CPU(s) started at EL1\n");
if (IS_ENABLED(CONFIG_KVM)) if (IS_ENABLED(CONFIG_KVM) && !is_kernel_in_hyp_mode())
kvm_compute_layout(); kvm_compute_layout();
} }
@@ -807,7 +807,6 @@ int arch_show_interrupts(struct seq_file *p, int prec)
unsigned int cpu, i; unsigned int cpu, i;
for (i = 0; i < NR_IPI; i++) { for (i = 0; i < NR_IPI; i++) {
unsigned int irq = irq_desc_get_irq(ipi_desc[i]);
seq_printf(p, "%*s%u:%s", prec - 1, "IPI", i, seq_printf(p, "%*s%u:%s", prec - 1, "IPI", i,
prec >= 4 ? " " : ""); prec >= 4 ? " " : "");
for_each_online_cpu(cpu) for_each_online_cpu(cpu)

View File

@@ -9,6 +9,7 @@
#include <asm/daifflags.h> #include <asm/daifflags.h>
#include <asm/debug-monitors.h> #include <asm/debug-monitors.h>
#include <asm/exception.h>
#include <asm/fpsimd.h> #include <asm/fpsimd.h>
#include <asm/syscall.h> #include <asm/syscall.h>
#include <asm/thread_info.h> #include <asm/thread_info.h>
@@ -165,15 +166,8 @@ static void el0_svc_common(struct pt_regs *regs, int scno, int sc_nr,
if (!has_syscall_work(flags) && !IS_ENABLED(CONFIG_DEBUG_RSEQ)) { if (!has_syscall_work(flags) && !IS_ENABLED(CONFIG_DEBUG_RSEQ)) {
local_daif_mask(); local_daif_mask();
flags = current_thread_info()->flags; flags = current_thread_info()->flags;
if (!has_syscall_work(flags) && !(flags & _TIF_SINGLESTEP)) { if (!has_syscall_work(flags) && !(flags & _TIF_SINGLESTEP))
/*
* We're off to userspace, where interrupts are
* always enabled after we restore the flags from
* the SPSR.
*/
trace_hardirqs_on();
return; return;
}
local_daif_restore(DAIF_PROCCTX); local_daif_restore(DAIF_PROCCTX);
} }

View File

@@ -42,7 +42,6 @@
#include <asm/smp.h> #include <asm/smp.h>
#include <asm/stack_pointer.h> #include <asm/stack_pointer.h>
#include <asm/stacktrace.h> #include <asm/stacktrace.h>
#include <asm/exception.h>
#include <asm/system_misc.h> #include <asm/system_misc.h>
#include <asm/sysreg.h> #include <asm/sysreg.h>

View File

@@ -24,8 +24,7 @@ btildflags-$(CONFIG_ARM64_BTI_KERNEL) += -z force-bti
# routines, as x86 does (see 6f121e548f83 ("x86, vdso: Reimplement vdso.so # routines, as x86 does (see 6f121e548f83 ("x86, vdso: Reimplement vdso.so
# preparation in build-time C")). # preparation in build-time C")).
ldflags-y := -shared -nostdlib -soname=linux-vdso.so.1 --hash-style=sysv \ ldflags-y := -shared -nostdlib -soname=linux-vdso.so.1 --hash-style=sysv \
-Bsymbolic $(call ld-option, --no-eh-frame-hdr) --build-id=sha1 -n \ -Bsymbolic --build-id=sha1 -n $(btildflags-y) -T
$(btildflags-y) -T
ccflags-y := -fno-common -fno-builtin -fno-stack-protector -ffixed-x18 ccflags-y := -fno-common -fno-builtin -fno-stack-protector -ffixed-x18
ccflags-y += -DDISABLE_BRANCH_PROFILING -DBUILD_VDSO ccflags-y += -DDISABLE_BRANCH_PROFILING -DBUILD_VDSO

View File

@@ -40,9 +40,6 @@ SECTIONS
PROVIDE (_etext = .); PROVIDE (_etext = .);
PROVIDE (etext = .); PROVIDE (etext = .);
.eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr
.eh_frame : { KEEP (*(.eh_frame)) } :text
.dynamic : { *(.dynamic) } :text :dynamic .dynamic : { *(.dynamic) } :text :dynamic
.rodata : { *(.rodata*) } :text .rodata : { *(.rodata*) } :text
@@ -54,6 +51,7 @@ SECTIONS
*(.note.GNU-stack) *(.note.GNU-stack)
*(.data .data.* .gnu.linkonce.d.* .sdata*) *(.data .data.* .gnu.linkonce.d.* .sdata*)
*(.bss .sbss .dynbss .dynsbss) *(.bss .sbss .dynbss .dynsbss)
*(.eh_frame .eh_frame_hdr)
} }
} }
@@ -66,7 +64,6 @@ PHDRS
text PT_LOAD FLAGS(5) FILEHDR PHDRS; /* PF_R|PF_X */ text PT_LOAD FLAGS(5) FILEHDR PHDRS; /* PF_R|PF_X */
dynamic PT_DYNAMIC FLAGS(4); /* PF_R */ dynamic PT_DYNAMIC FLAGS(4); /* PF_R */
note PT_NOTE FLAGS(4); /* PF_R */ note PT_NOTE FLAGS(4); /* PF_R */
eh_frame_hdr PT_GNU_EH_FRAME;
} }
/* /*

View File

@@ -49,14 +49,6 @@ if KVM
source "virt/kvm/Kconfig" source "virt/kvm/Kconfig"
config KVM_ARM_PMU
bool "Virtual Performance Monitoring Unit (PMU) support"
depends on HW_PERF_EVENTS
default y
help
Adds support for a virtual Performance Monitoring Unit (PMU) in
virtual machines.
endif # KVM endif # KVM
endif # VIRTUALIZATION endif # VIRTUALIZATION

View File

@@ -24,4 +24,4 @@ kvm-y := $(KVM)/kvm_main.o $(KVM)/coalesced_mmio.o $(KVM)/eventfd.o \
vgic/vgic-mmio-v3.o vgic/vgic-kvm-device.o \ vgic/vgic-mmio-v3.o vgic/vgic-kvm-device.o \
vgic/vgic-its.o vgic/vgic-debug.o vgic/vgic-its.o vgic/vgic-debug.o
kvm-$(CONFIG_KVM_ARM_PMU) += pmu-emul.o kvm-$(CONFIG_HW_PERF_EVENTS) += pmu-emul.o

View File

@@ -1129,9 +1129,10 @@ int kvm_timer_enable(struct kvm_vcpu *vcpu)
if (!irqchip_in_kernel(vcpu->kvm)) if (!irqchip_in_kernel(vcpu->kvm))
goto no_vgic; goto no_vgic;
if (!vgic_initialized(vcpu->kvm)) /*
return -ENODEV; * At this stage, we have the guarantee that the vgic is both
* available and initialized.
*/
if (!timer_irqs_are_valid(vcpu)) { if (!timer_irqs_are_valid(vcpu)) {
kvm_debug("incorrectly configured timer irqs\n"); kvm_debug("incorrectly configured timer irqs\n");
return -EINVAL; return -EINVAL;

View File

@@ -65,10 +65,6 @@ static bool vgic_present;
static DEFINE_PER_CPU(unsigned char, kvm_arm_hardware_enabled); static DEFINE_PER_CPU(unsigned char, kvm_arm_hardware_enabled);
DEFINE_STATIC_KEY_FALSE(userspace_irqchip_in_use); DEFINE_STATIC_KEY_FALSE(userspace_irqchip_in_use);
extern u64 kvm_nvhe_sym(__cpu_logical_map)[NR_CPUS];
extern u32 kvm_nvhe_sym(kvm_host_psci_version);
extern struct psci_0_1_function_ids kvm_nvhe_sym(kvm_host_psci_0_1_function_ids);
int kvm_arch_vcpu_should_kick(struct kvm_vcpu *vcpu) int kvm_arch_vcpu_should_kick(struct kvm_vcpu *vcpu)
{ {
return kvm_vcpu_exiting_guest_mode(vcpu) == IN_GUEST_MODE; return kvm_vcpu_exiting_guest_mode(vcpu) == IN_GUEST_MODE;
@@ -584,11 +580,9 @@ static int kvm_vcpu_first_run_init(struct kvm_vcpu *vcpu)
* Map the VGIC hardware resources before running a vcpu the * Map the VGIC hardware resources before running a vcpu the
* first time on this VM. * first time on this VM.
*/ */
if (unlikely(!vgic_ready(kvm))) { ret = kvm_vgic_map_resources(kvm);
ret = kvm_vgic_map_resources(kvm); if (ret)
if (ret) return ret;
return ret;
}
} else { } else {
/* /*
* Tell the rest of the code that there are userspace irqchip * Tell the rest of the code that there are userspace irqchip
@@ -1574,12 +1568,12 @@ static struct notifier_block hyp_init_cpu_pm_nb = {
.notifier_call = hyp_init_cpu_pm_notifier, .notifier_call = hyp_init_cpu_pm_notifier,
}; };
static void __init hyp_cpu_pm_init(void) static void hyp_cpu_pm_init(void)
{ {
if (!is_protected_kvm_enabled()) if (!is_protected_kvm_enabled())
cpu_pm_register_notifier(&hyp_init_cpu_pm_nb); cpu_pm_register_notifier(&hyp_init_cpu_pm_nb);
} }
static void __init hyp_cpu_pm_exit(void) static void hyp_cpu_pm_exit(void)
{ {
if (!is_protected_kvm_enabled()) if (!is_protected_kvm_enabled())
cpu_pm_unregister_notifier(&hyp_init_cpu_pm_nb); cpu_pm_unregister_notifier(&hyp_init_cpu_pm_nb);
@@ -1604,9 +1598,12 @@ static void init_cpu_logical_map(void)
* allow any other CPUs from the `possible` set to boot. * allow any other CPUs from the `possible` set to boot.
*/ */
for_each_online_cpu(cpu) for_each_online_cpu(cpu)
kvm_nvhe_sym(__cpu_logical_map)[cpu] = cpu_logical_map(cpu); hyp_cpu_logical_map[cpu] = cpu_logical_map(cpu);
} }
#define init_psci_0_1_impl_state(config, what) \
config.psci_0_1_ ## what ## _implemented = psci_ops.what
static bool init_psci_relay(void) static bool init_psci_relay(void)
{ {
/* /*
@@ -1618,8 +1615,15 @@ static bool init_psci_relay(void)
return false; return false;
} }
kvm_nvhe_sym(kvm_host_psci_version) = psci_ops.get_version(); kvm_host_psci_config.version = psci_ops.get_version();
kvm_nvhe_sym(kvm_host_psci_0_1_function_ids) = get_psci_0_1_function_ids();
if (kvm_host_psci_config.version == PSCI_VERSION(0, 1)) {
kvm_host_psci_config.function_ids_0_1 = get_psci_0_1_function_ids();
init_psci_0_1_impl_state(kvm_host_psci_config, cpu_suspend);
init_psci_0_1_impl_state(kvm_host_psci_config, cpu_on);
init_psci_0_1_impl_state(kvm_host_psci_config, cpu_off);
init_psci_0_1_impl_state(kvm_host_psci_config, migrate);
}
return true; return true;
} }

View File

@@ -59,4 +59,13 @@ static inline void __adjust_pc(struct kvm_vcpu *vcpu)
} }
} }
/*
* Skip an instruction while host sysregs are live.
* Assumes host is always 64-bit.
*/
static inline void kvm_skip_host_instr(void)
{
write_sysreg_el2(read_sysreg_el2(SYS_ELR) + 4, SYS_ELR);
}
#endif #endif

View File

@@ -157,11 +157,6 @@ static void default_host_smc_handler(struct kvm_cpu_context *host_ctxt)
__kvm_hyp_host_forward_smc(host_ctxt); __kvm_hyp_host_forward_smc(host_ctxt);
} }
static void skip_host_instruction(void)
{
write_sysreg_el2(read_sysreg_el2(SYS_ELR) + 4, SYS_ELR);
}
static void handle_host_smc(struct kvm_cpu_context *host_ctxt) static void handle_host_smc(struct kvm_cpu_context *host_ctxt)
{ {
bool handled; bool handled;
@@ -170,11 +165,8 @@ static void handle_host_smc(struct kvm_cpu_context *host_ctxt)
if (!handled) if (!handled)
default_host_smc_handler(host_ctxt); default_host_smc_handler(host_ctxt);
/* /* SMC was trapped, move ELR past the current PC. */
* Unlike HVC, the return address of an SMC is the instruction's PC. kvm_skip_host_instr();
* Move the return address past the instruction.
*/
skip_host_instruction();
} }
void handle_trap(struct kvm_cpu_context *host_ctxt) void handle_trap(struct kvm_cpu_context *host_ctxt)

View File

@@ -14,14 +14,14 @@
* Other CPUs should not be allowed to boot because their features were * Other CPUs should not be allowed to boot because their features were
* not checked against the finalized system capabilities. * not checked against the finalized system capabilities.
*/ */
u64 __ro_after_init __cpu_logical_map[NR_CPUS] = { [0 ... NR_CPUS-1] = INVALID_HWID }; u64 __ro_after_init hyp_cpu_logical_map[NR_CPUS] = { [0 ... NR_CPUS-1] = INVALID_HWID };
u64 cpu_logical_map(unsigned int cpu) u64 cpu_logical_map(unsigned int cpu)
{ {
if (cpu >= ARRAY_SIZE(__cpu_logical_map)) if (cpu >= ARRAY_SIZE(hyp_cpu_logical_map))
hyp_panic(); hyp_panic();
return __cpu_logical_map[cpu]; return hyp_cpu_logical_map[cpu];
} }
unsigned long __hyp_per_cpu_offset(unsigned int cpu) unsigned long __hyp_per_cpu_offset(unsigned int cpu)

View File

@@ -7,11 +7,8 @@
#include <asm/kvm_asm.h> #include <asm/kvm_asm.h>
#include <asm/kvm_hyp.h> #include <asm/kvm_hyp.h>
#include <asm/kvm_mmu.h> #include <asm/kvm_mmu.h>
#include <kvm/arm_hypercalls.h>
#include <linux/arm-smccc.h> #include <linux/arm-smccc.h>
#include <linux/kvm_host.h> #include <linux/kvm_host.h>
#include <linux/psci.h>
#include <kvm/arm_psci.h>
#include <uapi/linux/psci.h> #include <uapi/linux/psci.h>
#include <nvhe/trap_handler.h> #include <nvhe/trap_handler.h>
@@ -22,9 +19,8 @@ void kvm_hyp_cpu_resume(unsigned long r0);
void __noreturn __host_enter(struct kvm_cpu_context *host_ctxt); void __noreturn __host_enter(struct kvm_cpu_context *host_ctxt);
/* Config options set by the host. */ /* Config options set by the host. */
__ro_after_init u32 kvm_host_psci_version; struct kvm_host_psci_config __ro_after_init kvm_host_psci_config;
__ro_after_init struct psci_0_1_function_ids kvm_host_psci_0_1_function_ids; s64 __ro_after_init hyp_physvirt_offset;
__ro_after_init s64 hyp_physvirt_offset;
#define __hyp_pa(x) ((phys_addr_t)((x)) + hyp_physvirt_offset) #define __hyp_pa(x) ((phys_addr_t)((x)) + hyp_physvirt_offset)
@@ -47,19 +43,16 @@ struct psci_boot_args {
static DEFINE_PER_CPU(struct psci_boot_args, cpu_on_args) = PSCI_BOOT_ARGS_INIT; static DEFINE_PER_CPU(struct psci_boot_args, cpu_on_args) = PSCI_BOOT_ARGS_INIT;
static DEFINE_PER_CPU(struct psci_boot_args, suspend_args) = PSCI_BOOT_ARGS_INIT; static DEFINE_PER_CPU(struct psci_boot_args, suspend_args) = PSCI_BOOT_ARGS_INIT;
static u64 get_psci_func_id(struct kvm_cpu_context *host_ctxt) #define is_psci_0_1(what, func_id) \
{ (kvm_host_psci_config.psci_0_1_ ## what ## _implemented && \
DECLARE_REG(u64, func_id, host_ctxt, 0); (func_id) == kvm_host_psci_config.function_ids_0_1.what)
return func_id;
}
static bool is_psci_0_1_call(u64 func_id) static bool is_psci_0_1_call(u64 func_id)
{ {
return (func_id == kvm_host_psci_0_1_function_ids.cpu_suspend) || return (is_psci_0_1(cpu_suspend, func_id) ||
(func_id == kvm_host_psci_0_1_function_ids.cpu_on) || is_psci_0_1(cpu_on, func_id) ||
(func_id == kvm_host_psci_0_1_function_ids.cpu_off) || is_psci_0_1(cpu_off, func_id) ||
(func_id == kvm_host_psci_0_1_function_ids.migrate); is_psci_0_1(migrate, func_id));
} }
static bool is_psci_0_2_call(u64 func_id) static bool is_psci_0_2_call(u64 func_id)
@@ -69,16 +62,6 @@ static bool is_psci_0_2_call(u64 func_id)
(PSCI_0_2_FN64(0) <= func_id && func_id <= PSCI_0_2_FN64(31)); (PSCI_0_2_FN64(0) <= func_id && func_id <= PSCI_0_2_FN64(31));
} }
static bool is_psci_call(u64 func_id)
{
switch (kvm_host_psci_version) {
case PSCI_VERSION(0, 1):
return is_psci_0_1_call(func_id);
default:
return is_psci_0_2_call(func_id);
}
}
static unsigned long psci_call(unsigned long fn, unsigned long arg0, static unsigned long psci_call(unsigned long fn, unsigned long arg0,
unsigned long arg1, unsigned long arg2) unsigned long arg1, unsigned long arg2)
{ {
@@ -248,15 +231,14 @@ asmlinkage void __noreturn kvm_host_psci_cpu_entry(bool is_cpu_on)
static unsigned long psci_0_1_handler(u64 func_id, struct kvm_cpu_context *host_ctxt) static unsigned long psci_0_1_handler(u64 func_id, struct kvm_cpu_context *host_ctxt)
{ {
if ((func_id == kvm_host_psci_0_1_function_ids.cpu_off) || if (is_psci_0_1(cpu_off, func_id) || is_psci_0_1(migrate, func_id))
(func_id == kvm_host_psci_0_1_function_ids.migrate))
return psci_forward(host_ctxt); return psci_forward(host_ctxt);
else if (func_id == kvm_host_psci_0_1_function_ids.cpu_on) if (is_psci_0_1(cpu_on, func_id))
return psci_cpu_on(func_id, host_ctxt); return psci_cpu_on(func_id, host_ctxt);
else if (func_id == kvm_host_psci_0_1_function_ids.cpu_suspend) if (is_psci_0_1(cpu_suspend, func_id))
return psci_cpu_suspend(func_id, host_ctxt); return psci_cpu_suspend(func_id, host_ctxt);
else
return PSCI_RET_NOT_SUPPORTED; return PSCI_RET_NOT_SUPPORTED;
} }
static unsigned long psci_0_2_handler(u64 func_id, struct kvm_cpu_context *host_ctxt) static unsigned long psci_0_2_handler(u64 func_id, struct kvm_cpu_context *host_ctxt)
@@ -298,20 +280,23 @@ static unsigned long psci_1_0_handler(u64 func_id, struct kvm_cpu_context *host_
bool kvm_host_psci_handler(struct kvm_cpu_context *host_ctxt) bool kvm_host_psci_handler(struct kvm_cpu_context *host_ctxt)
{ {
u64 func_id = get_psci_func_id(host_ctxt); DECLARE_REG(u64, func_id, host_ctxt, 0);
unsigned long ret; unsigned long ret;
if (!is_psci_call(func_id)) switch (kvm_host_psci_config.version) {
return false;
switch (kvm_host_psci_version) {
case PSCI_VERSION(0, 1): case PSCI_VERSION(0, 1):
if (!is_psci_0_1_call(func_id))
return false;
ret = psci_0_1_handler(func_id, host_ctxt); ret = psci_0_1_handler(func_id, host_ctxt);
break; break;
case PSCI_VERSION(0, 2): case PSCI_VERSION(0, 2):
if (!is_psci_0_2_call(func_id))
return false;
ret = psci_0_2_handler(func_id, host_ctxt); ret = psci_0_2_handler(func_id, host_ctxt);
break; break;
default: default:
if (!is_psci_0_2_call(func_id))
return false;
ret = psci_1_0_handler(func_id, host_ctxt); ret = psci_1_0_handler(func_id, host_ctxt);
break; break;
} }

View File

@@ -850,8 +850,6 @@ int kvm_arm_pmu_v3_enable(struct kvm_vcpu *vcpu)
return -EINVAL; return -EINVAL;
} }
kvm_pmu_vcpu_reset(vcpu);
return 0; return 0;
} }

View File

@@ -594,6 +594,10 @@ static void reset_pmcr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *r)
{ {
u64 pmcr, val; u64 pmcr, val;
/* No PMU available, PMCR_EL0 may UNDEF... */
if (!kvm_arm_support_pmu_v3())
return;
pmcr = read_sysreg(pmcr_el0); pmcr = read_sysreg(pmcr_el0);
/* /*
* Writable bits of PMCR_EL0 (ARMV8_PMU_PMCR_MASK) are reset to UNKNOWN * Writable bits of PMCR_EL0 (ARMV8_PMU_PMCR_MASK) are reset to UNKNOWN
@@ -919,7 +923,7 @@ static bool access_pmuserenr(struct kvm_vcpu *vcpu, struct sys_reg_params *p,
#define reg_to_encoding(x) \ #define reg_to_encoding(x) \
sys_reg((u32)(x)->Op0, (u32)(x)->Op1, \ sys_reg((u32)(x)->Op0, (u32)(x)->Op1, \
(u32)(x)->CRn, (u32)(x)->CRm, (u32)(x)->Op2); (u32)(x)->CRn, (u32)(x)->CRm, (u32)(x)->Op2)
/* Silly macro to expand the DBG{BCR,BVR,WVR,WCR}n_EL1 registers in one go */ /* Silly macro to expand the DBG{BCR,BVR,WVR,WCR}n_EL1 registers in one go */
#define DBG_BCR_BVR_WCR_WVR_EL1(n) \ #define DBG_BCR_BVR_WCR_WVR_EL1(n) \

View File

@@ -34,17 +34,16 @@ static u64 __early_kern_hyp_va(u64 addr)
} }
/* /*
* Store a hyp VA <-> PA offset into a hyp-owned variable. * Store a hyp VA <-> PA offset into a EL2-owned variable.
*/ */
static void init_hyp_physvirt_offset(void) static void init_hyp_physvirt_offset(void)
{ {
extern s64 kvm_nvhe_sym(hyp_physvirt_offset);
u64 kern_va, hyp_va; u64 kern_va, hyp_va;
/* Compute the offset from the hyp VA and PA of a random symbol. */ /* Compute the offset from the hyp VA and PA of a random symbol. */
kern_va = (u64)kvm_ksym_ref(__hyp_text_start); kern_va = (u64)lm_alias(__hyp_text_start);
hyp_va = __early_kern_hyp_va(kern_va); hyp_va = __early_kern_hyp_va(kern_va);
CHOOSE_NVHE_SYM(hyp_physvirt_offset) = (s64)__pa(kern_va) - (s64)hyp_va; hyp_physvirt_offset = (s64)__pa(kern_va) - (s64)hyp_va;
} }
/* /*

View File

@@ -419,7 +419,8 @@ int vgic_lazy_init(struct kvm *kvm)
* Map the MMIO regions depending on the VGIC model exposed to the guest * Map the MMIO regions depending on the VGIC model exposed to the guest
* called on the first VCPU run. * called on the first VCPU run.
* Also map the virtual CPU interface into the VM. * Also map the virtual CPU interface into the VM.
* v2/v3 derivatives call vgic_init if not already done. * v2 calls vgic_init() if not already done.
* v3 and derivatives return an error if the VGIC is not initialized.
* vgic_ready() returns true if this function has succeeded. * vgic_ready() returns true if this function has succeeded.
* @kvm: kvm struct pointer * @kvm: kvm struct pointer
*/ */
@@ -428,7 +429,13 @@ int kvm_vgic_map_resources(struct kvm *kvm)
struct vgic_dist *dist = &kvm->arch.vgic; struct vgic_dist *dist = &kvm->arch.vgic;
int ret = 0; int ret = 0;
if (likely(vgic_ready(kvm)))
return 0;
mutex_lock(&kvm->lock); mutex_lock(&kvm->lock);
if (vgic_ready(kvm))
goto out;
if (!irqchip_in_kernel(kvm)) if (!irqchip_in_kernel(kvm))
goto out; goto out;
@@ -439,6 +446,8 @@ int kvm_vgic_map_resources(struct kvm *kvm)
if (ret) if (ret)
__kvm_vgic_destroy(kvm); __kvm_vgic_destroy(kvm);
else
dist->ready = true;
out: out:
mutex_unlock(&kvm->lock); mutex_unlock(&kvm->lock);

View File

@@ -306,20 +306,15 @@ int vgic_v2_map_resources(struct kvm *kvm)
struct vgic_dist *dist = &kvm->arch.vgic; struct vgic_dist *dist = &kvm->arch.vgic;
int ret = 0; int ret = 0;
if (vgic_ready(kvm))
goto out;
if (IS_VGIC_ADDR_UNDEF(dist->vgic_dist_base) || if (IS_VGIC_ADDR_UNDEF(dist->vgic_dist_base) ||
IS_VGIC_ADDR_UNDEF(dist->vgic_cpu_base)) { IS_VGIC_ADDR_UNDEF(dist->vgic_cpu_base)) {
kvm_err("Need to set vgic cpu and dist addresses first\n"); kvm_err("Need to set vgic cpu and dist addresses first\n");
ret = -ENXIO; return -ENXIO;
goto out;
} }
if (!vgic_v2_check_base(dist->vgic_dist_base, dist->vgic_cpu_base)) { if (!vgic_v2_check_base(dist->vgic_dist_base, dist->vgic_cpu_base)) {
kvm_err("VGIC CPU and dist frames overlap\n"); kvm_err("VGIC CPU and dist frames overlap\n");
ret = -EINVAL; return -EINVAL;
goto out;
} }
/* /*
@@ -329,13 +324,13 @@ int vgic_v2_map_resources(struct kvm *kvm)
ret = vgic_init(kvm); ret = vgic_init(kvm);
if (ret) { if (ret) {
kvm_err("Unable to initialize VGIC dynamic data structures\n"); kvm_err("Unable to initialize VGIC dynamic data structures\n");
goto out; return ret;
} }
ret = vgic_register_dist_iodev(kvm, dist->vgic_dist_base, VGIC_V2); ret = vgic_register_dist_iodev(kvm, dist->vgic_dist_base, VGIC_V2);
if (ret) { if (ret) {
kvm_err("Unable to register VGIC MMIO regions\n"); kvm_err("Unable to register VGIC MMIO regions\n");
goto out; return ret;
} }
if (!static_branch_unlikely(&vgic_v2_cpuif_trap)) { if (!static_branch_unlikely(&vgic_v2_cpuif_trap)) {
@@ -344,14 +339,11 @@ int vgic_v2_map_resources(struct kvm *kvm)
KVM_VGIC_V2_CPU_SIZE, true); KVM_VGIC_V2_CPU_SIZE, true);
if (ret) { if (ret) {
kvm_err("Unable to remap VGIC CPU to VCPU\n"); kvm_err("Unable to remap VGIC CPU to VCPU\n");
goto out; return ret;
} }
} }
dist->ready = true; return 0;
out:
return ret;
} }
DEFINE_STATIC_KEY_FALSE(vgic_v2_cpuif_trap); DEFINE_STATIC_KEY_FALSE(vgic_v2_cpuif_trap);

View File

@@ -500,29 +500,23 @@ int vgic_v3_map_resources(struct kvm *kvm)
int ret = 0; int ret = 0;
int c; int c;
if (vgic_ready(kvm))
goto out;
kvm_for_each_vcpu(c, vcpu, kvm) { kvm_for_each_vcpu(c, vcpu, kvm) {
struct vgic_cpu *vgic_cpu = &vcpu->arch.vgic_cpu; struct vgic_cpu *vgic_cpu = &vcpu->arch.vgic_cpu;
if (IS_VGIC_ADDR_UNDEF(vgic_cpu->rd_iodev.base_addr)) { if (IS_VGIC_ADDR_UNDEF(vgic_cpu->rd_iodev.base_addr)) {
kvm_debug("vcpu %d redistributor base not set\n", c); kvm_debug("vcpu %d redistributor base not set\n", c);
ret = -ENXIO; return -ENXIO;
goto out;
} }
} }
if (IS_VGIC_ADDR_UNDEF(dist->vgic_dist_base)) { if (IS_VGIC_ADDR_UNDEF(dist->vgic_dist_base)) {
kvm_err("Need to set vgic distributor addresses first\n"); kvm_err("Need to set vgic distributor addresses first\n");
ret = -ENXIO; return -ENXIO;
goto out;
} }
if (!vgic_v3_check_base(kvm)) { if (!vgic_v3_check_base(kvm)) {
kvm_err("VGIC redist and dist frames overlap\n"); kvm_err("VGIC redist and dist frames overlap\n");
ret = -EINVAL; return -EINVAL;
goto out;
} }
/* /*
@@ -530,22 +524,19 @@ int vgic_v3_map_resources(struct kvm *kvm)
* the VGIC before we need to use it. * the VGIC before we need to use it.
*/ */
if (!vgic_initialized(kvm)) { if (!vgic_initialized(kvm)) {
ret = -EBUSY; return -EBUSY;
goto out;
} }
ret = vgic_register_dist_iodev(kvm, dist->vgic_dist_base, VGIC_V3); ret = vgic_register_dist_iodev(kvm, dist->vgic_dist_base, VGIC_V3);
if (ret) { if (ret) {
kvm_err("Unable to register VGICv3 dist MMIO regions\n"); kvm_err("Unable to register VGICv3 dist MMIO regions\n");
goto out; return ret;
} }
if (kvm_vgic_global_state.has_gicv4_1) if (kvm_vgic_global_state.has_gicv4_1)
vgic_v4_configure_vsgis(kvm); vgic_v4_configure_vsgis(kvm);
dist->ready = true;
out: return 0;
return ret;
} }
DEFINE_STATIC_KEY_FALSE(vgic_v3_cpuif_trap); DEFINE_STATIC_KEY_FALSE(vgic_v3_cpuif_trap);

View File

@@ -709,10 +709,11 @@ static int do_tag_check_fault(unsigned long far, unsigned int esr,
struct pt_regs *regs) struct pt_regs *regs)
{ {
/* /*
* The architecture specifies that bits 63:60 of FAR_EL1 are UNKNOWN for tag * The architecture specifies that bits 63:60 of FAR_EL1 are UNKNOWN
* check faults. Mask them out now so that userspace doesn't see them. * for tag check faults. Set them to corresponding bits in the untagged
* address.
*/ */
far &= (1UL << 60) - 1; far = (__untagged_addr(far) & ~MTE_TAG_MASK) | (far & MTE_TAG_MASK);
do_bad_area(far, esr, regs); do_bad_area(far, esr, regs);
return 0; return 0;
} }

View File

@@ -53,13 +53,13 @@ s64 memstart_addr __ro_after_init = -1;
EXPORT_SYMBOL(memstart_addr); EXPORT_SYMBOL(memstart_addr);
/* /*
* We create both ZONE_DMA and ZONE_DMA32. ZONE_DMA covers the first 1G of * If the corresponding config options are enabled, we create both ZONE_DMA
* memory as some devices, namely the Raspberry Pi 4, have peripherals with * and ZONE_DMA32. By default ZONE_DMA covers the 32-bit addressable memory
* this limited view of the memory. ZONE_DMA32 will cover the rest of the 32 * unless restricted on specific platforms (e.g. 30-bit on Raspberry Pi 4).
* bit addressable memory area. * In such case, ZONE_DMA32 covers the rest of the 32-bit addressable memory,
* otherwise it is empty.
*/ */
phys_addr_t arm64_dma_phys_limit __ro_after_init; phys_addr_t arm64_dma_phys_limit __ro_after_init;
static phys_addr_t arm64_dma32_phys_limit __ro_after_init;
#ifdef CONFIG_KEXEC_CORE #ifdef CONFIG_KEXEC_CORE
/* /*
@@ -84,7 +84,7 @@ static void __init reserve_crashkernel(void)
if (crash_base == 0) { if (crash_base == 0) {
/* Current arm64 boot protocol requires 2MB alignment */ /* Current arm64 boot protocol requires 2MB alignment */
crash_base = memblock_find_in_range(0, arm64_dma32_phys_limit, crash_base = memblock_find_in_range(0, arm64_dma_phys_limit,
crash_size, SZ_2M); crash_size, SZ_2M);
if (crash_base == 0) { if (crash_base == 0) {
pr_warn("cannot allocate crashkernel (size:0x%llx)\n", pr_warn("cannot allocate crashkernel (size:0x%llx)\n",
@@ -196,6 +196,7 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max)
unsigned long max_zone_pfns[MAX_NR_ZONES] = {0}; unsigned long max_zone_pfns[MAX_NR_ZONES] = {0};
unsigned int __maybe_unused acpi_zone_dma_bits; unsigned int __maybe_unused acpi_zone_dma_bits;
unsigned int __maybe_unused dt_zone_dma_bits; unsigned int __maybe_unused dt_zone_dma_bits;
phys_addr_t __maybe_unused dma32_phys_limit = max_zone_phys(32);
#ifdef CONFIG_ZONE_DMA #ifdef CONFIG_ZONE_DMA
acpi_zone_dma_bits = fls64(acpi_iort_dma_get_max_cpu_address()); acpi_zone_dma_bits = fls64(acpi_iort_dma_get_max_cpu_address());
@@ -205,8 +206,12 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max)
max_zone_pfns[ZONE_DMA] = PFN_DOWN(arm64_dma_phys_limit); max_zone_pfns[ZONE_DMA] = PFN_DOWN(arm64_dma_phys_limit);
#endif #endif
#ifdef CONFIG_ZONE_DMA32 #ifdef CONFIG_ZONE_DMA32
max_zone_pfns[ZONE_DMA32] = PFN_DOWN(arm64_dma32_phys_limit); max_zone_pfns[ZONE_DMA32] = PFN_DOWN(dma32_phys_limit);
if (!arm64_dma_phys_limit)
arm64_dma_phys_limit = dma32_phys_limit;
#endif #endif
if (!arm64_dma_phys_limit)
arm64_dma_phys_limit = PHYS_MASK + 1;
max_zone_pfns[ZONE_NORMAL] = max; max_zone_pfns[ZONE_NORMAL] = max;
free_area_init(max_zone_pfns); free_area_init(max_zone_pfns);
@@ -394,16 +399,9 @@ void __init arm64_memblock_init(void)
early_init_fdt_scan_reserved_mem(); early_init_fdt_scan_reserved_mem();
if (IS_ENABLED(CONFIG_ZONE_DMA32))
arm64_dma32_phys_limit = max_zone_phys(32);
else
arm64_dma32_phys_limit = PHYS_MASK + 1;
reserve_elfcorehdr(); reserve_elfcorehdr();
high_memory = __va(memblock_end_of_DRAM() - 1) + 1; high_memory = __va(memblock_end_of_DRAM() - 1) + 1;
dma_contiguous_reserve(arm64_dma32_phys_limit);
} }
void __init bootmem_init(void) void __init bootmem_init(void)
@@ -438,6 +436,11 @@ void __init bootmem_init(void)
sparse_init(); sparse_init();
zone_sizes_init(min, max); zone_sizes_init(min, max);
/*
* Reserve the CMA area after arm64_dma_phys_limit was initialised.
*/
dma_contiguous_reserve(arm64_dma_phys_limit);
/* /*
* request_standard_resources() depends on crashkernel's memory being * request_standard_resources() depends on crashkernel's memory being
* reserved, so do it here. * reserved, so do it here.
@@ -455,7 +458,7 @@ void __init bootmem_init(void)
void __init mem_init(void) void __init mem_init(void)
{ {
if (swiotlb_force == SWIOTLB_FORCE || if (swiotlb_force == SWIOTLB_FORCE ||
max_pfn > PFN_DOWN(arm64_dma_phys_limit ? : arm64_dma32_phys_limit)) max_pfn > PFN_DOWN(arm64_dma_phys_limit))
swiotlb_init(1); swiotlb_init(1);
else else
swiotlb_force = SWIOTLB_NO_FORCE; swiotlb_force = SWIOTLB_NO_FORCE;

View File

@@ -46,7 +46,7 @@
#endif #endif
#ifdef CONFIG_KASAN_HW_TAGS #ifdef CONFIG_KASAN_HW_TAGS
#define TCR_KASAN_HW_FLAGS SYS_TCR_EL1_TCMA1 | TCR_TBI1 #define TCR_KASAN_HW_FLAGS SYS_TCR_EL1_TCMA1 | TCR_TBI1 | TCR_TBID1
#else #else
#define TCR_KASAN_HW_FLAGS 0 #define TCR_KASAN_HW_FLAGS 0
#endif #endif

View File

@@ -3,6 +3,7 @@
#define _ASM_IA64_SPARSEMEM_H #define _ASM_IA64_SPARSEMEM_H
#ifdef CONFIG_SPARSEMEM #ifdef CONFIG_SPARSEMEM
#include <asm/page.h>
/* /*
* SECTION_SIZE_BITS 2^N: how big each section will be * SECTION_SIZE_BITS 2^N: how big each section will be
* MAX_PHYSMEM_BITS 2^N: how much memory we can have in that space * MAX_PHYSMEM_BITS 2^N: how much memory we can have in that space

View File

@@ -13,6 +13,7 @@
#include <linux/libfdt.h> #include <linux/libfdt.h>
#include <asm/addrspace.h> #include <asm/addrspace.h>
#include <asm/unaligned.h>
/* /*
* These two variables specify the free mem region * These two variables specify the free mem region
@@ -117,7 +118,7 @@ void decompress_kernel(unsigned long boot_heap_start)
dtb_size = fdt_totalsize((void *)&__appended_dtb); dtb_size = fdt_totalsize((void *)&__appended_dtb);
/* last four bytes is always image size in little endian */ /* last four bytes is always image size in little endian */
image_size = le32_to_cpup((void *)&__image_end - 4); image_size = get_unaligned_le32((void *)&__image_end - 4);
/* copy dtb to where the booted kernel will expect it */ /* copy dtb to where the booted kernel will expect it */
memcpy((void *)VMLINUX_LOAD_ADDRESS_ULL + image_size, memcpy((void *)VMLINUX_LOAD_ADDRESS_ULL + image_size,

View File

@@ -1444,7 +1444,7 @@ static void octeon_irq_setup_secondary_ciu2(void)
static int __init octeon_irq_init_ciu( static int __init octeon_irq_init_ciu(
struct device_node *ciu_node, struct device_node *parent) struct device_node *ciu_node, struct device_node *parent)
{ {
unsigned int i, r; int i, r;
struct irq_chip *chip; struct irq_chip *chip;
struct irq_chip *chip_edge; struct irq_chip *chip_edge;
struct irq_chip *chip_mbox; struct irq_chip *chip_mbox;

View File

@@ -51,6 +51,7 @@ extern void kmap_flush_tlb(unsigned long addr);
#define flush_cache_kmaps() BUG_ON(cpu_has_dc_aliases) #define flush_cache_kmaps() BUG_ON(cpu_has_dc_aliases)
#define arch_kmap_local_set_pte(mm, vaddr, ptep, ptev) set_pte(ptep, ptev)
#define arch_kmap_local_post_map(vaddr, pteval) local_flush_tlb_one(vaddr) #define arch_kmap_local_post_map(vaddr, pteval) local_flush_tlb_one(vaddr)
#define arch_kmap_local_post_unmap(vaddr) local_flush_tlb_one(vaddr) #define arch_kmap_local_post_unmap(vaddr) local_flush_tlb_one(vaddr)

View File

@@ -103,4 +103,11 @@ jiffies_to_old_timeval32(unsigned long jiffies, struct old_timeval32 *value)
#undef ns_to_kernel_old_timeval #undef ns_to_kernel_old_timeval
#define ns_to_kernel_old_timeval ns_to_old_timeval32 #define ns_to_kernel_old_timeval ns_to_old_timeval32
/*
* Some data types as stored in coredump.
*/
#define user_long_t compat_long_t
#define user_siginfo_t compat_siginfo_t
#define copy_siginfo_to_external copy_siginfo_to_external32
#include "../../../fs/binfmt_elf.c" #include "../../../fs/binfmt_elf.c"

View File

@@ -106,4 +106,11 @@ jiffies_to_old_timeval32(unsigned long jiffies, struct old_timeval32 *value)
#undef ns_to_kernel_old_timeval #undef ns_to_kernel_old_timeval
#define ns_to_kernel_old_timeval ns_to_old_timeval32 #define ns_to_kernel_old_timeval ns_to_old_timeval32
/*
* Some data types as stored in coredump.
*/
#define user_long_t compat_long_t
#define user_siginfo_t compat_siginfo_t
#define copy_siginfo_to_external copy_siginfo_to_external32
#include "../../../fs/binfmt_elf.c" #include "../../../fs/binfmt_elf.c"

Some files were not shown because too many files have changed in this diff Show More