Re: [PATCH] mmc: sdhci-acpi: Fix HS400 tuning for AMDI0040
by kernel test robot
Hi Raul,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.9-rc1 next-20200818]
[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/Raul-E-Rangel/mmc-sdhci-acpi-Fix...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 18445bf405cb331117bc98427b1ba6f12418ad17
config: x86_64-randconfig-a003-20200818 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b34b1e38381fa4d1b1d9751a6b5233b68e734cfe)
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
# 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 <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/mmc/host/sdhci-acpi.c:607:5: warning: no previous prototype for function 'amd_sdhci_execute_tuning' [-Wmissing-prototypes]
int amd_sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode)
^
drivers/mmc/host/sdhci-acpi.c:607:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int amd_sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode)
^
static
1 warning generated.
# https://github.com/0day-ci/linux/commit/dcfd321141ed51cca9f8a3262895bd8df...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Raul-E-Rangel/mmc-sdhci-acpi-Fix-HS400-tuning-for-AMDI0040/20200819-063255
git checkout dcfd321141ed51cca9f8a3262895bd8df1739f41
vim +/amd_sdhci_execute_tuning +607 drivers/mmc/host/sdhci-acpi.c
606
> 607 int amd_sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode)
608 {
609 int err;
610 struct sdhci_host *host = mmc_priv(mmc);
611 struct sdhci_acpi_host *acpi_host = sdhci_priv(host);
612 struct amd_sdhci_host *amd_host = sdhci_acpi_priv(acpi_host);
613
614 amd_host->tuned_clock = false;
615
616 err = sdhci_execute_tuning(mmc, opcode);
617
618 if (!err && !host->tuning_err)
619 amd_host->tuned_clock = true;
620
621 return err;
622 }
623
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[peterz-queue:locking/wip 2/8] drivers/cpuidle/cpuidle.c:234:3: error: implicit declaration of function 'leave_mm'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git locking/wip
head: d3c0e0b4756e5f332791eaf9b35e54e44aae25a6
commit: cf9c2ec7ff73bb35292ef2a660a73c4cada3cb68 [2/8] cpuidle: Make CPUIDLE_FLAG_TLB_FLUSHED generic
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-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
git checkout cf9c2ec7ff73bb35292ef2a660a73c4cada3cb68
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh
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 >>):
drivers/cpuidle/cpuidle.c: In function 'cpuidle_enter_state':
>> drivers/cpuidle/cpuidle.c:234:3: error: implicit declaration of function 'leave_mm' [-Werror=implicit-function-declaration]
234 | leave_mm(dev->cpu);
| ^~~~~~~~
cc1: some warnings being treated as errors
# https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?...
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue locking/wip
git checkout cf9c2ec7ff73bb35292ef2a660a73c4cada3cb68
vim +/leave_mm +234 drivers/cpuidle/cpuidle.c
201
202 /**
203 * cpuidle_enter_state - enter the state and update stats
204 * @dev: cpuidle device for this cpu
205 * @drv: cpuidle driver for this cpu
206 * @index: index into the states table in @drv of the state to enter
207 */
208 int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv,
209 int index)
210 {
211 int entered_state;
212
213 struct cpuidle_state *target_state = &drv->states[index];
214 bool broadcast = !!(target_state->flags & CPUIDLE_FLAG_TIMER_STOP);
215 ktime_t time_start, time_end;
216
217 /*
218 * Tell the time framework to switch to a broadcast timer because our
219 * local timer will be shut down. If a local timer is used from another
220 * CPU as a broadcast timer, this call may fail if it is not available.
221 */
222 if (broadcast && tick_broadcast_enter()) {
223 index = find_deepest_state(drv, dev, target_state->exit_latency_ns,
224 CPUIDLE_FLAG_TIMER_STOP, false);
225 if (index < 0) {
226 default_idle_call();
227 return -EBUSY;
228 }
229 target_state = &drv->states[index];
230 broadcast = false;
231 }
232
233 if (target_state->flags & CPUIDLE_FLAG_TLB_FLUSHED)
> 234 leave_mm(dev->cpu);
235
236 /* Take note of the planned idle state. */
237 sched_idle_set_state(target_state);
238
239 trace_cpu_idle(index, dev->cpu);
240 time_start = ns_to_ktime(local_clock());
241
242 rcu_idle_enter();
243 stop_critical_timings();
244 entered_state = target_state->enter(dev, drv, index);
245 start_critical_timings();
246 rcu_idle_exit();
247
248 sched_clock_idle_wakeup_event();
249 time_end = ns_to_ktime(local_clock());
250 trace_cpu_idle(PWR_EVENT_EXIT, dev->cpu);
251
252 /* The cpu is no longer idle or about to enter idle. */
253 sched_idle_set_state(NULL);
254
255 if (broadcast) {
256 if (WARN_ON_ONCE(!irqs_disabled()))
257 local_irq_disable();
258
259 tick_broadcast_exit();
260 }
261
262 if (!cpuidle_state_is_coupled(drv, index))
263 local_irq_enable();
264
265 if (entered_state >= 0) {
266 s64 diff, delay = drv->states[entered_state].exit_latency_ns;
267 int i;
268
269 /*
270 * Update cpuidle counters
271 * This can be moved to within driver enter routine,
272 * but that results in multiple copies of same code.
273 */
274 diff = ktime_sub(time_end, time_start);
275
276 dev->last_residency_ns = diff;
277 dev->states_usage[entered_state].time_ns += diff;
278 dev->states_usage[entered_state].usage++;
279
280 if (diff < drv->states[entered_state].target_residency_ns) {
281 for (i = entered_state - 1; i >= 0; i--) {
282 if (dev->states_usage[i].disable)
283 continue;
284
285 /* Shallower states are enabled, so update. */
286 dev->states_usage[entered_state].above++;
287 break;
288 }
289 } else if (diff > delay) {
290 for (i = entered_state + 1; i < drv->state_count; i++) {
291 if (dev->states_usage[i].disable)
292 continue;
293
294 /*
295 * Update if a deeper state would have been a
296 * better match for the observed idle duration.
297 */
298 if (diff - delay >= drv->states[i].target_residency_ns)
299 dev->states_usage[entered_state].below++;
300
301 break;
302 }
303 }
304 } else {
305 dev->last_residency_ns = 0;
306 }
307
308 return entered_state;
309 }
310
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[hch-misc:dma_alloc_pages 28/30] drivers/crypto/ccp/tee-dev.c:70:10: error: implicit declaration of function 'ioread32'
by kernel test robot
tree: git://git.infradead.org/users/hch/misc.git dma_alloc_pages
head: 43a18af742023face57c43633bca9b5f1aa21c3b
commit: 84a45a398f32ef52e3cbe97ea88822c96b4c538a [28/30] dmapool: add dma_alloc_pages support
config: x86_64-randconfig-a006-20200818 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b34b1e38381fa4d1b1d9751a6b5233b68e734cfe)
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
git checkout 84a45a398f32ef52e3cbe97ea88822c96b4c538a
# 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 <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/crypto/ccp/tee-dev.c:70:10: error: implicit declaration of function 'ioread32' [-Werror,-Wimplicit-function-declaration]
*reg = ioread32(tee->io_regs + tee->vdata->cmdresp_reg);
^
>> drivers/crypto/ccp/tee-dev.c:137:2: error: implicit declaration of function 'iowrite32' [-Werror,-Wimplicit-function-declaration]
iowrite32(lower_32_bits(cmd_buffer),
^
drivers/crypto/ccp/tee-dev.c:175:2: error: implicit declaration of function 'iowrite32' [-Werror,-Wimplicit-function-declaration]
iowrite32(TEE_RING_DESTROY_CMD,
^
drivers/crypto/ccp/tee-dev.c:258:10: error: implicit declaration of function 'ioread32' [-Werror,-Wimplicit-function-declaration]
rptr = ioread32(tee->io_regs + tee->vdata->ring_rptr_reg);
^
drivers/crypto/ccp/tee-dev.c:295:2: error: implicit declaration of function 'iowrite32' [-Werror,-Wimplicit-function-declaration]
iowrite32(tee->rb_mgr.wptr, tee->io_regs + tee->vdata->ring_wptr_reg);
^
5 errors generated.
git remote add hch-misc git://git.infradead.org/users/hch/misc.git
git fetch --no-tags hch-misc dma_alloc_pages
git checkout 84a45a398f32ef52e3cbe97ea88822c96b4c538a
vim +/ioread32 +70 drivers/crypto/ccp/tee-dev.c
33960acccfbd7f Rijo Thomas 2019-12-04 62
33960acccfbd7f Rijo Thomas 2019-12-04 63 static int tee_wait_cmd_poll(struct psp_tee_device *tee, unsigned int timeout,
33960acccfbd7f Rijo Thomas 2019-12-04 64 unsigned int *reg)
33960acccfbd7f Rijo Thomas 2019-12-04 65 {
33960acccfbd7f Rijo Thomas 2019-12-04 66 /* ~10ms sleep per loop => nloop = timeout * 100 */
33960acccfbd7f Rijo Thomas 2019-12-04 67 int nloop = timeout * 100;
33960acccfbd7f Rijo Thomas 2019-12-04 68
33960acccfbd7f Rijo Thomas 2019-12-04 69 while (--nloop) {
33960acccfbd7f Rijo Thomas 2019-12-04 @70 *reg = ioread32(tee->io_regs + tee->vdata->cmdresp_reg);
33960acccfbd7f Rijo Thomas 2019-12-04 71 if (*reg & PSP_CMDRESP_RESP)
33960acccfbd7f Rijo Thomas 2019-12-04 72 return 0;
33960acccfbd7f Rijo Thomas 2019-12-04 73
33960acccfbd7f Rijo Thomas 2019-12-04 74 usleep_range(10000, 10100);
33960acccfbd7f Rijo Thomas 2019-12-04 75 }
33960acccfbd7f Rijo Thomas 2019-12-04 76
33960acccfbd7f Rijo Thomas 2019-12-04 77 dev_err(tee->dev, "tee: command timed out, disabling PSP\n");
33960acccfbd7f Rijo Thomas 2019-12-04 78 psp_dead = true;
33960acccfbd7f Rijo Thomas 2019-12-04 79
33960acccfbd7f Rijo Thomas 2019-12-04 80 return -ETIMEDOUT;
33960acccfbd7f Rijo Thomas 2019-12-04 81 }
33960acccfbd7f Rijo Thomas 2019-12-04 82
33960acccfbd7f Rijo Thomas 2019-12-04 83 static
33960acccfbd7f Rijo Thomas 2019-12-04 84 struct tee_init_ring_cmd *tee_alloc_cmd_buffer(struct psp_tee_device *tee)
33960acccfbd7f Rijo Thomas 2019-12-04 85 {
33960acccfbd7f Rijo Thomas 2019-12-04 86 struct tee_init_ring_cmd *cmd;
33960acccfbd7f Rijo Thomas 2019-12-04 87
33960acccfbd7f Rijo Thomas 2019-12-04 88 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
33960acccfbd7f Rijo Thomas 2019-12-04 89 if (!cmd)
33960acccfbd7f Rijo Thomas 2019-12-04 90 return NULL;
33960acccfbd7f Rijo Thomas 2019-12-04 91
33960acccfbd7f Rijo Thomas 2019-12-04 92 cmd->hi_addr = upper_32_bits(tee->rb_mgr.ring_pa);
33960acccfbd7f Rijo Thomas 2019-12-04 93 cmd->low_addr = lower_32_bits(tee->rb_mgr.ring_pa);
33960acccfbd7f Rijo Thomas 2019-12-04 94 cmd->size = tee->rb_mgr.ring_size;
33960acccfbd7f Rijo Thomas 2019-12-04 95
33960acccfbd7f Rijo Thomas 2019-12-04 96 dev_dbg(tee->dev, "tee: ring address: high = 0x%x low = 0x%x size = %u\n",
33960acccfbd7f Rijo Thomas 2019-12-04 97 cmd->hi_addr, cmd->low_addr, cmd->size);
33960acccfbd7f Rijo Thomas 2019-12-04 98
33960acccfbd7f Rijo Thomas 2019-12-04 99 return cmd;
33960acccfbd7f Rijo Thomas 2019-12-04 100 }
33960acccfbd7f Rijo Thomas 2019-12-04 101
33960acccfbd7f Rijo Thomas 2019-12-04 102 static inline void tee_free_cmd_buffer(struct tee_init_ring_cmd *cmd)
33960acccfbd7f Rijo Thomas 2019-12-04 103 {
33960acccfbd7f Rijo Thomas 2019-12-04 104 kfree(cmd);
33960acccfbd7f Rijo Thomas 2019-12-04 105 }
33960acccfbd7f Rijo Thomas 2019-12-04 106
33960acccfbd7f Rijo Thomas 2019-12-04 107 static int tee_init_ring(struct psp_tee_device *tee)
33960acccfbd7f Rijo Thomas 2019-12-04 108 {
33960acccfbd7f Rijo Thomas 2019-12-04 109 int ring_size = MAX_RING_BUFFER_ENTRIES * sizeof(struct tee_ring_cmd);
33960acccfbd7f Rijo Thomas 2019-12-04 110 struct tee_init_ring_cmd *cmd;
33960acccfbd7f Rijo Thomas 2019-12-04 111 phys_addr_t cmd_buffer;
33960acccfbd7f Rijo Thomas 2019-12-04 112 unsigned int reg;
33960acccfbd7f Rijo Thomas 2019-12-04 113 int ret;
33960acccfbd7f Rijo Thomas 2019-12-04 114
33960acccfbd7f Rijo Thomas 2019-12-04 115 BUILD_BUG_ON(sizeof(struct tee_ring_cmd) != 1024);
33960acccfbd7f Rijo Thomas 2019-12-04 116
33960acccfbd7f Rijo Thomas 2019-12-04 117 ret = tee_alloc_ring(tee, ring_size);
33960acccfbd7f Rijo Thomas 2019-12-04 118 if (ret) {
33960acccfbd7f Rijo Thomas 2019-12-04 119 dev_err(tee->dev, "tee: ring allocation failed %d\n", ret);
33960acccfbd7f Rijo Thomas 2019-12-04 120 return ret;
33960acccfbd7f Rijo Thomas 2019-12-04 121 }
33960acccfbd7f Rijo Thomas 2019-12-04 122
33960acccfbd7f Rijo Thomas 2019-12-04 123 tee->rb_mgr.wptr = 0;
33960acccfbd7f Rijo Thomas 2019-12-04 124
33960acccfbd7f Rijo Thomas 2019-12-04 125 cmd = tee_alloc_cmd_buffer(tee);
33960acccfbd7f Rijo Thomas 2019-12-04 126 if (!cmd) {
33960acccfbd7f Rijo Thomas 2019-12-04 127 tee_free_ring(tee);
33960acccfbd7f Rijo Thomas 2019-12-04 128 return -ENOMEM;
33960acccfbd7f Rijo Thomas 2019-12-04 129 }
33960acccfbd7f Rijo Thomas 2019-12-04 130
33960acccfbd7f Rijo Thomas 2019-12-04 131 cmd_buffer = __psp_pa((void *)cmd);
33960acccfbd7f Rijo Thomas 2019-12-04 132
33960acccfbd7f Rijo Thomas 2019-12-04 133 /* Send command buffer details to Trusted OS by writing to
33960acccfbd7f Rijo Thomas 2019-12-04 134 * CPU-PSP message registers
33960acccfbd7f Rijo Thomas 2019-12-04 135 */
33960acccfbd7f Rijo Thomas 2019-12-04 136
33960acccfbd7f Rijo Thomas 2019-12-04 @137 iowrite32(lower_32_bits(cmd_buffer),
33960acccfbd7f Rijo Thomas 2019-12-04 138 tee->io_regs + tee->vdata->cmdbuff_addr_lo_reg);
33960acccfbd7f Rijo Thomas 2019-12-04 139 iowrite32(upper_32_bits(cmd_buffer),
33960acccfbd7f Rijo Thomas 2019-12-04 140 tee->io_regs + tee->vdata->cmdbuff_addr_hi_reg);
33960acccfbd7f Rijo Thomas 2019-12-04 141 iowrite32(TEE_RING_INIT_CMD,
33960acccfbd7f Rijo Thomas 2019-12-04 142 tee->io_regs + tee->vdata->cmdresp_reg);
33960acccfbd7f Rijo Thomas 2019-12-04 143
33960acccfbd7f Rijo Thomas 2019-12-04 144 ret = tee_wait_cmd_poll(tee, TEE_DEFAULT_TIMEOUT, ®);
33960acccfbd7f Rijo Thomas 2019-12-04 145 if (ret) {
33960acccfbd7f Rijo Thomas 2019-12-04 146 dev_err(tee->dev, "tee: ring init command timed out\n");
33960acccfbd7f Rijo Thomas 2019-12-04 147 tee_free_ring(tee);
33960acccfbd7f Rijo Thomas 2019-12-04 148 goto free_buf;
33960acccfbd7f Rijo Thomas 2019-12-04 149 }
33960acccfbd7f Rijo Thomas 2019-12-04 150
33960acccfbd7f Rijo Thomas 2019-12-04 151 if (reg & PSP_CMDRESP_ERR_MASK) {
33960acccfbd7f Rijo Thomas 2019-12-04 152 dev_err(tee->dev, "tee: ring init command failed (%#010x)\n",
33960acccfbd7f Rijo Thomas 2019-12-04 153 reg & PSP_CMDRESP_ERR_MASK);
33960acccfbd7f Rijo Thomas 2019-12-04 154 tee_free_ring(tee);
33960acccfbd7f Rijo Thomas 2019-12-04 155 ret = -EIO;
33960acccfbd7f Rijo Thomas 2019-12-04 156 }
33960acccfbd7f Rijo Thomas 2019-12-04 157
33960acccfbd7f Rijo Thomas 2019-12-04 158 free_buf:
33960acccfbd7f Rijo Thomas 2019-12-04 159 tee_free_cmd_buffer(cmd);
33960acccfbd7f Rijo Thomas 2019-12-04 160
33960acccfbd7f Rijo Thomas 2019-12-04 161 return ret;
33960acccfbd7f Rijo Thomas 2019-12-04 162 }
33960acccfbd7f Rijo Thomas 2019-12-04 163
:::::: The code at line 70 was first introduced by commit
:::::: 33960acccfbd7f24d443cb3d0312ac28abe62bae crypto: ccp - add TEE support for Raven Ridge
:::::: TO: Rijo Thomas <Rijo-john.Thomas(a)amd.com>
:::::: CC: Herbert Xu <herbert(a)gondor.apana.org.au>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[snitzer:nvme-error-handling-fixes-5.9 6/8] drivers/nvme/host/core.c:316:17: sparse: sparse: cast from restricted blk_status_t
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/snitzer/linux.git nvme-error-handling-fixes-5.9
head: f896e97adeb5a5d8db162373087e98ab1f1fcd8e
commit: b121fcebd77ad2e2b2d1b57586552b77bbbbe6a3 [6/8] nvme: update failover handling to work with REQ_FAILFAST_TRANSPORT
config: ia64-randconfig-s032-20200818 (attached as .config)
compiler: ia64-linux-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.2-183-gaa6ede3b-dirty
git checkout b121fcebd77ad2e2b2d1b57586552b77bbbbe6a3
# 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__' ARCH=ia64
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/nvme/host/core.c:316:17: sparse: sparse: cast from restricted blk_status_t
drivers/nvme/host/core.c:1644:16: sparse: sparse: context imbalance in 'nvme_get_ns_from_disk' - wrong count at exit
drivers/nvme/host/core.c: note: in included file (through include/linux/notifier.h, include/linux/memory_hotplug.h, include/linux/mmzone.h, ...):
include/linux/srcu.h:181:9: sparse: sparse: context imbalance in 'nvme_put_ns_from_disk' - unexpected unlock
# https://git.kernel.org/pub/scm/linux/kernel/git/snitzer/linux.git/commit/...
git remote add snitzer https://git.kernel.org/pub/scm/linux/kernel/git/snitzer/linux.git
git fetch --no-tags snitzer nvme-error-handling-fixes-5.9
git checkout b121fcebd77ad2e2b2d1b57586552b77bbbbe6a3
vim +316 drivers/nvme/host/core.c
306
307 static inline void nvme_end_req_with_failover(struct request *req)
308 {
309 u16 nvme_status = nvme_req(req)->status;
310 blk_status_t status = nvme_error_status(nvme_status);
311
312 if (unlikely(nvme_status & NVME_SC_DNR))
313 goto out;
314
315 if (!blk_path_error(status)) {
> 316 pr_debug("Request meant for failover but blk_status_t (%u) was not retryable.\n",
317 (unsigned)status);
318 status = BLK_STS_IOERR;
319 }
320 out:
321 __nvme_end_req(req, status);
322 }
323
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[RFC PATCH] KVM: x86: vmx_set_user_msr_intercept() can be static
by kernel test robot
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
svm/svm.c | 2 +-
vmx/vmx.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
index c49d121ee1021..144724c0b4111 100644
--- a/arch/x86/kvm/svm/svm.c
+++ b/arch/x86/kvm/svm/svm.c
@@ -633,7 +633,7 @@ static void set_user_msr_interception(struct kvm_vcpu *vcpu, u32 msr, int read,
__set_msr_interception(msrpm, msr, read, write, offset);
}
-void svm_set_user_msr_intercept(struct kvm_vcpu *vcpu, u32 msr)
+static void svm_set_user_msr_intercept(struct kvm_vcpu *vcpu, u32 msr)
{
set_user_msr_interception(vcpu, msr, 0, 0);
}
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index 12478ea7aac71..20f432c698bcd 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -3820,7 +3820,7 @@ static void vmx_update_msr_bitmap_x2apic(struct kvm_vcpu *vcpu,
}
}
-void vmx_set_user_msr_intercept(struct kvm_vcpu *vcpu, u32 msr)
+static void vmx_set_user_msr_intercept(struct kvm_vcpu *vcpu, u32 msr)
{
vmx_enable_intercept_for_msr(vcpu, msr, MSR_TYPE_RW);
}
2 years, 1 month
Re: [PATCH v3 07/12] KVM: x86: Ensure the MSR bitmap never clears userspace tracked MSRs
by kernel test robot
Hi Aaron,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on kvm/linux-next]
[also build test WARNING on v5.9-rc1 next-20200818]
[cannot apply to kvms390/next vhost/linux-next]
[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/Aaron-Lewis/Allow-userspace-to-m...
base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git linux-next
config: i386-randconfig-s001-20200818 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-183-gaa6ede3b-dirty
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
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/x86/kvm/vmx/vmx.c:3823:6: sparse: sparse: symbol 'vmx_set_user_msr_intercept' was not declared. Should it be static?
arch/x86/kvm/vmx/vmx.c: note: in included file:
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (110011 becomes 11)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (110011 becomes 11)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (100110 becomes 110)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (100490 becomes 490)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (100310 becomes 310)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (100510 becomes 510)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (100410 becomes 410)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (100490 becomes 490)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (100310 becomes 310)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (100510 becomes 510)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (100410 becomes 410)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (30203 becomes 203)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (30203 becomes 203)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (30283 becomes 283)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (30283 becomes 283)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1b019b becomes 19b)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1b021b becomes 21b)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1b029b becomes 29b)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1b031b becomes 31b)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1b041b becomes 41b)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (80c88 becomes c88)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1a081a becomes 81a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1a081a becomes 81a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1a081a becomes 81a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (120912 becomes 912)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (120912 becomes 912)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (120912 becomes 912)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (110311 becomes 311)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (120992 becomes 992)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (120992 becomes 992)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (100610 becomes 610)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (100690 becomes 690)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (100590 becomes 590)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (80408 becomes 408)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (120a92 becomes a92)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1a099a becomes 99a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1a091a becomes 91a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (a048a becomes 48a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (120a92 becomes a92)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1a099a becomes 99a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1a091a becomes 91a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (a048a becomes 48a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (a010a becomes 10a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (a050a becomes 50a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1a071a becomes 71a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1a079a becomes 79a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1a001a becomes 1a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1a009a becomes 9a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1a011a becomes 11a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1a081a becomes 81a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1a081a becomes 81a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1a011a becomes 11a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (180198 becomes 198)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1a011a becomes 11a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1a051a becomes 51a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (120392 becomes 392)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (120892 becomes 892)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1a081a becomes 81a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1a081a becomes 81a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1a011a becomes 11a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1a011a becomes 11a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (100490 becomes 490)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (100490 becomes 490)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (a028a becomes 28a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (a030a becomes 30a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (a038a becomes 38a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (a040a becomes 40a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (a028a becomes 28a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (a030a becomes 30a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (a038a becomes 38a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (a040a becomes 40a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (100090 becomes 90)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (100090 becomes 90)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (180118 becomes 118)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1a001a becomes 1a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (80688 becomes 688)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1a009a becomes 9a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (100790 becomes 790)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (100790 becomes 790)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (180198 becomes 198)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1a011a becomes 11a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (120492 becomes 492)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1a061a becomes 61a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (120492 becomes 492)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1a061a becomes 61a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (120412 becomes 412)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1a059a becomes 59a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (120412 becomes 412)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1a059a becomes 59a)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (20402 becomes 402)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1b001b becomes 1b)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1b009b becomes 9b)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (1b011b becomes 11b)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (30083 becomes 83)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (30183 becomes 183)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (30003 becomes 3)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (30103 becomes 103)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (30303 becomes 303)
arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: too many warnings
--
>> arch/x86/kvm/svm/svm.c:636:6: sparse: sparse: symbol 'svm_set_user_msr_intercept' was not declared. Should it be static?
arch/x86/kvm/svm/svm.c:471:17: sparse: sparse: cast truncates bits from constant value (100000000 becomes 0)
arch/x86/kvm/svm/svm.c:471:17: sparse: sparse: cast truncates bits from constant value (100000000 becomes 0)
arch/x86/kvm/svm/svm.c:471:17: sparse: sparse: cast truncates bits from constant value (100000000 becomes 0)
Please review and possibly fold the followup patch.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[hch-misc:dma_alloc_pages 28/30] drivers/crypto/ccp/tee-dev.c:70:10: error: implicit declaration of function 'ioread32'
by kernel test robot
tree: git://git.infradead.org/users/hch/misc.git dma_alloc_pages
head: 43a18af742023face57c43633bca9b5f1aa21c3b
commit: 84a45a398f32ef52e3cbe97ea88822c96b4c538a [28/30] dmapool: add dma_alloc_pages support
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
git checkout 84a45a398f32ef52e3cbe97ea88822c96b4c538a
# save the attached .config to linux build tree
make 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 >>):
drivers/crypto/ccp/tee-dev.c: In function 'tee_wait_cmd_poll':
>> drivers/crypto/ccp/tee-dev.c:70:10: error: implicit declaration of function 'ioread32' [-Werror=implicit-function-declaration]
70 | *reg = ioread32(tee->io_regs + tee->vdata->cmdresp_reg);
| ^~~~~~~~
drivers/crypto/ccp/tee-dev.c: In function 'tee_init_ring':
>> drivers/crypto/ccp/tee-dev.c:137:2: error: implicit declaration of function 'iowrite32' [-Werror=implicit-function-declaration]
137 | iowrite32(lower_32_bits(cmd_buffer),
| ^~~~~~~~~
cc1: some warnings being treated as errors
git remote add hch-misc git://git.infradead.org/users/hch/misc.git
git fetch --no-tags hch-misc dma_alloc_pages
git checkout 84a45a398f32ef52e3cbe97ea88822c96b4c538a
vim +/ioread32 +70 drivers/crypto/ccp/tee-dev.c
33960acccfbd7f Rijo Thomas 2019-12-04 62
33960acccfbd7f Rijo Thomas 2019-12-04 63 static int tee_wait_cmd_poll(struct psp_tee_device *tee, unsigned int timeout,
33960acccfbd7f Rijo Thomas 2019-12-04 64 unsigned int *reg)
33960acccfbd7f Rijo Thomas 2019-12-04 65 {
33960acccfbd7f Rijo Thomas 2019-12-04 66 /* ~10ms sleep per loop => nloop = timeout * 100 */
33960acccfbd7f Rijo Thomas 2019-12-04 67 int nloop = timeout * 100;
33960acccfbd7f Rijo Thomas 2019-12-04 68
33960acccfbd7f Rijo Thomas 2019-12-04 69 while (--nloop) {
33960acccfbd7f Rijo Thomas 2019-12-04 @70 *reg = ioread32(tee->io_regs + tee->vdata->cmdresp_reg);
33960acccfbd7f Rijo Thomas 2019-12-04 71 if (*reg & PSP_CMDRESP_RESP)
33960acccfbd7f Rijo Thomas 2019-12-04 72 return 0;
33960acccfbd7f Rijo Thomas 2019-12-04 73
33960acccfbd7f Rijo Thomas 2019-12-04 74 usleep_range(10000, 10100);
33960acccfbd7f Rijo Thomas 2019-12-04 75 }
33960acccfbd7f Rijo Thomas 2019-12-04 76
33960acccfbd7f Rijo Thomas 2019-12-04 77 dev_err(tee->dev, "tee: command timed out, disabling PSP\n");
33960acccfbd7f Rijo Thomas 2019-12-04 78 psp_dead = true;
33960acccfbd7f Rijo Thomas 2019-12-04 79
33960acccfbd7f Rijo Thomas 2019-12-04 80 return -ETIMEDOUT;
33960acccfbd7f Rijo Thomas 2019-12-04 81 }
33960acccfbd7f Rijo Thomas 2019-12-04 82
33960acccfbd7f Rijo Thomas 2019-12-04 83 static
33960acccfbd7f Rijo Thomas 2019-12-04 84 struct tee_init_ring_cmd *tee_alloc_cmd_buffer(struct psp_tee_device *tee)
33960acccfbd7f Rijo Thomas 2019-12-04 85 {
33960acccfbd7f Rijo Thomas 2019-12-04 86 struct tee_init_ring_cmd *cmd;
33960acccfbd7f Rijo Thomas 2019-12-04 87
33960acccfbd7f Rijo Thomas 2019-12-04 88 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
33960acccfbd7f Rijo Thomas 2019-12-04 89 if (!cmd)
33960acccfbd7f Rijo Thomas 2019-12-04 90 return NULL;
33960acccfbd7f Rijo Thomas 2019-12-04 91
33960acccfbd7f Rijo Thomas 2019-12-04 92 cmd->hi_addr = upper_32_bits(tee->rb_mgr.ring_pa);
33960acccfbd7f Rijo Thomas 2019-12-04 93 cmd->low_addr = lower_32_bits(tee->rb_mgr.ring_pa);
33960acccfbd7f Rijo Thomas 2019-12-04 94 cmd->size = tee->rb_mgr.ring_size;
33960acccfbd7f Rijo Thomas 2019-12-04 95
33960acccfbd7f Rijo Thomas 2019-12-04 96 dev_dbg(tee->dev, "tee: ring address: high = 0x%x low = 0x%x size = %u\n",
33960acccfbd7f Rijo Thomas 2019-12-04 97 cmd->hi_addr, cmd->low_addr, cmd->size);
33960acccfbd7f Rijo Thomas 2019-12-04 98
33960acccfbd7f Rijo Thomas 2019-12-04 99 return cmd;
33960acccfbd7f Rijo Thomas 2019-12-04 100 }
33960acccfbd7f Rijo Thomas 2019-12-04 101
33960acccfbd7f Rijo Thomas 2019-12-04 102 static inline void tee_free_cmd_buffer(struct tee_init_ring_cmd *cmd)
33960acccfbd7f Rijo Thomas 2019-12-04 103 {
33960acccfbd7f Rijo Thomas 2019-12-04 104 kfree(cmd);
33960acccfbd7f Rijo Thomas 2019-12-04 105 }
33960acccfbd7f Rijo Thomas 2019-12-04 106
33960acccfbd7f Rijo Thomas 2019-12-04 107 static int tee_init_ring(struct psp_tee_device *tee)
33960acccfbd7f Rijo Thomas 2019-12-04 108 {
33960acccfbd7f Rijo Thomas 2019-12-04 109 int ring_size = MAX_RING_BUFFER_ENTRIES * sizeof(struct tee_ring_cmd);
33960acccfbd7f Rijo Thomas 2019-12-04 110 struct tee_init_ring_cmd *cmd;
33960acccfbd7f Rijo Thomas 2019-12-04 111 phys_addr_t cmd_buffer;
33960acccfbd7f Rijo Thomas 2019-12-04 112 unsigned int reg;
33960acccfbd7f Rijo Thomas 2019-12-04 113 int ret;
33960acccfbd7f Rijo Thomas 2019-12-04 114
33960acccfbd7f Rijo Thomas 2019-12-04 115 BUILD_BUG_ON(sizeof(struct tee_ring_cmd) != 1024);
33960acccfbd7f Rijo Thomas 2019-12-04 116
33960acccfbd7f Rijo Thomas 2019-12-04 117 ret = tee_alloc_ring(tee, ring_size);
33960acccfbd7f Rijo Thomas 2019-12-04 118 if (ret) {
33960acccfbd7f Rijo Thomas 2019-12-04 119 dev_err(tee->dev, "tee: ring allocation failed %d\n", ret);
33960acccfbd7f Rijo Thomas 2019-12-04 120 return ret;
33960acccfbd7f Rijo Thomas 2019-12-04 121 }
33960acccfbd7f Rijo Thomas 2019-12-04 122
33960acccfbd7f Rijo Thomas 2019-12-04 123 tee->rb_mgr.wptr = 0;
33960acccfbd7f Rijo Thomas 2019-12-04 124
33960acccfbd7f Rijo Thomas 2019-12-04 125 cmd = tee_alloc_cmd_buffer(tee);
33960acccfbd7f Rijo Thomas 2019-12-04 126 if (!cmd) {
33960acccfbd7f Rijo Thomas 2019-12-04 127 tee_free_ring(tee);
33960acccfbd7f Rijo Thomas 2019-12-04 128 return -ENOMEM;
33960acccfbd7f Rijo Thomas 2019-12-04 129 }
33960acccfbd7f Rijo Thomas 2019-12-04 130
33960acccfbd7f Rijo Thomas 2019-12-04 131 cmd_buffer = __psp_pa((void *)cmd);
33960acccfbd7f Rijo Thomas 2019-12-04 132
33960acccfbd7f Rijo Thomas 2019-12-04 133 /* Send command buffer details to Trusted OS by writing to
33960acccfbd7f Rijo Thomas 2019-12-04 134 * CPU-PSP message registers
33960acccfbd7f Rijo Thomas 2019-12-04 135 */
33960acccfbd7f Rijo Thomas 2019-12-04 136
33960acccfbd7f Rijo Thomas 2019-12-04 @137 iowrite32(lower_32_bits(cmd_buffer),
33960acccfbd7f Rijo Thomas 2019-12-04 138 tee->io_regs + tee->vdata->cmdbuff_addr_lo_reg);
33960acccfbd7f Rijo Thomas 2019-12-04 139 iowrite32(upper_32_bits(cmd_buffer),
33960acccfbd7f Rijo Thomas 2019-12-04 140 tee->io_regs + tee->vdata->cmdbuff_addr_hi_reg);
33960acccfbd7f Rijo Thomas 2019-12-04 141 iowrite32(TEE_RING_INIT_CMD,
33960acccfbd7f Rijo Thomas 2019-12-04 142 tee->io_regs + tee->vdata->cmdresp_reg);
33960acccfbd7f Rijo Thomas 2019-12-04 143
33960acccfbd7f Rijo Thomas 2019-12-04 144 ret = tee_wait_cmd_poll(tee, TEE_DEFAULT_TIMEOUT, ®);
33960acccfbd7f Rijo Thomas 2019-12-04 145 if (ret) {
33960acccfbd7f Rijo Thomas 2019-12-04 146 dev_err(tee->dev, "tee: ring init command timed out\n");
33960acccfbd7f Rijo Thomas 2019-12-04 147 tee_free_ring(tee);
33960acccfbd7f Rijo Thomas 2019-12-04 148 goto free_buf;
33960acccfbd7f Rijo Thomas 2019-12-04 149 }
33960acccfbd7f Rijo Thomas 2019-12-04 150
33960acccfbd7f Rijo Thomas 2019-12-04 151 if (reg & PSP_CMDRESP_ERR_MASK) {
33960acccfbd7f Rijo Thomas 2019-12-04 152 dev_err(tee->dev, "tee: ring init command failed (%#010x)\n",
33960acccfbd7f Rijo Thomas 2019-12-04 153 reg & PSP_CMDRESP_ERR_MASK);
33960acccfbd7f Rijo Thomas 2019-12-04 154 tee_free_ring(tee);
33960acccfbd7f Rijo Thomas 2019-12-04 155 ret = -EIO;
33960acccfbd7f Rijo Thomas 2019-12-04 156 }
33960acccfbd7f Rijo Thomas 2019-12-04 157
33960acccfbd7f Rijo Thomas 2019-12-04 158 free_buf:
33960acccfbd7f Rijo Thomas 2019-12-04 159 tee_free_cmd_buffer(cmd);
33960acccfbd7f Rijo Thomas 2019-12-04 160
33960acccfbd7f Rijo Thomas 2019-12-04 161 return ret;
33960acccfbd7f Rijo Thomas 2019-12-04 162 }
33960acccfbd7f Rijo Thomas 2019-12-04 163
:::::: The code at line 70 was first introduced by commit
:::::: 33960acccfbd7f24d443cb3d0312ac28abe62bae crypto: ccp - add TEE support for Raven Ridge
:::::: TO: Rijo Thomas <Rijo-john.Thomas(a)amd.com>
:::::: CC: Herbert Xu <herbert(a)gondor.apana.org.au>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
Re: [PATCH v6 14/14] drm/print: Add tracefs support to the drm logging helpers
by kernel test robot
Hi Sean,
I love your patch! Perhaps something to improve:
[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on tegra-drm/drm/tegra/for-next drm-tip/drm-tip linus/master drm-exynos/exynos-drm-next v5.9-rc1 next-20200818]
[cannot apply to drm/drm-next]
[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/Sean-Paul/drm-trace-Mirror-DRM-d...
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: openrisc-randconfig-s031-20200818 (attached as .config)
compiler: or1k-linux-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.2-183-gaa6ede3b-dirty
# 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__' ARCH=openrisc
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/gpu/drm/drm_print.c:459:21: sparse: sparse: non-ANSI function declaration of function 'drm_trace_init'
>> drivers/gpu/drm/drm_print.c:498:24: sparse: sparse: non-ANSI function declaration of function 'drm_trace_cleanup'
drivers/gpu/drm/drm_print.c:467:15: sparse: sparse: undefined identifier 'trace_array_init_printk'
drivers/gpu/drm/drm_print.c: note: in included file (through arch/openrisc/include/asm/io.h, include/linux/io.h):
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
# https://github.com/0day-ci/linux/commit/fe0a955028a2121ce9ab9acd1c2ab74d2...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Sean-Paul/drm-trace-Mirror-DRM-debug-logs-to-tracefs/20200819-050745
git checkout fe0a955028a2121ce9ab9acd1c2ab74d219cdc60
vim +/drm_trace_init +459 drivers/gpu/drm/drm_print.c
452
453 /**
454 * drm_trace_init - initializes the drm trace array
455 *
456 * This function fetches (or creates) the drm trace array. This should be called
457 * once on drm subsystem creation and matched with drm_trace_cleanup().
458 */
> 459 void drm_trace_init()
460 {
461 int ret;
462
463 trace_arr = trace_array_get_by_name("drm");
464 if (!trace_arr)
465 return;
466
467 ret = trace_array_init_printk(trace_arr);
468 if (ret)
469 drm_trace_cleanup();
470 }
471 EXPORT_SYMBOL(drm_trace_init);
472
473 /**
474 * drm_trace_printf - adds an entry to the drm tracefs instance
475 * @format: printf format of the message to add to the trace
476 *
477 * This function adds a new entry in the drm tracefs instance
478 */
479 void drm_trace_printf(const char *format, ...)
480 {
481 struct va_format vaf;
482 va_list args;
483
484 va_start(args, format);
485 vaf.fmt = format;
486 vaf.va = &args;
487 trace_array_printk(trace_arr, _THIS_IP_, "%pV", &vaf);
488 va_end(args);
489 }
490
491 /**
492 * drm_trace_cleanup - destroys the drm trace array
493 *
494 * This function destroys the drm trace array created with drm_trace_init. This
495 * should be called once on drm subsystem close and matched with
496 * drm_trace_init().
497 */
> 498 void drm_trace_cleanup()
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[peterz-queue:locking/wip 2/8] drivers/cpuidle/cpuidle.c:234:3: error: implicit declaration of function 'leave_mm'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git locking/wip
head: d3c0e0b4756e5f332791eaf9b35e54e44aae25a6
commit: cf9c2ec7ff73bb35292ef2a660a73c4cada3cb68 [2/8] cpuidle: Make CPUIDLE_FLAG_TLB_FLUSHED generic
config: arm64-randconfig-r003-20200818 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 790878f291fa5dc58a1c560cb6cc76fd1bfd1c5a)
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
git checkout cf9c2ec7ff73bb35292ef2a660a73c4cada3cb68
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 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 >>):
>> drivers/cpuidle/cpuidle.c:234:3: error: implicit declaration of function 'leave_mm' [-Werror,-Wimplicit-function-declaration]
leave_mm(dev->cpu);
^
1 error generated.
# https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?...
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue locking/wip
git checkout cf9c2ec7ff73bb35292ef2a660a73c4cada3cb68
vim +/leave_mm +234 drivers/cpuidle/cpuidle.c
201
202 /**
203 * cpuidle_enter_state - enter the state and update stats
204 * @dev: cpuidle device for this cpu
205 * @drv: cpuidle driver for this cpu
206 * @index: index into the states table in @drv of the state to enter
207 */
208 int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv,
209 int index)
210 {
211 int entered_state;
212
213 struct cpuidle_state *target_state = &drv->states[index];
214 bool broadcast = !!(target_state->flags & CPUIDLE_FLAG_TIMER_STOP);
215 ktime_t time_start, time_end;
216
217 /*
218 * Tell the time framework to switch to a broadcast timer because our
219 * local timer will be shut down. If a local timer is used from another
220 * CPU as a broadcast timer, this call may fail if it is not available.
221 */
222 if (broadcast && tick_broadcast_enter()) {
223 index = find_deepest_state(drv, dev, target_state->exit_latency_ns,
224 CPUIDLE_FLAG_TIMER_STOP, false);
225 if (index < 0) {
226 default_idle_call();
227 return -EBUSY;
228 }
229 target_state = &drv->states[index];
230 broadcast = false;
231 }
232
233 if (target_state->flags & CPUIDLE_FLAG_TLB_FLUSHED)
> 234 leave_mm(dev->cpu);
235
236 /* Take note of the planned idle state. */
237 sched_idle_set_state(target_state);
238
239 trace_cpu_idle(index, dev->cpu);
240 time_start = ns_to_ktime(local_clock());
241
242 rcu_idle_enter();
243 stop_critical_timings();
244 entered_state = target_state->enter(dev, drv, index);
245 start_critical_timings();
246 rcu_idle_exit();
247
248 sched_clock_idle_wakeup_event();
249 time_end = ns_to_ktime(local_clock());
250 trace_cpu_idle(PWR_EVENT_EXIT, dev->cpu);
251
252 /* The cpu is no longer idle or about to enter idle. */
253 sched_idle_set_state(NULL);
254
255 if (broadcast) {
256 if (WARN_ON_ONCE(!irqs_disabled()))
257 local_irq_disable();
258
259 tick_broadcast_exit();
260 }
261
262 if (!cpuidle_state_is_coupled(drv, index))
263 local_irq_enable();
264
265 if (entered_state >= 0) {
266 s64 diff, delay = drv->states[entered_state].exit_latency_ns;
267 int i;
268
269 /*
270 * Update cpuidle counters
271 * This can be moved to within driver enter routine,
272 * but that results in multiple copies of same code.
273 */
274 diff = ktime_sub(time_end, time_start);
275
276 dev->last_residency_ns = diff;
277 dev->states_usage[entered_state].time_ns += diff;
278 dev->states_usage[entered_state].usage++;
279
280 if (diff < drv->states[entered_state].target_residency_ns) {
281 for (i = entered_state - 1; i >= 0; i--) {
282 if (dev->states_usage[i].disable)
283 continue;
284
285 /* Shallower states are enabled, so update. */
286 dev->states_usage[entered_state].above++;
287 break;
288 }
289 } else if (diff > delay) {
290 for (i = entered_state + 1; i < drv->state_count; i++) {
291 if (dev->states_usage[i].disable)
292 continue;
293
294 /*
295 * Update if a deeper state would have been a
296 * better match for the observed idle duration.
297 */
298 if (diff - delay >= drv->states[i].target_residency_ns)
299 dev->states_usage[entered_state].below++;
300
301 break;
302 }
303 }
304 } else {
305 dev->last_residency_ns = 0;
306 }
307
308 return entered_state;
309 }
310
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month