Skip to content

Commit

Permalink
Merge remote-tracking branch 'drm-intel/topic/core-for-CI' into drm-tip
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianKoenigAMD committed Jun 7, 2021
2 parents 094dafa + 62f7e79 commit 119ac19
Show file tree
Hide file tree
Showing 29 changed files with 182 additions and 74 deletions.
2 changes: 2 additions & 0 deletions arch/x86/events/rapl.c
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,8 @@ static const struct x86_cpu_id rapl_model_match[] __initconst = {
X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE, &model_skl),
X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L, &model_skl),
X86_MATCH_INTEL_FAM6_MODEL(SAPPHIRERAPIDS_X, &model_spr),
X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE_L, &model_skl),
X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE, &model_skl),
X86_MATCH_VENDOR_FAM(AMD, 0x17, &model_amd_fam17h),
X86_MATCH_VENDOR_FAM(HYGON, 0x18, &model_amd_fam17h),
X86_MATCH_VENDOR_FAM(AMD, 0x19, &model_amd_fam17h),
Expand Down
21 changes: 21 additions & 0 deletions drivers/acpi/sleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,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
Expand Down Expand Up @@ -161,6 +166,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)
Expand Down Expand Up @@ -373,6 +385,15 @@ 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"),
},
},
{},
};

Expand Down
16 changes: 8 additions & 8 deletions drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2048,7 +2048,7 @@ static bool ata_identify_page_supported(struct ata_device *dev, u8 page)
unsigned int err, i;

if (!ata_log_supported(dev, ATA_LOG_IDENTIFY_DEVICE)) {
ata_dev_warn(dev, "ATA Identify Device Log not supported\n");
ata_dev_notice(dev, "ATA Identify Device Log not supported\n");
return false;
}

Expand Down Expand Up @@ -2122,7 +2122,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,
Expand Down Expand Up @@ -2151,8 +2151,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,
Expand Down Expand Up @@ -2484,14 +2484,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");
}

Expand Down Expand Up @@ -2707,8 +2707,8 @@ int ata_dev_configure(struct ata_device *dev)
}

if ((dev->horkage & ATA_HORKAGE_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;
Expand Down
9 changes: 9 additions & 0 deletions drivers/gpu/drm/i915/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ config DRM_I915_DEBUG
depends on DRM_I915
depends on EXPERT # only for developers
depends on !COMPILE_TEST # never built by robots
select PCI_MSI # ... for iommu enabled by default
select IOMMU_API
select IOMMU_IOVA
select IOMMU_SUPPORT
select NEED_DMA_MAP_STATE
select DMAR_TABLE
select INTEL_IOMMU
select INTEL_IOMMU_DEFAULT_ON
select DEBUG_FS
select PREEMPT_COUNT
select I2C_CHARDEV
Expand All @@ -40,6 +48,7 @@ config DRM_I915_DEBUG
select DRM_I915_DEBUG_RUNTIME_PM
select DRM_I915_SW_FENCE_DEBUG_OBJECTS
select DRM_I915_SELFTEST
select BROKEN # for prototype uAPI
default n
help
Choose this option to turn on extra driver debugging that may affect
Expand Down
2 changes: 0 additions & 2 deletions drivers/iommu/intel/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,6 @@ static int __init intel_iommu_setup(char *str)
no_platform_optin = 1;
pr_info("IOMMU disabled\n");
} else if (!strncmp(str, "igfx_off", 8)) {
dmar_map_gfx = 0;
pr_info("Disable GFX device mapping\n");
} else if (!strncmp(str, "forcedac", 8)) {
pr_warn("intel_iommu=forcedac deprecated; use iommu.forcedac instead\n");
iommu_dma_forcedac = true;
Expand Down
7 changes: 2 additions & 5 deletions drivers/net/phy/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@ void phy_stop_machine(struct phy_device *phydev)
*/
void phy_error(struct phy_device *phydev)
{
WARN_ON(1);
pr_notice_once("%s\n", __func__);

mutex_lock(&phydev->lock);
phydev->state = PHY_HALTED;
Expand Down Expand Up @@ -1008,11 +1008,8 @@ void phy_stop(struct phy_device *phydev)
{
struct net_device *dev = phydev->attached_dev;

if (!phy_is_started(phydev) && phydev->state != PHY_DOWN) {
WARN(1, "called from state %s\n",
phy_state_to_str(phydev->state));
if (!phy_is_started(phydev) && phydev->state != PHY_DOWN)
return;
}

mutex_lock(&phydev->lock);

Expand Down
4 changes: 3 additions & 1 deletion drivers/pci/msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1072,8 +1072,10 @@ static 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)
Expand Down
2 changes: 2 additions & 0 deletions drivers/rtc/rtc-cmos.c
Original file line number Diff line number Diff line change
Expand Up @@ -1053,7 +1053,9 @@ static void cmos_check_wkalrm(struct device *dev)
* ACK the rtc irq here
*/
if (t_now >= cmos->alarm_expires && cmos_use_acpi_alarm()) {
local_irq_disable();
cmos_interrupt(0, (void *)cmos->rtc);
local_irq_enable();
return;
}

Expand Down
8 changes: 4 additions & 4 deletions drivers/thermal/intel/therm_throt.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,10 +284,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;
}

Expand Down
24 changes: 24 additions & 0 deletions drivers/usb/core/usb-acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <linux/acpi.h>
#include <linux/pci.h>
#include <linux/usb/hcd.h>
#include <linux/dmi.h>

#include "hub.h"

Expand Down Expand Up @@ -81,6 +82,20 @@ int usb_acpi_set_power_state(struct usb_device *hdev, int index, bool enable)
}
EXPORT_SYMBOL_GPL(usb_acpi_set_power_state);

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;

static enum usb_port_connect_type usb_acpi_get_connect_type(acpi_handle handle,
struct acpi_pld_info *pld)
{
Expand All @@ -89,6 +104,10 @@ static enum usb_port_connect_type usb_acpi_get_connect_type(acpi_handle handle,
union acpi_object *upc = NULL;
acpi_status status;

/* Work around unknown ACPI instruction error on ICL RVP BIOSes. */
if (acpi_connection_type_broken)
return USB_PORT_CONNECT_TYPE_UNKNOWN;

/*
* 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
Expand Down Expand Up @@ -273,6 +292,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);
}

Expand Down
4 changes: 2 additions & 2 deletions include/linux/lockdep.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ struct held_lock {
unsigned int read:2; /* see lock_acquire() comment */
unsigned int check:1; /* see lock_acquire() comment */
unsigned int hardirqs_off:1;
unsigned int references:12; /* 32 bits */
unsigned int pin_count;
unsigned int pin_count:12; /* 32 bits */
unsigned int references;
};

/*
Expand Down
5 changes: 3 additions & 2 deletions include/uapi/linux/perf_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,12 @@ enum perf_event_sample_format {
PERF_SAMPLE_WEIGHT_STRUCT = 1U << 24,

PERF_SAMPLE_MAX = 1U << 25, /* non-ABI */

__PERF_SAMPLE_CALLCHAIN_EARLY = 1ULL << 63, /* non-ABI; internal use */
};

#define PERF_SAMPLE_WEIGHT_TYPE (PERF_SAMPLE_WEIGHT | PERF_SAMPLE_WEIGHT_STRUCT)

#define __PERF_SAMPLE_CALLCHAIN_EARLY (1ULL << 63) /* non-ABI; internal use */

/*
* values to program into branch_sample_type when PERF_SAMPLE_BRANCH is set
*
Expand Down
Loading

0 comments on commit 119ac19

Please sign in to comment.