[lkml]   [2011]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[06/26] sh: Fix cached/uncaced address calculation in 29bit mode
    3.1-stable review patch.  If anyone has any objections, please let me know.


    From: Nobuhiro Iwamatsu <>

    commit dfd3b596fbbfa48b8e7966ef996d587157554b69 upstream.

    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: Yutaro Ebihara <>
    Signed-off-by: Nobuhiro Iwamatsu <>
    Tested-by: Kuninori Morimoto <>
    Tested-by: Simon Horman <>
    Signed-off-by: Paul Mundt <>
    Signed-off-by: Greg Kroah-Hartman <>

    arch/sh/include/asm/page.h | 5 +++++
    1 file changed, 5 insertions(+)

    --- a/arch/sh/include/asm/page.h
    +++ b/arch/sh/include/asm/page.h
    @@ -141,8 +141,13 @@ typedef struct page *pgtable_t;
    #endif /* !__ASSEMBLY__ */

    +#if defined(CONFIG_29BIT)
    +#define UNCAC_ADDR(addr) P2SEGADDR(addr)
    +#define CAC_ADDR(addr) P1SEGADDR(addr)
    #define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + uncached_start)
    #define CAC_ADDR(addr) ((addr) - uncached_start + PAGE_OFFSET)
    #define UNCAC_ADDR(addr) ((addr))
    #define CAC_ADDR(addr) ((addr))

     \ /
      Last update: 2011-11-19 01:15    [W:0.019 / U:13.156 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site