parisc: Convert MAP_TYPE to cover 4 bits on parisc
authorHelge Deller <deller@gmx.de>
Mon, 25 Sep 2017 22:21:27 +0000 (00:21 +0200)
committerHelge Deller <deller@gmx.de>
Tue, 27 Mar 2018 16:52:21 +0000 (18:52 +0200)
commitd5b59a71204b0a9a55eda633347b1214642bead3
treeb9f7cf5f4212a11892cea9decf2d830c58188fb7
parent184b922cb632371aa63a1d0ae5d9d9ea6434552d
parisc: Convert MAP_TYPE to cover 4 bits on parisc

On parisc we want to be as much as possible compatible to the major
architectures like x86. Those architectures have MAP_TYPE defined as 0x0f which
covers MAP_SHARED and MAP_PRIVATE and leaves two more bits unused.

In contrast, on parisc we have MAP_TYPE defined to 0x03 which covers MAP_SHARED
and MAP_PRIVATE only. But we don't have the 2 bits free as x86.

Usually that's not a problem, but during the discussions for pmem+dax support
the idea came up to use the two remaining bits of MAP_TYPE (on x86 and others)
for the new MAP_DIRECT and MAP_SYNC flags. One requirement is, that an old
kernel should correctly handle MAP_DIRECT and MAP_SYNC and fail on those if
set. This only works if MAP_TYPE has 4 bits.

Even though the pmem+dax people now choosed another solution via
MAP_SHARED_VALIDATE, let's still proceed to be more compatible to x86 by adding
two more bits for future usage.

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: John David Anglin <dave.anglin@bell.net>
arch/parisc/include/uapi/asm/mman.h