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 714E2C433EF for ; Tue, 25 Jan 2022 14:50:48 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:CC:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=fJw4SpdufTxnAY6UvjWy9RoRRyFciQL7ZxjPOQeQNTQ=; b=HRofYFLUaCoMbGupdcbbyrYNWL M/ImWF4GG6p//QaKgtDHvxGO+3eEmCXM/BNAJEHu3Hx25NqQ4z/yWcf6DsOdgcA6gkaUmTGnoH3AZ RY0nV/glv2FAAqfMN7/JWLP1ZBQ3yT8kZD2ZFrjK7EIT9PFcz1rmaQqfE7RLX9/giyyH5lHDf7rvB ug1NwwJXiunK3KqmgW1zxXjRXJmhvO7olZSvhcxOi4j24aRYN27rTNdF1C8N0kNEvyQvNMPtcXW1M QKdREwVAuEKXCdAlzUZ1v1PFzfX1ILma3kKR1bvSkdFKpm2P4+KTzKrBi8Qkqcd3VkO5VZCWMxTbU KmKogmXg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCN8K-008Bwe-Q6; Tue, 25 Jan 2022 14:49:21 +0000 Received: from frasgout.his.huawei.com ([185.176.79.56]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCN8F-008Bue-J5 for linux-arm-kernel@lists.infradead.org; Tue, 25 Jan 2022 14:49:17 +0000 Received: from fraeml745-chm.china.huawei.com (unknown [172.18.147.226]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4JjqQ12PCTz67mW6; Tue, 25 Jan 2022 22:44:57 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml745-chm.china.huawei.com (10.206.15.226) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Tue, 25 Jan 2022 15:49:13 +0100 Received: from [10.47.95.36] (10.47.95.36) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Tue, 25 Jan 2022 14:49:12 +0000 Subject: Re: [BUG] drivers/perf: hisi: kernel fails to boot since commit ac4511c9364c "drivers/perf: hisi: Add identifier sysfs file" To: Wang Cheng , Zhangshaokun , "liuqi (BA)" , "will@kernel.org" , "mark.rutland@arm.com" CC: "linux-arm-kernel@lists.infradead.org" References: <20220125143541.uvgmumsd2mezdmnc@ppc.localdomain> From: John Garry Message-ID: Date: Tue, 25 Jan 2022 14:48:40 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <20220125143541.uvgmumsd2mezdmnc@ppc.localdomain> Content-Language: en-US X-Originating-IP: [10.47.95.36] X-ClientProxiedBy: lhreml744-chm.china.huawei.com (10.201.108.194) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220125_064915_997321_71EB8085 X-CRM114-Status: GOOD ( 21.21 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 25/01/2022 14:35, Wang Cheng wrote: We had a similar report some time ago: https://lore.kernel.org/linux-arm-kernel/ada98c97-1e06-5f71-0487-638f679eebf7@hisilicon.com/ Seems to be a BIOS issue. Shaokun? Thanks, John > Hi respected kernel committers, > > After upgrading from v5.10 to 5.17.0-rc1, my kernel fails to boot. By > bisectionally compiling and installing kernel a few times, the boot > problem first appears when upgrading from v5.10 to v5.11-rc1. Here are > boot messages of v5.11-rc1: > [2.126166] workingset: timestamp_bits=42 max_order=21 bucket_order=0 > [2.127807] zbud: loaded > [2.128010] integrity: Platform Keyring initialized > [2.128014] Key type asymmetric registered > [2.128017] Asymmetric key parser 'x509' registered > [2.128026] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249) > [2.128092] io scheduler mq-deadline registered > [2.130976] pcieport 0000:00:01.0: can't derive routing for PCI INT A > [2.130982] pcieport 0000:00:01.0: PCI INT A: no GSI > [2.131272] pcieport 0000:00:01.0: can't derive routing for PCI INT A > [2.131276] pcieport 0000:00:01.0: PCI INT A: no GSI > [2.132188] ACPI: IORT: [Firmware Bug]: [map (____ptrval____)] conflicting mapping for input ID 0x7c00 > [2.132192] ACPI: IORT: [Firmware Bug]: applying workaround. > [2.132259] ACPI: IORT: [Firmware Bug]: [map (____ptrval____)] conflicting mapping for input ID 0x7c00 > [2.132263] ACPI: IORT: [Firmware Bug]: applying workaround. > [2.132285] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4 > [2.132850] efifb: probing for efifb > [2.132875] efifb: framebuffer at 0x80000000000, using 3072k, total 3072k > [2.132878] efifb: mode is 1024x768x32, linelength=4096, pages=1 > [2.132881] efifb: scrolling: redraw > [2.132883] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0 > [2.135097] Console: switching to colour frame buffer device 128x48 > [2.137221] fb0: EFI VGA frame buffer device > [2.137655] input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input0 > [2.137715] ACPI: Power Button [PWRB] > [2.138153] ACPI GTDT: found 1 SBSA generic Watchdog(s). > [2.140587] Serial: 8250/16550 deiver, 4 ports, IRQ sharing enabled > [2.141685] Serial: AMBA driver > [2.141828] msm_serial: driver initialized > [2.142785] mousedev: PS/2 mouse device common for all mice > [2.186108] rtc-efi rtc-efi.0: registered as rtc0 > [2.198458] rtc-efi rtc-efi.0: setting system clock to 2022-01-23T13:49:49 UTC(1642945789) > [2.199157] ledtrig-cpu: registered to indicate activity on CPUs > _. > Boot messages stop here. After about 2 seconds, the cpu fan runs in the > fastest mode all the time. I have to press the power button to turn the > machine off. > > By bisectionally test, I found commit ac4511c9364c9a6390e8585cdd4596103bca16eb > "drivers/perf: hisi: Add identifier sysfs file" is suspect of resulting > the boot problem. If I revert this commit on v5.11-rc1, kernel boots > fine. That is: > $ git checkout v5.11-rc1 > $ git revert ac4511c9364c9a6390e8585cdd4596103bca16eb > $ "compile and install kernel" > kernel boots fine. > > I tested a bit more. I think hisi_uncore_ddrc_pmu.c or function > hisi_uncore_pmu_identifier_attr_show(...) is suspect in commit ac4511c9364c. > Commit ac4511c9364c modified 5 files: > drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c > drivers/perf/hisilicon/hisi_uncore_hha_pmu.c > drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c > drivers/perf/hisilicon/hisi_uncore_pmu.c > drivers/perf/hisilicon/hisi_uncore_pmu.h > As I understand, a new function hisi_uncore_pmu_identifier_attr_show(...) > is declared and defined in hisi_uncore_pmu.h and hisi_uncore_pmu.c, the > new function is called in hisi_uncore_ddrc_pmu.c, hisi_uncore_hha_pmu.c > and hisi_uncore_l3c_pmu.c. I tested that, if I restore the change in > hisi_uncore_ddrc_pmu.c, kernel boots fine; if I restore the change in > hisi_uncore_hha_pmu.c and hisi_uncore_l3c_pmu.c, kernel fails to boot. > That is: > drivers/perf/hisilicon/hisi_uncore_hha_pmu.c > drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c > drivers/perf/hisilicon/hisi_uncore_pmu.c > drivers/perf/hisilicon/hisi_uncore_pmu.h > compile and install, kernel boots fine. > > drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c > drivers/perf/hisilicon/hisi_uncore_pmu.c > drivers/perf/hisilicon/hisi_uncore_pmu.h > compile and install, kernel fails to boot. > > $ sudo lshw > cpu version: HUAWEI Kunpeng 920 2251K > cores=8 enabledcores=8 threads=8 > 8Gib RAM > $ uname -a > Linux armdebian 5.10.0-9-arm64 #1 SMP Debian 5.10.70-1 (2021-09-30) > aarch64 GNU/Linux > > Do I understand right? What else I could do to solve this? > > Regards, > > -- > Cheng > . > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel