Older sparc64 must have a VAC because there is concern that mmapping fixed
and shared with incorrect align would cause cache aliases. To my knowledge
this is not an issue for sun4v. I will eventually research this.
The patch appears required for uek4 too.
We will enforce the rigid alignment condition only for tlb_type != hypervisor.
Orabug:
20426304
Signed-off-by: Bob Picco <bob.picco@oracle.com>
(cherry picked from commit
88b6df6b74de358992b2b58dab018672606975c7)
(cherry picked from commit
3daf2db176d2f874446d74839635e9bbaffccc7f)
/* We do not accept a shared mapping if it would violate
* cache aliasing constraints.
*/
- if ((flags & MAP_SHARED) &&
+ if ((flags & MAP_SHARED) && (tlb_type != hypervisor) &&
((addr - (pgoff << PAGE_SHIFT)) & (SHMLBA - 1)))
return -EINVAL;
return addr;
/* We do not accept a shared mapping if it would violate
* cache aliasing constraints.
*/
- if ((flags & MAP_SHARED) &&
+ if ((flags & MAP_SHARED) && (tlb_type != hypervisor) &&
((addr - (pgoff << PAGE_SHIFT)) & (SHMLBA - 1)))
return -EINVAL;
return addr;