* Re: [PATCH] mmc: meson-gx: fix SDIO mode if cap_sdio_irq isn't set
[not found] <9e296859-0363-ecc4-2d99-fd0239efceff@gmail.com>
@ 2023-02-13 0:42 ` kernel test robot
2023-02-13 1:07 ` kernel test robot
1 sibling, 0 replies; 2+ messages in thread
From: kernel test robot @ 2023-02-13 0:42 UTC (permalink / raw)
To: Heiner Kallweit, Ulf Hansson, Neil Armstrong, Kevin Hilman,
Jerome Brunet, Martin Blumenstingl
Cc: oe-kbuild-all, linux-mmc, linux-arm-kernel,
open list:ARM/Amlogic Meson...,
Geraldo Nascimento
Hi Heiner,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v6.2-rc8 next-20230210]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Heiner-Kallweit/mmc-meson-gx-fix-SDIO-mode-if-cap_sdio_irq-isn-t-set/20230213-055650
patch link: https://lore.kernel.org/r/9e296859-0363-ecc4-2d99-fd0239efceff%40gmail.com
patch subject: [PATCH] mmc: meson-gx: fix SDIO mode if cap_sdio_irq isn't set
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20230213/202302130854.oj1Vrs2F-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/6aca20b626a6d75b5d74fc4441cdd99ff3252b23
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Heiner-Kallweit/mmc-meson-gx-fix-SDIO-mode-if-cap_sdio_irq-isn-t-set/20230213-055650
git checkout 6aca20b626a6d75b5d74fc4441cdd99ff3252b23
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=alpha olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=alpha SHELL=/bin/bash drivers/mmc/host/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202302130854.oj1Vrs2F-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from include/linux/printk.h:566,
from include/linux/kernel.h:29,
from drivers/mmc/host/meson-gx-mmc.c:8:
drivers/mmc/host/meson-gx-mmc.c: In function 'meson_mmc_irq':
>> drivers/mmc/host/meson-gx-mmc.c:962:25: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'u32' {aka 'unsigned int'} [-Wformat=]
962 | "Unexpected IRQ! irq_en 0x%08lx - status 0x%08x\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:223:29: note: in definition of macro '__dynamic_func_call_cls'
223 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:249:9: note: in expansion of macro '_dynamic_func_call_cls'
249 | _dynamic_func_call_cls(_DPRINTK_CLASS_DFLT, fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:272:9: note: in expansion of macro '_dynamic_func_call'
272 | _dynamic_func_call(fmt, __dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:155:9: note: in expansion of macro 'dynamic_dev_dbg'
155 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:155:30: note: in expansion of macro 'dev_fmt'
155 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/mmc/host/meson-gx-mmc.c:961:17: note: in expansion of macro 'dev_dbg'
961 | dev_dbg(host->dev,
| ^~~~~~~
drivers/mmc/host/meson-gx-mmc.c:962:55: note: format string is defined here
962 | "Unexpected IRQ! irq_en 0x%08lx - status 0x%08x\n",
| ~~~~^
| |
| long unsigned int
| %08x
vim +962 drivers/mmc/host/meson-gx-mmc.c
066ecde6d826b4 Heiner Kallweit 2022-08-25 947
51c5d8447bd71b Kevin Hilman 2016-10-19 948 static irqreturn_t meson_mmc_irq(int irq, void *dev_id)
51c5d8447bd71b Kevin Hilman 2016-10-19 949 {
51c5d8447bd71b Kevin Hilman 2016-10-19 950 struct meson_host *host = dev_id;
19a91dd4e39e75 Heinrich Schuchardt 2016-12-23 951 struct mmc_command *cmd;
6aca20b626a6d7 Heiner Kallweit 2023-02-12 952 u32 status, raw_status, irq_mask = IRQ_EN_MASK;
74858655cbff05 Jerome Brunet 2017-08-28 953 irqreturn_t ret = IRQ_NONE;
51c5d8447bd71b Kevin Hilman 2016-10-19 954
6aca20b626a6d7 Heiner Kallweit 2023-02-12 955 if (host->mmc->caps & MMC_CAP_SDIO_IRQ)
6aca20b626a6d7 Heiner Kallweit 2023-02-12 956 irq_mask |= IRQ_SDIO;
18f92bc02f1739 Jerome Brunet 2018-12-06 957 raw_status = readl(host->regs + SD_EMMC_STATUS);
6aca20b626a6d7 Heiner Kallweit 2023-02-12 958 status = raw_status & irq_mask;
18f92bc02f1739 Jerome Brunet 2018-12-06 959
18f92bc02f1739 Jerome Brunet 2018-12-06 960 if (!status) {
18f92bc02f1739 Jerome Brunet 2018-12-06 961 dev_dbg(host->dev,
6f6fac8af6be0f Heiner Kallweit 2022-08-25 @962 "Unexpected IRQ! irq_en 0x%08lx - status 0x%08x\n",
6aca20b626a6d7 Heiner Kallweit 2023-02-12 963 irq_mask, raw_status);
18f92bc02f1739 Jerome Brunet 2018-12-06 964 return IRQ_NONE;
18f92bc02f1739 Jerome Brunet 2018-12-06 965 }
18f92bc02f1739 Jerome Brunet 2018-12-06 966
066ecde6d826b4 Heiner Kallweit 2022-08-25 967 if (WARN_ON(!host))
51c5d8447bd71b Kevin Hilman 2016-10-19 968 return IRQ_NONE;
51c5d8447bd71b Kevin Hilman 2016-10-19 969
c2c1e63a80d6e9 Jerome Brunet 2019-05-23 970 /* ack all raised interrupts */
c2c1e63a80d6e9 Jerome Brunet 2019-05-23 971 writel(status, host->regs + SD_EMMC_STATUS);
c2c1e63a80d6e9 Jerome Brunet 2019-05-23 972
74858655cbff05 Jerome Brunet 2017-08-28 973 cmd = host->cmd;
066ecde6d826b4 Heiner Kallweit 2022-08-25 974
066ecde6d826b4 Heiner Kallweit 2022-08-25 975 if (status & IRQ_SDIO) {
066ecde6d826b4 Heiner Kallweit 2022-08-25 976 spin_lock(&host->lock);
066ecde6d826b4 Heiner Kallweit 2022-08-25 977 __meson_mmc_enable_sdio_irq(host->mmc, 0);
066ecde6d826b4 Heiner Kallweit 2022-08-25 978 sdio_signal_irq(host->mmc);
066ecde6d826b4 Heiner Kallweit 2022-08-25 979 spin_unlock(&host->lock);
066ecde6d826b4 Heiner Kallweit 2022-08-25 980 status &= ~IRQ_SDIO;
066ecde6d826b4 Heiner Kallweit 2022-08-25 981 if (!status)
066ecde6d826b4 Heiner Kallweit 2022-08-25 982 return IRQ_HANDLED;
066ecde6d826b4 Heiner Kallweit 2022-08-25 983 }
066ecde6d826b4 Heiner Kallweit 2022-08-25 984
066ecde6d826b4 Heiner Kallweit 2022-08-25 985 if (WARN_ON(!cmd))
066ecde6d826b4 Heiner Kallweit 2022-08-25 986 return IRQ_NONE;
066ecde6d826b4 Heiner Kallweit 2022-08-25 987
51c5d8447bd71b Kevin Hilman 2016-10-19 988 cmd->error = 0;
74858655cbff05 Jerome Brunet 2017-08-28 989 if (status & IRQ_CRC_ERR) {
74858655cbff05 Jerome Brunet 2017-08-28 990 dev_dbg(host->dev, "CRC Error - status 0x%08x\n", status);
51c5d8447bd71b Kevin Hilman 2016-10-19 991 cmd->error = -EILSEQ;
18f92bc02f1739 Jerome Brunet 2018-12-06 992 ret = IRQ_WAKE_THREAD;
74858655cbff05 Jerome Brunet 2017-08-28 993 goto out;
51c5d8447bd71b Kevin Hilman 2016-10-19 994 }
74858655cbff05 Jerome Brunet 2017-08-28 995
74858655cbff05 Jerome Brunet 2017-08-28 996 if (status & IRQ_TIMEOUTS) {
74858655cbff05 Jerome Brunet 2017-08-28 997 dev_dbg(host->dev, "Timeout - status 0x%08x\n", status);
51c5d8447bd71b Kevin Hilman 2016-10-19 998 cmd->error = -ETIMEDOUT;
18f92bc02f1739 Jerome Brunet 2018-12-06 999 ret = IRQ_WAKE_THREAD;
74858655cbff05 Jerome Brunet 2017-08-28 1000 goto out;
51c5d8447bd71b Kevin Hilman 2016-10-19 1001 }
74858655cbff05 Jerome Brunet 2017-08-28 1002
74858655cbff05 Jerome Brunet 2017-08-28 1003 meson_mmc_read_resp(host->mmc, cmd);
74858655cbff05 Jerome Brunet 2017-08-28 1004
2c8d96a46dfd45 Heiner Kallweit 2017-03-22 1005 if (status & (IRQ_END_OF_CHAIN | IRQ_RESP_STATUS)) {
066ecde6d826b4 Heiner Kallweit 2022-08-25 1006 struct mmc_data *data = cmd->data;
066ecde6d826b4 Heiner Kallweit 2022-08-25 1007
2c8d96a46dfd45 Heiner Kallweit 2017-03-22 1008 if (data && !cmd->error)
2c8d96a46dfd45 Heiner Kallweit 2017-03-22 1009 data->bytes_xfered = data->blksz * data->blocks;
79ed05e329c34c Heiner Kallweit 2017-04-07 1010 if (meson_mmc_bounce_buf_read(data) ||
79ed05e329c34c Heiner Kallweit 2017-04-07 1011 meson_mmc_get_next_command(cmd))
51c5d8447bd71b Kevin Hilman 2016-10-19 1012 ret = IRQ_WAKE_THREAD;
74858655cbff05 Jerome Brunet 2017-08-28 1013 else
74858655cbff05 Jerome Brunet 2017-08-28 1014 ret = IRQ_HANDLED;
51c5d8447bd71b Kevin Hilman 2016-10-19 1015 }
51c5d8447bd71b Kevin Hilman 2016-10-19 1016
51c5d8447bd71b Kevin Hilman 2016-10-19 1017 out:
18f92bc02f1739 Jerome Brunet 2018-12-06 1018 if (cmd->error) {
18f92bc02f1739 Jerome Brunet 2018-12-06 1019 /* Stop desc in case of errors */
18f92bc02f1739 Jerome Brunet 2018-12-06 1020 u32 start = readl(host->regs + SD_EMMC_START);
18f92bc02f1739 Jerome Brunet 2018-12-06 1021
18f92bc02f1739 Jerome Brunet 2018-12-06 1022 start &= ~START_DESC_BUSY;
18f92bc02f1739 Jerome Brunet 2018-12-06 1023 writel(start, host->regs + SD_EMMC_START);
18f92bc02f1739 Jerome Brunet 2018-12-06 1024 }
18f92bc02f1739 Jerome Brunet 2018-12-06 1025
1f8066d90739eb Heiner Kallweit 2017-03-22 1026 if (ret == IRQ_HANDLED)
51c5d8447bd71b Kevin Hilman 2016-10-19 1027 meson_mmc_request_done(host->mmc, cmd->mrq);
51c5d8447bd71b Kevin Hilman 2016-10-19 1028
51c5d8447bd71b Kevin Hilman 2016-10-19 1029 return ret;
51c5d8447bd71b Kevin Hilman 2016-10-19 1030 }
51c5d8447bd71b Kevin Hilman 2016-10-19 1031
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] mmc: meson-gx: fix SDIO mode if cap_sdio_irq isn't set
[not found] <9e296859-0363-ecc4-2d99-fd0239efceff@gmail.com>
2023-02-13 0:42 ` [PATCH] mmc: meson-gx: fix SDIO mode if cap_sdio_irq isn't set kernel test robot
@ 2023-02-13 1:07 ` kernel test robot
1 sibling, 0 replies; 2+ messages in thread
From: kernel test robot @ 2023-02-13 1:07 UTC (permalink / raw)
To: Heiner Kallweit, Ulf Hansson, Neil Armstrong, Kevin Hilman,
Jerome Brunet, Martin Blumenstingl
Cc: llvm, oe-kbuild-all, linux-mmc, linux-arm-kernel,
open list:ARM/Amlogic Meson...,
Geraldo Nascimento
Hi Heiner,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v6.2-rc8 next-20230210]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Heiner-Kallweit/mmc-meson-gx-fix-SDIO-mode-if-cap_sdio_irq-isn-t-set/20230213-055650
patch link: https://lore.kernel.org/r/9e296859-0363-ecc4-2d99-fd0239efceff%40gmail.com
patch subject: [PATCH] mmc: meson-gx: fix SDIO mode if cap_sdio_irq isn't set
config: arm64-buildonly-randconfig-r006-20230213 (https://download.01.org/0day-ci/archive/20230213/202302130924.CSStKyHP-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project db0e6591612b53910a1b366863348bdb9d7d2fb1)
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://github.com/intel-lab-lkp/linux/commit/6aca20b626a6d75b5d74fc4441cdd99ff3252b23
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Heiner-Kallweit/mmc-meson-gx-fix-SDIO-mode-if-cap_sdio_irq-isn-t-set/20230213-055650
git checkout 6aca20b626a6d75b5d74fc4441cdd99ff3252b23
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/mmc/host/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202302130924.CSStKyHP-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/mmc/host/meson-gx-mmc.c:963:5: warning: format specifies type 'unsigned long' but the argument has type 'u32' (aka 'unsigned int') [-Wformat]
irq_mask, raw_status);
^~~~~~~~
include/linux/dev_printk.h:163:47: note: expanded from macro 'dev_dbg'
dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
include/linux/dev_printk.h:129:34: note: expanded from macro 'dev_printk'
_dev_printk(level, dev, fmt, ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
1 warning generated.
vim +963 drivers/mmc/host/meson-gx-mmc.c
947
948 static irqreturn_t meson_mmc_irq(int irq, void *dev_id)
949 {
950 struct meson_host *host = dev_id;
951 struct mmc_command *cmd;
952 u32 status, raw_status, irq_mask = IRQ_EN_MASK;
953 irqreturn_t ret = IRQ_NONE;
954
955 if (host->mmc->caps & MMC_CAP_SDIO_IRQ)
956 irq_mask |= IRQ_SDIO;
957 raw_status = readl(host->regs + SD_EMMC_STATUS);
958 status = raw_status & irq_mask;
959
960 if (!status) {
961 dev_dbg(host->dev,
962 "Unexpected IRQ! irq_en 0x%08lx - status 0x%08x\n",
> 963 irq_mask, raw_status);
964 return IRQ_NONE;
965 }
966
967 if (WARN_ON(!host))
968 return IRQ_NONE;
969
970 /* ack all raised interrupts */
971 writel(status, host->regs + SD_EMMC_STATUS);
972
973 cmd = host->cmd;
974
975 if (status & IRQ_SDIO) {
976 spin_lock(&host->lock);
977 __meson_mmc_enable_sdio_irq(host->mmc, 0);
978 sdio_signal_irq(host->mmc);
979 spin_unlock(&host->lock);
980 status &= ~IRQ_SDIO;
981 if (!status)
982 return IRQ_HANDLED;
983 }
984
985 if (WARN_ON(!cmd))
986 return IRQ_NONE;
987
988 cmd->error = 0;
989 if (status & IRQ_CRC_ERR) {
990 dev_dbg(host->dev, "CRC Error - status 0x%08x\n", status);
991 cmd->error = -EILSEQ;
992 ret = IRQ_WAKE_THREAD;
993 goto out;
994 }
995
996 if (status & IRQ_TIMEOUTS) {
997 dev_dbg(host->dev, "Timeout - status 0x%08x\n", status);
998 cmd->error = -ETIMEDOUT;
999 ret = IRQ_WAKE_THREAD;
1000 goto out;
1001 }
1002
1003 meson_mmc_read_resp(host->mmc, cmd);
1004
1005 if (status & (IRQ_END_OF_CHAIN | IRQ_RESP_STATUS)) {
1006 struct mmc_data *data = cmd->data;
1007
1008 if (data && !cmd->error)
1009 data->bytes_xfered = data->blksz * data->blocks;
1010 if (meson_mmc_bounce_buf_read(data) ||
1011 meson_mmc_get_next_command(cmd))
1012 ret = IRQ_WAKE_THREAD;
1013 else
1014 ret = IRQ_HANDLED;
1015 }
1016
1017 out:
1018 if (cmd->error) {
1019 /* Stop desc in case of errors */
1020 u32 start = readl(host->regs + SD_EMMC_START);
1021
1022 start &= ~START_DESC_BUSY;
1023 writel(start, host->regs + SD_EMMC_START);
1024 }
1025
1026 if (ret == IRQ_HANDLED)
1027 meson_mmc_request_done(host->mmc, cmd->mrq);
1028
1029 return ret;
1030 }
1031
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-02-13 1:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <9e296859-0363-ecc4-2d99-fd0239efceff@gmail.com>
2023-02-13 0:42 ` [PATCH] mmc: meson-gx: fix SDIO mode if cap_sdio_irq isn't set kernel test robot
2023-02-13 1:07 ` kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).