]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 3 Oct 2021 14:23:15 +0000 (16:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 3 Oct 2021 14:23:15 +0000 (16:23 +0200)
added patches:
drm-amd-display-pass-pci-deviceid-into-dc.patch
x86-kvmclock-move-this_cpu_pvti-into-kvmclock.h.patch

queue-5.4/drm-amd-display-pass-pci-deviceid-into-dc.patch [new file with mode: 0644]
queue-5.4/series
queue-5.4/x86-kvmclock-move-this_cpu_pvti-into-kvmclock.h.patch [new file with mode: 0644]

diff --git a/queue-5.4/drm-amd-display-pass-pci-deviceid-into-dc.patch b/queue-5.4/drm-amd-display-pass-pci-deviceid-into-dc.patch
new file mode 100644 (file)
index 0000000..008d0eb
--- /dev/null
@@ -0,0 +1,37 @@
+From d942856865c733ff60450de9691af796ad71d7bc Mon Sep 17 00:00:00 2001
+From: Charlene Liu <Charlene.Liu@amd.com>
+Date: Mon, 20 Sep 2021 14:30:02 -0400
+Subject: drm/amd/display: Pass PCI deviceid into DC
+
+From: Charlene Liu <Charlene.Liu@amd.com>
+
+commit d942856865c733ff60450de9691af796ad71d7bc upstream.
+
+[why]
+pci deviceid not passed to dal dc, without proper break,
+dcn2.x falls into dcn3.x code path
+
+[how]
+pass in pci deviceid, and break once dal_version initialized.
+
+Reviewed-by: Zhan Liu <Zhan.Liu@amd.com>
+Acked-by: Anson Jacob <Anson.Jacob@amd.com>
+Signed-off-by: Charlene Liu <Charlene.Liu@amd.com>
+Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Cc: stable@vger.kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+@@ -664,6 +664,7 @@ static int amdgpu_dm_init(struct amdgpu_
+       init_data.asic_id.pci_revision_id = adev->rev_id;
+       init_data.asic_id.hw_internal_rev = adev->external_rev_id;
++      init_data.asic_id.chip_id = adev->pdev->device;
+       init_data.asic_id.vram_width = adev->gmc.vram_width;
+       /* TODO: initialize init_data.asic_id.vram_type here!!!! */
index cb02eee7ca07eb1ff1cf8988e6698f60db84cd5e..18dad1e4f275bb7d626992ab3c1bbb0c917c723d 100644 (file)
@@ -8,3 +8,5 @@ hwmon-w83792d-fix-null-pointer-dereference-by-removing-unnecessary-structure-fie
 hwmon-w83791d-fix-null-pointer-dereference-by-removing-unnecessary-structure-field.patch
 scsi-ufs-fix-illegal-offset-in-upiu-event-trace.patch
 mac80211-fix-use-after-free-in-ccmp-gcmp-rx.patch
+x86-kvmclock-move-this_cpu_pvti-into-kvmclock.h.patch
+drm-amd-display-pass-pci-deviceid-into-dc.patch
diff --git a/queue-5.4/x86-kvmclock-move-this_cpu_pvti-into-kvmclock.h.patch b/queue-5.4/x86-kvmclock-move-this_cpu_pvti-into-kvmclock.h.patch
new file mode 100644 (file)
index 0000000..9e2f5e5
--- /dev/null
@@ -0,0 +1,69 @@
+From ad9af930680bb396c87582edc172b3a7cf2a3fbf Mon Sep 17 00:00:00 2001
+From: Zelin Deng <zelin.deng@linux.alibaba.com>
+Date: Wed, 29 Sep 2021 13:13:48 +0800
+Subject: x86/kvmclock: Move this_cpu_pvti into kvmclock.h
+
+From: Zelin Deng <zelin.deng@linux.alibaba.com>
+
+commit ad9af930680bb396c87582edc172b3a7cf2a3fbf upstream.
+
+There're other modules might use hv_clock_per_cpu variable like ptp_kvm,
+so move it into kvmclock.h and export the symbol to make it visiable to
+other modules.
+
+Signed-off-by: Zelin Deng <zelin.deng@linux.alibaba.com>
+Cc: <stable@vger.kernel.org>
+Message-Id: <1632892429-101194-2-git-send-email-zelin.deng@linux.alibaba.com>
+Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/x86/include/asm/kvmclock.h |   14 ++++++++++++++
+ arch/x86/kernel/kvmclock.c      |   13 ++-----------
+ 2 files changed, 16 insertions(+), 11 deletions(-)
+
+--- a/arch/x86/include/asm/kvmclock.h
++++ b/arch/x86/include/asm/kvmclock.h
+@@ -2,6 +2,20 @@
+ #ifndef _ASM_X86_KVM_CLOCK_H
+ #define _ASM_X86_KVM_CLOCK_H
++#include <linux/percpu.h>
++
+ extern struct clocksource kvm_clock;
++DECLARE_PER_CPU(struct pvclock_vsyscall_time_info *, hv_clock_per_cpu);
++
++static inline struct pvclock_vcpu_time_info *this_cpu_pvti(void)
++{
++      return &this_cpu_read(hv_clock_per_cpu)->pvti;
++}
++
++static inline struct pvclock_vsyscall_time_info *this_cpu_hvclock(void)
++{
++      return this_cpu_read(hv_clock_per_cpu);
++}
++
+ #endif /* _ASM_X86_KVM_CLOCK_H */
+--- a/arch/x86/kernel/kvmclock.c
++++ b/arch/x86/kernel/kvmclock.c
+@@ -50,18 +50,9 @@ early_param("no-kvmclock-vsyscall", pars
+ static struct pvclock_vsyscall_time_info
+                       hv_clock_boot[HVC_BOOT_ARRAY_SIZE] __bss_decrypted __aligned(PAGE_SIZE);
+ static struct pvclock_wall_clock wall_clock __bss_decrypted;
+-static DEFINE_PER_CPU(struct pvclock_vsyscall_time_info *, hv_clock_per_cpu);
+ static struct pvclock_vsyscall_time_info *hvclock_mem;
+-
+-static inline struct pvclock_vcpu_time_info *this_cpu_pvti(void)
+-{
+-      return &this_cpu_read(hv_clock_per_cpu)->pvti;
+-}
+-
+-static inline struct pvclock_vsyscall_time_info *this_cpu_hvclock(void)
+-{
+-      return this_cpu_read(hv_clock_per_cpu);
+-}
++DEFINE_PER_CPU(struct pvclock_vsyscall_time_info *, hv_clock_per_cpu);
++EXPORT_PER_CPU_SYMBOL_GPL(hv_clock_per_cpu);
+ /*
+  * The wallclock is the time of day when we booted. Since then, some time may