mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-09 06:33:34 +00:00
Linux 6.3-rc7
-----BEGIN PGP SIGNATURE-----
iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAmQ8dXkeHHRvcnZhbGRz
QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiG24sH/1ADVMOmTCAsYODk
QeFm1PvcpDenmGnGN69r5iJ2AbPAhfo3TOAMnQLSxz7ES4VFs6CeArqMGKYYLa0k
2no/gra2jpVLx/qBMIjxkxUBS4uKNOjm9PR+vaamJ2yZOXTWTJFUThzMjVZI8anm
TFewF4Nb/A91+a4unPtYWROSjozr27g0aqUAu80/V73xmxSk74pvDJLLA+NMB7vZ
cQWkABqW9wpSPr1vkxVNgf6N5DmSmKZWnePG5GjfN5P+BU+eQLyERrOx8ttOvmAR
Z62R7S49Zc5BeR2CuBNxWwDober1UIb2Q0PUbvLo6HbN+LidJh90WtAlRYpref2f
NRB49N4=
=70dU
-----END PGP SIGNATURE-----
Merge branch 'v6.3-rc7'
Sync with the urgent patches; in particular:
a53ce18cac
("sched/fair: Sanitize vruntime of entity being migrated")
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
This commit is contained in:
commit
5a4d3b38ed
13
.mailmap
13
.mailmap
@ -133,6 +133,8 @@ Dmitry Safonov <0x7f454c46@gmail.com> <dsafonov@virtuozzo.com>
|
||||
Domen Puncer <domen@coderock.org>
|
||||
Douglas Gilbert <dougg@torque.net>
|
||||
Ed L. Cashin <ecashin@coraid.com>
|
||||
Enric Balletbo i Serra <eballetbo@kernel.org> <enric.balletbo@collabora.com>
|
||||
Enric Balletbo i Serra <eballetbo@kernel.org> <eballetbo@iseebcn.com>
|
||||
Erik Kaneda <erik.kaneda@intel.com> <erik.schmauss@intel.com>
|
||||
Eugen Hristev <eugen.hristev@collabora.com> <eugen.hristev@microchip.com>
|
||||
Evgeniy Polyakov <johnpol@2ka.mipt.ru>
|
||||
@ -263,7 +265,9 @@ Krzysztof Kozlowski <krzk@kernel.org> <k.kozlowski@samsung.com>
|
||||
Krzysztof Kozlowski <krzk@kernel.org> <krzysztof.kozlowski@canonical.com>
|
||||
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
|
||||
Kuogee Hsieh <quic_khsieh@quicinc.com> <khsieh@codeaurora.org>
|
||||
Leonard Crestez <leonard.crestez@nxp.com> Leonard Crestez <cdleonard@gmail.com>
|
||||
Leonardo Bras <leobras.c@gmail.com> <leonardo@linux.ibm.com>
|
||||
Leonard Göhrs <l.goehrs@pengutronix.de>
|
||||
Leonid I Ananiev <leonid.i.ananiev@intel.com>
|
||||
Leon Romanovsky <leon@kernel.org> <leon@leon.nu>
|
||||
Leon Romanovsky <leon@kernel.org> <leonro@mellanox.com>
|
||||
@ -379,6 +383,7 @@ Quentin Monnet <quentin@isovalent.com> <quentin.monnet@netronome.com>
|
||||
Quentin Perret <qperret@qperret.net> <quentin.perret@arm.com>
|
||||
Rafael J. Wysocki <rjw@rjwysocki.net> <rjw@sisk.pl>
|
||||
Rajeev Nandan <quic_rajeevny@quicinc.com> <rajeevny@codeaurora.org>
|
||||
Rajendra Nayak <quic_rjendra@quicinc.com> <rnayak@codeaurora.org>
|
||||
Rajesh Shah <rajesh.shah@intel.com>
|
||||
Ralf Baechle <ralf@linux-mips.org>
|
||||
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
@ -387,6 +392,9 @@ Rémi Denis-Courmont <rdenis@simphalempin.com>
|
||||
Ricardo Ribalda <ribalda@kernel.org> <ricardo@ribalda.com>
|
||||
Ricardo Ribalda <ribalda@kernel.org> Ricardo Ribalda Delgado <ribalda@kernel.org>
|
||||
Ricardo Ribalda <ribalda@kernel.org> <ricardo.ribalda@gmail.com>
|
||||
Richard Leitner <richard.leitner@linux.dev> <dev@g0hl1n.net>
|
||||
Richard Leitner <richard.leitner@linux.dev> <me@g0hl1n.net>
|
||||
Richard Leitner <richard.leitner@linux.dev> <richard.leitner@skidata.com>
|
||||
Robert Foss <rfoss@kernel.org> <robert.foss@linaro.org>
|
||||
Roman Gushchin <roman.gushchin@linux.dev> <guro@fb.com>
|
||||
Roman Gushchin <roman.gushchin@linux.dev> <guroan@gmail.com>
|
||||
@ -397,6 +405,7 @@ Ross Zwisler <zwisler@kernel.org> <ross.zwisler@linux.intel.com>
|
||||
Rudolf Marek <R.Marek@sh.cvut.cz>
|
||||
Rui Saraiva <rmps@joel.ist.utl.pt>
|
||||
Sachin P Sant <ssant@in.ibm.com>
|
||||
Sai Prakash Ranjan <quic_saipraka@quicinc.com> <saiprakash.ranjan@codeaurora.org>
|
||||
Sakari Ailus <sakari.ailus@linux.intel.com> <sakari.ailus@iki.fi>
|
||||
Sam Ravnborg <sam@mars.ravnborg.org>
|
||||
Sankeerth Billakanti <quic_sbillaka@quicinc.com> <sbillaka@codeaurora.org>
|
||||
@ -437,6 +446,10 @@ Thomas Graf <tgraf@suug.ch>
|
||||
Thomas Körper <socketcan@esd.eu> <thomas.koerper@esd.eu>
|
||||
Thomas Pedersen <twp@codeaurora.org>
|
||||
Tiezhu Yang <yangtiezhu@loongson.cn> <kernelpatch@126.com>
|
||||
Tobias Klauser <tklauser@distanz.ch> <tobias.klauser@gmail.com>
|
||||
Tobias Klauser <tklauser@distanz.ch> <klto@zhaw.ch>
|
||||
Tobias Klauser <tklauser@distanz.ch> <tklauser@nuerscht.ch>
|
||||
Tobias Klauser <tklauser@distanz.ch> <tklauser@xenon.tklauser.home>
|
||||
Todor Tomov <todor.too@gmail.com> <todor.tomov@linaro.org>
|
||||
Tony Luck <tony.luck@intel.com>
|
||||
TripleX Chung <xxx.phy@gmail.com> <triplex@zh-kernel.org>
|
||||
|
@ -36,7 +36,6 @@ problems and bugs in particular.
|
||||
|
||||
reporting-issues
|
||||
reporting-regressions
|
||||
security-bugs
|
||||
bug-hunting
|
||||
bug-bisect
|
||||
tainted-kernels
|
||||
|
@ -395,7 +395,7 @@ might want to be aware of; it for example explains how to add your issue to the
|
||||
list of tracked regressions, to ensure it won't fall through the cracks.
|
||||
|
||||
What qualifies as security issue is left to your judgment. Consider reading
|
||||
Documentation/admin-guide/security-bugs.rst before proceeding, as it
|
||||
Documentation/process/security-bugs.rst before proceeding, as it
|
||||
provides additional details how to best handle security issues.
|
||||
|
||||
An issue is a 'really severe problem' when something totally unacceptably bad
|
||||
@ -1269,7 +1269,7 @@ them when sending the report by mail. If you filed it in a bug tracker, forward
|
||||
the report's text to these addresses; but on top of it put a small note where
|
||||
you mention that you filed it with a link to the ticket.
|
||||
|
||||
See Documentation/admin-guide/security-bugs.rst for more information.
|
||||
See Documentation/process/security-bugs.rst for more information.
|
||||
|
||||
|
||||
Duties after the report went out
|
||||
|
@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/interrupt-controller/loongarch,cpu-interrupt-controller.yaml#
|
||||
$id: http://devicetree.org/schemas/interrupt-controller/loongson,cpu-interrupt-controller.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: LoongArch CPU Interrupt Controller
|
||||
@ -11,7 +11,7 @@ maintainers:
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: loongarch,cpu-interrupt-controller
|
||||
const: loongson,cpu-interrupt-controller
|
||||
|
||||
'#interrupt-cells':
|
||||
const: 1
|
||||
@ -28,7 +28,7 @@ required:
|
||||
examples:
|
||||
- |
|
||||
interrupt-controller {
|
||||
compatible = "loongarch,cpu-interrupt-controller";
|
||||
compatible = "loongson,cpu-interrupt-controller";
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-controller;
|
||||
};
|
@ -76,6 +76,13 @@ properties:
|
||||
If "broken-flash-reset" is present then having this property does not
|
||||
make any difference.
|
||||
|
||||
spi-cpol: true
|
||||
spi-cpha: true
|
||||
|
||||
dependencies:
|
||||
spi-cpol: [ spi-cpha ]
|
||||
spi-cpha: [ spi-cpol ]
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
|
@ -96,9 +96,11 @@ $defs:
|
||||
2: Lower Slew rate (slower edges)
|
||||
3: Reserved (No adjustments)
|
||||
|
||||
bias-bus-hold: true
|
||||
bias-pull-down: true
|
||||
bias-pull-up: true
|
||||
bias-disable: true
|
||||
input-enable: true
|
||||
output-high: true
|
||||
output-low: true
|
||||
|
||||
|
@ -92,7 +92,7 @@ properties:
|
||||
- description: Error interrupt
|
||||
- description: Receive buffer full interrupt
|
||||
- description: Transmit buffer empty interrupt
|
||||
- description: Transmit End interrupt
|
||||
- description: Break interrupt
|
||||
- items:
|
||||
- description: Error interrupt
|
||||
- description: Receive buffer full interrupt
|
||||
@ -107,7 +107,7 @@ properties:
|
||||
- const: eri
|
||||
- const: rxi
|
||||
- const: txi
|
||||
- const: tei
|
||||
- const: bri
|
||||
- items:
|
||||
- const: eri
|
||||
- const: rxi
|
||||
|
@ -171,6 +171,10 @@ Getting Help
|
||||
Getting LLVM
|
||||
-------------
|
||||
|
||||
We provide prebuilt stable versions of LLVM on `kernel.org <https://kernel.org/pub/tools/llvm/>`_.
|
||||
Below are links that may be useful for building LLVM from source or procuring
|
||||
it through a distribution's package manager.
|
||||
|
||||
- https://releases.llvm.org/download.html
|
||||
- https://github.com/llvm/llvm-project
|
||||
- https://llvm.org/docs/GettingStarted.html
|
||||
|
@ -39,13 +39,12 @@ With CONFIG_ZSMALLOC_STAT, we could see zsmalloc internal information via
|
||||
|
||||
# cat /sys/kernel/debug/zsmalloc/zram0/classes
|
||||
|
||||
class size almost_full almost_empty obj_allocated obj_used pages_used pages_per_zspage
|
||||
class size 10% 20% 30% 40% 50% 60% 70% 80% 90% 99% 100% obj_allocated obj_used pages_used pages_per_zspage freeable
|
||||
...
|
||||
...
|
||||
9 176 0 1 186 129 8 4
|
||||
10 192 1 0 2880 2872 135 3
|
||||
11 208 0 1 819 795 42 2
|
||||
12 224 0 1 219 159 12 4
|
||||
30 512 0 12 4 1 0 1 0 0 1 0 414 3464 3346 433 1 14
|
||||
31 528 2 7 2 2 1 0 1 0 0 2 117 4154 3793 536 4 44
|
||||
32 544 6 3 4 1 2 1 0 0 0 1 260 4170 3965 556 2 26
|
||||
...
|
||||
...
|
||||
|
||||
@ -54,10 +53,28 @@ class
|
||||
index
|
||||
size
|
||||
object size zspage stores
|
||||
almost_empty
|
||||
the number of ZS_ALMOST_EMPTY zspages(see below)
|
||||
almost_full
|
||||
the number of ZS_ALMOST_FULL zspages(see below)
|
||||
10%
|
||||
the number of zspages with usage ratio less than 10% (see below)
|
||||
20%
|
||||
the number of zspages with usage ratio between 10% and 20%
|
||||
30%
|
||||
the number of zspages with usage ratio between 20% and 30%
|
||||
40%
|
||||
the number of zspages with usage ratio between 30% and 40%
|
||||
50%
|
||||
the number of zspages with usage ratio between 40% and 50%
|
||||
60%
|
||||
the number of zspages with usage ratio between 50% and 60%
|
||||
70%
|
||||
the number of zspages with usage ratio between 60% and 70%
|
||||
80%
|
||||
the number of zspages with usage ratio between 70% and 80%
|
||||
90%
|
||||
the number of zspages with usage ratio between 80% and 90%
|
||||
99%
|
||||
the number of zspages with usage ratio between 90% and 99%
|
||||
100%
|
||||
the number of zspages with usage ratio 100%
|
||||
obj_allocated
|
||||
the number of objects allocated
|
||||
obj_used
|
||||
@ -66,19 +83,14 @@ pages_used
|
||||
the number of pages allocated for the class
|
||||
pages_per_zspage
|
||||
the number of 0-order pages to make a zspage
|
||||
freeable
|
||||
the approximate number of pages class compaction can free
|
||||
|
||||
We assign a zspage to ZS_ALMOST_EMPTY fullness group when n <= N / f, where
|
||||
|
||||
* n = number of allocated objects
|
||||
* N = total number of objects zspage can store
|
||||
* f = fullness_threshold_frac(ie, 4 at the moment)
|
||||
|
||||
Similarly, we assign zspage to:
|
||||
|
||||
* ZS_ALMOST_FULL when n > N / f
|
||||
* ZS_EMPTY when n == 0
|
||||
* ZS_FULL when n == N
|
||||
|
||||
Each zspage maintains inuse counter which keeps track of the number of
|
||||
objects stored in the zspage. The inuse counter determines the zspage's
|
||||
"fullness group" which is calculated as the ratio of the "inuse" objects to
|
||||
the total number of objects the zspage can hold (objs_per_zspage). The
|
||||
closer the inuse counter is to objs_per_zspage, the better.
|
||||
|
||||
Internals
|
||||
=========
|
||||
@ -94,10 +106,10 @@ of objects that each zspage can store.
|
||||
|
||||
For instance, consider the following size classes:::
|
||||
|
||||
class size almost_full almost_empty obj_allocated obj_used pages_used pages_per_zspage freeable
|
||||
class size 10% .... 100% obj_allocated obj_used pages_used pages_per_zspage freeable
|
||||
...
|
||||
94 1536 0 0 0 0 0 3 0
|
||||
100 1632 0 0 0 0 0 2 0
|
||||
94 1536 0 .... 0 0 0 0 3 0
|
||||
100 1632 0 .... 0 0 0 0 2 0
|
||||
...
|
||||
|
||||
|
||||
@ -134,10 +146,11 @@ reduces memory wastage.
|
||||
|
||||
Let's take a closer look at the bottom of `/sys/kernel/debug/zsmalloc/zramX/classes`:::
|
||||
|
||||
class size almost_full almost_empty obj_allocated obj_used pages_used pages_per_zspage freeable
|
||||
class size 10% .... 100% obj_allocated obj_used pages_used pages_per_zspage freeable
|
||||
|
||||
...
|
||||
202 3264 0 0 0 0 0 4 0
|
||||
254 4096 0 0 0 0 0 1 0
|
||||
202 3264 0 .. 0 0 0 0 4 0
|
||||
254 4096 0 .. 0 0 0 0 1 0
|
||||
...
|
||||
|
||||
Size class #202 stores objects of size 3264 bytes and has a maximum of 4 pages
|
||||
@ -151,40 +164,42 @@ efficient storage of large objects.
|
||||
|
||||
For zspage chain size of 8, huge class watermark becomes 3632 bytes:::
|
||||
|
||||
class size almost_full almost_empty obj_allocated obj_used pages_used pages_per_zspage freeable
|
||||
class size 10% .... 100% obj_allocated obj_used pages_used pages_per_zspage freeable
|
||||
|
||||
...
|
||||
202 3264 0 0 0 0 0 4 0
|
||||
211 3408 0 0 0 0 0 5 0
|
||||
217 3504 0 0 0 0 0 6 0
|
||||
222 3584 0 0 0 0 0 7 0
|
||||
225 3632 0 0 0 0 0 8 0
|
||||
254 4096 0 0 0 0 0 1 0
|
||||
202 3264 0 .. 0 0 0 0 4 0
|
||||
211 3408 0 .. 0 0 0 0 5 0
|
||||
217 3504 0 .. 0 0 0 0 6 0
|
||||
222 3584 0 .. 0 0 0 0 7 0
|
||||
225 3632 0 .. 0 0 0 0 8 0
|
||||
254 4096 0 .. 0 0 0 0 1 0
|
||||
...
|
||||
|
||||
For zspage chain size of 16, huge class watermark becomes 3840 bytes:::
|
||||
|
||||
class size almost_full almost_empty obj_allocated obj_used pages_used pages_per_zspage freeable
|
||||
class size 10% .... 100% obj_allocated obj_used pages_used pages_per_zspage freeable
|
||||
|
||||
...
|
||||
202 3264 0 0 0 0 0 4 0
|
||||
206 3328 0 0 0 0 0 13 0
|
||||
207 3344 0 0 0 0 0 9 0
|
||||
208 3360 0 0 0 0 0 14 0
|
||||
211 3408 0 0 0 0 0 5 0
|
||||
212 3424 0 0 0 0 0 16 0
|
||||
214 3456 0 0 0 0 0 11 0
|
||||
217 3504 0 0 0 0 0 6 0
|
||||
219 3536 0 0 0 0 0 13 0
|
||||
222 3584 0 0 0 0 0 7 0
|
||||
223 3600 0 0 0 0 0 15 0
|
||||
225 3632 0 0 0 0 0 8 0
|
||||
228 3680 0 0 0 0 0 9 0
|
||||
230 3712 0 0 0 0 0 10 0
|
||||
232 3744 0 0 0 0 0 11 0
|
||||
234 3776 0 0 0 0 0 12 0
|
||||
235 3792 0 0 0 0 0 13 0
|
||||
236 3808 0 0 0 0 0 14 0
|
||||
238 3840 0 0 0 0 0 15 0
|
||||
254 4096 0 0 0 0 0 1 0
|
||||
202 3264 0 .. 0 0 0 0 4 0
|
||||
206 3328 0 .. 0 0 0 0 13 0
|
||||
207 3344 0 .. 0 0 0 0 9 0
|
||||
208 3360 0 .. 0 0 0 0 14 0
|
||||
211 3408 0 .. 0 0 0 0 5 0
|
||||
212 3424 0 .. 0 0 0 0 16 0
|
||||
214 3456 0 .. 0 0 0 0 11 0
|
||||
217 3504 0 .. 0 0 0 0 6 0
|
||||
219 3536 0 .. 0 0 0 0 13 0
|
||||
222 3584 0 .. 0 0 0 0 7 0
|
||||
223 3600 0 .. 0 0 0 0 15 0
|
||||
225 3632 0 .. 0 0 0 0 8 0
|
||||
228 3680 0 .. 0 0 0 0 9 0
|
||||
230 3712 0 .. 0 0 0 0 10 0
|
||||
232 3744 0 .. 0 0 0 0 11 0
|
||||
234 3776 0 .. 0 0 0 0 12 0
|
||||
235 3792 0 .. 0 0 0 0 13 0
|
||||
236 3808 0 .. 0 0 0 0 14 0
|
||||
238 3840 0 .. 0 0 0 0 15 0
|
||||
254 4096 0 .. 0 0 0 0 1 0
|
||||
...
|
||||
|
||||
Overall the combined zspage chain size effect on zsmalloc pool configuration:::
|
||||
@ -214,9 +229,10 @@ zram as a build artifacts storage (Linux kernel compilation).
|
||||
|
||||
zsmalloc classes stats:::
|
||||
|
||||
class size almost_full almost_empty obj_allocated obj_used pages_used pages_per_zspage freeable
|
||||
class size 10% .... 100% obj_allocated obj_used pages_used pages_per_zspage freeable
|
||||
|
||||
...
|
||||
Total 13 51 413836 412973 159955 3
|
||||
Total 13 .. 51 413836 412973 159955 3
|
||||
|
||||
zram mm_stat:::
|
||||
|
||||
@ -227,9 +243,10 @@ zram as a build artifacts storage (Linux kernel compilation).
|
||||
|
||||
zsmalloc classes stats:::
|
||||
|
||||
class size almost_full almost_empty obj_allocated obj_used pages_used pages_per_zspage freeable
|
||||
class size 10% .... 100% obj_allocated obj_used pages_used pages_per_zspage freeable
|
||||
|
||||
...
|
||||
Total 18 87 414852 412978 156666 0
|
||||
Total 18 .. 87 414852 412978 156666 0
|
||||
|
||||
zram mm_stat:::
|
||||
|
||||
|
@ -340,6 +340,8 @@ tcp_app_win - INTEGER
|
||||
Reserve max(window/2^tcp_app_win, mss) of window for application
|
||||
buffer. Value 0 is special, it means that nothing is reserved.
|
||||
|
||||
Possible values are [0, 31], inclusive.
|
||||
|
||||
Default: 31
|
||||
|
||||
tcp_autocorking - BOOLEAN
|
||||
|
@ -23,10 +23,13 @@ metadata is supported, this set will grow:
|
||||
An XDP program can use these kfuncs to read the metadata into stack
|
||||
variables for its own consumption. Or, to pass the metadata on to other
|
||||
consumers, an XDP program can store it into the metadata area carried
|
||||
ahead of the packet.
|
||||
ahead of the packet. Not all packets will necessary have the requested
|
||||
metadata available in which case the driver returns ``-ENODATA``.
|
||||
|
||||
Not all kfuncs have to be implemented by the device driver; when not
|
||||
implemented, the default ones that return ``-EOPNOTSUPP`` will be used.
|
||||
implemented, the default ones that return ``-EOPNOTSUPP`` will be used
|
||||
to indicate the device driver have not implemented this kfunc.
|
||||
|
||||
|
||||
Within an XDP frame, the metadata layout (accessed via ``xdp_buff``) is
|
||||
as follows::
|
||||
|
@ -138,7 +138,7 @@ required reading:
|
||||
philosophy and is very important for people moving to Linux from
|
||||
development on other Operating Systems.
|
||||
|
||||
:ref:`Documentation/admin-guide/security-bugs.rst <securitybugs>`
|
||||
:ref:`Documentation/process/security-bugs.rst <securitybugs>`
|
||||
If you feel you have found a security problem in the Linux kernel,
|
||||
please follow the steps in this document to help notify the kernel
|
||||
developers, and help solve the issue.
|
||||
|
@ -35,6 +35,14 @@ Below are the essential guides that every developer should read.
|
||||
kernel-enforcement-statement
|
||||
kernel-driver-statement
|
||||
|
||||
For security issues, see:
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
security-bugs
|
||||
embargoed-hardware-issues
|
||||
|
||||
Other guides to the community that are of interest to most developers are:
|
||||
|
||||
.. toctree::
|
||||
@ -47,7 +55,6 @@ Other guides to the community that are of interest to most developers are:
|
||||
submit-checklist
|
||||
kernel-docs
|
||||
deprecated
|
||||
embargoed-hardware-issues
|
||||
maintainers
|
||||
researcher-guidelines
|
||||
|
||||
|
@ -68,7 +68,7 @@ Before contributing, carefully read the appropriate documentation:
|
||||
* Documentation/process/development-process.rst
|
||||
* Documentation/process/submitting-patches.rst
|
||||
* Documentation/admin-guide/reporting-issues.rst
|
||||
* Documentation/admin-guide/security-bugs.rst
|
||||
* Documentation/process/security-bugs.rst
|
||||
|
||||
Then send a patch (including a commit log with all the details listed
|
||||
below) and follow up on any feedback from other developers.
|
||||
|
@ -39,7 +39,7 @@ Procedure for submitting patches to the -stable tree
|
||||
|
||||
Security patches should not be handled (solely) by the -stable review
|
||||
process but should follow the procedures in
|
||||
:ref:`Documentation/admin-guide/security-bugs.rst <securitybugs>`.
|
||||
:ref:`Documentation/process/security-bugs.rst <securitybugs>`.
|
||||
|
||||
For all other submissions, choose one of the following procedures
|
||||
-----------------------------------------------------------------
|
||||
|
@ -254,7 +254,7 @@ If you have a patch that fixes an exploitable security bug, send that patch
|
||||
to security@kernel.org. For severe bugs, a short embargo may be considered
|
||||
to allow distributors to get the patch out to users; in such cases,
|
||||
obviously, the patch should not be sent to any public lists. See also
|
||||
Documentation/admin-guide/security-bugs.rst.
|
||||
Documentation/process/security-bugs.rst.
|
||||
|
||||
Patches that fix a severe bug in a released kernel should be directed
|
||||
toward the stable maintainers by putting a line like this::
|
||||
|
@ -47,7 +47,7 @@ RISC-V Linux Kernel SV39
|
||||
| Kernel-space virtual memory, shared between all processes:
|
||||
____________________________________________________________|___________________________________________________________
|
||||
| | | |
|
||||
ffffffc6fee00000 | -228 GB | ffffffc6feffffff | 2 MB | fixmap
|
||||
ffffffc6fea00000 | -228 GB | ffffffc6feffffff | 6 MB | fixmap
|
||||
ffffffc6ff000000 | -228 GB | ffffffc6ffffffff | 16 MB | PCI io
|
||||
ffffffc700000000 | -228 GB | ffffffc7ffffffff | 4 GB | vmemmap
|
||||
ffffffc800000000 | -224 GB | ffffffd7ffffffff | 64 GB | vmalloc/ioremap space
|
||||
@ -83,7 +83,7 @@ RISC-V Linux Kernel SV48
|
||||
| Kernel-space virtual memory, shared between all processes:
|
||||
____________________________________________________________|___________________________________________________________
|
||||
| | | |
|
||||
ffff8d7ffee00000 | -114.5 TB | ffff8d7ffeffffff | 2 MB | fixmap
|
||||
ffff8d7ffea00000 | -114.5 TB | ffff8d7ffeffffff | 6 MB | fixmap
|
||||
ffff8d7fff000000 | -114.5 TB | ffff8d7fffffffff | 16 MB | PCI io
|
||||
ffff8d8000000000 | -114.5 TB | ffff8f7fffffffff | 2 TB | vmemmap
|
||||
ffff8f8000000000 | -112.5 TB | ffffaf7fffffffff | 32 TB | vmalloc/ioremap space
|
||||
@ -119,7 +119,7 @@ RISC-V Linux Kernel SV57
|
||||
| Kernel-space virtual memory, shared between all processes:
|
||||
____________________________________________________________|___________________________________________________________
|
||||
| | | |
|
||||
ff1bfffffee00000 | -57 PB | ff1bfffffeffffff | 2 MB | fixmap
|
||||
ff1bfffffea00000 | -57 PB | ff1bfffffeffffff | 6 MB | fixmap
|
||||
ff1bffffff000000 | -57 PB | ff1bffffffffffff | 16 MB | PCI io
|
||||
ff1c000000000000 | -57 PB | ff1fffffffffffff | 1 PB | vmemmap
|
||||
ff20000000000000 | -56 PB | ff5fffffffffffff | 16 PB | vmalloc/ioremap space
|
||||
|
@ -704,7 +704,7 @@ ref
|
||||
no-jd
|
||||
BIOS setup but without jack-detection
|
||||
intel
|
||||
Intel DG45* mobos
|
||||
Intel D*45* mobos
|
||||
dell-m6-amic
|
||||
Dell desktops/laptops with analog mics
|
||||
dell-m6-dmic
|
||||
|
@ -1,6 +1,6 @@
|
||||
.. include:: ../disclaimer-ita.rst
|
||||
|
||||
:Original: :ref:`Documentation/admin-guide/security-bugs.rst <securitybugs>`
|
||||
:Original: :ref:`Documentation/process/security-bugs.rst <securitybugs>`
|
||||
|
||||
.. _it_securitybugs:
|
||||
|
||||
|
@ -272,7 +272,7 @@ embargo potrebbe essere preso in considerazione per dare il tempo alle
|
||||
distribuzioni di prendere la patch e renderla disponibile ai loro utenti;
|
||||
in questo caso, ovviamente, la patch non dovrebbe essere inviata su alcuna
|
||||
lista di discussione pubblica. Leggete anche
|
||||
Documentation/admin-guide/security-bugs.rst.
|
||||
Documentation/process/security-bugs.rst.
|
||||
|
||||
Patch che correggono bachi importanti su un kernel già rilasciato, dovrebbero
|
||||
essere inviate ai manutentori dei kernel stabili aggiungendo la seguente riga::
|
||||
|
@ -167,7 +167,7 @@ linux-api@vger.kernel.org に送ることを勧めます。
|
||||
このドキュメントは Linux 開発の思想を理解するのに非常に重要です。
|
||||
そして、他のOSでの開発者が Linux に移る時にとても重要です。
|
||||
|
||||
:ref:`Documentation/admin-guide/security-bugs.rst <securitybugs>`
|
||||
:ref:`Documentation/process/security-bugs.rst <securitybugs>`
|
||||
もし Linux カーネルでセキュリティ問題を発見したように思ったら、こ
|
||||
のドキュメントのステップに従ってカーネル開発者に連絡し、問題解決を
|
||||
支援してください。
|
||||
|
@ -157,7 +157,7 @@ mtk.manpages@gmail.com의 메인테이너에게 보낼 것을 권장한다.
|
||||
리눅스로 전향하는 사람들에게는 매우 중요하다.
|
||||
|
||||
|
||||
:ref:`Documentation/admin-guide/security-bugs.rst <securitybugs>`
|
||||
:ref:`Documentation/process/security-bugs.rst <securitybugs>`
|
||||
여러분들이 리눅스 커널의 보안 문제를 발견했다고 생각한다면 이 문서에
|
||||
나온 단계에 따라서 커널 개발자들에게 알리고 그 문제를 해결할 수 있도록
|
||||
도와 달라.
|
||||
|
@ -135,7 +135,7 @@ de obligada lectura:
|
||||
de Linux y es muy importante para las personas que se mudan a Linux
|
||||
tras desarrollar otros sistemas operativos.
|
||||
|
||||
:ref:`Documentation/admin-guide/security-bugs.rst <securitybugs>`
|
||||
:ref:`Documentation/process/security-bugs.rst <securitybugs>`
|
||||
Si cree que ha encontrado un problema de seguridad en el kernel de
|
||||
Linux, siga los pasos de este documento para ayudar a notificar a los
|
||||
desarrolladores del kernel y ayudar a resolver el problema.
|
||||
|
@ -276,7 +276,7 @@ parche a security@kernel.org. Para errores graves, se debe mantener un
|
||||
poco de discreción y permitir que los distribuidores entreguen el parche a
|
||||
los usuarios; en esos casos, obviamente, el parche no debe enviarse a
|
||||
ninguna lista pública. Revise también
|
||||
Documentation/admin-guide/security-bugs.rst.
|
||||
Documentation/process/security-bugs.rst.
|
||||
|
||||
Los parches que corrigen un error grave en un kernel en uso deben dirigirse
|
||||
hacia los maintainers estables poniendo una línea como esta::
|
||||
|
@ -1,6 +1,6 @@
|
||||
.. include:: ../disclaimer-zh_CN.rst
|
||||
|
||||
:Original: :doc:`../../../admin-guide/security-bugs`
|
||||
:Original: :doc:`../../../process/security-bugs`
|
||||
|
||||
:译者:
|
||||
|
||||
|
@ -125,7 +125,7 @@ Linux内核代码中包含有大量的文档。这些文档对于学习如何与
|
||||
这篇文档对于理解Linux的开发哲学至关重要。对于将开发平台从其他操作系
|
||||
统转移到Linux的人来说也很重要。
|
||||
|
||||
:ref:`Documentation/admin-guide/security-bugs.rst <securitybugs>`
|
||||
:ref:`Documentation/process/security-bugs.rst <securitybugs>`
|
||||
如果你认为自己发现了Linux内核的安全性问题,请根据这篇文档中的步骤来
|
||||
提醒其他内核开发者并帮助解决这个问题。
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
.. include:: ../disclaimer-zh_TW.rst
|
||||
|
||||
:Original: :doc:`../../../admin-guide/security-bugs`
|
||||
:Original: :doc:`../../../process/security-bugs`
|
||||
|
||||
:譯者:
|
||||
|
||||
|
@ -128,7 +128,7 @@ Linux內核代碼中包含有大量的文檔。這些文檔對於學習如何與
|
||||
這篇文檔對於理解Linux的開發哲學至關重要。對於將開發平台從其他操作系
|
||||
統轉移到Linux的人來說也很重要。
|
||||
|
||||
:ref:`Documentation/admin-guide/security-bugs.rst <securitybugs>`
|
||||
:ref:`Documentation/process/security-bugs.rst <securitybugs>`
|
||||
如果你認爲自己發現了Linux內核的安全性問題,請根據這篇文檔中的步驟來
|
||||
提醒其他內核開發者並幫助解決這個問題。
|
||||
|
||||
|
352
Documentation/usb/gadget_uvc.rst
Normal file
352
Documentation/usb/gadget_uvc.rst
Normal file
@ -0,0 +1,352 @@
|
||||
=======================
|
||||
Linux UVC Gadget Driver
|
||||
=======================
|
||||
|
||||
Overview
|
||||
--------
|
||||
The UVC Gadget driver is a driver for hardware on the *device* side of a USB
|
||||
connection. It is intended to run on a Linux system that has USB device-side
|
||||
hardware such as boards with an OTG port.
|
||||
|
||||
On the device system, once the driver is bound it appears as a V4L2 device with
|
||||
the output capability.
|
||||
|
||||
On the host side (once connected via USB cable), a device running the UVC Gadget
|
||||
driver *and controlled by an appropriate userspace program* should appear as a UVC
|
||||
specification compliant camera, and function appropriately with any program
|
||||
designed to handle them. The userspace program running on the device system can
|
||||
queue image buffers from a variety of sources to be transmitted via the USB
|
||||
connection. Typically this would mean forwarding the buffers from a camera sensor
|
||||
peripheral, but the source of the buffer is entirely dependent on the userspace
|
||||
companion program.
|
||||
|
||||
Configuring the device kernel
|
||||
-----------------------------
|
||||
The Kconfig options USB_CONFIGFS, USB_LIBCOMPOSITE, USB_CONFIGFS_F_UVC and
|
||||
USB_F_UVC must be selected to enable support for the UVC gadget.
|
||||
|
||||
Configuring the gadget through configfs
|
||||
---------------------------------------
|
||||
The UVC Gadget expects to be configured through configfs using the UVC function.
|
||||
This allows a significant degree of flexibility, as many of a UVC device's
|
||||
settings can be controlled this way.
|
||||
|
||||
Not all of the available attributes are described here. For a complete enumeration
|
||||
see Documentation/ABI/testing/configfs-usb-gadget-uvc
|
||||
|
||||
Assumptions
|
||||
~~~~~~~~~~~
|
||||
This section assumes that you have mounted configfs at `/sys/kernel/config` and
|
||||
created a gadget as `/sys/kernel/config/usb_gadget/g1`.
|
||||
|
||||
The UVC Function
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
The first step is to create the UVC function:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# These variables will be assumed throughout the rest of the document
|
||||
CONFIGFS="/sys/kernel/config"
|
||||
GADGET="$CONFIGFS/usb_gadget/g1"
|
||||
FUNCTION="$GADGET/functions/uvc.0"
|
||||
|
||||
mkdir -p $FUNCTION
|
||||
|
||||
Formats and Frames
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
You must configure the gadget by telling it which formats you support, as well
|
||||
as the frame sizes and frame intervals that are supported for each format. In
|
||||
the current implementation there is no way for the gadget to refuse to set a
|
||||
format that the host instructs it to set, so it is important that this step is
|
||||
completed *accurately* to ensure that the host never asks for a format that
|
||||
can't be provided.
|
||||
|
||||
Formats are created under the streaming/uncompressed and streaming/mjpeg configfs
|
||||
groups, with the framesizes created under the formats in the following
|
||||
structure:
|
||||
|
||||
::
|
||||
|
||||
uvc.0 +
|
||||
|
|
||||
+ streaming +
|
||||
|
|
||||
+ mjpeg +
|
||||
| |
|
||||
| + mjpeg +
|
||||
| |
|
||||
| + 720p
|
||||
| |
|
||||
| + 1080p
|
||||
|
|
||||
+ uncompressed +
|
||||
|
|
||||
+ yuyv +
|
||||
|
|
||||
+ 720p
|
||||
|
|
||||
+ 1080p
|
||||
|
||||
Each frame can then be configured with a width and height, plus the maximum
|
||||
buffer size required to store a single frame, and finally with the supported
|
||||
frame intervals for that format and framesize. Width and height are enumerated in
|
||||
units of pixels, frame interval in units of 100ns. To create the structure
|
||||
above with 2, 15 and 100 fps frameintervals for each framesize for example you
|
||||
might do:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
create_frame() {
|
||||
# Example usage:
|
||||
# create_frame <width> <height> <group> <format name>
|
||||
|
||||
WIDTH=$1
|
||||
HEIGHT=$2
|
||||
FORMAT=$3
|
||||
NAME=$4
|
||||
|
||||
wdir=$FUNCTION/streaming/$FORMAT/$NAME/${HEIGHT}p
|
||||
|
||||
mkdir -p $wdir
|
||||
echo $WIDTH > $wdir/wWidth
|
||||
echo $HEIGHT > $wdir/wHeight
|
||||
echo $(( $WIDTH * $HEIGHT * 2 )) > $wdir/dwMaxVideoFrameBufferSize
|
||||
cat <<EOF > $wdir/dwFrameInterval
|
||||
666666
|
||||
100000
|
||||
5000000
|
||||
EOF
|
||||
}
|
||||
|
||||
create_frame 1280 720 mjpeg mjpeg
|
||||
create_frame 1920 1080 mjpeg mjpeg
|
||||
create_frame 1280 720 uncompressed yuyv
|
||||
create_frame 1920 1080 uncompressed yuyv
|
||||
|
||||
The only uncompressed format currently supported is YUYV, which is detailed at
|
||||
Documentation/userspace-api/media/v4l/pixfmt-packed.yuv.rst.
|
||||
|
||||
Color Matching Descriptors
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
It's possible to specify some colometry information for each format you create.
|
||||
This step is optional, and default information will be included if this step is
|
||||
skipped; those default values follow those defined in the Color Matching Descriptor
|
||||
section of the UVC specification.
|
||||
|
||||
To create a Color Matching Descriptor, create a configfs item and set its three
|
||||
attributes to your desired settings and then link to it from the format you wish
|
||||
it to be associated with:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Create a new Color Matching Descriptor
|
||||
|
||||
mkdir $FUNCTION/streaming/color_matching/yuyv
|
||||
pushd $FUNCTION/streaming/color_matching/yuyv
|
||||
|
||||
echo 1 > bColorPrimaries
|
||||
echo 1 > bTransferCharacteristics
|
||||
echo 4 > bMatrixCoefficients
|
||||
|
||||
popd
|
||||
|
||||
# Create a symlink to the Color Matching Descriptor from the format's config item
|
||||
ln -s $FUNCTION/streaming/color_matching/yuyv $FUNCTION/streaming/uncompressed/yuyv
|
||||
|
||||
For details about the valid values, consult the UVC specification. Note that a
|
||||
default color matching descriptor exists and is used by any format which does
|
||||
not have a link to a different Color Matching Descriptor. It's possible to
|
||||
change the attribute settings for the default descriptor, so bear in mind that if
|
||||
you do that you are altering the defaults for any format that does not link to
|
||||
a different one.
|
||||
|
||||
|
||||
Header linking
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
The UVC specification requires that Format and Frame descriptors be preceded by
|
||||
Headers detailing things such as the number and cumulative size of the different
|
||||
Format descriptors that follow. This and similar operations are acheived in
|
||||
configfs by linking between the configfs item representing the header and the
|
||||
config items representing those other descriptors, in this manner:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
mkdir $FUNCTION/streaming/header/h
|
||||
|
||||
# This section links the format descriptors and their associated frames
|
||||
# to the header
|
||||
cd $FUNCTION/streaming/header/h
|
||||
ln -s ../../uncompressed/yuyv
|
||||
ln -s ../../mjpeg/mjpeg
|
||||
|
||||
# This section ensures that the header will be transmitted for each
|
||||
# speed's set of descriptors. If support for a particular speed is not
|
||||
# needed then it can be skipped here.
|
||||
cd ../../class/fs
|
||||
ln -s ../../header/h
|
||||
cd ../../class/hs
|
||||
ln -s ../../header/h
|
||||
cd ../../class/ss
|
||||
ln -s ../../header/h
|
||||
cd ../../../control
|
||||
mkdir header/h
|
||||
ln -s header/h class/fs
|
||||
ln -s header/h class/ss
|
||||
|
||||
|
||||
Extension Unit Support
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
A UVC Extension Unit (XU) basically provides a distinct unit to which control set
|
||||
and get requests can be addressed. The meaning of those control requests is
|
||||
entirely implementation dependent, but may be used to control settings outside
|
||||
of the UVC specification (for example enabling or disabling video effects). An
|
||||
XU can be inserted into the UVC unit chain or left free-hanging.
|
||||
|
||||
Configuring an extension unit involves creating an entry in the appropriate
|
||||
directory and setting its attributes appropriately, like so:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
mkdir $FUNCTION/control/extensions/xu.0
|
||||
pushd $FUNCTION/control/extensions/xu.0
|
||||
|
||||
# Set the bUnitID of the Processing Unit as the source for this
|
||||
# Extension Unit
|
||||
echo 2 > baSourceID
|
||||
|
||||
# Set this XU as the source of the default output terminal. This inserts
|
||||
# the XU into the UVC chain between the PU and OT such that the final
|
||||
# chain is IT > PU > XU.0 > OT
|
||||
cat bUnitID > ../../terminal/output/default/baSourceID
|
||||
|
||||
# Flag some controls as being available for use. The bmControl field is
|
||||
# a bitmap with each bit denoting the availability of a particular
|
||||
# control. For example to flag the 0th, 2nd and 3rd controls available:
|
||||
echo 0x0d > bmControls
|
||||
|
||||
# Set the GUID; this is a vendor-specific code identifying the XU.
|
||||
echo -e -n "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10" > guidExtensionCode
|
||||
|
||||
popd
|
||||
|
||||
The bmControls attribute and the baSourceID attribute are multi-value attributes.
|
||||
This means that you may write multiple newline separated values to them. For
|
||||
example to flag the 1st, 2nd, 9th and 10th controls as being available you would
|
||||
need to write two values to bmControls, like so:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
cat << EOF > bmControls
|
||||
0x03
|
||||
0x03
|
||||
EOF
|
||||
|
||||
The multi-value nature of the baSourceID attribute belies the fact that XUs can
|
||||
be multiple-input, though note that this currently has no significant effect.
|
||||
|
||||
The bControlSize attribute reflects the size of the bmControls attribute, and
|
||||
similarly bNrInPins reflects the size of the baSourceID attributes. Both
|
||||
attributes are automatically increased / decreased as you set bmControls and
|
||||
baSourceID. It is also possible to manually increase or decrease bControlSize
|
||||
which has the effect of truncating entries to the new size, or padding entries
|
||||
out with 0x00, for example:
|
||||
|
||||
::
|
||||
|
||||
$ cat bmControls
|
||||
0x03
|
||||
0x05
|
||||
|
||||
$ cat bControlSize
|
||||
2
|
||||
|
||||
$ echo 1 > bControlSize
|
||||
$ cat bmControls
|
||||
0x03
|
||||
|
||||
$ echo 2 > bControlSize
|
||||
$ cat bmControls
|
||||
0x03
|
||||
0x00
|
||||
|
||||
bNrInPins and baSourceID function in the same way.
|
||||
|
||||
Custom Strings Support
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
String descriptors that provide a textual description for various parts of a
|
||||
USB device can be defined in the usual place within USB configfs, and may then
|
||||
be linked to from the UVC function root or from Extension Unit directories to
|
||||
assign those strings as descriptors:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Create a string descriptor in us-EN and link to it from the function
|
||||
# root. The name of the link is significant here, as it declares this
|
||||
# descriptor to be intended for the Interface Association Descriptor.
|
||||
# Other significant link names at function root are vs0_desc and vs1_desc
|
||||
# For the VideoStreaming Interface 0/1 Descriptors.
|
||||
|
||||
mkdir -p $GADGET/strings/0x409/iad_desc
|
||||
echo -n "Interface Associaton Descriptor" > $GADGET/strings/0x409/iad_desc/s
|
||||
ln -s $GADGET/strings/0x409/iad_desc $FUNCTION/iad_desc
|
||||
|
||||
# Because the link to a String Descriptor from an Extension Unit clearly
|
||||
# associates the two, the name of this link is not significant and may
|
||||
# be set freely.
|
||||
|
||||
mkdir -p $GADGET/strings/0x409/xu.0
|
||||
echo -n "A Very Useful Extension Unit" > $GADGET/strings/0x409/xu.0/s
|
||||
ln -s $GADGET/strings/0x409/xu.0 $FUNCTION/control/extensions/xu.0
|
||||
|
||||
The interrupt endpoint
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The VideoControl interface has an optional interrupt endpoint which is by default
|
||||
disabled. This is intended to support delayed response control set requests for
|
||||
UVC (which should respond through the interrupt endpoint rather than tying up
|
||||
endpoint 0). At present support for sending data through this endpoint is missing
|
||||
and so it is left disabled to avoid confusion. If you wish to enable it you can
|
||||
do so through the configfs attribute:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
echo 1 > $FUNCTION/control/enable_interrupt_ep
|
||||
|
||||
Bandwidth configuration
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
There are three attributes which control the bandwidth of the USB connection.
|
||||
These live in the function root and can be set within limits:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# streaming_interval sets bInterval. Values range from 1..255
|
||||
echo 1 > $FUNCTION/streaming_interval
|
||||
|
||||
# streaming_maxpacket sets wMaxPacketSize. Valid values are 1024/2048/3072
|
||||
echo 3072 > $FUNCTION/streaming_maxpacket
|
||||
|
||||
# streaming_maxburst sets bMaxBurst. Valid values are 1..15
|
||||
echo 1 > $FUNCTION/streaming_maxburst
|
||||
|
||||
|
||||
The values passed here will be clamped to valid values according to the UVC
|
||||
specification (which depend on the speed of the USB connection). To understand
|
||||
how the settings influence bandwidth you should consult the UVC specifications,
|
||||
but a rule of thumb is that increasing the streaming_maxpacket setting will
|
||||
improve bandwidth (and thus the maximum possible framerate), whilst the same is
|
||||
true for streaming_maxburst provided the USB connection is running at SuperSpeed.
|
||||
Increasing streaming_interval will reduce bandwidth and framerate.
|
||||
|
||||
The userspace application
|
||||
-------------------------
|
||||
By itself, the UVC Gadget driver cannot do anything particularly interesting. It
|
||||
must be paired with a userspace program that responds to UVC control requests and
|
||||
fills buffers to be queued to the V4L2 device that the driver creates. How those
|
||||
things are achieved is implementation dependent and beyond the scope of this
|
||||
document, but a reference application can be found at https://gitlab.freedesktop.org/camera/uvc-gadget
|
@ -16,6 +16,7 @@ USB support
|
||||
gadget_multi
|
||||
gadget_printer
|
||||
gadget_serial
|
||||
gadget_uvc
|
||||
gadget-testing
|
||||
iuu_phoenix
|
||||
mass-storage
|
||||
|
@ -8296,11 +8296,11 @@ ENOSYS for the others.
|
||||
8.35 KVM_CAP_PMU_CAPABILITY
|
||||
---------------------------
|
||||
|
||||
:Capability KVM_CAP_PMU_CAPABILITY
|
||||
:Capability: KVM_CAP_PMU_CAPABILITY
|
||||
:Architectures: x86
|
||||
:Type: vm
|
||||
:Parameters: arg[0] is bitmask of PMU virtualization capabilities.
|
||||
:Returns 0 on success, -EINVAL when arg[0] contains invalid bits
|
||||
:Returns: 0 on success, -EINVAL when arg[0] contains invalid bits
|
||||
|
||||
This capability alters PMU virtualization in KVM.
|
||||
|
||||
|
33
MAINTAINERS
33
MAINTAINERS
@ -73,7 +73,7 @@ Tips for patch submitters
|
||||
and ideally, should come with a patch proposal. Please do not send
|
||||
automated reports to this list either. Such bugs will be handled
|
||||
better and faster in the usual public places. See
|
||||
Documentation/admin-guide/security-bugs.rst for details.
|
||||
Documentation/process/security-bugs.rst for details.
|
||||
|
||||
8. Happy hacking.
|
||||
|
||||
@ -224,13 +224,13 @@ S: Orphan / Obsolete
|
||||
F: drivers/net/ethernet/8390/
|
||||
|
||||
9P FILE SYSTEM
|
||||
M: Eric Van Hensbergen <ericvh@gmail.com>
|
||||
M: Eric Van Hensbergen <ericvh@kernel.org>
|
||||
M: Latchesar Ionkov <lucho@ionkov.net>
|
||||
M: Dominique Martinet <asmadeus@codewreck.org>
|
||||
R: Christian Schoenebeck <linux_oss@crudebyte.com>
|
||||
L: v9fs-developer@lists.sourceforge.net
|
||||
L: v9fs@lists.linux.dev
|
||||
S: Maintained
|
||||
W: http://swik.net/v9fs
|
||||
W: http://github.com/v9fs
|
||||
Q: http://patchwork.kernel.org/project/v9fs-devel/list/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs.git
|
||||
T: git git://github.com/martinetd/linux.git
|
||||
@ -4461,14 +4461,14 @@ F: Documentation/devicetree/bindings/net/ieee802154/ca8210.txt
|
||||
F: drivers/net/ieee802154/ca8210.c
|
||||
|
||||
CANAAN/KENDRYTE K210 SOC FPIOA DRIVER
|
||||
M: Damien Le Moal <damien.lemoal@wdc.com>
|
||||
M: Damien Le Moal <dlemoal@kernel.org>
|
||||
L: linux-riscv@lists.infradead.org
|
||||
L: linux-gpio@vger.kernel.org (pinctrl driver)
|
||||
F: Documentation/devicetree/bindings/pinctrl/canaan,k210-fpioa.yaml
|
||||
F: drivers/pinctrl/pinctrl-k210.c
|
||||
|
||||
CANAAN/KENDRYTE K210 SOC RESET CONTROLLER DRIVER
|
||||
M: Damien Le Moal <damien.lemoal@wdc.com>
|
||||
M: Damien Le Moal <dlemoal@kernel.org>
|
||||
L: linux-kernel@vger.kernel.org
|
||||
L: linux-riscv@lists.infradead.org
|
||||
S: Maintained
|
||||
@ -4476,7 +4476,7 @@ F: Documentation/devicetree/bindings/reset/canaan,k210-rst.yaml
|
||||
F: drivers/reset/reset-k210.c
|
||||
|
||||
CANAAN/KENDRYTE K210 SOC SYSTEM CONTROLLER DRIVER
|
||||
M: Damien Le Moal <damien.lemoal@wdc.com>
|
||||
M: Damien Le Moal <dlemoal@kernel.org>
|
||||
L: linux-riscv@lists.infradead.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/mfd/canaan,k210-sysctl.yaml
|
||||
@ -8216,6 +8216,7 @@ F: drivers/net/ethernet/freescale/dpaa
|
||||
|
||||
FREESCALE QORIQ DPAA FMAN DRIVER
|
||||
M: Madalin Bucur <madalin.bucur@nxp.com>
|
||||
R: Sean Anderson <sean.anderson@seco.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/net/fsl-fman.txt
|
||||
@ -11757,7 +11758,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
|
||||
F: drivers/ata/sata_promise.*
|
||||
|
||||
LIBATA SUBSYSTEM (Serial and Parallel ATA drivers)
|
||||
M: Damien Le Moal <damien.lemoal@opensource.wdc.com>
|
||||
M: Damien Le Moal <dlemoal@kernel.org>
|
||||
L: linux-ide@vger.kernel.org
|
||||
S: Maintained
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata.git
|
||||
@ -14656,10 +14657,8 @@ F: net/ipv4/nexthop.c
|
||||
|
||||
NFC SUBSYSTEM
|
||||
M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
|
||||
L: linux-nfc@lists.01.org (subscribers-only)
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
B: mailto:linux-nfc@lists.01.org
|
||||
F: Documentation/devicetree/bindings/net/nfc/
|
||||
F: drivers/nfc/
|
||||
F: include/linux/platform_data/nfcmrvl.h
|
||||
@ -14670,7 +14669,6 @@ F: net/nfc/
|
||||
NFC VIRTUAL NCI DEVICE DRIVER
|
||||
M: Bongsu Jeon <bongsu.jeon@samsung.com>
|
||||
L: netdev@vger.kernel.org
|
||||
L: linux-nfc@lists.01.org (subscribers-only)
|
||||
S: Supported
|
||||
F: drivers/nfc/virtual_ncidev.c
|
||||
F: tools/testing/selftests/nci/
|
||||
@ -15042,7 +15040,6 @@ F: Documentation/devicetree/bindings/sound/nxp,tfa989x.yaml
|
||||
F: sound/soc/codecs/tfa989x.c
|
||||
|
||||
NXP-NCI NFC DRIVER
|
||||
L: linux-nfc@lists.01.org (subscribers-only)
|
||||
S: Orphan
|
||||
F: Documentation/devicetree/bindings/net/nfc/nxp,nci.yaml
|
||||
F: drivers/nfc/nxp-nci
|
||||
@ -18291,8 +18288,9 @@ F: drivers/s390/block/dasd*
|
||||
F: include/linux/dasd_mod.h
|
||||
|
||||
S390 IOMMU (PCI)
|
||||
M: Niklas Schnelle <schnelle@linux.ibm.com>
|
||||
M: Matthew Rosato <mjrosato@linux.ibm.com>
|
||||
M: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
|
||||
R: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
|
||||
L: linux-s390@vger.kernel.org
|
||||
S: Supported
|
||||
F: drivers/iommu/s390-iommu.c
|
||||
@ -18487,7 +18485,6 @@ F: include/media/drv-intf/s3c_camif.h
|
||||
|
||||
SAMSUNG S3FWRN5 NFC DRIVER
|
||||
M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
|
||||
L: linux-nfc@lists.01.org (subscribers-only)
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml
|
||||
F: drivers/nfc/s3fwrn5
|
||||
@ -18802,7 +18799,7 @@ F: include/uapi/linux/sed*
|
||||
SECURITY CONTACT
|
||||
M: Security Officers <security@kernel.org>
|
||||
S: Supported
|
||||
F: Documentation/admin-guide/security-bugs.rst
|
||||
F: Documentation/process/security-bugs.rst
|
||||
|
||||
SECURITY SUBSYSTEM
|
||||
M: Paul Moore <paul@paul-moore.com>
|
||||
@ -20645,7 +20642,6 @@ F: sound/soc/codecs/tscs*.h
|
||||
TENSILICA XTENSA PORT (xtensa)
|
||||
M: Chris Zankel <chris@zankel.net>
|
||||
M: Max Filippov <jcmvbkbc@gmail.com>
|
||||
L: linux-xtensa@linux-xtensa.org
|
||||
S: Maintained
|
||||
T: git https://github.com/jcmvbkbc/linux-xtensa.git
|
||||
F: arch/xtensa/
|
||||
@ -20981,7 +20977,6 @@ F: drivers/iio/magnetometer/tmag5273.c
|
||||
TI TRF7970A NFC DRIVER
|
||||
M: Mark Greer <mgreer@animalcreek.com>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
L: linux-nfc@lists.01.org (subscribers-only)
|
||||
S: Supported
|
||||
F: Documentation/devicetree/bindings/net/nfc/ti,trf7970a.yaml
|
||||
F: drivers/nfc/trf7970a.c
|
||||
@ -21643,6 +21638,7 @@ USB OVER IP DRIVER
|
||||
M: Valentina Manea <valentina.manea.m@gmail.com>
|
||||
M: Shuah Khan <shuah@kernel.org>
|
||||
M: Shuah Khan <skhan@linuxfoundation.org>
|
||||
R: Hongren Zheng <i@zenithal.me>
|
||||
L: linux-usb@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/usb/usbip_protocol.rst
|
||||
@ -23037,7 +23033,6 @@ F: drivers/gpio/gpio-xra1403.c
|
||||
|
||||
XTENSA XTFPGA PLATFORM SUPPORT
|
||||
M: Max Filippov <jcmvbkbc@gmail.com>
|
||||
L: linux-xtensa@linux-xtensa.org
|
||||
S: Maintained
|
||||
F: drivers/spi/spi-xtensa-xtfpga.c
|
||||
F: sound/soc/xtensa/xtfpga-i2s.c
|
||||
@ -23120,7 +23115,7 @@ S: Maintained
|
||||
F: arch/x86/kernel/cpu/zhaoxin.c
|
||||
|
||||
ZONEFS FILESYSTEM
|
||||
M: Damien Le Moal <damien.lemoal@opensource.wdc.com>
|
||||
M: Damien Le Moal <dlemoal@kernel.org>
|
||||
M: Naohiro Aota <naohiro.aota@wdc.com>
|
||||
R: Johannes Thumshirn <jth@kernel.org>
|
||||
L: linux-fsdevel@vger.kernel.org
|
||||
|
2
Makefile
2
Makefile
@ -2,7 +2,7 @@
|
||||
VERSION = 6
|
||||
PATCHLEVEL = 3
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc3
|
||||
EXTRAVERSION = -rc7
|
||||
NAME = Hurr durr I'ma ninja sloth
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
@ -311,6 +311,7 @@ &usdhc3 {
|
||||
|
||||
&usbotg1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_usbotg1>;
|
||||
disable-over-current;
|
||||
srp-disable;
|
||||
hnp-disable;
|
||||
|
@ -321,6 +321,7 @@ &usdhc3 {
|
||||
|
||||
&usbotg1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_usbotg1>;
|
||||
disable-over-current;
|
||||
srp-disable;
|
||||
hnp-disable;
|
||||
|
@ -625,6 +625,7 @@ &usdhc3 {
|
||||
|
||||
&usbotg1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_usbotg1>;
|
||||
disable-over-current;
|
||||
srp-disable;
|
||||
hnp-disable;
|
||||
|
@ -27,6 +27,16 @@ chosen {
|
||||
};
|
||||
|
||||
reserved-memory {
|
||||
sbl_region: sbl@2f00000 {
|
||||
reg = <0x02f00000 0x100000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
external_image_region: external-image@3100000 {
|
||||
reg = <0x03100000 0x200000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
adsp_region: adsp@3300000 {
|
||||
reg = <0x03300000 0x1400000>;
|
||||
no-map;
|
||||
|
@ -116,7 +116,7 @@ __copy_to_user_memcpy(void __user *to, const void *from, unsigned long n)
|
||||
tocopy = n;
|
||||
|
||||
ua_flags = uaccess_save_and_enable();
|
||||
memcpy((void *)to, from, tocopy);
|
||||
__memcpy((void *)to, from, tocopy);
|
||||
uaccess_restore(ua_flags);
|
||||
to += tocopy;
|
||||
from += tocopy;
|
||||
@ -178,7 +178,7 @@ __clear_user_memset(void __user *addr, unsigned long n)
|
||||
tocopy = n;
|
||||
|
||||
ua_flags = uaccess_save_and_enable();
|
||||
memset((void *)addr, 0, tocopy);
|
||||
__memset((void *)addr, 0, tocopy);
|
||||
uaccess_restore(ua_flags);
|
||||
addr += tocopy;
|
||||
n -= tocopy;
|
||||
|
@ -56,14 +56,10 @@ qsgmii_phy3: ethernet-phy@10 {
|
||||
};
|
||||
|
||||
&enetc_port2 {
|
||||
nvmem-cells = <&base_mac_address 2>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&enetc_port3 {
|
||||
nvmem-cells = <&base_mac_address 3>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@ -84,8 +80,6 @@ &mscc_felix_port0 {
|
||||
managed = "in-band-status";
|
||||
phy-handle = <&qsgmii_phy0>;
|
||||
phy-mode = "qsgmii";
|
||||
nvmem-cells = <&base_mac_address 4>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@ -94,8 +88,6 @@ &mscc_felix_port1 {
|
||||
managed = "in-band-status";
|
||||
phy-handle = <&qsgmii_phy1>;
|
||||
phy-mode = "qsgmii";
|
||||
nvmem-cells = <&base_mac_address 5>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@ -104,8 +96,6 @@ &mscc_felix_port2 {
|
||||
managed = "in-band-status";
|
||||
phy-handle = <&qsgmii_phy2>;
|
||||
phy-mode = "qsgmii";
|
||||
nvmem-cells = <&base_mac_address 6>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@ -114,8 +104,6 @@ &mscc_felix_port3 {
|
||||
managed = "in-band-status";
|
||||
phy-handle = <&qsgmii_phy3>;
|
||||
phy-mode = "qsgmii";
|
||||
nvmem-cells = <&base_mac_address 7>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
@ -55,7 +55,5 @@ &enetc_port0 {
|
||||
&enetc_port1 {
|
||||
phy-handle = <&phy0>;
|
||||
phy-mode = "rgmii-id";
|
||||
nvmem-cells = <&base_mac_address 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
status = "okay";
|
||||
};
|
||||
|
@ -36,14 +36,10 @@ &enetc_port0 {
|
||||
};
|
||||
|
||||
&enetc_port2 {
|
||||
nvmem-cells = <&base_mac_address 2>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&enetc_port3 {
|
||||
nvmem-cells = <&base_mac_address 3>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@ -56,8 +52,6 @@ &mscc_felix_port0 {
|
||||
managed = "in-band-status";
|
||||
phy-handle = <&phy0>;
|
||||
phy-mode = "sgmii";
|
||||
nvmem-cells = <&base_mac_address 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@ -66,8 +60,6 @@ &mscc_felix_port1 {
|
||||
managed = "in-band-status";
|
||||
phy-handle = <&phy1>;
|
||||
phy-mode = "sgmii";
|
||||
nvmem-cells = <&base_mac_address 1>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
@ -43,7 +43,5 @@ vddh: vddh-regulator {
|
||||
&enetc_port1 {
|
||||
phy-handle = <&phy1>;
|
||||
phy-mode = "rgmii-id";
|
||||
nvmem-cells = <&base_mac_address 1>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
status = "okay";
|
||||
};
|
||||
|
@ -92,8 +92,6 @@ &enetc_port0 {
|
||||
phy-handle = <&phy0>;
|
||||
phy-mode = "sgmii";
|
||||
managed = "in-band-status";
|
||||
nvmem-cells = <&base_mac_address 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@ -156,21 +154,6 @@ partition@3e0000 {
|
||||
label = "bootloader environment";
|
||||
};
|
||||
};
|
||||
|
||||
otp-1 {
|
||||
compatible = "user-otp";
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "kontron,sl28-vpd";
|
||||
|
||||
serial_number: serial-number {
|
||||
};
|
||||
|
||||
base_mac_address: base-mac-address {
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -117,7 +117,7 @@ flexspi0: spi@5d120000 {
|
||||
interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk IMX_SC_R_FSPI_0 IMX_SC_PM_CLK_PER>,
|
||||
<&clk IMX_SC_R_FSPI_0 IMX_SC_PM_CLK_PER>;
|
||||
clock-names = "fspi", "fspi_en";
|
||||
clock-names = "fspi_en", "fspi";
|
||||
power-domains = <&pd IMX_SC_R_FSPI_0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
@ -121,8 +121,6 @@ &eqos {
|
||||
phy-handle = <ðphy0>;
|
||||
nvmem-cells = <&fec_mac1>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
snps,reset-gpios = <&pca6416_1 2 GPIO_ACTIVE_LOW>;
|
||||
snps,reset-delays-us = <10 20 200000>;
|
||||
status = "okay";
|
||||
|
||||
mdio {
|
||||
@ -136,6 +134,9 @@ ethphy0: ethernet-phy@0 {
|
||||
eee-broken-1000t;
|
||||
qca,disable-smarteee;
|
||||
qca,disable-hibernation-mode;
|
||||
reset-gpios = <&pca6416_1 2 GPIO_ACTIVE_LOW>;
|
||||
reset-assert-us = <20>;
|
||||
reset-deassert-us = <200000>;
|
||||
vddio-supply = <&vddio0>;
|
||||
|
||||
vddio0: vddio-regulator {
|
||||
|
@ -247,7 +247,7 @@ wm8960: codec@1a {
|
||||
compatible = "wlf,wm8960";
|
||||
reg = <0x1a>;
|
||||
clocks = <&clk IMX8MM_CLK_SAI1_ROOT>;
|
||||
clock-names = "mclk1";
|
||||
clock-names = "mclk";
|
||||
wlf,shared-lrclk;
|
||||
#sound-dai-cells = <0>;
|
||||
};
|
||||
|
@ -296,6 +296,7 @@ spba2: spba-bus@30000000 {
|
||||
sai2: sai@30020000 {
|
||||
compatible = "fsl,imx8mn-sai", "fsl,imx8mq-sai";
|
||||
reg = <0x30020000 0x10000>;
|
||||
#sound-dai-cells = <0>;
|
||||
interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk IMX8MN_CLK_SAI2_IPG>,
|
||||
<&clk IMX8MN_CLK_DUMMY>,
|
||||
@ -310,6 +311,7 @@ sai2: sai@30020000 {
|
||||
sai3: sai@30030000 {
|
||||
compatible = "fsl,imx8mn-sai", "fsl,imx8mq-sai";
|
||||
reg = <0x30030000 0x10000>;
|
||||
#sound-dai-cells = <0>;
|
||||
interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk IMX8MN_CLK_SAI3_IPG>,
|
||||
<&clk IMX8MN_CLK_DUMMY>,
|
||||
@ -324,6 +326,7 @@ sai3: sai@30030000 {
|
||||
sai5: sai@30050000 {
|
||||
compatible = "fsl,imx8mn-sai", "fsl,imx8mq-sai";
|
||||
reg = <0x30050000 0x10000>;
|
||||
#sound-dai-cells = <0>;
|
||||
interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk IMX8MN_CLK_SAI5_IPG>,
|
||||
<&clk IMX8MN_CLK_DUMMY>,
|
||||
@ -340,6 +343,7 @@ sai5: sai@30050000 {
|
||||
sai6: sai@30060000 {
|
||||
compatible = "fsl,imx8mn-sai", "fsl,imx8mq-sai";
|
||||
reg = <0x30060000 0x10000>;
|
||||
#sound-dai-cells = <0>;
|
||||
interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk IMX8MN_CLK_SAI6_IPG>,
|
||||
<&clk IMX8MN_CLK_DUMMY>,
|
||||
@ -397,6 +401,7 @@ spdif1: spdif@30090000 {
|
||||
sai7: sai@300b0000 {
|
||||
compatible = "fsl,imx8mn-sai", "fsl,imx8mq-sai";
|
||||
reg = <0x300b0000 0x10000>;
|
||||
#sound-dai-cells = <0>;
|
||||
interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk IMX8MN_CLK_SAI7_IPG>,
|
||||
<&clk IMX8MN_CLK_DUMMY>,
|
||||
|
@ -1131,8 +1131,8 @@ lcdif2: display-controller@32e90000 {
|
||||
reg = <0x32e90000 0x238>;
|
||||
interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk IMX8MP_CLK_MEDIA_DISP2_PIX_ROOT>,
|
||||
<&clk IMX8MP_CLK_MEDIA_AXI_ROOT>,
|
||||
<&clk IMX8MP_CLK_MEDIA_APB_ROOT>;
|
||||
<&clk IMX8MP_CLK_MEDIA_APB_ROOT>,
|
||||
<&clk IMX8MP_CLK_MEDIA_AXI_ROOT>;
|
||||
clock-names = "pix", "axi", "disp_axi";
|
||||
assigned-clocks = <&clk IMX8MP_CLK_MEDIA_DISP2_PIX>,
|
||||
<&clk IMX8MP_VIDEO_PLL1>;
|
||||
|
@ -164,6 +164,8 @@ tpm2: pwm@44320000 {
|
||||
lpi2c1: i2c@44340000 {
|
||||
compatible = "fsl,imx93-lpi2c", "fsl,imx7ulp-lpi2c";
|
||||
reg = <0x44340000 0x10000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk IMX93_CLK_LPI2C1_GATE>,
|
||||
<&clk IMX93_CLK_BUS_AON>;
|
||||
@ -174,6 +176,8 @@ lpi2c1: i2c@44340000 {
|
||||
lpi2c2: i2c@44350000 {
|
||||
compatible = "fsl,imx93-lpi2c", "fsl,imx7ulp-lpi2c";
|
||||
reg = <0x44350000 0x10000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk IMX93_CLK_LPI2C2_GATE>,
|
||||
<&clk IMX93_CLK_BUS_AON>;
|
||||
@ -343,6 +347,8 @@ tpm6: pwm@42510000 {
|
||||
lpi2c3: i2c@42530000 {
|
||||
compatible = "fsl,imx93-lpi2c", "fsl,imx7ulp-lpi2c";
|
||||
reg = <0x42530000 0x10000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk IMX93_CLK_LPI2C3_GATE>,
|
||||
<&clk IMX93_CLK_BUS_WAKEUP>;
|
||||
@ -353,6 +359,8 @@ lpi2c3: i2c@42530000 {
|
||||
lpi2c4: i2c@42540000 {
|
||||
compatible = "fsl,imx93-lpi2c", "fsl,imx7ulp-lpi2c";
|
||||
reg = <0x42540000 0x10000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
interrupts = <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk IMX93_CLK_LPI2C4_GATE>,
|
||||
<&clk IMX93_CLK_BUS_WAKEUP>;
|
||||
@ -455,6 +463,8 @@ lpuart8: serial@426a0000 {
|
||||
lpi2c5: i2c@426b0000 {
|
||||
compatible = "fsl,imx93-lpi2c", "fsl,imx7ulp-lpi2c";
|
||||
reg = <0x426b0000 0x10000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
interrupts = <GIC_SPI 195 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk IMX93_CLK_LPI2C5_GATE>,
|
||||
<&clk IMX93_CLK_BUS_WAKEUP>;
|
||||
@ -465,6 +475,8 @@ lpi2c5: i2c@426b0000 {
|
||||
lpi2c6: i2c@426c0000 {
|
||||
compatible = "fsl,imx93-lpi2c", "fsl,imx7ulp-lpi2c";
|
||||
reg = <0x426c0000 0x10000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk IMX93_CLK_LPI2C6_GATE>,
|
||||
<&clk IMX93_CLK_BUS_WAKEUP>;
|
||||
@ -475,6 +487,8 @@ lpi2c6: i2c@426c0000 {
|
||||
lpi2c7: i2c@426d0000 {
|
||||
compatible = "fsl,imx93-lpi2c", "fsl,imx7ulp-lpi2c";
|
||||
reg = <0x426d0000 0x10000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
interrupts = <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk IMX93_CLK_LPI2C7_GATE>,
|
||||
<&clk IMX93_CLK_BUS_WAKEUP>;
|
||||
@ -485,6 +499,8 @@ lpi2c7: i2c@426d0000 {
|
||||
lpi2c8: i2c@426e0000 {
|
||||
compatible = "fsl,imx93-lpi2c", "fsl,imx7ulp-lpi2c";
|
||||
reg = <0x426e0000 0x10000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
interrupts = <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk IMX93_CLK_LPI2C8_GATE>,
|
||||
<&clk IMX93_CLK_BUS_WAKEUP>;
|
||||
@ -580,9 +596,9 @@ usdhc2: mmc@42860000 {
|
||||
eqos: ethernet@428a0000 {
|
||||
compatible = "nxp,imx93-dwmac-eqos", "snps,dwmac-5.10a";
|
||||
reg = <0x428a0000 0x10000>;
|
||||
interrupts = <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "eth_wake_irq", "macirq";
|
||||
interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "macirq", "eth_wake_irq";
|
||||
clocks = <&clk IMX93_CLK_ENET_QOS_GATE>,
|
||||
<&clk IMX93_CLK_ENET_QOS_GATE>,
|
||||
<&clk IMX93_CLK_ENET_TIMER2>,
|
||||
@ -595,7 +611,7 @@ eqos: ethernet@428a0000 {
|
||||
<&clk IMX93_CLK_SYS_PLL_PFD0_DIV2>;
|
||||
assigned-clock-rates = <100000000>, <250000000>;
|
||||
intf_mode = <&wakeupmix_gpr 0x28>;
|
||||
clk_csr = <0>;
|
||||
snps,clk-csr = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -22,7 +22,7 @@ bus@0 {
|
||||
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
ranges = <0x0 0x0 0x0 0x0 0x0 0x40000000>;
|
||||
ranges = <0x0 0x0 0x0 0x0 0x100 0x0>;
|
||||
|
||||
apbmisc: misc@100000 {
|
||||
compatible = "nvidia,tegra194-misc";
|
||||
|
@ -20,7 +20,7 @@ bus@0 {
|
||||
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
ranges = <0x0 0x0 0x0 0x0 0x0 0x40000000>;
|
||||
ranges = <0x0 0x0 0x0 0x0 0x100 0x0>;
|
||||
|
||||
misc@100000 {
|
||||
compatible = "nvidia,tegra234-misc";
|
||||
|
@ -33,7 +33,3 @@ &button_default {
|
||||
&gpio_leds_default {
|
||||
pins = "gpio81", "gpio82", "gpio83";
|
||||
};
|
||||
|
||||
&sim_ctrl_default {
|
||||
pins = "gpio1", "gpio2";
|
||||
};
|
||||
|
@ -25,6 +25,11 @@ &led_b {
|
||||
gpios = <&msmgpio 20 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
&mpss {
|
||||
pinctrl-0 = <&sim_ctrl_default>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&button_default {
|
||||
pins = "gpio37";
|
||||
bias-pull-down;
|
||||
@ -34,6 +39,25 @@ &gpio_leds_default {
|
||||
pins = "gpio20", "gpio21", "gpio22";
|
||||
};
|
||||
|
||||
&sim_ctrl_default {
|
||||
pins = "gpio1", "gpio2";
|
||||
/* This selects the external SIM card slot by default */
|
||||
&msmgpio {
|
||||
sim_ctrl_default: sim-ctrl-default-state {
|
||||
esim-sel-pins {
|
||||
pins = "gpio0", "gpio3";
|
||||
bias-disable;
|
||||
output-low;
|
||||
};
|
||||
|
||||
sim-en-pins {
|
||||
pins = "gpio1";
|
||||
bias-disable;
|
||||
output-low;
|
||||
};
|
||||
|
||||
sim-sel-pins {
|
||||
pins = "gpio2";
|
||||
bias-disable;
|
||||
output-high;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -92,9 +92,6 @@ &gcc {
|
||||
};
|
||||
|
||||
&mpss {
|
||||
pinctrl-0 = <&sim_ctrl_default>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@ -240,11 +237,4 @@ gpio_leds_default: gpio-leds-default-state {
|
||||
drive-strength = <2>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
sim_ctrl_default: sim-ctrl-default-state {
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-disable;
|
||||
output-low;
|
||||
};
|
||||
};
|
||||
|
@ -241,7 +241,7 @@ &qup2 {
|
||||
};
|
||||
|
||||
&remoteproc_nsp0 {
|
||||
firmware-name = "qcom/sa8540p/cdsp.mbn";
|
||||
firmware-name = "qcom/sa8540p/cdsp0.mbn";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
@ -2131,6 +2131,8 @@ pcie1: pci@1c08000 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pcie1_clkreq_n>;
|
||||
|
||||
dma-coherent;
|
||||
|
||||
iommus = <&apps_smmu 0x1c80 0x1>;
|
||||
|
||||
iommu-map = <0x0 &apps_smmu 0x1c80 0x1>,
|
||||
|
@ -370,6 +370,7 @@ vreg_s10b: smps10 {
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vreg_s11b: smps11 {
|
||||
@ -377,6 +378,7 @@ vreg_s11b: smps11 {
|
||||
regulator-min-microvolt = <1272000>;
|
||||
regulator-max-microvolt = <1272000>;
|
||||
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vreg_s12b: smps12 {
|
||||
@ -384,6 +386,7 @@ vreg_s12b: smps12 {
|
||||
regulator-min-microvolt = <984000>;
|
||||
regulator-max-microvolt = <984000>;
|
||||
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vreg_l3b: ldo3 {
|
||||
@ -441,6 +444,7 @@ vreg_bob: bob {
|
||||
regulator-min-microvolt = <3008000>;
|
||||
regulator-max-microvolt = <3960000>;
|
||||
regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
|
||||
regulator-always-on;
|
||||
};
|
||||
};
|
||||
|
||||
@ -772,75 +776,88 @@ &pmk8280_vadc {
|
||||
pmic-die-temp@3 {
|
||||
reg = <PMK8350_ADC7_DIE_TEMP>;
|
||||
qcom,pre-scaling = <1 1>;
|
||||
label = "pmk8350_die_temp";
|
||||
};
|
||||
|
||||
xo-therm@44 {
|
||||
reg = <PMK8350_ADC7_AMUX_THM1_100K_PU>;
|
||||
qcom,hw-settle-time = <200>;
|
||||
qcom,ratiometric;
|
||||
label = "pmk8350_xo_therm";
|
||||
};
|
||||
|
||||
pmic-die-temp@103 {
|
||||
reg = <PM8350_ADC7_DIE_TEMP(1)>;
|
||||
qcom,pre-scaling = <1 1>;
|
||||
label = "pmc8280_1_die_temp";
|
||||
};
|
||||
|
||||
sys-therm@144 {
|
||||
reg = <PM8350_ADC7_AMUX_THM1_100K_PU(1)>;
|
||||
qcom,hw-settle-time = <200>;
|
||||
qcom,ratiometric;
|
||||
label = "sys_therm1";
|
||||
};
|
||||
|
||||
sys-therm@145 {
|
||||
reg = <PM8350_ADC7_AMUX_THM2_100K_PU(1)>;
|
||||
qcom,hw-settle-time = <200>;
|
||||
qcom,ratiometric;
|
||||
label = "sys_therm2";
|
||||
};
|
||||
|
||||
sys-therm@146 {
|
||||
reg = <PM8350_ADC7_AMUX_THM3_100K_PU(1)>;
|
||||
qcom,hw-settle-time = <200>;
|
||||
qcom,ratiometric;
|
||||
label = "sys_therm3";
|
||||
};
|
||||
|
||||
sys-therm@147 {
|
||||
reg = <PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
|
||||
qcom,hw-settle-time = <200>;
|
||||
qcom,ratiometric;
|
||||
label = "sys_therm4";
|
||||
};
|
||||
|
||||
pmic-die-temp@303 {
|
||||
reg = <PM8350_ADC7_DIE_TEMP(3)>;
|
||||
qcom,pre-scaling = <1 1>;
|
||||
label = "pmc8280_2_die_temp";
|
||||
};
|
||||
|
||||
sys-therm@344 {
|
||||
reg = <PM8350_ADC7_AMUX_THM1_100K_PU(3)>;
|
||||
qcom,hw-settle-time = <200>;
|
||||
qcom,ratiometric;
|
||||
label = "sys_therm5";
|
||||
};
|
||||
|
||||
sys-therm@345 {
|
||||
reg = <PM8350_ADC7_AMUX_THM2_100K_PU(3)>;
|
||||
qcom,hw-settle-time = <200>;
|
||||
qcom,ratiometric;
|
||||
label = "sys_therm6";
|
||||
};
|
||||
|
||||
sys-therm@346 {
|
||||
reg = <PM8350_ADC7_AMUX_THM3_100K_PU(3)>;
|
||||
qcom,hw-settle-time = <200>;
|
||||
qcom,ratiometric;
|
||||
label = "sys_therm7";
|
||||
};
|
||||
|
||||
sys-therm@347 {
|
||||
reg = <PM8350_ADC7_AMUX_THM4_100K_PU(3)>;
|
||||
qcom,hw-settle-time = <200>;
|
||||
qcom,ratiometric;
|
||||
label = "sys_therm8";
|
||||
};
|
||||
|
||||
pmic-die-temp@403 {
|
||||
reg = <PMR735A_ADC7_DIE_TEMP>;
|
||||
qcom,pre-scaling = <1 1>;
|
||||
label = "pmr735a_die_temp";
|
||||
};
|
||||
};
|
||||
|
||||
@ -884,9 +901,9 @@ &sound {
|
||||
"VA DMIC0", "MIC BIAS1",
|
||||
"VA DMIC1", "MIC BIAS1",
|
||||
"VA DMIC2", "MIC BIAS3",
|
||||
"TX DMIC0", "MIC BIAS1",
|
||||
"TX DMIC1", "MIC BIAS2",
|
||||
"TX DMIC2", "MIC BIAS3",
|
||||
"VA DMIC0", "VA MIC BIAS1",
|
||||
"VA DMIC1", "VA MIC BIAS1",
|
||||
"VA DMIC2", "VA MIC BIAS3",
|
||||
"TX SWR_ADC1", "ADC2_OUTPUT";
|
||||
|
||||
wcd-playback-dai-link {
|
||||
@ -937,7 +954,7 @@ platform {
|
||||
va-dai-link {
|
||||
link-name = "VA Capture";
|
||||
cpu {
|
||||
sound-dai = <&q6apmbedai TX_CODEC_DMA_TX_3>;
|
||||
sound-dai = <&q6apmbedai VA_CODEC_DMA_TX_0>;
|
||||
};
|
||||
|
||||
platform {
|
||||
@ -1062,7 +1079,7 @@ &vamacro {
|
||||
|
||||
vdd-micb-supply = <&vreg_s10b>;
|
||||
|
||||
qcom,dmic-sample-rate = <600000>;
|
||||
qcom,dmic-sample-rate = <4800000>;
|
||||
|
||||
status = "okay";
|
||||
};
|
||||
|
@ -2504,12 +2504,12 @@ swr1: soundwire-controller@3210000 {
|
||||
qcom,ports-sinterval-low = /bits/ 8 <0x03 0x1f 0x1f 0x07 0x00>;
|
||||
qcom,ports-offset1 = /bits/ 8 <0x00 0x00 0x0B 0x01 0x00>;
|
||||
qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x0B 0x00 0x00>;
|
||||
qcom,ports-hstart = /bits/ 8 <0xff 0x03 0xff 0xff 0xff>;
|
||||
qcom,ports-hstop = /bits/ 8 <0xff 0x06 0xff 0xff 0xff>;
|
||||
qcom,ports-hstart = /bits/ 8 <0xff 0x03 0x00 0xff 0xff>;
|
||||
qcom,ports-hstop = /bits/ 8 <0xff 0x06 0x0f 0xff 0xff>;
|
||||
qcom,ports-word-length = /bits/ 8 <0x01 0x07 0x04 0xff 0xff>;
|
||||
qcom,ports-block-pack-mode = /bits/ 8 <0xff 0x00 0x01 0xff 0xff>;
|
||||
qcom,ports-block-pack-mode = /bits/ 8 <0xff 0xff 0x01 0xff 0xff>;
|
||||
qcom,ports-lane-control = /bits/ 8 <0x01 0x00 0x00 0x00 0x00>;
|
||||
qcom,ports-block-group-count = /bits/ 8 <0xff 0xff 0xff 0xff 0x00>;
|
||||
qcom,ports-block-group-count = /bits/ 8 <0xff 0xff 0xff 0xff 0xff>;
|
||||
|
||||
#sound-dai-cells = <1>;
|
||||
#address-cells = <2>;
|
||||
@ -2600,7 +2600,7 @@ swr2: soundwire-controller@3330000 {
|
||||
<&intc GIC_SPI 520 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "core", "wake";
|
||||
|
||||
clocks = <&vamacro>;
|
||||
clocks = <&txmacro>;
|
||||
clock-names = "iface";
|
||||
label = "TX";
|
||||
#sound-dai-cells = <1>;
|
||||
@ -2609,15 +2609,15 @@ swr2: soundwire-controller@3330000 {
|
||||
|
||||
qcom,din-ports = <4>;
|
||||
qcom,dout-ports = <0>;
|
||||
qcom,ports-sinterval-low = /bits/ 8 <0x01 0x03 0x03 0x03>;
|
||||
qcom,ports-offset1 = /bits/ 8 <0x01 0x00 0x02 0x01>;
|
||||
qcom,ports-sinterval-low = /bits/ 8 <0x01 0x01 0x03 0x03>;
|
||||
qcom,ports-offset1 = /bits/ 8 <0x01 0x00 0x02 0x00>;
|
||||
qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x00 0x00>;
|
||||
qcom,ports-block-pack-mode = /bits/ 8 <0xff 0xff 0xff 0xff>;
|
||||
qcom,ports-hstart = /bits/ 8 <0xff 0xff 0xff 0xff>;
|
||||
qcom,ports-hstop = /bits/ 8 <0xff 0xff 0xff 0xff>;
|
||||
qcom,ports-word-length = /bits/ 8 <0xff 0x00 0xff 0xff>;
|
||||
qcom,ports-word-length = /bits/ 8 <0xff 0xff 0xff 0xff>;
|
||||
qcom,ports-block-group-count = /bits/ 8 <0xff 0xff 0xff 0xff>;
|
||||
qcom,ports-lane-control = /bits/ 8 <0x00 0x01 0x00 0x00>;
|
||||
qcom,ports-lane-control = /bits/ 8 <0x00 0x01 0x00 0x01>;
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
@ -1078,6 +1078,7 @@ spi5: spi@4a94000 {
|
||||
dma-names = "tx", "rx";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -1209,6 +1209,7 @@ remoteproc_cdsp: remoteproc@b000000 {
|
||||
clock-names = "xo";
|
||||
|
||||
power-domains = <&rpmpd SM6375_VDDCX>;
|
||||
power-domain-names = "cx";
|
||||
|
||||
memory-region = <&pil_cdsp_mem>;
|
||||
|
||||
|
@ -1826,7 +1826,7 @@ pcie0: pci@1c00000 {
|
||||
"slave_q2a",
|
||||
"tbu";
|
||||
|
||||
iommus = <&apps_smmu 0x1d80 0x7f>;
|
||||
iommus = <&apps_smmu 0x1d80 0x3f>;
|
||||
iommu-map = <0x0 &apps_smmu 0x1d80 0x1>,
|
||||
<0x100 &apps_smmu 0x1d81 0x1>;
|
||||
|
||||
@ -1925,7 +1925,7 @@ pcie1: pci@1c08000 {
|
||||
assigned-clocks = <&gcc GCC_PCIE_1_AUX_CLK>;
|
||||
assigned-clock-rates = <19200000>;
|
||||
|
||||
iommus = <&apps_smmu 0x1e00 0x7f>;
|
||||
iommus = <&apps_smmu 0x1e00 0x3f>;
|
||||
iommu-map = <0x0 &apps_smmu 0x1e00 0x1>,
|
||||
<0x100 &apps_smmu 0x1e01 0x1>;
|
||||
|
||||
|
@ -625,6 +625,6 @@ &ufs_mem_phy {
|
||||
};
|
||||
|
||||
&venus {
|
||||
firmware-name = "qcom/sm8250/elish/venus.mbn";
|
||||
firmware-name = "qcom/sm8250/xiaomi/elish/venus.mbn";
|
||||
status = "okay";
|
||||
};
|
||||
|
@ -1664,6 +1664,7 @@ ufs_mem_hc: ufshc@1d84000 {
|
||||
power-domains = <&gcc UFS_PHY_GDSC>;
|
||||
|
||||
iommus = <&apps_smmu 0xe0 0x0>;
|
||||
dma-coherent;
|
||||
|
||||
clock-names =
|
||||
"core_clk",
|
||||
|
@ -2143,8 +2143,8 @@ wsa2macro: codec@31e0000 {
|
||||
<&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
|
||||
<&vamacro>;
|
||||
clock-names = "mclk", "npl", "macro", "dcodec", "fsgen";
|
||||
assigned-clocks = <&q6prmcc LPASS_CLK_ID_WSA_CORE_TX_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
|
||||
<&q6prmcc LPASS_CLK_ID_WSA_CORE_TX_2X_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
|
||||
assigned-clocks = <&q6prmcc LPASS_CLK_ID_WSA2_CORE_TX_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
|
||||
<&q6prmcc LPASS_CLK_ID_WSA2_CORE_TX_2X_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
|
||||
assigned-clock-rates = <19200000>, <19200000>;
|
||||
|
||||
#clock-cells = <0>;
|
||||
@ -4003,6 +4003,7 @@ ufs_mem_hc: ufshc@1d84000 {
|
||||
power-domains = <&gcc UFS_PHY_GDSC>;
|
||||
|
||||
iommus = <&apps_smmu 0xe0 0x0>;
|
||||
dma-coherent;
|
||||
|
||||
interconnects = <&aggre1_noc MASTER_UFS_MEM 0 &mc_virt SLAVE_EBI1 0>,
|
||||
<&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_UFS_MEM_CFG 0>;
|
||||
|
@ -66,7 +66,7 @@ cpus {
|
||||
|
||||
CPU0: cpu@0 {
|
||||
device_type = "cpu";
|
||||
compatible = "qcom,kryo";
|
||||
compatible = "arm,cortex-a510";
|
||||
reg = <0 0>;
|
||||
enable-method = "psci";
|
||||
next-level-cache = <&L2_0>;
|
||||
@ -89,7 +89,7 @@ L3_0: l3-cache {
|
||||
|
||||
CPU1: cpu@100 {
|
||||
device_type = "cpu";
|
||||
compatible = "qcom,kryo";
|
||||
compatible = "arm,cortex-a510";
|
||||
reg = <0 0x100>;
|
||||
enable-method = "psci";
|
||||
next-level-cache = <&L2_100>;
|
||||
@ -108,7 +108,7 @@ L2_100: l2-cache {
|
||||
|
||||
CPU2: cpu@200 {
|
||||
device_type = "cpu";
|
||||
compatible = "qcom,kryo";
|
||||
compatible = "arm,cortex-a510";
|
||||
reg = <0 0x200>;
|
||||
enable-method = "psci";
|
||||
next-level-cache = <&L2_200>;
|
||||
@ -127,7 +127,7 @@ L2_200: l2-cache {
|
||||
|
||||
CPU3: cpu@300 {
|
||||
device_type = "cpu";
|
||||
compatible = "qcom,kryo";
|
||||
compatible = "arm,cortex-a715";
|
||||
reg = <0 0x300>;
|
||||
enable-method = "psci";
|
||||
next-level-cache = <&L2_300>;
|
||||
@ -146,7 +146,7 @@ L2_300: l2-cache {
|
||||
|
||||
CPU4: cpu@400 {
|
||||
device_type = "cpu";
|
||||
compatible = "qcom,kryo";
|
||||
compatible = "arm,cortex-a715";
|
||||
reg = <0 0x400>;
|
||||
enable-method = "psci";
|
||||
next-level-cache = <&L2_400>;
|
||||
@ -165,7 +165,7 @@ L2_400: l2-cache {
|
||||
|
||||
CPU5: cpu@500 {
|
||||
device_type = "cpu";
|
||||
compatible = "qcom,kryo";
|
||||
compatible = "arm,cortex-a710";
|
||||
reg = <0 0x500>;
|
||||
enable-method = "psci";
|
||||
next-level-cache = <&L2_500>;
|
||||
@ -184,7 +184,7 @@ L2_500: l2-cache {
|
||||
|
||||
CPU6: cpu@600 {
|
||||
device_type = "cpu";
|
||||
compatible = "qcom,kryo";
|
||||
compatible = "arm,cortex-a710";
|
||||
reg = <0 0x600>;
|
||||
enable-method = "psci";
|
||||
next-level-cache = <&L2_600>;
|
||||
@ -203,7 +203,7 @@ L2_600: l2-cache {
|
||||
|
||||
CPU7: cpu@700 {
|
||||
device_type = "cpu";
|
||||
compatible = "qcom,kryo";
|
||||
compatible = "arm,cortex-x3";
|
||||
reg = <0 0x700>;
|
||||
enable-method = "psci";
|
||||
next-level-cache = <&L2_700>;
|
||||
@ -1905,6 +1905,7 @@ ufs_mem_hc: ufs@1d84000 {
|
||||
required-opps = <&rpmhpd_opp_nom>;
|
||||
|
||||
iommus = <&apps_smmu 0x60 0x0>;
|
||||
dma-coherent;
|
||||
|
||||
interconnects = <&aggre1_noc MASTER_UFS_MEM 0 &mc_virt SLAVE_EBI1 0>,
|
||||
<&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_UFS_MEM_CFG 0>;
|
||||
@ -1997,7 +1998,7 @@ IPCC_MPROC_SIGNAL_GLINK_QMP
|
||||
lpass_tlmm: pinctrl@6e80000 {
|
||||
compatible = "qcom,sm8550-lpass-lpi-pinctrl";
|
||||
reg = <0 0x06e80000 0 0x20000>,
|
||||
<0 0x0725a000 0 0x10000>;
|
||||
<0 0x07250000 0 0x10000>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
gpio-ranges = <&lpass_tlmm 0 0 23>;
|
||||
@ -2691,7 +2692,7 @@ qup_i2c0_data_clk: qup-i2c0-data-clk-state {
|
||||
pins = "gpio28", "gpio29";
|
||||
function = "qup1_se0";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
bias-pull-up = <2200>;
|
||||
};
|
||||
|
||||
qup_i2c1_data_clk: qup-i2c1-data-clk-state {
|
||||
@ -2699,7 +2700,7 @@ qup_i2c1_data_clk: qup-i2c1-data-clk-state {
|
||||
pins = "gpio32", "gpio33";
|
||||
function = "qup1_se1";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
bias-pull-up = <2200>;
|
||||
};
|
||||
|
||||
qup_i2c2_data_clk: qup-i2c2-data-clk-state {
|
||||
@ -2707,7 +2708,7 @@ qup_i2c2_data_clk: qup-i2c2-data-clk-state {
|
||||
pins = "gpio36", "gpio37";
|
||||
function = "qup1_se2";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
bias-pull-up = <2200>;
|
||||
};
|
||||
|
||||
qup_i2c3_data_clk: qup-i2c3-data-clk-state {
|
||||
@ -2715,7 +2716,7 @@ qup_i2c3_data_clk: qup-i2c3-data-clk-state {
|
||||
pins = "gpio40", "gpio41";
|
||||
function = "qup1_se3";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
bias-pull-up = <2200>;
|
||||
};
|
||||
|
||||
qup_i2c4_data_clk: qup-i2c4-data-clk-state {
|
||||
@ -2723,7 +2724,7 @@ qup_i2c4_data_clk: qup-i2c4-data-clk-state {
|
||||
pins = "gpio44", "gpio45";
|
||||
function = "qup1_se4";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
bias-pull-up = <2200>;
|
||||
};
|
||||
|
||||
qup_i2c5_data_clk: qup-i2c5-data-clk-state {
|
||||
@ -2731,7 +2732,7 @@ qup_i2c5_data_clk: qup-i2c5-data-clk-state {
|
||||
pins = "gpio52", "gpio53";
|
||||
function = "qup1_se5";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
bias-pull-up = <2200>;
|
||||
};
|
||||
|
||||
qup_i2c6_data_clk: qup-i2c6-data-clk-state {
|
||||
@ -2739,7 +2740,7 @@ qup_i2c6_data_clk: qup-i2c6-data-clk-state {
|
||||
pins = "gpio48", "gpio49";
|
||||
function = "qup1_se6";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
bias-pull-up = <2200>;
|
||||
};
|
||||
|
||||
qup_i2c8_data_clk: qup-i2c8-data-clk-state {
|
||||
@ -2747,14 +2748,14 @@ scl-pins {
|
||||
pins = "gpio57";
|
||||
function = "qup2_se0_l1_mira";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
bias-pull-up = <2200>;
|
||||
};
|
||||
|
||||
sda-pins {
|
||||
pins = "gpio56";
|
||||
function = "qup2_se0_l0_mira";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
bias-pull-up = <2200>;
|
||||
};
|
||||
};
|
||||
|
||||
@ -2763,7 +2764,7 @@ qup_i2c9_data_clk: qup-i2c9-data-clk-state {
|
||||
pins = "gpio60", "gpio61";
|
||||
function = "qup2_se1";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
bias-pull-up = <2200>;
|
||||
};
|
||||
|
||||
qup_i2c10_data_clk: qup-i2c10-data-clk-state {
|
||||
@ -2771,7 +2772,7 @@ qup_i2c10_data_clk: qup-i2c10-data-clk-state {
|
||||
pins = "gpio64", "gpio65";
|
||||
function = "qup2_se2";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
bias-pull-up = <2200>;
|
||||
};
|
||||
|
||||
qup_i2c11_data_clk: qup-i2c11-data-clk-state {
|
||||
@ -2779,7 +2780,7 @@ qup_i2c11_data_clk: qup-i2c11-data-clk-state {
|
||||
pins = "gpio68", "gpio69";
|
||||
function = "qup2_se3";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
bias-pull-up = <2200>;
|
||||
};
|
||||
|
||||
qup_i2c12_data_clk: qup-i2c12-data-clk-state {
|
||||
@ -2787,7 +2788,7 @@ qup_i2c12_data_clk: qup-i2c12-data-clk-state {
|
||||
pins = "gpio2", "gpio3";
|
||||
function = "qup2_se4";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
bias-pull-up = <2200>;
|
||||
};
|
||||
|
||||
qup_i2c13_data_clk: qup-i2c13-data-clk-state {
|
||||
@ -2795,7 +2796,7 @@ qup_i2c13_data_clk: qup-i2c13-data-clk-state {
|
||||
pins = "gpio80", "gpio81";
|
||||
function = "qup2_se5";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
bias-pull-up = <2200>;
|
||||
};
|
||||
|
||||
qup_i2c15_data_clk: qup-i2c15-data-clk-state {
|
||||
@ -2803,7 +2804,7 @@ qup_i2c15_data_clk: qup-i2c15-data-clk-state {
|
||||
pins = "gpio72", "gpio106";
|
||||
function = "qup2_se7";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
bias-pull-up = <2200>;
|
||||
};
|
||||
|
||||
qup_spi0_cs: qup-spi0-cs-state {
|
||||
|
@ -314,36 +314,32 @@ int do_compat_alignment_fixup(unsigned long addr, struct pt_regs *regs)
|
||||
int (*handler)(unsigned long addr, u32 instr, struct pt_regs *regs);
|
||||
unsigned int type;
|
||||
u32 instr = 0;
|
||||
u16 tinstr = 0;
|
||||
int isize = 4;
|
||||
int thumb2_32b = 0;
|
||||
int fault;
|
||||
|
||||
instrptr = instruction_pointer(regs);
|
||||
|
||||
if (compat_thumb_mode(regs)) {
|
||||
__le16 __user *ptr = (__le16 __user *)(instrptr & ~1);
|
||||
u16 tinstr, tinst2;
|
||||
|
||||
fault = alignment_get_thumb(regs, ptr, &tinstr);
|
||||
if (!fault) {
|
||||
if (IS_T32(tinstr)) {
|
||||
/* Thumb-2 32-bit */
|
||||
u16 tinst2;
|
||||
fault = alignment_get_thumb(regs, ptr + 1, &tinst2);
|
||||
instr = ((u32)tinstr << 16) | tinst2;
|
||||
thumb2_32b = 1;
|
||||
} else {
|
||||
isize = 2;
|
||||
instr = thumb2arm(tinstr);
|
||||
}
|
||||
if (alignment_get_thumb(regs, ptr, &tinstr))
|
||||
return 1;
|
||||
|
||||
if (IS_T32(tinstr)) { /* Thumb-2 32-bit */
|
||||
if (alignment_get_thumb(regs, ptr + 1, &tinst2))
|
||||
return 1;
|
||||
instr = ((u32)tinstr << 16) | tinst2;
|
||||
thumb2_32b = 1;
|
||||
} else {
|
||||
isize = 2;
|
||||
instr = thumb2arm(tinstr);
|
||||
}
|
||||
} else {
|
||||
fault = alignment_get_arm(regs, (__le32 __user *)instrptr, &instr);
|
||||
if (alignment_get_arm(regs, (__le32 __user *)instrptr, &instr))
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (fault)
|
||||
return 1;
|
||||
|
||||
switch (CODING_BITS(instr)) {
|
||||
case 0x00000000: /* 3.13.4 load/store instruction extensions */
|
||||
if (LDSTHD_I_BIT(instr))
|
||||
|
@ -66,7 +66,7 @@
|
||||
.long .Lefi_header_end - .L_head // SizeOfHeaders
|
||||
.long 0 // CheckSum
|
||||
.short IMAGE_SUBSYSTEM_EFI_APPLICATION // Subsystem
|
||||
.short 0 // DllCharacteristics
|
||||
.short IMAGE_DLL_CHARACTERISTICS_NX_COMPAT // DllCharacteristics
|
||||
.quad 0 // SizeOfStackReserve
|
||||
.quad 0 // SizeOfStackCommit
|
||||
.quad 0 // SizeOfHeapReserve
|
||||
|
@ -220,6 +220,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
|
||||
case KVM_CAP_VCPU_ATTRIBUTES:
|
||||
case KVM_CAP_PTP_KVM:
|
||||
case KVM_CAP_ARM_SYSTEM_SUSPEND:
|
||||
case KVM_CAP_IRQFD_RESAMPLE:
|
||||
r = 1;
|
||||
break;
|
||||
case KVM_CAP_SET_GUEST_DEBUG2:
|
||||
@ -1889,9 +1890,33 @@ static int __init do_pkvm_init(u32 hyp_va_bits)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static u64 get_hyp_id_aa64pfr0_el1(void)
|
||||
{
|
||||
/*
|
||||
* Track whether the system isn't affected by spectre/meltdown in the
|
||||
* hypervisor's view of id_aa64pfr0_el1, used for protected VMs.
|
||||
* Although this is per-CPU, we make it global for simplicity, e.g., not
|
||||
* to have to worry about vcpu migration.
|
||||
*
|
||||
* Unlike for non-protected VMs, userspace cannot override this for
|
||||
* protected VMs.
|
||||
*/
|
||||
u64 val = read_sanitised_ftr_reg(SYS_ID_AA64PFR0_EL1);
|
||||
|
||||
val &= ~(ARM64_FEATURE_MASK(ID_AA64PFR0_EL1_CSV2) |
|
||||
ARM64_FEATURE_MASK(ID_AA64PFR0_EL1_CSV3));
|
||||
|
||||
val |= FIELD_PREP(ARM64_FEATURE_MASK(ID_AA64PFR0_EL1_CSV2),
|
||||
arm64_get_spectre_v2_state() == SPECTRE_UNAFFECTED);
|
||||
val |= FIELD_PREP(ARM64_FEATURE_MASK(ID_AA64PFR0_EL1_CSV3),
|
||||
arm64_get_meltdown_state() == SPECTRE_UNAFFECTED);
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
static void kvm_hyp_init_symbols(void)
|
||||
{
|
||||
kvm_nvhe_sym(id_aa64pfr0_el1_sys_val) = read_sanitised_ftr_reg(SYS_ID_AA64PFR0_EL1);
|
||||
kvm_nvhe_sym(id_aa64pfr0_el1_sys_val) = get_hyp_id_aa64pfr0_el1();
|
||||
kvm_nvhe_sym(id_aa64pfr1_el1_sys_val) = read_sanitised_ftr_reg(SYS_ID_AA64PFR1_EL1);
|
||||
kvm_nvhe_sym(id_aa64isar0_el1_sys_val) = read_sanitised_ftr_reg(SYS_ID_AA64ISAR0_EL1);
|
||||
kvm_nvhe_sym(id_aa64isar1_el1_sys_val) = read_sanitised_ftr_reg(SYS_ID_AA64ISAR1_EL1);
|
||||
|
@ -33,11 +33,14 @@
|
||||
* Allow for protected VMs:
|
||||
* - Floating-point and Advanced SIMD
|
||||
* - Data Independent Timing
|
||||
* - Spectre/Meltdown Mitigation
|
||||
*/
|
||||
#define PVM_ID_AA64PFR0_ALLOW (\
|
||||
ARM64_FEATURE_MASK(ID_AA64PFR0_EL1_FP) | \
|
||||
ARM64_FEATURE_MASK(ID_AA64PFR0_EL1_AdvSIMD) | \
|
||||
ARM64_FEATURE_MASK(ID_AA64PFR0_EL1_DIT) \
|
||||
ARM64_FEATURE_MASK(ID_AA64PFR0_EL1_DIT) | \
|
||||
ARM64_FEATURE_MASK(ID_AA64PFR0_EL1_CSV2) | \
|
||||
ARM64_FEATURE_MASK(ID_AA64PFR0_EL1_CSV3) \
|
||||
)
|
||||
|
||||
/*
|
||||
|
@ -85,19 +85,12 @@ static u64 get_restricted_features_unsigned(u64 sys_reg_val,
|
||||
|
||||
static u64 get_pvm_id_aa64pfr0(const struct kvm_vcpu *vcpu)
|
||||
{
|
||||
const struct kvm *kvm = (const struct kvm *)kern_hyp_va(vcpu->kvm);
|
||||
u64 set_mask = 0;
|
||||
u64 allow_mask = PVM_ID_AA64PFR0_ALLOW;
|
||||
|
||||
set_mask |= get_restricted_features_unsigned(id_aa64pfr0_el1_sys_val,
|
||||
PVM_ID_AA64PFR0_RESTRICT_UNSIGNED);
|
||||
|
||||
/* Spectre and Meltdown mitigation in KVM */
|
||||
set_mask |= FIELD_PREP(ARM64_FEATURE_MASK(ID_AA64PFR0_EL1_CSV2),
|
||||
(u64)kvm->arch.pfr0_csv2);
|
||||
set_mask |= FIELD_PREP(ARM64_FEATURE_MASK(ID_AA64PFR0_EL1_CSV3),
|
||||
(u64)kvm->arch.pfr0_csv3);
|
||||
|
||||
return (id_aa64pfr0_el1_sys_val & allow_mask) | set_mask;
|
||||
}
|
||||
|
||||
|
@ -666,14 +666,33 @@ static int get_user_mapping_size(struct kvm *kvm, u64 addr)
|
||||
CONFIG_PGTABLE_LEVELS),
|
||||
.mm_ops = &kvm_user_mm_ops,
|
||||
};
|
||||
unsigned long flags;
|
||||
kvm_pte_t pte = 0; /* Keep GCC quiet... */
|
||||
u32 level = ~0;
|
||||
int ret;
|
||||
|
||||
/*
|
||||
* Disable IRQs so that we hazard against a concurrent
|
||||
* teardown of the userspace page tables (which relies on
|
||||
* IPI-ing threads).
|
||||
*/
|
||||
local_irq_save(flags);
|
||||
ret = kvm_pgtable_get_leaf(&pgt, addr, &pte, &level);
|
||||
VM_BUG_ON(ret);
|
||||
VM_BUG_ON(level >= KVM_PGTABLE_MAX_LEVELS);
|
||||
VM_BUG_ON(!(pte & PTE_VALID));
|
||||
local_irq_restore(flags);
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/*
|
||||
* Not seeing an error, but not updating level? Something went
|
||||
* deeply wrong...
|
||||
*/
|
||||
if (WARN_ON(level >= KVM_PGTABLE_MAX_LEVELS))
|
||||
return -EFAULT;
|
||||
|
||||
/* Oops, the userspace PTs are gone... Replay the fault */
|
||||
if (!kvm_pte_valid(pte))
|
||||
return -EAGAIN;
|
||||
|
||||
return BIT(ARM64_HW_PGTABLE_LEVEL_SHIFT(level));
|
||||
}
|
||||
@ -1079,7 +1098,7 @@ static bool fault_supports_stage2_huge_mapping(struct kvm_memory_slot *memslot,
|
||||
*
|
||||
* Returns the size of the mapping.
|
||||
*/
|
||||
static unsigned long
|
||||
static long
|
||||
transparent_hugepage_adjust(struct kvm *kvm, struct kvm_memory_slot *memslot,
|
||||
unsigned long hva, kvm_pfn_t *pfnp,
|
||||
phys_addr_t *ipap)
|
||||
@ -1091,8 +1110,15 @@ transparent_hugepage_adjust(struct kvm *kvm, struct kvm_memory_slot *memslot,
|
||||
* sure that the HVA and IPA are sufficiently aligned and that the
|
||||
* block map is contained within the memslot.
|
||||
*/
|
||||
if (fault_supports_stage2_huge_mapping(memslot, hva, PMD_SIZE) &&
|
||||
get_user_mapping_size(kvm, hva) >= PMD_SIZE) {
|
||||
if (fault_supports_stage2_huge_mapping(memslot, hva, PMD_SIZE)) {
|
||||
int sz = get_user_mapping_size(kvm, hva);
|
||||
|
||||
if (sz < 0)
|
||||
return sz;
|
||||
|
||||
if (sz < PMD_SIZE)
|
||||
return PAGE_SIZE;
|
||||
|
||||
/*
|
||||
* The address we faulted on is backed by a transparent huge
|
||||
* page. However, because we map the compound huge page and
|
||||
@ -1192,7 +1218,7 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
|
||||
{
|
||||
int ret = 0;
|
||||
bool write_fault, writable, force_pte = false;
|
||||
bool exec_fault;
|
||||
bool exec_fault, mte_allowed;
|
||||
bool device = false;
|
||||
unsigned long mmu_seq;
|
||||
struct kvm *kvm = vcpu->kvm;
|
||||
@ -1203,7 +1229,7 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
|
||||
kvm_pfn_t pfn;
|
||||
bool logging_active = memslot_is_logging(memslot);
|
||||
unsigned long fault_level = kvm_vcpu_trap_get_fault_level(vcpu);
|
||||
unsigned long vma_pagesize, fault_granule;
|
||||
long vma_pagesize, fault_granule;
|
||||
enum kvm_pgtable_prot prot = KVM_PGTABLE_PROT_R;
|
||||
struct kvm_pgtable *pgt;
|
||||
|
||||
@ -1217,6 +1243,20 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
/*
|
||||
* Permission faults just need to update the existing leaf entry,
|
||||
* and so normally don't require allocations from the memcache. The
|
||||
* only exception to this is when dirty logging is enabled at runtime
|
||||
* and a write fault needs to collapse a block entry into a table.
|
||||
*/
|
||||
if (fault_status != ESR_ELx_FSC_PERM ||
|
||||
(logging_active && write_fault)) {
|
||||
ret = kvm_mmu_topup_memory_cache(memcache,
|
||||
kvm_mmu_cache_min_pages(kvm));
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Let's check if we will get back a huge page backed by hugetlbfs, or
|
||||
* get block mapping for device MMIO region.
|
||||
@ -1269,37 +1309,21 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
|
||||
fault_ipa &= ~(vma_pagesize - 1);
|
||||
|
||||
gfn = fault_ipa >> PAGE_SHIFT;
|
||||
mmap_read_unlock(current->mm);
|
||||
mte_allowed = kvm_vma_mte_allowed(vma);
|
||||
|
||||
/* Don't use the VMA after the unlock -- it may have vanished */
|
||||
vma = NULL;
|
||||
|
||||
/*
|
||||
* Permission faults just need to update the existing leaf entry,
|
||||
* and so normally don't require allocations from the memcache. The
|
||||
* only exception to this is when dirty logging is enabled at runtime
|
||||
* and a write fault needs to collapse a block entry into a table.
|
||||
*/
|
||||
if (fault_status != ESR_ELx_FSC_PERM ||
|
||||
(logging_active && write_fault)) {
|
||||
ret = kvm_mmu_topup_memory_cache(memcache,
|
||||
kvm_mmu_cache_min_pages(kvm));
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
mmu_seq = vcpu->kvm->mmu_invalidate_seq;
|
||||
/*
|
||||
* Ensure the read of mmu_invalidate_seq happens before we call
|
||||
* gfn_to_pfn_prot (which calls get_user_pages), so that we don't risk
|
||||
* the page we just got a reference to gets unmapped before we have a
|
||||
* chance to grab the mmu_lock, which ensure that if the page gets
|
||||
* unmapped afterwards, the call to kvm_unmap_gfn will take it away
|
||||
* from us again properly. This smp_rmb() interacts with the smp_wmb()
|
||||
* in kvm_mmu_notifier_invalidate_<page|range_end>.
|
||||
* Read mmu_invalidate_seq so that KVM can detect if the results of
|
||||
* vma_lookup() or __gfn_to_pfn_memslot() become stale prior to
|
||||
* acquiring kvm->mmu_lock.
|
||||
*
|
||||
* Besides, __gfn_to_pfn_memslot() instead of gfn_to_pfn_prot() is
|
||||
* used to avoid unnecessary overhead introduced to locate the memory
|
||||
* slot because it's always fixed even @gfn is adjusted for huge pages.
|
||||
* Rely on mmap_read_unlock() for an implicit smp_rmb(), which pairs
|
||||
* with the smp_wmb() in kvm_mmu_invalidate_end().
|
||||
*/
|
||||
smp_rmb();
|
||||
mmu_seq = vcpu->kvm->mmu_invalidate_seq;
|
||||
mmap_read_unlock(current->mm);
|
||||
|
||||
pfn = __gfn_to_pfn_memslot(memslot, gfn, false, false, NULL,
|
||||
write_fault, &writable, NULL);
|
||||
@ -1350,11 +1374,16 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
|
||||
vma_pagesize = transparent_hugepage_adjust(kvm, memslot,
|
||||
hva, &pfn,
|
||||
&fault_ipa);
|
||||
|
||||
if (vma_pagesize < 0) {
|
||||
ret = vma_pagesize;
|
||||
goto out_unlock;
|
||||
}
|
||||
}
|
||||
|
||||
if (fault_status != ESR_ELx_FSC_PERM && !device && kvm_has_mte(kvm)) {
|
||||
/* Check the VMM hasn't introduced a new disallowed VMA */
|
||||
if (kvm_vma_mte_allowed(vma)) {
|
||||
if (mte_allowed) {
|
||||
sanitise_mte_tags(kvm, pfn, vma_pagesize);
|
||||
} else {
|
||||
ret = -EFAULT;
|
||||
|
@ -538,7 +538,8 @@ void kvm_pmu_handle_pmcr(struct kvm_vcpu *vcpu, u64 val)
|
||||
if (!kvm_pmu_is_3p5(vcpu))
|
||||
val &= ~ARMV8_PMU_PMCR_LP;
|
||||
|
||||
__vcpu_sys_reg(vcpu, PMCR_EL0) = val;
|
||||
/* The reset bits don't indicate any state, and shouldn't be saved. */
|
||||
__vcpu_sys_reg(vcpu, PMCR_EL0) = val & ~(ARMV8_PMU_PMCR_C | ARMV8_PMU_PMCR_P);
|
||||
|
||||
if (val & ARMV8_PMU_PMCR_E) {
|
||||
kvm_pmu_enable_counter_mask(vcpu,
|
||||
@ -557,6 +558,7 @@ void kvm_pmu_handle_pmcr(struct kvm_vcpu *vcpu, u64 val)
|
||||
for_each_set_bit(i, &mask, 32)
|
||||
kvm_pmu_set_pmc_value(kvm_vcpu_idx_to_pmc(vcpu, i), 0, true);
|
||||
}
|
||||
kvm_vcpu_pmu_restore_guest(vcpu);
|
||||
}
|
||||
|
||||
static bool kvm_pmu_counter_is_enabled(struct kvm_pmc *pmc)
|
||||
|
@ -794,7 +794,6 @@ static bool access_pmcr(struct kvm_vcpu *vcpu, struct sys_reg_params *p,
|
||||
if (!kvm_supports_32bit_el0())
|
||||
val |= ARMV8_PMU_PMCR_LC;
|
||||
kvm_pmu_handle_pmcr(vcpu, val);
|
||||
kvm_vcpu_pmu_restore_guest(vcpu);
|
||||
} else {
|
||||
/* PMCR.P & PMCR.C are RAZ */
|
||||
val = __vcpu_sys_reg(vcpu, PMCR_EL0)
|
||||
@ -856,6 +855,22 @@ static bool pmu_counter_idx_valid(struct kvm_vcpu *vcpu, u64 idx)
|
||||
return true;
|
||||
}
|
||||
|
||||
static int get_pmu_evcntr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *r,
|
||||
u64 *val)
|
||||
{
|
||||
u64 idx;
|
||||
|
||||
if (r->CRn == 9 && r->CRm == 13 && r->Op2 == 0)
|
||||
/* PMCCNTR_EL0 */
|
||||
idx = ARMV8_PMU_CYCLE_IDX;
|
||||
else
|
||||
/* PMEVCNTRn_EL0 */
|
||||
idx = ((r->CRm & 3) << 3) | (r->Op2 & 7);
|
||||
|
||||
*val = kvm_pmu_get_counter_value(vcpu, idx);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool access_pmu_evcntr(struct kvm_vcpu *vcpu,
|
||||
struct sys_reg_params *p,
|
||||
const struct sys_reg_desc *r)
|
||||
@ -1072,7 +1087,7 @@ static bool access_pmuserenr(struct kvm_vcpu *vcpu, struct sys_reg_params *p,
|
||||
/* Macro to expand the PMEVCNTRn_EL0 register */
|
||||
#define PMU_PMEVCNTR_EL0(n) \
|
||||
{ PMU_SYS_REG(SYS_PMEVCNTRn_EL0(n)), \
|
||||
.reset = reset_pmevcntr, \
|
||||
.reset = reset_pmevcntr, .get_user = get_pmu_evcntr, \
|
||||
.access = access_pmu_evcntr, .reg = (PMEVCNTR0_EL0 + n), }
|
||||
|
||||
/* Macro to expand the PMEVTYPERn_EL0 register */
|
||||
@ -1982,7 +1997,8 @@ static const struct sys_reg_desc sys_reg_descs[] = {
|
||||
{ PMU_SYS_REG(SYS_PMCEID1_EL0),
|
||||
.access = access_pmceid, .reset = NULL },
|
||||
{ PMU_SYS_REG(SYS_PMCCNTR_EL0),
|
||||
.access = access_pmu_evcntr, .reset = reset_unknown, .reg = PMCCNTR_EL0 },
|
||||
.access = access_pmu_evcntr, .reset = reset_unknown,
|
||||
.reg = PMCCNTR_EL0, .get_user = get_pmu_evcntr},
|
||||
{ PMU_SYS_REG(SYS_PMXEVTYPER_EL0),
|
||||
.access = access_pmu_evtyper, .reset = NULL },
|
||||
{ PMU_SYS_REG(SYS_PMXEVCNTR_EL0),
|
||||
|
@ -281,4 +281,8 @@
|
||||
/* DMB */
|
||||
#define A64_DMB_ISH aarch64_insn_gen_dmb(AARCH64_INSN_MB_ISH)
|
||||
|
||||
/* ADR */
|
||||
#define A64_ADR(Rd, offset) \
|
||||
aarch64_insn_gen_adr(0, offset, Rd, AARCH64_INSN_ADR_TYPE_ADR)
|
||||
|
||||
#endif /* _BPF_JIT_H */
|
||||
|
@ -1900,7 +1900,8 @@ static int prepare_trampoline(struct jit_ctx *ctx, struct bpf_tramp_image *im,
|
||||
restore_args(ctx, args_off, nargs);
|
||||
/* call original func */
|
||||
emit(A64_LDR64I(A64_R(10), A64_SP, retaddr_off), ctx);
|
||||
emit(A64_BLR(A64_R(10)), ctx);
|
||||
emit(A64_ADR(A64_LR, AARCH64_INSN_SIZE * 2), ctx);
|
||||
emit(A64_RET(A64_R(10)), ctx);
|
||||
/* store return value */
|
||||
emit(A64_STR64I(A64_R(0), A64_SP, retval_off), ctx);
|
||||
/* reserve a nop for bpf_tramp_image_put */
|
||||
|
@ -1022,6 +1022,10 @@ static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx, bool ext
|
||||
emit_atomic(insn, ctx);
|
||||
break;
|
||||
|
||||
/* Speculation barrier */
|
||||
case BPF_ST | BPF_NOSPEC:
|
||||
break;
|
||||
|
||||
default:
|
||||
pr_err("bpf_jit: unknown opcode %02x\n", code);
|
||||
return -EINVAL;
|
||||
|
@ -5,6 +5,8 @@
|
||||
#include <asm/bmips.h>
|
||||
#include <asm/io.h>
|
||||
|
||||
bool bmips_rac_flush_disable;
|
||||
|
||||
void arch_sync_dma_for_cpu_all(void)
|
||||
{
|
||||
void __iomem *cbr = BMIPS_GET_CBR();
|
||||
@ -15,6 +17,9 @@ void arch_sync_dma_for_cpu_all(void)
|
||||
boot_cpu_type() != CPU_BMIPS4380)
|
||||
return;
|
||||
|
||||
if (unlikely(bmips_rac_flush_disable))
|
||||
return;
|
||||
|
||||
/* Flush stale data out of the readahead cache */
|
||||
cfg = __raw_readl(cbr + BMIPS_RAC_CONFIG);
|
||||
__raw_writel(cfg | 0x100, cbr + BMIPS_RAC_CONFIG);
|
||||
|
@ -35,6 +35,8 @@
|
||||
#define REG_BCM6328_OTP ((void __iomem *)CKSEG1ADDR(0x1000062c))
|
||||
#define BCM6328_TP1_DISABLED BIT(9)
|
||||
|
||||
extern bool bmips_rac_flush_disable;
|
||||
|
||||
static const unsigned long kbase = VMLINUX_LOAD_ADDRESS & 0xfff00000;
|
||||
|
||||
struct bmips_quirk {
|
||||
@ -104,6 +106,12 @@ static void bcm6358_quirks(void)
|
||||
* disable SMP for now
|
||||
*/
|
||||
bmips_smp_enabled = 0;
|
||||
|
||||
/*
|
||||
* RAC flush causes kernel panics on BCM6358 when booting from TP1
|
||||
* because the bootloader is not initializing it properly.
|
||||
*/
|
||||
bmips_rac_flush_disable = !!(read_c0_brcm_cmt_local() & (1 << 31));
|
||||
}
|
||||
|
||||
static void bcm6368_quirks(void)
|
||||
|
@ -148,6 +148,11 @@ static inline void flush_tlb_fix_spurious_fault(struct vm_area_struct *vma,
|
||||
*/
|
||||
}
|
||||
|
||||
static inline bool __pte_protnone(unsigned long pte)
|
||||
{
|
||||
return (pte & (pgprot_val(PAGE_NONE) | _PAGE_RWX)) == pgprot_val(PAGE_NONE);
|
||||
}
|
||||
|
||||
static inline bool __pte_flags_need_flush(unsigned long oldval,
|
||||
unsigned long newval)
|
||||
{
|
||||
@ -164,8 +169,8 @@ static inline bool __pte_flags_need_flush(unsigned long oldval,
|
||||
/*
|
||||
* We do not expect kernel mappings or non-PTEs or not-present PTEs.
|
||||
*/
|
||||
VM_WARN_ON_ONCE(oldval & _PAGE_PRIVILEGED);
|
||||
VM_WARN_ON_ONCE(newval & _PAGE_PRIVILEGED);
|
||||
VM_WARN_ON_ONCE(!__pte_protnone(oldval) && oldval & _PAGE_PRIVILEGED);
|
||||
VM_WARN_ON_ONCE(!__pte_protnone(newval) && newval & _PAGE_PRIVILEGED);
|
||||
VM_WARN_ON_ONCE(!(oldval & _PAGE_PTE));
|
||||
VM_WARN_ON_ONCE(!(newval & _PAGE_PTE));
|
||||
VM_WARN_ON_ONCE(!(oldval & _PAGE_PRESENT));
|
||||
|
@ -2,7 +2,7 @@
|
||||
#ifndef __ASM_KASAN_H
|
||||
#define __ASM_KASAN_H
|
||||
|
||||
#ifdef CONFIG_KASAN
|
||||
#if defined(CONFIG_KASAN) && !defined(CONFIG_CC_HAS_KASAN_MEMINTRINSIC_PREFIX)
|
||||
#define _GLOBAL_KASAN(fn) _GLOBAL(__##fn)
|
||||
#define _GLOBAL_TOC_KASAN(fn) _GLOBAL_TOC(__##fn)
|
||||
#define EXPORT_SYMBOL_KASAN(fn) EXPORT_SYMBOL(__##fn)
|
||||
|
@ -30,11 +30,17 @@ extern int memcmp(const void *,const void *,__kernel_size_t);
|
||||
extern void * memchr(const void *,int,__kernel_size_t);
|
||||
void memcpy_flushcache(void *dest, const void *src, size_t size);
|
||||
|
||||
#ifdef CONFIG_KASAN
|
||||
/* __mem variants are used by KASAN to implement instrumented meminstrinsics. */
|
||||
#ifdef CONFIG_CC_HAS_KASAN_MEMINTRINSIC_PREFIX
|
||||
#define __memset memset
|
||||
#define __memcpy memcpy
|
||||
#define __memmove memmove
|
||||
#else /* CONFIG_CC_HAS_KASAN_MEMINTRINSIC_PREFIX */
|
||||
void *__memset(void *s, int c, __kernel_size_t count);
|
||||
void *__memcpy(void *to, const void *from, __kernel_size_t n);
|
||||
void *__memmove(void *to, const void *from, __kernel_size_t n);
|
||||
|
||||
#if defined(CONFIG_KASAN) && !defined(__SANITIZE_ADDRESS__)
|
||||
#ifndef __SANITIZE_ADDRESS__
|
||||
/*
|
||||
* For files that are not instrumented (e.g. mm/slub.c) we
|
||||
* should use not instrumented version of mem* functions.
|
||||
@ -46,8 +52,9 @@ void *__memmove(void *to, const void *from, __kernel_size_t n);
|
||||
#ifndef __NO_FORTIFY
|
||||
#define __NO_FORTIFY /* FORTIFY_SOURCE uses __builtin_memcpy, etc. */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif /* !__SANITIZE_ADDRESS__ */
|
||||
#endif /* CONFIG_CC_HAS_KASAN_MEMINTRINSIC_PREFIX */
|
||||
#endif /* CONFIG_KASAN */
|
||||
|
||||
#ifdef CONFIG_PPC64
|
||||
#ifndef CONFIG_KASAN
|
||||
|
@ -13,8 +13,13 @@
|
||||
# If you really need to reference something from prom_init.o add
|
||||
# it to the list below:
|
||||
|
||||
grep "^CONFIG_KASAN=y$" ${KCONFIG_CONFIG} >/dev/null
|
||||
if [ $? -eq 0 ]
|
||||
has_renamed_memintrinsics()
|
||||
{
|
||||
grep -q "^CONFIG_KASAN=y$" ${KCONFIG_CONFIG} && \
|
||||
! grep -q "^CONFIG_CC_HAS_KASAN_MEMINTRINSIC_PREFIX=y" ${KCONFIG_CONFIG}
|
||||
}
|
||||
|
||||
if has_renamed_memintrinsics
|
||||
then
|
||||
MEM_FUNCS="__memcpy __memset"
|
||||
else
|
||||
|
@ -290,6 +290,9 @@ static int gpr_set(struct task_struct *target, const struct user_regset *regset,
|
||||
static int ppr_get(struct task_struct *target, const struct user_regset *regset,
|
||||
struct membuf to)
|
||||
{
|
||||
if (!target->thread.regs)
|
||||
return -EINVAL;
|
||||
|
||||
return membuf_write(&to, &target->thread.regs->ppr, sizeof(u64));
|
||||
}
|
||||
|
||||
@ -297,6 +300,9 @@ static int ppr_set(struct task_struct *target, const struct user_regset *regset,
|
||||
unsigned int pos, unsigned int count, const void *kbuf,
|
||||
const void __user *ubuf)
|
||||
{
|
||||
if (!target->thread.regs)
|
||||
return -EINVAL;
|
||||
|
||||
return user_regset_copyin(&pos, &count, &kbuf, &ubuf,
|
||||
&target->thread.regs->ppr, 0, sizeof(u64));
|
||||
}
|
||||
|
@ -576,6 +576,12 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_HAVE_KVM_IRQFD
|
||||
case KVM_CAP_IRQFD_RESAMPLE:
|
||||
r = !xive_enabled();
|
||||
break;
|
||||
#endif
|
||||
|
||||
case KVM_CAP_PPC_ALLOC_HTAB:
|
||||
r = hv_enabled;
|
||||
break;
|
||||
|
@ -366,6 +366,7 @@ void update_numa_distance(struct device_node *node)
|
||||
WARN(numa_distance_table[nid][nid] == -1,
|
||||
"NUMA distance details for node %d not provided\n", nid);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(update_numa_distance);
|
||||
|
||||
/*
|
||||
* ibm,numa-lookup-index-table= {N, domainid1, domainid2, ..... domainidN}
|
||||
|
@ -1428,6 +1428,13 @@ static int papr_scm_probe(struct platform_device *pdev)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
/*
|
||||
* open firmware platform device create won't update the NUMA
|
||||
* distance table. For PAPR SCM devices we use numa_map_to_online_node()
|
||||
* to find the nearest online NUMA node and that requires correct
|
||||
* distance table information.
|
||||
*/
|
||||
update_numa_distance(dn);
|
||||
|
||||
p = kzalloc(sizeof(*p), GFP_KERNEL);
|
||||
if (!p)
|
||||
|
@ -856,6 +856,13 @@ int pseries_vas_dlpar_cpu(void)
|
||||
{
|
||||
int new_nr_creds, rc;
|
||||
|
||||
/*
|
||||
* NX-GZIP is not enabled. Nothing to do for DLPAR event
|
||||
*/
|
||||
if (!copypaste_feat)
|
||||
return 0;
|
||||
|
||||
|
||||
rc = h_query_vas_capabilities(H_QUERY_VAS_CAPABILITIES,
|
||||
vascaps[VAS_GZIP_DEF_FEAT_TYPE].feat,
|
||||
(u64)virt_to_phys(&hv_cop_caps));
|
||||
@ -1012,6 +1019,7 @@ static int __init pseries_vas_init(void)
|
||||
* Linux supports user space COPY/PASTE only with Radix
|
||||
*/
|
||||
if (!radix_enabled()) {
|
||||
copypaste_feat = false;
|
||||
pr_err("API is supported only with radix page tables\n");
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
@ -126,6 +126,7 @@ config RISCV
|
||||
select OF_IRQ
|
||||
select PCI_DOMAINS_GENERIC if PCI
|
||||
select PCI_MSI if PCI
|
||||
select RISCV_ALTERNATIVE if !XIP_KERNEL
|
||||
select RISCV_INTC
|
||||
select RISCV_TIMER if RISCV_SBI
|
||||
select SIFIVE_PLIC
|
||||
@ -401,9 +402,8 @@ config RISCV_ISA_C
|
||||
config RISCV_ISA_SVPBMT
|
||||
bool "SVPBMT extension support"
|
||||
depends on 64BIT && MMU
|
||||
depends on !XIP_KERNEL
|
||||
depends on RISCV_ALTERNATIVE
|
||||
default y
|
||||
select RISCV_ALTERNATIVE
|
||||
help
|
||||
Adds support to dynamically detect the presence of the SVPBMT
|
||||
ISA-extension (Supervisor-mode: page-based memory types) and
|
||||
@ -428,8 +428,8 @@ config TOOLCHAIN_HAS_ZBB
|
||||
config RISCV_ISA_ZBB
|
||||
bool "Zbb extension support for bit manipulation instructions"
|
||||
depends on TOOLCHAIN_HAS_ZBB
|
||||
depends on !XIP_KERNEL && MMU
|
||||
select RISCV_ALTERNATIVE
|
||||
depends on MMU
|
||||
depends on RISCV_ALTERNATIVE
|
||||
default y
|
||||
help
|
||||
Adds support to dynamically detect the presence of the ZBB
|
||||
@ -443,9 +443,9 @@ config RISCV_ISA_ZBB
|
||||
|
||||
config RISCV_ISA_ZICBOM
|
||||
bool "Zicbom extension support for non-coherent DMA operation"
|
||||
depends on !XIP_KERNEL && MMU
|
||||
depends on MMU
|
||||
depends on RISCV_ALTERNATIVE
|
||||
default y
|
||||
select RISCV_ALTERNATIVE
|
||||
select RISCV_DMA_NONCOHERENT
|
||||
help
|
||||
Adds support to dynamically detect the presence of the ZICBOM
|
||||
@ -464,6 +464,28 @@ config TOOLCHAIN_HAS_ZIHINTPAUSE
|
||||
depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zihintpause)
|
||||
depends on LLD_VERSION >= 150000 || LD_VERSION >= 23600
|
||||
|
||||
config TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI
|
||||
def_bool y
|
||||
# https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=aed44286efa8ae8717a77d94b51ac3614e2ca6dc
|
||||
depends on AS_IS_GNU && AS_VERSION >= 23800
|
||||
help
|
||||
Newer binutils versions default to ISA spec version 20191213 which
|
||||
moves some instructions from the I extension to the Zicsr and Zifencei
|
||||
extensions.
|
||||
|
||||
config TOOLCHAIN_NEEDS_OLD_ISA_SPEC
|
||||
def_bool y
|
||||
depends on TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI
|
||||
# https://github.com/llvm/llvm-project/commit/22e199e6afb1263c943c0c0d4498694e15bf8a16
|
||||
depends on CC_IS_CLANG && CLANG_VERSION < 170000
|
||||
help
|
||||
Certain versions of clang do not support zicsr and zifencei via -march
|
||||
but newer versions of binutils require it for the reasons noted in the
|
||||
help text of CONFIG_TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI. This
|
||||
option causes an older ISA spec compatible with these older versions
|
||||
of clang to be passed to GAS, which has the same result as passing zicsr
|
||||
and zifencei to -march.
|
||||
|
||||
config FPU
|
||||
bool "FPU support"
|
||||
default y
|
||||
|
@ -2,8 +2,7 @@ menu "CPU errata selection"
|
||||
|
||||
config ERRATA_SIFIVE
|
||||
bool "SiFive errata"
|
||||
depends on !XIP_KERNEL
|
||||
select RISCV_ALTERNATIVE
|
||||
depends on RISCV_ALTERNATIVE
|
||||
help
|
||||
All SiFive errata Kconfig depend on this Kconfig. Disabling
|
||||
this Kconfig will disable all SiFive errata. Please say "Y"
|
||||
@ -35,8 +34,7 @@ config ERRATA_SIFIVE_CIP_1200
|
||||
|
||||
config ERRATA_THEAD
|
||||
bool "T-HEAD errata"
|
||||
depends on !XIP_KERNEL
|
||||
select RISCV_ALTERNATIVE
|
||||
depends on RISCV_ALTERNATIVE
|
||||
help
|
||||
All T-HEAD errata Kconfig depend on this Kconfig. Disabling
|
||||
this Kconfig will disable all T-HEAD errata. Please say "Y"
|
||||
|
@ -57,10 +57,12 @@ riscv-march-$(CONFIG_ARCH_RV64I) := rv64ima
|
||||
riscv-march-$(CONFIG_FPU) := $(riscv-march-y)fd
|
||||
riscv-march-$(CONFIG_RISCV_ISA_C) := $(riscv-march-y)c
|
||||
|
||||
# Newer binutils versions default to ISA spec version 20191213 which moves some
|
||||
# instructions from the I extension to the Zicsr and Zifencei extensions.
|
||||
toolchain-need-zicsr-zifencei := $(call cc-option-yn, -march=$(riscv-march-y)_zicsr_zifencei)
|
||||
riscv-march-$(toolchain-need-zicsr-zifencei) := $(riscv-march-y)_zicsr_zifencei
|
||||
ifdef CONFIG_TOOLCHAIN_NEEDS_OLD_ISA_SPEC
|
||||
KBUILD_CFLAGS += -Wa,-misa-spec=2.2
|
||||
KBUILD_AFLAGS += -Wa,-misa-spec=2.2
|
||||
else
|
||||
riscv-march-$(CONFIG_TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI) := $(riscv-march-y)_zicsr_zifencei
|
||||
endif
|
||||
|
||||
# Check if the toolchain supports Zihintpause extension
|
||||
riscv-march-$(CONFIG_TOOLCHAIN_HAS_ZIHINTPAUSE) := $(riscv-march-y)_zihintpause
|
||||
|
@ -22,6 +22,14 @@
|
||||
*/
|
||||
enum fixed_addresses {
|
||||
FIX_HOLE,
|
||||
/*
|
||||
* The fdt fixmap mapping must be PMD aligned and will be mapped
|
||||
* using PMD entries in fixmap_pmd in 64-bit and a PGD entry in 32-bit.
|
||||
*/
|
||||
FIX_FDT_END,
|
||||
FIX_FDT = FIX_FDT_END + FIX_FDT_SIZE / PAGE_SIZE - 1,
|
||||
|
||||
/* Below fixmaps will be mapped using fixmap_pte */
|
||||
FIX_PTE,
|
||||
FIX_PMD,
|
||||
FIX_PUD,
|
||||
|
@ -57,18 +57,31 @@ struct riscv_isa_ext_data {
|
||||
unsigned int isa_ext_id;
|
||||
};
|
||||
|
||||
unsigned long riscv_isa_extension_base(const unsigned long *isa_bitmap);
|
||||
|
||||
#define riscv_isa_extension_mask(ext) BIT_MASK(RISCV_ISA_EXT_##ext)
|
||||
|
||||
bool __riscv_isa_extension_available(const unsigned long *isa_bitmap, int bit);
|
||||
#define riscv_isa_extension_available(isa_bitmap, ext) \
|
||||
__riscv_isa_extension_available(isa_bitmap, RISCV_ISA_EXT_##ext)
|
||||
|
||||
static __always_inline bool
|
||||
riscv_has_extension_likely(const unsigned long ext)
|
||||
{
|
||||
compiletime_assert(ext < RISCV_ISA_EXT_MAX,
|
||||
"ext must be < RISCV_ISA_EXT_MAX");
|
||||
|
||||
asm_volatile_goto(
|
||||
ALTERNATIVE("j %l[l_no]", "nop", 0, %[ext], 1)
|
||||
:
|
||||
: [ext] "i" (ext)
|
||||
:
|
||||
: l_no);
|
||||
if (IS_ENABLED(CONFIG_RISCV_ALTERNATIVE)) {
|
||||
asm_volatile_goto(
|
||||
ALTERNATIVE("j %l[l_no]", "nop", 0, %[ext], 1)
|
||||
:
|
||||
: [ext] "i" (ext)
|
||||
:
|
||||
: l_no);
|
||||
} else {
|
||||
if (!__riscv_isa_extension_available(NULL, ext))
|
||||
goto l_no;
|
||||
}
|
||||
|
||||
return true;
|
||||
l_no:
|
||||
@ -81,26 +94,23 @@ riscv_has_extension_unlikely(const unsigned long ext)
|
||||
compiletime_assert(ext < RISCV_ISA_EXT_MAX,
|
||||
"ext must be < RISCV_ISA_EXT_MAX");
|
||||
|
||||
asm_volatile_goto(
|
||||
ALTERNATIVE("nop", "j %l[l_yes]", 0, %[ext], 1)
|
||||
:
|
||||
: [ext] "i" (ext)
|
||||
:
|
||||
: l_yes);
|
||||
if (IS_ENABLED(CONFIG_RISCV_ALTERNATIVE)) {
|
||||
asm_volatile_goto(
|
||||
ALTERNATIVE("nop", "j %l[l_yes]", 0, %[ext], 1)
|
||||
:
|
||||
: [ext] "i" (ext)
|
||||
:
|
||||
: l_yes);
|
||||
} else {
|
||||
if (__riscv_isa_extension_available(NULL, ext))
|
||||
goto l_yes;
|
||||
}
|
||||
|
||||
return false;
|
||||
l_yes:
|
||||
return true;
|
||||
}
|
||||
|
||||
unsigned long riscv_isa_extension_base(const unsigned long *isa_bitmap);
|
||||
|
||||
#define riscv_isa_extension_mask(ext) BIT_MASK(RISCV_ISA_EXT_##ext)
|
||||
|
||||
bool __riscv_isa_extension_available(const unsigned long *isa_bitmap, int bit);
|
||||
#define riscv_isa_extension_available(isa_bitmap, ext) \
|
||||
__riscv_isa_extension_available(isa_bitmap, RISCV_ISA_EXT_##ext)
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* _ASM_RISCV_HWCAP_H */
|
||||
|
@ -87,9 +87,13 @@
|
||||
|
||||
#define FIXADDR_TOP PCI_IO_START
|
||||
#ifdef CONFIG_64BIT
|
||||
#define FIXADDR_SIZE PMD_SIZE
|
||||
#define MAX_FDT_SIZE PMD_SIZE
|
||||
#define FIX_FDT_SIZE (MAX_FDT_SIZE + SZ_2M)
|
||||
#define FIXADDR_SIZE (PMD_SIZE + FIX_FDT_SIZE)
|
||||
#else
|
||||
#define FIXADDR_SIZE PGDIR_SIZE
|
||||
#define MAX_FDT_SIZE PGDIR_SIZE
|
||||
#define FIX_FDT_SIZE MAX_FDT_SIZE
|
||||
#define FIXADDR_SIZE (PGDIR_SIZE + FIX_FDT_SIZE)
|
||||
#endif
|
||||
#define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE)
|
||||
|
||||
|
@ -12,6 +12,8 @@
|
||||
#include <asm/errata_list.h>
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
extern unsigned long asid_mask;
|
||||
|
||||
static inline void local_flush_tlb_all(void)
|
||||
{
|
||||
__asm__ __volatile__ ("sfence.vma" : : : "memory");
|
||||
|
@ -278,12 +278,8 @@ void __init setup_arch(char **cmdline_p)
|
||||
#if IS_ENABLED(CONFIG_BUILTIN_DTB)
|
||||
unflatten_and_copy_device_tree();
|
||||
#else
|
||||
if (early_init_dt_verify(__va(XIP_FIXUP(dtb_early_pa))))
|
||||
unflatten_device_tree();
|
||||
else
|
||||
pr_err("No DTB found in kernel mappings\n");
|
||||
unflatten_device_tree();
|
||||
#endif
|
||||
early_init_fdt_scan_reserved_mem();
|
||||
misc_mem_init();
|
||||
|
||||
init_resources();
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <asm/signal32.h>
|
||||
#include <asm/switch_to.h>
|
||||
#include <asm/csr.h>
|
||||
#include <asm/cacheflush.h>
|
||||
|
||||
extern u32 __user_rt_sigreturn[2];
|
||||
|
||||
@ -181,6 +182,7 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
|
||||
{
|
||||
struct rt_sigframe __user *frame;
|
||||
long err = 0;
|
||||
unsigned long __maybe_unused addr;
|
||||
|
||||
frame = get_sigframe(ksig, regs, sizeof(*frame));
|
||||
if (!access_ok(frame, sizeof(*frame)))
|
||||
@ -209,7 +211,12 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
|
||||
if (copy_to_user(&frame->sigreturn_code, __user_rt_sigreturn,
|
||||
sizeof(frame->sigreturn_code)))
|
||||
return -EFAULT;
|
||||
regs->ra = (unsigned long)&frame->sigreturn_code;
|
||||
|
||||
addr = (unsigned long)&frame->sigreturn_code;
|
||||
/* Make sure the two instructions are pushed to icache. */
|
||||
flush_icache_range(addr, addr + sizeof(frame->sigreturn_code));
|
||||
|
||||
regs->ra = addr;
|
||||
#endif /* CONFIG_MMU */
|
||||
|
||||
/*
|
||||
|
@ -147,10 +147,8 @@ static void kvm_riscv_vcpu_timer_blocking(struct kvm_vcpu *vcpu)
|
||||
return;
|
||||
|
||||
delta_ns = kvm_riscv_delta_cycles2ns(t->next_cycles, gt, t);
|
||||
if (delta_ns) {
|
||||
hrtimer_start(&t->hrt, ktime_set(0, delta_ns), HRTIMER_MODE_REL);
|
||||
t->next_set = true;
|
||||
}
|
||||
hrtimer_start(&t->hrt, ktime_set(0, delta_ns), HRTIMER_MODE_REL);
|
||||
t->next_set = true;
|
||||
}
|
||||
|
||||
static void kvm_riscv_vcpu_timer_unblocking(struct kvm_vcpu *vcpu)
|
||||
|
@ -22,7 +22,7 @@ DEFINE_STATIC_KEY_FALSE(use_asid_allocator);
|
||||
|
||||
static unsigned long asid_bits;
|
||||
static unsigned long num_asids;
|
||||
static unsigned long asid_mask;
|
||||
unsigned long asid_mask;
|
||||
|
||||
static atomic_long_t current_version;
|
||||
|
||||
|
@ -57,7 +57,6 @@ unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)]
|
||||
EXPORT_SYMBOL(empty_zero_page);
|
||||
|
||||
extern char _start[];
|
||||
#define DTB_EARLY_BASE_VA PGDIR_SIZE
|
||||
void *_dtb_early_va __initdata;
|
||||
uintptr_t _dtb_early_pa __initdata;
|
||||
|
||||
@ -236,31 +235,22 @@ static void __init setup_bootmem(void)
|
||||
set_max_mapnr(max_low_pfn - ARCH_PFN_OFFSET);
|
||||
|
||||
reserve_initrd_mem();
|
||||
|
||||
/*
|
||||
* No allocation should be done before reserving the memory as defined
|
||||
* in the device tree, otherwise the allocation could end up in a
|
||||
* reserved region.
|
||||
*/
|
||||
early_init_fdt_scan_reserved_mem();
|
||||
|
||||
/*
|
||||
* If DTB is built in, no need to reserve its memblock.
|
||||
* Otherwise, do reserve it but avoid using
|
||||
* early_init_fdt_reserve_self() since __pa() does
|
||||
* not work for DTB pointers that are fixmap addresses
|
||||
*/
|
||||
if (!IS_ENABLED(CONFIG_BUILTIN_DTB)) {
|
||||
/*
|
||||
* In case the DTB is not located in a memory region we won't
|
||||
* be able to locate it later on via the linear mapping and
|
||||
* get a segfault when accessing it via __va(dtb_early_pa).
|
||||
* To avoid this situation copy DTB to a memory region.
|
||||
* Note that memblock_phys_alloc will also reserve DTB region.
|
||||
*/
|
||||
if (!memblock_is_memory(dtb_early_pa)) {
|
||||
size_t fdt_size = fdt_totalsize(dtb_early_va);
|
||||
phys_addr_t new_dtb_early_pa = memblock_phys_alloc(fdt_size, PAGE_SIZE);
|
||||
void *new_dtb_early_va = early_memremap(new_dtb_early_pa, fdt_size);
|
||||
|
||||
memcpy(new_dtb_early_va, dtb_early_va, fdt_size);
|
||||
early_memunmap(new_dtb_early_va, fdt_size);
|
||||
_dtb_early_pa = new_dtb_early_pa;
|
||||
} else
|
||||
memblock_reserve(dtb_early_pa, fdt_totalsize(dtb_early_va));
|
||||
}
|
||||
if (!IS_ENABLED(CONFIG_BUILTIN_DTB))
|
||||
memblock_reserve(dtb_early_pa, fdt_totalsize(dtb_early_va));
|
||||
|
||||
dma_contiguous_reserve(dma32_phys_limit);
|
||||
if (IS_ENABLED(CONFIG_64BIT))
|
||||
@ -279,9 +269,6 @@ pgd_t trampoline_pg_dir[PTRS_PER_PGD] __page_aligned_bss;
|
||||
static pte_t fixmap_pte[PTRS_PER_PTE] __page_aligned_bss;
|
||||
|
||||
pgd_t early_pg_dir[PTRS_PER_PGD] __initdata __aligned(PAGE_SIZE);
|
||||
static p4d_t __maybe_unused early_dtb_p4d[PTRS_PER_P4D] __initdata __aligned(PAGE_SIZE);
|
||||
static pud_t __maybe_unused early_dtb_pud[PTRS_PER_PUD] __initdata __aligned(PAGE_SIZE);
|
||||
static pmd_t __maybe_unused early_dtb_pmd[PTRS_PER_PMD] __initdata __aligned(PAGE_SIZE);
|
||||
|
||||
#ifdef CONFIG_XIP_KERNEL
|
||||
#define pt_ops (*(struct pt_alloc_ops *)XIP_FIXUP(&pt_ops))
|
||||
@ -626,9 +613,6 @@ static void __init create_p4d_mapping(p4d_t *p4dp,
|
||||
#define trampoline_pgd_next (pgtable_l5_enabled ? \
|
||||
(uintptr_t)trampoline_p4d : (pgtable_l4_enabled ? \
|
||||
(uintptr_t)trampoline_pud : (uintptr_t)trampoline_pmd))
|
||||
#define early_dtb_pgd_next (pgtable_l5_enabled ? \
|
||||
(uintptr_t)early_dtb_p4d : (pgtable_l4_enabled ? \
|
||||
(uintptr_t)early_dtb_pud : (uintptr_t)early_dtb_pmd))
|
||||
#else
|
||||
#define pgd_next_t pte_t
|
||||
#define alloc_pgd_next(__va) pt_ops.alloc_pte(__va)
|
||||
@ -636,7 +620,6 @@ static void __init create_p4d_mapping(p4d_t *p4dp,
|
||||
#define create_pgd_next_mapping(__nextp, __va, __pa, __sz, __prot) \
|
||||
create_pte_mapping(__nextp, __va, __pa, __sz, __prot)
|
||||
#define fixmap_pgd_next ((uintptr_t)fixmap_pte)
|
||||
#define early_dtb_pgd_next ((uintptr_t)early_dtb_pmd)
|
||||
#define create_p4d_mapping(__pmdp, __va, __pa, __sz, __prot) do {} while(0)
|
||||
#define create_pud_mapping(__pmdp, __va, __pa, __sz, __prot) do {} while(0)
|
||||
#define create_pmd_mapping(__pmdp, __va, __pa, __sz, __prot) do {} while(0)
|
||||
@ -860,32 +843,28 @@ static void __init create_kernel_page_table(pgd_t *pgdir, bool early)
|
||||
* this means 2 PMD entries whereas for 32-bit kernel, this is only 1 PGDIR
|
||||
* entry.
|
||||
*/
|
||||
static void __init create_fdt_early_page_table(pgd_t *pgdir, uintptr_t dtb_pa)
|
||||
static void __init create_fdt_early_page_table(pgd_t *pgdir,
|
||||
uintptr_t fix_fdt_va,
|
||||
uintptr_t dtb_pa)
|
||||
{
|
||||
#ifndef CONFIG_BUILTIN_DTB
|
||||
uintptr_t pa = dtb_pa & ~(PMD_SIZE - 1);
|
||||
|
||||
create_pgd_mapping(early_pg_dir, DTB_EARLY_BASE_VA,
|
||||
IS_ENABLED(CONFIG_64BIT) ? early_dtb_pgd_next : pa,
|
||||
PGDIR_SIZE,
|
||||
IS_ENABLED(CONFIG_64BIT) ? PAGE_TABLE : PAGE_KERNEL);
|
||||
#ifndef CONFIG_BUILTIN_DTB
|
||||
/* Make sure the fdt fixmap address is always aligned on PMD size */
|
||||
BUILD_BUG_ON(FIX_FDT % (PMD_SIZE / PAGE_SIZE));
|
||||
|
||||
if (pgtable_l5_enabled)
|
||||
create_p4d_mapping(early_dtb_p4d, DTB_EARLY_BASE_VA,
|
||||
(uintptr_t)early_dtb_pud, P4D_SIZE, PAGE_TABLE);
|
||||
|
||||
if (pgtable_l4_enabled)
|
||||
create_pud_mapping(early_dtb_pud, DTB_EARLY_BASE_VA,
|
||||
(uintptr_t)early_dtb_pmd, PUD_SIZE, PAGE_TABLE);
|
||||
|
||||
if (IS_ENABLED(CONFIG_64BIT)) {
|
||||
create_pmd_mapping(early_dtb_pmd, DTB_EARLY_BASE_VA,
|
||||
/* In 32-bit only, the fdt lies in its own PGD */
|
||||
if (!IS_ENABLED(CONFIG_64BIT)) {
|
||||
create_pgd_mapping(early_pg_dir, fix_fdt_va,
|
||||
pa, MAX_FDT_SIZE, PAGE_KERNEL);
|
||||
} else {
|
||||
create_pmd_mapping(fixmap_pmd, fix_fdt_va,
|
||||
pa, PMD_SIZE, PAGE_KERNEL);
|
||||
create_pmd_mapping(early_dtb_pmd, DTB_EARLY_BASE_VA + PMD_SIZE,
|
||||
create_pmd_mapping(fixmap_pmd, fix_fdt_va + PMD_SIZE,
|
||||
pa + PMD_SIZE, PMD_SIZE, PAGE_KERNEL);
|
||||
}
|
||||
|
||||
dtb_early_va = (void *)DTB_EARLY_BASE_VA + (dtb_pa & (PMD_SIZE - 1));
|
||||
dtb_early_va = (void *)fix_fdt_va + (dtb_pa & (PMD_SIZE - 1));
|
||||
#else
|
||||
/*
|
||||
* For 64-bit kernel, __va can't be used since it would return a linear
|
||||
@ -1055,7 +1034,8 @@ asmlinkage void __init setup_vm(uintptr_t dtb_pa)
|
||||
create_kernel_page_table(early_pg_dir, true);
|
||||
|
||||
/* Setup early mapping for FDT early scan */
|
||||
create_fdt_early_page_table(early_pg_dir, dtb_pa);
|
||||
create_fdt_early_page_table(early_pg_dir,
|
||||
__fix_to_virt(FIX_FDT), dtb_pa);
|
||||
|
||||
/*
|
||||
* Bootime fixmap only can handle PMD_SIZE mapping. Thus, boot-ioremap
|
||||
@ -1097,6 +1077,16 @@ static void __init setup_vm_final(void)
|
||||
u64 i;
|
||||
|
||||
/* Setup swapper PGD for fixmap */
|
||||
#if !defined(CONFIG_64BIT)
|
||||
/*
|
||||
* In 32-bit, the device tree lies in a pgd entry, so it must be copied
|
||||
* directly in swapper_pg_dir in addition to the pgd entry that points
|
||||
* to fixmap_pte.
|
||||
*/
|
||||
unsigned long idx = pgd_index(__fix_to_virt(FIX_FDT));
|
||||
|
||||
set_pgd(&swapper_pg_dir[idx], early_pg_dir[idx]);
|
||||
#endif
|
||||
create_pgd_mapping(swapper_pg_dir, FIXADDR_START,
|
||||
__pa_symbol(fixmap_pgd_next),
|
||||
PGDIR_SIZE, PAGE_TABLE);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user