Skip to content

Commit

Permalink
Merge tag 'v6.6.27' into 6.6
Browse files Browse the repository at this point in the history
This is the 6.6.27 stable release
  • Loading branch information
xanmod committed Apr 13, 2024
2 parents bd62b21 + 5e82800 commit ef286ab
Show file tree
Hide file tree
Showing 151 changed files with 1,134 additions and 309 deletions.
2 changes: 1 addition & 1 deletion Makefile
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 6
PATCHLEVEL = 6
SUBLEVEL = 26
SUBLEVEL = 27
EXTRAVERSION =
NAME = Hurr durr I'ma ninja sloth

Expand Down
16 changes: 11 additions & 5 deletions arch/arm/boot/dts/rockchip/rk322x.dtsi
Expand Up @@ -732,14 +732,20 @@
status = "disabled";

ports {
hdmi_in: port {
#address-cells = <1>;
#size-cells = <0>;
hdmi_in_vop: endpoint@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;

hdmi_in: port@0 {
reg = <0>;

hdmi_in_vop: endpoint {
remote-endpoint = <&vop_out_hdmi>;
};
};

hdmi_out: port@1 {
reg = <1>;
};
};
};

Expand Down
16 changes: 13 additions & 3 deletions arch/arm/boot/dts/rockchip/rk3288.dtsi
Expand Up @@ -1231,27 +1231,37 @@
compatible = "rockchip,rk3288-dw-hdmi";
reg = <0x0 0xff980000 0x0 0x20000>;
reg-io-width = <4>;
#sound-dai-cells = <0>;
rockchip,grf = <&grf>;
interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_HDMI_CTRL>, <&cru SCLK_HDMI_HDCP>, <&cru SCLK_HDMI_CEC>;
clock-names = "iahb", "isfr", "cec";
power-domains = <&power RK3288_PD_VIO>;
rockchip,grf = <&grf>;
#sound-dai-cells = <0>;
status = "disabled";

ports {
hdmi_in: port {
#address-cells = <1>;
#size-cells = <0>;

hdmi_in: port@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;

hdmi_in_vopb: endpoint@0 {
reg = <0>;
remote-endpoint = <&vopb_out_hdmi>;
};

hdmi_in_vopl: endpoint@1 {
reg = <1>;
remote-endpoint = <&vopl_out_hdmi>;
};
};

hdmi_out: port@1 {
reg = <1>;
};
};
};

Expand Down
11 changes: 10 additions & 1 deletion arch/arm64/boot/dts/rockchip/rk3328.dtsi
Expand Up @@ -743,11 +743,20 @@
status = "disabled";

ports {
hdmi_in: port {
#address-cells = <1>;
#size-cells = <0>;

hdmi_in: port@0 {
reg = <0>;

hdmi_in_vop: endpoint {
remote-endpoint = <&vop_out_hdmi>;
};
};

hdmi_out: port@1 {
reg = <1>;
};
};
};

Expand Down
12 changes: 10 additions & 2 deletions arch/arm64/boot/dts/rockchip/rk3399.dtsi
Expand Up @@ -1953,6 +1953,7 @@
hdmi: hdmi@ff940000 {
compatible = "rockchip,rk3399-dw-hdmi";
reg = <0x0 0xff940000 0x0 0x20000>;
reg-io-width = <4>;
interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH 0>;
clocks = <&cru PCLK_HDMI_CTRL>,
<&cru SCLK_HDMI_SFR>,
Expand All @@ -1961,13 +1962,16 @@
<&cru PLL_VPLL>;
clock-names = "iahb", "isfr", "cec", "grf", "ref";
power-domains = <&power RK3399_PD_HDCP>;
reg-io-width = <4>;
rockchip,grf = <&grf>;
#sound-dai-cells = <0>;
status = "disabled";

ports {
hdmi_in: port {
#address-cells = <1>;
#size-cells = <0>;

hdmi_in: port@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;

Expand All @@ -1980,6 +1984,10 @@
remote-endpoint = <&vopl_out_hdmi>;
};
};

hdmi_out: port@1 {
reg = <1>;
};
};
};

Expand Down
6 changes: 4 additions & 2 deletions arch/x86/events/amd/lbr.c
Expand Up @@ -173,9 +173,11 @@ void amd_pmu_lbr_read(void)

/*
* Check if a branch has been logged; if valid = 0, spec = 0
* then no branch was recorded
* then no branch was recorded; if reserved = 1 then an
* erroneous branch was recorded (see Erratum 1452)
*/
if (!entry.to.split.valid && !entry.to.split.spec)
if ((!entry.to.split.valid && !entry.to.split.spec) ||
entry.to.split.reserved)
continue;

perf_clear_branch_entry_bitfields(br + out);
Expand Down
5 changes: 5 additions & 0 deletions arch/x86/include/asm/xen/hypervisor.h
Expand Up @@ -62,6 +62,11 @@ void xen_arch_unregister_cpu(int num);
#ifdef CONFIG_PVH
void __init xen_pvh_init(struct boot_params *boot_params);
void __init mem_map_via_hcall(struct boot_params *boot_params_p);
#ifdef CONFIG_XEN_PVH
void __init xen_reserve_extra_memory(struct boot_params *bootp);
#else
static inline void xen_reserve_extra_memory(struct boot_params *bootp) { }
#endif
#endif

/* Lazy mode for batching updates / context switch */
Expand Down
48 changes: 48 additions & 0 deletions arch/x86/pci/fixup.c
Expand Up @@ -907,6 +907,54 @@ static void chromeos_fixup_apl_pci_l1ss_capability(struct pci_dev *dev)
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x5ad6, chromeos_save_apl_pci_l1ss_capability);
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL, 0x5ad6, chromeos_fixup_apl_pci_l1ss_capability);

/*
* Disable D3cold on Asus B1400 PCI-NVMe bridge
*
* On this platform with VMD off, the NVMe device cannot successfully power
* back on from D3cold. This appears to be an untested transition by the
* vendor: Windows leaves the NVMe and parent bridge in D0 during suspend.
*
* We disable D3cold on the parent bridge for simplicity, and the fact that
* both parent bridge and NVMe device share the same power resource.
*
* This is only needed on BIOS versions before 308; the newer versions flip
* StorageD3Enable from 1 to 0.
*/
static const struct dmi_system_id asus_nvme_broken_d3cold_table[] = {
{
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
DMI_MATCH(DMI_BIOS_VERSION, "B1400CEAE.304"),
},
},
{
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
DMI_MATCH(DMI_BIOS_VERSION, "B1400CEAE.305"),
},
},
{
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
DMI_MATCH(DMI_BIOS_VERSION, "B1400CEAE.306"),
},
},
{
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
DMI_MATCH(DMI_BIOS_VERSION, "B1400CEAE.307"),
},
},
{}
};

static void asus_disable_nvme_d3cold(struct pci_dev *pdev)
{
if (dmi_check_system(asus_nvme_broken_d3cold_table) > 0)
pci_d3cold_disable(pdev);
}
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x9a09, asus_disable_nvme_d3cold);

#ifdef CONFIG_SUSPEND
/*
* Root Ports on some AMD SoCs advertise PME_Support for D3hot and D3cold, but
Expand Down
3 changes: 3 additions & 0 deletions arch/x86/platform/pvh/enlighten.c
Expand Up @@ -74,6 +74,9 @@ static void __init init_pvh_bootparams(bool xen_guest)
} else
xen_raw_printk("Warning: Can fit ISA range into e820\n");

if (xen_guest)
xen_reserve_extra_memory(&pvh_bootparams);

pvh_bootparams.hdr.cmd_line_ptr =
pvh_start_info.cmdline_paddr;

Expand Down
32 changes: 32 additions & 0 deletions arch/x86/xen/enlighten.c
Expand Up @@ -6,6 +6,7 @@
#include <linux/console.h>
#include <linux/cpu.h>
#include <linux/kexec.h>
#include <linux/memblock.h>
#include <linux/slab.h>
#include <linux/panic_notifier.h>

Expand Down Expand Up @@ -350,3 +351,34 @@ void xen_arch_unregister_cpu(int num)
}
EXPORT_SYMBOL(xen_arch_unregister_cpu);
#endif

/* Amount of extra memory space we add to the e820 ranges */
struct xen_memory_region xen_extra_mem[XEN_EXTRA_MEM_MAX_REGIONS] __initdata;

void __init xen_add_extra_mem(unsigned long start_pfn, unsigned long n_pfns)
{
unsigned int i;

/*
* No need to check for zero size, should happen rarely and will only
* write a new entry regarded to be unused due to zero size.
*/
for (i = 0; i < XEN_EXTRA_MEM_MAX_REGIONS; i++) {
/* Add new region. */
if (xen_extra_mem[i].n_pfns == 0) {
xen_extra_mem[i].start_pfn = start_pfn;
xen_extra_mem[i].n_pfns = n_pfns;
break;
}
/* Append to existing region. */
if (xen_extra_mem[i].start_pfn + xen_extra_mem[i].n_pfns ==
start_pfn) {
xen_extra_mem[i].n_pfns += n_pfns;
break;
}
}
if (i == XEN_EXTRA_MEM_MAX_REGIONS)
printk(KERN_WARNING "Warning: not enough extra memory regions\n");

memblock_reserve(PFN_PHYS(start_pfn), PFN_PHYS(n_pfns));
}
68 changes: 68 additions & 0 deletions arch/x86/xen/enlighten_pvh.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
#include <linux/acpi.h>
#include <linux/export.h>
#include <linux/mm.h>

#include <xen/hvc-console.h>

Expand Down Expand Up @@ -72,3 +73,70 @@ void __init mem_map_via_hcall(struct boot_params *boot_params_p)
}
boot_params_p->e820_entries = memmap.nr_entries;
}

/*
* Reserve e820 UNUSABLE regions to inflate the memory balloon.
*
* On PVH dom0 the host memory map is used, RAM regions available to dom0 are
* located as the same place as in the native memory map, but since dom0 gets
* less memory than the total amount of host RAM the ranges that can't be
* populated are converted from RAM -> UNUSABLE. Use such regions (up to the
* ratio signaled in EXTRA_MEM_RATIO) in order to inflate the balloon driver at
* boot. Doing so prevents the guest (even if just temporary) from using holes
* in the memory map in order to map grants or foreign addresses, and
* hopefully limits the risk of a clash with a device MMIO region. Ideally the
* hypervisor should notify us which memory ranges are suitable for creating
* foreign mappings, but that's not yet implemented.
*/
void __init xen_reserve_extra_memory(struct boot_params *bootp)
{
unsigned int i, ram_pages = 0, extra_pages;

for (i = 0; i < bootp->e820_entries; i++) {
struct boot_e820_entry *e = &bootp->e820_table[i];

if (e->type != E820_TYPE_RAM)
continue;
ram_pages += PFN_DOWN(e->addr + e->size) - PFN_UP(e->addr);
}

/* Max amount of extra memory. */
extra_pages = EXTRA_MEM_RATIO * ram_pages;

/*
* Convert UNUSABLE ranges to RAM and reserve them for foreign mapping
* purposes.
*/
for (i = 0; i < bootp->e820_entries && extra_pages; i++) {
struct boot_e820_entry *e = &bootp->e820_table[i];
unsigned long pages;

if (e->type != E820_TYPE_UNUSABLE)
continue;

pages = min(extra_pages,
PFN_DOWN(e->addr + e->size) - PFN_UP(e->addr));

if (pages != (PFN_DOWN(e->addr + e->size) - PFN_UP(e->addr))) {
struct boot_e820_entry *next;

if (bootp->e820_entries ==
ARRAY_SIZE(bootp->e820_table))
/* No space left to split - skip region. */
continue;

/* Split entry. */
next = e + 1;
memmove(next, e,
(bootp->e820_entries - i) * sizeof(*e));
bootp->e820_entries++;
next->addr = PAGE_ALIGN(e->addr) + PFN_PHYS(pages);
e->size = next->addr - e->addr;
next->size -= e->size;
}
e->type = E820_TYPE_RAM;
extra_pages -= pages;

xen_add_extra_mem(PFN_UP(e->addr), pages);
}
}

0 comments on commit ef286ab

Please sign in to comment.