Commit 6a217437 authored by Jason Gunthorpe's avatar Jason Gunthorpe
Browse files

Merge branch 'sg_nents' into rdma.git for-next



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: default avatarJason Gunthorpe <jgg@nvidia.com>

* '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
parents 65f90c8e 79fbd3e1
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -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 <yangbo.lu@nxp.com>
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 <richardcochran@gmail.com>
@@ -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 <yangbo.lu@nxp.com>
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 <richardcochran@gmail.com>
+18 −8
Original line number Diff line number Diff line
@@ -45,8 +45,9 @@ 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
   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.

@@ -54,6 +55,15 @@ how the user addresses are used by the kernel:
     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
   explicitly enable it via ``prctl()`` as follows:
+2 −2
Original line number Diff line number Diff line
@@ -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:
@@ -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:
+1 −13
Original line number Diff line number Diff line
@@ -86,19 +86,7 @@ Generating code coverage reports under UML
.. note::
	TODO(brendanhiggins@google.com): 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(brendanhiggins@google.com): 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.
+0 −1
Original line number Diff line number Diff line
@@ -50,7 +50,6 @@ properties:

  reg:
    minItems: 1
    maxItems: 3
    items:
      - description: base register
      - description: power register
Loading