lkml.org 
[lkml]   [2018]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next 2/3] net: ethernet: freescale: Allow FEC with COMPILE_TEST
Hi Florian,

I love your patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]

url: https://github.com/0day-ci/linux/commits/Florian-Fainelli/net-Allow-more-drivers-with-COMPILE_TEST/20180517-092807
config: m68k-allyesconfig (attached as .config)
compiler: m68k-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=m68k

All warnings (new ones prefixed by >>):

In file included from include/linux/swab.h:5:0,
from include/uapi/linux/byteorder/big_endian.h:13,
from include/linux/byteorder/big_endian.h:5,
from arch/m68k/include/uapi/asm/byteorder.h:5,
from include/asm-generic/bitops/le.h:6,
from arch/m68k/include/asm/bitops.h:519,
from include/linux/bitops.h:38,
from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/module.h:9,
from drivers/net/ethernet/freescale/fec_main.c:24:
drivers/net/ethernet/freescale/fec_main.c: In function 'fec_restart':
drivers/net/ethernet/freescale/fec_main.c:959:26: error: 'FEC_RACC' undeclared (first use in this function); did you mean 'FEC_RXIC0'?
val = readl(fep->hwp + FEC_RACC);
^
include/uapi/linux/swab.h:117:32: note: in definition of macro '__swab32'
(__builtin_constant_p((__u32)(x)) ? \
^
>> include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
#define le32_to_cpu __le32_to_cpu
^~~~~~~~~~~~~
>> arch/m68k/include/asm/io_mm.h:452:26: note: in expansion of macro 'in_le32'
#define readl(addr) in_le32(addr)
^~~~~~~
>> drivers/net/ethernet/freescale/fec_main.c:959:9: note: in expansion of macro 'readl'
val = readl(fep->hwp + FEC_RACC);
^~~~~
drivers/net/ethernet/freescale/fec_main.c:959:26: note: each undeclared identifier is reported only once for each function it appears in
val = readl(fep->hwp + FEC_RACC);
^
include/uapi/linux/swab.h:117:32: note: in definition of macro '__swab32'
(__builtin_constant_p((__u32)(x)) ? \
^
>> include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
#define le32_to_cpu __le32_to_cpu
^~~~~~~~~~~~~
>> arch/m68k/include/asm/io_mm.h:452:26: note: in expansion of macro 'in_le32'
#define readl(addr) in_le32(addr)
^~~~~~~
>> drivers/net/ethernet/freescale/fec_main.c:959:9: note: in expansion of macro 'readl'
val = readl(fep->hwp + FEC_RACC);
^~~~~
In file included from arch/m68k/include/asm/io_mm.h:27:0,
from arch/m68k/include/asm/io.h:5,
from include/linux/scatterlist.h:9,
from include/linux/dma-mapping.h:11,
from include/linux/skbuff.h:34,
from include/linux/if_ether.h:23,
from include/uapi/linux/ethtool.h:19,
from include/linux/ethtool.h:18,
from include/linux/netdevice.h:41,
from drivers/net/ethernet/freescale/fec_main.c:34:
drivers/net/ethernet/freescale/fec_main.c:968:38: error: 'FEC_FTRL' undeclared (first use in this function); did you mean 'FEC_ECNTRL'?
writel(PKT_MAXBUF_SIZE, fep->hwp + FEC_FTRL);
^
arch/m68k/include/asm/raw_io.h:48:64: note: in definition of macro 'out_le32'
#define out_le32(addr,l) (void)((*(__force volatile __le32 *) (addr)) = cpu_to_le32(l))
^~~~
>> drivers/net/ethernet/freescale/fec_main.c:968:3: note: in expansion of macro 'writel'
writel(PKT_MAXBUF_SIZE, fep->hwp + FEC_FTRL);
^~~~~~
drivers/net/ethernet/freescale/fec_main.c:1034:38: error: 'FEC_R_FIFO_RSEM' undeclared (first use in this function); did you mean 'FEC_FIFO_RAM'?
writel(FEC_ENET_RSEM_V, fep->hwp + FEC_R_FIFO_RSEM);
^
arch/m68k/include/asm/raw_io.h:48:64: note: in definition of macro 'out_le32'
#define out_le32(addr,l) (void)((*(__force volatile __le32 *) (addr)) = cpu_to_le32(l))
^~~~
drivers/net/ethernet/freescale/fec_main.c:1034:3: note: in expansion of macro 'writel'
writel(FEC_ENET_RSEM_V, fep->hwp + FEC_R_FIFO_RSEM);
^~~~~~
drivers/net/ethernet/freescale/fec_main.c:1035:38: error: 'FEC_R_FIFO_RSFL' undeclared (first use in this function); did you mean 'FEC_R_FIFO_RSEM'?
writel(FEC_ENET_RSFL_V, fep->hwp + FEC_R_FIFO_RSFL);
^
arch/m68k/include/asm/raw_io.h:48:64: note: in definition of macro 'out_le32'
#define out_le32(addr,l) (void)((*(__force volatile __le32 *) (addr)) = cpu_to_le32(l))
^~~~
drivers/net/ethernet/freescale/fec_main.c:1035:3: note: in expansion of macro 'writel'
writel(FEC_ENET_RSFL_V, fep->hwp + FEC_R_FIFO_RSFL);
^~~~~~
drivers/net/ethernet/freescale/fec_main.c:1036:38: error: 'FEC_R_FIFO_RAEM' undeclared (first use in this function); did you mean 'FEC_R_FIFO_RSEM'?
writel(FEC_ENET_RAEM_V, fep->hwp + FEC_R_FIFO_RAEM);
^
arch/m68k/include/asm/raw_io.h:48:64: note: in definition of macro 'out_le32'
#define out_le32(addr,l) (void)((*(__force volatile __le32 *) (addr)) = cpu_to_le32(l))
^~~~
drivers/net/ethernet/freescale/fec_main.c:1036:3: note: in expansion of macro 'writel'
writel(FEC_ENET_RAEM_V, fep->hwp + FEC_R_FIFO_RAEM);
^~~~~~
drivers/net/ethernet/freescale/fec_main.c:1037:38: error: 'FEC_R_FIFO_RAFL' undeclared (first use in this function); did you mean 'FEC_R_FIFO_RSFL'?
writel(FEC_ENET_RAFL_V, fep->hwp + FEC_R_FIFO_RAFL);
^
arch/m68k/include/asm/raw_io.h:48:64: note: in definition of macro 'out_le32'
#define out_le32(addr,l) (void)((*(__force volatile __le32 *) (addr)) = cpu_to_le32(l))
^~~~
drivers/net/ethernet/freescale/fec_main.c:1037:3: note: in expansion of macro 'writel'
writel(FEC_ENET_RAFL_V, fep->hwp + FEC_R_FIFO_RAFL);
^~~~~~
drivers/net/ethernet/freescale/fec_main.c:1040:37: error: 'FEC_OPD' undeclared (first use in this function); did you mean 'FEC_H'?
writel(FEC_ENET_OPD_V, fep->hwp + FEC_OPD);
^
arch/m68k/include/asm/raw_io.h:48:64: note: in definition of macro 'out_le32'
#define out_le32(addr,l) (void)((*(__force volatile __le32 *) (addr)) = cpu_to_le32(l))
^~~~
drivers/net/ethernet/freescale/fec_main.c:1040:3: note: in expansion of macro 'writel'
writel(FEC_ENET_OPD_V, fep->hwp + FEC_OPD);
^~~~~~
drivers/net/ethernet/freescale/fec_main.c:1051:23: error: 'FEC_HASH_TABLE_HIGH' undeclared (first use in this function); did you mean 'FEC_GRP_HASH_TABLE_HIGH'?
writel(0, fep->hwp + FEC_HASH_TABLE_HIGH);
^
arch/m68k/include/asm/raw_io.h:48:64: note: in definition of macro 'out_le32'
#define out_le32(addr,l) (void)((*(__force volatile __le32 *) (addr)) = cpu_to_le32(l))
^~~~
drivers/net/ethernet/freescale/fec_main.c:1051:2: note: in expansion of macro 'writel'
writel(0, fep->hwp + FEC_HASH_TABLE_HIGH);
^~~~~~
drivers/net/ethernet/freescale/fec_main.c:1052:23: error: 'FEC_HASH_TABLE_LOW' undeclared (first use in this function); did you mean 'FEC_HASH_TABLE_HIGH'?
writel(0, fep->hwp + FEC_HASH_TABLE_LOW);
^
arch/m68k/include/asm/raw_io.h:48:64: note: in definition of macro 'out_le32'
#define out_le32(addr,l) (void)((*(__force volatile __le32 *) (addr)) = cpu_to_le32(l))
^~~~
drivers/net/ethernet/freescale/fec_main.c:1052:2: note: in expansion of macro 'writel'
writel(0, fep->hwp + FEC_HASH_TABLE_LOW);
^~~~~~
drivers/net/ethernet/freescale/fec_main.c:1067:29: error: 'FEC_MIB_CTRLSTAT' undeclared (first use in this function); did you mean 'TCP_MIB_CURRESTAB'?
writel(0 << 31, fep->hwp + FEC_MIB_CTRLSTAT);
^
arch/m68k/include/asm/raw_io.h:48:64: note: in definition of macro 'out_le32'
#define out_le32(addr,l) (void)((*(__force volatile __le32 *) (addr)) = cpu_to_le32(l))
^~~~
drivers/net/ethernet/freescale/fec_main.c:1067:2: note: in expansion of macro 'writel'
writel(0 << 31, fep->hwp + FEC_MIB_CTRLSTAT);
^~~~~~
drivers/net/ethernet/freescale/fec_main.c: At top level:
drivers/net/ethernet/freescale/fec_main.c:2261:18: error: 'RMON_T_DROP' undeclared here (not in a function); did you mean 'RTN_THROW'?
{ "tx_dropped", RMON_T_DROP },
^~~~~~~~~~~
RTN_THROW
drivers/net/ethernet/freescale/fec_main.c:2262:18: error: 'RMON_T_PACKETS' undeclared here (not in a function); did you mean 'SOCK_PACKET'?
{ "tx_packets", RMON_T_PACKETS },
^~~~~~~~~~~~~~
SOCK_PACKET
drivers/net/ethernet/freescale/fec_main.c:2263:20: error: 'RMON_T_BC_PKT' undeclared here (not in a function); did you mean 'RMON_T_DROP'?
{ "tx_broadcast", RMON_T_BC_PKT },
^~~~~~~~~~~~~
RMON_T_DROP
drivers/net/ethernet/freescale/fec_main.c:2264:20: error: 'RMON_T_MC_PKT' undeclared here (not in a function); did you mean 'RMON_T_BC_PKT'?
{ "tx_multicast", RMON_T_MC_PKT },
^~~~~~~~~~~~~
RMON_T_BC_PKT
drivers/net/ethernet/freescale/fec_main.c:2265:21: error: 'RMON_T_CRC_ALIGN' undeclared here (not in a function); did you mean 'RMON_T_MC_PKT'?
{ "tx_crc_errors", RMON_T_CRC_ALIGN },
^~~~~~~~~~~~~~~~
RMON_T_MC_PKT
drivers/net/ethernet/freescale/fec_main.c:2266:20: error: 'RMON_T_UNDERSIZE' undeclared here (not in a function); did you mean 'RMON_T_DROP'?
{ "tx_undersize", RMON_T_UNDERSIZE },
^~~~~~~~~~~~~~~~
RMON_T_DROP
drivers/net/ethernet/freescale/fec_main.c:2267:19: error: 'RMON_T_OVERSIZE' undeclared here (not in a function); did you mean 'RMON_T_UNDERSIZE'?
--
In file included from include/linux/swab.h:5:0,
from include/uapi/linux/byteorder/big_endian.h:13,
from include/linux/byteorder/big_endian.h:5,
from arch/m68k/include/uapi/asm/byteorder.h:5,
from include/asm-generic/bitops/le.h:6,
from arch/m68k/include/asm/bitops.h:519,
from include/linux/bitops.h:38,
from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/module.h:9,
from drivers/net//ethernet/freescale/fec_main.c:24:
drivers/net//ethernet/freescale/fec_main.c: In function 'fec_restart':
drivers/net//ethernet/freescale/fec_main.c:959:26: error: 'FEC_RACC' undeclared (first use in this function); did you mean 'FEC_RXIC0'?
val = readl(fep->hwp + FEC_RACC);
^
include/uapi/linux/swab.h:117:32: note: in definition of macro '__swab32'
(__builtin_constant_p((__u32)(x)) ? \
^
>> include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
#define le32_to_cpu __le32_to_cpu
^~~~~~~~~~~~~
>> arch/m68k/include/asm/io_mm.h:452:26: note: in expansion of macro 'in_le32'
#define readl(addr) in_le32(addr)
^~~~~~~
drivers/net//ethernet/freescale/fec_main.c:959:9: note: in expansion of macro 'readl'
val = readl(fep->hwp + FEC_RACC);
^~~~~
drivers/net//ethernet/freescale/fec_main.c:959:26: note: each undeclared identifier is reported only once for each function it appears in
val = readl(fep->hwp + FEC_RACC);
^
include/uapi/linux/swab.h:117:32: note: in definition of macro '__swab32'
(__builtin_constant_p((__u32)(x)) ? \
^
>> include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
#define le32_to_cpu __le32_to_cpu
^~~~~~~~~~~~~
>> arch/m68k/include/asm/io_mm.h:452:26: note: in expansion of macro 'in_le32'
#define readl(addr) in_le32(addr)
^~~~~~~
drivers/net//ethernet/freescale/fec_main.c:959:9: note: in expansion of macro 'readl'
val = readl(fep->hwp + FEC_RACC);
^~~~~
In file included from arch/m68k/include/asm/io_mm.h:27:0,
from arch/m68k/include/asm/io.h:5,
from include/linux/scatterlist.h:9,
from include/linux/dma-mapping.h:11,
from include/linux/skbuff.h:34,
from include/linux/if_ether.h:23,
from include/uapi/linux/ethtool.h:19,
from include/linux/ethtool.h:18,
from include/linux/netdevice.h:41,
from drivers/net//ethernet/freescale/fec_main.c:34:
drivers/net//ethernet/freescale/fec_main.c:968:38: error: 'FEC_FTRL' undeclared (first use in this function); did you mean 'FEC_ECNTRL'?
writel(PKT_MAXBUF_SIZE, fep->hwp + FEC_FTRL);
^
arch/m68k/include/asm/raw_io.h:48:64: note: in definition of macro 'out_le32'
#define out_le32(addr,l) (void)((*(__force volatile __le32 *) (addr)) = cpu_to_le32(l))
^~~~
drivers/net//ethernet/freescale/fec_main.c:968:3: note: in expansion of macro 'writel'
writel(PKT_MAXBUF_SIZE, fep->hwp + FEC_FTRL);
^~~~~~
drivers/net//ethernet/freescale/fec_main.c:1034:38: error: 'FEC_R_FIFO_RSEM' undeclared (first use in this function); did you mean 'FEC_FIFO_RAM'?
writel(FEC_ENET_RSEM_V, fep->hwp + FEC_R_FIFO_RSEM);
^
arch/m68k/include/asm/raw_io.h:48:64: note: in definition of macro 'out_le32'
#define out_le32(addr,l) (void)((*(__force volatile __le32 *) (addr)) = cpu_to_le32(l))
^~~~
drivers/net//ethernet/freescale/fec_main.c:1034:3: note: in expansion of macro 'writel'
writel(FEC_ENET_RSEM_V, fep->hwp + FEC_R_FIFO_RSEM);
^~~~~~
drivers/net//ethernet/freescale/fec_main.c:1035:38: error: 'FEC_R_FIFO_RSFL' undeclared (first use in this function); did you mean 'FEC_R_FIFO_RSEM'?
writel(FEC_ENET_RSFL_V, fep->hwp + FEC_R_FIFO_RSFL);
^
arch/m68k/include/asm/raw_io.h:48:64: note: in definition of macro 'out_le32'
#define out_le32(addr,l) (void)((*(__force volatile __le32 *) (addr)) = cpu_to_le32(l))
^~~~
drivers/net//ethernet/freescale/fec_main.c:1035:3: note: in expansion of macro 'writel'
writel(FEC_ENET_RSFL_V, fep->hwp + FEC_R_FIFO_RSFL);
^~~~~~
drivers/net//ethernet/freescale/fec_main.c:1036:38: error: 'FEC_R_FIFO_RAEM' undeclared (first use in this function); did you mean 'FEC_R_FIFO_RSEM'?
writel(FEC_ENET_RAEM_V, fep->hwp + FEC_R_FIFO_RAEM);
^
arch/m68k/include/asm/raw_io.h:48:64: note: in definition of macro 'out_le32'
#define out_le32(addr,l) (void)((*(__force volatile __le32 *) (addr)) = cpu_to_le32(l))
^~~~
drivers/net//ethernet/freescale/fec_main.c:1036:3: note: in expansion of macro 'writel'
writel(FEC_ENET_RAEM_V, fep->hwp + FEC_R_FIFO_RAEM);
^~~~~~
drivers/net//ethernet/freescale/fec_main.c:1037:38: error: 'FEC_R_FIFO_RAFL' undeclared (first use in this function); did you mean 'FEC_R_FIFO_RSFL'?
writel(FEC_ENET_RAFL_V, fep->hwp + FEC_R_FIFO_RAFL);
^
arch/m68k/include/asm/raw_io.h:48:64: note: in definition of macro 'out_le32'
#define out_le32(addr,l) (void)((*(__force volatile __le32 *) (addr)) = cpu_to_le32(l))
^~~~
drivers/net//ethernet/freescale/fec_main.c:1037:3: note: in expansion of macro 'writel'
writel(FEC_ENET_RAFL_V, fep->hwp + FEC_R_FIFO_RAFL);
^~~~~~
drivers/net//ethernet/freescale/fec_main.c:1040:37: error: 'FEC_OPD' undeclared (first use in this function); did you mean 'FEC_H'?
writel(FEC_ENET_OPD_V, fep->hwp + FEC_OPD);
^
arch/m68k/include/asm/raw_io.h:48:64: note: in definition of macro 'out_le32'
#define out_le32(addr,l) (void)((*(__force volatile __le32 *) (addr)) = cpu_to_le32(l))
^~~~
drivers/net//ethernet/freescale/fec_main.c:1040:3: note: in expansion of macro 'writel'
writel(FEC_ENET_OPD_V, fep->hwp + FEC_OPD);
^~~~~~
drivers/net//ethernet/freescale/fec_main.c:1051:23: error: 'FEC_HASH_TABLE_HIGH' undeclared (first use in this function); did you mean 'FEC_GRP_HASH_TABLE_HIGH'?
writel(0, fep->hwp + FEC_HASH_TABLE_HIGH);
^
arch/m68k/include/asm/raw_io.h:48:64: note: in definition of macro 'out_le32'
#define out_le32(addr,l) (void)((*(__force volatile __le32 *) (addr)) = cpu_to_le32(l))
^~~~
drivers/net//ethernet/freescale/fec_main.c:1051:2: note: in expansion of macro 'writel'
writel(0, fep->hwp + FEC_HASH_TABLE_HIGH);
^~~~~~
drivers/net//ethernet/freescale/fec_main.c:1052:23: error: 'FEC_HASH_TABLE_LOW' undeclared (first use in this function); did you mean 'FEC_HASH_TABLE_HIGH'?
writel(0, fep->hwp + FEC_HASH_TABLE_LOW);
^
arch/m68k/include/asm/raw_io.h:48:64: note: in definition of macro 'out_le32'
#define out_le32(addr,l) (void)((*(__force volatile __le32 *) (addr)) = cpu_to_le32(l))
^~~~
drivers/net//ethernet/freescale/fec_main.c:1052:2: note: in expansion of macro 'writel'
writel(0, fep->hwp + FEC_HASH_TABLE_LOW);
^~~~~~
drivers/net//ethernet/freescale/fec_main.c:1067:29: error: 'FEC_MIB_CTRLSTAT' undeclared (first use in this function); did you mean 'TCP_MIB_CURRESTAB'?
writel(0 << 31, fep->hwp + FEC_MIB_CTRLSTAT);
^
arch/m68k/include/asm/raw_io.h:48:64: note: in definition of macro 'out_le32'
#define out_le32(addr,l) (void)((*(__force volatile __le32 *) (addr)) = cpu_to_le32(l))
^~~~
drivers/net//ethernet/freescale/fec_main.c:1067:2: note: in expansion of macro 'writel'
writel(0 << 31, fep->hwp + FEC_MIB_CTRLSTAT);
^~~~~~
drivers/net//ethernet/freescale/fec_main.c: At top level:
drivers/net//ethernet/freescale/fec_main.c:2261:18: error: 'RMON_T_DROP' undeclared here (not in a function); did you mean 'RTN_THROW'?
{ "tx_dropped", RMON_T_DROP },
^~~~~~~~~~~

vim +/__le32_to_cpu +89 include/linux/byteorder/generic.h

^1da177e Linus Torvalds 2005-04-16 4
^1da177e Linus Torvalds 2005-04-16 5 /*
90a85643 Geoff Levand 2014-08-06 6 * linux/byteorder/generic.h
^1da177e Linus Torvalds 2005-04-16 7 * Generic Byte-reordering support
^1da177e Linus Torvalds 2005-04-16 8 *
e0487992 Ed L. Cashin 2005-09-19 9 * The "... p" macros, like le64_to_cpup, can be used with pointers
e0487992 Ed L. Cashin 2005-09-19 10 * to unaligned data, but there will be a performance penalty on
e0487992 Ed L. Cashin 2005-09-19 11 * some architectures. Use get_unaligned for unaligned data.
e0487992 Ed L. Cashin 2005-09-19 12 *
^1da177e Linus Torvalds 2005-04-16 13 * Francois-Rene Rideau <fare@tunes.org> 19970707
^1da177e Linus Torvalds 2005-04-16 14 * gathered all the good ideas from all asm-foo/byteorder.h into one file,
^1da177e Linus Torvalds 2005-04-16 15 * cleaned them up.
^1da177e Linus Torvalds 2005-04-16 16 * I hope it is compliant with non-GCC compilers.
^1da177e Linus Torvalds 2005-04-16 17 * I decided to put __BYTEORDER_HAS_U64__ in byteorder.h,
^1da177e Linus Torvalds 2005-04-16 18 * because I wasn't sure it would be ok to put it in types.h
^1da177e Linus Torvalds 2005-04-16 19 * Upgraded it to 2.1.43
^1da177e Linus Torvalds 2005-04-16 20 * Francois-Rene Rideau <fare@tunes.org> 19971012
^1da177e Linus Torvalds 2005-04-16 21 * Upgraded it to 2.1.57
^1da177e Linus Torvalds 2005-04-16 22 * to please Linus T., replaced huge #ifdef's between little/big endian
^1da177e Linus Torvalds 2005-04-16 23 * by nestedly #include'd files.
^1da177e Linus Torvalds 2005-04-16 24 * Francois-Rene Rideau <fare@tunes.org> 19971205
^1da177e Linus Torvalds 2005-04-16 25 * Made it to 2.1.71; now a facelift:
^1da177e Linus Torvalds 2005-04-16 26 * Put files under include/linux/byteorder/
^1da177e Linus Torvalds 2005-04-16 27 * Split swab from generic support.
^1da177e Linus Torvalds 2005-04-16 28 *
^1da177e Linus Torvalds 2005-04-16 29 * TODO:
^1da177e Linus Torvalds 2005-04-16 30 * = Regular kernel maintainers could also replace all these manual
^1da177e Linus Torvalds 2005-04-16 31 * byteswap macros that remain, disseminated among drivers,
^1da177e Linus Torvalds 2005-04-16 32 * after some grep or the sources...
^1da177e Linus Torvalds 2005-04-16 33 * = Linus might want to rename all these macros and files to fit his taste,
^1da177e Linus Torvalds 2005-04-16 34 * to fit his personal naming scheme.
^1da177e Linus Torvalds 2005-04-16 35 * = it seems that a few drivers would also appreciate
^1da177e Linus Torvalds 2005-04-16 36 * nybble swapping support...
^1da177e Linus Torvalds 2005-04-16 37 * = every architecture could add their byteswap macro in asm/byteorder.h
^1da177e Linus Torvalds 2005-04-16 38 * see how some architectures already do (i386, alpha, ppc, etc)
^1da177e Linus Torvalds 2005-04-16 39 * = cpu_to_beXX and beXX_to_cpu might some day need to be well
^1da177e Linus Torvalds 2005-04-16 40 * distinguished throughout the kernel. This is not the case currently,
^1da177e Linus Torvalds 2005-04-16 41 * since little endian, big endian, and pdp endian machines needn't it.
^1da177e Linus Torvalds 2005-04-16 42 * But this might be the case for, say, a port of Linux to 20/21 bit
^1da177e Linus Torvalds 2005-04-16 43 * architectures (and F21 Linux addict around?).
^1da177e Linus Torvalds 2005-04-16 44 */
^1da177e Linus Torvalds 2005-04-16 45
^1da177e Linus Torvalds 2005-04-16 46 /*
^1da177e Linus Torvalds 2005-04-16 47 * The following macros are to be defined by <asm/byteorder.h>:
^1da177e Linus Torvalds 2005-04-16 48 *
^1da177e Linus Torvalds 2005-04-16 49 * Conversion of long and short int between network and host format
^1da177e Linus Torvalds 2005-04-16 50 * ntohl(__u32 x)
^1da177e Linus Torvalds 2005-04-16 51 * ntohs(__u16 x)
^1da177e Linus Torvalds 2005-04-16 52 * htonl(__u32 x)
^1da177e Linus Torvalds 2005-04-16 53 * htons(__u16 x)
^1da177e Linus Torvalds 2005-04-16 54 * It seems that some programs (which? where? or perhaps a standard? POSIX?)
^1da177e Linus Torvalds 2005-04-16 55 * might like the above to be functions, not macros (why?).
^1da177e Linus Torvalds 2005-04-16 56 * if that's true, then detect them, and take measures.
^1da177e Linus Torvalds 2005-04-16 57 * Anyway, the measure is: define only ___ntohl as a macro instead,
^1da177e Linus Torvalds 2005-04-16 58 * and in a separate file, have
^1da177e Linus Torvalds 2005-04-16 59 * unsigned long inline ntohl(x){return ___ntohl(x);}
^1da177e Linus Torvalds 2005-04-16 60 *
^1da177e Linus Torvalds 2005-04-16 61 * The same for constant arguments
^1da177e Linus Torvalds 2005-04-16 62 * __constant_ntohl(__u32 x)
^1da177e Linus Torvalds 2005-04-16 63 * __constant_ntohs(__u16 x)
^1da177e Linus Torvalds 2005-04-16 64 * __constant_htonl(__u32 x)
^1da177e Linus Torvalds 2005-04-16 65 * __constant_htons(__u16 x)
^1da177e Linus Torvalds 2005-04-16 66 *
^1da177e Linus Torvalds 2005-04-16 67 * Conversion of XX-bit integers (16- 32- or 64-)
^1da177e Linus Torvalds 2005-04-16 68 * between native CPU format and little/big endian format
^1da177e Linus Torvalds 2005-04-16 69 * 64-bit stuff only defined for proper architectures
^1da177e Linus Torvalds 2005-04-16 70 * cpu_to_[bl]eXX(__uXX x)
^1da177e Linus Torvalds 2005-04-16 71 * [bl]eXX_to_cpu(__uXX x)
^1da177e Linus Torvalds 2005-04-16 72 *
^1da177e Linus Torvalds 2005-04-16 73 * The same, but takes a pointer to the value to convert
^1da177e Linus Torvalds 2005-04-16 74 * cpu_to_[bl]eXXp(__uXX x)
^1da177e Linus Torvalds 2005-04-16 75 * [bl]eXX_to_cpup(__uXX x)
^1da177e Linus Torvalds 2005-04-16 76 *
^1da177e Linus Torvalds 2005-04-16 77 * The same, but change in situ
^1da177e Linus Torvalds 2005-04-16 78 * cpu_to_[bl]eXXs(__uXX x)
^1da177e Linus Torvalds 2005-04-16 79 * [bl]eXX_to_cpus(__uXX x)
^1da177e Linus Torvalds 2005-04-16 80 *
^1da177e Linus Torvalds 2005-04-16 81 * See asm-foo/byteorder.h for examples of how to provide
^1da177e Linus Torvalds 2005-04-16 82 * architecture-optimized versions
^1da177e Linus Torvalds 2005-04-16 83 *
^1da177e Linus Torvalds 2005-04-16 84 */
^1da177e Linus Torvalds 2005-04-16 85
^1da177e Linus Torvalds 2005-04-16 86 #define cpu_to_le64 __cpu_to_le64
^1da177e Linus Torvalds 2005-04-16 87 #define le64_to_cpu __le64_to_cpu
^1da177e Linus Torvalds 2005-04-16 88 #define cpu_to_le32 __cpu_to_le32
^1da177e Linus Torvalds 2005-04-16 @89 #define le32_to_cpu __le32_to_cpu
^1da177e Linus Torvalds 2005-04-16 90 #define cpu_to_le16 __cpu_to_le16
^1da177e Linus Torvalds 2005-04-16 91 #define le16_to_cpu __le16_to_cpu
^1da177e Linus Torvalds 2005-04-16 92 #define cpu_to_be64 __cpu_to_be64
^1da177e Linus Torvalds 2005-04-16 93 #define be64_to_cpu __be64_to_cpu
^1da177e Linus Torvalds 2005-04-16 94 #define cpu_to_be32 __cpu_to_be32
^1da177e Linus Torvalds 2005-04-16 95 #define be32_to_cpu __be32_to_cpu
^1da177e Linus Torvalds 2005-04-16 96 #define cpu_to_be16 __cpu_to_be16
^1da177e Linus Torvalds 2005-04-16 97 #define be16_to_cpu __be16_to_cpu
^1da177e Linus Torvalds 2005-04-16 98 #define cpu_to_le64p __cpu_to_le64p
^1da177e Linus Torvalds 2005-04-16 99 #define le64_to_cpup __le64_to_cpup
^1da177e Linus Torvalds 2005-04-16 100 #define cpu_to_le32p __cpu_to_le32p
^1da177e Linus Torvalds 2005-04-16 101 #define le32_to_cpup __le32_to_cpup
^1da177e Linus Torvalds 2005-04-16 102 #define cpu_to_le16p __cpu_to_le16p
^1da177e Linus Torvalds 2005-04-16 103 #define le16_to_cpup __le16_to_cpup
^1da177e Linus Torvalds 2005-04-16 104 #define cpu_to_be64p __cpu_to_be64p
^1da177e Linus Torvalds 2005-04-16 105 #define be64_to_cpup __be64_to_cpup
^1da177e Linus Torvalds 2005-04-16 106 #define cpu_to_be32p __cpu_to_be32p
^1da177e Linus Torvalds 2005-04-16 107 #define be32_to_cpup __be32_to_cpup
^1da177e Linus Torvalds 2005-04-16 108 #define cpu_to_be16p __cpu_to_be16p
^1da177e Linus Torvalds 2005-04-16 109 #define be16_to_cpup __be16_to_cpup
^1da177e Linus Torvalds 2005-04-16 110 #define cpu_to_le64s __cpu_to_le64s
^1da177e Linus Torvalds 2005-04-16 111 #define le64_to_cpus __le64_to_cpus
^1da177e Linus Torvalds 2005-04-16 112 #define cpu_to_le32s __cpu_to_le32s
^1da177e Linus Torvalds 2005-04-16 113 #define le32_to_cpus __le32_to_cpus
^1da177e Linus Torvalds 2005-04-16 114 #define cpu_to_le16s __cpu_to_le16s
^1da177e Linus Torvalds 2005-04-16 115 #define le16_to_cpus __le16_to_cpus
^1da177e Linus Torvalds 2005-04-16 116 #define cpu_to_be64s __cpu_to_be64s
^1da177e Linus Torvalds 2005-04-16 117 #define be64_to_cpus __be64_to_cpus
^1da177e Linus Torvalds 2005-04-16 118 #define cpu_to_be32s __cpu_to_be32s
^1da177e Linus Torvalds 2005-04-16 119 #define be32_to_cpus __be32_to_cpus
^1da177e Linus Torvalds 2005-04-16 120 #define cpu_to_be16s __cpu_to_be16s
^1da177e Linus Torvalds 2005-04-16 121 #define be16_to_cpus __be16_to_cpus
^1da177e Linus Torvalds 2005-04-16 122

:::::: The code at line 89 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2018-05-17 05:40    [W:0.173 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site