summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2024-10-15 17:58:58 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2024-10-15 17:58:58 +0300
commit6e20c253608b0ba2876c1aabe95f885d7000e9b4 (patch)
tree3f6b20b14c4a3f8351ccccf03cd5106f46415f61
parent442f10325b03f41029170b8150eb8714a96b4291 (diff)
parent20ef35f70a8e49809b248df3f8e05fdd53753534 (diff)
Merge remote-tracking branch 'drm_intel_push/topic/core-for-CI' into drm-tip
-rw-r--r--arch/x86/kernel/apic/apic.c4
-rw-r--r--drivers/acpi/sleep.c20
-rw-r--r--drivers/ata/libata-core.c16
-rw-r--r--drivers/net/phy/phy.c7
-rw-r--r--drivers/pci/msi/msi.c4
-rw-r--r--drivers/platform/x86/intel/pmc/adl.c2
-rw-r--r--drivers/platform/x86/intel/pmc/cnp.c2
-rw-r--r--drivers/platform/x86/intel/pmc/core.c45
-rw-r--r--drivers/platform/x86/intel/pmc/core.h8
-rw-r--r--drivers/platform/x86/intel/pmc/icl.c2
-rw-r--r--drivers/platform/x86/intel/pmc/mtl.c2
-rw-r--r--drivers/platform/x86/intel/pmc/tgl.c2
-rw-r--r--drivers/thermal/intel/therm_throt.c8
-rw-r--r--drivers/thunderbolt/Kconfig18
-rw-r--r--drivers/thunderbolt/tb.c2
-rw-r--r--drivers/thunderbolt/tb.h9
-rw-r--r--drivers/thunderbolt/tunnel.c8
-rw-r--r--drivers/thunderbolt/usb4.c2
-rw-r--r--drivers/usb/core/usb-acpi.c25
-rw-r--r--include/linux/lockdep_types.h4
-rw-r--r--kernel/events/core.c49
-rw-r--r--kernel/hung_task.c2
-rw-r--r--kernel/locking/lockdep.c11
-rw-r--r--kernel/panic.c15
-rw-r--r--kernel/sched/deadline.c2
-rw-r--r--kernel/sched/rt.c2
-rw-r--r--kernel/trace/Kconfig7
-rw-r--r--kernel/trace/trace.c4
-rw-r--r--kernel/watchdog.c4
-rw-r--r--mm/slub.c2
-rw-r--r--net/sched/sch_generic.c7
-rw-r--r--sound/hda/hdac_i915.c23
-rw-r--r--sound/pci/hda/hda_intel.c3
33 files changed, 187 insertions, 134 deletions
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 6513c53c9459..d1006531729a 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -441,6 +441,10 @@ static int lapic_timer_shutdown(struct clock_event_device *evt)
v |= (APIC_LVT_MASKED | LOCAL_TIMER_VECTOR);
apic_write(APIC_LVTT, v);
apic_write(APIC_TMICT, 0);
+
+ if (boot_cpu_has(X86_FEATURE_TSC_DEADLINE_TIMER))
+ wrmsrl(MSR_IA32_TSC_DEADLINE, 0);
+
return 0;
}
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index c8ee8e42b0f6..4272cbc71ae8 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -84,11 +84,16 @@ static int acpi_sleep_prepare(u32 acpi_state)
return 0;
}
+static u8 max_sleep_state = -1;
+
bool acpi_sleep_state_supported(u8 sleep_state)
{
acpi_status status;
u8 type_a, type_b;
+ if (sleep_state > max_sleep_state)
+ return false;
+
status = acpi_get_sleep_type_data(sleep_state, &type_a, &type_b);
return ACPI_SUCCESS(status) && (!acpi_gbl_reduced_hardware
|| (acpi_gbl_FADT.sleep_control.address
@@ -165,6 +170,13 @@ static int __init init_nvs_nosave(const struct dmi_system_id *d)
return 0;
}
+static int __init init_nosleep(const struct dmi_system_id *d)
+{
+ pr_info("Disabling ACPI suspend\n");
+ max_sleep_state = 0;
+ return 0;
+}
+
bool acpi_sleep_default_s3;
static int __init init_default_s3(const struct dmi_system_id *d)
@@ -399,6 +411,14 @@ static const struct dmi_system_id acpisleep_dmi_table[] __initconst = {
DMI_MATCH(DMI_PRODUCT_NAME, "20GGA00L00"),
},
},
+ {
+ .callback = init_nosleep,
+ .ident = "samus",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Samus"),
+ },
+ },
{},
};
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index c085dd81ebe7..6da4626577f1 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -2147,7 +2147,7 @@ static bool ata_identify_page_supported(struct ata_device *dev, u8 page)
* for drives which implement this ATA level or above.
*/
if (ata_id_major_version(dev->id) >= 10)
- ata_dev_warn(dev,
+ ata_dev_notice(dev,
"ATA Identify Device Log not supported\n");
dev->quirks |= ATA_QUIRK_NO_ID_DEV_LOG;
return false;
@@ -2218,7 +2218,7 @@ static void ata_dev_config_ncq_send_recv(struct ata_device *dev)
unsigned int err_mask;
if (!ata_log_supported(dev, ATA_LOG_NCQ_SEND_RECV)) {
- ata_dev_warn(dev, "NCQ Send/Recv Log not supported\n");
+ ata_dev_notice(dev, "NCQ Send/Recv Log not supported\n");
return;
}
err_mask = ata_read_log_page(dev, ATA_LOG_NCQ_SEND_RECV,
@@ -2242,8 +2242,8 @@ static void ata_dev_config_ncq_non_data(struct ata_device *dev)
unsigned int err_mask;
if (!ata_log_supported(dev, ATA_LOG_NCQ_NON_DATA)) {
- ata_dev_warn(dev,
- "NCQ Send/Recv Log not supported\n");
+ ata_dev_notice(dev,
+ "NCQ Send/Recv Log not supported\n");
return;
}
err_mask = ata_read_log_page(dev, ATA_LOG_NCQ_NON_DATA,
@@ -2902,14 +2902,14 @@ int ata_dev_configure(struct ata_device *dev)
if (ata_id_is_cfa(id)) {
/* CPRM may make this media unusable */
if (id[ATA_ID_CFA_KEY_MGMT] & 1)
- ata_dev_warn(dev,
+ ata_dev_notice(dev,
"supports DRM functions and may not be fully accessible\n");
snprintf(revbuf, 7, "CFA");
} else {
snprintf(revbuf, 7, "ATA-%d", ata_id_major_version(id));
/* Warn the user if the device has TPM extensions */
if (ata_id_has_tpm(id))
- ata_dev_warn(dev,
+ ata_dev_notice(dev,
"supports DRM functions and may not be fully accessible\n");
}
@@ -3065,8 +3065,8 @@ int ata_dev_configure(struct ata_device *dev)
}
if ((dev->quirks & ATA_QUIRK_FIRMWARE_WARN) && print_info) {
- ata_dev_warn(dev, "WARNING: device requires firmware update to be fully functional\n");
- ata_dev_warn(dev, " contact the vendor or visit http://ata.wiki.kernel.org\n");
+ ata_dev_notice(dev, "WARNING: device requires firmware update to be fully functional\n");
+ ata_dev_notice(dev, " contact the vendor or visit http://ata.wiki.kernel.org\n");
}
return 0;
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 4f3e742907cb..a1b8c4f15f49 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -1281,7 +1281,7 @@ static void phy_error_precise(struct phy_device *phydev,
*/
void phy_error(struct phy_device *phydev)
{
- WARN_ON(1);
+ pr_notice_once("%s\n", __func__);
phy_process_error(phydev);
}
EXPORT_SYMBOL(phy_error);
@@ -1507,11 +1507,8 @@ void phy_stop(struct phy_device *phydev)
enum phy_state old_state;
if (!phy_is_started(phydev) && phydev->state != PHY_DOWN &&
- phydev->state != PHY_ERROR) {
- WARN(1, "called from state %s\n",
- phy_state_to_str(phydev->state));
+ phydev->state != PHY_ERROR)
return;
- }
mutex_lock(&phydev->lock);
old_state = phydev->state;
diff --git a/drivers/pci/msi/msi.c b/drivers/pci/msi/msi.c
index 3a45879d85db..d4b61b780f91 100644
--- a/drivers/pci/msi/msi.c
+++ b/drivers/pci/msi/msi.c
@@ -430,8 +430,10 @@ int __pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec,
if (maxvec < minvec)
return -ERANGE;
- if (WARN_ON_ONCE(dev->msi_enabled))
+ if (dev->msi_enabled) {
+ pci_info(dev, "can't enable MSI, already enabled\n");
return -EINVAL;
+ }
nvec = pci_msi_vec_count(dev);
if (nvec < 0)
diff --git a/drivers/platform/x86/intel/pmc/adl.c b/drivers/platform/x86/intel/pmc/adl.c
index 9d9c07f44ff6..e7878558fd90 100644
--- a/drivers/platform/x86/intel/pmc/adl.c
+++ b/drivers/platform/x86/intel/pmc/adl.c
@@ -295,8 +295,6 @@ const struct pmc_reg_map adl_reg_map = {
.ppfear_buckets = CNP_PPFEAR_NUM_ENTRIES,
.pm_cfg_offset = CNP_PMC_PM_CFG_OFFSET,
.pm_read_disable_bit = CNP_PMC_READ_DISABLE_BIT,
- .acpi_pm_tmr_ctl_offset = SPT_PMC_ACPI_PM_TMR_CTL_OFFSET,
- .acpi_pm_tmr_disable_bit = SPT_PMC_BIT_ACPI_PM_TMR_DISABLE,
.ltr_ignore_max = ADL_NUM_IP_IGN_ALLOWED,
.lpm_num_modes = ADL_LPM_NUM_MODES,
.lpm_num_maps = ADL_LPM_NUM_MAPS,
diff --git a/drivers/platform/x86/intel/pmc/cnp.c b/drivers/platform/x86/intel/pmc/cnp.c
index 513c02670c5a..dd72974bf71e 100644
--- a/drivers/platform/x86/intel/pmc/cnp.c
+++ b/drivers/platform/x86/intel/pmc/cnp.c
@@ -200,8 +200,6 @@ const struct pmc_reg_map cnp_reg_map = {
.ppfear_buckets = CNP_PPFEAR_NUM_ENTRIES,
.pm_cfg_offset = CNP_PMC_PM_CFG_OFFSET,
.pm_read_disable_bit = CNP_PMC_READ_DISABLE_BIT,
- .acpi_pm_tmr_ctl_offset = SPT_PMC_ACPI_PM_TMR_CTL_OFFSET,
- .acpi_pm_tmr_disable_bit = SPT_PMC_BIT_ACPI_PM_TMR_DISABLE,
.ltr_ignore_max = CNP_NUM_IP_IGN_ALLOWED,
.etr3_offset = ETR3_OFFSET,
};
diff --git a/drivers/platform/x86/intel/pmc/core.c b/drivers/platform/x86/intel/pmc/core.c
index ecb47f8b4f83..d6c0f88f8c7b 100644
--- a/drivers/platform/x86/intel/pmc/core.c
+++ b/drivers/platform/x86/intel/pmc/core.c
@@ -11,7 +11,6 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-#include <linux/acpi_pmtmr.h>
#include <linux/bitfield.h>
#include <linux/debugfs.h>
#include <linux/delay.h>
@@ -1258,38 +1257,6 @@ static bool pmc_core_is_pson_residency_enabled(struct pmc_dev *pmcdev)
return val == 1;
}
-/*
- * Enable or disable ACPI PM Timer
- *
- * This function is intended to be a callback for ACPI PM suspend/resume event.
- * The ACPI PM Timer is enabled on resume only if it was enabled during suspend.
- */
-static void pmc_core_acpi_pm_timer_suspend_resume(void *data, bool suspend)
-{
- struct pmc_dev *pmcdev = data;
- struct pmc *pmc = pmcdev->pmcs[PMC_IDX_MAIN];
- const struct pmc_reg_map *map = pmc->map;
- bool enabled;
- u32 reg;
-
- if (!map->acpi_pm_tmr_ctl_offset)
- return;
-
- guard(mutex)(&pmcdev->lock);
-
- if (!suspend && !pmcdev->enable_acpi_pm_timer_on_resume)
- return;
-
- reg = pmc_core_reg_read(pmc, map->acpi_pm_tmr_ctl_offset);
- enabled = !(reg & map->acpi_pm_tmr_disable_bit);
- if (suspend)
- reg |= map->acpi_pm_tmr_disable_bit;
- else
- reg &= ~map->acpi_pm_tmr_disable_bit;
- pmc_core_reg_write(pmc, map->acpi_pm_tmr_ctl_offset, reg);
-
- pmcdev->enable_acpi_pm_timer_on_resume = suspend && enabled;
-}
static void pmc_core_dbgfs_unregister(struct pmc_dev *pmcdev)
{
@@ -1486,7 +1453,6 @@ static int pmc_core_probe(struct platform_device *pdev)
struct pmc_dev *pmcdev;
const struct x86_cpu_id *cpu_id;
int (*core_init)(struct pmc_dev *pmcdev);
- const struct pmc_reg_map *map;
struct pmc *primary_pmc;
int ret;
@@ -1545,11 +1511,6 @@ static int pmc_core_probe(struct platform_device *pdev)
pm_report_max_hw_sleep(FIELD_MAX(SLP_S0_RES_COUNTER_MASK) *
pmc_core_adjust_slp_s0_step(primary_pmc, 1));
- map = primary_pmc->map;
- if (map->acpi_pm_tmr_ctl_offset)
- acpi_pmtmr_register_suspend_resume_callback(pmc_core_acpi_pm_timer_suspend_resume,
- pmcdev);
-
device_initialized = true;
dev_info(&pdev->dev, " initialized\n");
@@ -1559,12 +1520,6 @@ static int pmc_core_probe(struct platform_device *pdev)
static void pmc_core_remove(struct platform_device *pdev)
{
struct pmc_dev *pmcdev = platform_get_drvdata(pdev);
- const struct pmc *pmc = pmcdev->pmcs[PMC_IDX_MAIN];
- const struct pmc_reg_map *map = pmc->map;
-
- if (map->acpi_pm_tmr_ctl_offset)
- acpi_pmtmr_unregister_suspend_resume_callback();
-
pmc_core_dbgfs_unregister(pmcdev);
pmc_core_clean_structure(pdev);
}
diff --git a/drivers/platform/x86/intel/pmc/core.h b/drivers/platform/x86/intel/pmc/core.h
index 75fd593a7b0f..b9d3291d0bf2 100644
--- a/drivers/platform/x86/intel/pmc/core.h
+++ b/drivers/platform/x86/intel/pmc/core.h
@@ -68,8 +68,6 @@ struct telem_endpoint;
#define SPT_PMC_LTR_SCC 0x3A0
#define SPT_PMC_LTR_ISH 0x3A4
-#define SPT_PMC_ACPI_PM_TMR_CTL_OFFSET 0x18FC
-
/* Sunrise Point: PGD PFET Enable Ack Status Registers */
enum ppfear_regs {
SPT_PMC_XRAM_PPFEAR0A = 0x590,
@@ -150,8 +148,6 @@ enum ppfear_regs {
#define SPT_PMC_VRIC1_SLPS0LVEN BIT(13)
#define SPT_PMC_VRIC1_XTALSDQDIS BIT(22)
-#define SPT_PMC_BIT_ACPI_PM_TMR_DISABLE BIT(1)
-
/* Cannonlake Power Management Controller register offsets */
#define CNP_PMC_SLPS0_DBG_OFFSET 0x10B4
#define CNP_PMC_PM_CFG_OFFSET 0x1818
@@ -355,8 +351,6 @@ struct pmc_reg_map {
const u8 *lpm_reg_index;
const u32 pson_residency_offset;
const u32 pson_residency_counter_step;
- const u32 acpi_pm_tmr_ctl_offset;
- const u32 acpi_pm_tmr_disable_bit;
};
/**
@@ -432,8 +426,6 @@ struct pmc_dev {
u32 die_c6_offset;
struct telem_endpoint *punit_ep;
struct pmc_info *regmap_list;
-
- bool enable_acpi_pm_timer_on_resume;
};
enum pmc_index {
diff --git a/drivers/platform/x86/intel/pmc/icl.c b/drivers/platform/x86/intel/pmc/icl.c
index cbbd44054468..71b0fd6cb7d8 100644
--- a/drivers/platform/x86/intel/pmc/icl.c
+++ b/drivers/platform/x86/intel/pmc/icl.c
@@ -46,8 +46,6 @@ const struct pmc_reg_map icl_reg_map = {
.ppfear_buckets = ICL_PPFEAR_NUM_ENTRIES,
.pm_cfg_offset = CNP_PMC_PM_CFG_OFFSET,
.pm_read_disable_bit = CNP_PMC_READ_DISABLE_BIT,
- .acpi_pm_tmr_ctl_offset = SPT_PMC_ACPI_PM_TMR_CTL_OFFSET,
- .acpi_pm_tmr_disable_bit = SPT_PMC_BIT_ACPI_PM_TMR_DISABLE,
.ltr_ignore_max = ICL_NUM_IP_IGN_ALLOWED,
.etr3_offset = ETR3_OFFSET,
};
diff --git a/drivers/platform/x86/intel/pmc/mtl.c b/drivers/platform/x86/intel/pmc/mtl.c
index 91f2fa728f5c..c7d15d864039 100644
--- a/drivers/platform/x86/intel/pmc/mtl.c
+++ b/drivers/platform/x86/intel/pmc/mtl.c
@@ -462,8 +462,6 @@ const struct pmc_reg_map mtl_socm_reg_map = {
.ppfear_buckets = MTL_SOCM_PPFEAR_NUM_ENTRIES,
.pm_cfg_offset = CNP_PMC_PM_CFG_OFFSET,
.pm_read_disable_bit = CNP_PMC_READ_DISABLE_BIT,
- .acpi_pm_tmr_ctl_offset = SPT_PMC_ACPI_PM_TMR_CTL_OFFSET,
- .acpi_pm_tmr_disable_bit = SPT_PMC_BIT_ACPI_PM_TMR_DISABLE,
.lpm_num_maps = ADL_LPM_NUM_MAPS,
.ltr_ignore_max = MTL_SOCM_NUM_IP_IGN_ALLOWED,
.lpm_res_counter_step_x2 = TGL_PMC_LPM_RES_COUNTER_STEP_X2,
diff --git a/drivers/platform/x86/intel/pmc/tgl.c b/drivers/platform/x86/intel/pmc/tgl.c
index 371b4e30f142..e0580de18077 100644
--- a/drivers/platform/x86/intel/pmc/tgl.c
+++ b/drivers/platform/x86/intel/pmc/tgl.c
@@ -197,8 +197,6 @@ const struct pmc_reg_map tgl_reg_map = {
.ppfear_buckets = ICL_PPFEAR_NUM_ENTRIES,
.pm_cfg_offset = CNP_PMC_PM_CFG_OFFSET,
.pm_read_disable_bit = CNP_PMC_READ_DISABLE_BIT,
- .acpi_pm_tmr_ctl_offset = SPT_PMC_ACPI_PM_TMR_CTL_OFFSET,
- .acpi_pm_tmr_disable_bit = SPT_PMC_BIT_ACPI_PM_TMR_DISABLE,
.ltr_ignore_max = TGL_NUM_IP_IGN_ALLOWED,
.lpm_num_maps = TGL_LPM_NUM_MAPS,
.lpm_res_counter_step_x2 = TGL_PMC_LPM_RES_COUNTER_STEP_X2,
diff --git a/drivers/thermal/intel/therm_throt.c b/drivers/thermal/intel/therm_throt.c
index e69868e868eb..9d18f2fba7a0 100644
--- a/drivers/thermal/intel/therm_throt.c
+++ b/drivers/thermal/intel/therm_throt.c
@@ -345,10 +345,10 @@ static void __maybe_unused throttle_active_work(struct work_struct *work)
avg /= ARRAY_SIZE(state->temp_samples);
if (state->average > avg) {
- pr_warn("CPU%d: %s temperature is above threshold, cpu clock is throttled (total events = %lu)\n",
- this_cpu,
- state->level == CORE_LEVEL ? "Core" : "Package",
- state->count);
+ pr_notice("CPU%d: %s temperature is above threshold, cpu clock is throttled (total events = %lu)\n",
+ this_cpu,
+ state->level == CORE_LEVEL ? "Core" : "Package",
+ state->count);
state->rate_control_active = true;
}
diff --git a/drivers/thunderbolt/Kconfig b/drivers/thunderbolt/Kconfig
index 0abdb69ee9f4..8bf4ecf7f76e 100644
--- a/drivers/thunderbolt/Kconfig
+++ b/drivers/thunderbolt/Kconfig
@@ -18,6 +18,24 @@ menuconfig USB4
if USB4
+config USB4_PCIE_TUNNELING
+ bool "Allow PCI Express tunneling over USB4 fabric"
+ depends on PCI
+ default y
+ help
+ USB4 and Thunderbolt devices typically include PCIe switch
+ with a number of PCIe endpoints such as USB host controllers,
+ GPUs and network adapters. These are made available to the
+ host system through PCIe tunneling. These can use DMA and
+ therefore have access to the host memory which is typically
+ guarded by an IOMMU. This option allows disabling PCIe
+ tunneling completely.
+
+ For devices to be usable it is recommended to say Y here.
+
+ Note this only works with systems that use Software Based
+ Connection Manager (this is most USB4 hosts).
+
config USB4_DEBUGFS_WRITE
bool "Enable write by debugfs to configuration spaces (DANGEROUS)"
help
diff --git a/drivers/thunderbolt/tb.c b/drivers/thunderbolt/tb.c
index 10e719dd837c..7d71ff3f82c1 100644
--- a/drivers/thunderbolt/tb.c
+++ b/drivers/thunderbolt/tb.c
@@ -3181,7 +3181,7 @@ struct tb *tb_probe(struct tb_nhi *nhi)
if (!tb)
return NULL;
- if (tb_acpi_may_tunnel_pcie())
+ if (tb_may_tunnel_pcie())
tb->security_level = TB_SECURITY_USER;
else
tb->security_level = TB_SECURITY_NOPCIE;
diff --git a/drivers/thunderbolt/tb.h b/drivers/thunderbolt/tb.h
index 6737188f2581..692846ba89c2 100644
--- a/drivers/thunderbolt/tb.h
+++ b/drivers/thunderbolt/tb.h
@@ -1491,6 +1491,15 @@ static inline int tb_acpi_power_on_retimers(struct tb_port *port) { return 0; }
static inline int tb_acpi_power_off_retimers(struct tb_port *port) { return 0; }
#endif
+static inline bool tb_may_tunnel_pcie(void)
+{
+#ifdef CONFIG_USB4_PCIE_TUNNELING
+ return tb_acpi_may_tunnel_pcie();
+#else
+ return false;
+#endif
+}
+
#ifdef CONFIG_DEBUG_FS
void tb_debugfs_init(void);
void tb_debugfs_exit(void);
diff --git a/drivers/thunderbolt/tunnel.c b/drivers/thunderbolt/tunnel.c
index 41cf6378ad25..7c8397c135ba 100644
--- a/drivers/thunderbolt/tunnel.c
+++ b/drivers/thunderbolt/tunnel.c
@@ -101,7 +101,7 @@ static unsigned int tb_available_credits(const struct tb_port *port,
size_t ndp;
usb3 = tb_acpi_may_tunnel_usb3() ? sw->max_usb3_credits : 0;
- pcie = tb_acpi_may_tunnel_pcie() ? sw->max_pcie_credits : 0;
+ pcie = tb_may_tunnel_pcie() ? sw->max_pcie_credits : 0;
if (tb_acpi_is_xdomain_allowed()) {
spare = min_not_zero(sw->max_dma_credits, dma_credits);
@@ -426,7 +426,7 @@ bool tb_tunnel_reserved_pci(struct tb_port *port, int *reserved_up,
if (WARN_ON_ONCE(!port->remote))
return false;
- if (!tb_acpi_may_tunnel_pcie())
+ if (!tb_may_tunnel_pcie())
return false;
if (tb_port_get_link_generation(port) < 4)
@@ -1510,7 +1510,7 @@ static unsigned int tb_dma_available_credits(const struct tb_port *port)
int credits;
credits = tb_available_credits(port, NULL);
- if (tb_acpi_may_tunnel_pcie())
+ if (tb_may_tunnel_pcie())
credits -= sw->max_pcie_credits;
credits -= port->dma_credits;
@@ -1821,7 +1821,7 @@ static int tb_usb3_consumed_bandwidth(struct tb_tunnel *tunnel,
int *consumed_up, int *consumed_down)
{
struct tb_port *port = tb_upstream_port(tunnel->dst_port->sw);
- int pcie_weight = tb_acpi_may_tunnel_pcie() ? TB_PCI_WEIGHT : 0;
+ int pcie_weight = tb_may_tunnel_pcie() ? TB_PCI_WEIGHT : 0;
/*
* PCIe tunneling, if enabled, affects the USB3 bandwidth so
diff --git a/drivers/thunderbolt/usb4.c b/drivers/thunderbolt/usb4.c
index 0a9b4aeb3fa1..6b2e24d5867e 100644
--- a/drivers/thunderbolt/usb4.c
+++ b/drivers/thunderbolt/usb4.c
@@ -276,7 +276,7 @@ int usb4_switch_setup(struct tb_switch *sw)
* Only enable PCIe tunneling if the parent router supports it
* and it is not disabled.
*/
- if (tb_acpi_may_tunnel_pcie() &&
+ if (tb_may_tunnel_pcie() &&
tb_switch_find_port(parent, TB_TYPE_PCIE_DOWN)) {
val |= ROUTER_CS_5_PTO;
/*
diff --git a/drivers/usb/core/usb-acpi.c b/drivers/usb/core/usb-acpi.c
index 21585ed89ef8..4c7e862cdf2d 100644
--- a/drivers/usb/core/usb-acpi.c
+++ b/drivers/usb/core/usb-acpi.c
@@ -12,6 +12,7 @@
#include <linux/acpi.h>
#include <linux/pci.h>
#include <linux/usb/hcd.h>
+#include <linux/dmi.h>
#include "hub.h"
@@ -189,6 +190,19 @@ static int usb_acpi_add_usb4_devlink(struct usb_device *udev)
return 0;
}
+static const struct dmi_system_id intel_icl_broken_acpi[] = {
+ {
+ .ident = "ICL RVP",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Ice Lake Client Platform"),
+ },
+ },
+
+ { }
+};
+static bool acpi_connection_type_broken;
+
/*
* Private to usb-acpi, all the core needs to know is that
* port_dev->location is non-zero when it has been set by the firmware.
@@ -204,6 +218,12 @@ usb_acpi_get_connect_type(struct usb_port *port_dev, acpi_handle *handle)
struct acpi_pld_info *pld = NULL;
acpi_status status;
+ /* Work around unknown ACPI instruction error on ICL RVP BIOSes. */
+ if (acpi_connection_type_broken) {
+ port_dev->connect_type = USB_PORT_CONNECT_TYPE_UNKNOWN;
+ return;
+ }
+
/*
* According to 9.14 in ACPI Spec 6.2. _PLD indicates whether usb port
* is user visible and _UPC indicates whether it is connectable. If
@@ -374,6 +394,11 @@ static struct acpi_bus_type usb_acpi_bus = {
int usb_acpi_register(void)
{
+ if (dmi_check_system(intel_icl_broken_acpi)) {
+ pr_info("USB ACPI connection type broken.\n");
+ acpi_connection_type_broken = true;
+ }
+
return register_acpi_bus_type(&usb_acpi_bus);
}
diff --git a/include/linux/lockdep_types.h b/include/linux/lockdep_types.h
index 9f361d3ab9d9..cb943f4b2385 100644
--- a/include/linux/lockdep_types.h
+++ b/include/linux/lockdep_types.h
@@ -252,8 +252,8 @@ struct held_lock {
unsigned int check:1; /* see lock_acquire() comment */
unsigned int hardirqs_off:1;
unsigned int sync:1;
- unsigned int references:11; /* 32 bits */
- unsigned int pin_count;
+ unsigned int pin_count:11; /* 32 bits */
+ unsigned int references;
};
#else /* !CONFIG_LOCKDEP */
diff --git a/kernel/events/core.c b/kernel/events/core.c
index e3589c4287cb..3b8b85adb10a 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -5712,20 +5712,16 @@ unlock:
}
static int perf_read_group(struct perf_event *event,
- u64 read_format, char __user *buf)
+ u64 read_format, char __user *buf,
+ u64 *values)
{
struct perf_event *leader = event->group_leader, *child;
struct perf_event_context *ctx = leader->ctx;
int ret;
- u64 *values;
lockdep_assert_held(&ctx->mutex);
- values = kzalloc(event->read_size, GFP_KERNEL);
- if (!values)
- return -ENOMEM;
-
- values[0] = 1 + leader->nr_siblings;
+ *values = 1 + leader->nr_siblings;
mutex_lock(&leader->child_mutex);
@@ -5739,25 +5735,17 @@ static int perf_read_group(struct perf_event *event,
goto unlock;
}
- mutex_unlock(&leader->child_mutex);
-
ret = event->read_size;
- if (copy_to_user(buf, values, event->read_size))
- ret = -EFAULT;
- goto out;
-
unlock:
mutex_unlock(&leader->child_mutex);
-out:
- kfree(values);
return ret;
}
static int perf_read_one(struct perf_event *event,
- u64 read_format, char __user *buf)
+ u64 read_format, char __user *buf,
+ u64 *values)
{
u64 enabled, running;
- u64 values[5];
int n = 0;
values[n++] = __perf_event_read_value(event, &enabled, &running);
@@ -5770,9 +5758,6 @@ static int perf_read_one(struct perf_event *event,
if (read_format & PERF_FORMAT_LOST)
values[n++] = atomic64_read(&event->lost_samples);
- if (copy_to_user(buf, values, n * sizeof(u64)))
- return -EFAULT;
-
return n * sizeof(u64);
}
@@ -5793,7 +5778,8 @@ static bool is_event_hup(struct perf_event *event)
* Read the performance event - simple non blocking version for now
*/
static ssize_t
-__perf_read(struct perf_event *event, char __user *buf, size_t count)
+__perf_read(struct perf_event *event, char __user *buf,
+ size_t count, u64 *values)
{
u64 read_format = event->attr.read_format;
int ret;
@@ -5811,9 +5797,9 @@ __perf_read(struct perf_event *event, char __user *buf, size_t count)
WARN_ON_ONCE(event->ctx->parent_ctx);
if (read_format & PERF_FORMAT_GROUP)
- ret = perf_read_group(event, read_format, buf);
+ ret = perf_read_group(event, read_format, buf, values);
else
- ret = perf_read_one(event, read_format, buf);
+ ret = perf_read_one(event, read_format, buf, values);
return ret;
}
@@ -5823,16 +5809,31 @@ perf_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
{
struct perf_event *event = file->private_data;
struct perf_event_context *ctx;
+ u64 stack_values[8];
+ u64 *values;
int ret;
ret = security_perf_event_read(event);
if (ret)
return ret;
+ if (event->read_size <= sizeof(stack_values))
+ values = memset(stack_values, 0, event->read_size);
+ else
+ values = kzalloc(event->read_size, GFP_KERNEL);
+ if (!values)
+ return -ENOMEM;
+
ctx = perf_event_ctx_lock(event);
- ret = __perf_read(event, buf, count);
+ ret = __perf_read(event, buf, count, values);
perf_event_ctx_unlock(event, ctx);
+ if (ret > 0 && copy_to_user(buf, values, ret))
+ ret = -EFAULT;
+
+ if (values != stack_values)
+ kfree(values);
+
return ret;
}
diff --git a/kernel/hung_task.c b/kernel/hung_task.c
index 959d99583d1c..96873658bfa4 100644
--- a/kernel/hung_task.c
+++ b/kernel/hung_task.c
@@ -121,6 +121,8 @@ static void check_hung_task(struct task_struct *t, unsigned long timeout)
console_verbose();
hung_task_show_lock = true;
hung_task_call_panic = true;
+ } else {
+ add_taint(TAINT_WARN, LOCKDEP_STILL_OK);
}
/*
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index 536bd471557f..dcb16cd89676 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -5588,11 +5588,14 @@ static struct pin_cookie __lock_pin_lock(struct lockdep_map *lock)
if (match_held_lock(hlock, lock)) {
/*
- * Grab 16bits of randomness; this is sufficient to not
- * be guessable and still allows some pin nesting in
- * our u32 pin_count.
+ * Grab 6bits of randomness; this is barely sufficient
+ * to not be guessable and still allows some 32 levels
+ * of pin nesting in our u11 pin_count.
*/
- cookie.val = 1 + (sched_clock() & 0xffff);
+ cookie.val = 1 + (sched_clock() & 0x3f);
+ if (DEBUG_LOCKS_WARN_ON(hlock->pin_count + cookie.val >= 1 << 11))
+ return NIL_COOKIE;
+
hlock->pin_count += cookie.val;
return cookie;
}
diff --git a/kernel/panic.c b/kernel/panic.c
index fbc59b3b64d0..f929b83a29cf 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -346,13 +346,6 @@ void panic(const char *fmt, ...)
buf[len - 1] = '\0';
pr_emerg("Kernel panic - not syncing: %s\n", buf);
-#ifdef CONFIG_DEBUG_BUGVERBOSE
- /*
- * Avoid nested stack-dumping if a panic occurs during oops processing
- */
- if (!test_taint(TAINT_DIE) && oops_in_progress <= 1)
- dump_stack();
-#endif
/*
* If kgdb is enabled, give it a chance to run before we stop all
@@ -384,6 +377,14 @@ void panic(const char *fmt, ...)
panic_print_sys_info(false);
+#ifdef CONFIG_DEBUG_BUGVERBOSE
+ /*
+ * Avoid nested stack-dumping if a panic occurs during oops processing
+ */
+ if (!test_taint(TAINT_DIE) && oops_in_progress <= 1)
+ dump_stack();
+#endif
+
kmsg_dump_desc(KMSG_DUMP_PANIC, buf);
/*
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 9ce93d0bf452..ad2ac4c2cfcd 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -891,7 +891,7 @@ static void replenish_dl_entity(struct sched_dl_entity *dl_se)
* entity.
*/
if (dl_time_before(dl_se->deadline, rq_clock(rq))) {
- printk_deferred_once("sched: DL replenish lagged too much\n");
+ printk_deferred_once(KERN_NOTICE "sched: DL replenish lagged too much\n");
replenish_dl_new_period(dl_se, rq);
}
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 172c588de542..ef64b1caf41f 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -897,7 +897,7 @@ static int sched_rt_runtime_exceeded(struct rt_rq *rt_rq)
*/
if (likely(rt_b->rt_runtime)) {
rt_rq->rt_throttled = 1;
- printk_deferred_once("sched: RT throttling activated\n");
+ printk_deferred_once(KERN_NOTICE "sched: RT throttling activated\n");
} else {
/*
* In case we did anyway, make it go away,
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index 721c3b221048..b1b29a9a6ac6 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -165,6 +165,13 @@ config TRACING
select TRACE_CLOCK
select NEED_TASKS_RCU
+config GLOBAL_TRACE_BUF_SIZE
+ int
+ prompt "Global ftrace buffer size (for trace_printk)" if EXPERT
+ range 0 4194034
+ default 1441792 # 16384 * 88 (sizeof(struct print_entry))
+ depends on TRACING
+
config GENERIC_TRACER
bool
select TRACING
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 1c69ca1f1088..8b4d73a6b866 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -893,9 +893,7 @@ int tracing_is_enabled(void)
* to not have to wait for all that output. Anyway this can be
* boot time and run time configurable.
*/
-#define TRACE_BUF_SIZE_DEFAULT 1441792UL /* 16384 * 88 (sizeof(entry)) */
-
-static unsigned long trace_buf_size = TRACE_BUF_SIZE_DEFAULT;
+static unsigned long trace_buf_size = CONFIG_GLOBAL_TRACE_BUF_SIZE;
/* trace_types holds a link list of available tracers. */
static struct tracer *trace_types __read_mostly;
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 262691ba62b7..acc0b648aaa0 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -214,6 +214,8 @@ void watchdog_hardlockup_check(unsigned int cpu, struct pt_regs *regs)
if (hardlockup_panic)
nmi_panic(regs, "Hard LOCKUP");
+ else
+ add_taint(TAINT_WARN, LOCKDEP_STILL_OK);
per_cpu(watchdog_hardlockup_warned, cpu) = true;
} else {
@@ -770,6 +772,8 @@ static enum hrtimer_restart watchdog_timer_fn(struct hrtimer *hrtimer)
add_taint(TAINT_SOFTLOCKUP, LOCKDEP_STILL_OK);
if (softlockup_panic)
panic("softlockup: hung tasks");
+ else
+ add_taint(TAINT_WARN, LOCKDEP_STILL_OK);
}
return HRTIMER_RESTART;
diff --git a/mm/slub.c b/mm/slub.c
index 5b832512044e..6eed8a1f1d6a 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -919,7 +919,7 @@ static void print_section(char *level, char *text, u8 *addr,
unsigned int length)
{
metadata_access_enable();
- print_hex_dump(level, text, DUMP_PREFIX_ADDRESS,
+ print_hex_dump(level, text, DUMP_PREFIX_OFFSET,
16, 1, kasan_reset_tag((void *)addr), length, 1);
metadata_access_disable();
}
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index 2af24547a82c..4252d67114c9 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -524,7 +524,12 @@ static void dev_watchdog(struct timer_list *t)
oldest_start = trans_start;
}
- if (unlikely(timedout_ms)) {
+ /* The noise is pissing off our CI and upstream doesn't
+ * move on the bug report:
+ *
+ * https://bugzilla.kernel.org/show_bug.cgi?id=196399
+ */
+ if (unlikely(timedout_ms) && 0) {
trace_net_dev_xmit_timeout(dev, i);
netdev_crit(dev, "NETDEV WATCHDOG: CPU: %d: transmit queue %u timed out %u ms\n",
raw_smp_processor_id(),
diff --git a/sound/hda/hdac_i915.c b/sound/hda/hdac_i915.c
index e9425213320e..a214636ed975 100644
--- a/sound/hda/hdac_i915.c
+++ b/sound/hda/hdac_i915.c
@@ -170,6 +170,26 @@ static int i915_gfx_present(struct pci_dev *hdac_pci)
return false;
}
+static bool dg1_gfx_present(void)
+{
+ static const struct pci_device_id ids[] = {
+ { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4905),
+ .class = PCI_BASE_CLASS_DISPLAY << 16,
+ .class_mask = 0xff << 16 },
+ { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4906),
+ .class = PCI_BASE_CLASS_DISPLAY << 16,
+ .class_mask = 0xff << 16 },
+ { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4907),
+ .class = PCI_BASE_CLASS_DISPLAY << 16,
+ .class_mask = 0xff << 16 },
+ { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4908),
+ .class = PCI_BASE_CLASS_DISPLAY << 16,
+ .class_mask = 0xff << 16 },
+ {}
+ };
+ return pci_dev_present(ids);
+}
+
/**
* snd_hdac_i915_init - Initialize i915 audio component
* @bus: HDA core bus
@@ -190,6 +210,9 @@ int snd_hdac_i915_init(struct hdac_bus *bus)
if (!i915_gfx_present(to_pci_dev(bus->dev)))
return -ENODEV;
+ if (dg1_gfx_present())
+ return -ENODEV;
+
err = snd_hdac_acomp_init(bus, NULL,
i915_component_master_match,
sizeof(struct i915_audio_component) - sizeof(*acomp));
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index b4540c5cd2a6..282e87cc2166 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2143,9 +2143,6 @@ static int azx_probe(struct pci_dev *pci,
* codecs can be on the same link.
*/
if (HDA_CONTROLLER_IN_GPU(pci)) {
- dev_err_probe(card->dev, err,
- "HSW/BDW HD-audio HDMI/DP requires binding with gfx driver\n");
-
goto out_free;
} else {
/* don't bother any longer */