Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to make kernel on debug/cros-v4.14-rebase #231

Closed
keqiaozhang opened this issue Oct 31, 2018 · 6 comments
Closed

Failed to make kernel on debug/cros-v4.14-rebase #231

keqiaozhang opened this issue Oct 31, 2018 · 6 comments
Labels
bug Something isn't working P1 Blocker bugs or important features

Comments

@keqiaozhang
Copy link
Collaborator

We use chrome default kernel config to build the kernel, but failed with 20 errors.

error log:
/mnt/host/source/src/third_party/kernel/v4.14/sound/soc/codecs/max98373.c:115:43: error: no member named 'codec' in 'struct snd_soc_dai'
struct snd_soc_codec *codec = codec_dai->codec;
~~~~~~~~~ ^
/mnt/host/source/src/third_party/kernel/v4.14/sound/soc/codecs/max98373.c:116:35: error: implicit declaration of function 'snd_soc_codec_get_drvdata' [-Werr,-Wimplicit-function-declaration]
struct max98373_priv *max98373 = snd_soc_codec_get_drvdata(codec);
^
/mnt/host/source/src/third_party/kernel/v4.14/sound/soc/codecs/max98373.c:116:35: error: this function declaration is not a prototype [-Werror,-Wstrict-protypes]
/mnt/host/source/src/third_party/kernel/v4.14/sound/soc/codecs/max98373.c:116:24: error: incompatible integer to pointer conversion initializing 'struct max373_priv *' with an expression of type 'int' [-Werror,-Wint-conversion]
struct max98373_priv *max98373 = snd_soc_codec_get_drvdata(codec);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/host/source/src/third_party/kernel/v4.14/sound/soc/codecs/max98373.c:120:15: error: incomplete definition of type 'struct snd_soc_codec'
dev_dbg(codec->dev, "%s: fmt 0x%08X\n", func, fmt);
~~~~~^
/mnt/host/source/src/third_party/kernel/v4.14/include/linux/device.h:1368:26: note: expanded from macro 'dev_dbg'
dev_printk(KERN_DEBUG, dev, format, ##arg);
^~~
/mnt/host/source/src/third_party/kernel/v4.14/sound/soc/codecs/max98373.c:115:9: note: forward declaration of 'struct snd_soc_codec'
struct snd_soc_codec *codec = codec_dai->codec;
^
/mnt/host/source/src/third_party/kernel/v4.14/sound/soc/codecs/max98373.c:129:16: error: incomplete definition of type 'struct snd_soc_codec'
dev_err(codec->dev, "DAI invert mode unsupported\n");
~~~~~^
/mnt/host/source/src/third_party/kernel/v4.14/sound/soc/codecs/max98373.c:115:9: note: forward declaration of 'struct snd_soc_codec'
struct snd_soc_codec *codec = codec_dai->codec;
^
/mnt/host/source/src/third_party/kernel/v4.14/sound/soc/codecs/max98373.c:180:38: error: declaration of 'struct snd_soc_codec' will not be visible outside othis function [-Werror,-Wvisibility]
static int max98373_set_clock(struct snd_soc_codec *codec,
^
/mnt/host/source/src/third_party/kernel/v4.14/sound/soc/codecs/max98373.c:183:35: error: implicit declaration of function 'snd_soc_codec_get_drvdata' [-Werr,-Wimplicit-function-declaration]
struct max98373_priv *max98373 = snd_soc_codec_get_drvdata(codec);
^
/mnt/host/source/src/third_party/kernel/v4.14/sound/soc/codecs/max98373.c:183:24: error: incompatible integer to pointer conversion initializing 'struct max373_priv *' with an expression of type 'int' [-Werror,-Wint-conversion]
struct max98373_priv *max98373 = snd_soc_codec_get_drvdata(codec);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/host/source/src/third_party/kernel/v4.14/sound/soc/codecs/max98373.c:192:17: error: incomplete definition of type 'struct snd_soc_codec'
dev_err(codec->dev, "format unsupported %d\n",
~~~~~^
/mnt/host/source/src/third_party/kernel/v4.14/sound/soc/codecs/max98373.c:180:38: note: forward declaration of 'struct snd_soc_codec'
static int max98373_set_clock(struct snd_soc_codec *codec,
^
/mnt/host/source/src/third_party/kernel/v4.14/sound/soc/codecs/max98373.c:209:37: error: no member named 'codec' in 'struct snd_soc_dai'
struct snd_soc_codec *codec = dai->codec;
~~~ ^
/mnt/host/source/src/third_party/kernel/v4.14/sound/soc/codecs/max98373.c:210:35: error: implicit declaration of function 'snd_soc_codec_get_drvdata' [-Werr,-Wimplicit-function-declaration]
struct max98373_priv *max98373 = snd_soc_codec_get_drvdata(codec);
^
/mnt/host/source/src/third_party/kernel/v4.14/sound/soc/codecs/max98373.c:210:24: error: incompatible integer to pointer conversion initializing 'struct max373_priv *' with an expression of type 'int' [-Werror,-Wint-conversion]
struct max98373_priv *max98373 = snd_soc_codec_get_drvdata(codec);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/host/source/src/third_party/kernel/v4.14/sound/soc/codecs/max98373.c:226:16: error: incomplete definition of type 'struct snd_soc_codec'
dev_err(codec->dev, "format unsupported %d\n",
~~~~~^
/mnt/host/source/src/third_party/kernel/v4.14/sound/soc/codecs/max98373.c:209:9: note: forward declaration of 'struct snd_soc_codec'
struct snd_soc_codec *codec = dai->codec;
^
/mnt/host/source/src/third_party/kernel/v4.14/sound/soc/codecs/max98373.c:237:15: error: incomplete definition of type 'struct snd_soc_codec'
dev_dbg(codec->dev, "format supported %d",
~~~~~^
/mnt/host/source/src/third_party/kernel/v4.14/include/linux/device.h:1368:26: note: expanded from macro 'dev_dbg'
dev_printk(KERN_DEBUG, dev, format, ##arg);
^~~
/mnt/host/source/src/third_party/kernel/v4.14/sound/soc/codecs/max98373.c:209:9: note: forward declaration of 'struct snd_soc_codec'
struct snd_soc_codec *codec = dai->codec;
^
/mnt/host/source/src/third_party/kernel/v4.14/sound/soc/codecs/max98373.c:270:16: error: incomplete definition of type 'struct snd_soc_codec'
dev_err(codec->dev, "rate %d not supported\n",
~~~~~^
/mnt/host/source/src/third_party/kernel/v4.14/sound/soc/codecs/max98373.c:209:9: note: forward declaration of 'struct snd_soc_codec'
struct snd_soc_codec *codec = dai->codec;
^
/mnt/host/source/src/third_party/kernel/v4.14/sound/soc/codecs/max98373.c:298:28: error: incompatible pointer types passing 'struct snd_soc_codec *' to parater of type 'struct snd_soc_codec *' [-Werror,-Wincompatible-pointer-types]
return max98373_set_clock(codec, params);
^~~~~
/mnt/host/source/src/third_party/kernel/v4.14/sound/soc/codecs/max98373.c:180:53: note: passing argument to parameter 'codec' here
static int max98373_set_clock(struct snd_soc_codec *codec,
^
/mnt/host/source/src/third_party/kernel/v4.14/sound/soc/codecs/max98373.c:307:37: error: no member named 'codec' in 'struct snd_soc_dai'
struct snd_soc_codec *codec = dai->codec;
~~~ ^
/mnt/host/source/src/third_party/kernel/v4.14/sound/soc/codecs/max98373.c:308:35: error: implicit declaration of function 'snd_soc_codec_get_drvdata' [-Werr,-Wimplicit-function-declaration]
struct max98373_priv *max98373 = snd_soc_codec_get_drvdata(codec);

chromeos-intel-pineview.flavour-config.txt

@keqiaozhang keqiaozhang added bug Something isn't working P1 Blocker bugs or important features labels Oct 31, 2018
@cujomalainey
Copy link

What branch are you on? Or a sha

@keqiaozhang
Copy link
Collaborator Author

@cujomalainey
Branch name:origin/debug/cros-v4.14-rebase

@ranj063
Copy link
Collaborator

ranj063 commented Oct 31, 2018

@keqiaozhang you can cherry-pick 41572b5 to fix this

@keqiaozhang
Copy link
Collaborator Author

@ranj063
Yes, kernel can build after applying 41572b5.

@plbossart
Copy link
Member

can we please close this?

@keqiaozhang
Copy link
Collaborator Author

Confirmed that this issue is fixed
Tested commit: 90eee4

aiChaoSONG pushed a commit to aiChaoSONG/linux that referenced this issue May 6, 2021
Add support for `read_iter` and `write_iter`.
bardliao pushed a commit to bardliao/linux that referenced this issue Jan 14, 2025
dm_get_plane_scale doesn't take into account plane scaled size equal to
zero, leading to a kernel oops due to division by zero. Fix by setting
out-scale size as zero when the dst size is zero, similar to what is
done by drm_calc_scale(). This issue started with the introduction of
cursor ovelay mode that uses this function to assess cursor mode changes
via dm_crtc_get_cursor_mode() before checking plane state.

[Dec17 17:14] Oops: divide error: 0000 [#1] PREEMPT SMP NOPTI
[  +0.000018] CPU: 5 PID: 1660 Comm: surface-DP-1 Not tainted 6.10.0+ thesofproject#231
[  +0.000007] Hardware name: Valve Jupiter/Jupiter, BIOS F7A0131 01/30/2024
[  +0.000004] RIP: 0010:dm_get_plane_scale+0x3f/0x60 [amdgpu]
[  +0.000553] Code: 44 0f b7 41 3a 44 0f b7 49 3e 83 e0 0f 48 0f a3 c2 73 21 69 41 28 e8 03 00 00 31 d2 41 f7 f1 31 d2 89 06 69 41 2c e8 03 00 00 <41> f7 f0 89 07 e9 d7 d8 7e e9 44 89 c8 45 89 c1 41 89 c0 eb d4 66
[  +0.000005] RSP: 0018:ffffa8df0de6b8a0 EFLAGS: 00010246
[  +0.000006] RAX: 00000000000003e8 RBX: ffff9ac65c1f6e00 RCX: ffff9ac65d055500
[  +0.000003] RDX: 0000000000000000 RSI: ffffa8df0de6b8b0 RDI: ffffa8df0de6b8b4
[  +0.000004] RBP: ffff9ac64e7a5800 R08: 0000000000000000 R09: 0000000000000a00
[  +0.000003] R10: 00000000000000ff R11: 0000000000000054 R12: ffff9ac6d0700010
[  +0.000003] R13: ffff9ac65d054f00 R14: ffff9ac65d055500 R15: ffff9ac64e7a60a0
[  +0.000004] FS:  00007f869ea00640(0000) GS:ffff9ac970080000(0000) knlGS:0000000000000000
[  +0.000004] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  +0.000003] CR2: 000055ca701becd0 CR3: 000000010e7f2000 CR4: 0000000000350ef0
[  +0.000004] Call Trace:
[  +0.000007]  <TASK>
[  +0.000006]  ? __die_body.cold+0x19/0x27
[  +0.000009]  ? die+0x2e/0x50
[  +0.000007]  ? do_trap+0xca/0x110
[  +0.000007]  ? do_error_trap+0x6a/0x90
[  +0.000006]  ? dm_get_plane_scale+0x3f/0x60 [amdgpu]
[  +0.000504]  ? exc_divide_error+0x38/0x50
[  +0.000005]  ? dm_get_plane_scale+0x3f/0x60 [amdgpu]
[  +0.000488]  ? asm_exc_divide_error+0x1a/0x20
[  +0.000011]  ? dm_get_plane_scale+0x3f/0x60 [amdgpu]
[  +0.000593]  dm_crtc_get_cursor_mode+0x33f/0x430 [amdgpu]
[  +0.000562]  amdgpu_dm_atomic_check+0x2ef/0x1770 [amdgpu]
[  +0.000501]  drm_atomic_check_only+0x5e1/0xa30 [drm]
[  +0.000047]  drm_mode_atomic_ioctl+0x832/0xcb0 [drm]
[  +0.000050]  ? __pfx_drm_mode_atomic_ioctl+0x10/0x10 [drm]
[  +0.000047]  drm_ioctl_kernel+0xb3/0x100 [drm]
[  +0.000062]  drm_ioctl+0x27a/0x4f0 [drm]
[  +0.000049]  ? __pfx_drm_mode_atomic_ioctl+0x10/0x10 [drm]
[  +0.000055]  amdgpu_drm_ioctl+0x4e/0x90 [amdgpu]
[  +0.000360]  __x64_sys_ioctl+0x97/0xd0
[  +0.000010]  do_syscall_64+0x82/0x190
[  +0.000008]  ? __pfx_drm_mode_createblob_ioctl+0x10/0x10 [drm]
[  +0.000044]  ? srso_return_thunk+0x5/0x5f
[  +0.000006]  ? drm_ioctl_kernel+0xb3/0x100 [drm]
[  +0.000040]  ? srso_return_thunk+0x5/0x5f
[  +0.000005]  ? __check_object_size+0x50/0x220
[  +0.000007]  ? srso_return_thunk+0x5/0x5f
[  +0.000005]  ? srso_return_thunk+0x5/0x5f
[  +0.000005]  ? drm_ioctl+0x2a4/0x4f0 [drm]
[  +0.000039]  ? __pfx_drm_mode_createblob_ioctl+0x10/0x10 [drm]
[  +0.000043]  ? srso_return_thunk+0x5/0x5f
[  +0.000005]  ? srso_return_thunk+0x5/0x5f
[  +0.000005]  ? __pm_runtime_suspend+0x69/0xc0
[  +0.000006]  ? srso_return_thunk+0x5/0x5f
[  +0.000005]  ? amdgpu_drm_ioctl+0x71/0x90 [amdgpu]
[  +0.000366]  ? srso_return_thunk+0x5/0x5f
[  +0.000006]  ? syscall_exit_to_user_mode+0x77/0x210
[  +0.000007]  ? srso_return_thunk+0x5/0x5f
[  +0.000005]  ? do_syscall_64+0x8e/0x190
[  +0.000006]  ? srso_return_thunk+0x5/0x5f
[  +0.000006]  ? do_syscall_64+0x8e/0x190
[  +0.000006]  ? srso_return_thunk+0x5/0x5f
[  +0.000007]  entry_SYSCALL_64_after_hwframe+0x76/0x7e
[  +0.000008] RIP: 0033:0x55bb7cd962bc
[  +0.000007] Code: 4c 89 6c 24 18 4c 89 64 24 20 4c 89 74 24 28 0f 57 c0 0f 11 44 24 30 89 c7 48 8d 54 24 08 b8 10 00 00 00 be bc 64 38 c0 0f 05 <49> 89 c7 48 83 3b 00 74 09 4c 89 c7 ff 15 62 64 99 00 48 83 7b 18
[  +0.000005] RSP: 002b:00007f869e9f4da0 EFLAGS: 00000217 ORIG_RAX: 0000000000000010
[  +0.000007] RAX: ffffffffffffffda RBX: 00007f869e9f4fb8 RCX: 000055bb7cd962bc
[  +0.000004] RDX: 00007f869e9f4da8 RSI: 00000000c03864bc RDI: 000000000000003b
[  +0.000003] RBP: 000055bb9ddcbcc0 R08: 00007f86541b9920 R09: 0000000000000009
[  +0.000004] R10: 0000000000000004 R11: 0000000000000217 R12: 00007f865406c6b0
[  +0.000003] R13: 00007f86541b5290 R14: 00007f865410b700 R15: 000055bb9ddcbc18
[  +0.000009]  </TASK>

Fixes: 1b04dcc ("drm/amd/display: Introduce overlay cursor mode")
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3729
Reported-by: Fabio Scaccabarozzi <fsvm88@gmail.com>
Co-developed-by: Fabio Scaccabarozzi <fsvm88@gmail.com>
Signed-off-by: Fabio Scaccabarozzi <fsvm88@gmail.com>
Signed-off-by: Melissa Wen <mwen@igalia.com>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit ab75a0d)
Cc: stable@vger.kernel.org
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1 Blocker bugs or important features
Projects
None yet
Development

No branches or pull requests

5 participants