mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-05 05:57:16 -04:00
Merge commit '6e64f4580381e32c06ee146ca807c555b8f73e24' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into gpio/for-next
This commit is contained in:
1
.mailmap
1
.mailmap
@@ -673,6 +673,7 @@ Muchun Song <muchun.song@linux.dev> <smuchun@gmail.com>
|
||||
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 Mokashi <sachin.mokashi@intel.com> <sachinx.mokashi@intel.com>
|
||||
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>
|
||||
|
||||
6
CREDITS
6
CREDITS
@@ -4378,6 +4378,12 @@ S: 542 West 112th Street, 5N
|
||||
S: New York, New York 10025
|
||||
S: USA
|
||||
|
||||
N: Masahiro Yamada
|
||||
E: masahiroy@kernel.org
|
||||
D: Kbuild Maintainer 2017-2025
|
||||
D: Kconfig Maintainer 2018-2025
|
||||
S: Japan
|
||||
|
||||
N: Li Yang
|
||||
E: leoli@freescale.com
|
||||
D: Freescale Highspeed USB device driver
|
||||
|
||||
@@ -861,3 +861,25 @@ Description: This is a read-only entry to show the value of sb.s_encoding_flags,
|
||||
SB_ENC_STRICT_MODE_FL 0x00000001
|
||||
SB_ENC_NO_COMPAT_FALLBACK_FL 0x00000002
|
||||
============================ ==========
|
||||
|
||||
What: /sys/fs/f2fs/<disk>/reserved_pin_section
|
||||
Date: June 2025
|
||||
Contact: "Chao Yu" <chao@kernel.org>
|
||||
Description: This threshold is used to control triggering garbage collection while
|
||||
fallocating on pinned file, so, it can guarantee there is enough free
|
||||
reserved section before preallocating on pinned file.
|
||||
By default, the value is ovp_sections, especially, for zoned ufs, the
|
||||
value is 1.
|
||||
|
||||
What: /sys/fs/f2fs/<disk>/gc_boost_gc_multiple
|
||||
Date: June 2025
|
||||
Contact: "Daeho Jeong" <daehojeong@google.com>
|
||||
Description: Set a multiplier for the background GC migration window when F2FS GC is
|
||||
boosted. The range should be from 1 to the segment count in a section.
|
||||
Default: 5
|
||||
|
||||
What: /sys/fs/f2fs/<disk>/gc_boost_gc_greedy
|
||||
Date: June 2025
|
||||
Contact: "Daeho Jeong" <daehojeong@google.com>
|
||||
Description: Control GC algorithm for boost GC. 0: cost benefit, 1: greedy
|
||||
Default: 1
|
||||
|
||||
@@ -131,3 +131,59 @@ Get IO accounting for pid 1, it works only with -p::
|
||||
linuxrc: read=65536, write=0, cancelled_write=0
|
||||
|
||||
The above command can be used with -v to get more debug information.
|
||||
|
||||
After the system starts, use `delaytop` to get the system-wide delay information,
|
||||
which includes system-wide PSI information and Top-N high-latency tasks.
|
||||
|
||||
`delaytop` supports sorting by CPU latency in descending order by default,
|
||||
displays the top 20 high-latency tasks by default, and refreshes the latency
|
||||
data every 2 seconds by default.
|
||||
|
||||
Get PSI information and Top-N tasks delay, since system boot::
|
||||
|
||||
bash# ./delaytop
|
||||
System Pressure Information: (avg10/avg60/avg300/total)
|
||||
CPU some: 0.0%/ 0.0%/ 0.0%/ 345(ms)
|
||||
CPU full: 0.0%/ 0.0%/ 0.0%/ 0(ms)
|
||||
Memory full: 0.0%/ 0.0%/ 0.0%/ 0(ms)
|
||||
Memory some: 0.0%/ 0.0%/ 0.0%/ 0(ms)
|
||||
IO full: 0.0%/ 0.0%/ 0.0%/ 65(ms)
|
||||
IO some: 0.0%/ 0.0%/ 0.0%/ 79(ms)
|
||||
IRQ full: 0.0%/ 0.0%/ 0.0%/ 0(ms)
|
||||
Top 20 processes (sorted by CPU delay):
|
||||
PID TGID COMMAND CPU(ms) IO(ms) SWAP(ms) RCL(ms) THR(ms) CMP(ms) WP(ms) IRQ(ms)
|
||||
----------------------------------------------------------------------------------------------
|
||||
161 161 zombie_memcg_re 1.40 0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
130 130 blkcg_punt_bio 1.37 0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
444 444 scsi_tmf_0 0.73 0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
1280 1280 rsyslogd 0.53 0.04 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
12 12 ksoftirqd/0 0.47 0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
1277 1277 nbd-server 0.44 0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
308 308 kworker/2:2-sys 0.41 0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
55 55 netns 0.36 0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
1187 1187 acpid 0.31 0.03 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
6184 6184 kworker/1:2-sys 0.24 0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
186 186 kaluad 0.24 0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
18 18 ksoftirqd/1 0.24 0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
185 185 kmpath_rdacd 0.23 0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
190 190 kstrp 0.23 0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
2759 2759 agetty 0.20 0.03 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
1190 1190 kworker/0:3-sys 0.19 0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
1272 1272 sshd 0.15 0.04 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
1156 1156 license 0.15 0.11 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
134 134 md 0.13 0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
6142 6142 kworker/3:2-xfs 0.13 0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
|
||||
Dynamic interactive interface of delaytop::
|
||||
|
||||
# ./delaytop -p pid
|
||||
Print delayacct stats
|
||||
|
||||
# ./delaytop -P num
|
||||
Display the top N tasks
|
||||
|
||||
# ./delaytop -n num
|
||||
Set delaytop refresh frequency (num times)
|
||||
|
||||
# ./delaytop -d secs
|
||||
Specify refresh interval as secs
|
||||
|
||||
@@ -80,11 +80,11 @@ less sharing than average you'll need a larger-than-average metadata device.
|
||||
|
||||
As a guide, we suggest you calculate the number of bytes to use in the
|
||||
metadata device as 48 * $data_dev_size / $data_block_size but round it up
|
||||
to 2MB if the answer is smaller. If you're creating large numbers of
|
||||
to 2MiB if the answer is smaller. If you're creating large numbers of
|
||||
snapshots which are recording large amounts of change, you may find you
|
||||
need to increase this.
|
||||
|
||||
The largest size supported is 16GB: If the device is larger,
|
||||
The largest size supported is 16GiB: If the device is larger,
|
||||
a warning will be issued and the excess space will not be used.
|
||||
|
||||
Reloading a pool table
|
||||
@@ -107,13 +107,13 @@ Using an existing pool device
|
||||
|
||||
$data_block_size gives the smallest unit of disk space that can be
|
||||
allocated at a time expressed in units of 512-byte sectors.
|
||||
$data_block_size must be between 128 (64KB) and 2097152 (1GB) and a
|
||||
multiple of 128 (64KB). $data_block_size cannot be changed after the
|
||||
$data_block_size must be between 128 (64KiB) and 2097152 (1GiB) and a
|
||||
multiple of 128 (64KiB). $data_block_size cannot be changed after the
|
||||
thin-pool is created. People primarily interested in thin provisioning
|
||||
may want to use a value such as 1024 (512KB). People doing lots of
|
||||
snapshotting may want a smaller value such as 128 (64KB). If you are
|
||||
may want to use a value such as 1024 (512KiB). People doing lots of
|
||||
snapshotting may want a smaller value such as 128 (64KiB). If you are
|
||||
not zeroing newly-allocated data, a larger $data_block_size in the
|
||||
region of 256000 (128MB) is suggested.
|
||||
region of 262144 (128MiB) is suggested.
|
||||
|
||||
$low_water_mark is expressed in blocks of size $data_block_size. If
|
||||
free space on the data device drops below this level then a dm event
|
||||
@@ -291,7 +291,7 @@ i) Constructor
|
||||
error_if_no_space:
|
||||
Error IOs, instead of queueing, if no space.
|
||||
|
||||
Data block size must be between 64KB (128 sectors) and 1GB
|
||||
Data block size must be between 64KiB (128 sectors) and 1GiB
|
||||
(2097152 sectors) inclusive.
|
||||
|
||||
|
||||
|
||||
@@ -311,6 +311,27 @@ crashkernel syntax
|
||||
|
||||
crashkernel=0,low
|
||||
|
||||
4) crashkernel=size,cma
|
||||
|
||||
Reserve additional crash kernel memory from CMA. This reservation is
|
||||
usable by the first system's userspace memory and kernel movable
|
||||
allocations (memory balloon, zswap). Pages allocated from this memory
|
||||
range will not be included in the vmcore so this should not be used if
|
||||
dumping of userspace memory is intended and it has to be expected that
|
||||
some movable kernel pages may be missing from the dump.
|
||||
|
||||
A standard crashkernel reservation, as described above, is still needed
|
||||
to hold the crash kernel and initrd.
|
||||
|
||||
This option increases the risk of a kdump failure: DMA transfers
|
||||
configured by the first kernel may end up corrupting the second
|
||||
kernel's memory.
|
||||
|
||||
This reservation method is intended for systems that can't afford to
|
||||
sacrifice enough memory for standard crashkernel reservation and where
|
||||
less reliable and possibly incomplete kdump is preferable to no kdump at
|
||||
all.
|
||||
|
||||
Boot into System Kernel
|
||||
-----------------------
|
||||
1) Update the boot loader (such as grub, yaboot, or lilo) configuration
|
||||
|
||||
@@ -994,6 +994,28 @@
|
||||
0: to disable low allocation.
|
||||
It will be ignored when crashkernel=X,high is not used
|
||||
or memory reserved is below 4G.
|
||||
crashkernel=size[KMG],cma
|
||||
[KNL, X86] Reserve additional crash kernel memory from
|
||||
CMA. This reservation is usable by the first system's
|
||||
userspace memory and kernel movable allocations (memory
|
||||
balloon, zswap). Pages allocated from this memory range
|
||||
will not be included in the vmcore so this should not
|
||||
be used if dumping of userspace memory is intended and
|
||||
it has to be expected that some movable kernel pages
|
||||
may be missing from the dump.
|
||||
|
||||
A standard crashkernel reservation, as described above,
|
||||
is still needed to hold the crash kernel and initrd.
|
||||
|
||||
This option increases the risk of a kdump failure: DMA
|
||||
transfers configured by the first kernel may end up
|
||||
corrupting the second kernel's memory.
|
||||
|
||||
This reservation method is intended for systems that
|
||||
can't afford to sacrifice enough memory for standard
|
||||
crashkernel reservation and where less reliable and
|
||||
possibly incomplete kdump is preferable to no kdump at
|
||||
all.
|
||||
|
||||
cryptomgr.notests
|
||||
[KNL] Disable crypto self-tests
|
||||
@@ -1806,6 +1828,27 @@
|
||||
backtraces on all cpus.
|
||||
Format: 0 | 1
|
||||
|
||||
hash_pointers=
|
||||
[KNL,EARLY]
|
||||
By default, when pointers are printed to the console
|
||||
or buffers via the %p format string, that pointer is
|
||||
"hashed", i.e. obscured by hashing the pointer value.
|
||||
This is a security feature that hides actual kernel
|
||||
addresses from unprivileged users, but it also makes
|
||||
debugging the kernel more difficult since unequal
|
||||
pointers can no longer be compared. The choices are:
|
||||
Format: { auto | always | never }
|
||||
Default: auto
|
||||
|
||||
auto - Hash pointers unless slab_debug is enabled.
|
||||
always - Always hash pointers (even if slab_debug is
|
||||
enabled).
|
||||
never - Never hash pointers. This option should only
|
||||
be specified when debugging the kernel. Do
|
||||
not use on production kernels. The boot
|
||||
param "no_hash_pointers" is an alias for
|
||||
this mode.
|
||||
|
||||
hashdist= [KNL,NUMA] Large hashes allocated during boot
|
||||
are distributed across NUMA nodes. Defaults on
|
||||
for 64-bit NUMA, off otherwise.
|
||||
@@ -4194,18 +4237,7 @@
|
||||
|
||||
no_hash_pointers
|
||||
[KNL,EARLY]
|
||||
Force pointers printed to the console or buffers to be
|
||||
unhashed. By default, when a pointer is printed via %p
|
||||
format string, that pointer is "hashed", i.e. obscured
|
||||
by hashing the pointer value. This is a security feature
|
||||
that hides actual kernel addresses from unprivileged
|
||||
users, but it also makes debugging the kernel more
|
||||
difficult since unequal pointers can no longer be
|
||||
compared. However, if this command-line option is
|
||||
specified, then all normal pointers will have their true
|
||||
value printed. This option should only be specified when
|
||||
debugging the kernel. Please do not use on production
|
||||
kernels.
|
||||
Alias for "hash_pointers=never".
|
||||
|
||||
nohibernate [HIBERNATION] Disable hibernation and resume.
|
||||
|
||||
@@ -4557,7 +4589,7 @@
|
||||
bit 2: print timer info
|
||||
bit 3: print locks info if CONFIG_LOCKDEP is on
|
||||
bit 4: print ftrace buffer
|
||||
bit 5: print all printk messages in buffer
|
||||
bit 5: replay all messages on consoles at the end of panic
|
||||
bit 6: print all CPUs backtrace (if available in the arch)
|
||||
bit 7: print only tasks in uninterruptible (blocked) state
|
||||
*Be aware* that this option may print a _lot_ of lines,
|
||||
@@ -4565,6 +4597,25 @@
|
||||
Use this option carefully, maybe worth to setup a
|
||||
bigger log buffer with "log_buf_len" along with this.
|
||||
|
||||
panic_sys_info= A comma separated list of extra information to be dumped
|
||||
on panic.
|
||||
Format: val[,val...]
|
||||
Where @val can be any of the following:
|
||||
|
||||
tasks: print all tasks info
|
||||
mem: print system memory info
|
||||
timers: print timers info
|
||||
locks: print locks info if CONFIG_LOCKDEP is on
|
||||
ftrace: print ftrace buffer
|
||||
all_bt: print all CPUs backtrace (if available in the arch)
|
||||
blocked_tasks: print only tasks in uninterruptible (blocked) state
|
||||
|
||||
This is a human readable alternative to the 'panic_print' option.
|
||||
|
||||
panic_console_replay
|
||||
When panic happens, replay all kernel messages on
|
||||
consoles at the end of panic.
|
||||
|
||||
parkbd.port= [HW] Parallel port number the keyboard adapter is
|
||||
connected to, default is 0.
|
||||
Format: <parport#>
|
||||
@@ -6603,6 +6654,10 @@
|
||||
Documentation/admin-guide/mm/slab.rst.
|
||||
(slub_debug legacy name also accepted for now)
|
||||
|
||||
Using this option implies the "no_hash_pointers"
|
||||
option which can be undone by adding the
|
||||
"hash_pointers=always" option.
|
||||
|
||||
slab_max_order= [MM]
|
||||
Determines the maximum allowed order for slabs.
|
||||
A high setting may cause OOMs due to memory
|
||||
@@ -7032,6 +7087,11 @@
|
||||
consumed by the stack hash table. By default this is set
|
||||
to false.
|
||||
|
||||
stack_depot_max_pools= [KNL,EARLY]
|
||||
Specify the maximum number of pools to use for storing
|
||||
stack traces. Pools are allocated on-demand up to this
|
||||
limit. Default value is 8191 pools.
|
||||
|
||||
stacktrace [FTRACE]
|
||||
Enabled the stack tracer on boot up.
|
||||
|
||||
|
||||
@@ -890,7 +890,7 @@ bit 1 print system memory info
|
||||
bit 2 print timer info
|
||||
bit 3 print locks info if ``CONFIG_LOCKDEP`` is on
|
||||
bit 4 print ftrace buffer
|
||||
bit 5 print all printk messages in buffer
|
||||
bit 5 replay all messages on consoles at the end of panic
|
||||
bit 6 print all CPUs backtrace (if available in the arch)
|
||||
bit 7 print only tasks in uninterruptible (blocked) state
|
||||
===== ============================================
|
||||
@@ -900,6 +900,24 @@ So for example to print tasks and memory info on panic, user can::
|
||||
echo 3 > /proc/sys/kernel/panic_print
|
||||
|
||||
|
||||
panic_sys_info
|
||||
==============
|
||||
|
||||
A comma separated list of extra information to be dumped on panic,
|
||||
for example, "tasks,mem,timers,...". It is a human readable alternative
|
||||
to 'panic_print'. Possible values are:
|
||||
|
||||
============= ===================================================
|
||||
tasks print all tasks info
|
||||
mem print system memory info
|
||||
timer print timers info
|
||||
lock print locks info if CONFIG_LOCKDEP is on
|
||||
ftrace print ftrace buffer
|
||||
all_bt print all CPUs backtrace (if available in the arch)
|
||||
blocked_tasks print only tasks in uninterruptible (blocked) state
|
||||
============= ===================================================
|
||||
|
||||
|
||||
panic_on_rcu_stall
|
||||
==================
|
||||
|
||||
|
||||
@@ -133,4 +133,3 @@ More Memory Management Functions
|
||||
.. kernel-doc:: mm/mmu_notifier.c
|
||||
.. kernel-doc:: mm/balloon_compaction.c
|
||||
.. kernel-doc:: mm/huge_memory.c
|
||||
.. kernel-doc:: mm/io-mapping.c
|
||||
|
||||
@@ -22,6 +22,11 @@ properties:
|
||||
compatible:
|
||||
items:
|
||||
- enum:
|
||||
- apple,s5l8960x-i2c
|
||||
- apple,t7000-i2c
|
||||
- apple,s8000-i2c
|
||||
- apple,t8010-i2c
|
||||
- apple,t8015-i2c
|
||||
- apple,t8103-i2c
|
||||
- apple,t8112-i2c
|
||||
- apple,t6000-i2c
|
||||
|
||||
179
Documentation/devicetree/bindings/i3c/renesas,i3c.yaml
Normal file
179
Documentation/devicetree/bindings/i3c/renesas,i3c.yaml
Normal file
@@ -0,0 +1,179 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/i3c/renesas,i3c.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Renesas RZ/G3S and RZ/G3E I3C Bus Interface
|
||||
|
||||
maintainers:
|
||||
- Wolfram Sang <wsa+renesas@sang-engineering.com>
|
||||
- Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
items:
|
||||
- enum:
|
||||
- renesas,r9a08g045-i3c # RZ/G3S
|
||||
- renesas,r9a09g047-i3c # RZ/G3E
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
items:
|
||||
- description: Non-recoverable internal error interrupt
|
||||
- description: Normal transfer error interrupt
|
||||
- description: Normal transfer abort interrupt
|
||||
- description: Normal response status buffer full interrupt
|
||||
- description: Normal command buffer empty interrupt
|
||||
- description: Normal IBI status buffer full interrupt
|
||||
- description: Normal Rx data buffer full interrupt
|
||||
- description: Normal Tx data buffer empty interrupt
|
||||
- description: Normal receive status buffer full interrupt
|
||||
- description: START condition detection interrupt
|
||||
- description: STOP condition detection interrupt
|
||||
- description: Transmit end interrupt
|
||||
- description: NACK detection interrupt
|
||||
- description: Arbitration lost interrupt
|
||||
- description: Timeout detection interrupt
|
||||
- description: Wake-up condition detection interrupt
|
||||
- description: HDR Exit Pattern detection interrupt
|
||||
minItems: 16
|
||||
|
||||
interrupt-names:
|
||||
items:
|
||||
- const: ierr
|
||||
- const: terr
|
||||
- const: abort
|
||||
- const: resp
|
||||
- const: cmd
|
||||
- const: ibi
|
||||
- const: rx
|
||||
- const: tx
|
||||
- const: rcv
|
||||
- const: st
|
||||
- const: sp
|
||||
- const: tend
|
||||
- const: nack
|
||||
- const: al
|
||||
- const: tmo
|
||||
- const: wu
|
||||
- const: exit
|
||||
minItems: 16
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: APB bus clock
|
||||
- description: transfer clock
|
||||
- description: SFRs clock
|
||||
minItems: 2
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: pclk
|
||||
- const: tclk
|
||||
- const: pclkrw
|
||||
minItems: 2
|
||||
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
|
||||
resets:
|
||||
items:
|
||||
- description: Reset signal
|
||||
- description: APB interface reset signal/SCAN reset signal
|
||||
|
||||
reset-names:
|
||||
items:
|
||||
- const: presetn
|
||||
- const: tresetn
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
- interrupt-names
|
||||
- clock-names
|
||||
- clocks
|
||||
- power-domains
|
||||
- resets
|
||||
- reset-names
|
||||
|
||||
allOf:
|
||||
- $ref: i3c.yaml#
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: renesas,r9a08g045-i3c
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
maxItems: 2
|
||||
clock-names:
|
||||
maxItems: 2
|
||||
interrupts:
|
||||
minItems: 17
|
||||
interrupt-names:
|
||||
minItems: 17
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: renesas,r9a09g047-i3c
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
minItems: 3
|
||||
clock-names:
|
||||
minItems: 3
|
||||
interrupts:
|
||||
maxItems: 16
|
||||
interrupt-names:
|
||||
maxItems: 16
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/r9a08g045-cpg.h>
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
|
||||
i3c@1005b000 {
|
||||
compatible = "renesas,r9a08g045-i3c";
|
||||
reg = <0x1005b000 0x1000>;
|
||||
clocks = <&cpg CPG_MOD R9A08G045_I3C_PCLK>,
|
||||
<&cpg CPG_MOD R9A08G045_I3C_TCLK>;
|
||||
clock-names = "pclk", "tclk";
|
||||
interrupts = <GIC_SPI 289 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 290 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 293 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 294 IRQ_TYPE_EDGE_RISING>,
|
||||
<GIC_SPI 295 IRQ_TYPE_EDGE_RISING>,
|
||||
<GIC_SPI 296 IRQ_TYPE_EDGE_RISING>,
|
||||
<GIC_SPI 297 IRQ_TYPE_EDGE_RISING>,
|
||||
<GIC_SPI 298 IRQ_TYPE_EDGE_RISING>,
|
||||
<GIC_SPI 299 IRQ_TYPE_EDGE_RISING>,
|
||||
<GIC_SPI 304 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 305 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 307 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 306 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "ierr", "terr", "abort", "resp",
|
||||
"cmd", "ibi", "rx", "tx", "rcv",
|
||||
"st", "sp", "tend", "nack",
|
||||
"al", "tmo", "wu", "exit";
|
||||
resets = <&cpg R9A08G045_I3C_PRESETN>,
|
||||
<&cpg R9A08G045_I3C_TRESETN>;
|
||||
reset-names = "presetn", "tresetn";
|
||||
power-domains = <&cpg>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
...
|
||||
@@ -89,6 +89,24 @@ properties:
|
||||
required:
|
||||
- reg
|
||||
|
||||
rmi4-f1a@1a:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
$ref: input.yaml#
|
||||
description:
|
||||
RMI4 Function 1A is for capacitive keys.
|
||||
|
||||
properties:
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
linux,keycodes:
|
||||
minItems: 1
|
||||
maxItems: 4
|
||||
|
||||
required:
|
||||
- reg
|
||||
|
||||
patternProperties:
|
||||
"^rmi4-f1[12]@1[12]$":
|
||||
type: object
|
||||
@@ -201,6 +219,7 @@ allOf:
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/input/linux-event-codes.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
i2c {
|
||||
@@ -234,6 +253,7 @@ examples:
|
||||
|
||||
rmi4-f1a@1a {
|
||||
reg = <0x1a>;
|
||||
linux,keycodes = <KEY_BACK KEY_HOME KEY_MENU>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -43,6 +43,7 @@ properties:
|
||||
- focaltech,ft5452
|
||||
- focaltech,ft6236
|
||||
- focaltech,ft8201
|
||||
- focaltech,ft8716
|
||||
- focaltech,ft8719
|
||||
|
||||
reg:
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
* NXP LPC32xx SoC Touchscreen Controller (TSC)
|
||||
|
||||
Required properties:
|
||||
- compatible: must be "nxp,lpc3220-tsc"
|
||||
- reg: physical base address of the controller and length of memory mapped
|
||||
region.
|
||||
- interrupts: The TSC/ADC interrupt
|
||||
|
||||
Example:
|
||||
|
||||
tsc@40048000 {
|
||||
compatible = "nxp,lpc3220-tsc";
|
||||
reg = <0x40048000 0x1000>;
|
||||
interrupt-parent = <&mic>;
|
||||
interrupts = <39 0>;
|
||||
};
|
||||
@@ -0,0 +1,43 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/input/touchscreen/nxp,lpc3220-tsc.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: NXP LPC32xx SoC Touchscreen Controller (TSC)
|
||||
|
||||
maintainers:
|
||||
- Frank Li <Frank.Li@nxp.com>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: nxp,lpc3220-tsc
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- clocks
|
||||
- interrupts
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/lpc32xx-clock.h>
|
||||
|
||||
touchscreen@40048000 {
|
||||
compatible = "nxp,lpc3220-tsc";
|
||||
reg = <0x40048000 0x1000>;
|
||||
interrupt-parent = <&mic>;
|
||||
interrupts = <39 0>;
|
||||
clocks = <&clk LPC32XX_CLK_ADC>;
|
||||
};
|
||||
@@ -37,6 +37,7 @@ unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/input/linux-event-codes.h>
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
@@ -46,5 +47,33 @@ examples:
|
||||
reg = <0x55>;
|
||||
interrupts = <2 0>;
|
||||
gpios = <&gpio1 166 0>;
|
||||
|
||||
touch-overlay {
|
||||
segment-0 {
|
||||
label = "Touchscreen";
|
||||
x-origin = <0>;
|
||||
x-size = <240>;
|
||||
y-origin = <40>;
|
||||
y-size = <280>;
|
||||
};
|
||||
|
||||
segment-1a {
|
||||
label = "Camera light";
|
||||
linux,code = <KEY_LIGHTS_TOGGLE>;
|
||||
x-origin = <40>;
|
||||
x-size = <40>;
|
||||
y-origin = <0>;
|
||||
y-size = <40>;
|
||||
};
|
||||
|
||||
segment-2a {
|
||||
label = "Power";
|
||||
linux,code = <KEY_POWER>;
|
||||
x-origin = <160>;
|
||||
x-size = <40>;
|
||||
y-origin = <0>;
|
||||
y-size = <40>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/input/touchscreen/ti.tsc2007.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Texas Instruments tsc2007 touchscreen controller
|
||||
|
||||
maintainers:
|
||||
- Frank Li <Frank.Li@nxp.com>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: ti,tsc2007
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
ti,x-plate-ohms:
|
||||
description: X-plate resistance in ohms.
|
||||
|
||||
gpios: true
|
||||
|
||||
pendown-gpio: true
|
||||
|
||||
ti,max-rt:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description: maximum pressure.
|
||||
|
||||
ti,fuzzx:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description:
|
||||
specifies the absolute input fuzz x value.
|
||||
If set, it will permit noise in the data up to +- the value given to the fuzz
|
||||
parameter, that is used to filter noise from the event stream.
|
||||
|
||||
ti,fuzzy:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description: specifies the absolute input fuzz y value.
|
||||
|
||||
ti,fuzzz:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description: specifies the absolute input fuzz z value.
|
||||
|
||||
ti,poll-period:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description:
|
||||
how much time to wait (in milliseconds) before reading again the
|
||||
values from the tsc2007.
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- ti,x-plate-ohms
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
touch@49 {
|
||||
compatible = "ti,tsc2007";
|
||||
reg = <0x49>;
|
||||
interrupt-parent = <&gpio4>;
|
||||
interrupts = <0x0 0x8>;
|
||||
gpios = <&gpio4 0 0>;
|
||||
ti,x-plate-ohms = <180>;
|
||||
};
|
||||
};
|
||||
@@ -87,6 +87,125 @@ properties:
|
||||
touchscreen-y-plate-ohms:
|
||||
description: Resistance of the Y-plate in Ohms
|
||||
|
||||
touch-overlay:
|
||||
description: |
|
||||
List of nodes defining segments (touch areas) on the touchscreen.
|
||||
|
||||
This object can be used to describe a series of segments to restrict
|
||||
the region within touch events are reported or buttons with a specific
|
||||
functionality.
|
||||
|
||||
This is of special interest if the touchscreen is shipped with a physical
|
||||
overlay on top of it with a frame that hides some part of the original
|
||||
touchscreen area. Printed buttons on that overlay are also a typical
|
||||
use case.
|
||||
|
||||
A new touchscreen area is defined as a sub-node without a key code. If a
|
||||
key code is defined in the sub-node, it will be interpreted as a button.
|
||||
|
||||
The x-origin and y-origin properties of a touchscreen area define the
|
||||
offset of a new origin from where the touchscreen events are referenced.
|
||||
This offset is applied to the events accordingly. The x-size and y-size
|
||||
properties define the size of the touchscreen effective area.
|
||||
|
||||
The following example shows a new touchscreen area with the new origin
|
||||
(0',0') for the touch events generated by the device.
|
||||
|
||||
Touchscreen (full area)
|
||||
┌────────────────────────────────────────┐
|
||||
│ ┌───────────────────────────────┐ │
|
||||
│ │ │ │
|
||||
│ ├ y-size │ │
|
||||
│ │ │ │
|
||||
│ │ touchscreen area │ │
|
||||
│ │ (no key code) │ │
|
||||
│ │ │ │
|
||||
│ │ x-size │ │
|
||||
│ ┌└──────────────┴────────────────┘ │
|
||||
│(0',0') │
|
||||
┌└────────────────────────────────────────┘
|
||||
(0,0)
|
||||
|
||||
where (0',0') = (0+x-origin,0+y-origin)
|
||||
|
||||
Sub-nodes with key codes report the touch events on their surface as key
|
||||
events instead.
|
||||
|
||||
The following example shows a touchscreen with a single button on it.
|
||||
|
||||
Touchscreen (full area)
|
||||
┌───────────────────────────────────┐
|
||||
│ │
|
||||
│ │
|
||||
│ ┌─────────┐ │
|
||||
│ │button 0 │ │
|
||||
│ │KEY_POWER│ │
|
||||
│ └─────────┘ │
|
||||
│ │
|
||||
│ │
|
||||
┌└───────────────────────────────────┘
|
||||
(0,0)
|
||||
|
||||
Segments defining buttons and clipped toushcreen areas can be combined
|
||||
as shown in the following example.
|
||||
In that case only the events within the touchscreen area are reported
|
||||
as touch events. Events within the button areas report their associated
|
||||
key code. Any events outside the defined areas are ignored.
|
||||
|
||||
Touchscreen (full area)
|
||||
┌─────────┬──────────────────────────────┐
|
||||
│ │ │
|
||||
│ │ ┌───────────────────────┐ │
|
||||
│ button 0│ │ │ │
|
||||
│KEY_POWER│ │ │ │
|
||||
│ │ │ │ │
|
||||
├─────────┤ │ touchscreen area │ │
|
||||
│ │ │ (no key code) │ │
|
||||
│ │ │ │ │
|
||||
│ button 1│ │ │ │
|
||||
│ KEY_INFO│ ┌└───────────────────────┘ │
|
||||
│ │(0',0') │
|
||||
┌└─────────┴──────────────────────────────┘
|
||||
(0,0)
|
||||
|
||||
type: object
|
||||
|
||||
patternProperties:
|
||||
'^segment-':
|
||||
type: object
|
||||
description:
|
||||
Each segment is represented as a sub-node.
|
||||
properties:
|
||||
x-origin:
|
||||
description: horizontal origin of the node area
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
|
||||
y-origin:
|
||||
description: vertical origin of the node area
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
|
||||
x-size:
|
||||
description: horizontal resolution of the node area
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
|
||||
y-size:
|
||||
description: vertical resolution of the node area
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
|
||||
label:
|
||||
description: descriptive name of the segment
|
||||
$ref: /schemas/types.yaml#/definitions/string
|
||||
|
||||
linux,code: true
|
||||
|
||||
required:
|
||||
- x-origin
|
||||
- y-origin
|
||||
- x-size
|
||||
- y-size
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
dependencies:
|
||||
touchscreen-size-x: [ touchscreen-size-y ]
|
||||
touchscreen-size-y: [ touchscreen-size-x ]
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
* Texas Instruments tsc2007 touchscreen controller
|
||||
|
||||
Required properties:
|
||||
- compatible: must be "ti,tsc2007".
|
||||
- reg: I2C address of the chip.
|
||||
- ti,x-plate-ohms: X-plate resistance in ohms.
|
||||
|
||||
Optional properties:
|
||||
- gpios: the interrupt gpio the chip is connected to (through the penirq pin).
|
||||
The penirq pin goes to low when the panel is touched.
|
||||
(see GPIO binding[1] for more details).
|
||||
- interrupts: (gpio) interrupt to which the chip is connected
|
||||
(see interrupt binding[0]).
|
||||
- ti,max-rt: maximum pressure.
|
||||
- ti,fuzzx: specifies the absolute input fuzz x value.
|
||||
If set, it will permit noise in the data up to +- the value given to the fuzz
|
||||
parameter, that is used to filter noise from the event stream.
|
||||
- ti,fuzzy: specifies the absolute input fuzz y value.
|
||||
- ti,fuzzz: specifies the absolute input fuzz z value.
|
||||
- ti,poll-period: how much time to wait (in milliseconds) before reading again the
|
||||
values from the tsc2007.
|
||||
|
||||
[0]: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
|
||||
[1]: Documentation/devicetree/bindings/gpio/gpio.txt
|
||||
|
||||
Example:
|
||||
&i2c1 {
|
||||
/* ... */
|
||||
tsc2007@49 {
|
||||
compatible = "ti,tsc2007";
|
||||
reg = <0x49>;
|
||||
interrupt-parent = <&gpio4>;
|
||||
interrupts = <0x0 0x8>;
|
||||
gpios = <&gpio4 0 0>;
|
||||
ti,x-plate-ohms = <180>;
|
||||
};
|
||||
|
||||
/* ... */
|
||||
};
|
||||
@@ -16,9 +16,14 @@ allOf:
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- amlogic,a4-rtc
|
||||
- amlogic,a5-rtc
|
||||
oneOf:
|
||||
- enum:
|
||||
- amlogic,a4-rtc
|
||||
- amlogic,a5-rtc
|
||||
- items:
|
||||
- enum:
|
||||
- amlogic,c3-rtc
|
||||
- const: amlogic,a5-rtc
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
@@ -18,7 +18,12 @@ allOf:
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: nxp,lpc1788-rtc
|
||||
oneOf:
|
||||
- items:
|
||||
- enum:
|
||||
- nxp,lpc1850-rtc
|
||||
- const: nxp,lpc1788-rtc
|
||||
- const: nxp,lpc1788-rtc
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
49
Documentation/devicetree/bindings/rtc/nxp,lpc3220-rtc.yaml
Normal file
49
Documentation/devicetree/bindings/rtc/nxp,lpc3220-rtc.yaml
Normal file
@@ -0,0 +1,49 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/rtc/nxp,lpc3220-rtc.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: NXP LPC32xx SoC Real-time Clock
|
||||
|
||||
maintainers:
|
||||
- Frank Li <Frank.Li@nxp.com>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- nxp,lpc3220-rtc
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
start-year: true
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
allOf:
|
||||
- $ref: rtc.yaml#
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
#include <dt-bindings/clock/lpc32xx-clock.h>
|
||||
|
||||
rtc@40024000 {
|
||||
compatible = "nxp,lpc3220-rtc";
|
||||
reg = <0x40024000 0x1000>;
|
||||
interrupt-parent = <&sic1>;
|
||||
interrupts = <20 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk LPC32XX_CLK_RTC>;
|
||||
};
|
||||
|
||||
@@ -12,6 +12,7 @@ maintainers:
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- microcrystal,rv8063
|
||||
- microcrystal,rv8263
|
||||
- nxp,pcf85063
|
||||
- nxp,pcf85063a
|
||||
@@ -44,13 +45,19 @@ properties:
|
||||
|
||||
wakeup-source: true
|
||||
|
||||
spi-cs-high: true
|
||||
|
||||
spi-3wire: true
|
||||
|
||||
allOf:
|
||||
- $ref: /schemas/spi/spi-peripheral-props.yaml#
|
||||
- $ref: rtc.yaml#
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- microcrystal,rv8063
|
||||
- microcrystal,rv8263
|
||||
then:
|
||||
properties:
|
||||
@@ -65,12 +72,23 @@ allOf:
|
||||
properties:
|
||||
quartz-load-femtofarads:
|
||||
const: 7000
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
not:
|
||||
contains:
|
||||
enum:
|
||||
- microcrystal,rv8063
|
||||
then:
|
||||
properties:
|
||||
spi-cs-high: false
|
||||
spi-3wire: false
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
additionalProperties: false
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
@@ -90,3 +108,16 @@ examples:
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
- |
|
||||
spi {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
rtc@0 {
|
||||
compatible = "microcrystal,rv8063";
|
||||
reg = <0>;
|
||||
spi-cs-high;
|
||||
spi-3wire;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/sophgo/sophgo,cv1800b-rtc.yaml#
|
||||
$id: http://devicetree.org/schemas/rtc/sophgo,cv1800b-rtc.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Real Time Clock of the Sophgo CV1800 SoC
|
||||
@@ -63,8 +63,6 @@ properties:
|
||||
- microcrystal,rv3029
|
||||
# Real Time Clock
|
||||
- microcrystal,rv8523
|
||||
# NXP LPC32xx SoC Real-time Clock
|
||||
- nxp,lpc3220-rtc
|
||||
# I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
|
||||
- ricoh,r2025sd
|
||||
# I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
|
||||
|
||||
@@ -9,21 +9,20 @@ title: Mediatek Universal Flash Storage (UFS) Controller
|
||||
maintainers:
|
||||
- Stanley Chu <stanley.chu@mediatek.com>
|
||||
|
||||
allOf:
|
||||
- $ref: ufs-common.yaml
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- mediatek,mt8183-ufshci
|
||||
- mediatek,mt8192-ufshci
|
||||
- mediatek,mt8195-ufshci
|
||||
|
||||
clocks:
|
||||
maxItems: 1
|
||||
minItems: 1
|
||||
maxItems: 8
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: ufs
|
||||
minItems: 1
|
||||
maxItems: 8
|
||||
|
||||
phys:
|
||||
maxItems: 1
|
||||
@@ -33,6 +32,10 @@ properties:
|
||||
|
||||
vcc-supply: true
|
||||
|
||||
mediatek,ufs-disable-mcq:
|
||||
$ref: /schemas/types.yaml#/definitions/flag
|
||||
description: The mask to disable MCQ (Multi-Circular Queue) for UFS host.
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- clocks
|
||||
@@ -43,6 +46,37 @@ required:
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
allOf:
|
||||
- $ref: ufs-common.yaml
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- mediatek,mt8195-ufshci
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
minItems: 8
|
||||
clock-names:
|
||||
items:
|
||||
- const: ufs
|
||||
- const: ufs_aes
|
||||
- const: ufs_tick
|
||||
- const: unipro_sysclk
|
||||
- const: unipro_tick
|
||||
- const: unipro_mp_bclk
|
||||
- const: ufs_tx_symbol
|
||||
- const: ufs_mem_sub
|
||||
else:
|
||||
properties:
|
||||
clocks:
|
||||
maxItems: 1
|
||||
clock-names:
|
||||
items:
|
||||
- const: ufs
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/mt8183-clk.h>
|
||||
|
||||
@@ -238,9 +238,9 @@ usrjquota=<file> Appoint specified file and type during mount, so that quota
|
||||
grpjquota=<file> information can be properly updated during recovery flow,
|
||||
prjjquota=<file> <quota file>: must be in root directory;
|
||||
jqfmt=<quota type> <quota type>: [vfsold,vfsv0,vfsv1].
|
||||
offusrjquota Turn off user journalled quota.
|
||||
offgrpjquota Turn off group journalled quota.
|
||||
offprjjquota Turn off project journalled quota.
|
||||
usrjquota= Turn off user journalled quota.
|
||||
grpjquota= Turn off group journalled quota.
|
||||
prjjquota= Turn off project journalled quota.
|
||||
quota Enable plain user disk quota accounting.
|
||||
noquota Disable all plain disk quota option.
|
||||
alloc_mode=%s Adjust block allocation policy, which supports "reuse"
|
||||
|
||||
@@ -29,8 +29,25 @@ The driver allows configuration of the touch screen via a set of sysfs files:
|
||||
|
||||
|
||||
For debugging purposes the driver provides a few files in the debug
|
||||
filesystem (if available in the kernel). In /sys/kernel/debug/edt_ft5x06
|
||||
you'll find the following files:
|
||||
filesystem (if available in the kernel). They are located in:
|
||||
|
||||
/sys/kernel/debug/i2c/<i2c-bus>/<i2c-device>/
|
||||
|
||||
If you don't know the bus and device numbers, you can look them up with this
|
||||
command:
|
||||
|
||||
$ ls -l /sys/bus/i2c/drivers/edt_ft5x06
|
||||
|
||||
The dereference of the symlink will contain the needed information. You will
|
||||
need the last two elements of its path:
|
||||
|
||||
0-0038 -> ../../../../devices/platform/soc/fcfee800.i2c/i2c-0/0-0038
|
||||
|
||||
So in this case, the location for the debug files is:
|
||||
|
||||
/sys/kernel/debug/i2c/i2c-0/0-0038/
|
||||
|
||||
There, you'll find the following files:
|
||||
|
||||
num_x, num_y:
|
||||
(readonly) contains the number of sensor fields in X- and
|
||||
|
||||
@@ -190,8 +190,21 @@ Gamepads report the following events:
|
||||
|
||||
Rumble is advertised as FF_RUMBLE.
|
||||
|
||||
- Grip buttons:
|
||||
|
||||
Many pads include buttons on the rear, usually referred to as either grip or
|
||||
rear buttons, or paddles. These are often reprogrammable by the firmware to
|
||||
appear as "normal" buttons, but are sometimes exposed to software too. Some
|
||||
notable examples of this are the Steam Deck, which has R4, R5, L4, and L5 on
|
||||
the back; the Xbox Elite pads, which have P1-P4; and the Switch 2 Pro
|
||||
Controller, which has GL and GR.
|
||||
|
||||
For these controllers, BTN_GRIPR and BTN_GRIPR2 should be used for the top
|
||||
and bottom (if present) right grip button(s), and BTN_GRIPL and BTN_GRIPL2
|
||||
should be used for the top and bottom (if present) left grip button(s).
|
||||
|
||||
- Profile:
|
||||
|
||||
Some pads provide a multi-value profile selection switch. An example is the
|
||||
XBox Adaptive and the XBox Elite 2 controllers. When the active profile is
|
||||
switched, its newly selected value is emitted as an ABS_PROFILE event.
|
||||
Some pads provide a multi-value profile selection switch. Examples include
|
||||
the Xbox Adaptive and the Xbox Elite 2 controllers. When the active profile
|
||||
is switched, its newly selected value is emitted as an ABS_PROFILE event.
|
||||
|
||||
@@ -67,12 +67,12 @@ Environment variables for ``*config``:
|
||||
with its value when saving the configuration, instead of using the
|
||||
default, ``CONFIG_``.
|
||||
|
||||
Environment variables for ``{allyes/allmod/allno/rand}config``:
|
||||
Environment variables for ``{allyes/allmod/allno/alldef/rand}config``:
|
||||
|
||||
``KCONFIG_ALLCONFIG``
|
||||
The allyesconfig/allmodconfig/allnoconfig/randconfig variants can also
|
||||
use the environment variable KCONFIG_ALLCONFIG as a flag or a filename
|
||||
that contains config symbols that the user requires to be set to a
|
||||
The allyesconfig/allmodconfig/alldefconfig/allnoconfig/randconfig variants
|
||||
can also use the environment variable KCONFIG_ALLCONFIG as a flag or a
|
||||
filename that contains config symbols that the user requires to be set to a
|
||||
specific value. If KCONFIG_ALLCONFIG is used without a filename where
|
||||
KCONFIG_ALLCONFIG == "" or KCONFIG_ALLCONFIG == "1", ``make *config``
|
||||
checks for a file named "all{yes/mod/no/def/random}.config"
|
||||
|
||||
@@ -449,6 +449,6 @@ the 32 bits.
|
||||
xbox-dvd (RC_PROTO_XBOX_DVD)
|
||||
----------------------------
|
||||
|
||||
This protocol is used by XBox DVD Remote, which was made for the original
|
||||
XBox. There is no in-kernel decoder or encoder for this protocol. The usb
|
||||
This protocol is used by Xbox DVD Remote, which was made for the original
|
||||
Xbox. There is no in-kernel decoder or encoder for this protocol. The usb
|
||||
device decodes the protocol. There is a BPF decoder available in v4l-utils.
|
||||
|
||||
49
MAINTAINERS
49
MAINTAINERS
@@ -6713,7 +6713,7 @@ S: Supported
|
||||
F: drivers/input/keyboard/dlink-dir685-touchkeys.c
|
||||
|
||||
DALLAS/MAXIM DS1685-FAMILY REAL TIME CLOCK
|
||||
M: Joshua Kinard <kumba@gentoo.org>
|
||||
M: Joshua Kinard <linux@kumba.dev>
|
||||
S: Maintained
|
||||
F: drivers/rtc/rtc-ds1685.c
|
||||
F: include/linux/rtc/ds1685.h
|
||||
@@ -11100,7 +11100,7 @@ F: Documentation/devicetree/bindings/infiniband/hisilicon-hns-roce.txt
|
||||
F: drivers/infiniband/hw/hns/
|
||||
|
||||
HISILICON SAS Controller
|
||||
M: Yihang Li <liyihang9@huawei.com>
|
||||
M: Yihang Li <liyihang9@h-partners.com>
|
||||
S: Supported
|
||||
W: http://www.hisilicon.com
|
||||
F: Documentation/devicetree/bindings/scsi/hisilicon-sas.txt
|
||||
@@ -11612,6 +11612,13 @@ S: Maintained
|
||||
F: Documentation/devicetree/bindings/i3c/cdns,i3c-master.yaml
|
||||
F: drivers/i3c/master/i3c-master-cdns.c
|
||||
|
||||
I3C DRIVER FOR RENESAS
|
||||
M: Wolfram Sang <wsa+renesas@sang-engineering.com>
|
||||
M: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
|
||||
S: Supported
|
||||
F: Documentation/devicetree/bindings/i3c/renesas,i3c.yaml
|
||||
F: drivers/i3c/master/renesas-i3c.c
|
||||
|
||||
I3C DRIVER FOR SYNOPSYS DESIGNWARE
|
||||
S: Orphan
|
||||
F: Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.yaml
|
||||
@@ -11622,6 +11629,7 @@ M: Alexandre Belloni <alexandre.belloni@bootlin.com>
|
||||
R: Frank Li <Frank.Li@nxp.com>
|
||||
L: linux-i3c@lists.infradead.org (moderated for non-subscribers)
|
||||
S: Maintained
|
||||
Q: https://patchwork.kernel.org/project/linux-i3c/list/
|
||||
C: irc://chat.freenode.net/linux-i3c
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux.git
|
||||
F: Documentation/ABI/testing/sysfs-bus-i3c
|
||||
@@ -13166,11 +13174,9 @@ F: mm/kasan/
|
||||
F: scripts/Makefile.kasan
|
||||
|
||||
KCONFIG
|
||||
M: Masahiro Yamada <masahiroy@kernel.org>
|
||||
L: linux-kbuild@vger.kernel.org
|
||||
S: Maintained
|
||||
S: Orphan
|
||||
Q: https://patchwork.kernel.org/project/linux-kbuild/list/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kbuild
|
||||
F: Documentation/kbuild/kconfig*
|
||||
F: scripts/Kconfig.include
|
||||
F: scripts/kconfig/
|
||||
@@ -13235,13 +13241,12 @@ S: Maintained
|
||||
F: fs/autofs/
|
||||
|
||||
KERNEL BUILD + files below scripts/ (unless maintained elsewhere)
|
||||
M: Masahiro Yamada <masahiroy@kernel.org>
|
||||
R: Nathan Chancellor <nathan@kernel.org>
|
||||
R: Nicolas Schier <nicolas@fjasle.eu>
|
||||
M: Nathan Chancellor <nathan@kernel.org>
|
||||
M: Nicolas Schier <nicolas@fjasle.eu>
|
||||
L: linux-kbuild@vger.kernel.org
|
||||
S: Maintained
|
||||
S: Odd Fixes
|
||||
Q: https://patchwork.kernel.org/project/linux-kbuild/list/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux.git
|
||||
F: Documentation/kbuild/
|
||||
F: Makefile
|
||||
F: scripts/*vmlinux*
|
||||
@@ -13536,6 +13541,7 @@ F: Documentation/admin-guide/mm/kho.rst
|
||||
F: Documentation/core-api/kho/*
|
||||
F: include/linux/kexec_handover.h
|
||||
F: kernel/kexec_handover.c
|
||||
F: tools/testing/selftests/kho/
|
||||
|
||||
KEYS-ENCRYPTED
|
||||
M: Mimi Zohar <zohar@linux.ibm.com>
|
||||
@@ -19733,6 +19739,16 @@ S: Maintained
|
||||
F: include/linux/delayacct.h
|
||||
F: kernel/delayacct.c
|
||||
|
||||
TASK DELAY MONITORING TOOLS
|
||||
M: Andrew Morton <akpm@linux-foundation.org>
|
||||
M: Wang Yaxin <wang.yaxin@zte.com.cn>
|
||||
M: Fan Yu <fan.yu9@zte.com.cn>
|
||||
L: linux-kernel@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/accounting/delay-accounting.rst
|
||||
F: tools/accounting/delaytop.c
|
||||
F: tools/accounting/getdelays.c
|
||||
|
||||
PERFORMANCE EVENTS SUBSYSTEM
|
||||
M: Peter Zijlstra <peterz@infradead.org>
|
||||
M: Ingo Molnar <mingo@redhat.com>
|
||||
@@ -22032,6 +22048,10 @@ K: \b(?i:rust)\b
|
||||
|
||||
RUST [ALLOC]
|
||||
M: Danilo Krummrich <dakr@kernel.org>
|
||||
R: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
|
||||
R: Vlastimil Babka <vbabka@suse.cz>
|
||||
R: Liam R. Howlett <Liam.Howlett@oracle.com>
|
||||
R: Uladzislau Rezki <urezki@gmail.com>
|
||||
L: rust-for-linux@vger.kernel.org
|
||||
S: Maintained
|
||||
T: git https://github.com/Rust-for-Linux/linux.git alloc-next
|
||||
@@ -23370,6 +23390,7 @@ F: drivers/md/md*
|
||||
F: drivers/md/raid*
|
||||
F: include/linux/raid/
|
||||
F: include/uapi/linux/raid/
|
||||
F: lib/raid6/
|
||||
|
||||
SOLIDRUN CLEARFOG SUPPORT
|
||||
M: Russell King <linux@armlinux.org.uk>
|
||||
@@ -25478,6 +25499,13 @@ L: platform-driver-x86@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/platform/x86/toshiba-wmi.c
|
||||
|
||||
TOUCH OVERLAY
|
||||
M: Javier Carrasco <javier.carrasco@wolfvision.net>
|
||||
L: linux-input@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/input/touch-overlay.c
|
||||
F: include/linux/input/touch-overlay.h
|
||||
|
||||
TPM DEVICE DRIVER
|
||||
M: Peter Huewe <peterhuewe@gmx.de>
|
||||
M: Jarkko Sakkinen <jarkko@kernel.org>
|
||||
@@ -26434,7 +26462,6 @@ S: Maintained
|
||||
F: drivers/vfio/platform/
|
||||
|
||||
VFIO QAT PCI DRIVER
|
||||
M: Xin Zeng <xin.zeng@intel.com>
|
||||
M: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
|
||||
L: kvm@vger.kernel.org
|
||||
L: qat-linux@intel.com
|
||||
|
||||
11
Makefile
11
Makefile
@@ -479,11 +479,17 @@ export rust_common_flags := --edition=2021 \
|
||||
-Wrust_2018_idioms \
|
||||
-Wunreachable_pub \
|
||||
-Wclippy::all \
|
||||
-Wclippy::as_ptr_cast_mut \
|
||||
-Wclippy::as_underscore \
|
||||
-Wclippy::cast_lossless \
|
||||
-Wclippy::ignored_unit_patterns \
|
||||
-Wclippy::mut_mut \
|
||||
-Wclippy::needless_bitwise_bool \
|
||||
-Aclippy::needless_lifetimes \
|
||||
-Wclippy::no_mangle_with_rust_abi \
|
||||
-Wclippy::ptr_as_ptr \
|
||||
-Wclippy::ptr_cast_constness \
|
||||
-Wclippy::ref_as_ptr \
|
||||
-Wclippy::undocumented_unsafe_blocks \
|
||||
-Wclippy::unnecessary_safety_comment \
|
||||
-Wclippy::unnecessary_safety_doc \
|
||||
@@ -543,6 +549,7 @@ LZMA = lzma
|
||||
LZ4 = lz4
|
||||
XZ = xz
|
||||
ZSTD = zstd
|
||||
TAR = tar
|
||||
|
||||
CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
|
||||
-Wbitwise -Wno-return-void -Wno-unknown-attribute $(CF)
|
||||
@@ -622,7 +629,7 @@ export RUSTC RUSTDOC RUSTFMT RUSTC_OR_CLIPPY_QUIET RUSTC_OR_CLIPPY BINDGEN
|
||||
export HOSTRUSTC KBUILD_HOSTRUSTFLAGS
|
||||
export CPP AR NM STRIP OBJCOPY OBJDUMP READELF PAHOLE RESOLVE_BTFIDS LEX YACC AWK INSTALLKERNEL
|
||||
export PERL PYTHON3 CHECK CHECKFLAGS MAKE UTS_MACHINE HOSTCXX
|
||||
export KGZIP KBZIP2 KLZOP LZMA LZ4 XZ ZSTD
|
||||
export KGZIP KBZIP2 KLZOP LZMA LZ4 XZ ZSTD TAR
|
||||
export KBUILD_HOSTCXXFLAGS KBUILD_HOSTLDFLAGS KBUILD_HOSTLDLIBS KBUILD_PROCMACROLDFLAGS LDFLAGS_MODULE
|
||||
export KBUILD_USERCFLAGS KBUILD_USERLDFLAGS
|
||||
|
||||
@@ -1135,7 +1142,7 @@ KBUILD_USERCFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CPPFLAGS) $(KBUILD
|
||||
KBUILD_USERLDFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS))
|
||||
|
||||
# userspace programs are linked via the compiler, use the correct linker
|
||||
ifeq ($(CONFIG_CC_IS_CLANG)$(CONFIG_LD_IS_LLD),yy)
|
||||
ifdef CONFIG_CC_IS_CLANG
|
||||
KBUILD_USERLDFLAGS += --ld-path=$(LD)
|
||||
endif
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/mc146818rtc.h>
|
||||
#include <linux/rtc.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/memblock.h>
|
||||
|
||||
@@ -79,10 +80,12 @@ mk_resource_name(int pe, int port, char *str)
|
||||
{
|
||||
char tmp[80];
|
||||
char *name;
|
||||
|
||||
sprintf(tmp, "PCI %s PE %d PORT %d", str, pe, port);
|
||||
name = memblock_alloc_or_panic(strlen(tmp) + 1, SMP_CACHE_BYTES);
|
||||
strcpy(name, tmp);
|
||||
size_t sz;
|
||||
|
||||
sz = scnprintf(tmp, sizeof(tmp), "PCI %s PE %d PORT %d", str, pe, port);
|
||||
sz += 1; /* NUL terminator */
|
||||
name = memblock_alloc_or_panic(sz, SMP_CACHE_BYTES);
|
||||
strscpy(name, tmp, sz);
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
@@ -1,160 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef __ASMARM_CTI_H
|
||||
#define __ASMARM_CTI_H
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <asm/hardware/coresight.h>
|
||||
|
||||
/* The registers' definition is from section 3.2 of
|
||||
* Embedded Cross Trigger Revision: r0p0
|
||||
*/
|
||||
#define CTICONTROL 0x000
|
||||
#define CTISTATUS 0x004
|
||||
#define CTILOCK 0x008
|
||||
#define CTIPROTECTION 0x00C
|
||||
#define CTIINTACK 0x010
|
||||
#define CTIAPPSET 0x014
|
||||
#define CTIAPPCLEAR 0x018
|
||||
#define CTIAPPPULSE 0x01c
|
||||
#define CTIINEN 0x020
|
||||
#define CTIOUTEN 0x0A0
|
||||
#define CTITRIGINSTATUS 0x130
|
||||
#define CTITRIGOUTSTATUS 0x134
|
||||
#define CTICHINSTATUS 0x138
|
||||
#define CTICHOUTSTATUS 0x13c
|
||||
#define CTIPERIPHID0 0xFE0
|
||||
#define CTIPERIPHID1 0xFE4
|
||||
#define CTIPERIPHID2 0xFE8
|
||||
#define CTIPERIPHID3 0xFEC
|
||||
#define CTIPCELLID0 0xFF0
|
||||
#define CTIPCELLID1 0xFF4
|
||||
#define CTIPCELLID2 0xFF8
|
||||
#define CTIPCELLID3 0xFFC
|
||||
|
||||
/* The below are from section 3.6.4 of
|
||||
* CoreSight v1.0 Architecture Specification
|
||||
*/
|
||||
#define LOCKACCESS 0xFB0
|
||||
#define LOCKSTATUS 0xFB4
|
||||
|
||||
/**
|
||||
* struct cti - cross trigger interface struct
|
||||
* @base: mapped virtual address for the cti base
|
||||
* @irq: irq number for the cti
|
||||
* @trig_out_for_irq: triger out number which will cause
|
||||
* the @irq happen
|
||||
*
|
||||
* cti struct used to operate cti registers.
|
||||
*/
|
||||
struct cti {
|
||||
void __iomem *base;
|
||||
int irq;
|
||||
int trig_out_for_irq;
|
||||
};
|
||||
|
||||
/**
|
||||
* cti_init - initialize the cti instance
|
||||
* @cti: cti instance
|
||||
* @base: mapped virtual address for the cti base
|
||||
* @irq: irq number for the cti
|
||||
* @trig_out: triger out number which will cause
|
||||
* the @irq happen
|
||||
*
|
||||
* called by machine code to pass the board dependent
|
||||
* @base, @irq and @trig_out to cti.
|
||||
*/
|
||||
static inline void cti_init(struct cti *cti,
|
||||
void __iomem *base, int irq, int trig_out)
|
||||
{
|
||||
cti->base = base;
|
||||
cti->irq = irq;
|
||||
cti->trig_out_for_irq = trig_out;
|
||||
}
|
||||
|
||||
/**
|
||||
* cti_map_trigger - use the @chan to map @trig_in to @trig_out
|
||||
* @cti: cti instance
|
||||
* @trig_in: trigger in number
|
||||
* @trig_out: trigger out number
|
||||
* @channel: channel number
|
||||
*
|
||||
* This function maps one trigger in of @trig_in to one trigger
|
||||
* out of @trig_out using the channel @chan.
|
||||
*/
|
||||
static inline void cti_map_trigger(struct cti *cti,
|
||||
int trig_in, int trig_out, int chan)
|
||||
{
|
||||
void __iomem *base = cti->base;
|
||||
unsigned long val;
|
||||
|
||||
val = __raw_readl(base + CTIINEN + trig_in * 4);
|
||||
val |= BIT(chan);
|
||||
__raw_writel(val, base + CTIINEN + trig_in * 4);
|
||||
|
||||
val = __raw_readl(base + CTIOUTEN + trig_out * 4);
|
||||
val |= BIT(chan);
|
||||
__raw_writel(val, base + CTIOUTEN + trig_out * 4);
|
||||
}
|
||||
|
||||
/**
|
||||
* cti_enable - enable the cti module
|
||||
* @cti: cti instance
|
||||
*
|
||||
* enable the cti module
|
||||
*/
|
||||
static inline void cti_enable(struct cti *cti)
|
||||
{
|
||||
__raw_writel(0x1, cti->base + CTICONTROL);
|
||||
}
|
||||
|
||||
/**
|
||||
* cti_disable - disable the cti module
|
||||
* @cti: cti instance
|
||||
*
|
||||
* enable the cti module
|
||||
*/
|
||||
static inline void cti_disable(struct cti *cti)
|
||||
{
|
||||
__raw_writel(0, cti->base + CTICONTROL);
|
||||
}
|
||||
|
||||
/**
|
||||
* cti_irq_ack - clear the cti irq
|
||||
* @cti: cti instance
|
||||
*
|
||||
* clear the cti irq
|
||||
*/
|
||||
static inline void cti_irq_ack(struct cti *cti)
|
||||
{
|
||||
void __iomem *base = cti->base;
|
||||
unsigned long val;
|
||||
|
||||
val = __raw_readl(base + CTIINTACK);
|
||||
val |= BIT(cti->trig_out_for_irq);
|
||||
__raw_writel(val, base + CTIINTACK);
|
||||
}
|
||||
|
||||
/**
|
||||
* cti_unlock - unlock cti module
|
||||
* @cti: cti instance
|
||||
*
|
||||
* unlock the cti module, or else any writes to the cti
|
||||
* module is not allowed.
|
||||
*/
|
||||
static inline void cti_unlock(struct cti *cti)
|
||||
{
|
||||
__raw_writel(CS_LAR_KEY, cti->base + LOCKACCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* cti_lock - lock cti module
|
||||
* @cti: cti instance
|
||||
*
|
||||
* lock the cti module, so any writes to the cti
|
||||
* module will be not allowed.
|
||||
*/
|
||||
static inline void cti_lock(struct cti *cti)
|
||||
{
|
||||
__raw_writel(~CS_LAR_KEY, cti->base + LOCKACCESS);
|
||||
}
|
||||
#endif
|
||||
@@ -1004,7 +1004,7 @@ static void __init reserve_crashkernel(void)
|
||||
total_mem = get_total_mem();
|
||||
ret = parse_crashkernel(boot_command_line, total_mem,
|
||||
&crash_size, &crash_base,
|
||||
NULL, NULL);
|
||||
NULL, NULL, NULL);
|
||||
/* invalid value specified or crashkernel=0 */
|
||||
if (ret || !crash_size)
|
||||
return;
|
||||
|
||||
@@ -1430,6 +1430,31 @@ mmc2: mmc@11250000 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
ufshci: ufshci@11270000 {
|
||||
compatible = "mediatek,mt8195-ufshci";
|
||||
reg = <0 0x11270000 0 0x2300>;
|
||||
interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||
phys = <&ufsphy>;
|
||||
clocks = <&infracfg_ao CLK_INFRA_AO_AES_UFSFDE>,
|
||||
<&infracfg_ao CLK_INFRA_AO_AES>,
|
||||
<&infracfg_ao CLK_INFRA_AO_UFS_TICK>,
|
||||
<&infracfg_ao CLK_INFRA_AO_UNIPRO_SYS>,
|
||||
<&infracfg_ao CLK_INFRA_AO_UNIPRO_TICK>,
|
||||
<&infracfg_ao CLK_INFRA_AO_UFS_MP_SAP_B>,
|
||||
<&infracfg_ao CLK_INFRA_AO_UFS_TX_SYMBOL>,
|
||||
<&infracfg_ao CLK_INFRA_AO_PERI_UFS_MEM_SUB>;
|
||||
clock-names = "ufs", "ufs_aes", "ufs_tick",
|
||||
"unipro_sysclk", "unipro_tick",
|
||||
"unipro_mp_bclk", "ufs_tx_symbol",
|
||||
"ufs_mem_sub";
|
||||
freq-table-hz = <0 0>, <0 0>, <0 0>,
|
||||
<0 0>, <0 0>, <0 0>,
|
||||
<0 0>, <0 0>;
|
||||
|
||||
mediatek,ufs-disable-mcq;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
lvts_mcu: thermal-sensor@11278000 {
|
||||
compatible = "mediatek,mt8195-lvts-mcu";
|
||||
reg = <0 0x11278000 0 0x1000>;
|
||||
|
||||
@@ -21,16 +21,21 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_GENERIC_BUG
|
||||
|
||||
#define __BUG_ENTRY(flags) \
|
||||
#define __BUG_ENTRY_START \
|
||||
.pushsection __bug_table,"aw"; \
|
||||
.align 2; \
|
||||
14470: .long 14471f - .; \
|
||||
_BUGVERBOSE_LOCATION(__FILE__, __LINE__) \
|
||||
.short flags; \
|
||||
|
||||
#define __BUG_ENTRY_END \
|
||||
.align 2; \
|
||||
.popsection; \
|
||||
14471:
|
||||
|
||||
#define __BUG_ENTRY(flags) \
|
||||
__BUG_ENTRY_START \
|
||||
_BUGVERBOSE_LOCATION(__FILE__, __LINE__) \
|
||||
.short flags; \
|
||||
__BUG_ENTRY_END
|
||||
#else
|
||||
#define __BUG_ENTRY(flags)
|
||||
#endif
|
||||
@@ -41,4 +46,24 @@ _BUGVERBOSE_LOCATION(__FILE__, __LINE__) \
|
||||
|
||||
#define ASM_BUG() ASM_BUG_FLAGS(0)
|
||||
|
||||
#ifdef CONFIG_DEBUG_BUGVERBOSE
|
||||
#define __BUG_LOCATION_STRING(file, line) \
|
||||
".long " file "- .;" \
|
||||
".short " line ";"
|
||||
#else
|
||||
#define __BUG_LOCATION_STRING(file, line)
|
||||
#endif
|
||||
|
||||
#define __BUG_ENTRY_STRING(file, line, flags) \
|
||||
__stringify(__BUG_ENTRY_START) \
|
||||
__BUG_LOCATION_STRING(file, line) \
|
||||
".short " flags ";" \
|
||||
__stringify(__BUG_ENTRY_END)
|
||||
|
||||
#define ARCH_WARN_ASM(file, line, flags, size) \
|
||||
__BUG_ENTRY_STRING(file, line, flags) \
|
||||
__stringify(brk BUG_BRK_IMM)
|
||||
|
||||
#define ARCH_WARN_REACHABLE
|
||||
|
||||
#endif /* __ASM_ASM_BUG_H */
|
||||
|
||||
@@ -106,7 +106,7 @@ static void __init arch_reserve_crashkernel(void)
|
||||
|
||||
ret = parse_crashkernel(boot_command_line, memblock_phys_mem_size(),
|
||||
&crash_size, &crash_base,
|
||||
&low_size, &high);
|
||||
&low_size, NULL, &high);
|
||||
if (ret)
|
||||
return;
|
||||
|
||||
|
||||
@@ -721,7 +721,7 @@ void mark_rodata_ro(void)
|
||||
|
||||
static void __init declare_vma(struct vm_struct *vma,
|
||||
void *va_start, void *va_end,
|
||||
vm_flags_t vm_flags)
|
||||
unsigned long vm_flags)
|
||||
{
|
||||
phys_addr_t pa_start = __pa_symbol(va_start);
|
||||
unsigned long size = va_end - va_start;
|
||||
@@ -1528,7 +1528,7 @@ early_initcall(prevent_bootmem_remove_init);
|
||||
pte_t modify_prot_start_ptes(struct vm_area_struct *vma, unsigned long addr,
|
||||
pte_t *ptep, unsigned int nr)
|
||||
{
|
||||
pte_t pte = get_and_clear_full_ptes(vma->vm_mm, addr, ptep, nr, /* full = */ 0);
|
||||
pte_t pte = get_and_clear_ptes(vma->vm_mm, addr, ptep, nr);
|
||||
|
||||
if (alternative_has_cap_unlikely(ARM64_WORKAROUND_2645198)) {
|
||||
/*
|
||||
|
||||
@@ -265,7 +265,7 @@ static void __init arch_reserve_crashkernel(void)
|
||||
return;
|
||||
|
||||
ret = parse_crashkernel(boot_command_line, memblock_phys_mem_size(),
|
||||
&crash_size, &crash_base, &low_size, &high);
|
||||
&crash_size, &crash_base, &low_size, NULL, &high);
|
||||
if (ret)
|
||||
return;
|
||||
|
||||
|
||||
@@ -458,7 +458,7 @@ static void __init mips_parse_crashkernel(void)
|
||||
total_mem = memblock_phys_mem_size();
|
||||
ret = parse_crashkernel(boot_command_line, total_mem,
|
||||
&crash_size, &crash_base,
|
||||
NULL, NULL);
|
||||
NULL, NULL, NULL);
|
||||
if (ret != 0 || crash_size <= 0)
|
||||
return;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#ifndef __ASM_OPENRISC_MMU_H
|
||||
#define __ASM_OPENRISC_MMU_H
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
typedef unsigned long mm_context_t;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
*/
|
||||
#include <asm/setup.h>
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
#define clear_page(page) memset((page), 0, PAGE_SIZE)
|
||||
#define copy_page(to, from) memcpy((to), (from), PAGE_SIZE)
|
||||
@@ -55,10 +55,10 @@ typedef struct page *pgtable_t;
|
||||
#define __pgd(x) ((pgd_t) { (x) })
|
||||
#define __pgprot(x) ((pgprot_t) { (x) })
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
#endif /* !__ASSEMBLER__ */
|
||||
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
#define __va(x) ((void *)((unsigned long)(x) + PAGE_OFFSET))
|
||||
#define __pa(x) ((unsigned long) (x) - PAGE_OFFSET)
|
||||
@@ -73,7 +73,7 @@ static inline unsigned long virt_to_pfn(const void *kaddr)
|
||||
|
||||
#define virt_addr_valid(kaddr) (pfn_valid(virt_to_pfn(kaddr)))
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ASSEMBLER__ */
|
||||
|
||||
#include <asm-generic/memory_model.h>
|
||||
#include <asm-generic/getorder.h>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include <asm-generic/pgtable-nopmd.h>
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
#include <asm/mmu.h>
|
||||
#include <asm/fixmap.h>
|
||||
|
||||
@@ -430,5 +430,5 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte)
|
||||
|
||||
typedef pte_t *pte_addr_t;
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ASSEMBLER__ */
|
||||
#endif /* __ASM_OPENRISC_PGTABLE_H */
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
*/
|
||||
#define TASK_UNMAPPED_BASE (TASK_SIZE / 8 * 3)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
struct task_struct;
|
||||
|
||||
@@ -78,5 +78,5 @@ void show_registers(struct pt_regs *regs);
|
||||
|
||||
#define cpu_relax() barrier()
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ASSEMBLER__ */
|
||||
#endif /* __ASM_OPENRISC_PROCESSOR_H */
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
* they share a cacheline (not done yet, though... future optimization).
|
||||
*/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
/*
|
||||
* This struct describes how the registers are laid out on the kernel stack
|
||||
* during a syscall or other kernel entry.
|
||||
@@ -147,7 +147,7 @@ static inline unsigned long regs_get_register(struct pt_regs *regs,
|
||||
return *(unsigned long *)((unsigned long)regs + offset);
|
||||
}
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ASSEMBLER__ */
|
||||
|
||||
/*
|
||||
* Offsets used by 'ptrace' system call interface.
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <linux/init.h>
|
||||
#include <asm-generic/setup.h>
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
void __init or1k_early_setup(void *fdt);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
#include <asm/types.h>
|
||||
#include <asm/processor.h>
|
||||
#endif
|
||||
@@ -38,7 +38,7 @@
|
||||
* - if the contents of this structure are changed, the assembly constants
|
||||
* must also be changed
|
||||
*/
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
struct thread_info {
|
||||
struct task_struct *task; /* main task structure */
|
||||
@@ -58,7 +58,7 @@ struct thread_info {
|
||||
*
|
||||
* preempt_count needs to be 1 initially, until the scheduler is functional.
|
||||
*/
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
#define INIT_THREAD_INFO(tsk) \
|
||||
{ \
|
||||
.task = &tsk, \
|
||||
@@ -75,7 +75,7 @@ register struct thread_info *current_thread_info_reg asm("r10");
|
||||
#define get_thread_info(ti) get_task_struct((ti)->task)
|
||||
#define put_thread_info(ti) put_task_struct((ti)->task)
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
#endif /* !__ASSEMBLER__ */
|
||||
|
||||
/*
|
||||
* thread information flags
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#ifndef _UAPI__ASM_OPENRISC_PTRACE_H
|
||||
#define _UAPI__ASM_OPENRISC_PTRACE_H
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
/*
|
||||
* This is the layout of the regset returned by the GETREGSET ptrace call
|
||||
*/
|
||||
|
||||
@@ -425,6 +425,7 @@
|
||||
#define PPC_RAW_SC() (0x44000002)
|
||||
#define PPC_RAW_SYNC() (0x7c0004ac)
|
||||
#define PPC_RAW_ISYNC() (0x4c00012c)
|
||||
#define PPC_RAW_LWSYNC() (0x7c2004ac)
|
||||
|
||||
/*
|
||||
* Define what the VSX XX1 form instructions will look like, then add
|
||||
|
||||
@@ -1139,6 +1139,7 @@ int eeh_unfreeze_pe(struct eeh_pe *pe)
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(eeh_unfreeze_pe);
|
||||
|
||||
|
||||
static struct pci_device_id eeh_reset_ids[] = {
|
||||
|
||||
@@ -257,13 +257,12 @@ static void eeh_pe_report_edev(struct eeh_dev *edev, eeh_report_fn fn,
|
||||
struct pci_driver *driver;
|
||||
enum pci_ers_result new_result;
|
||||
|
||||
pci_lock_rescan_remove();
|
||||
pdev = edev->pdev;
|
||||
if (pdev)
|
||||
get_device(&pdev->dev);
|
||||
pci_unlock_rescan_remove();
|
||||
if (!pdev) {
|
||||
eeh_edev_info(edev, "no device");
|
||||
*result = PCI_ERS_RESULT_DISCONNECT;
|
||||
return;
|
||||
}
|
||||
device_lock(&pdev->dev);
|
||||
@@ -304,8 +303,9 @@ static void eeh_pe_report(const char *name, struct eeh_pe *root,
|
||||
struct eeh_dev *edev, *tmp;
|
||||
|
||||
pr_info("EEH: Beginning: '%s'\n", name);
|
||||
eeh_for_each_pe(root, pe) eeh_pe_for_each_dev(pe, edev, tmp)
|
||||
eeh_pe_report_edev(edev, fn, result);
|
||||
eeh_for_each_pe(root, pe)
|
||||
eeh_pe_for_each_dev(pe, edev, tmp)
|
||||
eeh_pe_report_edev(edev, fn, result);
|
||||
if (result)
|
||||
pr_info("EEH: Finished:'%s' with aggregate recovery state:'%s'\n",
|
||||
name, pci_ers_result_name(*result));
|
||||
@@ -383,6 +383,8 @@ static void eeh_dev_restore_state(struct eeh_dev *edev, void *userdata)
|
||||
if (!edev)
|
||||
return;
|
||||
|
||||
pci_lock_rescan_remove();
|
||||
|
||||
/*
|
||||
* The content in the config space isn't saved because
|
||||
* the blocked config space on some adapters. We have
|
||||
@@ -393,14 +395,19 @@ static void eeh_dev_restore_state(struct eeh_dev *edev, void *userdata)
|
||||
if (list_is_last(&edev->entry, &edev->pe->edevs))
|
||||
eeh_pe_restore_bars(edev->pe);
|
||||
|
||||
pci_unlock_rescan_remove();
|
||||
return;
|
||||
}
|
||||
|
||||
pdev = eeh_dev_to_pci_dev(edev);
|
||||
if (!pdev)
|
||||
if (!pdev) {
|
||||
pci_unlock_rescan_remove();
|
||||
return;
|
||||
}
|
||||
|
||||
pci_restore_state(pdev);
|
||||
|
||||
pci_unlock_rescan_remove();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -647,9 +654,7 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus,
|
||||
if (any_passed || driver_eeh_aware || (pe->type & EEH_PE_VF)) {
|
||||
eeh_pe_dev_traverse(pe, eeh_rmv_device, rmv_data);
|
||||
} else {
|
||||
pci_lock_rescan_remove();
|
||||
pci_hp_remove_devices(bus);
|
||||
pci_unlock_rescan_remove();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -665,8 +670,6 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus,
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
pci_lock_rescan_remove();
|
||||
|
||||
/* Restore PE */
|
||||
eeh_ops->configure_bridge(pe);
|
||||
eeh_pe_restore_bars(pe);
|
||||
@@ -674,7 +677,6 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus,
|
||||
/* Clear frozen state */
|
||||
rc = eeh_clear_pe_frozen_state(pe, false);
|
||||
if (rc) {
|
||||
pci_unlock_rescan_remove();
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -709,7 +711,6 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus,
|
||||
pe->tstamp = tstamp;
|
||||
pe->freeze_count = cnt;
|
||||
|
||||
pci_unlock_rescan_remove();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -843,10 +844,13 @@ void eeh_handle_normal_event(struct eeh_pe *pe)
|
||||
{LIST_HEAD_INIT(rmv_data.removed_vf_list), 0};
|
||||
int devices = 0;
|
||||
|
||||
pci_lock_rescan_remove();
|
||||
|
||||
bus = eeh_pe_bus_get(pe);
|
||||
if (!bus) {
|
||||
pr_err("%s: Cannot find PCI bus for PHB#%x-PE#%x\n",
|
||||
__func__, pe->phb->global_number, pe->addr);
|
||||
pci_unlock_rescan_remove();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1094,10 +1098,15 @@ void eeh_handle_normal_event(struct eeh_pe *pe)
|
||||
eeh_pe_state_clear(pe, EEH_PE_PRI_BUS, true);
|
||||
eeh_pe_dev_mode_mark(pe, EEH_DEV_REMOVED);
|
||||
|
||||
pci_lock_rescan_remove();
|
||||
pci_hp_remove_devices(bus);
|
||||
pci_unlock_rescan_remove();
|
||||
bus = eeh_pe_bus_get(pe);
|
||||
if (bus)
|
||||
pci_hp_remove_devices(bus);
|
||||
else
|
||||
pr_err("%s: PCI bus for PHB#%x-PE#%x disappeared\n",
|
||||
__func__, pe->phb->global_number, pe->addr);
|
||||
|
||||
/* The passed PE should no longer be used */
|
||||
pci_unlock_rescan_remove();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1114,6 +1123,8 @@ void eeh_handle_normal_event(struct eeh_pe *pe)
|
||||
eeh_clear_slot_attention(edev->pdev);
|
||||
|
||||
eeh_pe_state_clear(pe, EEH_PE_RECOVERING, true);
|
||||
|
||||
pci_unlock_rescan_remove();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1132,6 +1143,7 @@ void eeh_handle_special_event(void)
|
||||
unsigned long flags;
|
||||
int rc;
|
||||
|
||||
pci_lock_rescan_remove();
|
||||
|
||||
do {
|
||||
rc = eeh_ops->next_error(&pe);
|
||||
@@ -1171,10 +1183,12 @@ void eeh_handle_special_event(void)
|
||||
|
||||
break;
|
||||
case EEH_NEXT_ERR_NONE:
|
||||
pci_unlock_rescan_remove();
|
||||
return;
|
||||
default:
|
||||
pr_warn("%s: Invalid value %d from next_error()\n",
|
||||
__func__, rc);
|
||||
pci_unlock_rescan_remove();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1186,7 +1200,9 @@ void eeh_handle_special_event(void)
|
||||
if (rc == EEH_NEXT_ERR_FROZEN_PE ||
|
||||
rc == EEH_NEXT_ERR_FENCED_PHB) {
|
||||
eeh_pe_state_mark(pe, EEH_PE_RECOVERING);
|
||||
pci_unlock_rescan_remove();
|
||||
eeh_handle_normal_event(pe);
|
||||
pci_lock_rescan_remove();
|
||||
} else {
|
||||
eeh_for_each_pe(pe, tmp_pe)
|
||||
eeh_pe_for_each_dev(tmp_pe, edev, tmp_edev)
|
||||
@@ -1199,7 +1215,6 @@ void eeh_handle_special_event(void)
|
||||
eeh_report_failure, NULL);
|
||||
eeh_set_channel_state(pe, pci_channel_io_perm_failure);
|
||||
|
||||
pci_lock_rescan_remove();
|
||||
list_for_each_entry(hose, &hose_list, list_node) {
|
||||
phb_pe = eeh_phb_pe_get(hose);
|
||||
if (!phb_pe ||
|
||||
@@ -1218,7 +1233,6 @@ void eeh_handle_special_event(void)
|
||||
}
|
||||
pci_hp_remove_devices(bus);
|
||||
}
|
||||
pci_unlock_rescan_remove();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1228,4 +1242,6 @@ void eeh_handle_special_event(void)
|
||||
if (rc == EEH_NEXT_ERR_DEAD_IOC)
|
||||
break;
|
||||
} while (rc != EEH_NEXT_ERR_NONE);
|
||||
|
||||
pci_unlock_rescan_remove();
|
||||
}
|
||||
|
||||
@@ -671,10 +671,12 @@ static void eeh_bridge_check_link(struct eeh_dev *edev)
|
||||
eeh_ops->write_config(edev, cap + PCI_EXP_LNKCTL, 2, val);
|
||||
|
||||
/* Check link */
|
||||
if (!edev->pdev->link_active_reporting) {
|
||||
eeh_edev_dbg(edev, "No link reporting capability\n");
|
||||
msleep(1000);
|
||||
return;
|
||||
if (edev->pdev) {
|
||||
if (!edev->pdev->link_active_reporting) {
|
||||
eeh_edev_dbg(edev, "No link reporting capability\n");
|
||||
msleep(1000);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* Wait the link is up until timeout (5s) */
|
||||
|
||||
@@ -333,7 +333,7 @@ static __init u64 fadump_calculate_reserve_size(void)
|
||||
* memory at a predefined offset.
|
||||
*/
|
||||
ret = parse_crashkernel(boot_command_line, memblock_phys_mem_size(),
|
||||
&size, &base, NULL, NULL);
|
||||
&size, &base, NULL, NULL, NULL);
|
||||
if (ret == 0 && size > 0) {
|
||||
unsigned long max_size;
|
||||
|
||||
|
||||
@@ -141,6 +141,9 @@ void pci_hp_add_devices(struct pci_bus *bus)
|
||||
struct pci_controller *phb;
|
||||
struct device_node *dn = pci_bus_to_OF_node(bus);
|
||||
|
||||
if (!dn)
|
||||
return;
|
||||
|
||||
phb = pci_bus_to_host(bus);
|
||||
|
||||
mode = PCI_PROBE_NORMAL;
|
||||
|
||||
@@ -110,7 +110,7 @@ void __init arch_reserve_crashkernel(void)
|
||||
|
||||
/* use common parsing */
|
||||
ret = parse_crashkernel(boot_command_line, total_mem_sz, &crash_size,
|
||||
&crash_base, NULL, NULL);
|
||||
&crash_base, NULL, NULL, NULL);
|
||||
|
||||
if (ret)
|
||||
return;
|
||||
|
||||
@@ -178,7 +178,7 @@ static void __init get_crash_kernel(void *fdt, unsigned long size)
|
||||
int ret;
|
||||
|
||||
ret = parse_crashkernel(boot_command_line, size, &crash_size,
|
||||
&crash_base, NULL, NULL);
|
||||
&crash_base, NULL, NULL, NULL);
|
||||
if (ret != 0 || crash_size == 0)
|
||||
return;
|
||||
if (crash_base == 0)
|
||||
|
||||
@@ -409,6 +409,71 @@ asm (
|
||||
" blr ;"
|
||||
);
|
||||
|
||||
static int emit_atomic_ld_st(const struct bpf_insn insn, struct codegen_context *ctx, u32 *image)
|
||||
{
|
||||
u32 code = insn.code;
|
||||
u32 dst_reg = bpf_to_ppc(insn.dst_reg);
|
||||
u32 src_reg = bpf_to_ppc(insn.src_reg);
|
||||
u32 size = BPF_SIZE(code);
|
||||
u32 tmp1_reg = bpf_to_ppc(TMP_REG_1);
|
||||
u32 tmp2_reg = bpf_to_ppc(TMP_REG_2);
|
||||
s16 off = insn.off;
|
||||
s32 imm = insn.imm;
|
||||
|
||||
switch (imm) {
|
||||
case BPF_LOAD_ACQ:
|
||||
switch (size) {
|
||||
case BPF_B:
|
||||
EMIT(PPC_RAW_LBZ(dst_reg, src_reg, off));
|
||||
break;
|
||||
case BPF_H:
|
||||
EMIT(PPC_RAW_LHZ(dst_reg, src_reg, off));
|
||||
break;
|
||||
case BPF_W:
|
||||
EMIT(PPC_RAW_LWZ(dst_reg, src_reg, off));
|
||||
break;
|
||||
case BPF_DW:
|
||||
if (off % 4) {
|
||||
EMIT(PPC_RAW_LI(tmp1_reg, off));
|
||||
EMIT(PPC_RAW_LDX(dst_reg, src_reg, tmp1_reg));
|
||||
} else {
|
||||
EMIT(PPC_RAW_LD(dst_reg, src_reg, off));
|
||||
}
|
||||
break;
|
||||
}
|
||||
EMIT(PPC_RAW_LWSYNC());
|
||||
break;
|
||||
case BPF_STORE_REL:
|
||||
EMIT(PPC_RAW_LWSYNC());
|
||||
switch (size) {
|
||||
case BPF_B:
|
||||
EMIT(PPC_RAW_STB(src_reg, dst_reg, off));
|
||||
break;
|
||||
case BPF_H:
|
||||
EMIT(PPC_RAW_STH(src_reg, dst_reg, off));
|
||||
break;
|
||||
case BPF_W:
|
||||
EMIT(PPC_RAW_STW(src_reg, dst_reg, off));
|
||||
break;
|
||||
case BPF_DW:
|
||||
if (off % 4) {
|
||||
EMIT(PPC_RAW_LI(tmp2_reg, off));
|
||||
EMIT(PPC_RAW_STDX(src_reg, dst_reg, tmp2_reg));
|
||||
} else {
|
||||
EMIT(PPC_RAW_STD(src_reg, dst_reg, off));
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
pr_err_ratelimited("unexpected atomic load/store op code %02x\n",
|
||||
imm);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Assemble the body code between the prologue & epilogue */
|
||||
int bpf_jit_build_body(struct bpf_prog *fp, u32 *image, u32 *fimage, struct codegen_context *ctx,
|
||||
u32 *addrs, int pass, bool extra_pass)
|
||||
@@ -898,8 +963,25 @@ int bpf_jit_build_body(struct bpf_prog *fp, u32 *image, u32 *fimage, struct code
|
||||
/*
|
||||
* BPF_STX ATOMIC (atomic ops)
|
||||
*/
|
||||
case BPF_STX | BPF_ATOMIC | BPF_B:
|
||||
case BPF_STX | BPF_ATOMIC | BPF_H:
|
||||
case BPF_STX | BPF_ATOMIC | BPF_W:
|
||||
case BPF_STX | BPF_ATOMIC | BPF_DW:
|
||||
if (bpf_atomic_is_load_store(&insn[i])) {
|
||||
ret = emit_atomic_ld_st(insn[i], ctx, image);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (size != BPF_DW && insn_is_zext(&insn[i + 1]))
|
||||
addrs[++i] = ctx->idx * 4;
|
||||
break;
|
||||
} else if (size == BPF_B || size == BPF_H) {
|
||||
pr_err_ratelimited(
|
||||
"eBPF filter atomic op code %02x (@%d) unsupported\n",
|
||||
code, i);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
save_reg = tmp2_reg;
|
||||
ret_reg = src_reg;
|
||||
|
||||
|
||||
@@ -93,6 +93,7 @@ config RISCV
|
||||
select CLINT_TIMER if RISCV_M_MODE
|
||||
select CLONE_BACKWARDS
|
||||
select COMMON_CLK
|
||||
select CPU_NO_EFFICIENT_FFS if !RISCV_ISA_ZBB
|
||||
select CPU_PM if CPU_IDLE || HIBERNATION || SUSPEND
|
||||
select DYNAMIC_FTRACE if FUNCTION_TRACER
|
||||
select EDAC_SUPPORT
|
||||
|
||||
@@ -31,40 +31,45 @@ typedef u32 bug_insn_t;
|
||||
|
||||
#ifdef CONFIG_GENERIC_BUG_RELATIVE_POINTERS
|
||||
#define __BUG_ENTRY_ADDR RISCV_INT " 1b - ."
|
||||
#define __BUG_ENTRY_FILE RISCV_INT " %0 - ."
|
||||
#define __BUG_ENTRY_FILE(file) RISCV_INT " " file " - ."
|
||||
#else
|
||||
#define __BUG_ENTRY_ADDR RISCV_PTR " 1b"
|
||||
#define __BUG_ENTRY_FILE RISCV_PTR " %0"
|
||||
#define __BUG_ENTRY_FILE(file) RISCV_PTR " " file
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_BUGVERBOSE
|
||||
#define __BUG_ENTRY \
|
||||
#define __BUG_ENTRY(file, line, flags) \
|
||||
__BUG_ENTRY_ADDR "\n\t" \
|
||||
__BUG_ENTRY_FILE "\n\t" \
|
||||
RISCV_SHORT " %1\n\t" \
|
||||
RISCV_SHORT " %2"
|
||||
__BUG_ENTRY_FILE(file) "\n\t" \
|
||||
RISCV_SHORT " " line "\n\t" \
|
||||
RISCV_SHORT " " flags
|
||||
#else
|
||||
#define __BUG_ENTRY \
|
||||
__BUG_ENTRY_ADDR "\n\t" \
|
||||
RISCV_SHORT " %2"
|
||||
#define __BUG_ENTRY(file, line, flags) \
|
||||
__BUG_ENTRY_ADDR "\n\t" \
|
||||
RISCV_SHORT " " flags
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_GENERIC_BUG
|
||||
#define __BUG_FLAGS(flags) \
|
||||
do { \
|
||||
__asm__ __volatile__ ( \
|
||||
|
||||
#define ARCH_WARN_ASM(file, line, flags, size) \
|
||||
"1:\n\t" \
|
||||
"ebreak\n" \
|
||||
".pushsection __bug_table,\"aw\"\n\t" \
|
||||
"2:\n\t" \
|
||||
__BUG_ENTRY "\n\t" \
|
||||
".org 2b + %3\n\t" \
|
||||
__BUG_ENTRY(file, line, flags) "\n\t" \
|
||||
".org 2b + " size "\n\t" \
|
||||
".popsection" \
|
||||
|
||||
#define __BUG_FLAGS(flags) \
|
||||
do { \
|
||||
__asm__ __volatile__ ( \
|
||||
ARCH_WARN_ASM("%0", "%1", "%2", "%3") \
|
||||
: \
|
||||
: "i" (__FILE__), "i" (__LINE__), \
|
||||
"i" (flags), \
|
||||
"i" (sizeof(struct bug_entry))); \
|
||||
} while (0)
|
||||
|
||||
#else /* CONFIG_GENERIC_BUG */
|
||||
#define __BUG_FLAGS(flags) do { \
|
||||
__asm__ __volatile__ ("ebreak\n"); \
|
||||
@@ -78,6 +83,8 @@ do { \
|
||||
|
||||
#define __WARN_FLAGS(flags) __BUG_FLAGS(BUGFLAG_WARNING|(flags))
|
||||
|
||||
#define ARCH_WARN_REACHABLE
|
||||
|
||||
#define HAVE_ARCH_BUG
|
||||
|
||||
#include <asm-generic/bug.h>
|
||||
|
||||
@@ -95,6 +95,7 @@ static int elf_find_pbase(struct kimage *image, unsigned long kernel_len,
|
||||
kbuf.buf_align = PMD_SIZE;
|
||||
kbuf.mem = KEXEC_BUF_MEM_UNKNOWN;
|
||||
kbuf.memsz = ALIGN(kernel_len, PAGE_SIZE);
|
||||
kbuf.cma = NULL;
|
||||
kbuf.top_down = false;
|
||||
ret = arch_kexec_locate_mem_hole(&kbuf);
|
||||
if (!ret) {
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#include <linux/efi.h>
|
||||
#include <linux/crash_dump.h>
|
||||
#include <linux/panic_notifier.h>
|
||||
#include <linux/jump_label.h>
|
||||
#include <linux/gcd.h>
|
||||
|
||||
#include <asm/acpi.h>
|
||||
#include <asm/alternative.h>
|
||||
@@ -362,6 +364,9 @@ void __init setup_arch(char **cmdline_p)
|
||||
|
||||
riscv_user_isa_enable();
|
||||
riscv_spinlock_init();
|
||||
|
||||
if (!IS_ENABLED(CONFIG_RISCV_ISA_ZBB) || !riscv_isa_extension_available(NULL, ZBB))
|
||||
static_branch_disable(&efficient_ffs_key);
|
||||
}
|
||||
|
||||
bool arch_cpu_is_hotpluggable(int cpu)
|
||||
|
||||
@@ -1408,7 +1408,7 @@ static void __init arch_reserve_crashkernel(void)
|
||||
|
||||
ret = parse_crashkernel(boot_command_line, memblock_phys_mem_size(),
|
||||
&crash_size, &crash_base,
|
||||
&low_size, &high);
|
||||
&low_size, NULL, &high);
|
||||
if (ret)
|
||||
return;
|
||||
|
||||
|
||||
@@ -605,7 +605,7 @@ static void __init reserve_crashkernel(void)
|
||||
int rc;
|
||||
|
||||
rc = parse_crashkernel(boot_command_line, ident_map_size,
|
||||
&crash_size, &crash_base, NULL, NULL);
|
||||
&crash_size, &crash_base, NULL, NULL, NULL);
|
||||
|
||||
crash_base = ALIGN(crash_base, KEXEC_CRASH_MEM_ALIGN);
|
||||
crash_size = ALIGN(crash_size, KEXEC_CRASH_MEM_ALIGN);
|
||||
|
||||
@@ -146,7 +146,7 @@ void __init reserve_crashkernel(void)
|
||||
return;
|
||||
|
||||
ret = parse_crashkernel(boot_command_line, memblock_phys_mem_size(),
|
||||
&crash_size, &crash_base, NULL, NULL);
|
||||
&crash_size, &crash_base, NULL, NULL, NULL);
|
||||
if (ret == 0 && crash_size > 0) {
|
||||
crashk_res.start = crash_base;
|
||||
crashk_res.end = crash_base + crash_size - 1;
|
||||
|
||||
@@ -32,45 +32,42 @@
|
||||
#ifdef CONFIG_GENERIC_BUG
|
||||
|
||||
#ifdef CONFIG_X86_32
|
||||
# define __BUG_REL(val) ".long " __stringify(val)
|
||||
# define __BUG_REL(val) ".long " val
|
||||
#else
|
||||
# define __BUG_REL(val) ".long " __stringify(val) " - ."
|
||||
# define __BUG_REL(val) ".long " val " - ."
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_BUGVERBOSE
|
||||
#define __BUG_ENTRY(file, line, flags) \
|
||||
"2:\t" __BUG_REL("1b") "\t# bug_entry::bug_addr\n" \
|
||||
"\t" __BUG_REL(file) "\t# bug_entry::file\n" \
|
||||
"\t.word " line "\t# bug_entry::line\n" \
|
||||
"\t.word " flags "\t# bug_entry::flags\n"
|
||||
#else
|
||||
#define __BUG_ENTRY(file, line, flags) \
|
||||
"2:\t" __BUG_REL("1b") "\t# bug_entry::bug_addr\n" \
|
||||
"\t.word " flags "\t# bug_entry::flags\n"
|
||||
#endif
|
||||
|
||||
#define _BUG_FLAGS_ASM(ins, file, line, flags, size, extra) \
|
||||
"1:\t" ins "\n" \
|
||||
".pushsection __bug_table,\"aw\"\n" \
|
||||
__BUG_ENTRY(file, line, flags) \
|
||||
"\t.org 2b + " size "\n" \
|
||||
".popsection\n" \
|
||||
extra
|
||||
|
||||
#define _BUG_FLAGS(ins, flags, extra) \
|
||||
do { \
|
||||
asm_inline volatile("1:\t" ins "\n" \
|
||||
".pushsection __bug_table,\"aw\"\n" \
|
||||
"2:\t" __BUG_REL(1b) "\t# bug_entry::bug_addr\n" \
|
||||
"\t" __BUG_REL(%c0) "\t# bug_entry::file\n" \
|
||||
"\t.word %c1" "\t# bug_entry::line\n" \
|
||||
"\t.word %c2" "\t# bug_entry::flags\n" \
|
||||
"\t.org 2b+%c3\n" \
|
||||
".popsection\n" \
|
||||
extra \
|
||||
asm_inline volatile(_BUG_FLAGS_ASM(ins, "%c0", \
|
||||
"%c1", "%c2", "%c3", extra) \
|
||||
: : "i" (__FILE__), "i" (__LINE__), \
|
||||
"i" (flags), \
|
||||
"i" (sizeof(struct bug_entry))); \
|
||||
} while (0)
|
||||
|
||||
#else /* !CONFIG_DEBUG_BUGVERBOSE */
|
||||
|
||||
#define _BUG_FLAGS(ins, flags, extra) \
|
||||
do { \
|
||||
asm_inline volatile("1:\t" ins "\n" \
|
||||
".pushsection __bug_table,\"aw\"\n" \
|
||||
"2:\t" __BUG_REL(1b) "\t# bug_entry::bug_addr\n" \
|
||||
"\t.word %c0" "\t# bug_entry::flags\n" \
|
||||
"\t.org 2b+%c1\n" \
|
||||
".popsection\n" \
|
||||
extra \
|
||||
: : "i" (flags), \
|
||||
"i" (sizeof(struct bug_entry))); \
|
||||
} while (0)
|
||||
|
||||
#endif /* CONFIG_DEBUG_BUGVERBOSE */
|
||||
#define ARCH_WARN_ASM(file, line, flags, size) \
|
||||
_BUG_FLAGS_ASM(ASM_UD2, file, line, flags, size, "")
|
||||
|
||||
#else
|
||||
|
||||
@@ -92,11 +89,14 @@ do { \
|
||||
* were to trigger, we'd rather wreck the machine in an attempt to get the
|
||||
* message out than not know about it.
|
||||
*/
|
||||
|
||||
#define ARCH_WARN_REACHABLE ANNOTATE_REACHABLE(1b)
|
||||
|
||||
#define __WARN_FLAGS(flags) \
|
||||
do { \
|
||||
__auto_type __flags = BUGFLAG_WARNING|(flags); \
|
||||
instrumentation_begin(); \
|
||||
_BUG_FLAGS(ASM_UD2, __flags, ANNOTATE_REACHABLE(1b)); \
|
||||
_BUG_FLAGS(ASM_UD2, __flags, ARCH_WARN_REACHABLE); \
|
||||
instrumentation_end(); \
|
||||
} while (0)
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ struct its_array its_pages;
|
||||
|
||||
static void *__its_alloc(struct its_array *pages)
|
||||
{
|
||||
void *page __free(execmem) = execmem_alloc(EXECMEM_MODULE_TEXT, PAGE_SIZE);
|
||||
void *page __free(execmem) = execmem_alloc_rw(EXECMEM_MODULE_TEXT, PAGE_SIZE);
|
||||
if (!page)
|
||||
return NULL;
|
||||
|
||||
@@ -237,7 +237,6 @@ static void *its_alloc(void)
|
||||
if (!page)
|
||||
return NULL;
|
||||
|
||||
execmem_make_temp_rw(page, PAGE_SIZE);
|
||||
if (pages == &its_pages)
|
||||
set_memory_x((unsigned long)page, 1);
|
||||
|
||||
|
||||
@@ -163,10 +163,10 @@ static struct crash_mem *fill_up_crash_elf_data(void)
|
||||
return NULL;
|
||||
|
||||
/*
|
||||
* Exclusion of crash region and/or crashk_low_res may cause
|
||||
* another range split. So add extra two slots here.
|
||||
* Exclusion of crash region, crashk_low_res and/or crashk_cma_ranges
|
||||
* may cause range splits. So add extra slots here.
|
||||
*/
|
||||
nr_ranges += 2;
|
||||
nr_ranges += 2 + crashk_cma_cnt;
|
||||
cmem = vzalloc(struct_size(cmem, ranges, nr_ranges));
|
||||
if (!cmem)
|
||||
return NULL;
|
||||
@@ -184,6 +184,7 @@ static struct crash_mem *fill_up_crash_elf_data(void)
|
||||
static int elf_header_exclude_ranges(struct crash_mem *cmem)
|
||||
{
|
||||
int ret = 0;
|
||||
int i;
|
||||
|
||||
/* Exclude the low 1M because it is always reserved */
|
||||
ret = crash_exclude_mem_range(cmem, 0, SZ_1M - 1);
|
||||
@@ -198,8 +199,17 @@ static int elf_header_exclude_ranges(struct crash_mem *cmem)
|
||||
if (crashk_low_res.end)
|
||||
ret = crash_exclude_mem_range(cmem, crashk_low_res.start,
|
||||
crashk_low_res.end);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return ret;
|
||||
for (i = 0; i < crashk_cma_cnt; ++i) {
|
||||
ret = crash_exclude_mem_range(cmem, crashk_cma_ranges[i].start,
|
||||
crashk_cma_ranges[i].end);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int prepare_elf64_ram_headers_callback(struct resource *res, void *arg)
|
||||
@@ -374,6 +384,14 @@ int crash_setup_memmap_entries(struct kimage *image, struct boot_params *params)
|
||||
add_e820_entry(params, &ei);
|
||||
}
|
||||
|
||||
for (i = 0; i < crashk_cma_cnt; ++i) {
|
||||
ei.addr = crashk_cma_ranges[i].start;
|
||||
ei.size = crashk_cma_ranges[i].end -
|
||||
crashk_cma_ranges[i].start + 1;
|
||||
ei.type = E820_TYPE_RAM;
|
||||
add_e820_entry(params, &ei);
|
||||
}
|
||||
|
||||
out:
|
||||
vfree(cmem);
|
||||
return ret;
|
||||
|
||||
@@ -263,7 +263,7 @@ void arch_ftrace_update_code(int command)
|
||||
|
||||
static inline void *alloc_tramp(unsigned long size)
|
||||
{
|
||||
return execmem_alloc(EXECMEM_FTRACE, size);
|
||||
return execmem_alloc_rw(EXECMEM_FTRACE, size);
|
||||
}
|
||||
static inline void tramp_free(void *tramp)
|
||||
{
|
||||
|
||||
@@ -481,24 +481,6 @@ static int prepare_singlestep(kprobe_opcode_t *buf, struct kprobe *p,
|
||||
return len;
|
||||
}
|
||||
|
||||
/* Make page to RO mode when allocate it */
|
||||
void *alloc_insn_page(void)
|
||||
{
|
||||
void *page;
|
||||
|
||||
page = execmem_alloc(EXECMEM_KPROBES, PAGE_SIZE);
|
||||
if (!page)
|
||||
return NULL;
|
||||
|
||||
/*
|
||||
* TODO: Once additional kernel code protection mechanisms are set, ensure
|
||||
* that the page was not maliciously altered and it is still zeroed.
|
||||
*/
|
||||
set_memory_rox((unsigned long)page, 1);
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
/* Kprobe x86 instruction emulation - only regs->ip or IF flag modifiers */
|
||||
|
||||
static void kprobe_emulate_ifmodifiers(struct kprobe *p, struct pt_regs *regs)
|
||||
|
||||
@@ -603,7 +603,7 @@ static void __init memblock_x86_reserve_range_setup_data(void)
|
||||
|
||||
static void __init arch_reserve_crashkernel(void)
|
||||
{
|
||||
unsigned long long crash_base, crash_size, low_size = 0;
|
||||
unsigned long long crash_base, crash_size, low_size = 0, cma_size = 0;
|
||||
bool high = false;
|
||||
int ret;
|
||||
|
||||
@@ -612,7 +612,7 @@ static void __init arch_reserve_crashkernel(void)
|
||||
|
||||
ret = parse_crashkernel(boot_command_line, memblock_phys_mem_size(),
|
||||
&crash_size, &crash_base,
|
||||
&low_size, &high);
|
||||
&low_size, &cma_size, &high);
|
||||
if (ret)
|
||||
return;
|
||||
|
||||
@@ -622,6 +622,7 @@ static void __init arch_reserve_crashkernel(void)
|
||||
}
|
||||
|
||||
reserve_crashkernel_generic(crash_size, crash_base, low_size, high);
|
||||
reserve_crashkernel_cma(cma_size);
|
||||
}
|
||||
|
||||
static struct resource standard_io_resources[] = {
|
||||
|
||||
@@ -641,7 +641,7 @@ static void kvm_pit_reset(struct kvm_pit *pit)
|
||||
kvm_pit_reset_reinject(pit);
|
||||
}
|
||||
|
||||
static void pit_mask_notifer(struct kvm_irq_mask_notifier *kimn, bool mask)
|
||||
static void pit_mask_notifier(struct kvm_irq_mask_notifier *kimn, bool mask)
|
||||
{
|
||||
struct kvm_pit *pit = container_of(kimn, struct kvm_pit, mask_notifier);
|
||||
|
||||
@@ -763,7 +763,7 @@ struct kvm_pit *kvm_create_pit(struct kvm *kvm, u32 flags)
|
||||
|
||||
pit_state->irq_ack_notifier.gsi = 0;
|
||||
pit_state->irq_ack_notifier.irq_acked = kvm_pit_ack_irq;
|
||||
pit->mask_notifier.func = pit_mask_notifer;
|
||||
pit->mask_notifier.func = pit_mask_notifier;
|
||||
|
||||
kvm_pit_reset(pit);
|
||||
|
||||
|
||||
@@ -1063,13 +1063,9 @@ unsigned long arch_max_swapfile_size(void)
|
||||
static struct execmem_info execmem_info __ro_after_init;
|
||||
|
||||
#ifdef CONFIG_ARCH_HAS_EXECMEM_ROX
|
||||
void execmem_fill_trapping_insns(void *ptr, size_t size, bool writeable)
|
||||
void execmem_fill_trapping_insns(void *ptr, size_t size)
|
||||
{
|
||||
/* fill memory with INT3 instructions */
|
||||
if (writeable)
|
||||
memset(ptr, INT3_INSN_OPCODE, size);
|
||||
else
|
||||
text_poke_set(ptr, INT3_INSN_OPCODE, size);
|
||||
memset(ptr, INT3_INSN_OPCODE, size);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1102,7 +1098,21 @@ struct execmem_info __init *execmem_arch_setup(void)
|
||||
.pgprot = pgprot,
|
||||
.alignment = MODULE_ALIGN,
|
||||
},
|
||||
[EXECMEM_KPROBES ... EXECMEM_BPF] = {
|
||||
[EXECMEM_KPROBES] = {
|
||||
.flags = flags,
|
||||
.start = start,
|
||||
.end = MODULES_END,
|
||||
.pgprot = PAGE_KERNEL_ROX,
|
||||
.alignment = MODULE_ALIGN,
|
||||
},
|
||||
[EXECMEM_FTRACE] = {
|
||||
.flags = flags,
|
||||
.start = start,
|
||||
.end = MODULES_END,
|
||||
.pgprot = pgprot,
|
||||
.alignment = MODULE_ALIGN,
|
||||
},
|
||||
[EXECMEM_BPF] = {
|
||||
.flags = EXECMEM_KASAN_SHADOW,
|
||||
.start = start,
|
||||
.end = MODULES_END,
|
||||
|
||||
@@ -119,7 +119,7 @@ do_sync_gen_syndrome(struct page **blocks, unsigned int *offsets, int disks,
|
||||
for (i = 0; i < disks; i++) {
|
||||
if (blocks[i] == NULL) {
|
||||
BUG_ON(i > disks - 3); /* P or Q can't be zero */
|
||||
srcs[i] = (void*)raid6_empty_zero_page;
|
||||
srcs[i] = raid6_get_zero_page();
|
||||
} else {
|
||||
srcs[i] = page_address(blocks[i]) + offsets[i];
|
||||
|
||||
|
||||
@@ -414,7 +414,7 @@ async_raid6_2data_recov(int disks, size_t bytes, int faila, int failb,
|
||||
async_tx_quiesce(&submit->depend_tx);
|
||||
for (i = 0; i < disks; i++)
|
||||
if (blocks[i] == NULL)
|
||||
ptrs[i] = (void *) raid6_empty_zero_page;
|
||||
ptrs[i] = raid6_get_zero_page();
|
||||
else
|
||||
ptrs[i] = page_address(blocks[i]) + offs[i];
|
||||
|
||||
@@ -497,7 +497,7 @@ async_raid6_datap_recov(int disks, size_t bytes, int faila,
|
||||
async_tx_quiesce(&submit->depend_tx);
|
||||
for (i = 0; i < disks; i++)
|
||||
if (blocks[i] == NULL)
|
||||
ptrs[i] = (void*)raid6_empty_zero_page;
|
||||
ptrs[i] = raid6_get_zero_page();
|
||||
else
|
||||
ptrs[i] = page_address(blocks[i]) + offs[i];
|
||||
|
||||
|
||||
@@ -1089,6 +1089,7 @@ static struct ata_port_operations ich_pata_ops = {
|
||||
};
|
||||
|
||||
static struct attribute *piix_sidpr_shost_attrs[] = {
|
||||
&dev_attr_link_power_management_supported.attr,
|
||||
&dev_attr_link_power_management_policy.attr,
|
||||
NULL
|
||||
};
|
||||
|
||||
@@ -111,6 +111,7 @@ static DEVICE_ATTR(em_buffer, S_IWUSR | S_IRUGO,
|
||||
static DEVICE_ATTR(em_message_supported, S_IRUGO, ahci_show_em_supported, NULL);
|
||||
|
||||
static struct attribute *ahci_shost_attrs[] = {
|
||||
&dev_attr_link_power_management_supported.attr,
|
||||
&dev_attr_link_power_management_policy.attr,
|
||||
&dev_attr_em_message_type.attr,
|
||||
&dev_attr_em_message.attr,
|
||||
|
||||
@@ -4602,7 +4602,7 @@ static unsigned int ata_dev_init_params(struct ata_device *dev,
|
||||
return AC_ERR_INVALID;
|
||||
|
||||
/* set up init dev params taskfile */
|
||||
ata_dev_dbg(dev, "init dev params \n");
|
||||
ata_dev_dbg(dev, "init dev params\n");
|
||||
|
||||
ata_tf_init(dev, &tf);
|
||||
tf.command = ATA_CMD_INIT_DEV_PARAMS;
|
||||
|
||||
@@ -900,14 +900,52 @@ static const char *ata_lpm_policy_names[] = {
|
||||
[ATA_LPM_MIN_POWER] = "min_power",
|
||||
};
|
||||
|
||||
/*
|
||||
* Check if a port supports link power management.
|
||||
* Must be called with the port locked.
|
||||
*/
|
||||
static bool ata_scsi_lpm_supported(struct ata_port *ap)
|
||||
{
|
||||
struct ata_link *link;
|
||||
struct ata_device *dev;
|
||||
|
||||
if (ap->flags & ATA_FLAG_NO_LPM)
|
||||
return false;
|
||||
|
||||
ata_for_each_link(link, ap, EDGE) {
|
||||
ata_for_each_dev(dev, &ap->link, ENABLED) {
|
||||
if (dev->quirks & ATA_QUIRK_NOLPM)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static ssize_t ata_scsi_lpm_supported_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
struct Scsi_Host *shost = class_to_shost(dev);
|
||||
struct ata_port *ap = ata_shost_to_port(shost);
|
||||
unsigned long flags;
|
||||
bool supported;
|
||||
|
||||
spin_lock_irqsave(ap->lock, flags);
|
||||
supported = ata_scsi_lpm_supported(ap);
|
||||
spin_unlock_irqrestore(ap->lock, flags);
|
||||
|
||||
return sysfs_emit(buf, "%d\n", supported);
|
||||
}
|
||||
DEVICE_ATTR(link_power_management_supported, S_IRUGO,
|
||||
ata_scsi_lpm_supported_show, NULL);
|
||||
EXPORT_SYMBOL_GPL(dev_attr_link_power_management_supported);
|
||||
|
||||
static ssize_t ata_scsi_lpm_store(struct device *device,
|
||||
struct device_attribute *attr,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
struct Scsi_Host *shost = class_to_shost(device);
|
||||
struct ata_port *ap = ata_shost_to_port(shost);
|
||||
struct ata_link *link;
|
||||
struct ata_device *dev;
|
||||
enum ata_lpm_policy policy;
|
||||
unsigned long flags;
|
||||
|
||||
@@ -924,20 +962,11 @@ static ssize_t ata_scsi_lpm_store(struct device *device,
|
||||
|
||||
spin_lock_irqsave(ap->lock, flags);
|
||||
|
||||
if (ap->flags & ATA_FLAG_NO_LPM) {
|
||||
if (!ata_scsi_lpm_supported(ap)) {
|
||||
count = -EOPNOTSUPP;
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
ata_for_each_link(link, ap, EDGE) {
|
||||
ata_for_each_dev(dev, &ap->link, ENABLED) {
|
||||
if (dev->quirks & ATA_QUIRK_NOLPM) {
|
||||
count = -EOPNOTSUPP;
|
||||
goto out_unlock;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ap->target_lpm_policy = policy;
|
||||
ata_port_schedule_eh(ap);
|
||||
out_unlock:
|
||||
|
||||
@@ -859,18 +859,14 @@ static void ata_to_sense_error(u8 drv_stat, u8 drv_err, u8 *sk, u8 *asc,
|
||||
{0xFF, 0xFF, 0xFF, 0xFF}, // END mark
|
||||
};
|
||||
static const unsigned char stat_table[][4] = {
|
||||
/* Must be first because BUSY means no other bits valid */
|
||||
{0x80, ABORTED_COMMAND, 0x47, 0x00},
|
||||
// Busy, fake parity for now
|
||||
{0x40, ILLEGAL_REQUEST, 0x21, 0x04},
|
||||
// Device ready, unaligned write command
|
||||
{0x20, HARDWARE_ERROR, 0x44, 0x00},
|
||||
// Device fault, internal target failure
|
||||
{0x08, ABORTED_COMMAND, 0x47, 0x00},
|
||||
// Timed out in xfer, fake parity for now
|
||||
{0x04, RECOVERED_ERROR, 0x11, 0x00},
|
||||
// Recovered ECC error Medium error, recovered
|
||||
{0xFF, 0xFF, 0xFF, 0xFF}, // END mark
|
||||
/* Busy: must be first because BUSY means no other bits valid */
|
||||
{ ATA_BUSY, ABORTED_COMMAND, 0x00, 0x00 },
|
||||
/* Device fault: INTERNAL TARGET FAILURE */
|
||||
{ ATA_DF, HARDWARE_ERROR, 0x44, 0x00 },
|
||||
/* Corrected data error */
|
||||
{ ATA_CORR, RECOVERED_ERROR, 0x00, 0x00 },
|
||||
|
||||
{ 0xFF, 0xFF, 0xFF, 0xFF }, /* END mark */
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -942,6 +938,8 @@ static void ata_gen_passthru_sense(struct ata_queued_cmd *qc)
|
||||
if (!(qc->flags & ATA_QCFLAG_RTF_FILLED)) {
|
||||
ata_dev_dbg(dev,
|
||||
"missing result TF: can't generate ATA PT sense data\n");
|
||||
if (qc->err_mask)
|
||||
ata_scsi_set_sense(dev, cmd, ABORTED_COMMAND, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -996,8 +994,8 @@ static void ata_gen_ata_sense(struct ata_queued_cmd *qc)
|
||||
|
||||
if (!(qc->flags & ATA_QCFLAG_RTF_FILLED)) {
|
||||
ata_dev_dbg(dev,
|
||||
"missing result TF: can't generate sense data\n");
|
||||
return;
|
||||
"Missing result TF: reporting aborted command\n");
|
||||
goto aborted;
|
||||
}
|
||||
|
||||
/* Use ata_to_sense_error() to map status register bits
|
||||
@@ -1008,13 +1006,15 @@ static void ata_gen_ata_sense(struct ata_queued_cmd *qc)
|
||||
ata_to_sense_error(tf->status, tf->error,
|
||||
&sense_key, &asc, &ascq);
|
||||
ata_scsi_set_sense(dev, cmd, sense_key, asc, ascq);
|
||||
} else {
|
||||
/* Could not decode error */
|
||||
ata_dev_warn(dev, "could not decode error status 0x%x err_mask 0x%x\n",
|
||||
tf->status, qc->err_mask);
|
||||
ata_scsi_set_sense(dev, cmd, ABORTED_COMMAND, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Could not decode error */
|
||||
ata_dev_warn(dev,
|
||||
"Could not decode error 0x%x, status 0x%x (err_mask=0x%x)\n",
|
||||
tf->error, tf->status, qc->err_mask);
|
||||
aborted:
|
||||
ata_scsi_set_sense(dev, cmd, ABORTED_COMMAND, 0, 0);
|
||||
}
|
||||
|
||||
void ata_scsi_sdev_config(struct scsi_device *sdev)
|
||||
|
||||
@@ -758,7 +758,7 @@ static void pata_macio_irq_clear(struct ata_port *ap)
|
||||
|
||||
static void pata_macio_reset_hw(struct pata_macio_priv *priv, int resume)
|
||||
{
|
||||
dev_dbg(priv->dev, "Enabling & resetting... \n");
|
||||
dev_dbg(priv->dev, "Enabling & resetting...\n");
|
||||
|
||||
if (priv->mediabay)
|
||||
return;
|
||||
|
||||
@@ -295,7 +295,7 @@ static void pdc2027x_set_piomode(struct ata_port *ap, struct ata_device *adev)
|
||||
}
|
||||
|
||||
/* Set the PIO timing registers using value table for 133MHz */
|
||||
ata_port_dbg(ap, "Set pio regs... \n");
|
||||
ata_port_dbg(ap, "Set PIO regs...\n");
|
||||
|
||||
ctcr0 = ioread32(dev_mmio(ap, adev, PDC_CTCR0));
|
||||
ctcr0 &= 0xffff0000;
|
||||
@@ -308,7 +308,7 @@ static void pdc2027x_set_piomode(struct ata_port *ap, struct ata_device *adev)
|
||||
ctcr1 |= (pdc2027x_pio_timing_tbl[pio].value2 << 24);
|
||||
iowrite32(ctcr1, dev_mmio(ap, adev, PDC_CTCR1));
|
||||
|
||||
ata_port_dbg(ap, "Set to pio mode[%u] \n", pio);
|
||||
ata_port_dbg(ap, "Set to PIO mode[%u]\n", pio);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -341,7 +341,7 @@ static void pdc2027x_set_dmamode(struct ata_port *ap, struct ata_device *adev)
|
||||
iowrite32(ctcr1 & ~(1 << 7), dev_mmio(ap, adev, PDC_CTCR1));
|
||||
}
|
||||
|
||||
ata_port_dbg(ap, "Set udma regs... \n");
|
||||
ata_port_dbg(ap, "Set UDMA regs...\n");
|
||||
|
||||
ctcr1 = ioread32(dev_mmio(ap, adev, PDC_CTCR1));
|
||||
ctcr1 &= 0xff000000;
|
||||
@@ -350,14 +350,14 @@ static void pdc2027x_set_dmamode(struct ata_port *ap, struct ata_device *adev)
|
||||
(pdc2027x_udma_timing_tbl[udma_mode].value2 << 16);
|
||||
iowrite32(ctcr1, dev_mmio(ap, adev, PDC_CTCR1));
|
||||
|
||||
ata_port_dbg(ap, "Set to udma mode[%u] \n", udma_mode);
|
||||
ata_port_dbg(ap, "Set to UDMA mode[%u]\n", udma_mode);
|
||||
|
||||
} else if ((dma_mode >= XFER_MW_DMA_0) &&
|
||||
(dma_mode <= XFER_MW_DMA_2)) {
|
||||
/* Set the MDMA timing registers with value table for 133MHz */
|
||||
unsigned int mdma_mode = dma_mode & 0x07;
|
||||
|
||||
ata_port_dbg(ap, "Set mdma regs... \n");
|
||||
ata_port_dbg(ap, "Set MDMA regs...\n");
|
||||
ctcr0 = ioread32(dev_mmio(ap, adev, PDC_CTCR0));
|
||||
|
||||
ctcr0 &= 0x0000ffff;
|
||||
@@ -366,7 +366,7 @@ static void pdc2027x_set_dmamode(struct ata_port *ap, struct ata_device *adev)
|
||||
|
||||
iowrite32(ctcr0, dev_mmio(ap, adev, PDC_CTCR0));
|
||||
|
||||
ata_port_dbg(ap, "Set to mdma mode[%u] \n", mdma_mode);
|
||||
ata_port_dbg(ap, "Set to MDMA mode[%u]\n", mdma_mode);
|
||||
} else {
|
||||
ata_port_err(ap, "Unknown dma mode [%u] ignored\n", dma_mode);
|
||||
}
|
||||
|
||||
@@ -4607,10 +4607,10 @@ static int handle_one_recv_msg(struct ipmi_smi *intf,
|
||||
* The NetFN and Command in the response is not even
|
||||
* marginally correct.
|
||||
*/
|
||||
dev_warn(intf->si_dev,
|
||||
"BMC returned incorrect response, expected netfn %x cmd %x, got netfn %x cmd %x\n",
|
||||
(msg->data[0] >> 2) | 1, msg->data[1],
|
||||
msg->rsp[0] >> 2, msg->rsp[1]);
|
||||
dev_warn_ratelimited(intf->si_dev,
|
||||
"BMC returned incorrect response, expected netfn %x cmd %x, got netfn %x cmd %x\n",
|
||||
(msg->data[0] >> 2) | 1, msg->data[1],
|
||||
msg->rsp[0] >> 2, msg->rsp[1]);
|
||||
|
||||
goto return_unspecified;
|
||||
}
|
||||
|
||||
@@ -2108,7 +2108,6 @@ static bool __init ipmi_smi_info_same(struct smi_info *e1, struct smi_info *e2)
|
||||
static int __init init_ipmi_si(void)
|
||||
{
|
||||
struct smi_info *e, *e2;
|
||||
enum ipmi_addr_src type = SI_INVALID;
|
||||
|
||||
if (initialized)
|
||||
return 0;
|
||||
@@ -2190,9 +2189,6 @@ static int __init init_ipmi_si(void)
|
||||
initialized = true;
|
||||
mutex_unlock(&smi_infos_lock);
|
||||
|
||||
if (type)
|
||||
return 0;
|
||||
|
||||
mutex_lock(&smi_infos_lock);
|
||||
if (unload_when_empty && list_empty(&smi_infos)) {
|
||||
mutex_unlock(&smi_infos_lock);
|
||||
|
||||
@@ -1146,14 +1146,8 @@ static struct ipmi_smi_watcher smi_watcher = {
|
||||
.smi_gone = ipmi_smi_gone
|
||||
};
|
||||
|
||||
static int action_op(const char *inval, char *outval)
|
||||
static int action_op_set_val(const char *inval)
|
||||
{
|
||||
if (outval)
|
||||
strcpy(outval, action);
|
||||
|
||||
if (!inval)
|
||||
return 0;
|
||||
|
||||
if (strcmp(inval, "reset") == 0)
|
||||
action_val = WDOG_TIMEOUT_RESET;
|
||||
else if (strcmp(inval, "none") == 0)
|
||||
@@ -1164,18 +1158,26 @@ static int action_op(const char *inval, char *outval)
|
||||
action_val = WDOG_TIMEOUT_POWER_DOWN;
|
||||
else
|
||||
return -EINVAL;
|
||||
strcpy(action, inval);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int preaction_op(const char *inval, char *outval)
|
||||
static int action_op(const char *inval, char *outval)
|
||||
{
|
||||
int rv;
|
||||
|
||||
if (outval)
|
||||
strcpy(outval, preaction);
|
||||
strcpy(outval, action);
|
||||
|
||||
if (!inval)
|
||||
return 0;
|
||||
rv = action_op_set_val(inval);
|
||||
if (!rv)
|
||||
strcpy(action, inval);
|
||||
return rv;
|
||||
}
|
||||
|
||||
static int preaction_op_set_val(const char *inval)
|
||||
{
|
||||
if (strcmp(inval, "pre_none") == 0)
|
||||
preaction_val = WDOG_PRETIMEOUT_NONE;
|
||||
else if (strcmp(inval, "pre_smi") == 0)
|
||||
@@ -1188,18 +1190,26 @@ static int preaction_op(const char *inval, char *outval)
|
||||
preaction_val = WDOG_PRETIMEOUT_MSG_INT;
|
||||
else
|
||||
return -EINVAL;
|
||||
strcpy(preaction, inval);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int preop_op(const char *inval, char *outval)
|
||||
static int preaction_op(const char *inval, char *outval)
|
||||
{
|
||||
int rv;
|
||||
|
||||
if (outval)
|
||||
strcpy(outval, preop);
|
||||
strcpy(outval, preaction);
|
||||
|
||||
if (!inval)
|
||||
return 0;
|
||||
rv = preaction_op_set_val(inval);
|
||||
if (!rv)
|
||||
strcpy(preaction, inval);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int preop_op_set_val(const char *inval)
|
||||
{
|
||||
if (strcmp(inval, "preop_none") == 0)
|
||||
preop_val = WDOG_PREOP_NONE;
|
||||
else if (strcmp(inval, "preop_panic") == 0)
|
||||
@@ -1208,7 +1218,22 @@ static int preop_op(const char *inval, char *outval)
|
||||
preop_val = WDOG_PREOP_GIVE_DATA;
|
||||
else
|
||||
return -EINVAL;
|
||||
strcpy(preop, inval);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int preop_op(const char *inval, char *outval)
|
||||
{
|
||||
int rv;
|
||||
|
||||
if (outval)
|
||||
strcpy(outval, preop);
|
||||
|
||||
if (!inval)
|
||||
return 0;
|
||||
|
||||
rv = preop_op_set_val(inval);
|
||||
if (!rv)
|
||||
strcpy(preop, inval);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1245,18 +1270,18 @@ static int __init ipmi_wdog_init(void)
|
||||
{
|
||||
int rv;
|
||||
|
||||
if (action_op(action, NULL)) {
|
||||
if (action_op_set_val(action)) {
|
||||
action_op("reset", NULL);
|
||||
pr_info("Unknown action '%s', defaulting to reset\n", action);
|
||||
}
|
||||
|
||||
if (preaction_op(preaction, NULL)) {
|
||||
if (preaction_op_set_val(preaction)) {
|
||||
preaction_op("pre_none", NULL);
|
||||
pr_info("Unknown preaction '%s', defaulting to none\n",
|
||||
preaction);
|
||||
}
|
||||
|
||||
if (preop_op(preop, NULL)) {
|
||||
if (preop_op_set_val(preop)) {
|
||||
preop_op("preop_none", NULL);
|
||||
pr_info("Unknown preop '%s', defaulting to none\n", preop);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
cpumask::CpumaskVar,
|
||||
device::{Core, Device},
|
||||
error::code::*,
|
||||
fmt,
|
||||
macros::vtable,
|
||||
module_platform_driver, of, opp, platform,
|
||||
prelude::*,
|
||||
@@ -19,7 +18,7 @@
|
||||
|
||||
/// Finds exact supply name from the OF node.
|
||||
fn find_supply_name_exact(dev: &Device, name: &str) -> Option<CString> {
|
||||
let prop_name = CString::try_from_fmt(fmt!("{}-supply", name)).ok()?;
|
||||
let prop_name = CString::try_from_fmt(fmt!("{name}-supply")).ok()?;
|
||||
dev.fwnode()?
|
||||
.property_present(&prop_name)
|
||||
.then(|| CString::try_from_fmt(fmt!("{name}")).ok())
|
||||
@@ -221,7 +220,7 @@ fn probe(
|
||||
module_platform_driver! {
|
||||
type: CPUFreqDTDriver,
|
||||
name: "cpufreq-dt",
|
||||
author: "Viresh Kumar <viresh.kumar@linaro.org>",
|
||||
authors: ["Viresh Kumar <viresh.kumar@linaro.org>"],
|
||||
description: "Generic CPUFreq DT driver",
|
||||
license: "GPL v2",
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#ifdef CONFIG_CXL_MCE
|
||||
int devm_cxl_register_mce_notifier(struct device *dev,
|
||||
struct notifier_block *mce_notifer);
|
||||
struct notifier_block *mce_notifier);
|
||||
#else
|
||||
static inline int
|
||||
devm_cxl_register_mce_notifier(struct device *dev,
|
||||
|
||||
@@ -404,7 +404,7 @@ fn pop3(&mut self) -> Option<(u16, usize)> {
|
||||
let mut out = 0;
|
||||
let mut exp = 1;
|
||||
for i in 0..poplen {
|
||||
out += self.decimals[self.len + i] as u16 * exp;
|
||||
out += u16::from(self.decimals[self.len + i]) * exp;
|
||||
exp *= 10;
|
||||
}
|
||||
Some((out, NUM_CHARS_BITS[poplen]))
|
||||
@@ -425,7 +425,7 @@ fn next(&mut self) -> Option<Self::Item> {
|
||||
match self.segment {
|
||||
Segment::Binary(data) => {
|
||||
if self.offset < data.len() {
|
||||
let byte = data[self.offset] as u16;
|
||||
let byte = u16::from(data[self.offset]);
|
||||
self.offset += 1;
|
||||
Some((byte, 8))
|
||||
} else {
|
||||
|
||||
@@ -220,8 +220,7 @@ static int guc_action_control_log(struct intel_guc *guc, bool enable,
|
||||
*/
|
||||
static int subbuf_start_callback(struct rchan_buf *buf,
|
||||
void *subbuf,
|
||||
void *prev_subbuf,
|
||||
size_t prev_padding)
|
||||
void *prev_subbuf)
|
||||
{
|
||||
/*
|
||||
* Use no-overwrite mode by default, where relay will stop accepting
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
kernel::module_auxiliary_driver! {
|
||||
type: NovaDriver,
|
||||
name: "Nova",
|
||||
author: "Danilo Krummrich",
|
||||
authors: ["Danilo Krummrich"],
|
||||
description: "Nova GPU driver",
|
||||
license: "GPL v2",
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ struct xe_vm {
|
||||
* up for revalidation. Protected from access with the
|
||||
* @invalidated_lock. Removing items from the list
|
||||
* additionally requires @lock in write mode, and adding
|
||||
* items to the list requires either the @userptr.notifer_lock in
|
||||
* items to the list requires either the @userptr.notifier_lock in
|
||||
* write mode, OR @lock in write mode.
|
||||
*/
|
||||
struct list_head invalidated;
|
||||
|
||||
@@ -19,7 +19,7 @@ pub(crate) struct NovaCore {
|
||||
MODULE_PCI_TABLE,
|
||||
<NovaCore as pci::Driver>::IdInfo,
|
||||
[(
|
||||
pci::DeviceId::from_id(bindings::PCI_VENDOR_ID_NVIDIA, bindings::PCI_ANY_ID as _),
|
||||
pci::DeviceId::from_id(bindings::PCI_VENDOR_ID_NVIDIA, bindings::PCI_ANY_ID as u32),
|
||||
()
|
||||
)]
|
||||
);
|
||||
|
||||
@@ -30,11 +30,12 @@ pub(crate) struct Firmware {
|
||||
|
||||
impl Firmware {
|
||||
pub(crate) fn new(dev: &device::Device, chipset: Chipset, ver: &str) -> Result<Firmware> {
|
||||
let mut chip_name = CString::try_from_fmt(fmt!("{}", chipset))?;
|
||||
let mut chip_name = CString::try_from_fmt(fmt!("{chipset}"))?;
|
||||
chip_name.make_ascii_lowercase();
|
||||
let chip_name = &*chip_name;
|
||||
|
||||
let request = |name_| {
|
||||
CString::try_from_fmt(fmt!("nvidia/{}/gsp/{}-{}.bin", &*chip_name, name_, ver))
|
||||
CString::try_from_fmt(fmt!("nvidia/{chip_name}/gsp/{name_}-{ver}.bin"))
|
||||
.and_then(|path| firmware::Firmware::request(&path, dev))
|
||||
};
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
kernel::module_pci_driver! {
|
||||
type: driver::NovaCore,
|
||||
name: "NovaCore",
|
||||
author: "Danilo Krummrich",
|
||||
authors: ["Danilo Krummrich"],
|
||||
description: "Nova Core GPU driver",
|
||||
license: "GPL v2",
|
||||
firmware: [],
|
||||
|
||||
@@ -36,7 +36,7 @@ pub(crate) fn architecture(self) -> Result<Architecture> {
|
||||
pub(crate) fn chipset(self) -> Result<Chipset> {
|
||||
self.architecture()
|
||||
.map(|arch| {
|
||||
((arch as u32) << Self::IMPLEMENTATION.len()) | self.implementation() as u32
|
||||
((arch as u32) << Self::IMPLEMENTATION.len()) | u32::from(self.implementation())
|
||||
})
|
||||
.and_then(Chipset::try_from)
|
||||
}
|
||||
|
||||
@@ -307,7 +307,7 @@ pub(crate) fn $field(self) -> $res_type {
|
||||
pub(crate) fn [<set_ $field>](mut self, value: $to_type) -> Self {
|
||||
const MASK: u32 = $name::[<$field:upper _MASK>];
|
||||
const SHIFT: u32 = $name::[<$field:upper _SHIFT>];
|
||||
let value = ((value as u32) << SHIFT) & MASK;
|
||||
let value = (u32::from(value) << SHIFT) & MASK;
|
||||
self.0 = (self.0 & !MASK) | value;
|
||||
|
||||
self
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
use kernel::prelude::*;
|
||||
use kernel::time::{Delta, Instant};
|
||||
use kernel::time::{Delta, Instant, Monotonic};
|
||||
|
||||
pub(crate) const fn to_lowercase_bytes<const N: usize>(s: &str) -> [u8; N] {
|
||||
let src = s.as_bytes();
|
||||
@@ -33,7 +33,7 @@ pub(crate) const fn const_bytes_to_str(bytes: &[u8]) -> &str {
|
||||
/// TODO[DLAY]: replace with `read_poll_timeout` once it is available.
|
||||
/// (https://lore.kernel.org/lkml/20250220070611.214262-8-fujita.tomonori@gmail.com/)
|
||||
pub(crate) fn wait_on<R, F: Fn() -> Option<R>>(timeout: Delta, cond: F) -> Result<R> {
|
||||
let start_time = Instant::now();
|
||||
let start_time = Instant::<Monotonic>::now();
|
||||
|
||||
loop {
|
||||
if let Some(ret) = cond() {
|
||||
|
||||
@@ -3291,6 +3291,8 @@ static const char *keys[KEY_MAX + 1] = {
|
||||
[BTN_TR2] = "BtnTR2", [BTN_SELECT] = "BtnSelect",
|
||||
[BTN_START] = "BtnStart", [BTN_MODE] = "BtnMode",
|
||||
[BTN_THUMBL] = "BtnThumbL", [BTN_THUMBR] = "BtnThumbR",
|
||||
[BTN_GRIPL] = "BtnGripL", [BTN_GRIPR] = "BtnGripR",
|
||||
[BTN_GRIPL2] = "BtnGripL2", [BTN_GRIPR2] = "BtnGripR2",
|
||||
[BTN_TOOL_PEN] = "ToolPen", [BTN_TOOL_RUBBER] = "ToolRubber",
|
||||
[BTN_TOOL_BRUSH] = "ToolBrush", [BTN_TOOL_PENCIL] = "ToolPencil",
|
||||
[BTN_TOOL_AIRBRUSH] = "ToolAirbrush", [BTN_TOOL_FINGER] = "ToolFinger",
|
||||
|
||||
@@ -755,15 +755,12 @@ static int steam_input_register(struct steam_device *steam)
|
||||
input_set_capability(input, EV_KEY, BTN_THUMBL);
|
||||
input_set_capability(input, EV_KEY, BTN_THUMB);
|
||||
input_set_capability(input, EV_KEY, BTN_THUMB2);
|
||||
input_set_capability(input, EV_KEY, BTN_GRIPL);
|
||||
input_set_capability(input, EV_KEY, BTN_GRIPR);
|
||||
if (steam->quirks & STEAM_QUIRK_DECK) {
|
||||
input_set_capability(input, EV_KEY, BTN_BASE);
|
||||
input_set_capability(input, EV_KEY, BTN_TRIGGER_HAPPY1);
|
||||
input_set_capability(input, EV_KEY, BTN_TRIGGER_HAPPY2);
|
||||
input_set_capability(input, EV_KEY, BTN_TRIGGER_HAPPY3);
|
||||
input_set_capability(input, EV_KEY, BTN_TRIGGER_HAPPY4);
|
||||
} else {
|
||||
input_set_capability(input, EV_KEY, BTN_GEAR_DOWN);
|
||||
input_set_capability(input, EV_KEY, BTN_GEAR_UP);
|
||||
input_set_capability(input, EV_KEY, BTN_GRIPL2);
|
||||
input_set_capability(input, EV_KEY, BTN_GRIPR2);
|
||||
}
|
||||
|
||||
input_set_abs_params(input, ABS_X, -32767, 32767, 0, 0);
|
||||
@@ -1419,8 +1416,8 @@ static inline s16 steam_le16(u8 *data)
|
||||
* 9.4 | BTN_SELECT | menu left
|
||||
* 9.5 | BTN_MODE | steam logo
|
||||
* 9.6 | BTN_START | menu right
|
||||
* 9.7 | BTN_GEAR_DOWN | left back lever
|
||||
* 10.0 | BTN_GEAR_UP | right back lever
|
||||
* 9.7 | BTN_GRIPL | left back lever
|
||||
* 10.0 | BTN_GRIPR | right back lever
|
||||
* 10.1 | -- | left-pad clicked
|
||||
* 10.2 | BTN_THUMBR | right-pad clicked
|
||||
* 10.3 | BTN_THUMB | left-pad touched (but see explanation below)
|
||||
@@ -1485,8 +1482,8 @@ static void steam_do_input_event(struct steam_device *steam,
|
||||
input_event(input, EV_KEY, BTN_SELECT, !!(b9 & BIT(4)));
|
||||
input_event(input, EV_KEY, BTN_MODE, !!(b9 & BIT(5)));
|
||||
input_event(input, EV_KEY, BTN_START, !!(b9 & BIT(6)));
|
||||
input_event(input, EV_KEY, BTN_GEAR_DOWN, !!(b9 & BIT(7)));
|
||||
input_event(input, EV_KEY, BTN_GEAR_UP, !!(b10 & BIT(0)));
|
||||
input_event(input, EV_KEY, BTN_GRIPL, !!(b9 & BIT(7)));
|
||||
input_event(input, EV_KEY, BTN_GRIPR, !!(b10 & BIT(0)));
|
||||
input_event(input, EV_KEY, BTN_THUMBR, !!(b10 & BIT(2)));
|
||||
input_event(input, EV_KEY, BTN_THUMBL, !!(b10 & BIT(6)));
|
||||
input_event(input, EV_KEY, BTN_THUMB, lpad_touched || lpad_and_joy);
|
||||
@@ -1547,8 +1544,8 @@ static void steam_do_input_event(struct steam_device *steam,
|
||||
* 9.4 | BTN_SELECT | menu left
|
||||
* 9.5 | BTN_MODE | steam logo
|
||||
* 9.6 | BTN_START | menu right
|
||||
* 9.7 | BTN_TRIGGER_HAPPY3 | left bottom grip button
|
||||
* 10.0 | BTN_TRIGGER_HAPPY4 | right bottom grip button
|
||||
* 9.7 | BTN_GRIPL2 | left bottom grip button
|
||||
* 10.0 | BTN_GRIPR2 | right bottom grip button
|
||||
* 10.1 | BTN_THUMB | left pad pressed
|
||||
* 10.2 | BTN_THUMB2 | right pad pressed
|
||||
* 10.3 | -- | left pad touched
|
||||
@@ -1573,8 +1570,8 @@ static void steam_do_input_event(struct steam_device *steam,
|
||||
* 12.6 | -- | unknown
|
||||
* 12.7 | -- | unknown
|
||||
* 13.0 | -- | unknown
|
||||
* 13.1 | BTN_TRIGGER_HAPPY1 | left top grip button
|
||||
* 13.2 | BTN_TRIGGER_HAPPY2 | right top grip button
|
||||
* 13.1 | BTN_GRIPL | left top grip button
|
||||
* 13.2 | BTN_GRIPR | right top grip button
|
||||
* 13.3 | -- | unknown
|
||||
* 13.4 | -- | unknown
|
||||
* 13.5 | -- | unknown
|
||||
@@ -1659,8 +1656,8 @@ static void steam_do_deck_input_event(struct steam_device *steam,
|
||||
input_event(input, EV_KEY, BTN_SELECT, !!(b9 & BIT(4)));
|
||||
input_event(input, EV_KEY, BTN_MODE, !!(b9 & BIT(5)));
|
||||
input_event(input, EV_KEY, BTN_START, !!(b9 & BIT(6)));
|
||||
input_event(input, EV_KEY, BTN_TRIGGER_HAPPY3, !!(b9 & BIT(7)));
|
||||
input_event(input, EV_KEY, BTN_TRIGGER_HAPPY4, !!(b10 & BIT(0)));
|
||||
input_event(input, EV_KEY, BTN_GRIPL2, !!(b9 & BIT(7)));
|
||||
input_event(input, EV_KEY, BTN_GRIPR2, !!(b10 & BIT(0)));
|
||||
input_event(input, EV_KEY, BTN_THUMBL, !!(b10 & BIT(6)));
|
||||
input_event(input, EV_KEY, BTN_THUMBR, !!(b11 & BIT(2)));
|
||||
input_event(input, EV_KEY, BTN_DPAD_UP, !!(b9 & BIT(0)));
|
||||
@@ -1669,8 +1666,8 @@ static void steam_do_deck_input_event(struct steam_device *steam,
|
||||
input_event(input, EV_KEY, BTN_DPAD_DOWN, !!(b9 & BIT(3)));
|
||||
input_event(input, EV_KEY, BTN_THUMB, !!(b10 & BIT(1)));
|
||||
input_event(input, EV_KEY, BTN_THUMB2, !!(b10 & BIT(2)));
|
||||
input_event(input, EV_KEY, BTN_TRIGGER_HAPPY1, !!(b13 & BIT(1)));
|
||||
input_event(input, EV_KEY, BTN_TRIGGER_HAPPY2, !!(b13 & BIT(2)));
|
||||
input_event(input, EV_KEY, BTN_GRIPL, !!(b13 & BIT(1)));
|
||||
input_event(input, EV_KEY, BTN_GRIPR, !!(b13 & BIT(2)));
|
||||
input_event(input, EV_KEY, BTN_BASE, !!(b14 & BIT(2)));
|
||||
|
||||
input_sync(input);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user