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 21070C433F5 for ; Tue, 25 Jan 2022 14:37:10 +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:MIME-Version: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:In-Reply-To:References: List-Owner; bh=zPx5bAob6dy4CksnR9HA4vn2/zOR1FWCGUn3zvHtC2Y=; b=b4PLx183Gl1ZFZ GgfKqlikywiSvi/TdlsLJSsPupHyiXwtso9uaNJOandJ6WB8GSFH+uJ4kICVRa04PbIu1IhngRM0f wT4vt5uhhPqxaN1D9NJBbE49xn8LoPQCNSOJ9xEn3ilnH1V8goHKLsUI4w5qgP8yAUgJHNiMNEaqz j03f2feth6GuV4jgr2t1+Y5c3N6hssQAoMEh75U0gLqjMwEOAb9kMhst9l5sORysB80xvXQwyVv9I 1FX7fYtMw0RYs6rB8hISCH16GwwMIx8txdLdFKWVXVDfDyaGjbTegfSNX+5REraoxHQdP60iZIl/1 c7OksWR4TrTIdMXppq0w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCMvI-0089GY-PL; Tue, 25 Jan 2022 14:35:52 +0000 Received: from mail-pj1-x1041.google.com ([2607:f8b0:4864:20::1041]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCMvC-0089Fn-P6 for linux-arm-kernel@lists.infradead.org; Tue, 25 Jan 2022 14:35:50 +0000 Received: by mail-pj1-x1041.google.com with SMTP id nn16-20020a17090b38d000b001b56b2bce31so3002226pjb.3 for ; Tue, 25 Jan 2022 06:35:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=6OntZ2z/jznzkif+8Q1kdJAmCeVrNC2L3pPv/QZU1Xw=; b=m8exEMdQ5hoMXaYln4Z8XZEFV6P4wCCM448IyT7PRDn+RxbVt3k+4MIS/MTO/hsL0v Gy4xT4dIn6SD/PvK8ocZIfTkfFKHtDt7jyye0oNTA+k3XjaoOBg4Aa66VhrrpQNaIh3C G2df/zclh+ti9uxeUDPzHhe/R25h2ygJ6Bn2UE5nYj+LycZ5E+rj/1ITU2ePoYYem/Lq NC7cR4HtNi1T2e8PnEXLpWZIgniLh4hTfcao6DgAy8AgK1PcJS4/rbDWz1Z+HOMvSkXj Z3DloE1sLQ/mmK8DhMl+wrmcfpsOpviw4dH3vRThbkNC+ukFnG3rhOodqxJMCfCwcH8v 6Zbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=6OntZ2z/jznzkif+8Q1kdJAmCeVrNC2L3pPv/QZU1Xw=; b=O1rzFmcAo/FyqqNbO+v32ioCBBKB9/NU/RCFhdLuJ6lssQrC2xhKBx1DKXc6iTEoMP DB7676u2fCCoih78eDUE3oq+3TORmw/UT3/ib1Ag09lmVHfmMYWsO9Jyl5qnMCxShUPq ojJi6+YtlnJH21MA3AG3ja3aU/wA1fkaX5V3VnojeyPgdN4tVYk6AkNI+pp2kix7okEG 4/0EuKqjVPnIjm4JOQzaR8+4d4Xr4ap36SF4boifLYZu5e2FUEjj/S7D7DhcQoHtRpzN ndYSYOAdCDN+EbqPKLvZ7af6ABEVIqy4Znvj+fbGJI8uiauluXYiMQJ8HmqKkbPWjk7G 7Xhw== X-Gm-Message-State: AOAM533qheg7ckXYvGXo3/Mph7DYLL0X6sTlkeH0G3oXAJNCHeXN0cVr E0qIOJ4HjXa0QbxEl5AmWF4= X-Google-Smtp-Source: ABdhPJxzwDogA3rz11rbu0zRxsm2/sY17FLFdGfsX+WwtlY5avGgW5N1ql63AZ/ichqCQ2ONO+4pYg== X-Received: by 2002:a17:90a:3b05:: with SMTP id d5mr3806446pjc.224.1643121345592; Tue, 25 Jan 2022 06:35:45 -0800 (PST) Received: from localhost ([152.70.90.187]) by smtp.gmail.com with ESMTPSA id e1sm14475347pgu.17.2022.01.25.06.35.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jan 2022 06:35:45 -0800 (PST) Date: Tue, 25 Jan 2022 22:35:41 +0800 From: Wang Cheng To: john.garry@huawei.com, zhangshaokun@hisilicon.com, liuqi115@huawei.com, will@kernel.org, mark.rutland@arm.com Cc: linux-arm-kernel@lists.infradead.org Subject: [BUG] drivers/perf: hisi: kernel fails to boot since commit ac4511c9364c "drivers/perf: hisi: Add identifier sysfs file" Message-ID: <20220125143541.uvgmumsd2mezdmnc@ppc.localdomain> MIME-Version: 1.0 Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220125_063546_853197_8B7C291E X-CRM114-Status: GOOD ( 16.55 ) 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="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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