arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
by kernel test robot
Hi Christophe,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 1140ab592e2ebf8153d2b322604031a8868ce7a5
commit: eacf4c0202654adfa94bbb17b5c5c77c0be14af8 powerpc: Enable OPTPROBES on PPC32
date: 3 weeks ago
config: powerpc-randconfig-r033-20210511 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project a0fed635fe1701470062495a6ffee1c608f3f1bc)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout eacf4c0202654adfa94bbb17b5c5c77c0be14af8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot' [-Werror,-Wunused-function]
DEFINE_INSN_CACHE_OPS(ppc_optinsn);
^
include/linux/kprobes.h:306:20: note: expanded from macro 'DEFINE_INSN_CACHE_OPS'
static inline bool is_kprobe_##__name##_slot(unsigned long addr) \
^
<scratch space>:16:1: note: expanded from here
is_kprobe_ppc_optinsn_slot
^
1 error generated.
vim +/is_kprobe_ppc_optinsn_slot +34 arch/powerpc/kernel/optprobes.c
51c9c084399352 Anju T 2017-02-08 20
51c9c084399352 Anju T 2017-02-08 21 #define TMPL_CALL_HDLR_IDX \
51c9c084399352 Anju T 2017-02-08 22 (optprobe_template_call_handler - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 23 #define TMPL_EMULATE_IDX \
51c9c084399352 Anju T 2017-02-08 24 (optprobe_template_call_emulate - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 25 #define TMPL_RET_IDX \
51c9c084399352 Anju T 2017-02-08 26 (optprobe_template_ret - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 27 #define TMPL_OP_IDX \
51c9c084399352 Anju T 2017-02-08 28 (optprobe_template_op_address - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 29 #define TMPL_INSN_IDX \
51c9c084399352 Anju T 2017-02-08 30 (optprobe_template_insn - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 31 #define TMPL_END_IDX \
51c9c084399352 Anju T 2017-02-08 32 (optprobe_template_end - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 33
51c9c084399352 Anju T 2017-02-08 @34 DEFINE_INSN_CACHE_OPS(ppc_optinsn);
51c9c084399352 Anju T 2017-02-08 35
:::::: The code at line 34 was first introduced by commit
:::::: 51c9c0843993528bffc920c54c2121d9e6f8b090 powerpc/kprobes: Implement Optprobes
:::::: TO: Anju T <anju(a)linux.vnet.ibm.com>
:::::: CC: Michael Ellerman <mpe(a)ellerman.id.au>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
arch/arm/mm/kasan_init.c:30:7: sparse: sparse: symbol 'tmp_pmd_table' was not declared. Should it be static?
by kernel test robot
Hi Stephen,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dbb5afad100a828c97e012c6106566d99f041db6
commit: 421015713b306e47af95d4d61cdfbd96d462e4cb ARM: 9017/2: Enable KASan for ARM
date: 7 months ago
config: arm-randconfig-s032-20210513 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 421015713b306e47af95d4d61cdfbd96d462e4cb
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> arch/arm/mm/kasan_init.c:30:7: sparse: sparse: symbol 'tmp_pmd_table' was not declared. Should it be static?
--
>> drivers/mtd/nand/onenand/onenand_omap2.c:385:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const *src @@ got void [noderef] __iomem * @@
drivers/mtd/nand/onenand/onenand_omap2.c:385:17: sparse: expected void const *src
drivers/mtd/nand/onenand/onenand_omap2.c:385:17: sparse: got void [noderef] __iomem *
drivers/mtd/nand/onenand/onenand_omap2.c:404:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const *src @@ got void [noderef] __iomem * @@
drivers/mtd/nand/onenand/onenand_omap2.c:404:9: sparse: expected void const *src
drivers/mtd/nand/onenand/onenand_omap2.c:404:9: sparse: got void [noderef] __iomem *
>> drivers/mtd/nand/onenand/onenand_omap2.c:444:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *dest @@ got void [noderef] __iomem * @@
drivers/mtd/nand/onenand/onenand_omap2.c:444:9: sparse: expected void *dest
drivers/mtd/nand/onenand/onenand_omap2.c:444:9: sparse: got void [noderef] __iomem *
vim +/tmp_pmd_table +30 arch/arm/mm/kasan_init.c
5615f69bc20974 Linus Walleij 2020-10-25 29
5615f69bc20974 Linus Walleij 2020-10-25 @30 pmd_t tmp_pmd_table[PTRS_PER_PMD] __page_aligned_bss;
5615f69bc20974 Linus Walleij 2020-10-25 31
:::::: The code at line 30 was first introduced by commit
:::::: 5615f69bc2097452ecc954f5264d784e158d6801 ARM: 9016/2: Initialize the mapping of KASan shadow memory
:::::: TO: Linus Walleij <linus.walleij(a)linaro.org>
:::::: CC: Russell King <rmk+kernel(a)armlinux.org.uk>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[sashal-linux-stable:queue-4.9 100/170] drivers/tty/serial/stm32-usart.c:180:34: error: use of undeclared identifier 'USART_CR_TC'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-4.9
head: 397027034d454e3ad94e49e88938860ee15d7de6
commit: 2d843653785d83e84dd658e7ca9643ae0a42aaa5 [100/170] serial: stm32: fix tx_empty condition
config: powerpc-randconfig-r014-20210512 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project a0fed635fe1701470062495a6ffee1c608f3f1bc)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-4.9
git checkout 2d843653785d83e84dd658e7ca9643ae0a42aaa5
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> arch/powerpc/mm/hash_utils_64.c:1101:14: error: no previous prototype for function 'get_paca_psize' [-Werror,-Wmissing-prototypes]
unsigned int get_paca_psize(unsigned long addr)
^
arch/powerpc/mm/hash_utils_64.c:1101:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
unsigned int get_paca_psize(unsigned long addr)
^
static
arch/powerpc/mm/hash_utils_64.c:1422:5: error: no previous prototype for function '__hash_page' [-Werror,-Wmissing-prototypes]
int __hash_page(unsigned long ea, unsigned long msr, unsigned long trap,
^
arch/powerpc/mm/hash_utils_64.c:1422:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __hash_page(unsigned long ea, unsigned long msr, unsigned long trap,
^
static
arch/powerpc/mm/hash_utils_64.c:1479:6: error: no previous prototype for function 'hash_preload' [-Werror,-Wmissing-prototypes]
void hash_preload(struct mm_struct *mm, unsigned long ea,
^
arch/powerpc/mm/hash_utils_64.c:1479:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void hash_preload(struct mm_struct *mm, unsigned long ea,
^
static
arch/powerpc/mm/hash_utils_64.c:1688:6: error: no previous prototype for function 'low_hash_fault' [-Werror,-Wmissing-prototypes]
void low_hash_fault(struct pt_regs *regs, unsigned long address, int rc)
^
arch/powerpc/mm/hash_utils_64.c:1688:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void low_hash_fault(struct pt_regs *regs, unsigned long address, int rc)
^
static
arch/powerpc/mm/hash_utils_64.c:1705:6: error: no previous prototype for function 'hpte_insert_repeating' [-Werror,-Wmissing-prototypes]
long hpte_insert_repeating(unsigned long hash, unsigned long vpn,
^
arch/powerpc/mm/hash_utils_64.c:1705:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
long hpte_insert_repeating(unsigned long hash, unsigned long vpn,
^
static
5 errors generated.
--
>> drivers/tty/serial/stm32-usart.c:180:34: error: use of undeclared identifier 'USART_CR_TC'
stm32_set_bits(port, ofs->icr, USART_CR_TC);
^
1 error generated.
vim +/USART_CR_TC +180 drivers/tty/serial/stm32-usart.c
48a6092fb41fab Maxime Coquelin 2015-06-10 160
3489187204eb75 Alexandre TORGUE 2016-09-15 161 static void stm32_tx_dma_complete(void *arg)
3489187204eb75 Alexandre TORGUE 2016-09-15 162 {
3489187204eb75 Alexandre TORGUE 2016-09-15 163 struct uart_port *port = arg;
3489187204eb75 Alexandre TORGUE 2016-09-15 164 struct stm32_port *stm32port = to_stm32_port(port);
3489187204eb75 Alexandre TORGUE 2016-09-15 165 struct stm32_usart_offsets *ofs = &stm32port->info->ofs;
3489187204eb75 Alexandre TORGUE 2016-09-15 166 unsigned int isr;
3489187204eb75 Alexandre TORGUE 2016-09-15 167 int ret;
3489187204eb75 Alexandre TORGUE 2016-09-15 168
3489187204eb75 Alexandre TORGUE 2016-09-15 169 ret = readl_relaxed_poll_timeout_atomic(port->membase + ofs->isr,
3489187204eb75 Alexandre TORGUE 2016-09-15 170 isr,
3489187204eb75 Alexandre TORGUE 2016-09-15 171 (isr & USART_SR_TC),
3489187204eb75 Alexandre TORGUE 2016-09-15 172 10, 100000);
3489187204eb75 Alexandre TORGUE 2016-09-15 173
3489187204eb75 Alexandre TORGUE 2016-09-15 174 if (ret)
3489187204eb75 Alexandre TORGUE 2016-09-15 175 dev_err(port->dev, "terminal count not set\n");
3489187204eb75 Alexandre TORGUE 2016-09-15 176
3489187204eb75 Alexandre TORGUE 2016-09-15 177 if (ofs->icr == UNDEF_REG)
3489187204eb75 Alexandre TORGUE 2016-09-15 178 stm32_clr_bits(port, ofs->isr, USART_SR_TC);
3489187204eb75 Alexandre TORGUE 2016-09-15 179 else
3489187204eb75 Alexandre TORGUE 2016-09-15 @180 stm32_set_bits(port, ofs->icr, USART_CR_TC);
3489187204eb75 Alexandre TORGUE 2016-09-15 181
3489187204eb75 Alexandre TORGUE 2016-09-15 182 stm32_clr_bits(port, ofs->cr3, USART_CR3_DMAT);
3489187204eb75 Alexandre TORGUE 2016-09-15 183 stm32port->tx_dma_busy = false;
3489187204eb75 Alexandre TORGUE 2016-09-15 184
3489187204eb75 Alexandre TORGUE 2016-09-15 185 /* Let's see if we have pending data to send */
3489187204eb75 Alexandre TORGUE 2016-09-15 186 stm32_transmit_chars(port);
3489187204eb75 Alexandre TORGUE 2016-09-15 187 }
3489187204eb75 Alexandre TORGUE 2016-09-15 188
:::::: The code at line 180 was first introduced by commit
:::::: 3489187204eb75e5635d8836babfd0a18be613f4 serial: stm32: adding dma support
:::::: TO: Alexandre TORGUE <alexandre.torgue(a)st.com>
:::::: CC: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
aarch64-linux-gnu-ld: Unexpected GOT/PLT entries detected!
by kernel test robot
Hi Kees,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dbb5afad100a828c97e012c6106566d99f041db6
commit: be2881824ae9eb92a35b094f734f9ca7339ddf6d arm64/build: Assert for unwanted sections
date: 8 months ago
config: arm64-randconfig-r013-20210512 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project a0fed635fe1701470062495a6ffee1c608f3f1bc)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout be2881824ae9eb92a35b094f734f9ca7339ddf6d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
aarch64-linux-gnu-ld: warning: -z norelro ignored
>> aarch64-linux-gnu-ld: Unexpected GOT/PLT entries detected!
>> aarch64-linux-gnu-ld: Unexpected run-time procedure linkages detected!
aarch64-linux-gnu-ld: drivers/gpu/drm/rcar-du/rcar_du_crtc.o: in function `rcar_du_crtc_atomic_enable':
rcar_du_crtc.c:(.text+0x1a5c): undefined reference to `rcar_lvds_clk_enable'
aarch64-linux-gnu-ld: drivers/gpu/drm/rcar-du/rcar_du_crtc.o: in function `rcar_du_crtc_atomic_disable':
rcar_du_crtc.c:(.text+0x1f78): undefined reference to `rcar_lvds_clk_disable'
aarch64-linux-gnu-ld: drivers/gpu/drm/rcar-du/rcar_du_drv.o: in function `rcar_du_init':
rcar_du_drv.c:(.init.text+0x18): undefined reference to `rcar_du_of_init'
aarch64-linux-gnu-ld: drivers/gpu/drm/rcar-du/rcar_du_encoder.o: in function `rcar_du_encoder_init':
rcar_du_encoder.c:(.text+0x230): undefined reference to `rcar_lvds_dual_link'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
drivers/net/wan/fsl_ucc_hdlc.c:305:17: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 88b06399c9c766c283e070b022b5ceafa4f63f19
commit: e5fc436f06eef54ef512ea55a9db8eb9f2e76959 sparse: use static inline for __chk_{user,io}_ptr()
date: 9 months ago
config: arm-randconfig-s032-20210513 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout e5fc436f06eef54ef512ea55a9db8eb9f2e76959
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/net/wan/fsl_ucc_hdlc.c:305:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got restricted __be16 * @@
drivers/net/wan/fsl_ucc_hdlc.c:305:17: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/net/wan/fsl_ucc_hdlc.c:305:17: sparse: got restricted __be16 *
drivers/net/wan/fsl_ucc_hdlc.c:306:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got restricted __be32 * @@
drivers/net/wan/fsl_ucc_hdlc.c:306:17: sparse: expected void volatile [noderef] __iomem *addr
drivers/net/wan/fsl_ucc_hdlc.c:306:17: sparse: got restricted __be32 *
drivers/net/wan/fsl_ucc_hdlc.c:316:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got restricted __be16 * @@
drivers/net/wan/fsl_ucc_hdlc.c:316:17: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/net/wan/fsl_ucc_hdlc.c:316:17: sparse: got restricted __be16 *
drivers/net/wan/fsl_ucc_hdlc.c:317:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got restricted __be32 * @@
drivers/net/wan/fsl_ucc_hdlc.c:317:17: sparse: expected void volatile [noderef] __iomem *addr
drivers/net/wan/fsl_ucc_hdlc.c:317:17: sparse: got restricted __be32 *
drivers/net/wan/fsl_ucc_hdlc.c:368:29: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] @@ got restricted __be16 [usertype] @@
drivers/net/wan/fsl_ucc_hdlc.c:368:29: sparse: expected unsigned short [usertype]
drivers/net/wan/fsl_ucc_hdlc.c:368:29: sparse: got restricted __be16 [usertype]
drivers/net/wan/fsl_ucc_hdlc.c:375:36: sparse: sparse: restricted __be16 degrades to integer
drivers/net/wan/fsl_ucc_hdlc.c:398:12: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct qe_bd [noderef] __iomem *bd @@ got struct qe_bd *curtx_bd @@
drivers/net/wan/fsl_ucc_hdlc.c:398:12: sparse: expected struct qe_bd [noderef] __iomem *bd
drivers/net/wan/fsl_ucc_hdlc.c:398:12: sparse: got struct qe_bd *curtx_bd
drivers/net/wan/fsl_ucc_hdlc.c:408:35: sparse: sparse: dereference of noderef expression
drivers/net/wan/fsl_ucc_hdlc.c:421:20: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct qe_bd [noderef] __iomem *[assigned] bd @@ got struct qe_bd *tx_bd_base @@
drivers/net/wan/fsl_ucc_hdlc.c:421:20: sparse: expected struct qe_bd [noderef] __iomem *[assigned] bd
drivers/net/wan/fsl_ucc_hdlc.c:421:20: sparse: got struct qe_bd *tx_bd_base
drivers/net/wan/fsl_ucc_hdlc.c:423:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/net/wan/fsl_ucc_hdlc.c:423:16: sparse: struct qe_bd [noderef] __iomem *
drivers/net/wan/fsl_ucc_hdlc.c:423:16: sparse: struct qe_bd *
drivers/net/wan/fsl_ucc_hdlc.c:458:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got restricted __be16 * @@
drivers/net/wan/fsl_ucc_hdlc.c:458:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got restricted __be16 * @@
drivers/net/wan/fsl_ucc_hdlc.c:458:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got restricted __be16 * @@
drivers/net/wan/fsl_ucc_hdlc.c:458:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got restricted __be16 * @@
drivers/net/wan/fsl_ucc_hdlc.c:502:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got restricted __be16 * @@
drivers/net/wan/fsl_ucc_hdlc.c:502:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got restricted __be16 * @@
drivers/net/wan/fsl_ucc_hdlc.c:502:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got restricted __be16 * @@
drivers/net/wan/fsl_ucc_hdlc.c:502:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got restricted __be16 * @@
drivers/net/wan/fsl_ucc_hdlc.c:524:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got restricted __be16 * @@
drivers/net/wan/fsl_ucc_hdlc.c:524:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got restricted __be16 * @@
drivers/net/wan/fsl_ucc_hdlc.c:524:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got restricted __be16 * @@
drivers/net/wan/fsl_ucc_hdlc.c:524:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got restricted __be16 * @@
drivers/net/wan/fsl_ucc_hdlc.c:548:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got restricted __be16 * @@
drivers/net/wan/fsl_ucc_hdlc.c:548:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got restricted __be16 * @@
drivers/net/wan/fsl_ucc_hdlc.c:548:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got restricted __be16 * @@
drivers/net/wan/fsl_ucc_hdlc.c:548:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got restricted __be16 * @@
drivers/net/wan/fsl_ucc_hdlc.c:592:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got restricted __be16 * @@
drivers/net/wan/fsl_ucc_hdlc.c:607:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got restricted __be16 * @@
drivers/net/wan/fsl_ucc_hdlc.c:607:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got restricted __be16 * @@
drivers/net/wan/fsl_ucc_hdlc.c:607:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got restricted __be16 * @@
drivers/net/wan/fsl_ucc_hdlc.c:607:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got restricted __be16 * @@
drivers/net/wan/fsl_ucc_hdlc.c:408:35: sparse: sparse: dereference of noderef expression
drivers/net/wan/fsl_ucc_hdlc.c:408:35: sparse: sparse: dereference of noderef expression
drivers/net/wan/fsl_ucc_hdlc.c:408:35: sparse: sparse: dereference of noderef expression
drivers/net/wan/fsl_ucc_hdlc.c:723:29: sparse: sparse: dereference of noderef expression
drivers/net/wan/fsl_ucc_hdlc.c:814:21: sparse: sparse: dereference of noderef expression
vim +305 drivers/net/wan/fsl_ucc_hdlc.c
c19b6d246a3562 Zhao Qiang 2016-06-06 77
c19b6d246a3562 Zhao Qiang 2016-06-06 78 static int uhdlc_init(struct ucc_hdlc_private *priv)
c19b6d246a3562 Zhao Qiang 2016-06-06 79 {
c19b6d246a3562 Zhao Qiang 2016-06-06 80 struct ucc_tdm_info *ut_info;
c19b6d246a3562 Zhao Qiang 2016-06-06 81 struct ucc_fast_info *uf_info;
c19b6d246a3562 Zhao Qiang 2016-06-06 82 u32 cecr_subblock;
c19b6d246a3562 Zhao Qiang 2016-06-06 83 u16 bd_status;
c19b6d246a3562 Zhao Qiang 2016-06-06 84 int ret, i;
c19b6d246a3562 Zhao Qiang 2016-06-06 85 void *bd_buffer;
c19b6d246a3562 Zhao Qiang 2016-06-06 86 dma_addr_t bd_dma_addr;
be2e9415f8b366 Rasmus Villemoes 2019-11-28 87 s32 riptr;
be2e9415f8b366 Rasmus Villemoes 2019-11-28 88 s32 tiptr;
c19b6d246a3562 Zhao Qiang 2016-06-06 89 u32 gumr;
c19b6d246a3562 Zhao Qiang 2016-06-06 90
c19b6d246a3562 Zhao Qiang 2016-06-06 91 ut_info = priv->ut_info;
c19b6d246a3562 Zhao Qiang 2016-06-06 92 uf_info = &ut_info->uf_info;
c19b6d246a3562 Zhao Qiang 2016-06-06 93
c19b6d246a3562 Zhao Qiang 2016-06-06 94 if (priv->tsa) {
c19b6d246a3562 Zhao Qiang 2016-06-06 95 uf_info->tsa = 1;
c19b6d246a3562 Zhao Qiang 2016-06-06 96 uf_info->ctsp = 1;
040b7c94e4ec58 David Gounaris 2018-09-03 97 uf_info->cds = 1;
040b7c94e4ec58 David Gounaris 2018-09-03 98 uf_info->ctss = 1;
040b7c94e4ec58 David Gounaris 2018-09-03 99 } else {
040b7c94e4ec58 David Gounaris 2018-09-03 100 uf_info->cds = 0;
040b7c94e4ec58 David Gounaris 2018-09-03 101 uf_info->ctsp = 0;
040b7c94e4ec58 David Gounaris 2018-09-03 102 uf_info->ctss = 0;
c19b6d246a3562 Zhao Qiang 2016-06-06 103 }
067bb938dad61e Holger Brunck 2017-05-17 104
067bb938dad61e Holger Brunck 2017-05-17 105 /* This sets HPM register in CMXUCR register which configures a
067bb938dad61e Holger Brunck 2017-05-17 106 * open drain connected HDLC bus
067bb938dad61e Holger Brunck 2017-05-17 107 */
067bb938dad61e Holger Brunck 2017-05-17 108 if (priv->hdlc_bus)
067bb938dad61e Holger Brunck 2017-05-17 109 uf_info->brkpt_support = 1;
067bb938dad61e Holger Brunck 2017-05-17 110
c19b6d246a3562 Zhao Qiang 2016-06-06 111 uf_info->uccm_mask = ((UCC_HDLC_UCCE_RXB | UCC_HDLC_UCCE_RXF |
c19b6d246a3562 Zhao Qiang 2016-06-06 112 UCC_HDLC_UCCE_TXB) << 16);
c19b6d246a3562 Zhao Qiang 2016-06-06 113
c19b6d246a3562 Zhao Qiang 2016-06-06 114 ret = ucc_fast_init(uf_info, &priv->uccf);
c19b6d246a3562 Zhao Qiang 2016-06-06 115 if (ret) {
c19b6d246a3562 Zhao Qiang 2016-06-06 116 dev_err(priv->dev, "Failed to init uccf.");
c19b6d246a3562 Zhao Qiang 2016-06-06 117 return ret;
c19b6d246a3562 Zhao Qiang 2016-06-06 118 }
c19b6d246a3562 Zhao Qiang 2016-06-06 119
c19b6d246a3562 Zhao Qiang 2016-06-06 120 priv->uf_regs = priv->uccf->uf_regs;
c19b6d246a3562 Zhao Qiang 2016-06-06 121 ucc_fast_disable(priv->uccf, COMM_DIR_RX | COMM_DIR_TX);
c19b6d246a3562 Zhao Qiang 2016-06-06 122
c19b6d246a3562 Zhao Qiang 2016-06-06 123 /* Loopback mode */
c19b6d246a3562 Zhao Qiang 2016-06-06 124 if (priv->loopback) {
c19b6d246a3562 Zhao Qiang 2016-06-06 125 dev_info(priv->dev, "Loopback Mode\n");
54e9e0874938ba Holger Brunck 2017-05-17 126 /* use the same clock when work in loopback */
54e9e0874938ba Holger Brunck 2017-05-17 127 qe_setbrg(ut_info->uf_info.rx_clock, 20000000, 1);
54e9e0874938ba Holger Brunck 2017-05-17 128
c19b6d246a3562 Zhao Qiang 2016-06-06 129 gumr = ioread32be(&priv->uf_regs->gumr);
c19b6d246a3562 Zhao Qiang 2016-06-06 130 gumr |= (UCC_FAST_GUMR_LOOPBACK | UCC_FAST_GUMR_CDS |
c19b6d246a3562 Zhao Qiang 2016-06-06 131 UCC_FAST_GUMR_TCI);
c19b6d246a3562 Zhao Qiang 2016-06-06 132 gumr &= ~(UCC_FAST_GUMR_CTSP | UCC_FAST_GUMR_RSYN);
c19b6d246a3562 Zhao Qiang 2016-06-06 133 iowrite32be(gumr, &priv->uf_regs->gumr);
c19b6d246a3562 Zhao Qiang 2016-06-06 134 }
c19b6d246a3562 Zhao Qiang 2016-06-06 135
c19b6d246a3562 Zhao Qiang 2016-06-06 136 /* Initialize SI */
c19b6d246a3562 Zhao Qiang 2016-06-06 137 if (priv->tsa)
c19b6d246a3562 Zhao Qiang 2016-06-06 138 ucc_tdm_init(priv->utdm, priv->ut_info);
c19b6d246a3562 Zhao Qiang 2016-06-06 139
c19b6d246a3562 Zhao Qiang 2016-06-06 140 /* Write to QE CECR, UCCx channel to Stop Transmission */
c19b6d246a3562 Zhao Qiang 2016-06-06 141 cecr_subblock = ucc_fast_get_qe_cr_subblock(uf_info->ucc_num);
c19b6d246a3562 Zhao Qiang 2016-06-06 142 ret = qe_issue_cmd(QE_STOP_TX, cecr_subblock,
c19b6d246a3562 Zhao Qiang 2016-06-06 143 QE_CR_PROTOCOL_UNSPECIFIED, 0);
c19b6d246a3562 Zhao Qiang 2016-06-06 144
c19b6d246a3562 Zhao Qiang 2016-06-06 145 /* Set UPSMR normal mode (need fixed)*/
c19b6d246a3562 Zhao Qiang 2016-06-06 146 iowrite32be(0, &priv->uf_regs->upsmr);
c19b6d246a3562 Zhao Qiang 2016-06-06 147
067bb938dad61e Holger Brunck 2017-05-17 148 /* hdlc_bus mode */
067bb938dad61e Holger Brunck 2017-05-17 149 if (priv->hdlc_bus) {
067bb938dad61e Holger Brunck 2017-05-17 150 u32 upsmr;
067bb938dad61e Holger Brunck 2017-05-17 151
067bb938dad61e Holger Brunck 2017-05-17 152 dev_info(priv->dev, "HDLC bus Mode\n");
067bb938dad61e Holger Brunck 2017-05-17 153 upsmr = ioread32be(&priv->uf_regs->upsmr);
067bb938dad61e Holger Brunck 2017-05-17 154
067bb938dad61e Holger Brunck 2017-05-17 155 /* bus mode and retransmit enable, with collision window
067bb938dad61e Holger Brunck 2017-05-17 156 * set to 8 bytes
067bb938dad61e Holger Brunck 2017-05-17 157 */
067bb938dad61e Holger Brunck 2017-05-17 158 upsmr |= UCC_HDLC_UPSMR_RTE | UCC_HDLC_UPSMR_BUS |
067bb938dad61e Holger Brunck 2017-05-17 159 UCC_HDLC_UPSMR_CW8;
067bb938dad61e Holger Brunck 2017-05-17 160 iowrite32be(upsmr, &priv->uf_regs->upsmr);
067bb938dad61e Holger Brunck 2017-05-17 161
067bb938dad61e Holger Brunck 2017-05-17 162 /* explicitly disable CDS & CTSP */
067bb938dad61e Holger Brunck 2017-05-17 163 gumr = ioread32be(&priv->uf_regs->gumr);
067bb938dad61e Holger Brunck 2017-05-17 164 gumr &= ~(UCC_FAST_GUMR_CDS | UCC_FAST_GUMR_CTSP);
067bb938dad61e Holger Brunck 2017-05-17 165 /* set automatic sync to explicitly ignore CD signal */
067bb938dad61e Holger Brunck 2017-05-17 166 gumr |= UCC_FAST_GUMR_SYNL_AUTO;
067bb938dad61e Holger Brunck 2017-05-17 167 iowrite32be(gumr, &priv->uf_regs->gumr);
067bb938dad61e Holger Brunck 2017-05-17 168 }
067bb938dad61e Holger Brunck 2017-05-17 169
c19b6d246a3562 Zhao Qiang 2016-06-06 170 priv->rx_ring_size = RX_BD_RING_LEN;
c19b6d246a3562 Zhao Qiang 2016-06-06 171 priv->tx_ring_size = TX_BD_RING_LEN;
c19b6d246a3562 Zhao Qiang 2016-06-06 172 /* Alloc Rx BD */
c19b6d246a3562 Zhao Qiang 2016-06-06 173 priv->rx_bd_base = dma_alloc_coherent(priv->dev,
5b8aad93c52bdd Holger Brunck 2017-05-17 174 RX_BD_RING_LEN * sizeof(struct qe_bd),
c19b6d246a3562 Zhao Qiang 2016-06-06 175 &priv->dma_rx_bd, GFP_KERNEL);
c19b6d246a3562 Zhao Qiang 2016-06-06 176
c19b6d246a3562 Zhao Qiang 2016-06-06 177 if (!priv->rx_bd_base) {
c19b6d246a3562 Zhao Qiang 2016-06-06 178 dev_err(priv->dev, "Cannot allocate MURAM memory for RxBDs\n");
c19b6d246a3562 Zhao Qiang 2016-06-06 179 ret = -ENOMEM;
1efb597d8bf56c Zhao Qiang 2016-07-15 180 goto free_uccf;
c19b6d246a3562 Zhao Qiang 2016-06-06 181 }
c19b6d246a3562 Zhao Qiang 2016-06-06 182
c19b6d246a3562 Zhao Qiang 2016-06-06 183 /* Alloc Tx BD */
c19b6d246a3562 Zhao Qiang 2016-06-06 184 priv->tx_bd_base = dma_alloc_coherent(priv->dev,
5b8aad93c52bdd Holger Brunck 2017-05-17 185 TX_BD_RING_LEN * sizeof(struct qe_bd),
c19b6d246a3562 Zhao Qiang 2016-06-06 186 &priv->dma_tx_bd, GFP_KERNEL);
c19b6d246a3562 Zhao Qiang 2016-06-06 187
c19b6d246a3562 Zhao Qiang 2016-06-06 188 if (!priv->tx_bd_base) {
c19b6d246a3562 Zhao Qiang 2016-06-06 189 dev_err(priv->dev, "Cannot allocate MURAM memory for TxBDs\n");
c19b6d246a3562 Zhao Qiang 2016-06-06 190 ret = -ENOMEM;
1efb597d8bf56c Zhao Qiang 2016-07-15 191 goto free_rx_bd;
c19b6d246a3562 Zhao Qiang 2016-06-06 192 }
c19b6d246a3562 Zhao Qiang 2016-06-06 193
c19b6d246a3562 Zhao Qiang 2016-06-06 194 /* Alloc parameter ram for ucc hdlc */
85deed56032b6c Holger Brunck 2017-05-22 195 priv->ucc_pram_offset = qe_muram_alloc(sizeof(struct ucc_hdlc_param),
c19b6d246a3562 Zhao Qiang 2016-06-06 196 ALIGNMENT_OF_UCC_HDLC_PRAM);
c19b6d246a3562 Zhao Qiang 2016-06-06 197
be2e9415f8b366 Rasmus Villemoes 2019-11-28 198 if (priv->ucc_pram_offset < 0) {
24a24d07d688a4 Colin Ian King 2016-08-28 199 dev_err(priv->dev, "Can not allocate MURAM for hdlc parameter.\n");
c19b6d246a3562 Zhao Qiang 2016-06-06 200 ret = -ENOMEM;
1efb597d8bf56c Zhao Qiang 2016-07-15 201 goto free_tx_bd;
c19b6d246a3562 Zhao Qiang 2016-06-06 202 }
c19b6d246a3562 Zhao Qiang 2016-06-06 203
6396bb221514d2 Kees Cook 2018-06-12 204 priv->rx_skbuff = kcalloc(priv->rx_ring_size,
6396bb221514d2 Kees Cook 2018-06-12 205 sizeof(*priv->rx_skbuff),
c19b6d246a3562 Zhao Qiang 2016-06-06 206 GFP_KERNEL);
c19b6d246a3562 Zhao Qiang 2016-06-06 207 if (!priv->rx_skbuff)
1efb597d8bf56c Zhao Qiang 2016-07-15 208 goto free_ucc_pram;
c19b6d246a3562 Zhao Qiang 2016-06-06 209
6396bb221514d2 Kees Cook 2018-06-12 210 priv->tx_skbuff = kcalloc(priv->tx_ring_size,
6396bb221514d2 Kees Cook 2018-06-12 211 sizeof(*priv->tx_skbuff),
c19b6d246a3562 Zhao Qiang 2016-06-06 212 GFP_KERNEL);
c19b6d246a3562 Zhao Qiang 2016-06-06 213 if (!priv->tx_skbuff)
1efb597d8bf56c Zhao Qiang 2016-07-15 214 goto free_rx_skbuff;
c19b6d246a3562 Zhao Qiang 2016-06-06 215
c19b6d246a3562 Zhao Qiang 2016-06-06 216 priv->skb_curtx = 0;
c19b6d246a3562 Zhao Qiang 2016-06-06 217 priv->skb_dirtytx = 0;
c19b6d246a3562 Zhao Qiang 2016-06-06 218 priv->curtx_bd = priv->tx_bd_base;
c19b6d246a3562 Zhao Qiang 2016-06-06 219 priv->dirty_tx = priv->tx_bd_base;
c19b6d246a3562 Zhao Qiang 2016-06-06 220 priv->currx_bd = priv->rx_bd_base;
c19b6d246a3562 Zhao Qiang 2016-06-06 221 priv->currx_bdnum = 0;
c19b6d246a3562 Zhao Qiang 2016-06-06 222
c19b6d246a3562 Zhao Qiang 2016-06-06 223 /* init parameter base */
c19b6d246a3562 Zhao Qiang 2016-06-06 224 cecr_subblock = ucc_fast_get_qe_cr_subblock(uf_info->ucc_num);
c19b6d246a3562 Zhao Qiang 2016-06-06 225 ret = qe_issue_cmd(QE_ASSIGN_PAGE_TO_DEVICE, cecr_subblock,
c19b6d246a3562 Zhao Qiang 2016-06-06 226 QE_CR_PROTOCOL_UNSPECIFIED, priv->ucc_pram_offset);
c19b6d246a3562 Zhao Qiang 2016-06-06 227
c19b6d246a3562 Zhao Qiang 2016-06-06 228 priv->ucc_pram = (struct ucc_hdlc_param __iomem *)
c19b6d246a3562 Zhao Qiang 2016-06-06 229 qe_muram_addr(priv->ucc_pram_offset);
c19b6d246a3562 Zhao Qiang 2016-06-06 230
c19b6d246a3562 Zhao Qiang 2016-06-06 231 /* Zero out parameter ram */
c19b6d246a3562 Zhao Qiang 2016-06-06 232 memset_io(priv->ucc_pram, 0, sizeof(struct ucc_hdlc_param));
c19b6d246a3562 Zhao Qiang 2016-06-06 233
c19b6d246a3562 Zhao Qiang 2016-06-06 234 /* Alloc riptr, tiptr */
c19b6d246a3562 Zhao Qiang 2016-06-06 235 riptr = qe_muram_alloc(32, 32);
be2e9415f8b366 Rasmus Villemoes 2019-11-28 236 if (riptr < 0) {
c19b6d246a3562 Zhao Qiang 2016-06-06 237 dev_err(priv->dev, "Cannot allocate MURAM mem for Receive internal temp data pointer\n");
c19b6d246a3562 Zhao Qiang 2016-06-06 238 ret = -ENOMEM;
1efb597d8bf56c Zhao Qiang 2016-07-15 239 goto free_tx_skbuff;
c19b6d246a3562 Zhao Qiang 2016-06-06 240 }
c19b6d246a3562 Zhao Qiang 2016-06-06 241
c19b6d246a3562 Zhao Qiang 2016-06-06 242 tiptr = qe_muram_alloc(32, 32);
be2e9415f8b366 Rasmus Villemoes 2019-11-28 243 if (tiptr < 0) {
c19b6d246a3562 Zhao Qiang 2016-06-06 244 dev_err(priv->dev, "Cannot allocate MURAM mem for Transmit internal temp data pointer\n");
c19b6d246a3562 Zhao Qiang 2016-06-06 245 ret = -ENOMEM;
1efb597d8bf56c Zhao Qiang 2016-07-15 246 goto free_riptr;
c19b6d246a3562 Zhao Qiang 2016-06-06 247 }
148587a59f6b85 Rasmus Villemoes 2019-11-28 248 if (riptr != (u16)riptr || tiptr != (u16)tiptr) {
148587a59f6b85 Rasmus Villemoes 2019-11-28 249 dev_err(priv->dev, "MURAM allocation out of addressable range\n");
148587a59f6b85 Rasmus Villemoes 2019-11-28 250 ret = -ENOMEM;
148587a59f6b85 Rasmus Villemoes 2019-11-28 251 goto free_tiptr;
148587a59f6b85 Rasmus Villemoes 2019-11-28 252 }
c19b6d246a3562 Zhao Qiang 2016-06-06 253
c19b6d246a3562 Zhao Qiang 2016-06-06 254 /* Set RIPTR, TIPTR */
c19b6d246a3562 Zhao Qiang 2016-06-06 255 iowrite16be(riptr, &priv->ucc_pram->riptr);
c19b6d246a3562 Zhao Qiang 2016-06-06 256 iowrite16be(tiptr, &priv->ucc_pram->tiptr);
c19b6d246a3562 Zhao Qiang 2016-06-06 257
c19b6d246a3562 Zhao Qiang 2016-06-06 258 /* Set MRBLR */
c19b6d246a3562 Zhao Qiang 2016-06-06 259 iowrite16be(MAX_RX_BUF_LENGTH, &priv->ucc_pram->mrblr);
c19b6d246a3562 Zhao Qiang 2016-06-06 260
c19b6d246a3562 Zhao Qiang 2016-06-06 261 /* Set RBASE, TBASE */
c19b6d246a3562 Zhao Qiang 2016-06-06 262 iowrite32be(priv->dma_rx_bd, &priv->ucc_pram->rbase);
c19b6d246a3562 Zhao Qiang 2016-06-06 263 iowrite32be(priv->dma_tx_bd, &priv->ucc_pram->tbase);
c19b6d246a3562 Zhao Qiang 2016-06-06 264
c19b6d246a3562 Zhao Qiang 2016-06-06 265 /* Set RSTATE, TSTATE */
c19b6d246a3562 Zhao Qiang 2016-06-06 266 iowrite32be(BMR_GBL | BMR_BIG_ENDIAN, &priv->ucc_pram->rstate);
c19b6d246a3562 Zhao Qiang 2016-06-06 267 iowrite32be(BMR_GBL | BMR_BIG_ENDIAN, &priv->ucc_pram->tstate);
c19b6d246a3562 Zhao Qiang 2016-06-06 268
c19b6d246a3562 Zhao Qiang 2016-06-06 269 /* Set C_MASK, C_PRES for 16bit CRC */
c19b6d246a3562 Zhao Qiang 2016-06-06 270 iowrite32be(CRC_16BIT_MASK, &priv->ucc_pram->c_mask);
c19b6d246a3562 Zhao Qiang 2016-06-06 271 iowrite32be(CRC_16BIT_PRES, &priv->ucc_pram->c_pres);
c19b6d246a3562 Zhao Qiang 2016-06-06 272
c19b6d246a3562 Zhao Qiang 2016-06-06 273 iowrite16be(MAX_FRAME_LENGTH, &priv->ucc_pram->mflr);
c19b6d246a3562 Zhao Qiang 2016-06-06 274 iowrite16be(DEFAULT_RFTHR, &priv->ucc_pram->rfthr);
c19b6d246a3562 Zhao Qiang 2016-06-06 275 iowrite16be(DEFAULT_RFTHR, &priv->ucc_pram->rfcnt);
045f77baf6b429 David Gounaris 2018-09-03 276 iowrite16be(priv->hmask, &priv->ucc_pram->hmask);
c19b6d246a3562 Zhao Qiang 2016-06-06 277 iowrite16be(DEFAULT_HDLC_ADDR, &priv->ucc_pram->haddr1);
c19b6d246a3562 Zhao Qiang 2016-06-06 278 iowrite16be(DEFAULT_HDLC_ADDR, &priv->ucc_pram->haddr2);
c19b6d246a3562 Zhao Qiang 2016-06-06 279 iowrite16be(DEFAULT_HDLC_ADDR, &priv->ucc_pram->haddr3);
c19b6d246a3562 Zhao Qiang 2016-06-06 280 iowrite16be(DEFAULT_HDLC_ADDR, &priv->ucc_pram->haddr4);
c19b6d246a3562 Zhao Qiang 2016-06-06 281
c19b6d246a3562 Zhao Qiang 2016-06-06 282 /* Get BD buffer */
750afb08ca7131 Luis Chamberlain 2019-01-04 283 bd_buffer = dma_alloc_coherent(priv->dev,
750afb08ca7131 Luis Chamberlain 2019-01-04 284 (RX_BD_RING_LEN + TX_BD_RING_LEN) * MAX_RX_BUF_LENGTH,
c19b6d246a3562 Zhao Qiang 2016-06-06 285 &bd_dma_addr, GFP_KERNEL);
c19b6d246a3562 Zhao Qiang 2016-06-06 286
c19b6d246a3562 Zhao Qiang 2016-06-06 287 if (!bd_buffer) {
c19b6d246a3562 Zhao Qiang 2016-06-06 288 dev_err(priv->dev, "Could not allocate buffer descriptors\n");
c19b6d246a3562 Zhao Qiang 2016-06-06 289 ret = -ENOMEM;
1efb597d8bf56c Zhao Qiang 2016-07-15 290 goto free_tiptr;
c19b6d246a3562 Zhao Qiang 2016-06-06 291 }
c19b6d246a3562 Zhao Qiang 2016-06-06 292
c19b6d246a3562 Zhao Qiang 2016-06-06 293 priv->rx_buffer = bd_buffer;
c19b6d246a3562 Zhao Qiang 2016-06-06 294 priv->tx_buffer = bd_buffer + RX_BD_RING_LEN * MAX_RX_BUF_LENGTH;
c19b6d246a3562 Zhao Qiang 2016-06-06 295
c19b6d246a3562 Zhao Qiang 2016-06-06 296 priv->dma_rx_addr = bd_dma_addr;
c19b6d246a3562 Zhao Qiang 2016-06-06 297 priv->dma_tx_addr = bd_dma_addr + RX_BD_RING_LEN * MAX_RX_BUF_LENGTH;
c19b6d246a3562 Zhao Qiang 2016-06-06 298
c19b6d246a3562 Zhao Qiang 2016-06-06 299 for (i = 0; i < RX_BD_RING_LEN; i++) {
c19b6d246a3562 Zhao Qiang 2016-06-06 300 if (i < (RX_BD_RING_LEN - 1))
c19b6d246a3562 Zhao Qiang 2016-06-06 301 bd_status = R_E_S | R_I_S;
c19b6d246a3562 Zhao Qiang 2016-06-06 302 else
c19b6d246a3562 Zhao Qiang 2016-06-06 303 bd_status = R_E_S | R_I_S | R_W_S;
c19b6d246a3562 Zhao Qiang 2016-06-06 304
c19b6d246a3562 Zhao Qiang 2016-06-06 @305 iowrite16be(bd_status, &priv->rx_bd_base[i].status);
c19b6d246a3562 Zhao Qiang 2016-06-06 306 iowrite32be(priv->dma_rx_addr + i * MAX_RX_BUF_LENGTH,
c19b6d246a3562 Zhao Qiang 2016-06-06 307 &priv->rx_bd_base[i].buf);
c19b6d246a3562 Zhao Qiang 2016-06-06 308 }
c19b6d246a3562 Zhao Qiang 2016-06-06 309
c19b6d246a3562 Zhao Qiang 2016-06-06 310 for (i = 0; i < TX_BD_RING_LEN; i++) {
c19b6d246a3562 Zhao Qiang 2016-06-06 311 if (i < (TX_BD_RING_LEN - 1))
c19b6d246a3562 Zhao Qiang 2016-06-06 312 bd_status = T_I_S | T_TC_S;
c19b6d246a3562 Zhao Qiang 2016-06-06 313 else
c19b6d246a3562 Zhao Qiang 2016-06-06 314 bd_status = T_I_S | T_TC_S | T_W_S;
c19b6d246a3562 Zhao Qiang 2016-06-06 315
c19b6d246a3562 Zhao Qiang 2016-06-06 316 iowrite16be(bd_status, &priv->tx_bd_base[i].status);
c19b6d246a3562 Zhao Qiang 2016-06-06 317 iowrite32be(priv->dma_tx_addr + i * MAX_RX_BUF_LENGTH,
c19b6d246a3562 Zhao Qiang 2016-06-06 318 &priv->tx_bd_base[i].buf);
c19b6d246a3562 Zhao Qiang 2016-06-06 319 }
c19b6d246a3562 Zhao Qiang 2016-06-06 320
c19b6d246a3562 Zhao Qiang 2016-06-06 321 return 0;
c19b6d246a3562 Zhao Qiang 2016-06-06 322
1efb597d8bf56c Zhao Qiang 2016-07-15 323 free_tiptr:
c19b6d246a3562 Zhao Qiang 2016-06-06 324 qe_muram_free(tiptr);
1efb597d8bf56c Zhao Qiang 2016-07-15 325 free_riptr:
c19b6d246a3562 Zhao Qiang 2016-06-06 326 qe_muram_free(riptr);
1efb597d8bf56c Zhao Qiang 2016-07-15 327 free_tx_skbuff:
c19b6d246a3562 Zhao Qiang 2016-06-06 328 kfree(priv->tx_skbuff);
1efb597d8bf56c Zhao Qiang 2016-07-15 329 free_rx_skbuff:
c19b6d246a3562 Zhao Qiang 2016-06-06 330 kfree(priv->rx_skbuff);
1efb597d8bf56c Zhao Qiang 2016-07-15 331 free_ucc_pram:
c19b6d246a3562 Zhao Qiang 2016-06-06 332 qe_muram_free(priv->ucc_pram_offset);
1efb597d8bf56c Zhao Qiang 2016-07-15 333 free_tx_bd:
c19b6d246a3562 Zhao Qiang 2016-06-06 334 dma_free_coherent(priv->dev,
5b8aad93c52bdd Holger Brunck 2017-05-17 335 TX_BD_RING_LEN * sizeof(struct qe_bd),
c19b6d246a3562 Zhao Qiang 2016-06-06 336 priv->tx_bd_base, priv->dma_tx_bd);
1efb597d8bf56c Zhao Qiang 2016-07-15 337 free_rx_bd:
c19b6d246a3562 Zhao Qiang 2016-06-06 338 dma_free_coherent(priv->dev,
5b8aad93c52bdd Holger Brunck 2017-05-17 339 RX_BD_RING_LEN * sizeof(struct qe_bd),
c19b6d246a3562 Zhao Qiang 2016-06-06 340 priv->rx_bd_base, priv->dma_rx_bd);
1efb597d8bf56c Zhao Qiang 2016-07-15 341 free_uccf:
c19b6d246a3562 Zhao Qiang 2016-06-06 342 ucc_fast_free(priv->uccf);
c19b6d246a3562 Zhao Qiang 2016-06-06 343
c19b6d246a3562 Zhao Qiang 2016-06-06 344 return ret;
c19b6d246a3562 Zhao Qiang 2016-06-06 345 }
c19b6d246a3562 Zhao Qiang 2016-06-06 346
:::::: The code at line 305 was first introduced by commit
:::::: c19b6d246a35627c3a69b2fa6bdece212b48214b drivers/net: support hdlc function for QE-UCC
:::::: TO: Zhao Qiang <qiang.zhao(a)nxp.com>
:::::: CC: David S. Miller <davem(a)davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[linux-next:master 2078/2633] include/linux/hugetlb.h:340:30: error: variable has incomplete type 'enum mcopy_atomic_mode'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: ec85c95b0c90a17413901b018e8ade7b9eae7cad
commit: 09ff184a3eb1c9cb42f64325ca4a51e36206f4f5 [2078/2633] userfaultfd/hugetlbfs: avoid including userfaultfd_k.h in hugetlb.h
config: s390-randconfig-r023-20210512 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project a0fed635fe1701470062495a6ffee1c608f3f1bc)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 09ff184a3eb1c9cb42f64325ca4a51e36206f4f5
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/s390/mm/fault.c:33:
>> include/linux/hugetlb.h:340:30: error: variable has incomplete type 'enum mcopy_atomic_mode'
enum mcopy_atomic_mode mode,
^
include/linux/hugetlb.h:18:6: note: forward declaration of 'enum mcopy_atomic_mode'
enum mcopy_atomic_mode;
^
In file included from arch/s390/mm/fault.c:35:
In file included from arch/s390/include/asm/diag.h:12:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:75:
include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:36:59: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
^
include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
#define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
^
In file included from arch/s390/mm/fault.c:35:
In file included from arch/s390/include/asm/diag.h:12:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:75:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:115:54: note: expanded from macro '__swab32'
#define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
^
In file included from arch/s390/mm/fault.c:35:
In file included from arch/s390/include/asm/diag.h:12:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:75:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
12 warnings and 1 error generated.
--
In file included from arch/s390/mm/vmem.c:8:
In file included from include/linux/memblock.h:14:
In file included from arch/s390/include/asm/dma.h:5:
In file included from arch/s390/include/asm/io.h:75:
include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:36:59: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
^
include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
#define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
^
In file included from arch/s390/mm/vmem.c:8:
In file included from include/linux/memblock.h:14:
In file included from arch/s390/include/asm/dma.h:5:
In file included from arch/s390/include/asm/io.h:75:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:115:54: note: expanded from macro '__swab32'
#define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
^
In file included from arch/s390/mm/vmem.c:8:
In file included from include/linux/memblock.h:14:
In file included from arch/s390/include/asm/dma.h:5:
In file included from arch/s390/include/asm/io.h:75:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
In file included from arch/s390/mm/vmem.c:13:
>> include/linux/hugetlb.h:340:30: error: variable has incomplete type 'enum mcopy_atomic_mode'
enum mcopy_atomic_mode mode,
^
include/linux/hugetlb.h:18:6: note: forward declaration of 'enum mcopy_atomic_mode'
enum mcopy_atomic_mode;
^
arch/s390/mm/vmem.c:521:6: warning: no previous prototype for function 'vmemmap_free' [-Wmissing-prototypes]
void vmemmap_free(unsigned long start, unsigned long end,
^
arch/s390/mm/vmem.c:521:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void vmemmap_free(unsigned long start, unsigned long end,
^
static
13 warnings and 1 error generated.
--
In file included from arch/s390/mm/pageattr.c:6:
>> include/linux/hugetlb.h:340:30: error: variable has incomplete type 'enum mcopy_atomic_mode'
enum mcopy_atomic_mode mode,
^
include/linux/hugetlb.h:18:6: note: forward declaration of 'enum mcopy_atomic_mode'
enum mcopy_atomic_mode;
^
1 error generated.
--
In file included from arch/s390/kernel/setup.c:25:
In file included from include/linux/memblock.h:14:
In file included from arch/s390/include/asm/dma.h:5:
In file included from arch/s390/include/asm/io.h:75:
include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:36:59: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
^
include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
#define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
^
In file included from arch/s390/kernel/setup.c:25:
In file included from include/linux/memblock.h:14:
In file included from arch/s390/include/asm/dma.h:5:
In file included from arch/s390/include/asm/io.h:75:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:115:54: note: expanded from macro '__swab32'
#define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
^
In file included from arch/s390/kernel/setup.c:25:
In file included from include/linux/memblock.h:14:
In file included from arch/s390/include/asm/dma.h:5:
In file included from arch/s390/include/asm/io.h:75:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
In file included from arch/s390/kernel/setup.c:52:
>> include/linux/hugetlb.h:340:30: error: variable has incomplete type 'enum mcopy_atomic_mode'
enum mcopy_atomic_mode mode,
^
include/linux/hugetlb.h:18:6: note: forward declaration of 'enum mcopy_atomic_mode'
enum mcopy_atomic_mode;
^
12 warnings and 1 error generated.
vim +340 include/linux/hugetlb.h
1f9dccb25b8fb4 Mike Kravetz 2019-11-30 333
714c189108244f Axel Rasmussen 2021-05-04 334 #ifdef CONFIG_USERFAULTFD
1f9dccb25b8fb4 Mike Kravetz 2019-11-30 335 static inline int hugetlb_mcopy_atomic_pte(struct mm_struct *dst_mm,
1f9dccb25b8fb4 Mike Kravetz 2019-11-30 336 pte_t *dst_pte,
1f9dccb25b8fb4 Mike Kravetz 2019-11-30 337 struct vm_area_struct *dst_vma,
1f9dccb25b8fb4 Mike Kravetz 2019-11-30 338 unsigned long dst_addr,
1f9dccb25b8fb4 Mike Kravetz 2019-11-30 339 unsigned long src_addr,
f619147104c8ea Axel Rasmussen 2021-05-04 @340 enum mcopy_atomic_mode mode,
1f9dccb25b8fb4 Mike Kravetz 2019-11-30 341 struct page **pagep)
1f9dccb25b8fb4 Mike Kravetz 2019-11-30 342 {
1f9dccb25b8fb4 Mike Kravetz 2019-11-30 343 BUG();
1f9dccb25b8fb4 Mike Kravetz 2019-11-30 344 return 0;
1f9dccb25b8fb4 Mike Kravetz 2019-11-30 345 }
714c189108244f Axel Rasmussen 2021-05-04 346 #endif /* CONFIG_USERFAULTFD */
1f9dccb25b8fb4 Mike Kravetz 2019-11-30 347
:::::: The code at line 340 was first introduced by commit
:::::: f619147104c8ea71e120e4936d2b68ec11a1e527 userfaultfd: add UFFDIO_CONTINUE ioctl
:::::: TO: Axel Rasmussen <axelrasmussen(a)google.com>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
Re: [PATCH 6/7] crypto: ed25519 cert verification
by kernel test robot
Hi Hongbo,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on cryptodev/master]
[also build test WARNING on crypto/master linus/master v5.13-rc1 next-20210512]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Hongbo-Li/crypto-add-eddsa-suppo...
base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/f9de73b89d39483afde4fc9ba079b66de...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Hongbo-Li/crypto-add-eddsa-support-for-x509/20210512-220722
git checkout f9de73b89d39483afde4fc9ba079b66dee2f05ab
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> crypto/eddsa.c:67:5: warning: no previous prototype for 'ecc_eddsa_encodepoint' [-Wmissing-prototypes]
67 | int ecc_eddsa_encodepoint(MPI_POINT point, struct mpi_ec_ctx *ec,
| ^~~~~~~~~~~~~~~~~~~~~
>> crypto/eddsa.c:174:5: warning: no previous prototype for 'eddsa_verify' [-Wmissing-prototypes]
174 | int eddsa_verify(struct akcipher_request *req)
| ^~~~~~~~~~~~
>> crypto/eddsa.c:255:5: warning: no previous prototype for 'eddsa_max_size' [-Wmissing-prototypes]
255 | u32 eddsa_max_size(struct crypto_akcipher *tfm)
| ^~~~~~~~~~~~~~
vim +/ecc_eddsa_encodepoint +67 crypto/eddsa.c
66
> 67 int ecc_eddsa_encodepoint(MPI_POINT point, struct mpi_ec_ctx *ec,
68 MPI x, MPI y, u8 *buf, u32 key_size)
69 {
70 if (mpi_ec_get_affine(x, y, point, ec))
71 return -EINVAL;
72
73 return eddsa_encode_x_y(x, y, buf, key_size);
74 }
75
76 /* Recover X from Y and SIGN (which actually is a parity bit). */
77 static int eddsa_recover_x(MPI x, MPI y, int sign, struct mpi_ec_ctx *ec)
78 {
79 MPI u, v, v3, t;
80 int ret = 0;
81
82 if (ec->dialect != ECC_DIALECT_ED25519)
83 return -ENOPKG;
84
85 u = mpi_new(0);
86 v = mpi_new(0);
87 v3 = mpi_new(0);
88 t = mpi_new(0);
89
90 /* Compute u and v */
91 /* u = y^2 */
92 mpi_mulm(u, y, y, ec->p);
93 /* v = b*y^2 */
94 mpi_mulm(v, ec->b, u, ec->p);
95 /* u = y^2-1 */
96 mpi_sub_ui(u, u, 1);
97 /* v = b*y^2+1 */
98 mpi_add_ui(v, v, 1);
99
100 /* Compute sqrt(u/v) */
101 /* v3 = v^3 */
102 mpi_powm(v3, v, mpi_const(MPI_C_THREE), ec->p);
103 /* t = v3 * v3 * u * v = u * v^7 */
104 mpi_powm(t, v, seven, ec->p);
105 mpi_mulm(t, t, u, ec->p);
106 /* t = t^((p-5)/8) = (u * v^7)^((p-5)/8) */
107 mpi_powm(t, t, p58, ec->p);
108 /* x = t * u * v^3 = (u * v^3) * (u * v^7)^((p-5)/8) */
109 mpi_mulm(t, t, u, ec->p);
110 mpi_mulm(x, t, v3, ec->p);
111
112 /* Adjust if needed. */
113 /* t = v * x^2 */
114 mpi_mulm(t, x, x, ec->p);
115 mpi_mulm(t, t, v, ec->p);
116 /* -t == u ? x = x * sqrt(-1) */
117 mpi_sub(t, ec->p, t);
118 if (!mpi_cmp(t, u)) {
119 mpi_mulm(x, x, m1, ec->p);
120 /* t = v * x^2 */
121 mpi_mulm(t, x, x, ec->p);
122 mpi_mulm(t, t, v, ec->p);
123 /* -t == u ? x = x * sqrt(-1) */
124 mpi_sub(t, ec->p, t);
125 if (!mpi_cmp(t, u))
126 ret = -EINVAL;
127 }
128
129 /* Choose the desired square root according to parity */
130 if (mpi_test_bit(x, 0) != !!sign)
131 mpi_sub(x, ec->p, x);
132
133 mpi_free(t);
134 mpi_free(v3);
135 mpi_free(v);
136 mpi_free(u);
137
138 return ret;
139 }
140
141 static int ecc_eddsa_decodepoint(const u8 *pk, int key_size,
142 struct mpi_ec_ctx *ec, MPI_POINT result)
143 {
144 MPI y;
145 u8 *rawmpi;
146 int sign, ret = 0;
147
148 rawmpi = kmalloc(key_size, GFP_KERNEL);
149 if (!rawmpi)
150 return -ENOMEM;
151 memcpy(rawmpi, pk, key_size);
152 reverse_buffer(rawmpi, key_size);
153
154 sign = !!(rawmpi[0] & 0x80);
155 rawmpi[0] &= 0x7f;
156
157 y = mpi_read_raw_data(rawmpi, key_size);
158 if (!y) {
159 ret = -EINVAL;
160 goto out;
161 }
162
163 mpi_normalize(y);
164 mpi_set(result->y, y);
165 mpi_free(y);
166
167 ret = eddsa_recover_x(result->x, result->y, sign, ec);
168 mpi_set_ui(result->z, 1);
169 out:
170 kfree(rawmpi);
171 return ret;
172 }
173
> 174 int eddsa_verify(struct akcipher_request *req)
175 {
176 struct crypto_akcipher *tfm = crypto_akcipher_reqtfm(req);
177 struct eddsa_ctx *ctx = akcipher_tfm_ctx(tfm);
178 struct mpi_ec_ctx *ec = &ctx->ec_ctx;
179 struct gcry_mpi_point sb, ka;
180 MPI s = NULL;
181 MPI k = NULL;
182 u8 sig[CURVE25519_KEY_SIZE * 2], digest[SHA512_DIGEST_SIZE];
183 u8 *buf;
184 u32 key_size;
185 int ret = 0;
186
187 if (ctx->algo_oid != OID_ed25519)
188 return -ENOPKG;
189
190 key_size = CURVE25519_KEY_SIZE;
191
192 if (!ec->Q || req->src_len != key_size * 2)
193 return -EINVAL;
194
195 sg_copy_to_buffer(req->src, sg_nents_for_len(req->src, req->src_len),
196 sig, req->src_len);
197
198 sg_pcopy_to_buffer(req->src,
199 sg_nents_for_len(req->src,
200 req->src_len + req->dst_len),
201 digest, req->dst_len, req->src_len);
202
203 reverse_buffer(digest, SHA512_DIGEST_SIZE);
204 k = mpi_read_raw_data(digest, SHA512_DIGEST_SIZE);
205
206 reverse_buffer(sig + key_size, key_size);
207 s = mpi_read_raw_data(sig + key_size, key_size);
208
209 mpi_point_init(&sb);
210 mpi_point_init(&ka);
211
212 mpi_ec_mul_point(&sb, s, ec->G, ec);
213 mpi_ec_mul_point(&ka, k, ec->Q, ec);
214 mpi_sub(ka.x, ec->p, ka.x);
215 mpi_ec_add_points(&sb, &sb, &ka, ec);
216
217 buf = kmalloc(key_size, GFP_KERNEL);
218 if (!buf) {
219 ret = -ENOMEM;
220 goto out;
221 }
222
223 ret = ecc_eddsa_encodepoint(&sb, ec, s, k, buf, key_size);
224 if (ret)
225 goto out;
226
227 if (memcmp(buf, sig, key_size))
228 ret = -EKEYREJECTED;
229
230 out:
231 mpi_point_free_parts(&sb);
232 mpi_point_free_parts(&ka);
233 mpi_free(k);
234 mpi_free(s);
235 kfree(buf);
236 return ret;
237 }
238
239 static int eddsa_set_pub_key(struct crypto_akcipher *tfm, const void *key,
240 unsigned int keylen)
241 {
242 struct eddsa_ctx *ctx = akcipher_tfm_ctx(tfm);
243 struct mpi_ec_ctx *ec = &ctx->ec_ctx;
244 const u8 *pk = key;
245
246 if (ctx->algo_oid != OID_ed25519)
247 return -ENOPKG;
248
249 if (keylen != CURVE25519_KEY_SIZE)
250 return -EINVAL;
251
252 return ecc_eddsa_decodepoint(pk, keylen, ec, ec->Q);
253 }
254
> 255 u32 eddsa_max_size(struct crypto_akcipher *tfm)
256 {
257 struct eddsa_ctx *ctx = akcipher_tfm_ctx(tfm);
258
259 if (ctx->algo_oid == OID_ed25519)
260 return CURVE25519_KEY_SIZE;
261
262 return 0;
263 }
264
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
Re: [PATCH 08/11] f2fs: Convert to using invalidate_lock
by kernel test robot
Hi Jan,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.13-rc1]
[cannot apply to hnaz-linux-mm/master ext4/dev fuse/for-next next-20210512]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Jan-Kara/fs-Hole-punch-vs-page-c...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 88b06399c9c766c283e070b022b5ceafa4f63f19
config: x86_64-rhel-8.3 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/12e7111c8a1e839ea70ac4c8bf2467746...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jan-Kara/fs-Hole-punch-vs-page-cache-filling-races/20210512-214713
git checkout 12e7111c8a1e839ea70ac4c8bf24677466cbe767
# save the attached .config to linux build tree
make W=1 W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
fs/f2fs/file.c: In function 'f2fs_file_write_iter':
>> fs/f2fs/file.c:4314:29: error: 'struct f2fs_inode_info' has no member named 'i_mmap_sem'
4314 | down_write(&F2FS_I(inode)->i_mmap_sem);
| ^~
fs/f2fs/file.c:4316:27: error: 'struct f2fs_inode_info' has no member named 'i_mmap_sem'
4316 | up_write(&F2FS_I(inode)->i_mmap_sem);
| ^~
vim +4314 fs/f2fs/file.c
4c8ff7095bef64 Chao Yu 2019-11-01 4223
fcc85a4d86b501 Jaegeuk Kim 2015-04-21 4224 static ssize_t f2fs_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
fcc85a4d86b501 Jaegeuk Kim 2015-04-21 4225 {
b439b103a6c9eb Jaegeuk Kim 2016-02-03 4226 struct file *file = iocb->ki_filp;
b439b103a6c9eb Jaegeuk Kim 2016-02-03 4227 struct inode *inode = file_inode(file);
b439b103a6c9eb Jaegeuk Kim 2016-02-03 4228 ssize_t ret;
fcc85a4d86b501 Jaegeuk Kim 2015-04-21 4229
126ce7214d2134 Chao Yu 2019-04-02 4230 if (unlikely(f2fs_cp_error(F2FS_I_SB(inode)))) {
126ce7214d2134 Chao Yu 2019-04-02 4231 ret = -EIO;
126ce7214d2134 Chao Yu 2019-04-02 4232 goto out;
126ce7214d2134 Chao Yu 2019-04-02 4233 }
1f227a3e215d36 Jaegeuk Kim 2017-10-23 4234
7bd2935870c050 Chao Yu 2020-02-24 4235 if (!f2fs_is_compress_backend_ready(inode)) {
7bd2935870c050 Chao Yu 2020-02-24 4236 ret = -EOPNOTSUPP;
7bd2935870c050 Chao Yu 2020-02-24 4237 goto out;
7bd2935870c050 Chao Yu 2020-02-24 4238 }
4c8ff7095bef64 Chao Yu 2019-11-01 4239
126ce7214d2134 Chao Yu 2019-04-02 4240 if (iocb->ki_flags & IOCB_NOWAIT) {
cb8434f16479b6 Goldwyn Rodrigues 2019-09-11 4241 if (!inode_trylock(inode)) {
126ce7214d2134 Chao Yu 2019-04-02 4242 ret = -EAGAIN;
126ce7214d2134 Chao Yu 2019-04-02 4243 goto out;
126ce7214d2134 Chao Yu 2019-04-02 4244 }
cb8434f16479b6 Goldwyn Rodrigues 2019-09-11 4245 } else {
b439b103a6c9eb Jaegeuk Kim 2016-02-03 4246 inode_lock(inode);
b91050a80cec3d Hyunchul Lee 2018-03-08 4247 }
b91050a80cec3d Hyunchul Lee 2018-03-08 4248
e0fcd01510ad02 Chao Yu 2020-12-26 4249 if (unlikely(IS_IMMUTABLE(inode))) {
e0fcd01510ad02 Chao Yu 2020-12-26 4250 ret = -EPERM;
e0fcd01510ad02 Chao Yu 2020-12-26 4251 goto unlock;
e0fcd01510ad02 Chao Yu 2020-12-26 4252 }
e0fcd01510ad02 Chao Yu 2020-12-26 4253
b439b103a6c9eb Jaegeuk Kim 2016-02-03 4254 ret = generic_write_checks(iocb, from);
b439b103a6c9eb Jaegeuk Kim 2016-02-03 4255 if (ret > 0) {
dc7a10ddee0c56 Jaegeuk Kim 2018-03-30 4256 bool preallocated = false;
dc7a10ddee0c56 Jaegeuk Kim 2018-03-30 4257 size_t target_size = 0;
dc91de78e5e1d4 Jaegeuk Kim 2017-01-13 4258 int err;
dc91de78e5e1d4 Jaegeuk Kim 2017-01-13 4259
dc91de78e5e1d4 Jaegeuk Kim 2017-01-13 4260 if (iov_iter_fault_in_readable(from, iov_iter_count(from)))
dc91de78e5e1d4 Jaegeuk Kim 2017-01-13 4261 set_inode_flag(inode, FI_NO_PREALLOC);
a7de608691f766 Jaegeuk Kim 2016-11-11 4262
d5d5f0c0c9160f Chengguang Xu 2019-04-23 4263 if ((iocb->ki_flags & IOCB_NOWAIT)) {
b91050a80cec3d Hyunchul Lee 2018-03-08 4264 if (!f2fs_overwrite_io(inode, iocb->ki_pos,
b91050a80cec3d Hyunchul Lee 2018-03-08 4265 iov_iter_count(from)) ||
b91050a80cec3d Hyunchul Lee 2018-03-08 4266 f2fs_has_inline_data(inode) ||
d5d5f0c0c9160f Chengguang Xu 2019-04-23 4267 f2fs_force_buffered_io(inode, iocb, from)) {
d5d5f0c0c9160f Chengguang Xu 2019-04-23 4268 clear_inode_flag(inode, FI_NO_PREALLOC);
b91050a80cec3d Hyunchul Lee 2018-03-08 4269 inode_unlock(inode);
126ce7214d2134 Chao Yu 2019-04-02 4270 ret = -EAGAIN;
126ce7214d2134 Chao Yu 2019-04-02 4271 goto out;
b91050a80cec3d Hyunchul Lee 2018-03-08 4272 }
47501f87c61ad2 Jaegeuk Kim 2019-11-26 4273 goto write;
47501f87c61ad2 Jaegeuk Kim 2019-11-26 4274 }
47501f87c61ad2 Jaegeuk Kim 2019-11-26 4275
47501f87c61ad2 Jaegeuk Kim 2019-11-26 4276 if (is_inode_flag_set(inode, FI_NO_PREALLOC))
47501f87c61ad2 Jaegeuk Kim 2019-11-26 4277 goto write;
47501f87c61ad2 Jaegeuk Kim 2019-11-26 4278
47501f87c61ad2 Jaegeuk Kim 2019-11-26 4279 if (iocb->ki_flags & IOCB_DIRECT) {
47501f87c61ad2 Jaegeuk Kim 2019-11-26 4280 /*
47501f87c61ad2 Jaegeuk Kim 2019-11-26 4281 * Convert inline data for Direct I/O before entering
47501f87c61ad2 Jaegeuk Kim 2019-11-26 4282 * f2fs_direct_IO().
47501f87c61ad2 Jaegeuk Kim 2019-11-26 4283 */
47501f87c61ad2 Jaegeuk Kim 2019-11-26 4284 err = f2fs_convert_inline_inode(inode);
47501f87c61ad2 Jaegeuk Kim 2019-11-26 4285 if (err)
47501f87c61ad2 Jaegeuk Kim 2019-11-26 4286 goto out_err;
47501f87c61ad2 Jaegeuk Kim 2019-11-26 4287 /*
47501f87c61ad2 Jaegeuk Kim 2019-11-26 4288 * If force_buffere_io() is true, we have to allocate
47501f87c61ad2 Jaegeuk Kim 2019-11-26 4289 * blocks all the time, since f2fs_direct_IO will fall
47501f87c61ad2 Jaegeuk Kim 2019-11-26 4290 * back to buffered IO.
47501f87c61ad2 Jaegeuk Kim 2019-11-26 4291 */
47501f87c61ad2 Jaegeuk Kim 2019-11-26 4292 if (!f2fs_force_buffered_io(inode, iocb, from) &&
47501f87c61ad2 Jaegeuk Kim 2019-11-26 4293 allow_outplace_dio(inode, iocb, from))
47501f87c61ad2 Jaegeuk Kim 2019-11-26 4294 goto write;
47501f87c61ad2 Jaegeuk Kim 2019-11-26 4295 }
dc7a10ddee0c56 Jaegeuk Kim 2018-03-30 4296 preallocated = true;
dc7a10ddee0c56 Jaegeuk Kim 2018-03-30 4297 target_size = iocb->ki_pos + iov_iter_count(from);
dc7a10ddee0c56 Jaegeuk Kim 2018-03-30 4298
dc91de78e5e1d4 Jaegeuk Kim 2017-01-13 4299 err = f2fs_preallocate_blocks(iocb, from);
a7de608691f766 Jaegeuk Kim 2016-11-11 4300 if (err) {
47501f87c61ad2 Jaegeuk Kim 2019-11-26 4301 out_err:
28cfafb73853f0 Chao Yu 2017-11-13 4302 clear_inode_flag(inode, FI_NO_PREALLOC);
a7de608691f766 Jaegeuk Kim 2016-11-11 4303 inode_unlock(inode);
126ce7214d2134 Chao Yu 2019-04-02 4304 ret = err;
126ce7214d2134 Chao Yu 2019-04-02 4305 goto out;
a7de608691f766 Jaegeuk Kim 2016-11-11 4306 }
47501f87c61ad2 Jaegeuk Kim 2019-11-26 4307 write:
b439b103a6c9eb Jaegeuk Kim 2016-02-03 4308 ret = __generic_file_write_iter(iocb, from);
dc91de78e5e1d4 Jaegeuk Kim 2017-01-13 4309 clear_inode_flag(inode, FI_NO_PREALLOC);
b0af6d491a6b5f Chao Yu 2017-08-02 4310
dc7a10ddee0c56 Jaegeuk Kim 2018-03-30 4311 /* if we couldn't write data, we should deallocate blocks. */
a303b0ac920d80 Chao Yu 2021-04-01 4312 if (preallocated && i_size_read(inode) < target_size) {
a303b0ac920d80 Chao Yu 2021-04-01 4313 down_write(&F2FS_I(inode)->i_gc_rwsem[WRITE]);
a303b0ac920d80 Chao Yu 2021-04-01 @4314 down_write(&F2FS_I(inode)->i_mmap_sem);
dc7a10ddee0c56 Jaegeuk Kim 2018-03-30 4315 f2fs_truncate(inode);
a303b0ac920d80 Chao Yu 2021-04-01 4316 up_write(&F2FS_I(inode)->i_mmap_sem);
a303b0ac920d80 Chao Yu 2021-04-01 4317 up_write(&F2FS_I(inode)->i_gc_rwsem[WRITE]);
a303b0ac920d80 Chao Yu 2021-04-01 4318 }
dc7a10ddee0c56 Jaegeuk Kim 2018-03-30 4319
b0af6d491a6b5f Chao Yu 2017-08-02 4320 if (ret > 0)
b0af6d491a6b5f Chao Yu 2017-08-02 4321 f2fs_update_iostat(F2FS_I_SB(inode), APP_WRITE_IO, ret);
9dfa1baff76d08 Jaegeuk Kim 2016-07-13 4322 }
e0fcd01510ad02 Chao Yu 2020-12-26 4323 unlock:
b439b103a6c9eb Jaegeuk Kim 2016-02-03 4324 inode_unlock(inode);
126ce7214d2134 Chao Yu 2019-04-02 4325 out:
126ce7214d2134 Chao Yu 2019-04-02 4326 trace_f2fs_file_write_iter(inode, iocb->ki_pos,
126ce7214d2134 Chao Yu 2019-04-02 4327 iov_iter_count(from), ret);
e259221763a404 Christoph Hellwig 2016-04-07 4328 if (ret > 0)
e259221763a404 Christoph Hellwig 2016-04-07 4329 ret = generic_write_sync(iocb, ret);
b439b103a6c9eb Jaegeuk Kim 2016-02-03 4330 return ret;
fcc85a4d86b501 Jaegeuk Kim 2015-04-21 4331 }
fcc85a4d86b501 Jaegeuk Kim 2015-04-21 4332
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months