Skip to content

Commit

Permalink
Merge branch 'sg_nents' into rdma.git for-next
Browse files Browse the repository at this point in the history
From Maor Gottlieb
====================

Fix the use of nents and orig_nents in the sg table append helpers. The
nents should be used by the DMA layer to store the number of DMA mapped
sges, the orig_nents is the number of CPU sges.

Since the sg append logic doesn't always create a SGL with exactly
orig_nents entries store a total_nents as well to allow the table to be
properly free'd and reorganize the freeing logic to share across all the
use cases.

====================

Signed-off-by: Jason Gunthorpe <[email protected]>

* 'sg_nents':
  RDMA: Use the sg_table directly and remove the opencoded version from umem
  lib/scatterlist: Fix wrong update of orig_nents
  lib/scatterlist: Provide a dedicated function to support table append
  • Loading branch information
jgunthorpe committed Aug 30, 2021
2 parents 65f90c8 + 79fbd3e commit 6a21743
Show file tree
Hide file tree
Showing 1,417 changed files with 18,008 additions and 11,263 deletions.
20 changes: 20 additions & 0 deletions Documentation/ABI/testing/sysfs-ptp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ Description:
frequency adjustment value (a positive integer) in
parts per billion.

What: /sys/class/ptp/ptpN/max_vclocks
Date: May 2021
Contact: Yangbo Lu <[email protected]>
Description:
This file contains the maximum number of ptp vclocks.
Write integer to re-configure it.

What: /sys/class/ptp/ptpN/n_alarms
Date: September 2010
Contact: Richard Cochran <[email protected]>
Expand Down Expand Up @@ -61,6 +68,19 @@ Description:
This file contains the number of programmable pins
offered by the PTP hardware clock.

What: /sys/class/ptp/ptpN/n_vclocks
Date: May 2021
Contact: Yangbo Lu <[email protected]>
Description:
This file contains the number of virtual PTP clocks in
use. By default, the value is 0 meaning that only the
physical clock is in use. Setting the value creates
the corresponding number of virtual clocks and causes
the physical clock to become free running. Setting the
value back to 0 deletes the virtual clocks and
switches the physical clock back to normal, adjustable
operation.

What: /sys/class/ptp/ptpN/pins
Date: March 2014
Contact: Richard Cochran <[email protected]>
Expand Down
26 changes: 18 additions & 8 deletions Documentation/arm64/tagged-address-abi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,24 @@ how the user addresses are used by the kernel:

1. User addresses not accessed by the kernel but used for address space
management (e.g. ``mprotect()``, ``madvise()``). The use of valid
tagged pointers in this context is allowed with the exception of
``brk()``, ``mmap()`` and the ``new_address`` argument to
``mremap()`` as these have the potential to alias with existing
user addresses.

NOTE: This behaviour changed in v5.6 and so some earlier kernels may
incorrectly accept valid tagged pointers for the ``brk()``,
``mmap()`` and ``mremap()`` system calls.
tagged pointers in this context is allowed with these exceptions:

- ``brk()``, ``mmap()`` and the ``new_address`` argument to
``mremap()`` as these have the potential to alias with existing
user addresses.

NOTE: This behaviour changed in v5.6 and so some earlier kernels may
incorrectly accept valid tagged pointers for the ``brk()``,
``mmap()`` and ``mremap()`` system calls.

- The ``range.start``, ``start`` and ``dst`` arguments to the
``UFFDIO_*`` ``ioctl()``s used on a file descriptor obtained from
``userfaultfd()``, as fault addresses subsequently obtained by reading
the file descriptor will be untagged, which may otherwise confuse
tag-unaware programs.

NOTE: This behaviour changed in v5.14 and so some earlier kernels may
incorrectly accept valid tagged pointers for this system call.

2. User addresses accessed by the kernel (e.g. ``write()``). This ABI
relaxation is disabled by default and the application thread needs to
Expand Down
4 changes: 2 additions & 2 deletions Documentation/bpf/libbpf/libbpf_naming_convention.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ This bump in ABI version is at most once per kernel development cycle.

For example, if current state of ``libbpf.map`` is:

.. code-block:: c
.. code-block:: none
LIBBPF_0.0.1 {
global:
Expand All @@ -121,7 +121,7 @@ For example, if current state of ``libbpf.map`` is:
, and a new symbol ``bpf_func_c`` is being introduced, then
``libbpf.map`` should be changed like this:

.. code-block:: c
.. code-block:: none
LIBBPF_0.0.1 {
global:
Expand Down
14 changes: 1 addition & 13 deletions Documentation/dev-tools/kunit/running_tips.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,19 +86,7 @@ Generating code coverage reports under UML
.. note::
TODO([email protected]): There are various issues with UML and
versions of gcc 7 and up. You're likely to run into missing ``.gcda``
files or compile errors. We know one `faulty GCC commit
<https://github.com/gcc-mirror/gcc/commit/8c9434c2f9358b8b8bad2c1990edf10a21645f9d>`_
but not how we'd go about getting this fixed. The compile errors still
need some investigation.

.. note::
TODO([email protected]): for recent versions of Linux
(5.10-5.12, maybe earlier), there's a bug with gcov counters not being
flushed in UML. This translates to very low (<1%) reported coverage. This is
related to the above issue and can be worked around by replacing the
one call to ``uml_abort()`` (it's in ``os_dump_core()``) with a plain
``exit()``.

files or compile errors.

This is different from the "normal" way of getting coverage information that is
documented in Documentation/dev-tools/gcov.rst.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ properties:

reg:
minItems: 1
maxItems: 3
items:
- description: base register
- description: power register
Expand Down
1 change: 0 additions & 1 deletion Documentation/devicetree/bindings/display/renesas,du.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ required:
- reg
- clocks
- interrupts
- resets
- ports

allOf:
Expand Down
22 changes: 11 additions & 11 deletions Documentation/devicetree/bindings/hwmon/adt7475.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,7 @@ properties:
reg:
maxItems: 1

patternProperties:
"^adi,bypass-attenuator-in[0-4]$":
description: |
Configures bypassing the individual voltage input attenuator. If
set to 1 the attenuator is bypassed if set to 0 the attenuator is
not bypassed. If the property is absent then the attenuator
retains it's configuration from the bios/bootloader.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1]

"^adi,pwm-active-state$":
adi,pwm-active-state:
description: |
Integer array, represents the active state of the pwm outputs If set to 0
the pwm uses a logic low output for 100% duty cycle. If set to 1 the pwm
Expand All @@ -61,6 +51,16 @@ patternProperties:
enum: [0, 1]
default: 1

patternProperties:
"^adi,bypass-attenuator-in[0-4]$":
description: |
Configures bypassing the individual voltage input attenuator. If
set to 1 the attenuator is bypassed if set to 0 the attenuator is
not bypassed. If the property is absent then the attenuator
retains it's configuration from the bios/bootloader.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1]

required:
- compatible
- reg
Expand Down
41 changes: 0 additions & 41 deletions Documentation/devicetree/bindings/iio/st,st-sensors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,47 +152,6 @@ allOf:
maxItems: 1
st,drdy-int-pin: false

- if:
properties:
compatible:
enum:
# Two intertial interrupts i.e. accelerometer/gyro interrupts
- st,h3lis331dl-accel
- st,l3g4200d-gyro
- st,l3g4is-gyro
- st,l3gd20-gyro
- st,l3gd20h-gyro
- st,lis2de12
- st,lis2dw12
- st,lis2hh12
- st,lis2dh12-accel
- st,lis331dl-accel
- st,lis331dlh-accel
- st,lis3de
- st,lis3dh-accel
- st,lis3dhh
- st,lis3mdl-magn
- st,lng2dm-accel
- st,lps331ap-press
- st,lsm303agr-accel
- st,lsm303dlh-accel
- st,lsm303dlhc-accel
- st,lsm303dlm-accel
- st,lsm330-accel
- st,lsm330-gyro
- st,lsm330d-accel
- st,lsm330d-gyro
- st,lsm330dl-accel
- st,lsm330dl-gyro
- st,lsm330dlc-accel
- st,lsm330dlc-gyro
- st,lsm9ds0-gyro
- st,lsm9ds1-magn
then:
properties:
interrupts:
maxItems: 2

required:
- compatible
- reg
Expand Down
6 changes: 2 additions & 4 deletions Documentation/devicetree/bindings/iommu/arm,smmu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,14 @@ properties:
items:
- const: marvell,ap806-smmu-500
- const: arm,mmu-500
- description: NVIDIA SoCs that program two ARM MMU-500s identically
items:
- description: NVIDIA SoCs that require memory controller interaction
and may program multiple ARM MMU-500s identically with the memory
controller interleaving translations between multiple instances
for improved performance.
items:
- enum:
- const: nvidia,tegra194-smmu
- const: nvidia,tegra186-smmu
- nvidia,tegra194-smmu
- nvidia,tegra186-smmu
- const: nvidia,smmu-500
- items:
- const: arm,mmu-500
Expand Down
2 changes: 0 additions & 2 deletions Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,12 @@ properties:
- description: configuration registers for MMU instance 0
- description: configuration registers for MMU instance 1
minItems: 1
maxItems: 2

interrupts:
items:
- description: interruption for MMU instance 0
- description: interruption for MMU instance 1
minItems: 1
maxItems: 2

clocks:
items:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ properties:

ranges:
minItems: 1
maxItems: 3
description: |
Memory bus areas for interacting with the devices. Reflects
the memory layout with four integer values following:
Expand Down
8 changes: 0 additions & 8 deletions Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,13 @@ properties:

interrupts:
minItems: 1
maxItems: 3
items:
- description: NAND CTLRDY interrupt
- description: FLASH_DMA_DONE if flash DMA is available
- description: FLASH_EDU_DONE if EDU is available

interrupt-names:
minItems: 1
maxItems: 3
items:
- const: nand_ctlrdy
- const: flash_dma_done
Expand Down Expand Up @@ -148,8 +146,6 @@ allOf:
then:
properties:
reg-names:
minItems: 2
maxItems: 2
items:
- const: nand
- const: nand-int-base
Expand All @@ -161,8 +157,6 @@ allOf:
then:
properties:
reg-names:
minItems: 3
maxItems: 3
items:
- const: nand
- const: nand-int-base
Expand All @@ -175,8 +169,6 @@ allOf:
then:
properties:
reg-names:
minItems: 3
maxItems: 3
items:
- const: nand
- const: iproc-idm
Expand Down
4 changes: 2 additions & 2 deletions Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ properties:
reg:
oneOf:
- enum:
- 0
- 1
- 0
- 1

required:
- compatible
Expand Down
2 changes: 1 addition & 1 deletion Documentation/devicetree/bindings/net/gpmc-eth.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Documentation/devicetree/bindings/memory-controllers/omap-gpmc.txt

For the properties relevant to the ethernet controller connected to the GPMC
refer to the binding documentation of the device. For example, the documentation
for the SMSC 911x is Documentation/devicetree/bindings/net/smsc911x.txt
for the SMSC 911x is Documentation/devicetree/bindings/net/smsc,lan9115.yaml

Child nodes need to specify the GPMC bus address width using the "bank-width"
property but is possible that an ethernet controller also has a property to
Expand Down
56 changes: 0 additions & 56 deletions Documentation/devicetree/bindings/net/imx-dwmac.txt

This file was deleted.

Loading

0 comments on commit 6a21743

Please sign in to comment.