shmparam.h 968 B

1234567891011121314151617181920212223
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _ASMPARISC_SHMPARAM_H
  3. #define _ASMPARISC_SHMPARAM_H
  4. /*
  5. * PA-RISC uses virtually indexed & physically tagged (VIPT) caches
  6. * which has strict requirements when two pages to the same physical
  7. * address are accessed through different mappings. Read the section
  8. * "Address Aliasing" in the arch docs for more detail:
  9. * PA-RISC 1.1 (page 3-6):
  10. * https://parisc.wiki.kernel.org/images-parisc/6/68/Pa11_acd.pdf
  11. * PA-RISC 2.0 (page F-5):
  12. * https://parisc.wiki.kernel.org/images-parisc/7/73/Parisc2.0.pdf
  13. *
  14. * For Linux we allow kernel and userspace to map pages on page size
  15. * granularity (SHMLBA) but have to ensure that, if two pages are
  16. * mapped to the same physical address, the virtual and physical
  17. * addresses modulo SHM_COLOUR are identical.
  18. */
  19. #define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
  20. #define SHM_COLOUR 0x00400000 /* shared mappings colouring */
  21. #endif /* _ASMPARISC_SHMPARAM_H */