From: Sanath Kumar Date: Mon, 10 Apr 2017 21:52:32 +0000 (-0500) Subject: sparc64: DAX request for non 4MB memory should return with unique errno X-Git-Tag: v4.1.12-98.0.20170517_2143~33^2~6 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=f9ed59900b00a092f72a85d7ff54c2f0e789810c;p=users%2Fjedix%2Flinux-maple.git sparc64: DAX request for non 4MB memory should return with unique errno Orabug:25852910 With this change libdax can detect that mmap failed due to lack of flow control in DAX HW and it can proceed with dax_subpage allocation. Reviewed-by: Rob Gardner Signed-off-by: Sanath Kumar Signed-off-by: Allen Pais --- diff --git a/arch/sparc/dax/dax_mm.c b/arch/sparc/dax/dax_mm.c index 510672d85539..031767e9bda9 100644 --- a/arch/sparc/dax/dax_mm.c +++ b/arch/sparc/dax/dax_mm.c @@ -44,6 +44,7 @@ static int dax_alloc_ram(struct file *filp, struct vm_area_struct *vma) if (dax_no_flow_ctl && len != DAX_SYN_LARGE_PAGE_SIZE) { dax_map_dbg("unsupported length 0x%lx != 0x%lx virtual page size", len, DAX_SYN_LARGE_PAGE_SIZE); + ret = -EOVERFLOW; goto done; }