Merge branch 'linus' into x86/boot, to resolve conflict
There's a new conflict with Linus's upstream tree, because in the following merge conflict resolution in <asm/coco.h>: 38b334fc767e Merge tag 'x86_sev_for_v6.9_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Linus has resolved the conflicting placement of 'cc_mask' better than the original commit: 1c811d403afd x86/sev: Fix position dependent variable references in startup code ... which was also done by an internal merge resolution: 2e5fc4786b7a Merge branch 'x86/sev' into x86/boot, to resolve conflicts and to pick up dependent tree But Linus is right in 38b334fc767e, the 'cc_mask' declaration is sufficient within the #ifdef CONFIG_ARCH_HAS_CC_PLATFORM block. So instead of forcing Linus to do the same resolution again, merge in Linus's tree and follow his conflict resolution. Conflicts: arch/x86/include/asm/coco.h Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
commit
2e2bc42c83
6
.mailmap
6
.mailmap
@ -325,6 +325,7 @@ Kenneth W Chen <kenneth.w.chen@intel.com>
|
||||
Kenneth Westfield <quic_kwestfie@quicinc.com> <kwestfie@codeaurora.org>
|
||||
Kiran Gunda <quic_kgunda@quicinc.com> <kgunda@codeaurora.org>
|
||||
Kirill Tkhai <tkhai@ya.ru> <ktkhai@virtuozzo.com>
|
||||
Kishon Vijay Abraham I <kishon@kernel.org> <kishon@ti.com>
|
||||
Konstantin Khlebnikov <koct9i@gmail.com> <khlebnikov@yandex-team.ru>
|
||||
Konstantin Khlebnikov <koct9i@gmail.com> <k.khlebnikov@samsung.com>
|
||||
Koushik <raghavendra.koushik@neterion.com>
|
||||
@ -609,6 +610,11 @@ TripleX Chung <xxx.phy@gmail.com> <triplex@zh-kernel.org>
|
||||
TripleX Chung <xxx.phy@gmail.com> <zhongyu@18mail.cn>
|
||||
Tsuneo Yoshioka <Tsuneo.Yoshioka@f-secure.com>
|
||||
Tudor Ambarus <tudor.ambarus@linaro.org> <tudor.ambarus@microchip.com>
|
||||
Tvrtko Ursulin <tursulin@ursulin.net> <tvrtko.ursulin@intel.com>
|
||||
Tvrtko Ursulin <tursulin@ursulin.net> <tvrtko.ursulin@linux.intel.com>
|
||||
Tvrtko Ursulin <tursulin@ursulin.net> <tvrtko.ursulin@sophos.com>
|
||||
Tvrtko Ursulin <tursulin@ursulin.net> <tvrtko.ursulin@onelan.co.uk>
|
||||
Tvrtko Ursulin <tursulin@ursulin.net> <tvrtko@ursulin.net>
|
||||
Tycho Andersen <tycho@tycho.pizza> <tycho@tycho.ws>
|
||||
Tzung-Bi Shih <tzungbi@kernel.org> <tzungbi@google.com>
|
||||
Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
|
||||
|
5
CREDITS
5
CREDITS
@ -63,6 +63,11 @@ D: dosfs, LILO, some fd features, ATM, various other hacks here and there
|
||||
S: Buenos Aires
|
||||
S: Argentina
|
||||
|
||||
NTFS FILESYSTEM
|
||||
N: Anton Altaparmakov
|
||||
E: anton@tuxera.com
|
||||
D: NTFS filesystem
|
||||
|
||||
N: Tim Alpaerts
|
||||
E: tim_alpaerts@toyota-motor-europe.com
|
||||
D: 802.2 class II logical link control layer,
|
||||
|
@ -68,7 +68,8 @@ over a rather long period of time, but improvements are always welcome!
|
||||
rcu_read_lock_sched(), or by the appropriate update-side lock.
|
||||
Explicit disabling of preemption (preempt_disable(), for example)
|
||||
can serve as rcu_read_lock_sched(), but is less readable and
|
||||
prevents lockdep from detecting locking issues.
|
||||
prevents lockdep from detecting locking issues. Acquiring a
|
||||
spinlock also enters an RCU read-side critical section.
|
||||
|
||||
Please note that you *cannot* rely on code known to be built
|
||||
only in non-preemptible kernels. Such code can and will break,
|
||||
@ -382,16 +383,17 @@ over a rather long period of time, but improvements are always welcome!
|
||||
must use whatever locking or other synchronization is required
|
||||
to safely access and/or modify that data structure.
|
||||
|
||||
Do not assume that RCU callbacks will be executed on the same
|
||||
CPU that executed the corresponding call_rcu() or call_srcu().
|
||||
For example, if a given CPU goes offline while having an RCU
|
||||
callback pending, then that RCU callback will execute on some
|
||||
surviving CPU. (If this was not the case, a self-spawning RCU
|
||||
callback would prevent the victim CPU from ever going offline.)
|
||||
Furthermore, CPUs designated by rcu_nocbs= might well *always*
|
||||
have their RCU callbacks executed on some other CPUs, in fact,
|
||||
for some real-time workloads, this is the whole point of using
|
||||
the rcu_nocbs= kernel boot parameter.
|
||||
Do not assume that RCU callbacks will be executed on
|
||||
the same CPU that executed the corresponding call_rcu(),
|
||||
call_srcu(), call_rcu_tasks(), call_rcu_tasks_rude(), or
|
||||
call_rcu_tasks_trace(). For example, if a given CPU goes offline
|
||||
while having an RCU callback pending, then that RCU callback
|
||||
will execute on some surviving CPU. (If this was not the case,
|
||||
a self-spawning RCU callback would prevent the victim CPU from
|
||||
ever going offline.) Furthermore, CPUs designated by rcu_nocbs=
|
||||
might well *always* have their RCU callbacks executed on some
|
||||
other CPUs, in fact, for some real-time workloads, this is the
|
||||
whole point of using the rcu_nocbs= kernel boot parameter.
|
||||
|
||||
In addition, do not assume that callbacks queued in a given order
|
||||
will be invoked in that order, even if they all are queued on the
|
||||
@ -444,7 +446,7 @@ over a rather long period of time, but improvements are always welcome!
|
||||
real-time workloads than is synchronize_rcu_expedited().
|
||||
|
||||
It is also permissible to sleep in RCU Tasks Trace read-side
|
||||
critical, which are delimited by rcu_read_lock_trace() and
|
||||
critical section, which are delimited by rcu_read_lock_trace() and
|
||||
rcu_read_unlock_trace(). However, this is a specialized flavor
|
||||
of RCU, and you should not use it without first checking with
|
||||
its current users. In most cases, you should instead use SRCU.
|
||||
@ -490,6 +492,12 @@ over a rather long period of time, but improvements are always welcome!
|
||||
since the last time that you passed that same object to
|
||||
call_rcu() (or friends).
|
||||
|
||||
CONFIG_RCU_STRICT_GRACE_PERIOD:
|
||||
combine with KASAN to check for pointers leaked out
|
||||
of RCU read-side critical sections. This Kconfig
|
||||
option is tough on both performance and scalability,
|
||||
and so is limited to four-CPU systems.
|
||||
|
||||
__rcu sparse checks:
|
||||
tag the pointer to the RCU-protected data structure
|
||||
with __rcu, and sparse will warn you if you access that
|
||||
|
@ -408,7 +408,10 @@ member of the rcu_dereference() to use in various situations:
|
||||
RCU flavors, an RCU read-side critical section is entered
|
||||
using rcu_read_lock(), anything that disables bottom halves,
|
||||
anything that disables interrupts, or anything that disables
|
||||
preemption.
|
||||
preemption. Please note that spinlock critical sections
|
||||
are also implied RCU read-side critical sections, even when
|
||||
they are preemptible, as they are in kernels built with
|
||||
CONFIG_PREEMPT_RT=y.
|
||||
|
||||
2. If the access might be within an RCU read-side critical section
|
||||
on the one hand, or protected by (say) my_lock on the other,
|
||||
|
@ -172,14 +172,25 @@ rcu_read_lock()
|
||||
critical section. Reference counts may be used in conjunction
|
||||
with RCU to maintain longer-term references to data structures.
|
||||
|
||||
Note that anything that disables bottom halves, preemption,
|
||||
or interrupts also enters an RCU read-side critical section.
|
||||
Acquiring a spinlock also enters an RCU read-side critical
|
||||
sections, even for spinlocks that do not disable preemption,
|
||||
as is the case in kernels built with CONFIG_PREEMPT_RT=y.
|
||||
Sleeplocks do *not* enter RCU read-side critical sections.
|
||||
|
||||
rcu_read_unlock()
|
||||
^^^^^^^^^^^^^^^^^
|
||||
void rcu_read_unlock(void);
|
||||
|
||||
This temporal primitives is used by a reader to inform the
|
||||
reclaimer that the reader is exiting an RCU read-side critical
|
||||
section. Note that RCU read-side critical sections may be nested
|
||||
and/or overlapping.
|
||||
section. Anything that enables bottom halves, preemption,
|
||||
or interrupts also exits an RCU read-side critical section.
|
||||
Releasing a spinlock also exits an RCU read-side critical section.
|
||||
|
||||
Note that RCU read-side critical sections may be nested and/or
|
||||
overlapping.
|
||||
|
||||
synchronize_rcu()
|
||||
^^^^^^^^^^^^^^^^^
|
||||
@ -952,8 +963,8 @@ unfortunately any spinlock in a ``SLAB_TYPESAFE_BY_RCU`` object must be
|
||||
initialized after each and every call to kmem_cache_alloc(), which renders
|
||||
reference-free spinlock acquisition completely unsafe. Therefore, when
|
||||
using ``SLAB_TYPESAFE_BY_RCU``, make proper use of a reference counter.
|
||||
(Those willing to use a kmem_cache constructor may also use locking,
|
||||
including cache-friendly sequence locking.)
|
||||
(Those willing to initialize their locks in a kmem_cache constructor
|
||||
may also use locking, including cache-friendly sequence locking.)
|
||||
|
||||
With traditional reference counting -- such as that implemented by the
|
||||
kref library in Linux -- there is typically code that runs when the last
|
||||
|
24
Documentation/admin-guide/RAS/address-translation.rst
Normal file
24
Documentation/admin-guide/RAS/address-translation.rst
Normal file
@ -0,0 +1,24 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
Address translation
|
||||
===================
|
||||
|
||||
x86 AMD
|
||||
-------
|
||||
|
||||
Zen-based AMD systems include a Data Fabric that manages the layout of
|
||||
physical memory. Devices attached to the Fabric, like memory controllers,
|
||||
I/O, etc., may not have a complete view of the system physical memory map.
|
||||
These devices may provide a "normalized", i.e. device physical, address
|
||||
when reporting memory errors. Normalized addresses must be translated to
|
||||
a system physical address for the kernel to action on the memory.
|
||||
|
||||
AMD Address Translation Library (CONFIG_AMD_ATL) provides translation for
|
||||
this case.
|
||||
|
||||
Glossary of acronyms used in address translation for Zen-based systems
|
||||
|
||||
* CCM = Cache Coherent Moderator
|
||||
* COD = Cluster-on-Die
|
||||
* COH_ST = Coherent Station
|
||||
* DF = Data Fabric
|
@ -1,15 +1,10 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
Reliability, Availability and Serviceability features
|
||||
=====================================================
|
||||
|
||||
This documents different aspects of the RAS functionality present in the
|
||||
kernel.
|
||||
|
||||
Error decoding
|
||||
---------------
|
||||
==============
|
||||
|
||||
* x86
|
||||
x86
|
||||
---
|
||||
|
||||
Error decoding on AMD systems should be done using the rasdaemon tool:
|
||||
https://github.com/mchehab/rasdaemon/
|
7
Documentation/admin-guide/RAS/index.rst
Normal file
7
Documentation/admin-guide/RAS/index.rst
Normal file
@ -0,0 +1,7 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
main
|
||||
error-decoding
|
||||
address-translation
|
@ -1,8 +1,12 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0
|
||||
.. include:: <isonum.txt>
|
||||
|
||||
============================================
|
||||
Reliability, Availability and Serviceability
|
||||
============================================
|
||||
==================================================
|
||||
Reliability, Availability and Serviceability (RAS)
|
||||
==================================================
|
||||
|
||||
This documents different aspects of the RAS functionality present in the
|
||||
kernel.
|
||||
|
||||
RAS concepts
|
||||
************
|
@ -179,7 +179,7 @@ files describing that cpuset:
|
||||
- cpuset.mem_hardwall flag: is memory allocation hardwalled
|
||||
- cpuset.memory_pressure: measure of how much paging pressure in cpuset
|
||||
- cpuset.memory_spread_page flag: if set, spread page cache evenly on allowed nodes
|
||||
- cpuset.memory_spread_slab flag: if set, spread slab cache evenly on allowed nodes
|
||||
- cpuset.memory_spread_slab flag: OBSOLETE. Doesn't have any function.
|
||||
- cpuset.sched_load_balance flag: if set, load balance within CPUs on that cpuset
|
||||
- cpuset.sched_relax_domain_level: the searching range when migrating tasks
|
||||
|
||||
|
@ -65,10 +65,12 @@ files include::
|
||||
|
||||
1. Page fault accounting
|
||||
|
||||
hugetlb.<hugepagesize>.limit_in_bytes
|
||||
hugetlb.<hugepagesize>.max_usage_in_bytes
|
||||
hugetlb.<hugepagesize>.usage_in_bytes
|
||||
hugetlb.<hugepagesize>.failcnt
|
||||
::
|
||||
|
||||
hugetlb.<hugepagesize>.limit_in_bytes
|
||||
hugetlb.<hugepagesize>.max_usage_in_bytes
|
||||
hugetlb.<hugepagesize>.usage_in_bytes
|
||||
hugetlb.<hugepagesize>.failcnt
|
||||
|
||||
The HugeTLB controller allows users to limit the HugeTLB usage (page fault) per
|
||||
control group and enforces the limit during page fault. Since HugeTLB
|
||||
@ -82,10 +84,12 @@ getting SIGBUS.
|
||||
|
||||
2. Reservation accounting
|
||||
|
||||
hugetlb.<hugepagesize>.rsvd.limit_in_bytes
|
||||
hugetlb.<hugepagesize>.rsvd.max_usage_in_bytes
|
||||
hugetlb.<hugepagesize>.rsvd.usage_in_bytes
|
||||
hugetlb.<hugepagesize>.rsvd.failcnt
|
||||
::
|
||||
|
||||
hugetlb.<hugepagesize>.rsvd.limit_in_bytes
|
||||
hugetlb.<hugepagesize>.rsvd.max_usage_in_bytes
|
||||
hugetlb.<hugepagesize>.rsvd.usage_in_bytes
|
||||
hugetlb.<hugepagesize>.rsvd.failcnt
|
||||
|
||||
The HugeTLB controller allows to limit the HugeTLB reservations per control
|
||||
group and enforces the controller limit at reservation time and at the fault of
|
||||
|
@ -473,8 +473,8 @@ Spectre variant 2
|
||||
-mindirect-branch=thunk-extern -mindirect-branch-register options.
|
||||
If the kernel is compiled with a Clang compiler, the compiler needs
|
||||
to support -mretpoline-external-thunk option. The kernel config
|
||||
CONFIG_RETPOLINE needs to be turned on, and the CPU needs to run with
|
||||
the latest updated microcode.
|
||||
CONFIG_MITIGATION_RETPOLINE needs to be turned on, and the CPU needs
|
||||
to run with the latest updated microcode.
|
||||
|
||||
On Intel Skylake-era systems the mitigation covers most, but not all,
|
||||
cases. See :ref:`[3] <spec_ref3>` for more details.
|
||||
@ -609,8 +609,8 @@ kernel command line.
|
||||
Selecting 'on' will, and 'auto' may, choose a
|
||||
mitigation method at run time according to the
|
||||
CPU, the available microcode, the setting of the
|
||||
CONFIG_RETPOLINE configuration option, and the
|
||||
compiler with which the kernel was built.
|
||||
CONFIG_MITIGATION_RETPOLINE configuration option,
|
||||
and the compiler with which the kernel was built.
|
||||
|
||||
Selecting 'on' will also enable the mitigation
|
||||
against user space to user space task attacks.
|
||||
|
@ -122,7 +122,7 @@ configure specific aspects of kernel behavior to your liking.
|
||||
pmf
|
||||
pnp
|
||||
rapidio
|
||||
ras
|
||||
RAS/index
|
||||
rtc
|
||||
serial-console
|
||||
svga
|
||||
|
@ -191,9 +191,7 @@ Dump-capture kernel config options (Arch Dependent, i386 and x86_64)
|
||||
CPU is enough for kdump kernel to dump vmcore on most of systems.
|
||||
|
||||
However, you can also specify nr_cpus=X to enable multiple processors
|
||||
in kdump kernel. In this case, "disable_cpu_apicid=" is needed to
|
||||
tell kdump kernel which cpu is 1st kernel's BSP. Please refer to
|
||||
admin-guide/kernel-parameters.txt for more details.
|
||||
in kdump kernel.
|
||||
|
||||
With CONFIG_SMP=n, the above things are not related.
|
||||
|
||||
@ -454,8 +452,7 @@ Notes on loading the dump-capture kernel:
|
||||
to use multi-thread programs with it, such as parallel dump feature of
|
||||
makedumpfile. Otherwise, the multi-thread program may have a great
|
||||
performance degradation. To enable multi-cpu support, you should bring up an
|
||||
SMP dump-capture kernel and specify maxcpus/nr_cpus, disable_cpu_apicid=[X]
|
||||
options while loading it.
|
||||
SMP dump-capture kernel and specify maxcpus/nr_cpus options while loading it.
|
||||
|
||||
* For s390x there are two kdump modes: If a ELF header is specified with
|
||||
the elfcorehdr= kernel parameter, it is used by the kdump kernel as it
|
||||
|
@ -108,6 +108,7 @@ is applicable::
|
||||
CMA Contiguous Memory Area support is enabled.
|
||||
DRM Direct Rendering Management support is enabled.
|
||||
DYNAMIC_DEBUG Build in debug messages and enable them at runtime
|
||||
EARLY Parameter processed too early to be embedded in initrd.
|
||||
EDD BIOS Enhanced Disk Drive Services (EDD) is enabled
|
||||
EFI EFI Partitioning (GPT) is enabled
|
||||
EVM Extended Verification Module
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -26,9 +26,9 @@ comments in pti.c).
|
||||
|
||||
This approach helps to ensure that side-channel attacks leveraging
|
||||
the paging structures do not function when PTI is enabled. It can be
|
||||
enabled by setting CONFIG_PAGE_TABLE_ISOLATION=y at compile time.
|
||||
Once enabled at compile-time, it can be disabled at boot with the
|
||||
'nopti' or 'pti=' kernel parameters (see kernel-parameters.txt).
|
||||
enabled by setting CONFIG_MITIGATION_PAGE_TABLE_ISOLATION=y at compile
|
||||
time. Once enabled at compile-time, it can be disabled at boot with
|
||||
the 'nopti' or 'pti=' kernel parameters (see kernel-parameters.txt).
|
||||
|
||||
Page Table Management
|
||||
=====================
|
||||
|
@ -47,17 +47,21 @@ AMD nomenclature for package is 'Node'.
|
||||
|
||||
Package-related topology information in the kernel:
|
||||
|
||||
- cpuinfo_x86.x86_max_cores:
|
||||
- topology_num_threads_per_package()
|
||||
|
||||
The number of cores in a package. This information is retrieved via CPUID.
|
||||
The number of threads in a package.
|
||||
|
||||
- cpuinfo_x86.x86_max_dies:
|
||||
- topology_num_cores_per_package()
|
||||
|
||||
The number of dies in a package. This information is retrieved via CPUID.
|
||||
The number of cores in a package.
|
||||
|
||||
- topology_max_dies_per_package()
|
||||
|
||||
The maximum number of dies in a package.
|
||||
|
||||
- cpuinfo_x86.topo.die_id:
|
||||
|
||||
The physical ID of the die. This information is retrieved via CPUID.
|
||||
The physical ID of the die.
|
||||
|
||||
- cpuinfo_x86.topo.pkg_id:
|
||||
|
||||
@ -96,16 +100,6 @@ are SMT- or CMT-type threads.
|
||||
AMDs nomenclature for a CMT core is "Compute Unit". The kernel always uses
|
||||
"core".
|
||||
|
||||
Core-related topology information in the kernel:
|
||||
|
||||
- smp_num_siblings:
|
||||
|
||||
The number of threads in a core. The number of threads in a package can be
|
||||
calculated by::
|
||||
|
||||
threads_per_package = cpuinfo_x86.x86_max_cores * smp_num_siblings
|
||||
|
||||
|
||||
Threads
|
||||
=======
|
||||
A thread is a single scheduling unit. It's the equivalent to a logical Linux
|
||||
|
96
Documentation/arch/x86/x86_64/fred.rst
Normal file
96
Documentation/arch/x86/x86_64/fred.rst
Normal file
@ -0,0 +1,96 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
=========================================
|
||||
Flexible Return and Event Delivery (FRED)
|
||||
=========================================
|
||||
|
||||
Overview
|
||||
========
|
||||
|
||||
The FRED architecture defines simple new transitions that change
|
||||
privilege level (ring transitions). The FRED architecture was
|
||||
designed with the following goals:
|
||||
|
||||
1) Improve overall performance and response time by replacing event
|
||||
delivery through the interrupt descriptor table (IDT event
|
||||
delivery) and event return by the IRET instruction with lower
|
||||
latency transitions.
|
||||
|
||||
2) Improve software robustness by ensuring that event delivery
|
||||
establishes the full supervisor context and that event return
|
||||
establishes the full user context.
|
||||
|
||||
The new transitions defined by the FRED architecture are FRED event
|
||||
delivery and, for returning from events, two FRED return instructions.
|
||||
FRED event delivery can effect a transition from ring 3 to ring 0, but
|
||||
it is used also to deliver events incident to ring 0. One FRED
|
||||
instruction (ERETU) effects a return from ring 0 to ring 3, while the
|
||||
other (ERETS) returns while remaining in ring 0. Collectively, FRED
|
||||
event delivery and the FRED return instructions are FRED transitions.
|
||||
|
||||
In addition to these transitions, the FRED architecture defines a new
|
||||
instruction (LKGS) for managing the state of the GS segment register.
|
||||
The LKGS instruction can be used by 64-bit operating systems that do
|
||||
not use the new FRED transitions.
|
||||
|
||||
Furthermore, the FRED architecture is easy to extend for future CPU
|
||||
architectures.
|
||||
|
||||
Software based event dispatching
|
||||
================================
|
||||
|
||||
FRED operates differently from IDT in terms of event handling. Instead
|
||||
of directly dispatching an event to its handler based on the event
|
||||
vector, FRED requires the software to dispatch an event to its handler
|
||||
based on both the event's type and vector. Therefore, an event dispatch
|
||||
framework must be implemented to facilitate the event-to-handler
|
||||
dispatch process. The FRED event dispatch framework takes control
|
||||
once an event is delivered, and employs a two-level dispatch.
|
||||
|
||||
The first level dispatching is event type based, and the second level
|
||||
dispatching is event vector based.
|
||||
|
||||
Full supervisor/user context
|
||||
============================
|
||||
|
||||
FRED event delivery atomically save and restore full supervisor/user
|
||||
context upon event delivery and return. Thus it avoids the problem of
|
||||
transient states due to %cr2 and/or %dr6, and it is no longer needed
|
||||
to handle all the ugly corner cases caused by half baked entry states.
|
||||
|
||||
FRED allows explicit unblock of NMI with new event return instructions
|
||||
ERETS/ERETU, avoiding the mess caused by IRET which unconditionally
|
||||
unblocks NMI, e.g., when an exception happens during NMI handling.
|
||||
|
||||
FRED always restores the full value of %rsp, thus ESPFIX is no longer
|
||||
needed when FRED is enabled.
|
||||
|
||||
LKGS
|
||||
====
|
||||
|
||||
LKGS behaves like the MOV to GS instruction except that it loads the
|
||||
base address into the IA32_KERNEL_GS_BASE MSR instead of the GS
|
||||
segment’s descriptor cache. With LKGS, it ends up with avoiding
|
||||
mucking with kernel GS, i.e., an operating system can always operate
|
||||
with its own GS base address.
|
||||
|
||||
Because FRED event delivery from ring 3 and ERETU both swap the value
|
||||
of the GS base address and that of the IA32_KERNEL_GS_BASE MSR, plus
|
||||
the introduction of LKGS instruction, the SWAPGS instruction is no
|
||||
longer needed when FRED is enabled, thus is disallowed (#UD).
|
||||
|
||||
Stack levels
|
||||
============
|
||||
|
||||
4 stack levels 0~3 are introduced to replace the nonreentrant IST for
|
||||
event handling, and each stack level should be configured to use a
|
||||
dedicated stack.
|
||||
|
||||
The current stack level could be unchanged or go higher upon FRED
|
||||
event delivery. If unchanged, the CPU keeps using the current event
|
||||
stack. If higher, the CPU switches to a new event stack specified by
|
||||
the MSR of the new stack level, i.e., MSR_IA32_FRED_RSP[123].
|
||||
|
||||
Only execution of a FRED return instruction ERET[US], could lower the
|
||||
current stack level, causing the CPU to switch back to the stack it was
|
||||
on before a previous event delivery that promoted the stack level.
|
@ -15,3 +15,4 @@ x86_64 Support
|
||||
cpu-hotplug-spec
|
||||
machinecheck
|
||||
fsgs
|
||||
fred
|
||||
|
@ -77,10 +77,12 @@ wants a function to be executed asynchronously it has to set up a work
|
||||
item pointing to that function and queue that work item on a
|
||||
workqueue.
|
||||
|
||||
Special purpose threads, called worker threads, execute the functions
|
||||
off of the queue, one after the other. If no work is queued, the
|
||||
worker threads become idle. These worker threads are managed in so
|
||||
called worker-pools.
|
||||
A work item can be executed in either a thread or the BH (softirq) context.
|
||||
|
||||
For threaded workqueues, special purpose threads, called [k]workers, execute
|
||||
the functions off of the queue, one after the other. If no work is queued,
|
||||
the worker threads become idle. These worker threads are managed in
|
||||
worker-pools.
|
||||
|
||||
The cmwq design differentiates between the user-facing workqueues that
|
||||
subsystems and drivers queue work items on and the backend mechanism
|
||||
@ -91,6 +93,12 @@ for high priority ones, for each possible CPU and some extra
|
||||
worker-pools to serve work items queued on unbound workqueues - the
|
||||
number of these backing pools is dynamic.
|
||||
|
||||
BH workqueues use the same framework. However, as there can only be one
|
||||
concurrent execution context, there's no need to worry about concurrency.
|
||||
Each per-CPU BH worker pool contains only one pseudo worker which represents
|
||||
the BH execution context. A BH workqueue can be considered a convenience
|
||||
interface to softirq.
|
||||
|
||||
Subsystems and drivers can create and queue work items through special
|
||||
workqueue API functions as they see fit. They can influence some
|
||||
aspects of the way the work items are executed by setting flags on the
|
||||
@ -106,7 +114,7 @@ unless specifically overridden, a work item of a bound workqueue will
|
||||
be queued on the worklist of either normal or highpri worker-pool that
|
||||
is associated to the CPU the issuer is running on.
|
||||
|
||||
For any worker pool implementation, managing the concurrency level
|
||||
For any thread pool implementation, managing the concurrency level
|
||||
(how many execution contexts are active) is an important issue. cmwq
|
||||
tries to keep the concurrency at a minimal but sufficient level.
|
||||
Minimal to save resources and sufficient in that the system is used at
|
||||
@ -164,6 +172,17 @@ resources, scheduled and executed.
|
||||
``flags``
|
||||
---------
|
||||
|
||||
``WQ_BH``
|
||||
BH workqueues can be considered a convenience interface to softirq. BH
|
||||
workqueues are always per-CPU and all BH work items are executed in the
|
||||
queueing CPU's softirq context in the queueing order.
|
||||
|
||||
All BH workqueues must have 0 ``max_active`` and ``WQ_HIGHPRI`` is the
|
||||
only allowed additional flag.
|
||||
|
||||
BH work items cannot sleep. All other features such as delayed queueing,
|
||||
flushing and canceling are supported.
|
||||
|
||||
``WQ_UNBOUND``
|
||||
Work items queued to an unbound wq are served by the special
|
||||
worker-pools which host workers which are not bound to any
|
||||
@ -237,15 +256,11 @@ may queue at the same time. Unless there is a specific need for
|
||||
throttling the number of active work items, specifying '0' is
|
||||
recommended.
|
||||
|
||||
Some users depend on the strict execution ordering of ST wq. The
|
||||
combination of ``@max_active`` of 1 and ``WQ_UNBOUND`` used to
|
||||
achieve this behavior. Work items on such wq were always queued to the
|
||||
unbound worker-pools and only one work item could be active at any given
|
||||
time thus achieving the same ordering property as ST wq.
|
||||
|
||||
In the current implementation the above configuration only guarantees
|
||||
ST behavior within a given NUMA node. Instead ``alloc_ordered_workqueue()`` should
|
||||
be used to achieve system-wide ST behavior.
|
||||
Some users depend on strict execution ordering where only one work item
|
||||
is in flight at any given time and the work items are processed in
|
||||
queueing order. While the combination of ``@max_active`` of 1 and
|
||||
``WQ_UNBOUND`` used to achieve this behavior, this is no longer the
|
||||
case. Use ``alloc_ordered_queue()`` instead.
|
||||
|
||||
|
||||
Example Execution Scenarios
|
||||
|
@ -245,6 +245,10 @@ Contributing new tests (details)
|
||||
TEST_PROGS, TEST_GEN_PROGS mean it is the executable tested by
|
||||
default.
|
||||
|
||||
TEST_GEN_MODS_DIR should be used by tests that require modules to be built
|
||||
before the test starts. The variable will contain the name of the directory
|
||||
containing the modules.
|
||||
|
||||
TEST_CUSTOM_PROGS should be used by tests that require custom build
|
||||
rules and prevent common build rule use.
|
||||
|
||||
|
@ -36,6 +36,7 @@ properties:
|
||||
- amlogic,meson-a1-gpio-intc
|
||||
- amlogic,meson-s4-gpio-intc
|
||||
- amlogic,c3-gpio-intc
|
||||
- amlogic,t7-gpio-intc
|
||||
- const: amlogic,meson-gpio-intc
|
||||
|
||||
reg:
|
||||
|
@ -0,0 +1,61 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/interrupt-controller/starfive,jh8100-intc.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: StarFive External Interrupt Controller
|
||||
|
||||
description:
|
||||
StarFive SoC JH8100 contain a external interrupt controller. It can be used
|
||||
to handle high-level input interrupt signals. It also send the output
|
||||
interrupt signal to RISC-V PLIC.
|
||||
|
||||
maintainers:
|
||||
- Changhuang Liang <changhuang.liang@starfivetech.com>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: starfive,jh8100-intc
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
description: APB clock for the interrupt controller
|
||||
maxItems: 1
|
||||
|
||||
resets:
|
||||
description: APB reset for the interrupt controller
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
interrupt-controller: true
|
||||
|
||||
"#interrupt-cells":
|
||||
const: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- clocks
|
||||
- resets
|
||||
- interrupts
|
||||
- interrupt-controller
|
||||
- "#interrupt-cells"
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
interrupt-controller@12260000 {
|
||||
compatible = "starfive,jh8100-intc";
|
||||
reg = <0x12260000 0x10000>;
|
||||
clocks = <&syscrg_ne 76>;
|
||||
resets = <&syscrg_ne 13>;
|
||||
interrupts = <45>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <1>;
|
||||
};
|
@ -65,9 +65,11 @@ properties:
|
||||
|
||||
rx-internal-delay-ps:
|
||||
enum: [0, 1800]
|
||||
default: 0
|
||||
|
||||
tx-internal-delay-ps:
|
||||
enum: [0, 2000]
|
||||
default: 0
|
||||
|
||||
'#address-cells':
|
||||
const: 1
|
||||
|
@ -64,7 +64,7 @@ examples:
|
||||
#include <dt-bindings/clock/tegra30-car.h>
|
||||
#include <dt-bindings/soc/tegra-pmc.h>
|
||||
sound {
|
||||
compatible = "lge,tegra-audio-max98089-p895",
|
||||
compatible = "lg,tegra-audio-max98089-p895",
|
||||
"nvidia,tegra-audio-max98089";
|
||||
nvidia,model = "LG Optimus Vu MAX98089";
|
||||
|
||||
|
@ -545,7 +545,7 @@ In such scenario, dpll device input signal shall be also configurable
|
||||
to drive dpll with signal recovered from the PHY netdevice.
|
||||
This is done by exposing a pin to the netdevice - attaching pin to the
|
||||
netdevice itself with
|
||||
``netdev_dpll_pin_set(struct net_device *dev, struct dpll_pin *dpll_pin)``.
|
||||
``dpll_netdev_pin_set(struct net_device *dev, struct dpll_pin *dpll_pin)``.
|
||||
Exposed pin id handle ``DPLL_A_PIN_ID`` is then identifiable by the user
|
||||
as it is attached to rtnetlink respond to get ``RTM_NEWLINK`` command in
|
||||
nested attribute ``IFLA_DPLL_PIN``.
|
||||
|
@ -116,7 +116,7 @@ before and after the reference count increment. This pattern can be seen
|
||||
in get_file_rcu() and __files_get_rcu().
|
||||
|
||||
In addition, it isn't possible to access or check fields in struct file
|
||||
without first aqcuiring a reference on it under rcu lookup. Not doing
|
||||
without first acquiring a reference on it under rcu lookup. Not doing
|
||||
that was always very dodgy and it was only usable for non-pointer data
|
||||
in struct file. With SLAB_TYPESAFE_BY_RCU it is necessary that callers
|
||||
either first acquire a reference or they must hold the files_lock of the
|
||||
|
@ -98,7 +98,6 @@ Documentation for filesystem implementations.
|
||||
isofs
|
||||
nilfs2
|
||||
nfs/index
|
||||
ntfs
|
||||
ntfs3
|
||||
ocfs2
|
||||
ocfs2-online-filecheck
|
||||
|
@ -29,7 +29,7 @@ prototypes::
|
||||
char *(*d_dname)((struct dentry *dentry, char *buffer, int buflen);
|
||||
struct vfsmount *(*d_automount)(struct path *path);
|
||||
int (*d_manage)(const struct path *, bool);
|
||||
struct dentry *(*d_real)(struct dentry *, const struct inode *);
|
||||
struct dentry *(*d_real)(struct dentry *, enum d_real_type type);
|
||||
|
||||
locking rules:
|
||||
|
||||
|
@ -1,466 +0,0 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
================================
|
||||
The Linux NTFS filesystem driver
|
||||
================================
|
||||
|
||||
|
||||
.. Table of contents
|
||||
|
||||
- Overview
|
||||
- Web site
|
||||
- Features
|
||||
- Supported mount options
|
||||
- Known bugs and (mis-)features
|
||||
- Using NTFS volume and stripe sets
|
||||
- The Device-Mapper driver
|
||||
- The Software RAID / MD driver
|
||||
- Limitations when using the MD driver
|
||||
|
||||
|
||||
Overview
|
||||
========
|
||||
|
||||
Linux-NTFS comes with a number of user-space programs known as ntfsprogs.
|
||||
These include mkntfs, a full-featured ntfs filesystem format utility,
|
||||
ntfsundelete used for recovering files that were unintentionally deleted
|
||||
from an NTFS volume and ntfsresize which is used to resize an NTFS partition.
|
||||
See the web site for more information.
|
||||
|
||||
To mount an NTFS 1.2/3.x (Windows NT4/2000/XP/2003) volume, use the file
|
||||
system type 'ntfs'. The driver currently supports read-only mode (with no
|
||||
fault-tolerance, encryption or journalling) and very limited, but safe, write
|
||||
support.
|
||||
|
||||
For fault tolerance and raid support (i.e. volume and stripe sets), you can
|
||||
use the kernel's Software RAID / MD driver. See section "Using Software RAID
|
||||
with NTFS" for details.
|
||||
|
||||
|
||||
Web site
|
||||
========
|
||||
|
||||
There is plenty of additional information on the linux-ntfs web site
|
||||
at http://www.linux-ntfs.org/
|
||||
|
||||
The web site has a lot of additional information, such as a comprehensive
|
||||
FAQ, documentation on the NTFS on-disk format, information on the Linux-NTFS
|
||||
userspace utilities, etc.
|
||||
|
||||
|
||||
Features
|
||||
========
|
||||
|
||||
- This is a complete rewrite of the NTFS driver that used to be in the 2.4 and
|
||||
earlier kernels. This new driver implements NTFS read support and is
|
||||
functionally equivalent to the old ntfs driver and it also implements limited
|
||||
write support. The biggest limitation at present is that files/directories
|
||||
cannot be created or deleted. See below for the list of write features that
|
||||
are so far supported. Another limitation is that writing to compressed files
|
||||
is not implemented at all. Also, neither read nor write access to encrypted
|
||||
files is so far implemented.
|
||||
- The new driver has full support for sparse files on NTFS 3.x volumes which
|
||||
the old driver isn't happy with.
|
||||
- The new driver supports execution of binaries due to mmap() now being
|
||||
supported.
|
||||
- The new driver supports loopback mounting of files on NTFS which is used by
|
||||
some Linux distributions to enable the user to run Linux from an NTFS
|
||||
partition by creating a large file while in Windows and then loopback
|
||||
mounting the file while in Linux and creating a Linux filesystem on it that
|
||||
is used to install Linux on it.
|
||||
- A comparison of the two drivers using::
|
||||
|
||||
time find . -type f -exec md5sum "{}" \;
|
||||
|
||||
run three times in sequence with each driver (after a reboot) on a 1.4GiB
|
||||
NTFS partition, showed the new driver to be 20% faster in total time elapsed
|
||||
(from 9:43 minutes on average down to 7:53). The time spent in user space
|
||||
was unchanged but the time spent in the kernel was decreased by a factor of
|
||||
2.5 (from 85 CPU seconds down to 33).
|
||||
- The driver does not support short file names in general. For backwards
|
||||
compatibility, we implement access to files using their short file names if
|
||||
they exist. The driver will not create short file names however, and a
|
||||
rename will discard any existing short file name.
|
||||
- The new driver supports exporting of mounted NTFS volumes via NFS.
|
||||
- The new driver supports async io (aio).
|
||||
- The new driver supports fsync(2), fdatasync(2), and msync(2).
|
||||
- The new driver supports readv(2) and writev(2).
|
||||
- The new driver supports access time updates (including mtime and ctime).
|
||||
- The new driver supports truncate(2) and open(2) with O_TRUNC. But at present
|
||||
only very limited support for highly fragmented files, i.e. ones which have
|
||||
their data attribute split across multiple extents, is included. Another
|
||||
limitation is that at present truncate(2) will never create sparse files,
|
||||
since to mark a file sparse we need to modify the directory entry for the
|
||||
file and we do not implement directory modifications yet.
|
||||
- The new driver supports write(2) which can both overwrite existing data and
|
||||
extend the file size so that you can write beyond the existing data. Also,
|
||||
writing into sparse regions is supported and the holes are filled in with
|
||||
clusters. But at present only limited support for highly fragmented files,
|
||||
i.e. ones which have their data attribute split across multiple extents, is
|
||||
included. Another limitation is that write(2) will never create sparse
|
||||
files, since to mark a file sparse we need to modify the directory entry for
|
||||
the file and we do not implement directory modifications yet.
|
||||
|
||||
Supported mount options
|
||||
=======================
|
||||
|
||||
In addition to the generic mount options described by the manual page for the
|
||||
mount command (man 8 mount, also see man 5 fstab), the NTFS driver supports the
|
||||
following mount options:
|
||||
|
||||
======================= =======================================================
|
||||
iocharset=name Deprecated option. Still supported but please use
|
||||
nls=name in the future. See description for nls=name.
|
||||
|
||||
nls=name Character set to use when returning file names.
|
||||
Unlike VFAT, NTFS suppresses names that contain
|
||||
unconvertible characters. Note that most character
|
||||
sets contain insufficient characters to represent all
|
||||
possible Unicode characters that can exist on NTFS.
|
||||
To be sure you are not missing any files, you are
|
||||
advised to use nls=utf8 which is capable of
|
||||
representing all Unicode characters.
|
||||
|
||||
utf8=<bool> Option no longer supported. Currently mapped to
|
||||
nls=utf8 but please use nls=utf8 in the future and
|
||||
make sure utf8 is compiled either as module or into
|
||||
the kernel. See description for nls=name.
|
||||
|
||||
uid=
|
||||
gid=
|
||||
umask= Provide default owner, group, and access mode mask.
|
||||
These options work as documented in mount(8). By
|
||||
default, the files/directories are owned by root and
|
||||
he/she has read and write permissions, as well as
|
||||
browse permission for directories. No one else has any
|
||||
access permissions. I.e. the mode on all files is by
|
||||
default rw------- and for directories rwx------, a
|
||||
consequence of the default fmask=0177 and dmask=0077.
|
||||
Using a umask of zero will grant all permissions to
|
||||
everyone, i.e. all files and directories will have mode
|
||||
rwxrwxrwx.
|
||||
|
||||
fmask=
|
||||
dmask= Instead of specifying umask which applies both to
|
||||
files and directories, fmask applies only to files and
|
||||
dmask only to directories.
|
||||
|
||||
sloppy=<BOOL> If sloppy is specified, ignore unknown mount options.
|
||||
Otherwise the default behaviour is to abort mount if
|
||||
any unknown options are found.
|
||||
|
||||
show_sys_files=<BOOL> If show_sys_files is specified, show the system files
|
||||
in directory listings. Otherwise the default behaviour
|
||||
is to hide the system files.
|
||||
Note that even when show_sys_files is specified, "$MFT"
|
||||
will not be visible due to bugs/mis-features in glibc.
|
||||
Further, note that irrespective of show_sys_files, all
|
||||
files are accessible by name, i.e. you can always do
|
||||
"ls -l \$UpCase" for example to specifically show the
|
||||
system file containing the Unicode upcase table.
|
||||
|
||||
case_sensitive=<BOOL> If case_sensitive is specified, treat all file names as
|
||||
case sensitive and create file names in the POSIX
|
||||
namespace. Otherwise the default behaviour is to treat
|
||||
file names as case insensitive and to create file names
|
||||
in the WIN32/LONG name space. Note, the Linux NTFS
|
||||
driver will never create short file names and will
|
||||
remove them on rename/delete of the corresponding long
|
||||
file name.
|
||||
Note that files remain accessible via their short file
|
||||
name, if it exists. If case_sensitive, you will need
|
||||
to provide the correct case of the short file name.
|
||||
|
||||
disable_sparse=<BOOL> If disable_sparse is specified, creation of sparse
|
||||
regions, i.e. holes, inside files is disabled for the
|
||||
volume (for the duration of this mount only). By
|
||||
default, creation of sparse regions is enabled, which
|
||||
is consistent with the behaviour of traditional Unix
|
||||
filesystems.
|
||||
|
||||
errors=opt What to do when critical filesystem errors are found.
|
||||
Following values can be used for "opt":
|
||||
|
||||
======== =========================================
|
||||
continue DEFAULT, try to clean-up as much as
|
||||
possible, e.g. marking a corrupt inode as
|
||||
bad so it is no longer accessed, and then
|
||||
continue.
|
||||
recover At present only supported is recovery of
|
||||
the boot sector from the backup copy.
|
||||
If read-only mount, the recovery is done
|
||||
in memory only and not written to disk.
|
||||
======== =========================================
|
||||
|
||||
Note that the options are additive, i.e. specifying::
|
||||
|
||||
errors=continue,errors=recover
|
||||
|
||||
means the driver will attempt to recover and if that
|
||||
fails it will clean-up as much as possible and
|
||||
continue.
|
||||
|
||||
mft_zone_multiplier= Set the MFT zone multiplier for the volume (this
|
||||
setting is not persistent across mounts and can be
|
||||
changed from mount to mount but cannot be changed on
|
||||
remount). Values of 1 to 4 are allowed, 1 being the
|
||||
default. The MFT zone multiplier determines how much
|
||||
space is reserved for the MFT on the volume. If all
|
||||
other space is used up, then the MFT zone will be
|
||||
shrunk dynamically, so this has no impact on the
|
||||
amount of free space. However, it can have an impact
|
||||
on performance by affecting fragmentation of the MFT.
|
||||
In general use the default. If you have a lot of small
|
||||
files then use a higher value. The values have the
|
||||
following meaning:
|
||||
|
||||
===== =================================
|
||||
Value MFT zone size (% of volume size)
|
||||
===== =================================
|
||||
1 12.5%
|
||||
2 25%
|
||||
3 37.5%
|
||||
4 50%
|
||||
===== =================================
|
||||
|
||||
Note this option is irrelevant for read-only mounts.
|
||||
======================= =======================================================
|
||||
|
||||
|
||||
Known bugs and (mis-)features
|
||||
=============================
|
||||
|
||||
- The link count on each directory inode entry is set to 1, due to Linux not
|
||||
supporting directory hard links. This may well confuse some user space
|
||||
applications, since the directory names will have the same inode numbers.
|
||||
This also speeds up ntfs_read_inode() immensely. And we haven't found any
|
||||
problems with this approach so far. If you find a problem with this, please
|
||||
let us know.
|
||||
|
||||
|
||||
Please send bug reports/comments/feedback/abuse to the Linux-NTFS development
|
||||
list at sourceforge: linux-ntfs-dev@lists.sourceforge.net
|
||||
|
||||
|
||||
Using NTFS volume and stripe sets
|
||||
=================================
|
||||
|
||||
For support of volume and stripe sets, you can either use the kernel's
|
||||
Device-Mapper driver or the kernel's Software RAID / MD driver. The former is
|
||||
the recommended one to use for linear raid. But the latter is required for
|
||||
raid level 5. For striping and mirroring, either driver should work fine.
|
||||
|
||||
|
||||
The Device-Mapper driver
|
||||
------------------------
|
||||
|
||||
You will need to create a table of the components of the volume/stripe set and
|
||||
how they fit together and load this into the kernel using the dmsetup utility
|
||||
(see man 8 dmsetup).
|
||||
|
||||
Linear volume sets, i.e. linear raid, has been tested and works fine. Even
|
||||
though untested, there is no reason why stripe sets, i.e. raid level 0, and
|
||||
mirrors, i.e. raid level 1 should not work, too. Stripes with parity, i.e.
|
||||
raid level 5, unfortunately cannot work yet because the current version of the
|
||||
Device-Mapper driver does not support raid level 5. You may be able to use the
|
||||
Software RAID / MD driver for raid level 5, see the next section for details.
|
||||
|
||||
To create the table describing your volume you will need to know each of its
|
||||
components and their sizes in sectors, i.e. multiples of 512-byte blocks.
|
||||
|
||||
For NT4 fault tolerant volumes you can obtain the sizes using fdisk. So for
|
||||
example if one of your partitions is /dev/hda2 you would do::
|
||||
|
||||
$ fdisk -ul /dev/hda
|
||||
|
||||
Disk /dev/hda: 81.9 GB, 81964302336 bytes
|
||||
255 heads, 63 sectors/track, 9964 cylinders, total 160086528 sectors
|
||||
Units = sectors of 1 * 512 = 512 bytes
|
||||
|
||||
Device Boot Start End Blocks Id System
|
||||
/dev/hda1 * 63 4209029 2104483+ 83 Linux
|
||||
/dev/hda2 4209030 37768814 16779892+ 86 NTFS
|
||||
/dev/hda3 37768815 46170809 4200997+ 83 Linux
|
||||
|
||||
And you would know that /dev/hda2 has a size of 37768814 - 4209030 + 1 =
|
||||
33559785 sectors.
|
||||
|
||||
For Win2k and later dynamic disks, you can for example use the ldminfo utility
|
||||
which is part of the Linux LDM tools (the latest version at the time of
|
||||
writing is linux-ldm-0.0.8.tar.bz2). You can download it from:
|
||||
|
||||
http://www.linux-ntfs.org/
|
||||
|
||||
Simply extract the downloaded archive (tar xvjf linux-ldm-0.0.8.tar.bz2), go
|
||||
into it (cd linux-ldm-0.0.8) and change to the test directory (cd test). You
|
||||
will find the precompiled (i386) ldminfo utility there. NOTE: You will not be
|
||||
able to compile this yourself easily so use the binary version!
|
||||
|
||||
Then you would use ldminfo in dump mode to obtain the necessary information::
|
||||
|
||||
$ ./ldminfo --dump /dev/hda
|
||||
|
||||
This would dump the LDM database found on /dev/hda which describes all of your
|
||||
dynamic disks and all the volumes on them. At the bottom you will see the
|
||||
VOLUME DEFINITIONS section which is all you really need. You may need to look
|
||||
further above to determine which of the disks in the volume definitions is
|
||||
which device in Linux. Hint: Run ldminfo on each of your dynamic disks and
|
||||
look at the Disk Id close to the top of the output for each (the PRIVATE HEADER
|
||||
section). You can then find these Disk Ids in the VBLK DATABASE section in the
|
||||
<Disk> components where you will get the LDM Name for the disk that is found in
|
||||
the VOLUME DEFINITIONS section.
|
||||
|
||||
Note you will also need to enable the LDM driver in the Linux kernel. If your
|
||||
distribution did not enable it, you will need to recompile the kernel with it
|
||||
enabled. This will create the LDM partitions on each device at boot time. You
|
||||
would then use those devices (for /dev/hda they would be /dev/hda1, 2, 3, etc)
|
||||
in the Device-Mapper table.
|
||||
|
||||
You can also bypass using the LDM driver by using the main device (e.g.
|
||||
/dev/hda) and then using the offsets of the LDM partitions into this device as
|
||||
the "Start sector of device" when creating the table. Once again ldminfo would
|
||||
give you the correct information to do this.
|
||||
|
||||
Assuming you know all your devices and their sizes things are easy.
|
||||
|
||||
For a linear raid the table would look like this (note all values are in
|
||||
512-byte sectors)::
|
||||
|
||||
# Offset into Size of this Raid type Device Start sector
|
||||
# volume device of device
|
||||
0 1028161 linear /dev/hda1 0
|
||||
1028161 3903762 linear /dev/hdb2 0
|
||||
4931923 2103211 linear /dev/hdc1 0
|
||||
|
||||
For a striped volume, i.e. raid level 0, you will need to know the chunk size
|
||||
you used when creating the volume. Windows uses 64kiB as the default, so it
|
||||
will probably be this unless you changes the defaults when creating the array.
|
||||
|
||||
For a raid level 0 the table would look like this (note all values are in
|
||||
512-byte sectors)::
|
||||
|
||||
# Offset Size Raid Number Chunk 1st Start 2nd Start
|
||||
# into of the type of size Device in Device in
|
||||
# volume volume stripes device device
|
||||
0 2056320 striped 2 128 /dev/hda1 0 /dev/hdb1 0
|
||||
|
||||
If there are more than two devices, just add each of them to the end of the
|
||||
line.
|
||||
|
||||
Finally, for a mirrored volume, i.e. raid level 1, the table would look like
|
||||
this (note all values are in 512-byte sectors)::
|
||||
|
||||
# Ofs Size Raid Log Number Region Should Number Source Start Target Start
|
||||
# in of the type type of log size sync? of Device in Device in
|
||||
# vol volume params mirrors Device Device
|
||||
0 2056320 mirror core 2 16 nosync 2 /dev/hda1 0 /dev/hdb1 0
|
||||
|
||||
If you are mirroring to multiple devices you can specify further targets at the
|
||||
end of the line.
|
||||
|
||||
Note the "Should sync?" parameter "nosync" means that the two mirrors are
|
||||
already in sync which will be the case on a clean shutdown of Windows. If the
|
||||
mirrors are not clean, you can specify the "sync" option instead of "nosync"
|
||||
and the Device-Mapper driver will then copy the entirety of the "Source Device"
|
||||
to the "Target Device" or if you specified multiple target devices to all of
|
||||
them.
|
||||
|
||||
Once you have your table, save it in a file somewhere (e.g. /etc/ntfsvolume1),
|
||||
and hand it over to dmsetup to work with, like so::
|
||||
|
||||
$ dmsetup create myvolume1 /etc/ntfsvolume1
|
||||
|
||||
You can obviously replace "myvolume1" with whatever name you like.
|
||||
|
||||
If it all worked, you will now have the device /dev/device-mapper/myvolume1
|
||||
which you can then just use as an argument to the mount command as usual to
|
||||
mount the ntfs volume. For example::
|
||||
|
||||
$ mount -t ntfs -o ro /dev/device-mapper/myvolume1 /mnt/myvol1
|
||||
|
||||
(You need to create the directory /mnt/myvol1 first and of course you can use
|
||||
anything you like instead of /mnt/myvol1 as long as it is an existing
|
||||
directory.)
|
||||
|
||||
It is advisable to do the mount read-only to see if the volume has been setup
|
||||
correctly to avoid the possibility of causing damage to the data on the ntfs
|
||||
volume.
|
||||
|
||||
|
||||
The Software RAID / MD driver
|
||||
-----------------------------
|
||||
|
||||
An alternative to using the Device-Mapper driver is to use the kernel's
|
||||
Software RAID / MD driver. For which you need to set up your /etc/raidtab
|
||||
appropriately (see man 5 raidtab).
|
||||
|
||||
Linear volume sets, i.e. linear raid, as well as stripe sets, i.e. raid level
|
||||
0, have been tested and work fine (though see section "Limitations when using
|
||||
the MD driver with NTFS volumes" especially if you want to use linear raid).
|
||||
Even though untested, there is no reason why mirrors, i.e. raid level 1, and
|
||||
stripes with parity, i.e. raid level 5, should not work, too.
|
||||
|
||||
You have to use the "persistent-superblock 0" option for each raid-disk in the
|
||||
NTFS volume/stripe you are configuring in /etc/raidtab as the persistent
|
||||
superblock used by the MD driver would damage the NTFS volume.
|
||||
|
||||
Windows by default uses a stripe chunk size of 64k, so you probably want the
|
||||
"chunk-size 64k" option for each raid-disk, too.
|
||||
|
||||
For example, if you have a stripe set consisting of two partitions /dev/hda5
|
||||
and /dev/hdb1 your /etc/raidtab would look like this::
|
||||
|
||||
raiddev /dev/md0
|
||||
raid-level 0
|
||||
nr-raid-disks 2
|
||||
nr-spare-disks 0
|
||||
persistent-superblock 0
|
||||
chunk-size 64k
|
||||
device /dev/hda5
|
||||
raid-disk 0
|
||||
device /dev/hdb1
|
||||
raid-disk 1
|
||||
|
||||
For linear raid, just change the raid-level above to "raid-level linear", for
|
||||
mirrors, change it to "raid-level 1", and for stripe sets with parity, change
|
||||
it to "raid-level 5".
|
||||
|
||||
Note for stripe sets with parity you will also need to tell the MD driver
|
||||
which parity algorithm to use by specifying the option "parity-algorithm
|
||||
which", where you need to replace "which" with the name of the algorithm to
|
||||
use (see man 5 raidtab for available algorithms) and you will have to try the
|
||||
different available algorithms until you find one that works. Make sure you
|
||||
are working read-only when playing with this as you may damage your data
|
||||
otherwise. If you find which algorithm works please let us know (email the
|
||||
linux-ntfs developers list linux-ntfs-dev@lists.sourceforge.net or drop in on
|
||||
IRC in channel #ntfs on the irc.freenode.net network) so we can update this
|
||||
documentation.
|
||||
|
||||
Once the raidtab is setup, run for example raid0run -a to start all devices or
|
||||
raid0run /dev/md0 to start a particular md device, in this case /dev/md0.
|
||||
|
||||
Then just use the mount command as usual to mount the ntfs volume using for
|
||||
example::
|
||||
|
||||
mount -t ntfs -o ro /dev/md0 /mnt/myntfsvolume
|
||||
|
||||
It is advisable to do the mount read-only to see if the md volume has been
|
||||
setup correctly to avoid the possibility of causing damage to the data on the
|
||||
ntfs volume.
|
||||
|
||||
|
||||
Limitations when using the Software RAID / MD driver
|
||||
-----------------------------------------------------
|
||||
|
||||
Using the md driver will not work properly if any of your NTFS partitions have
|
||||
an odd number of sectors. This is especially important for linear raid as all
|
||||
data after the first partition with an odd number of sectors will be offset by
|
||||
one or more sectors so if you mount such a partition with write support you
|
||||
will cause massive damage to the data on the volume which will only become
|
||||
apparent when you try to use the volume again under Windows.
|
||||
|
||||
So when using linear raid, make sure that all your partitions have an even
|
||||
number of sectors BEFORE attempting to use it. You have been warned!
|
||||
|
||||
Even better is to simply use the Device-Mapper for linear raid and then you do
|
||||
not have this problem with odd numbers of sectors.
|
@ -1264,7 +1264,7 @@ defined:
|
||||
char *(*d_dname)(struct dentry *, char *, int);
|
||||
struct vfsmount *(*d_automount)(struct path *);
|
||||
int (*d_manage)(const struct path *, bool);
|
||||
struct dentry *(*d_real)(struct dentry *, const struct inode *);
|
||||
struct dentry *(*d_real)(struct dentry *, enum d_real_type type);
|
||||
};
|
||||
|
||||
``d_revalidate``
|
||||
@ -1419,16 +1419,14 @@ defined:
|
||||
the dentry being transited from.
|
||||
|
||||
``d_real``
|
||||
overlay/union type filesystems implement this method to return
|
||||
one of the underlying dentries hidden by the overlay. It is
|
||||
used in two different modes:
|
||||
overlay/union type filesystems implement this method to return one
|
||||
of the underlying dentries of a regular file hidden by the overlay.
|
||||
|
||||
Called from file_dentry() it returns the real dentry matching
|
||||
the inode argument. The real dentry may be from a lower layer
|
||||
already copied up, but still referenced from the file. This
|
||||
mode is selected with a non-NULL inode argument.
|
||||
The 'type' argument takes the values D_REAL_DATA or D_REAL_METADATA
|
||||
for returning the real underlying dentry that refers to the inode
|
||||
hosting the file's data or metadata respectively.
|
||||
|
||||
With NULL inode the topmost real underlying dentry is returned.
|
||||
For non-regular files, the 'dentry' argument is returned.
|
||||
|
||||
Each dentry has a pointer to its parent dentry, as well as a hash list
|
||||
of child dentries. Child dentries are basically like files in a
|
||||
|
@ -113,7 +113,6 @@ to ReStructured Text format, or are simply too old.
|
||||
:maxdepth: 1
|
||||
|
||||
staging/index
|
||||
RAS/ras
|
||||
|
||||
|
||||
Translations
|
||||
|
@ -1,9 +1,9 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0
|
||||
.. Copyright (C) 2023 Google LLC
|
||||
|
||||
=====================================================
|
||||
inet_connection_sock struct fast path usage breakdown
|
||||
=====================================================
|
||||
==========================================
|
||||
inet_sock struct fast path usage breakdown
|
||||
==========================================
|
||||
|
||||
Type Name fastpath_tx_access fastpath_rx_access comment
|
||||
..struct ..inet_sock
|
||||
|
@ -31,7 +31,7 @@ you probably needn't concern yourself with pcmciautils.
|
||||
====================== =============== ========================================
|
||||
GNU C 5.1 gcc --version
|
||||
Clang/LLVM (optional) 11.0.0 clang --version
|
||||
Rust (optional) 1.74.1 rustc --version
|
||||
Rust (optional) 1.76.0 rustc --version
|
||||
bindgen (optional) 0.65.1 bindgen --version
|
||||
GNU make 3.82 make --version
|
||||
bash 4.2 bash --version
|
||||
|
@ -304,13 +304,15 @@ following tag ordering scheme:
|
||||
|
||||
- Reported-by: ``Reporter <reporter@mail>``
|
||||
|
||||
- Closes: ``URL or Message-ID of the bug report this is fixing``
|
||||
|
||||
- Originally-by: ``Original author <original-author@mail>``
|
||||
|
||||
- Suggested-by: ``Suggester <suggester@mail>``
|
||||
|
||||
- Co-developed-by: ``Co-author <co-author@mail>``
|
||||
|
||||
Signed-off: ``Co-author <co-author@mail>``
|
||||
Signed-off-by: ``Co-author <co-author@mail>``
|
||||
|
||||
Note, that Co-developed-by and Signed-off-by of the co-author(s) must
|
||||
come in pairs.
|
||||
@ -478,7 +480,7 @@ Multi-line comments::
|
||||
* Larger multi-line comments should be split into paragraphs.
|
||||
*/
|
||||
|
||||
No tail comments:
|
||||
No tail comments (see below):
|
||||
|
||||
Please refrain from using tail comments. Tail comments disturb the
|
||||
reading flow in almost all contexts, but especially in code::
|
||||
@ -499,6 +501,34 @@ No tail comments:
|
||||
/* This magic initialization needs a comment. Maybe not? */
|
||||
seed = MAGIC_CONSTANT;
|
||||
|
||||
Use C++ style, tail comments when documenting structs in headers to
|
||||
achieve a more compact layout and better readability::
|
||||
|
||||
// eax
|
||||
u32 x2apic_shift : 5, // Number of bits to shift APIC ID right
|
||||
// for the topology ID at the next level
|
||||
: 27; // Reserved
|
||||
// ebx
|
||||
u32 num_processors : 16, // Number of processors at current level
|
||||
: 16; // Reserved
|
||||
|
||||
versus::
|
||||
|
||||
/* eax */
|
||||
/*
|
||||
* Number of bits to shift APIC ID right for the topology ID
|
||||
* at the next level
|
||||
*/
|
||||
u32 x2apic_shift : 5,
|
||||
/* Reserved */
|
||||
: 27;
|
||||
|
||||
/* ebx */
|
||||
/* Number of processors at current level */
|
||||
u32 num_processors : 16,
|
||||
/* Reserved */
|
||||
: 16;
|
||||
|
||||
Comment the important things:
|
||||
|
||||
Comments should be added where the operation is not obvious. Documenting
|
||||
|
@ -77,27 +77,3 @@ configuration:
|
||||
#[cfg(CONFIG_X="y")] // Enabled as a built-in (`y`)
|
||||
#[cfg(CONFIG_X="m")] // Enabled as a module (`m`)
|
||||
#[cfg(not(CONFIG_X))] // Disabled
|
||||
|
||||
|
||||
Testing
|
||||
-------
|
||||
|
||||
There are the tests that come from the examples in the Rust documentation
|
||||
and get transformed into KUnit tests. These can be run via KUnit. For example
|
||||
via ``kunit_tool`` (``kunit.py``) on the command line::
|
||||
|
||||
./tools/testing/kunit/kunit.py run --make_options LLVM=1 --arch x86_64 --kconfig_add CONFIG_RUST=y
|
||||
|
||||
Alternatively, KUnit can run them as kernel built-in at boot. Refer to
|
||||
Documentation/dev-tools/kunit/index.rst for the general KUnit documentation
|
||||
and Documentation/dev-tools/kunit/architecture.rst for the details of kernel
|
||||
built-in vs. command line testing.
|
||||
|
||||
Additionally, there are the ``#[test]`` tests. These can be run using
|
||||
the ``rusttest`` Make target::
|
||||
|
||||
make LLVM=1 rusttest
|
||||
|
||||
This requires the kernel ``.config`` and downloads external repositories.
|
||||
It runs the ``#[test]`` tests on the host (currently) and thus is fairly
|
||||
limited in what these tests can test.
|
||||
|
@ -40,6 +40,7 @@ configurations.
|
||||
general-information
|
||||
coding-guidelines
|
||||
arch-support
|
||||
testing
|
||||
|
||||
.. only:: subproject and html
|
||||
|
||||
|
135
Documentation/rust/testing.rst
Normal file
135
Documentation/rust/testing.rst
Normal file
@ -0,0 +1,135 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
Testing
|
||||
=======
|
||||
|
||||
This document contains useful information how to test the Rust code in the
|
||||
kernel.
|
||||
|
||||
There are two sorts of tests:
|
||||
|
||||
- The KUnit tests.
|
||||
- The ``#[test]`` tests.
|
||||
|
||||
The KUnit tests
|
||||
---------------
|
||||
|
||||
These are the tests that come from the examples in the Rust documentation. They
|
||||
get transformed into KUnit tests.
|
||||
|
||||
Usage
|
||||
*****
|
||||
|
||||
These tests can be run via KUnit. For example via ``kunit_tool`` (``kunit.py``)
|
||||
on the command line::
|
||||
|
||||
./tools/testing/kunit/kunit.py run --make_options LLVM=1 --arch x86_64 --kconfig_add CONFIG_RUST=y
|
||||
|
||||
Alternatively, KUnit can run them as kernel built-in at boot. Refer to
|
||||
Documentation/dev-tools/kunit/index.rst for the general KUnit documentation
|
||||
and Documentation/dev-tools/kunit/architecture.rst for the details of kernel
|
||||
built-in vs. command line testing.
|
||||
|
||||
To use these KUnit doctests, the following must be enabled::
|
||||
|
||||
CONFIG_KUNIT
|
||||
Kernel hacking -> Kernel Testing and Coverage -> KUnit - Enable support for unit tests
|
||||
CONFIG_RUST_KERNEL_DOCTESTS
|
||||
Kernel hacking -> Rust hacking -> Doctests for the `kernel` crate
|
||||
|
||||
in the kernel config system.
|
||||
|
||||
KUnit tests are documentation tests
|
||||
***********************************
|
||||
|
||||
These documentation tests are typically examples of usage of any item (e.g.
|
||||
function, struct, module...).
|
||||
|
||||
They are very convenient because they are just written alongside the
|
||||
documentation. For instance:
|
||||
|
||||
.. code-block:: rust
|
||||
|
||||
/// Sums two numbers.
|
||||
///
|
||||
/// ```
|
||||
/// assert_eq!(mymod::f(10, 20), 30);
|
||||
/// ```
|
||||
pub fn f(a: i32, b: i32) -> i32 {
|
||||
a + b
|
||||
}
|
||||
|
||||
In userspace, the tests are collected and run via ``rustdoc``. Using the tool
|
||||
as-is would be useful already, since it allows verifying that examples compile
|
||||
(thus enforcing they are kept in sync with the code they document) and as well
|
||||
as running those that do not depend on in-kernel APIs.
|
||||
|
||||
For the kernel, however, these tests get transformed into KUnit test suites.
|
||||
This means that doctests get compiled as Rust kernel objects, allowing them to
|
||||
run against a built kernel.
|
||||
|
||||
A benefit of this KUnit integration is that Rust doctests get to reuse existing
|
||||
testing facilities. For instance, the kernel log would look like::
|
||||
|
||||
KTAP version 1
|
||||
1..1
|
||||
KTAP version 1
|
||||
# Subtest: rust_doctests_kernel
|
||||
1..59
|
||||
# rust_doctest_kernel_build_assert_rs_0.location: rust/kernel/build_assert.rs:13
|
||||
ok 1 rust_doctest_kernel_build_assert_rs_0
|
||||
# rust_doctest_kernel_build_assert_rs_1.location: rust/kernel/build_assert.rs:56
|
||||
ok 2 rust_doctest_kernel_build_assert_rs_1
|
||||
# rust_doctest_kernel_init_rs_0.location: rust/kernel/init.rs:122
|
||||
ok 3 rust_doctest_kernel_init_rs_0
|
||||
...
|
||||
# rust_doctest_kernel_types_rs_2.location: rust/kernel/types.rs:150
|
||||
ok 59 rust_doctest_kernel_types_rs_2
|
||||
# rust_doctests_kernel: pass:59 fail:0 skip:0 total:59
|
||||
# Totals: pass:59 fail:0 skip:0 total:59
|
||||
ok 1 rust_doctests_kernel
|
||||
|
||||
Tests using the `? <https://doc.rust-lang.org/reference/expressions/operator-expr.html#the-question-mark-operator>`_
|
||||
operator are also supported as usual, e.g.:
|
||||
|
||||
.. code-block:: rust
|
||||
|
||||
/// ```
|
||||
/// # use kernel::{spawn_work_item, workqueue};
|
||||
/// spawn_work_item!(workqueue::system(), || pr_info!("x"))?;
|
||||
/// # Ok::<(), Error>(())
|
||||
/// ```
|
||||
|
||||
The tests are also compiled with Clippy under ``CLIPPY=1``, just like normal
|
||||
code, thus also benefitting from extra linting.
|
||||
|
||||
In order for developers to easily see which line of doctest code caused a
|
||||
failure, a KTAP diagnostic line is printed to the log. This contains the
|
||||
location (file and line) of the original test (i.e. instead of the location in
|
||||
the generated Rust file)::
|
||||
|
||||
# rust_doctest_kernel_types_rs_2.location: rust/kernel/types.rs:150
|
||||
|
||||
Rust tests appear to assert using the usual ``assert!`` and ``assert_eq!``
|
||||
macros from the Rust standard library (``core``). We provide a custom version
|
||||
that forwards the call to KUnit instead. Importantly, these macros do not
|
||||
require passing context, unlike those for KUnit testing (i.e.
|
||||
``struct kunit *``). This makes them easier to use, and readers of the
|
||||
documentation do not need to care about which testing framework is used. In
|
||||
addition, it may allow us to test third-party code more easily in the future.
|
||||
|
||||
A current limitation is that KUnit does not support assertions in other tasks.
|
||||
Thus, we presently simply print an error to the kernel log if an assertion
|
||||
actually failed. Additionally, doctests are not run for nonpublic functions.
|
||||
|
||||
The ``#[test]`` tests
|
||||
---------------------
|
||||
|
||||
Additionally, there are the ``#[test]`` tests. These can be run using the
|
||||
``rusttest`` Make target::
|
||||
|
||||
make LLVM=1 rusttest
|
||||
|
||||
This requires the kernel ``.config`` and downloads external repositories. It
|
||||
runs the ``#[test]`` tests on the host (currently) and thus is fairly limited in
|
||||
what these tests can test.
|
@ -82,8 +82,9 @@ Code Seq# Include File Comments
|
||||
0x10 00-0F drivers/char/s390/vmcp.h
|
||||
0x10 10-1F arch/s390/include/uapi/sclp_ctl.h
|
||||
0x10 20-2F arch/s390/include/uapi/asm/hypfs.h
|
||||
0x12 all linux/fs.h
|
||||
0x12 all linux/fs.h BLK* ioctls
|
||||
linux/blkpg.h
|
||||
0x15 all linux/fs.h FS_IOC_* ioctls
|
||||
0x1b all InfiniBand Subsystem
|
||||
<http://infiniband.sourceforge.net/>
|
||||
0x20 all drivers/cdrom/cm206.h
|
||||
|
@ -10,3 +10,4 @@ Hyper-V Enlightenments
|
||||
overview
|
||||
vmbus
|
||||
clocks
|
||||
vpci
|
||||
|
316
Documentation/virt/hyperv/vpci.rst
Normal file
316
Documentation/virt/hyperv/vpci.rst
Normal file
@ -0,0 +1,316 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
PCI pass-thru devices
|
||||
=========================
|
||||
In a Hyper-V guest VM, PCI pass-thru devices (also called
|
||||
virtual PCI devices, or vPCI devices) are physical PCI devices
|
||||
that are mapped directly into the VM's physical address space.
|
||||
Guest device drivers can interact directly with the hardware
|
||||
without intermediation by the host hypervisor. This approach
|
||||
provides higher bandwidth access to the device with lower
|
||||
latency, compared with devices that are virtualized by the
|
||||
hypervisor. The device should appear to the guest just as it
|
||||
would when running on bare metal, so no changes are required
|
||||
to the Linux device drivers for the device.
|
||||
|
||||
Hyper-V terminology for vPCI devices is "Discrete Device
|
||||
Assignment" (DDA). Public documentation for Hyper-V DDA is
|
||||
available here: `DDA`_
|
||||
|
||||
.. _DDA: https://learn.microsoft.com/en-us/windows-server/virtualization/hyper-v/plan/plan-for-deploying-devices-using-discrete-device-assignment
|
||||
|
||||
DDA is typically used for storage controllers, such as NVMe,
|
||||
and for GPUs. A similar mechanism for NICs is called SR-IOV
|
||||
and produces the same benefits by allowing a guest device
|
||||
driver to interact directly with the hardware. See Hyper-V
|
||||
public documentation here: `SR-IOV`_
|
||||
|
||||
.. _SR-IOV: https://learn.microsoft.com/en-us/windows-hardware/drivers/network/overview-of-single-root-i-o-virtualization--sr-iov-
|
||||
|
||||
This discussion of vPCI devices includes DDA and SR-IOV
|
||||
devices.
|
||||
|
||||
Device Presentation
|
||||
-------------------
|
||||
Hyper-V provides full PCI functionality for a vPCI device when
|
||||
it is operating, so the Linux device driver for the device can
|
||||
be used unchanged, provided it uses the correct Linux kernel
|
||||
APIs for accessing PCI config space and for other integration
|
||||
with Linux. But the initial detection of the PCI device and
|
||||
its integration with the Linux PCI subsystem must use Hyper-V
|
||||
specific mechanisms. Consequently, vPCI devices on Hyper-V
|
||||
have a dual identity. They are initially presented to Linux
|
||||
guests as VMBus devices via the standard VMBus "offer"
|
||||
mechanism, so they have a VMBus identity and appear under
|
||||
/sys/bus/vmbus/devices. The VMBus vPCI driver in Linux at
|
||||
drivers/pci/controller/pci-hyperv.c handles a newly introduced
|
||||
vPCI device by fabricating a PCI bus topology and creating all
|
||||
the normal PCI device data structures in Linux that would
|
||||
exist if the PCI device were discovered via ACPI on a bare-
|
||||
metal system. Once those data structures are set up, the
|
||||
device also has a normal PCI identity in Linux, and the normal
|
||||
Linux device driver for the vPCI device can function as if it
|
||||
were running in Linux on bare-metal. Because vPCI devices are
|
||||
presented dynamically through the VMBus offer mechanism, they
|
||||
do not appear in the Linux guest's ACPI tables. vPCI devices
|
||||
may be added to a VM or removed from a VM at any time during
|
||||
the life of the VM, and not just during initial boot.
|
||||
|
||||
With this approach, the vPCI device is a VMBus device and a
|
||||
PCI device at the same time. In response to the VMBus offer
|
||||
message, the hv_pci_probe() function runs and establishes a
|
||||
VMBus connection to the vPCI VSP on the Hyper-V host. That
|
||||
connection has a single VMBus channel. The channel is used to
|
||||
exchange messages with the vPCI VSP for the purpose of setting
|
||||
up and configuring the vPCI device in Linux. Once the device
|
||||
is fully configured in Linux as a PCI device, the VMBus
|
||||
channel is used only if Linux changes the vCPU to be interrupted
|
||||
in the guest, or if the vPCI device is removed from
|
||||
the VM while the VM is running. The ongoing operation of the
|
||||
device happens directly between the Linux device driver for
|
||||
the device and the hardware, with VMBus and the VMBus channel
|
||||
playing no role.
|
||||
|
||||
PCI Device Setup
|
||||
----------------
|
||||
PCI device setup follows a sequence that Hyper-V originally
|
||||
created for Windows guests, and that can be ill-suited for
|
||||
Linux guests due to differences in the overall structure of
|
||||
the Linux PCI subsystem compared with Windows. Nonetheless,
|
||||
with a bit of hackery in the Hyper-V virtual PCI driver for
|
||||
Linux, the virtual PCI device is setup in Linux so that
|
||||
generic Linux PCI subsystem code and the Linux driver for the
|
||||
device "just work".
|
||||
|
||||
Each vPCI device is set up in Linux to be in its own PCI
|
||||
domain with a host bridge. The PCI domainID is derived from
|
||||
bytes 4 and 5 of the instance GUID assigned to the VMBus vPCI
|
||||
device. The Hyper-V host does not guarantee that these bytes
|
||||
are unique, so hv_pci_probe() has an algorithm to resolve
|
||||
collisions. The collision resolution is intended to be stable
|
||||
across reboots of the same VM so that the PCI domainIDs don't
|
||||
change, as the domainID appears in the user space
|
||||
configuration of some devices.
|
||||
|
||||
hv_pci_probe() allocates a guest MMIO range to be used as PCI
|
||||
config space for the device. This MMIO range is communicated
|
||||
to the Hyper-V host over the VMBus channel as part of telling
|
||||
the host that the device is ready to enter d0. See
|
||||
hv_pci_enter_d0(). When the guest subsequently accesses this
|
||||
MMIO range, the Hyper-V host intercepts the accesses and maps
|
||||
them to the physical device PCI config space.
|
||||
|
||||
hv_pci_probe() also gets BAR information for the device from
|
||||
the Hyper-V host, and uses this information to allocate MMIO
|
||||
space for the BARs. That MMIO space is then setup to be
|
||||
associated with the host bridge so that it works when generic
|
||||
PCI subsystem code in Linux processes the BARs.
|
||||
|
||||
Finally, hv_pci_probe() creates the root PCI bus. At this
|
||||
point the Hyper-V virtual PCI driver hackery is done, and the
|
||||
normal Linux PCI machinery for scanning the root bus works to
|
||||
detect the device, to perform driver matching, and to
|
||||
initialize the driver and device.
|
||||
|
||||
PCI Device Removal
|
||||
------------------
|
||||
A Hyper-V host may initiate removal of a vPCI device from a
|
||||
guest VM at any time during the life of the VM. The removal
|
||||
is instigated by an admin action taken on the Hyper-V host and
|
||||
is not under the control of the guest OS.
|
||||
|
||||
A guest VM is notified of the removal by an unsolicited
|
||||
"Eject" message sent from the host to the guest over the VMBus
|
||||
channel associated with the vPCI device. Upon receipt of such
|
||||
a message, the Hyper-V virtual PCI driver in Linux
|
||||
asynchronously invokes Linux kernel PCI subsystem calls to
|
||||
shutdown and remove the device. When those calls are
|
||||
complete, an "Ejection Complete" message is sent back to
|
||||
Hyper-V over the VMBus channel indicating that the device has
|
||||
been removed. At this point, Hyper-V sends a VMBus rescind
|
||||
message to the Linux guest, which the VMBus driver in Linux
|
||||
processes by removing the VMBus identity for the device. Once
|
||||
that processing is complete, all vestiges of the device having
|
||||
been present are gone from the Linux kernel. The rescind
|
||||
message also indicates to the guest that Hyper-V has stopped
|
||||
providing support for the vPCI device in the guest. If the
|
||||
guest were to attempt to access that device's MMIO space, it
|
||||
would be an invalid reference. Hypercalls affecting the device
|
||||
return errors, and any further messages sent in the VMBus
|
||||
channel are ignored.
|
||||
|
||||
After sending the Eject message, Hyper-V allows the guest VM
|
||||
60 seconds to cleanly shutdown the device and respond with
|
||||
Ejection Complete before sending the VMBus rescind
|
||||
message. If for any reason the Eject steps don't complete
|
||||
within the allowed 60 seconds, the Hyper-V host forcibly
|
||||
performs the rescind steps, which will likely result in
|
||||
cascading errors in the guest because the device is now no
|
||||
longer present from the guest standpoint and accessing the
|
||||
device MMIO space will fail.
|
||||
|
||||
Because ejection is asynchronous and can happen at any point
|
||||
during the guest VM lifecycle, proper synchronization in the
|
||||
Hyper-V virtual PCI driver is very tricky. Ejection has been
|
||||
observed even before a newly offered vPCI device has been
|
||||
fully setup. The Hyper-V virtual PCI driver has been updated
|
||||
several times over the years to fix race conditions when
|
||||
ejections happen at inopportune times. Care must be taken when
|
||||
modifying this code to prevent re-introducing such problems.
|
||||
See comments in the code.
|
||||
|
||||
Interrupt Assignment
|
||||
--------------------
|
||||
The Hyper-V virtual PCI driver supports vPCI devices using
|
||||
MSI, multi-MSI, or MSI-X. Assigning the guest vCPU that will
|
||||
receive the interrupt for a particular MSI or MSI-X message is
|
||||
complex because of the way the Linux setup of IRQs maps onto
|
||||
the Hyper-V interfaces. For the single-MSI and MSI-X cases,
|
||||
Linux calls hv_compse_msi_msg() twice, with the first call
|
||||
containing a dummy vCPU and the second call containing the
|
||||
real vCPU. Furthermore, hv_irq_unmask() is finally called
|
||||
(on x86) or the GICD registers are set (on arm64) to specify
|
||||
the real vCPU again. Each of these three calls interact
|
||||
with Hyper-V, which must decide which physical CPU should
|
||||
receive the interrupt before it is forwarded to the guest VM.
|
||||
Unfortunately, the Hyper-V decision-making process is a bit
|
||||
limited, and can result in concentrating the physical
|
||||
interrupts on a single CPU, causing a performance bottleneck.
|
||||
See details about how this is resolved in the extensive
|
||||
comment above the function hv_compose_msi_req_get_cpu().
|
||||
|
||||
The Hyper-V virtual PCI driver implements the
|
||||
irq_chip.irq_compose_msi_msg function as hv_compose_msi_msg().
|
||||
Unfortunately, on Hyper-V the implementation requires sending
|
||||
a VMBus message to the Hyper-V host and awaiting an interrupt
|
||||
indicating receipt of a reply message. Since
|
||||
irq_chip.irq_compose_msi_msg can be called with IRQ locks
|
||||
held, it doesn't work to do the normal sleep until awakened by
|
||||
the interrupt. Instead hv_compose_msi_msg() must send the
|
||||
VMBus message, and then poll for the completion message. As
|
||||
further complexity, the vPCI device could be ejected/rescinded
|
||||
while the polling is in progress, so this scenario must be
|
||||
detected as well. See comments in the code regarding this
|
||||
very tricky area.
|
||||
|
||||
Most of the code in the Hyper-V virtual PCI driver (pci-
|
||||
hyperv.c) applies to Hyper-V and Linux guests running on x86
|
||||
and on arm64 architectures. But there are differences in how
|
||||
interrupt assignments are managed. On x86, the Hyper-V
|
||||
virtual PCI driver in the guest must make a hypercall to tell
|
||||
Hyper-V which guest vCPU should be interrupted by each
|
||||
MSI/MSI-X interrupt, and the x86 interrupt vector number that
|
||||
the x86_vector IRQ domain has picked for the interrupt. This
|
||||
hypercall is made by hv_arch_irq_unmask(). On arm64, the
|
||||
Hyper-V virtual PCI driver manages the allocation of an SPI
|
||||
for each MSI/MSI-X interrupt. The Hyper-V virtual PCI driver
|
||||
stores the allocated SPI in the architectural GICD registers,
|
||||
which Hyper-V emulates, so no hypercall is necessary as with
|
||||
x86. Hyper-V does not support using LPIs for vPCI devices in
|
||||
arm64 guest VMs because it does not emulate a GICv3 ITS.
|
||||
|
||||
The Hyper-V virtual PCI driver in Linux supports vPCI devices
|
||||
whose drivers create managed or unmanaged Linux IRQs. If the
|
||||
smp_affinity for an unmanaged IRQ is updated via the /proc/irq
|
||||
interface, the Hyper-V virtual PCI driver is called to tell
|
||||
the Hyper-V host to change the interrupt targeting and
|
||||
everything works properly. However, on x86 if the x86_vector
|
||||
IRQ domain needs to reassign an interrupt vector due to
|
||||
running out of vectors on a CPU, there's no path to inform the
|
||||
Hyper-V host of the change, and things break. Fortunately,
|
||||
guest VMs operate in a constrained device environment where
|
||||
using all the vectors on a CPU doesn't happen. Since such a
|
||||
problem is only a theoretical concern rather than a practical
|
||||
concern, it has been left unaddressed.
|
||||
|
||||
DMA
|
||||
---
|
||||
By default, Hyper-V pins all guest VM memory in the host
|
||||
when the VM is created, and programs the physical IOMMU to
|
||||
allow the VM to have DMA access to all its memory. Hence
|
||||
it is safe to assign PCI devices to the VM, and allow the
|
||||
guest operating system to program the DMA transfers. The
|
||||
physical IOMMU prevents a malicious guest from initiating
|
||||
DMA to memory belonging to the host or to other VMs on the
|
||||
host. From the Linux guest standpoint, such DMA transfers
|
||||
are in "direct" mode since Hyper-V does not provide a virtual
|
||||
IOMMU in the guest.
|
||||
|
||||
Hyper-V assumes that physical PCI devices always perform
|
||||
cache-coherent DMA. When running on x86, this behavior is
|
||||
required by the architecture. When running on arm64, the
|
||||
architecture allows for both cache-coherent and
|
||||
non-cache-coherent devices, with the behavior of each device
|
||||
specified in the ACPI DSDT. But when a PCI device is assigned
|
||||
to a guest VM, that device does not appear in the DSDT, so the
|
||||
Hyper-V VMBus driver propagates cache-coherency information
|
||||
from the VMBus node in the ACPI DSDT to all VMBus devices,
|
||||
including vPCI devices (since they have a dual identity as a VMBus
|
||||
device and as a PCI device). See vmbus_dma_configure().
|
||||
Current Hyper-V versions always indicate that the VMBus is
|
||||
cache coherent, so vPCI devices on arm64 always get marked as
|
||||
cache coherent and the CPU does not perform any sync
|
||||
operations as part of dma_map/unmap_*() calls.
|
||||
|
||||
vPCI protocol versions
|
||||
----------------------
|
||||
As previously described, during vPCI device setup and teardown
|
||||
messages are passed over a VMBus channel between the Hyper-V
|
||||
host and the Hyper-v vPCI driver in the Linux guest. Some
|
||||
messages have been revised in newer versions of Hyper-V, so
|
||||
the guest and host must agree on the vPCI protocol version to
|
||||
be used. The version is negotiated when communication over
|
||||
the VMBus channel is first established. See
|
||||
hv_pci_protocol_negotiation(). Newer versions of the protocol
|
||||
extend support to VMs with more than 64 vCPUs, and provide
|
||||
additional information about the vPCI device, such as the
|
||||
guest virtual NUMA node to which it is most closely affined in
|
||||
the underlying hardware.
|
||||
|
||||
Guest NUMA node affinity
|
||||
------------------------
|
||||
When the vPCI protocol version provides it, the guest NUMA
|
||||
node affinity of the vPCI device is stored as part of the Linux
|
||||
device information for subsequent use by the Linux driver. See
|
||||
hv_pci_assign_numa_node(). If the negotiated protocol version
|
||||
does not support the host providing NUMA affinity information,
|
||||
the Linux guest defaults the device NUMA node to 0. But even
|
||||
when the negotiated protocol version includes NUMA affinity
|
||||
information, the ability of the host to provide such
|
||||
information depends on certain host configuration options. If
|
||||
the guest receives NUMA node value "0", it could mean NUMA
|
||||
node 0, or it could mean "no information is available".
|
||||
Unfortunately it is not possible to distinguish the two cases
|
||||
from the guest side.
|
||||
|
||||
PCI config space access in a CoCo VM
|
||||
------------------------------------
|
||||
Linux PCI device drivers access PCI config space using a
|
||||
standard set of functions provided by the Linux PCI subsystem.
|
||||
In Hyper-V guests these standard functions map to functions
|
||||
hv_pcifront_read_config() and hv_pcifront_write_config()
|
||||
in the Hyper-V virtual PCI driver. In normal VMs,
|
||||
these hv_pcifront_*() functions directly access the PCI config
|
||||
space, and the accesses trap to Hyper-V to be handled.
|
||||
But in CoCo VMs, memory encryption prevents Hyper-V
|
||||
from reading the guest instruction stream to emulate the
|
||||
access, so the hv_pcifront_*() functions must invoke
|
||||
hypercalls with explicit arguments describing the access to be
|
||||
made.
|
||||
|
||||
Config Block back-channel
|
||||
-------------------------
|
||||
The Hyper-V host and Hyper-V virtual PCI driver in Linux
|
||||
together implement a non-standard back-channel communication
|
||||
path between the host and guest. The back-channel path uses
|
||||
messages sent over the VMBus channel associated with the vPCI
|
||||
device. The functions hyperv_read_cfg_blk() and
|
||||
hyperv_write_cfg_blk() are the primary interfaces provided to
|
||||
other parts of the Linux kernel. As of this writing, these
|
||||
interfaces are used only by the Mellanox mlx5 driver to pass
|
||||
diagnostic data to a Hyper-V host running in the Azure public
|
||||
cloud. The functions hyperv_read_cfg_blk() and
|
||||
hyperv_write_cfg_blk() are implemented in a separate module
|
||||
(pci-hyperv-intf.c, under CONFIG_PCI_HYPERV_INTERFACE) that
|
||||
effectively stubs them out when running in non-Hyper-V
|
||||
environments.
|
@ -8791,6 +8791,11 @@ means the VM type with value @n is supported. Possible values of @n are::
|
||||
#define KVM_X86_DEFAULT_VM 0
|
||||
#define KVM_X86_SW_PROTECTED_VM 1
|
||||
|
||||
Note, KVM_X86_SW_PROTECTED_VM is currently only for development and testing.
|
||||
Do not use KVM_X86_SW_PROTECTED_VM for "real" VMs, and especially not in
|
||||
production. The behavior and effective ABI for software-protected VMs is
|
||||
unstable.
|
||||
|
||||
9. Known KVM API problems
|
||||
=========================
|
||||
|
||||
|
120
MAINTAINERS
120
MAINTAINERS
@ -897,6 +897,12 @@ Q: https://patchwork.kernel.org/project/linux-rdma/list/
|
||||
F: drivers/infiniband/hw/efa/
|
||||
F: include/uapi/rdma/efa-abi.h
|
||||
|
||||
AMD ADDRESS TRANSLATION LIBRARY (ATL)
|
||||
M: Yazen Ghannam <Yazen.Ghannam@amd.com>
|
||||
L: linux-edac@vger.kernel.org
|
||||
S: Supported
|
||||
F: drivers/ras/amd/atl/*
|
||||
|
||||
AMD AXI W1 DRIVER
|
||||
M: Kris Chaplin <kris.chaplin@amd.com>
|
||||
R: Thomas Delev <thomas.delev@amd.com>
|
||||
@ -1395,6 +1401,7 @@ F: drivers/hwmon/max31760.c
|
||||
|
||||
ANALOGBITS PLL LIBRARIES
|
||||
M: Paul Walmsley <paul.walmsley@sifive.com>
|
||||
M: Samuel Holland <samuel.holland@sifive.com>
|
||||
S: Supported
|
||||
F: drivers/clk/analogbits/*
|
||||
F: include/linux/clk/analogbits*
|
||||
@ -2156,7 +2163,7 @@ M: Shawn Guo <shawnguo@kernel.org>
|
||||
M: Sascha Hauer <s.hauer@pengutronix.de>
|
||||
R: Pengutronix Kernel Team <kernel@pengutronix.de>
|
||||
R: Fabio Estevam <festevam@gmail.com>
|
||||
R: NXP Linux Team <linux-imx@nxp.com>
|
||||
L: imx@lists.linux.dev
|
||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
S: Maintained
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git
|
||||
@ -7582,7 +7589,6 @@ R: Robert Richter <rric@kernel.org>
|
||||
L: linux-edac@vger.kernel.org
|
||||
S: Supported
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras.git edac-for-next
|
||||
F: Documentation/admin-guide/ras.rst
|
||||
F: Documentation/driver-api/edac.rst
|
||||
F: drivers/edac/
|
||||
F: include/linux/edac.h
|
||||
@ -8495,7 +8501,7 @@ FREESCALE IMX / MXC FEC DRIVER
|
||||
M: Wei Fang <wei.fang@nxp.com>
|
||||
R: Shenwei Wang <shenwei.wang@nxp.com>
|
||||
R: Clark Wang <xiaoning.wang@nxp.com>
|
||||
R: NXP Linux Team <linux-imx@nxp.com>
|
||||
L: imx@lists.linux.dev
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/net/fsl,fec.yaml
|
||||
@ -8530,7 +8536,7 @@ F: drivers/i2c/busses/i2c-imx.c
|
||||
FREESCALE IMX LPI2C DRIVER
|
||||
M: Dong Aisheng <aisheng.dong@nxp.com>
|
||||
L: linux-i2c@vger.kernel.org
|
||||
L: linux-imx@nxp.com
|
||||
L: imx@lists.linux.dev
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/i2c/i2c-imx-lpi2c.yaml
|
||||
F: drivers/i2c/busses/i2c-imx-lpi2c.c
|
||||
@ -10734,7 +10740,7 @@ INTEL DRM I915 DRIVER (Meteor Lake, DG2 and older excluding Poulsbo, Moorestown
|
||||
M: Jani Nikula <jani.nikula@linux.intel.com>
|
||||
M: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
|
||||
M: Rodrigo Vivi <rodrigo.vivi@intel.com>
|
||||
M: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
|
||||
M: Tvrtko Ursulin <tursulin@ursulin.net>
|
||||
L: intel-gfx@lists.freedesktop.org
|
||||
S: Supported
|
||||
W: https://drm.pages.freedesktop.org/intel-docs/
|
||||
@ -11156,6 +11162,16 @@ L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/net/wwan/iosm/
|
||||
|
||||
INTEL(R) FLEXIBLE RETURN AND EVENT DELIVERY
|
||||
M: Xin Li <xin@zytor.com>
|
||||
M: "H. Peter Anvin" <hpa@zytor.com>
|
||||
S: Supported
|
||||
F: Documentation/arch/x86/x86_64/fred.rst
|
||||
F: arch/x86/entry/entry_64_fred.S
|
||||
F: arch/x86/entry/entry_fred.c
|
||||
F: arch/x86/include/asm/fred.h
|
||||
F: arch/x86/kernel/fred.c
|
||||
|
||||
INTEL(R) TRACE HUB
|
||||
M: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
S: Supported
|
||||
@ -12516,7 +12532,6 @@ F: arch/powerpc/include/asm/livepatch.h
|
||||
F: include/linux/livepatch.h
|
||||
F: kernel/livepatch/
|
||||
F: kernel/module/livepatch.c
|
||||
F: lib/livepatch/
|
||||
F: samples/livepatch/
|
||||
F: tools/testing/selftests/livepatch/
|
||||
|
||||
@ -14111,6 +14126,17 @@ F: mm/
|
||||
F: tools/mm/
|
||||
F: tools/testing/selftests/mm/
|
||||
|
||||
MEMORY MAPPING
|
||||
M: Andrew Morton <akpm@linux-foundation.org>
|
||||
R: Liam R. Howlett <Liam.Howlett@oracle.com>
|
||||
R: Vlastimil Babka <vbabka@suse.cz>
|
||||
R: Lorenzo Stoakes <lstoakes@gmail.com>
|
||||
L: linux-mm@kvack.org
|
||||
S: Maintained
|
||||
W: http://www.linux-mm.org
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
|
||||
F: mm/mmap.c
|
||||
|
||||
MEMORY TECHNOLOGY DEVICES (MTD)
|
||||
M: Miquel Raynal <miquel.raynal@bootlin.com>
|
||||
M: Richard Weinberger <richard@nod.at>
|
||||
@ -14369,7 +14395,7 @@ MICROCHIP MCP16502 PMIC DRIVER
|
||||
M: Claudiu Beznea <claudiu.beznea@tuxon.dev>
|
||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
S: Supported
|
||||
F: Documentation/devicetree/bindings/regulator/mcp16502-regulator.txt
|
||||
F: Documentation/devicetree/bindings/regulator/microchip,mcp16502.yaml
|
||||
F: drivers/regulator/mcp16502.c
|
||||
|
||||
MICROCHIP MCP3564 ADC DRIVER
|
||||
@ -15578,16 +15604,6 @@ W: https://github.com/davejiang/linux/wiki
|
||||
T: git https://github.com/davejiang/linux.git
|
||||
F: drivers/ntb/hw/intel/
|
||||
|
||||
NTFS FILESYSTEM
|
||||
M: Anton Altaparmakov <anton@tuxera.com>
|
||||
R: Namjae Jeon <linkinjeon@kernel.org>
|
||||
L: linux-ntfs-dev@lists.sourceforge.net
|
||||
S: Supported
|
||||
W: http://www.tuxera.com/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/aia21/ntfs.git
|
||||
F: Documentation/filesystems/ntfs.rst
|
||||
F: fs/ntfs/
|
||||
|
||||
NTFS3 FILESYSTEM
|
||||
M: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
|
||||
L: ntfs3@lists.linux.dev
|
||||
@ -15716,7 +15732,7 @@ F: drivers/iio/gyro/fxas21002c_spi.c
|
||||
NXP i.MX 7D/6SX/6UL/93 AND VF610 ADC DRIVER
|
||||
M: Haibo Chen <haibo.chen@nxp.com>
|
||||
L: linux-iio@vger.kernel.org
|
||||
L: linux-imx@nxp.com
|
||||
L: imx@lists.linux.dev
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/iio/adc/fsl,imx7d-adc.yaml
|
||||
F: Documentation/devicetree/bindings/iio/adc/fsl,vf610-adc.yaml
|
||||
@ -15753,7 +15769,7 @@ F: drivers/gpu/drm/imx/dcss/
|
||||
NXP i.MX 8QXP ADC DRIVER
|
||||
M: Cai Huoqing <cai.huoqing@linux.dev>
|
||||
M: Haibo Chen <haibo.chen@nxp.com>
|
||||
L: linux-imx@nxp.com
|
||||
L: imx@lists.linux.dev
|
||||
L: linux-iio@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml
|
||||
@ -15761,7 +15777,7 @@ F: drivers/iio/adc/imx8qxp-adc.c
|
||||
|
||||
NXP i.MX 8QXP/8QM JPEG V4L2 DRIVER
|
||||
M: Mirela Rabulea <mirela.rabulea@nxp.com>
|
||||
R: NXP Linux Team <linux-imx@nxp.com>
|
||||
L: imx@lists.linux.dev
|
||||
L: linux-media@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml
|
||||
@ -15771,7 +15787,7 @@ NXP i.MX CLOCK DRIVERS
|
||||
M: Abel Vesa <abelvesa@kernel.org>
|
||||
R: Peng Fan <peng.fan@nxp.com>
|
||||
L: linux-clk@vger.kernel.org
|
||||
L: linux-imx@nxp.com
|
||||
L: imx@lists.linux.dev
|
||||
S: Maintained
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/abelvesa/linux.git clk/imx
|
||||
F: Documentation/devicetree/bindings/clock/imx*
|
||||
@ -16732,6 +16748,7 @@ F: drivers/pci/controller/dwc/*layerscape*
|
||||
PCI DRIVER FOR FU740
|
||||
M: Paul Walmsley <paul.walmsley@sifive.com>
|
||||
M: Greentime Hu <greentime.hu@sifive.com>
|
||||
M: Samuel Holland <samuel.holland@sifive.com>
|
||||
L: linux-pci@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/pci/sifive,fu740-pcie.yaml
|
||||
@ -17501,6 +17518,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/core
|
||||
F: fs/timerfd.c
|
||||
F: include/linux/time_namespace.h
|
||||
F: include/linux/timer*
|
||||
F: include/trace/events/timer*
|
||||
F: kernel/time/*timer*
|
||||
F: kernel/time/namespace.c
|
||||
|
||||
@ -17537,6 +17555,7 @@ F: Documentation/devicetree/bindings/power/supply/
|
||||
F: drivers/power/supply/
|
||||
F: include/linux/power/
|
||||
F: include/linux/power_supply.h
|
||||
F: tools/testing/selftests/power_supply/
|
||||
|
||||
POWERNV OPERATOR PANEL LCD DISPLAY DRIVER
|
||||
M: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
|
||||
@ -17984,33 +18003,34 @@ F: drivers/media/tuners/qt1010*
|
||||
|
||||
QUALCOMM ATH12K WIRELESS DRIVER
|
||||
M: Kalle Valo <kvalo@kernel.org>
|
||||
M: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
M: Jeff Johnson <jjohnson@kernel.org>
|
||||
L: ath12k@lists.infradead.org
|
||||
S: Supported
|
||||
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath12k
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
|
||||
F: drivers/net/wireless/ath/ath12k/
|
||||
N: ath12k
|
||||
|
||||
QUALCOMM ATHEROS ATH10K WIRELESS DRIVER
|
||||
M: Kalle Valo <kvalo@kernel.org>
|
||||
M: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
M: Jeff Johnson <jjohnson@kernel.org>
|
||||
L: ath10k@lists.infradead.org
|
||||
S: Supported
|
||||
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath10k
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
|
||||
F: Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml
|
||||
F: drivers/net/wireless/ath/ath10k/
|
||||
N: ath10k
|
||||
|
||||
QUALCOMM ATHEROS ATH11K WIRELESS DRIVER
|
||||
M: Kalle Valo <kvalo@kernel.org>
|
||||
M: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
M: Jeff Johnson <jjohnson@kernel.org>
|
||||
L: ath11k@lists.infradead.org
|
||||
S: Supported
|
||||
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath11k
|
||||
B: https://wireless.wiki.kernel.org/en/users/Drivers/ath11k/bugreport
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
|
||||
F: Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml
|
||||
F: drivers/net/wireless/ath/ath11k/
|
||||
N: ath11k
|
||||
|
||||
QUALCOMM ATHEROS ATH9K WIRELESS DRIVER
|
||||
M: Toke Høiland-Jørgensen <toke@toke.dk>
|
||||
@ -18364,11 +18384,17 @@ M: Tony Luck <tony.luck@intel.com>
|
||||
M: Borislav Petkov <bp@alien8.de>
|
||||
L: linux-edac@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/admin-guide/ras.rst
|
||||
F: Documentation/admin-guide/RAS
|
||||
F: drivers/ras/
|
||||
F: include/linux/ras.h
|
||||
F: include/ras/ras_event.h
|
||||
|
||||
RAS FRU MEMORY POISON MANAGER (FMPM)
|
||||
M: Yazen Ghannam <Yazen.Ghannam@amd.com>
|
||||
L: linux-edac@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/ras/amd/fmpm.c
|
||||
|
||||
RC-CORE / LIRC FRAMEWORK
|
||||
M: Sean Young <sean@mess.org>
|
||||
L: linux-media@vger.kernel.org
|
||||
@ -19106,6 +19132,7 @@ F: Documentation/rust/
|
||||
F: rust/
|
||||
F: samples/rust/
|
||||
F: scripts/*rust*
|
||||
F: tools/testing/selftests/rust/
|
||||
K: \b(?i:rust)\b
|
||||
|
||||
RXRPC SOCKETS (AF_RXRPC)
|
||||
@ -19641,7 +19668,7 @@ F: drivers/mmc/host/sdhci-of-at91.c
|
||||
|
||||
SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) NXP i.MX DRIVER
|
||||
M: Haibo Chen <haibo.chen@nxp.com>
|
||||
L: linux-imx@nxp.com
|
||||
L: imx@lists.linux.dev
|
||||
L: linux-mmc@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/mmc/host/sdhci-esdhc-imx.c
|
||||
@ -19976,35 +20003,14 @@ S: Maintained
|
||||
F: drivers/watchdog/simatic-ipc-wdt.c
|
||||
|
||||
SIFIVE DRIVERS
|
||||
M: Palmer Dabbelt <palmer@dabbelt.com>
|
||||
M: Paul Walmsley <paul.walmsley@sifive.com>
|
||||
M: Samuel Holland <samuel.holland@sifive.com>
|
||||
L: linux-riscv@lists.infradead.org
|
||||
S: Supported
|
||||
N: sifive
|
||||
K: [^@]sifive
|
||||
|
||||
SIFIVE CACHE DRIVER
|
||||
M: Conor Dooley <conor@kernel.org>
|
||||
L: linux-riscv@lists.infradead.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/cache/sifive,ccache0.yaml
|
||||
F: drivers/cache/sifive_ccache.c
|
||||
|
||||
SIFIVE FU540 SYSTEM-ON-CHIP
|
||||
M: Paul Walmsley <paul.walmsley@sifive.com>
|
||||
M: Palmer Dabbelt <palmer@dabbelt.com>
|
||||
L: linux-riscv@lists.infradead.org
|
||||
S: Supported
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/pjw/sifive.git
|
||||
N: fu540
|
||||
K: fu540
|
||||
|
||||
SIFIVE PDMA DRIVER
|
||||
M: Green Wan <green.wan@sifive.com>
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/dma/sifive,fu540-c000-pdma.yaml
|
||||
F: drivers/dma/sf-pdma/
|
||||
|
||||
N: sifive
|
||||
K: fu[57]40
|
||||
K: [^@]sifive
|
||||
|
||||
SILEAD TOUCHSCREEN DRIVER
|
||||
M: Hans de Goede <hdegoede@redhat.com>
|
||||
@ -20214,8 +20220,8 @@ F: Documentation/devicetree/bindings/net/socionext,uniphier-ave4.yaml
|
||||
F: drivers/net/ethernet/socionext/sni_ave.c
|
||||
|
||||
SOCIONEXT (SNI) NETSEC NETWORK DRIVER
|
||||
M: Jassi Brar <jaswinder.singh@linaro.org>
|
||||
M: Ilias Apalodimas <ilias.apalodimas@linaro.org>
|
||||
M: Masahisa Kojima <kojima.masahisa@socionext.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/net/socionext,synquacer-netsec.yaml
|
||||
@ -20968,6 +20974,12 @@ F: Documentation/devicetree/bindings/phy/starfive,jh7110-usb-phy.yaml
|
||||
F: drivers/phy/starfive/phy-jh7110-pcie.c
|
||||
F: drivers/phy/starfive/phy-jh7110-usb.c
|
||||
|
||||
STARFIVE JH8100 EXTERNAL INTERRUPT CONTROLLER DRIVER
|
||||
M: Changhuang Liang <changhuang.liang@starfivetech.com>
|
||||
S: Supported
|
||||
F: Documentation/devicetree/bindings/interrupt-controller/starfive,jh8100-intc.yaml
|
||||
F: drivers/irqchip/irq-starfive-jh8100-intc.c
|
||||
|
||||
STATIC BRANCH/CALL
|
||||
M: Peter Zijlstra <peterz@infradead.org>
|
||||
M: Josh Poimboeuf <jpoimboe@kernel.org>
|
||||
|
6
Makefile
6
Makefile
@ -2,7 +2,7 @@
|
||||
VERSION = 6
|
||||
PATCHLEVEL = 8
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc6
|
||||
EXTRAVERSION =
|
||||
NAME = Hurr durr I'ma ninja sloth
|
||||
|
||||
# *DOCUMENTATION*
|
||||
@ -1201,7 +1201,7 @@ prepare0: archprepare
|
||||
# All the preparing..
|
||||
prepare: prepare0
|
||||
ifdef CONFIG_RUST
|
||||
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/rust_is_available.sh
|
||||
+$(Q)$(CONFIG_SHELL) $(srctree)/scripts/rust_is_available.sh
|
||||
$(Q)$(MAKE) $(build)=rust
|
||||
endif
|
||||
|
||||
@ -1711,7 +1711,7 @@ $(DOC_TARGETS):
|
||||
# "Is Rust available?" target
|
||||
PHONY += rustavailable
|
||||
rustavailable:
|
||||
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/rust_is_available.sh && echo "Rust is available!"
|
||||
+$(Q)$(CONFIG_SHELL) $(srctree)/scripts/rust_is_available.sh && echo "Rust is available!"
|
||||
|
||||
# Documentation target
|
||||
#
|
||||
|
@ -467,11 +467,6 @@ smp_prepare_cpus(unsigned int max_cpus)
|
||||
smp_num_cpus = smp_num_probed;
|
||||
}
|
||||
|
||||
void
|
||||
smp_prepare_boot_cpu(void)
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
__cpu_up(unsigned int cpu, struct task_struct *tidle)
|
||||
{
|
||||
|
@ -39,11 +39,6 @@ struct plat_smp_ops __weak plat_smp_ops;
|
||||
/* XXX: per cpu ? Only needed once in early secondary boot */
|
||||
struct task_struct *secondary_idle_tsk;
|
||||
|
||||
/* Called from start_kernel */
|
||||
void __init smp_prepare_boot_cpu(void)
|
||||
{
|
||||
}
|
||||
|
||||
static int __init arc_get_cpu_map(const char *name, struct cpumask *cpumask)
|
||||
{
|
||||
unsigned long dt_root = of_get_flat_dt_root();
|
||||
|
@ -834,16 +834,6 @@
|
||||
<&clks IMX7D_LCDIF_PIXEL_ROOT_CLK>;
|
||||
clock-names = "pix", "axi";
|
||||
status = "disabled";
|
||||
|
||||
port {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
lcdif_out_mipi_dsi: endpoint@0 {
|
||||
reg = <0>;
|
||||
remote-endpoint = <&mipi_dsi_in_lcdif>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
mipi_csi: mipi-csi@30750000 {
|
||||
@ -895,22 +885,6 @@
|
||||
samsung,esc-clock-frequency = <20000000>;
|
||||
samsung,pll-clock-frequency = <24000000>;
|
||||
status = "disabled";
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
mipi_dsi_in_lcdif: endpoint@0 {
|
||||
reg = <0>;
|
||||
remote-endpoint = <&lcdif_out_mipi_dsi>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -297,6 +297,7 @@ CONFIG_FB_MODE_HELPERS=y
|
||||
CONFIG_LCD_CLASS_DEVICE=y
|
||||
CONFIG_LCD_L4F00242T03=y
|
||||
CONFIG_LCD_PLATFORM=y
|
||||
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
||||
CONFIG_BACKLIGHT_PWM=y
|
||||
CONFIG_BACKLIGHT_GPIO=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
#include <asm/auxvec.h>
|
||||
#include <asm/hwcap.h>
|
||||
#include <asm/vdso_datapage.h>
|
||||
|
||||
/*
|
||||
* ELF register definitions..
|
||||
|
@ -1,26 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Adapted from arm64 version.
|
||||
*
|
||||
* Copyright (C) 2012 ARM Limited
|
||||
*/
|
||||
#ifndef __ASM_VDSO_DATAPAGE_H
|
||||
#define __ASM_VDSO_DATAPAGE_H
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#include <vdso/datapage.h>
|
||||
#include <asm/page.h>
|
||||
|
||||
union vdso_data_store {
|
||||
struct vdso_data data[CS_BASES];
|
||||
u8 page[PAGE_SIZE];
|
||||
};
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* __ASM_VDSO_DATAPAGE_H */
|
@ -21,10 +21,12 @@
|
||||
#include <asm/mpu.h>
|
||||
#include <asm/procinfo.h>
|
||||
#include <asm/suspend.h>
|
||||
#include <asm/vdso_datapage.h>
|
||||
#include <asm/hardware/cache-l2x0.h>
|
||||
#include <linux/kbuild.h>
|
||||
#include <linux/arm-smccc.h>
|
||||
|
||||
#include <vdso/datapage.h>
|
||||
|
||||
#include "signal.h"
|
||||
|
||||
/*
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include <asm/cacheflush.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/vdso.h>
|
||||
#include <asm/vdso_datapage.h>
|
||||
#include <clocksource/arm_arch_timer.h>
|
||||
#include <vdso/helpers.h>
|
||||
#include <vdso/vsyscall.h>
|
||||
@ -35,9 +34,6 @@ extern char vdso_start[], vdso_end[];
|
||||
/* Total number of pages needed for the data and text portions of the VDSO. */
|
||||
unsigned int vdso_total_pages __ro_after_init;
|
||||
|
||||
/*
|
||||
* The VDSO data page.
|
||||
*/
|
||||
static union vdso_data_store vdso_data_store __page_aligned_data;
|
||||
struct vdso_data *vdso_data = vdso_data_store.data;
|
||||
|
||||
|
@ -42,5 +42,6 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-bigtreetech-cb1-manta.dtb
|
||||
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-bigtreetech-pi.dtb
|
||||
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-orangepi-zero2.dtb
|
||||
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-x96-mate.dtb
|
||||
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-orangepi-zero2w.dtb
|
||||
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-orangepi-zero3.dtb
|
||||
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-transpeed-8k618-t.dtb
|
||||
|
@ -171,6 +171,16 @@
|
||||
};
|
||||
};
|
||||
|
||||
gpio_intc: interrupt-controller@4080 {
|
||||
compatible = "amlogic,t7-gpio-intc",
|
||||
"amlogic,meson-gpio-intc";
|
||||
reg = <0x0 0x4080 0x0 0x20>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
amlogic,channel-interrupts =
|
||||
<10 11 12 13 14 15 16 17 18 19 20 21>;
|
||||
};
|
||||
|
||||
uart_a: serial@78000 {
|
||||
compatible = "amlogic,t7-uart", "amlogic,meson-s4-uart";
|
||||
reg = <0x0 0x78000 0x0 0x18>;
|
||||
|
@ -255,7 +255,7 @@
|
||||
<&clk IMX8MP_AUDIO_PLL2_OUT>;
|
||||
assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL2_OUT>;
|
||||
assigned-clock-rates = <13000000>, <13000000>, <156000000>;
|
||||
reset-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
|
||||
reset-gpios = <&gpio4 1 GPIO_ACTIVE_HIGH>;
|
||||
status = "disabled";
|
||||
|
||||
ports {
|
||||
|
@ -1820,7 +1820,7 @@
|
||||
compatible = "fsl,imx8mp-ldb";
|
||||
reg = <0x5c 0x4>, <0x128 0x4>;
|
||||
reg-names = "ldb", "lvds";
|
||||
clocks = <&clk IMX8MP_CLK_MEDIA_LDB>;
|
||||
clocks = <&clk IMX8MP_CLK_MEDIA_LDB_ROOT>;
|
||||
clock-names = "ldb";
|
||||
assigned-clocks = <&clk IMX8MP_CLK_MEDIA_LDB>;
|
||||
assigned-clock-parents = <&clk IMX8MP_VIDEO_PLL1_OUT>;
|
||||
|
@ -175,7 +175,7 @@
|
||||
status = "okay";
|
||||
|
||||
phy-handle = <&mgbe0_phy>;
|
||||
phy-mode = "usxgmii";
|
||||
phy-mode = "10gbase-r";
|
||||
|
||||
mdio {
|
||||
#address-cells = <1>;
|
||||
|
@ -1459,7 +1459,7 @@
|
||||
<&mc TEGRA234_MEMORY_CLIENT_MGBEAWR &emc>;
|
||||
interconnect-names = "dma-mem", "write";
|
||||
iommus = <&smmu_niso0 TEGRA234_SID_MGBE>;
|
||||
power-domains = <&bpmp TEGRA234_POWER_DOMAIN_MGBEA>;
|
||||
power-domains = <&bpmp TEGRA234_POWER_DOMAIN_MGBEB>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@ -1493,7 +1493,7 @@
|
||||
<&mc TEGRA234_MEMORY_CLIENT_MGBEBWR &emc>;
|
||||
interconnect-names = "dma-mem", "write";
|
||||
iommus = <&smmu_niso0 TEGRA234_SID_MGBE_VF1>;
|
||||
power-domains = <&bpmp TEGRA234_POWER_DOMAIN_MGBEB>;
|
||||
power-domains = <&bpmp TEGRA234_POWER_DOMAIN_MGBEC>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@ -1527,7 +1527,7 @@
|
||||
<&mc TEGRA234_MEMORY_CLIENT_MGBECWR &emc>;
|
||||
interconnect-names = "dma-mem", "write";
|
||||
iommus = <&smmu_niso0 TEGRA234_SID_MGBE_VF2>;
|
||||
power-domains = <&bpmp TEGRA234_POWER_DOMAIN_MGBEC>;
|
||||
power-domains = <&bpmp TEGRA234_POWER_DOMAIN_MGBED>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -457,25 +457,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
mpm: interrupt-controller {
|
||||
compatible = "qcom,mpm";
|
||||
qcom,rpm-msg-ram = <&apss_mpm>;
|
||||
interrupts = <GIC_SPI 171 IRQ_TYPE_EDGE_RISING>;
|
||||
mboxes = <&apcs_glb 1>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
#power-domain-cells = <0>;
|
||||
interrupt-parent = <&intc>;
|
||||
qcom,mpm-pin-count = <96>;
|
||||
qcom,mpm-pin-map = <2 184>, /* TSENS1 upper_lower_int */
|
||||
<52 243>, /* DWC3_PRI ss_phy_irq */
|
||||
<79 347>, /* DWC3_PRI hs_phy_irq */
|
||||
<80 352>, /* DWC3_SEC hs_phy_irq */
|
||||
<81 347>, /* QUSB2_PHY_PRI DP+DM */
|
||||
<82 352>, /* QUSB2_PHY_SEC DP+DM */
|
||||
<87 326>; /* SPMI */
|
||||
};
|
||||
|
||||
psci {
|
||||
compatible = "arm,psci-1.0";
|
||||
method = "smc";
|
||||
@ -765,15 +746,8 @@
|
||||
};
|
||||
|
||||
rpm_msg_ram: sram@68000 {
|
||||
compatible = "qcom,rpm-msg-ram", "mmio-sram";
|
||||
compatible = "qcom,rpm-msg-ram";
|
||||
reg = <0x00068000 0x6000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0 0x00068000 0x7000>;
|
||||
|
||||
apss_mpm: sram@1b8 {
|
||||
reg = <0x1b8 0x48>;
|
||||
};
|
||||
};
|
||||
|
||||
qfprom@74000 {
|
||||
@ -856,8 +830,8 @@
|
||||
reg = <0x004ad000 0x1000>, /* TM */
|
||||
<0x004ac000 0x1000>; /* SROT */
|
||||
#qcom,sensors = <8>;
|
||||
interrupts-extended = <&mpm 2 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<&intc GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "uplow", "critical";
|
||||
#thermal-sensor-cells = <1>;
|
||||
};
|
||||
@ -1363,7 +1337,6 @@
|
||||
interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
|
||||
gpio-controller;
|
||||
gpio-ranges = <&tlmm 0 0 150>;
|
||||
wakeup-parent = <&mpm>;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
@ -1891,7 +1864,7 @@
|
||||
<0x0400a000 0x002100>;
|
||||
reg-names = "core", "chnls", "obsrvr", "intr", "cnfg";
|
||||
interrupt-names = "periph_irq";
|
||||
interrupts-extended = <&mpm 87 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupts = <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>;
|
||||
qcom,ee = <0>;
|
||||
qcom,channel = <0>;
|
||||
#address-cells = <2>;
|
||||
@ -3052,8 +3025,8 @@
|
||||
#size-cells = <1>;
|
||||
ranges;
|
||||
|
||||
interrupts-extended = <&mpm 79 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<&mpm 52 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupts = <GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 243 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "hs_phy_irq", "ss_phy_irq";
|
||||
|
||||
clocks = <&gcc GCC_SYS_NOC_USB3_AXI_CLK>,
|
||||
|
@ -563,6 +563,8 @@
|
||||
};
|
||||
|
||||
&pcie4 {
|
||||
max-link-speed = <2>;
|
||||
|
||||
perst-gpios = <&tlmm 141 GPIO_ACTIVE_LOW>;
|
||||
wake-gpios = <&tlmm 139 GPIO_ACTIVE_LOW>;
|
||||
|
||||
|
@ -722,6 +722,8 @@
|
||||
};
|
||||
|
||||
&pcie4 {
|
||||
max-link-speed = <2>;
|
||||
|
||||
perst-gpios = <&tlmm 141 GPIO_ACTIVE_LOW>;
|
||||
wake-gpios = <&tlmm 139 GPIO_ACTIVE_LOW>;
|
||||
|
||||
|
@ -1304,6 +1304,9 @@
|
||||
&config_noc SLAVE_QUP_0 RPM_ALWAYS_TAG>,
|
||||
<&system_noc MASTER_QUP_0 RPM_ALWAYS_TAG
|
||||
&bimc SLAVE_EBI_CH0 RPM_ALWAYS_TAG>;
|
||||
interconnect-names = "qup-core",
|
||||
"qup-config",
|
||||
"qup-memory";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "disabled";
|
||||
|
@ -622,7 +622,7 @@
|
||||
|
||||
&tlmm {
|
||||
/* Reserved I/Os for NFC */
|
||||
gpio-reserved-ranges = <32 8>;
|
||||
gpio-reserved-ranges = <32 8>, <74 1>;
|
||||
|
||||
disp0_reset_n_active: disp0-reset-n-active-state {
|
||||
pins = "gpio133";
|
||||
|
@ -659,7 +659,7 @@
|
||||
|
||||
&tlmm {
|
||||
/* Reserved I/Os for NFC */
|
||||
gpio-reserved-ranges = <32 8>;
|
||||
gpio-reserved-ranges = <32 8>, <74 1>;
|
||||
|
||||
bt_default: bt-default-state {
|
||||
bt-en-pins {
|
||||
|
@ -227,8 +227,19 @@ static int ctr_encrypt(struct skcipher_request *req)
|
||||
src += blocks * AES_BLOCK_SIZE;
|
||||
}
|
||||
if (nbytes && walk.nbytes == walk.total) {
|
||||
u8 buf[AES_BLOCK_SIZE];
|
||||
u8 *d = dst;
|
||||
|
||||
if (unlikely(nbytes < AES_BLOCK_SIZE))
|
||||
src = dst = memcpy(buf + sizeof(buf) - nbytes,
|
||||
src, nbytes);
|
||||
|
||||
neon_aes_ctr_encrypt(dst, src, ctx->enc, ctx->key.rounds,
|
||||
nbytes, walk.iv);
|
||||
|
||||
if (unlikely(nbytes < AES_BLOCK_SIZE))
|
||||
memcpy(d, dst, nbytes);
|
||||
|
||||
nbytes = 0;
|
||||
}
|
||||
kernel_neon_end();
|
||||
|
@ -247,7 +247,7 @@ struct kunwind_consume_entry_data {
|
||||
void *cookie;
|
||||
};
|
||||
|
||||
static bool
|
||||
static __always_inline bool
|
||||
arch_kunwind_consume_entry(const struct kunwind_state *state, void *cookie)
|
||||
{
|
||||
struct kunwind_consume_entry_data *data = cookie;
|
||||
|
@ -69,10 +69,7 @@ static struct vdso_abi_info vdso_info[] __ro_after_init = {
|
||||
/*
|
||||
* The vDSO data page.
|
||||
*/
|
||||
static union {
|
||||
struct vdso_data data[CS_BASES];
|
||||
u8 page[PAGE_SIZE];
|
||||
} vdso_data_store __page_aligned_data;
|
||||
static union vdso_data_store vdso_data_store __page_aligned_data;
|
||||
struct vdso_data *vdso_data = vdso_data_store.data;
|
||||
|
||||
static int vdso_mremap(const struct vm_special_mapping *sm,
|
||||
|
@ -5,11 +5,6 @@
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#ifndef GENERIC_TIME_VSYSCALL
|
||||
struct vdso_data {
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The VDSO symbols are mapped into Linux so we can just use regular symbol
|
||||
* addressing to get their offsets in userspace. The symbols are mapped at an
|
||||
|
@ -152,10 +152,6 @@ void arch_irq_work_raise(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
void __init smp_prepare_boot_cpu(void)
|
||||
{
|
||||
}
|
||||
|
||||
void __init smp_prepare_cpus(unsigned int max_cpus)
|
||||
{
|
||||
}
|
||||
|
@ -8,25 +8,15 @@
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include <asm/page.h>
|
||||
#ifdef GENERIC_TIME_VSYSCALL
|
||||
#include <vdso/datapage.h>
|
||||
#else
|
||||
#include <asm/vdso.h>
|
||||
#endif
|
||||
|
||||
extern char vdso_start[], vdso_end[];
|
||||
|
||||
static unsigned int vdso_pages;
|
||||
static struct page **vdso_pagelist;
|
||||
|
||||
/*
|
||||
* The vDSO data page.
|
||||
*/
|
||||
static union {
|
||||
struct vdso_data data;
|
||||
u8 page[PAGE_SIZE];
|
||||
} vdso_data_store __page_aligned_data;
|
||||
struct vdso_data *vdso_data = &vdso_data_store.data;
|
||||
static union vdso_data_store vdso_data_store __page_aligned_data;
|
||||
struct vdso_data *vdso_data = vdso_data_store.data;
|
||||
|
||||
static int __init vdso_init(void)
|
||||
{
|
||||
|
@ -114,10 +114,6 @@ void send_ipi(const struct cpumask *cpumask, enum ipi_message_type msg)
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
void __init smp_prepare_boot_cpu(void)
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* interrupts should already be disabled from the VM
|
||||
* SP should already be correct; need to set THREADINFO_REG
|
||||
|
@ -21,15 +21,13 @@
|
||||
#include <asm/vdso.h>
|
||||
#include <vdso/helpers.h>
|
||||
#include <vdso/vsyscall.h>
|
||||
#include <vdso/datapage.h>
|
||||
#include <generated/vdso-offsets.h>
|
||||
|
||||
extern char vdso_start[], vdso_end[];
|
||||
|
||||
/* Kernel-provided data used by the VDSO. */
|
||||
static union {
|
||||
u8 page[PAGE_SIZE];
|
||||
struct vdso_data data[CS_BASES];
|
||||
} generic_vdso_data __page_aligned_data;
|
||||
static union vdso_data_store generic_vdso_data __page_aligned_data;
|
||||
|
||||
static union {
|
||||
u8 page[LOONGARCH_VDSO_DATA_SIZE];
|
||||
|
@ -96,6 +96,9 @@ static const struct block_device_operations nfhd_ops = {
|
||||
|
||||
static int __init nfhd_init_one(int id, u32 blocks, u32 bsize)
|
||||
{
|
||||
struct queue_limits lim = {
|
||||
.logical_block_size = bsize,
|
||||
};
|
||||
struct nfhd_device *dev;
|
||||
int dev_id = id - NFHD_DEV_OFFSET;
|
||||
int err = -ENOMEM;
|
||||
@ -117,9 +120,11 @@ static int __init nfhd_init_one(int id, u32 blocks, u32 bsize)
|
||||
dev->bsize = bsize;
|
||||
dev->bshift = ffs(bsize) - 10;
|
||||
|
||||
dev->disk = blk_alloc_disk(NUMA_NO_NODE);
|
||||
if (!dev->disk)
|
||||
dev->disk = blk_alloc_disk(&lim, NUMA_NO_NODE);
|
||||
if (IS_ERR(dev->disk)) {
|
||||
err = PTR_ERR(dev->disk);
|
||||
goto free_dev;
|
||||
}
|
||||
|
||||
dev->disk->major = major_num;
|
||||
dev->disk->first_minor = dev_id * 16;
|
||||
@ -128,7 +133,6 @@ static int __init nfhd_init_one(int id, u32 blocks, u32 bsize)
|
||||
dev->disk->private_data = dev;
|
||||
sprintf(dev->disk->disk_name, "nfhd%u", dev_id);
|
||||
set_capacity(dev->disk, (sector_t)blocks * (bsize / 512));
|
||||
blk_queue_logical_block_size(dev->disk->queue, bsize);
|
||||
err = add_disk(dev->disk);
|
||||
if (err)
|
||||
goto out_cleanup_disk;
|
||||
|
@ -50,9 +50,4 @@ extern struct mips_vdso_image vdso_image_o32;
|
||||
extern struct mips_vdso_image vdso_image_n32;
|
||||
#endif
|
||||
|
||||
union mips_vdso_data {
|
||||
struct vdso_data data[CS_BASES];
|
||||
u8 page[PAGE_SIZE];
|
||||
};
|
||||
|
||||
#endif /* __ASM_VDSO_H */
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <vdso/vsyscall.h>
|
||||
|
||||
/* Kernel-provided data used by the VDSO. */
|
||||
static union mips_vdso_data mips_vdso_data __page_aligned_data;
|
||||
static union vdso_data_store mips_vdso_data __page_aligned_data;
|
||||
struct vdso_data *vdso_data = mips_vdso_data.data;
|
||||
|
||||
/*
|
||||
|
@ -57,10 +57,6 @@ static void boot_secondary(unsigned int cpu, struct task_struct *idle)
|
||||
spin_unlock(&boot_lock);
|
||||
}
|
||||
|
||||
void __init smp_prepare_boot_cpu(void)
|
||||
{
|
||||
}
|
||||
|
||||
void __init smp_init_cpus(void)
|
||||
{
|
||||
struct device_node *cpu;
|
||||
|
@ -69,7 +69,7 @@ enum rtas_function_index {
|
||||
RTAS_FNIDX__IBM_READ_SLOT_RESET_STATE,
|
||||
RTAS_FNIDX__IBM_READ_SLOT_RESET_STATE2,
|
||||
RTAS_FNIDX__IBM_REMOVE_PE_DMA_WINDOW,
|
||||
RTAS_FNIDX__IBM_RESET_PE_DMA_WINDOWS,
|
||||
RTAS_FNIDX__IBM_RESET_PE_DMA_WINDOW,
|
||||
RTAS_FNIDX__IBM_SCAN_LOG_DUMP,
|
||||
RTAS_FNIDX__IBM_SET_DYNAMIC_INDICATOR,
|
||||
RTAS_FNIDX__IBM_SET_EEH_OPTION,
|
||||
@ -164,7 +164,7 @@ typedef struct {
|
||||
#define RTAS_FN_IBM_READ_SLOT_RESET_STATE rtas_fn_handle(RTAS_FNIDX__IBM_READ_SLOT_RESET_STATE)
|
||||
#define RTAS_FN_IBM_READ_SLOT_RESET_STATE2 rtas_fn_handle(RTAS_FNIDX__IBM_READ_SLOT_RESET_STATE2)
|
||||
#define RTAS_FN_IBM_REMOVE_PE_DMA_WINDOW rtas_fn_handle(RTAS_FNIDX__IBM_REMOVE_PE_DMA_WINDOW)
|
||||
#define RTAS_FN_IBM_RESET_PE_DMA_WINDOWS rtas_fn_handle(RTAS_FNIDX__IBM_RESET_PE_DMA_WINDOWS)
|
||||
#define RTAS_FN_IBM_RESET_PE_DMA_WINDOW rtas_fn_handle(RTAS_FNIDX__IBM_RESET_PE_DMA_WINDOW)
|
||||
#define RTAS_FN_IBM_SCAN_LOG_DUMP rtas_fn_handle(RTAS_FNIDX__IBM_SCAN_LOG_DUMP)
|
||||
#define RTAS_FN_IBM_SET_DYNAMIC_INDICATOR rtas_fn_handle(RTAS_FNIDX__IBM_SET_DYNAMIC_INDICATOR)
|
||||
#define RTAS_FN_IBM_SET_EEH_OPTION rtas_fn_handle(RTAS_FNIDX__IBM_SET_EEH_OPTION)
|
||||
|
@ -375,8 +375,13 @@ static struct rtas_function rtas_function_table[] __ro_after_init = {
|
||||
[RTAS_FNIDX__IBM_REMOVE_PE_DMA_WINDOW] = {
|
||||
.name = "ibm,remove-pe-dma-window",
|
||||
},
|
||||
[RTAS_FNIDX__IBM_RESET_PE_DMA_WINDOWS] = {
|
||||
.name = "ibm,reset-pe-dma-windows",
|
||||
[RTAS_FNIDX__IBM_RESET_PE_DMA_WINDOW] = {
|
||||
/*
|
||||
* Note: PAPR+ v2.13 7.3.31.4.1 spells this as
|
||||
* "ibm,reset-pe-dma-windows" (plural), but RTAS
|
||||
* implementations use the singular form in practice.
|
||||
*/
|
||||
.name = "ibm,reset-pe-dma-window",
|
||||
},
|
||||
[RTAS_FNIDX__IBM_SCAN_LOG_DUMP] = {
|
||||
.name = "ibm,scan-log-dump",
|
||||
|
@ -984,7 +984,7 @@ static bool shared_caches __ro_after_init;
|
||||
/* cpumask of CPUs with asymmetric SMT dependency */
|
||||
static int powerpc_smt_flags(void)
|
||||
{
|
||||
int flags = SD_SHARE_CPUCAPACITY | SD_SHARE_PKG_RESOURCES;
|
||||
int flags = SD_SHARE_CPUCAPACITY | SD_SHARE_LLC;
|
||||
|
||||
if (cpu_has_feature(CPU_FTR_ASYM_SMT)) {
|
||||
printk_once(KERN_INFO "Enabling Asymmetric SMT scheduling\n");
|
||||
@ -1010,9 +1010,9 @@ static __ro_after_init DEFINE_STATIC_KEY_FALSE(splpar_asym_pack);
|
||||
static int powerpc_shared_cache_flags(void)
|
||||
{
|
||||
if (static_branch_unlikely(&splpar_asym_pack))
|
||||
return SD_SHARE_PKG_RESOURCES | SD_ASYM_PACKING;
|
||||
return SD_SHARE_LLC | SD_ASYM_PACKING;
|
||||
|
||||
return SD_SHARE_PKG_RESOURCES;
|
||||
return SD_SHARE_LLC;
|
||||
}
|
||||
|
||||
static int powerpc_shared_proc_flags(void)
|
||||
|
@ -574,29 +574,6 @@ static void iommu_table_setparms(struct pci_controller *phb,
|
||||
|
||||
struct iommu_table_ops iommu_table_lpar_multi_ops;
|
||||
|
||||
/*
|
||||
* iommu_table_setparms_lpar
|
||||
*
|
||||
* Function: On pSeries LPAR systems, return TCE table info, given a pci bus.
|
||||
*/
|
||||
static void iommu_table_setparms_lpar(struct pci_controller *phb,
|
||||
struct device_node *dn,
|
||||
struct iommu_table *tbl,
|
||||
struct iommu_table_group *table_group,
|
||||
const __be32 *dma_window)
|
||||
{
|
||||
unsigned long offset, size, liobn;
|
||||
|
||||
of_parse_dma_window(dn, dma_window, &liobn, &offset, &size);
|
||||
|
||||
iommu_table_setparms_common(tbl, phb->bus->number, liobn, offset, size, IOMMU_PAGE_SHIFT_4K, NULL,
|
||||
&iommu_table_lpar_multi_ops);
|
||||
|
||||
|
||||
table_group->tce32_start = offset;
|
||||
table_group->tce32_size = size;
|
||||
}
|
||||
|
||||
struct iommu_table_ops iommu_table_pseries_ops = {
|
||||
.set = tce_build_pSeries,
|
||||
.clear = tce_free_pSeries,
|
||||
@ -724,26 +701,71 @@ struct iommu_table_ops iommu_table_lpar_multi_ops = {
|
||||
* dynamic 64bit DMA window, walking up the device tree.
|
||||
*/
|
||||
static struct device_node *pci_dma_find(struct device_node *dn,
|
||||
const __be32 **dma_window)
|
||||
struct dynamic_dma_window_prop *prop)
|
||||
{
|
||||
const __be32 *dw = NULL;
|
||||
const __be32 *default_prop = NULL;
|
||||
const __be32 *ddw_prop = NULL;
|
||||
struct device_node *rdn = NULL;
|
||||
bool default_win = false, ddw_win = false;
|
||||
|
||||
for ( ; dn && PCI_DN(dn); dn = dn->parent) {
|
||||
dw = of_get_property(dn, "ibm,dma-window", NULL);
|
||||
if (dw) {
|
||||
if (dma_window)
|
||||
*dma_window = dw;
|
||||
return dn;
|
||||
default_prop = of_get_property(dn, "ibm,dma-window", NULL);
|
||||
if (default_prop) {
|
||||
rdn = dn;
|
||||
default_win = true;
|
||||
}
|
||||
dw = of_get_property(dn, DIRECT64_PROPNAME, NULL);
|
||||
if (dw)
|
||||
return dn;
|
||||
dw = of_get_property(dn, DMA64_PROPNAME, NULL);
|
||||
if (dw)
|
||||
return dn;
|
||||
ddw_prop = of_get_property(dn, DIRECT64_PROPNAME, NULL);
|
||||
if (ddw_prop) {
|
||||
rdn = dn;
|
||||
ddw_win = true;
|
||||
break;
|
||||
}
|
||||
ddw_prop = of_get_property(dn, DMA64_PROPNAME, NULL);
|
||||
if (ddw_prop) {
|
||||
rdn = dn;
|
||||
ddw_win = true;
|
||||
break;
|
||||
}
|
||||
|
||||
/* At least found default window, which is the case for normal boot */
|
||||
if (default_win)
|
||||
break;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
/* For PCI devices there will always be a DMA window, either on the device
|
||||
* or parent bus
|
||||
*/
|
||||
WARN_ON(!(default_win | ddw_win));
|
||||
|
||||
/* caller doesn't want to get DMA window property */
|
||||
if (!prop)
|
||||
return rdn;
|
||||
|
||||
/* parse DMA window property. During normal system boot, only default
|
||||
* DMA window is passed in OF. But, for kdump, a dedicated adapter might
|
||||
* have both default and DDW in FDT. In this scenario, DDW takes precedence
|
||||
* over default window.
|
||||
*/
|
||||
if (ddw_win) {
|
||||
struct dynamic_dma_window_prop *p;
|
||||
|
||||
p = (struct dynamic_dma_window_prop *)ddw_prop;
|
||||
prop->liobn = p->liobn;
|
||||
prop->dma_base = p->dma_base;
|
||||
prop->tce_shift = p->tce_shift;
|
||||
prop->window_shift = p->window_shift;
|
||||
} else if (default_win) {
|
||||
unsigned long offset, size, liobn;
|
||||
|
||||
of_parse_dma_window(rdn, default_prop, &liobn, &offset, &size);
|
||||
|
||||
prop->liobn = cpu_to_be32((u32)liobn);
|
||||
prop->dma_base = cpu_to_be64(offset);
|
||||
prop->tce_shift = cpu_to_be32(IOMMU_PAGE_SHIFT_4K);
|
||||
prop->window_shift = cpu_to_be32(order_base_2(size));
|
||||
}
|
||||
|
||||
return rdn;
|
||||
}
|
||||
|
||||
static void pci_dma_bus_setup_pSeriesLP(struct pci_bus *bus)
|
||||
@ -751,17 +773,20 @@ static void pci_dma_bus_setup_pSeriesLP(struct pci_bus *bus)
|
||||
struct iommu_table *tbl;
|
||||
struct device_node *dn, *pdn;
|
||||
struct pci_dn *ppci;
|
||||
const __be32 *dma_window = NULL;
|
||||
struct dynamic_dma_window_prop prop;
|
||||
|
||||
dn = pci_bus_to_OF_node(bus);
|
||||
|
||||
pr_debug("pci_dma_bus_setup_pSeriesLP: setting up bus %pOF\n",
|
||||
dn);
|
||||
|
||||
pdn = pci_dma_find(dn, &dma_window);
|
||||
pdn = pci_dma_find(dn, &prop);
|
||||
|
||||
if (dma_window == NULL)
|
||||
pr_debug(" no ibm,dma-window property !\n");
|
||||
/* In PPC architecture, there will always be DMA window on bus or one of the
|
||||
* parent bus. During reboot, there will be ibm,dma-window property to
|
||||
* define DMA window. For kdump, there will at least be default window or DDW
|
||||
* or both.
|
||||
*/
|
||||
|
||||
ppci = PCI_DN(pdn);
|
||||
|
||||
@ -771,13 +796,24 @@ static void pci_dma_bus_setup_pSeriesLP(struct pci_bus *bus)
|
||||
if (!ppci->table_group) {
|
||||
ppci->table_group = iommu_pseries_alloc_group(ppci->phb->node);
|
||||
tbl = ppci->table_group->tables[0];
|
||||
if (dma_window) {
|
||||
iommu_table_setparms_lpar(ppci->phb, pdn, tbl,
|
||||
ppci->table_group, dma_window);
|
||||
|
||||
if (!iommu_init_table(tbl, ppci->phb->node, 0, 0))
|
||||
panic("Failed to initialize iommu table");
|
||||
}
|
||||
iommu_table_setparms_common(tbl, ppci->phb->bus->number,
|
||||
be32_to_cpu(prop.liobn),
|
||||
be64_to_cpu(prop.dma_base),
|
||||
1ULL << be32_to_cpu(prop.window_shift),
|
||||
be32_to_cpu(prop.tce_shift), NULL,
|
||||
&iommu_table_lpar_multi_ops);
|
||||
|
||||
/* Only for normal boot with default window. Doesn't matter even
|
||||
* if we set these with DDW which is 64bit during kdump, since
|
||||
* these will not be used during kdump.
|
||||
*/
|
||||
ppci->table_group->tce32_start = be64_to_cpu(prop.dma_base);
|
||||
ppci->table_group->tce32_size = 1 << be32_to_cpu(prop.window_shift);
|
||||
|
||||
if (!iommu_init_table(tbl, ppci->phb->node, 0, 0))
|
||||
panic("Failed to initialize iommu table");
|
||||
|
||||
iommu_register_group(ppci->table_group,
|
||||
pci_domain_nr(bus), 0);
|
||||
pr_debug(" created table: %p\n", ppci->table_group);
|
||||
@ -968,6 +1004,12 @@ static void find_existing_ddw_windows_named(const char *name)
|
||||
continue;
|
||||
}
|
||||
|
||||
/* If at the time of system initialization, there are DDWs in OF,
|
||||
* it means this is during kexec. DDW could be direct or dynamic.
|
||||
* We will just mark DDWs as "dynamic" since this is kdump path,
|
||||
* no need to worry about perforance. ddw_list_new_entry() will
|
||||
* set window->direct = false.
|
||||
*/
|
||||
window = ddw_list_new_entry(pdn, dma64);
|
||||
if (!window) {
|
||||
of_node_put(pdn);
|
||||
@ -1524,8 +1566,8 @@ static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev)
|
||||
{
|
||||
struct device_node *pdn, *dn;
|
||||
struct iommu_table *tbl;
|
||||
const __be32 *dma_window = NULL;
|
||||
struct pci_dn *pci;
|
||||
struct dynamic_dma_window_prop prop;
|
||||
|
||||
pr_debug("pci_dma_dev_setup_pSeriesLP: %s\n", pci_name(dev));
|
||||
|
||||
@ -1538,7 +1580,7 @@ static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev)
|
||||
dn = pci_device_to_OF_node(dev);
|
||||
pr_debug(" node is %pOF\n", dn);
|
||||
|
||||
pdn = pci_dma_find(dn, &dma_window);
|
||||
pdn = pci_dma_find(dn, &prop);
|
||||
if (!pdn || !PCI_DN(pdn)) {
|
||||
printk(KERN_WARNING "pci_dma_dev_setup_pSeriesLP: "
|
||||
"no DMA window found for pci dev=%s dn=%pOF\n",
|
||||
@ -1551,8 +1593,20 @@ static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev)
|
||||
if (!pci->table_group) {
|
||||
pci->table_group = iommu_pseries_alloc_group(pci->phb->node);
|
||||
tbl = pci->table_group->tables[0];
|
||||
iommu_table_setparms_lpar(pci->phb, pdn, tbl,
|
||||
pci->table_group, dma_window);
|
||||
|
||||
iommu_table_setparms_common(tbl, pci->phb->bus->number,
|
||||
be32_to_cpu(prop.liobn),
|
||||
be64_to_cpu(prop.dma_base),
|
||||
1ULL << be32_to_cpu(prop.window_shift),
|
||||
be32_to_cpu(prop.tce_shift), NULL,
|
||||
&iommu_table_lpar_multi_ops);
|
||||
|
||||
/* Only for normal boot with default window. Doesn't matter even
|
||||
* if we set these with DDW which is 64bit during kdump, since
|
||||
* these will not be used during kdump.
|
||||
*/
|
||||
pci->table_group->tce32_start = be64_to_cpu(prop.dma_base);
|
||||
pci->table_group->tce32_size = 1 << be32_to_cpu(prop.window_shift);
|
||||
|
||||
iommu_init_table(tbl, pci->phb->node, 0, 0);
|
||||
iommu_register_group(pci->table_group,
|
||||
|
@ -315,7 +315,6 @@ config AS_HAS_OPTION_ARCH
|
||||
# https://reviews.llvm.org/D123515
|
||||
def_bool y
|
||||
depends on $(as-instr, .option arch$(comma) +m)
|
||||
depends on !$(as-instr, .option arch$(comma) -i)
|
||||
|
||||
source "arch/riscv/Kconfig.socs"
|
||||
source "arch/riscv/Kconfig.errata"
|
||||
|
@ -424,6 +424,7 @@
|
||||
# define CSR_STATUS CSR_MSTATUS
|
||||
# define CSR_IE CSR_MIE
|
||||
# define CSR_TVEC CSR_MTVEC
|
||||
# define CSR_ENVCFG CSR_MENVCFG
|
||||
# define CSR_SCRATCH CSR_MSCRATCH
|
||||
# define CSR_EPC CSR_MEPC
|
||||
# define CSR_CAUSE CSR_MCAUSE
|
||||
@ -448,6 +449,7 @@
|
||||
# define CSR_STATUS CSR_SSTATUS
|
||||
# define CSR_IE CSR_SIE
|
||||
# define CSR_TVEC CSR_STVEC
|
||||
# define CSR_ENVCFG CSR_SENVCFG
|
||||
# define CSR_SCRATCH CSR_SSCRATCH
|
||||
# define CSR_EPC CSR_SEPC
|
||||
# define CSR_CAUSE CSR_SCAUSE
|
||||
|
@ -25,6 +25,11 @@
|
||||
|
||||
#define ARCH_SUPPORTS_FTRACE_OPS 1
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
extern void *return_address(unsigned int level);
|
||||
|
||||
#define ftrace_return_address(n) return_address(n)
|
||||
|
||||
void MCOUNT_NAME(void);
|
||||
static inline unsigned long ftrace_call_adjust(unsigned long addr)
|
||||
{
|
||||
|
@ -11,8 +11,10 @@ static inline void arch_clear_hugepage_flags(struct page *page)
|
||||
}
|
||||
#define arch_clear_hugepage_flags arch_clear_hugepage_flags
|
||||
|
||||
#ifdef CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION
|
||||
bool arch_hugetlb_migration_supported(struct hstate *h);
|
||||
#define arch_hugetlb_migration_supported arch_hugetlb_migration_supported
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RISCV_ISA_SVNAPOT
|
||||
#define __HAVE_ARCH_HUGE_PTE_CLEAR
|
||||
|
@ -81,6 +81,8 @@
|
||||
#define RISCV_ISA_EXT_ZTSO 72
|
||||
#define RISCV_ISA_EXT_ZACAS 73
|
||||
|
||||
#define RISCV_ISA_EXT_XLINUXENVCFG 127
|
||||
|
||||
#define RISCV_ISA_EXT_MAX 128
|
||||
#define RISCV_ISA_EXT_INVALID U32_MAX
|
||||
|
||||
|
@ -95,7 +95,13 @@ static inline void pud_free(struct mm_struct *mm, pud_t *pud)
|
||||
__pud_free(mm, pud);
|
||||
}
|
||||
|
||||
#define __pud_free_tlb(tlb, pud, addr) pud_free((tlb)->mm, pud)
|
||||
#define __pud_free_tlb(tlb, pud, addr) \
|
||||
do { \
|
||||
if (pgtable_l4_enabled) { \
|
||||
pagetable_pud_dtor(virt_to_ptdesc(pud)); \
|
||||
tlb_remove_page_ptdesc((tlb), virt_to_ptdesc(pud)); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define p4d_alloc_one p4d_alloc_one
|
||||
static inline p4d_t *p4d_alloc_one(struct mm_struct *mm, unsigned long addr)
|
||||
@ -124,7 +130,11 @@ static inline void p4d_free(struct mm_struct *mm, p4d_t *p4d)
|
||||
__p4d_free(mm, p4d);
|
||||
}
|
||||
|
||||
#define __p4d_free_tlb(tlb, p4d, addr) p4d_free((tlb)->mm, p4d)
|
||||
#define __p4d_free_tlb(tlb, p4d, addr) \
|
||||
do { \
|
||||
if (pgtable_l5_enabled) \
|
||||
tlb_remove_page_ptdesc((tlb), virt_to_ptdesc(p4d)); \
|
||||
} while (0)
|
||||
#endif /* __PAGETABLE_PMD_FOLDED */
|
||||
|
||||
static inline void sync_kernel_mappings(pgd_t *pgd)
|
||||
@ -149,7 +159,11 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm)
|
||||
|
||||
#ifndef __PAGETABLE_PMD_FOLDED
|
||||
|
||||
#define __pmd_free_tlb(tlb, pmd, addr) pmd_free((tlb)->mm, pmd)
|
||||
#define __pmd_free_tlb(tlb, pmd, addr) \
|
||||
do { \
|
||||
pagetable_pmd_dtor(virt_to_ptdesc(pmd)); \
|
||||
tlb_remove_page_ptdesc((tlb), virt_to_ptdesc(pmd)); \
|
||||
} while (0)
|
||||
|
||||
#endif /* __PAGETABLE_PMD_FOLDED */
|
||||
|
||||
|
@ -136,7 +136,7 @@ enum napot_cont_order {
|
||||
* 10010 - IO Strongly-ordered, Non-cacheable, Non-bufferable, Shareable, Non-trustable
|
||||
*/
|
||||
#define _PAGE_PMA_THEAD ((1UL << 62) | (1UL << 61) | (1UL << 60))
|
||||
#define _PAGE_NOCACHE_THEAD ((1UL < 61) | (1UL << 60))
|
||||
#define _PAGE_NOCACHE_THEAD ((1UL << 61) | (1UL << 60))
|
||||
#define _PAGE_IO_THEAD ((1UL << 63) | (1UL << 60))
|
||||
#define _PAGE_MTMASK_THEAD (_PAGE_PMA_THEAD | _PAGE_IO_THEAD | (1UL << 59))
|
||||
|
||||
|
@ -84,7 +84,7 @@
|
||||
* Define vmemmap for pfn_to_page & page_to_pfn calls. Needed if kernel
|
||||
* is configured with CONFIG_SPARSEMEM_VMEMMAP enabled.
|
||||
*/
|
||||
#define vmemmap ((struct page *)VMEMMAP_START)
|
||||
#define vmemmap ((struct page *)VMEMMAP_START - (phys_ram_base >> PAGE_SHIFT))
|
||||
|
||||
#define PCI_IO_SIZE SZ_16M
|
||||
#define PCI_IO_END VMEMMAP_START
|
||||
@ -439,6 +439,10 @@ static inline pte_t pte_mkhuge(pte_t pte)
|
||||
return pte;
|
||||
}
|
||||
|
||||
#define pte_leaf_size(pte) (pte_napot(pte) ? \
|
||||
napot_cont_size(napot_cont_order(pte)) :\
|
||||
PAGE_SIZE)
|
||||
|
||||
#ifdef CONFIG_NUMA_BALANCING
|
||||
/*
|
||||
* See the comment in include/asm-generic/pgtable.h
|
||||
|
@ -14,6 +14,7 @@ struct suspend_context {
|
||||
struct pt_regs regs;
|
||||
/* Saved and restored by high-level functions */
|
||||
unsigned long scratch;
|
||||
unsigned long envcfg;
|
||||
unsigned long tvec;
|
||||
unsigned long ie;
|
||||
#ifdef CONFIG_MMU
|
||||
|
@ -19,65 +19,6 @@ static inline bool arch_vmap_pmd_supported(pgprot_t prot)
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_RISCV_ISA_SVNAPOT
|
||||
#include <linux/pgtable.h>
|
||||
#endif
|
||||
|
||||
#define arch_vmap_pte_range_map_size arch_vmap_pte_range_map_size
|
||||
static inline unsigned long arch_vmap_pte_range_map_size(unsigned long addr, unsigned long end,
|
||||
u64 pfn, unsigned int max_page_shift)
|
||||
{
|
||||
unsigned long map_size = PAGE_SIZE;
|
||||
unsigned long size, order;
|
||||
|
||||
if (!has_svnapot())
|
||||
return map_size;
|
||||
|
||||
for_each_napot_order_rev(order) {
|
||||
if (napot_cont_shift(order) > max_page_shift)
|
||||
continue;
|
||||
|
||||
size = napot_cont_size(order);
|
||||
if (end - addr < size)
|
||||
continue;
|
||||
|
||||
if (!IS_ALIGNED(addr, size))
|
||||
continue;
|
||||
|
||||
if (!IS_ALIGNED(PFN_PHYS(pfn), size))
|
||||
continue;
|
||||
|
||||
map_size = size;
|
||||
break;
|
||||
}
|
||||
|
||||
return map_size;
|
||||
}
|
||||
|
||||
#define arch_vmap_pte_supported_shift arch_vmap_pte_supported_shift
|
||||
static inline int arch_vmap_pte_supported_shift(unsigned long size)
|
||||
{
|
||||
int shift = PAGE_SHIFT;
|
||||
unsigned long order;
|
||||
|
||||
if (!has_svnapot())
|
||||
return shift;
|
||||
|
||||
WARN_ON_ONCE(size >= PMD_SIZE);
|
||||
|
||||
for_each_napot_order_rev(order) {
|
||||
if (napot_cont_size(order) > size)
|
||||
continue;
|
||||
|
||||
if (!IS_ALIGNED(size, napot_cont_size(order)))
|
||||
continue;
|
||||
|
||||
shift = napot_cont_shift(order);
|
||||
break;
|
||||
}
|
||||
|
||||
return shift;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_RISCV_ISA_SVNAPOT */
|
||||
#endif /* CONFIG_HAVE_ARCH_HUGE_VMAP */
|
||||
#endif /* _ASM_RISCV_VMALLOC_H */
|
||||
|
@ -7,6 +7,7 @@ ifdef CONFIG_FTRACE
|
||||
CFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE)
|
||||
CFLAGS_REMOVE_patch.o = $(CC_FLAGS_FTRACE)
|
||||
CFLAGS_REMOVE_sbi.o = $(CC_FLAGS_FTRACE)
|
||||
CFLAGS_REMOVE_return_address.o = $(CC_FLAGS_FTRACE)
|
||||
endif
|
||||
CFLAGS_syscall_table.o += $(call cc-option,-Wno-override-init,)
|
||||
CFLAGS_compat_syscall_table.o += $(call cc-option,-Wno-override-init,)
|
||||
@ -46,6 +47,7 @@ obj-y += irq.o
|
||||
obj-y += process.o
|
||||
obj-y += ptrace.o
|
||||
obj-y += reset.o
|
||||
obj-y += return_address.o
|
||||
obj-y += setup.o
|
||||
obj-y += signal.o
|
||||
obj-y += syscall_table.o
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <asm/hwprobe.h>
|
||||
#include <asm/patch.h>
|
||||
#include <asm/processor.h>
|
||||
#include <asm/sbi.h>
|
||||
#include <asm/vector.h>
|
||||
|
||||
#include "copy-unaligned.h"
|
||||
@ -201,6 +202,16 @@ static const unsigned int riscv_zvbb_exts[] = {
|
||||
RISCV_ISA_EXT_ZVKB
|
||||
};
|
||||
|
||||
/*
|
||||
* While the [ms]envcfg CSRs were not defined until version 1.12 of the RISC-V
|
||||
* privileged ISA, the existence of the CSRs is implied by any extension which
|
||||
* specifies [ms]envcfg bit(s). Hence, we define a custom ISA extension for the
|
||||
* existence of the CSR, and treat it as a subset of those other extensions.
|
||||
*/
|
||||
static const unsigned int riscv_xlinuxenvcfg_exts[] = {
|
||||
RISCV_ISA_EXT_XLINUXENVCFG
|
||||
};
|
||||
|
||||
/*
|
||||
* The canonical order of ISA extension names in the ISA string is defined in
|
||||
* chapter 27 of the unprivileged specification.
|
||||
@ -250,8 +261,8 @@ const struct riscv_isa_ext_data riscv_isa_ext[] = {
|
||||
__RISCV_ISA_EXT_DATA(c, RISCV_ISA_EXT_c),
|
||||
__RISCV_ISA_EXT_DATA(v, RISCV_ISA_EXT_v),
|
||||
__RISCV_ISA_EXT_DATA(h, RISCV_ISA_EXT_h),
|
||||
__RISCV_ISA_EXT_DATA(zicbom, RISCV_ISA_EXT_ZICBOM),
|
||||
__RISCV_ISA_EXT_DATA(zicboz, RISCV_ISA_EXT_ZICBOZ),
|
||||
__RISCV_ISA_EXT_SUPERSET(zicbom, RISCV_ISA_EXT_ZICBOM, riscv_xlinuxenvcfg_exts),
|
||||
__RISCV_ISA_EXT_SUPERSET(zicboz, RISCV_ISA_EXT_ZICBOZ, riscv_xlinuxenvcfg_exts),
|
||||
__RISCV_ISA_EXT_DATA(zicntr, RISCV_ISA_EXT_ZICNTR),
|
||||
__RISCV_ISA_EXT_DATA(zicond, RISCV_ISA_EXT_ZICOND),
|
||||
__RISCV_ISA_EXT_DATA(zicsr, RISCV_ISA_EXT_ZICSR),
|
||||
@ -538,6 +549,20 @@ static void __init riscv_fill_hwcap_from_isa_string(unsigned long *isa2hwcap)
|
||||
set_bit(RISCV_ISA_EXT_ZIHPM, isainfo->isa);
|
||||
}
|
||||
|
||||
/*
|
||||
* "V" in ISA strings is ambiguous in practice: it should mean
|
||||
* just the standard V-1.0 but vendors aren't well behaved.
|
||||
* Many vendors with T-Head CPU cores which implement the 0.7.1
|
||||
* version of the vector specification put "v" into their DTs.
|
||||
* CPU cores with the ratified spec will contain non-zero
|
||||
* marchid.
|
||||
*/
|
||||
if (acpi_disabled && riscv_cached_mvendorid(cpu) == THEAD_VENDOR_ID &&
|
||||
riscv_cached_marchid(cpu) == 0x0) {
|
||||
this_hwcap &= ~isa2hwcap[RISCV_ISA_EXT_v];
|
||||
clear_bit(RISCV_ISA_EXT_v, isainfo->isa);
|
||||
}
|
||||
|
||||
/*
|
||||
* All "okay" hart should have same isa. Set HWCAP based on
|
||||
* common capabilities of every "okay" hart, in case they don't
|
||||
@ -950,7 +975,7 @@ arch_initcall(check_unaligned_access_all_cpus);
|
||||
void riscv_user_isa_enable(void)
|
||||
{
|
||||
if (riscv_cpu_has_extension_unlikely(smp_processor_id(), RISCV_ISA_EXT_ZICBOZ))
|
||||
csr_set(CSR_SENVCFG, ENVCFG_CBZE);
|
||||
csr_set(CSR_ENVCFG, ENVCFG_CBZE);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_RISCV_ALTERNATIVE
|
||||
|
48
arch/riscv/kernel/return_address.c
Normal file
48
arch/riscv/kernel/return_address.c
Normal file
@ -0,0 +1,48 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* This code come from arch/arm64/kernel/return_address.c
|
||||
*
|
||||
* Copyright (C) 2023 SiFive.
|
||||
*/
|
||||
|
||||
#include <linux/export.h>
|
||||
#include <linux/kprobes.h>
|
||||
#include <linux/stacktrace.h>
|
||||
|
||||
struct return_address_data {
|
||||
unsigned int level;
|
||||
void *addr;
|
||||
};
|
||||
|
||||
static bool save_return_addr(void *d, unsigned long pc)
|
||||
{
|
||||
struct return_address_data *data = d;
|
||||
|
||||
if (!data->level) {
|
||||
data->addr = (void *)pc;
|
||||
return false;
|
||||
}
|
||||
|
||||
--data->level;
|
||||
|
||||
return true;
|
||||
}
|
||||
NOKPROBE_SYMBOL(save_return_addr);
|
||||
|
||||
noinline void *return_address(unsigned int level)
|
||||
{
|
||||
struct return_address_data data;
|
||||
|
||||
data.level = level + 3;
|
||||
data.addr = NULL;
|
||||
|
||||
arch_stack_walk(save_return_addr, &data, current, NULL);
|
||||
|
||||
if (!data.level)
|
||||
return data.addr;
|
||||
else
|
||||
return NULL;
|
||||
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(return_address);
|
||||
NOKPROBE_SYMBOL(return_address);
|
@ -42,10 +42,6 @@
|
||||
|
||||
static DECLARE_COMPLETION(cpu_running);
|
||||
|
||||
void __init smp_prepare_boot_cpu(void)
|
||||
{
|
||||
}
|
||||
|
||||
void __init smp_prepare_cpus(unsigned int max_cpus)
|
||||
{
|
||||
int cpuid;
|
||||
|
@ -15,6 +15,8 @@
|
||||
void suspend_save_csrs(struct suspend_context *context)
|
||||
{
|
||||
context->scratch = csr_read(CSR_SCRATCH);
|
||||
if (riscv_cpu_has_extension_unlikely(smp_processor_id(), RISCV_ISA_EXT_XLINUXENVCFG))
|
||||
context->envcfg = csr_read(CSR_ENVCFG);
|
||||
context->tvec = csr_read(CSR_TVEC);
|
||||
context->ie = csr_read(CSR_IE);
|
||||
|
||||
@ -36,6 +38,8 @@ void suspend_save_csrs(struct suspend_context *context)
|
||||
void suspend_restore_csrs(struct suspend_context *context)
|
||||
{
|
||||
csr_write(CSR_SCRATCH, context->scratch);
|
||||
if (riscv_cpu_has_extension_unlikely(smp_processor_id(), RISCV_ISA_EXT_XLINUXENVCFG))
|
||||
csr_write(CSR_ENVCFG, context->envcfg);
|
||||
csr_write(CSR_TVEC, context->tvec);
|
||||
csr_write(CSR_IE, context->ie);
|
||||
|
||||
|
@ -30,14 +30,8 @@ enum rv_vdso_map {
|
||||
|
||||
#define VVAR_SIZE (VVAR_NR_PAGES << PAGE_SHIFT)
|
||||
|
||||
/*
|
||||
* The vDSO data page.
|
||||
*/
|
||||
static union {
|
||||
struct vdso_data data;
|
||||
u8 page[PAGE_SIZE];
|
||||
} vdso_data_store __page_aligned_data;
|
||||
struct vdso_data *vdso_data = &vdso_data_store.data;
|
||||
static union vdso_data_store vdso_data_store __page_aligned_data;
|
||||
struct vdso_data *vdso_data = vdso_data_store.data;
|
||||
|
||||
struct __vdso_info {
|
||||
const char *name;
|
||||
|
@ -426,10 +426,12 @@ bool __init arch_hugetlb_valid_size(unsigned long size)
|
||||
return __hugetlb_valid_size(size);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION
|
||||
bool arch_hugetlb_migration_supported(struct hstate *h)
|
||||
{
|
||||
return __hugetlb_valid_size(huge_page_size(h));
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CONTIG_ALLOC
|
||||
static __init int gigantic_pages_init(void)
|
||||
|
@ -880,4 +880,3 @@ CONFIG_ATOMIC64_SELFTEST=y
|
||||
CONFIG_STRING_SELFTEST=y
|
||||
CONFIG_TEST_BITOPS=m
|
||||
CONFIG_TEST_BPF=m
|
||||
CONFIG_TEST_LIVEPATCH=m
|
||||
|
@ -808,4 +808,3 @@ CONFIG_KPROBES_SANITY_TEST=m
|
||||
CONFIG_PERCPU_TEST=m
|
||||
CONFIG_ATOMIC64_SELFTEST=y
|
||||
CONFIG_TEST_BPF=m
|
||||
CONFIG_TEST_LIVEPATCH=m
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user