isa.c 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // SPDX-License-Identifier: GPL-2.0-or-later
  2. /*
  3. * linux/arch/arm/kernel/isa.c
  4. *
  5. * Copyright (C) 1999 Phil Blundell
  6. *
  7. * ISA shared memory and I/O port support, and is required to support
  8. * iopl, inb, outb and friends in userspace via glibc emulation.
  9. */
  10. #include <linux/stddef.h>
  11. #include <linux/types.h>
  12. #include <linux/fs.h>
  13. #include <linux/sysctl.h>
  14. #include <linux/init.h>
  15. #include <linux/io.h>
  16. static unsigned int isa_membase, isa_portbase, isa_portshift;
  17. static struct ctl_table ctl_isa_vars[] = {
  18. {
  19. .procname = "membase",
  20. .data = &isa_membase,
  21. .maxlen = sizeof(isa_membase),
  22. .mode = 0444,
  23. .proc_handler = proc_dointvec,
  24. }, {
  25. .procname = "portbase",
  26. .data = &isa_portbase,
  27. .maxlen = sizeof(isa_portbase),
  28. .mode = 0444,
  29. .proc_handler = proc_dointvec,
  30. }, {
  31. .procname = "portshift",
  32. .data = &isa_portshift,
  33. .maxlen = sizeof(isa_portshift),
  34. .mode = 0444,
  35. .proc_handler = proc_dointvec,
  36. },
  37. };
  38. static struct ctl_table_header *isa_sysctl_header;
  39. void __init
  40. register_isa_ports(unsigned int membase, unsigned int portbase, unsigned int portshift)
  41. {
  42. isa_membase = membase;
  43. isa_portbase = portbase;
  44. isa_portshift = portshift;
  45. isa_sysctl_header = register_sysctl("bus/isa", ctl_isa_vars);
  46. }