Merge tag 'v5.12' into android-mainline
Linux 5.12 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I393e101f51b91864b833ae69faf4caac50bc403e
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 12
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc8
|
||||
EXTRAVERSION =
|
||||
NAME = Frozen Wasteland
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
||||
@@ -4516,7 +4516,7 @@ static const struct x86_cpu_desc isolation_ucodes[] = {
|
||||
INTEL_CPU_DESC(INTEL_FAM6_BROADWELL_D, 3, 0x07000009),
|
||||
INTEL_CPU_DESC(INTEL_FAM6_BROADWELL_D, 4, 0x0f000009),
|
||||
INTEL_CPU_DESC(INTEL_FAM6_BROADWELL_D, 5, 0x0e000002),
|
||||
INTEL_CPU_DESC(INTEL_FAM6_BROADWELL_X, 2, 0x0b000014),
|
||||
INTEL_CPU_DESC(INTEL_FAM6_BROADWELL_X, 1, 0x0b000014),
|
||||
INTEL_CPU_DESC(INTEL_FAM6_SKYLAKE_X, 3, 0x00000021),
|
||||
INTEL_CPU_DESC(INTEL_FAM6_SKYLAKE_X, 4, 0x00000000),
|
||||
INTEL_CPU_DESC(INTEL_FAM6_SKYLAKE_X, 5, 0x00000000),
|
||||
|
||||
@@ -1159,7 +1159,6 @@ enum {
|
||||
SNBEP_PCI_QPI_PORT0_FILTER,
|
||||
SNBEP_PCI_QPI_PORT1_FILTER,
|
||||
BDX_PCI_QPI_PORT2_FILTER,
|
||||
HSWEP_PCI_PCU_3,
|
||||
};
|
||||
|
||||
static int snbep_qpi_hw_config(struct intel_uncore_box *box, struct perf_event *event)
|
||||
@@ -2857,22 +2856,33 @@ static struct intel_uncore_type *hswep_msr_uncores[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
#define HSWEP_PCU_DID 0x2fc0
|
||||
#define HSWEP_PCU_CAPID4_OFFET 0x94
|
||||
#define hswep_get_chop(_cap) (((_cap) >> 6) & 0x3)
|
||||
|
||||
static bool hswep_has_limit_sbox(unsigned int device)
|
||||
{
|
||||
struct pci_dev *dev = pci_get_device(PCI_VENDOR_ID_INTEL, device, NULL);
|
||||
u32 capid4;
|
||||
|
||||
if (!dev)
|
||||
return false;
|
||||
|
||||
pci_read_config_dword(dev, HSWEP_PCU_CAPID4_OFFET, &capid4);
|
||||
if (!hswep_get_chop(capid4))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void hswep_uncore_cpu_init(void)
|
||||
{
|
||||
int pkg = boot_cpu_data.logical_proc_id;
|
||||
|
||||
if (hswep_uncore_cbox.num_boxes > boot_cpu_data.x86_max_cores)
|
||||
hswep_uncore_cbox.num_boxes = boot_cpu_data.x86_max_cores;
|
||||
|
||||
/* Detect 6-8 core systems with only two SBOXes */
|
||||
if (uncore_extra_pci_dev[pkg].dev[HSWEP_PCI_PCU_3]) {
|
||||
u32 capid4;
|
||||
|
||||
pci_read_config_dword(uncore_extra_pci_dev[pkg].dev[HSWEP_PCI_PCU_3],
|
||||
0x94, &capid4);
|
||||
if (((capid4 >> 6) & 0x3) == 0)
|
||||
hswep_uncore_sbox.num_boxes = 2;
|
||||
}
|
||||
if (hswep_has_limit_sbox(HSWEP_PCU_DID))
|
||||
hswep_uncore_sbox.num_boxes = 2;
|
||||
|
||||
uncore_msr_uncores = hswep_msr_uncores;
|
||||
}
|
||||
@@ -3135,11 +3145,6 @@ static const struct pci_device_id hswep_uncore_pci_ids[] = {
|
||||
.driver_data = UNCORE_PCI_DEV_DATA(UNCORE_EXTRA_PCI_DEV,
|
||||
SNBEP_PCI_QPI_PORT1_FILTER),
|
||||
},
|
||||
{ /* PCU.3 (for Capability registers) */
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x2fc0),
|
||||
.driver_data = UNCORE_PCI_DEV_DATA(UNCORE_EXTRA_PCI_DEV,
|
||||
HSWEP_PCI_PCU_3),
|
||||
},
|
||||
{ /* end: all zeroes */ }
|
||||
};
|
||||
|
||||
@@ -3231,27 +3236,18 @@ static struct event_constraint bdx_uncore_pcu_constraints[] = {
|
||||
EVENT_CONSTRAINT_END
|
||||
};
|
||||
|
||||
#define BDX_PCU_DID 0x6fc0
|
||||
|
||||
void bdx_uncore_cpu_init(void)
|
||||
{
|
||||
int pkg = topology_phys_to_logical_pkg(boot_cpu_data.phys_proc_id);
|
||||
|
||||
if (bdx_uncore_cbox.num_boxes > boot_cpu_data.x86_max_cores)
|
||||
bdx_uncore_cbox.num_boxes = boot_cpu_data.x86_max_cores;
|
||||
uncore_msr_uncores = bdx_msr_uncores;
|
||||
|
||||
/* BDX-DE doesn't have SBOX */
|
||||
if (boot_cpu_data.x86_model == 86) {
|
||||
uncore_msr_uncores[BDX_MSR_UNCORE_SBOX] = NULL;
|
||||
/* Detect systems with no SBOXes */
|
||||
} else if (uncore_extra_pci_dev[pkg].dev[HSWEP_PCI_PCU_3]) {
|
||||
struct pci_dev *pdev;
|
||||
u32 capid4;
|
||||
if ((boot_cpu_data.x86_model == 86) || hswep_has_limit_sbox(BDX_PCU_DID))
|
||||
uncore_msr_uncores[BDX_MSR_UNCORE_SBOX] = NULL;
|
||||
|
||||
pdev = uncore_extra_pci_dev[pkg].dev[HSWEP_PCI_PCU_3];
|
||||
pci_read_config_dword(pdev, 0x94, &capid4);
|
||||
if (((capid4 >> 6) & 0x3) == 0)
|
||||
bdx_msr_uncores[BDX_MSR_UNCORE_SBOX] = NULL;
|
||||
}
|
||||
hswep_uncore_pcu.constraints = bdx_uncore_pcu_constraints;
|
||||
}
|
||||
|
||||
@@ -3472,11 +3468,6 @@ static const struct pci_device_id bdx_uncore_pci_ids[] = {
|
||||
.driver_data = UNCORE_PCI_DEV_DATA(UNCORE_EXTRA_PCI_DEV,
|
||||
BDX_PCI_QPI_PORT2_FILTER),
|
||||
},
|
||||
{ /* PCU.3 (for Capability registers) */
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x6fc0),
|
||||
.driver_data = UNCORE_PCI_DEV_DATA(UNCORE_EXTRA_PCI_DEV,
|
||||
HSWEP_PCI_PCU_3),
|
||||
},
|
||||
{ /* end: all zeroes */ }
|
||||
};
|
||||
|
||||
|
||||
@@ -337,7 +337,7 @@ int crash_setup_memmap_entries(struct kimage *image, struct boot_params *params)
|
||||
struct crash_memmap_data cmd;
|
||||
struct crash_mem *cmem;
|
||||
|
||||
cmem = vzalloc(sizeof(struct crash_mem));
|
||||
cmem = vzalloc(struct_size(cmem, ranges, 1));
|
||||
if (!cmem)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
+9
-11
@@ -4025,7 +4025,6 @@ static void kvm_steal_time_set_preempted(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
struct kvm_host_map map;
|
||||
struct kvm_steal_time *st;
|
||||
int idx;
|
||||
|
||||
if (!(vcpu->arch.st.msr_val & KVM_MSR_ENABLED))
|
||||
return;
|
||||
@@ -4033,15 +4032,9 @@ static void kvm_steal_time_set_preempted(struct kvm_vcpu *vcpu)
|
||||
if (vcpu->arch.st.preempted)
|
||||
return;
|
||||
|
||||
/*
|
||||
* Take the srcu lock as memslots will be accessed to check the gfn
|
||||
* cache generation against the memslots generation.
|
||||
*/
|
||||
idx = srcu_read_lock(&vcpu->kvm->srcu);
|
||||
|
||||
if (kvm_map_gfn(vcpu, vcpu->arch.st.msr_val >> PAGE_SHIFT, &map,
|
||||
&vcpu->arch.st.cache, true))
|
||||
goto out;
|
||||
return;
|
||||
|
||||
st = map.hva +
|
||||
offset_in_page(vcpu->arch.st.msr_val & KVM_STEAL_VALID_BITS);
|
||||
@@ -4049,20 +4042,25 @@ static void kvm_steal_time_set_preempted(struct kvm_vcpu *vcpu)
|
||||
st->preempted = vcpu->arch.st.preempted = KVM_VCPU_PREEMPTED;
|
||||
|
||||
kvm_unmap_gfn(vcpu, &map, &vcpu->arch.st.cache, true, true);
|
||||
|
||||
out:
|
||||
srcu_read_unlock(&vcpu->kvm->srcu, idx);
|
||||
}
|
||||
|
||||
void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
int idx;
|
||||
|
||||
if (vcpu->preempted && !vcpu->arch.guest_state_protected)
|
||||
vcpu->arch.preempted_in_kernel = !static_call(kvm_x86_get_cpl)(vcpu);
|
||||
|
||||
/*
|
||||
* Take the srcu lock as memslots will be accessed to check the gfn
|
||||
* cache generation against the memslots generation.
|
||||
*/
|
||||
idx = srcu_read_lock(&vcpu->kvm->srcu);
|
||||
if (kvm_xen_msr_enabled(vcpu->kvm))
|
||||
kvm_xen_runstate_set_preempted(vcpu);
|
||||
else
|
||||
kvm_steal_time_set_preempted(vcpu);
|
||||
srcu_read_unlock(&vcpu->kvm->srcu, idx);
|
||||
|
||||
static_call(kvm_x86_vcpu_put)(vcpu);
|
||||
vcpu->arch.last_host_tsc = rdtsc();
|
||||
|
||||
@@ -422,7 +422,7 @@ noinstr void irqentry_exit(struct pt_regs *regs, irqentry_state_t state)
|
||||
|
||||
instrumentation_begin();
|
||||
if (IS_ENABLED(CONFIG_PREEMPTION)) {
|
||||
#ifdef CONFIG_PREEMT_DYNAMIC
|
||||
#ifdef CONFIG_PREEMPT_DYNAMIC
|
||||
static_call(irqentry_exit_cond_resched)();
|
||||
#else
|
||||
irqentry_exit_cond_resched();
|
||||
|
||||
@@ -60,6 +60,8 @@ EXPORT_SYMBOL(queued_read_lock_slowpath);
|
||||
*/
|
||||
void queued_write_lock_slowpath(struct qrwlock *lock)
|
||||
{
|
||||
int cnts;
|
||||
|
||||
/* Put the writer into the wait queue */
|
||||
arch_spin_lock(&lock->wait_lock);
|
||||
|
||||
@@ -73,9 +75,8 @@ void queued_write_lock_slowpath(struct qrwlock *lock)
|
||||
|
||||
/* When no more readers or writers, set the locked flag */
|
||||
do {
|
||||
atomic_cond_read_acquire(&lock->cnts, VAL == _QW_WAITING);
|
||||
} while (atomic_cmpxchg_relaxed(&lock->cnts, _QW_WAITING,
|
||||
_QW_LOCKED) != _QW_WAITING);
|
||||
cnts = atomic_cond_read_relaxed(&lock->cnts, VAL == _QW_WAITING);
|
||||
} while (!atomic_try_cmpxchg_acquire(&lock->cnts, &cnts, _QW_LOCKED));
|
||||
unlock:
|
||||
arch_spin_unlock(&lock->wait_lock);
|
||||
}
|
||||
|
||||
@@ -180,7 +180,6 @@ void rds_message_put(struct rds_message *rm)
|
||||
rds_message_purge(rm);
|
||||
|
||||
kfree(rm);
|
||||
rm = NULL;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rds_message_put);
|
||||
|
||||
+1
-1
@@ -665,7 +665,7 @@ static void rds_send_remove_from_sock(struct list_head *messages, int status)
|
||||
unlock_and_drop:
|
||||
spin_unlock_irqrestore(&rm->m_rs_lock, flags);
|
||||
rds_message_put(rm);
|
||||
if (was_on_sock && rm)
|
||||
if (was_on_sock)
|
||||
rds_message_put(rm);
|
||||
}
|
||||
|
||||
|
||||
@@ -289,7 +289,7 @@ static int set_tracing_pid(struct perf_ftrace *ftrace)
|
||||
|
||||
for (i = 0; i < perf_thread_map__nr(ftrace->evlist->core.threads); i++) {
|
||||
scnprintf(buf, sizeof(buf), "%d",
|
||||
ftrace->evlist->core.threads->map[i]);
|
||||
perf_thread_map__pid(ftrace->evlist->core.threads, i));
|
||||
if (append_tracing_file("set_ftrace_pid", buf) < 0)
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -634,7 +634,7 @@ int auxtrace_parse_snapshot_options(struct auxtrace_record *itr,
|
||||
break;
|
||||
}
|
||||
|
||||
if (itr)
|
||||
if (itr && itr->parse_snapshot_options)
|
||||
return itr->parse_snapshot_options(itr, opts, str);
|
||||
|
||||
pr_err("No AUX area tracing to snapshot\n");
|
||||
|
||||
@@ -35,7 +35,7 @@ void perf_data__close_dir(struct perf_data *data)
|
||||
int perf_data__create_dir(struct perf_data *data, int nr)
|
||||
{
|
||||
struct perf_data_file *files = NULL;
|
||||
int i, ret = -1;
|
||||
int i, ret;
|
||||
|
||||
if (WARN_ON(!data->is_dir))
|
||||
return -EINVAL;
|
||||
@@ -51,7 +51,8 @@ int perf_data__create_dir(struct perf_data *data, int nr)
|
||||
for (i = 0; i < nr; i++) {
|
||||
struct perf_data_file *file = &files[i];
|
||||
|
||||
if (asprintf(&file->path, "%s/data.%d", data->path, i) < 0)
|
||||
ret = asprintf(&file->path, "%s/data.%d", data->path, i);
|
||||
if (ret < 0)
|
||||
goto out_err;
|
||||
|
||||
ret = open(file->path, O_RDWR|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR);
|
||||
|
||||
@@ -840,15 +840,18 @@ out:
|
||||
int maps__clone(struct thread *thread, struct maps *parent)
|
||||
{
|
||||
struct maps *maps = thread->maps;
|
||||
int err = -ENOMEM;
|
||||
int err;
|
||||
struct map *map;
|
||||
|
||||
down_read(&parent->lock);
|
||||
|
||||
maps__for_each_entry(parent, map) {
|
||||
struct map *new = map__clone(map);
|
||||
if (new == NULL)
|
||||
|
||||
if (new == NULL) {
|
||||
err = -ENOMEM;
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
err = unwind__prepare_access(maps, new, NULL);
|
||||
if (err)
|
||||
|
||||
Reference in New Issue
Block a user