[linux-next:master 10806/11648] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:3015:53: warning: address of 'aconnector->mst_port->mst_mgr' will always evaluate to 'true'
by kernel test robot
Hi Mikita,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: e99d8a8495175df8cb8b739f8cf9b0fc9d0cd3b5
commit: 70cca14c2cb134fa578b45bbb7a133d39513cbad [10806/11648] drm/amd/display: Add MST capability to trigger_hotplug interface
config: powerpc-randconfig-r005-20210409 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project dd453a1389b6a7e6d9214b449d3c54981b1a89b6)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/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 70cca14c2cb134fa578b45bbb7a133d39513cbad
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
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/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:3015:53: warning: address of 'aconnector->mst_port->mst_mgr' will always evaluate to 'true' [-Wpointer-bool-conversion]
if (!(aconnector->port && &aconnector->mst_port->mst_mgr))
~~ ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
1 warning generated.
vim +3015 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c
2981
2982 /*
2983 * Sets trigger hpd for MST topologies.
2984 * All connected connectors will be rediscovered and re started as needed if val of 1 is sent.
2985 * All topologies will be disconnected if val of 0 is set .
2986 * Usage to enable topologies: echo 1 > /sys/kernel/debug/dri/0/amdgpu_dm_trigger_hpd_mst
2987 * Usage to disable topologies: echo 0 > /sys/kernel/debug/dri/0/amdgpu_dm_trigger_hpd_mst
2988 */
2989 static int trigger_hpd_mst_set(void *data, u64 val)
2990 {
2991 struct amdgpu_device *adev = data;
2992 struct drm_device *dev = adev_to_drm(adev);
2993 struct drm_connector_list_iter iter;
2994 struct amdgpu_dm_connector *aconnector;
2995 struct drm_connector *connector;
2996 struct dc_link *link = NULL;
2997
2998 if (val == 1) {
2999 drm_connector_list_iter_begin(dev, &iter);
3000 drm_for_each_connector_iter(connector, &iter) {
3001 aconnector = to_amdgpu_dm_connector(connector);
3002 if (aconnector->dc_link->type == dc_connection_mst_branch &&
3003 aconnector->mst_mgr.aux) {
3004 dc_link_detect(aconnector->dc_link, DETECT_REASON_HPD);
3005 drm_dp_mst_topology_mgr_set_mst(&aconnector->mst_mgr, true);
3006 }
3007 }
3008 } else if (val == 0) {
3009 drm_connector_list_iter_begin(dev, &iter);
3010 drm_for_each_connector_iter(connector, &iter) {
3011 aconnector = to_amdgpu_dm_connector(connector);
3012 if (!aconnector->dc_link)
3013 continue;
3014
> 3015 if (!(aconnector->port && &aconnector->mst_port->mst_mgr))
3016 continue;
3017
3018 link = aconnector->dc_link;
3019 dp_receiver_power_ctrl(link, false);
3020 drm_dp_mst_topology_mgr_set_mst(&aconnector->mst_port->mst_mgr, false);
3021 link->mst_stream_alloc_table.stream_count = 0;
3022 memset(link->mst_stream_alloc_table.stream_allocations, 0,
3023 sizeof(link->mst_stream_alloc_table.stream_allocations));
3024 }
3025 } else {
3026 return 0;
3027 }
3028 drm_kms_helper_hotplug_event(dev);
3029
3030 return 0;
3031 }
3032
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH v8 3/4] Adds blk_interposer to md.
by kernel test robot
Hi Sergei,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on block/for-next]
[also build test WARNING on hch-configfs/for-next v5.12-rc6]
[cannot apply to dm/for-next next-20210409]
[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/Sergei-Shtepa/block-device-inter...
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: i386-randconfig-m021-20210409 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/df79fb333cb0a1263a1f03f54de425507...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Sergei-Shtepa/block-device-interposer/20210409-194943
git checkout df79fb333cb0a1263a1f03f54de425507e3c2238
# save the attached .config to linux build tree
make W=1 ARCH=i386
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/md/dm.c:2682:5: warning: no previous prototype for '__dm_attach_interposer' [-Wmissing-prototypes]
2682 | int __dm_attach_interposer(struct mapped_device *md)
| ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/md/dm.c:2724:5: warning: no previous prototype for '__dm_detach_interposer' [-Wmissing-prototypes]
2724 | int __dm_detach_interposer(struct mapped_device *md)
| ^~~~~~~~~~~~~~~~~~~~~~
vim +/__dm_attach_interposer +2682 drivers/md/dm.c
2681
> 2682 int __dm_attach_interposer(struct mapped_device *md)
2683 {
2684 int r;
2685 struct dm_table *map;
2686 struct block_device *original_bdev = NULL;
2687
2688 if (dm_interposer_attached(md))
2689 return 0;
2690
2691 map = rcu_dereference_protected(md->map,
2692 lockdep_is_held(&md->suspend_lock));
2693 if (!map) {
2694 DMERR("%s: interposers table is not initialized",
2695 dm_device_name(md));
2696 return -EINVAL;
2697 }
2698
2699 original_bdev = get_interposed_bdev(map);
2700 if (!original_bdev) {
2701 DMERR("%s: interposer cannot get interposed device from table",
2702 dm_device_name(md));
2703 return -EINVAL;
2704 }
2705
2706 bdev_interposer_lock(original_bdev);
2707
2708 r = bdev_interposer_attach(original_bdev, dm_disk(md)->part0);
2709 if (r)
2710 DMERR("%s: failed to attach interposer",
2711 dm_device_name(md));
2712 else
2713 set_bit(DMF_INTERPOSER_ATTACHED, &md->flags);
2714
2715 bdev_interposer_unlock(original_bdev);
2716
2717 unlock_bdev_fs(md, original_bdev);
2718
2719 bdput(original_bdev);
2720
2721 return r;
2722 }
2723
> 2724 int __dm_detach_interposer(struct mapped_device *md)
2725 {
2726 struct dm_table *map = NULL;
2727 struct block_device *original_bdev;
2728
2729 if (!dm_interposer_attached(md))
2730 return 0;
2731 /*
2732 * If mapped device is suspended, but should be detached
2733 * we just detach without freeze fs on interposed device.
2734 */
2735 map = rcu_dereference_protected(md->map,
2736 lockdep_is_held(&md->suspend_lock));
2737 if (!map) {
2738 /*
2739 * If table is not initialized then interposed device
2740 * cannot be attached
2741 */
2742 DMERR("%s: table is not initialized for device",
2743 dm_device_name(md));
2744 return -EINVAL;
2745 }
2746
2747 original_bdev = get_interposed_bdev(map);
2748 if (!original_bdev) {
2749 DMERR("%s: interposer cannot get interposed device from table",
2750 dm_device_name(md));
2751 return -EINVAL;
2752 }
2753
2754 bdev_interposer_lock(original_bdev);
2755
2756 bdev_interposer_detach(original_bdev);
2757 clear_bit(DMF_INTERPOSER_ATTACHED, &md->flags);
2758
2759 bdev_interposer_unlock(original_bdev);
2760
2761 bdput(original_bdev);
2762 return 0;
2763 }
2764 /*
2765 * We need to be able to change a mapping table under a mounted
2766 * filesystem. For example we might want to move some data in
2767 * the background. Before the table can be swapped with
2768 * dm_bind_table, dm_suspend must be called to flush any in
2769 * flight bios and ensure that any further io gets deferred.
2770 */
2771 /*
2772 * Suspend mechanism in request-based dm.
2773 *
2774 * 1. Flush all I/Os by lock_fs() if needed.
2775 * 2. Stop dispatching any I/O by stopping the request_queue.
2776 * 3. Wait for all in-flight I/Os to be completed or requeued.
2777 *
2778 * To abort suspend, start the request_queue.
2779 */
2780 int dm_suspend(struct mapped_device *md, unsigned suspend_flags)
2781 {
2782 struct dm_table *map = NULL;
2783 int r = 0;
2784
2785 retry:
2786 mutex_lock_nested(&md->suspend_lock, SINGLE_DEPTH_NESTING);
2787
2788 if (dm_suspended_md(md)) {
2789 if (suspend_flags & DM_SUSPEND_DETACH_IP_FLAG)
2790 r = __dm_detach_interposer(md);
2791 else
2792 r = -EINVAL;
2793
2794 goto out_unlock;
2795 }
2796
2797 if (dm_suspended_internally_md(md)) {
2798 /* already internally suspended, wait for internal resume */
2799 mutex_unlock(&md->suspend_lock);
2800 r = wait_on_bit(&md->flags, DMF_SUSPENDED_INTERNALLY, TASK_INTERRUPTIBLE);
2801 if (r)
2802 return r;
2803 goto retry;
2804 }
2805
2806 map = rcu_dereference_protected(md->map, lockdep_is_held(&md->suspend_lock));
2807
2808 r = __dm_suspend(md, map, suspend_flags, TASK_INTERRUPTIBLE, DMF_SUSPENDED);
2809 if (r)
2810 goto out_unlock;
2811
2812 set_bit(DMF_POST_SUSPENDING, &md->flags);
2813 dm_table_postsuspend_targets(map);
2814 clear_bit(DMF_POST_SUSPENDING, &md->flags);
2815
2816 out_unlock:
2817 mutex_unlock(&md->suspend_lock);
2818 return r;
2819 }
2820
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH v6 08/10] coresight: config: Add preloaded configurations
by kernel test robot
Hi Mike,
I love your patch! Yet something to improve:
[auto build test ERROR on next-20210408]
[also build test ERROR on v5.12-rc6]
[cannot apply to soc/for-next lwn/docs-next linus/master v5.12-rc6 v5.12-rc5 v5.12-rc4]
[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/Mike-Leach/CoreSight-configurati...
base: 6145d80cfc62e3ed8f16ff584d6287e6d88b82b9
config: arm-randconfig-s032-20210409 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-279-g6d5d9b42-dirty
# https://github.com/0day-ci/linux/commit/e97fc23237355b8b816f4e4864206f91a...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Mike-Leach/CoreSight-configuration-management-ETM-strobing/20210409-183900
git checkout e97fc23237355b8b816f4e4864206f91a41652cc
# 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=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/hwtracing/coresight/coresight-etm4x-cfg.h:10,
from drivers/hwtracing/coresight/coresight-cfg-afdo.c:8:
>> drivers/hwtracing/coresight/coresight-etm4x.h:143:10: fatal error: asm/sysreg.h: No such file or directory
143 | #include <asm/sysreg.h>
| ^~~~~~~~~~~~~~
compilation terminated.
sparse warnings: (new ones prefixed by >>)
>> drivers/hwtracing/coresight/coresight-cfg-preload.c:15:9: sparse: sparse: Using plain integer as NULL pointer
drivers/hwtracing/coresight/coresight-cfg-preload.c:20:9: sparse: sparse: Using plain integer as NULL pointer
vim +143 drivers/hwtracing/coresight/coresight-etm4x.h
03336d0f4d0d74 Suzuki K Poulose 2021-02-01 142
03336d0f4d0d74 Suzuki K Poulose 2021-02-01 @143 #include <asm/sysreg.h>
03336d0f4d0d74 Suzuki K Poulose 2021-02-01 144 #define ETM4x_REG_NUM_TO_SYSREG(n) \
03336d0f4d0d74 Suzuki K Poulose 2021-02-01 145 sys_reg(2, 1, ETM4x_CRn(n), ETM4x_CRm(n), ETM4x_Op2(n))
03336d0f4d0d74 Suzuki K Poulose 2021-02-01 146
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH v8 3/4] Adds blk_interposer to md.
by kernel test robot
Hi Sergei,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on block/for-next]
[also build test WARNING on hch-configfs/for-next v5.12-rc6]
[cannot apply to dm/for-next next-20210409]
[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/Sergei-Shtepa/block-device-inter...
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: arm-randconfig-r025-20210409 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project dd453a1389b6a7e6d9214b449d3c54981b1a89b6)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/0day-ci/linux/commit/df79fb333cb0a1263a1f03f54de425507...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Sergei-Shtepa/block-device-interposer/20210409-194943
git checkout df79fb333cb0a1263a1f03f54de425507e3c2238
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
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/md/dm.c:2682:5: warning: no previous prototype for function '__dm_attach_interposer' [-Wmissing-prototypes]
int __dm_attach_interposer(struct mapped_device *md)
^
drivers/md/dm.c:2682:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __dm_attach_interposer(struct mapped_device *md)
^
static
>> drivers/md/dm.c:2724:5: warning: no previous prototype for function '__dm_detach_interposer' [-Wmissing-prototypes]
int __dm_detach_interposer(struct mapped_device *md)
^
drivers/md/dm.c:2724:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __dm_detach_interposer(struct mapped_device *md)
^
static
2 warnings generated.
vim +/__dm_attach_interposer +2682 drivers/md/dm.c
2681
> 2682 int __dm_attach_interposer(struct mapped_device *md)
2683 {
2684 int r;
2685 struct dm_table *map;
2686 struct block_device *original_bdev = NULL;
2687
2688 if (dm_interposer_attached(md))
2689 return 0;
2690
2691 map = rcu_dereference_protected(md->map,
2692 lockdep_is_held(&md->suspend_lock));
2693 if (!map) {
2694 DMERR("%s: interposers table is not initialized",
2695 dm_device_name(md));
2696 return -EINVAL;
2697 }
2698
2699 original_bdev = get_interposed_bdev(map);
2700 if (!original_bdev) {
2701 DMERR("%s: interposer cannot get interposed device from table",
2702 dm_device_name(md));
2703 return -EINVAL;
2704 }
2705
2706 bdev_interposer_lock(original_bdev);
2707
2708 r = bdev_interposer_attach(original_bdev, dm_disk(md)->part0);
2709 if (r)
2710 DMERR("%s: failed to attach interposer",
2711 dm_device_name(md));
2712 else
2713 set_bit(DMF_INTERPOSER_ATTACHED, &md->flags);
2714
2715 bdev_interposer_unlock(original_bdev);
2716
2717 unlock_bdev_fs(md, original_bdev);
2718
2719 bdput(original_bdev);
2720
2721 return r;
2722 }
2723
> 2724 int __dm_detach_interposer(struct mapped_device *md)
2725 {
2726 struct dm_table *map = NULL;
2727 struct block_device *original_bdev;
2728
2729 if (!dm_interposer_attached(md))
2730 return 0;
2731 /*
2732 * If mapped device is suspended, but should be detached
2733 * we just detach without freeze fs on interposed device.
2734 */
2735 map = rcu_dereference_protected(md->map,
2736 lockdep_is_held(&md->suspend_lock));
2737 if (!map) {
2738 /*
2739 * If table is not initialized then interposed device
2740 * cannot be attached
2741 */
2742 DMERR("%s: table is not initialized for device",
2743 dm_device_name(md));
2744 return -EINVAL;
2745 }
2746
2747 original_bdev = get_interposed_bdev(map);
2748 if (!original_bdev) {
2749 DMERR("%s: interposer cannot get interposed device from table",
2750 dm_device_name(md));
2751 return -EINVAL;
2752 }
2753
2754 bdev_interposer_lock(original_bdev);
2755
2756 bdev_interposer_detach(original_bdev);
2757 clear_bit(DMF_INTERPOSER_ATTACHED, &md->flags);
2758
2759 bdev_interposer_unlock(original_bdev);
2760
2761 bdput(original_bdev);
2762 return 0;
2763 }
2764 /*
2765 * We need to be able to change a mapping table under a mounted
2766 * filesystem. For example we might want to move some data in
2767 * the background. Before the table can be swapped with
2768 * dm_bind_table, dm_suspend must be called to flush any in
2769 * flight bios and ensure that any further io gets deferred.
2770 */
2771 /*
2772 * Suspend mechanism in request-based dm.
2773 *
2774 * 1. Flush all I/Os by lock_fs() if needed.
2775 * 2. Stop dispatching any I/O by stopping the request_queue.
2776 * 3. Wait for all in-flight I/Os to be completed or requeued.
2777 *
2778 * To abort suspend, start the request_queue.
2779 */
2780 int dm_suspend(struct mapped_device *md, unsigned suspend_flags)
2781 {
2782 struct dm_table *map = NULL;
2783 int r = 0;
2784
2785 retry:
2786 mutex_lock_nested(&md->suspend_lock, SINGLE_DEPTH_NESTING);
2787
2788 if (dm_suspended_md(md)) {
2789 if (suspend_flags & DM_SUSPEND_DETACH_IP_FLAG)
2790 r = __dm_detach_interposer(md);
2791 else
2792 r = -EINVAL;
2793
2794 goto out_unlock;
2795 }
2796
2797 if (dm_suspended_internally_md(md)) {
2798 /* already internally suspended, wait for internal resume */
2799 mutex_unlock(&md->suspend_lock);
2800 r = wait_on_bit(&md->flags, DMF_SUSPENDED_INTERNALLY, TASK_INTERRUPTIBLE);
2801 if (r)
2802 return r;
2803 goto retry;
2804 }
2805
2806 map = rcu_dereference_protected(md->map, lockdep_is_held(&md->suspend_lock));
2807
2808 r = __dm_suspend(md, map, suspend_flags, TASK_INTERRUPTIBLE, DMF_SUSPENDED);
2809 if (r)
2810 goto out_unlock;
2811
2812 set_bit(DMF_POST_SUSPENDING, &md->flags);
2813 dm_table_postsuspend_targets(map);
2814 clear_bit(DMF_POST_SUSPENDING, &md->flags);
2815
2816 out_unlock:
2817 mutex_unlock(&md->suspend_lock);
2818 return r;
2819 }
2820
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[tip:sched/core 2/5] kernel/sched/fair.c:6345:28: error: 'sched_smt_present' undeclared
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched/core
head: 816969e4af7a56bfd284d2e0fa11511900ab93e3
commit: 6bcd3e21ba278098920d26d4888f5e6f4087c61d [2/5] sched/fair: Bring back select_idle_smt(), but differently
config: ia64-randconfig-r034-20210409 (attached as .config)
compiler: ia64-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
# https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=6b...
git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
git fetch --no-tags tip sched/core
git checkout 6bcd3e21ba278098920d26d4888f5e6f4087c61d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/ia64/include/asm/pgtable.h:154,
from include/linux/pgtable.h:6,
from arch/ia64/include/asm/uaccess.h:40,
from include/linux/uaccess.h:11,
from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:9,
from include/linux/sched/cputime.h:5,
from kernel/sched/sched.h:11,
from kernel/sched/fair.c:23:
arch/ia64/include/asm/mmu_context.h: In function 'reload_context':
arch/ia64/include/asm/mmu_context.h:127:41: warning: variable 'old_rr4' set but not used [-Wunused-but-set-variable]
127 | unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
| ^~~~~~~
kernel/sched/fair.c: At top level:
kernel/sched/fair.c:5393:6: warning: no previous prototype for 'init_cfs_bandwidth' [-Wmissing-prototypes]
5393 | void init_cfs_bandwidth(struct cfs_bandwidth *cfs_b) {}
| ^~~~~~~~~~~~~~~~~~
In file included from arch/ia64/include/uapi/asm/gcc_intrin.h:11,
from arch/ia64/include/asm/gcc_intrin.h:10,
from arch/ia64/include/uapi/asm/intrinsics.h:20,
from arch/ia64/include/asm/intrinsics.h:11,
from arch/ia64/include/asm/current.h:10,
from include/linux/sched.h:12,
from kernel/sched/sched.h:5,
from kernel/sched/fair.c:23:
kernel/sched/fair.c: In function 'select_idle_sibling':
>> kernel/sched/fair.c:6345:28: error: 'sched_smt_present' undeclared (first use in this function)
6345 | if (static_branch_likely(&sched_smt_present)) {
| ^~~~~~~~~~~~~~~~~
include/linux/compiler.h:77:40: note: in definition of macro 'likely'
77 | # define likely(x) __builtin_expect(!!(x), 1)
| ^
include/linux/jump_label.h:480:34: note: in expansion of macro 'likely_notrace'
480 | #define static_branch_likely(x) likely_notrace(static_key_enabled(&(x)->key))
| ^~~~~~~~~~~~~~
include/linux/jump_label.h:480:49: note: in expansion of macro 'static_key_enabled'
480 | #define static_branch_likely(x) likely_notrace(static_key_enabled(&(x)->key))
| ^~~~~~~~~~~~~~~~~~
kernel/sched/fair.c:6345:6: note: in expansion of macro 'static_branch_likely'
6345 | if (static_branch_likely(&sched_smt_present)) {
| ^~~~~~~~~~~~~~~~~~~~
kernel/sched/fair.c:6345:28: note: each undeclared identifier is reported only once for each function it appears in
6345 | if (static_branch_likely(&sched_smt_present)) {
| ^~~~~~~~~~~~~~~~~
include/linux/compiler.h:77:40: note: in definition of macro 'likely'
77 | # define likely(x) __builtin_expect(!!(x), 1)
| ^
include/linux/jump_label.h:480:34: note: in expansion of macro 'likely_notrace'
480 | #define static_branch_likely(x) likely_notrace(static_key_enabled(&(x)->key))
| ^~~~~~~~~~~~~~
include/linux/jump_label.h:480:49: note: in expansion of macro 'static_key_enabled'
480 | #define static_branch_likely(x) likely_notrace(static_key_enabled(&(x)->key))
| ^~~~~~~~~~~~~~~~~~
kernel/sched/fair.c:6345:6: note: in expansion of macro 'static_branch_likely'
6345 | if (static_branch_likely(&sched_smt_present)) {
| ^~~~~~~~~~~~~~~~~~~~
kernel/sched/fair.c: At top level:
kernel/sched/fair.c:11232:6: warning: no previous prototype for 'free_fair_sched_group' [-Wmissing-prototypes]
11232 | void free_fair_sched_group(struct task_group *tg) { }
| ^~~~~~~~~~~~~~~~~~~~~
kernel/sched/fair.c:11234:5: warning: no previous prototype for 'alloc_fair_sched_group' [-Wmissing-prototypes]
11234 | int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent)
| ^~~~~~~~~~~~~~~~~~~~~~
kernel/sched/fair.c:11239:6: warning: no previous prototype for 'online_fair_sched_group' [-Wmissing-prototypes]
11239 | void online_fair_sched_group(struct task_group *tg) { }
| ^~~~~~~~~~~~~~~~~~~~~~~
kernel/sched/fair.c:11241:6: warning: no previous prototype for 'unregister_fair_sched_group' [-Wmissing-prototypes]
11241 | void unregister_fair_sched_group(struct task_group *tg) { }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/sched/fair.c:8429:13: warning: 'update_nohz_stats' defined but not used [-Wunused-function]
8429 | static bool update_nohz_stats(struct rq *rq)
| ^~~~~~~~~~~~~~~~~
vim +/sched_smt_present +6345 kernel/sched/fair.c
6259
6260 /*
6261 * Try and locate an idle core/thread in the LLC cache domain.
6262 */
6263 static int select_idle_sibling(struct task_struct *p, int prev, int target)
6264 {
6265 bool has_idle_core = false;
6266 struct sched_domain *sd;
6267 unsigned long task_util;
6268 int i, recent_used_cpu;
6269
6270 /*
6271 * On asymmetric system, update task utilization because we will check
6272 * that the task fits with cpu's capacity.
6273 */
6274 if (static_branch_unlikely(&sched_asym_cpucapacity)) {
6275 sync_entity_load_avg(&p->se);
6276 task_util = uclamp_task_util(p);
6277 }
6278
6279 if ((available_idle_cpu(target) || sched_idle_cpu(target)) &&
6280 asym_fits_capacity(task_util, target))
6281 return target;
6282
6283 /*
6284 * If the previous CPU is cache affine and idle, don't be stupid:
6285 */
6286 if (prev != target && cpus_share_cache(prev, target) &&
6287 (available_idle_cpu(prev) || sched_idle_cpu(prev)) &&
6288 asym_fits_capacity(task_util, prev))
6289 return prev;
6290
6291 /*
6292 * Allow a per-cpu kthread to stack with the wakee if the
6293 * kworker thread and the tasks previous CPUs are the same.
6294 * The assumption is that the wakee queued work for the
6295 * per-cpu kthread that is now complete and the wakeup is
6296 * essentially a sync wakeup. An obvious example of this
6297 * pattern is IO completions.
6298 */
6299 if (is_per_cpu_kthread(current) &&
6300 prev == smp_processor_id() &&
6301 this_rq()->nr_running <= 1) {
6302 return prev;
6303 }
6304
6305 /* Check a recently used CPU as a potential idle candidate: */
6306 recent_used_cpu = p->recent_used_cpu;
6307 if (recent_used_cpu != prev &&
6308 recent_used_cpu != target &&
6309 cpus_share_cache(recent_used_cpu, target) &&
6310 (available_idle_cpu(recent_used_cpu) || sched_idle_cpu(recent_used_cpu)) &&
6311 cpumask_test_cpu(p->recent_used_cpu, p->cpus_ptr) &&
6312 asym_fits_capacity(task_util, recent_used_cpu)) {
6313 /*
6314 * Replace recent_used_cpu with prev as it is a potential
6315 * candidate for the next wake:
6316 */
6317 p->recent_used_cpu = prev;
6318 return recent_used_cpu;
6319 }
6320
6321 /*
6322 * For asymmetric CPU capacity systems, our domain of interest is
6323 * sd_asym_cpucapacity rather than sd_llc.
6324 */
6325 if (static_branch_unlikely(&sched_asym_cpucapacity)) {
6326 sd = rcu_dereference(per_cpu(sd_asym_cpucapacity, target));
6327 /*
6328 * On an asymmetric CPU capacity system where an exclusive
6329 * cpuset defines a symmetric island (i.e. one unique
6330 * capacity_orig value through the cpuset), the key will be set
6331 * but the CPUs within that cpuset will not have a domain with
6332 * SD_ASYM_CPUCAPACITY. These should follow the usual symmetric
6333 * capacity path.
6334 */
6335 if (sd) {
6336 i = select_idle_capacity(p, sd, target);
6337 return ((unsigned)i < nr_cpumask_bits) ? i : target;
6338 }
6339 }
6340
6341 sd = rcu_dereference(per_cpu(sd_llc, target));
6342 if (!sd)
6343 return target;
6344
> 6345 if (static_branch_likely(&sched_smt_present)) {
6346 has_idle_core = test_idle_cores(target, false);
6347
6348 if (!has_idle_core && cpus_share_cache(prev, target)) {
6349 i = select_idle_smt(p, sd, prev);
6350 if ((unsigned int)i < nr_cpumask_bits)
6351 return i;
6352 }
6353 }
6354
6355 i = select_idle_cpu(p, sd, has_idle_core, target);
6356 if ((unsigned)i < nr_cpumask_bits)
6357 return i;
6358
6359 return target;
6360 }
6361
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[tip:sched/core 2/5] kernel/sched/fair.c:6345:28: error: use of undeclared identifier 'sched_smt_present'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched/core
head: 816969e4af7a56bfd284d2e0fa11511900ab93e3
commit: 6bcd3e21ba278098920d26d4888f5e6f4087c61d [2/5] sched/fair: Bring back select_idle_smt(), but differently
config: powerpc64-randconfig-r033-20210409 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project dd453a1389b6a7e6d9214b449d3c54981b1a89b6)
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 powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=6b...
git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
git fetch --no-tags tip sched/core
git checkout 6bcd3e21ba278098920d26d4888f5e6f4087c61d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
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 >>):
>> kernel/sched/fair.c:6345:28: error: use of undeclared identifier 'sched_smt_present'
if (static_branch_likely(&sched_smt_present)) {
^
>> kernel/sched/fair.c:6345:28: error: use of undeclared identifier 'sched_smt_present'
>> kernel/sched/fair.c:6345:28: error: use of undeclared identifier 'sched_smt_present'
>> kernel/sched/fair.c:6345:28: error: use of undeclared identifier 'sched_smt_present'
4 errors generated.
vim +/sched_smt_present +6345 kernel/sched/fair.c
6259
6260 /*
6261 * Try and locate an idle core/thread in the LLC cache domain.
6262 */
6263 static int select_idle_sibling(struct task_struct *p, int prev, int target)
6264 {
6265 bool has_idle_core = false;
6266 struct sched_domain *sd;
6267 unsigned long task_util;
6268 int i, recent_used_cpu;
6269
6270 /*
6271 * On asymmetric system, update task utilization because we will check
6272 * that the task fits with cpu's capacity.
6273 */
6274 if (static_branch_unlikely(&sched_asym_cpucapacity)) {
6275 sync_entity_load_avg(&p->se);
6276 task_util = uclamp_task_util(p);
6277 }
6278
6279 if ((available_idle_cpu(target) || sched_idle_cpu(target)) &&
6280 asym_fits_capacity(task_util, target))
6281 return target;
6282
6283 /*
6284 * If the previous CPU is cache affine and idle, don't be stupid:
6285 */
6286 if (prev != target && cpus_share_cache(prev, target) &&
6287 (available_idle_cpu(prev) || sched_idle_cpu(prev)) &&
6288 asym_fits_capacity(task_util, prev))
6289 return prev;
6290
6291 /*
6292 * Allow a per-cpu kthread to stack with the wakee if the
6293 * kworker thread and the tasks previous CPUs are the same.
6294 * The assumption is that the wakee queued work for the
6295 * per-cpu kthread that is now complete and the wakeup is
6296 * essentially a sync wakeup. An obvious example of this
6297 * pattern is IO completions.
6298 */
6299 if (is_per_cpu_kthread(current) &&
6300 prev == smp_processor_id() &&
6301 this_rq()->nr_running <= 1) {
6302 return prev;
6303 }
6304
6305 /* Check a recently used CPU as a potential idle candidate: */
6306 recent_used_cpu = p->recent_used_cpu;
6307 if (recent_used_cpu != prev &&
6308 recent_used_cpu != target &&
6309 cpus_share_cache(recent_used_cpu, target) &&
6310 (available_idle_cpu(recent_used_cpu) || sched_idle_cpu(recent_used_cpu)) &&
6311 cpumask_test_cpu(p->recent_used_cpu, p->cpus_ptr) &&
6312 asym_fits_capacity(task_util, recent_used_cpu)) {
6313 /*
6314 * Replace recent_used_cpu with prev as it is a potential
6315 * candidate for the next wake:
6316 */
6317 p->recent_used_cpu = prev;
6318 return recent_used_cpu;
6319 }
6320
6321 /*
6322 * For asymmetric CPU capacity systems, our domain of interest is
6323 * sd_asym_cpucapacity rather than sd_llc.
6324 */
6325 if (static_branch_unlikely(&sched_asym_cpucapacity)) {
6326 sd = rcu_dereference(per_cpu(sd_asym_cpucapacity, target));
6327 /*
6328 * On an asymmetric CPU capacity system where an exclusive
6329 * cpuset defines a symmetric island (i.e. one unique
6330 * capacity_orig value through the cpuset), the key will be set
6331 * but the CPUs within that cpuset will not have a domain with
6332 * SD_ASYM_CPUCAPACITY. These should follow the usual symmetric
6333 * capacity path.
6334 */
6335 if (sd) {
6336 i = select_idle_capacity(p, sd, target);
6337 return ((unsigned)i < nr_cpumask_bits) ? i : target;
6338 }
6339 }
6340
6341 sd = rcu_dereference(per_cpu(sd_llc, target));
6342 if (!sd)
6343 return target;
6344
> 6345 if (static_branch_likely(&sched_smt_present)) {
6346 has_idle_core = test_idle_cores(target, false);
6347
6348 if (!has_idle_core && cpus_share_cache(prev, target)) {
6349 i = select_idle_smt(p, sd, prev);
6350 if ((unsigned int)i < nr_cpumask_bits)
6351 return i;
6352 }
6353 }
6354
6355 i = select_idle_cpu(p, sd, has_idle_core, target);
6356 if ((unsigned)i < nr_cpumask_bits)
6357 return i;
6358
6359 return target;
6360 }
6361
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH 07/15] wireless: align HE capabilities A-MPDU Length Exponent Extension
by kernel test robot
Hi Luca,
I love your patch! Yet something to improve:
[auto build test ERROR on mac80211-next/master]
[also build test ERROR on mac80211/master wireless-drivers-next/master wireless-drivers/master v5.12-rc6 next-20210408]
[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/Luca-Coelho/cfg80211-mac80211-pa...
base: https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
config: m68k-allmodconfig (attached as .config)
compiler: m68k-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
# https://github.com/0day-ci/linux/commit/14d0d9bb385498f53ad9d73ebac33c6ef...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Luca-Coelho/cfg80211-mac80211-patches-from-our-internal-tree-2021-04-09/20210409-181210
git checkout 14d0d9bb385498f53ad9d73ebac33c6ef919be7c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
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/net/wireless/ath/ath11k/mac.c: In function 'ath11k_peer_assoc_h_he':
>> drivers/net/wireless/ath/ath11k/mac.c:1270:4: error: 'IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_SHIFT' undeclared (first use in this function); did you mean 'IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3'?
1270 | IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_SHIFT;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3
drivers/net/wireless/ath/ath11k/mac.c:1270:4: note: each undeclared identifier is reported only once for each function it appears in
drivers/net/wireless/ath/ath11k/mac.c: In function 'ath11k_mac_filter_he_cap_mesh':
drivers/net/wireless/ath/ath11k/mac.c:3810:6: error: 'IEEE80211_HE_MAC_CAP5_SUBCHAN_SELECVITE_TRANSMISSION' undeclared (first use in this function); did you mean 'IEEE80211_HE_MAC_CAP5_SUBCHAN_SELECTIVE_TRANSMISSION'?
3810 | m = IEEE80211_HE_MAC_CAP5_SUBCHAN_SELECVITE_TRANSMISSION |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| IEEE80211_HE_MAC_CAP5_SUBCHAN_SELECTIVE_TRANSMISSION
drivers/net/wireless/ath/ath11k/mac.c:3820:6: error: 'IEEE80211_HE_PHY_CAP3_RX_HE_MU_PPDU_FROM_NON_AP_STA' undeclared (first use in this function)
3820 | m = IEEE80211_HE_PHY_CAP3_RX_HE_MU_PPDU_FROM_NON_AP_STA |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/ath11k/mac.c:3832:6: error: 'IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMER_FB' undeclared (first use in this function); did you mean 'IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMING_FB'?
3832 | IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMER_FB |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMING_FB
drivers/net/wireless/ath/ath11k/mac.c:3837:6: error: 'IEEE80211_HE_PHY_CAP7_SRP_BASED_SR' undeclared (first use in this function); did you mean 'IEEE80211_HE_PHY_CAP7_PSR_BASED_SR'?
3837 | m = IEEE80211_HE_PHY_CAP7_SRP_BASED_SR |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| IEEE80211_HE_PHY_CAP7_PSR_BASED_SR
drivers/net/wireless/ath/ath11k/mac.c:3838:6: error: 'IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_AR' undeclared (first use in this function); did you mean 'IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_SUPP'?
3838 | IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_AR |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_SUPP
vim +1270 drivers/net/wireless/ath/ath11k/mac.c
d5c65159f28953 Kalle Valo 2019-11-23 1233
d5c65159f28953 Kalle Valo 2019-11-23 1234 static void ath11k_peer_assoc_h_he(struct ath11k *ar,
d5c65159f28953 Kalle Valo 2019-11-23 1235 struct ieee80211_vif *vif,
d5c65159f28953 Kalle Valo 2019-11-23 1236 struct ieee80211_sta *sta,
d5c65159f28953 Kalle Valo 2019-11-23 1237 struct peer_assoc_params *arg)
d5c65159f28953 Kalle Valo 2019-11-23 1238 {
9f056ed8ee01ad John Crispin 2019-11-25 1239 const struct ieee80211_sta_he_cap *he_cap = &sta->he_cap;
af6d39db1b046a Tamizh Chelvam 2020-09-08 1240 u8 ampdu_factor;
9f056ed8ee01ad John Crispin 2019-11-25 1241 u16 v;
9f056ed8ee01ad John Crispin 2019-11-25 1242
9f056ed8ee01ad John Crispin 2019-11-25 1243 if (!he_cap->has_he)
9f056ed8ee01ad John Crispin 2019-11-25 1244 return;
9f056ed8ee01ad John Crispin 2019-11-25 1245
9f056ed8ee01ad John Crispin 2019-11-25 1246 arg->he_flag = true;
9f056ed8ee01ad John Crispin 2019-11-25 1247
9f056ed8ee01ad John Crispin 2019-11-25 1248 memcpy(&arg->peer_he_cap_macinfo, he_cap->he_cap_elem.mac_cap_info,
9f056ed8ee01ad John Crispin 2019-11-25 1249 sizeof(arg->peer_he_cap_macinfo));
9f056ed8ee01ad John Crispin 2019-11-25 1250 memcpy(&arg->peer_he_cap_phyinfo, he_cap->he_cap_elem.phy_cap_info,
9f056ed8ee01ad John Crispin 2019-11-25 1251 sizeof(arg->peer_he_cap_phyinfo));
60689de46c7f6a Rajkumar Manoharan 2020-04-24 1252 arg->peer_he_ops = vif->bss_conf.he_oper.params;
9f056ed8ee01ad John Crispin 2019-11-25 1253
9f056ed8ee01ad John Crispin 2019-11-25 1254 /* the top most byte is used to indicate BSS color info */
9f056ed8ee01ad John Crispin 2019-11-25 1255 arg->peer_he_ops &= 0xffffff;
9f056ed8ee01ad John Crispin 2019-11-25 1256
af6d39db1b046a Tamizh Chelvam 2020-09-08 1257 /* As per section 26.6.1 11ax Draft5.0, if the Max AMPDU Exponent Extension
af6d39db1b046a Tamizh Chelvam 2020-09-08 1258 * in HE cap is zero, use the arg->peer_max_mpdu as calculated while parsing
af6d39db1b046a Tamizh Chelvam 2020-09-08 1259 * VHT caps(if VHT caps is present) or HT caps (if VHT caps is not present).
af6d39db1b046a Tamizh Chelvam 2020-09-08 1260 *
af6d39db1b046a Tamizh Chelvam 2020-09-08 1261 * For non-zero value of Max AMPDU Extponent Extension in HE MAC caps,
af6d39db1b046a Tamizh Chelvam 2020-09-08 1262 * if a HE STA sends VHT cap and HE cap IE in assoc request then, use
af6d39db1b046a Tamizh Chelvam 2020-09-08 1263 * MAX_AMPDU_LEN_FACTOR as 20 to calculate max_ampdu length.
af6d39db1b046a Tamizh Chelvam 2020-09-08 1264 * If a HE STA that does not send VHT cap, but HE and HT cap in assoc
af6d39db1b046a Tamizh Chelvam 2020-09-08 1265 * request, then use MAX_AMPDU_LEN_FACTOR as 16 to calculate max_ampdu
af6d39db1b046a Tamizh Chelvam 2020-09-08 1266 * length.
af6d39db1b046a Tamizh Chelvam 2020-09-08 1267 */
af6d39db1b046a Tamizh Chelvam 2020-09-08 1268 ampdu_factor = (he_cap->he_cap_elem.mac_cap_info[3] &
af6d39db1b046a Tamizh Chelvam 2020-09-08 1269 IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK) >>
af6d39db1b046a Tamizh Chelvam 2020-09-08 @1270 IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_SHIFT;
af6d39db1b046a Tamizh Chelvam 2020-09-08 1271
af6d39db1b046a Tamizh Chelvam 2020-09-08 1272 if (ampdu_factor) {
af6d39db1b046a Tamizh Chelvam 2020-09-08 1273 if (sta->vht_cap.vht_supported)
af6d39db1b046a Tamizh Chelvam 2020-09-08 1274 arg->peer_max_mpdu = (1 << (IEEE80211_HE_VHT_MAX_AMPDU_FACTOR +
af6d39db1b046a Tamizh Chelvam 2020-09-08 1275 ampdu_factor)) - 1;
af6d39db1b046a Tamizh Chelvam 2020-09-08 1276 else if (sta->ht_cap.ht_supported)
af6d39db1b046a Tamizh Chelvam 2020-09-08 1277 arg->peer_max_mpdu = (1 << (IEEE80211_HE_HT_MAX_AMPDU_FACTOR +
af6d39db1b046a Tamizh Chelvam 2020-09-08 1278 ampdu_factor)) - 1;
af6d39db1b046a Tamizh Chelvam 2020-09-08 1279 }
af6d39db1b046a Tamizh Chelvam 2020-09-08 1280
9f056ed8ee01ad John Crispin 2019-11-25 1281 if (he_cap->he_cap_elem.phy_cap_info[6] &
9f056ed8ee01ad John Crispin 2019-11-25 1282 IEEE80211_HE_PHY_CAP6_PPE_THRESHOLD_PRESENT) {
9f056ed8ee01ad John Crispin 2019-11-25 1283 int bit = 7;
9f056ed8ee01ad John Crispin 2019-11-25 1284 int nss, ru;
9f056ed8ee01ad John Crispin 2019-11-25 1285
9f056ed8ee01ad John Crispin 2019-11-25 1286 arg->peer_ppet.numss_m1 = he_cap->ppe_thres[0] &
9f056ed8ee01ad John Crispin 2019-11-25 1287 IEEE80211_PPE_THRES_NSS_MASK;
9f056ed8ee01ad John Crispin 2019-11-25 1288 arg->peer_ppet.ru_bit_mask =
9f056ed8ee01ad John Crispin 2019-11-25 1289 (he_cap->ppe_thres[0] &
9f056ed8ee01ad John Crispin 2019-11-25 1290 IEEE80211_PPE_THRES_RU_INDEX_BITMASK_MASK) >>
9f056ed8ee01ad John Crispin 2019-11-25 1291 IEEE80211_PPE_THRES_RU_INDEX_BITMASK_POS;
9f056ed8ee01ad John Crispin 2019-11-25 1292
9f056ed8ee01ad John Crispin 2019-11-25 1293 for (nss = 0; nss <= arg->peer_ppet.numss_m1; nss++) {
9f056ed8ee01ad John Crispin 2019-11-25 1294 for (ru = 0; ru < 4; ru++) {
9f056ed8ee01ad John Crispin 2019-11-25 1295 u32 val = 0;
9f056ed8ee01ad John Crispin 2019-11-25 1296 int i;
9f056ed8ee01ad John Crispin 2019-11-25 1297
9f056ed8ee01ad John Crispin 2019-11-25 1298 if ((arg->peer_ppet.ru_bit_mask & BIT(ru)) == 0)
9f056ed8ee01ad John Crispin 2019-11-25 1299 continue;
9f056ed8ee01ad John Crispin 2019-11-25 1300 for (i = 0; i < 6; i++) {
9f056ed8ee01ad John Crispin 2019-11-25 1301 val >>= 1;
9f056ed8ee01ad John Crispin 2019-11-25 1302 val |= ((he_cap->ppe_thres[bit / 8] >>
9f056ed8ee01ad John Crispin 2019-11-25 1303 (bit % 8)) & 0x1) << 5;
9f056ed8ee01ad John Crispin 2019-11-25 1304 bit++;
9f056ed8ee01ad John Crispin 2019-11-25 1305 }
9f056ed8ee01ad John Crispin 2019-11-25 1306 arg->peer_ppet.ppet16_ppet8_ru3_ru0[nss] |=
9f056ed8ee01ad John Crispin 2019-11-25 1307 val << (ru * 6);
9f056ed8ee01ad John Crispin 2019-11-25 1308 }
9f056ed8ee01ad John Crispin 2019-11-25 1309 }
9f056ed8ee01ad John Crispin 2019-11-25 1310 }
9f056ed8ee01ad John Crispin 2019-11-25 1311
6d293d447670da John Crispin 2019-11-25 1312 if (he_cap->he_cap_elem.mac_cap_info[0] & IEEE80211_HE_MAC_CAP0_TWT_RES)
6d293d447670da John Crispin 2019-11-25 1313 arg->twt_responder = true;
6d293d447670da John Crispin 2019-11-25 1314 if (he_cap->he_cap_elem.mac_cap_info[0] & IEEE80211_HE_MAC_CAP0_TWT_REQ)
6d293d447670da John Crispin 2019-11-25 1315 arg->twt_requester = true;
6d293d447670da John Crispin 2019-11-25 1316
9f056ed8ee01ad John Crispin 2019-11-25 1317 switch (sta->bandwidth) {
9f056ed8ee01ad John Crispin 2019-11-25 1318 case IEEE80211_STA_RX_BW_160:
9f056ed8ee01ad John Crispin 2019-11-25 1319 if (he_cap->he_cap_elem.phy_cap_info[0] &
9f056ed8ee01ad John Crispin 2019-11-25 1320 IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G) {
9f056ed8ee01ad John Crispin 2019-11-25 1321 v = le16_to_cpu(he_cap->he_mcs_nss_supp.rx_mcs_80p80);
9f056ed8ee01ad John Crispin 2019-11-25 1322 arg->peer_he_rx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_80_80] = v;
9f056ed8ee01ad John Crispin 2019-11-25 1323
9f056ed8ee01ad John Crispin 2019-11-25 1324 v = le16_to_cpu(he_cap->he_mcs_nss_supp.tx_mcs_80p80);
9f056ed8ee01ad John Crispin 2019-11-25 1325 arg->peer_he_tx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_80_80] = v;
9f056ed8ee01ad John Crispin 2019-11-25 1326
9f056ed8ee01ad John Crispin 2019-11-25 1327 arg->peer_he_mcs_count++;
9f056ed8ee01ad John Crispin 2019-11-25 1328 }
9f056ed8ee01ad John Crispin 2019-11-25 1329 v = le16_to_cpu(he_cap->he_mcs_nss_supp.rx_mcs_160);
9f056ed8ee01ad John Crispin 2019-11-25 1330 arg->peer_he_rx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_160] = v;
9f056ed8ee01ad John Crispin 2019-11-25 1331
9f056ed8ee01ad John Crispin 2019-11-25 1332 v = le16_to_cpu(he_cap->he_mcs_nss_supp.tx_mcs_160);
9f056ed8ee01ad John Crispin 2019-11-25 1333 arg->peer_he_tx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_160] = v;
9f056ed8ee01ad John Crispin 2019-11-25 1334
9f056ed8ee01ad John Crispin 2019-11-25 1335 arg->peer_he_mcs_count++;
0b294aebb6a00b Gustavo A. R. Silva 2020-07-27 1336 fallthrough;
9f056ed8ee01ad John Crispin 2019-11-25 1337
9f056ed8ee01ad John Crispin 2019-11-25 1338 default:
9f056ed8ee01ad John Crispin 2019-11-25 1339 v = le16_to_cpu(he_cap->he_mcs_nss_supp.rx_mcs_80);
9f056ed8ee01ad John Crispin 2019-11-25 1340 arg->peer_he_rx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_80] = v;
9f056ed8ee01ad John Crispin 2019-11-25 1341
9f056ed8ee01ad John Crispin 2019-11-25 1342 v = le16_to_cpu(he_cap->he_mcs_nss_supp.tx_mcs_80);
9f056ed8ee01ad John Crispin 2019-11-25 1343 arg->peer_he_tx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_80] = v;
9f056ed8ee01ad John Crispin 2019-11-25 1344
9f056ed8ee01ad John Crispin 2019-11-25 1345 arg->peer_he_mcs_count++;
9f056ed8ee01ad John Crispin 2019-11-25 1346 break;
9f056ed8ee01ad John Crispin 2019-11-25 1347 }
d5c65159f28953 Kalle Valo 2019-11-23 1348 }
d5c65159f28953 Kalle Valo 2019-11-23 1349
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[intel-linux-intel-lts:4.19/android 16527/19969] drivers/cpufreq/cpufreq_times.c:354:5: warning: no previous prototype for 'cpufreq_table_get_closed_index'
by kernel test robot
Hi Junxiao,
FYI, the error/warning still remains.
tree: https://github.com/intel/linux-intel-lts.git 4.19/android
head: 5548fa79727a80359c5f88b949881a1cd2141169
commit: 045c4cc9854e44be23f27501c397c8d1783a0708 [16527/19969] cpufreq statistics: support cpufreq driver without freq table
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
# https://github.com/intel/linux-intel-lts/commit/045c4cc9854e44be23f27501c...
git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-linux-intel-lts 4.19/android
git checkout 045c4cc9854e44be23f27501c397c8d1783a0708
# 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 warnings (new ones prefixed by >>):
>> drivers/cpufreq/cpufreq_times.c:354:5: warning: no previous prototype for 'cpufreq_table_get_closed_index' [-Wmissing-prototypes]
354 | int cpufreq_table_get_closed_index(int cpu, unsigned int freq)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/cpufreq/cpufreq_times.c:367:6: warning: no previous prototype for 'cpufreq_times_create_policy_no_freq_table' [-Wmissing-prototypes]
367 | void cpufreq_times_create_policy_no_freq_table(struct cpufreq_policy *policy)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/cpufreq_table_get_closed_index +354 drivers/cpufreq/cpufreq_times.c
350
351 #define CPU_FREQ_STEPS 100000
352 // Suppose all cores have same freq count
353 static int all_freq_count;
> 354 int cpufreq_table_get_closed_index(int cpu, unsigned int freq)
355 {
356 int i;
357 unsigned int rounded_freq;
358
359 rounded_freq = freq + CPU_FREQ_STEPS / 2;
360 for (i = 0; i < all_freq_count; i++) {
361 if ((rounded_freq - all_freqs[cpu]->freq_table[i]) / CPU_FREQ_STEPS == 0)
362 return i;
363 }
364 return -1;
365 }
366
> 367 void cpufreq_times_create_policy_no_freq_table(struct cpufreq_policy *policy)
368 {
369 int cpu, index, i;
370 unsigned int count = 0;
371 struct cpu_freqs *freqs;
372 void *tmp;
373
374 if (all_freqs[policy->cpu])
375 return;
376
377 count = (policy->max - policy->min) / CPU_FREQ_STEPS + 1;
378 if ((policy->max - policy->min) % CPU_FREQ_STEPS)
379 count++;
380
381 if (count > 100)
382 return;
383
384 tmp = kzalloc(sizeof(*freqs) + sizeof(freqs->freq_table[0]) * count,
385 GFP_KERNEL);
386 if (!tmp)
387 return;
388
389 freqs = tmp;
390 freqs->max_state = count;
391 all_freq_count = count;
392
393 freqs->freq_table[0] = policy->min;
394 freqs->freq_table[count - 1] = policy->max;
395 for (i = 1; i < count - 1; i++)
396 freqs->freq_table[i] = policy->min + i * CPU_FREQ_STEPS;
397 freqs->offset = next_offset;
398 WRITE_ONCE(next_offset, freqs->offset + count);
399 for_each_cpu(cpu, policy->related_cpus)
400 all_freqs[cpu] = freqs;
401
402 index = cpufreq_table_get_closed_index(policy->cpu, policy->cur);
403 if (index >= 0)
404 WRITE_ONCE(freqs->last_index, index);
405 }
406
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months