Skip to content

Commit

Permalink
Merge tag 'v5.10.56' into 5.10
Browse files Browse the repository at this point in the history
This is the 5.10.56 stable release
  • Loading branch information
xanmod committed Aug 4, 2021
2 parents 12fdade + 9746c25 commit b0b7c72
Show file tree
Hide file tree
Showing 83 changed files with 707 additions and 367 deletions.
2 changes: 1 addition & 1 deletion Makefile
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 5
PATCHLEVEL = 10
SUBLEVEL = 55
SUBLEVEL = 56
EXTRAVERSION =
NAME = Dare mighty things

Expand Down
13 changes: 7 additions & 6 deletions arch/alpha/kernel/setup.c
Expand Up @@ -325,18 +325,19 @@ setup_memory(void *kernel_end)
i, cluster->usage, cluster->start_pfn,
cluster->start_pfn + cluster->numpages);

/* Bit 0 is console/PALcode reserved. Bit 1 is
non-volatile memory -- we might want to mark
this for later. */
if (cluster->usage & 3)
continue;

end = cluster->start_pfn + cluster->numpages;
if (end > max_low_pfn)
max_low_pfn = end;

memblock_add(PFN_PHYS(cluster->start_pfn),
cluster->numpages << PAGE_SHIFT);

/* Bit 0 is console/PALcode reserved. Bit 1 is
non-volatile memory -- we might want to mark
this for later. */
if (cluster->usage & 3)
memblock_reserve(PFN_PHYS(cluster->start_pfn),
cluster->numpages << PAGE_SHIFT);
}

/*
Expand Down
3 changes: 3 additions & 0 deletions arch/arm/net/bpf_jit_32.c
Expand Up @@ -1602,6 +1602,9 @@ static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx)
rn = arm_bpf_get_reg32(src_lo, tmp2[1], ctx);
emit_ldx_r(dst, rn, off, ctx, BPF_SIZE(code));
break;
/* speculation barrier */
case BPF_ST | BPF_NOSPEC:
break;
/* ST: *(size *)(dst + off) = imm */
case BPF_ST | BPF_MEM | BPF_W:
case BPF_ST | BPF_MEM | BPF_H:
Expand Down
13 changes: 13 additions & 0 deletions arch/arm64/net/bpf_jit_comp.c
Expand Up @@ -829,6 +829,19 @@ static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx,
return ret;
break;

/* speculation barrier */
case BPF_ST | BPF_NOSPEC:
/*
* Nothing required here.
*
* In case of arm64, we rely on the firmware mitigation of
* Speculative Store Bypass as controlled via the ssbd kernel
* parameter. Whenever the mitigation is enabled, it works
* for all of the kernel code with no need to provide any
* additional instructions.
*/
break;

/* ST: *(size *)(dst + off) = imm */
case BPF_ST | BPF_MEM | BPF_W:
case BPF_ST | BPF_MEM | BPF_H:
Expand Down
3 changes: 3 additions & 0 deletions arch/mips/net/ebpf_jit.c
Expand Up @@ -1355,6 +1355,9 @@ static int build_one_insn(const struct bpf_insn *insn, struct jit_ctx *ctx,
}
break;

case BPF_ST | BPF_NOSPEC: /* speculation barrier */
break;

case BPF_ST | BPF_B | BPF_MEM:
case BPF_ST | BPF_H | BPF_MEM:
case BPF_ST | BPF_W | BPF_MEM:
Expand Down
6 changes: 6 additions & 0 deletions arch/powerpc/net/bpf_jit_comp64.c
Expand Up @@ -646,6 +646,12 @@ static int bpf_jit_build_body(struct bpf_prog *fp, u32 *image,
}
break;

/*
* BPF_ST NOSPEC (speculation barrier)
*/
case BPF_ST | BPF_NOSPEC:
break;

/*
* BPF_ST(X)
*/
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/pseries/setup.c
Expand Up @@ -76,7 +76,7 @@
#include "../../../../drivers/pci/pci.h"

DEFINE_STATIC_KEY_FALSE(shared_processor);
EXPORT_SYMBOL_GPL(shared_processor);
EXPORT_SYMBOL(shared_processor);

int CMO_PrPSP = -1;
int CMO_SecPSP = -1;
Expand Down
4 changes: 4 additions & 0 deletions arch/riscv/net/bpf_jit_comp32.c
Expand Up @@ -1251,6 +1251,10 @@ int bpf_jit_emit_insn(const struct bpf_insn *insn, struct rv_jit_context *ctx,
return -1;
break;

/* speculation barrier */
case BPF_ST | BPF_NOSPEC:
break;

case BPF_ST | BPF_MEM | BPF_B:
case BPF_ST | BPF_MEM | BPF_H:
case BPF_ST | BPF_MEM | BPF_W:
Expand Down
4 changes: 4 additions & 0 deletions arch/riscv/net/bpf_jit_comp64.c
Expand Up @@ -939,6 +939,10 @@ int bpf_jit_emit_insn(const struct bpf_insn *insn, struct rv_jit_context *ctx,
emit_ld(rd, 0, RV_REG_T1, ctx);
break;

/* speculation barrier */
case BPF_ST | BPF_NOSPEC:
break;

/* ST: *(size *)(dst + off) = imm */
case BPF_ST | BPF_MEM | BPF_B:
emit_imm(RV_REG_T1, imm, ctx);
Expand Down
5 changes: 5 additions & 0 deletions arch/s390/net/bpf_jit_comp.c
Expand Up @@ -1153,6 +1153,11 @@ static noinline int bpf_jit_insn(struct bpf_jit *jit, struct bpf_prog *fp,
break;
}
break;
/*
* BPF_NOSPEC (speculation barrier)
*/
case BPF_ST | BPF_NOSPEC:
break;
/*
* BPF_ST(X)
*/
Expand Down
3 changes: 3 additions & 0 deletions arch/sparc/net/bpf_jit_comp_64.c
Expand Up @@ -1287,6 +1287,9 @@ static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx)
return 1;
break;
}
/* speculation barrier */
case BPF_ST | BPF_NOSPEC:
break;
/* ST: *(size *)(dst + off) = imm */
case BPF_ST | BPF_MEM | BPF_W:
case BPF_ST | BPF_MEM | BPF_H:
Expand Down
2 changes: 2 additions & 0 deletions arch/x86/include/asm/proto.h
Expand Up @@ -4,6 +4,8 @@

#include <asm/ldt.h>

struct task_struct;

/* misc architecture specific prototypes */

void syscall_init(void);
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/kvm/ioapic.c
Expand Up @@ -96,7 +96,7 @@ static unsigned long ioapic_read_indirect(struct kvm_ioapic *ioapic,
static void rtc_irq_eoi_tracking_reset(struct kvm_ioapic *ioapic)
{
ioapic->rtc_status.pending_eoi = 0;
bitmap_zero(ioapic->rtc_status.dest_map.map, KVM_MAX_VCPU_ID);
bitmap_zero(ioapic->rtc_status.dest_map.map, KVM_MAX_VCPU_ID + 1);
}

static void kvm_rtc_eoi_tracking_restore_all(struct kvm_ioapic *ioapic);
Expand Down
4 changes: 2 additions & 2 deletions arch/x86/kvm/ioapic.h
Expand Up @@ -43,13 +43,13 @@ struct kvm_vcpu;

struct dest_map {
/* vcpu bitmap where IRQ has been sent */
DECLARE_BITMAP(map, KVM_MAX_VCPU_ID);
DECLARE_BITMAP(map, KVM_MAX_VCPU_ID + 1);

/*
* Vector sent to a given vcpu, only valid when
* the vcpu's bit in map is set
*/
u8 vectors[KVM_MAX_VCPU_ID];
u8 vectors[KVM_MAX_VCPU_ID + 1];
};


Expand Down
4 changes: 2 additions & 2 deletions arch/x86/kvm/x86.c
Expand Up @@ -3205,7 +3205,7 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
return 1;
break;
case MSR_KVM_ASYNC_PF_ACK:
if (!guest_pv_has(vcpu, KVM_FEATURE_ASYNC_PF))
if (!guest_pv_has(vcpu, KVM_FEATURE_ASYNC_PF_INT))
return 1;
if (data & 0x1) {
vcpu->arch.apf.pageready_pending = false;
Expand Down Expand Up @@ -3534,7 +3534,7 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
msr_info->data = vcpu->arch.apf.msr_int_val;
break;
case MSR_KVM_ASYNC_PF_ACK:
if (!guest_pv_has(vcpu, KVM_FEATURE_ASYNC_PF))
if (!guest_pv_has(vcpu, KVM_FEATURE_ASYNC_PF_INT))
return 1;

msr_info->data = 0;
Expand Down
7 changes: 7 additions & 0 deletions arch/x86/net/bpf_jit_comp.c
Expand Up @@ -1141,6 +1141,13 @@ static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image,
}
break;

/* speculation barrier */
case BPF_ST | BPF_NOSPEC:
if (boot_cpu_has(X86_FEATURE_XMM2))
/* Emit 'lfence' */
EMIT3(0x0F, 0xAE, 0xE8);
break;

/* ST: *(u8*)(dst_reg + off) = imm */
case BPF_ST | BPF_MEM | BPF_B:
if (is_ereg(dst_reg))
Expand Down
6 changes: 6 additions & 0 deletions arch/x86/net/bpf_jit_comp32.c
Expand Up @@ -1705,6 +1705,12 @@ static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image,
i++;
break;
}
/* speculation barrier */
case BPF_ST | BPF_NOSPEC:
if (boot_cpu_has(X86_FEATURE_XMM2))
/* Emit 'lfence' */
EMIT3(0x0F, 0xAE, 0xE8);
break;
/* ST: *(u8*)(dst_reg + off) = imm */
case BPF_ST | BPF_MEM | BPF_H:
case BPF_ST | BPF_MEM | BPF_B:
Expand Down
11 changes: 6 additions & 5 deletions block/blk-iocost.c
Expand Up @@ -1394,16 +1394,17 @@ static int iocg_wake_fn(struct wait_queue_entry *wq_entry, unsigned mode,
return -1;

iocg_commit_bio(ctx->iocg, wait->bio, wait->abs_cost, cost);
wait->committed = true;

/*
* autoremove_wake_function() removes the wait entry only when it
* actually changed the task state. We want the wait always
* removed. Remove explicitly and use default_wake_function().
* actually changed the task state. We want the wait always removed.
* Remove explicitly and use default_wake_function(). Note that the
* order of operations is important as finish_wait() tests whether
* @wq_entry is removed without grabbing the lock.
*/
list_del_init(&wq_entry->entry);
wait->committed = true;

default_wake_function(wq_entry, mode, flags, key);
list_del_init_careful(&wq_entry->entry);
return 0;
}

Expand Down
51 changes: 43 additions & 8 deletions drivers/acpi/dptf/dptf_pch_fivr.c
Expand Up @@ -9,6 +9,42 @@
#include <linux/module.h>
#include <linux/platform_device.h>

struct pch_fivr_resp {
u64 status;
u64 result;
};

static int pch_fivr_read(acpi_handle handle, char *method, struct pch_fivr_resp *fivr_resp)
{
struct acpi_buffer resp = { sizeof(struct pch_fivr_resp), fivr_resp};
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
struct acpi_buffer format = { sizeof("NN"), "NN" };
union acpi_object *obj;
acpi_status status;
int ret = -EFAULT;

status = acpi_evaluate_object(handle, method, NULL, &buffer);
if (ACPI_FAILURE(status))
return ret;

obj = buffer.pointer;
if (!obj || obj->type != ACPI_TYPE_PACKAGE)
goto release_buffer;

status = acpi_extract_package(obj, &format, &resp);
if (ACPI_FAILURE(status))
goto release_buffer;

if (fivr_resp->status)
goto release_buffer;

ret = 0;

release_buffer:
kfree(buffer.pointer);
return ret;
}

/*
* Presentation of attributes which are defined for INT1045
* They are:
Expand All @@ -23,15 +59,14 @@ static ssize_t name##_show(struct device *dev,\
char *buf)\
{\
struct acpi_device *acpi_dev = dev_get_drvdata(dev);\
unsigned long long val;\
acpi_status status;\
struct pch_fivr_resp fivr_resp;\
int status;\
\
status = acpi_evaluate_integer(acpi_dev->handle, #method,\
NULL, &val);\
if (ACPI_SUCCESS(status))\
return sprintf(buf, "%d\n", (int)val);\
else\
return -EINVAL;\
status = pch_fivr_read(acpi_dev->handle, #method, &fivr_resp);\
if (status)\
return status;\
\
return sprintf(buf, "%llu\n", fivr_resp.result);\
}

#define PCH_FIVR_STORE(name, method) \
Expand Down
9 changes: 1 addition & 8 deletions drivers/acpi/resource.c
Expand Up @@ -430,13 +430,6 @@ static void acpi_dev_get_irqresource(struct resource *res, u32 gsi,
}
}

static bool irq_is_legacy(struct acpi_resource_irq *irq)
{
return irq->triggering == ACPI_EDGE_SENSITIVE &&
irq->polarity == ACPI_ACTIVE_HIGH &&
irq->shareable == ACPI_EXCLUSIVE;
}

/**
* acpi_dev_resource_interrupt - Extract ACPI interrupt resource information.
* @ares: Input ACPI resource object.
Expand Down Expand Up @@ -475,7 +468,7 @@ bool acpi_dev_resource_interrupt(struct acpi_resource *ares, int index,
}
acpi_dev_get_irqresource(res, irq->interrupts[index],
irq->triggering, irq->polarity,
irq->shareable, irq_is_legacy(irq));
irq->shareable, true);
break;
case ACPI_RESOURCE_TYPE_EXTENDED_IRQ:
ext_irq = &ares->data.extended_irq;
Expand Down
8 changes: 2 additions & 6 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Expand Up @@ -3322,13 +3322,13 @@ int amdgpu_device_init(struct amdgpu_device *adev,
r = amdgpu_device_get_job_timeout_settings(adev);
if (r) {
dev_err(adev->dev, "invalid lockup_timeout parameter syntax\n");
goto failed_unmap;
return r;
}

/* early init functions */
r = amdgpu_device_ip_early_init(adev);
if (r)
goto failed_unmap;
return r;

/* doorbell bar mapping and doorbell index init*/
amdgpu_device_doorbell_init(adev);
Expand Down Expand Up @@ -3532,10 +3532,6 @@ int amdgpu_device_init(struct amdgpu_device *adev,
if (boco)
vga_switcheroo_fini_domain_pm_ops(adev->dev);

failed_unmap:
iounmap(adev->rmmio);
adev->rmmio = NULL;

return r;
}

Expand Down
7 changes: 3 additions & 4 deletions drivers/gpu/drm/amd/amdgpu/psp_v12_0.c
Expand Up @@ -67,7 +67,7 @@ static int psp_v12_0_init_microcode(struct psp_context *psp)

err = psp_init_asd_microcode(psp, chip_name);
if (err)
goto out;
return err;

snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_ta.bin", chip_name);
err = request_firmware(&adev->psp.ta_fw, fw_name, adev->dev);
Expand All @@ -80,7 +80,7 @@ static int psp_v12_0_init_microcode(struct psp_context *psp)
} else {
err = amdgpu_ucode_validate(adev->psp.ta_fw);
if (err)
goto out2;
goto out;

ta_hdr = (const struct ta_firmware_header_v1_0 *)
adev->psp.ta_fw->data;
Expand All @@ -105,10 +105,9 @@ static int psp_v12_0_init_microcode(struct psp_context *psp)

return 0;

out2:
out:
release_firmware(adev->psp.ta_fw);
adev->psp.ta_fw = NULL;
out:
if (err) {
dev_err(adev->dev,
"psp v12.0: Failed to load firmware \"%s\"\n",
Expand Down
Expand Up @@ -135,7 +135,7 @@ void dcn20_update_clocks_update_dentist(struct clk_mgr_internal *clk_mgr)

REG_UPDATE(DENTIST_DISPCLK_CNTL,
DENTIST_DISPCLK_WDIVIDER, dispclk_wdivider);
// REG_WAIT(DENTIST_DISPCLK_CNTL, DENTIST_DISPCLK_CHG_DONE, 1, 5, 100);
REG_WAIT(DENTIST_DISPCLK_CNTL, DENTIST_DISPCLK_CHG_DONE, 1, 50, 1000);
REG_UPDATE(DENTIST_DISPCLK_CNTL,
DENTIST_DPPCLK_WDIVIDER, dppclk_wdivider);
REG_WAIT(DENTIST_DISPCLK_CNTL, DENTIST_DPPCLK_CHG_DONE, 1, 5, 100);
Expand Down

0 comments on commit b0b7c72

Please sign in to comment.