Ignore:
Timestamp:
Apr 14, 2017, 9:41:36 PM (11 days ago)
Author:
brainslayer
Message:

kernel update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/linux/universal/linux-4.9/arch/xtensa/include/asm/page.h

    r31574 r31859  
    165165#define ARCH_PFN_OFFSET         (PHYS_OFFSET >> PAGE_SHIFT)
    166166
     167#ifdef CONFIG_MMU
     168static inline unsigned long ___pa(unsigned long va)
     169{
     170        unsigned long off = va - PAGE_OFFSET;
     171
     172        if (off >= XCHAL_KSEG_SIZE)
     173                off -= XCHAL_KSEG_SIZE;
     174
     175        return off + PHYS_OFFSET;
     176}
     177#define __pa(x) ___pa((unsigned long)(x))
     178#else
    167179#define __pa(x) \
    168180        ((unsigned long) (x) - PAGE_OFFSET + PHYS_OFFSET)
     181#endif
    169182#define __va(x) \
    170183        ((void *)((unsigned long) (x) - PHYS_OFFSET + PAGE_OFFSET))
Note: See TracChangeset for help on using the changeset viewer.