Find the answer to your Linux question:
Results 1 to 2 of 2
Hi All, I am trying to compile MIPS kernel, i am getting an error. /include/stt_mem.h: In function 'stt_virt_to_phys': /include/stt_mem.h:31: error: 'PAGE_OFFSET' undeclared (first use in this function) /include/stt_mem.h: In function ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2008
    Posts
    26

    Unhappy 'PAGE_OFFSET' undeclared


    Hi All,

    I am trying to compile MIPS kernel, i am getting an error.

    /include/stt_mem.h: In function 'stt_virt_to_phys':
    /include/stt_mem.h:31: error: 'PAGE_OFFSET' undeclared (first use in this function)
    /include/stt_mem.h: In function 'stt_phys_to_virt':
    include/stt_mem.h:39: error: 'PAGE_OFFSET' undeclared (first use in this function)

    In stt_mem.h file,

    static inline unsigned long stt_virt_to_phys(void *virt)
    {
    return __pa(virt); ------> Line 31
    }

    static inline void *stt_phys_to_virt(unsigned long phys)
    {
    return (void *)__va(phys); ------------> line 39
    }

    i am getting no idea, how to solve this error.

    Please help me out of this problem

    Thanks in advance.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    11,167
    PAGE_OFFSET is defined in <kernel-source-dir>/include/asm-generic/page.h as
    Code:
    #ifdef CONFIG_KERNEL_RAM_BASE_ADDRESS
    #define PAGE_OFFSET             (CONFIG_KERNEL_RAM_BASE_ADDRESS)
    #else
    #define PAGE_OFFSET             (0)
    #endif
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •