[sashal-linux-stable:queue-5.4 116/120] drivers/usb/dwc3/dwc3-qcom.c:769:32: error: use of undeclared identifier 'sdm845_acpi_urs_pdata'; did you mean
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.4
head: 4bd8020d6c753ab56df4d7bd75833fd880e1995a
commit: 8021e93083e1c5afb7d063caa945c264e3691c0e [116/120] usb: dwc3: qcom: add ACPI device id for sc8180x
config: powerpc64-randconfig-r006-20210320 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 436c6c9c20cc522c92a923440a5fc509c342a7db)
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/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 8021e93083e1c5afb7d063caa945c264e3691c0e
# 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 >>):
>> drivers/usb/dwc3/dwc3-qcom.c:769:32: error: use of undeclared identifier 'sdm845_acpi_urs_pdata'; did you mean 'sdm845_acpi_pdata'?
{ "QCOM0497", (unsigned long)&sdm845_acpi_urs_pdata },
^~~~~~~~~~~~~~~~~~~~~
sdm845_acpi_pdata
drivers/usb/dwc3/dwc3-qcom.c:549:37: note: 'sdm845_acpi_pdata' declared here
static const struct dwc3_acpi_pdata sdm845_acpi_pdata = {
^
1 error generated.
vim +769 drivers/usb/dwc3/dwc3-qcom.c
766
767 static const struct acpi_device_id dwc3_qcom_acpi_match[] = {
768 { "QCOM2430", (unsigned long)&sdm845_acpi_pdata },
> 769 { "QCOM0497", (unsigned long)&sdm845_acpi_urs_pdata },
770 { "QCOM04A6", (unsigned long)&sdm845_acpi_pdata },
771 { },
772 };
773 MODULE_DEVICE_TABLE(acpi, dwc3_qcom_acpi_match);
774
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[sashal-linux-stable:queue-5.4 99/120] sound/usb/mixer.c:1300:27: error: implicit declaration of function 'mixer_ctrl_intf'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.4
head: 4bd8020d6c753ab56df4d7bd75833fd880e1995a
commit: 7c9ada4789d0d2072ed57bf55ddb679fa63ea393 [99/120] ALSA: usb-audio: Drop bogus dB range in too low level
config: powerpc64-randconfig-r006-20210320 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 436c6c9c20cc522c92a923440a5fc509c342a7db)
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/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 7c9ada4789d0d2072ed57bf55ddb679fa63ea393
# 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 >>):
>> sound/usb/mixer.c:1300:27: error: implicit declaration of function 'mixer_ctrl_intf' [-Werror,-Wimplicit-function-declaration]
cval->head.id, mixer_ctrl_intf(cval->head.mixer),
^
1 error generated.
vim +/mixer_ctrl_intf +1300 sound/usb/mixer.c
1186
1187 /*
1188 * retrieve the minimum and maximum values for the specified control
1189 */
1190 static int get_min_max_with_quirks(struct usb_mixer_elem_info *cval,
1191 int default_min, struct snd_kcontrol *kctl)
1192 {
1193 /* for failsafe */
1194 cval->min = default_min;
1195 cval->max = cval->min + 1;
1196 cval->res = 1;
1197 cval->dBmin = cval->dBmax = 0;
1198
1199 if (cval->val_type == USB_MIXER_BOOLEAN ||
1200 cval->val_type == USB_MIXER_INV_BOOLEAN) {
1201 cval->initialized = 1;
1202 } else {
1203 int minchn = 0;
1204 if (cval->cmask) {
1205 int i;
1206 for (i = 0; i < MAX_CHANNELS; i++)
1207 if (cval->cmask & (1 << i)) {
1208 minchn = i + 1;
1209 break;
1210 }
1211 }
1212 if (get_ctl_value(cval, UAC_GET_MAX, (cval->control << 8) | minchn, &cval->max) < 0 ||
1213 get_ctl_value(cval, UAC_GET_MIN, (cval->control << 8) | minchn, &cval->min) < 0) {
1214 usb_audio_err(cval->head.mixer->chip,
1215 "%d:%d: cannot get min/max values for control %d (id %d)\n",
1216 cval->head.id, snd_usb_ctrl_intf(cval->head.mixer->chip),
1217 cval->control, cval->head.id);
1218 return -EINVAL;
1219 }
1220 if (get_ctl_value(cval, UAC_GET_RES,
1221 (cval->control << 8) | minchn,
1222 &cval->res) < 0) {
1223 cval->res = 1;
1224 } else {
1225 int last_valid_res = cval->res;
1226
1227 while (cval->res > 1) {
1228 if (snd_usb_mixer_set_ctl_value(cval, UAC_SET_RES,
1229 (cval->control << 8) | minchn,
1230 cval->res / 2) < 0)
1231 break;
1232 cval->res /= 2;
1233 }
1234 if (get_ctl_value(cval, UAC_GET_RES,
1235 (cval->control << 8) | minchn, &cval->res) < 0)
1236 cval->res = last_valid_res;
1237 }
1238 if (cval->res == 0)
1239 cval->res = 1;
1240
1241 /* Additional checks for the proper resolution
1242 *
1243 * Some devices report smaller resolutions than actually
1244 * reacting. They don't return errors but simply clip
1245 * to the lower aligned value.
1246 */
1247 if (cval->min + cval->res < cval->max) {
1248 int last_valid_res = cval->res;
1249 int saved, test, check;
1250 if (get_cur_mix_raw(cval, minchn, &saved) < 0)
1251 goto no_res_check;
1252 for (;;) {
1253 test = saved;
1254 if (test < cval->max)
1255 test += cval->res;
1256 else
1257 test -= cval->res;
1258 if (test < cval->min || test > cval->max ||
1259 snd_usb_set_cur_mix_value(cval, minchn, 0, test) ||
1260 get_cur_mix_raw(cval, minchn, &check)) {
1261 cval->res = last_valid_res;
1262 break;
1263 }
1264 if (test == check)
1265 break;
1266 cval->res *= 2;
1267 }
1268 snd_usb_set_cur_mix_value(cval, minchn, 0, saved);
1269 }
1270
1271 no_res_check:
1272 cval->initialized = 1;
1273 }
1274
1275 if (kctl)
1276 volume_control_quirks(cval, kctl);
1277
1278 /* USB descriptions contain the dB scale in 1/256 dB unit
1279 * while ALSA TLV contains in 1/100 dB unit
1280 */
1281 cval->dBmin = (convert_signed_value(cval, cval->min) * 100) / 256;
1282 cval->dBmax = (convert_signed_value(cval, cval->max) * 100) / 256;
1283 if (cval->dBmin > cval->dBmax) {
1284 /* something is wrong; assume it's either from/to 0dB */
1285 if (cval->dBmin < 0)
1286 cval->dBmax = 0;
1287 else if (cval->dBmin > 0)
1288 cval->dBmin = 0;
1289 if (cval->dBmin > cval->dBmax) {
1290 /* totally crap, return an error */
1291 return -EINVAL;
1292 }
1293 } else {
1294 /* if the max volume is too low, it's likely a bogus range;
1295 * here we use -96dB as the threshold
1296 */
1297 if (cval->dBmax <= -9600) {
1298 usb_audio_info(cval->head.mixer->chip,
1299 "%d:%d: bogus dB values (%d/%d), disabling dB reporting\n",
> 1300 cval->head.id, mixer_ctrl_intf(cval->head.mixer),
1301 cval->dBmin, cval->dBmax);
1302 cval->dBmin = cval->dBmax = 0;
1303 }
1304 }
1305
1306 return 0;
1307 }
1308
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[sashal-linux-stable:queue-5.4 42/120] include/drm/gpu_scheduler.h:98:21: error: field has incomplete type 'struct completion'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.4
head: 4bd8020d6c753ab56df4d7bd75833fd880e1995a
commit: 45102484256d341921bf68bdbee0a16141afd9a9 [42/120] drm/sched: Use completion to wait for sched->thread idle v2.
config: powerpc64-randconfig-r006-20210320 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 436c6c9c20cc522c92a923440a5fc509c342a7db)
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/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 45102484256d341921bf68bdbee0a16141afd9a9
# 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 >>):
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c:29:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:31:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_ctx.h:26:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_ring.h:28:
>> include/drm/gpu_scheduler.h:98:21: error: field has incomplete type 'struct completion'
struct completion entity_idle;
^
include/linux/kernel.h:200:8: note: forward declaration of 'struct completion'
struct completion;
^
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c:40:
In file included from include/linux/pci.h:1794:
In file included from arch/powerpc/include/asm/pci.h:12:
include/linux/dma-mapping.h:742:9: warning: implicit conversion from 'unsigned long long' to 'unsigned long' changes value from 18446744073709551615 to 4294967295 [-Wconstant-conversion]
return DMA_BIT_MASK(32);
~~~~~~ ^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:142:40: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^~~~~
1 warning and 1 error generated.
--
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c:28:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:31:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_ctx.h:26:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_ring.h:28:
>> include/drm/gpu_scheduler.h:98:21: error: field has incomplete type 'struct completion'
struct completion entity_idle;
^
include/linux/kernel.h:200:8: note: forward declaration of 'struct completion'
struct completion;
^
1 error generated.
--
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:34:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:31:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_ctx.h:26:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_ring.h:28:
>> include/drm/gpu_scheduler.h:98:21: error: field has incomplete type 'struct completion'
struct completion entity_idle;
^
include/linux/kernel.h:200:8: note: forward declaration of 'struct completion'
struct completion;
^
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:38:
In file included from include/linux/dma-buf.h:20:
include/linux/dma-mapping.h:742:9: warning: implicit conversion from 'unsigned long long' to 'unsigned long' changes value from 18446744073709551615 to 4294967295 [-Wconstant-conversion]
return DMA_BIT_MASK(32);
~~~~~~ ^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:142:40: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:49:18: warning: no previous prototype for function 'amdgpu_gem_prime_get_sg_table' [-Wmissing-prototypes]
struct sg_table *amdgpu_gem_prime_get_sg_table(struct drm_gem_object *obj)
^
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:49:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
struct sg_table *amdgpu_gem_prime_get_sg_table(struct drm_gem_object *obj)
^
static
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:66:7: warning: no previous prototype for function 'amdgpu_gem_prime_vmap' [-Wmissing-prototypes]
void *amdgpu_gem_prime_vmap(struct drm_gem_object *obj)
^
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:66:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void *amdgpu_gem_prime_vmap(struct drm_gem_object *obj)
^
static
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:86:6: warning: no previous prototype for function 'amdgpu_gem_prime_vunmap' [-Wmissing-prototypes]
void amdgpu_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr)
^
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:86:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void amdgpu_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr)
^
static
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:104:5: warning: no previous prototype for function 'amdgpu_gem_prime_mmap' [-Wmissing-prototypes]
int amdgpu_gem_prime_mmap(struct drm_gem_object *obj,
^
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:104:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int amdgpu_gem_prime_mmap(struct drm_gem_object *obj,
^
static
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:333:17: warning: no previous prototype for function 'amdgpu_gem_prime_export' [-Wmissing-prototypes]
struct dma_buf *amdgpu_gem_prime_export(struct drm_gem_object *gobj,
^
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:333:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
struct dma_buf *amdgpu_gem_prime_export(struct drm_gem_object *gobj,
^
static
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:366:1: warning: no previous prototype for function 'amdgpu_gem_prime_import_sg_table' [-Wmissing-prototypes]
amdgpu_gem_prime_import_sg_table(struct drm_device *dev,
^
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:365:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
struct drm_gem_object *
^
static
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:414:24: warning: no previous prototype for function 'amdgpu_gem_prime_import' [-Wmissing-prototypes]
struct drm_gem_object *amdgpu_gem_prime_import(struct drm_device *dev,
^
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:414:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
struct drm_gem_object *amdgpu_gem_prime_import(struct drm_device *dev,
^
static
8 warnings and 1 error generated.
--
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c:25:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:31:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_ctx.h:26:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_ring.h:28:
>> include/drm/gpu_scheduler.h:98:21: error: field has incomplete type 'struct completion'
struct completion entity_idle;
^
include/linux/kernel.h:200:8: note: forward declaration of 'struct completion'
struct completion;
^
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c:38:7: warning: no previous prototype for function 'amdgpu_xgmi_hive_try_lock' [-Wmissing-prototypes]
void *amdgpu_xgmi_hive_try_lock(struct amdgpu_hive_info *hive)
^
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c:38:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void *amdgpu_xgmi_hive_try_lock(struct amdgpu_hive_info *hive)
^
static
1 warning and 1 error generated.
--
In file included from drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c:23:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:31:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_ctx.h:26:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_ring.h:28:
>> include/drm/gpu_scheduler.h:98:21: error: field has incomplete type 'struct completion'
struct completion entity_idle;
^
include/linux/kernel.h:200:8: note: forward declaration of 'struct completion'
struct completion;
^
drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c:56:6: warning: no previous prototype for function 'mmhub_v9_4_setup_vm_pt_regs' [-Wmissing-prototypes]
void mmhub_v9_4_setup_vm_pt_regs(struct amdgpu_device *adev, int hubid,
^
drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c:56:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void mmhub_v9_4_setup_vm_pt_regs(struct amdgpu_device *adev, int hubid,
^
static
1 warning and 1 error generated.
vim +98 include/drm/gpu_scheduler.h
46
47 /**
48 * struct drm_sched_entity - A wrapper around a job queue (typically
49 * attached to the DRM file_priv).
50 *
51 * @list: used to append this struct to the list of entities in the
52 * runqueue.
53 * @rq: runqueue on which this entity is currently scheduled.
54 * @rq_list: a list of run queues on which jobs from this entity can
55 * be scheduled
56 * @num_rq_list: number of run queues in the rq_list
57 * @rq_lock: lock to modify the runqueue to which this entity belongs.
58 * @job_queue: the list of jobs of this entity.
59 * @fence_seq: a linearly increasing seqno incremented with each
60 * new &drm_sched_fence which is part of the entity.
61 * @fence_context: a unique context for all the fences which belong
62 * to this entity.
63 * The &drm_sched_fence.scheduled uses the
64 * fence_context but &drm_sched_fence.finished uses
65 * fence_context + 1.
66 * @dependency: the dependency fence of the job which is on the top
67 * of the job queue.
68 * @cb: callback for the dependency fence above.
69 * @guilty: points to ctx's guilty.
70 * @fini_status: contains the exit status in case the process was signalled.
71 * @last_scheduled: points to the finished fence of the last scheduled job.
72 * @last_user: last group leader pushing a job into the entity.
73 * @stopped: Marks the enity as removed from rq and destined for termination.
74 * @entity_idle: Signals when enityt is not in use
75 *
76 * Entities will emit jobs in order to their corresponding hardware
77 * ring, and the scheduler will alternate between entities based on
78 * scheduling policy.
79 */
80 struct drm_sched_entity {
81 struct list_head list;
82 struct drm_sched_rq *rq;
83 struct drm_sched_rq **rq_list;
84 unsigned int num_rq_list;
85 spinlock_t rq_lock;
86
87 struct spsc_queue job_queue;
88
89 atomic_t fence_seq;
90 uint64_t fence_context;
91
92 struct dma_fence *dependency;
93 struct dma_fence_cb cb;
94 atomic_t *guilty;
95 struct dma_fence *last_scheduled;
96 struct task_struct *last_user;
97 bool stopped;
> 98 struct completion entity_idle;
99 };
100
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[arnd-playground:pci-probe-rework-20210320 21/24] arch/powerpc/kernel/pci-common.c:1667: warning: expecting prototype for pci_scan_host_bridge(). Prototype was for pcibios_scan_host_bridge() instead
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git pci-probe-rework-20210320
head: 0f62dd81d92215e38f654f21e515888fbb2b580c
commit: bd7acd0ea1bf0582ac58af1d1dc87c8cda0c7de1 [21/24] powerpc: rework PCI host allocation
config: powerpc-mpc834x_itxgp_defconfig (attached as .config)
compiler: powerpc-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/arnd/playground.git/commi...
git remote add arnd-playground https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
git fetch --no-tags arnd-playground pci-probe-rework-20210320
git checkout bd7acd0ea1bf0582ac58af1d1dc87c8cda0c7de1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 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 >>):
>> arch/powerpc/kernel/pci-common.c:1667: warning: expecting prototype for pci_scan_host_bridge(). Prototype was for pcibios_scan_host_bridge() instead
vim +1667 arch/powerpc/kernel/pci-common.c
98d9f30c820d50 Benjamin Herrenschmidt 2011-04-11 1661
0ed2c722c65051 Grant Likely 2009-08-28 1662 /**
bd7acd0ea1bf05 Arnd Bergmann 2020-12-19 1663 * pci_scan_host_bridge - Given a pci_controller, setup and scan the PCI bus
bd7acd0ea1bf05 Arnd Bergmann 2020-12-19 1664 * @bridge: Pointer to the PCI host controller instance structure
0ed2c722c65051 Grant Likely 2009-08-28 1665 */
bd7acd0ea1bf05 Arnd Bergmann 2020-12-19 1666 void pcibios_scan_host_bridge(struct pci_host_bridge *bridge)
0ed2c722c65051 Grant Likely 2009-08-28 @1667 {
bd7acd0ea1bf05 Arnd Bergmann 2020-12-19 1668 struct pci_controller *hose = pci_host_bridge_priv(bridge);
0ed2c722c65051 Grant Likely 2009-08-28 1669 struct device_node *node = hose->dn;
0ed2c722c65051 Grant Likely 2009-08-28 1670 int mode;
6905e0abbe6f56 Arnd Bergmann 2020-12-18 1671 int error;
6905e0abbe6f56 Arnd Bergmann 2020-12-18 1672
b7c670d673d118 Rob Herring 2017-08-21 1673 pr_debug("PCI: Scanning PHB %pOF\n", node);
0ed2c722c65051 Grant Likely 2009-08-28 1674
45a709f890a7b8 Bjorn Helgaas 2011-10-28 1675 /* Get some IO space for the new PHB */
45a709f890a7b8 Bjorn Helgaas 2011-10-28 1676 pcibios_setup_phb_io_space(hose);
45a709f890a7b8 Bjorn Helgaas 2011-10-28 1677
45a709f890a7b8 Bjorn Helgaas 2011-10-28 1678 /* Wire up PHB bus resources */
bd7acd0ea1bf05 Arnd Bergmann 2020-12-19 1679 pcibios_setup_phb_resources(hose);
6905e0abbe6f56 Arnd Bergmann 2020-12-18 1680
6905e0abbe6f56 Arnd Bergmann 2020-12-18 1681 bridge->sysdata = hose;
6905e0abbe6f56 Arnd Bergmann 2020-12-18 1682 bridge->busnr = hose->first_busno;
bd7acd0ea1bf05 Arnd Bergmann 2020-12-19 1683 bridge->custom_bus_scan = 1;
45a709f890a7b8 Bjorn Helgaas 2011-10-28 1684
be8e60d8bed118 Yinghai Lu 2012-05-17 1685 hose->busn.start = hose->first_busno;
be8e60d8bed118 Yinghai Lu 2012-05-17 1686 hose->busn.end = hose->last_busno;
be8e60d8bed118 Yinghai Lu 2012-05-17 1687 hose->busn.flags = IORESOURCE_BUS;
6905e0abbe6f56 Arnd Bergmann 2020-12-18 1688 pci_add_resource(&bridge->windows, &hose->busn);
be8e60d8bed118 Yinghai Lu 2012-05-17 1689
bd7acd0ea1bf05 Arnd Bergmann 2020-12-19 1690 mode = PCI_PROBE_NORMAL;
bd7acd0ea1bf05 Arnd Bergmann 2020-12-19 1691 if (node && hose->controller_ops.probe_mode)
bd7acd0ea1bf05 Arnd Bergmann 2020-12-19 1692 mode = hose->controller_ops.probe_mode(bridge->bus);
bd7acd0ea1bf05 Arnd Bergmann 2020-12-19 1693 /* Get probe mode and perform scan */
bd7acd0ea1bf05 Arnd Bergmann 2020-12-19 1694 pr_debug(" probe mode: %d\n", mode);
bd7acd0ea1bf05 Arnd Bergmann 2020-12-19 1695 if (mode == PCI_PROBE_DEVTREE)
bd7acd0ea1bf05 Arnd Bergmann 2020-12-19 1696 bridge->custom_bus_scan = 1;
bd7acd0ea1bf05 Arnd Bergmann 2020-12-19 1697
0ed2c722c65051 Grant Likely 2009-08-28 1698 /* Create an empty bus for the toplevel */
bd7acd0ea1bf05 Arnd Bergmann 2020-12-19 1699 error = pci_scan_root_bus_bridge(bridge);
6905e0abbe6f56 Arnd Bergmann 2020-12-18 1700 if (error) {
6905e0abbe6f56 Arnd Bergmann 2020-12-18 1701 pr_err("Failed to create bus for PCI domain %04x: %d\n",
6905e0abbe6f56 Arnd Bergmann 2020-12-18 1702 hose->global_number, error);
6905e0abbe6f56 Arnd Bergmann 2020-12-18 1703 pci_free_host_bridge(bridge);
0ed2c722c65051 Grant Likely 2009-08-28 1704 return;
0ed2c722c65051 Grant Likely 2009-08-28 1705 }
0ed2c722c65051 Grant Likely 2009-08-28 1706
be8e60d8bed118 Yinghai Lu 2012-05-17 1707 if (mode == PCI_PROBE_DEVTREE)
bd7acd0ea1bf05 Arnd Bergmann 2020-12-19 1708 of_scan_bus(node, bridge->bus);
781fb7a3e4cdca Benjamin Herrenschmidt 2011-09-19 1709
491b98c315dbe3 Benjamin Herrenschmidt 2011-11-06 1710 /* Platform gets a chance to do some global fixups before
491b98c315dbe3 Benjamin Herrenschmidt 2011-11-06 1711 * we proceed to resource allocation
491b98c315dbe3 Benjamin Herrenschmidt 2011-11-06 1712 */
491b98c315dbe3 Benjamin Herrenschmidt 2011-11-06 1713 if (ppc_md.pcibios_fixup_phb)
491b98c315dbe3 Benjamin Herrenschmidt 2011-11-06 1714 ppc_md.pcibios_fixup_phb(hose);
491b98c315dbe3 Benjamin Herrenschmidt 2011-11-06 1715
781fb7a3e4cdca Benjamin Herrenschmidt 2011-09-19 1716 /* Configure PCI Express settings */
bd7acd0ea1bf05 Arnd Bergmann 2020-12-19 1717 if (bridge->bus && !pci_has_flag(PCI_PROBE_ONLY)) {
781fb7a3e4cdca Benjamin Herrenschmidt 2011-09-19 1718 struct pci_bus *child;
bd7acd0ea1bf05 Arnd Bergmann 2020-12-19 1719 list_for_each_entry(child, &bridge->bus->children, node)
a58674ff8383f5 Bjorn Helgaas 2013-08-22 1720 pcie_bus_configure_settings(child);
781fb7a3e4cdca Benjamin Herrenschmidt 2011-09-19 1721 }
0ed2c722c65051 Grant Likely 2009-08-28 1722 }
bd7acd0ea1bf05 Arnd Bergmann 2020-12-19 1723 EXPORT_SYMBOL_GPL(pcibios_scan_host_bridge);
c065488f1acfc0 Kumar Gala 2011-05-19 1724
:::::: The code at line 1667 was first introduced by commit
:::::: 0ed2c722c650513ba4bce868c7a052e576c060e2 powerpc/pci: Merge ppc32 and ppc64 versions of phb_scan()
:::::: TO: Grant Likely <grant.likely(a)secretlab.ca>
:::::: CC: Benjamin Herrenschmidt <benh(a)kernel.crashing.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
fs/select.c:970:12: warning: stack frame size of 1032 bytes in function 'do_sys_poll'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 1c273e10bc0cc7efb933e0ca10e260cdfc9f0b8c
commit: 8b3165e54566e8bb8f4b7d4e5f12ced78ce462bb MIPS: Enable GCOV
date: 4 months ago
config: mips-randconfig-r022-20210320 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 436c6c9c20cc522c92a923440a5fc509c342a7db)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# 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 8b3165e54566e8bb8f4b7d4e5f12ced78ce462bb
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips
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 >>):
fs/select.c:621:5: warning: stack frame size of 1032 bytes in function 'core_sys_select' [-Wframe-larger-than=]
int core_sys_select(int n, fd_set __user *inp, fd_set __user *outp,
^
>> fs/select.c:970:12: warning: stack frame size of 1032 bytes in function 'do_sys_poll' [-Wframe-larger-than=]
static int do_sys_poll(struct pollfd __user *ufds, unsigned int nfds,
^
2 warnings generated.
vim +/do_sys_poll +970 fs/select.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 966
70674f95c0a2ea Andi Kleen 2006-03-28 967 #define N_STACK_PPS ((sizeof(stack_pps) - sizeof(struct poll_list)) / \
70674f95c0a2ea Andi Kleen 2006-03-28 968 sizeof(struct pollfd))
70674f95c0a2ea Andi Kleen 2006-03-28 969
e99ca56ce03dd9 Al Viro 2017-04-08 @970 static int do_sys_poll(struct pollfd __user *ufds, unsigned int nfds,
766b9f928bd5b9 Deepa Dinamani 2016-05-19 971 struct timespec64 *end_time)
^1da177e4c3f41 Linus Torvalds 2005-04-16 972 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 973 struct poll_wqueues table;
43e11fa2d1d3b6 Gustavo A. R. Silva 2019-07-16 974 int err = -EFAULT, fdcount, len;
30c14e40ed8546 Jes Sorensen 2006-03-31 975 /* Allocate small arguments on the stack to save memory and be
30c14e40ed8546 Jes Sorensen 2006-03-31 976 faster - use long to make sure the buffer is aligned properly
30c14e40ed8546 Jes Sorensen 2006-03-31 977 on 64 bit archs to avoid unaligned access */
30c14e40ed8546 Jes Sorensen 2006-03-31 978 long stack_pps[POLL_STACK_ALLOC/sizeof(long)];
252e5725cfb55a Oleg Nesterov 2007-10-16 979 struct poll_list *const head = (struct poll_list *)stack_pps;
252e5725cfb55a Oleg Nesterov 2007-10-16 980 struct poll_list *walk = head;
252e5725cfb55a Oleg Nesterov 2007-10-16 981 unsigned long todo = nfds;
^1da177e4c3f41 Linus Torvalds 2005-04-16 982
d554ed895dc8f2 Jiri Slaby 2010-03-05 983 if (nfds > rlimit(RLIMIT_NOFILE))
^1da177e4c3f41 Linus Torvalds 2005-04-16 984 return -EINVAL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 985
252e5725cfb55a Oleg Nesterov 2007-10-16 986 len = min_t(unsigned int, nfds, N_STACK_PPS);
252e5725cfb55a Oleg Nesterov 2007-10-16 987 for (;;) {
252e5725cfb55a Oleg Nesterov 2007-10-16 988 walk->next = NULL;
252e5725cfb55a Oleg Nesterov 2007-10-16 989 walk->len = len;
252e5725cfb55a Oleg Nesterov 2007-10-16 990 if (!len)
252e5725cfb55a Oleg Nesterov 2007-10-16 991 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 992
252e5725cfb55a Oleg Nesterov 2007-10-16 993 if (copy_from_user(walk->entries, ufds + nfds-todo,
252e5725cfb55a Oleg Nesterov 2007-10-16 994 sizeof(struct pollfd) * walk->len))
^1da177e4c3f41 Linus Torvalds 2005-04-16 995 goto out_fds;
^1da177e4c3f41 Linus Torvalds 2005-04-16 996
252e5725cfb55a Oleg Nesterov 2007-10-16 997 todo -= walk->len;
252e5725cfb55a Oleg Nesterov 2007-10-16 998 if (!todo)
252e5725cfb55a Oleg Nesterov 2007-10-16 999 break;
252e5725cfb55a Oleg Nesterov 2007-10-16 1000
252e5725cfb55a Oleg Nesterov 2007-10-16 1001 len = min(todo, POLLFD_PER_PAGE);
43e11fa2d1d3b6 Gustavo A. R. Silva 2019-07-16 1002 walk = walk->next = kmalloc(struct_size(walk, entries, len),
43e11fa2d1d3b6 Gustavo A. R. Silva 2019-07-16 1003 GFP_KERNEL);
252e5725cfb55a Oleg Nesterov 2007-10-16 1004 if (!walk) {
252e5725cfb55a Oleg Nesterov 2007-10-16 1005 err = -ENOMEM;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1006 goto out_fds;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1007 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1008 }
9f72949f679df0 David Woodhouse 2006-01-18 1009
252e5725cfb55a Oleg Nesterov 2007-10-16 1010 poll_initwait(&table);
ccec5ee302d5cb Mateusz Guzik 2016-01-06 1011 fdcount = do_poll(head, &table, end_time);
252e5725cfb55a Oleg Nesterov 2007-10-16 1012 poll_freewait(&table);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1013
252e5725cfb55a Oleg Nesterov 2007-10-16 1014 for (walk = head; walk; walk = walk->next) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 1015 struct pollfd *fds = walk->entries;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1016 int j;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1017
252e5725cfb55a Oleg Nesterov 2007-10-16 1018 for (j = 0; j < walk->len; j++, ufds++)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1019 if (__put_user(fds[j].revents, &ufds->revents))
^1da177e4c3f41 Linus Torvalds 2005-04-16 1020 goto out_fds;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1021 }
252e5725cfb55a Oleg Nesterov 2007-10-16 1022
^1da177e4c3f41 Linus Torvalds 2005-04-16 1023 err = fdcount;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1024 out_fds:
252e5725cfb55a Oleg Nesterov 2007-10-16 1025 walk = head->next;
252e5725cfb55a Oleg Nesterov 2007-10-16 1026 while (walk) {
252e5725cfb55a Oleg Nesterov 2007-10-16 1027 struct poll_list *pos = walk;
252e5725cfb55a Oleg Nesterov 2007-10-16 1028 walk = walk->next;
252e5725cfb55a Oleg Nesterov 2007-10-16 1029 kfree(pos);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1030 }
252e5725cfb55a Oleg Nesterov 2007-10-16 1031
^1da177e4c3f41 Linus Torvalds 2005-04-16 1032 return err;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1033 }
9f72949f679df0 David Woodhouse 2006-01-18 1034
:::::: The code at line 970 was first introduced by commit
:::::: e99ca56ce03dd90991025878152bae8b53484147 move compat select-related syscalls to fs/select.c
:::::: TO: Al Viro <viro(a)zeniv.linux.org.uk>
:::::: CC: Al Viro <viro(a)zeniv.linux.org.uk>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[linux-rt-devel:linux-5.12.y-rt-rebase 35/193] kernel/printk/printk.c:3633:17: error: implicit declaration of function 'read_console_seq'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-5.12.y-rt-rebase
head: 2664a7f5d3d24da4b2657a1e933181d376b77616
commit: e757cbebec298e80e5b3378392f2de2a5f380ae7 [35/193] printk: add pr_flush()
config: mips-randconfig-r016-20210318 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 436c6c9c20cc522c92a923440a5fc509c342a7db)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/com...
git remote add linux-rt-devel https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git
git fetch --no-tags linux-rt-devel linux-5.12.y-rt-rebase
git checkout e757cbebec298e80e5b3378392f2de2a5f380ae7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips
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/printk/printk.c:178:5: warning: no previous prototype for function 'devkmsg_sysctl_set_loglvl' [-Wmissing-prototypes]
int devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write,
^
kernel/printk/printk.c:178:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write,
^
static
kernel/printk/printk.c:2674:4: error: implicit declaration of function 'latched_seq_write' [-Werror,-Wimplicit-function-declaration]
latched_seq_write(&c->printk_seq, seq);
^
kernel/printk/printk.c:2907:2: error: implicit declaration of function 'latched_seq_write' [-Werror,-Wimplicit-function-declaration]
latched_seq_write(&newcon->printk_seq, seq);
^
>> kernel/printk/printk.c:3633:17: error: implicit declaration of function 'read_console_seq' [-Werror,-Wimplicit-function-declaration]
printk_seq = read_console_seq(con);
^
kernel/printk/printk.c:3633:17: note: did you mean '__up_console_sem'?
kernel/printk/printk.c:238:13: note: '__up_console_sem' declared here
static void __up_console_sem(unsigned long ip)
^
1 warning and 3 errors generated.
vim +/read_console_seq +3633 kernel/printk/printk.c
3597
3598 /**
3599 * pr_flush() - Wait for printing threads to catch up.
3600 *
3601 * @timeout_ms: The maximum time (in ms) to wait.
3602 * @reset_on_progress: Reset the timeout if forward progress is seen.
3603 *
3604 * A value of 0 for @timeout_ms means no waiting will occur. A value of -1
3605 * represents infinite waiting.
3606 *
3607 * If @reset_on_progress is true, the timeout will be reset whenever any
3608 * printer has been seen to make some forward progress.
3609 *
3610 * Context: Any context.
3611 * Return: true if all enabled printers are caught up.
3612 */
3613 bool pr_flush(int timeout_ms, bool reset_on_progress)
3614 {
3615 int remaining = timeout_ms;
3616 struct console *con;
3617 u64 last_diff = 0;
3618 bool may_sleep;
3619 u64 printk_seq;
3620 u64 diff;
3621 u64 seq;
3622
3623 may_sleep = (preemptible() && !in_softirq());
3624
3625 seq = prb_next_seq(prb);
3626
3627 for (;;) {
3628 diff = 0;
3629
3630 for_each_console(con) {
3631 if (!(con->flags & CON_ENABLED))
3632 continue;
> 3633 printk_seq = read_console_seq(con);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[sashal-linux-stable:queue-5.10 32/73] drivers/scsi/pm8001/pm8001_init.c:399 pm8001_alloc() warn: inconsistent indenting
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.10
head: 25d69cebdec80e649877c85043f02daa53403c42
commit: 40e8b2825df972122837df7ca1720813bd82977e [32/73] scsi: pm8001: Neaten debug logging macros and uses
config: i386-randconfig-m021-20210318 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
New smatch warnings:
drivers/scsi/pm8001/pm8001_init.c:399 pm8001_alloc() warn: inconsistent indenting
Old smatch warnings:
drivers/scsi/pm8001/pm8001_init.c:472 pm8001_ioremap() warn: argument 6 to %llx specifier is cast from pointer
vim +399 drivers/scsi/pm8001/pm8001_init.c
d384be6ede5caa Vikram Auradkar 2020-03-16 259
dbf9bfe615717d jack wang 2009-10-14 260 /**
dbf9bfe615717d jack wang 2009-10-14 261 * pm8001_alloc - initiate our hba structure and 6 DMAs area.
dbf9bfe615717d jack wang 2009-10-14 262 * @pm8001_ha: our hba structure.
e802fc43ba36be Lee Jones 2020-07-13 263 * @ent: PCI device ID structure to match on
dbf9bfe615717d jack wang 2009-10-14 264 */
e590adfd2b35ae Sakthivel K 2013-02-27 265 static int pm8001_alloc(struct pm8001_hba_info *pm8001_ha,
e590adfd2b35ae Sakthivel K 2013-02-27 266 const struct pci_device_id *ent)
dbf9bfe615717d jack wang 2009-10-14 267 {
05c6c029a44d9f Viswas G 2020-10-05 268 int i, count = 0, rc = 0;
05c6c029a44d9f Viswas G 2020-10-05 269 u32 ci_offset, ib_offset, ob_offset, pi_offset;
05c6c029a44d9f Viswas G 2020-10-05 270 struct inbound_queue_table *circularQ;
05c6c029a44d9f Viswas G 2020-10-05 271
dbf9bfe615717d jack wang 2009-10-14 272 spin_lock_init(&pm8001_ha->lock);
646cdf0083e3d4 Tomas Henzl 2014-07-09 273 spin_lock_init(&pm8001_ha->bitmap_lock);
40e8b2825df972 Joe Perches 2020-11-20 274 pm8001_dbg(pm8001_ha, INIT, "pm8001_alloc: PHY:%x\n",
40e8b2825df972 Joe Perches 2020-11-20 275 pm8001_ha->chip->n_phy);
05c6c029a44d9f Viswas G 2020-10-05 276
05c6c029a44d9f Viswas G 2020-10-05 277 /* Setup Interrupt */
05c6c029a44d9f Viswas G 2020-10-05 278 rc = pm8001_setup_irq(pm8001_ha);
05c6c029a44d9f Viswas G 2020-10-05 279 if (rc) {
40e8b2825df972 Joe Perches 2020-11-20 280 pm8001_dbg(pm8001_ha, FAIL,
40e8b2825df972 Joe Perches 2020-11-20 281 "pm8001_setup_irq failed [ret: %d]\n", rc);
05c6c029a44d9f Viswas G 2020-10-05 282 goto err_out_shost;
05c6c029a44d9f Viswas G 2020-10-05 283 }
05c6c029a44d9f Viswas G 2020-10-05 284 /* Request Interrupt */
05c6c029a44d9f Viswas G 2020-10-05 285 rc = pm8001_request_irq(pm8001_ha);
05c6c029a44d9f Viswas G 2020-10-05 286 if (rc)
05c6c029a44d9f Viswas G 2020-10-05 287 goto err_out_shost;
05c6c029a44d9f Viswas G 2020-10-05 288
05c6c029a44d9f Viswas G 2020-10-05 289 count = pm8001_ha->max_q_num;
05c6c029a44d9f Viswas G 2020-10-05 290 /* Queues are chosen based on the number of cores/msix availability */
27bc43bd7c42b3 Viswas G 2020-10-05 291 ib_offset = pm8001_ha->ib_offset = USI_MAX_MEMCNT_BASE;
05c6c029a44d9f Viswas G 2020-10-05 292 ci_offset = pm8001_ha->ci_offset = ib_offset + count;
05c6c029a44d9f Viswas G 2020-10-05 293 ob_offset = pm8001_ha->ob_offset = ci_offset + count;
05c6c029a44d9f Viswas G 2020-10-05 294 pi_offset = pm8001_ha->pi_offset = ob_offset + count;
05c6c029a44d9f Viswas G 2020-10-05 295 pm8001_ha->max_memcnt = pi_offset + count;
05c6c029a44d9f Viswas G 2020-10-05 296
1cc943ae5003e4 jack wang 2009-12-07 297 for (i = 0; i < pm8001_ha->chip->n_phy; i++) {
dbf9bfe615717d jack wang 2009-10-14 298 pm8001_phy_init(pm8001_ha, i);
1cc943ae5003e4 jack wang 2009-12-07 299 pm8001_ha->port[i].wide_port_phymap = 0;
1cc943ae5003e4 jack wang 2009-12-07 300 pm8001_ha->port[i].port_attached = 0;
1cc943ae5003e4 jack wang 2009-12-07 301 pm8001_ha->port[i].port_state = 0;
1cc943ae5003e4 jack wang 2009-12-07 302 INIT_LIST_HEAD(&pm8001_ha->port[i].list);
1cc943ae5003e4 jack wang 2009-12-07 303 }
dbf9bfe615717d jack wang 2009-10-14 304
dbf9bfe615717d jack wang 2009-10-14 305 /* MPI Memory region 1 for AAP Event Log for fw */
dbf9bfe615717d jack wang 2009-10-14 306 pm8001_ha->memoryMap.region[AAP1].num_elements = 1;
dbf9bfe615717d jack wang 2009-10-14 307 pm8001_ha->memoryMap.region[AAP1].element_size = PM8001_EVENT_LOG_SIZE;
dbf9bfe615717d jack wang 2009-10-14 308 pm8001_ha->memoryMap.region[AAP1].total_len = PM8001_EVENT_LOG_SIZE;
dbf9bfe615717d jack wang 2009-10-14 309 pm8001_ha->memoryMap.region[AAP1].alignment = 32;
dbf9bfe615717d jack wang 2009-10-14 310
dbf9bfe615717d jack wang 2009-10-14 311 /* MPI Memory region 2 for IOP Event Log for fw */
dbf9bfe615717d jack wang 2009-10-14 312 pm8001_ha->memoryMap.region[IOP].num_elements = 1;
dbf9bfe615717d jack wang 2009-10-14 313 pm8001_ha->memoryMap.region[IOP].element_size = PM8001_EVENT_LOG_SIZE;
dbf9bfe615717d jack wang 2009-10-14 314 pm8001_ha->memoryMap.region[IOP].total_len = PM8001_EVENT_LOG_SIZE;
dbf9bfe615717d jack wang 2009-10-14 315 pm8001_ha->memoryMap.region[IOP].alignment = 32;
dbf9bfe615717d jack wang 2009-10-14 316
05c6c029a44d9f Viswas G 2020-10-05 317 for (i = 0; i < count; i++) {
05c6c029a44d9f Viswas G 2020-10-05 318 circularQ = &pm8001_ha->inbnd_q_tbl[i];
05c6c029a44d9f Viswas G 2020-10-05 319 spin_lock_init(&circularQ->iq_lock);
dbf9bfe615717d jack wang 2009-10-14 320 /* MPI Memory region 3 for consumer Index of inbound queues */
05c6c029a44d9f Viswas G 2020-10-05 321 pm8001_ha->memoryMap.region[ci_offset+i].num_elements = 1;
05c6c029a44d9f Viswas G 2020-10-05 322 pm8001_ha->memoryMap.region[ci_offset+i].element_size = 4;
05c6c029a44d9f Viswas G 2020-10-05 323 pm8001_ha->memoryMap.region[ci_offset+i].total_len = 4;
05c6c029a44d9f Viswas G 2020-10-05 324 pm8001_ha->memoryMap.region[ci_offset+i].alignment = 4;
dbf9bfe615717d jack wang 2009-10-14 325
e590adfd2b35ae Sakthivel K 2013-02-27 326 if ((ent->driver_data) != chip_8001) {
dbf9bfe615717d jack wang 2009-10-14 327 /* MPI Memory region 5 inbound queues */
05c6c029a44d9f Viswas G 2020-10-05 328 pm8001_ha->memoryMap.region[ib_offset+i].num_elements =
e590adfd2b35ae Sakthivel K 2013-02-27 329 PM8001_MPI_QUEUE;
05c6c029a44d9f Viswas G 2020-10-05 330 pm8001_ha->memoryMap.region[ib_offset+i].element_size
05c6c029a44d9f Viswas G 2020-10-05 331 = 128;
05c6c029a44d9f Viswas G 2020-10-05 332 pm8001_ha->memoryMap.region[ib_offset+i].total_len =
e590adfd2b35ae Sakthivel K 2013-02-27 333 PM8001_MPI_QUEUE * 128;
05c6c029a44d9f Viswas G 2020-10-05 334 pm8001_ha->memoryMap.region[ib_offset+i].alignment
05c6c029a44d9f Viswas G 2020-10-05 335 = 128;
e590adfd2b35ae Sakthivel K 2013-02-27 336 } else {
05c6c029a44d9f Viswas G 2020-10-05 337 pm8001_ha->memoryMap.region[ib_offset+i].num_elements =
e590adfd2b35ae Sakthivel K 2013-02-27 338 PM8001_MPI_QUEUE;
05c6c029a44d9f Viswas G 2020-10-05 339 pm8001_ha->memoryMap.region[ib_offset+i].element_size
05c6c029a44d9f Viswas G 2020-10-05 340 = 64;
05c6c029a44d9f Viswas G 2020-10-05 341 pm8001_ha->memoryMap.region[ib_offset+i].total_len =
e590adfd2b35ae Sakthivel K 2013-02-27 342 PM8001_MPI_QUEUE * 64;
05c6c029a44d9f Viswas G 2020-10-05 343 pm8001_ha->memoryMap.region[ib_offset+i].alignment = 64;
e590adfd2b35ae Sakthivel K 2013-02-27 344 }
e590adfd2b35ae Sakthivel K 2013-02-27 345 }
dbf9bfe615717d jack wang 2009-10-14 346
05c6c029a44d9f Viswas G 2020-10-05 347 for (i = 0; i < count; i++) {
e590adfd2b35ae Sakthivel K 2013-02-27 348 /* MPI Memory region 4 for producer Index of outbound queues */
05c6c029a44d9f Viswas G 2020-10-05 349 pm8001_ha->memoryMap.region[pi_offset+i].num_elements = 1;
05c6c029a44d9f Viswas G 2020-10-05 350 pm8001_ha->memoryMap.region[pi_offset+i].element_size = 4;
05c6c029a44d9f Viswas G 2020-10-05 351 pm8001_ha->memoryMap.region[pi_offset+i].total_len = 4;
05c6c029a44d9f Viswas G 2020-10-05 352 pm8001_ha->memoryMap.region[pi_offset+i].alignment = 4;
e590adfd2b35ae Sakthivel K 2013-02-27 353
e590adfd2b35ae Sakthivel K 2013-02-27 354 if (ent->driver_data != chip_8001) {
e590adfd2b35ae Sakthivel K 2013-02-27 355 /* MPI Memory region 6 Outbound queues */
05c6c029a44d9f Viswas G 2020-10-05 356 pm8001_ha->memoryMap.region[ob_offset+i].num_elements =
e590adfd2b35ae Sakthivel K 2013-02-27 357 PM8001_MPI_QUEUE;
05c6c029a44d9f Viswas G 2020-10-05 358 pm8001_ha->memoryMap.region[ob_offset+i].element_size
05c6c029a44d9f Viswas G 2020-10-05 359 = 128;
05c6c029a44d9f Viswas G 2020-10-05 360 pm8001_ha->memoryMap.region[ob_offset+i].total_len =
e590adfd2b35ae Sakthivel K 2013-02-27 361 PM8001_MPI_QUEUE * 128;
05c6c029a44d9f Viswas G 2020-10-05 362 pm8001_ha->memoryMap.region[ob_offset+i].alignment
05c6c029a44d9f Viswas G 2020-10-05 363 = 128;
e590adfd2b35ae Sakthivel K 2013-02-27 364 } else {
e590adfd2b35ae Sakthivel K 2013-02-27 365 /* MPI Memory region 6 Outbound queues */
05c6c029a44d9f Viswas G 2020-10-05 366 pm8001_ha->memoryMap.region[ob_offset+i].num_elements =
e590adfd2b35ae Sakthivel K 2013-02-27 367 PM8001_MPI_QUEUE;
05c6c029a44d9f Viswas G 2020-10-05 368 pm8001_ha->memoryMap.region[ob_offset+i].element_size
05c6c029a44d9f Viswas G 2020-10-05 369 = 64;
05c6c029a44d9f Viswas G 2020-10-05 370 pm8001_ha->memoryMap.region[ob_offset+i].total_len =
e590adfd2b35ae Sakthivel K 2013-02-27 371 PM8001_MPI_QUEUE * 64;
05c6c029a44d9f Viswas G 2020-10-05 372 pm8001_ha->memoryMap.region[ob_offset+i].alignment = 64;
e590adfd2b35ae Sakthivel K 2013-02-27 373 }
dbf9bfe615717d jack wang 2009-10-14 374
e590adfd2b35ae Sakthivel K 2013-02-27 375 }
dbf9bfe615717d jack wang 2009-10-14 376 /* Memory region write DMA*/
dbf9bfe615717d jack wang 2009-10-14 377 pm8001_ha->memoryMap.region[NVMD].num_elements = 1;
dbf9bfe615717d jack wang 2009-10-14 378 pm8001_ha->memoryMap.region[NVMD].element_size = 4096;
dbf9bfe615717d jack wang 2009-10-14 379 pm8001_ha->memoryMap.region[NVMD].total_len = 4096;
dbf9bfe615717d jack wang 2009-10-14 380
1c75a6796ea8b1 Sakthivel K 2013-03-19 381 /* Memory region for fw flash */
1c75a6796ea8b1 Sakthivel K 2013-03-19 382 pm8001_ha->memoryMap.region[FW_FLASH].total_len = 4096;
1c75a6796ea8b1 Sakthivel K 2013-03-19 383
d078b5117f18dc Anand Kumar Santhanam 2013-09-04 384 pm8001_ha->memoryMap.region[FORENSIC_MEM].num_elements = 1;
d078b5117f18dc Anand Kumar Santhanam 2013-09-04 385 pm8001_ha->memoryMap.region[FORENSIC_MEM].total_len = 0x10000;
d078b5117f18dc Anand Kumar Santhanam 2013-09-04 386 pm8001_ha->memoryMap.region[FORENSIC_MEM].element_size = 0x10000;
d078b5117f18dc Anand Kumar Santhanam 2013-09-04 387 pm8001_ha->memoryMap.region[FORENSIC_MEM].alignment = 0x10000;
05c6c029a44d9f Viswas G 2020-10-05 388 for (i = 0; i < pm8001_ha->max_memcnt; i++) {
dbf9bfe615717d jack wang 2009-10-14 389 if (pm8001_mem_alloc(pm8001_ha->pdev,
dbf9bfe615717d jack wang 2009-10-14 390 &pm8001_ha->memoryMap.region[i].virt_ptr,
dbf9bfe615717d jack wang 2009-10-14 391 &pm8001_ha->memoryMap.region[i].phys_addr,
dbf9bfe615717d jack wang 2009-10-14 392 &pm8001_ha->memoryMap.region[i].phys_addr_hi,
dbf9bfe615717d jack wang 2009-10-14 393 &pm8001_ha->memoryMap.region[i].phys_addr_lo,
dbf9bfe615717d jack wang 2009-10-14 394 pm8001_ha->memoryMap.region[i].total_len,
dbf9bfe615717d jack wang 2009-10-14 395 pm8001_ha->memoryMap.region[i].alignment) != 0) {
40e8b2825df972 Joe Perches 2020-11-20 396 pm8001_dbg(pm8001_ha, FAIL,
40e8b2825df972 Joe Perches 2020-11-20 397 "Mem%d alloc failed\n",
40e8b2825df972 Joe Perches 2020-11-20 398 i);
dbf9bfe615717d jack wang 2009-10-14 @399 goto err_out;
dbf9bfe615717d jack wang 2009-10-14 400 }
dbf9bfe615717d jack wang 2009-10-14 401 }
dbf9bfe615717d jack wang 2009-10-14 402
27bc43bd7c42b3 Viswas G 2020-10-05 403 /* Memory region for devices*/
27bc43bd7c42b3 Viswas G 2020-10-05 404 pm8001_ha->devices = kzalloc(PM8001_MAX_DEVICES
27bc43bd7c42b3 Viswas G 2020-10-05 405 * sizeof(struct pm8001_device), GFP_KERNEL);
27bc43bd7c42b3 Viswas G 2020-10-05 406 if (!pm8001_ha->devices) {
27bc43bd7c42b3 Viswas G 2020-10-05 407 rc = -ENOMEM;
27bc43bd7c42b3 Viswas G 2020-10-05 408 goto err_out_nodev;
27bc43bd7c42b3 Viswas G 2020-10-05 409 }
dbf9bfe615717d jack wang 2009-10-14 410 for (i = 0; i < PM8001_MAX_DEVICES; i++) {
aa9f8328fc5146 James Bottomley 2013-05-07 411 pm8001_ha->devices[i].dev_type = SAS_PHY_UNUSED;
dbf9bfe615717d jack wang 2009-10-14 412 pm8001_ha->devices[i].id = i;
dbf9bfe615717d jack wang 2009-10-14 413 pm8001_ha->devices[i].device_id = PM8001_MAX_DEVICES;
bf7761c96c9e23 Viswas G 2020-11-02 414 atomic_set(&pm8001_ha->devices[i].running_req, 0);
dbf9bfe615717d jack wang 2009-10-14 415 }
dbf9bfe615717d jack wang 2009-10-14 416 pm8001_ha->flags = PM8001F_INIT_TIME;
dbf9bfe615717d jack wang 2009-10-14 417 /* Initialize tags */
dbf9bfe615717d jack wang 2009-10-14 418 pm8001_tag_init(pm8001_ha);
dbf9bfe615717d jack wang 2009-10-14 419 return 0;
27bc43bd7c42b3 Viswas G 2020-10-05 420
05c6c029a44d9f Viswas G 2020-10-05 421 err_out_shost:
05c6c029a44d9f Viswas G 2020-10-05 422 scsi_remove_host(pm8001_ha->shost);
27bc43bd7c42b3 Viswas G 2020-10-05 423 err_out_nodev:
27bc43bd7c42b3 Viswas G 2020-10-05 424 for (i = 0; i < pm8001_ha->max_memcnt; i++) {
27bc43bd7c42b3 Viswas G 2020-10-05 425 if (pm8001_ha->memoryMap.region[i].virt_ptr != NULL) {
27bc43bd7c42b3 Viswas G 2020-10-05 426 pci_free_consistent(pm8001_ha->pdev,
27bc43bd7c42b3 Viswas G 2020-10-05 427 (pm8001_ha->memoryMap.region[i].total_len +
27bc43bd7c42b3 Viswas G 2020-10-05 428 pm8001_ha->memoryMap.region[i].alignment),
27bc43bd7c42b3 Viswas G 2020-10-05 429 pm8001_ha->memoryMap.region[i].virt_ptr,
27bc43bd7c42b3 Viswas G 2020-10-05 430 pm8001_ha->memoryMap.region[i].phys_addr);
27bc43bd7c42b3 Viswas G 2020-10-05 431 }
27bc43bd7c42b3 Viswas G 2020-10-05 432 }
dbf9bfe615717d jack wang 2009-10-14 433 err_out:
dbf9bfe615717d jack wang 2009-10-14 434 return 1;
dbf9bfe615717d jack wang 2009-10-14 435 }
dbf9bfe615717d jack wang 2009-10-14 436
:::::: The code at line 399 was first introduced by commit
:::::: dbf9bfe615717d1145f263c0049fe2328e6ed395 [SCSI] pm8001: add SAS/SATA HBA driver
:::::: TO: jack wang <jack_wang(a)usish.com>
:::::: CC: James Bottomley <James.Bottomley(a)suse.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months