From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 22ABCC4321E for ; Thu, 1 Dec 2022 15:28:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=T0Lwvebcan+HCX82XuReJy1To1Kut+fTFdm4GnEsWb8=; b=Sr20IlYVmMaWSo QAB7YDn9vaEWLs/c4tYsgwSb9xNbqfdR6vvFx13k6TGAnMB3sMhvrzhh5Zi8B3m4TzwwyDPKZnmXv nvGwhTQei7Vtuf2uly7FuIl1I1tQLFDVXuiV90dEMNZq9ynOgw5ja6Virjh/yeCOx4iXWBqnfL+LU tcK0InrE48SY44IWmJdmKKTMIDX9uowMaqmBxJwTdE68lxOyY+e3auMw8TTSqrcnL9ACeodAHt7ZM Pj8Vt0ldsCsUQoxDm6Dcgq4nGHqsGw2Zia2hZEkT8qwEbfCTks3bnFPrIXeQ5qjnTc1LhizOPyrrB 5vCh4/Wm7uRbu7No1ZQQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p0lTF-008Da0-FU; Thu, 01 Dec 2022 15:27:29 +0000 Received: from fudo.makrotopia.org ([2a07:2ec0:3002::71]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p0lTA-008DX1-VN; Thu, 01 Dec 2022 15:27:27 +0000 Received: from local by fudo.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.94.2) (envelope-from ) id 1p0lSo-0002JZ-28; Thu, 01 Dec 2022 16:27:02 +0100 Date: Thu, 1 Dec 2022 15:26:54 +0000 From: Daniel Golle To: Thorsten Leemhuis Cc: Nick , Matthias Brugger , jia-wei.chang@mediatek.com, rex-bc.chen@mediatek.com, angelogioacchino.delregno@collabora.com, viresh.kumar@linaro.org, Frank Wunderlich , "regressions@lists.linux.dev" , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Project_Global_Chrome_Upstream_Group@mediatek.com, =?iso-8859-1?B?SPxobiw=?= Thomas Subject: Re: Kernel Kernel bug caused by (cpufreq: mediatek: Refine mtk_cpufreq_voltage_tracking()) on Banana Pi R64 (MT7622) Message-ID: References: <930778a1-5e8b-6df6-3276-42dcdadaf682@systemli.org> <02c2c955-940b-b315-0474-85d0eddad7a3@leemhuis.info> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <02c2c955-940b-b315-0474-85d0eddad7a3@leemhuis.info> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221201_072725_213886_7CC30519 X-CRM114-Status: GOOD ( 27.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Dec 01, 2022 at 04:08:50PM +0100, Thorsten Leemhuis wrote: > Hi, this is your Linux kernel regression tracker. Top-posting for once, > to make this easily accessible to everyone. > = > I noticed this regression didn't make any progress > = > Matthias, is that because Nick didn't exactly do what you asked for (he > afaics tried -next, but nevertheless patches it)? Or is there another > reason? I've also tried this on plain linux-next, also using the BPi-R64 and can confirm the issue exists also there, without any additional patches applied. Reverting commit 6a17b3876b ("cpufreq: mediatek: Refine mtk_cpufreq_voltage= _tracking()") fixes the issue. Unfortunately, by now it no longer reverts cleanly and requires a tiny amount of manual clean-up... > = > Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat) > = > P.S.: As the Linux kernel's regression tracker I deal with a lot of > reports and sometimes miss something important when writing mails like > this. If that's the case here, don't hesitate to tell me in a public > reply, it's in everyone's interest to set the public record straight. > = > On 15.11.22 20:44, Nick wrote: > > I used now the linux-next kernel tree (with > > https://patchwork.ozlabs.org/project/linux-mtd/list/?series=3D327227 so > > single uImage.FIT will work). > > > > Same issue: > > = > >> [ 0.886209] Kernel BUG at regulator_check_voltage+0xb0/0xf0 [verbose > >> debug info unavailable] > >> > >> [ 0.894663] Internal error: Oops - BUG: 00000000f2000800 [#1] SMP > >> > >> [ 0.900759] Modules linked in: > >> > >> [ 0.903819] CPU: 1 PID: 79 Comm: kworker/1:1 Tainted: G S > >> 6.1.0-rc5-next-20221115+ #0 > >> > >> [ 0.904360] pstore: Using crash dump compression: deflate > >> > >> [ 0.913038] Hardware name: Bananapi BPI-R64 (DT) > >> > >> [ 0.913043] Workqueue: events dbs_work_handler > >> > >> [ 0.913056] pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS > >> BTYPE=3D--) > >> > >> [ 0.913063] pc : regulator_check_voltage+0xb0/0xf0 > >> > >> [ 0.913070] lr : regulator_set_voltage_unlocked+0x88/0x110 > >> > >> [ 0.913077] sp : ffffffc00cef3b30 > >> > >> [ 0.913080] x29: ffffffc00cef3b30 x28: ffffff8006f6f800 x27: > >> ffffff8006f6fa00 > >> > >> [ 0.931243] mtk-pcie 1a143000.pcie: host bridge /pcie@1a143000 ranges: > >> > >> [ 0.934474] > >> > >> [ 0.934475] x26: 00000000001312d0 x25: 0000000000000024 > >> > >> [ 0.939298] mtk-pcie 1a143000.pcie: Parsing ranges property... > >> > >> [ 0.944730] x24: 0000000000118c30 > >> > >> [ 0.948038] mtk-pcie 1a143000.pcie: MEM 0x0020000000..0x0027ffffff -> > >> 0x0020000000 > >> > >> [ 0.955155] > >> > >> [ 0.955157] x23: 0000000000149970 x22: ffffff8000861800 x21: > >> ffffff8006f6f800 > >> > >> [ 0.955166] x20: 00000000001312d0 x19: 0000000000000000 x18: > >> 00000000cfad1bd3 > >> > >> [ 0.955174] x17: 000000000000000c x16: 0000000000000005 x15: > >> 0000000000000000 > >> > >> [ 1.008473] x14: 0000000000000000 x13: 0000000000000165 x12: > >> 0101010101010101 > >> > >> [ 1.015608] x11: 00000000017d7840 x10: 0000000000000850 x9 : > >> ffffffc00cef3900 > >> > >> [ 1.017014] mmc0: new HS200 MMC card at address 0001 > >> > >> [ 1.022740] x8 : ffffff8005ee9f30 x7 : 0000000000000001 x6 : > >> 00000000001312d0 > >> > >> [ 1.022748] x5 : 0000000000118c30 x4 : 0000000000000000 x3 : > >> 0000000000000000 > >> > >> [ 1.022756] x2 : ffffffc00cef3b68 x1 : ffffffc00cef3b6c > >> > >> [ 1.029034] mmcblk0: mmc0:0001 008G30 7.28 GiB > >> > >> [ 1.034833] x0 : ffffff8000861800 > >> > >> [ 1.034838] Call trace: > >> > >> [ 1.044528] Alternate GPT is invalid, using primary GPT. > >> > >> [ 1.047175] regulator_check_voltage+0xb0/0xf0 > >> > >> [ 1.052603] FIT: Selected configuration: "config-1" (OpenWrt > >> bananapi_bpi-r64) > >> > >> [ 1.055090] regulator_set_voltage+0x3c/0x64 > >> > >> [ 1.057539] FIT: kernel sub-image 0x00001000..0x005200f9 "kernel-1" > >> (ARM64 OpenWrt Linux-6.1-rc2) > >> > >> [ 1.062824] mtk_cpufreq_voltage_tracking+0x12c/0x27c > >> > >> [ 1.062831] mtk_cpufreq_set_target+0x1c4/0x350 > >> > >> [ 1.062837] __cpufreq_driver_target+0x2dc/0x660 > >> > >> [ 1.067289] FIT: flat_dt sub-image 0x00521000..0x005272d9 "fdt-1" > >> (ARM64 OpenWrt bananapi_bpi-r64 device tree blob) > >> > >> [ 1.074484] od_dbs_update+0xb8/0x19c > >> > >> [ 1.074490] dbs_work_handler+0x3c/0x7c > >> > >> [ 1.078774] FIT: filesystem sub-image 0x00528000..0x00829fff > >> "rootfs-1" (ARM64 OpenWrt bananapi_bpi-r64 rootfs) > >> > >> [ 1.088560] process_one_work+0x200/0x3a0 > >> > >> [ 1.093624] mmcblk0: p1 p2 p3 p4 p65(rootfs-1) p66(rootfs_data) p128 > >> > >> [ 1.098116] worker_thread+0x170/0x4c0 > >> > >> [ 1.104575] mmcblk0boot0: mmc0:0001 008G30 4.00 MiB > >> > >> [ 1.114009] kthread+0xd4/0xe0 > >> > >> [ 1.114016] ret_from_fork+0x10/0x20 > >> > >> [ 1.114028] Code: 6b04001f 54fffe6b 2a0003e4 17fffff3 (d4210000) > >> > >> [ 1.114033] ---[ end trace 0000000000000000 ]--- > >> [ 0.878926] ------------[ cut here ]------------ > >> > > = > > Full log: > > https://gist.github.com/PolynomialDivision/4a555079887b288f4795b28eb360= 7aa9 > > = > > Big thanks to Daniel helping me to build a vanilla kernel with OpenWrt > > build system. > > = > > Bests > > Nick > > = > > On 11/10/22 12:26, Matthias Brugger wrote: > >> Hi Nick, > >> > >> On 09/11/2022 14:35, Nick wrote: > >>> Hi, > >>> while trying to bump OpenWrt Kernel to 6.1rc2 I noticed that the > >>> kernel is crashing while booting on a Banana Pi R64 (MT7622): > >>> > >>>> [=A0=A0=A0 1.055565] ------------[ cut here ]------------ > >>>> [=A0=A0=A0 1.060204] Kernel BUG at regulator_check_voltage+0xb0/0xf0 > >>>> [verbose debug info unavailable] > >>>> [=A0=A0=A0 1.062418] mtk-pcie 1a143000.pcie: host bridge /pcie@1a143= 000 > >>>> ranges: > >>>> [=A0=A0=A0 1.068656] Internal error: Oops - BUG: 00000000f2000800 [#= 1] SMP > >>>> [=A0=A0=A0 1.075248] mtk-pcie 1a143000.pcie: Parsing ranges property= ... > >>>> [=A0=A0=A0 1.081257] Modules linked in: > >>>> [=A0=A0=A0 1.081264] CPU: 1 PID: 328 Comm: kworker/1:7 Tainted: G > >>>> S=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 6.1-rc2 #0 > >>>> [=A0=A0=A0 1.087088] mtk-pcie 1a143000.pcie:=A0=A0=A0=A0=A0 MEM > >>>> 0x0020000000..0x0027ffffff -> 0x0020000000 > >>>> [=A0=A0=A0 1.090126] Hardware name: Bananapi BPI-R64 (DT) > >>>> [=A0=A0=A0 1.110541] Workqueue: events dbs_work_handler > >>>> [=A0=A0=A0 1.114988] pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT= -SSBS > >>>> BTYPE=3D--) > >>>> [=A0=A0=A0 1.121944] pc : regulator_check_voltage+0xb0/0xf0 > >>>> [=A0=A0=A0 1.126728] lr : regulator_set_voltage_unlocked+0x88/0x110 > >>>> [=A0=A0=A0 1.129638] mmc1: host does not support reading read-only s= witch, > >>>> assuming write-enable > >>>> [=A0=A0=A0 1.132207] sp : ffffffc00956bb30 > >>>> [=A0=A0=A0 1.132209] x29: ffffffc00956bb30 x28: ffffff8000efb400 x27: > >>>> 0000000000000024 > >>>> [=A0=A0=A0 1.132219] x26: 00000000001312d0 x25: 0000000000118c30 x24: > >>>> 00000000001312d0 > >>>> [=A0=A0=A0 1.132227] x23: 0000000000149970 > >>>> [=A0=A0=A0 1.146036] mmc1: new high speed SDHC card at address e624 > >>>> [=A0=A0=A0 1.150642]=A0 x22: ffffff800038f800 > >>>> [=A0=A0=A0 1.159192] mmcblk1: mmc1:e624 SL16G 14.8 GiB > >>>> [=A0=A0=A0 1.161068]=A0 x21: ffffff8000efb100 > >>>> [=A0=A0=A0 1.161072] x20: 00000000001312d0 > >>>> [=A0=A0=A0 1.175424] GPT:partition_entry_array_crc32 values don't ma= tch: > >>>> 0xa0b5ce6d !=3D 0xab54d286 > >>>> [=A0=A0=A0 1.177757]=A0 x19: 0000000000000000 x18: 00000000799b2550 > >>>> [=A0=A0=A0 1.181067] GPT:Primary header thinks Alt. header is not at= the > >>>> end of the disk. > >>>> [=A0=A0=A0 1.189143] x17: 0000000000000003 x16: 0000000000000001 x15: > >>>> 0000000000000000 > >>>> [=A0=A0=A0 1.189151] x14: 0000000000000000 x13: 0000000000000146 x12: > >>>> 00000000fa83b2da > >>>> [=A0=A0=A0 1.189159] x11: 000000000000013d x10: 0000000000000850 > >>>> [=A0=A0=A0 1.194472] GPT:305184 !=3D 31116287 > >>>> [=A0=A0=A0 1.201842]=A0 x9 : ffffffc00956b910 > >>>> [=A0=A0=A0 1.201846] x8 : ffffff8000b9edf0 x7 : 0000000000000001 > >>>> [=A0=A0=A0 1.208970] GPT:Alternate GPT header not at the end of the = disk. > >>>> [=A0=A0=A0 1.216092]=A0 x6 : 00000000001312d0 > >>>> [=A0=A0=A0 1.216095] x5 : 0000000000118c30 x4 : 0000000000000000 x3 : > >>>> 0000000000000000 > >>>> [=A0=A0=A0 1.216103] x2 : ffffffc00956bb68 x1 : ffffffc00956bb6c > >>>> [=A0=A0=A0 1.221321] GPT:305184 !=3D 31116287 > >>>> [=A0=A0=A0 1.224706]=A0 x0 : ffffff800038f800 > >>>> [=A0=A0=A0 1.228095] GPT: Use GNU Parted to correct GPT errors. > >>>> [=A0=A0=A0 1.233307] > >>>> [=A0=A0=A0 1.233309] Call trace: > >>>> [=A0=A0=A0 1.233312]=A0 regulator_check_voltage+0xb0/0xf0 > >>>> [=A0=A0=A0 1.242680] FIT: Selected configuration: > >>>> "config-mt7622-bananapi-bpi-r64-pcie1" (OpenWrt bananapi_bpi-r64 > >>>> with mt7622-bananapi-bpi-r64-pcie1) > >>>> [=A0=A0=A0 1.242694]=A0 regulator_set_voltage+0x3c/0x64 > >>>> [=A0=A0=A0 1.249831] FIT:=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 kernel sub-i= mage > >>>> 0x00001000..0x0052fd0a "kernel-1" (ARM64 OpenWrt Linux-6.1-rc2) > >>>> [=A0=A0=A0 1.255030]=A0 mtk_cpufreq_voltage_tracking+0x11c/0x26c > >>>> [=A0=A0=A0 1.255039]=A0 mtk_cpufreq_set_target+0x1c4/0x350 > >>>> [=A0=A0=A0 1.258444] FIT:=A0=A0=A0=A0=A0=A0=A0=A0=A0 flat_dt sub-ima= ge > >>>> 0x00530000..0x005380c5 "fdt-1" (ARM64 OpenWrt bananapi_bpi-r64 > >>>> device tree blob) > >>>> [=A0=A0=A0 1.261820]=A0 __cpufreq_driver_target+0x2f4/0x674 > >>>> [=A0=A0=A0 1.261826]=A0 od_dbs_update+0xb8/0x19c > >>>> [=A0=A0=A0 1.266969] FIT:=A0=A0=A0=A0=A0=A0=A0=A0=A0 flat_dt sub-ima= ge > >>>> 0x00539000..0x0053911a "fdt-mt7622-bananapi-bpi-r64-pcie1" (ARM64 > >>>> OpenWrt bananapi_bpi-r64 device tree overlay > >>>> mt7622-bananapi-bpi-r64-pcie1) > >>>> [=A0=A0=A0 1.268431]=A0 dbs_work_handler+0x3c/0x7c > >>>> [=A0=A0=A0 1.270883] FIT:=A0=A0=A0=A0=A0=A0=A0=A0=A0 flat_dt sub-ima= ge > >>>> 0x0053a000..0x0053a20f "fdt-mt7622-bananapi-bpi-r64-sata" (ARM64 > >>>> OpenWrt bananapi_bpi-r64 device tree overlay > >>>> mt7622-bananapi-bpi-r64-sata) > >>>> [=A0=A0=A0 1.275297]=A0 process_one_work+0x200/0x3a0 > >>>> [=A0=A0=A0 1.287998] FIT:=A0=A0=A0=A0=A0=A0 filesystem sub-image > >>>> 0x0053b000..0x00859fff "rootfs-1" (ARM64 OpenWrt bananapi_bpi-r64 > >>>> rootfs) > >>>> [=A0=A0=A0 1.292237]=A0 worker_thread+0x170/0x4c0 > >>>> [=A0=A0=A0 1.292244]=A0 kthread+0xd4/0xe0 > >>>> [=A0=A0=A0 1.302066] FIT: selecting configured loadable "rootfs-1" t= o be > >>>> root filesystem > >>>> [=A0=A0=A0 1.307092]=A0 ret_from_fork+0x10/0x20 > >>>> [=A0=A0=A0 1.311631]=A0 mmcblk1: p1 p2 p3 p4 p5 p6 p65(rootfs-1) > >>>> p66(rootfs_data) p128 > >>>> [=A0=A0=A0 1.322903] Code: 6b04001f 54fffe6b 2a0003e4 17fffff3 (d421= 0000) > >>>> [=A0=A0=A0 1.413322] ---[ end trace 0000000000000000 ]--- > >>> The complete log can be found here: > >>> https://gist.githubusercontent.com/PolynomialDivision/395d009c84b426d= 780549c5fa1f64ff1/raw/886d621d2bf6f03429586adf8a14a6c37c8d8a7d/mt7622-6-1.l= og > >>> > >>> Reverting commit "cpufreq: mediatek: Refine > >>> mtk_cpufreq_voltage_tracking()" fixes the kernel bug: > >>> https://github.com/torvalds/linux/commit/6a17b3876bc8303612d7ad59ecf7= cbc0db418bcd > >>> > >>> The revert commit can be found here: > >>> https://github.com/PolynomialDivision/openwrt/commit/1df941d0334000e3= aced43b7d50cdac0da8bf427 > >>> > >>> The branch I use to build the 6.1rc2 on a Banana Pi R64 can be found > >>> here: > >>> https://github.com/PolynomialDivision/openwrt/commits/bump-mt7622-reb= ase > >>> > >> > >> Thanks for the report. > >> Could you test with a plain upstream kernel? That would help us to > >> verify that this is a upstream problem and not introduced by some > >> openwrt patches. > >> > >> Regards, > >> Matthias > = > #regzbot ignore-activity _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel