Skip to content

Commit d7221af

Browse files
committed
Merge remote-tracking branch 'drm-intel/topic/core-for-CI' into drm-tip
2 parents 86d98c3 + 2614595 commit d7221af

File tree

20 files changed

+133
-63
lines changed

20 files changed

+133
-63
lines changed

arch/x86/kernel/cpu/mce/therm_throt.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,10 +284,10 @@ static void __maybe_unused throttle_active_work(struct work_struct *work)
284284
avg /= ARRAY_SIZE(state->temp_samples);
285285

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

drivers/ata/libata-core.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2049,7 +2049,7 @@ static bool ata_identify_page_supported(struct ata_device *dev, u8 page)
20492049
unsigned int err, i;
20502050

20512051
if (!ata_log_supported(dev, ATA_LOG_IDENTIFY_DEVICE)) {
2052-
ata_dev_warn(dev, "ATA Identify Device Log not supported\n");
2052+
ata_dev_notice(dev, "ATA Identify Device Log not supported\n");
20532053
return false;
20542054
}
20552055

@@ -2123,7 +2123,7 @@ static void ata_dev_config_ncq_send_recv(struct ata_device *dev)
21232123
unsigned int err_mask;
21242124

21252125
if (!ata_log_supported(dev, ATA_LOG_NCQ_SEND_RECV)) {
2126-
ata_dev_warn(dev, "NCQ Send/Recv Log not supported\n");
2126+
ata_dev_notice(dev, "NCQ Send/Recv Log not supported\n");
21272127
return;
21282128
}
21292129
err_mask = ata_read_log_page(dev, ATA_LOG_NCQ_SEND_RECV,
@@ -2152,8 +2152,8 @@ static void ata_dev_config_ncq_non_data(struct ata_device *dev)
21522152
unsigned int err_mask;
21532153

21542154
if (!ata_log_supported(dev, ATA_LOG_NCQ_NON_DATA)) {
2155-
ata_dev_warn(dev,
2156-
"NCQ Send/Recv Log not supported\n");
2155+
ata_dev_notice(dev,
2156+
"NCQ Send/Recv Log not supported\n");
21572157
return;
21582158
}
21592159
err_mask = ata_read_log_page(dev, ATA_LOG_NCQ_NON_DATA,
@@ -2485,14 +2485,14 @@ int ata_dev_configure(struct ata_device *dev)
24852485
if (ata_id_is_cfa(id)) {
24862486
/* CPRM may make this media unusable */
24872487
if (id[ATA_ID_CFA_KEY_MGMT] & 1)
2488-
ata_dev_warn(dev,
2488+
ata_dev_notice(dev,
24892489
"supports DRM functions and may not be fully accessible\n");
24902490
snprintf(revbuf, 7, "CFA");
24912491
} else {
24922492
snprintf(revbuf, 7, "ATA-%d", ata_id_major_version(id));
24932493
/* Warn the user if the device has TPM extensions */
24942494
if (ata_id_has_tpm(id))
2495-
ata_dev_warn(dev,
2495+
ata_dev_notice(dev,
24962496
"supports DRM functions and may not be fully accessible\n");
24972497
}
24982498

@@ -2708,8 +2708,8 @@ int ata_dev_configure(struct ata_device *dev)
27082708
}
27092709

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

27152715
return 0;

drivers/gpu/drm/i915/Kconfig.debug

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ config DRM_I915_WERROR
1919
config DRM_I915_DEBUG
2020
bool "Enable additional driver debugging"
2121
depends on DRM_I915
22+
select PCI_MSI # ... for iommu enabled by default
23+
select IOMMU_API
24+
select IOMMU_IOVA
25+
select IOMMU_SUPPORT
26+
select NEED_DMA_MAP_STATE
27+
select DMAR_TABLE
28+
select INTEL_IOMMU
29+
select INTEL_IOMMU_DEFAULT_ON
2230
select DEBUG_FS
2331
select PREEMPT_COUNT
2432
select I2C_CHARDEV
@@ -35,6 +43,7 @@ config DRM_I915_DEBUG
3543
select DRM_I915_SELFTEST
3644
select DRM_I915_DEBUG_RUNTIME_PM
3745
select DRM_I915_DEBUG_MMIO
46+
select BROKEN # for prototype uAPI
3847
default n
3948
help
4049
Choose this option to turn on extra driver debugging that may affect

drivers/iommu/intel-iommu.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,8 +465,6 @@ static int __init intel_iommu_setup(char *str)
465465
no_platform_optin = 1;
466466
pr_info("IOMMU disabled\n");
467467
} else if (!strncmp(str, "igfx_off", 8)) {
468-
dmar_map_gfx = 0;
469-
pr_info("Disable GFX device mapping\n");
470468
} else if (!strncmp(str, "forcedac", 8)) {
471469
pr_info("Forcing DAC for PCI devices\n");
472470
dmar_forcedac = 1;

drivers/pci/msi.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1071,8 +1071,10 @@ static int __pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec,
10711071
if (maxvec < minvec)
10721072
return -ERANGE;
10731073

1074-
if (WARN_ON_ONCE(dev->msi_enabled))
1074+
if (dev->msi_enabled) {
1075+
pci_info(dev, "can't enable MSI, already enabled\n");
10751076
return -EINVAL;
1077+
}
10761078

10771079
nvec = pci_msi_vec_count(dev);
10781080
if (nvec < 0)

drivers/usb/core/usb-acpi.c

Lines changed: 24 additions & 0 deletions
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
@@ -273,6 +292,11 @@ static struct acpi_bus_type usb_acpi_bus = {
273292

274293
int usb_acpi_register(void)
275294
{
295+
if (dmi_check_system(intel_icl_broken_acpi)) {
296+
pr_info("USB ACPI connection type broken.\n");
297+
acpi_connection_type_broken = true;
298+
}
299+
276300
return register_acpi_bus_type(&usb_acpi_bus);
277301
}
278302

include/linux/lockdep.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,8 @@ struct held_lock {
292292
unsigned int read:2; /* see lock_acquire() comment */
293293
unsigned int check:1; /* see lock_acquire() comment */
294294
unsigned int hardirqs_off:1;
295-
unsigned int references:12; /* 32 bits */
296-
unsigned int pin_count;
295+
unsigned int pin_count:12; /* 32 bits */
296+
unsigned int references;
297297
};
298298

299299
/*

include/uapi/linux/perf_event.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,10 @@ enum perf_event_sample_format {
145145
PERF_SAMPLE_CGROUP = 1U << 21,
146146

147147
PERF_SAMPLE_MAX = 1U << 22, /* non-ABI */
148-
149-
__PERF_SAMPLE_CALLCHAIN_EARLY = 1ULL << 63, /* non-ABI; internal use */
150148
};
151149

150+
#define __PERF_SAMPLE_CALLCHAIN_EARLY (1ULL << 63) /* non-ABI; internal use */
151+
152152
/*
153153
* values to program into branch_sample_type when PERF_SAMPLE_BRANCH is set
154154
*

kernel/events/core.c

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5102,20 +5102,16 @@ static int __perf_read_group_add(struct perf_event *leader,
51025102
}
51035103

51045104
static int perf_read_group(struct perf_event *event,
5105-
u64 read_format, char __user *buf)
5105+
u64 read_format, char __user *buf,
5106+
u64 *values)
51065107
{
51075108
struct perf_event *leader = event->group_leader, *child;
51085109
struct perf_event_context *ctx = leader->ctx;
51095110
int ret;
5110-
u64 *values;
51115111

51125112
lockdep_assert_held(&ctx->mutex);
51135113

5114-
values = kzalloc(event->read_size, GFP_KERNEL);
5115-
if (!values)
5116-
return -ENOMEM;
5117-
5118-
values[0] = 1 + leader->nr_siblings;
5114+
*values = 1 + leader->nr_siblings;
51195115

51205116
/*
51215117
* By locking the child_mutex of the leader we effectively
@@ -5133,25 +5129,17 @@ static int perf_read_group(struct perf_event *event,
51335129
goto unlock;
51345130
}
51355131

5136-
mutex_unlock(&leader->child_mutex);
5137-
51385132
ret = event->read_size;
5139-
if (copy_to_user(buf, values, event->read_size))
5140-
ret = -EFAULT;
5141-
goto out;
5142-
51435133
unlock:
51445134
mutex_unlock(&leader->child_mutex);
5145-
out:
5146-
kfree(values);
51475135
return ret;
51485136
}
51495137

51505138
static int perf_read_one(struct perf_event *event,
5151-
u64 read_format, char __user *buf)
5139+
u64 read_format, char __user *buf,
5140+
u64 *values)
51525141
{
51535142
u64 enabled, running;
5154-
u64 values[4];
51555143
int n = 0;
51565144

51575145
values[n++] = __perf_event_read_value(event, &enabled, &running);
@@ -5162,9 +5150,6 @@ static int perf_read_one(struct perf_event *event,
51625150
if (read_format & PERF_FORMAT_ID)
51635151
values[n++] = primary_event_id(event);
51645152

5165-
if (copy_to_user(buf, values, n * sizeof(u64)))
5166-
return -EFAULT;
5167-
51685153
return n * sizeof(u64);
51695154
}
51705155

@@ -5185,7 +5170,8 @@ static bool is_event_hup(struct perf_event *event)
51855170
* Read the performance event - simple non blocking version for now
51865171
*/
51875172
static ssize_t
5188-
__perf_read(struct perf_event *event, char __user *buf, size_t count)
5173+
__perf_read(struct perf_event *event, char __user *buf,
5174+
size_t count, u64 *values)
51895175
{
51905176
u64 read_format = event->attr.read_format;
51915177
int ret;
@@ -5203,9 +5189,9 @@ __perf_read(struct perf_event *event, char __user *buf, size_t count)
52035189

52045190
WARN_ON_ONCE(event->ctx->parent_ctx);
52055191
if (read_format & PERF_FORMAT_GROUP)
5206-
ret = perf_read_group(event, read_format, buf);
5192+
ret = perf_read_group(event, read_format, buf, values);
52075193
else
5208-
ret = perf_read_one(event, read_format, buf);
5194+
ret = perf_read_one(event, read_format, buf, values);
52095195

52105196
return ret;
52115197
}
@@ -5215,16 +5201,31 @@ perf_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
52155201
{
52165202
struct perf_event *event = file->private_data;
52175203
struct perf_event_context *ctx;
5204+
u64 stack_values[8];
5205+
u64 *values;
52185206
int ret;
52195207

52205208
ret = security_perf_event_read(event);
52215209
if (ret)
52225210
return ret;
52235211

5212+
if (event->read_size <= sizeof(stack_values))
5213+
values = memset(stack_values, 0, event->read_size);
5214+
else
5215+
values = kzalloc(event->read_size, GFP_KERNEL);
5216+
if (!values)
5217+
return -ENOMEM;
5218+
52245219
ctx = perf_event_ctx_lock(event);
5225-
ret = __perf_read(event, buf, count);
5220+
ret = __perf_read(event, buf, count, values);
52265221
perf_event_ctx_unlock(event, ctx);
52275222

5223+
if (ret > 0 && copy_to_user(buf, values, ret))
5224+
ret = -EFAULT;
5225+
5226+
if (values != stack_values)
5227+
kfree(values);
5228+
52285229
return ret;
52295230
}
52305231

@@ -10740,7 +10741,8 @@ void perf_pmu_unregister(struct pmu *pmu)
1074010741
device_del(pmu->dev);
1074110742
put_device(pmu->dev);
1074210743
}
10743-
free_pmu_context(pmu);
10744+
if (!find_pmu_context(pmu->task_ctx_nr))
10745+
free_pmu_context(pmu);
1074410746
mutex_unlock(&pmus_lock);
1074510747
}
1074610748
EXPORT_SYMBOL_GPL(perf_pmu_unregister);

kernel/hung_task.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ int __read_mostly sysctl_hung_task_warnings = 10;
5252

5353
static int __read_mostly did_panic;
5454
static bool hung_task_show_lock;
55+
static bool hung_task_show_state;
5556
static bool hung_task_call_panic;
5657

5758
static struct task_struct *watchdog_task;
@@ -117,7 +118,10 @@ static void check_hung_task(struct task_struct *t, unsigned long timeout)
117118
if (sysctl_hung_task_panic) {
118119
console_verbose();
119120
hung_task_show_lock = true;
121+
hung_task_show_state = true;
120122
hung_task_call_panic = true;
123+
} else {
124+
add_taint(TAINT_WARN, LOCKDEP_STILL_OK);
121125
}
122126

123127
/*
@@ -137,6 +141,7 @@ static void check_hung_task(struct task_struct *t, unsigned long timeout)
137141
" disables this message.\n");
138142
sched_show_task(t);
139143
hung_task_show_lock = true;
144+
hung_task_show_state = true;
140145
}
141146

142147
touch_nmi_watchdog();
@@ -184,6 +189,7 @@ static void check_hung_uninterruptible_tasks(unsigned long timeout)
184189
return;
185190

186191
hung_task_show_lock = false;
192+
hung_task_show_state = false;
187193
rcu_read_lock();
188194
for_each_process_thread(g, t) {
189195
if (!max_count--)
@@ -201,6 +207,10 @@ static void check_hung_uninterruptible_tasks(unsigned long timeout)
201207
rcu_read_unlock();
202208
if (hung_task_show_lock)
203209
debug_show_all_locks();
210+
if (hung_task_show_state) {
211+
show_state();
212+
show_workqueue_state();
213+
}
204214
if (hung_task_call_panic) {
205215
trigger_all_cpu_backtrace();
206216
panic("hung_task: blocked tasks");

0 commit comments

Comments
 (0)