lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 7 Apr 2016 10:47:23 -0400 From: William Breathitt Gray <vilhelm.gray@...il.com> To: gregkh@...uxfoundation.org, tglx@...utronix.de, jic23@...nel.org, knaack.h@....de, lars@...afoo.de, pmeerw@...erw.net, wim@...ana.be, linux@...ck-us.net, linus.walleij@...aro.org, gnurou@...il.com Cc: linux-kernel@...r.kernel.org, linux-iio@...r.kernel.org, linux-watchdog@...r.kernel.org, linux-gpio@...r.kernel.org, William Breathitt Gray <vilhelm.gray@...il.com> Subject: [PATCH 02/10] isa: Implement the max_num_isa_dev macro max_num_isa_dev is a macro to determine the maximum possible number of ISA devices which may be registered in the I/O port address space given the address extent of the ISA devices. The highest base address possible for an ISA device is 0x3FF; this results in 1024 possible base addresses. Dividing the number of possible base addresses by the address extent taken by each device results in the maximum number of devices on a system. Signed-off-by: William Breathitt Gray <vilhelm.gray@...il.com> --- include/linux/isa.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/linux/isa.h b/include/linux/isa.h index d410259..bc0a7c0 100644 --- a/include/linux/isa.h +++ b/include/linux/isa.h @@ -57,4 +57,15 @@ static void __exit __isa_driver##_exit(void) \ } \ module_exit(__isa_driver##_exit); +/** + * max_num_isa_dev() - Maximum possible number registered of an ISA device + * @__ida_dev_ext: ISA device address extent + * + * The highest base address possible for an ISA device is 0x3FF; this results in + * 1024 possible base addresses. Dividing the number of possible base addresses + * by the address extent taken by each device results in the maximum number of + * devices on a system. + */ +#define max_num_isa_dev(__isa_dev_ext) (1024 / __isa_dev_ext) + #endif /* __LINUX_ISA_H */ -- 2.7.3
Powered by blists - more mailing lists