提交 dfd3b596 编写于 作者: N Nobuhiro Iwamatsu 提交者: Paul Mundt

sh: Fix cached/uncaced address calculation in 29bit mode

In the case of 29bit mode, CAC/UNCAC_ADDR does not return a right address.
This revises this problem by using P1SEGADDR and P2SEGADDR in 29bit mode.
Reported-by: NYutaro Ebihara <ebiharaml@si-linux.co.jp>
Signed-off-by: NNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Tested-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: NSimon Horman <horms@verge.net.au>
Cc: stable@kernel.org
Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
上级 1a67a573
...@@ -151,8 +151,13 @@ typedef struct page *pgtable_t; ...@@ -151,8 +151,13 @@ typedef struct page *pgtable_t;
#endif /* !__ASSEMBLY__ */ #endif /* !__ASSEMBLY__ */
#ifdef CONFIG_UNCACHED_MAPPING #ifdef CONFIG_UNCACHED_MAPPING
#if defined(CONFIG_29BIT)
#define UNCAC_ADDR(addr) P2SEGADDR(addr)
#define CAC_ADDR(addr) P1SEGADDR(addr)
#else
#define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + uncached_start) #define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + uncached_start)
#define CAC_ADDR(addr) ((addr) - uncached_start + PAGE_OFFSET) #define CAC_ADDR(addr) ((addr) - uncached_start + PAGE_OFFSET)
#endif
#else #else
#define UNCAC_ADDR(addr) ((addr)) #define UNCAC_ADDR(addr) ((addr))
#define CAC_ADDR(addr) ((addr)) #define CAC_ADDR(addr) ((addr))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册