Skip to content

Commit 3f09138

Browse files
committed
parisc: shmparam.h: Document aliasing requirements of PA-RISC
Add some documentation why PA-RISC uses SHMLBA and SHM_COLOUR. Signed-off-by: Helge Deller <deller@gmx.de>
1 parent b1bef13 commit 3f09138

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

arch/parisc/include/asm/shmparam.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22
#ifndef _ASMPARISC_SHMPARAM_H
33
#define _ASMPARISC_SHMPARAM_H
44

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

0 commit comments

Comments
 (0)