Commit 435a7743 authored by Jonathan Corbet's avatar Jonathan Corbet

Merge branch 'mauro' into docs-next

A big set of fixes and RST conversions from Mauro.  He swears that this is
the last RST conversion set, which is certainly cause for celebration.
parents 0b227076 4ac25081
...@@ -8,7 +8,7 @@ Description: ...@@ -8,7 +8,7 @@ Description:
to device min/max capabilities. Values are integer as they are to device min/max capabilities. Values are integer as they are
stored in a 8bit register in the device. Lowest value is stored in a 8bit register in the device. Lowest value is
automatically put to TL. Once set, alarms could be search at automatically put to TL. Once set, alarms could be search at
master level, refer to Documentation/w1/w1_generic.rst for master level, refer to Documentation/w1/w1-generic.rst for
detailed information detailed information
Users: any user space application which wants to communicate with Users: any user space application which wants to communicate with
w1_term device w1_term device
......
...@@ -265,7 +265,7 @@ Set the DMA mask size ...@@ -265,7 +265,7 @@ Set the DMA mask size
--------------------- ---------------------
.. note:: .. note::
If anything below doesn't make sense, please refer to If anything below doesn't make sense, please refer to
Documentation/DMA-API.txt. This section is just a reminder that :doc:`/core-api/dma-api`. This section is just a reminder that
drivers need to indicate DMA capabilities of the device and is not drivers need to indicate DMA capabilities of the device and is not
an authoritative source for DMA interfaces. an authoritative source for DMA interfaces.
...@@ -291,7 +291,7 @@ Many 64-bit "PCI" devices (before PCI-X) and some PCI-X devices are ...@@ -291,7 +291,7 @@ Many 64-bit "PCI" devices (before PCI-X) and some PCI-X devices are
Setup shared control data Setup shared control data
------------------------- -------------------------
Once the DMA masks are set, the driver can allocate "consistent" (a.k.a. shared) Once the DMA masks are set, the driver can allocate "consistent" (a.k.a. shared)
memory. See Documentation/DMA-API.txt for a full description of memory. See :doc:`/core-api/dma-api` for a full description of
the DMA APIs. This section is just a reminder that it needs to be done the DMA APIs. This section is just a reminder that it needs to be done
before enabling DMA on the device. before enabling DMA on the device.
...@@ -421,7 +421,7 @@ owners if there is one. ...@@ -421,7 +421,7 @@ owners if there is one.
Then clean up "consistent" buffers which contain the control data. Then clean up "consistent" buffers which contain the control data.
See Documentation/DMA-API.txt for details on unmapping interfaces. See :doc:`/core-api/dma-api` for details on unmapping interfaces.
Unregister from other subsystems Unregister from other subsystems
......
...@@ -101,37 +101,48 @@ be specified in bytes with optional scale suffix [kKmMgG]. The default huge ...@@ -101,37 +101,48 @@ be specified in bytes with optional scale suffix [kKmMgG]. The default huge
page size may be selected with the "default_hugepagesz=<size>" boot parameter. page size may be selected with the "default_hugepagesz=<size>" boot parameter.
Hugetlb boot command line parameter semantics Hugetlb boot command line parameter semantics
hugepagesz - Specify a huge page size. Used in conjunction with hugepages
hugepagesz
Specify a huge page size. Used in conjunction with hugepages
parameter to preallocate a number of huge pages of the specified parameter to preallocate a number of huge pages of the specified
size. Hence, hugepagesz and hugepages are typically specified in size. Hence, hugepagesz and hugepages are typically specified in
pairs such as: pairs such as::
hugepagesz=2M hugepages=512 hugepagesz=2M hugepages=512
hugepagesz can only be specified once on the command line for a hugepagesz can only be specified once on the command line for a
specific huge page size. Valid huge page sizes are architecture specific huge page size. Valid huge page sizes are architecture
dependent. dependent.
hugepages - Specify the number of huge pages to preallocate. This typically hugepages
Specify the number of huge pages to preallocate. This typically
follows a valid hugepagesz or default_hugepagesz parameter. However, follows a valid hugepagesz or default_hugepagesz parameter. However,
if hugepages is the first or only hugetlb command line parameter it if hugepages is the first or only hugetlb command line parameter it
implicitly specifies the number of huge pages of default size to implicitly specifies the number of huge pages of default size to
allocate. If the number of huge pages of default size is implicitly allocate. If the number of huge pages of default size is implicitly
specified, it can not be overwritten by a hugepagesz,hugepages specified, it can not be overwritten by a hugepagesz,hugepages
parameter pair for the default size. parameter pair for the default size.
For example, on an architecture with 2M default huge page size:
For example, on an architecture with 2M default huge page size::
hugepages=256 hugepagesz=2M hugepages=512 hugepages=256 hugepagesz=2M hugepages=512
will result in 256 2M huge pages being allocated and a warning message will result in 256 2M huge pages being allocated and a warning message
indicating that the hugepages=512 parameter is ignored. If a hugepages indicating that the hugepages=512 parameter is ignored. If a hugepages
parameter is preceded by an invalid hugepagesz parameter, it will parameter is preceded by an invalid hugepagesz parameter, it will
be ignored. be ignored.
default_hugepagesz - Specify the default huge page size. This parameter can default_hugepagesz
pecify the default huge page size. This parameter can
only be specified once on the command line. default_hugepagesz can only be specified once on the command line. default_hugepagesz can
optionally be followed by the hugepages parameter to preallocate a optionally be followed by the hugepages parameter to preallocate a
specific number of huge pages of default size. The number of default specific number of huge pages of default size. The number of default
sized huge pages to preallocate can also be implicitly specified as sized huge pages to preallocate can also be implicitly specified as
mentioned in the hugepages section above. Therefore, on an mentioned in the hugepages section above. Therefore, on an
architecture with 2M default huge page size: architecture with 2M default huge page size::
hugepages=256 hugepages=256
default_hugepagesz=2M hugepages=256 default_hugepagesz=2M hugepages=256
hugepages=256 default_hugepagesz=2M hugepages=256 default_hugepagesz=2M
will all result in 256 2M huge pages being allocated. Valid default will all result in 256 2M huge pages being allocated. Valid default
huge page size is architecture dependent. huge page size is architecture dependent.
......
...@@ -31,6 +31,7 @@ the Linux memory management. ...@@ -31,6 +31,7 @@ the Linux memory management.
idle_page_tracking idle_page_tracking
ksm ksm
memory-hotplug memory-hotplug
nommu-map
numa_memory_policy numa_memory_policy
numaperf numaperf
pagemap pagemap
......
...@@ -583,7 +583,7 @@ trimming of allocations is initiated. ...@@ -583,7 +583,7 @@ trimming of allocations is initiated.
The default value is 1. The default value is 1.
See Documentation/nommu-mmap.txt for more information. See Documentation/admin-guide/mm/nommu-mmap.rst for more information.
numa_zonelist_order numa_zonelist_order
......
...@@ -128,7 +128,7 @@ it. The recommended placement is in the first 16KiB of RAM. ...@@ -128,7 +128,7 @@ it. The recommended placement is in the first 16KiB of RAM.
The boot loader must load a device tree image (dtb) into system ram The boot loader must load a device tree image (dtb) into system ram
at a 64bit aligned address and initialize it with the boot data. The at a 64bit aligned address and initialize it with the boot data. The
dtb format is documented in Documentation/devicetree/booting-without-of.txt. dtb format is documented in Documentation/devicetree/booting-without-of.rst.
The kernel will look for the dtb magic value of 0xd00dfeed at the dtb The kernel will look for the dtb magic value of 0xd00dfeed at the dtb
physical address to determine if a dtb has been passed instead of a physical address to determine if a dtb has been passed instead of a
tagged list. tagged list.
......
...@@ -196,7 +196,7 @@ a virtual address mapping (unlike the earlier scheme of virtual address ...@@ -196,7 +196,7 @@ a virtual address mapping (unlike the earlier scheme of virtual address
do not have a corresponding kernel virtual address space mapping) and do not have a corresponding kernel virtual address space mapping) and
low-memory pages. low-memory pages.
Note: Please refer to Documentation/DMA-API-HOWTO.txt for a discussion Note: Please refer to :doc:`/core-api/dma-api-howto` for a discussion
on PCI high mem DMA aspects and mapping of scatter gather lists, and support on PCI high mem DMA aspects and mapping of scatter gather lists, and support
for 64 bit PCI. for 64 bit PCI.
......
...@@ -8,7 +8,7 @@ How to access I/O mapped memory from within device drivers ...@@ -8,7 +8,7 @@ How to access I/O mapped memory from within device drivers
The virt_to_bus() and bus_to_virt() functions have been The virt_to_bus() and bus_to_virt() functions have been
superseded by the functionality provided by the PCI DMA interface superseded by the functionality provided by the PCI DMA interface
(see Documentation/DMA-API-HOWTO.txt). They continue (see :doc:`/core-api/dma-api-howto`). They continue
to be documented below for historical purposes, but new code to be documented below for historical purposes, but new code
must not use them. --davidm 00/12/12 must not use them. --davidm 00/12/12
......
...@@ -5,7 +5,7 @@ Dynamic DMA mapping using the generic device ...@@ -5,7 +5,7 @@ Dynamic DMA mapping using the generic device
:Author: James E.J. Bottomley <James.Bottomley@HansenPartnership.com> :Author: James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
This document describes the DMA API. For a more gentle introduction This document describes the DMA API. For a more gentle introduction
of the API (and actual examples), see Documentation/DMA-API-HOWTO.txt. of the API (and actual examples), see :doc:`/core-api/dma-api-howto`.
This API is split into two pieces. Part I describes the basic API. This API is split into two pieces. Part I describes the basic API.
Part II describes extensions for supporting non-consistent memory Part II describes extensions for supporting non-consistent memory
...@@ -471,7 +471,7 @@ without the _attrs suffixes, except that they pass an optional ...@@ -471,7 +471,7 @@ without the _attrs suffixes, except that they pass an optional
dma_attrs. dma_attrs.
The interpretation of DMA attributes is architecture-specific, and The interpretation of DMA attributes is architecture-specific, and
each attribute should be documented in Documentation/DMA-attributes.txt. each attribute should be documented in :doc:`/core-api/dma-attributes`.
If dma_attrs are 0, the semantics of each of these functions If dma_attrs are 0, the semantics of each of these functions
is identical to those of the corresponding function is identical to those of the corresponding function
...@@ -484,7 +484,7 @@ for DMA:: ...@@ -484,7 +484,7 @@ for DMA::
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
/* DMA_ATTR_FOO should be defined in linux/dma-mapping.h and /* DMA_ATTR_FOO should be defined in linux/dma-mapping.h and
* documented in Documentation/DMA-attributes.txt */ * documented in Documentation/core-api/dma-attributes.rst */
... ...
unsigned long attr; unsigned long attr;
......
...@@ -17,7 +17,7 @@ To do ISA style DMA you need to include two headers:: ...@@ -17,7 +17,7 @@ To do ISA style DMA you need to include two headers::
#include <asm/dma.h> #include <asm/dma.h>
The first is the generic DMA API used to convert virtual addresses to The first is the generic DMA API used to convert virtual addresses to
bus addresses (see Documentation/DMA-API.txt for details). bus addresses (see :doc:`/core-api/dma-api` for details).
The second contains the routines specific to ISA DMA transfers. Since The second contains the routines specific to ISA DMA transfers. Since
this is not present on all platforms make sure you construct your this is not present on all platforms make sure you construct your
......
...@@ -39,6 +39,8 @@ Library functionality that is used throughout the kernel. ...@@ -39,6 +39,8 @@ Library functionality that is used throughout the kernel.
rbtree rbtree
generic-radix-tree generic-radix-tree
packing packing
bus-virt-phys-mapping
this_cpu_ops
timekeeping timekeeping
errseq errseq
...@@ -82,6 +84,7 @@ more memory-management documentation in :doc:`/vm/index`. ...@@ -82,6 +84,7 @@ more memory-management documentation in :doc:`/vm/index`.
:maxdepth: 1 :maxdepth: 1
memory-allocation memory-allocation
unaligned-memory-access
dma-api dma-api
dma-api-howto dma-api-howto
dma-attributes dma-attributes
......
...@@ -15,3 +15,4 @@ Open Firmware and Device Tree ...@@ -15,3 +15,4 @@ Open Firmware and Device Tree
overlay-notes overlay-notes
bindings/index bindings/index
booting-without-of
...@@ -228,8 +228,6 @@ over management of devices from the bootloader, the usage of sync_state() is ...@@ -228,8 +228,6 @@ over management of devices from the bootloader, the usage of sync_state() is
not restricted to that. Use it whenever it makes sense to take an action after not restricted to that. Use it whenever it makes sense to take an action after
all the consumers of a device have probed:: all the consumers of a device have probed::
::
int (*remove) (struct device *dev); int (*remove) (struct device *dev);
remove is called to unbind a driver from a device. This may be remove is called to unbind a driver from a device. This may be
......
...@@ -48,6 +48,7 @@ available subsections can be seen below. ...@@ -48,6 +48,7 @@ available subsections can be seen below.
scsi scsi
libata libata
target target
mailbox
mtdnand mtdnand
miscellaneous miscellaneous
mei/index mei/index
......
...@@ -10,7 +10,7 @@ API overview ...@@ -10,7 +10,7 @@ API overview
The big picture is that USB drivers can continue to ignore most DMA issues, The big picture is that USB drivers can continue to ignore most DMA issues,
though they still must provide DMA-ready buffers (see though they still must provide DMA-ready buffers (see
``Documentation/DMA-API-HOWTO.txt``). That's how they've worked through :doc:`/core-api/dma-api-howto`). That's how they've worked through
the 2.4 (and earlier) kernels, or they can now be DMA-aware. the 2.4 (and earlier) kernels, or they can now be DMA-aware.
DMA-aware usb drivers: DMA-aware usb drivers:
...@@ -60,7 +60,7 @@ and effects like cache-trashing can impose subtle penalties. ...@@ -60,7 +60,7 @@ and effects like cache-trashing can impose subtle penalties.
force a consistent memory access ordering by using memory barriers. It's force a consistent memory access ordering by using memory barriers. It's
not using a streaming DMA mapping, so it's good for small transfers on not using a streaming DMA mapping, so it's good for small transfers on
systems where the I/O would otherwise thrash an IOMMU mapping. (See systems where the I/O would otherwise thrash an IOMMU mapping. (See
``Documentation/DMA-API-HOWTO.txt`` for definitions of "coherent" and :doc:`/core-api/dma-api-howto` for definitions of "coherent" and
"streaming" DMA mappings.) "streaming" DMA mappings.)
Asking for 1/Nth of a page (as well as asking for N pages) is reasonably Asking for 1/Nth of a page (as well as asking for N pages) is reasonably
...@@ -91,7 +91,7 @@ Working with existing buffers ...@@ -91,7 +91,7 @@ Working with existing buffers
Existing buffers aren't usable for DMA without first being mapped into the Existing buffers aren't usable for DMA without first being mapped into the
DMA address space of the device. However, most buffers passed to your DMA address space of the device. However, most buffers passed to your
driver can safely be used with such DMA mapping. (See the first section driver can safely be used with such DMA mapping. (See the first section
of Documentation/DMA-API-HOWTO.txt, titled "What memory is DMA-able?") of :doc:`/core-api/dma-api-howto`, titled "What memory is DMA-able?")
- When you're using scatterlists, you can map everything at once. On some - When you're using scatterlists, you can map everything at once. On some
systems, this kicks in an IOMMU and turns the scatterlists into single systems, this kicks in an IOMMU and turns the scatterlists into single
......
...@@ -2179,46 +2179,44 @@ subset=pid hides all top level files and directories in the procfs that ...@@ -2179,46 +2179,44 @@ subset=pid hides all top level files and directories in the procfs that
are not related to tasks. are not related to tasks.
5 Filesystem behavior 5 Filesystem behavior
---------------------------- ---------------------------
Originally, before the advent of pid namepsace, procfs was a global file Originally, before the advent of pid namepsace, procfs was a global file
system. It means that there was only one procfs instance in the system. system. It means that there was only one procfs instance in the system.
When pid namespace was added, a separate procfs instance was mounted in When pid namespace was added, a separate procfs instance was mounted in
each pid namespace. So, procfs mount options are global among all each pid namespace. So, procfs mount options are global among all
mountpoints within the same namespace. mountpoints within the same namespace::
::
# grep ^proc /proc/mounts # grep ^proc /proc/mounts
proc /proc proc rw,relatime,hidepid=2 0 0 proc /proc proc rw,relatime,hidepid=2 0 0
# strace -e mount mount -o hidepid=1 -t proc proc /tmp/proc # strace -e mount mount -o hidepid=1 -t proc proc /tmp/proc
mount("proc", "/tmp/proc", "proc", 0, "hidepid=1") = 0 mount("proc", "/tmp/proc", "proc", 0, "hidepid=1") = 0
+++ exited with 0 +++ +++ exited with 0 +++
# grep ^proc /proc/mounts # grep ^proc /proc/mounts
proc /proc proc rw,relatime,hidepid=2 0 0 proc /proc proc rw,relatime,hidepid=2 0 0
proc /tmp/proc proc rw,relatime,hidepid=2 0 0 proc /tmp/proc proc rw,relatime,hidepid=2 0 0
and only after remounting procfs mount options will change at all and only after remounting procfs mount options will change at all
mountpoints. mountpoints::
# mount -o remount,hidepid=1 -t proc proc /tmp/proc # mount -o remount,hidepid=1 -t proc proc /tmp/proc
# grep ^proc /proc/mounts # grep ^proc /proc/mounts
proc /proc proc rw,relatime,hidepid=1 0 0 proc /proc proc rw,relatime,hidepid=1 0 0
proc /tmp/proc proc rw,relatime,hidepid=1 0 0 proc /tmp/proc proc rw,relatime,hidepid=1 0 0
This behavior is different from the behavior of other filesystems. This behavior is different from the behavior of other filesystems.
The new procfs behavior is more like other filesystems. Each procfs mount The new procfs behavior is more like other filesystems. Each procfs mount
creates a new procfs instance. Mount options affect own procfs instance. creates a new procfs instance. Mount options affect own procfs instance.
It means that it became possible to have several procfs instances It means that it became possible to have several procfs instances
displaying tasks with different filtering options in one pid namespace. displaying tasks with different filtering options in one pid namespace::
# mount -o hidepid=invisible -t proc proc /proc # mount -o hidepid=invisible -t proc proc /proc
# mount -o hidepid=noaccess -t proc proc /tmp/proc # mount -o hidepid=noaccess -t proc proc /tmp/proc
# grep ^proc /proc/mounts # grep ^proc /proc/mounts
proc /proc proc rw,relatime,hidepid=invisible 0 0 proc /proc proc rw,relatime,hidepid=invisible 0 0
proc /tmp/proc proc rw,relatime,hidepid=noaccess 0 0 proc /tmp/proc proc rw,relatime,hidepid=noaccess 0 0
...@@ -314,7 +314,7 @@ To use drm_gem_cma_get_unmapped_area(), drivers must fill the struct ...@@ -314,7 +314,7 @@ To use drm_gem_cma_get_unmapped_area(), drivers must fill the struct
a pointer on drm_gem_cma_get_unmapped_area(). a pointer on drm_gem_cma_get_unmapped_area().
More detailed information about get_unmapped_area can be found in More detailed information about get_unmapped_area can be found in
Documentation/nommu-mmap.txt Documentation/admin-guide/mm/nommu-mmap.rst
Memory Coherency Memory Coherency
---------------- ----------------
......
...@@ -87,6 +87,7 @@ Applications may chose a specific instance of the NX co-processor using ...@@ -87,6 +87,7 @@ Applications may chose a specific instance of the NX co-processor using
the vas_id field in the VAS_TX_WIN_OPEN ioctl as detailed below. the vas_id field in the VAS_TX_WIN_OPEN ioctl as detailed below.
A userspace library libnxz is available here but still in development: A userspace library libnxz is available here but still in development:
https://github.com/abalib/power-gzip https://github.com/abalib/power-gzip
Applications that use inflate / deflate calls can link with libnxz Applications that use inflate / deflate calls can link with libnxz
...@@ -110,6 +111,7 @@ Applications should use the VAS_TX_WIN_OPEN ioctl as follows to establish ...@@ -110,6 +111,7 @@ Applications should use the VAS_TX_WIN_OPEN ioctl as follows to establish
a connection with NX co-processor engine: a connection with NX co-processor engine:
:: ::
struct vas_tx_win_open_attr { struct vas_tx_win_open_attr {
__u32 version; __u32 version;
__s16 vas_id; /* specific instance of vas or -1 __s16 vas_id; /* specific instance of vas or -1
...@@ -119,8 +121,10 @@ a connection with NX co-processor engine: ...@@ -119,8 +121,10 @@ a connection with NX co-processor engine:
__u64 reserved2[6]; __u64 reserved2[6];
}; };
version: The version field must be currently set to 1. version:
vas_id: If '-1' is passed, kernel will make a best-effort attempt The version field must be currently set to 1.
vas_id:
If '-1' is passed, kernel will make a best-effort attempt
to assign an optimal instance of NX for the process. To to assign an optimal instance of NX for the process. To
select the specific VAS instance, refer select the specific VAS instance, refer
"Discovery of available VAS engines" section below. "Discovery of available VAS engines" section below.
...@@ -129,7 +133,8 @@ a connection with NX co-processor engine: ...@@ -129,7 +133,8 @@ a connection with NX co-processor engine:
and must be set to 0. and must be set to 0.
The attributes attr for the VAS_TX_WIN_OPEN ioctl are defined as The attributes attr for the VAS_TX_WIN_OPEN ioctl are defined as
follows: follows::
#define VAS_MAGIC 'v' #define VAS_MAGIC 'v'
#define VAS_TX_WIN_OPEN _IOW(VAS_MAGIC, 1, #define VAS_TX_WIN_OPEN _IOW(VAS_MAGIC, 1,
struct vas_tx_win_open_attr) struct vas_tx_win_open_attr)
...@@ -141,6 +146,8 @@ a connection with NX co-processor engine: ...@@ -141,6 +146,8 @@ a connection with NX co-processor engine:
returns -1 and sets the errno variable to indicate the error. returns -1 and sets the errno variable to indicate the error.
Error conditions: Error conditions:
====== ================================================
EINVAL fd does not refer to a valid VAS device. EINVAL fd does not refer to a valid VAS device.
EINVAL Invalid vas ID EINVAL Invalid vas ID
EINVAL version is not set with proper value EINVAL version is not set with proper value
...@@ -149,6 +156,7 @@ a connection with NX co-processor engine: ...@@ -149,6 +156,7 @@ a connection with NX co-processor engine:
ENOSPC System has too many active windows (connections) ENOSPC System has too many active windows (connections)
opened opened
EINVAL reserved fields are not set to 0. EINVAL reserved fields are not set to 0.
====== ================================================
See the ioctl(2) man page for more details, error codes and See the ioctl(2) man page for more details, error codes and
restrictions. restrictions.
...@@ -158,11 +166,13 @@ mmap() NX-GZIP device ...@@ -158,11 +166,13 @@ mmap() NX-GZIP device
The mmap() system call for a NX-GZIP device fd returns a paste_address The mmap() system call for a NX-GZIP device fd returns a paste_address
that the application can use to copy/paste its CRB to the hardware engines. that the application can use to copy/paste its CRB to the hardware engines.
:: ::
paste_addr = mmap(addr, size, prot, flags, fd, offset); paste_addr = mmap(addr, size, prot, flags, fd, offset);
Only restrictions on mmap for a NX-GZIP device fd are: Only restrictions on mmap for a NX-GZIP device fd are:
* size should be PAGE_SIZE * size should be PAGE_SIZE
* offset parameter should be 0ULL * offset parameter should be 0ULL
...@@ -170,10 +180,12 @@ that the application can use to copy/paste its CRB to the hardware engines. ...@@ -170,10 +180,12 @@ that the application can use to copy/paste its CRB to the hardware engines.
In addition to the error conditions listed on the mmap(2) man In addition to the error conditions listed on the mmap(2) man
page, can also fail with one of the following error codes: page, can also fail with one of the following error codes:
====== =============================================
EINVAL fd is not associated with an open window EINVAL fd is not associated with an open window
(i.e mmap() does not follow a successful call (i.e mmap() does not follow a successful call
to the VAS_TX_WIN_OPEN ioctl). to the VAS_TX_WIN_OPEN ioctl).
EINVAL offset field is not 0ULL. EINVAL offset field is not 0ULL.
====== =============================================
Discovery of available VAS engines Discovery of available VAS engines
================================== ==================================
...@@ -210,7 +222,7 @@ In case if NX encounters translation error (called NX page fault) on CSB ...@@ -210,7 +222,7 @@ In case if NX encounters translation error (called NX page fault) on CSB
address or any request buffer, raises an interrupt on the CPU to handle the address or any request buffer, raises an interrupt on the CPU to handle the
fault. Page fault can happen if an application passes invalid addresses or fault. Page fault can happen if an application passes invalid addresses or
request buffers are not in memory. The operating system handles the fault by request buffers are not in memory. The operating system handles the fault by
updating CSB with the following data: updating CSB with the following data::
csb.flags = CSB_V; csb.flags = CSB_V;
csb.cc = CSB_CC_TRANSLATION; csb.cc = CSB_CC_TRANSLATION;
...@@ -223,7 +235,7 @@ the application can resend this request to NX. ...@@ -223,7 +235,7 @@ the application can resend this request to NX.
If the OS can not update CSB due to invalid CSB address, sends SEGV signal If the OS can not update CSB due to invalid CSB address, sends SEGV signal
to the process who opened the send window on which the original request was to the process who opened the send window on which the original request was
issued. This signal returns with the following siginfo struct: issued. This signal returns with the following siginfo struct::
siginfo.si_signo = SIGSEGV; siginfo.si_signo = SIGSEGV;
siginfo.si_errno = EFAULT; siginfo.si_errno = EFAULT;
...@@ -248,6 +260,7 @@ Simple example ...@@ -248,6 +260,7 @@ Simple example
============== ==============
:: ::
int use_nx_gzip() int use_nx_gzip()
{ {
int rc, fd; int rc, fd;
......
...@@ -19,17 +19,41 @@ Unsorted Documentation ...@@ -19,17 +19,41 @@ Unsorted Documentation
Atomic Types Atomic Types
============ ============
.. raw:: latex
\footnotesize
.. include:: ../atomic_t.txt .. include:: ../atomic_t.txt
:literal: :literal:
.. raw:: latex
\normalsize
Atomic bitops Atomic bitops
============= =============
.. raw:: latex
\footnotesize
.. include:: ../atomic_bitops.txt .. include:: ../atomic_bitops.txt
:literal: :literal:
.. raw:: latex
\normalsize
Memory Barriers Memory Barriers
=============== ===============
.. raw:: latex
\footnotesize
.. include:: ../memory-barriers.txt .. include:: ../memory-barriers.txt
:literal: :literal:
.. raw:: latex
\normalsize
...@@ -22,6 +22,7 @@ Linux Tracing Technologies ...@@ -22,6 +22,7 @@ Linux Tracing Technologies
boottime-trace boottime-trace
hwlat_detector hwlat_detector
intel_th intel_th
ring-buffer-design
stm stm
sys-t sys-t
coresight/index coresight/index
...@@ -570,8 +570,8 @@ ACQUIRE 는 해당 오퍼레이션의 로드 부분에만 적용되고 RELEASE ...@@ -570,8 +570,8 @@ ACQUIRE 는 해당 오퍼레이션의 로드 부분에만 적용되고 RELEASE
[*] 버스 마스터링 DMA 와 일관성에 대해서는 다음을 참고하시기 바랍니다: [*] 버스 마스터링 DMA 와 일관성에 대해서는 다음을 참고하시기 바랍니다:
Documentation/driver-api/pci/pci.rst Documentation/driver-api/pci/pci.rst
Documentation/DMA-API-HOWTO.txt Documentation/core-api/dma-api-howto.rst
Documentation/DMA-API.txt Documentation/core-api/dma-api.rst
데이터 의존성 배리어 (역사적) 데이터 의존성 배리어 (역사적)
...@@ -1907,7 +1907,7 @@ Mandatory 배리어들은 SMP 시스템에서도 UP 시스템에서도 SMP 효 ...@@ -1907,7 +1907,7 @@ Mandatory 배리어들은 SMP 시스템에서도 UP 시스템에서도 SMP 효
writel_relaxed() 와 같은 완화된 I/O 접근자들에 대한 자세한 내용을 위해서는 writel_relaxed() 와 같은 완화된 I/O 접근자들에 대한 자세한 내용을 위해서는
"커널 I/O 배리어의 효과" 섹션을, consistent memory 에 대한 자세한 내용을 "커널 I/O 배리어의 효과" 섹션을, consistent memory 에 대한 자세한 내용을
위해선 Documentation/DMA-API.txt 문서를 참고하세요. 위해선 Documentation/core-api/dma-api.rst 문서를 참고하세요.
========================= =========================
......
...@@ -124,7 +124,7 @@ bootloader 必须传递一个系统内存的位置和最小值,以及根文件 ...@@ -124,7 +124,7 @@ bootloader 必须传递一个系统内存的位置和最小值,以及根文件
bootloader 必须以 64bit 地址对齐的形式加载一个设备树映像(dtb)到系统 bootloader 必须以 64bit 地址对齐的形式加载一个设备树映像(dtb)到系统
RAM 中,并用启动数据初始化它。dtb 格式在文档 RAM 中,并用启动数据初始化它。dtb 格式在文档
Documentation/devicetree/booting-without-of.txt 中。内核将会在 Documentation/devicetree/booting-without-of.rst 中。内核将会在
dtb 物理地址处查找 dtb 魔数值(0xd00dfeed),以确定 dtb 是否已经代替 dtb 物理地址处查找 dtb 魔数值(0xd00dfeed),以确定 dtb 是否已经代替
标签列表被传递进来。 标签列表被传递进来。
......
...@@ -147,7 +147,7 @@ config HAVE_EFFICIENT_UNALIGNED_ACCESS ...@@ -147,7 +147,7 @@ config HAVE_EFFICIENT_UNALIGNED_ACCESS
problems with received packets if doing so would not help problems with received packets if doing so would not help
much. much.
See Documentation/unaligned-memory-access.txt for more See Documentation/core-api/unaligned-memory-access.rst for more
information on the topic of unaligned memory accesses. information on the topic of unaligned memory accesses.
config ARCH_USE_BUILTIN_BSWAP config ARCH_USE_BUILTIN_BSWAP
......
...@@ -907,7 +907,7 @@ sba_mark_invalid(struct ioc *ioc, dma_addr_t iova, size_t byte_cnt) ...@@ -907,7 +907,7 @@ sba_mark_invalid(struct ioc *ioc, dma_addr_t iova, size_t byte_cnt)
* @dir: dma direction * @dir: dma direction
* @attrs: optional dma attributes * @attrs: optional dma attributes
* *
* See Documentation/DMA-API-HOWTO.txt * See Documentation/core-api/dma-api-howto.rst
*/ */
static dma_addr_t sba_map_page(struct device *dev, struct page *page, static dma_addr_t sba_map_page(struct device *dev, struct page *page,
unsigned long poff, size_t size, unsigned long poff, size_t size,
...@@ -1028,7 +1028,7 @@ sba_mark_clean(struct ioc *ioc, dma_addr_t iova, size_t size) ...@@ -1028,7 +1028,7 @@ sba_mark_clean(struct ioc *ioc, dma_addr_t iova, size_t size)
* @dir: R/W or both. * @dir: R/W or both.
* @attrs: optional dma attributes * @attrs: optional dma attributes
* *
* See Documentation/DMA-API-HOWTO.txt * See Documentation/core-api/dma-api-howto.rst
*/ */
static void sba_unmap_page(struct device *dev, dma_addr_t iova, size_t size, static void sba_unmap_page(struct device *dev, dma_addr_t iova, size_t size,
enum dma_data_direction dir, unsigned long attrs) enum dma_data_direction dir, unsigned long attrs)
...@@ -1105,7 +1105,7 @@ static void sba_unmap_page(struct device *dev, dma_addr_t iova, size_t size, ...@@ -1105,7 +1105,7 @@ static void sba_unmap_page(struct device *dev, dma_addr_t iova, size_t size,
* @size: number of bytes mapped in driver buffer. * @size: number of bytes mapped in driver buffer.
* @dma_handle: IOVA of new buffer. * @dma_handle: IOVA of new buffer.
* *
* See Documentation/DMA-API-HOWTO.txt * See Documentation/core-api/dma-api-howto.rst
*/ */
static void * static void *
sba_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, sba_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
...@@ -1162,7 +1162,7 @@ sba_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, ...@@ -1162,7 +1162,7 @@ sba_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
* @vaddr: virtual address IOVA of "consistent" buffer. * @vaddr: virtual address IOVA of "consistent" buffer.
* @dma_handler: IO virtual address of "consistent" buffer. * @dma_handler: IO virtual address of "consistent" buffer.
* *
* See Documentation/DMA-API-HOWTO.txt * See Documentation/core-api/dma-api-howto.rst
*/ */
static void sba_free_coherent(struct device *dev, size_t size, void *vaddr, static void sba_free_coherent(struct device *dev, size_t size, void *vaddr,
dma_addr_t dma_handle, unsigned long attrs) dma_addr_t dma_handle, unsigned long attrs)
...@@ -1425,7 +1425,7 @@ static void sba_unmap_sg_attrs(struct device *dev, struct scatterlist *sglist, ...@@ -1425,7 +1425,7 @@ static void sba_unmap_sg_attrs(struct device *dev, struct scatterlist *sglist,
* @dir: R/W or both. * @dir: R/W or both.
* @attrs: optional dma attributes * @attrs: optional dma attributes
* *
* See Documentation/DMA-API-HOWTO.txt * See Documentation/core-api/dma-api-howto.rst
*/ */
static int sba_map_sg_attrs(struct device *dev, struct scatterlist *sglist, static int sba_map_sg_attrs(struct device *dev, struct scatterlist *sglist,
int nents, enum dma_data_direction dir, int nents, enum dma_data_direction dir,
...@@ -1524,7 +1524,7 @@ static int sba_map_sg_attrs(struct device *dev, struct scatterlist *sglist, ...@@ -1524,7 +1524,7 @@ static int sba_map_sg_attrs(struct device *dev, struct scatterlist *sglist,
* @dir: R/W or both. * @dir: R/W or both.
* @attrs: optional dma attributes * @attrs: optional dma attributes
* *
* See Documentation/DMA-API-HOWTO.txt * See Documentation/core-api/dma-api-howto.rst
*/ */
static void sba_unmap_sg_attrs(struct device *dev, struct scatterlist *sglist, static void sba_unmap_sg_attrs(struct device *dev, struct scatterlist *sglist,
int nents, enum dma_data_direction dir, int nents, enum dma_data_direction dir,
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
** PARISC 1.1 Dynamic DMA mapping support. ** PARISC 1.1 Dynamic DMA mapping support.
** This implementation is for PA-RISC platforms that do not support ** This implementation is for PA-RISC platforms that do not support
** I/O TLBs (aka DMA address translation hardware). ** I/O TLBs (aka DMA address translation hardware).
** See Documentation/DMA-API-HOWTO.txt for interface definitions. ** See Documentation/core-api/dma-api-howto.rst for interface definitions.
** **
** (c) Copyright 1999,2000 Hewlett-Packard Company ** (c) Copyright 1999,2000 Hewlett-Packard Company
** (c) Copyright 2000 Grant Grundler ** (c) Copyright 2000 Grant Grundler
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
#define _ASM_X86_DMA_MAPPING_H #define _ASM_X86_DMA_MAPPING_H
/* /*
* IOMMU interface. See Documentation/DMA-API-HOWTO.txt and * IOMMU interface. See Documentation/core-api/dma-api-howto.rst and
* Documentation/DMA-API.txt for documentation. * Documentation/core-api/dma-api.rst for documentation.
*/ */
#include <linux/scatterlist.h> #include <linux/scatterlist.h>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* This allows to use PCI devices that only support 32bit addresses on systems * This allows to use PCI devices that only support 32bit addresses on systems
* with more than 4GB. * with more than 4GB.
* *
* See Documentation/DMA-API-HOWTO.txt for the interface specification. * See Documentation/core-api/dma-api-howto.rst for the interface specification.
* *
* Copyright 2002 Andi Kleen, SuSE Labs. * Copyright 2002 Andi Kleen, SuSE Labs.
*/ */
......
...@@ -666,7 +666,7 @@ sba_mark_invalid(struct ioc *ioc, dma_addr_t iova, size_t byte_cnt) ...@@ -666,7 +666,7 @@ sba_mark_invalid(struct ioc *ioc, dma_addr_t iova, size_t byte_cnt)
* @dev: instance of PCI owned by the driver that's asking * @dev: instance of PCI owned by the driver that's asking
* @mask: number of address bits this PCI device can handle * @mask: number of address bits this PCI device can handle
* *
* See Documentation/DMA-API-HOWTO.txt * See Documentation/core-api/dma-api-howto.rst
*/ */
static int sba_dma_supported( struct device *dev, u64 mask) static int sba_dma_supported( struct device *dev, u64 mask)
{ {
...@@ -698,7 +698,7 @@ static int sba_dma_supported( struct device *dev, u64 mask) ...@@ -698,7 +698,7 @@ static int sba_dma_supported( struct device *dev, u64 mask)
* @size: number of bytes to map in driver buffer. * @size: number of bytes to map in driver buffer.
* @direction: R/W or both. * @direction: R/W or both.
* *
* See Documentation/DMA-API-HOWTO.txt * See Documentation/core-api/dma-api-howto.rst
*/ */
static dma_addr_t static dma_addr_t
sba_map_single(struct device *dev, void *addr, size_t size, sba_map_single(struct device *dev, void *addr, size_t size,
...@@ -788,7 +788,7 @@ sba_map_page(struct device *dev, struct page *page, unsigned long offset, ...@@ -788,7 +788,7 @@ sba_map_page(struct device *dev, struct page *page, unsigned long offset,
* @size: number of bytes mapped in driver buffer. * @size: number of bytes mapped in driver buffer.
* @direction: R/W or both. * @direction: R/W or both.
* *
* See Documentation/DMA-API-HOWTO.txt * See Documentation/core-api/dma-api-howto.rst
*/ */
static void static void
sba_unmap_page(struct device *dev, dma_addr_t iova, size_t size, sba_unmap_page(struct device *dev, dma_addr_t iova, size_t size,
...@@ -867,7 +867,7 @@ sba_unmap_page(struct device *dev, dma_addr_t iova, size_t size, ...@@ -867,7 +867,7 @@ sba_unmap_page(struct device *dev, dma_addr_t iova, size_t size,
* @size: number of bytes mapped in driver buffer. * @size: number of bytes mapped in driver buffer.
* @dma_handle: IOVA of new buffer. * @dma_handle: IOVA of new buffer.
* *
* See Documentation/DMA-API-HOWTO.txt * See Documentation/core-api/dma-api-howto.rst
*/ */
static void *sba_alloc(struct device *hwdev, size_t size, dma_addr_t *dma_handle, static void *sba_alloc(struct device *hwdev, size_t size, dma_addr_t *dma_handle,
gfp_t gfp, unsigned long attrs) gfp_t gfp, unsigned long attrs)
...@@ -898,7 +898,7 @@ static void *sba_alloc(struct device *hwdev, size_t size, dma_addr_t *dma_handle ...@@ -898,7 +898,7 @@ static void *sba_alloc(struct device *hwdev, size_t size, dma_addr_t *dma_handle
* @vaddr: virtual address IOVA of "consistent" buffer. * @vaddr: virtual address IOVA of "consistent" buffer.
* @dma_handler: IO virtual address of "consistent" buffer. * @dma_handler: IO virtual address of "consistent" buffer.
* *
* See Documentation/DMA-API-HOWTO.txt * See Documentation/core-api/dma-api-howto.rst
*/ */
static void static void
sba_free(struct device *hwdev, size_t size, void *vaddr, sba_free(struct device *hwdev, size_t size, void *vaddr,
...@@ -933,7 +933,7 @@ int dump_run_sg = 0; ...@@ -933,7 +933,7 @@ int dump_run_sg = 0;
* @nents: number of entries in list * @nents: number of entries in list
* @direction: R/W or both. * @direction: R/W or both.
* *
* See Documentation/DMA-API-HOWTO.txt * See Documentation/core-api/dma-api-howto.rst
*/ */
static int static int
sba_map_sg(struct device *dev, struct scatterlist *sglist, int nents, sba_map_sg(struct device *dev, struct scatterlist *sglist, int nents,
...@@ -1017,7 +1017,7 @@ sba_map_sg(struct device *dev, struct scatterlist *sglist, int nents, ...@@ -1017,7 +1017,7 @@ sba_map_sg(struct device *dev, struct scatterlist *sglist, int nents,
* @nents: number of entries in list * @nents: number of entries in list
* @direction: R/W or both. * @direction: R/W or both.
* *
* See Documentation/DMA-API-HOWTO.txt * See Documentation/core-api/dma-api-howto.rst
*/ */
static void static void
sba_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents, sba_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents,
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
/** /**
* List of possible attributes associated with a DMA mapping. The semantics * List of possible attributes associated with a DMA mapping. The semantics
* of each attribute should be defined in Documentation/DMA-attributes.txt. * of each attribute should be defined in Documentation/core-api/dma-attributes.rst.
*/ */
/* /*
......
...@@ -2829,7 +2829,7 @@ static inline errseq_t filemap_sample_wb_err(struct address_space *mapping) ...@@ -2829,7 +2829,7 @@ static inline errseq_t filemap_sample_wb_err(struct address_space *mapping)
/** /**
* file_sample_sb_err - sample the current errseq_t to test for later errors * file_sample_sb_err - sample the current errseq_t to test for later errors
* @mapping: mapping to be sampled * @file: file pointer to be sampled
* *
* Grab the most current superblock-level errseq_t value for the given * Grab the most current superblock-level errseq_t value for the given
* struct file. * struct file.
......
...@@ -337,10 +337,12 @@ static inline void __kcsan_disable_current(void) { } ...@@ -337,10 +337,12 @@ static inline void __kcsan_disable_current(void) { }
* release_for_reuse(obj); * release_for_reuse(obj);
* } * }
* *
* Note: ASSERT_EXCLUSIVE_ACCESS_SCOPED(), if applicable, performs more thorough * Note:
*
* 1. ASSERT_EXCLUSIVE_ACCESS_SCOPED(), if applicable, performs more thorough
* checking if a clear scope where no concurrent accesses are expected exists. * checking if a clear scope where no concurrent accesses are expected exists.
* *
* Note: For cases where the object is freed, `KASAN <kasan.html>`_ is a better * 2. For cases where the object is freed, `KASAN <kasan.html>`_ is a better
* fit to detect use-after-free bugs. * fit to detect use-after-free bugs.
* *
* @var: variable to assert on * @var: variable to assert on
......
...@@ -1742,6 +1742,8 @@ enum netdev_priv_flags { ...@@ -1742,6 +1742,8 @@ enum netdev_priv_flags {
* @real_num_rx_queues: Number of RX queues currently active in device * @real_num_rx_queues: Number of RX queues currently active in device
* @xdp_prog: XDP sockets filter program pointer * @xdp_prog: XDP sockets filter program pointer
* @gro_flush_timeout: timeout for GRO layer in NAPI * @gro_flush_timeout: timeout for GRO layer in NAPI
* @napi_defer_hard_irqs: If not zero, provides a counter that would
* allow to avoid NIC hard IRQ, on busy queues.
* *
* @rx_handler: handler for received packets * @rx_handler: handler for received packets
* @rx_handler_data: XXX: need comments on this one * @rx_handler_data: XXX: need comments on this one
......
...@@ -62,6 +62,10 @@ enum phylink_op_type { ...@@ -62,6 +62,10 @@ enum phylink_op_type {
* @dev: a pointer to a struct device associated with the MAC * @dev: a pointer to a struct device associated with the MAC
* @type: operation type of PHYLINK instance * @type: operation type of PHYLINK instance
* @pcs_poll: MAC PCS cannot provide link change interrupt * @pcs_poll: MAC PCS cannot provide link change interrupt
* @poll_fixed_state: if true, starts link_poll,
* if MAC link is at %MLO_AN_FIXED mode.
* @get_fixed_state: callback to execute to determine the fixed link state,
* if MAC link is at %MLO_AN_FIXED mode.
*/ */
struct phylink_config { struct phylink_config {
struct device *dev; struct device *dev;
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
* does memory allocation too using vmalloc_32(). * does memory allocation too using vmalloc_32().
* *
* videobuf_dma_*() * videobuf_dma_*()
* see Documentation/DMA-API-HOWTO.txt, these functions to * see Documentation/core-api/dma-api-howto.rst, these functions to
* basically the same. The map function does also build a * basically the same. The map function does also build a
* scatterlist for the buffer (and unmap frees it ...) * scatterlist for the buffer (and unmap frees it ...)
* *
......
...@@ -1957,7 +1957,7 @@ config MMAP_ALLOW_UNINITIALIZED ...@@ -1957,7 +1957,7 @@ config MMAP_ALLOW_UNINITIALIZED
userspace. Since that isn't generally a problem on no-MMU systems, userspace. Since that isn't generally a problem on no-MMU systems,
it is normally safe to say Y here. it is normally safe to say Y here.
See Documentation/nommu-mmap.txt for more information. See Documentation/mm/nommu-mmap.rst for more information.
config SYSTEM_DATA_VERIFICATION config SYSTEM_DATA_VERIFICATION
def_bool n def_bool n
......
...@@ -1071,7 +1071,7 @@ static void check_unmap(struct dma_debug_entry *ref) ...@@ -1071,7 +1071,7 @@ static void check_unmap(struct dma_debug_entry *ref)
/* /*
* Drivers should use dma_mapping_error() to check the returned * Drivers should use dma_mapping_error() to check the returned
* addresses of dma_map_single() and dma_map_page(). * addresses of dma_map_single() and dma_map_page().
* If not, print this warning message. See Documentation/DMA-API.txt. * If not, print this warning message. See Documentation/core-api/dma-api.rst.
*/ */
if (entry->map_err_type == MAP_ERR_NOT_CHECKED) { if (entry->map_err_type == MAP_ERR_NOT_CHECKED) {
err_printk(ref->dev, entry, err_printk(ref->dev, entry,
......
...@@ -387,7 +387,7 @@ config NOMMU_INITIAL_TRIM_EXCESS ...@@ -387,7 +387,7 @@ config NOMMU_INITIAL_TRIM_EXCESS
This option specifies the initial value of this option. The default This option specifies the initial value of this option. The default
of 1 says that all excess pages should be trimmed. of 1 says that all excess pages should be trimmed.
See Documentation/nommu-mmap.txt for more information. See Documentation/mm/nommu-mmap.rst for more information.
config TRANSPARENT_HUGEPAGE config TRANSPARENT_HUGEPAGE
bool "Transparent Hugepage Support" bool "Transparent Hugepage Support"
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Replacement code for mm functions to support CPU's that don't * Replacement code for mm functions to support CPU's that don't
* have any form of memory management unit (thus no virtual memory). * have any form of memory management unit (thus no virtual memory).
* *
* See Documentation/nommu-mmap.txt * See Documentation/mm/nommu-mmap.rst
* *
* Copyright (c) 2004-2008 David Howells <dhowells@redhat.com> * Copyright (c) 2004-2008 David Howells <dhowells@redhat.com>
* Copyright (c) 2000-2003 David McCullough <davidm@snapgear.com> * Copyright (c) 2000-2003 David McCullough <davidm@snapgear.com>
......
...@@ -7898,6 +7898,7 @@ EXPORT_SYMBOL(netdev_bonding_info_change); ...@@ -7898,6 +7898,7 @@ EXPORT_SYMBOL(netdev_bonding_info_change);
/** /**
* netdev_get_xmit_slave - Get the xmit slave of master device * netdev_get_xmit_slave - Get the xmit slave of master device
* @dev: device
* @skb: The packet * @skb: The packet
* @all_slaves: assume all the slaves are active * @all_slaves: assume all the slaves are active
* *
......
...@@ -1083,7 +1083,9 @@ sub dump_struct($$) { ...@@ -1083,7 +1083,9 @@ sub dump_struct($$) {
$members =~ s/\s*__packed\s*/ /gos; $members =~ s/\s*__packed\s*/ /gos;
$members =~ s/\s*CRYPTO_MINALIGN_ATTR/ /gos; $members =~ s/\s*CRYPTO_MINALIGN_ATTR/ /gos;
$members =~ s/\s*____cacheline_aligned_in_smp/ /gos; $members =~ s/\s*____cacheline_aligned_in_smp/ /gos;
# replace DECLARE_BITMAP # replace DECLARE_BITMAP
$members =~ s/__ETHTOOL_DECLARE_LINK_MODE_MASK\s*\(([^\)]+)\)/DECLARE_BITMAP($1, __ETHTOOL_LINK_MODE_MASK_NBITS)/gos;
$members =~ s/DECLARE_BITMAP\s*\(([^,)]+),\s*([^,)]+)\)/unsigned long $1\[BITS_TO_LONGS($2)\]/gos; $members =~ s/DECLARE_BITMAP\s*\(([^,)]+),\s*([^,)]+)\)/unsigned long $1\[BITS_TO_LONGS($2)\]/gos;
# replace DECLARE_HASHTABLE # replace DECLARE_HASHTABLE
$members =~ s/DECLARE_HASHTABLE\s*\(([^,)]+),\s*([^,)]+)\)/unsigned long $1\[1 << (($2) - 1)\]/gos; $members =~ s/DECLARE_HASHTABLE\s*\(([^,)]+),\s*([^,)]+)\)/unsigned long $1\[1 << (($2) - 1)\]/gos;
...@@ -1769,6 +1771,11 @@ sub process_proto_function($$) { ...@@ -1769,6 +1771,11 @@ sub process_proto_function($$) {
$prototype =~ s@/\*.*?\*/@@gos; # strip comments. $prototype =~ s@/\*.*?\*/@@gos; # strip comments.
$prototype =~ s@[\r\n]+@ @gos; # strip newlines/cr's. $prototype =~ s@[\r\n]+@ @gos; # strip newlines/cr's.
$prototype =~ s@^\s+@@gos; # strip leading spaces $prototype =~ s@^\s+@@gos; # strip leading spaces
# Handle prototypes for function pointers like:
# int (*pcs_config)(struct foo)
$prototype =~ s@^(\S+\s+)\(\s*\*(\S+)\)@$1$2@gos;
if ($prototype =~ /SYSCALL_DEFINE/) { if ($prototype =~ /SYSCALL_DEFINE/) {
syscall_munge(); syscall_munge();
} }
......
// SPDX-License-Identifier: GPL-2.0 // SPDX-License-Identifier: GPL-2.0
/* /*
* Tests Memory Protection Keys (see Documentation/vm/protection-keys.txt) * Tests Memory Protection Keys (see Documentation/core-api/protection-keys.rst)
* *
* There are examples in here of: * There are examples in here of:
* * how to set protection keys on memory * * how to set protection keys on memory
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment