]> git.baikalelectronics.ru Git - kernel.git/commit
Annotate module params that specify hardware parameters (eg. ioport)
authorDavid Howells <dhowells@redhat.com>
Tue, 4 Apr 2017 15:54:21 +0000 (16:54 +0100)
committerDavid Howells <dhowells@redhat.com>
Tue, 4 Apr 2017 15:54:21 +0000 (16:54 +0100)
commit6662bf2d87978d9a3ad62eab6714c65152f20a0b
treead57e44f77343fbfa31a368bffa0db97f8591e65
parent6a0cf49b3f11df5a697687f2ebb3edb855f33e65
Annotate module params that specify hardware parameters (eg. ioport)

Provided an annotation for module parameters that specify hardware
parameters (such as io ports, iomem addresses, irqs, dma channels, fixed
dma buffers and other types).

This will enable such parameters to be locked down in the core parameter
parser for secure boot support.

I've also included annotations as to what sort of hardware configuration
each module is dealing with for future use.  Some of these are
straightforward (ioport, iomem, irq, dma), but there are also:

 (1) drivers that switch the semantics of a parameter between ioport and
     iomem depending on a second parameter,

 (2) drivers that appear to reserve a CPU memory buffer at a fixed address,

 (3) other parameters, such as bus types and irq selection bitmasks.

For the moment, the hardware configuration type isn't actually stored,
though its validity is checked.

Signed-off-by: David Howells <dhowells@redhat.com>
include/linux/moduleparam.h