From: kernel test robot <lkp@intel.com>
To: Ben Skeggs <bskeggs@redhat.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [skeggsb-nouveau:01.03-gsp-ada 183/193] drivers/gpu/drm/nouveau/nvkm/subdev/gsp/fwsec.c:172:1: warning: no previous prototype for 'nvkm_gsp_fwsec_v2'
Date: Mon, 13 Feb 2023 17:39:07 +0800 [thread overview]
Message-ID: <202302131701.JEMroxCt-lkp@intel.com> (raw)
tree: https://gitlab.freedesktop.org/skeggsb/nouveau 01.03-gsp-ada
head: ab3448c2873e0fbcf1fd710cccb52dc548bdf449
commit: e5a4b3a2f16e4dac606a44ae4a3ab43240c0fca8 [183/193] drm/nouveau/gsp/tu102-: add support for booting GSP-RM
config: sparc-allyesconfig (https://download.01.org/0day-ci/archive/20230213/202302131701.JEMroxCt-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add skeggsb-nouveau https://gitlab.freedesktop.org/skeggsb/nouveau
git fetch --no-tags skeggsb-nouveau 01.03-gsp-ada
git checkout e5a4b3a2f16e4dac606a44ae4a3ab43240c0fca8
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc SHELL=/bin/bash drivers/gpu/drm/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202302131701.JEMroxCt-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/nouveau/nvkm/subdev/gsp/fwsec.c:172:1: warning: no previous prototype for 'nvkm_gsp_fwsec_v2' [-Wmissing-prototypes]
172 | nvkm_gsp_fwsec_v2(struct nvkm_gsp *gsp, const char *name,
| ^~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/nouveau/nvkm/subdev/gsp/fwsec.c:222:1: warning: no previous prototype for 'nvkm_gsp_fwsec_v3' [-Wmissing-prototypes]
222 | nvkm_gsp_fwsec_v3(struct nvkm_gsp *gsp, const char *name,
| ^~~~~~~~~~~~~~~~~
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/tu102.c: In function 'tu102_gsp_booter_ctor':
>> drivers/gpu/drm/nouveau/nvkm/subdev/gsp/tu102.c:40:29: warning: variable 'meta' set but not used [-Wunused-but-set-variable]
40 | u32 loc, sig, cnt, *meta;
| ^~~~
vim +/nvkm_gsp_fwsec_v2 +172 drivers/gpu/drm/nouveau/nvkm/subdev/gsp/fwsec.c
170
171 int
> 172 nvkm_gsp_fwsec_v2(struct nvkm_gsp *gsp, const char *name,
173 const struct nvkm_falcon_ucode_desc_v2 *desc, u32 size, u32 init_cmd,
174 struct nvkm_falcon_fw *fw)
175 {
176 struct nvkm_subdev *subdev = &gsp->subdev;
177 const struct firmware *bl;
178 const struct nvfw_bin_hdr *hdr;
179 const struct nvfw_bl_desc *bld;
180 int ret;
181
182 /* Build ucode. */
183 ret = nvkm_falcon_fw_ctor(gsp->func->fwsec, name, subdev->device, true,
184 (u8 *)desc + size, desc->IMEMLoadSize + desc->DMEMLoadSize,
185 &gsp->falcon, fw);
186 if (WARN_ON(ret))
187 return ret;
188
189 fw->nmem_base_img = 0;
190 fw->nmem_base = desc->IMEMPhysBase;
191 fw->nmem_size = desc->IMEMLoadSize - desc->IMEMSecSize;
192
193 fw->imem_base_img = 0;
194 fw->imem_base = desc->IMEMSecBase;
195 fw->imem_size = desc->IMEMSecSize;
196
197 fw->dmem_base_img = desc->DMEMOffset;
198 fw->dmem_base = desc->DMEMPhysBase;
199 fw->dmem_size = desc->DMEMLoadSize;
200
201 /* Bootloader. */
202 ret = nvkm_firmware_get(subdev, "acr/bl", 0, &bl);
203 if (ret)
204 return ret;
205
206 hdr = nvfw_bin_hdr(subdev, bl->data);
207 bld = nvfw_bl_desc(subdev, bl->data + hdr->header_offset);
208
209 fw->boot_addr = bld->start_tag << 8;
210 fw->boot_size = bld->code_size;
211 fw->boot = kmemdup(bl->data + hdr->data_offset + bld->code_off, fw->boot_size, GFP_KERNEL);
212 if (!fw->boot)
213 ret = -ENOMEM;
214
215 nvkm_firmware_put(bl);
216
217 /* Patch in interface data. */
218 return nvkm_gsp_fwsec_patch(gsp, fw, desc->InterfaceOffset, init_cmd);
219 }
220
221 int
> 222 nvkm_gsp_fwsec_v3(struct nvkm_gsp *gsp, const char *name,
223 const struct nvkm_falcon_ucode_desc_v3 *desc, u32 size, u32 init_cmd,
224 struct nvkm_falcon_fw *fw)
225 {
226 struct nvkm_device *device = gsp->subdev.device;
227 struct nvkm_bios *bios = device->bios;
228 int ret;
229
230 /* Build ucode. */
231 ret = nvkm_falcon_fw_ctor(gsp->func->fwsec, name, device, true,
232 (u8 *)desc + size, desc->IMEMLoadSize + desc->DMEMLoadSize,
233 &gsp->falcon, fw);
234 if (WARN_ON(ret))
235 return ret;
236
237 fw->imem_base_img = 0;
238 fw->imem_base = desc->IMEMPhysBase;
239 fw->imem_size = desc->IMEMLoadSize;
240 fw->dmem_base_img = desc->IMEMLoadSize;
241 fw->dmem_base = desc->DMEMPhysBase;
242 fw->dmem_size = ALIGN(desc->DMEMLoadSize, 256);
243 fw->dmem_sign = desc->PKCDataOffset;
244 fw->boot_addr = 0;
245 fw->fuse_ver = desc->SignatureVersions;
246 fw->ucode_id = desc->UcodeId;
247 fw->engine_id = desc->EngineIdMask;
248
249 /* Patch in signature. */
250 ret = nvkm_falcon_fw_sign(fw, fw->dmem_base_img + desc->PKCDataOffset, 96 * 4,
251 nvbios_pointer(bios, 0), desc->SignatureCount,
252 (u8 *)desc + 0x2c - (u8 *)nvbios_pointer(bios, 0), 0, 0);
253 if (WARN_ON(ret))
254 return ret;
255
256 /* Patch in interface data. */
257 return nvkm_gsp_fwsec_patch(gsp, fw, desc->InterfaceOffset, init_cmd);
258 }
259
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
reply other threads:[~2023-02-13 9:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202302131701.JEMroxCt-lkp@intel.com \
--to=lkp@intel.com \
--cc=bskeggs@redhat.com \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.