drivers/ptp/ptp_ines.c:664 ines_txtstamp() error: double unlocked 'port->lock' (orig line 652)
by kernel test robot
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Richard Cochran <richardcochran(a)gmail.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 005c53447a63cbce10de37406975a34d7bdc8704
commit: bad1eaa6ac312ffd7aa46dd5a4d9843b824aa023 ptp: Add a driver for InES time stamping IP core.
date: 8 months ago
:::::: branch date: 5 hours ago
:::::: commit date: 8 months ago
config: microblaze-randconfig-m031-20200828 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
drivers/ptp/ptp_ines.c:664 ines_txtstamp() error: double unlocked 'port->lock' (orig line 652)
Old smatch warnings:
arch/microblaze/include/asm/thread_info.h:94 current_thread_info() error: uninitialized symbol 'sp'.
# 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 bad1eaa6ac312ffd7aa46dd5a4d9843b824aa023
vim +664 drivers/ptp/ptp_ines.c
bad1eaa6ac312ff Richard Cochran 2019-12-25 644
bad1eaa6ac312ff Richard Cochran 2019-12-25 645 static void ines_txtstamp(struct mii_timestamper *mii_ts,
bad1eaa6ac312ff Richard Cochran 2019-12-25 646 struct sk_buff *skb, int type)
bad1eaa6ac312ff Richard Cochran 2019-12-25 647 {
bad1eaa6ac312ff Richard Cochran 2019-12-25 648 struct ines_port *port = container_of(mii_ts, struct ines_port, mii_ts);
bad1eaa6ac312ff Richard Cochran 2019-12-25 649 struct sk_buff *old_skb = NULL;
bad1eaa6ac312ff Richard Cochran 2019-12-25 650 unsigned long flags;
bad1eaa6ac312ff Richard Cochran 2019-12-25 651
bad1eaa6ac312ff Richard Cochran 2019-12-25 @652 if (!port->txts_enabled || ines_txts_onestep(port, skb, type)) {
bad1eaa6ac312ff Richard Cochran 2019-12-25 653 kfree_skb(skb);
bad1eaa6ac312ff Richard Cochran 2019-12-25 654 return;
bad1eaa6ac312ff Richard Cochran 2019-12-25 655 }
bad1eaa6ac312ff Richard Cochran 2019-12-25 656
bad1eaa6ac312ff Richard Cochran 2019-12-25 657 spin_lock_irqsave(&port->lock, flags);
bad1eaa6ac312ff Richard Cochran 2019-12-25 658
bad1eaa6ac312ff Richard Cochran 2019-12-25 659 if (port->tx_skb)
bad1eaa6ac312ff Richard Cochran 2019-12-25 660 old_skb = port->tx_skb;
bad1eaa6ac312ff Richard Cochran 2019-12-25 661
bad1eaa6ac312ff Richard Cochran 2019-12-25 662 port->tx_skb = skb;
bad1eaa6ac312ff Richard Cochran 2019-12-25 663
bad1eaa6ac312ff Richard Cochran 2019-12-25 @664 spin_unlock_irqrestore(&port->lock, flags);
bad1eaa6ac312ff Richard Cochran 2019-12-25 665
bad1eaa6ac312ff Richard Cochran 2019-12-25 666 if (old_skb)
bad1eaa6ac312ff Richard Cochran 2019-12-25 667 kfree_skb(old_skb);
bad1eaa6ac312ff Richard Cochran 2019-12-25 668
bad1eaa6ac312ff Richard Cochran 2019-12-25 669 schedule_delayed_work(&port->ts_work, 1);
bad1eaa6ac312ff Richard Cochran 2019-12-25 670 }
bad1eaa6ac312ff Richard Cochran 2019-12-25 671
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
[sashal-linux-stable:queue-5.4 97/98] drivers/cpufreq/intel_pstate.c:677:1: sparse: sparse: unused label 'return_pref'
by kernel test robot
CC: kbuild-all(a)lists.01.org
TO: Alexander Levin <alexander.levin(a)microsoft.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.4
head: bb0c18f726150f446238a46800665d16b1fc718b
commit: 19289c2bceec65a4f5424e32409c06390ec6a06a [97/98] cpufreq: intel_pstate: Fix EPP setting via sysfs in active mode
:::::: branch date: 5 hours ago
:::::: commit date: 5 hours ago
config: x86_64-randconfig-s022-20200828 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-191-g10164920-dirty
git checkout 19289c2bceec65a4f5424e32409c06390ec6a06a
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
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/cpufreq/intel_pstate.c:677:1: sparse: sparse: unused label 'return_pref'
drivers/cpufreq/intel_pstate.c:2669:64: sparse: sparse: Using plain integer as NULL pointer
drivers/cpufreq/intel_pstate.c:2670:64: sparse: sparse: Using plain integer as NULL pointer
drivers/cpufreq/intel_pstate.c:2671:64: sparse: sparse: Using plain integer as NULL pointer
drivers/cpufreq/intel_pstate.c:2672:64: sparse: sparse: Using plain integer as NULL pointer
drivers/cpufreq/intel_pstate.c:2673:64: sparse: sparse: Using plain integer as NULL pointer
drivers/cpufreq/intel_pstate.c:2674:64: sparse: sparse: Using plain integer as NULL pointer
drivers/cpufreq/intel_pstate.c:2675:64: sparse: sparse: Using plain integer as NULL pointer
drivers/cpufreq/intel_pstate.c:2676:64: sparse: sparse: Using plain integer as NULL pointer
drivers/cpufreq/intel_pstate.c:2677:64: sparse: sparse: Using plain integer as NULL pointer
drivers/cpufreq/intel_pstate.c:2678:64: sparse: sparse: Using plain integer as NULL pointer
drivers/cpufreq/intel_pstate.c:2679:64: sparse: sparse: Using plain integer as NULL pointer
drivers/cpufreq/intel_pstate.c:2680:64: sparse: sparse: Using plain integer as NULL pointer
drivers/cpufreq/intel_pstate.c:2681:64: sparse: sparse: Using plain integer as NULL pointer
drivers/cpufreq/intel_pstate.c:2682:64: sparse: sparse: Using plain integer as NULL pointer
drivers/cpufreq/intel_pstate.c:2683:64: sparse: sparse: Using plain integer as NULL pointer
# 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-5.4
git checkout 19289c2bceec65a4f5424e32409c06390ec6a06a
vim +/return_pref +677 drivers/cpufreq/intel_pstate.c
984edbdccc6ff0 Srinivas Pandruvada 2016-12-06 639
984edbdccc6ff0 Srinivas Pandruvada 2016-12-06 640 static int intel_pstate_set_energy_pref_index(struct cpudata *cpu_data,
984edbdccc6ff0 Srinivas Pandruvada 2016-12-06 641 int pref_index)
984edbdccc6ff0 Srinivas Pandruvada 2016-12-06 642 {
984edbdccc6ff0 Srinivas Pandruvada 2016-12-06 643 int epp = -EINVAL;
984edbdccc6ff0 Srinivas Pandruvada 2016-12-06 644 int ret;
984edbdccc6ff0 Srinivas Pandruvada 2016-12-06 645
984edbdccc6ff0 Srinivas Pandruvada 2016-12-06 646 if (!pref_index)
984edbdccc6ff0 Srinivas Pandruvada 2016-12-06 647 epp = cpu_data->epp_default;
984edbdccc6ff0 Srinivas Pandruvada 2016-12-06 648
984edbdccc6ff0 Srinivas Pandruvada 2016-12-06 649 mutex_lock(&intel_pstate_limits_lock);
984edbdccc6ff0 Srinivas Pandruvada 2016-12-06 650
108ec36b699475 Borislav Petkov 2019-03-30 651 if (boot_cpu_has(X86_FEATURE_HWP_EPP)) {
19289c2bceec65 Rafael J. Wysocki 2020-07-28 652 /*
19289c2bceec65 Rafael J. Wysocki 2020-07-28 653 * Use the cached HWP Request MSR value, because the register
19289c2bceec65 Rafael J. Wysocki 2020-07-28 654 * itself may be updated by intel_pstate_hwp_boost_up() or
19289c2bceec65 Rafael J. Wysocki 2020-07-28 655 * intel_pstate_hwp_boost_down() at any time.
19289c2bceec65 Rafael J. Wysocki 2020-07-28 656 */
19289c2bceec65 Rafael J. Wysocki 2020-07-28 657 u64 value = READ_ONCE(cpu_data->hwp_req_cached);
984edbdccc6ff0 Srinivas Pandruvada 2016-12-06 658
984edbdccc6ff0 Srinivas Pandruvada 2016-12-06 659 value &= ~GENMASK_ULL(31, 24);
984edbdccc6ff0 Srinivas Pandruvada 2016-12-06 660
984edbdccc6ff0 Srinivas Pandruvada 2016-12-06 661 if (epp == -EINVAL)
3cedbc5a6d7f7c Len Brown 2017-05-01 662 epp = epp_values[pref_index - 1];
984edbdccc6ff0 Srinivas Pandruvada 2016-12-06 663
984edbdccc6ff0 Srinivas Pandruvada 2016-12-06 664 value |= (u64)epp << 24;
19289c2bceec65 Rafael J. Wysocki 2020-07-28 665 /*
19289c2bceec65 Rafael J. Wysocki 2020-07-28 666 * The only other updater of hwp_req_cached in the active mode,
19289c2bceec65 Rafael J. Wysocki 2020-07-28 667 * intel_pstate_hwp_set(), is called under the same lock as this
19289c2bceec65 Rafael J. Wysocki 2020-07-28 668 * function, so it cannot run in parallel with the update below.
19289c2bceec65 Rafael J. Wysocki 2020-07-28 669 */
19289c2bceec65 Rafael J. Wysocki 2020-07-28 670 WRITE_ONCE(cpu_data->hwp_req_cached, value);
984edbdccc6ff0 Srinivas Pandruvada 2016-12-06 671 ret = wrmsrl_on_cpu(cpu_data->cpu, MSR_HWP_REQUEST, value);
984edbdccc6ff0 Srinivas Pandruvada 2016-12-06 672 } else {
984edbdccc6ff0 Srinivas Pandruvada 2016-12-06 673 if (epp == -EINVAL)
984edbdccc6ff0 Srinivas Pandruvada 2016-12-06 674 epp = (pref_index - 1) << 2;
984edbdccc6ff0 Srinivas Pandruvada 2016-12-06 675 ret = intel_pstate_set_epb(cpu_data->cpu, epp);
984edbdccc6ff0 Srinivas Pandruvada 2016-12-06 676 }
984edbdccc6ff0 Srinivas Pandruvada 2016-12-06 @677 return_pref:
984edbdccc6ff0 Srinivas Pandruvada 2016-12-06 678 mutex_unlock(&intel_pstate_limits_lock);
984edbdccc6ff0 Srinivas Pandruvada 2016-12-06 679
984edbdccc6ff0 Srinivas Pandruvada 2016-12-06 680 return ret;
984edbdccc6ff0 Srinivas Pandruvada 2016-12-06 681 }
984edbdccc6ff0 Srinivas Pandruvada 2016-12-06 682
:::::: The code at line 677 was first introduced by commit
:::::: 984edbdccc6ff01b953492f72296685ce3ea2497 cpufreq: intel_pstate: Support for energy performance hints with HWP
:::::: TO: Srinivas Pandruvada <srinivas.pandruvada(a)linux.intel.com>
:::::: CC: Rafael J. Wysocki <rafael.j.wysocki(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
Re: [PATCH 4/6] drm/nouveau: Support sync FDs and syncobjs
by kernel test robot
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20200828104016.1672195-5-thierry.reding(a)gmail.com>
References: <20200828104016.1672195-5-thierry.reding(a)gmail.com>
TO: Thierry Reding <thierry.reding(a)gmail.com>
Hi Thierry,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.9-rc2 next-20200828]
[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/Thierry-Reding/drm-nouveau-Suppo...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 15bc20c6af4ceee97a1f90b43c0e386643c071b4
:::::: branch date: 11 hours ago
:::::: commit date: 11 hours ago
config: x86_64-randconfig-m001-20200828 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
drivers/gpu/drm/nouveau/nouveau_gem.c:772 nouveau_channel_emit_fence() warn: passing zero to 'ERR_PTR'
Old smatch warnings:
include/drm/ttm/ttm_bo_driver.h:641 __ttm_bo_reserve() warn: inconsistent returns '*bo->base.resv'.
# https://github.com/0day-ci/linux/commit/2a7ed4e5037cdf9d59e36812ae6ce230d...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Thierry-Reding/drm-nouveau-Support-sync-FDs-and-sync-objects/20200828-184155
git checkout 2a7ed4e5037cdf9d59e36812ae6ce230df64d472
vim +/ERR_PTR +772 drivers/gpu/drm/nouveau/nouveau_gem.c
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 727
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 728 static struct nouveau_fence *
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 729 nouveau_channel_emit_fence(struct nouveau_channel *channel,
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 730 struct drm_file *file_priv,
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 731 struct drm_nouveau_gem_fence *f)
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 732 {
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 733 struct nouveau_fence *fence;
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 734 int ret;
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 735
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 736 ret = nouveau_fence_new(channel, false, &fence);
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 737 if (ret < 0)
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 738 return ERR_PTR(ret);
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 739
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 740 if (f->flags & NOUVEAU_GEM_FENCE_FD) {
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 741 struct sync_file *file;
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 742 int fd;
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 743
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 744 fd = get_unused_fd_flags(O_CLOEXEC);
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 745 if (fd < 0) {
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 746 ret = fd;
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 747 goto put;
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 748 }
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 749
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 750 file = sync_file_create(&fence->base);
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 751 if (!file) {
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 752 put_unused_fd(fd);
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 753 ret = -ENOMEM;
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 754 goto put;
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 755 }
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 756
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 757 fd_install(fd, file->file);
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 758 f->handle = fd;
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 759 } else {
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 760 struct drm_syncobj *syncobj;
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 761
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 762 ret = drm_syncobj_create(&syncobj, 0, &fence->base);
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 763 if (ret < 0)
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 764 goto put;
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 765
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 766 ret = drm_syncobj_get_handle(file_priv, syncobj, &f->handle);
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 767 drm_syncobj_put(syncobj);
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 768 }
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 769
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 770 put:
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 771 nouveau_fence_unref(&fence);
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 @772 return ERR_PTR(ret);
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 773 }
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 774
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
[linux-next:master 3147/3958] drivers/virtio/virtio_mem.c:723 virtio_mem_memory_notifier_cb() warn: inconsistent returns 'vm->hotplug_mutex'.
by kernel test robot
CC: kbuild-all(a)lists.01.org
TO: David Hildenbrand <david(a)redhat.com>
CC: Andrew Morton <akpm(a)linux-foundation.org>
CC: Linux Memory Management List <linux-mm(a)kvack.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: b36c969764ab12faebb74711c942fa3e6eaf1e96
commit: f2995d0dd75eafd7b6188155f3cb2315e480f911 [3147/3958] virtio-mem: don't special-case ZONE_MOVABLE
:::::: branch date: 13 hours ago
:::::: commit date: 3 days ago
config: x86_64-randconfig-m001-20200828 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/virtio/virtio_mem.c:723 virtio_mem_memory_notifier_cb() warn: inconsistent returns 'vm->hotplug_mutex'.
# 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 f2995d0dd75eafd7b6188155f3cb2315e480f911
vim +723 drivers/virtio/virtio_mem.c
8e5c921ca0cd9aa David Hildenbrand 2020-05-07 636
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 637 /*
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 638 * This callback will either be called synchronously from add_memory() or
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 639 * asynchronously (e.g., triggered via user space). We have to be careful
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 640 * with locking when calling add_memory().
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 641 */
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 642 static int virtio_mem_memory_notifier_cb(struct notifier_block *nb,
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 643 unsigned long action, void *arg)
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 644 {
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 645 struct virtio_mem *vm = container_of(nb, struct virtio_mem,
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 646 memory_notifier);
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 647 struct memory_notify *mhp = arg;
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 648 const unsigned long start = PFN_PHYS(mhp->start_pfn);
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 649 const unsigned long size = PFN_PHYS(mhp->nr_pages);
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 650 const unsigned long mb_id = virtio_mem_phys_to_mb_id(start);
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 651 int rc = NOTIFY_OK;
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 652
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 653 if (!virtio_mem_overlaps_range(vm, start, size))
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 654 return NOTIFY_DONE;
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 655
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 656 /*
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 657 * Memory is onlined/offlined in memory block granularity. We cannot
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 658 * cross virtio-mem device boundaries and memory block boundaries. Bail
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 659 * out if this ever changes.
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 660 */
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 661 if (WARN_ON_ONCE(size != memory_block_size_bytes() ||
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 662 !IS_ALIGNED(start, memory_block_size_bytes())))
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 663 return NOTIFY_BAD;
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 664
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 665 /*
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 666 * Avoid circular locking lockdep warnings. We lock the mutex
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 667 * e.g., in MEM_GOING_ONLINE and unlock it in MEM_ONLINE. The
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 668 * blocking_notifier_call_chain() has it's own lock, which gets unlocked
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 669 * between both notifier calls and will bail out. False positive.
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 670 */
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 671 lockdep_off();
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 672
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 673 switch (action) {
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 674 case MEM_GOING_OFFLINE:
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 675 mutex_lock(&vm->hotplug_mutex);
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 676 if (vm->removing) {
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 677 rc = notifier_from_errno(-EBUSY);
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 678 mutex_unlock(&vm->hotplug_mutex);
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 679 break;
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 680 }
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 681 vm->hotplug_active = true;
8e5c921ca0cd9aa David Hildenbrand 2020-05-07 682 virtio_mem_notify_going_offline(vm, mb_id);
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 683 break;
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 684 case MEM_GOING_ONLINE:
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 685 mutex_lock(&vm->hotplug_mutex);
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 686 if (vm->removing) {
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 687 rc = notifier_from_errno(-EBUSY);
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 688 mutex_unlock(&vm->hotplug_mutex);
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 689 break;
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 690 }
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 691 vm->hotplug_active = true;
f2995d0dd75eafd David Hildenbrand 2020-08-26 692 rc = virtio_mem_notify_going_online(vm, mb_id);
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 693 break;
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 694 case MEM_OFFLINE:
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 695 virtio_mem_notify_offline(vm, mb_id);
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 696 vm->hotplug_active = false;
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 697 mutex_unlock(&vm->hotplug_mutex);
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 698 break;
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 699 case MEM_ONLINE:
f2995d0dd75eafd David Hildenbrand 2020-08-26 700 virtio_mem_notify_online(vm, mb_id);
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 701 vm->hotplug_active = false;
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 702 mutex_unlock(&vm->hotplug_mutex);
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 703 break;
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 704 case MEM_CANCEL_OFFLINE:
8e5c921ca0cd9aa David Hildenbrand 2020-05-07 705 if (!vm->hotplug_active)
8e5c921ca0cd9aa David Hildenbrand 2020-05-07 706 break;
8e5c921ca0cd9aa David Hildenbrand 2020-05-07 707 virtio_mem_notify_cancel_offline(vm, mb_id);
8e5c921ca0cd9aa David Hildenbrand 2020-05-07 708 vm->hotplug_active = false;
8e5c921ca0cd9aa David Hildenbrand 2020-05-07 709 mutex_unlock(&vm->hotplug_mutex);
8e5c921ca0cd9aa David Hildenbrand 2020-05-07 710 break;
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 711 case MEM_CANCEL_ONLINE:
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 712 if (!vm->hotplug_active)
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 713 break;
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 714 vm->hotplug_active = false;
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 715 mutex_unlock(&vm->hotplug_mutex);
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 716 break;
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 717 default:
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 718 break;
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 719 }
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 720
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 721 lockdep_on();
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 722
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 @723 return rc;
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 724 }
5f1f79bbc9e26fa David Hildenbrand 2020-05-07 725
:::::: The code at line 723 was first introduced by commit
:::::: 5f1f79bbc9e26fa9412fa9522f957bb8f030c442 virtio-mem: Paravirtualized memory hotplug
:::::: TO: David Hildenbrand <david(a)redhat.com>
:::::: CC: Michael S. Tsirkin <mst(a)redhat.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
[linux-nvme:nvme-5.9-rc 14/15] drivers/nvme/host/zns.c:170 nvme_ns_report_zones() error: uninitialized symbol 'buflen'.
by kernel test robot
CC: kbuild-all(a)lists.01.org
CC: linux-nvme(a)lists.infradead.org
TO: Christoph Hellwig <hch(a)lst.de>
CC: Sagi Grimberg <sagi(a)grimberg.me>
CC: Keith Busch <kbusch(a)kernel.org>
CC: Chaitanya Kulkarni <chaitanya.kulkarni(a)wdc.com>
tree: git://git.infradead.org/nvme.git nvme-5.9-rc
head: 82e3e51f2fb2246eee837fa4aeee79ec1f921c89
commit: cd83b396e350d2f13bd2ad81565255f77a13aa3a [14/15] nvme: fix error handling in nvme_ns_report_zones
:::::: branch date: 14 hours ago
:::::: commit date: 18 hours ago
config: x86_64-randconfig-m001-20200828 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/nvme/host/zns.c:170 nvme_ns_report_zones() error: uninitialized symbol 'buflen'.
git remote add linux-nvme git://git.infradead.org/nvme.git
git fetch --no-tags linux-nvme nvme-5.9-rc
git checkout cd83b396e350d2f13bd2ad81565255f77a13aa3a
vim +/buflen +170 drivers/nvme/host/zns.c
240e6ee272c07a2 Keith Busch 2020-06-29 158
240e6ee272c07a2 Keith Busch 2020-06-29 159 static int nvme_ns_report_zones(struct nvme_ns *ns, sector_t sector,
240e6ee272c07a2 Keith Busch 2020-06-29 160 unsigned int nr_zones, report_zones_cb cb, void *data)
240e6ee272c07a2 Keith Busch 2020-06-29 161 {
240e6ee272c07a2 Keith Busch 2020-06-29 162 struct nvme_zone_report *report;
cd83b396e350d2f Christoph Hellwig 2020-08-25 163 struct nvme_command c = { };
240e6ee272c07a2 Keith Busch 2020-06-29 164 int ret, zone_idx = 0;
240e6ee272c07a2 Keith Busch 2020-06-29 165 unsigned int nz, i;
240e6ee272c07a2 Keith Busch 2020-06-29 166 size_t buflen;
240e6ee272c07a2 Keith Busch 2020-06-29 167
cd83b396e350d2f Christoph Hellwig 2020-08-25 168 c.zmr.opcode = nvme_cmd_zone_mgmt_recv;
cd83b396e350d2f Christoph Hellwig 2020-08-25 169 c.zmr.nsid = cpu_to_le32(ns->head->ns_id);
cd83b396e350d2f Christoph Hellwig 2020-08-25 @170 c.zmr.numd = cpu_to_le32(nvme_bytes_to_numd(buflen));
cd83b396e350d2f Christoph Hellwig 2020-08-25 171 c.zmr.zra = NVME_ZRA_ZONE_REPORT;
cd83b396e350d2f Christoph Hellwig 2020-08-25 172 c.zmr.zrasf = NVME_ZRASF_ZONE_REPORT_ALL;
cd83b396e350d2f Christoph Hellwig 2020-08-25 173 c.zmr.pr = NVME_REPORT_ZONE_PARTIAL;
cd83b396e350d2f Christoph Hellwig 2020-08-25 174
240e6ee272c07a2 Keith Busch 2020-06-29 175 report = nvme_zns_alloc_report_buffer(ns, nr_zones, &buflen);
240e6ee272c07a2 Keith Busch 2020-06-29 176 if (!report)
240e6ee272c07a2 Keith Busch 2020-06-29 177 return -ENOMEM;
240e6ee272c07a2 Keith Busch 2020-06-29 178
240e6ee272c07a2 Keith Busch 2020-06-29 179 sector &= ~(ns->zsze - 1);
240e6ee272c07a2 Keith Busch 2020-06-29 180 while (zone_idx < nr_zones && sector < get_capacity(ns->disk)) {
240e6ee272c07a2 Keith Busch 2020-06-29 181 memset(report, 0, buflen);
cd83b396e350d2f Christoph Hellwig 2020-08-25 182
cd83b396e350d2f Christoph Hellwig 2020-08-25 183 c.zmr.slba = cpu_to_le64(nvme_sect_to_lba(ns, sector));
cd83b396e350d2f Christoph Hellwig 2020-08-25 184 ret = nvme_submit_sync_cmd(ns->queue, &c, report, buflen);
cd83b396e350d2f Christoph Hellwig 2020-08-25 185 if (ret)
240e6ee272c07a2 Keith Busch 2020-06-29 186 goto out_free;
240e6ee272c07a2 Keith Busch 2020-06-29 187
cd83b396e350d2f Christoph Hellwig 2020-08-25 188 nz = min((unsigned int)le64_to_cpu(report->nr_zones), nr_zones);
240e6ee272c07a2 Keith Busch 2020-06-29 189 if (!nz)
240e6ee272c07a2 Keith Busch 2020-06-29 190 break;
240e6ee272c07a2 Keith Busch 2020-06-29 191
240e6ee272c07a2 Keith Busch 2020-06-29 192 for (i = 0; i < nz && zone_idx < nr_zones; i++) {
240e6ee272c07a2 Keith Busch 2020-06-29 193 ret = nvme_zone_parse_entry(ns, &report->entries[i],
240e6ee272c07a2 Keith Busch 2020-06-29 194 zone_idx, cb, data);
240e6ee272c07a2 Keith Busch 2020-06-29 195 if (ret)
240e6ee272c07a2 Keith Busch 2020-06-29 196 goto out_free;
240e6ee272c07a2 Keith Busch 2020-06-29 197 zone_idx++;
240e6ee272c07a2 Keith Busch 2020-06-29 198 }
240e6ee272c07a2 Keith Busch 2020-06-29 199
240e6ee272c07a2 Keith Busch 2020-06-29 200 sector += ns->zsze * nz;
240e6ee272c07a2 Keith Busch 2020-06-29 201 }
240e6ee272c07a2 Keith Busch 2020-06-29 202
240e6ee272c07a2 Keith Busch 2020-06-29 203 if (zone_idx > 0)
240e6ee272c07a2 Keith Busch 2020-06-29 204 ret = zone_idx;
240e6ee272c07a2 Keith Busch 2020-06-29 205 else
240e6ee272c07a2 Keith Busch 2020-06-29 206 ret = -EINVAL;
240e6ee272c07a2 Keith Busch 2020-06-29 207 out_free:
240e6ee272c07a2 Keith Busch 2020-06-29 208 kvfree(report);
240e6ee272c07a2 Keith Busch 2020-06-29 209 return ret;
240e6ee272c07a2 Keith Busch 2020-06-29 210 }
240e6ee272c07a2 Keith Busch 2020-06-29 211
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
Re: [PATCH v3 6/6] iommu/virtio: Enable x86 support
by kernel test robot
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20200821131540.2801801-7-jean-philippe(a)linaro.org>
References: <20200821131540.2801801-7-jean-philippe(a)linaro.org>
TO: "Jean-Philippe Brucker" <jean-philippe(a)linaro.org>
TO: iommu(a)lists.linux-foundation.org
TO: virtualization(a)lists.linux-foundation.org
TO: virtio-dev(a)lists.oasis-open.org
TO: linux-pci(a)vger.kernel.org
CC: joro(a)8bytes.org
CC: bhelgaas(a)google.com
CC: mst(a)redhat.com
CC: jasowang(a)redhat.com
CC: kevin.tian(a)intel.com
CC: sebastien.boeuf(a)intel.com
Hi Jean-Philippe,
I love your patch! Perhaps something to improve:
[auto build test WARNING on pci/next]
[also build test WARNING on linus/master v5.9-rc2 next-20200827]
[cannot apply to iommu/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/Jean-Philippe-Brucker/Add-virtio...
base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
:::::: branch date: 7 days ago
:::::: commit date: 7 days ago
config: i386-randconfig-m021-20200828 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/iommu/virtio/topology-helpers.c:142 virt_dma_configure() warn: passing zero to 'PTR_ERR'
drivers/iommu/virtio/topology.c:70 viommu_parse_node() warn: passing zero to 'ERR_PTR'
# https://github.com/0day-ci/linux/commit/2b45717082f8603e400de954e1a465dd5...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jean-Philippe-Brucker/Add-virtio-iommu-built-in-topology/20200821-211904
git checkout 2b45717082f8603e400de954e1a465dd508028af
vim +/PTR_ERR +142 drivers/iommu/virtio/topology-helpers.c
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 125
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 126 /**
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 127 * virt_dma_configure - Configure DMA of virtualized devices
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 128 * @dev: the endpoint
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 129 *
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 130 * Setup the DMA and IOMMU ops of a virtual device, for platforms without DT or
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 131 * ACPI.
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 132 *
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 133 * Return: -EPROBE_DEFER if the device is managed by an IOMMU that hasn't been
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 134 * probed yet, 0 otherwise
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 135 */
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 136 int virt_dma_configure(struct device *dev)
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 137 {
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 138 const struct iommu_ops *iommu_ops;
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 139
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 140 iommu_ops = virt_iommu_setup(dev);
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 141 if (IS_ERR_OR_NULL(iommu_ops)) {
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 @142 int ret = PTR_ERR(iommu_ops);
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 143
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 144 if (ret == -EPROBE_DEFER || ret == 0)
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 145 return ret;
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 146 dev_err(dev, "error %d while setting up virt IOMMU\n", ret);
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 147 return 0;
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 148 }
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 149
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 150 /*
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 151 * If we have reason to believe the IOMMU driver missed the initial
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 152 * add_device callback for dev, replay it to get things in order.
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 153 */
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 154 if (dev->bus && !device_iommu_mapped(dev))
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 155 iommu_probe_device(dev);
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 156
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 157 /* Assume coherent, as well as full 64-bit addresses. */
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 158 #ifdef CONFIG_ARCH_HAS_SETUP_DMA_OPS
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 159 arch_setup_dma_ops(dev, 0, ~0ULL, iommu_ops, true);
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 160 #else
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 161 iommu_setup_dma_ops(dev, 0, ~0ULL);
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 162 #endif
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 163 return 0;
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 164 }
fd1c41b616087e Jean-Philippe Brucker 2020-08-21 165
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
[hverkuil-media:tegrav4 22/25] drivers/media/i2c/imx274.c:1864 imx274_probe() error: uninitialized symbol 'ret'.
by kernel test robot
CC: kbuild-all(a)lists.01.org
TO: Sowjanya Komatineni <skomatineni(a)nvidia.com>
CC: Hans Verkuil <hverkuil(a)xs4all.nl>
tree: git://linuxtv.org/hverkuil/media_tree.git tegrav4
head: ce1e7ce798ee872c0cd58f0a98a1f4db0606f8a2
commit: 8e6137f211b496f99153e409c92f7a5ce3c9dbf3 [22/25] media: i2c: Add support for IMX274 supplies and external clock
:::::: branch date: 9 days ago
:::::: commit date: 9 days ago
config: i386-randconfig-m021-20200825 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/media/i2c/imx274.c:1864 imx274_probe() error: uninitialized symbol 'ret'.
git remote add hverkuil-media git://linuxtv.org/hverkuil/media_tree.git
git fetch --no-tags hverkuil-media tegrav4
git checkout 8e6137f211b496f99153e409c92f7a5ce3c9dbf3
vim +/ret +1864 drivers/media/i2c/imx274.c
0985dd306f727d Leon Luo 2017-10-05 1847
e671499303e4c0 Kieran Bingham 2019-07-10 1848 static int imx274_probe(struct i2c_client *client)
0985dd306f727d Leon Luo 2017-10-05 1849 {
0985dd306f727d Leon Luo 2017-10-05 1850 struct v4l2_subdev *sd;
0985dd306f727d Leon Luo 2017-10-05 1851 struct stimx274 *imx274;
0985dd306f727d Leon Luo 2017-10-05 1852 int ret;
0985dd306f727d Leon Luo 2017-10-05 1853
0985dd306f727d Leon Luo 2017-10-05 1854 /* initialize imx274 */
0985dd306f727d Leon Luo 2017-10-05 1855 imx274 = devm_kzalloc(&client->dev, sizeof(*imx274), GFP_KERNEL);
0985dd306f727d Leon Luo 2017-10-05 1856 if (!imx274)
0985dd306f727d Leon Luo 2017-10-05 1857 return -ENOMEM;
0985dd306f727d Leon Luo 2017-10-05 1858
0985dd306f727d Leon Luo 2017-10-05 1859 mutex_init(&imx274->lock);
0985dd306f727d Leon Luo 2017-10-05 1860
8e6137f211b496 Sowjanya Komatineni 2020-06-03 1861 imx274->xclk = devm_clk_get(&client->dev, "xclk");
8e6137f211b496 Sowjanya Komatineni 2020-06-03 1862 if (IS_ERR(imx274->xclk)) {
8e6137f211b496 Sowjanya Komatineni 2020-06-03 1863 dev_err(&client->dev, "Failed to get xclk\n");
8e6137f211b496 Sowjanya Komatineni 2020-06-03 @1864 return ret;
8e6137f211b496 Sowjanya Komatineni 2020-06-03 1865 }
8e6137f211b496 Sowjanya Komatineni 2020-06-03 1866
8e6137f211b496 Sowjanya Komatineni 2020-06-03 1867 ret = clk_set_rate(imx274->xclk, IMX274_DEFAULT_CLK_FREQ);
8e6137f211b496 Sowjanya Komatineni 2020-06-03 1868 if (ret < 0) {
8e6137f211b496 Sowjanya Komatineni 2020-06-03 1869 dev_err(&client->dev, "Failed to set xclk rate\n");
8e6137f211b496 Sowjanya Komatineni 2020-06-03 1870 return ret;
8e6137f211b496 Sowjanya Komatineni 2020-06-03 1871 }
8e6137f211b496 Sowjanya Komatineni 2020-06-03 1872
8e6137f211b496 Sowjanya Komatineni 2020-06-03 1873 ret = imx274_get_regulators(&client->dev, imx274);
8e6137f211b496 Sowjanya Komatineni 2020-06-03 1874 if (ret) {
8e6137f211b496 Sowjanya Komatineni 2020-06-03 1875 dev_err(&client->dev, "Failed to get power regulators, err: %d\n", ret);
8e6137f211b496 Sowjanya Komatineni 2020-06-03 1876 return ret;
8e6137f211b496 Sowjanya Komatineni 2020-06-03 1877 }
8e6137f211b496 Sowjanya Komatineni 2020-06-03 1878
438ac1fd5e1e13 Luca Ceresoli 2018-06-11 1879 /* initialize format */
9648cb577b76ec Luca Ceresoli 2018-08-24 1880 imx274->mode = &imx274_modes[IMX274_DEFAULT_BINNING];
39dd23dc9d4c51 Luca Ceresoli 2018-07-25 1881 imx274->crop.width = IMX274_MAX_WIDTH;
39dd23dc9d4c51 Luca Ceresoli 2018-07-25 1882 imx274->crop.height = IMX274_MAX_HEIGHT;
39dd23dc9d4c51 Luca Ceresoli 2018-07-25 1883 imx274->format.width = imx274->crop.width / imx274->mode->bin_ratio;
39dd23dc9d4c51 Luca Ceresoli 2018-07-25 1884 imx274->format.height = imx274->crop.height / imx274->mode->bin_ratio;
438ac1fd5e1e13 Luca Ceresoli 2018-06-11 1885 imx274->format.field = V4L2_FIELD_NONE;
438ac1fd5e1e13 Luca Ceresoli 2018-06-11 1886 imx274->format.code = MEDIA_BUS_FMT_SRGGB10_1X10;
438ac1fd5e1e13 Luca Ceresoli 2018-06-11 1887 imx274->format.colorspace = V4L2_COLORSPACE_SRGB;
438ac1fd5e1e13 Luca Ceresoli 2018-06-11 1888 imx274->frame_interval.numerator = 1;
438ac1fd5e1e13 Luca Ceresoli 2018-06-11 1889 imx274->frame_interval.denominator = IMX274_DEF_FRAME_RATE;
438ac1fd5e1e13 Luca Ceresoli 2018-06-11 1890
0985dd306f727d Leon Luo 2017-10-05 1891 /* initialize regmap */
0985dd306f727d Leon Luo 2017-10-05 1892 imx274->regmap = devm_regmap_init_i2c(client, &imx274_regmap_config);
0985dd306f727d Leon Luo 2017-10-05 1893 if (IS_ERR(imx274->regmap)) {
0985dd306f727d Leon Luo 2017-10-05 1894 dev_err(&client->dev,
0985dd306f727d Leon Luo 2017-10-05 1895 "regmap init failed: %ld\n", PTR_ERR(imx274->regmap));
0985dd306f727d Leon Luo 2017-10-05 1896 ret = -ENODEV;
0985dd306f727d Leon Luo 2017-10-05 1897 goto err_regmap;
0985dd306f727d Leon Luo 2017-10-05 1898 }
0985dd306f727d Leon Luo 2017-10-05 1899
0985dd306f727d Leon Luo 2017-10-05 1900 /* initialize subdevice */
0985dd306f727d Leon Luo 2017-10-05 1901 imx274->client = client;
0985dd306f727d Leon Luo 2017-10-05 1902 sd = &imx274->sd;
0985dd306f727d Leon Luo 2017-10-05 1903 v4l2_i2c_subdev_init(sd, client, &imx274_subdev_ops);
0985dd306f727d Leon Luo 2017-10-05 1904 sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
0985dd306f727d Leon Luo 2017-10-05 1905
0985dd306f727d Leon Luo 2017-10-05 1906 /* initialize subdev media pad */
0985dd306f727d Leon Luo 2017-10-05 1907 imx274->pad.flags = MEDIA_PAD_FL_SOURCE;
0985dd306f727d Leon Luo 2017-10-05 1908 sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
0985dd306f727d Leon Luo 2017-10-05 1909 ret = media_entity_pads_init(&sd->entity, 1, &imx274->pad);
0985dd306f727d Leon Luo 2017-10-05 1910 if (ret < 0) {
0985dd306f727d Leon Luo 2017-10-05 1911 dev_err(&client->dev,
0985dd306f727d Leon Luo 2017-10-05 1912 "%s : media entity init Failed %d\n", __func__, ret);
0985dd306f727d Leon Luo 2017-10-05 1913 goto err_regmap;
0985dd306f727d Leon Luo 2017-10-05 1914 }
0985dd306f727d Leon Luo 2017-10-05 1915
0985dd306f727d Leon Luo 2017-10-05 1916 /* initialize sensor reset gpio */
0985dd306f727d Leon Luo 2017-10-05 1917 imx274->reset_gpio = devm_gpiod_get_optional(&client->dev, "reset",
0985dd306f727d Leon Luo 2017-10-05 1918 GPIOD_OUT_HIGH);
0985dd306f727d Leon Luo 2017-10-05 1919 if (IS_ERR(imx274->reset_gpio)) {
0985dd306f727d Leon Luo 2017-10-05 1920 if (PTR_ERR(imx274->reset_gpio) != -EPROBE_DEFER)
0985dd306f727d Leon Luo 2017-10-05 1921 dev_err(&client->dev, "Reset GPIO not setup in DT");
0985dd306f727d Leon Luo 2017-10-05 1922 ret = PTR_ERR(imx274->reset_gpio);
0985dd306f727d Leon Luo 2017-10-05 1923 goto err_me;
0985dd306f727d Leon Luo 2017-10-05 1924 }
0985dd306f727d Leon Luo 2017-10-05 1925
0985dd306f727d Leon Luo 2017-10-05 1926 /* initialize controls */
82f5b507c0cf35 Luca Ceresoli 2018-11-27 1927 ret = v4l2_ctrl_handler_init(&imx274->ctrls.handler, 4);
0985dd306f727d Leon Luo 2017-10-05 1928 if (ret < 0) {
0985dd306f727d Leon Luo 2017-10-05 1929 dev_err(&client->dev,
0985dd306f727d Leon Luo 2017-10-05 1930 "%s : ctrl handler init Failed\n", __func__);
0985dd306f727d Leon Luo 2017-10-05 1931 goto err_me;
0985dd306f727d Leon Luo 2017-10-05 1932 }
0985dd306f727d Leon Luo 2017-10-05 1933
0985dd306f727d Leon Luo 2017-10-05 1934 imx274->ctrls.handler.lock = &imx274->lock;
0985dd306f727d Leon Luo 2017-10-05 1935
0985dd306f727d Leon Luo 2017-10-05 1936 /* add new controls */
0985dd306f727d Leon Luo 2017-10-05 1937 imx274->ctrls.test_pattern = v4l2_ctrl_new_std_menu_items(
0985dd306f727d Leon Luo 2017-10-05 1938 &imx274->ctrls.handler, &imx274_ctrl_ops,
0985dd306f727d Leon Luo 2017-10-05 1939 V4L2_CID_TEST_PATTERN,
0985dd306f727d Leon Luo 2017-10-05 1940 ARRAY_SIZE(tp_qmenu) - 1, 0, 0, tp_qmenu);
0985dd306f727d Leon Luo 2017-10-05 1941
0985dd306f727d Leon Luo 2017-10-05 1942 imx274->ctrls.gain = v4l2_ctrl_new_std(
0985dd306f727d Leon Luo 2017-10-05 1943 &imx274->ctrls.handler,
0985dd306f727d Leon Luo 2017-10-05 1944 &imx274_ctrl_ops,
0985dd306f727d Leon Luo 2017-10-05 1945 V4L2_CID_GAIN, IMX274_MIN_GAIN,
0985dd306f727d Leon Luo 2017-10-05 1946 IMX274_MAX_DIGITAL_GAIN * IMX274_MAX_ANALOG_GAIN, 1,
0985dd306f727d Leon Luo 2017-10-05 1947 IMX274_DEF_GAIN);
0985dd306f727d Leon Luo 2017-10-05 1948
0985dd306f727d Leon Luo 2017-10-05 1949 imx274->ctrls.exposure = v4l2_ctrl_new_std(
0985dd306f727d Leon Luo 2017-10-05 1950 &imx274->ctrls.handler,
0985dd306f727d Leon Luo 2017-10-05 1951 &imx274_ctrl_ops,
0985dd306f727d Leon Luo 2017-10-05 1952 V4L2_CID_EXPOSURE, IMX274_MIN_EXPOSURE_TIME,
0985dd306f727d Leon Luo 2017-10-05 1953 1000000 / IMX274_DEF_FRAME_RATE, 1,
0985dd306f727d Leon Luo 2017-10-05 1954 IMX274_MIN_EXPOSURE_TIME);
0985dd306f727d Leon Luo 2017-10-05 1955
0985dd306f727d Leon Luo 2017-10-05 1956 imx274->ctrls.vflip = v4l2_ctrl_new_std(
0985dd306f727d Leon Luo 2017-10-05 1957 &imx274->ctrls.handler,
0985dd306f727d Leon Luo 2017-10-05 1958 &imx274_ctrl_ops,
0985dd306f727d Leon Luo 2017-10-05 1959 V4L2_CID_VFLIP, 0, 1, 1, 0);
0985dd306f727d Leon Luo 2017-10-05 1960
0985dd306f727d Leon Luo 2017-10-05 1961 imx274->sd.ctrl_handler = &imx274->ctrls.handler;
0985dd306f727d Leon Luo 2017-10-05 1962 if (imx274->ctrls.handler.error) {
0985dd306f727d Leon Luo 2017-10-05 1963 ret = imx274->ctrls.handler.error;
0985dd306f727d Leon Luo 2017-10-05 1964 goto err_ctrls;
0985dd306f727d Leon Luo 2017-10-05 1965 }
0985dd306f727d Leon Luo 2017-10-05 1966
8e6137f211b496 Sowjanya Komatineni 2020-06-03 1967 /* power on the sensor */
8e6137f211b496 Sowjanya Komatineni 2020-06-03 1968 ret = imx274_power_on(&client->dev);
8e6137f211b496 Sowjanya Komatineni 2020-06-03 1969 if (ret < 0) {
8e6137f211b496 Sowjanya Komatineni 2020-06-03 1970 dev_err(&client->dev,
8e6137f211b496 Sowjanya Komatineni 2020-06-03 1971 "%s : imx274 power on failed\n", __func__);
8e6137f211b496 Sowjanya Komatineni 2020-06-03 1972 goto err_ctrls;
8e6137f211b496 Sowjanya Komatineni 2020-06-03 1973 }
8e6137f211b496 Sowjanya Komatineni 2020-06-03 1974
0985dd306f727d Leon Luo 2017-10-05 1975 /* setup default controls */
0985dd306f727d Leon Luo 2017-10-05 1976 ret = v4l2_ctrl_handler_setup(&imx274->ctrls.handler);
0985dd306f727d Leon Luo 2017-10-05 1977 if (ret) {
0985dd306f727d Leon Luo 2017-10-05 1978 dev_err(&client->dev,
0985dd306f727d Leon Luo 2017-10-05 1979 "Error %d setup default controls\n", ret);
8e6137f211b496 Sowjanya Komatineni 2020-06-03 1980 goto err_power_off;
0985dd306f727d Leon Luo 2017-10-05 1981 }
0985dd306f727d Leon Luo 2017-10-05 1982
0985dd306f727d Leon Luo 2017-10-05 1983 /* load default control values */
0985dd306f727d Leon Luo 2017-10-05 1984 ret = imx274_load_default(imx274);
0985dd306f727d Leon Luo 2017-10-05 1985 if (ret) {
0985dd306f727d Leon Luo 2017-10-05 1986 dev_err(&client->dev,
0985dd306f727d Leon Luo 2017-10-05 1987 "%s : imx274_load_default failed %d\n",
0985dd306f727d Leon Luo 2017-10-05 1988 __func__, ret);
8e6137f211b496 Sowjanya Komatineni 2020-06-03 1989 goto err_power_off;
0985dd306f727d Leon Luo 2017-10-05 1990 }
0985dd306f727d Leon Luo 2017-10-05 1991
0985dd306f727d Leon Luo 2017-10-05 1992 /* register subdevice */
0985dd306f727d Leon Luo 2017-10-05 1993 ret = v4l2_async_register_subdev(sd);
0985dd306f727d Leon Luo 2017-10-05 1994 if (ret < 0) {
0985dd306f727d Leon Luo 2017-10-05 1995 dev_err(&client->dev,
0985dd306f727d Leon Luo 2017-10-05 1996 "%s : v4l2_async_register_subdev failed %d\n",
0985dd306f727d Leon Luo 2017-10-05 1997 __func__, ret);
8e6137f211b496 Sowjanya Komatineni 2020-06-03 1998 goto err_power_off;
0985dd306f727d Leon Luo 2017-10-05 1999 }
0985dd306f727d Leon Luo 2017-10-05 2000
0985dd306f727d Leon Luo 2017-10-05 2001 dev_info(&client->dev, "imx274 : imx274 probe success !\n");
0985dd306f727d Leon Luo 2017-10-05 2002 return 0;
0985dd306f727d Leon Luo 2017-10-05 2003
8e6137f211b496 Sowjanya Komatineni 2020-06-03 2004 err_power_off:
8e6137f211b496 Sowjanya Komatineni 2020-06-03 2005 imx274_power_off(&client->dev);
0985dd306f727d Leon Luo 2017-10-05 2006 err_ctrls:
781b045baefdab Sakari Ailus 2017-11-01 2007 v4l2_ctrl_handler_free(&imx274->ctrls.handler);
0985dd306f727d Leon Luo 2017-10-05 2008 err_me:
0985dd306f727d Leon Luo 2017-10-05 2009 media_entity_cleanup(&sd->entity);
0985dd306f727d Leon Luo 2017-10-05 2010 err_regmap:
0985dd306f727d Leon Luo 2017-10-05 2011 mutex_destroy(&imx274->lock);
0985dd306f727d Leon Luo 2017-10-05 2012 return ret;
0985dd306f727d Leon Luo 2017-10-05 2013 }
0985dd306f727d Leon Luo 2017-10-05 2014
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
Re: [PATCH 03/22] cfg80211: regulatory: handle S1G channels
by kernel test robot
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20200827223304.16155-4-thomas(a)adapt-ip.com>
References: <20200827223304.16155-4-thomas(a)adapt-ip.com>
TO: Thomas Pedersen <thomas(a)adapt-ip.com>
TO: Johannes Berg <johannes(a)sipsolutions.net>
CC: "linux-wireless" <linux-wireless(a)vger.kernel.org>
CC: Thomas Pedersen <thomas(a)adapt-ip.com>
Hi Thomas,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on next-20200827]
[also build test WARNING on v5.9-rc2]
[cannot apply to mac80211-next/master mac80211/master wireless-drivers-next/master wireless-drivers/master v5.9-rc2 v5.9-rc1 v5.8]
[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/Thomas-Pedersen/add-initial-S1G-...
base: 88abac0b753dfdd85362a26d2da8277cb1e0842b
:::::: branch date: 4 hours ago
:::::: commit date: 4 hours ago
compiler: alpha-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
cppcheck warnings: (new ones prefixed by >>)
>> net/mac80211/util.c:1456:11: warning: Either the condition 'chanctx_conf' is redundant or there is possible null pointer dereference: chanctx_conf. [nullPointerRedundantCheck]
min_bw = chanctx_conf->def.chan->band == NL80211_BAND_S1GHZ ? 1 : 20;
^
net/mac80211/util.c:1448:6: note: Assuming that condition 'chanctx_conf' is not redundant
if (chanctx_conf)
^
net/mac80211/util.c:1456:11: note: Null pointer dereference
min_bw = chanctx_conf->def.chan->band == NL80211_BAND_S1GHZ ? 1 : 20;
^
net/mac80211/util.c:1587:56: warning: Function 'ieee80211_send_auth' argument order different: declaration 'sdata, transaction, auth_alg, status, extra, extra_len, bssid, da, key, key_len, key_idx, tx_flags' definition 'sdata, transaction, auth_alg, status, extra, extra_len, da, bssid, key, key_len, key_idx, tx_flags' [funcArgOrderDifferent]
void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
^
net/mac80211/ieee80211_i.h:2129:56: note: Function 'ieee80211_send_auth' argument order different: declaration 'sdata, transaction, auth_alg, status, extra, extra_len, bssid, da, key, key_len, key_idx, tx_flags' definition 'sdata, transaction, auth_alg, status, extra, extra_len, da, bssid, key, key_len, key_idx, tx_flags'
void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
^
net/mac80211/util.c:1587:56: note: Function 'ieee80211_send_auth' argument order different: declaration 'sdata, transaction, auth_alg, status, extra, extra_len, bssid, da, key, key_len, key_idx, tx_flags' definition 'sdata, transaction, auth_alg, status, extra, extra_len, da, bssid, key, key_len, key_idx, tx_flags'
void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
^
# https://github.com/0day-ci/linux/commit/241a925b241ed8977ba3eb94e0b81fd2c...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Thomas-Pedersen/add-initial-S1G-support/20200828-063630
git checkout 241a925b241ed8977ba3eb94e0b81fd2cc389f2e
vim +/chanctx_conf +1456 net/mac80211/util.c
78ac51f81532c1 Sara Sharon 2019-01-16 1432
e552af05814849 Haim Dreyfuss 2018-03-28 1433 void ieee80211_regulatory_limit_wmm_params(struct ieee80211_sub_if_data *sdata,
e552af05814849 Haim Dreyfuss 2018-03-28 1434 struct ieee80211_tx_queue_params
e552af05814849 Haim Dreyfuss 2018-03-28 1435 *qparam, int ac)
e552af05814849 Haim Dreyfuss 2018-03-28 1436 {
e552af05814849 Haim Dreyfuss 2018-03-28 1437 struct ieee80211_chanctx_conf *chanctx_conf;
e552af05814849 Haim Dreyfuss 2018-03-28 1438 const struct ieee80211_reg_rule *rrule;
38cb87ee47fb82 Stanislaw Gruszka 2018-08-22 1439 const struct ieee80211_wmm_ac *wmm_ac;
241a925b241ed8 Thomas Pedersen 2020-08-27 1440 u16 min_bw, center_freq = 0;
e552af05814849 Haim Dreyfuss 2018-03-28 1441
e552af05814849 Haim Dreyfuss 2018-03-28 1442 if (sdata->vif.type != NL80211_IFTYPE_AP &&
e552af05814849 Haim Dreyfuss 2018-03-28 1443 sdata->vif.type != NL80211_IFTYPE_STATION)
e552af05814849 Haim Dreyfuss 2018-03-28 1444 return;
e552af05814849 Haim Dreyfuss 2018-03-28 1445
e552af05814849 Haim Dreyfuss 2018-03-28 1446 rcu_read_lock();
e552af05814849 Haim Dreyfuss 2018-03-28 1447 chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
e552af05814849 Haim Dreyfuss 2018-03-28 1448 if (chanctx_conf)
e552af05814849 Haim Dreyfuss 2018-03-28 1449 center_freq = chanctx_conf->def.chan->center_freq;
e552af05814849 Haim Dreyfuss 2018-03-28 1450
e552af05814849 Haim Dreyfuss 2018-03-28 1451 if (!center_freq) {
e552af05814849 Haim Dreyfuss 2018-03-28 1452 rcu_read_unlock();
e552af05814849 Haim Dreyfuss 2018-03-28 1453 return;
e552af05814849 Haim Dreyfuss 2018-03-28 1454 }
e552af05814849 Haim Dreyfuss 2018-03-28 1455
241a925b241ed8 Thomas Pedersen 2020-08-27 @1456 min_bw = chanctx_conf->def.chan->band == NL80211_BAND_S1GHZ ? 1 : 20;
241a925b241ed8 Thomas Pedersen 2020-08-27 1457 rrule = freq_reg_info(sdata->wdev.wiphy, MHZ_TO_KHZ(center_freq),
241a925b241ed8 Thomas Pedersen 2020-08-27 1458 min_bw);
e552af05814849 Haim Dreyfuss 2018-03-28 1459
38cb87ee47fb82 Stanislaw Gruszka 2018-08-22 1460 if (IS_ERR_OR_NULL(rrule) || !rrule->has_wmm) {
e552af05814849 Haim Dreyfuss 2018-03-28 1461 rcu_read_unlock();
e552af05814849 Haim Dreyfuss 2018-03-28 1462 return;
e552af05814849 Haim Dreyfuss 2018-03-28 1463 }
e552af05814849 Haim Dreyfuss 2018-03-28 1464
e552af05814849 Haim Dreyfuss 2018-03-28 1465 if (sdata->vif.type == NL80211_IFTYPE_AP)
38cb87ee47fb82 Stanislaw Gruszka 2018-08-22 1466 wmm_ac = &rrule->wmm_rule.ap[ac];
e552af05814849 Haim Dreyfuss 2018-03-28 1467 else
38cb87ee47fb82 Stanislaw Gruszka 2018-08-22 1468 wmm_ac = &rrule->wmm_rule.client[ac];
e552af05814849 Haim Dreyfuss 2018-03-28 1469 qparam->cw_min = max_t(u16, qparam->cw_min, wmm_ac->cw_min);
e552af05814849 Haim Dreyfuss 2018-03-28 1470 qparam->cw_max = max_t(u16, qparam->cw_max, wmm_ac->cw_max);
e552af05814849 Haim Dreyfuss 2018-03-28 1471 qparam->aifs = max_t(u8, qparam->aifs, wmm_ac->aifsn);
abd76d255d69d7 Dreyfuss, Haim 2018-08-31 1472 qparam->txop = min_t(u16, qparam->txop, wmm_ac->cot / 32);
e552af05814849 Haim Dreyfuss 2018-03-28 1473 rcu_read_unlock();
e552af05814849 Haim Dreyfuss 2018-03-28 1474 }
e552af05814849 Haim Dreyfuss 2018-03-28 1475
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:130 sdma_v5_2_init_microcode() error: uninitialized symbol 'chip_name'.
by kernel test robot
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Likun Gao <Likun.Gao(a)amd.com>
CC: Alex Deucher <alexander.deucher(a)amd.com>
CC: Hawking Zhang <Hawking.Zhang(a)amd.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 15bc20c6af4ceee97a1f90b43c0e386643c071b4
commit: 157e72e831cb8f323108b5df6d0b148aef9507fb drm/amdgpu: add sdma ip block for sienna_cichlid (v5)
date: 3 months ago
:::::: branch date: 31 hours ago
:::::: commit date: 3 months ago
config: ia64-randconfig-m031-20200827 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:130 sdma_v5_2_init_microcode() error: uninitialized symbol 'chip_name'.
Old smatch warnings:
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:263 sdma_v5_2_ring_set_wptr() warn: should 'ring->wptr << 2' be a 64 bit type?
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:277 sdma_v5_2_ring_set_wptr() warn: should 'ring->wptr << 2' be a 64 bit type?
# 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 157e72e831cb8f323108b5df6d0b148aef9507fb
vim +/chip_name +130 drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
157e72e831cb8f3 Likun Gao 2019-06-17 96
157e72e831cb8f3 Likun Gao 2019-06-17 97 /**
157e72e831cb8f3 Likun Gao 2019-06-17 98 * sdma_v5_2_init_microcode - load ucode images from disk
157e72e831cb8f3 Likun Gao 2019-06-17 99 *
157e72e831cb8f3 Likun Gao 2019-06-17 100 * @adev: amdgpu_device pointer
157e72e831cb8f3 Likun Gao 2019-06-17 101 *
157e72e831cb8f3 Likun Gao 2019-06-17 102 * Use the firmware interface to load the ucode images into
157e72e831cb8f3 Likun Gao 2019-06-17 103 * the driver (not loaded into hw).
157e72e831cb8f3 Likun Gao 2019-06-17 104 * Returns 0 on success, error on failure.
157e72e831cb8f3 Likun Gao 2019-06-17 105 */
157e72e831cb8f3 Likun Gao 2019-06-17 106
157e72e831cb8f3 Likun Gao 2019-06-17 107 // emulation only, won't work on real chip
157e72e831cb8f3 Likun Gao 2019-06-17 108 // navi10 real chip need to use PSP to load firmware
157e72e831cb8f3 Likun Gao 2019-06-17 109 static int sdma_v5_2_init_microcode(struct amdgpu_device *adev)
157e72e831cb8f3 Likun Gao 2019-06-17 110 {
157e72e831cb8f3 Likun Gao 2019-06-17 111 const char *chip_name;
157e72e831cb8f3 Likun Gao 2019-06-17 112 char fw_name[40];
157e72e831cb8f3 Likun Gao 2019-06-17 113 int err = 0, i;
157e72e831cb8f3 Likun Gao 2019-06-17 114 struct amdgpu_firmware_info *info = NULL;
157e72e831cb8f3 Likun Gao 2019-06-17 115 const struct common_firmware_header *header = NULL;
157e72e831cb8f3 Likun Gao 2019-06-17 116 const struct sdma_firmware_header_v1_0 *hdr;
157e72e831cb8f3 Likun Gao 2019-06-17 117
157e72e831cb8f3 Likun Gao 2019-06-17 118 DRM_DEBUG("\n");
157e72e831cb8f3 Likun Gao 2019-06-17 119
157e72e831cb8f3 Likun Gao 2019-06-17 120 switch (adev->asic_type) {
157e72e831cb8f3 Likun Gao 2019-06-17 121 case CHIP_SIENNA_CICHLID:
157e72e831cb8f3 Likun Gao 2019-06-17 122 chip_name = "sienna_cichlid";
157e72e831cb8f3 Likun Gao 2019-06-17 123 break;
157e72e831cb8f3 Likun Gao 2019-06-17 124 default:
157e72e831cb8f3 Likun Gao 2019-06-17 125 BUG();
157e72e831cb8f3 Likun Gao 2019-06-17 126 }
157e72e831cb8f3 Likun Gao 2019-06-17 127
157e72e831cb8f3 Likun Gao 2019-06-17 128 for (i = 0; i < adev->sdma.num_instances; i++) {
157e72e831cb8f3 Likun Gao 2019-06-17 129 if (i == 0)
157e72e831cb8f3 Likun Gao 2019-06-17 @130 snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_sdma.bin", chip_name);
157e72e831cb8f3 Likun Gao 2019-06-17 131 else
157e72e831cb8f3 Likun Gao 2019-06-17 132 snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_sdma%d.bin", chip_name, i);
157e72e831cb8f3 Likun Gao 2019-06-17 133 err = request_firmware(&adev->sdma.instance[i].fw, fw_name, adev->dev);
157e72e831cb8f3 Likun Gao 2019-06-17 134 if (err)
157e72e831cb8f3 Likun Gao 2019-06-17 135 goto out;
157e72e831cb8f3 Likun Gao 2019-06-17 136 err = amdgpu_ucode_validate(adev->sdma.instance[i].fw);
157e72e831cb8f3 Likun Gao 2019-06-17 137 if (err)
157e72e831cb8f3 Likun Gao 2019-06-17 138 goto out;
157e72e831cb8f3 Likun Gao 2019-06-17 139 hdr = (const struct sdma_firmware_header_v1_0 *)adev->sdma.instance[i].fw->data;
157e72e831cb8f3 Likun Gao 2019-06-17 140 adev->sdma.instance[i].fw_version = le32_to_cpu(hdr->header.ucode_version);
157e72e831cb8f3 Likun Gao 2019-06-17 141 adev->sdma.instance[i].feature_version = le32_to_cpu(hdr->ucode_feature_version);
157e72e831cb8f3 Likun Gao 2019-06-17 142 if (adev->sdma.instance[i].feature_version >= 20)
157e72e831cb8f3 Likun Gao 2019-06-17 143 adev->sdma.instance[i].burst_nop = true;
157e72e831cb8f3 Likun Gao 2019-06-17 144 DRM_DEBUG("psp_load == '%s'\n",
157e72e831cb8f3 Likun Gao 2019-06-17 145 adev->firmware.load_type == AMDGPU_FW_LOAD_PSP ? "true" : "false");
157e72e831cb8f3 Likun Gao 2019-06-17 146
157e72e831cb8f3 Likun Gao 2019-06-17 147 if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
157e72e831cb8f3 Likun Gao 2019-06-17 148 info = &adev->firmware.ucode[AMDGPU_UCODE_ID_SDMA0 + i];
157e72e831cb8f3 Likun Gao 2019-06-17 149 info->ucode_id = AMDGPU_UCODE_ID_SDMA0 + i;
157e72e831cb8f3 Likun Gao 2019-06-17 150 info->fw = adev->sdma.instance[i].fw;
157e72e831cb8f3 Likun Gao 2019-06-17 151 header = (const struct common_firmware_header *)info->fw->data;
157e72e831cb8f3 Likun Gao 2019-06-17 152 adev->firmware.fw_size +=
157e72e831cb8f3 Likun Gao 2019-06-17 153 ALIGN(le32_to_cpu(header->ucode_size_bytes), PAGE_SIZE);
157e72e831cb8f3 Likun Gao 2019-06-17 154 }
157e72e831cb8f3 Likun Gao 2019-06-17 155 }
157e72e831cb8f3 Likun Gao 2019-06-17 156 out:
157e72e831cb8f3 Likun Gao 2019-06-17 157 if (err) {
157e72e831cb8f3 Likun Gao 2019-06-17 158 DRM_ERROR("sdma_v5_2: Failed to load firmware \"%s\"\n", fw_name);
157e72e831cb8f3 Likun Gao 2019-06-17 159 for (i = 0; i < adev->sdma.num_instances; i++) {
157e72e831cb8f3 Likun Gao 2019-06-17 160 release_firmware(adev->sdma.instance[i].fw);
157e72e831cb8f3 Likun Gao 2019-06-17 161 adev->sdma.instance[i].fw = NULL;
157e72e831cb8f3 Likun Gao 2019-06-17 162 }
157e72e831cb8f3 Likun Gao 2019-06-17 163 }
157e72e831cb8f3 Likun Gao 2019-06-17 164 return err;
157e72e831cb8f3 Likun Gao 2019-06-17 165 }
157e72e831cb8f3 Likun Gao 2019-06-17 166
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
Re: [PATCH 3/3] KVM: nSVM: more strict SMM checks when returning to nested guest
by kernel test robot
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20200827162720.278690-4-mlevitsk(a)redhat.com>
References: <20200827162720.278690-4-mlevitsk(a)redhat.com>
TO: Maxim Levitsky <mlevitsk(a)redhat.com>
TO: kvm(a)vger.kernel.org
CC: Borislav Petkov <bp(a)alien8.de>
CC: "(maintainer:X86 ARCHITECTURE AND <x86(a)kernel.org>
CC: Paolo Bonzini <pbonzini(a)redhat.com>
CC: linux-kernel(a)vger.kernel.org
CC: Joerg Roedel <joro(a)8bytes.org>
CC: "H. Peter Anvin" <hpa(a)zytor.com>
CC: Sean Christopherson <sean.j.christopherson(a)intel.com>
CC: Ingo Molnar <mingo(a)redhat.com>
CC: Vitaly Kuznetsov <vkuznets(a)redhat.com>
Hi Maxim,
I love your patch! Perhaps something to improve:
[auto build test WARNING on kvm/linux-next]
[also build test WARNING on v5.9-rc2 next-20200827]
[cannot apply to 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/Maxim-Levitsky/Few-nSVM-bugfixes...
base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git linux-next
:::::: branch date: 8 hours ago
:::::: commit date: 8 hours ago
config: x86_64-randconfig-m001-20200827 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
arch/x86/kvm/svm/svm.c:3915 svm_pre_leave_smm() warn: should this be a bitwise op?
# https://github.com/0day-ci/linux/commit/e2317f8eb1f0e9f731ddbe66ab175be19...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Maxim-Levitsky/Few-nSVM-bugfixes/20200828-003025
git checkout e2317f8eb1f0e9f731ddbe66ab175be19f3bdaf1
vim +3915 arch/x86/kvm/svm/svm.c
0234bf885236a41 arch/x86/kvm/svm.c Ladi Prosek 2017-10-11 3899
ed19321fb657121 arch/x86/kvm/svm.c Sean Christopherson 2019-04-02 3900 static int svm_pre_leave_smm(struct kvm_vcpu *vcpu, const char *smstate)
0234bf885236a41 arch/x86/kvm/svm.c Ladi Prosek 2017-10-11 3901 {
05cade71cf3b925 arch/x86/kvm/svm.c Ladi Prosek 2017-10-11 3902 struct vcpu_svm *svm = to_svm(vcpu);
8c5fbf1a7231078 arch/x86/kvm/svm.c KarimAllah Ahmed 2019-01-31 3903 struct kvm_host_map map;
59cd9bc5b03f0ba arch/x86/kvm/svm/svm.c Vitaly Kuznetsov 2020-07-10 3904 int ret = 0;
05cade71cf3b925 arch/x86/kvm/svm.c Ladi Prosek 2017-10-11 3905
e2317f8eb1f0e9f arch/x86/kvm/svm/svm.c Maxim Levitsky 2020-08-27 3906 if (guest_cpuid_has(vcpu, X86_FEATURE_LM)) {
e2317f8eb1f0e9f arch/x86/kvm/svm/svm.c Maxim Levitsky 2020-08-27 3907 u64 saved_efer = GET_SMSTATE(u64, smstate, 0x7ed0);
e2317f8eb1f0e9f arch/x86/kvm/svm/svm.c Maxim Levitsky 2020-08-27 3908 u64 guest = GET_SMSTATE(u64, smstate, 0x7ed8);
e2317f8eb1f0e9f arch/x86/kvm/svm/svm.c Maxim Levitsky 2020-08-27 3909 u64 vmcb = GET_SMSTATE(u64, smstate, 0x7ee0);
05cade71cf3b925 arch/x86/kvm/svm.c Ladi Prosek 2017-10-11 3910
ed19321fb657121 arch/x86/kvm/svm.c Sean Christopherson 2019-04-02 3911 if (guest) {
e2317f8eb1f0e9f arch/x86/kvm/svm/svm.c Maxim Levitsky 2020-08-27 3912 if (!guest_cpuid_has(vcpu, X86_FEATURE_SVM))
9ec19493fb86d6d arch/x86/kvm/svm.c Sean Christopherson 2019-04-02 3913 return 1;
e2317f8eb1f0e9f arch/x86/kvm/svm/svm.c Maxim Levitsky 2020-08-27 3914
e2317f8eb1f0e9f arch/x86/kvm/svm/svm.c Maxim Levitsky 2020-08-27 @3915 if (!(saved_efer && EFER_SVME))
e2317f8eb1f0e9f arch/x86/kvm/svm/svm.c Maxim Levitsky 2020-08-27 3916 return 1;
e2317f8eb1f0e9f arch/x86/kvm/svm/svm.c Maxim Levitsky 2020-08-27 3917
e2317f8eb1f0e9f arch/x86/kvm/svm/svm.c Maxim Levitsky 2020-08-27 3918 if (kvm_vcpu_map(&svm->vcpu,
e2317f8eb1f0e9f arch/x86/kvm/svm/svm.c Maxim Levitsky 2020-08-27 3919 gpa_to_gfn(vmcb), &map) == -EINVAL)
e2317f8eb1f0e9f arch/x86/kvm/svm/svm.c Maxim Levitsky 2020-08-27 3920 return 1;
e2317f8eb1f0e9f arch/x86/kvm/svm/svm.c Maxim Levitsky 2020-08-27 3921
e2317f8eb1f0e9f arch/x86/kvm/svm/svm.c Maxim Levitsky 2020-08-27 3922 ret = enter_svm_guest_mode(svm, vmcb, map.hva);
69c9dfa24bb7bac arch/x86/kvm/svm/svm.c Paolo Bonzini 2020-05-13 3923 kvm_vcpu_unmap(&svm->vcpu, &map, true);
05cade71cf3b925 arch/x86/kvm/svm.c Ladi Prosek 2017-10-11 3924 }
e2317f8eb1f0e9f arch/x86/kvm/svm/svm.c Maxim Levitsky 2020-08-27 3925 }
59cd9bc5b03f0ba arch/x86/kvm/svm/svm.c Vitaly Kuznetsov 2020-07-10 3926
59cd9bc5b03f0ba arch/x86/kvm/svm/svm.c Vitaly Kuznetsov 2020-07-10 3927 return ret;
0234bf885236a41 arch/x86/kvm/svm.c Ladi Prosek 2017-10-11 3928 }
0234bf885236a41 arch/x86/kvm/svm.c Ladi Prosek 2017-10-11 3929
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months