Skip to content
Snippets Groups Projects
  • Lijun Pan's avatar
    8f2df5d3
    linux/compat.h: port lower_32_bits and upper_32_bits from Linux · 8f2df5d3
    Lijun Pan authored
    
    [backport from linux commit 204b885e and 218e180e7]
    64 bit processors are becomming more and more popular.
    lower_32_bits and upper_32_bits save our labor doing
    shifts/manipulations like (u32)(n) and (u32)((n) >> 32).
    They are good helpers in both little and big endian cases.
    Port these two functions here from Linux:include/linux/kernel.h,
    cater the comment message to little/big endian cases.
    Later on, developers could include linux/compat.h if they want to
    use these two functions.
    
    Signed-off-by: default avatarLijun Pan <Lijun.Pan@freescale.com>
    8f2df5d3
    History
    linux/compat.h: port lower_32_bits and upper_32_bits from Linux
    Lijun Pan authored
    
    [backport from linux commit 204b885e and 218e180e7]
    64 bit processors are becomming more and more popular.
    lower_32_bits and upper_32_bits save our labor doing
    shifts/manipulations like (u32)(n) and (u32)((n) >> 32).
    They are good helpers in both little and big endian cases.
    Port these two functions here from Linux:include/linux/kernel.h,
    cater the comment message to little/big endian cases.
    Later on, developers could include linux/compat.h if they want to
    use these two functions.
    
    Signed-off-by: default avatarLijun Pan <Lijun.Pan@freescale.com>