Skip to content
This repository was archived by the owner on Oct 3, 2024. It is now read-only.

Commit 696cadd

Browse files
committed
Merge remote-tracking branch 'drm-intel/topic/core-for-CI' into drm-tip
# Conflicts: # drivers/acpi/sleep.c # kernel/locking/lockdep.c # kernel/time/timer.c
2 parents 916a0ee + c10ab29 commit 696cadd

File tree

25 files changed

+166
-69
lines changed

25 files changed

+166
-69
lines changed

arch/x86/events/rapl.c

+2
Original file line numberDiff line numberDiff line change
@@ -807,6 +807,8 @@ static const struct x86_cpu_id rapl_model_match[] __initconst = {
807807
X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE, &model_skl),
808808
X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L, &model_skl),
809809
X86_MATCH_INTEL_FAM6_MODEL(SAPPHIRERAPIDS_X, &model_spr),
810+
X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE_L, &model_skl),
811+
X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE, &model_skl),
810812
{},
811813
};
812814
MODULE_DEVICE_TABLE(x86cpu, rapl_model_match);

drivers/acpi/sleep.c

+21
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,16 @@ static int acpi_sleep_prepare(u32 acpi_state)
8080
return 0;
8181
}
8282

83+
static u8 max_sleep_state = -1;
84+
8385
bool acpi_sleep_state_supported(u8 sleep_state)
8486
{
8587
acpi_status status;
8688
u8 type_a, type_b;
8789

90+
if (sleep_state > max_sleep_state)
91+
return false;
92+
8893
status = acpi_get_sleep_type_data(sleep_state, &type_a, &type_b);
8994
return ACPI_SUCCESS(status) && (!acpi_gbl_reduced_hardware
9095
|| (acpi_gbl_FADT.sleep_control.address
@@ -161,6 +166,13 @@ static int __init init_nvs_nosave(const struct dmi_system_id *d)
161166
return 0;
162167
}
163168

169+
static int __init init_nosleep(const struct dmi_system_id *d)
170+
{
171+
pr_info("Disabling ACPI suspend\n");
172+
max_sleep_state = 0;
173+
return 0;
174+
}
175+
164176
bool acpi_sleep_default_s3;
165177

166178
static int __init init_default_s3(const struct dmi_system_id *d)
@@ -385,6 +397,15 @@ static const struct dmi_system_id acpisleep_dmi_table[] __initconst = {
385397
DMI_MATCH(DMI_PRODUCT_NAME, "ASUS EXPERTBOOK B1400CEAE"),
386398
},
387399
},
400+
401+
{
402+
.callback = init_nosleep,
403+
.ident = "samus",
404+
.matches = {
405+
DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"),
406+
DMI_MATCH(DMI_PRODUCT_NAME, "Samus"),
407+
},
408+
},
388409
{},
389410
};
390411

drivers/ata/libata-core.c

+8-8
Original file line numberDiff line numberDiff line change
@@ -2037,7 +2037,7 @@ static bool ata_identify_page_supported(struct ata_device *dev, u8 page)
20372037
* for drives which implement this ATA level or above.
20382038
*/
20392039
if (ata_id_major_version(dev->id) >= 10)
2040-
ata_dev_warn(dev,
2040+
ata_dev_notice(dev,
20412041
"ATA Identify Device Log not supported\n");
20422042
dev->horkage |= ATA_HORKAGE_NO_ID_DEV_LOG;
20432043
return false;
@@ -2109,7 +2109,7 @@ static void ata_dev_config_ncq_send_recv(struct ata_device *dev)
21092109
unsigned int err_mask;
21102110

21112111
if (!ata_log_supported(dev, ATA_LOG_NCQ_SEND_RECV)) {
2112-
ata_dev_warn(dev, "NCQ Send/Recv Log not supported\n");
2112+
ata_dev_notice(dev, "NCQ Send/Recv Log not supported\n");
21132113
return;
21142114
}
21152115
err_mask = ata_read_log_page(dev, ATA_LOG_NCQ_SEND_RECV,
@@ -2134,8 +2134,8 @@ static void ata_dev_config_ncq_non_data(struct ata_device *dev)
21342134
unsigned int err_mask;
21352135

21362136
if (!ata_log_supported(dev, ATA_LOG_NCQ_NON_DATA)) {
2137-
ata_dev_warn(dev,
2138-
"NCQ Send/Recv Log not supported\n");
2137+
ata_dev_notice(dev,
2138+
"NCQ Send/Recv Log not supported\n");
21392139
return;
21402140
}
21412141
err_mask = ata_read_log_page(dev, ATA_LOG_NCQ_NON_DATA,
@@ -2631,14 +2631,14 @@ int ata_dev_configure(struct ata_device *dev)
26312631
if (ata_id_is_cfa(id)) {
26322632
/* CPRM may make this media unusable */
26332633
if (id[ATA_ID_CFA_KEY_MGMT] & 1)
2634-
ata_dev_warn(dev,
2634+
ata_dev_notice(dev,
26352635
"supports DRM functions and may not be fully accessible\n");
26362636
snprintf(revbuf, 7, "CFA");
26372637
} else {
26382638
snprintf(revbuf, 7, "ATA-%d", ata_id_major_version(id));
26392639
/* Warn the user if the device has TPM extensions */
26402640
if (ata_id_has_tpm(id))
2641-
ata_dev_warn(dev,
2641+
ata_dev_notice(dev,
26422642
"supports DRM functions and may not be fully accessible\n");
26432643
}
26442644

@@ -2791,8 +2791,8 @@ int ata_dev_configure(struct ata_device *dev)
27912791
}
27922792

27932793
if ((dev->horkage & ATA_HORKAGE_FIRMWARE_WARN) && print_info) {
2794-
ata_dev_warn(dev, "WARNING: device requires firmware update to be fully functional\n");
2795-
ata_dev_warn(dev, " contact the vendor or visit http://ata.wiki.kernel.org\n");
2794+
ata_dev_notice(dev, "WARNING: device requires firmware update to be fully functional\n");
2795+
ata_dev_notice(dev, " contact the vendor or visit http://ata.wiki.kernel.org\n");
27962796
}
27972797

27982798
return 0;

drivers/gpu/drm/i915/Kconfig.debug

+9
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ config DRM_I915_DEBUG
2121
depends on DRM_I915
2222
depends on EXPERT # only for developers
2323
depends on !COMPILE_TEST # never built by robots
24+
select PCI_MSI # ... for iommu enabled by default
25+
select IOMMU_API
26+
select IOMMU_IOVA
27+
select IOMMU_SUPPORT
28+
select NEED_DMA_MAP_STATE
29+
select DMAR_TABLE
30+
select INTEL_IOMMU
31+
select INTEL_IOMMU_DEFAULT_ON
2432
select DEBUG_FS
2533
select PREEMPT_COUNT
2634
select I2C_CHARDEV
@@ -40,6 +48,7 @@ config DRM_I915_DEBUG
4048
select DRM_I915_DEBUG_RUNTIME_PM
4149
select DRM_I915_SW_FENCE_DEBUG_OBJECTS
4250
select DRM_I915_SELFTEST
51+
select BROKEN # for prototype uAPI
4352
default n
4453
help
4554
Choose this option to turn on extra driver debugging that may affect

drivers/iommu/intel/iommu.c

-2
Original file line numberDiff line numberDiff line change
@@ -379,8 +379,6 @@ static int __init intel_iommu_setup(char *str)
379379
no_platform_optin = 1;
380380
pr_info("IOMMU disabled\n");
381381
} else if (!strncmp(str, "igfx_off", 8)) {
382-
dmar_map_gfx = 0;
383-
pr_info("Disable GFX device mapping\n");
384382
} else if (!strncmp(str, "forcedac", 8)) {
385383
pr_warn("intel_iommu=forcedac deprecated; use iommu.forcedac instead\n");
386384
iommu_dma_forcedac = true;

drivers/net/phy/phy.c

+2-5
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ void phy_stop_machine(struct phy_device *phydev)
943943
*/
944944
void phy_error(struct phy_device *phydev)
945945
{
946-
WARN_ON(1);
946+
pr_notice_once("%s\n", __func__);
947947

948948
mutex_lock(&phydev->lock);
949949
phydev->state = PHY_HALTED;
@@ -1043,11 +1043,8 @@ void phy_stop(struct phy_device *phydev)
10431043
{
10441044
struct net_device *dev = phydev->attached_dev;
10451045

1046-
if (!phy_is_started(phydev) && phydev->state != PHY_DOWN) {
1047-
WARN(1, "called from state %s\n",
1048-
phy_state_to_str(phydev->state));
1046+
if (!phy_is_started(phydev) && phydev->state != PHY_DOWN)
10491047
return;
1050-
}
10511048

10521049
mutex_lock(&phydev->lock);
10531050

drivers/pci/msi/msi.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -879,8 +879,10 @@ static int __pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec,
879879
if (maxvec < minvec)
880880
return -ERANGE;
881881

882-
if (WARN_ON_ONCE(dev->msi_enabled))
882+
if (dev->msi_enabled) {
883+
pci_info(dev, "can't enable MSI, already enabled\n");
883884
return -EINVAL;
885+
}
884886

885887
nvec = pci_msi_vec_count(dev);
886888
if (nvec < 0)

drivers/thermal/intel/therm_throt.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -285,10 +285,10 @@ static void __maybe_unused throttle_active_work(struct work_struct *work)
285285
avg /= ARRAY_SIZE(state->temp_samples);
286286

287287
if (state->average > avg) {
288-
pr_warn("CPU%d: %s temperature is above threshold, cpu clock is throttled (total events = %lu)\n",
289-
this_cpu,
290-
state->level == CORE_LEVEL ? "Core" : "Package",
291-
state->count);
288+
pr_notice("CPU%d: %s temperature is above threshold, cpu clock is throttled (total events = %lu)\n",
289+
this_cpu,
290+
state->level == CORE_LEVEL ? "Core" : "Package",
291+
state->count);
292292
state->rate_control_active = true;
293293
}
294294

drivers/usb/core/usb-acpi.c

+24
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <linux/acpi.h>
1313
#include <linux/pci.h>
1414
#include <linux/usb/hcd.h>
15+
#include <linux/dmi.h>
1516

1617
#include "hub.h"
1718

@@ -81,6 +82,20 @@ int usb_acpi_set_power_state(struct usb_device *hdev, int index, bool enable)
8182
}
8283
EXPORT_SYMBOL_GPL(usb_acpi_set_power_state);
8384

85+
static const struct dmi_system_id intel_icl_broken_acpi[] = {
86+
{
87+
.ident = "ICL RVP",
88+
.matches = {
89+
DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
90+
DMI_MATCH(DMI_PRODUCT_NAME, "Ice Lake Client Platform"),
91+
},
92+
},
93+
94+
{ }
95+
};
96+
97+
static bool acpi_connection_type_broken;
98+
8499
static enum usb_port_connect_type usb_acpi_get_connect_type(acpi_handle handle,
85100
struct acpi_pld_info *pld)
86101
{
@@ -89,6 +104,10 @@ static enum usb_port_connect_type usb_acpi_get_connect_type(acpi_handle handle,
89104
union acpi_object *upc = NULL;
90105
acpi_status status;
91106

107+
/* Work around unknown ACPI instruction error on ICL RVP BIOSes. */
108+
if (acpi_connection_type_broken)
109+
return USB_PORT_CONNECT_TYPE_UNKNOWN;
110+
92111
/*
93112
* According to 9.14 in ACPI Spec 6.2. _PLD indicates whether usb port
94113
* is user visible and _UPC indicates whether it is connectable. If
@@ -276,6 +295,11 @@ static struct acpi_bus_type usb_acpi_bus = {
276295

277296
int usb_acpi_register(void)
278297
{
298+
if (dmi_check_system(intel_icl_broken_acpi)) {
299+
pr_info("USB ACPI connection type broken.\n");
300+
acpi_connection_type_broken = true;
301+
}
302+
279303
return register_acpi_bus_type(&usb_acpi_bus);
280304
}
281305

include/linux/lockdep.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ struct held_lock {
134134
unsigned int read:2; /* see lock_acquire() comment */
135135
unsigned int check:1; /* see lock_acquire() comment */
136136
unsigned int hardirqs_off:1;
137-
unsigned int references:12; /* 32 bits */
138-
unsigned int pin_count;
137+
unsigned int pin_count:12; /* 32 bits */
138+
unsigned int references;
139139
};
140140

141141
/*

include/uapi/linux/perf_event.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,12 @@ enum perf_event_sample_format {
164164
PERF_SAMPLE_WEIGHT_STRUCT = 1U << 24,
165165

166166
PERF_SAMPLE_MAX = 1U << 25, /* non-ABI */
167-
168-
__PERF_SAMPLE_CALLCHAIN_EARLY = 1ULL << 63, /* non-ABI; internal use */
169167
};
170168

171169
#define PERF_SAMPLE_WEIGHT_TYPE (PERF_SAMPLE_WEIGHT | PERF_SAMPLE_WEIGHT_STRUCT)
170+
171+
#define __PERF_SAMPLE_CALLCHAIN_EARLY (1ULL << 63) /* non-ABI; internal use */
172+
172173
/*
173174
* values to program into branch_sample_type when PERF_SAMPLE_BRANCH is set
174175
*

kernel/events/core.c

+27-25
Original file line numberDiff line numberDiff line change
@@ -5272,20 +5272,16 @@ static int __perf_read_group_add(struct perf_event *leader,
52725272
}
52735273

52745274
static int perf_read_group(struct perf_event *event,
5275-
u64 read_format, char __user *buf)
5275+
u64 read_format, char __user *buf,
5276+
u64 *values)
52765277
{
52775278
struct perf_event *leader = event->group_leader, *child;
52785279
struct perf_event_context *ctx = leader->ctx;
52795280
int ret;
5280-
u64 *values;
52815281

52825282
lockdep_assert_held(&ctx->mutex);
52835283

5284-
values = kzalloc(event->read_size, GFP_KERNEL);
5285-
if (!values)
5286-
return -ENOMEM;
5287-
5288-
values[0] = 1 + leader->nr_siblings;
5284+
*values = 1 + leader->nr_siblings;
52895285

52905286
/*
52915287
* By locking the child_mutex of the leader we effectively
@@ -5303,25 +5299,17 @@ static int perf_read_group(struct perf_event *event,
53035299
goto unlock;
53045300
}
53055301

5306-
mutex_unlock(&leader->child_mutex);
5307-
53085302
ret = event->read_size;
5309-
if (copy_to_user(buf, values, event->read_size))
5310-
ret = -EFAULT;
5311-
goto out;
5312-
53135303
unlock:
53145304
mutex_unlock(&leader->child_mutex);
5315-
out:
5316-
kfree(values);
53175305
return ret;
53185306
}
53195307

53205308
static int perf_read_one(struct perf_event *event,
5321-
u64 read_format, char __user *buf)
5309+
u64 read_format, char __user *buf,
5310+
u64 *values)
53225311
{
53235312
u64 enabled, running;
5324-
u64 values[4];
53255313
int n = 0;
53265314

53275315
values[n++] = __perf_event_read_value(event, &enabled, &running);
@@ -5332,9 +5320,6 @@ static int perf_read_one(struct perf_event *event,
53325320
if (read_format & PERF_FORMAT_ID)
53335321
values[n++] = primary_event_id(event);
53345322

5335-
if (copy_to_user(buf, values, n * sizeof(u64)))
5336-
return -EFAULT;
5337-
53385323
return n * sizeof(u64);
53395324
}
53405325

@@ -5355,7 +5340,8 @@ static bool is_event_hup(struct perf_event *event)
53555340
* Read the performance event - simple non blocking version for now
53565341
*/
53575342
static ssize_t
5358-
__perf_read(struct perf_event *event, char __user *buf, size_t count)
5343+
__perf_read(struct perf_event *event, char __user *buf,
5344+
size_t count, u64 *values)
53595345
{
53605346
u64 read_format = event->attr.read_format;
53615347
int ret;
@@ -5373,9 +5359,9 @@ __perf_read(struct perf_event *event, char __user *buf, size_t count)
53735359

53745360
WARN_ON_ONCE(event->ctx->parent_ctx);
53755361
if (read_format & PERF_FORMAT_GROUP)
5376-
ret = perf_read_group(event, read_format, buf);
5362+
ret = perf_read_group(event, read_format, buf, values);
53775363
else
5378-
ret = perf_read_one(event, read_format, buf);
5364+
ret = perf_read_one(event, read_format, buf, values);
53795365

53805366
return ret;
53815367
}
@@ -5385,16 +5371,31 @@ perf_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
53855371
{
53865372
struct perf_event *event = file->private_data;
53875373
struct perf_event_context *ctx;
5374+
u64 stack_values[8];
5375+
u64 *values;
53885376
int ret;
53895377

53905378
ret = security_perf_event_read(event);
53915379
if (ret)
53925380
return ret;
53935381

5382+
if (event->read_size <= sizeof(stack_values))
5383+
values = memset(stack_values, 0, event->read_size);
5384+
else
5385+
values = kzalloc(event->read_size, GFP_KERNEL);
5386+
if (!values)
5387+
return -ENOMEM;
5388+
53945389
ctx = perf_event_ctx_lock(event);
5395-
ret = __perf_read(event, buf, count);
5390+
ret = __perf_read(event, buf, count, values);
53965391
perf_event_ctx_unlock(event, ctx);
53975392

5393+
if (ret > 0 && copy_to_user(buf, values, ret))
5394+
ret = -EFAULT;
5395+
5396+
if (values != stack_values)
5397+
kfree(values);
5398+
53985399
return ret;
53995400
}
54005401

@@ -11203,7 +11204,8 @@ void perf_pmu_unregister(struct pmu *pmu)
1120311204
device_del(pmu->dev);
1120411205
put_device(pmu->dev);
1120511206
}
11206-
free_pmu_context(pmu);
11207+
if (!find_pmu_context(pmu->task_ctx_nr))
11208+
free_pmu_context(pmu);
1120711209
mutex_unlock(&pmus_lock);
1120811210
}
1120911211
EXPORT_SYMBOL_GPL(perf_pmu_unregister);

0 commit comments

Comments
 (0)