hardwall.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * Copyright 2010 Tilera Corporation. All Rights Reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * as published by the Free Software Foundation, version 2.
  7. *
  8. * This program is distributed in the hope that it will be useful, but
  9. * WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
  11. * NON INFRINGEMENT. See the GNU General Public License for
  12. * more details.
  13. *
  14. * Provide methods for the HARDWALL_FILE for accessing the UDN.
  15. */
  16. #ifndef _ASM_TILE_HARDWALL_H
  17. #define _ASM_TILE_HARDWALL_H
  18. #include <linux/ioctl.h>
  19. #define HARDWALL_IOCTL_BASE 0xa2
  20. /*
  21. * The HARDWALL_CREATE() ioctl is a macro with a "size" argument.
  22. * The resulting ioctl value is passed to the kernel in conjunction
  23. * with a pointer to a little-endian bitmask of cpus, which must be
  24. * physically in a rectangular configuration on the chip.
  25. * The "size" is the number of bytes of cpu mask data.
  26. */
  27. #define _HARDWALL_CREATE 1
  28. #define HARDWALL_CREATE(size) \
  29. _IOC(_IOC_READ, HARDWALL_IOCTL_BASE, _HARDWALL_CREATE, (size))
  30. #define _HARDWALL_ACTIVATE 2
  31. #define HARDWALL_ACTIVATE \
  32. _IO(HARDWALL_IOCTL_BASE, _HARDWALL_ACTIVATE)
  33. #define _HARDWALL_DEACTIVATE 3
  34. #define HARDWALL_DEACTIVATE \
  35. _IO(HARDWALL_IOCTL_BASE, _HARDWALL_DEACTIVATE)
  36. #ifndef __KERNEL__
  37. /* This is the canonical name expected by userspace. */
  38. #define HARDWALL_FILE "/dev/hardwall"
  39. #else
  40. /* Hook for /proc/tile/hardwall. */
  41. struct seq_file;
  42. int proc_tile_hardwall_show(struct seq_file *sf, void *v);
  43. #endif
  44. #endif /* _ASM_TILE_HARDWALL_H */