tree:
https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux.git sunxi/h6-emmc-inline-encryption
head: 00099e67ddf03c548afe5c1bdbf21e6d7ed7dba4
commit: 065838a3d4b8e691bf032722275371fb45f0e199 [5/9] mmc: sunxi: Add Inline Encryption support
config: x86_64-randconfig-a002-20210324 (attached as .config)
compiler: clang version 13.0.0 (
https://github.com/llvm/llvm-project a4fb88669cd98db6fef7dcac88e3ec425d40c00d)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
#
https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux.git/commit/?id=065838a3d4b8e691bf032722275371fb45f0e199
git remote add mripard
https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux.git
git fetch --no-tags mripard sunxi/h6-emmc-inline-encryption
git checkout 065838a3d4b8e691bf032722275371fb45f0e199
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <
l...@intel.com>
All errors (new ones prefixed by >>):
>> drivers/mmc/host/sunxi-mmc.c:1077:11: error: no member named 'crypto_enabled' in 'struct mmc_request'
if (mrq->crypto_enabled)
~~~ ^
>> drivers/mmc/host/sunxi-mmc.c:1371:66: error: no member named 'ksm' in 'struct mmc_host'
struct mmc_host *mmc = container_of(ksm, struct mmc_host, ksm);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
include/linux/kernel.h:709:53: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
include/linux/compiler_types.h:256:74: note: expanded from macro '__same_type'
#define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
^
include/linux/build_bug.h:39:58: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
include/linux/compiler_types.h:320:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:308:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:300:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
>> drivers/mmc/host/sunxi-mmc.c:1371:31: error: no member named 'ksm' in 'mmc_host'
struct mmc_host *mmc = container_of(ksm, struct mmc_host, ksm);
^ ~~~
include/linux/kernel.h:712:21: note: expanded from macro 'container_of'
((type *)(__mptr - offsetof(type, member))); })
^ ~~~~~~
include/linux/stddef.h:17:32: note: expanded from macro 'offsetof'
#define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
^ ~~~~~~
include/linux/compiler_types.h:140:35: note: expanded from macro '__compiler_offsetof'
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
^ ~
>> drivers/mmc/host/sunxi-mmc.c:1371:25: error: initializing 'struct mmc_host *' with an expression of incompatible type 'void'
struct mmc_host *mmc = container_of(ksm, struct mmc_host, ksm);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/mmc/host/sunxi-mmc.c:1520:45: error: no member named 'ksm' in 'struct mmc_host'
ret = devm_blk_ksm_init(&pdev->dev, &mmc->ksm, 1);
~~~ ^
drivers/mmc/host/sunxi-mmc.c:1526:8: error: no member named 'ksm' in 'struct mmc_host'
mmc->ksm.ksm_ll_ops = sunxi_mmc_ksm_ops;
~~~ ^
drivers/mmc/host/sunxi-mmc.c:1527:8: error: no member named 'ksm' in 'struct mmc_host'
mmc->
ksm.dev = &pdev->dev;
~~~ ^
drivers/mmc/host/sunxi-mmc.c:1528:8: error: no member named 'ksm' in 'struct mmc_host'
mmc->ksm.max_dun_bytes_supported = 256;
~~~ ^
drivers/mmc/host/sunxi-mmc.c:1529:8: error: no member named 'ksm' in 'struct mmc_host'
mmc->ksm.crypto_modes_supported[BLK_ENCRYPTION_MODE_AES_256_XTS] = 512 | 1024 | 2048 | 4096;
~~~ ^
9 errors generated.
vim +1077 drivers/mmc/host/sunxi-mmc.c
1014
1015 static void sunxi_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq)
1016 {
1017 struct sunxi_mmc_host *host = mmc_priv(mmc);
1018 struct mmc_command *cmd = mrq->cmd;
1019 struct mmc_data *data = mrq->data;
1020 unsigned long iflags;
1021 u32 imask = SDXC_INTERRUPT_ERROR_BIT;
1022 u32 cmd_val = SDXC_START | (cmd->opcode & 0x3f);
1023 bool wait_dma = host->wait_dma;
1024 int ret;
1025
1026 /* Check for set_ios errors (should never happen) */
1027 if (host->ferror) {
1028 mrq->cmd->error = host->ferror;
1029 mmc_request_done(mmc, mrq);
1030 return;
1031 }
1032
1033 if (data) {
1034 ret = sunxi_mmc_map_dma(host, data);
1035 if (ret < 0) {
1036 dev_err(mmc_dev(mmc), "map DMA failed\n");
1037 cmd->error = ret;
1038 data->error = ret;
1039 mmc_request_done(mmc, mrq);
1040 return;
1041 }
1042 }
1043
1044 if (cmd->opcode == MMC_GO_IDLE_STATE) {
1045 cmd_val |= SDXC_SEND_INIT_SEQUENCE;
1046 imask |= SDXC_COMMAND_DONE;
1047 }
1048
1049 if (cmd->flags & MMC_RSP_PRESENT) {
1050 cmd_val |= SDXC_RESP_EXPIRE;
1051 if (cmd->flags & MMC_RSP_136)
1052 cmd_val |= SDXC_LONG_RESPONSE;
1053 if (cmd->flags & MMC_RSP_CRC)
1054 cmd_val |= SDXC_CHECK_RESPONSE_CRC;
1055
1056 if ((cmd->flags & MMC_CMD_MASK) == MMC_CMD_ADTC) {
1057 cmd_val |= SDXC_DATA_EXPIRE | SDXC_WAIT_PRE_OVER;
1058
1059 if (cmd->data->stop) {
1060 imask |= SDXC_AUTO_COMMAND_DONE;
1061 cmd_val |= SDXC_SEND_AUTO_STOP;
1062 } else {
1063 imask |= SDXC_DATA_OVER;
1064 }
1065
1066 if (cmd->data->flags & MMC_DATA_WRITE)
1067 cmd_val |= SDXC_WRITE;
1068 else
1069 wait_dma = true;
1070 } else {
1071 imask |= SDXC_COMMAND_DONE;
1072 }
1073 } else {
1074 imask |= SDXC_COMMAND_DONE;
1075 }
1076
> 1077 if (mrq->crypto_enabled)
1078 mmc_writel(host, REG_EMCE, BIT(0) | BIT(4) | (0x200 << 16));
1079 else
1080 mmc_writel(host, REG_EMCE, 0);
1081
1082 dev_dbg(mmc_dev(mmc), "cmd %d(%08x) arg %x ie 0x%08x len %d\n",
1083 cmd_val & 0x3f, cmd_val, cmd->arg, imask,
1084 mrq->data ? mrq->data->blksz * mrq->data->blocks : 0);
1085
1086 spin_lock_irqsave(&host->lock, iflags);
1087
1088 if (host->mrq || host->manual_stop_mrq) {
1089 spin_unlock_irqrestore(&host->lock, iflags);
1090
1091 if (data)
1092 dma_unmap_sg(mmc_dev(mmc), data->sg, data->sg_len,
1093 mmc_get_dma_dir(data));
1094
1095 dev_err(mmc_dev(mmc), "request already pending\n");
1096 mrq->cmd->error = -EBUSY;
1097 mmc_request_done(mmc, mrq);
1098 return;
1099 }
1100
1101 if (data) {
1102 mmc_writel(host, REG_BLKSZ, data->blksz);
1103 mmc_writel(host, REG_BCNTR, data->blksz * data->blocks);
1104 sunxi_mmc_start_dma(host, data);
1105 }
1106
1107 host->mrq = mrq;
1108 host->wait_dma = wait_dma;
1109 mmc_writel(host, REG_IMASK, host->sdio_imask | imask);
1110 mmc_writel(host, REG_CARG, cmd->arg);
1111 mmc_writel(host, REG_CMDR, cmd_val);
1112
1113 spin_unlock_irqrestore(&host->lock, iflags);
1114 }
1115
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuil...@lists.01.org