[PATCH] Documentation: platform: convert x86-laptop-drivers.txt to reST

2019-06-18 Thread Puranjay Mohan
This converts the plain text documentation to reStructuredText format.
No essential content change.

Signed-off-by: Puranjay Mohan 
---
 Documentation/platform/x86-laptop-drivers.rst | 23 +++
 Documentation/platform/x86-laptop-drivers.txt | 18 ---
 2 files changed, 23 insertions(+), 18 deletions(-)
 create mode 100644 Documentation/platform/x86-laptop-drivers.rst
 delete mode 100644 Documentation/platform/x86-laptop-drivers.txt

diff --git a/Documentation/platform/x86-laptop-drivers.rst 
b/Documentation/platform/x86-laptop-drivers.rst
new file mode 100644
index ..0494c3fdd41c
--- /dev/null
+++ b/Documentation/platform/x86-laptop-drivers.rst
@@ -0,0 +1,23 @@
+=
+compal-laptop
+=
+
+List of supported hardware:
+===
+
+by Compal:
+--
+- Compal FL90/IFL90
+- Compal FL91/IFL91
+- Compal FL92/JFL92
+- Compal FT00/IFT00
+
+by Dell:
+
+- Dell Vostro 1200
+- Dell Mini 9 (Inspiron 910)
+- Dell Mini 10 (Inspiron 1010)
+- Dell Mini 10v (Inspiron 1011)
+- Dell Mini 1012 (Inspiron 1012)
+- Dell Inspiron 11z (Inspiron 1110)
+- Dell Mini 12 (Inspiron 1210)
diff --git a/Documentation/platform/x86-laptop-drivers.txt 
b/Documentation/platform/x86-laptop-drivers.txt
deleted file mode 100644
index 01facd2590bb..
--- a/Documentation/platform/x86-laptop-drivers.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-compal-laptop
-=
-List of supported hardware:
-
-by Compal:
-   Compal FL90/IFL90
-   Compal FL91/IFL91
-   Compal FL92/JFL92
-   Compal FT00/IFT00
-
-by Dell:
-   Dell Vostro 1200
-   Dell Mini 9 (Inspiron 910)
-   Dell Mini 10 (Inspiron 1010)
-   Dell Mini 10v (Inspiron 1011)
-   Dell Mini 1012 (Inspiron 1012)
-   Dell Inspiron 11z (Inspiron 1110)
-   Dell Mini 12 (Inspiron 1210)
-- 
2.21.0



Re: [PATCH 12/14] doc-rst: add ABI documentation to the admin-guide book

2019-06-18 Thread Jani Nikula
On Mon, 17 Jun 2019, Mauro Carvalho Chehab  wrote:
> Yeah, I guess it should be possible to do that. How a python script
> can identify if it was called by Sphinx, or if it was called directly?

if __name__ == '__main__':
# run on the command-line, not imported

BR,
Jani.

-- 
Jani Nikula, Intel Open Source Graphics Center


Re: [PATCH v7 22/27] binfmt_elf: Extract .note.gnu.property from an ELF file

2019-06-18 Thread Dave Martin
On Mon, Jun 17, 2019 at 02:20:40PM +0200, Thomas Gleixner wrote:
> On Mon, 17 Jun 2019, Florian Weimer wrote:
> > * Dave Martin:
> > > On Tue, Jun 11, 2019 at 12:31:34PM -0700, Yu-cheng Yu wrote:
> > >> We can probably check PT_GNU_PROPERTY first, and fallback (based on 
> > >> ld-linux
> > >> version?) to PT_NOTE scanning?
> > >
> > > For arm64, we can check for PT_GNU_PROPERTY and then give up
> > > unconditionally.
> > >
> > > For x86, we would fall back to PT_NOTE scanning, but this will add a bit
> > > of cost to binaries that don't have NT_GNU_PROPERTY_TYPE_0.  The ld.so
> > > version doesn't tell you what ELF ABI a given executable conforms to.
> > >
> > > Since this sounds like it's largely a distro-specific issue, maybe there
> > > could be a Kconfig option to turn the fallback PT_NOTE scanning on?
> > 
> > I'm worried that this causes interop issues similarly to what we see
> > with VSYSCALL today.  If we need both and a way to disable it, it should
> > be something like a personality flag which can be configured for each
> > process tree separately.  Ideally, we'd settle on one correct approach
> > (i.e., either always process both, or only process PT_GNU_PROPERTY) and
> > enforce that.
> 
> Chose one and only the one which makes technically sense and is not some
> horrible vehicle.
> 
> Everytime we did those 'oh we need to make x fly workarounds' we regretted
> it sooner than later.

So I guess that points to keeping PT_NOTE scanning always available as a
fallback on x86.  This sucks a bit, but if there are binaries already in
the wild that rely on this, I don't think we have much choice...

I'd still favour a Kconfig option to allow this support to be suppressed
by arches that don't have a similar legacy to be compatible with.

Cheers
---Dave


Re: [PATCH v5 1/2] arm64: Define Documentation/arm64/tagged-address-abi.txt

2019-06-18 Thread Szabolcs Nagy
On 13/06/2019 16:51, Vincenzo Frascino wrote:
> On arm64 the TCR_EL1.TBI0 bit has been always enabled hence
> the userspace (EL0) is allowed to set a non-zero value in the
> top byte but the resulting pointers are not allowed at the
> user-kernel syscall ABI boundary.
> 
> With the relaxed ABI proposed through this document, it is now possible
> to pass tagged pointers to the syscalls, when these pointers are in
> memory ranges obtained by an anonymous (MAP_ANONYMOUS) mmap().
> 
> This change in the ABI requires a mechanism to requires the userspace
> to opt-in to such an option.
> 
> Specify and document the way in which sysctl and prctl() can be used
> in combination to allow the userspace to opt-in this feature.
> 
> Cc: Catalin Marinas 
> Cc: Will Deacon 
> CC: Andrey Konovalov 
> Signed-off-by: Vincenzo Frascino 

Acked-by: Szabolcs Nagy 

> ---
>  Documentation/arm64/tagged-address-abi.txt | 134 +
>  1 file changed, 134 insertions(+)
>  create mode 100644 Documentation/arm64/tagged-address-abi.txt
> 
> diff --git a/Documentation/arm64/tagged-address-abi.txt 
> b/Documentation/arm64/tagged-address-abi.txt
> new file mode 100644
> index ..0ae900d4bb2d
> --- /dev/null
> +++ b/Documentation/arm64/tagged-address-abi.txt
> @@ -0,0 +1,134 @@
> +ARM64 TAGGED ADDRESS ABI
> +
> +
> +This document describes the usage and semantics of the Tagged Address
> +ABI on arm64.
> +
> +1. Introduction
> +---
> +
> +On arm64 the TCR_EL1.TBI0 bit has been always enabled on the kernel, hence
> +the userspace (EL0) is entitled to perform a user memory access through a
> +64-bit pointer with a non-zero top byte but the resulting pointers are not
> +allowed at the user-kernel syscall ABI boundary.
> +
> +This document describes a relaxation of the ABI that makes it possible to
> +to pass tagged pointers to the syscalls, when these pointers are in memory
> +ranges obtained as described in section 2.
> +
> +Since it is not desirable to relax the ABI to allow tagged user addresses
> +into the kernel indiscriminately, arm64 provides a new sysctl interface
> +(/proc/sys/abi/tagged_addr) that is used to prevent the applications from
> +enabling the relaxed ABI and a new prctl() interface that can be used to
> +enable or disable the relaxed ABI.
> +A detailed description of the newly introduced mechanisms will be provided
> +in section 2.
> +
> +2. ARM64 Tagged Address ABI
> +---
> +
> +From the kernel syscall interface perspective, we define, for the purposes
> +of this document, a "valid tagged pointer" as a pointer that either has a
> +zero value set in the top byte or has a non-zero value, it is in memory
> +ranges privately owned by a userspace process and it is obtained in one of
> +the following ways:
> +  - mmap() done by the process itself, where either:
> +* flags have MAP_PRIVATE and MAP_ANONYMOUS
> +* flags have MAP_PRIVATE and the file descriptor refers to a regular
> +  file or "/dev/zero"
> +  - brk() system call done by the process itself (i.e. the heap area between
> +the initial location of the program break at process creation and its
> +current location).
> +  - any memory mapped by the kernel in the process's address space during
> +creation and following the restrictions presented above (i.e. data, bss,
> +stack).
> +
> +The ARM64 Tagged Address ABI is an opt-in feature, and an application can
> +control it using the following:
> + - /proc/sys/abi/tagged_addr: a new sysctl interface that can be used to
> +prevent the applications from enabling the relaxed ABI.
> +The sysctl is meant also for testing purposes in order to provide a
> +simple way for the userspace to verify the return error checking of
> +the prctl() commands without having to reconfigure the kernel.
> +The sysctl supports the following configuration options:
> + - 0: Disable ARM64 Tagged Address ABI for all the applications.
> + - 1 (Default): Enable ARM64 Tagged Address ABI for all the
> +applications.
> +If the ARM64 Tagged Address ABI is disabled at a certain point in
> +time, all the applications that were using tagging before this event
> +occurs, will continue to use tagging.
> +
> + - prctl()s:
> +  - PR_SET_TAGGED_ADDR_CTRL: can be used to enable or disable the Tagged
> +Address ABI.
> +The (unsigned int) arg2 argument is a bit mask describing the
> +control mode used:
> +  - PR_TAGGED_ADDR_ENABLE: Enable ARM64 Tagged Address ABI.
> +The arguments arg3, arg4, and arg5 are ignored.
> +
> +  - PR_GET_TAGGED_ADDR_CTRL: can be used to check the status of the Tagged
> +Address ABI.
> +The arguments arg2, arg3, arg4, and arg5 are ignored.
> +
> +The ABI properties set by the mechanisms described above are inherited by 
> threads
> +of the same application and fork()'ed c

Re: [PATCH v4 19/28] docs: powerpc: convert docs to ReST and rename to *.rst

2019-06-18 Thread Michael Ellerman
Jonathan Corbet  writes:
> On Wed, 12 Jun 2019 14:52:55 -0300
> Mauro Carvalho Chehab  wrote:
>
>> Convert docs to ReST and add them to the arch-specific
>> book.
>> 
>> The conversion here was trivial, as almost every file there
>> was already using an elegant format close to ReST standard.
>> 
>> The changes were mostly to mark literal blocks and add a few
>> missing section title identifiers.
>> 
>> One note with regards to "--": on Sphinx, this can't be used
>> to identify a list, as it will format it badly. This can be
>> used, however, to identify a long hyphen - and "---" is an
>> even longer one.
>> 
>> At its new index.rst, let's add a :orphan: while this is not linked to
>> the main index.rst file, in order to avoid build warnings.
>> 
>> Signed-off-by: Mauro Carvalho Chehab 
>> Acked-by: Andrew Donnellan  # cxl
>
> This one fails to apply because ...
>
> [...]
>
>> diff --git a/Documentation/PCI/pci-error-recovery.rst 
>> b/Documentation/PCI/pci-error-recovery.rst
>> index 83db42092935..acc21ecca322 100644
>> --- a/Documentation/PCI/pci-error-recovery.rst
>> +++ b/Documentation/PCI/pci-error-recovery.rst
>> @@ -422,3 +422,24 @@ That is, the recovery API only requires that:
>> - drivers/net/cxgb3
>> - drivers/net/s2io.c
>> - drivers/net/qlge
>> +
>> +>>> As of this writing, there is a growing list of device drivers with
>> +>>> patches implementing error recovery. Not all of these patches are in
>> +>>> mainline yet. These may be used as "examples":
>> +>>>
>> +>>> drivers/scsi/ipr
>> +>>> drivers/scsi/sym53c8xx_2
>> +>>> drivers/scsi/qla2xxx
>> +>>> drivers/scsi/lpfc
>> +>>> drivers/next/bnx2.c
>> +>>> drivers/next/e100.c
>> +>>> drivers/net/e1000
>> +>>> drivers/net/e1000e
>> +>>> drivers/net/ixgb
>> +>>> drivers/net/ixgbe
>> +>>> drivers/net/cxgb3
>> +>>> drivers/net/s2io.c
>> +>>> drivers/net/qlge  
>
> ...of this, which has the look of a set of conflict markers that managed
> to get committed...?

I don't think so.

There's some other uses of >>> in that file, eg about line 162:

  >>> The current powerpc implementation assumes that a device driver will
  >>> *not* schedule or semaphore in this routine; the current powerpc
  >>> implementation uses one kernel thread to notify all devices;
  >>> thus, if one device sleeps/schedules, all devices are affected.
  >>> Doing better requires complex multi-threaded logic in the error
  >>> recovery implementation (e.g. waiting for all notification threads
  >>> to "join" before proceeding with recovery.)  This seems excessively
  >>> complex and not worth implementing.


So it's just an odd choice of emphasis device I think.

cheers


Re: [PATCH v7 22/27] binfmt_elf: Extract .note.gnu.property from an ELF file

2019-06-18 Thread Peter Zijlstra
On Tue, Jun 18, 2019 at 10:12:50AM +0100, Dave Martin wrote:
> On Mon, Jun 17, 2019 at 02:20:40PM +0200, Thomas Gleixner wrote:
> > On Mon, 17 Jun 2019, Florian Weimer wrote:
> > > * Dave Martin:
> > > > On Tue, Jun 11, 2019 at 12:31:34PM -0700, Yu-cheng Yu wrote:
> > > >> We can probably check PT_GNU_PROPERTY first, and fallback (based on 
> > > >> ld-linux
> > > >> version?) to PT_NOTE scanning?
> > > >
> > > > For arm64, we can check for PT_GNU_PROPERTY and then give up
> > > > unconditionally.
> > > >
> > > > For x86, we would fall back to PT_NOTE scanning, but this will add a bit
> > > > of cost to binaries that don't have NT_GNU_PROPERTY_TYPE_0.  The ld.so
> > > > version doesn't tell you what ELF ABI a given executable conforms to.
> > > >
> > > > Since this sounds like it's largely a distro-specific issue, maybe there
> > > > could be a Kconfig option to turn the fallback PT_NOTE scanning on?
> > > 
> > > I'm worried that this causes interop issues similarly to what we see
> > > with VSYSCALL today.  If we need both and a way to disable it, it should
> > > be something like a personality flag which can be configured for each
> > > process tree separately.  Ideally, we'd settle on one correct approach
> > > (i.e., either always process both, or only process PT_GNU_PROPERTY) and
> > > enforce that.
> > 
> > Chose one and only the one which makes technically sense and is not some
> > horrible vehicle.
> > 
> > Everytime we did those 'oh we need to make x fly workarounds' we regretted
> > it sooner than later.
> 
> So I guess that points to keeping PT_NOTE scanning always available as a
> fallback on x86.  This sucks a bit, but if there are binaries already in
> the wild that rely on this, I don't think we have much choice...

I'm not sure I read Thomas' comment like that. In my reading keeping the
PT_NOTE fallback is exactly one of those 'fly workarounds'. By not
supporting PT_NOTE only the 'fine' people already shit^Hpping this out
of tree are affected, and we don't have to care about them at all.


Re: [PATCH v7 22/27] binfmt_elf: Extract .note.gnu.property from an ELF file

2019-06-18 Thread Florian Weimer
* Peter Zijlstra:

> I'm not sure I read Thomas' comment like that. In my reading keeping the
> PT_NOTE fallback is exactly one of those 'fly workarounds'. By not
> supporting PT_NOTE only the 'fine' people already shit^Hpping this out
> of tree are affected, and we don't have to care about them at all.

Just to be clear here: There was an ABI document that required PT_NOTE
parsing.  The Linux kernel does *not* define the x86-64 ABI, it only
implements it.  The authoritative source should be the ABI document.

In this particularly case, so far anyone implementing this ABI extension
tried to provide value by changing it, sometimes successfully.  Which
makes me wonder why we even bother to mainatain ABI documentation.  The
kernel is just very late to the party.

Thanks,
Florian


Re: [PATCH v7 22/27] binfmt_elf: Extract .note.gnu.property from an ELF file

2019-06-18 Thread Peter Zijlstra
On Tue, Jun 18, 2019 at 02:47:00PM +0200, Florian Weimer wrote:
> * Peter Zijlstra:
> 
> > I'm not sure I read Thomas' comment like that. In my reading keeping the
> > PT_NOTE fallback is exactly one of those 'fly workarounds'. By not
> > supporting PT_NOTE only the 'fine' people already shit^Hpping this out
> > of tree are affected, and we don't have to care about them at all.
> 
> Just to be clear here: There was an ABI document that required PT_NOTE
> parsing.

URGH.

> The Linux kernel does *not* define the x86-64 ABI, it only
> implements it.  The authoritative source should be the ABI document.
>
> In this particularly case, so far anyone implementing this ABI extension
> tried to provide value by changing it, sometimes successfully.  Which
> makes me wonder why we even bother to mainatain ABI documentation.  The
> kernel is just very late to the party.

How can the kernel be late to the party if all of this is spinning
wheels without kernel support?


Re: [PATCH v5 1/2] arm64: Define Documentation/arm64/tagged-address-abi.txt

2019-06-18 Thread Kevin Brodsky

I'm happy with the ABI overall, but I think we need a few more tweaks.

On 13/06/2019 16:51, Vincenzo Frascino wrote:

On arm64 the TCR_EL1.TBI0 bit has been always enabled hence
the userspace (EL0) is allowed to set a non-zero value in the
top byte but the resulting pointers are not allowed at the
user-kernel syscall ABI boundary.

With the relaxed ABI proposed through this document, it is now possible
to pass tagged pointers to the syscalls, when these pointers are in
memory ranges obtained by an anonymous (MAP_ANONYMOUS) mmap().

This change in the ABI requires a mechanism to requires the userspace
to opt-in to such an option.

Specify and document the way in which sysctl and prctl() can be used
in combination to allow the userspace to opt-in this feature.

Cc: Catalin Marinas 
Cc: Will Deacon 
CC: Andrey Konovalov 
Signed-off-by: Vincenzo Frascino 
---
  Documentation/arm64/tagged-address-abi.txt | 134 +
  1 file changed, 134 insertions(+)
  create mode 100644 Documentation/arm64/tagged-address-abi.txt

diff --git a/Documentation/arm64/tagged-address-abi.txt 
b/Documentation/arm64/tagged-address-abi.txt
new file mode 100644
index ..0ae900d4bb2d
--- /dev/null
+++ b/Documentation/arm64/tagged-address-abi.txt
@@ -0,0 +1,134 @@
+ARM64 TAGGED ADDRESS ABI
+
+
+This document describes the usage and semantics of the Tagged Address
+ABI on arm64.
+
+1. Introduction
+---
+
+On arm64 the TCR_EL1.TBI0 bit has been always enabled on the kernel, hence

"been always" -> "always been"


+the userspace (EL0) is entitled to perform a user memory access through a
+64-bit pointer with a non-zero top byte but the resulting pointers are not
+allowed at the user-kernel syscall ABI boundary.
+
+This document describes a relaxation of the ABI that makes it possible to
+to pass tagged pointers to the syscalls, when these pointers are in memory
+ranges obtained as described in section 2.
+
+Since it is not desirable to relax the ABI to allow tagged user addresses
+into the kernel indiscriminately, arm64 provides a new sysctl interface
+(/proc/sys/abi/tagged_addr) that is used to prevent the applications from
+enabling the relaxed ABI and a new prctl() interface that can be used to
+enable or disable the relaxed ABI.
+A detailed description of the newly introduced mechanisms will be provided
+in section 2.
+
+2. ARM64 Tagged Address ABI
+---
+
+From the kernel syscall interface perspective, we define, for the purposes
+of this document, a "valid tagged pointer" as a pointer that either has a
+zero value set in the top byte or has a non-zero value, it is in memory
+ranges privately owned by a userspace process and it is obtained in one of


Remove all the remaining "it": "a pointer that either [...], is in memory ranges 
[...] and is obtained..."



+the following ways:
+  - mmap() done by the process itself, where either:
+* flags have MAP_PRIVATE and MAP_ANONYMOUS
+* flags have MAP_PRIVATE and the file descriptor refers to a regular
+  file or "/dev/zero"
+  - brk() system call done by the process itself (i.e. the heap area between
+the initial location of the program break at process creation and its
+current location).
+  - any memory mapped by the kernel in the process's address space during
+creation and following the restrictions presented above (i.e. data, bss,
+stack).


As I commented on v2, the "i.e." is not correct: these 3 sections are not the only 
ones that are covered by this ABI (.text also is, for instance). Replacing "i.e." 
with "e.g." would work.


Also, since the rules above say explicitly "done by the process itself", it might be 
clearer to replace "following the restrictions presented above" with "with the same 
restrictions as for mmap()".



+
+The ARM64 Tagged Address ABI is an opt-in feature, and an application can
+control it using the following:
+ - /proc/sys/abi/tagged_addr: a new sysctl interface that can be used to
+prevent the applications from enabling the relaxed ABI.
+The sysctl is meant also for testing purposes in order to provide a
+simple way for the userspace to verify the return error checking of
+the prctl() commands without having to reconfigure the kernel.
+The sysctl supports the following configuration options:
+ - 0: Disable ARM64 Tagged Address ABI for all the applications.
+ - 1 (Default): Enable ARM64 Tagged Address ABI for all the
+applications.


I find this very confusing, because it suggests that the default value of 
PR_GET_TAGGED_ADDR_CTRL for new processes will be set to the value of this sysctl, 
when in fact this sysctl is about restricting the *availability* of the new ABI. 
Instead of disabling the ABI, I would talk about disabling access to the new ABI here.



+If the ARM64 Tagged Address ABI is disabled at a certain point in
+time, all the applications

Re: [Linux-kernel-mentees] [PATCH] Documentation: platform: convert x86-laptop-drivers.txt to reST

2019-06-18 Thread Jonathan Corbet
On Tue, 18 Jun 2019 07:41:58 +0200
Greg KH  wrote:

> On Tue, Jun 18, 2019 at 11:02:27AM +0530, Puranjay Mohan wrote:
> > This converts the plain text documentation to reStructuredText format.
> > No essential content change.
> > 
> > Signed-off-by: Puranjay Mohan 
> > ---
> >  Documentation/platform/x86-laptop-drivers.rst | 23 +++
> >  Documentation/platform/x86-laptop-drivers.txt | 18 ---
> >  2 files changed, 23 insertions(+), 18 deletions(-)
> >  create mode 100644 Documentation/platform/x86-laptop-drivers.rst
> >  delete mode 100644 Documentation/platform/x86-laptop-drivers.txt  
> 
> Don't you also need to hook it up to the documentation build process
> when doing this?

Hooking it into the TOC tree is a good thing, but I think it's also good
to think about the exercise in general.  This is a document dropped into
place five years ago and never touched again.  It's a short list of
seemingly ancient laptops with no explanation of what it means.  So the
real question, IMO, is whether this document is useful to anybody and, if
not, whether it should just be deleted instead.

Puranjay, thanks for working to improve the kernel docs!  Please don't be
discouraged by this response - it's just a sign that kernel documentation
has problems far beyond just formatting...

Thanks,

jon


Re: [PATCH v7 22/27] binfmt_elf: Extract .note.gnu.property from an ELF file

2019-06-18 Thread Dave Martin
On Tue, Jun 18, 2019 at 02:55:12PM +0200, Peter Zijlstra wrote:
> On Tue, Jun 18, 2019 at 02:47:00PM +0200, Florian Weimer wrote:
> > * Peter Zijlstra:
> > 
> > > I'm not sure I read Thomas' comment like that. In my reading keeping the
> > > PT_NOTE fallback is exactly one of those 'fly workarounds'. By not
> > > supporting PT_NOTE only the 'fine' people already shit^Hpping this out
> > > of tree are affected, and we don't have to care about them at all.
> > 
> > Just to be clear here: There was an ABI document that required PT_NOTE
> > parsing.
> 
> URGH.
> 
> > The Linux kernel does *not* define the x86-64 ABI, it only
> > implements it.  The authoritative source should be the ABI document.
> >
> > In this particularly case, so far anyone implementing this ABI extension
> > tried to provide value by changing it, sometimes successfully.  Which
> > makes me wonder why we even bother to mainatain ABI documentation.  The
> > kernel is just very late to the party.
> 
> How can the kernel be late to the party if all of this is spinning
> wheels without kernel support?

PT_GNU_PROPERTY is mentioned and allocated a p_type value in hjl's
spec [1], but otherwise seems underspecified.

In particular, it's not clear whether a PT_GNU_PROPERTY phdr _must_ be
emitted for NT_GNU_PROPERTY_TYPE_0.  While it seems a no-brainer to emit
it, RHEL's linker already doesn't IIUC, and there are binaries in the
wild.

Maybe this phdr type is a late addition -- I haven't attempted to dig
through the history.


For arm64 we don't have this out-of-tree legacy to support, so we can
avoid exhausitvely searching for the note: no PT_GNU_PROPERTY ->
no note.

So, can we do the same for x86, forcing RHEL to carry some code out of
tree to support their legacy binaries?  Or do we accept that there is
already a de facto ABI and try to be compatible with it?


>From my side, I want to avoid duplication between x86 and arm64, and
keep unneeded complexity out of the ELF loader where possible.

Cheers
---Dave


[1] https://github.com/hjl-tools/linux-abi/wiki/Linux-Extensions-to-gABI


Re: [Linux-kernel-mentees] [PATCH] Documentation: platform: convert x86-laptop-drivers.txt to reST

2019-06-18 Thread Greg KH
On Tue, Jun 18, 2019 at 07:17:17AM -0600, Jonathan Corbet wrote:
> On Tue, 18 Jun 2019 07:41:58 +0200
> Greg KH  wrote:
> 
> > On Tue, Jun 18, 2019 at 11:02:27AM +0530, Puranjay Mohan wrote:
> > > This converts the plain text documentation to reStructuredText format.
> > > No essential content change.
> > > 
> > > Signed-off-by: Puranjay Mohan 
> > > ---
> > >  Documentation/platform/x86-laptop-drivers.rst | 23 +++
> > >  Documentation/platform/x86-laptop-drivers.txt | 18 ---
> > >  2 files changed, 23 insertions(+), 18 deletions(-)
> > >  create mode 100644 Documentation/platform/x86-laptop-drivers.rst
> > >  delete mode 100644 Documentation/platform/x86-laptop-drivers.txt  
> > 
> > Don't you also need to hook it up to the documentation build process
> > when doing this?
> 
> Hooking it into the TOC tree is a good thing, but I think it's also good
> to think about the exercise in general.  This is a document dropped into
> place five years ago and never touched again.  It's a short list of
> seemingly ancient laptops with no explanation of what it means.  So the
> real question, IMO, is whether this document is useful to anybody and, if
> not, whether it should just be deleted instead.

I bet it should be deleted, but we should ask the platform driver
maintainers first before we do that :)

thanks,

greg k-h


[PATCH] docs/vm: hwpoison.rst: Fix quote formatting

2019-06-18 Thread Valentin Schneider
The asterisks prepended to the quoted text currently get translated to
bullet points, which gets increasingly confusing the smaller your
screen is (when viewing the sphinx output, that is).

Convert the whole quote to a literal block.

Signed-off-by: Valentin Schneider 
---
 Documentation/vm/hwpoison.rst | 52 +--
 1 file changed, 26 insertions(+), 26 deletions(-)

diff --git a/Documentation/vm/hwpoison.rst b/Documentation/vm/hwpoison.rst
index 09bd24a92784..a5c884293dac 100644
--- a/Documentation/vm/hwpoison.rst
+++ b/Documentation/vm/hwpoison.rst
@@ -13,32 +13,32 @@ kill the processes associated with it and avoid using it in 
the future.
 
 This patchkit implements the necessary infrastructure in the VM.
 
-To quote the overview comment:
-
- * High level machine check handler. Handles pages reported by the
- * hardware as being corrupted usually due to a 2bit ECC memory or cache
- * failure.
- *
- * This focusses on pages detected as corrupted in the background.
- * When the current CPU tries to consume corruption the currently
- * running process can just be killed directly instead. This implies
- * that if the error cannot be handled for some reason it's safe to
- * just ignore it because no corruption has been consumed yet. Instead
- * when that happens another machine check will happen.
- *
- * Handles page cache pages in various states. The tricky part
- * here is that we can access any page asynchronous to other VM
- * users, because memory failures could happen anytime and anywhere,
- * possibly violating some of their assumptions. This is why this code
- * has to be extremely careful. Generally it tries to use normal locking
- * rules, as in get the standard locks, even if that means the
- * error handling takes potentially a long time.
- *
- * Some of the operations here are somewhat inefficient and have non
- * linear algorithmic complexity, because the data structures have not
- * been optimized for this case. This is in particular the case
- * for the mapping from a vma to a process. Since this case is expected
- * to be rare we hope we can get away with this.
+To quote the overview comment::
+
+   High level machine check handler. Handles pages reported by the
+   hardware as being corrupted usually due to a 2bit ECC memory or cache
+   failure.
+
+   This focusses on pages detected as corrupted in the background.
+   When the current CPU tries to consume corruption the currently
+   running process can just be killed directly instead. This implies
+   that if the error cannot be handled for some reason it's safe to
+   just ignore it because no corruption has been consumed yet. Instead
+   when that happens another machine check will happen.
+
+   Handles page cache pages in various states. The tricky part
+   here is that we can access any page asynchronous to other VM
+   users, because memory failures could happen anytime and anywhere,
+   possibly violating some of their assumptions. This is why this code
+   has to be extremely careful. Generally it tries to use normal locking
+   rules, as in get the standard locks, even if that means the
+   error handling takes potentially a long time.
+
+   Some of the operations here are somewhat inefficient and have non
+   linear algorithmic complexity, because the data structures have not
+   been optimized for this case. This is in particular the case
+   for the mapping from a vma to a process. Since this case is expected
+   to be rare we hope we can get away with this.
 
 The code consists of a the high level handler in mm/memory-failure.c,
 a new page poison bit and various checks in the VM to handle poisoned
-- 
2.20.1



Re: [Linux-kernel-mentees] [PATCH] Documentation: platform: convert x86-laptop-drivers.txt to reST

2019-06-18 Thread Shuah Khan

On 6/18/19 7:39 AM, Greg KH wrote:

On Tue, Jun 18, 2019 at 07:17:17AM -0600, Jonathan Corbet wrote:

On Tue, 18 Jun 2019 07:41:58 +0200
Greg KH  wrote:


On Tue, Jun 18, 2019 at 11:02:27AM +0530, Puranjay Mohan wrote:

This converts the plain text documentation to reStructuredText format.
No essential content change.

Signed-off-by: Puranjay Mohan 
---
  Documentation/platform/x86-laptop-drivers.rst | 23 +++
  Documentation/platform/x86-laptop-drivers.txt | 18 ---
  2 files changed, 23 insertions(+), 18 deletions(-)
  create mode 100644 Documentation/platform/x86-laptop-drivers.rst
  delete mode 100644 Documentation/platform/x86-laptop-drivers.txt


Don't you also need to hook it up to the documentation build process
when doing this?


Hooking it into the TOC tree is a good thing, but I think it's also good
to think about the exercise in general.  This is a document dropped into
place five years ago and never touched again.  It's a short list of
seemingly ancient laptops with no explanation of what it means.  So the
real question, IMO, is whether this document is useful to anybody and, if
not, whether it should just be deleted instead.


I bet it should be deleted, but we should ask the platform driver
maintainers first before we do that :)



Adding Platform driver maintainers Darren Hart and Andy Shevchenko, and
Compal laptop maintainer Cezary Jackiewicz to the discussion.

+ platform-driver-...@vger.kernel.org

Hi Darren, Andy, and Cezary,

Would it be okay to remove the x86-laptop-drivers.txt or should it be
converted to .rst and kept around?

thanks,
-- Shuah







Re: [PATCH v7 22/27] binfmt_elf: Extract .note.gnu.property from an ELF file

2019-06-18 Thread Yu-cheng Yu
On Tue, 2019-06-18 at 14:32 +0100, Dave Martin wrote:
> On Tue, Jun 18, 2019 at 02:55:12PM +0200, Peter Zijlstra wrote:
> > On Tue, Jun 18, 2019 at 02:47:00PM +0200, Florian Weimer wrote:
> > > * Peter Zijlstra:
> > > 
> > > > I'm not sure I read Thomas' comment like that. In my reading keeping the
> > > > PT_NOTE fallback is exactly one of those 'fly workarounds'. By not
> > > > supporting PT_NOTE only the 'fine' people already shit^Hpping this out
> > > > of tree are affected, and we don't have to care about them at all.
> > > 
> > > Just to be clear here: There was an ABI document that required PT_NOTE
> > > parsing.
> > 
> > URGH.
> > 
> > > The Linux kernel does *not* define the x86-64 ABI, it only
> > > implements it.  The authoritative source should be the ABI document.
> > > 
> > > In this particularly case, so far anyone implementing this ABI extension
> > > tried to provide value by changing it, sometimes successfully.  Which
> > > makes me wonder why we even bother to mainatain ABI documentation.  The
> > > kernel is just very late to the party.
> > 
> > How can the kernel be late to the party if all of this is spinning
> > wheels without kernel support?
> 
> PT_GNU_PROPERTY is mentioned and allocated a p_type value in hjl's
> spec [1], but otherwise seems underspecified.
> 
> In particular, it's not clear whether a PT_GNU_PROPERTY phdr _must_ be
> emitted for NT_GNU_PROPERTY_TYPE_0.  While it seems a no-brainer to emit
> it, RHEL's linker already doesn't IIUC, and there are binaries in the
> wild.
> 
> Maybe this phdr type is a late addition -- I haven't attempted to dig
> through the history.
> 
> 
> For arm64 we don't have this out-of-tree legacy to support, so we can
> avoid exhausitvely searching for the note: no PT_GNU_PROPERTY ->
> no note.
> 
> So, can we do the same for x86, forcing RHEL to carry some code out of
> tree to support their legacy binaries?  Or do we accept that there is
> already a de facto ABI and try to be compatible with it?
> 
> 
> From my side, I want to avoid duplication between x86 and arm64, and
> keep unneeded complexity out of the ELF loader where possible.

Hi Florian,

The kernel looks at only ld-linux.  Other applications are loaded by ld-linux. 
So the issues are limited to three versions of ld-linux's.  Can we somehow
update those??

Thanks,
Yu-cheng


Re: [PATCH v4 2/2] fTPM: add documentation for ftpm driver

2019-06-18 Thread Randy Dunlap
On 5/30/19 8:27 AM, Sasha Levin wrote:
> This patch adds basic documentation to describe the new fTPM driver.
> 
> Signed-off-by: Sasha Levin 
> Signed-off-by: Sasha Levin (Microsoft) 
> ---
>  Documentation/security/tpm/index.rst|  1 +
>  Documentation/security/tpm/tpm_ftpm_tee.rst | 31 +
>  2 files changed, 32 insertions(+)
>  create mode 100644 Documentation/security/tpm/tpm_ftpm_tee.rst

Hi,
Just some minor editing...

> diff --git a/Documentation/security/tpm/tpm_ftpm_tee.rst 
> b/Documentation/security/tpm/tpm_ftpm_tee.rst
> new file mode 100644
> index 0..29c2f8b5ed100
> --- /dev/null
> +++ b/Documentation/security/tpm/tpm_ftpm_tee.rst
> @@ -0,0 +1,31 @@
> +=
> +Firmware TPM Driver
> +=
> +
> +| Authors:
> +| Thirupathaiah Annapureddy 
> +| Sasha Levin 
> +
> +This document describes the firmware Trusted Platform Module (fTPM)
> +device driver.
> +
> +Introduction
> +
> +
> +This driver is a shim for a firmware implemented in ARM's TrustZone

 for firmware

> +environment. The driver allows programs to interact with the TPM in the same
> +way the would interact with a hardware TPM.

   they

> +
> +Design
> +==
> +
> +The driver acts as a thin layer that passes commands to and from a TPM
> +implemented in firmware. The driver itself doesn't contain much logic and is
> +used more like a dumb pipe between firmware and kernel/userspace.
> +
> +The firmware itself is based on the following paper:
> +https://www.microsoft.com/en-us/research/wp-content/uploads/2017/06/ftpm1.pdf
> +
> +When the driver is loaded it will expose ``/dev/tpmX`` character devices to
> +userspace which will enable userspace to communicate with the firmware tpm

  TPM

> +through this device.
> 


-- 
~Randy


Re: [PATCH] docs/vm: hwpoison.rst: Fix quote formatting

2019-06-18 Thread Jonathan Corbet
On Tue, 18 Jun 2019 15:56:05 +0100
Valentin Schneider  wrote:

> The asterisks prepended to the quoted text currently get translated to
> bullet points, which gets increasingly confusing the smaller your
> screen is (when viewing the sphinx output, that is).
> 
> Convert the whole quote to a literal block.
> 
> Signed-off-by: Valentin Schneider 

That definitely seems worth fixing, and I can apply this.  But a few
things to ponder first...

 - If you convert it to a literal block, the asterisks can remain, making
   for a less intrusive patch.

 - I was wondering if we should just use a kernel-doc directive to pull
   the comment directly from the source, but investigation quickly showed
   that the "overview comment" doesn't actually exist in anything close to
   the quoted form.  See mm/memory-failure.c.

Given that, and things like references to support in "upcoming Intel
CPUs", I suspect that this document is pretty seriously out of date and
needs some more in-depth attention.  If you're playing in this area and
feel like it, updating the document for real would be much appreciated...:)

Thanks,

jon


Re: [PATCH v2] kbuild: add support for ensuring headers are self-contained

2019-06-18 Thread Masahiro Yamada
On Wed, Jun 5, 2019 at 2:26 AM Sam Ravnborg  wrote:
>
> On Tue, Jun 04, 2019 at 03:42:48PM +0300, Jani Nikula wrote:
> > Sometimes it's useful to be able to explicitly ensure certain headers
> > remain self-contained, i.e. that they are compilable as standalone
> > units, by including and/or forward declaring everything they depend on.
> >
> > Add special target header-test-y where individual Makefiles can add
> > headers to be tested if CONFIG_HEADER_TEST is enabled. This will
> > generate a dummy C file per header that gets built as part of extra-y.
> >
> > Cc: Chris Wilson 
> > Cc: Masahiro Yamada 
> > Cc: Michal Marek 
> > Cc: Sam Ravnborg 
> > Signed-off-by: Jani Nikula 
>
> Looks good, thanks.
>
> Reviewed-by: Sam Ravnborg 
>

Applied to linux-kbuild.
Thanks.


-- 
Best Regards
Masahiro Yamada


Re: [PATCH 00/15] kbuild: refactor headers_install and support compile-test of UAPI headers

2019-06-18 Thread Masahiro Yamada
On Tue, Jun 4, 2019 at 7:15 PM Masahiro Yamada
 wrote:
>
>
> Multiple people have suggested to compile-test UAPI headers.
>
> Currently, Kbuild provides simple sanity checks by headers_check
> but they are not enough to catch bugs.
>
> The most recent patch I know is David Howells' work:
> https://patchwork.kernel.org/patch/10590203/
>
> I agree that we need better tests for UAPI headers,
> but I want to integrate it in a clean way.
>
> The idea that has been in my mind is to compile each header
> to make sure the selfcontainedness.
>
> Recently, Jani Nikula proposed a new syntax 'header-test-y'.
> https://patchwork.kernel.org/patch/10947005/
>
> So, I implemented UAPI compile-testing on top of that.
>
> When adding a new feature, cleaning the code first is a
> good practice.
>
> [1] Remove headers_install_all
>
> This target installs UAPI headers of all architectures
> in a single tree.
> It does not make sense to compile test of headers from
> multiple arches at the same time. Hence, removed.
>
> [2] Split header installation into 'make headers' and 'make headers_install'
>
> To compile-test UAPI headers, we need a work-directory somewhere
> to save objects and .*.cmd files.
>
> usr/include/ will be the work-directory.
>
> Since we cannot pollute the final destination of headers_install,
>
> I split the header installation into two stages.
>
> 'make headers' will build up
> the ready-to-install headers in usr/include,
> which will be also used as a work-directory for the compile-test.
>
> 'make headers_install' will copy headers
> from usr/include to $(INSTALL_HDR_PATH)/include.
>
> [3] Support compile-test of UAPI headers
>
> This is implemented in usr/include/Makefile
>
>
> Jani Nikula (1):
>   kbuild: add support for ensuring headers are self-contained
>
> Masahiro Yamada (14):
>   kbuild: remove headers_{install,check}_all
>   kbuild: remove stale dependency between Documentation/ and
> headers_install
>   kbuild: make gdb_script depend on prepare0 instead of prepare
>   kbuild: fix Kconfig prompt of CONFIG_HEADERS_CHECK
>   kbuild: add CONFIG_HEADERS_INSTALL and loosen the dependency of
> samples
>   kbuild: remove build_unifdef target in scripts/Makefile
>   kbuild: build all prerequisite of headers_install simultaneously
>   kbuild: add 'headers' target to build up ready-to-install uapi headers
>   kbuild: re-implement Makefile.headersinst without directory descending
>   kbuild: move hdr-inst shorthand to top Makefile
>   kbuild: simplify scripts/headers_install.sh
>   kbuild: deb-pkg: do not run headers_check
>   fixup: kbuild: add support for ensuring headers are self-contained
>   kbuild: compile test UAPI headers to ensure they are self-contained

Series, applied to linux-kbuild.


>  Documentation/kbuild/headers_install.txt |   7 --
>  Documentation/kbuild/makefiles.txt   |  13 ++-
>  Makefile |  56 +-
>  arch/arc/configs/tb10x_defconfig |   1 +
>  arch/nds32/configs/defconfig |   1 +
>  arch/parisc/configs/a500_defconfig   |   1 +
>  arch/parisc/configs/b180_defconfig   |   1 +
>  arch/parisc/configs/c3000_defconfig  |   1 +
>  arch/parisc/configs/default_defconfig|   1 +
>  arch/powerpc/configs/ppc6xx_defconfig|   1 +
>  arch/s390/configs/debug_defconfig|   1 +
>  include/uapi/{linux => }/Kbuild  |   6 +-
>  init/Kconfig |  20 
>  lib/Kconfig.debug|  25 +++--
>  samples/Kconfig  |  14 ++-
>  samples/Makefile |   4 +-
>  scripts/Kbuild.include   |   6 --
>  scripts/Makefile |   5 -
>  scripts/Makefile.build   |   9 ++
>  scripts/Makefile.headersinst | 132 ++-
>  scripts/Makefile.lib |   3 +
>  scripts/cc-system-headers.sh |   8 ++
>  scripts/headers.sh   |  29 -
>  scripts/headers_install.sh   |  48 -
>  scripts/package/builddeb |   2 +-
>  usr/.gitignore   |   1 -
>  usr/Makefile |   2 +
>  usr/include/.gitignore   |   3 +
>  usr/include/Makefile | 132 +++
>  29 files changed, 329 insertions(+), 204 deletions(-)
>  rename include/uapi/{linux => }/Kbuild (77%)
>  create mode 100755 scripts/cc-system-headers.sh
>  delete mode 100755 scripts/headers.sh
>  create mode 100644 usr/include/.gitignore
>  create mode 100644 usr/include/Makefile
>
> --
> 2.17.1
>
>
> ___
> linux-riscv mailing list
> linux-ri...@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv



-- 
Best Regards
Masahiro Yamada


Re: [PATCH v7 22/27] binfmt_elf: Extract .note.gnu.property from an ELF file

2019-06-18 Thread Florian Weimer
* Yu-cheng Yu:

> The kernel looks at only ld-linux.  Other applications are loaded by 
> ld-linux. 
> So the issues are limited to three versions of ld-linux's.  Can we somehow
> update those??

I assumed that it would also parse the main executable and make
adjustments based on that.

ld.so can certainly provide whatever the kernel needs.  We need to tweak
the existing loader anyway.

No valid statically-linked binaries exist today, so this is not a
consideration at this point.

Thanks,
Florian


Re: [PATCH] docs/vm: hwpoison.rst: Fix quote formatting

2019-06-18 Thread Valentin Schneider
On 18/06/2019 16:31, Jonathan Corbet wrote:
> On Tue, 18 Jun 2019 15:56:05 +0100
> Valentin Schneider  wrote:
> 
>> The asterisks prepended to the quoted text currently get translated to
>> bullet points, which gets increasingly confusing the smaller your
>> screen is (when viewing the sphinx output, that is).
>>
>> Convert the whole quote to a literal block.
>>
>> Signed-off-by: Valentin Schneider 
> 
> That definitely seems worth fixing, and I can apply this.  But a few
> things to ponder first...
> 
>  - If you convert it to a literal block, the asterisks can remain, making
>for a less intrusive patch.
> 
>  - I was wondering if we should just use a kernel-doc directive to pull
>the comment directly from the source, but investigation quickly showed
>that the "overview comment" doesn't actually exist in anything close to
>the quoted form.  See mm/memory-failure.c.
> 
> Given that, and things like references to support in "upcoming Intel
> CPUs", I suspect that this document is pretty seriously out of date and
> needs some more in-depth attention.  If you're playing in this area and
> feel like it, updating the document for real would be much appreciated...:)
> 

I'm afraid this was only a "drive-by" patch, as I just happened to skim
through this page on my phone while waiting for a meeting - I'm quite
clueless about page poisoning.

However, I could try to replace the quote with a kernel-doc directive to
get a more up-to-date description (and maybe add a small note to say the
rest of the doc is somewhat outdated). That, or just keep the quote as is
but keep the asterisks - whichever you're happier with.

> Thanks,
> 
> jon
> 


Re: [PATCH v7 22/27] binfmt_elf: Extract .note.gnu.property from an ELF file

2019-06-18 Thread Yu-cheng Yu
On Tue, 2019-06-18 at 17:49 +0200, Florian Weimer wrote:
> * Yu-cheng Yu:
> 
> > The kernel looks at only ld-linux.  Other applications are loaded by ld-
> > linux. 
> > So the issues are limited to three versions of ld-linux's.  Can we somehow
> > update those??
> 
> I assumed that it would also parse the main executable and make
> adjustments based on that.

Yes, Linux also looks at the main executable's header, but not its
NT_GNU_PROPERTY_TYPE_0 if there is a loader.

> 
> ld.so can certainly provide whatever the kernel needs.  We need to tweak
> the existing loader anyway.
> 
> No valid statically-linked binaries exist today, so this is not a
> consideration at this point.

So from kernel, we look at only PT_GNU_PROPERTY?

Yu-cheng



Re: [PATCH v7 22/27] binfmt_elf: Extract .note.gnu.property from an ELF file

2019-06-18 Thread Florian Weimer
* Yu-cheng Yu:

>> I assumed that it would also parse the main executable and make
>> adjustments based on that.
>
> Yes, Linux also looks at the main executable's header, but not its
> NT_GNU_PROPERTY_TYPE_0 if there is a loader.
>
>> 
>> ld.so can certainly provide whatever the kernel needs.  We need to tweak
>> the existing loader anyway.
>> 
>> No valid statically-linked binaries exist today, so this is not a
>> consideration at this point.
>
> So from kernel, we look at only PT_GNU_PROPERTY?

If you don't parse notes/segments in the executable for CET, then yes.
We can put PT_GNU_PROPERTY into the loader.

Thanks,
Florian


Re: [PATCH v7 22/27] binfmt_elf: Extract .note.gnu.property from an ELF file

2019-06-18 Thread Yu-cheng Yu
On Tue, 2019-06-18 at 18:05 +0200, Florian Weimer wrote:
> * Yu-cheng Yu:
> 
> > > I assumed that it would also parse the main executable and make
> > > adjustments based on that.
> > 
> > Yes, Linux also looks at the main executable's header, but not its
> > NT_GNU_PROPERTY_TYPE_0 if there is a loader.
> > 
> > > 
> > > ld.so can certainly provide whatever the kernel needs.  We need to tweak
> > > the existing loader anyway.
> > > 
> > > No valid statically-linked binaries exist today, so this is not a
> > > consideration at this point.
> > 
> > So from kernel, we look at only PT_GNU_PROPERTY?
> 
> If you don't parse notes/segments in the executable for CET, then yes.
> We can put PT_GNU_PROPERTY into the loader.

Thanks!


Re: [PATCH v7 22/27] binfmt_elf: Extract .note.gnu.property from an ELF file

2019-06-18 Thread Dave Martin
On Tue, Jun 18, 2019 at 09:00:35AM -0700, Yu-cheng Yu wrote:
> On Tue, 2019-06-18 at 18:05 +0200, Florian Weimer wrote:
> > * Yu-cheng Yu:
> > 
> > > > I assumed that it would also parse the main executable and make
> > > > adjustments based on that.
> > > 
> > > Yes, Linux also looks at the main executable's header, but not its
> > > NT_GNU_PROPERTY_TYPE_0 if there is a loader.
> > > 
> > > > 
> > > > ld.so can certainly provide whatever the kernel needs.  We need to tweak
> > > > the existing loader anyway.
> > > > 
> > > > No valid statically-linked binaries exist today, so this is not a
> > > > consideration at this point.
> > > 
> > > So from kernel, we look at only PT_GNU_PROPERTY?
> > 
> > If you don't parse notes/segments in the executable for CET, then yes.
> > We can put PT_GNU_PROPERTY into the loader.
> 
> Thanks!

Would this require the kernel and ld.so to be updated in a particular
order to avoid breakage?  I don't know enough about RHEL to know how
controversial that might be.

Also:

What about static binaries distrubited as part of RHEL?

A user would also reasonably expect static binaries built using the
distro toolchain to work on top of the distro kernel...  which might
be broken by this.


(When I say "broken" I mean that the binary would run, but CET
protections would be silently turned off.)

Cheers
---Dave


Re: [PATCH v7 22/27] binfmt_elf: Extract .note.gnu.property from an ELF file

2019-06-18 Thread Florian Weimer
* Dave Martin:

> On Tue, Jun 18, 2019 at 09:00:35AM -0700, Yu-cheng Yu wrote:
>> On Tue, 2019-06-18 at 18:05 +0200, Florian Weimer wrote:
>> > * Yu-cheng Yu:
>> > 
>> > > > I assumed that it would also parse the main executable and make
>> > > > adjustments based on that.
>> > > 
>> > > Yes, Linux also looks at the main executable's header, but not its
>> > > NT_GNU_PROPERTY_TYPE_0 if there is a loader.
>> > > 
>> > > > 
>> > > > ld.so can certainly provide whatever the kernel needs.  We need to 
>> > > > tweak
>> > > > the existing loader anyway.
>> > > > 
>> > > > No valid statically-linked binaries exist today, so this is not a
>> > > > consideration at this point.
>> > > 
>> > > So from kernel, we look at only PT_GNU_PROPERTY?
>> > 
>> > If you don't parse notes/segments in the executable for CET, then yes.
>> > We can put PT_GNU_PROPERTY into the loader.
>> 
>> Thanks!
>
> Would this require the kernel and ld.so to be updated in a particular
> order to avoid breakage?  I don't know enough about RHEL to know how
> controversial that might be.

There is no official ld.so that will work with the current userspace
interface (in this patch submission).  Upstream glibc needs to be
updated anyway, so yet another change isn't much of an issue.  This is
not a problem; we knew that something like this might happen.

Sure, people need a new binutils with backports for PT_GNU_PROPERTY, but
given that only very few people will build CET binaries with older
binutils, I think that's not a real issue either.

Thanks,
Florian


Re: [PATCH v7 22/27] binfmt_elf: Extract .note.gnu.property from an ELF file

2019-06-18 Thread Dave Martin
On Tue, Jun 18, 2019 at 06:25:51PM +0200, Florian Weimer wrote:
> * Dave Martin:
> 
> > On Tue, Jun 18, 2019 at 09:00:35AM -0700, Yu-cheng Yu wrote:
> >> On Tue, 2019-06-18 at 18:05 +0200, Florian Weimer wrote:
> >> > * Yu-cheng Yu:
> >> > 
> >> > > > I assumed that it would also parse the main executable and make
> >> > > > adjustments based on that.
> >> > > 
> >> > > Yes, Linux also looks at the main executable's header, but not its
> >> > > NT_GNU_PROPERTY_TYPE_0 if there is a loader.
> >> > > 
> >> > > > 
> >> > > > ld.so can certainly provide whatever the kernel needs.  We need to 
> >> > > > tweak
> >> > > > the existing loader anyway.
> >> > > > 
> >> > > > No valid statically-linked binaries exist today, so this is not a
> >> > > > consideration at this point.
> >> > > 
> >> > > So from kernel, we look at only PT_GNU_PROPERTY?
> >> > 
> >> > If you don't parse notes/segments in the executable for CET, then yes.
> >> > We can put PT_GNU_PROPERTY into the loader.
> >> 
> >> Thanks!
> >
> > Would this require the kernel and ld.so to be updated in a particular
> > order to avoid breakage?  I don't know enough about RHEL to know how
> > controversial that might be.
> 
> There is no official ld.so that will work with the current userspace
> interface (in this patch submission).  Upstream glibc needs to be
> updated anyway, so yet another change isn't much of an issue.  This is
> not a problem; we knew that something like this might happen.
> 
> Sure, people need a new binutils with backports for PT_GNU_PROPERTY, but
> given that only very few people will build CET binaries with older
> binutils, I think that's not a real issue either.

OK, just wanted to check we weren't missing any requirement for x86.

This approach should satisfy the requirement for arm64 nicely.

Cheers
---Dave


[PATCH 2/6] docs: trace: add a missing blank line

2019-06-18 Thread Mauro Carvalho Chehab
Sphinx expects a blank line after a literal block markup.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/trace/kprobetrace.rst | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/trace/kprobetrace.rst 
b/Documentation/trace/kprobetrace.rst
index 3d162d432a3c..caa0a8ba081e 100644
--- a/Documentation/trace/kprobetrace.rst
+++ b/Documentation/trace/kprobetrace.rst
@@ -228,6 +228,7 @@ events, you need to enable it.
 
 Use the following command to start tracing in an interval.
 ::
+
 # echo 1 > tracing_on
 Open something...
 # echo 0 > tracing_on
-- 
2.21.0



[PATCH 5/6] docs: signal: fix a kernel-doc markup

2019-06-18 Thread Mauro Carvalho Chehab
The kernel-doc parser doesn't handle expressions with %foo*.
Instead, when an asterisk should be part of a constant, it
uses an alternative notation: `foo*`.

Signed-off-by: Mauro Carvalho Chehab 
---
 kernel/signal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/signal.c b/kernel/signal.c
index 91b789dd6e72..10a826855b59 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -349,7 +349,7 @@ void task_clear_jobctl_pending(struct task_struct *task, 
unsigned long mask)
  * @task has %JOBCTL_STOP_PENDING set and is participating in a group stop.
  * Group stop states are cleared and the group stop count is consumed if
  * %JOBCTL_STOP_CONSUME was set.  If the consumption completes the group
- * stop, the appropriate %SIGNAL_* flags are set.
+ * stop, the appropriate `SIGNAL_*` flags are set.
  *
  * CONTEXT:
  * Must be called with @task->sighand->siglock held.
-- 
2.21.0



[PATCH 3/6] lib: list_sort.c: add a blank line to avoid kernel-doc warnings

2019-06-18 Thread Mauro Carvalho Chehab
In order for a list to be recognized as such, blank lines
are required.

Solve those Sphinx warnings:

./lib/list_sort.c:162: WARNING: Unexpected indentation.
./lib/list_sort.c:163: WARNING: Block quote ends without a blank line; 
unexpected unindent.

Signed-off-by: Mauro Carvalho Chehab 
---
 lib/list_sort.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/list_sort.c b/lib/list_sort.c
index 712ed1f4eb64..52f0c258c895 100644
--- a/lib/list_sort.c
+++ b/lib/list_sort.c
@@ -157,9 +157,11 @@ static void merge_final(void *priv, cmp_func cmp, struct 
list_head *head,
  *
  * The number of pending lists of size 2^k is determined by the
  * state of bit k of "count" plus two extra pieces of information:
+ *
  * - The state of bit k-1 (when k == 0, consider bit -1 always set), and
  * - Whether the higher-order bits are zero or non-zero (i.e.
  *   is count >= 2^(k+1)).
+ *
  * There are six states we distinguish.  "x" represents some arbitrary
  * bits, and "y" represents some arbitrary non-zero bits:
  * 0:  00x: 0 pending of size 2^k;   x pending of sizes < 2^k
-- 
2.21.0



[PATCH 4/6] time: hrtimer: use a bullet for the returns bullet list

2019-06-18 Thread Mauro Carvalho Chehab
That gets rid of this warning:

./kernel/time/hrtimer.c:1119: WARNING: Block quote ends without a blank 
line; unexpected unindent.

and displays nicely both at the source code and at the produced
documentation.

Signed-off-by: Mauro Carvalho Chehab 
---
 kernel/time/hrtimer.c | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index edb230aba3d1..49f78453892f 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -1114,9 +1114,10 @@ EXPORT_SYMBOL_GPL(hrtimer_start_range_ns);
  * @timer: hrtimer to stop
  *
  * Returns:
- *  0 when the timer was not active
- *  1 when the timer was active
- * -1 when the timer is currently executing the callback function and
+ *
+ *  •  0 when the timer was not active
+ *  •  1 when the timer was active
+ *  • -1 when the timer is currently executing the callback function and
  *cannot be stopped
  */
 int hrtimer_try_to_cancel(struct hrtimer *timer)
-- 
2.21.0



[PATCH 1/6] docs: trace: fix a broken label

2019-06-18 Thread Mauro Carvalho Chehab
Sphinx warnings about his:

Documentation/trace/kprobetrace.rst:68: WARNING: undefined label: 
user_mem_access (if the link has no caption the label must precede a section 
header)

The problem is quite simple: Sphinx wants a blank line after
references.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/trace/kprobetrace.rst | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/trace/kprobetrace.rst 
b/Documentation/trace/kprobetrace.rst
index b729b40a5ba5..3d162d432a3c 100644
--- a/Documentation/trace/kprobetrace.rst
+++ b/Documentation/trace/kprobetrace.rst
@@ -96,6 +96,7 @@ which shows given pointer in "symbol+offset" style.
 For $comm, the default type is "string"; any other type is invalid.
 
 .. _user_mem_access:
+
 User Memory Access
 --
 Kprobe events supports user-space memory access. For that purpose, you can use
-- 
2.21.0



[PATCH 6/6] drivers: base/node.c: fixes a kernel-doc markups

2019-06-18 Thread Mauro Carvalho Chehab
There was a typo at the name of the vars inside the kernel-doc
comment, causing those warnings:

./drivers/base/node.c:690: warning: Function parameter or member 
'mem_nid' not described in 'register_memory_node_under_compute_node'
./drivers/base/node.c:690: warning: Function parameter or member 
'cpu_nid' not described in 'register_memory_node_under_compute_node'
./drivers/base/node.c:690: warning: Excess function parameter 
'mem_node' description in 'register_memory_node_under_compute_node'
./drivers/base/node.c:690: warning: Excess function parameter 
'cpu_node' description in 'register_memory_node_under_compute_node'

There's also a description missing here:
./drivers/base/node.c:78: warning: Function parameter or member 
'hmem_attrs' not described in 'node_access_nodes'

Copy an existing description from another function call.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/base/node.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/base/node.c b/drivers/base/node.c
index 9be88fd05147..4ee32db9d61d 100644
--- a/drivers/base/node.c
+++ b/drivers/base/node.c
@@ -673,8 +673,8 @@ int register_cpu_under_node(unsigned int cpu, unsigned int 
nid)
 /**
  * register_memory_node_under_compute_node - link memory node to its compute
  *  node for a given access class.
- * @mem_node:  Memory node number
- * @cpu_node:  Cpu  node number
+ * @mem_nid:   Memory node number
+ * @cpu_nid:   Cpu  node number
  * @access:Access class to register
  *
  * Description:
-- 
2.21.0



[PATCH v2 6/6] drivers: base/node.c: fixes a kernel-doc markups

2019-06-18 Thread Mauro Carvalho Chehab
There was a typo at the name of the vars inside the kernel-doc
comment, causing those warnings:

./drivers/base/node.c:690: warning: Function parameter or member 
'mem_nid' not described in 'register_memory_node_under_compute_node'
./drivers/base/node.c:690: warning: Function parameter or member 
'cpu_nid' not described in 'register_memory_node_under_compute_node'
./drivers/base/node.c:690: warning: Excess function parameter 
'mem_node' description in 'register_memory_node_under_compute_node'
./drivers/base/node.c:690: warning: Excess function parameter 
'cpu_node' description in 'register_memory_node_under_compute_node'

There's also a description missing here:
./drivers/base/node.c:78: warning: Function parameter or member 
'hmem_attrs' not described in 'node_access_nodes'

Copy an existing description from another function call.

Signed-off-by: Mauro Carvalho Chehab 
---

v2: Add a missing hunk solving the warning reported as line #78.

 drivers/base/node.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/base/node.c b/drivers/base/node.c
index 9be88fd05147..beec80649b33 100644
--- a/drivers/base/node.c
+++ b/drivers/base/node.c
@@ -66,6 +66,7 @@ static DEVICE_ATTR(cpulist, S_IRUGO, node_read_cpulist, NULL);
  * @dev:   Device for this memory access class
  * @list_node: List element in the node's access list
  * @access:The access class rank
+ * @hmem_attrs: Heterogeneous memory performance attributes
  */
 struct node_access_nodes {
struct device   dev;
@@ -673,8 +674,8 @@ int register_cpu_under_node(unsigned int cpu, unsigned int 
nid)
 /**
  * register_memory_node_under_compute_node - link memory node to its compute
  *  node for a given access class.
- * @mem_node:  Memory node number
- * @cpu_node:  Cpu  node number
+ * @mem_nid:   Memory node number
+ * @cpu_nid:   Cpu  node number
  * @access:Access class to register
  *
  * Description:
-- 
2.21.0




Re: [PATCH 2/6] docs: trace: add a missing blank line

2019-06-18 Thread Steven Rostedt
On Tue, 18 Jun 2019 15:51:18 -0300
Mauro Carvalho Chehab  wrote:

> Sphinx expects a blank line after a literal block markup.
> 
> Signed-off-by: Mauro Carvalho Chehab 

For the two tracing patches (1 and 2).

Acked-by: Steven Rostedt (VMware) 

-- Steve

> ---
>  Documentation/trace/kprobetrace.rst | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/trace/kprobetrace.rst 
> b/Documentation/trace/kprobetrace.rst
> index 3d162d432a3c..caa0a8ba081e 100644
> --- a/Documentation/trace/kprobetrace.rst
> +++ b/Documentation/trace/kprobetrace.rst
> @@ -228,6 +228,7 @@ events, you need to enable it.
>  
>  Use the following command to start tracing in an interval.
>  ::
> +
>  # echo 1 > tracing_on
>  Open something...
>  # echo 0 > tracing_on



Re: [PATCH v4 00/28] Convert files to ReST - part 1

2019-06-18 Thread Mauro Carvalho Chehab
Em Fri, 14 Jun 2019 14:36:40 -0600
Jonathan Corbet  escreveu:

> On Wed, 12 Jun 2019 14:52:36 -0300
> Mauro Carvalho Chehab  wrote:
> 
> > This is mostly a rebase of the /33 series v3 I sent, on the top of the 
> > latest
> > linux-next  (next-20190612).
> > 
> > Changes from v3:
> > 
> > - dropped cpufreq conversion - documents are too outdated;
> > - infiniband patch is not here anymore - as it should be merged via RDMA;
> > - s390 patches were already merged;
> > - Dropped Geert as Maintainer from fb/framebuffer.rst, as per his request;
> > - Did a minor editorial change at popwerpc/cxl.rst per Andrew Donellan
> >   request;
> > - Added acks/reviews;
> > - trivial rebase fixups.  
> 
> So I had to pull docs-next forward to -rc4, but then I was able to apply
> this set except for parts 5, 6, 14, 18, and 19.  

Patch 5 went via Cgroups tree;
Patch 18 went via power tree;
Patch 6 is obsolete, as the cgroups-v1 CBQ chapter was removed;

So, what's left from this series are patches 14 and 19.

I have a rebased version of them on the top of linux-next
on my working tree. Perhaps we should try to push those two late
during the merge window.

> Some progress made, but
> this is somewhat painful work...

Yeah, a change like that is not easy.

Thanks,
Mauro


Re: [PATCH] docs/vm: hwpoison.rst: Fix quote formatting

2019-06-18 Thread Jonathan Corbet
On Tue, 18 Jun 2019 16:51:06 +0100
Valentin Schneider  wrote:

> I'm afraid this was only a "drive-by" patch, as I just happened to skim
> through this page on my phone while waiting for a meeting - I'm quite
> clueless about page poisoning.

No worries.  Thanks for the patch; it makes things better than they were
before, and I can't complain about that!

jon


[PATCH v2 25/29] docs: md: convert to ReST

2019-06-18 Thread Mauro Carvalho Chehab
Rename the md documentation files to ReST, add an
index for them and adjust in order to produce a nice html
output via the Sphinx build system.

At its new index.rst, let's add a :orphan: while this is not linked to
the main index.rst file, in order to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/md/index.rst|  12 ++
 .../md/{md-cluster.txt => md-cluster.rst} | 188 --
 .../md/{raid5-cache.txt => raid5-cache.rst}   |  28 +--
 .../md/{raid5-ppl.txt => raid5-ppl.rst}   |   2 +
 4 files changed, 153 insertions(+), 77 deletions(-)
 create mode 100644 Documentation/md/index.rst
 rename Documentation/md/{md-cluster.txt => md-cluster.rst} (68%)
 rename Documentation/md/{raid5-cache.txt => raid5-cache.rst} (92%)
 rename Documentation/md/{raid5-ppl.txt => raid5-ppl.rst} (98%)

diff --git a/Documentation/md/index.rst b/Documentation/md/index.rst
new file mode 100644
index ..c4db34ed327d
--- /dev/null
+++ b/Documentation/md/index.rst
@@ -0,0 +1,12 @@
+:orphan:
+
+
+RAID
+
+
+.. toctree::
+   :maxdepth: 1
+
+   md-cluster
+   raid5-cache
+   raid5-ppl
diff --git a/Documentation/md/md-cluster.txt b/Documentation/md/md-cluster.rst
similarity index 68%
rename from Documentation/md/md-cluster.txt
rename to Documentation/md/md-cluster.rst
index e1055f105cf5..96eb52cec7eb 100644
--- a/Documentation/md/md-cluster.txt
+++ b/Documentation/md/md-cluster.rst
@@ -1,19 +1,24 @@
+==
+MD Cluster
+==
+
 The cluster MD is a shared-device RAID for a cluster, it supports
 two levels: raid1 and raid10 (limited support).
 
 
 1. On-disk format
+=
 
 Separate write-intent-bitmaps are used for each cluster node.
 The bitmaps record all writes that may have been started on that node,
-and may not yet have finished. The on-disk layout is:
+and may not yet have finished. The on-disk layout is::
 
-04k 8k12k

-| idle| md super| bm super [0] + bits |
-| bm bits[0, contd]   | bm super[1] + bits  | bm bits[1, contd]   |
-| bm super[2] + bits  | bm bits [2, contd]  | bm super[3] + bits  |
-| bm bits [3, contd]  | | |
+  04k 8k12k
+  ---
+  | idle| md super| bm super [0] + bits |
+  | bm bits[0, contd]   | bm super[1] + bits  | bm bits[1, contd]   |
+  | bm super[2] + bits  | bm bits [2, contd]  | bm super[3] + bits  |
+  | bm bits [3, contd]  | | |
 
 During "normal" functioning we assume the filesystem ensures that only
 one node writes to any given block at a time, so a write request will
@@ -28,10 +33,12 @@ node) is writing.
 
 
 2. DLM Locks for management
+===
 
 There are three groups of locks for managing the device:
 
 2.1 Bitmap lock resource (bm_lockres)
+-
 
  The bm_lockres protects individual node bitmaps. They are named in
  the form bitmap000 for node 1, bitmap001 for node 2 and so on. When a
@@ -48,6 +55,7 @@ There are three groups of locks for managing the device:
  joins the cluster.
 
 2.2 Message passing locks
+-
 
  Each node has to communicate with other nodes when starting or ending
  resync, and for metadata superblock updates.  This communication is
@@ -55,116 +63,155 @@ There are three groups of locks for managing the device:
  with the Lock Value Block (LVB) of one of the "message" lock.
 
 2.3 new-device management
+-
 
  A single lock: "no-new-dev" is used to co-ordinate the addition of
  new devices - this must be synchronized across the array.
  Normally all nodes hold a concurrent-read lock on this device.
 
 3. Communication
+
 
  Messages can be broadcast to all nodes, and the sender waits for all
  other nodes to acknowledge the message before proceeding.  Only one
  message can be processed at a time.
 
 3.1 Message Types
+-
 
  There are six types of messages which are passed:
 
- 3.1.1 METADATA_UPDATED: informs other nodes that the metadata has
+3.1.1 METADATA_UPDATED
+^^
+
+   informs other nodes that the metadata has
been updated, and the node must re-read the md superblock. This is
performed synchronously. It is primarily used to signal device
failure.
 
- 3.1.2 RESYNCING: informs other nodes that a resync is initiated or
+3.1.2 RESYNCING
+^^^
+   informs other nodes that a resync is initiated or
ended so that each node may suspend or resume the region.  Each
RESYNCING message identifies a range of the devices that the
sending node is about to resync. This overrides any previous
notification from that no

[PATCH v2 12/29] docs: xen-tpmfront.txt: convert it to .rst

2019-06-18 Thread Mauro Carvalho Chehab
In order to be able to add this file to the security book,
we need first to convert it to reST.

While this is not part of any book, mark it as :orphan:, in order
to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab 
---
 .../{xen-tpmfront.txt => xen-tpmfront.rst}| 103 ++
 1 file changed, 58 insertions(+), 45 deletions(-)
 rename Documentation/security/tpm/{xen-tpmfront.txt => xen-tpmfront.rst} (66%)

diff --git a/Documentation/security/tpm/xen-tpmfront.txt 
b/Documentation/security/tpm/xen-tpmfront.rst
similarity index 66%
rename from Documentation/security/tpm/xen-tpmfront.txt
rename to Documentation/security/tpm/xen-tpmfront.rst
index 69346de87ff3..98a16ab87360 100644
--- a/Documentation/security/tpm/xen-tpmfront.txt
+++ b/Documentation/security/tpm/xen-tpmfront.rst
@@ -1,4 +1,8 @@
+:orphan:
+
+=
 Virtual TPM interface for Xen
+=
 
 Authors: Matthew Fioravante (JHUAPL), Daniel De Graaf (NSA)
 
@@ -6,7 +10,8 @@ This document describes the virtual Trusted Platform Module 
(vTPM) subsystem for
 Xen. The reader is assumed to have familiarity with building and installing 
Xen,
 Linux, and a basic understanding of the TPM and vTPM concepts.
 
-INTRODUCTION
+Introduction
+
 
 The goal of this work is to provide a TPM functionality to a virtual guest
 operating system (in Xen terms, a DomU).  This allows programs to interact with
@@ -24,81 +29,89 @@ This mini-os vTPM subsystem was built on top of the 
previous vTPM work done by
 IBM and Intel corporation.
 
 
-DESIGN OVERVIEW
+Design Overview
 ---
 
-The architecture of vTPM is described below:
+The architecture of vTPM is described below::
 
-+--+
-|Linux DomU| ...
-|   |  ^   |
-|   v  |   |
-|   xen-tpmfront   |
-+--+
-|  ^
-v  |
-+--+
-| mini-os/tpmback  |
-|   |  ^   |
-|   v  |   |
-|  vtpm-stubdom| ...
-|   |  ^   |
-|   v  |   |
-| mini-os/tpmfront |
-+--+
-|  ^
-v  |
-+--+
-| mini-os/tpmback  |
-|   |  ^   |
-|   v  |   |
-| vtpmmgr-stubdom  |
-|   |  ^   |
-|   v  |   |
-| mini-os/tpm_tis  |
-+--+
-|  ^
-v  |
-+--+
-|   Hardware TPM   |
-+--+
+  +--+
+  |Linux DomU| ...
+  |   |  ^   |
+  |   v  |   |
+  |   xen-tpmfront   |
+  +--+
+  |  ^
+  v  |
+  +--+
+  | mini-os/tpmback  |
+  |   |  ^   |
+  |   v  |   |
+  |  vtpm-stubdom| ...
+  |   |  ^   |
+  |   v  |   |
+  | mini-os/tpmfront |
+  +--+
+  |  ^
+  v  |
+  +--+
+  | mini-os/tpmback  |
+  |   |  ^   |
+  |   v  |   |
+  | vtpmmgr-stubdom  |
+  |   |  ^   |
+  |   v  |   |
+  | mini-os/tpm_tis  |
+  +--+
+  |  ^
+  v  |
+  +--+
+  |   Hardware TPM   |
+  +--+
 
- * Linux DomU: The Linux based guest that wants to use a vTPM. There may be
+* Linux DomU:
+  The Linux based guest that wants to use a vTPM. There may be
   more than one of these.
 
- * xen-tpmfront.ko: Linux kernel virtual TPM frontend driver. This driver
+* xen-tpmfront.ko:
+   Linux kernel virtual TPM frontend driver. This driver
 provides vTPM access to a Linux-based DomU.
 
- * mini-os/tpmback: Mini-os TPM backend driver. The Linux frontend driver
+* mini-os/tpmback:
+   Mini-os TPM backend driver. The Linux frontend driver
connects to this backend driver to facilitate communications
between the Linux DomU and its vTPM. This driver is also
used by vtpmmgr-stubdom to communicate with vtpm-stubdom.
 
- * vtpm-stubdom: A mini-os stub domain that implements a vTPM. There is a
+* vtpm-stubdom:
+A mini-os stub domain that implements a vTPM. There is a
 one to one mapping between running vtpm-stubdom instances and
  logical vtpms on the system. The vTPM Platform Configuration
  Registers (PCRs) are normally all initialized to zero.
 
- * mini-os/tpmfront: Mini-os TPM frontend driver. The vTPM mini-os domain
+* mini-os/tpmfront:
+Mini-os TPM frontend driver. The vTPM mini-os domain
 vtpm-stubdom uses this driver to communicate with
 vtpmmgr-stubdom. This driver is also used in mini-os
 domains such as pv-grub that talk to the vTPM domain.
 
- * vtpmmgr-stubdom: A mini-os domain that implements the vTPM manager. There is
+* vtpmmgr-stubdom:
+   A mini-os domain that implements the vTPM manager. There is
 

[PATCH v2 03/29] docs: lp855x-driver.txt: convert to ReST and move to kernel-api

2019-06-18 Thread Mauro Carvalho Chehab
This small file seems to be an attempt to start documenting
backlight drivers.

It contains descriptions of the controls for the driver
with could sound as an somewhat user-faced description, but
it's main focus is to describe, instead, the data that should
be passed via platform data and some driver-specific stuff.

While this is not part of the driver-api book, mark it as
:orphan:, in order to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/backlight/lp855x-driver.rst | 83 +++
 Documentation/backlight/lp855x-driver.txt | 66 --
 MAINTAINERS   |  2 +-
 3 files changed, 84 insertions(+), 67 deletions(-)
 create mode 100644 Documentation/backlight/lp855x-driver.rst
 delete mode 100644 Documentation/backlight/lp855x-driver.txt

diff --git a/Documentation/backlight/lp855x-driver.rst 
b/Documentation/backlight/lp855x-driver.rst
new file mode 100644
index ..62b7ed847a77
--- /dev/null
+++ b/Documentation/backlight/lp855x-driver.rst
@@ -0,0 +1,83 @@
+:orphan:
+
+
+Kernel driver lp855x
+
+
+Backlight driver for LP855x ICs
+
+Supported chips:
+
+   Texas Instruments LP8550, LP8551, LP8552, LP8553, LP8555, LP8556 and
+   LP8557
+
+Author: Milo(Woogyom) Kim 
+
+Description
+---
+
+* Brightness control
+
+  Brightness can be controlled by the pwm input or the i2c command.
+  The lp855x driver supports both cases.
+
+* Device attributes
+
+  1) bl_ctl_mode
+
+  Backlight control mode.
+
+  Value: pwm based or register based
+
+  2) chip_id
+
+  The lp855x chip id.
+
+  Value: lp8550/lp8551/lp8552/lp8553/lp8555/lp8556/lp8557
+
+Platform data for lp855x
+
+
+For supporting platform specific data, the lp855x platform data can be used.
+
+* name:
+   Backlight driver name. If it is not defined, default name is set.
+* device_control:
+   Value of DEVICE CONTROL register.
+* initial_brightness:
+   Initial value of backlight brightness.
+* period_ns:
+   Platform specific PWM period value. unit is nano.
+   Only valid when brightness is pwm input mode.
+* size_program:
+   Total size of lp855x_rom_data.
+* rom_data:
+   List of new eeprom/eprom registers.
+
+Examples
+
+
+1) lp8552 platform data: i2c register mode with new eeprom data::
+
+#define EEPROM_A5_ADDR 0xA5
+#define EEPROM_A5_VAL  0x4f/* EN_VSYNC=0 */
+
+static struct lp855x_rom_data lp8552_eeprom_arr[] = {
+   {EEPROM_A5_ADDR, EEPROM_A5_VAL},
+};
+
+static struct lp855x_platform_data lp8552_pdata = {
+   .name = "lcd-bl",
+   .device_control = I2C_CONFIG(LP8552),
+   .initial_brightness = INITIAL_BRT,
+   .size_program = ARRAY_SIZE(lp8552_eeprom_arr),
+   .rom_data = lp8552_eeprom_arr,
+};
+
+2) lp8556 platform data: pwm input mode with default rom data::
+
+static struct lp855x_platform_data lp8556_pdata = {
+   .device_control = PWM_CONFIG(LP8556),
+   .initial_brightness = INITIAL_BRT,
+   .period_ns = 100,
+};
diff --git a/Documentation/backlight/lp855x-driver.txt 
b/Documentation/backlight/lp855x-driver.txt
deleted file mode 100644
index 01bce243d3d7..
--- a/Documentation/backlight/lp855x-driver.txt
+++ /dev/null
@@ -1,66 +0,0 @@
-Kernel driver lp855x
-
-
-Backlight driver for LP855x ICs
-
-Supported chips:
-   Texas Instruments LP8550, LP8551, LP8552, LP8553, LP8555, LP8556 and
-   LP8557
-
-Author: Milo(Woogyom) Kim 
-
-Description

-
-* Brightness control
-
-Brightness can be controlled by the pwm input or the i2c command.
-The lp855x driver supports both cases.
-
-* Device attributes
-
-1) bl_ctl_mode
-Backlight control mode.
-Value : pwm based or register based
-
-2) chip_id
-The lp855x chip id.
-Value : lp8550/lp8551/lp8552/lp8553/lp8555/lp8556/lp8557
-
-Platform data for lp855x
-
-
-For supporting platform specific data, the lp855x platform data can be used.
-
-* name : Backlight driver name. If it is not defined, default name is set.
-* device_control : Value of DEVICE CONTROL register.
-* initial_brightness : Initial value of backlight brightness.
-* period_ns : Platform specific PWM period value. unit is nano.
-Only valid when brightness is pwm input mode.
-* size_program : Total size of lp855x_rom_data.
-* rom_data : List of new eeprom/eprom registers.
-
-example 1) lp8552 platform data : i2c register mode with new eeprom data
-
-#define EEPROM_A5_ADDR 0xA5
-#define EEPROM_A5_VAL  0x4f/* EN_VSYNC=0 */
-
-static struct lp855x_rom_data lp8552_eeprom_arr[] = {
-   {EEPROM_A5_ADDR, EEPROM_A5_VAL},
-};
-
-static struct lp855x_platform_data lp8552_pdata = {
-   .name = "lcd-bl",
-   .device_control = I2C_CONFIG(LP8552),
-   .initial_brightness = INITIAL_BRT,
-   .size_program = ARRAY_SIZE(lp8552_eeprom_arr),
-   .rom_data = lp8552_eeprom_

[PATCH v2 08/29] docs: early-userspace: convert docs to ReST and rename to *.rst

2019-06-18 Thread Mauro Carvalho Chehab
The two files there describes a Kernel API feature, used to
support early userspace stuff. Prepare for moving them to
the kernel API book by converting to ReST format.

The conversion itself was quite trivial: just add/mark a few
titles as such, add a literal block markup, add a table markup
and a few blank lines, in order to make Sphinx to properly parse it.

At its new index.rst, let's add a :orphan: while this is not linked to
the main index.rst file, in order to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab 
---
 .../{buffer-format.txt => buffer-format.rst}  | 19 +--
 .../{README => early_userspace_support.rst}   |  3 +++
 Documentation/early-userspace/index.rst   | 18 ++
 Documentation/filesystems/nfs/nfsroot.txt |  2 +-
 .../filesystems/ramfs-rootfs-initramfs.txt|  4 ++--
 usr/Kconfig   |  2 +-
 6 files changed, 38 insertions(+), 10 deletions(-)
 rename Documentation/early-userspace/{buffer-format.txt => buffer-format.rst} 
(91%)
 rename Documentation/early-userspace/{README => early_userspace_support.rst} 
(99%)
 create mode 100644 Documentation/early-userspace/index.rst

diff --git a/Documentation/early-userspace/buffer-format.txt 
b/Documentation/early-userspace/buffer-format.rst
similarity index 91%
rename from Documentation/early-userspace/buffer-format.txt
rename to Documentation/early-userspace/buffer-format.rst
index e1fd7f9dad16..7f74e301fdf3 100644
--- a/Documentation/early-userspace/buffer-format.txt
+++ b/Documentation/early-userspace/buffer-format.rst
@@ -1,8 +1,10 @@
-  initramfs buffer format
-  ---
+===
+initramfs buffer format
+===
 
-  Al Viro, H. Peter Anvin
- Last revision: 2002-01-13
+Al Viro, H. Peter Anvin
+
+Last revision: 2002-01-13
 
 Starting with kernel 2.5.x, the old "initial ramdisk" protocol is
 getting {replaced/complemented} with the new "initial ramfs"
@@ -18,7 +20,8 @@ archive can be compressed using gzip(1).  One valid version 
of an
 initramfs buffer is thus a single .cpio.gz file.
 
 The full format of the initramfs buffer is defined by the following
-grammar, where:
+grammar, where::
+
*   is used to indicate "0 or more occurrences of"
(|) indicates alternatives
+   indicates concatenation
@@ -49,7 +52,9 @@ hexadecimal ASCII numbers fully padded with '0' on the left 
to the
 full width of the field, for example, the integer 4780 is represented
 by the ASCII string "12ac"):
 
+= == ==
 Field nameField sizeMeaning
+= == ==
 c_magic  6 bytesThe string "070701" or "070702"
 c_ino8 bytesFile inode number
 c_mode   8 bytesFile mode and permissions
@@ -65,6 +70,7 @@ c_rmin  8 bytesMinor part of device 
node reference
 c_namesize8 bytes   Length of filename, including final \0
 c_chksum  8 bytes   Checksum of data field if c_magic is 070702;
 otherwise zero
+= == ==
 
 The c_mode field matches the contents of st_mode returned by stat(2)
 on Linux, and encodes the file type and file permissions.
@@ -82,7 +88,8 @@ If the filename is "TRAILER!!!" this is actually an 
end-of-archive
 marker; the c_filesize for an end-of-archive marker must be zero.
 
 
-*** Handling of hard links
+Handling of hard links
+==
 
 When a nondirectory with c_nlink > 1 is seen, the (c_maj,c_min,c_ino)
 tuple is looked up in a tuple buffer.  If not found, it is entered in
diff --git a/Documentation/early-userspace/README 
b/Documentation/early-userspace/early_userspace_support.rst
similarity index 99%
rename from Documentation/early-userspace/README
rename to Documentation/early-userspace/early_userspace_support.rst
index 955d667dc87e..3deefb34046b 100644
--- a/Documentation/early-userspace/README
+++ b/Documentation/early-userspace/early_userspace_support.rst
@@ -1,3 +1,4 @@
+===
 Early userspace support
 ===
 
@@ -26,6 +27,7 @@ archive to be used as the image or have the kernel build 
process build
 the image from specifications.
 
 CPIO ARCHIVE method
+---
 
 You can create a cpio archive that contains the early userspace image.
 Your cpio archive should be specified in CONFIG_INITRAMFS_SOURCE and it
@@ -34,6 +36,7 @@ CONFIG_INITRAMFS_SOURCE and directory and file names are not 
allowed in
 combination with a cpio archive.
 
 IMAGE BUILDING method
+-
 
 The kernel build process can also build an early userspace image from
 source parts rather than supplying a cpio archive.  

[PATCH v2 09/29] docs: driver-model: convert docs to ReST and rename to *.rst

2019-06-18 Thread Mauro Carvalho Chehab
Convert the various documents at the driver-model, preparing
them to be part of the driver-api book.

The conversion is actually:
  - add blank lines and identation in order to identify paragraphs;
  - fix tables markups;
  - add some lists markups;
  - mark literal blocks;
  - adjust title markups.

At its new index.rst, let's add a :orphan: while this is not linked to
the main index.rst file, in order to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab 
Acked-by: Jeff Kirsher  # ice
---
 Documentation/driver-api/gpio/driver.rst  |   2 +-
 .../driver-model/{binding.txt => binding.rst} |  20 +-
 .../driver-model/{bus.txt => bus.rst} |  69 ++--
 .../driver-model/{class.txt => class.rst} |  74 ++--
 ...esign-patterns.txt => design-patterns.rst} | 106 +++---
 .../driver-model/{device.txt => device.rst}   |  57 +--
 .../driver-model/{devres.txt => devres.rst}   |  50 +--
 .../driver-model/{driver.txt => driver.rst}   | 112 +++---
 Documentation/driver-model/index.rst  |  26 ++
 .../{overview.txt => overview.rst}|  37 +-
 .../{platform.txt => platform.rst}|  30 +-
 .../driver-model/{porting.txt => porting.rst} | 333 +-
 Documentation/eisa.txt|   4 +-
 Documentation/hwmon/submitting-patches.rst|   2 +-
 drivers/base/platform.c   |   2 +-
 drivers/gpio/gpio-cs5535.c|   2 +-
 drivers/net/ethernet/intel/ice/ice_main.c |   2 +-
 scripts/coccinelle/free/devm_free.cocci   |   2 +-
 18 files changed, 489 insertions(+), 441 deletions(-)
 rename Documentation/driver-model/{binding.txt => binding.rst} (92%)
 rename Documentation/driver-model/{bus.txt => bus.rst} (76%)
 rename Documentation/driver-model/{class.txt => class.rst} (75%)
 rename Documentation/driver-model/{design-patterns.txt => design-patterns.rst} 
(59%)
 rename Documentation/driver-model/{device.txt => device.rst} (71%)
 rename Documentation/driver-model/{devres.txt => devres.rst} (93%)
 rename Documentation/driver-model/{driver.txt => driver.rst} (75%)
 create mode 100644 Documentation/driver-model/index.rst
 rename Documentation/driver-model/{overview.txt => overview.rst} (90%)
 rename Documentation/driver-model/{platform.txt => platform.rst} (95%)
 rename Documentation/driver-model/{porting.txt => porting.rst} (62%)

diff --git a/Documentation/driver-api/gpio/driver.rst 
b/Documentation/driver-api/gpio/driver.rst
index 4af9aae724f0..349f2dc33029 100644
--- a/Documentation/driver-api/gpio/driver.rst
+++ b/Documentation/driver-api/gpio/driver.rst
@@ -399,7 +399,7 @@ symbol:
   will pass the struct gpio_chip* for the chip to all IRQ callbacks, so the
   callbacks need to embed the gpio_chip in its state container and obtain a
   pointer to the container using container_of().
-  (See Documentation/driver-model/design-patterns.txt)
+  (See Documentation/driver-model/design-patterns.rst)
 
 - gpiochip_irqchip_add_nested(): adds a nested cascaded irqchip to a gpiochip,
   as discussed above regarding different types of cascaded irqchips. The
diff --git a/Documentation/driver-model/binding.txt 
b/Documentation/driver-model/binding.rst
similarity index 92%
rename from Documentation/driver-model/binding.txt
rename to Documentation/driver-model/binding.rst
index abfc8e290d53..7ea1d7a41e1d 100644
--- a/Documentation/driver-model/binding.txt
+++ b/Documentation/driver-model/binding.rst
@@ -1,5 +1,6 @@
-
+==
 Driver Binding
+==
 
 Driver binding is the process of associating a device with a device
 driver that can control it. Bus drivers have typically handled this
@@ -25,7 +26,7 @@ device_register
 When a new device is added, the bus's list of drivers is iterated over
 to find one that supports it. In order to determine that, the device
 ID of the device must match one of the device IDs that the driver
-supports. The format and semantics for comparing IDs is bus-specific. 
+supports. The format and semantics for comparing IDs is bus-specific.
 Instead of trying to derive a complex state machine and matching
 algorithm, it is up to the bus driver to provide a callback to compare
 a device against the IDs of a driver. The bus returns 1 if a match was
@@ -36,14 +37,14 @@ int match(struct device * dev, struct device_driver * drv);
 If a match is found, the device's driver field is set to the driver
 and the driver's probe callback is called. This gives the driver a
 chance to verify that it really does support the hardware, and that
-it's in a working state. 
+it's in a working state.
 
 Device Class
 
 
 Upon the successful completion of probe, the device is registered with
 the class to which it belongs. Device drivers belong to one and only one
-class, and that is set in the driver's devclass field. 
+class, and that is set in the driver's devclass field.
 devclass_add_device is called to enumerate the device within the class
 and actually register it with the class, which happens wit

[PATCH v2 07/29] docs: pti_intel_mid.txt: convert it to pti_intel_mid.rst

2019-06-18 Thread Mauro Carvalho Chehab
Convert this small file to ReST format and rename it.

Most of the conversion were related to adjusting whitespaces
in order for each section to be properly parsed.

While this is not part of any book, mark it as :orphan:, in order
to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/pti/pti_intel_mid.rst | 106 
 Documentation/pti/pti_intel_mid.txt |  99 --
 2 files changed, 106 insertions(+), 99 deletions(-)
 create mode 100644 Documentation/pti/pti_intel_mid.rst
 delete mode 100644 Documentation/pti/pti_intel_mid.txt

diff --git a/Documentation/pti/pti_intel_mid.rst 
b/Documentation/pti/pti_intel_mid.rst
new file mode 100644
index ..ea05725174cb
--- /dev/null
+++ b/Documentation/pti/pti_intel_mid.rst
@@ -0,0 +1,106 @@
+:orphan:
+
+=
+Intel MID PTI
+=
+
+The Intel MID PTI project is HW implemented in Intel Atom
+system-on-a-chip designs based on the Parallel Trace
+Interface for MIPI P1149.7 cJTAG standard.  The kernel solution
+for this platform involves the following files::
+
+   ./include/linux/pti.h
+   ./drivers/.../n_tracesink.h
+   ./drivers/.../n_tracerouter.c
+   ./drivers/.../n_tracesink.c
+   ./drivers/.../pti.c
+
+pti.c is the driver that enables various debugging features
+popular on platforms from certain mobile manufacturers.
+n_tracerouter.c and n_tracesink.c allow extra system information to
+be collected and routed to the pti driver, such as trace
+debugging data from a modem.  Although n_tracerouter
+and n_tracesink are a part of the complete PTI solution,
+these two line disciplines can work separately from
+pti.c and route any data stream from one /dev/tty node
+to another /dev/tty node via kernel-space.  This provides
+a stable, reliable connection that will not break unless
+the user-space application shuts down (plus avoids
+kernel->user->kernel context switch overheads of routing
+data).
+
+An example debugging usage for this driver system:
+
+  * Hook /dev/ttyPTI0 to syslogd.  Opening this port will also start
+a console device to further capture debugging messages to PTI.
+  * Hook /dev/ttyPTI1 to modem debugging data to write to PTI HW.
+This is where n_tracerouter and n_tracesink are used.
+  * Hook /dev/pti to a user-level debugging application for writing
+to PTI HW.
+  * `Use mipi_` Kernel Driver API in other device drivers for
+debugging to PTI by first requesting a PTI write address via
+mipi_request_masterchannel(1).
+
+Below is example pseudo-code on how a 'privileged' application
+can hook up n_tracerouter and n_tracesink to any tty on
+a system.  'Privileged' means the application has enough
+privileges to successfully manipulate the ldisc drivers
+but is not just blindly executing as 'root'. Keep in mind
+the use of ioctl(,TIOCSETD,) is not specific to the n_tracerouter
+and n_tracesink line discpline drivers but is a generic
+operation for a program to use a line discpline driver
+on a tty port other than the default n_tty::
+
+  /// To hook up n_tracerouter and n_tracesink /
+
+  // Note that n_tracerouter depends on n_tracesink.
+  #include 
+  #define ONE_TTY "/dev/ttyOne"
+  #define TWO_TTY "/dev/ttyTwo"
+
+  // needed global to hand onto ldisc connection
+  static int g_fd_source = -1;
+  static int g_fd_sink  = -1;
+
+  // these two vars used to grab LDISC values from loaded ldisc drivers
+  // in OS.  Look at /proc/tty/ldiscs to get the right numbers from
+  // the ldiscs loaded in the system.
+  int source_ldisc_num, sink_ldisc_num = -1;
+  int retval;
+
+  g_fd_source = open(ONE_TTY, O_RDWR); // must be R/W
+  g_fd_sink   = open(TWO_TTY, O_RDWR); // must be R/W
+
+  if (g_fd_source <= 0) || (g_fd_sink <= 0) {
+ // doubt you'll want to use these exact error lines of code
+ printf("Error on open(). errno: %d\n",errno);
+ return errno;
+  }
+
+  retval = ioctl(g_fd_sink, TIOCSETD, &sink_ldisc_num);
+  if (retval < 0) {
+ printf("Error on ioctl().  errno: %d\n", errno);
+ return errno;
+  }
+
+  retval = ioctl(g_fd_source, TIOCSETD, &source_ldisc_num);
+  if (retval < 0) {
+ printf("Error on ioctl().  errno: %d\n", errno);
+ return errno;
+  }
+
+  /// To disconnect n_tracerouter and n_tracesink 
+
+  // First make sure data through the ldiscs has stopped.
+
+  // Second, disconnect ldiscs.  This provides a
+  // little cleaner shutdown on tty stack.
+  sink_ldisc_num = 0;
+  source_ldisc_num = 0;
+  ioctl(g_fd_uart, TIOCSETD, &sink_ldisc_num);
+  ioctl(g_fd_gadget, TIOCSETD, &source_ldisc_num);
+
+  // Three, program closes connection, and cleanup:
+  close(g_fd_uart);
+  close(g_fd_gadget);
+  g_fd_uart = g_fd_gadget = NULL;
diff --git a/Documentation/pti/pti_intel_mid.txt 
b/Documentation/pti/pti_intel_mid.txt
deleted file mode 100644
index e7a5b6d1f7a9..
--- a/Documentation/pti/pti_intel_mid.txt
+++ /dev/null
@@ -1,99 +0,0 @@
-The

[PATCH v2 24/29] docs: nfc: convert to ReST

2019-06-18 Thread Mauro Carvalho Chehab
Rename the nfc documentation files to ReST, add an
index for them and adjust in order to produce a nice html
output via the Sphinx build system.

At its new index.rst, let's add a :orphan: while this is not linked to
the main index.rst file, in order to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/nfc/index.rst   |  11 ++
 .../nfc/{nfc-hci.txt => nfc-hci.rst}  | 163 ++
 .../nfc/{nfc-pn544.txt => nfc-pn544.rst}  |   6 +-
 3 files changed, 107 insertions(+), 73 deletions(-)
 create mode 100644 Documentation/nfc/index.rst
 rename Documentation/nfc/{nfc-hci.txt => nfc-hci.rst} (71%)
 rename Documentation/nfc/{nfc-pn544.txt => nfc-pn544.rst} (82%)

diff --git a/Documentation/nfc/index.rst b/Documentation/nfc/index.rst
new file mode 100644
index ..4f4947fce80d
--- /dev/null
+++ b/Documentation/nfc/index.rst
@@ -0,0 +1,11 @@
+:orphan:
+
+
+Near Field Communication
+
+
+.. toctree::
+   :maxdepth: 1
+
+   nfc-hci
+   nfc-pn544
diff --git a/Documentation/nfc/nfc-hci.txt b/Documentation/nfc/nfc-hci.rst
similarity index 71%
rename from Documentation/nfc/nfc-hci.txt
rename to Documentation/nfc/nfc-hci.rst
index 0dc078cab972..eb8a1a14e919 100644
--- a/Documentation/nfc/nfc-hci.txt
+++ b/Documentation/nfc/nfc-hci.rst
@@ -1,7 +1,9 @@
+
 HCI backend for NFC Core
+
 
-Author: Eric Lapuyade, Samuel Ortiz
-Contact: eric.lapuy...@intel.com, samuel.or...@intel.com
+- Author: Eric Lapuyade, Samuel Ortiz
+- Contact: eric.lapuy...@intel.com, samuel.or...@intel.com
 
 General
 ---
@@ -24,12 +26,13 @@ HCI events can also be received from the host controller. 
They will be handled
 and a translation will be forwarded to NFC Core as needed. There are hooks to
 let the HCI driver handle proprietary events or override standard behavior.
 HCI uses 2 execution contexts:
+
 - one for executing commands : nfc_hci_msg_tx_work(). Only one command
-can be executing at any given moment.
+  can be executing at any given moment.
 - one for dispatching received events and commands : nfc_hci_msg_rx_work().
 
-HCI Session initialization:

+HCI Session initialization
+--
 
 The Session initialization is an HCI standard which must unfortunately
 support proprietary gates. This is the reason why the driver will pass a list
@@ -58,9 +61,9 @@ HCI Management
 --
 
 A driver would normally register itself with HCI and provide the following
-entry points:
+entry points::
 
-struct nfc_hci_ops {
+  struct nfc_hci_ops {
int (*open)(struct nfc_hci_dev *hdev);
void (*close)(struct nfc_hci_dev *hdev);
int (*hci_ready) (struct nfc_hci_dev *hdev);
@@ -82,38 +85,38 @@ struct nfc_hci_ops {
  struct nfc_target *target);
int (*event_received)(struct nfc_hci_dev *hdev, u8 gate, u8 event,
  struct sk_buff *skb);
-};
+  };
 
 - open() and close() shall turn the hardware on and off.
 - hci_ready() is an optional entry point that is called right after the hci
-session has been set up. The driver can use it to do additional initialization
-that must be performed using HCI commands.
+  session has been set up. The driver can use it to do additional 
initialization
+  that must be performed using HCI commands.
 - xmit() shall simply write a frame to the physical link.
 - start_poll() is an optional entrypoint that shall set the hardware in polling
-mode. This must be implemented only if the hardware uses proprietary gates or a
-mechanism slightly different from the HCI standard.
+  mode. This must be implemented only if the hardware uses proprietary gates 
or a
+  mechanism slightly different from the HCI standard.
 - dep_link_up() is called after a p2p target has been detected, to finish
-the p2p connection setup with hardware parameters that need to be passed back
-to nfc core.
+  the p2p connection setup with hardware parameters that need to be passed back
+  to nfc core.
 - dep_link_down() is called to bring the p2p link down.
 - target_from_gate() is an optional entrypoint to return the nfc protocols
-corresponding to a proprietary gate.
+  corresponding to a proprietary gate.
 - complete_target_discovered() is an optional entry point to let the driver
-perform additional proprietary processing necessary to auto activate the
-discovered target.
+  perform additional proprietary processing necessary to auto activate the
+  discovered target.
 - im_transceive() must be implemented by the driver if proprietary HCI commands
-are required to send data to the tag. Some tag types will require custom
-commands, others can be written to using the standard HCI commands. The driver
-can check the tag type and either do proprietary processing, or return 1 to ask
-for standard processing. The data exchange command itself must be sent
-asynchronou

[PATCH v2 05/29] docs: cma/debugfs.txt: convert docs to ReST and rename to *.rst

2019-06-18 Thread Mauro Carvalho Chehab
The debugfs interface for CMA should be there together with other
mm-related documents.

Convert this small file to ReST and move it to its rightful place.

The conversion is actually quite simple: just add a title for the
document. In order to make it to look better for the audience,
also mark the "echo" command as a literal block.

While this is not part of any book, mark it as :orphan:,
in order to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/cma/{debugfs.txt => debugfs.rst} | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)
 rename Documentation/cma/{debugfs.txt => debugfs.rst} (91%)

diff --git a/Documentation/cma/debugfs.txt b/Documentation/cma/debugfs.rst
similarity index 91%
rename from Documentation/cma/debugfs.txt
rename to Documentation/cma/debugfs.rst
index 6cef20a8cedc..518fe401b5ee 100644
--- a/Documentation/cma/debugfs.txt
+++ b/Documentation/cma/debugfs.rst
@@ -1,3 +1,9 @@
+:orphan:
+
+=
+CMA Debugfs Interface
+=
+
 The CMA debugfs interface is useful to retrieve basic information out of the
 different CMA areas and to test allocation/release in each of the areas.
 
@@ -12,7 +18,7 @@ The structure of the files created under that directory is as 
follows:
  - [RO] count: Amount of memory in the CMA area.
  - [RO] order_per_bit: Order of pages represented by one bit.
  - [RO] bitmap: The bitmap of page states in the zone.
- - [WO] alloc: Allocate N pages from that CMA area. For example:
+ - [WO] alloc: Allocate N pages from that CMA area. For example::
 
echo 5 > /cma/cma-2/alloc
 
-- 
2.21.0



[PATCH v2 28/29] docs: xtensa: convert to ReST

2019-06-18 Thread Mauro Carvalho Chehab
Rename the xtensa documentation files to ReST, add an
index for them and adjust in order to produce a nice html
output via the Sphinx build system.

At its new index.rst, let's add a :orphan: while this is not linked to
the main index.rst file, in order to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab 
---
 .../xtensa/{atomctl.txt => atomctl.rst}   |  13 +-
 .../xtensa/{booting.txt => booting.rst}   |   5 +-
 Documentation/xtensa/index.rst|  12 ++
 Documentation/xtensa/mmu.rst  | 195 ++
 Documentation/xtensa/mmu.txt  | 189 -
 arch/xtensa/include/asm/initialize_mmu.h  |   2 +-
 6 files changed, 222 insertions(+), 194 deletions(-)
 rename Documentation/xtensa/{atomctl.txt => atomctl.rst} (81%)
 rename Documentation/xtensa/{booting.txt => booting.rst} (91%)
 create mode 100644 Documentation/xtensa/index.rst
 create mode 100644 Documentation/xtensa/mmu.rst
 delete mode 100644 Documentation/xtensa/mmu.txt

diff --git a/Documentation/xtensa/atomctl.txt b/Documentation/xtensa/atomctl.rst
similarity index 81%
rename from Documentation/xtensa/atomctl.txt
rename to Documentation/xtensa/atomctl.rst
index 1da783ac200c..1ecbd0ba9a2e 100644
--- a/Documentation/xtensa/atomctl.txt
+++ b/Documentation/xtensa/atomctl.rst
@@ -1,3 +1,7 @@
+===
+Atomic Operation Control (ATOMCTL) Register
+===
+
 We Have Atomic Operation Control (ATOMCTL) Register.
 This register determines the effect of using a S32C1I instruction
 with various combinations of:
@@ -8,7 +12,7 @@ with various combinations of:
  2. With and without An Intelligent Memory Controller which
 can do Atomic Transactions itself.
 
-The Core comes up with a default value of for the three types of cache ops:
+The Core comes up with a default value of for the three types of cache ops::
 
   0x28: (WB: Internal, WT: Internal, BY:Exception)
 
@@ -30,15 +34,18 @@ CUSTOMER-WARNING:
 Developers might find using RCW in Bypass mode convenient when testing
 with the cache being bypassed; for example studying cache alias problems.
 
-See Section 4.3.12.4 of ISA; Bits:
+See Section 4.3.12.4 of ISA; Bits::
 
  WB WT  BY
5   4 | 3   2 | 1   0
+
+===  ==  ===
   2 Bit
   Field
   Values WB - Write Back WT - Write Thru BY - Bypass
----- - 
+===  ==  ===
 0Exception   Exception   Exception
 1RCW Transaction RCW Transaction RCW Transaction
 2Internal Operation  Internal Operation  Reserved
 3ReservedReservedReserved
+===  ==  ===
diff --git a/Documentation/xtensa/booting.txt b/Documentation/xtensa/booting.rst
similarity index 91%
rename from Documentation/xtensa/booting.txt
rename to Documentation/xtensa/booting.rst
index 402b33a2619f..e1b83707e5b6 100644
--- a/Documentation/xtensa/booting.txt
+++ b/Documentation/xtensa/booting.rst
@@ -1,10 +1,13 @@
-Passing boot parameters to the kernel.
+=
+Passing boot parameters to the kernel
+=
 
 Boot parameters are represented as a TLV list in the memory. Please see
 arch/xtensa/include/asm/bootparam.h for definition of the bp_tag structure and
 tag value constants. First entry in the list must have type BP_TAG_FIRST, last
 entry must have type BP_TAG_LAST. The address of the first list entry is
 passed to the kernel in the register a2. The address type depends on MMU type:
+
 - For configurations without MMU, with region protection or with MPU the
   address must be the physical address.
 - For configurations with region translarion MMU or with MMUv3 and CONFIG_MMU=n
diff --git a/Documentation/xtensa/index.rst b/Documentation/xtensa/index.rst
new file mode 100644
index ..5a24e365e35f
--- /dev/null
+++ b/Documentation/xtensa/index.rst
@@ -0,0 +1,12 @@
+:orphan:
+
+===
+Xtensa Architecture
+===
+
+.. toctree::
+   :maxdepth: 1
+
+   atomctl
+   booting
+   mmu
diff --git a/Documentation/xtensa/mmu.rst b/Documentation/xtensa/mmu.rst
new file mode 100644
index ..e52a12960fdc
--- /dev/null
+++ b/Documentation/xtensa/mmu.rst
@@ -0,0 +1,195 @@
+=
+MMUv3 initialization sequence
+=
+
+The code in the initialize_mmu macro sets up MMUv3 memory mapping
+identically to MMUv2 fixed memory mapping. Depending on
+CONFIG_INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX symbol this code is
+located in addresses it was linked for (symbo

[PATCH v2 13/29] docs: bus-devices: ti-gpmc.rst: convert it to ReST

2019-06-18 Thread Mauro Carvalho Chehab
In order to be able to add this file to a book, it needs
first to be converted to ReST and renamed.

While this is not part of any book, mark it as :orphan:, in order
to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab 
---
 .../bus-devices/{ti-gpmc.txt => ti-gpmc.rst}  | 159 --
 1 file changed, 108 insertions(+), 51 deletions(-)
 rename Documentation/bus-devices/{ti-gpmc.txt => ti-gpmc.rst} (58%)

diff --git a/Documentation/bus-devices/ti-gpmc.txt 
b/Documentation/bus-devices/ti-gpmc.rst
similarity index 58%
rename from Documentation/bus-devices/ti-gpmc.txt
rename to Documentation/bus-devices/ti-gpmc.rst
index cc9ce57e0a26..87c366e418be 100644
--- a/Documentation/bus-devices/ti-gpmc.txt
+++ b/Documentation/bus-devices/ti-gpmc.rst
@@ -1,8 +1,12 @@
-GPMC (General Purpose Memory Controller):
-=
+:orphan:
+
+
+GPMC (General Purpose Memory Controller)
+
 
 GPMC is an unified memory controller dedicated to interfacing external
 memory devices like
+
  * Asynchronous SRAM like memories and application specific integrated
circuit devices.
  * Asynchronous, synchronous, and page mode burst NOR flash devices
@@ -48,75 +52,128 @@ most of the datasheets & hardware (to be exact none of 
those supported
 in mainline having custom timing routine) and by simulation.
 
 gpmc timing dependency on peripheral timings:
+
 [: ,  ...]
 
 1. common
-cs_on: t_ceasu
-adv_on: t_avdasu, t_ceavd
+
+cs_on:
+   t_ceasu
+adv_on:
+   t_avdasu, t_ceavd
 
 2. sync common
-sync_clk: clk
-page_burst_access: t_bacc
-clk_activation: t_ces, t_avds
+
+sync_clk:
+   clk
+page_burst_access:
+   t_bacc
+clk_activation:
+   t_ces, t_avds
 
 3. read async muxed
-adv_rd_off: t_avdp_r
-oe_on: t_oeasu, t_aavdh
-access: t_iaa, t_oe, t_ce, t_aa
-rd_cycle: t_rd_cycle, t_cez_r, t_oez
+
+adv_rd_off:
+   t_avdp_r
+oe_on:
+   t_oeasu, t_aavdh
+access:
+   t_iaa, t_oe, t_ce, t_aa
+rd_cycle:
+   t_rd_cycle, t_cez_r, t_oez
 
 4. read async non-muxed
-adv_rd_off: t_avdp_r
-oe_on: t_oeasu
-access: t_iaa, t_oe, t_ce, t_aa
-rd_cycle: t_rd_cycle, t_cez_r, t_oez
+
+adv_rd_off:
+   t_avdp_r
+oe_on:
+   t_oeasu
+access:
+   t_iaa, t_oe, t_ce, t_aa
+rd_cycle:
+   t_rd_cycle, t_cez_r, t_oez
 
 5. read sync muxed
-adv_rd_off: t_avdp_r, t_avdh
-oe_on: t_oeasu, t_ach, cyc_aavdh_oe
-access: t_iaa, cyc_iaa, cyc_oe
-rd_cycle: t_cez_r, t_oez, t_ce_rdyz
+
+adv_rd_off:
+   t_avdp_r, t_avdh
+oe_on:
+   t_oeasu, t_ach, cyc_aavdh_oe
+access:
+   t_iaa, cyc_iaa, cyc_oe
+rd_cycle:
+   t_cez_r, t_oez, t_ce_rdyz
 
 6. read sync non-muxed
-adv_rd_off: t_avdp_r
-oe_on: t_oeasu
-access: t_iaa, cyc_iaa, cyc_oe
-rd_cycle: t_cez_r, t_oez, t_ce_rdyz
+
+adv_rd_off:
+   t_avdp_r
+oe_on:
+   t_oeasu
+access:
+   t_iaa, cyc_iaa, cyc_oe
+rd_cycle:
+   t_cez_r, t_oez, t_ce_rdyz
 
 7. write async muxed
-adv_wr_off: t_avdp_w
-we_on, wr_data_mux_bus: t_weasu, t_aavdh, cyc_aavhd_we
-we_off: t_wpl
-cs_wr_off: t_wph
-wr_cycle: t_cez_w, t_wr_cycle
+
+adv_wr_off:
+   t_avdp_w
+we_on, wr_data_mux_bus:
+   t_weasu, t_aavdh, cyc_aavhd_we
+we_off:
+   t_wpl
+cs_wr_off:
+   t_wph
+wr_cycle:
+   t_cez_w, t_wr_cycle
 
 8. write async non-muxed
-adv_wr_off: t_avdp_w
-we_on, wr_data_mux_bus: t_weasu
-we_off: t_wpl
-cs_wr_off: t_wph
-wr_cycle: t_cez_w, t_wr_cycle
+
+adv_wr_off:
+   t_avdp_w
+we_on, wr_data_mux_bus:
+   t_weasu
+we_off:
+   t_wpl
+cs_wr_off:
+   t_wph
+wr_cycle:
+   t_cez_w, t_wr_cycle
 
 9. write sync muxed
-adv_wr_off: t_avdp_w, t_avdh
-we_on, wr_data_mux_bus: t_weasu, t_rdyo, t_aavdh, cyc_aavhd_we
-we_off: t_wpl, cyc_wpl
-cs_wr_off: t_wph
-wr_cycle: t_cez_w, t_ce_rdyz
+
+adv_wr_off:
+   t_avdp_w, t_avdh
+we_on, wr_data_mux_bus:
+   t_weasu, t_rdyo, t_aavdh, cyc_aavhd_we
+we_off:
+   t_wpl, cyc_wpl
+cs_wr_off:
+   t_wph
+wr_cycle:
+   t_cez_w, t_ce_rdyz
 
 10. write sync non-muxed
-adv_wr_off: t_avdp_w
-we_on, wr_data_mux_bus: t_weasu, t_rdyo
-we_off: t_wpl, cyc_wpl
-cs_wr_off: t_wph
-wr_cycle: t_cez_w, t_ce_rdyz
 
+adv_wr_off:
+   t_avdp_w
+we_on, wr_data_mux_bus:
+   t_weasu, t_rdyo
+we_off:
+   t_wpl, cyc_wpl
+cs_wr_off:
+   t_wph
+wr_cycle:
+   t_cez_w, t_ce_rdyz
 
-Note: Many of gpmc timings are dependent on other gpmc timings (a few
-gpmc timings purely dependent on other gpmc timings, a reason that
-some of the gpmc timings are missing above), and it will result in
-indirect dependency of peripheral timings to gpmc timings other than
-mentioned above, refer timing routine for more details. To know what
-these peripheral timings correspond to, please see explanations in
-struct gpmc_device_timings definition. And for gpmc timings refer
-IP details (link above).
+
+Note:
+  Many of gpmc timings are dependent on other gpmc timings (a few
+  gpmc timings purely dependent on other gpmc timi

[PATCH v2 01/29] docs: connector: convert to ReST and rename to connector.rst

2019-06-18 Thread Mauro Carvalho Chehab
As it has some function definitions, move them to connector.h.

The remaining conversion is actually:
  - add blank lines and identation in order to identify paragraphs;
  - fix tables markups;
  - add some lists markups;
  - mark literal blocks;
  - adjust title markups.

At its new index.rst, let's add a :orphan: while this is not linked to
the main index.rst file, in order to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab 
---
 .../{connector.txt => connector.rst}  | 130 ++
 drivers/w1/Kconfig|   2 +-
 include/linux/connector.h |  63 -
 samples/Kconfig   |   2 +-
 4 files changed, 109 insertions(+), 88 deletions(-)
 rename Documentation/connector/{connector.txt => connector.rst} (57%)

diff --git a/Documentation/connector/connector.txt 
b/Documentation/connector/connector.rst
similarity index 57%
rename from Documentation/connector/connector.txt
rename to Documentation/connector/connector.rst
index ab7ca897fab7..24e26dc22dbf 100644
--- a/Documentation/connector/connector.txt
+++ b/Documentation/connector/connector.rst
@@ -1,6 +1,8 @@
-/*/
-Kernel Connector.
-/*/
+:orphan:
+
+
+Kernel Connector
+
 
 Kernel connector - new netlink based userspace <-> kernel space easy
 to use communication module.
@@ -12,94 +14,55 @@ identifier, the appropriate callback will be called.
 
 From the userspace point of view it's quite straightforward:
 
-   socket();
-   bind();
-   send();
-   recv();
+   - socket();
+   - bind();
+   - send();
+   - recv();
 
 But if kernelspace wants to use the full power of such connections, the
 driver writer must create special sockets, must know about struct sk_buff
 handling, etc...  The Connector driver allows any kernelspace agents to use
 netlink based networking for inter-process communication in a significantly
-easier way:
+easier way::
 
-int cn_add_callback(struct cb_id *id, char *name, void (*callback) (struct 
cn_msg *, struct netlink_skb_parms *));
-void cn_netlink_send_multi(struct cn_msg *msg, u16 len, u32 portid, u32 
__group, int gfp_mask);
-void cn_netlink_send(struct cn_msg *msg, u32 portid, u32 __group, int 
gfp_mask);
+  int cn_add_callback(struct cb_id *id, char *name, void (*callback) (struct 
cn_msg *, struct netlink_skb_parms *));
+  void cn_netlink_send_multi(struct cn_msg *msg, u16 len, u32 portid, u32 
__group, int gfp_mask);
+  void cn_netlink_send(struct cn_msg *msg, u32 portid, u32 __group, int 
gfp_mask);
 
-struct cb_id
-{
+  struct cb_id
+  {
__u32   idx;
__u32   val;
-};
+  };
 
 idx and val are unique identifiers which must be registered in the
-connector.h header for in-kernel usage.  void (*callback) (void *) is a
+connector.h header for in-kernel usage.  `void (*callback) (void *)` is a
 callback function which will be called when a message with above idx.val
 is received by the connector core.  The argument for that function must
-be dereferenced to struct cn_msg *.
+be dereferenced to `struct cn_msg *`::
 
-struct cn_msg
-{
+  struct cn_msg
+  {
struct cb_idid;
 
__u32   seq;
__u32   ack;
 
-   __u32   len;/* Length of the following data 
*/
+   __u32   len;/* Length of the following data */
__u8data[0];
-};
+  };
 
-/*/
-Connector interfaces.
-/*/
+Connector interfaces
+
 
-int cn_add_callback(struct cb_id *id, char *name, void (*callback) (struct 
cn_msg *, struct netlink_skb_parms *));
+ .. kernel-doc:: include/linux/connector.h
 
- Registers new callback with connector core.
+ Note:
+   When registering new callback user, connector core assigns
+   netlink group to the user which is equal to its id.idx.
 
- struct cb_id *id  - unique connector's user identifier.
- It must be registered in connector.h for 
legal in-kernel users.
- char *name- connector's callback symbolic name.
- void (*callback) (struct cn..)- connector's callback.
- cn_msg and the sender's credentials
-
-
-void cn_del_callback(struct cb_id *id);
-
- Unregisters new callback with connector core.
-
- struct cb_id *id  - unique connector's user identifier.
-
-
-int cn_netlink_send_multi(struct cn_msg *msg, u16 len, u32 portid, u32 
__groups, int gfp_mask);
-int cn_netlink_send(struct cn_msg *msg, u32 portid, u32 __groups, int 
gfp_mask);
-
- Sends message to the specified groups.  It can be safely called from
- softirq context, but may silently fail under strong memory pressure.
- If there are no listeners fo

[PATCH v2 20/29] docs: leds: convert to ReST

2019-06-18 Thread Mauro Carvalho Chehab
Rename the leds documentation files to ReST, add an
index for them and adjust in order to produce a nice html
output via the Sphinx build system.

At its new index.rst, let's add a :orphan: while this is not linked to
the main index.rst file, in order to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/laptops/thinkpad-acpi.txt   |   4 +-
 Documentation/leds/index.rst  |  25 ++
 .../leds/{leds-blinkm.txt => leds-blinkm.rst} |  64 ++---
 ...s-class-flash.txt => leds-class-flash.rst} |  49 ++--
 .../leds/{leds-class.txt => leds-class.rst}   |  15 +-
 .../leds/{leds-lm3556.txt => leds-lm3556.rst} | 100 ++--
 .../leds/{leds-lp3944.txt => leds-lp3944.rst} |  23 +-
 Documentation/leds/leds-lp5521.rst| 115 +
 Documentation/leds/leds-lp5521.txt| 101 
 Documentation/leds/leds-lp5523.rst| 147 
 Documentation/leds/leds-lp5523.txt| 130 --
 Documentation/leds/leds-lp5562.rst| 137 +++
 Documentation/leds/leds-lp5562.txt| 120 --
 Documentation/leds/leds-lp55xx.rst| 224 ++
 Documentation/leds/leds-lp55xx.txt| 194 ---
 Documentation/leds/leds-mlxcpld.rst   | 118 +
 Documentation/leds/leds-mlxcpld.txt   | 110 -
 ...edtrig-oneshot.txt => ledtrig-oneshot.rst} |  11 +-
 ...ig-transient.txt => ledtrig-transient.rst} |  63 +++--
 ...edtrig-usbport.txt => ledtrig-usbport.rst} |  11 +-
 Documentation/leds/{uleds.txt => uleds.rst}   |   5 +-
 MAINTAINERS   |   2 +-
 drivers/leds/trigger/Kconfig  |   2 +-
 drivers/leds/trigger/ledtrig-transient.c  |   2 +-
 net/netfilter/Kconfig |   2 +-
 25 files changed, 996 insertions(+), 778 deletions(-)
 create mode 100644 Documentation/leds/index.rst
 rename Documentation/leds/{leds-blinkm.txt => leds-blinkm.rst} (57%)
 rename Documentation/leds/{leds-class-flash.txt => leds-class-flash.rst} (74%)
 rename Documentation/leds/{leds-class.txt => leds-class.rst} (92%)
 rename Documentation/leds/{leds-lm3556.txt => leds-lm3556.rst} (70%)
 rename Documentation/leds/{leds-lp3944.txt => leds-lp3944.rst} (78%)
 create mode 100644 Documentation/leds/leds-lp5521.rst
 delete mode 100644 Documentation/leds/leds-lp5521.txt
 create mode 100644 Documentation/leds/leds-lp5523.rst
 delete mode 100644 Documentation/leds/leds-lp5523.txt
 create mode 100644 Documentation/leds/leds-lp5562.rst
 delete mode 100644 Documentation/leds/leds-lp5562.txt
 create mode 100644 Documentation/leds/leds-lp55xx.rst
 delete mode 100644 Documentation/leds/leds-lp55xx.txt
 create mode 100644 Documentation/leds/leds-mlxcpld.rst
 delete mode 100644 Documentation/leds/leds-mlxcpld.txt
 rename Documentation/leds/{ledtrig-oneshot.txt => ledtrig-oneshot.rst} (90%)
 rename Documentation/leds/{ledtrig-transient.txt => ledtrig-transient.rst} 
(81%)
 rename Documentation/leds/{ledtrig-usbport.txt => ledtrig-usbport.rst} (86%)
 rename Documentation/leds/{uleds.txt => uleds.rst} (95%)

diff --git a/Documentation/laptops/thinkpad-acpi.txt 
b/Documentation/laptops/thinkpad-acpi.txt
index 6cced88de6da..75ef063622d2 100644
--- a/Documentation/laptops/thinkpad-acpi.txt
+++ b/Documentation/laptops/thinkpad-acpi.txt
@@ -679,7 +679,7 @@ status as "unknown". The available commands are:
 sysfs notes:
 
 The ThinkLight sysfs interface is documented by the LED class
-documentation, in Documentation/leds/leds-class.txt.  The ThinkLight LED name
+documentation, in Documentation/leds/leds-class.rst.  The ThinkLight LED name
 is "tpacpi::thinklight".
 
 Due to limitations in the sysfs LED class, if the status of the ThinkLight
@@ -779,7 +779,7 @@ All of the above can be turned on and off and can be made 
to blink.
 sysfs notes:
 
 The ThinkPad LED sysfs interface is described in detail by the LED class
-documentation, in Documentation/leds/leds-class.txt.
+documentation, in Documentation/leds/leds-class.rst.
 
 The LEDs are named (in LED ID order, from 0 to 12):
 "tpacpi::power", "tpacpi:orange:batt", "tpacpi:green:batt",
diff --git a/Documentation/leds/index.rst b/Documentation/leds/index.rst
new file mode 100644
index ..9885f7c1b75d
--- /dev/null
+++ b/Documentation/leds/index.rst
@@ -0,0 +1,25 @@
+:orphan:
+
+
+LEDs
+
+
+.. toctree::
+   :maxdepth: 1
+
+   leds-class
+   leds-class-flash
+   ledtrig-oneshot
+   ledtrig-transient
+   ledtrig-usbport
+
+   uleds
+
+   leds-blinkm
+   leds-lm3556
+   leds-lp3944
+   leds-lp5521
+   leds-lp5523
+   leds-lp5562
+   leds-lp55xx
+   leds-mlxcpld
diff --git a/Documentation/leds/leds-blinkm.txt 
b/Documentation/leds/leds-blinkm.rst
similarity index 57%
rename from Documentation/leds/leds-blinkm.txt
rename to Documentation/leds/leds-blinkm.rst
index 9dd92f4cf4e1..c74b5bc877b1 100644
--- a/Documentation/leds/leds-blinkm.txt
+++ b/Documentation/leds/leds-blinkm.rst
@

[PATCH v2 00/29] Convert files to ReST - part 2

2019-06-18 Thread Mauro Carvalho Chehab
This is the second part of a series I wrote sometime ago where I manually
convert lots of files to be properly parsed by Sphinx as ReST files.

As it touches on lot of stuff, this series is based on today's linux-next, 
at tag next-20190617.

The first version of this series had 57 patches. The first part with 28 patches
were already merged. Right now, there are still ~76  patches pending applying
(including this series), and that's because I opted to do ~1 patch per converted
 directory.

That sounds too much to be send on a single round. So, I'm opting to split
it on 3 parts for the conversion, plus a final patch adding orphaned books
to existing ones. 

Those patches should probably be good to be merged either by subsystem
maintainers or via the docs tree.

I opted to mark new files not included yet to the main index.rst (directly or
indirectly) with the :orphan: tag, in order to avoid adding warnings to the
build system. This should be removed after we find a "home" for all
the converted files within the new document tree arrangement, after I
submit the third part.

Both this series and  the other parts of this work are on my devel git tree,
at:


https://git.linuxtv.org/mchehab/experimental.git/log/?h=convert_rst_renames_v5.1

The final output in html (after all patches I currently have, including 
the upcoming series) can be seen at:

https://www.infradead.org/~mchehab/rst_conversion/

It contains all pending work from my side related to the conversion, plus
the patches I finished a first version today with contains the renaming 
patches and de-orphan changes.

---

Version 2:

- Removed patches merged via other trees;
- rebased on the top of today's linux-next (next-20190617);
- Fix a typo on one patch's description;
- Added received acks.


Mauro Carvalho Chehab (29):
  docs: connector: convert to ReST and rename to connector.rst
  docs: lcd-panel-cgram.txt: convert docs to ReST and rename to *.rst
  docs: lp855x-driver.txt: convert to ReST and move to kernel-api
  docs: m68k: convert docs to ReST and rename to *.rst
  docs: cma/debugfs.txt: convert docs to ReST and rename to *.rst
  docs: console.txt: convert docs to ReST and rename to *.rst
  docs: pti_intel_mid.txt: convert it to pti_intel_mid.rst
  docs: early-userspace: convert docs to ReST and rename to *.rst
  docs: driver-model: convert docs to ReST and rename to *.rst
  docs: arm: convert docs to ReST and rename to *.rst
  docs: memory-devices: convert ti-emif.txt to ReST
  docs: xen-tpmfront.txt: convert it to .rst
  docs: bus-devices: ti-gpmc.rst: convert it to ReST
  docs: nvmem: convert docs to ReST and rename to *.rst
  docs: phy: convert samsung-usb2.txt to ReST format
  docs: rbtree.txt: fix Sphinx build warnings
  docs: DMA-API-HOWTO.txt: fix an unmarked code block
  docs: accounting: convert to ReST
  docs: ia64: convert to ReST
  docs: leds: convert to ReST
  docs: laptops: convert to ReST
  docs: iio: convert to ReST
  docs: namespaces: convert to ReST
  docs: nfc: convert to ReST
  docs: md: convert to ReST
  docs: mtd: convert to ReST
  docs: nvdimm: convert to ReST
  docs: xtensa: convert to ReST
  docs: mmc: convert to ReST

 Documentation/ABI/testing/sysfs-block-device  |   2 +-
 .../ABI/testing/sysfs-platform-asus-laptop|   2 +-
 Documentation/DMA-API-HOWTO.txt   |   2 +-
 .../{cgroupstats.txt => cgroupstats.rst}  |  14 +-
 ...ay-accounting.txt => delay-accounting.rst} |  61 ++-
 Documentation/accounting/index.rst|  14 +
 Documentation/accounting/{psi.txt => psi.rst} |  40 +-
 ...kstats-struct.txt => taskstats-struct.rst} |  79 ++-
 .../{taskstats.txt => taskstats.rst}  |  15 +-
 Documentation/admin-guide/cgroup-v2.rst   |   6 +-
 .../admin-guide/kernel-parameters.rst |   2 +-
 .../admin-guide/kernel-parameters.txt |   2 +-
 Documentation/arm/Marvell/README  | 395 -
 Documentation/arm/Netwinder   |  78 ---
 Documentation/arm/SA1100/FreeBird |  21 -
 Documentation/arm/SA1100/empeg|   2 -
 Documentation/arm/SA1100/serial_UART  |  47 --
 Documentation/arm/{README => arm.rst} |  50 +-
 Documentation/arm/{Booting => booting.rst}|  71 ++-
 ...ance.txt => cluster-pm-race-avoidance.rst} | 177 +++---
 .../arm/{firmware.txt => firmware.rst}|  14 +-
 Documentation/arm/index.rst   |  80 +++
 .../arm/{Interrupts => interrupts.rst}|  86 +--
 Documentation/arm/{IXP4xx => ixp4xx.rst}  |  61 ++-
 ...nel_mode_neon.txt => kernel_mode_neon.rst} |   3 +
 ...er_helpers.txt => kernel_user_helpers.rst} |  79 +--
 .../keystone/{knav-qmss.txt => knav-qmss.rst} |   6 +-
 .../keystone/{Overview.txt => overview.rst}   |  47 +-
 Documentation/arm/marvel.rst  | 488 +
 .../arm/{mem_alignment => mem_alignment.rst}  |  11 +-
 Documentation/arm/{memory.txt => memory.rst}  |   9 +-
 .../arm/{Microchip/README => microchip.rst}   | 

[PATCH v2 16/29] docs: rbtree.txt: fix Sphinx build warnings

2019-06-18 Thread Mauro Carvalho Chehab
Ths file is already at ReST format. Yet, some recent changes
made it to produce a few warnings when building it with
Sphinx.

Those are trivially fixed by marking some literal blocks.

Fix them before adding it to the docs building system.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/rbtree.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/rbtree.txt b/Documentation/rbtree.txt
index c42a21b99046..523d54b60087 100644
--- a/Documentation/rbtree.txt
+++ b/Documentation/rbtree.txt
@@ -204,21 +204,21 @@ potentially expensive tree iterations. This is done at 
negligible runtime
 overhead for maintanence; albeit larger memory footprint.
 
 Similar to the rb_root structure, cached rbtrees are initialized to be
-empty via:
+empty via::
 
   struct rb_root_cached mytree = RB_ROOT_CACHED;
 
 Cached rbtree is simply a regular rb_root with an extra pointer to cache the
 leftmost node. This allows rb_root_cached to exist wherever rb_root does,
 which permits augmented trees to be supported as well as only a few extra
-interfaces:
+interfaces::
 
   struct rb_node *rb_first_cached(struct rb_root_cached *tree);
   void rb_insert_color_cached(struct rb_node *, struct rb_root_cached *, bool);
   void rb_erase_cached(struct rb_node *node, struct rb_root_cached *);
 
 Both insert and erase calls have their respective counterpart of augmented
-trees:
+trees::
 
   void rb_insert_augmented_cached(struct rb_node *node, struct rb_root_cached 
*,
  bool, struct rb_augment_callbacks *);
-- 
2.21.0



[PATCH v2 21/29] docs: laptops: convert to ReST

2019-06-18 Thread Mauro Carvalho Chehab
Rename the laptops documentation files to ReST, add an
index for them and adjust in order to produce a nice html
output via the Sphinx build system.

At its new index.rst, let's add a :orphan: while this is not linked to
the main index.rst file, in order to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab 
Acked-by: Andy Shevchenko 
---
 Documentation/ABI/testing/sysfs-block-device  |   2 +-
 .../ABI/testing/sysfs-platform-asus-laptop|   2 +-
 .../admin-guide/kernel-parameters.txt |   2 +-
 .../{asus-laptop.txt => asus-laptop.rst}  |  92 ++--
 ...otection.txt => disk-shock-protection.rst} |  32 +-
 Documentation/laptops/index.rst   |  17 +
 .../{laptop-mode.txt => laptop-mode.rst}  | 509 +-
 .../{sony-laptop.txt => sony-laptop.rst}  |  58 +-
 .../laptops/{sonypi.txt => sonypi.rst}|  28 +-
 .../{thinkpad-acpi.txt => thinkpad-acpi.rst}  | 363 -
 .../{toshiba_haps.txt => toshiba_haps.rst}|  47 +-
 Documentation/sysctl/vm.txt   |   4 +-
 MAINTAINERS   |   2 +-
 drivers/char/Kconfig  |   2 +-
 drivers/platform/x86/Kconfig  |   4 +-
 15 files changed, 660 insertions(+), 504 deletions(-)
 rename Documentation/laptops/{asus-laptop.txt => asus-laptop.rst} (84%)
 rename Documentation/laptops/{disk-shock-protection.txt => 
disk-shock-protection.rst} (91%)
 create mode 100644 Documentation/laptops/index.rst
 rename Documentation/laptops/{laptop-mode.txt => laptop-mode.rst} (62%)
 rename Documentation/laptops/{sony-laptop.txt => sony-laptop.rst} (85%)
 rename Documentation/laptops/{sonypi.txt => sonypi.rst} (87%)
 rename Documentation/laptops/{thinkpad-acpi.txt => thinkpad-acpi.rst} (89%)
 rename Documentation/laptops/{toshiba_haps.txt => toshiba_haps.rst} (60%)

diff --git a/Documentation/ABI/testing/sysfs-block-device 
b/Documentation/ABI/testing/sysfs-block-device
index 82ef6eab042d..0d57bbb4fddc 100644
--- a/Documentation/ABI/testing/sysfs-block-device
+++ b/Documentation/ABI/testing/sysfs-block-device
@@ -45,7 +45,7 @@ Description:
- Values below -2 are rejected with -EINVAL
 
For more information, see
-   Documentation/laptops/disk-shock-protection.txt
+   Documentation/laptops/disk-shock-protection.rst
 
 
 What:  /sys/block/*/device/ncq_prio_enable
diff --git a/Documentation/ABI/testing/sysfs-platform-asus-laptop 
b/Documentation/ABI/testing/sysfs-platform-asus-laptop
index cd9d667c3da2..d67fa4bafa70 100644
--- a/Documentation/ABI/testing/sysfs-platform-asus-laptop
+++ b/Documentation/ABI/testing/sysfs-platform-asus-laptop
@@ -31,7 +31,7 @@ Description:
To control the LED display, use the following :
echo 0x0T000DDD > /sys/devices/platform/asus_laptop/
where T control the 3 letters display, and DDD the 3 digits 
display.
-   The DDD table can be found in 
Documentation/laptops/asus-laptop.txt
+   The DDD table can be found in 
Documentation/laptops/asus-laptop.rst
 
 What:  /sys/devices/platform/asus_laptop/bluetooth
 Date:  January 2007
diff --git a/Documentation/admin-guide/kernel-parameters.txt 
b/Documentation/admin-guide/kernel-parameters.txt
index 3faf37b8b001..7abe677f8c5e 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -4356,7 +4356,7 @@
Format: 
 
sonypi.*=   [HW] Sony Programmable I/O Control Device driver
-   See Documentation/laptops/sonypi.txt
+   See Documentation/laptops/sonypi.rst
 
spectre_v2= [X86] Control mitigation of Spectre variant 2
(indirect branch speculation) vulnerability.
diff --git a/Documentation/laptops/asus-laptop.txt 
b/Documentation/laptops/asus-laptop.rst
similarity index 84%
rename from Documentation/laptops/asus-laptop.txt
rename to Documentation/laptops/asus-laptop.rst
index 5f2858712aa0..95176321a25a 100644
--- a/Documentation/laptops/asus-laptop.txt
+++ b/Documentation/laptops/asus-laptop.rst
@@ -1,6 +1,9 @@
+==
 Asus Laptop Extras
+==
 
 Version 0.1
+
 August 6, 2009
 
 Corentin Chary 
@@ -10,11 +13,12 @@ http://acpi4asus.sf.net/
  It may also support some MEDION, JVC or VICTOR laptops (such as MEDION 9675 or
  VICTOR XP7210 for example). It makes all the extra buttons generate input
  events (like keyboards).
+
  On some models adds support for changing the display brightness and output,
  switching the LCD backlight on and off, and most importantly, allows you to
  blink those fancy LEDs intended for reporting mail and wireless status.
 
-This driver supercedes the old asus_acpi driver.
+This driver supersedes the old asus_acpi driver.
 
 Requirements
 
@@ -49,7 +53,7 @@ Usage
   see some lines like this :
 
   Asus La

[PATCH v2 19/29] docs: ia64: convert to ReST

2019-06-18 Thread Mauro Carvalho Chehab
Rename the ia64 documentation files to ReST, add an
index for them and adjust in order to produce a nice html
output via the Sphinx build system.

There are two upper case file names. Rename them to
lower case, as we're working to avoid upper case file
names at Documentation.

At its new index.rst, let's add a :orphan: while this is not linked to
the main index.rst file, in order to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab 
---
 .../ia64/{aliasing.txt => aliasing.rst}   |  73 ++--
 Documentation/ia64/{efirtc.txt => efirtc.rst} | 118 +++---
 .../ia64/{err_inject.txt => err_inject.rst}   | 349 +-
 Documentation/ia64/{fsys.txt => fsys.rst} | 127 ---
 Documentation/ia64/{README => ia64.rst}   |  26 +-
 Documentation/ia64/index.rst  |  18 +
 .../ia64/{IRQ-redir.txt => irq-redir.rst} |  31 +-
 Documentation/ia64/{mca.txt => mca.rst}   |  10 +-
 Documentation/ia64/{serial.txt => serial.rst} |  36 +-
 Documentation/ia64/xen.rst| 206 +++
 Documentation/ia64/xen.txt| 183 -
 MAINTAINERS   |   2 +-
 arch/ia64/kernel/efi.c|   2 +-
 arch/ia64/kernel/fsys.S   |   2 +-
 arch/ia64/mm/ioremap.c|   2 +-
 arch/ia64/pci/pci.c   |   2 +-
 16 files changed, 660 insertions(+), 527 deletions(-)
 rename Documentation/ia64/{aliasing.txt => aliasing.rst} (83%)
 rename Documentation/ia64/{efirtc.txt => efirtc.rst} (70%)
 rename Documentation/ia64/{err_inject.txt => err_inject.rst} (82%)
 rename Documentation/ia64/{fsys.txt => fsys.rst} (76%)
 rename Documentation/ia64/{README => ia64.rst} (61%)
 create mode 100644 Documentation/ia64/index.rst
 rename Documentation/ia64/{IRQ-redir.txt => irq-redir.rst} (86%)
 rename Documentation/ia64/{mca.txt => mca.rst} (96%)
 rename Documentation/ia64/{serial.txt => serial.rst} (87%)
 create mode 100644 Documentation/ia64/xen.rst
 delete mode 100644 Documentation/ia64/xen.txt

diff --git a/Documentation/ia64/aliasing.txt b/Documentation/ia64/aliasing.rst
similarity index 83%
rename from Documentation/ia64/aliasing.txt
rename to Documentation/ia64/aliasing.rst
index 5a4dea6abebd..a08b36aba015 100644
--- a/Documentation/ia64/aliasing.txt
+++ b/Documentation/ia64/aliasing.rst
@@ -1,20 +1,25 @@
-MEMORY ATTRIBUTE ALIASING ON IA-64
+==
+Memory Attribute Aliasing on IA-64
+==
 
-  Bjorn Helgaas
-  
-   May 4, 2006
+Bjorn Helgaas 
 
+May 4, 2006
 
-MEMORY ATTRIBUTES
+
+Memory Attributes
+=
 
 Itanium supports several attributes for virtual memory references.
 The attribute is part of the virtual translation, i.e., it is
 contained in the TLB entry.  The ones of most interest to the Linux
 kernel are:
 
-   WB  Write-back (cacheable)
+   ==  ==
+WB Write-back (cacheable)
UC  Uncacheable
WC  Write-coalescing
+   ==  ==
 
 System memory typically uses the WB attribute.  The UC attribute is
 used for memory-mapped I/O devices.  The WC attribute is uncacheable
@@ -29,7 +34,8 @@ MEMORY ATTRIBUTES
 support either WB or UC access to main memory, while others support
 only WB access.
 
-MEMORY MAP
+Memory Map
+==
 
 Platform firmware describes the physical memory map and the
 supported attributes for each region.  At boot-time, the kernel uses
@@ -55,7 +61,8 @@ MEMORY MAP
 The efi_memmap table is preserved unmodified because the original
 boot-time information is required for kexec.
 
-KERNEL IDENTITY MAPPINGS
+Kernel Identify Mappings
+
 
 Linux/ia64 identity mappings are done with large pages, currently
 either 16MB or 64MB, referred to as "granules."  Cacheable mappings
@@ -74,17 +81,20 @@ KERNEL IDENTITY MAPPINGS
 are only partially populated, or populated with a combination of UC
 and WB regions.
 
-USER MAPPINGS
+User Mappings
+=
 
 User mappings are typically done with 16K or 64K pages.  The smaller
 page size allows more flexibility because only 16K or 64K has to be
 homogeneous with respect to memory attributes.
 
-POTENTIAL ATTRIBUTE ALIASING CASES
+Potential Attribute Aliasing Cases
+==
 
 There are several ways the kernel creates new mappings:
 
-mmap of /dev/mem
+mmap of /dev/mem
+
 
This uses remap_pfn_range(), which creates user mappings.  These
mappings may be either WB or UC.  If the region being mapped
@@ -98,7 +108,8 @@ POTENTIAL ATTRIBUTE ALIASING CASES
Since the EFI memory map does not describe MMIO on some
machines, this should use an

[PATCH v2 04/29] docs: m68k: convert docs to ReST and rename to *.rst

2019-06-18 Thread Mauro Carvalho Chehab
Convert the m68k kernel-options.txt file to ReST.

The conversion is trivial, as the document is already on a format
close enough to ReST. Just some small adjustments were needed in
order to make it both good for being parsed while keeping it on
a good txt shape.

At its new index.rst, let's add a :orphan: while this is not linked to
the main index.rst file, in order to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab 
---
 .../admin-guide/kernel-parameters.rst |   2 +-
 Documentation/m68k/index.rst  |  17 +
 ...{kernel-options.txt => kernel-options.rst} | 319 ++
 3 files changed, 191 insertions(+), 147 deletions(-)
 create mode 100644 Documentation/m68k/index.rst
 rename Documentation/m68k/{kernel-options.txt => kernel-options.rst} (78%)

diff --git a/Documentation/admin-guide/kernel-parameters.rst 
b/Documentation/admin-guide/kernel-parameters.rst
index 8d3273e32eb1..006196bd763a 100644
--- a/Documentation/admin-guide/kernel-parameters.rst
+++ b/Documentation/admin-guide/kernel-parameters.rst
@@ -118,7 +118,7 @@ parameter is applicable::
LOOPLoopback device support is enabled.
M68kM68k architecture is enabled.
These options have more detailed description inside of
-   Documentation/m68k/kernel-options.txt.
+   Documentation/m68k/kernel-options.rst.
MDA MDA console support is enabled.
MIPSMIPS architecture is enabled.
MOUSE   Appropriate mouse support is enabled.
diff --git a/Documentation/m68k/index.rst b/Documentation/m68k/index.rst
new file mode 100644
index ..f3273ec075c3
--- /dev/null
+++ b/Documentation/m68k/index.rst
@@ -0,0 +1,17 @@
+:orphan:
+
+=
+m68k Architecture
+=
+
+.. toctree::
+   :maxdepth: 2
+
+   kernel-options
+
+.. only::  subproject and html
+
+   Indices
+   ===
+
+   * :ref:`genindex`
diff --git a/Documentation/m68k/kernel-options.txt 
b/Documentation/m68k/kernel-options.rst
similarity index 78%
rename from Documentation/m68k/kernel-options.txt
rename to Documentation/m68k/kernel-options.rst
index 79d21246c75a..cabd9419740d 100644
--- a/Documentation/m68k/kernel-options.txt
+++ b/Documentation/m68k/kernel-options.rst
@@ -1,22 +1,24 @@
-
-
- Command Line Options for Linux/m68k
- ===
+===
+Command Line Options for Linux/m68k
+===
 
 Last Update: 2 May 1999
+
 Linux/m68k version: 2.2.6
+
 Author: roman.ho...@informatik.uni-erlangen.de (Roman Hodek)
+
 Update: j...@kom.auc.dk (Jes Sorensen) and f...@linux-m68k.org (Chris Lawrence)
 
 0) Introduction
 ===
 
-  Often I've been asked which command line options the Linux/m68k
+Often I've been asked which command line options the Linux/m68k
 kernel understands, or how the exact syntax for the ... option is, or
 ... about the option ... . I hope, this document supplies all the
 answers...
 
-  Note that some options might be outdated, their descriptions being
+Note that some options might be outdated, their descriptions being
 incomplete or missing. Please update the information and send in the
 patches.
 
@@ -38,11 +40,11 @@ argument contains an '=', it is of class 2, and the 
definition is put
 into init's environment. All other arguments are passed to init as
 command line options.
 
-  This document describes the valid kernel options for Linux/m68k in
+This document describes the valid kernel options for Linux/m68k in
 the version mentioned at the start of this file. Later revisions may
 add new such options, and some may be missing in older versions.
 
-  In general, the value (the part after the '=') of an option is a
+In general, the value (the part after the '=') of an option is a
 list of values separated by commas. The interpretation of these values
 is up to the driver that "owns" the option. This association of
 options with drivers is also the reason that some are further
@@ -55,21 +57,21 @@ subdivided.
 2.1) root=
 --
 
-Syntax: root=/dev/
-or: root=
+:Syntax: root=/dev/
+:or: root=
 
 This tells the kernel which device it should mount as the root
 filesystem. The device must be a block device with a valid filesystem
 on it.
 
-  The first syntax gives the device by name. These names are converted
+The first syntax gives the device by name. These names are converted
 into a major/minor number internally in the kernel in an unusual way.
 Normally, this "conversion" is done by the device files in /dev, but
 this isn't possible here, because the root filesystem (with /dev)
 isn't mounted yet... So the kernel parses the name itself, with some
 hardcoded name to number mappings. The name must always be a
 combination of two or three letters, followed by a decimal number.
-Valid names are:
+Valid names are::
 
   /dev/ram: -> 0x0100 (

[PATCH v2 26/29] docs: mtd: convert to ReST

2019-06-18 Thread Mauro Carvalho Chehab
Rename the mtd documentation files to ReST, add an
index for them and adjust in order to produce a nice html
output via the Sphinx build system.

It should be noticed that Sphinx doesn't handle very well
URLs with dots in the middle. Thankfully, internally, the '.'
char is translated to %2E, so we can jus use %2E instead of
dots, and this will work fine on both text and processed files.

At its new index.rst, let's add a :orphan: while this is not linked to
the main index.rst file, in order to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/mtd/index.rst   |  12 +
 .../mtd/{intel-spi.txt => intel-spi.rst}  |  46 +-
 .../mtd/{nand_ecc.txt => nand_ecc.rst}| 481 ++
 .../mtd/{spi-nor.txt => spi-nor.rst}  |   7 +-
 drivers/mtd/nand/raw/nand_ecc.c   |   2 +-
 5 files changed, 306 insertions(+), 242 deletions(-)
 create mode 100644 Documentation/mtd/index.rst
 rename Documentation/mtd/{intel-spi.txt => intel-spi.rst} (71%)
 rename Documentation/mtd/{nand_ecc.txt => nand_ecc.rst} (67%)
 rename Documentation/mtd/{spi-nor.txt => spi-nor.rst} (94%)

diff --git a/Documentation/mtd/index.rst b/Documentation/mtd/index.rst
new file mode 100644
index ..4fdae418ac97
--- /dev/null
+++ b/Documentation/mtd/index.rst
@@ -0,0 +1,12 @@
+:orphan:
+
+==
+Memory Technology Device (MTD)
+==
+
+.. toctree::
+   :maxdepth: 1
+
+   intel-spi
+   nand_ecc
+   spi-nor
diff --git a/Documentation/mtd/intel-spi.txt b/Documentation/mtd/intel-spi.rst
similarity index 71%
rename from Documentation/mtd/intel-spi.txt
rename to Documentation/mtd/intel-spi.rst
index bc357729c2cb..0e6d9cd5388d 100644
--- a/Documentation/mtd/intel-spi.txt
+++ b/Documentation/mtd/intel-spi.rst
@@ -1,5 +1,6 @@
+==
 Upgrading BIOS using intel-spi
---
+==
 
 Many Intel CPUs like Baytrail and Braswell include SPI serial flash host
 controller which is used to hold BIOS and other platform specific data.
@@ -36,45 +37,45 @@ Linux.
 module parameter to modprobe).
 
  4) Once the board is up and running again, find the right MTD partition
-(it is named as "BIOS"):
+(it is named as "BIOS")::
 
-# cat /proc/mtd
-dev:size   erasesize  name
-mtd0: 0080 1000 "BIOS"
+   # cat /proc/mtd
+   dev:size   erasesize  name
+   mtd0: 0080 1000 "BIOS"
 
 So here it will be /dev/mtd0 but it may vary.
 
- 5) Make backup of the existing image first:
+ 5) Make backup of the existing image first::
 
-# dd if=/dev/mtd0ro of=bios.bak
-16384+0 records in
-16384+0 records out
-8388608 bytes (8.4 MB) copied, 10.0269 s, 837 kB/s
+   # dd if=/dev/mtd0ro of=bios.bak
+   16384+0 records in
+   16384+0 records out
+   8388608 bytes (8.4 MB) copied, 10.0269 s, 837 kB/s
 
- 6) Verify the backup
+ 6) Verify the backup:
 
-# sha1sum /dev/mtd0ro bios.bak
-fdbb011920572ca6c991377c4b418a0502668b73  /dev/mtd0ro
-fdbb011920572ca6c991377c4b418a0502668b73  bios.bak
+   # sha1sum /dev/mtd0ro bios.bak
+   fdbb011920572ca6c991377c4b418a0502668b73  /dev/mtd0ro
+   fdbb011920572ca6c991377c4b418a0502668b73  bios.bak
 
 The SHA1 sums must match. Otherwise do not continue any further!
 
  7) Erase the SPI serial flash. After this step, do not reboot the
-board! Otherwise it will not start anymore.
+board! Otherwise it will not start anymore::
 
-# flash_erase /dev/mtd0 0 0
-Erasing 4 Kibyte @ 7ff000 -- 100 % complete
+   # flash_erase /dev/mtd0 0 0
+   Erasing 4 Kibyte @ 7ff000 -- 100 % complete
 
  8) Once completed without errors you can write the new BIOS image:
 
 # dd if=MNW2MAX1.X64.0092.R01.1605221712.bin of=/dev/mtd0
 
  9) Verify that the new content of the SPI serial flash matches the new
-BIOS image:
+BIOS image::
 
-# sha1sum /dev/mtd0ro MNW2MAX1.X64.0092.R01.1605221712.bin
-9b4df9e4be2057fceec3a5529ec3d950836c87a2  /dev/mtd0ro
-9b4df9e4be2057fceec3a5529ec3d950836c87a2 
MNW2MAX1.X64.0092.R01.1605221712.bin
+   # sha1sum /dev/mtd0ro MNW2MAX1.X64.0092.R01.1605221712.bin
+   9b4df9e4be2057fceec3a5529ec3d950836c87a2  /dev/mtd0ro
+   9b4df9e4be2057fceec3a5529ec3d950836c87a2 
MNW2MAX1.X64.0092.R01.1605221712.bin
 
 The SHA1 sums should match.
 
@@ -84,5 +85,6 @@ Linux.
 References
 --
 
-[1] 
https://firmware.intel.com/sites/default/files/MinnowBoard.MAX_.X64.92.R01.zip
+[1] 
https://firmware.intel.com/sites/default/files/MinnowBoard%2EMAX_%2EX64%2E92%2ER01%2Ezip
+
 [2] http://www.linux-mtd.infradead.org/
diff --git a/Documentation/mtd/nand_ecc.txt b/Documentation/mtd/nand_ecc.rst
similarity index 67%
rename from Documentation/mtd/nand_ecc.txt
rename to Documentation/mtd/nand_ecc.rst
index f8c3284bf6a7..e8d3c53a5056 100644
--- a/Documentation/mtd/nand_ecc.txt
+++ b/Documentation/mt

[PATCH v2 02/29] docs: lcd-panel-cgram.txt: convert docs to ReST and rename to *.rst

2019-06-18 Thread Mauro Carvalho Chehab
This small text file describes the usage of parallel port LCD
displays from userspace PoV. So, a good candidate for the
admin guide.

While this is not part of the admin-guide book, mark it as
:orphan:, in order to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab 
---
 .../{lcd-panel-cgram.txt => lcd-panel-cgram.rst} | 9 +++--
 MAINTAINERS  | 2 +-
 2 files changed, 8 insertions(+), 3 deletions(-)
 rename Documentation/auxdisplay/{lcd-panel-cgram.txt => lcd-panel-cgram.rst} 
(88%)

diff --git a/Documentation/auxdisplay/lcd-panel-cgram.txt 
b/Documentation/auxdisplay/lcd-panel-cgram.rst
similarity index 88%
rename from Documentation/auxdisplay/lcd-panel-cgram.txt
rename to Documentation/auxdisplay/lcd-panel-cgram.rst
index 7f82c905763d..dfef50286018 100644
--- a/Documentation/auxdisplay/lcd-panel-cgram.txt
+++ b/Documentation/auxdisplay/lcd-panel-cgram.rst
@@ -1,3 +1,9 @@
+:orphan:
+
+==
+Parallel port LCD/Keypad Panel support
+==
+
 Some LCDs allow you to define up to 8 characters, mapped to ASCII
 characters 0 to 7. The escape code to define a new character is
 '\e[LG' followed by one digit from 0 to 7, representing the character
@@ -7,7 +13,7 @@ illuminated pixel with LSB on the right. Lines are numbered 
from the
 top of the character to the bottom. On a 5x7 matrix, only the 5 lower
 bits of the 7 first bytes are used for each character. If the string
 is incomplete, only complete lines will be redefined. Here are some
-examples :
+examples::
 
   printf "\e[LG0010101050D1F0C04;"  => 0 = [enter]
   printf "\e[LG1040E1F00;"  => 1 = [up]
@@ -21,4 +27,3 @@ examples :
   printf "\e[LG2061E1E060200;"  => small speaker
 
 Willy
-
diff --git a/MAINTAINERS b/MAINTAINERS
index e20a1762ec0b..d64d8bb46323 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -11935,7 +11935,7 @@ PARALLEL LCD/KEYPAD PANEL DRIVER
 M: Willy Tarreau 
 M: Ksenija Stanojevic 
 S: Odd Fixes
-F: Documentation/auxdisplay/lcd-panel-cgram.txt
+F: Documentation/auxdisplay/lcd-panel-cgram.rst
 F: drivers/auxdisplay/panel.c
 
 PARALLEL PORT SUBSYSTEM
-- 
2.21.0



[PATCH v2 18/29] docs: accounting: convert to ReST

2019-06-18 Thread Mauro Carvalho Chehab
Rename the accounting documentation files to ReST, add an
index for them and adjust in order to produce a nice html
output via the Sphinx build system.

At its new index.rst, let's add a :orphan: while this is not linked to
the main index.rst file, in order to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab 
---
 .../{cgroupstats.txt => cgroupstats.rst}  | 14 ++--
 ...ay-accounting.txt => delay-accounting.rst} | 61 --
 Documentation/accounting/index.rst| 14 
 Documentation/accounting/{psi.txt => psi.rst} | 40 +-
 ...kstats-struct.txt => taskstats-struct.rst} | 79 ---
 .../{taskstats.txt => taskstats.rst}  | 15 ++--
 Documentation/admin-guide/cgroup-v2.rst   |  6 +-
 init/Kconfig  |  2 +-
 8 files changed, 139 insertions(+), 92 deletions(-)
 rename Documentation/accounting/{cgroupstats.txt => cgroupstats.rst} (77%)
 rename Documentation/accounting/{delay-accounting.txt => delay-accounting.rst} 
(77%)
 create mode 100644 Documentation/accounting/index.rst
 rename Documentation/accounting/{psi.txt => psi.rst} (91%)
 rename Documentation/accounting/{taskstats-struct.txt => taskstats-struct.rst} 
(78%)
 rename Documentation/accounting/{taskstats.txt => taskstats.rst} (95%)

diff --git a/Documentation/accounting/cgroupstats.txt 
b/Documentation/accounting/cgroupstats.rst
similarity index 77%
rename from Documentation/accounting/cgroupstats.txt
rename to Documentation/accounting/cgroupstats.rst
index d16a9849e60e..b9afc48f4ea2 100644
--- a/Documentation/accounting/cgroupstats.txt
+++ b/Documentation/accounting/cgroupstats.rst
@@ -1,3 +1,7 @@
+==
+Control Groupstats
+==
+
 Control Groupstats is inspired by the discussion at
 http://lkml.org/lkml/2007/4/11/187 and implements per cgroup statistics as
 suggested by Andrew Morton in http://lkml.org/lkml/2007/4/11/263.
@@ -19,9 +23,9 @@ about tasks blocked on I/O. If CONFIG_TASK_DELAY_ACCT is 
disabled, this
 information will not be available.
 
 To extract cgroup statistics a utility very similar to getdelays.c
-has been developed, the sample output of the utility is shown below
+has been developed, the sample output of the utility is shown below::
 
-~/balbir/cgroupstats # ./getdelays  -C "/sys/fs/cgroup/a"
-sleeping 1, blocked 0, running 1, stopped 0, uninterruptible 0
-~/balbir/cgroupstats # ./getdelays  -C "/sys/fs/cgroup"
-sleeping 155, blocked 0, running 1, stopped 0, uninterruptible 2
+  ~/balbir/cgroupstats # ./getdelays  -C "/sys/fs/cgroup/a"
+  sleeping 1, blocked 0, running 1, stopped 0, uninterruptible 0
+  ~/balbir/cgroupstats # ./getdelays  -C "/sys/fs/cgroup"
+  sleeping 155, blocked 0, running 1, stopped 0, uninterruptible 2
diff --git a/Documentation/accounting/delay-accounting.txt 
b/Documentation/accounting/delay-accounting.rst
similarity index 77%
rename from Documentation/accounting/delay-accounting.txt
rename to Documentation/accounting/delay-accounting.rst
index 042ea59b5853..7cc7f5852da0 100644
--- a/Documentation/accounting/delay-accounting.txt
+++ b/Documentation/accounting/delay-accounting.rst
@@ -1,5 +1,6 @@
+
 Delay accounting
-
+
 
 Tasks encounter delays in execution when they wait
 for some kernel resource to become available e.g. a
@@ -39,7 +40,9 @@ in detail in a separate document in this directory. Taskstats 
returns a
 generic data structure to userspace corresponding to per-pid and per-tgid
 statistics. The delay accounting functionality populates specific fields of
 this structure. See
+
  include/linux/taskstats.h
+
 for a description of the fields pertaining to delay accounting.
 It will generally be in the form of counters returning the cumulative
 delay seen for cpu, sync block I/O, swapin, memory reclaim etc.
@@ -61,13 +64,16 @@ also serves as an example of using the taskstats interface.
 Usage
 -
 
-Compile the kernel with
+Compile the kernel with::
+
CONFIG_TASK_DELAY_ACCT=y
CONFIG_TASKSTATS=y
 
 Delay accounting is enabled by default at boot up.
-To disable, add
+To disable, add::
+
nodelayacct
+
 to the kernel boot options. The rest of the instructions
 below assume this has not been done.
 
@@ -78,40 +84,43 @@ The utility also allows a given command to be
 executed and the corresponding delays to be
 seen.
 
-General format of the getdelays command
+General format of the getdelays command::
 
-getdelays [-t tgid] [-p pid] [-c cmd...]
+   getdelays [-t tgid] [-p pid] [-c cmd...]
 
 
-Get delays, since system boot, for pid 10
-# ./getdelays -p 10
-(output similar to next case)
+Get delays, since system boot, for pid 10::
 
-Get sum of delays, since system boot, for all pids with tgid 5
-# ./getdelays -t 5
+   # ./getdelays -p 10
+   (output similar to next case)
 
+Get sum of delays, since system boot, for all pids with tgid 5::
 
-CPUcount   real total  virtual total   delay total
-

[PATCH v2 17/29] docs: DMA-API-HOWTO.txt: fix an unmarked code block

2019-06-18 Thread Mauro Carvalho Chehab
When building with Sphinx, it would produce this warning:

docs/Documentation/DMA-API-HOWTO.rst:222: WARNING: Definition list ends 
without a blank line; unexpected unindent.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/DMA-API-HOWTO.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/DMA-API-HOWTO.txt b/Documentation/DMA-API-HOWTO.txt
index cb712a02f59f..358d495456d1 100644
--- a/Documentation/DMA-API-HOWTO.txt
+++ b/Documentation/DMA-API-HOWTO.txt
@@ -212,7 +212,7 @@ The standard 64-bit addressing device would do something 
like this::
 
 If the device only supports 32-bit addressing for descriptors in the
 coherent allocations, but supports full 64-bits for streaming mappings
-it would look like this:
+it would look like this::
 
if (dma_set_mask(dev, DMA_BIT_MASK(64))) {
dev_warn(dev, "mydev: No suitable DMA available\n");
-- 
2.21.0



[PATCH v2 29/29] docs: mmc: convert to ReST

2019-06-18 Thread Mauro Carvalho Chehab
Rename the mmc documentation files to ReST, add an
index for them and adjust in order to produce a nice html
output via the Sphinx build system.

At its new index.rst, let's add a :orphan: while this is not linked to
the main index.rst file, in order to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/mmc/index.rst   | 13 +
 .../{mmc-async-req.txt => mmc-async-req.rst}  | 53 +++
 .../{mmc-dev-attrs.txt => mmc-dev-attrs.rst}  | 32 +++
 .../{mmc-dev-parts.txt => mmc-dev-parts.rst}  | 13 ++---
 .../mmc/{mmc-tools.txt => mmc-tools.rst}  |  5 +-
 5 files changed, 79 insertions(+), 37 deletions(-)
 create mode 100644 Documentation/mmc/index.rst
 rename Documentation/mmc/{mmc-async-req.txt => mmc-async-req.rst} (75%)
 rename Documentation/mmc/{mmc-dev-attrs.txt => mmc-dev-attrs.rst} (73%)
 rename Documentation/mmc/{mmc-dev-parts.txt => mmc-dev-parts.rst} (83%)
 rename Documentation/mmc/{mmc-tools.txt => mmc-tools.rst} (92%)

diff --git a/Documentation/mmc/index.rst b/Documentation/mmc/index.rst
new file mode 100644
index ..3305478ddadb
--- /dev/null
+++ b/Documentation/mmc/index.rst
@@ -0,0 +1,13 @@
+:orphan:
+
+
+MMC/SD/SDIO card support
+
+
+.. toctree::
+   :maxdepth: 1
+
+   mmc-dev-attrs
+   mmc-dev-parts
+   mmc-async-req
+   mmc-tools
diff --git a/Documentation/mmc/mmc-async-req.txt 
b/Documentation/mmc/mmc-async-req.rst
similarity index 75%
rename from Documentation/mmc/mmc-async-req.txt
rename to Documentation/mmc/mmc-async-req.rst
index ae1907b10e4a..0f7197c9c3b5 100644
--- a/Documentation/mmc/mmc-async-req.txt
+++ b/Documentation/mmc/mmc-async-req.rst
@@ -1,13 +1,20 @@
+
+MMC Asynchronous Request
+
+
 Rationale
 =
 
 How significant is the cache maintenance overhead?
+
 It depends. Fast eMMC and multiple cache levels with speculative cache
 pre-fetch makes the cache overhead relatively significant. If the DMA
 preparations for the next request are done in parallel with the current
 transfer, the DMA preparation overhead would not affect the MMC performance.
+
 The intention of non-blocking (asynchronous) MMC requests is to minimize the
 time between when an MMC request ends and another MMC request begins.
+
 Using mmc_wait_for_req(), the MMC controller is idle while dma_map_sg and
 dma_unmap_sg are processing. Using non-blocking MMC requests makes it
 possible to prepare the caches for next job in parallel with an active
@@ -17,6 +24,7 @@ MMC block driver
 
 
 The mmc_blk_issue_rw_rq() in the MMC block driver is made non-blocking.
+
 The increase in throughput is proportional to the time it takes to
 prepare (major part of preparations are dma_map_sg() and dma_unmap_sg())
 a request and how fast the memory is. The faster the MMC/SD is the
@@ -35,6 +43,7 @@ MMC core API extension
 ==
 
 There is one new public function mmc_start_req().
+
 It starts a new MMC command request for a host. The function isn't
 truly non-blocking. If there is an ongoing async request it waits
 for completion of that request and starts the new one and returns. It
@@ -47,6 +56,7 @@ MMC host extensions
 There are two optional members in the mmc_host_ops -- pre_req() and
 post_req() -- that the host driver may implement in order to move work
 to before and after the actual mmc_host_ops.request() function is called.
+
 In the DMA case pre_req() may do dma_map_sg() and prepare the DMA
 descriptor, and post_req() runs the dma_unmap_sg().
 
@@ -55,33 +65,34 @@ Optimize for the first request
 
 The first request in a series of requests can't be prepared in parallel
 with the previous transfer, since there is no previous request.
+
 The argument is_first_req in pre_req() indicates that there is no previous
 request. The host driver may optimize for this scenario to minimize
 the performance loss. A way to optimize for this is to split the current
 request in two chunks, prepare the first chunk and start the request,
 and finally prepare the second chunk and start the transfer.
 
-Pseudocode to handle is_first_req scenario with minimal prepare overhead:
+Pseudocode to handle is_first_req scenario with minimal prepare overhead::
 
-if (is_first_req && req->size > threshold)
-   /* start MMC transfer for the complete transfer size */
-   mmc_start_command(MMC_CMD_TRANSFER_FULL_SIZE);
+  if (is_first_req && req->size > threshold)
+ /* start MMC transfer for the complete transfer size */
+ mmc_start_command(MMC_CMD_TRANSFER_FULL_SIZE);
 
-   /*
-* Begin to prepare DMA while cmd is being processed by MMC.
-* The first chunk of the request should take the same time
-* to prepare as the "MMC process command time".
-* If prepare time exceeds MMC cmd time
-* the transfer is delayed, guesstimate max 4k as first chunk size.
-*/
-prepare_1st_chunk_for_dma(req);
-/* flush pending des

[PATCH v2 22/29] docs: iio: convert to ReST

2019-06-18 Thread Mauro Carvalho Chehab
Rename the iio documentation files to ReST, add an
index for them and adjust in order to produce a nice html
output via the Sphinx build system.

At its new index.rst, let's add a :orphan: while this is not linked to
the main index.rst file, in order to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab 
Acked-by: Jonathan Cameron 
---
 .../iio/{ep93xx_adc.txt => ep93xx_adc.rst}| 15 +-
 .../{iio_configfs.txt => iio_configfs.rst}| 52 +++
 Documentation/iio/index.rst   | 12 +
 drivers/iio/Kconfig   |  2 +-
 4 files changed, 56 insertions(+), 25 deletions(-)
 rename Documentation/iio/{ep93xx_adc.txt => ep93xx_adc.rst} (71%)
 rename Documentation/iio/{iio_configfs.txt => iio_configfs.rst} (73%)
 create mode 100644 Documentation/iio/index.rst

diff --git a/Documentation/iio/ep93xx_adc.txt b/Documentation/iio/ep93xx_adc.rst
similarity index 71%
rename from Documentation/iio/ep93xx_adc.txt
rename to Documentation/iio/ep93xx_adc.rst
index 23053e7817bd..4fd8dea3f6b8 100644
--- a/Documentation/iio/ep93xx_adc.txt
+++ b/Documentation/iio/ep93xx_adc.rst
@@ -1,12 +1,16 @@
-Cirrus Logic EP93xx ADC driver.
+==
+Cirrus Logic EP93xx ADC driver
+==
 
 1. Overview
+===
 
 The driver is intended to work on both low-end (EP9301, EP9302) devices with
 5-channel ADC and high-end (EP9307, EP9312, EP9315) devices with 10-channel
 touchscreen/ADC module.
 
 2. Channel numbering
+
 
 Numbering scheme for channels 0..4 is defined in EP9301 and EP9302 datasheets.
 EP9307, EP9312 and EP9312 have 3 channels more (total 8), but the numbering is
@@ -17,13 +21,20 @@ Assuming ep93xx_adc is IIO device0, you'd find the 
following entries under
 
   +-+---+
   | sysfs entry | ball/pin name |
-  +-+---+
+  +=+===+
   | in_voltage0_raw | YM|
+  +-+---+
   | in_voltage1_raw | SXP   |
+  +-+---+
   | in_voltage2_raw | SXM   |
+  +-+---+
   | in_voltage3_raw | SYP   |
+  +-+---+
   | in_voltage4_raw | SYM   |
+  +-+---+
   | in_voltage5_raw | XP|
+  +-+---+
   | in_voltage6_raw | XM|
+  +-+---+
   | in_voltage7_raw | YP|
   +-+---+
diff --git a/Documentation/iio/iio_configfs.txt 
b/Documentation/iio/iio_configfs.rst
similarity index 73%
rename from Documentation/iio/iio_configfs.txt
rename to Documentation/iio/iio_configfs.rst
index 4e5f101837a8..ecbfdb3afef7 100644
--- a/Documentation/iio/iio_configfs.txt
+++ b/Documentation/iio/iio_configfs.rst
@@ -1,6 +1,9 @@
+===
 Industrial IIO configfs support
+===
 
 1. Overview
+===
 
 Configfs is a filesystem-based manager of kernel objects. IIO uses some
 objects that could be easily configured using configfs (e.g.: devices,
@@ -10,20 +13,22 @@ See Documentation/filesystems/configfs/configfs.txt for 
more information
 about how configfs works.
 
 2. Usage
+
 
 In order to use configfs support in IIO we need to select it at compile
 time via CONFIG_IIO_CONFIGFS config option.
 
-Then, mount the configfs filesystem (usually under /config directory):
+Then, mount the configfs filesystem (usually under /config directory)::
 
-$ mkdir /config
-$ mount -t configfs none /config
+  $ mkdir /config
+  $ mount -t configfs none /config
 
 At this point, all default IIO groups will be created and can be accessed
 under /config/iio. Next chapters will describe available IIO configuration
 objects.
 
 3. Software triggers
+
 
 One of the IIO default configfs groups is the "triggers" group. It is
 automagically accessible when the configfs is mounted and can be found
@@ -31,40 +36,40 @@ under /config/iio/triggers.
 
 IIO software triggers implementation offers support for creating multiple
 trigger types. A new trigger type is usually implemented as a separate
-kernel module following the interface in include/linux/iio/sw_trigger.h:
+kernel module following the interface in include/linux/iio/sw_trigger.h::
 
-/*
- * drivers/iio/trigger/iio-trig-sample.c
- * sample kernel module implementing a new trigger type
- */
-#include 
+  /*
+   * drivers/iio/trigger/iio-trig-sample.c
+   * sample kernel module implementing a new trigger type
+   */
+  #include 
 
 
-static struct iio_sw_trigger *iio_trig_sample_probe(const char *name)
-{
+  static struct iio_sw_trigger *iio_trig_sample_probe(const char *name)
+  {
/*
 * This allocates and registers an IIO trigger plus other
 * trigger type specific initialization.
 */
-}
+  }
 
-static int iio_trig_hrtimer_remove

[PATCH v2 15/29] docs: phy: convert samsung-usb2.txt to ReST format

2019-06-18 Thread Mauro Carvalho Chehab
In order to merge it into a Sphinx book, we need first to
convert to ReST.

While this is not part of any book, mark it as :orphan:, in order
to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab 
---
 .../{samsung-usb2.txt => samsung-usb2.rst}| 62 ++-
 MAINTAINERS   |  2 +-
 2 files changed, 34 insertions(+), 30 deletions(-)
 rename Documentation/phy/{samsung-usb2.txt => samsung-usb2.rst} (77%)

diff --git a/Documentation/phy/samsung-usb2.txt 
b/Documentation/phy/samsung-usb2.rst
similarity index 77%
rename from Documentation/phy/samsung-usb2.txt
rename to Documentation/phy/samsung-usb2.rst
index ed12d437189d..98b5952fcb97 100644
--- a/Documentation/phy/samsung-usb2.txt
+++ b/Documentation/phy/samsung-usb2.rst
@@ -1,9 +1,11 @@
-.--+
-|  Samsung USB 2.0 PHY adaptation layer   |
-+-+'
+:orphan:
 
-| 1. Description
-+
+
+Samsung USB 2.0 PHY adaptation layer
+
+
+1. Description
+--
 
 The architecture of the USB 2.0 PHY module in Samsung SoCs is similar
 among many SoCs. In spite of the similarities it proved difficult to
@@ -14,8 +16,8 @@ the PHY powering up process had to be altered. This 
adaptation layer is
 a compromise between having separate drivers and having a single driver
 with added support for many special cases.
 
-| 2. Files description
-+--
+2. Files description
+
 
 - phy-samsung-usb2.c
This is the main file of the adaptation layer. This file contains
@@ -32,44 +34,45 @@ with added support for many special cases.
driver. In addition it should contain extern declarations for
structures that describe particular SoCs.
 
-| 3. Supporting SoCs
-+
+3. Supporting SoCs
+--
 
 To support a new SoC a new file should be added to the drivers/phy
 directory. Each SoC's configuration is stored in an instance of the
-struct samsung_usb2_phy_config.
+struct samsung_usb2_phy_config::
 
-struct samsung_usb2_phy_config {
+  struct samsung_usb2_phy_config {
const struct samsung_usb2_common_phy *phys;
int (*rate_to_clk)(unsigned long, u32 *);
unsigned int num_phys;
bool has_mode_switch;
-};
+  };
 
-The num_phys is the number of phys handled by the driver. *phys is an
+The num_phys is the number of phys handled by the driver. `*phys` is an
 array that contains the configuration for each phy. The has_mode_switch
 property is a boolean flag that determines whether the SoC has USB host
 and device on a single pair of pins. If so, a special register has to
 be modified to change the internal routing of these pins between a USB
 device or host module.
 
-For example the configuration for Exynos 4210 is following:
+For example the configuration for Exynos 4210 is following::
 
-const struct samsung_usb2_phy_config exynos4210_usb2_phy_config = {
+  const struct samsung_usb2_phy_config exynos4210_usb2_phy_config = {
.has_mode_switch= 0,
.num_phys   = EXYNOS4210_NUM_PHYS,
.phys   = exynos4210_phys,
.rate_to_clk= exynos4210_rate_to_clk,
-}
+  }
+
+- `int (*rate_to_clk)(unsigned long, u32 *)`
 
-- int (*rate_to_clk)(unsigned long, u32 *)
The rate_to_clk callback is to convert the rate of the clock
used as the reference clock for the PHY module to the value
that should be written in the hardware register.
 
-The exynos4210_phys configuration array is as follows:
+The exynos4210_phys configuration array is as follows::
 
-static const struct samsung_usb2_common_phy exynos4210_phys[] = {
+  static const struct samsung_usb2_common_phy exynos4210_phys[] = {
{
.label  = "device",
.id = EXYNOS4210_DEVICE,
@@ -95,29 +98,30 @@ static const struct samsung_usb2_common_phy 
exynos4210_phys[] = {
.power_off  = exynos4210_power_off,
},
{},
-};
+  };
+
+- `int (*power_on)(struct samsung_usb2_phy_instance *);`
+  `int (*power_off)(struct samsung_usb2_phy_instance *);`
 
-- int (*power_on)(struct samsung_usb2_phy_instance *);
-- int (*power_off)(struct samsung_usb2_phy_instance *);
These two callbacks are used to power on and power off the phy
by modifying appropriate registers.
 
 Final change to the driver is adding appropriate compatible value to the
 phy-samsung-usb2.c file. In case of Exynos 4210 the following lines were
-added to the struct of_device_id samsung_usb2_phy_of_match[] array:
+added to the struct of_device_id samsung_usb2_phy_of_match[] array::
 
-#ifdef CONFIG_PHY_EXYNOS4210_USB2
+  #ifdef CONFIG_PHY_EXYNOS4210_USB2
{
.compati

[PATCH v2 27/29] docs: nvdimm: convert to ReST

2019-06-18 Thread Mauro Carvalho Chehab
Rename the nvdimm documentation files to ReST, add an
index for them and adjust in order to produce a nice html
output via the Sphinx build system.

At its new index.rst, let's add a :orphan: while this is not linked to
the main index.rst file, in order to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/nvdimm/{btt.txt => btt.rst} | 140 ++---
 Documentation/nvdimm/index.rst|  12 +
 .../nvdimm/{nvdimm.txt => nvdimm.rst} | 518 ++
 .../nvdimm/{security.txt => security.rst} |   4 +-
 drivers/nvdimm/Kconfig|   2 +-
 5 files changed, 387 insertions(+), 289 deletions(-)
 rename Documentation/nvdimm/{btt.txt => btt.rst} (71%)
 create mode 100644 Documentation/nvdimm/index.rst
 rename Documentation/nvdimm/{nvdimm.txt => nvdimm.rst} (60%)
 rename Documentation/nvdimm/{security.txt => security.rst} (99%)

diff --git a/Documentation/nvdimm/btt.txt b/Documentation/nvdimm/btt.rst
similarity index 71%
rename from Documentation/nvdimm/btt.txt
rename to Documentation/nvdimm/btt.rst
index e293fb664924..2d8269f834bd 100644
--- a/Documentation/nvdimm/btt.txt
+++ b/Documentation/nvdimm/btt.rst
@@ -1,9 +1,10 @@
+=
 BTT - Block Translation Table
 =
 
 
 1. Introduction

+===
 
 Persistent memory based storage is able to perform IO at byte (or more
 accurately, cache line) granularity. However, we often want to expose such
@@ -25,7 +26,7 @@ provides atomic sector updates.
 
 
 2. Static Layout
-
+
 
 The underlying storage on which a BTT can be laid out is not limited in any 
way.
 The BTT, however, splits the available space into chunks of up to 512 GiB,
@@ -33,43 +34,43 @@ called "Arenas".
 
 Each arena follows the same layout for its metadata, and all references in an
 arena are internal to it (with the exception of one field that points to the
-next arena). The following depicts the "On-disk" metadata layout:
+next arena). The following depicts the "On-disk" metadata layout::
 
 
-  Backing Store +--->  Arena
-+---+   |   +--+
-|   |   |   | Arena info block |
-|Arena 0+---+   |   4K |
-| 512G  |   +--+
-|   |   |  |
-+---+   |  |
-|   |   |  |
-|Arena 1|   |   Data Blocks|
-| 512G  |   |  |
-|   |   |  |
-+---+   |  |
-|   .   |   |  |
-|   .   |   |  |
-|   .   |   |  |
-|   |   |  |
-|   |   |  |
-+---+   +--+
-|  |
-| BTT Map  |
-|  |
-|  |
-+--+
-|  |
-| BTT Flog |
-|  |
-+--+
-| Info block copy  |
-|   4K |
-+--+
+Backing Store +--->  Arena
+  +---+   |   +--+
+  |   |   |   | Arena info block |
+  |Arena 0+---+   |   4K |
+  | 512G  |   +--+
+  |   |   |  |
+  +---+   |  |
+  |   |   |  |
+  |Arena 1|   |   Data Blocks|
+  | 512G  |   |  |
+  |   |   |  |
+  +---+   |  |
+  |   .   |   |  |
+  |   .   |   |  |
+  |   .   |   |  |
+  |   |   |  |
+  |   |   |  |
+  +---+   +--+
+  |  |
+  | BTT Map  |
+  |  |
+  |  |
+  +--+
+  |  |
+  | BTT Flog |
+  |  |
+  +--+
+  | Info block copy  |
+  |   4K |
+  +--+
 
 
 3. Theory of Operation
---
+==
 
 
 a

[PATCH v2 23/29] docs: namespaces: convert to ReST

2019-06-18 Thread Mauro Carvalho Chehab
Rename the namespaces documentation files to ReST, add an
index for them and adjust in order to produce a nice html
output via the Sphinx build system.

There are two upper case file names. Rename them to
lower case, as we're working to avoid upper case file
names at Documentation.

At its new index.rst, let's add a :orphan: while this is not linked to
the main index.rst file, in order to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab 
---
 ...{compatibility-list.txt => compatibility-list.rst} | 10 +++---
 Documentation/namespaces/index.rst| 11 +++
 .../{resource-control.txt => resource-control.rst}|  4 
 3 files changed, 22 insertions(+), 3 deletions(-)
 rename Documentation/namespaces/{compatibility-list.txt => 
compatibility-list.rst} (86%)
 create mode 100644 Documentation/namespaces/index.rst
 rename Documentation/namespaces/{resource-control.txt => resource-control.rst} 
(89%)

diff --git a/Documentation/namespaces/compatibility-list.txt 
b/Documentation/namespaces/compatibility-list.rst
similarity index 86%
rename from Documentation/namespaces/compatibility-list.txt
rename to Documentation/namespaces/compatibility-list.rst
index defc5589bfcd..318800b2a943 100644
--- a/Documentation/namespaces/compatibility-list.txt
+++ b/Documentation/namespaces/compatibility-list.rst
@@ -1,4 +1,6 @@
-   Namespaces compatibility list
+=
+Namespaces compatibility list
+=
 
 This document contains the information about the problems user
 may have when creating tasks living in different namespaces.
@@ -7,13 +9,16 @@ Here's the summary. This matrix shows the known problems, that
 occur when tasks share some namespace (the columns) while living
 in different other namespaces (the rows):
 
-   UTS IPC VFS PID UserNet
+   === === === === ===
+-  UTS IPC VFS PID UserNet
+   === === === === ===
 UTS X
 IPC X   1
 VFS X
 PID 1   1   X
 User2   2   X
 Net X
+   === === === === ===
 
 1. Both the IPC and the PID namespaces provide IDs to address
object inside the kernel. E.g. semaphore with IPCID or
@@ -36,4 +41,3 @@ NetX
even having equal UIDs.
 
But currently this is not so.
-
diff --git a/Documentation/namespaces/index.rst 
b/Documentation/namespaces/index.rst
new file mode 100644
index ..bf40625dd11a
--- /dev/null
+++ b/Documentation/namespaces/index.rst
@@ -0,0 +1,11 @@
+:orphan:
+
+==
+Namespaces
+==
+
+.. toctree::
+   :maxdepth: 1
+
+   compatibility-list
+   resource-control
diff --git a/Documentation/namespaces/resource-control.txt 
b/Documentation/namespaces/resource-control.rst
similarity index 89%
rename from Documentation/namespaces/resource-control.txt
rename to Documentation/namespaces/resource-control.rst
index abc13c394738..369556e00f0c 100644
--- a/Documentation/namespaces/resource-control.txt
+++ b/Documentation/namespaces/resource-control.rst
@@ -1,3 +1,7 @@
+===
+Namespaces research control
+===
+
 There are a lot of kinds of objects in the kernel that don't have
 individual limits or that have limits that are ineffective when a set
 of processes is allowed to switch user ids.  With user namespaces
-- 
2.21.0



[PATCH v2 11/29] docs: memory-devices: convert ti-emif.txt to ReST

2019-06-18 Thread Mauro Carvalho Chehab
Prepare this file to be moved to a kernel book by converting
it to ReST format and renaming it to ti-emif.rst.

While this is not part of any book, mark it as :orphan:, in order
to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab 
---
 .../{ti-emif.txt => ti-emif.rst}  | 27 ---
 1 file changed, 17 insertions(+), 10 deletions(-)
 rename Documentation/memory-devices/{ti-emif.txt => ti-emif.rst} (81%)

diff --git a/Documentation/memory-devices/ti-emif.txt 
b/Documentation/memory-devices/ti-emif.rst
similarity index 81%
rename from Documentation/memory-devices/ti-emif.txt
rename to Documentation/memory-devices/ti-emif.rst
index f4ad9a7d0f4b..c9242294e63c 100644
--- a/Documentation/memory-devices/ti-emif.txt
+++ b/Documentation/memory-devices/ti-emif.rst
@@ -1,20 +1,24 @@
-TI EMIF SDRAM Controller Driver:
+:orphan:
+
+===
+TI EMIF SDRAM Controller Driver
+===
 
 Author
-
+==
 Aneesh V 
 
 Location
-
+
 driver/memory/emif.c
 
 Supported SoCs:
-===
+===
 TI OMAP44xx
 TI OMAP54xx
 
 Menuconfig option:
-==
+==
 Device Drivers
Memory devices
Texas Instruments EMIF driver
@@ -29,10 +33,11 @@ functions of the driver includes re-configuring AC timing
 parameters and other settings during frequency, voltage and
 temperature changes
 
-Platform Data (see include/linux/platform_data/emif_plat.h):
-=
+Platform Data (see include/linux/platform_data/emif_plat.h)
+===
 DDR device details and other board dependent and SoC dependent
 information can be passed through platform data (struct emif_platform_data)
+
 - DDR device details: 'struct ddr_device_info'
 - Device AC timings: 'struct lpddr2_timings' and 'struct lpddr2_min_tck'
 - Custom configurations: customizable policy options through
@@ -40,17 +45,19 @@ information can be passed through platform data (struct 
emif_platform_data)
 - IP revision
 - PHY type
 
-Interface to the external world:
-
+Interface to the external world
+===
 EMIF driver registers notifiers for voltage and frequency changes
 affecting EMIF and takes appropriate actions when these are invoked.
+
 - freq_pre_notify_handling()
 - freq_post_notify_handling()
 - volt_notify_handling()
 
 Debugfs
-
+===
 The driver creates two debugfs entries per device.
+
 - regcache_dump : dump of register values calculated and saved for all
   frequencies used so far.
 - mr4 : last polled value of MR4 register in the LPDDR2 device. MR4
-- 
2.21.0



[PATCH v2 14/29] docs: nvmem: convert docs to ReST and rename to *.rst

2019-06-18 Thread Mauro Carvalho Chehab
In order to be able to add it into a doc book, we need first
convert it to ReST.

The conversion is actually:
  - add blank lines and identation in order to identify paragraphs;
  - mark literal blocks;
  - adjust title markups.

While this is not part of any book, mark it as :orphan:, in order
to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/nvmem/{nvmem.txt => nvmem.rst} | 112 ++-
 1 file changed, 59 insertions(+), 53 deletions(-)
 rename Documentation/nvmem/{nvmem.txt => nvmem.rst} (62%)

diff --git a/Documentation/nvmem/nvmem.txt b/Documentation/nvmem/nvmem.rst
similarity index 62%
rename from Documentation/nvmem/nvmem.txt
rename to Documentation/nvmem/nvmem.rst
index fc2fe4b18655..3866b6e066d5 100644
--- a/Documentation/nvmem/nvmem.txt
+++ b/Documentation/nvmem/nvmem.rst
@@ -1,5 +1,10 @@
-   NVMEM SUBSYSTEM
- Srinivas Kandagatla 
+:orphan:
+
+===
+NVMEM Subsystem
+===
+
+ Srinivas Kandagatla 
 
 This document explains the NVMEM Framework along with the APIs provided,
 and how to use it.
@@ -40,54 +45,54 @@ nvmem_device pointer.
 
 nvmem_unregister(nvmem) is used to unregister a previously registered provider.
 
-For example, a simple qfprom case:
+For example, a simple qfprom case::
 
-static struct nvmem_config econfig = {
+  static struct nvmem_config econfig = {
.name = "qfprom",
.owner = THIS_MODULE,
-};
+  };
 
-static int qfprom_probe(struct platform_device *pdev)
-{
+  static int qfprom_probe(struct platform_device *pdev)
+  {
...
econfig.dev = &pdev->dev;
nvmem = nvmem_register(&econfig);
...
-}
+  }
 
 It is mandatory that the NVMEM provider has a regmap associated with its
 struct device. Failure to do would return error code from nvmem_register().
 
 Users of board files can define and register nvmem cells using the
-nvmem_cell_table struct:
+nvmem_cell_table struct::
 
-static struct nvmem_cell_info foo_nvmem_cells[] = {
+  static struct nvmem_cell_info foo_nvmem_cells[] = {
{
.name   = "macaddr",
.offset = 0x7f00,
.bytes  = ETH_ALEN,
}
-};
+  };
 
-static struct nvmem_cell_table foo_nvmem_cell_table = {
+  static struct nvmem_cell_table foo_nvmem_cell_table = {
.nvmem_name = "i2c-eeprom",
.cells  = foo_nvmem_cells,
.ncells = ARRAY_SIZE(foo_nvmem_cells),
-};
+  };
 
-nvmem_add_cell_table(&foo_nvmem_cell_table);
+  nvmem_add_cell_table(&foo_nvmem_cell_table);
 
 Additionally it is possible to create nvmem cell lookup entries and register
-them with the nvmem framework from machine code as shown in the example below:
+them with the nvmem framework from machine code as shown in the example below::
 
-static struct nvmem_cell_lookup foo_nvmem_lookup = {
+  static struct nvmem_cell_lookup foo_nvmem_lookup = {
.nvmem_name = "i2c-eeprom",
.cell_name  = "macaddr",
.dev_id = "foo_mac.0",
.con_id = "mac-address",
-};
+  };
 
-nvmem_add_cell_lookups(&foo_nvmem_lookup, 1);
+  nvmem_add_cell_lookups(&foo_nvmem_lookup, 1);
 
 NVMEM Consumers
 +++
@@ -99,43 +104,43 @@ read from and to NVMEM.
 =
 
 NVMEM cells are the data entries/fields in the NVMEM.
-The NVMEM framework provides 3 APIs to read/write NVMEM cells.
+The NVMEM framework provides 3 APIs to read/write NVMEM cells::
 
-struct nvmem_cell *nvmem_cell_get(struct device *dev, const char *name);
-struct nvmem_cell *devm_nvmem_cell_get(struct device *dev, const char *name);
+  struct nvmem_cell *nvmem_cell_get(struct device *dev, const char *name);
+  struct nvmem_cell *devm_nvmem_cell_get(struct device *dev, const char *name);
 
-void nvmem_cell_put(struct nvmem_cell *cell);
-void devm_nvmem_cell_put(struct device *dev, struct nvmem_cell *cell);
+  void nvmem_cell_put(struct nvmem_cell *cell);
+  void devm_nvmem_cell_put(struct device *dev, struct nvmem_cell *cell);
 
-void *nvmem_cell_read(struct nvmem_cell *cell, ssize_t *len);
-int nvmem_cell_write(struct nvmem_cell *cell, void *buf, ssize_t len);
+  void *nvmem_cell_read(struct nvmem_cell *cell, ssize_t *len);
+  int nvmem_cell_write(struct nvmem_cell *cell, void *buf, ssize_t len);
 
-*nvmem_cell_get() apis will get a reference to nvmem cell for a given id,
+`*nvmem_cell_get()` apis will get a reference to nvmem cell for a given id,
 and nvmem_cell_read/write() can then read or write to the cell.
-Once the usage of the cell is finished the consumer should call 
*nvmem_cell_put()
-to free all the allocation memory for the cell.
+Once the usage of the cell is finished the consumer should call
+`*nvmem_cell_put()` to free all the allocation memory for the cell.
 
 4. Direct NVMEM device based consumer APIs
 ==
 
 In some in

[PATCH v1 10/22] docs: security: move some books to it and update

2019-06-18 Thread Mauro Carvalho Chehab
The following files belong to security:

  Documentation/security/LSM.rst -> Documentation/security/lsm-development.rst
  Documentation/lsm.txt -> Documentation/security/lsm.rst
  Documentation/SAK.txt -> Documentation/security/sak.rst
  Documentation/siphash.txt -> Documentation/security/siphash.rst

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/security/index.rst| 5 -
 Documentation/security/{LSM.rst => lsm-development.rst} | 0
 Documentation/{ => security}/lsm.rst| 2 --
 Documentation/{SAK.rst => security/sak.rst} | 2 --
 Documentation/{ => security}/siphash.rst| 2 --
 Documentation/security/tpm/index.rst| 1 +
 Documentation/security/tpm/xen-tpmfront.rst | 2 --
 7 files changed, 5 insertions(+), 9 deletions(-)
 rename Documentation/security/{LSM.rst => lsm-development.rst} (100%)
 rename Documentation/{ => security}/lsm.rst (99%)
 rename Documentation/{SAK.rst => security/sak.rst} (99%)
 rename Documentation/{ => security}/siphash.rst (99%)

diff --git a/Documentation/security/index.rst b/Documentation/security/index.rst
index aad6d92ffe31..fc503dd689a7 100644
--- a/Documentation/security/index.rst
+++ b/Documentation/security/index.rst
@@ -8,7 +8,10 @@ Security Documentation
credentials
IMA-templates
keys/index
-   LSM
+   lsm
+   lsm-development
+   sak
SCTP
self-protection
+   siphash
tpm/index
diff --git a/Documentation/security/LSM.rst 
b/Documentation/security/lsm-development.rst
similarity index 100%
rename from Documentation/security/LSM.rst
rename to Documentation/security/lsm-development.rst
diff --git a/Documentation/lsm.rst b/Documentation/security/lsm.rst
similarity index 99%
rename from Documentation/lsm.rst
rename to Documentation/security/lsm.rst
index 4f0b1a6ea76c..ad4dfd020e0d 100644
--- a/Documentation/lsm.rst
+++ b/Documentation/security/lsm.rst
@@ -1,5 +1,3 @@
-:orphan:
-
 
 Linux Security Modules: General Security Hooks for Linux
 
diff --git a/Documentation/SAK.rst b/Documentation/security/sak.rst
similarity index 99%
rename from Documentation/SAK.rst
rename to Documentation/security/sak.rst
index 73dd10fa4337..64e667da93e0 100644
--- a/Documentation/SAK.rst
+++ b/Documentation/security/sak.rst
@@ -1,5 +1,3 @@
-:orphan:
-
 =
 Linux Secure Attention Key (SAK) handling
 =
diff --git a/Documentation/siphash.rst b/Documentation/security/siphash.rst
similarity index 99%
rename from Documentation/siphash.rst
rename to Documentation/security/siphash.rst
index 833eef3a7956..9965821ab333 100644
--- a/Documentation/siphash.rst
+++ b/Documentation/security/siphash.rst
@@ -1,5 +1,3 @@
-:orphan:
-
 ===
 SipHash - a short input PRF
 ===
diff --git a/Documentation/security/tpm/index.rst 
b/Documentation/security/tpm/index.rst
index af77a7bbb070..3296533e54cf 100644
--- a/Documentation/security/tpm/index.rst
+++ b/Documentation/security/tpm/index.rst
@@ -5,3 +5,4 @@ Trusted Platform Module documentation
 .. toctree::
 
tpm_vtpm_proxy
+   xen-tpmfront
diff --git a/Documentation/security/tpm/xen-tpmfront.rst 
b/Documentation/security/tpm/xen-tpmfront.rst
index 98a16ab87360..00d5b1db227d 100644
--- a/Documentation/security/tpm/xen-tpmfront.rst
+++ b/Documentation/security/tpm/xen-tpmfront.rst
@@ -1,5 +1,3 @@
-:orphan:
-
 =
 Virtual TPM interface for Xen
 =
-- 
2.21.0



[PATCH v1 05/22] docs: rapidio: convert to ReST

2019-06-18 Thread Mauro Carvalho Chehab
Rename the rapidio documentation files to ReST, add an
index for them and adjust in order to produce a nice html
output via the Sphinx build system.

At its new index.rst, let's add a :orphan: while this is not linked to
the main index.rst file, in order to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/rapidio/index.rst   | 15 +
 .../{mport_cdev.txt => mport_cdev.rst}| 47 ++---
 .../rapidio/{rapidio.txt => rapidio.rst}  | 39 +++
 .../rapidio/{rio_cm.txt => rio_cm.rst}| 66 ---
 .../rapidio/{sysfs.txt => sysfs.rst}  |  4 ++
 .../rapidio/{tsi721.txt => tsi721.rst}| 45 -
 drivers/rapidio/Kconfig   |  2 +-
 7 files changed, 141 insertions(+), 77 deletions(-)
 create mode 100644 Documentation/rapidio/index.rst
 rename Documentation/rapidio/{mport_cdev.txt => mport_cdev.rst} (84%)
 rename Documentation/rapidio/{rapidio.txt => rapidio.rst} (97%)
 rename Documentation/rapidio/{rio_cm.txt => rio_cm.rst} (76%)
 rename Documentation/rapidio/{sysfs.txt => sysfs.rst} (75%)
 rename Documentation/rapidio/{tsi721.txt => tsi721.rst} (79%)

diff --git a/Documentation/rapidio/index.rst b/Documentation/rapidio/index.rst
new file mode 100644
index ..ab7b5541b346
--- /dev/null
+++ b/Documentation/rapidio/index.rst
@@ -0,0 +1,15 @@
+:orphan:
+
+===
+The Linux RapidIO Subsystem
+===
+
+.. toctree::
+   :maxdepth: 1
+
+   rapidio
+   sysfs
+
+   tsi721
+   mport_cdev
+   rio_cm
diff --git a/Documentation/rapidio/mport_cdev.txt 
b/Documentation/rapidio/mport_cdev.rst
similarity index 84%
rename from Documentation/rapidio/mport_cdev.txt
rename to Documentation/rapidio/mport_cdev.rst
index a53f786ee2e9..df77a7f7be7d 100644
--- a/Documentation/rapidio/mport_cdev.txt
+++ b/Documentation/rapidio/mport_cdev.rst
@@ -1,13 +1,9 @@
+==
 RapidIO subsystem mport character device driver (rio_mport_cdev.c)
 ==
 
-Version History:
-
-  1.0.0 - Initial driver release.
-
-==
-
-I. Overview
+1. Overview
+===
 
 This device driver is the result of collaboration within the RapidIO.org
 Software Task Group (STG) between Texas Instruments, Freescale,
@@ -29,40 +25,41 @@ Using available set of ioctl commands user-space 
applications can perform
 following RapidIO bus and subsystem operations:
 
 - Reads and writes from/to configuration registers of mport devices
-(RIO_MPORT_MAINT_READ_LOCAL/RIO_MPORT_MAINT_WRITE_LOCAL)
+  (RIO_MPORT_MAINT_READ_LOCAL/RIO_MPORT_MAINT_WRITE_LOCAL)
 - Reads and writes from/to configuration registers of remote RapidIO devices.
   This operations are defined as RapidIO Maintenance reads/writes in RIO spec.
-(RIO_MPORT_MAINT_READ_REMOTE/RIO_MPORT_MAINT_WRITE_REMOTE)
+  (RIO_MPORT_MAINT_READ_REMOTE/RIO_MPORT_MAINT_WRITE_REMOTE)
 - Set RapidIO Destination ID for mport devices (RIO_MPORT_MAINT_HDID_SET)
 - Set RapidIO Component Tag for mport devices (RIO_MPORT_MAINT_COMPTAG_SET)
 - Query logical index of mport devices (RIO_MPORT_MAINT_PORT_IDX_GET)
 - Query capabilities and RapidIO link configuration of mport devices
-(RIO_MPORT_GET_PROPERTIES)
+  (RIO_MPORT_GET_PROPERTIES)
 - Enable/Disable reporting of RapidIO doorbell events to user-space 
applications
-(RIO_ENABLE_DOORBELL_RANGE/RIO_DISABLE_DOORBELL_RANGE)
+  (RIO_ENABLE_DOORBELL_RANGE/RIO_DISABLE_DOORBELL_RANGE)
 - Enable/Disable reporting of RIO port-write events to user-space applications
-(RIO_ENABLE_PORTWRITE_RANGE/RIO_DISABLE_PORTWRITE_RANGE)
+  (RIO_ENABLE_PORTWRITE_RANGE/RIO_DISABLE_PORTWRITE_RANGE)
 - Query/Control type of events reported through this driver: doorbells,
   port-writes or both (RIO_SET_EVENT_MASK/RIO_GET_EVENT_MASK)
 - Configure/Map mport's outbound requests window(s) for specific size,
   RapidIO destination ID, hopcount and request type
-(RIO_MAP_OUTBOUND/RIO_UNMAP_OUTBOUND)
+  (RIO_MAP_OUTBOUND/RIO_UNMAP_OUTBOUND)
 - Configure/Map mport's inbound requests window(s) for specific size,
   RapidIO base address and local memory base address
-(RIO_MAP_INBOUND/RIO_UNMAP_INBOUND)
+  (RIO_MAP_INBOUND/RIO_UNMAP_INBOUND)
 - Allocate/Free contiguous DMA coherent memory buffer for DMA data transfers
   to/from remote RapidIO devices (RIO_ALLOC_DMA/RIO_FREE_DMA)
 - Initiate DMA data transfers to/from remote RapidIO devices (RIO_TRANSFER).
   Supports blocking, asynchronous and posted (a.k.a 'fire-and-forget') data
   transfer modes.
 - Check/Wait for completion of asynchronous DMA data transfer
-(RIO_WAIT_FOR_ASYNC)
+  (RIO_WAIT_FOR_ASYNC)
 - Manage device objects supported by RapidIO subsystem 
(RIO_DEV_ADD/RIO_DEV_DEL).
   This allows implementation of various RapidIO fabric enumeration algorithms
   as user-spa

[PATCH v1 19/22] docs: driver-api: add remaining converted dirs to it

2019-06-18 Thread Mauro Carvalho Chehab
There are a number of driver-specific descriptions that contain a
mix of userspace and kernelspace documentation. Just like we did
with other similar subsystems, add them at the driver-api
groupset, but don't move the directories.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/index.rst| 3 +++
 Documentation/mic/index.rst| 2 --
 Documentation/phy/samsung-usb2.rst | 2 --
 Documentation/scheduler/index.rst  | 2 --
 4 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/Documentation/index.rst b/Documentation/index.rst
index 82cd9528dff0..b4a48979e15a 100644
--- a/Documentation/index.rst
+++ b/Documentation/index.rst
@@ -105,6 +105,9 @@ needed).
PCI/index
usb/index
misc-devices/index
+   mic/index
+   phy/samsung-usb2
+   scheduler/index
 
 Architecture-specific documentation
 ---
diff --git a/Documentation/mic/index.rst b/Documentation/mic/index.rst
index 082fa8f6a260..3a8d06367ef1 100644
--- a/Documentation/mic/index.rst
+++ b/Documentation/mic/index.rst
@@ -1,5 +1,3 @@
-:orphan:
-
 =
 Intel Many Integrated Core (MIC) architecture
 =
diff --git a/Documentation/phy/samsung-usb2.rst 
b/Documentation/phy/samsung-usb2.rst
index 98b5952fcb97..c48c8b9797b9 100644
--- a/Documentation/phy/samsung-usb2.rst
+++ b/Documentation/phy/samsung-usb2.rst
@@ -1,5 +1,3 @@
-:orphan:
-
 
 Samsung USB 2.0 PHY adaptation layer
 
diff --git a/Documentation/scheduler/index.rst 
b/Documentation/scheduler/index.rst
index 058be77a4c34..69074e5de9c4 100644
--- a/Documentation/scheduler/index.rst
+++ b/Documentation/scheduler/index.rst
@@ -1,5 +1,3 @@
-:orphan:
-
 ===
 Linux Scheduler
 ===
-- 
2.21.0



[PATCH v1 18/22] docs: admin-guide: move sysctl directory to it

2019-06-18 Thread Mauro Carvalho Chehab
The stuff under sysctl describes /sys interface from userspace
point of view. So, add it to the admin-guide and remove the
:orphan: from its index file.

Signed-off-by: Mauro Carvalho Chehab 
---
 CREDITS   | 2 +-
 Documentation/admin-guide/index.rst   | 1 +
 Documentation/admin-guide/kernel-parameters.txt   | 2 +-
 Documentation/admin-guide/mm/index.rst| 2 +-
 Documentation/admin-guide/mm/ksm.rst  | 2 +-
 Documentation/{ => admin-guide}/sysctl/abi.rst| 0
 Documentation/{ => admin-guide}/sysctl/fs.rst | 0
 Documentation/{ => admin-guide}/sysctl/index.rst  | 2 --
 Documentation/{ => admin-guide}/sysctl/kernel.rst | 0
 Documentation/{ => admin-guide}/sysctl/net.rst| 0
 Documentation/{ => admin-guide}/sysctl/sunrpc.rst | 0
 Documentation/{ => admin-guide}/sysctl/user.rst   | 0
 Documentation/{ => admin-guide}/sysctl/vm.rst | 0
 Documentation/core-api/printk-formats.rst | 2 +-
 Documentation/filesystems/proc.txt| 2 +-
 Documentation/networking/ip-sysctl.txt| 2 +-
 Documentation/vm/unevictable-lru.rst  | 2 +-
 fs/proc/Kconfig   | 2 +-
 kernel/panic.c| 2 +-
 mm/swap.c | 2 +-
 20 files changed, 12 insertions(+), 13 deletions(-)
 rename Documentation/{ => admin-guide}/sysctl/abi.rst (100%)
 rename Documentation/{ => admin-guide}/sysctl/fs.rst (100%)
 rename Documentation/{ => admin-guide}/sysctl/index.rst (99%)
 rename Documentation/{ => admin-guide}/sysctl/kernel.rst (100%)
 rename Documentation/{ => admin-guide}/sysctl/net.rst (100%)
 rename Documentation/{ => admin-guide}/sysctl/sunrpc.rst (100%)
 rename Documentation/{ => admin-guide}/sysctl/user.rst (100%)
 rename Documentation/{ => admin-guide}/sysctl/vm.rst (100%)

diff --git a/CREDITS b/CREDITS
index 681335f42491..652480755300 100644
--- a/CREDITS
+++ b/CREDITS
@@ -3120,7 +3120,7 @@ S: France
 N: Rik van Riel
 E: r...@redhat.com
 W: http://www.surriel.com/
-D: Linux-MM site, Documentation/sysctl/*, swap/mm readaround
+D: Linux-MM site, Documentation/admin-guide/sysctl/*, swap/mm readaround
 D: kswapd fixes, random kernel hacker, rmap VM,
 D: nl.linux.org administrator, minor scheduler additions
 S: Red Hat Boston
diff --git a/Documentation/admin-guide/index.rst 
b/Documentation/admin-guide/index.rst
index ba9ff8e3b45a..5940ce8d16af 100644
--- a/Documentation/admin-guide/index.rst
+++ b/Documentation/admin-guide/index.rst
@@ -16,6 +16,7 @@ etc.
README
kernel-parameters
devices
+   sysctl/index
 
 This section describes CPU vulnerabilities and their mitigations.
 
diff --git a/Documentation/admin-guide/kernel-parameters.txt 
b/Documentation/admin-guide/kernel-parameters.txt
index 2f8751323f6d..0b17312b9198 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -3159,7 +3159,7 @@
numa_zonelist_order= [KNL, BOOT] Select zonelist order for NUMA.
'node', 'default' can be specified
This can be set from sysctl after boot.
-   See Documentation/sysctl/vm.rst for details.
+   See Documentation/admin-guide/sysctl/vm.rst for details.
 
ohci1394_dma=early  [HW] enable debugging via the ohci1394 driver.
See Documentation/driver-api/debugging-via-ohci1394.rst 
for more
diff --git a/Documentation/admin-guide/mm/index.rst 
b/Documentation/admin-guide/mm/index.rst
index f5e92f33f96e..5f61a6c429e0 100644
--- a/Documentation/admin-guide/mm/index.rst
+++ b/Documentation/admin-guide/mm/index.rst
@@ -11,7 +11,7 @@ processes address space and many other cool things.
 Linux memory management is a complex system with many configurable
 settings. Most of these settings are available via ``/proc``
 filesystem and can be quired and adjusted using ``sysctl``. These APIs
-are described in Documentation/sysctl/vm.rst and in `man 5 proc`_.
+are described in Documentation/admin-guide/sysctl/vm.rst and in `man 5 proc`_.
 
 .. _man 5 proc: http://man7.org/linux/man-pages/man5/proc.5.html
 
diff --git a/Documentation/admin-guide/mm/ksm.rst 
b/Documentation/admin-guide/mm/ksm.rst
index 7b2b8767c0b4..874eb0c77d34 100644
--- a/Documentation/admin-guide/mm/ksm.rst
+++ b/Documentation/admin-guide/mm/ksm.rst
@@ -59,7 +59,7 @@ MADV_UNMERGEABLE is applied to a range which was never 
MADV_MERGEABLE.
 
 If a region of memory must be split into at least one new MADV_MERGEABLE
 or MADV_UNMERGEABLE region, the madvise may return ENOMEM if the process
-will exceed ``vm.max_map_count`` (see Documentation/sysctl/vm.rst).
+will exceed ``vm.max_map_count`` (see Documentation/admin-guide/sysctl/vm.rst).
 
 Like other madvise calls, they are intended for use on mapped areas of
 the user address space: they will report ENOMEM if the specified range
diff --git a/Docum

[PATCH v1 14/22] docs: usb: rename files to .rst and add them to drivers-api

2019-06-18 Thread Mauro Carvalho Chehab
While there are a mix of things here, most of the stuff
were written from Kernel developer's PoV. So, add them to
the driver-api book.

A follow up for this patch would be to move documents from
there that are specific to sysadmins, adding them to the
admin-guide.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/index.rst   |  1 +
 Documentation/usb/{acm.txt => acm.rst}|  0
 .../{authorization.txt => authorization.rst}  |  0
 .../usb/{chipidea.txt => chipidea.rst}|  0
 Documentation/usb/{dwc3.txt => dwc3.rst}  |  0
 Documentation/usb/{ehci.txt => ehci.rst}  |  0
 .../usb/{functionfs.txt => functionfs.rst}|  0
 ...{gadget-testing.txt => gadget-testing.rst} |  4 +-
 ...adget_configfs.txt => gadget_configfs.rst} |  0
 .../usb/{gadget_hid.txt => gadget_hid.rst}|  0
 .../{gadget_multi.txt => gadget_multi.rst}|  0
 ...{gadget_printer.txt => gadget_printer.rst} |  0
 .../{gadget_serial.txt => gadget_serial.rst}  |  0
 Documentation/usb/index.rst   | 39 +++
 .../usb/{iuu_phoenix.txt => iuu_phoenix.rst}  |  0
 .../{mass-storage.txt => mass-storage.rst}|  0
 ...{misc_usbsevseg.txt => misc_usbsevseg.rst} |  0
 .../usb/{mtouchusb.txt => mtouchusb.rst}  |  0
 Documentation/usb/{ohci.txt => ohci.rst}  |  0
 Documentation/usb/{rio.txt => rio.rst}|  0
 Documentation/usb/text_files.rst  | 29 ++
 .../usb/{usb-help.txt => usb-help.rst}|  0
 .../usb/{usb-serial.txt => usb-serial.rst}|  0
 ...{usbip_protocol.txt => usbip_protocol.rst} |  0
 Documentation/usb/{usbmon.txt => usbmon.rst}  |  0
 ...-overview.txt => wusb-design-overview.rst} |  0
 MAINTAINERS   | 12 +++---
 drivers/usb/Kconfig   |  2 +-
 drivers/usb/class/Kconfig |  2 +-
 drivers/usb/gadget/Kconfig|  6 +--
 drivers/usb/gadget/function/f_mass_storage.c  |  2 +-
 drivers/usb/gadget/legacy/Kconfig |  6 +--
 drivers/usb/host/Kconfig  |  2 +-
 drivers/usb/misc/Kconfig  |  2 +-
 drivers/usb/mon/Kconfig   |  2 +-
 drivers/usb/serial/Kconfig| 10 ++---
 drivers/usb/serial/belkin_sa.c|  2 +-
 drivers/usb/serial/belkin_sa.h|  2 +-
 drivers/usb/serial/cypress_m8.c   |  2 +-
 drivers/usb/serial/empeg.c|  2 +-
 drivers/usb/serial/ftdi_sio.c |  2 +-
 drivers/usb/serial/ir-usb.c   |  2 +-
 drivers/usb/serial/keyspan_pda.c  |  2 +-
 drivers/usb/serial/omninet.c  |  2 +-
 drivers/usb/serial/oti6858.c  |  2 +-
 drivers/usb/serial/pl2303.c   |  2 +-
 drivers/usb/serial/usb-serial.c   |  2 +-
 drivers/usb/serial/visor.c|  2 +-
 drivers/usb/serial/visor.h|  2 +-
 drivers/usb/serial/whiteheat.c|  2 +-
 drivers/usb/serial/whiteheat.h|  2 +-
 51 files changed, 109 insertions(+), 40 deletions(-)
 rename Documentation/usb/{acm.txt => acm.rst} (100%)
 rename Documentation/usb/{authorization.txt => authorization.rst} (100%)
 rename Documentation/usb/{chipidea.txt => chipidea.rst} (100%)
 rename Documentation/usb/{dwc3.txt => dwc3.rst} (100%)
 rename Documentation/usb/{ehci.txt => ehci.rst} (100%)
 rename Documentation/usb/{functionfs.txt => functionfs.rst} (100%)
 rename Documentation/usb/{gadget-testing.txt => gadget-testing.rst} (99%)
 rename Documentation/usb/{gadget_configfs.txt => gadget_configfs.rst} (100%)
 rename Documentation/usb/{gadget_hid.txt => gadget_hid.rst} (100%)
 rename Documentation/usb/{gadget_multi.txt => gadget_multi.rst} (100%)
 rename Documentation/usb/{gadget_printer.txt => gadget_printer.rst} (100%)
 rename Documentation/usb/{gadget_serial.txt => gadget_serial.rst} (100%)
 create mode 100644 Documentation/usb/index.rst
 rename Documentation/usb/{iuu_phoenix.txt => iuu_phoenix.rst} (100%)
 rename Documentation/usb/{mass-storage.txt => mass-storage.rst} (100%)
 rename Documentation/usb/{misc_usbsevseg.txt => misc_usbsevseg.rst} (100%)
 rename Documentation/usb/{mtouchusb.txt => mtouchusb.rst} (100%)
 rename Documentation/usb/{ohci.txt => ohci.rst} (100%)
 rename Documentation/usb/{rio.txt => rio.rst} (100%)
 create mode 100644 Documentation/usb/text_files.rst
 rename Documentation/usb/{usb-help.txt => usb-help.rst} (100%)
 rename Documentation/usb/{usb-serial.txt => usb-serial.rst} (100%)
 rename Documentation/usb/{usbip_protocol.txt => usbip_protocol.rst} (100%)
 rename Documentation/usb/{usbmon.txt => usbmon.rst} (100%)
 rename Documentation/usb/{WUSB-Design-overview.txt => 
wusb-design-overview.rst} (100%)

diff --git a/Documentation/index.rst b/Documentation/index.rst
index a57d975e969a..2f9bf37b8989 100644
--- a/Documentation/index.rst
+++ b/Documentation/index.rst
@@ -103,6 +103,7 @@ needed).
 

[PATCH v1 08/22] docs: sysctl: convert to ReST

2019-06-18 Thread Mauro Carvalho Chehab
Rename the /proc/sys/ documentation files to ReST, using the
README file as a template for an index.rst, adding the other
files there via TOC markup.

Despite being written on different times with different
styles, try to make them somewhat coherent with a similar
look and feel, ensuring that they'll look nice as both
raw text file and as via the html output produced by the
Sphinx build system.

At its new index.rst, let's add a :orphan: while this is not linked to
the main index.rst file, in order to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab 
---
 .../admin-guide/kernel-parameters.txt |   2 +-
 Documentation/admin-guide/mm/index.rst|   2 +-
 Documentation/admin-guide/mm/ksm.rst  |   2 +-
 Documentation/core-api/printk-formats.rst |   2 +-
 Documentation/networking/ip-sysctl.txt|   2 +-
 Documentation/sysctl/{abi.txt => abi.rst} |  71 ++--
 Documentation/sysctl/{fs.txt => fs.rst}   | 142 +++
 Documentation/sysctl/{README => index.rst}|  36 +-
 .../sysctl/{kernel.txt => kernel.rst} | 374 ++
 Documentation/sysctl/{net.txt => net.rst} | 141 ---
 .../sysctl/{sunrpc.txt => sunrpc.rst} |  13 +-
 Documentation/sysctl/{user.txt => user.rst}   |  32 +-
 Documentation/sysctl/{vm.txt => vm.rst}   | 258 ++--
 Documentation/vm/unevictable-lru.rst  |   2 +-
 kernel/panic.c|   2 +-
 mm/swap.c |   2 +-
 16 files changed, 626 insertions(+), 457 deletions(-)
 rename Documentation/sysctl/{abi.txt => abi.rst} (30%)
 rename Documentation/sysctl/{fs.txt => fs.rst} (77%)
 rename Documentation/sysctl/{README => index.rst} (78%)
 rename Documentation/sysctl/{kernel.txt => kernel.rst} (79%)
 rename Documentation/sysctl/{net.txt => net.rst} (85%)
 rename Documentation/sysctl/{sunrpc.txt => sunrpc.rst} (62%)
 rename Documentation/sysctl/{user.txt => user.rst} (77%)
 rename Documentation/sysctl/{vm.txt => vm.rst} (85%)

diff --git a/Documentation/admin-guide/kernel-parameters.txt 
b/Documentation/admin-guide/kernel-parameters.txt
index 20780fbc948d..a15295e180fe 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -3159,7 +3159,7 @@
numa_zonelist_order= [KNL, BOOT] Select zonelist order for NUMA.
'node', 'default' can be specified
This can be set from sysctl after boot.
-   See Documentation/sysctl/vm.txt for details.
+   See Documentation/sysctl/vm.rst for details.
 
ohci1394_dma=early  [HW] enable debugging via the ohci1394 driver.
See Documentation/debugging-via-ohci1394.rst for more
diff --git a/Documentation/admin-guide/mm/index.rst 
b/Documentation/admin-guide/mm/index.rst
index ddf8d8d33377..f5e92f33f96e 100644
--- a/Documentation/admin-guide/mm/index.rst
+++ b/Documentation/admin-guide/mm/index.rst
@@ -11,7 +11,7 @@ processes address space and many other cool things.
 Linux memory management is a complex system with many configurable
 settings. Most of these settings are available via ``/proc``
 filesystem and can be quired and adjusted using ``sysctl``. These APIs
-are described in Documentation/sysctl/vm.txt and in `man 5 proc`_.
+are described in Documentation/sysctl/vm.rst and in `man 5 proc`_.
 
 .. _man 5 proc: http://man7.org/linux/man-pages/man5/proc.5.html
 
diff --git a/Documentation/admin-guide/mm/ksm.rst 
b/Documentation/admin-guide/mm/ksm.rst
index 9303786632d1..7b2b8767c0b4 100644
--- a/Documentation/admin-guide/mm/ksm.rst
+++ b/Documentation/admin-guide/mm/ksm.rst
@@ -59,7 +59,7 @@ MADV_UNMERGEABLE is applied to a range which was never 
MADV_MERGEABLE.
 
 If a region of memory must be split into at least one new MADV_MERGEABLE
 or MADV_UNMERGEABLE region, the madvise may return ENOMEM if the process
-will exceed ``vm.max_map_count`` (see Documentation/sysctl/vm.txt).
+will exceed ``vm.max_map_count`` (see Documentation/sysctl/vm.rst).
 
 Like other madvise calls, they are intended for use on mapped areas of
 the user address space: they will report ENOMEM if the specified range
diff --git a/Documentation/core-api/printk-formats.rst 
b/Documentation/core-api/printk-formats.rst
index 75d2bbe9813f..1d8e748f909f 100644
--- a/Documentation/core-api/printk-formats.rst
+++ b/Documentation/core-api/printk-formats.rst
@@ -119,7 +119,7 @@ Kernel Pointers
 
 For printing kernel pointers which should be hidden from unprivileged
 users. The behaviour of %pK depends on the kptr_restrict sysctl - see
-Documentation/sysctl/kernel.txt for more details.
+Documentation/sysctl/kernel.rst for more details.
 
 Unmodified Addresses
 
diff --git a/Documentation/networking/ip-sysctl.txt 
b/Documentation/networking/ip-sysctl.txt
index 8e33d51e..8626b175b192 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentatio

[PATCH v1 22/22] admin-guide: add kdump documentation into it

2019-06-18 Thread Mauro Carvalho Chehab
The Kdump documentation describes procedures with admins use
in order to solve issues on their systems.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/admin-guide/bug-hunting.rst| 4 ++--
 Documentation/admin-guide/index.rst  | 1 +
 Documentation/{ => admin-guide}/kdump/gdbmacros.txt  | 0
 Documentation/{ => admin-guide}/kdump/index.rst  | 1 -
 Documentation/{ => admin-guide}/kdump/kdump.rst  | 0
 Documentation/{ => admin-guide}/kdump/vmcoreinfo.rst | 0
 Documentation/admin-guide/kernel-parameters.txt  | 6 +++---
 Documentation/powerpc/firmware-assisted-dump.rst | 2 +-
 Documentation/translations/zh_CN/oops-tracing.txt| 4 ++--
 Documentation/watchdog/hpwdt.rst | 2 +-
 MAINTAINERS  | 2 +-
 arch/arm/Kconfig | 2 +-
 arch/arm64/Kconfig   | 2 +-
 arch/sh/Kconfig  | 2 +-
 arch/x86/Kconfig | 4 ++--
 15 files changed, 16 insertions(+), 16 deletions(-)
 rename Documentation/{ => admin-guide}/kdump/gdbmacros.txt (100%)
 rename Documentation/{ => admin-guide}/kdump/index.rst (97%)
 rename Documentation/{ => admin-guide}/kdump/kdump.rst (100%)
 rename Documentation/{ => admin-guide}/kdump/vmcoreinfo.rst (100%)

diff --git a/Documentation/admin-guide/bug-hunting.rst 
b/Documentation/admin-guide/bug-hunting.rst
index b761aa2a51d2..44b8a4edd348 100644
--- a/Documentation/admin-guide/bug-hunting.rst
+++ b/Documentation/admin-guide/bug-hunting.rst
@@ -90,9 +90,9 @@ the disk is not available then you have three options:
 run a null modem to a second machine and capture the output there
 using your favourite communication program.  Minicom works well.
 
-(3) Use Kdump (see Documentation/kdump/kdump.rst),
+(3) Use Kdump (see Documentation/admin-guide/kdump/kdump.rst),
 extract the kernel ring buffer from old memory with using dmesg
-gdbmacro in Documentation/kdump/gdbmacros.txt.
+gdbmacro in Documentation/admin-guide/kdump/gdbmacros.txt.
 
 Finding the bug's location
 --
diff --git a/Documentation/admin-guide/index.rst 
b/Documentation/admin-guide/index.rst
index e4f0cb2a02bd..9f6820a7e8f8 100644
--- a/Documentation/admin-guide/index.rst
+++ b/Documentation/admin-guide/index.rst
@@ -39,6 +39,7 @@ problems and bugs in particular.
ramoops
dynamic-debug-howto
init
+   kdump/index
 
 This is the beginning of a section with information of interest to
 application developers.  Documents covering various aspects of the kernel
diff --git a/Documentation/kdump/gdbmacros.txt 
b/Documentation/admin-guide/kdump/gdbmacros.txt
similarity index 100%
rename from Documentation/kdump/gdbmacros.txt
rename to Documentation/admin-guide/kdump/gdbmacros.txt
diff --git a/Documentation/kdump/index.rst 
b/Documentation/admin-guide/kdump/index.rst
similarity index 97%
rename from Documentation/kdump/index.rst
rename to Documentation/admin-guide/kdump/index.rst
index 2b17fcf6867a..8e2ebd0383cd 100644
--- a/Documentation/kdump/index.rst
+++ b/Documentation/admin-guide/kdump/index.rst
@@ -1,4 +1,3 @@
-:orphan:
 
 
 Documentation for Kdump - The kexec-based Crash Dumping Solution
diff --git a/Documentation/kdump/kdump.rst 
b/Documentation/admin-guide/kdump/kdump.rst
similarity index 100%
rename from Documentation/kdump/kdump.rst
rename to Documentation/admin-guide/kdump/kdump.rst
diff --git a/Documentation/kdump/vmcoreinfo.rst 
b/Documentation/admin-guide/kdump/vmcoreinfo.rst
similarity index 100%
rename from Documentation/kdump/vmcoreinfo.rst
rename to Documentation/admin-guide/kdump/vmcoreinfo.rst
diff --git a/Documentation/admin-guide/kernel-parameters.txt 
b/Documentation/admin-guide/kernel-parameters.txt
index 69a9e2e66dfb..1f3fc445c78d 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -708,14 +708,14 @@
[KNL, x86_64] select a region under 4G first, and
fall back to reserve region above 4G when '@offset'
hasn't been specified.
-   See Documentation/kdump/kdump.rst for further details.
+   See Documentation/admin-guide/kdump/kdump.rst for 
further details.
 
crashkernel=range1:size1[,range2:size2,...][@offset]
[KNL] Same as above, but depends on the memory
in the running system. The syntax of range is
start-[end] where start and end are both
a memory unit (amount[KMG]). See also
-   Documentation/kdump/kdump.rst for an example.
+   Documentation/admin-guide/kdump/kdump.rst for an 
example.
 
crashkernel=size[KMG],high
[KNL, x86_64] 

[PATCH v1 04/22] docs: thermal: convert to ReST

2019-06-18 Thread Mauro Carvalho Chehab
Rename the thermal documentation files to ReST, add an
index for them and adjust in order to produce a nice html
output via the Sphinx build system.

At its new index.rst, let's add a :orphan: while this is not linked to
the main index.rst file, in order to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab 
---
 ...pu-cooling-api.txt => cpu-cooling-api.rst} |  39 +-
 .../{exynos_thermal => exynos_thermal.rst}|  47 +-
 ...emulation => exynos_thermal_emulation.rst} |  66 +--
 Documentation/thermal/index.rst   |  18 +
 ...el_powerclamp.txt => intel_powerclamp.rst} | 177 +++
 .../{nouveau_thermal => nouveau_thermal.rst}  |  54 +-
 ...ower_allocator.txt => power_allocator.rst} | 140 ++---
 .../thermal/{sysfs-api.txt => sysfs-api.rst}  | 490 --
 ...hermal => x86_pkg_temperature_thermal.rst} |  28 +-
 MAINTAINERS   |   2 +-
 include/linux/thermal.h   |   4 +-
 11 files changed, 665 insertions(+), 400 deletions(-)
 rename Documentation/thermal/{cpu-cooling-api.txt => cpu-cooling-api.rst} (82%)
 rename Documentation/thermal/{exynos_thermal => exynos_thermal.rst} (67%)
 rename Documentation/thermal/{exynos_thermal_emulation => 
exynos_thermal_emulation.rst} (36%)
 create mode 100644 Documentation/thermal/index.rst
 rename Documentation/thermal/{intel_powerclamp.txt => intel_powerclamp.rst} 
(76%)
 rename Documentation/thermal/{nouveau_thermal => nouveau_thermal.rst} (64%)
 rename Documentation/thermal/{power_allocator.txt => power_allocator.rst} (74%)
 rename Documentation/thermal/{sysfs-api.txt => sysfs-api.rst} (66%)
 rename Documentation/thermal/{x86_pkg_temperature_thermal => 
x86_pkg_temperature_thermal.rst} (80%)

diff --git a/Documentation/thermal/cpu-cooling-api.txt 
b/Documentation/thermal/cpu-cooling-api.rst
similarity index 82%
rename from Documentation/thermal/cpu-cooling-api.txt
rename to Documentation/thermal/cpu-cooling-api.rst
index 7df567eaea1a..645d914c45a6 100644
--- a/Documentation/thermal/cpu-cooling-api.txt
+++ b/Documentation/thermal/cpu-cooling-api.rst
@@ -1,5 +1,6 @@
+===
 CPU cooling APIs How To
-===
+===
 
 Written by Amit Daniel Kachhap 
 
@@ -8,40 +9,54 @@ Updated: 6 Jan 2015
 Copyright (c)  2012 Samsung Electronics Co., Ltd(http://www.samsung.com)
 
 0. Introduction
+===
 
 The generic cpu cooling(freq clipping) provides registration/unregistration 
APIs
 to the caller. The binding of the cooling devices to the trip point is left for
 the user. The registration APIs returns the cooling device pointer.
 
 1. cpu cooling APIs
+===
 
 1.1 cpufreq registration/unregistration APIs
-1.1.1 struct thermal_cooling_device *cpufreq_cooling_register(
-   struct cpumask *clip_cpus)
+
+
+::
+
+   struct thermal_cooling_device
+   *cpufreq_cooling_register(struct cpumask *clip_cpus)
 
 This interface function registers the cpufreq cooling device with the name
 "thermal-cpufreq-%x". This api can support multiple instances of cpufreq
 cooling devices.
 
-   clip_cpus: cpumask of cpus where the frequency constraints will happen.
+   clip_cpus:
+   cpumask of cpus where the frequency constraints will happen.
 
-1.1.2 struct thermal_cooling_device *of_cpufreq_cooling_register(
-   struct cpufreq_policy *policy)
+::
+
+   struct thermal_cooling_device
+   *of_cpufreq_cooling_register(struct cpufreq_policy *policy)
 
 This interface function registers the cpufreq cooling device with
 the name "thermal-cpufreq-%x" linking it with a device tree node, in
 order to bind it via the thermal DT code. This api can support multiple
 instances of cpufreq cooling devices.
 
-policy: CPUFreq policy.
+policy:
+   CPUFreq policy.
 
-1.1.3 void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev)
+
+::
+
+   void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev)
 
 This interface function unregisters the "thermal-cpufreq-%x" cooling 
device.
 
 cdev: Cooling device pointer which has to be unregistered.
 
 2. Power models
+===
 
 The power API registration functions provide a simple power model for
 CPUs.  The current power is calculated as dynamic power (static power isn't
@@ -65,9 +80,9 @@ For a given processor implementation the primary factors are:
   variation.  In pathological cases this variation can be significant,
   but typically it is of a much lesser impact than the factors above.
 
-A high level dynamic power consumption model may then be represented as:
+A high level dynamic power consumption model may then be represented as::
 
-Pdyn = f(run) * Voltage^2 * Frequency * Utilisation
+   Pdyn = f(run) * Voltage^2 * Frequency * Utilisation
 
 f(run) here represents the described execution behaviour and its
 result 

[PATCH v1 03/22] docs: ioctl: convert to ReST

2019-06-18 Thread Mauro Carvalho Chehab
Rename the iio documentation files to ReST, add an
index for them and adjust in order to produce a nice html
output via the Sphinx build system.

The cdrom.txt and hdio.txt have their own particular syntax.
In order to speedup the conversion, I used a small ancillary
perl script:

my $d;
$d .= $_ while(<>);
$d =~ s/(\nCDROM\S+)\s+(\w[^\n]*)/$1\n\t$2\n/g;
$d =~ s/(\nHDIO\S+)\s+(\w[^\n]*)/$1\n\t$2\n/g;
$d =~ s/(\n\s*usage:)[\s\n]*(\w[^\n]*)/$1:\n\n\t  $2\n/g;
$d =~ s/(\n\s*)(E\w+[\s\n]*\w[^\n]*)/$1- $2/g;
$d =~ s/(\n\s*)(inputs|outputs|notes):\s*(\w[^\n]*)/$1$2:\n\t\t$3\n/g;
print $d;

It basically add blank lines on a few interesting places. The
script is not perfect: still several things require manual work,
but it saved quite some time doing some obvious stuff.

At its new index.rst, let's add a :orphan: while this is not linked to
the main index.rst file, in order to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab 
---
 ...g-up-ioctls.txt => botching-up-ioctls.rst} |   1 +
 Documentation/ioctl/{cdrom.txt => cdrom.rst}  | 908 +++---
 Documentation/ioctl/{hdio.txt => hdio.rst}| 835 ++--
 Documentation/ioctl/index.rst |  16 +
 ...{ioctl-decoding.txt => ioctl-decoding.rst} |  13 +-
 drivers/gpu/drm/drm_ioctl.c   |   2 +-
 6 files changed, 1168 insertions(+), 607 deletions(-)
 rename Documentation/ioctl/{botching-up-ioctls.txt => botching-up-ioctls.rst} 
(99%)
 rename Documentation/ioctl/{cdrom.txt => cdrom.rst} (39%)
 rename Documentation/ioctl/{hdio.txt => hdio.rst} (54%)
 create mode 100644 Documentation/ioctl/index.rst
 rename Documentation/ioctl/{ioctl-decoding.txt => ioctl-decoding.rst} (54%)

diff --git a/Documentation/ioctl/botching-up-ioctls.txt 
b/Documentation/ioctl/botching-up-ioctls.rst
similarity index 99%
rename from Documentation/ioctl/botching-up-ioctls.txt
rename to Documentation/ioctl/botching-up-ioctls.rst
index 883fb034bd04..ac697fef3545 100644
--- a/Documentation/ioctl/botching-up-ioctls.txt
+++ b/Documentation/ioctl/botching-up-ioctls.rst
@@ -1,3 +1,4 @@
+=
 (How to avoid) Botching up ioctls
 =
 
diff --git a/Documentation/ioctl/cdrom.txt b/Documentation/ioctl/cdrom.rst
similarity index 39%
rename from Documentation/ioctl/cdrom.txt
rename to Documentation/ioctl/cdrom.rst
index a4d62a9d6771..3b4c0506de46 100644
--- a/Documentation/ioctl/cdrom.txt
+++ b/Documentation/ioctl/cdrom.rst
@@ -1,9 +1,10 @@
-   Summary of CDROM ioctl calls.
-   
+
+Summary of CDROM ioctl calls
+
 
-   Edward A. Falk 
+- Edward A. Falk 
 
-   November, 2004
+November, 2004
 
 This document attempts to describe the ioctl(2) calls supported by
 the CDROM layer.  These are by-and-large implemented (as of Linux 2.6)
@@ -12,6 +13,7 @@ in drivers/cdrom/cdrom.c and drivers/block/scsi_ioctl.c
 ioctl values are listed in .  As of this writing, they
 are as follows:
 
+   ==  ===
CDROMPAUSE  Pause Audio Operation
CDROMRESUME Resume paused Audio Operation
CDROMPLAYMSFPlay Audio MSF (struct cdrom_msf)
@@ -24,22 +26,22 @@ are as follows:
CDROMVOLCTRLControl output volume (struct cdrom_volctrl)
CDROMSUBCHNLRead subchannel data (struct cdrom_subchnl)
CDROMREADMODE2  Read CDROM mode 2 data (2336 Bytes)
-  (struct cdrom_read)
+   (struct cdrom_read)
CDROMREADMODE1  Read CDROM mode 1 data (2048 Bytes)
-  (struct cdrom_read)
+   (struct cdrom_read)
CDROMREADAUDIO  (struct cdrom_read_audio)
CDROMEJECT_SW   enable(1)/disable(0) auto-ejecting
CDROMMULTISESSION   Obtain the start-of-last-session
- address of multi session disks
- (struct cdrom_multisession)
+   address of multi session disks
+   (struct cdrom_multisession)
CDROM_GET_MCN   Obtain the "Universal Product Code"
-  if available (struct cdrom_mcn)
+   if available (struct cdrom_mcn)
CDROM_GET_UPC   Deprecated, use CDROM_GET_MCN instead.
CDROMRESET  hard-reset the drive
CDROMVOLREADGet the drive's volume setting
- (struct cdrom_volctrl)
+   (struct cdrom_volctrl)
CDROMREADRAWread data in raw mode (2352 Bytes)
-   

[PATCH v1 13/22] docs: x86: move two x86-specific files to x86 arch dir

2019-06-18 Thread Mauro Carvalho Chehab
Those two docs belong to the x86 architecture.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/x86/index.rst| 2 ++
 Documentation/{Intel-IOMMU.rst => x86/intel-iommu.rst} | 1 -
 Documentation/{ => x86}/intel_txt.rst  | 1 -
 MAINTAINERS| 2 +-
 security/Kconfig   | 2 +-
 5 files changed, 4 insertions(+), 4 deletions(-)
 rename Documentation/{Intel-IOMMU.rst => x86/intel-iommu.rst} (99%)
 rename Documentation/{ => x86}/intel_txt.rst (99%)

diff --git a/Documentation/x86/index.rst b/Documentation/x86/index.rst
index f2de1b2d3ac7..af64c4bb4447 100644
--- a/Documentation/x86/index.rst
+++ b/Documentation/x86/index.rst
@@ -20,6 +20,8 @@ x86-specific Documentation
mtrr
pat
intel_mpx
+   intel-iommu
+   intel_txt
amd-memory-encryption
pti
mds
diff --git a/Documentation/Intel-IOMMU.rst b/Documentation/x86/intel-iommu.rst
similarity index 99%
rename from Documentation/Intel-IOMMU.rst
rename to Documentation/x86/intel-iommu.rst
index b001104c25c8..c7cf568c0ce7 100644
--- a/Documentation/Intel-IOMMU.rst
+++ b/Documentation/x86/intel-iommu.rst
@@ -1,4 +1,3 @@
-:orphan:
 
 ===
 Linux IOMMU Support
diff --git a/Documentation/intel_txt.rst b/Documentation/x86/intel_txt.rst
similarity index 99%
rename from Documentation/intel_txt.rst
rename to Documentation/x86/intel_txt.rst
index 5a55007ecf08..d6af4c7d7625 100644
--- a/Documentation/intel_txt.rst
+++ b/Documentation/x86/intel_txt.rst
@@ -1,4 +1,3 @@
-:orphan:
 
 =
 Intel(R) TXT Overview
diff --git a/MAINTAINERS b/MAINTAINERS
index 85a6f090ccc0..b7364119ce83 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -8208,7 +8208,7 @@ L:tboot-de...@lists.sourceforge.net
 W: http://tboot.sourceforge.net
 T: hg http://tboot.hg.sourceforge.net:8000/hgroot/tboot/tboot
 S: Supported
-F: Documentation/intel_txt.rst
+F: Documentation/x86/intel_txt.rst
 F: include/linux/tboot.h
 F: arch/x86/kernel/tboot.c
 
diff --git a/security/Kconfig b/security/Kconfig
index 4da0d09c3e49..0d65594b5196 100644
--- a/security/Kconfig
+++ b/security/Kconfig
@@ -121,7 +121,7 @@ config INTEL_TXT
  See  for more information
  about Intel(R) TXT.
  See  for more information about tboot.
- See Documentation/intel_txt.rst for a description of how to enable
+ See Documentation/x86/intel_txt.rst for a description of how to enable
  Intel TXT support in a kernel boot.
 
  If you are unsure as to whether this is required, answer N.
-- 
2.21.0



[PATCH v1 09/22] docs: block: convert to ReST

2019-06-18 Thread Mauro Carvalho Chehab
Rename the block documentation files to ReST, add an
index for them and adjust in order to produce a nice html
output via the Sphinx build system.

At its new index.rst, let's add a :orphan: while this is not linked to
the main index.rst file, in order to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab 
---
 .../admin-guide/kernel-parameters.txt |   8 +-
 .../{bfq-iosched.txt => bfq-iosched.rst}  |  66 ++--
 .../block/{biodoc.txt => biodoc.rst}  | 364 +++---
 .../block/{biovecs.txt => biovecs.rst}|  20 +-
 .../block/{capability.txt => capability.rst}  |  17 +-
 ...ne-partition.txt => cmdline-partition.rst} |  13 +-
 ...{data-integrity.txt => data-integrity.rst} |  60 +--
 ...dline-iosched.txt => deadline-iosched.rst} |  21 +-
 Documentation/block/index.rst |  25 ++
 .../block/{ioprio.txt => ioprio.rst}  |  95 +++--
 .../{kyber-iosched.txt => kyber-iosched.rst}  |   3 +-
 .../block/{null_blk.txt => null_blk.rst}  |  65 +++-
 Documentation/block/{pr.txt => pr.rst}|  18 +-
 .../{queue-sysfs.txt => queue-sysfs.rst}  |   7 +-
 .../block/{request.txt => request.rst}|  47 ++-
 Documentation/block/{stat.txt => stat.rst}|  13 +-
 ...witching-sched.txt => switching-sched.rst} |  28 +-
 ...ontrol.txt => writeback_cache_control.rst} |  12 +-
 Documentation/blockdev/zram.rst   |   2 +-
 MAINTAINERS   |   2 +-
 block/Kconfig |   2 +-
 block/Kconfig.iosched |   2 +-
 block/bfq-iosched.c   |   2 +-
 block/blk-integrity.c |   2 +-
 block/ioprio.c|   2 +-
 block/mq-deadline.c   |   2 +-
 block/partitions/cmdline.c|   2 +-
 27 files changed, 550 insertions(+), 350 deletions(-)
 rename Documentation/block/{bfq-iosched.txt => bfq-iosched.rst} (95%)
 rename Documentation/block/{biodoc.txt => biodoc.rst} (83%)
 rename Documentation/block/{biovecs.txt => biovecs.rst} (92%)
 rename Documentation/block/{capability.txt => capability.rst} (40%)
 rename Documentation/block/{cmdline-partition.txt => cmdline-partition.rst} 
(92%)
 rename Documentation/block/{data-integrity.txt => data-integrity.rst} (91%)
 rename Documentation/block/{deadline-iosched.txt => deadline-iosched.rst} (89%)
 create mode 100644 Documentation/block/index.rst
 rename Documentation/block/{ioprio.txt => ioprio.rst} (75%)
 rename Documentation/block/{kyber-iosched.txt => kyber-iosched.rst} (86%)
 rename Documentation/block/{null_blk.txt => null_blk.rst} (60%)
 rename Documentation/block/{pr.txt => pr.rst} (93%)
 rename Documentation/block/{queue-sysfs.txt => queue-sysfs.rst} (99%)
 rename Documentation/block/{request.txt => request.rst} (59%)
 rename Documentation/block/{stat.txt => stat.rst} (89%)
 rename Documentation/block/{switching-sched.txt => switching-sched.rst} (67%)
 rename Documentation/block/{writeback_cache_control.txt => 
writeback_cache_control.rst} (94%)

diff --git a/Documentation/admin-guide/kernel-parameters.txt 
b/Documentation/admin-guide/kernel-parameters.txt
index a15295e180fe..d11b8a745897 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -430,7 +430,7 @@
 
blkdevparts=Manual partition parsing of block device(s) for
embedded devices based on command line input.
-   See Documentation/block/cmdline-partition.txt
+   See Documentation/block/cmdline-partition.rst
 
boot_delay= Milliseconds to delay each printk during boot.
Values larger than 10 seconds (1) are changed to
@@ -1199,9 +1199,9 @@
 
elevator=   [IOSCHED]
Format: { "mq-deadline" | "kyber" | "bfq" }
-   See Documentation/block/deadline-iosched.txt,
-   Documentation/block/kyber-iosched.txt and
-   Documentation/block/bfq-iosched.txt for details.
+   See Documentation/block/deadline-iosched.rst,
+   Documentation/block/kyber-iosched.rst and
+   Documentation/block/bfq-iosched.rst for details.
 
elfcorehdr=[size[KMG]@]offset[KMG] [IA64,PPC,SH,X86,S390]
Specifies physical address of start of kernel core
diff --git a/Documentation/block/bfq-iosched.txt 
b/Documentation/block/bfq-iosched.rst
similarity index 95%
rename from Documentation/block/bfq-iosched.txt
rename to Documentation/block/bfq-iosched.rst
index b2265cf6c9c3..3fd9e8029347 100644
--- a/Documentation/block/bfq-iosched.txt
+++ b/Documentation/block/bfq-iosched.rst
@@ -1,9 +1,11 @@
+==
 BFQ (Budget Fair Queueing)
 ==
 
 BFQ is a proportional-share I/O scheduler, with some extra
 low-latency capab

[PATCH v1 06/22] docs: blockdev: convert to ReST

2019-06-18 Thread Mauro Carvalho Chehab
Rename the blockdev documentation files to ReST, add an
index for them and adjust in order to produce a nice html
output via the Sphinx build system.

The drbd sub-directory contains some graphs and data flows.
Add those too to the documentation.

At its new index.rst, let's add a :orphan: while this is not linked to
the main index.rst file, in order to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab 
---
 .../admin-guide/kernel-parameters.txt |  18 +-
 ...structure-v9.txt => data-structure-v9.rst} |   6 +-
 Documentation/blockdev/drbd/figures.rst   |  28 +++
 .../blockdev/drbd/{README.txt => index.rst}   |  15 +-
 .../blockdev/{floppy.txt => floppy.rst}   |  88 
 Documentation/blockdev/index.rst  |  16 ++
 Documentation/blockdev/{nbd.txt => nbd.rst}   |   2 +-
 .../blockdev/{paride.txt => paride.rst}   | 194 +
 .../blockdev/{ramdisk.txt => ramdisk.rst} |  55 ++---
 Documentation/blockdev/{zram.txt => zram.rst} | 195 --
 MAINTAINERS   |   8 +-
 drivers/block/Kconfig |   8 +-
 drivers/block/floppy.c|   2 +-
 drivers/block/zram/Kconfig|   6 +-
 tools/testing/selftests/zram/README   |   2 +-
 15 files changed, 398 insertions(+), 245 deletions(-)
 rename Documentation/blockdev/drbd/{data-structure-v9.txt => 
data-structure-v9.rst} (94%)
 create mode 100644 Documentation/blockdev/drbd/figures.rst
 rename Documentation/blockdev/drbd/{README.txt => index.rst} (55%)
 rename Documentation/blockdev/{floppy.txt => floppy.rst} (81%)
 create mode 100644 Documentation/blockdev/index.rst
 rename Documentation/blockdev/{nbd.txt => nbd.rst} (96%)
 rename Documentation/blockdev/{paride.txt => paride.rst} (81%)
 rename Documentation/blockdev/{ramdisk.txt => ramdisk.rst} (84%)
 rename Documentation/blockdev/{zram.txt => zram.rst} (76%)

diff --git a/Documentation/admin-guide/kernel-parameters.txt 
b/Documentation/admin-guide/kernel-parameters.txt
index 873062810484..20780fbc948d 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -1249,7 +1249,7 @@
See also Documentation/fault-injection/.
 
floppy= [HW]
-   See Documentation/blockdev/floppy.txt.
+   See Documentation/blockdev/floppy.rst.
 
force_pal_cache_flush
[IA-64] Avoid check_sal_cache_flush which may hang on
@@ -2238,7 +2238,7 @@
memblock=debug  [KNL] Enable memblock debug messages.
 
load_ramdisk=   [RAM] List of ramdisks to load from floppy
-   See Documentation/blockdev/ramdisk.txt.
+   See Documentation/blockdev/ramdisk.rst.
 
lockd.nlm_grace_period=P  [NFS] Assign grace period.
Format: 
@@ -3283,7 +3283,7 @@
 
pcd.[PARIDE]
See header of drivers/block/paride/pcd.c.
-   See also Documentation/blockdev/paride.txt.
+   See also Documentation/blockdev/paride.rst.
 
pci=option[,option...]  [PCI] various PCI subsystem options.
 
@@ -3527,7 +3527,7 @@
needed on a platform with proper driver support.
 
pd. [PARIDE]
-   See Documentation/blockdev/paride.txt.
+   See Documentation/blockdev/paride.rst.
 
pdcchassis= [PARISC,HW] Disable/Enable PDC Chassis Status codes at
boot time.
@@ -3542,10 +3542,10 @@
and performance comparison.
 
pf. [PARIDE]
-   See Documentation/blockdev/paride.txt.
+   See Documentation/blockdev/paride.rst.
 
pg. [PARIDE]
-   See Documentation/blockdev/paride.txt.
+   See Documentation/blockdev/paride.rst.
 
pirq=   [SMP,APIC] Manual mp-table setup
See Documentation/x86/i386/IO-APIC.rst.
@@ -3657,7 +3657,7 @@
 
prompt_ramdisk= [RAM] List of RAM disks to prompt for floppy disk
before loading.
-   See Documentation/blockdev/ramdisk.txt.
+   See Documentation/blockdev/ramdisk.rst.
 
psi=[KNL] Enable or disable pressure stall information
tracking.
@@ -3679,7 +3679,7 @@
pstore.backend= Specify the name of the pstore backend to use
 
pt. [PARIDE]
-   See Documentation/blockdev/paride.txt.
+   See Documentation/blockdev/paride.rst.
 
pti=[X86_64] Control Page Table Isolation of user and
kernel address spaces.  Disabling this feature
@@ -3708,7 +3708,7 @@
See Documentation

[PATCH v1 20/22] docs: extcon: move it to acpi dir and convert it to ReST

2019-06-18 Thread Mauro Carvalho Chehab
The intel-int3496.txt file is a documentation for an ACPI driver.

There's no reason to keep it on a separate directory.

So, instead of keeping it on some random location, move it
to a sub-directory inside the ACPI documentation dir.

For now, keep it with .txt extension, in order to avoid
Sphinx build noise. A later patch should change it to .rst
and movin it to be together with other acpi docs.

Signed-off-by: Mauro Carvalho Chehab 
---
 .../acpi/extcon-intel-int3496.rst} | 14 ++
 Documentation/firmware-guide/acpi/index.rst|  1 +
 MAINTAINERS|  6 +++---
 3 files changed, 14 insertions(+), 7 deletions(-)
 rename Documentation/{extcon/intel-int3496.txt => 
firmware-guide/acpi/extcon-intel-int3496.rst} (66%)

diff --git a/Documentation/extcon/intel-int3496.txt 
b/Documentation/firmware-guide/acpi/extcon-intel-int3496.rst
similarity index 66%
rename from Documentation/extcon/intel-int3496.txt
rename to Documentation/firmware-guide/acpi/extcon-intel-int3496.rst
index 8155dbc7fad3..5137ca834b54 100644
--- a/Documentation/extcon/intel-int3496.txt
+++ b/Documentation/firmware-guide/acpi/extcon-intel-int3496.rst
@@ -1,5 +1,6 @@
+=
 Intel INT3496 ACPI device extcon driver documentation
--
+=
 
 The Intel INT3496 ACPI device extcon driver is a driver for ACPI
 devices with an acpi-id of INT3496, such as found for example on
@@ -13,15 +14,20 @@ between an USB host and an USB peripheral controller.
 The ACPI devices exposes this functionality by returning an array with up
 to 3 gpio descriptors from its ACPI _CRS (Current Resource Settings) call:
 
-Index 0: The input gpio for the id-pin, this is always present and valid
-Index 1: The output gpio for enabling Vbus output from the device to the otg
+===  =
+Index 0  The input gpio for the id-pin, this is always present and valid
+Index 1  The output gpio for enabling Vbus output from the device to the otg
  port, write 1 to enable the Vbus output (this gpio descriptor may
  be absent or invalid)
-Index 2: The output gpio for muxing of the data pins between the USB host and
+Index 2  The output gpio for muxing of the data pins between the USB host and
  the USB peripheral controller, write 1 to mux to the peripheral
  controller
+===  =
 
 There is a mapping between indices and GPIO connection IDs as follows
+
+   === ===
id  index 0
vbusindex 1
mux index 2
+   === ===
diff --git a/Documentation/firmware-guide/acpi/index.rst 
b/Documentation/firmware-guide/acpi/index.rst
index ae609eec4679..90c90d42d9ad 100644
--- a/Documentation/firmware-guide/acpi/index.rst
+++ b/Documentation/firmware-guide/acpi/index.rst
@@ -24,3 +24,4 @@ ACPI Support
acpi-lid
lpit
video_extension
+   extcon-intel-int3496
diff --git a/MAINTAINERS b/MAINTAINERS
index e07cbd44d48a..b7c81bd0f8e8 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -321,7 +321,7 @@ F:  drivers/pnp/pnpacpi/
 F: include/linux/acpi.h
 F: include/linux/fwnode.h
 F: include/acpi/
-F: Documentation/acpi/
+F: Documentation/firmware-guide/acpi/
 F: Documentation/ABI/testing/sysfs-bus-acpi
 F: Documentation/ABI/testing/configfs-acpi
 F: drivers/pci/*acpi*
@@ -4881,7 +4881,7 @@ S:Maintained
 F: Documentation/
 F: scripts/kernel-doc
 X: Documentation/ABI/
-X: Documentation/acpi/
+X: Documentation/firmware-guide/acpi/
 X: Documentation/devicetree/
 X: Documentation/i2c/
 X: Documentation/media/
@@ -6057,7 +6057,7 @@ S:Maintained
 F: drivers/extcon/
 F: include/linux/extcon/
 F: include/linux/extcon.h
-F: Documentation/extcon/
+F: Documentation/firmware-guide/acpi/extcon-intel-int3496.rst
 F: Documentation/devicetree/bindings/extcon/
 
 EXYNOS DP DRIVER
-- 
2.21.0



[PATCH v1 02/22] docs: ioctl-number.txt: convert it to ReST format

2019-06-18 Thread Mauro Carvalho Chehab
The conversion itself is simple: add a markup for the
title of this file and add markups for both tables.

Yet, the big table here with IOCTL numbers is badly formatted:
on several lines, the "Include File" column has some values that
are bigger than the reserved space there.

Also, on several places, a comment was misplaced at the "Include
File" space.

So, most of the work here is to actually ensure that each field
will be properly fixed.

Also worth to mention that some URLs have the asterisk character
on it. Well, Sphinx has an issue with asterisks in the middle
of an string. As this is URL, use the alternate format: %2A.

As a side effect of this patch, it is now a lot easier to see that
some reserved ioctl numbers are missing the include files
where it is supposed to be used.

PS.: While this is part of a subdir, I opted to convert this
single file alone, as this file has a potential of conflicts,
as most subsystem maintainers touch it.

Signed-off-by: Mauro Carvalho Chehab 
---
 .../{ioctl-number.txt => ioctl-number.rst}| 588 +-
 Documentation/process/submit-checklist.rst|   2 +-
 .../it_IT/process/submit-checklist.rst|   2 +-
 .../zh_CN/process/submit-checklist.rst|   2 +-
 include/uapi/rdma/rdma_user_ioctl_cmds.h  |   2 +-
 5 files changed, 304 insertions(+), 292 deletions(-)
 rename Documentation/ioctl/{ioctl-number.txt => ioctl-number.rst} (11%)

diff --git a/Documentation/ioctl/ioctl-number.txt 
b/Documentation/ioctl/ioctl-number.rst
similarity index 11%
rename from Documentation/ioctl/ioctl-number.txt
rename to Documentation/ioctl/ioctl-number.rst
index c9558146ac58..e6d07badafb1 100644
--- a/Documentation/ioctl/ioctl-number.txt
+++ b/Documentation/ioctl/ioctl-number.rst
@@ -1,15 +1,23 @@
+:orphan:
+
+=
 Ioctl Numbers
+=
+
 19 October 1999
+
 Michael Elizabeth Chastain
 
 
 If you are adding new ioctl's to the kernel, you should use the _IO
 macros defined in :
 
+== == 
 _IOan ioctl with no parameters
 _IOW   an ioctl with write parameters (copy_from_user)
 _IOR   an ioctl with read parameters  (copy_to_user)
 _IOWR  an ioctl with both write and read parameters.
+== == 
 
 'Write' and 'read' are from the user's point of view, just like the
 system calls 'write' and 'read'.  For example, a SET_FOO ioctl would
@@ -60,291 +68,295 @@ This table lists ioctls visible from user land for 
Linux/x86.  It contains
 most drivers up to 2.6.31, but I know I am missing some.  There has been
 no attempt to list non-X86 architectures or ioctls from drivers/staging/.
 
-Code  Seq#(hex)Include FileComments
-
-0x00   00-1F   linux/fs.h  conflict!
-0x00   00-1F   scsi/scsi_ioctl.h   conflict!
-0x00   00-1F   linux/fb.h  conflict!
-0x00   00-1F   linux/wavefront.h   conflict!
-0x02   all linux/fd.h
-0x03   all linux/hdreg.h
-0x04   D2-DC   linux/umsdos_fs.h   Dead since 2.6.11, but don't reuse 
these.
-0x06   all linux/lp.h
-0x09   all linux/raid/md_u.h
-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
-   linux/blkpg.h
-0x1b   all InfiniBand Subsystem
-0x20   all drivers/cdrom/cm206.h
-0x22   all scsi/sg.h
-'!'00-1F   uapi/linux/seccomp.h
-'#'00-3F   IEEE 1394 Subsystem Block for the entire subsystem
-'$'00-0F   linux/perf_counter.h, linux/perf_event.h
-'%'00-0F   include/uapi/linux/stm.h
-   System Trace Module subsystem
-   

-'&'00-07   drivers/firewire/nosy-user.h
-'1'00-1F  PPS kit from Ulrich Windl
-   

-'2'01-04   linux/i2o.h
-'3'00-0F   drivers/s390/char/raw3270.h conflict!
-'3'00-1F   linux/suspend_ioctls.h  conflict!
-   and kernel/power/user.c
-'8'all SNP8023 advanced NIC card
-   
-';'64-7F   linux/vfio.h
-'@'00-0F   linux/radeonfb.hconflict!
-'@'00-0F   drivers/video/aty/aty128fb.cconflict!
-'A'00-1F   linux/apm_bios.hconflict!
-'A'00-0F   linux/agpgart.h conflict!
-   and drivers/char/agp/compat_ioctl.h
-'A'00-7F   sound/asound.h  conflict!
-'B'00-1F   linux/cciss_ioctl.h conflict!
-'B'00-0F   include/linux/pmu.h conflict!
-'B'C0-FF   advanced bbus
-   
-'C'all l

[PATCH v1 07/22] docs: perf: convert to ReST

2019-06-18 Thread Mauro Carvalho Chehab
Rename the perf documentation files to ReST, add an
index for them and adjust in order to produce a nice html
output via the Sphinx build system.

At its new index.rst, let's add a :orphan: while this is not linked to
the main index.rst file, in order to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab 
---
 .../perf/{arm-ccn.txt => arm-ccn.rst} | 18 +-
 .../perf/{arm_dsu_pmu.txt => arm_dsu_pmu.rst} |  5 +--
 .../perf/{hisi-pmu.txt => hisi-pmu.rst}   | 35 +++
 Documentation/perf/index.rst  | 16 +
 .../perf/{qcom_l2_pmu.txt => qcom_l2_pmu.rst} |  3 +-
 .../perf/{qcom_l3_pmu.txt => qcom_l3_pmu.rst} |  3 +-
 .../{thunderx2-pmu.txt => thunderx2-pmu.rst}  | 25 ++---
 .../perf/{xgene-pmu.txt => xgene-pmu.rst} |  3 +-
 MAINTAINERS   |  4 +--
 drivers/perf/qcom_l3_pmu.c|  2 +-
 10 files changed, 72 insertions(+), 42 deletions(-)
 rename Documentation/perf/{arm-ccn.txt => arm-ccn.rst} (86%)
 rename Documentation/perf/{arm_dsu_pmu.txt => arm_dsu_pmu.rst} (92%)
 rename Documentation/perf/{hisi-pmu.txt => hisi-pmu.rst} (73%)
 create mode 100644 Documentation/perf/index.rst
 rename Documentation/perf/{qcom_l2_pmu.txt => qcom_l2_pmu.rst} (94%)
 rename Documentation/perf/{qcom_l3_pmu.txt => qcom_l3_pmu.rst} (93%)
 rename Documentation/perf/{thunderx2-pmu.txt => thunderx2-pmu.rst} (73%)
 rename Documentation/perf/{xgene-pmu.txt => xgene-pmu.rst} (96%)

diff --git a/Documentation/perf/arm-ccn.txt b/Documentation/perf/arm-ccn.rst
similarity index 86%
rename from Documentation/perf/arm-ccn.txt
rename to Documentation/perf/arm-ccn.rst
index 15cdb7bc57c3..832b0c64023a 100644
--- a/Documentation/perf/arm-ccn.txt
+++ b/Documentation/perf/arm-ccn.rst
@@ -1,3 +1,4 @@
+==
 ARM Cache Coherent Network
 ==
 
@@ -29,6 +30,7 @@ Crosspoint watchpoint-based events (special "event" value 
0xfe)
 require "xp" and "vc" as as above plus "port" (device port index),
 "dir" (transmit/receive direction), comparator values ("cmp_l"
 and "cmp_h") and "mask", being index of the comparator mask.
+
 Masks are defined separately from the event description
 (due to limited number of the config values) in the "cmp_mask"
 directory, with first 8 configurable by user and additional
@@ -44,16 +46,16 @@ request the events on this processor (if not, the 
perf_event->cpu value
 will be overwritten anyway). In case of this processor being offlined,
 the events are migrated to another one and the attribute is updated.
 
-Example of perf tool use:
+Example of perf tool use::
 
-/ # perf list | grep ccn
-  ccn/cycles/[Kernel PMU event]
-<...>
-  ccn/xp_valid_flit,xp=?,port=?,vc=?,dir=?/  [Kernel PMU event]
-<...>
+  / # perf list | grep ccn
+ccn/cycles/[Kernel PMU event]
+  <...>
+ccn/xp_valid_flit,xp=?,port=?,vc=?,dir=?/  [Kernel PMU event]
+  <...>
 
-/ # perf stat -a -e ccn/cycles/,ccn/xp_valid_flit,xp=1,port=0,vc=1,dir=1/ \
-   sleep 1
+  / # perf stat -a -e ccn/cycles/,ccn/xp_valid_flit,xp=1,port=0,vc=1,dir=1/ \
+ sleep 
1
 
 The driver does not support sampling, therefore "perf record" will
 not work. Per-task (without "-a") perf sessions are not supported.
diff --git a/Documentation/perf/arm_dsu_pmu.txt 
b/Documentation/perf/arm_dsu_pmu.rst
similarity index 92%
rename from Documentation/perf/arm_dsu_pmu.txt
rename to Documentation/perf/arm_dsu_pmu.rst
index d611e15f5add..7fd34db75d13 100644
--- a/Documentation/perf/arm_dsu_pmu.txt
+++ b/Documentation/perf/arm_dsu_pmu.rst
@@ -1,3 +1,4 @@
+==
 ARM DynamIQ Shared Unit (DSU) PMU
 ==
 
@@ -13,7 +14,7 @@ PMU doesn't support process specific events and cannot be 
used in sampling mode.
 The DSU provides a bitmap for a subset of implemented events via hardware
 registers. There is no way for the driver to determine if the other events
 are available or not. Hence the driver exposes only those events advertised
-by the DSU, in "events" directory under :
+by the DSU, in "events" directory under::
 
   /sys/bus/event_sources/devices/arm_dsu_/
 
@@ -23,6 +24,6 @@ and use the raw event code for the unlisted events.
 The driver also exposes the CPUs connected to the DSU instance in 
"associated_cpus".
 
 
-e.g usage :
+e.g usage::
 
perf stat -a -e arm_dsu_0/cycles/
diff --git a/Documentation/perf/hisi-pmu.txt b/Documentation/perf/hisi-pmu.rst
similarity index 73%
rename from Documentation/perf/hisi-pmu.txt
rename to Documentation/perf/hisi-pmu.rst
index 267a028b2741..404a5c3d9d00 100644
--- a/Documentation/perf/hisi-pmu.txt
+++ b/Documentation/perf/hisi-pmu.rst
@@ -1,5 +1,7 @@
+=

[PATCH v1 00/22] Convert files to ReST - part 3

2019-06-18 Thread Mauro Carvalho Chehab
This is the third part of a series I wrote sometime ago where I manually
convert lots of files to be properly parsed by Sphinx as ReST files.

As it touches on lot of stuff, this series is based on today's linux-next, 
at tag next-20190617.

The first version of this series had 57 patches. The first part with 28 patches
were already merged.  The second part has 29 patches. This series with 22 
patches finishes the conversion part of my series. That's because I opted to
do ~1 patch per converted directory.

That sounds too much to be send on a single round. So, I'm opting to split
it on 3 parts for the conversion.

After having those three patch series merged, I should submit a final patch 
series adding orphaned books to existing ones (with ~50 patches), to be
applied on a convenient moment (probably late on a merge window).

Those patches should probably be good to be merged either by subsystem
maintainers or via the docs tree.

I opted to mark new files not included yet to the main index.rst (directly or
indirectly) with the :orphan: tag, in order to avoid adding warnings to the
build system. This should be removed after we find a "home" for all
the converted files within the new document tree arrangement, after I
submit the third part.

Both this series and  the other parts of this work are on my devel git tree,
at:


https://git.linuxtv.org/mchehab/experimental.git/log/?h=convert_rst_renames_v5.1

The final output in html (after all patches I currently have, including 
the upcoming series) can be seen at:

https://www.infradead.org/~mchehab/rst_conversion/

It contains all pending work from my side related to the conversion, plus
the patches I finished a first version today with contains the renaming 
patches and de-orphan changes.

Mauro Carvalho Chehab (22):
  docs: Documentation/*.txt: rename all ReST files to *.rst
  docs: ioctl-number.txt: convert it to ReST format
  docs: ioctl: convert to ReST
  docs: thermal: convert to ReST
  docs: rapidio: convert to ReST
  docs: blockdev: convert to ReST
  docs: perf: convert to ReST
  docs: sysctl: convert to ReST
  docs: block: convert to ReST
  docs: security: move some books to it and update
  docs: admin-guide: add .rst files from the main dir
  docs: driver-api: add .rst files from the main dir
  docs: x86: move two x86-specific files to x86 arch dir
  docs: usb: rename files to .rst and add them to drivers-api
  docs: driver-api: add a chapter for memory-related API
  docs: driver-api: add xilinx driver API documentation
  docs: add arch doc directories to the index
  docs: admin-guide: move sysctl directory to it
  docs: driver-api: add remaining converted dirs to it
  docs: extcon: move it to acpi dir and convert it to ReST
  docs: admin-guide: add laptops documentation
  admin-guide: add kdump documentation into it

 CREDITS   |   2 +-
 Documentation/ABI/removed/sysfs-class-rfkill  |   2 +-
 Documentation/ABI/stable/sysfs-class-rfkill   |   2 +-
 Documentation/ABI/stable/sysfs-devices-node   |   2 +-
 Documentation/ABI/testing/procfs-diskstats|   2 +-
 Documentation/ABI/testing/sysfs-block |   2 +-
 Documentation/ABI/testing/sysfs-block-device  |   2 +-
 .../ABI/testing/sysfs-class-switchtec |   2 +-
 .../ABI/testing/sysfs-devices-system-cpu  |   4 +-
 .../ABI/testing/sysfs-platform-asus-laptop|   2 +-
 Documentation/PCI/pci.rst |   8 +-
 Documentation/{ => admin-guide}/aoe/aoe.rst   |   4 +-
 .../{ => admin-guide}/aoe/autoload.sh |   1 -
 .../{ => admin-guide}/aoe/examples.rst|   0
 Documentation/{ => admin-guide}/aoe/index.rst |   2 -
 Documentation/{ => admin-guide}/aoe/status.sh |   0
 Documentation/{ => admin-guide}/aoe/todo.rst  |   0
 .../{ => admin-guide}/aoe/udev-install.sh |   4 +-
 Documentation/{ => admin-guide}/aoe/udev.txt  |   8 +-
 .../{btmrvl.txt => admin-guide/btmrvl.rst}|   0
 Documentation/admin-guide/bug-hunting.rst |   4 +-
 .../cgroup-v1/blkio-controller.rst|   0
 .../{ => admin-guide}/cgroup-v1/cgroups.rst   |   4 +-
 .../{ => admin-guide}/cgroup-v1/cpuacct.rst   |   0
 .../{ => admin-guide}/cgroup-v1/cpusets.rst   |   2 +-
 .../{ => admin-guide}/cgroup-v1/devices.rst   |   0
 .../cgroup-v1/freezer-subsystem.rst   |   0
 .../{ => admin-guide}/cgroup-v1/hugetlb.rst   |   0
 .../{ => admin-guide}/cgroup-v1/index.rst |   2 -
 .../cgroup-v1/memcg_test.rst  |   4 +-
 .../{ => admin-guide}/cgroup-v1/memory.rst|   0
 .../{ => admin-guide}/cgroup-v1/net_cls.rst   |   0
 .../{ => admin-guide}/cgroup-v1/net_prio.rst  |   0
 .../{ => admin-guide}/cgroup-v1/pids.rst  |   0
 .../{ => admin-guide}/cgroup-v1/rdma.rst  |   0
 Documentation/admin-guide/cgroup-v2.rst   |   2 +-
 .../clearing-warn-once.rst}   |   0
 .../cpu-load.rst} |   0
 .../cputopology.rst}  |   0
 .../efi-stub.rst}  

[PATCH v1 21/22] docs: admin-guide: add laptops documentation

2019-06-18 Thread Mauro Carvalho Chehab
The docs under Documentation/laptops contain users specific
information.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/ABI/testing/sysfs-block-device  | 2 +-
 Documentation/ABI/testing/sysfs-platform-asus-laptop  | 2 +-
 Documentation/admin-guide/index.rst   | 1 +
 Documentation/admin-guide/kernel-parameters.txt   | 2 +-
 Documentation/{ => admin-guide}/laptops/asus-laptop.rst   | 0
 .../{ => admin-guide}/laptops/disk-shock-protection.rst   | 0
 Documentation/{ => admin-guide}/laptops/index.rst | 1 -
 Documentation/{ => admin-guide}/laptops/laptop-mode.rst   | 0
 Documentation/{ => admin-guide}/laptops/lg-laptop.rst | 1 -
 Documentation/{ => admin-guide}/laptops/sony-laptop.rst   | 0
 Documentation/{ => admin-guide}/laptops/sonypi.rst| 0
 Documentation/{ => admin-guide}/laptops/thinkpad-acpi.rst | 0
 Documentation/{ => admin-guide}/laptops/toshiba_haps.rst  | 0
 Documentation/admin-guide/sysctl/vm.rst   | 4 ++--
 MAINTAINERS   | 4 ++--
 drivers/char/Kconfig  | 2 +-
 drivers/platform/x86/Kconfig  | 4 ++--
 17 files changed, 11 insertions(+), 12 deletions(-)
 rename Documentation/{ => admin-guide}/laptops/asus-laptop.rst (100%)
 rename Documentation/{ => admin-guide}/laptops/disk-shock-protection.rst (100%)
 rename Documentation/{ => admin-guide}/laptops/index.rst (95%)
 rename Documentation/{ => admin-guide}/laptops/laptop-mode.rst (100%)
 rename Documentation/{ => admin-guide}/laptops/lg-laptop.rst (99%)
 rename Documentation/{ => admin-guide}/laptops/sony-laptop.rst (100%)
 rename Documentation/{ => admin-guide}/laptops/sonypi.rst (100%)
 rename Documentation/{ => admin-guide}/laptops/thinkpad-acpi.rst (100%)
 rename Documentation/{ => admin-guide}/laptops/toshiba_haps.rst (100%)

diff --git a/Documentation/ABI/testing/sysfs-block-device 
b/Documentation/ABI/testing/sysfs-block-device
index 0d57bbb4fddc..17f2bc7dd261 100644
--- a/Documentation/ABI/testing/sysfs-block-device
+++ b/Documentation/ABI/testing/sysfs-block-device
@@ -45,7 +45,7 @@ Description:
- Values below -2 are rejected with -EINVAL
 
For more information, see
-   Documentation/laptops/disk-shock-protection.rst
+   Documentation/admin-guide/laptops/disk-shock-protection.rst
 
 
 What:  /sys/block/*/device/ncq_prio_enable
diff --git a/Documentation/ABI/testing/sysfs-platform-asus-laptop 
b/Documentation/ABI/testing/sysfs-platform-asus-laptop
index d67fa4bafa70..8b0e8205a6a2 100644
--- a/Documentation/ABI/testing/sysfs-platform-asus-laptop
+++ b/Documentation/ABI/testing/sysfs-platform-asus-laptop
@@ -31,7 +31,7 @@ Description:
To control the LED display, use the following :
echo 0x0T000DDD > /sys/devices/platform/asus_laptop/
where T control the 3 letters display, and DDD the 3 digits 
display.
-   The DDD table can be found in 
Documentation/laptops/asus-laptop.rst
+   The DDD table can be found in 
Documentation/admin-guide/laptops/asus-laptop.rst
 
 What:  /sys/devices/platform/asus_laptop/bluetooth
 Date:  January 2007
diff --git a/Documentation/admin-guide/index.rst 
b/Documentation/admin-guide/index.rst
index 5940ce8d16af..e4f0cb2a02bd 100644
--- a/Documentation/admin-guide/index.rst
+++ b/Documentation/admin-guide/index.rst
@@ -79,6 +79,7 @@ configure specific aspects of kernel behavior to your liking.
aoe/index
perf-security
acpi/index
+   laptops/index
 
btmrvl
clearing-warn-once
diff --git a/Documentation/admin-guide/kernel-parameters.txt 
b/Documentation/admin-guide/kernel-parameters.txt
index 0b17312b9198..69a9e2e66dfb 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -4356,7 +4356,7 @@
Format: 
 
sonypi.*=   [HW] Sony Programmable I/O Control Device driver
-   See Documentation/laptops/sonypi.rst
+   See Documentation/admin-guide/laptops/sonypi.rst
 
spectre_v2= [X86] Control mitigation of Spectre variant 2
(indirect branch speculation) vulnerability.
diff --git a/Documentation/laptops/asus-laptop.rst 
b/Documentation/admin-guide/laptops/asus-laptop.rst
similarity index 100%
rename from Documentation/laptops/asus-laptop.rst
rename to Documentation/admin-guide/laptops/asus-laptop.rst
diff --git a/Documentation/laptops/disk-shock-protection.rst 
b/Documentation/admin-guide/laptops/disk-shock-protection.rst
similarity index 100%
rename from Documentation/laptops/disk-shock-protection.rst
rename to Documentation/admin-guide/laptops/disk-shock-protection.rst
diff --git a/Documentation/laptops/index.rst 
b/Documentation/ad

[PATCH v1 15/22] docs: driver-api: add a chapter for memory-related API

2019-06-18 Thread Mauro Carvalho Chehab
There are some DMA files under the main dir. Move them to the
new chapter and add an index file for them.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/PCI/pci.rst|  6 +++---
 Documentation/block/biodoc.rst   |  2 +-
 .../driver-api/bus-virt-phys-mapping.rst |  2 +-
 Documentation/driver-api/index.rst   |  2 ++
 .../mm/dma-api-howto.rst}|  2 --
 .../{DMA-API.rst => driver-api/mm/dma-api.rst}   |  8 +++-
 .../mm/dma-attributes.rst}   |  2 --
 .../mm/dma-isa-lpc.rst}  |  4 +---
 Documentation/driver-api/mm/index.rst| 11 +++
 Documentation/driver-api/usb/dma.rst |  6 +++---
 Documentation/memory-barriers.txt|  6 +++---
 .../translations/ko_KR/memory-barriers.txt   |  6 +++---
 arch/ia64/hp/common/sba_iommu.c  | 12 ++--
 arch/ia64/sn/pci/pci_dma.c   |  4 ++--
 arch/parisc/kernel/pci-dma.c |  2 +-
 arch/x86/include/asm/dma-mapping.h   |  4 ++--
 arch/x86/kernel/amd_gart_64.c|  2 +-
 drivers/parisc/sba_iommu.c   | 16 
 include/linux/dma-mapping.h  |  2 +-
 include/media/videobuf-dma-sg.h  |  2 +-
 kernel/dma/debug.c   |  2 +-
 21 files changed, 54 insertions(+), 49 deletions(-)
 rename Documentation/{DMA-API-HOWTO.rst => driver-api/mm/dma-api-howto.rst} 
(99%)
 rename Documentation/{DMA-API.rst => driver-api/mm/dma-api.rst} (99%)
 rename Documentation/{DMA-attributes.rst => driver-api/mm/dma-attributes.rst} 
(99%)
 rename Documentation/{DMA-ISA-LPC.rst => driver-api/mm/dma-isa-lpc.rst} (98%)
 create mode 100644 Documentation/driver-api/mm/index.rst

diff --git a/Documentation/PCI/pci.rst b/Documentation/PCI/pci.rst
index 0f52d172c9ac..8665209eda40 100644
--- a/Documentation/PCI/pci.rst
+++ b/Documentation/PCI/pci.rst
@@ -265,7 +265,7 @@ Set the DMA mask size
 -
 .. note::
If anything below doesn't make sense, please refer to
-   Documentation/DMA-API.rst. This section is just a reminder that
+   Documentation/driver-api/mm/dma-api.rst. This section is just a reminder 
that
drivers need to indicate DMA capabilities of the device and is not
an authoritative source for DMA interfaces.
 
@@ -291,7 +291,7 @@ Many 64-bit "PCI" devices (before PCI-X) and some PCI-X 
devices are
 Setup shared control data
 -
 Once the DMA masks are set, the driver can allocate "consistent" (a.k.a. 
shared)
-memory.  See Documentation/DMA-API.rst for a full description of
+memory.  See Documentation/driver-api/mm/dma-api.rst for a full description of
 the DMA APIs. This section is just a reminder that it needs to be done
 before enabling DMA on the device.
 
@@ -421,7 +421,7 @@ owners if there is one.
 
 Then clean up "consistent" buffers which contain the control data.
 
-See Documentation/DMA-API.rst for details on unmapping interfaces.
+See Documentation/driver-api/mm/dma-api.rst for details on unmapping 
interfaces.
 
 
 Unregister from other subsystems
diff --git a/Documentation/block/biodoc.rst b/Documentation/block/biodoc.rst
index 59bd93bec8fc..2206c88e7dee 100644
--- a/Documentation/block/biodoc.rst
+++ b/Documentation/block/biodoc.rst
@@ -195,7 +195,7 @@ a virtual address mapping (unlike the earlier scheme of 
virtual address
 do not have a corresponding kernel virtual address space mapping) and
 low-memory pages.
 
-Note: Please refer to Documentation/DMA-API-HOWTO.rst for a discussion
+Note: Please refer to Documentation/driver-api/mm/dma-api-howto.rst for a 
discussion
 on PCI high mem DMA aspects and mapping of scatter gather lists, and support
 for 64 bit PCI.
 
diff --git a/Documentation/driver-api/bus-virt-phys-mapping.rst 
b/Documentation/driver-api/bus-virt-phys-mapping.rst
index 80972916e88c..18b6fdf618d2 100644
--- a/Documentation/driver-api/bus-virt-phys-mapping.rst
+++ b/Documentation/driver-api/bus-virt-phys-mapping.rst
@@ -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
superseded by the functionality provided by the PCI DMA interface
-   (see Documentation/DMA-API-HOWTO.rst).  They continue
+   (see Documentation/driver-api/mm/dma-api-howto.rst).  They continue
to be documented below for historical purposes, but new code
must not use them. --davidm 00/12/12
 
diff --git a/Documentation/driver-api/index.rst 
b/Documentation/driver-api/index.rst
index bb2621b17212..492b96003af2 100644
--- a/Documentation/driver-api/index.rst
+++ b/Documentation/driver-api/index.rst
@@ -16,6 +16,7 @@ available subsections can be seen below.
 
basics
infrastructure
+   mm/index
pm/index
clk
device-io
@@ -59,6 +60,7 @@ available subsections can be seen bel

[PATCH v1 17/22] docs: add arch doc directories to the index

2019-06-18 Thread Mauro Carvalho Chehab
Now that several arch documents were converted to ReST,
add their indexes to Documentation/index.rst and remove the
:orphan:  from them.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/arm/index.rst|  2 --
 Documentation/arm64/index.rst  |  2 --
 Documentation/ia64/index.rst   |  2 --
 Documentation/index.rst| 10 ++
 Documentation/m68k/index.rst   |  2 --
 Documentation/riscv/index.rst  |  2 --
 Documentation/s390/index.rst   |  2 --
 Documentation/sparc/index.rst  |  2 --
 Documentation/xtensa/index.rst |  2 --
 9 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/Documentation/arm/index.rst b/Documentation/arm/index.rst
index bd316d1a1802..9c2f781f4685 100644
--- a/Documentation/arm/index.rst
+++ b/Documentation/arm/index.rst
@@ -1,5 +1,3 @@
-:orphan:
-
 
 ARM Architecture
 
diff --git a/Documentation/arm64/index.rst b/Documentation/arm64/index.rst
index 018b7836ecb7..96b696ba4e6c 100644
--- a/Documentation/arm64/index.rst
+++ b/Documentation/arm64/index.rst
@@ -1,5 +1,3 @@
-:orphan:
-
 ==
 ARM64 Architecture
 ==
diff --git a/Documentation/ia64/index.rst b/Documentation/ia64/index.rst
index a3e3052ad6e2..ef99475f672b 100644
--- a/Documentation/ia64/index.rst
+++ b/Documentation/ia64/index.rst
@@ -1,5 +1,3 @@
-:orphan:
-
 ==
 IA-64 Architecture
 ==
diff --git a/Documentation/index.rst b/Documentation/index.rst
index 2f9bf37b8989..82cd9528dff0 100644
--- a/Documentation/index.rst
+++ b/Documentation/index.rst
@@ -116,7 +116,17 @@ implementation.
:maxdepth: 2
 
sh/index
+   arm/index
+   arm64/index
+   ia64/index
+   m68k/index
+   powerpc/index
+   riscv/index
+   s390/index
+   sh/index
+   sparc/index
x86/index
+   xtensa/index
 
 Filesystem Documentation
 
diff --git a/Documentation/m68k/index.rst b/Documentation/m68k/index.rst
index f3273ec075c3..aa121cfcbbd9 100644
--- a/Documentation/m68k/index.rst
+++ b/Documentation/m68k/index.rst
@@ -1,5 +1,3 @@
-:orphan:
-
 =
 m68k Architecture
 =
diff --git a/Documentation/riscv/index.rst b/Documentation/riscv/index.rst
index c4b906d9b5a7..e3ca0922a8c2 100644
--- a/Documentation/riscv/index.rst
+++ b/Documentation/riscv/index.rst
@@ -1,5 +1,3 @@
-:orphan:
-
 ===
 RISC-V architecture
 ===
diff --git a/Documentation/s390/index.rst b/Documentation/s390/index.rst
index 1a914da2a07b..4602312909d3 100644
--- a/Documentation/s390/index.rst
+++ b/Documentation/s390/index.rst
@@ -1,5 +1,3 @@
-:orphan:
-
 =
 s390 Architecture
 =
diff --git a/Documentation/sparc/index.rst b/Documentation/sparc/index.rst
index 91f7d6643dd5..71cff621f243 100644
--- a/Documentation/sparc/index.rst
+++ b/Documentation/sparc/index.rst
@@ -1,5 +1,3 @@
-:orphan:
-
 ==
 Sparc Architecture
 ==
diff --git a/Documentation/xtensa/index.rst b/Documentation/xtensa/index.rst
index 5a24e365e35f..239c5f0a5c67 100644
--- a/Documentation/xtensa/index.rst
+++ b/Documentation/xtensa/index.rst
@@ -1,5 +1,3 @@
-:orphan:
-
 ===
 Xtensa Architecture
 ===
-- 
2.21.0



[PATCH v1 16/22] docs: driver-api: add xilinx driver API documentation

2019-06-18 Thread Mauro Carvalho Chehab
The current file there (emmi) provides a description of
the driver uAPI and kAPI.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/driver-api/index.rst  | 1 +
 Documentation/{ => driver-api}/xilinx/eemi.rst  | 0
 Documentation/{ => driver-api}/xilinx/index.rst | 1 -
 3 files changed, 1 insertion(+), 1 deletion(-)
 rename Documentation/{ => driver-api}/xilinx/eemi.rst (100%)
 rename Documentation/{ => driver-api}/xilinx/index.rst (94%)

diff --git a/Documentation/driver-api/index.rst 
b/Documentation/driver-api/index.rst
index 492b96003af2..6935d973ff5b 100644
--- a/Documentation/driver-api/index.rst
+++ b/Documentation/driver-api/index.rst
@@ -124,6 +124,7 @@ available subsections can be seen below.
unaligned-memory-access
vfio
vfio-mediated-device
+   xilinx/index
xillybus
xz
zorro
diff --git a/Documentation/xilinx/eemi.rst 
b/Documentation/driver-api/xilinx/eemi.rst
similarity index 100%
rename from Documentation/xilinx/eemi.rst
rename to Documentation/driver-api/xilinx/eemi.rst
diff --git a/Documentation/xilinx/index.rst 
b/Documentation/driver-api/xilinx/index.rst
similarity index 94%
rename from Documentation/xilinx/index.rst
rename to Documentation/driver-api/xilinx/index.rst
index 01cc1a0714df..13f7589ed442 100644
--- a/Documentation/xilinx/index.rst
+++ b/Documentation/driver-api/xilinx/index.rst
@@ -1,4 +1,3 @@
-:orphan:
 
 ===
 Xilinx FPGA
-- 
2.21.0



Re: [PATCH v2 02/29] docs: lcd-panel-cgram.txt: convert docs to ReST and rename to *.rst

2019-06-18 Thread Miguel Ojeda
On Tue, Jun 18, 2019 at 10:56 PM Mauro Carvalho Chehab
 wrote:
>
> This small text file describes the usage of parallel port LCD
> displays from userspace PoV. So, a good candidate for the
> admin guide.
>
> While this is not part of the admin-guide book, mark it as
> :orphan:, in order to avoid build warnings.

If we are going to move everything else to `.rst` too, even things
outside the guide, then ack.

Cheers,
Miguel


Re: [PATCH v2 02/29] docs: lcd-panel-cgram.txt: convert docs to ReST and rename to *.rst

2019-06-18 Thread Mauro Carvalho Chehab
Em Tue, 18 Jun 2019 23:14:01 +0200
Miguel Ojeda  escreveu:

> On Tue, Jun 18, 2019 at 10:56 PM Mauro Carvalho Chehab
>  wrote:
> >
> > This small text file describes the usage of parallel port LCD
> > displays from userspace PoV. So, a good candidate for the
> > admin guide.
> >
> > While this is not part of the admin-guide book, mark it as
> > :orphan:, in order to avoid build warnings.  
> 
> If we are going to move everything else to `.rst` too, even things
> outside the guide, then ack.

Yeah, the plan is to move all text files inside Documentation/ to .rst[1].

[1] There are some exceptions: for ABI and features, the current plan
is to have a script that parses their strict formats and produce
a ReST output.


Btw, Still pending to be sent, I have already a patch removing the
:orphan: from this file and adding it to the admin guide:


https://git.linuxtv.org/mchehab/experimental.git/commit/?h=convert_rst_renames_v5.1&id=eae5b48cab115c83be8dd59ee99b9e45f8142134

And the corresponding output, after the patches I currently have:


https://www.infradead.org/~mchehab/rst_conversion/admin-guide/lcd-panel-cgram.html

Thanks,
Mauro


Re: [PATCH v4 23/28] docs: target: convert docs to ReST and rename to *.rst

2019-06-18 Thread Martin K. Petersen


Mauro,

> Convert the TCM docs to ReST format and add them to the
> bookset.

Looks good to me.

Acked-by: Martin K. Petersen 

-- 
Martin K. Petersen  Oracle Linux Engineering


[PATCH] docs: fb: Add TER16x32 to the available font names

2019-06-18 Thread Takashi Iwai
The new font is available since recently.

Signed-off-by: Takashi Iwai 
---
 Documentation/fb/fbcon.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/fb/fbcon.rst b/Documentation/fb/fbcon.rst
index cfb9f7c38f18..1da65b9000de 100644
--- a/Documentation/fb/fbcon.rst
+++ b/Documentation/fb/fbcon.rst
@@ -82,7 +82,7 @@ C. Boot options
 
Select the initial font to use. The value 'name' can be any of the
compiled-in fonts: 10x18, 6x10, 7x14, Acorn8x8, MINI4x6,
-   PEARL8x8, ProFont6x11, SUN12x22, SUN8x16, VGA8x16, VGA8x8.
+   PEARL8x8, ProFont6x11, SUN12x22, SUN8x16, TER16x32, VGA8x16, VGA8x8.
 
Note, not all drivers can handle font with widths not divisible by 8,
such as vga16fb.
-- 
2.16.4



Re: [PATCH v1 14/22] docs: usb: rename files to .rst and add them to drivers-api

2019-06-18 Thread Felipe Balbi
Mauro Carvalho Chehab  writes:

> While there are a mix of things here, most of the stuff
> were written from Kernel developer's PoV. So, add them to
> the driver-api book.
>
> A follow up for this patch would be to move documents from
> there that are specific to sysadmins, adding them to the
> admin-guide.
>
> Signed-off-by: Mauro Carvalho Chehab 

Acked-by: Felipe Balbi 

-- 
balbi


signature.asc
Description: PGP signature


Re: [PATCH v1 14/22] docs: usb: rename files to .rst and add them to drivers-api

2019-06-18 Thread Greg Kroah-Hartman
On Tue, Jun 18, 2019 at 06:05:38PM -0300, Mauro Carvalho Chehab wrote:
> While there are a mix of things here, most of the stuff
> were written from Kernel developer's PoV. So, add them to
> the driver-api book.
> 
> A follow up for this patch would be to move documents from
> there that are specific to sysadmins, adding them to the
> admin-guide.
> 
> Signed-off-by: Mauro Carvalho Chehab 

Acked-by: Greg Kroah-Hartman 


Re: [PATCH v1 14/22] docs: usb: rename files to .rst and add them to drivers-api

2019-06-18 Thread Greg Kroah-Hartman
On Tue, Jun 18, 2019 at 06:05:38PM -0300, Mauro Carvalho Chehab wrote:
> While there are a mix of things here, most of the stuff
> were written from Kernel developer's PoV. So, add them to
> the driver-api book.
> 
> A follow up for this patch would be to move documents from
> there that are specific to sysadmins, adding them to the
> admin-guide.
> 
> Signed-off-by: Mauro Carvalho Chehab 

Ah,  I guess I can take this through my tree, will do that later today.

thanks,

greg k-h