>>>>> On Thu, 25 Apr 2002 11:46:04 -0700, Jun Sun <firstname.lastname@example.org> said:
>> #define COLOUR_ALIGN(addr,pgoff) \ ((((addr)+SHMLBA-1)&~(SHMLBA-1))
>> + \ (((pgoff)<<PAGE_SHIFT) & (SHMLBA-1)))
jsun> What is the purpose of adding the pgoff part? To avoid mapping
jsun> all shared regions into the beginning of cache?
I suppose so. For example, mmapping offset 0x1000 of /dev/kmem will
return 0xXXXX0000 address if we ignore pgoff. This can cause aliasing
problem with KSEG0 address (0x80001000). Adding pgoff, mmap will
In case of IPC shm, pgoff is always 0 so this change does not effect.