]> 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)
commitfda28928e01418c42a6dd5f6ea236f23eefb80a8
treead57e44f77343fbfa31a368bffa0db97f8591e65
parent43092f3e605a739b3f5456bcb8b926674159f2d1
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