config CONFIG_HISI_PMU for kunpeng920

Bug #1956086 reported by Fred Kimmy
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kunpeng920
Fix Released
Undecided
Ike Panhc
Ubuntu-20.04
Fix Released
Undecided
Ike Panhc
Ubuntu-20.04-hwe
Fix Released
Undecided
Ike Panhc
linux (Ubuntu)
Fix Released
Undecided
Ike Panhc
Focal
Fix Released
Medium
Ike Panhc
Impish
Fix Released
Medium
Ike Panhc
Jammy
Fix Released
Medium
Ike Panhc
Kinetic
Fix Released
Undecided
Ike Panhc

Bug Description

[Impact]
We have Hisilicon PMU modules built-in and they can not be unloaded. There is no way to replace with a updated module unless we build it as module. It also wastes memory on arm64 systems based on other SoCs.

[Test Plan]
`lsmod | grep hisi_uncore` shall see 4 modules loaded and they can be unloaded.

[Regression Risk]
CONFIG_HISI_PMU shall be only affected Hisilicon platforms that HISI0213 is found in ACPI tables. We shall have perf test run on these platforms and others have lowest risk.

=================================
[Bug Description]
hisi pmu support x.ko module to use it for kunpeng920

[Steps to Reproduce]
1) cd /lib/modules/$(uname -r)/kernel/drivers/perf/hisilicon
2) check *.ko
3)

[Actual Results]
@ubuntu:~$ cat /boot/config-4.15.0-140-generic | grep -i CONFIG_HISI_PMU
CONFIG_HISI_PMU=y

[Expected Results]
@ubuntu:~$ cat /boot/config-4.15.0-140-generic | grep -i CONFIG_HISI_PMU
CONFIG_HISI_PMU=m

[Reproducibility]
100%

[Additional information]
(Firmware version, kernel version, affected hardware, etc. if required):

[Resolution]
drivers/perf: hisi: Permit modular builds of HiSilicon uncore drivers

Revision history for this message
Ike Panhc (ikepanhc) wrote :

Hi,

I believe you are suggesting merging patch 97807325a02b ("drivers/perf: hisi: Permit modular builds of HiSilicon uncore drivers") and CONFIG_HISI_PMU=m.

Is there any testcase for PMU driver that we can verify driver is good?

Revision history for this message
Fred Kimmy (kongzizaixian) wrote :
Revision history for this message
Ike Panhc (ikepanhc) wrote :

In both focal-ga and focal-hwe, CONFIG_HISI_PMU is set to =y

Changed in kunpeng920:
status: New → In Progress
assignee: nobody → Ike Panhc (ikepanhc)
Revision history for this message
Ike Panhc (ikepanhc) wrote :

Patch 97807325a02b ("drivers/perf: hisi: Permit modular builds of HiSilicon uncore drivers") hits mainline kernel since v5.8 and can be clean cherry-pick to focal-ga.

Is there any reason you need CONFIG_HISI_PMU=m not =y?

Revision history for this message
Andrew Cloke (andrew-cloke) wrote :

Marking as "incomplete" while waiting for the rationale for the change (note that a rationale is essential for an SRU).

Changed in kunpeng920:
status: In Progress → Incomplete
Revision history for this message
Fred Kimmy (kongzizaixian) wrote :

we can use this new pmu ko instead of old pmu ko if this system ko exist some bug.

Revision history for this message
Ike Panhc (ikepanhc) wrote :

The advantage of build-as-module is 1) Downsize kernel image, 2) Can be removed, 3) Can replace updated driver if needed

The advantage of build-in is 1) Can find rootfs, 2) For early debug

IMO, I will run PMU testcase. If nothing needed for build-in, I will send the patch to build it as module.

Changed in kunpeng920:
status: Incomplete → In Progress
Revision history for this message
Ike Panhc (ikepanhc) wrote :

Patch 97807325a02b ("drivers/perf: hisi: Permit modular builds of HiSilicon uncore drivers") has been merged into Ubuntu 5.13 and 5.15 kernel but CONFIG_HISI_PMU is =y. Let me try test build with =m and test the driver.

Ike Panhc (ikepanhc)
description: updated
Changed in linux (Ubuntu):
assignee: nobody → Ike Panhc (ikepanhc)
status: New → In Progress
Changed in linux (Ubuntu Jammy):
status: New → In Progress
assignee: nobody → Ike Panhc (ikepanhc)
Changed in linux (Ubuntu Focal):
status: New → In Progress
assignee: nobody → Ike Panhc (ikepanhc)
Ike Panhc (ikepanhc)
no longer affects: kunpeng920/ubuntu-21.10
Changed in linux (Ubuntu Impish):
status: New → In Progress
assignee: nobody → Ike Panhc (ikepanhc)
Revision history for this message
Ike Panhc (ikepanhc) wrote :
Stefan Bader (smb)
Changed in linux (Ubuntu Jammy):
importance: Undecided → Medium
Changed in linux (Ubuntu Impish):
importance: Undecided → Medium
Changed in linux (Ubuntu Focal):
importance: Undecided → Medium
Stefan Bader (smb)
Changed in linux (Ubuntu Focal):
status: In Progress → Fix Committed
Stefan Bader (smb)
Changed in linux (Ubuntu Jammy):
status: In Progress → Fix Committed
Changed in linux (Ubuntu Impish):
status: In Progress → Fix Committed
dann frazier (dannf)
description: updated
Ike Panhc (ikepanhc)
Changed in kunpeng920:
status: In Progress → Fix Committed
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux/5.13.0-42.47 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-impish' to 'verification-done-impish'. If the problem still exists, change the tag 'verification-needed-impish' to 'verification-failed-impish'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-impish
Revision history for this message
Ike Panhc (ikepanhc) wrote :

5.13.0-42.47 works for me. Thanks.

tags: added: verification-done-impish
removed: verification-needed-impish
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux/5.4.0-112.126 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-focal' to 'verification-done-focal'. If the problem still exists, change the tag 'verification-needed-focal' to 'verification-failed-focal'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-focal
Revision history for this message
Ike Panhc (ikepanhc) wrote :

Thanks. 5.4.0-112.126 works for me.

tags: added: verification-done-focal
removed: verification-needed-focal
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux/5.15.0-32.33 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-jammy' to 'verification-done-jammy'. If the problem still exists, change the tag 'verification-needed-jammy' to 'verification-failed-jammy'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-jammy
Revision history for this message
Ike Panhc (ikepanhc) wrote :

Thanks. 5.15.0-32.33 works for me.

tags: added: verification-done-jammy
removed: verification-needed-jammy
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (10.5 KiB)

This bug was fixed in the package linux - 5.13.0-46.51

---------------
linux (5.13.0-46.51) impish; urgency=medium

  * CVE-2022-21499
    - SAUCE: debug: Lock down kgdb

linux (5.13.0-45.50) impish; urgency=medium

  * impish/linux: 5.13.0-45.50 -proposed tracker (LP: #1974347)

  * CVE-2022-1158
    - KVM: x86/mmu: do compare-and-exchange of gPTE via the user address

  * config CONFIG_HISI_PMU for kunpeng920 (LP: #1956086)
    - [Config] CONFIG_HISI_PMU=m

  * re-apply missing overlayfs SAUCE patch (LP: #1967924)
    - SAUCE: overlayfs: fix incorrect mnt_id of files opened from map_files

  * Impish update: upstream stable patchset 2022-04-20 (LP: #1969666)
    - mac80211_hwsim: report NOACK frames in tx_status
    - mac80211_hwsim: initialize ieee80211_tx_info at hw_scan_work
    - i2c: bcm2835: Avoid clock stretching timeouts
    - ASoC: rt5668: do not block workqueue if card is unbound
    - ASoC: rt5682: do not block workqueue if card is unbound
    - regulator: core: fix false positive in regulator_late_cleanup()
    - KVM: arm64: vgic: Read HW interrupt pending state from the HW
    - tipc: fix a bit overflow in tipc_crypto_key_rcv()
    - cifs: fix double free race when mount fails in cifs_get_root()
    - selftests/seccomp: Fix seccomp failure by adding missing headers
    - i2c: cadence: allow COMPILE_TEST
    - i2c: qup: allow COMPILE_TEST
    - net: usb: cdc_mbim: avoid altsetting toggling for Telit FN990
    - usb: gadget: don't release an existing dev->buf
    - usb: gadget: clear related members when goto fail
    - exfat: reuse exfat_inode_info variable instead of calling EXFAT_I()
    - exfat: fix i_blocks for files truncated over 4 GiB
    - tracing: Add test for user space strings when filtering on string pointers
    - serial: stm32: prevent TDR register overwrite when sending x_char
    - ata: pata_hpt37x: fix PCI clock detection
    - drm/amdgpu: check vm ready by amdgpu_vm->evicting flag
    - tracing: Add ustring operation to filtering string pointers
    - ALSA: intel_hdmi: Fix reference to PCM buffer address
    - riscv/efi_stub: Fix get_boot_hartid_from_fdt() return value
    - riscv: Fix config KASAN && SPARSEMEM && !SPARSE_VMEMMAP
    - riscv: Fix config KASAN && DEBUG_VIRTUAL
    - ASoC: ops: Shift tested values in snd_soc_put_volsw() by +min
    - iommu/amd: Recover from event log overflow
    - drm/i915: s/JSP2/ICP2/ PCH
    - xen/netfront: destroy queues before real_num_tx_queues is zeroed
    - thermal: core: Fix TZ_GET_TRIP NULL pointer dereference
    - ntb: intel: fix port config status offset for SPR
    - mm: Consider __GFP_NOWARN flag for oversized kvmalloc() calls
    - xfrm: fix MTU regression
    - netfilter: fix use-after-free in __nf_register_net_hook()
    - bpf, sockmap: Do not ignore orig_len parameter
    - xfrm: enforce validity of offload input flags
    - e1000e: Correct NVM checksum verification flow
    - net: fix up skbs delta_truesize in UDP GRO frag_list
    - netfilter: nf_queue: don't assume sk is full socket
    - netfilter: nf_queue: fix possible use-after-free
    - netfilter: nf_queue: handle socket prefetch
    - batman-adv: Request iflink once in batadv-on-batadv check
    -...

Changed in linux (Ubuntu Impish):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (101.7 KiB)

This bug was fixed in the package linux - 5.15.0-35.36

---------------
linux (5.15.0-35.36) jammy; urgency=medium

  * CVE-2022-21499
    - SAUCE: debug: Lock down kgdb

linux (5.15.0-34.35) jammy; urgency=medium

  * jammy/linux: 5.15.0-34.35 -proposed tracker (LP: #1974322)

  * AMD APU s2idle is broken after the ASIC reset fix (LP: #1972134)
    - drm/amdgpu: unify BO evicting method in amdgpu_ttm
    - drm/amdgpu: explicitly check for s0ix when evicting resources

  * amd_gpio AMDI0030:00: Failed to translate GPIO pin 0x0000 to IRQ, err -517
    (LP: #1971597)
    - gpio: Request interrupts after IRQ is initialized

  * config CONFIG_HISI_PMU for kunpeng920 (LP: #1956086)
    - [Config] CONFIG_HISI_PMU=m

  * Mute/mic LEDs no function on EliteBook G9 platfroms (LP: #1970552)
    - ALSA: hda/realtek: Enable mute/micmute LEDs support for HP Laptops

  * network-manager/1.36.4-2ubuntu1 ADT test failure with linux/5.15.0-28.29
    (LP: #1971418)
    - Revert "rfkill: make new event layout opt-in"

  * PCIE LnkCtl ASPM not enabled under VMD mode for Alder Lake platforms
    (LP: #1942160)
    - SAUCE: vmd: fixup bridge ASPM by driver name instead

  * Mute/mic LEDs no function on HP EliteBook 845/865 G9 (LP: #1970178)
    - ALSA: hda/realtek: Enable mute/micmute LEDs and limit mic boost on EliteBook
      845/865 G9

  * Enable headset mic on Lenovo P360 (LP: #1967069)
    - ALSA: hda/realtek: Enable headset mic on Lenovo P360

  * WCN6856 BT keep in OFF state after coldboot system (LP: #1967067)
    - Bluetooth: btusb: Improve stability for QCA devices

  * Screen sometimes can't update [Failed to post KMS update: CRTC property
    (GAMMA_LUT) not found] (LP: #1967274)
    - drm/i915/xelpd: Enable Pipe color support for D13 platform
    - drm/i915: Use unlocked register accesses for LUT loads
    - drm/i915/xelpd: Enable Pipe Degamma
    - drm/i915/xelpd: Add Pipe Color Lut caps to platform config

  * Jammy update: v5.15.35 upstream stable release (LP: #1969857)
    - drm/amd/display: Add pstate verification and recovery for DCN31
    - drm/amd/display: Fix p-state allow debug index on dcn31
    - hamradio: defer 6pack kfree after unregister_netdev
    - hamradio: remove needs_free_netdev to avoid UAF
    - cpuidle: PSCI: Move the `has_lpi` check to the beginning of the function
    - ACPI: processor idle: Check for architectural support for LPI
    - ACPI: processor: idle: fix lockup regression on 32-bit ThinkPad T40
    - btrfs: remove unused parameter nr_pages in add_ra_bio_pages()
    - btrfs: remove no longer used counter when reading data page
    - btrfs: remove unused variable in btrfs_{start,write}_dirty_block_groups()
    - soc: qcom: aoss: Expose send for generic usecase
    - dt-bindings: net: qcom,ipa: add optional qcom,qmp property
    - net: ipa: request IPA register values be retained
    - btrfs: release correct delalloc amount in direct IO write path
    - ALSA: core: Add snd_card_free_on_error() helper
    - ALSA: sis7019: Fix the missing error handling
    - ALSA: ali5451: Fix the missing snd_card_free() call at probe error
    - ALSA: als300: Fix the missing snd_card_free() call at probe error
    - ALSA: als4000: Fix ...

Changed in linux (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 5.4.0-117.132

---------------
linux (5.4.0-117.132) focal; urgency=medium

  * CVE-2022-1966
    - netfilter: nf_tables: add nft_set_elem_expr_alloc()
    - netfilter: nf_tables: disallow non-stateful expression in sets earlier

 -- Thadeu Lima de Souza Cascardo <email address hidden> Wed, 01 Jun 2022 20:07:42 -0300

Changed in linux (Ubuntu Focal):
status: Fix Committed → Fix Released
Ike Panhc (ikepanhc)
Changed in kunpeng920:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 5.19.0-15.15

---------------
linux (5.19.0-15.15) kinetic; urgency=medium

  * kinetic/linux: 5.19.0-15.15 -proposed tracker (LP: #1983335)

  * Miscellaneous Ubuntu changes
    - [Config] update annotations to support both gcc-11 and gcc-12

 -- Andrea Righi <email address hidden> Tue, 02 Aug 2022 09:23:01 +0200

Changed in linux (Ubuntu Kinetic):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.