2017-05-19 01:22:05

by Mauro Carvalho Chehab

[permalink] [raw]
Subject: [PATCH 00/31] Standardize doc formats - part 1

Each document under Documentation/*.txt has its own format.
Some follow markup notations, some don't even have a title!

In order to try to get some order on it, change the document
style to the standard we're adopting after the adoption of
ReStructured Text.

The documents touched on this series now build fine with
Sphinx, if renamed to *.rst extension.

The main goal with this is to teach people by example about
what format is expected on newer documents. It also helps
to add those files to Kernel books.

In order to make things more palatable, I'm spliting the
conversion into three parts.

This is part 1.

Mauro Carvalho Chehab (31):
bcache.txt: standardize document format
bt8xxgpio.txt: standardize document format
btmrvl.txt: standardize document format
bus-virt-phys-mapping.txt: standardize document format
cachetlb.txt: standardize document format
cgroup-v2.txt: standardize document format
circular-buffers.txt: standardize document format
clk.txt: standardize document format
cpu-load: standardize document format
cputopology.txt: standardize document format
crc32.txt: standardize document format
dcdbas.txt: standardize document format
digsig.txt: standardize document format
DMA-API.txt: standardize document format
DMA-API-HOWTO.txt: standardize document format
DMA-attributes.txt: standardize document format
DMA-ISA-LPC.txt: standardize document format
debugging-via-ohci1394.txt: standardize document format
efi-stub.txt: standardize document format
eisa.txt: standardize document format
flexible-arrays.txt: standardize document format
futex-requeue-pi.txt: standardize document format
gcc-plugins.txt: standardize document format
highuid.txt: standardize document format
hw_random.txt: standardize document format
hwspinlock.txt: standardize document format
intel_txt.txt: standardize document format
Intel-IOMMU.txt: standardize document format
io-mapping.txt: standardize document format
io_ordering.txt: standardize document format
iostats.txt: standardize document format

Documentation/DMA-API-HOWTO.txt | 159 +++++----
Documentation/DMA-API.txt | 575 ++++++++++++++++++-------------
Documentation/DMA-ISA-LPC.txt | 71 ++--
Documentation/DMA-attributes.txt | 15 +-
Documentation/Intel-IOMMU.txt | 36 +-
Documentation/bcache.txt | 200 ++++++-----
Documentation/bt8xxgpio.txt | 19 +-
Documentation/btmrvl.txt | 64 ++--
Documentation/bus-virt-phys-mapping.txt | 63 ++--
Documentation/cachetlb.txt | 92 ++---
Documentation/cgroup-v2.txt | 449 ++++++++++++------------
Documentation/circular-buffers.txt | 51 ++-
Documentation/clk.txt | 189 +++++-----
Documentation/cpu-load.txt | 117 +++----
Documentation/cputopology.txt | 35 +-
Documentation/crc32.txt | 75 ++--
Documentation/dcdbas.txt | 24 +-
Documentation/debugging-via-ohci1394.txt | 21 +-
Documentation/digsig.txt | 124 +++----
Documentation/efi-stub.txt | 25 +-
Documentation/eisa.txt | 260 +++++++-------
Documentation/flexible-arrays.txt | 24 +-
Documentation/futex-requeue-pi.txt | 83 ++---
Documentation/gcc-plugins.txt | 58 ++--
Documentation/highuid.txt | 46 +--
Documentation/hw_random.txt | 158 +++++----
Documentation/hwspinlock.txt | 527 ++++++++++++++++------------
Documentation/intel_txt.txt | 63 ++--
Documentation/io-mapping.txt | 67 ++--
Documentation/io_ordering.txt | 61 ++--
Documentation/iostats.txt | 40 ++-
31 files changed, 2101 insertions(+), 1690 deletions(-)

--
2.9.4




2017-05-19 01:22:30

by Mauro Carvalho Chehab

[permalink] [raw]
Subject: [PATCH 25/31] hw_random.txt: standardize document format

Each text file under Documentation follows a different
format. Some doesn't even have titles!

Change its representation to follow the adopted standard,
using ReST markups for it to be parseable by Sphinx:

- use proper markups for titles;
- adjust section identation;
- use proper markup for notes and fix it to properly show the
numbered list.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
---
Documentation/hw_random.txt | 158 ++++++++++++++++++++++++--------------------
1 file changed, 86 insertions(+), 72 deletions(-)

diff --git a/Documentation/hw_random.txt b/Documentation/hw_random.txt
index fce1634907d0..865e997d9d3b 100644
--- a/Documentation/hw_random.txt
+++ b/Documentation/hw_random.txt
@@ -1,90 +1,104 @@
-Introduction:
-
- The hw_random framework is software that makes use of a
- special hardware feature on your CPU or motherboard,
- a Random Number Generator (RNG). The software has two parts:
- a core providing the /dev/hwrng character device and its
- sysfs support, plus a hardware-specific driver that plugs
- into that core.
-
- To make the most effective use of these mechanisms, you
- should download the support software as well. Download the
- latest version of the "rng-tools" package from the
- hw_random driver's official Web site:
-
- http://sourceforge.net/projects/gkernel/
-
- Those tools use /dev/hwrng to fill the kernel entropy pool,
- which is used internally and exported by the /dev/urandom and
- /dev/random special files.
-
-Theory of operation:
-
- CHARACTER DEVICE. Using the standard open()
- and read() system calls, you can read random data from
- the hardware RNG device. This data is NOT CHECKED by any
- fitness tests, and could potentially be bogus (if the
- hardware is faulty or has been tampered with). Data is only
- output if the hardware "has-data" flag is set, but nevertheless
- a security-conscious person would run fitness tests on the
- data before assuming it is truly random.
-
- The rng-tools package uses such tests in "rngd", and lets you
- run them by hand with a "rngtest" utility.
-
- /dev/hwrng is char device major 10, minor 183.
-
- CLASS DEVICE. There is a /sys/class/misc/hw_random node with
- two unique attributes, "rng_available" and "rng_current". The
- "rng_available" attribute lists the hardware-specific drivers
- available, while "rng_current" lists the one which is currently
- connected to /dev/hwrng. If your system has more than one
- RNG available, you may change the one used by writing a name from
- the list in "rng_available" into "rng_current".
+Linux support for random number generator in i8xx chipsets
+==========================================================
+
+Introduction
+============
+
+The hw_random framework is software that makes use of a
+special hardware feature on your CPU or motherboard,
+a Random Number Generator (RNG). The software has two parts:
+a core providing the /dev/hwrng character device and its
+sysfs support, plus a hardware-specific driver that plugs
+into that core.
+
+To make the most effective use of these mechanisms, you
+should download the support software as well. Download the
+latest version of the "rng-tools" package from the
+hw_random driver's official Web site:
+
+ http://sourceforge.net/projects/gkernel/
+
+Those tools use /dev/hwrng to fill the kernel entropy pool,
+which is used internally and exported by the /dev/urandom and
+/dev/random special files.
+
+Theory of operation
+===================
+
+CHARACTER DEVICE. Using the standard open()
+and read() system calls, you can read random data from
+the hardware RNG device. This data is NOT CHECKED by any
+fitness tests, and could potentially be bogus (if the
+hardware is faulty or has been tampered with). Data is only
+output if the hardware "has-data" flag is set, but nevertheless
+a security-conscious person would run fitness tests on the
+data before assuming it is truly random.
+
+The rng-tools package uses such tests in "rngd", and lets you
+run them by hand with a "rngtest" utility.
+
+/dev/hwrng is char device major 10, minor 183.
+
+CLASS DEVICE. There is a /sys/class/misc/hw_random node with
+two unique attributes, "rng_available" and "rng_current". The
+"rng_available" attribute lists the hardware-specific drivers
+available, while "rng_current" lists the one which is currently
+connected to /dev/hwrng. If your system has more than one
+RNG available, you may change the one used by writing a name from
+the list in "rng_available" into "rng_current".

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

- Hardware driver for Intel/AMD/VIA Random Number Generators (RNG)
- Copyright 2000,2001 Jeff Garzik <[email protected]>
- Copyright 2000,2001 Philipp Rumpf <[email protected]>

+Hardware driver for Intel/AMD/VIA Random Number Generators (RNG)
+ - Copyright 2000,2001 Jeff Garzik <[email protected]>
+ - Copyright 2000,2001 Philipp Rumpf <[email protected]>

-About the Intel RNG hardware, from the firmware hub datasheet:

- The Firmware Hub integrates a Random Number Generator (RNG)
- using thermal noise generated from inherently random quantum
- mechanical properties of silicon. When not generating new random
- bits the RNG circuitry will enter a low power state. Intel will
- provide a binary software driver to give third party software
- access to our RNG for use as a security feature. At this time,
- the RNG is only to be used with a system in an OS-present state.
+About the Intel RNG hardware, from the firmware hub datasheet
+=============================================================

-Intel RNG Driver notes:
+The Firmware Hub integrates a Random Number Generator (RNG)
+using thermal noise generated from inherently random quantum
+mechanical properties of silicon. When not generating new random
+bits the RNG circuitry will enter a low power state. Intel will
+provide a binary software driver to give third party software
+access to our RNG for use as a security feature. At this time,
+the RNG is only to be used with a system in an OS-present state.

- * FIXME: support poll(2)
+Intel RNG Driver notes
+======================

- NOTE: request_mem_region was removed, for three reasons:
- 1) Only one RNG is supported by this driver, 2) The location
- used by the RNG is a fixed location in MMIO-addressable memory,
+FIXME: support poll(2)
+
+.. note::
+
+ request_mem_region was removed, for three reasons:
+
+ 1) Only one RNG is supported by this driver;
+ 2) The location used by the RNG is a fixed location in
+ MMIO-addressable memory;
3) users with properly working BIOS e820 handling will always
- have the region in which the RNG is located reserved, so
- request_mem_region calls always fail for proper setups.
- However, for people who use mem=XX, BIOS e820 information is
- -not- in /proc/iomem, and request_mem_region(RNG_ADDR) can
- succeed.
+ have the region in which the RNG is located reserved, so
+ request_mem_region calls always fail for proper setups.
+ However, for people who use mem=XX, BIOS e820 information is
+ **not** in /proc/iomem, and request_mem_region(RNG_ADDR) can
+ succeed.

-Driver details:
+Driver details
+==============

- Based on:
+Based on:
Intel 82802AB/82802AC Firmware Hub (FWH) Datasheet
- May 1999 Order Number: 290658-002 R
+ May 1999 Order Number: 290658-002 R

- Intel 82802 Firmware Hub: Random Number Generator
+Intel 82802 Firmware Hub:
+ Random Number Generator
Programmer's Reference Manual
- December 1999 Order Number: 298029-001 R
+ December 1999 Order Number: 298029-001 R

- Intel 82802 Firmware HUB Random Number Generator Driver
+Intel 82802 Firmware HUB Random Number Generator Driver
Copyright (c) 2000 Matt Sottek <[email protected]>

- Special thanks to Matt Sottek. I did the "guts", he
- did the "brains" and all the testing.
+Special thanks to Matt Sottek. I did the "guts", he
+did the "brains" and all the testing.
--
2.9.4


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/