Skip to content

Commit

Permalink
Merge tag 'v5.11.6' into 5.11
Browse files Browse the repository at this point in the history
This is the 5.11.6 stable release
  • Loading branch information
xanmod committed Mar 11, 2021
2 parents 859b353 + 0985dc5 commit c9cb8ce
Show file tree
Hide file tree
Showing 37 changed files with 685 additions and 436 deletions.
2 changes: 1 addition & 1 deletion Makefile
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 5
PATCHLEVEL = 11
SUBLEVEL = 5
SUBLEVEL = 6
EXTRAVERSION =
NAME = 💕 Valentine's Day Edition 💕

Expand Down
5 changes: 3 additions & 2 deletions arch/arm64/Kconfig
Expand Up @@ -952,8 +952,9 @@ choice
that is selected here.

config CPU_BIG_ENDIAN
bool "Build big-endian kernel"
help
bool "Build big-endian kernel"
depends on !LD_IS_LLD || LLD_VERSION >= 130000
help
Say Y if you plan on running a kernel with a big-endian userspace.

config CPU_LITTLE_ENDIAN
Expand Down
7 changes: 5 additions & 2 deletions arch/parisc/Kconfig
Expand Up @@ -201,9 +201,12 @@ config PREFETCH
def_bool y
depends on PA8X00 || PA7200

config PARISC_HUGE_KERNEL
def_bool y if !MODULES || UBSAN || FTRACE || COMPILE_TEST

config MLONGCALLS
def_bool y if !MODULES || UBSAN || FTRACE
bool "Enable the -mlong-calls compiler option for big kernels" if MODULES && !UBSAN && !FTRACE
def_bool y if PARISC_HUGE_KERNEL
bool "Enable the -mlong-calls compiler option for big kernels" if !PARISC_HUGE_KERNEL
depends on PA8X00
help
If you configure the kernel to include many drivers built-in instead
Expand Down
1 change: 1 addition & 0 deletions arch/x86/kvm/svm/svm.c
Expand Up @@ -1205,6 +1205,7 @@ static void init_vmcb(struct vcpu_svm *svm)
init_sys_seg(&save->ldtr, SEG_TYPE_LDT);
init_sys_seg(&save->tr, SEG_TYPE_BUSY_TSS16);

svm_set_cr4(&svm->vcpu, 0);
svm_set_efer(&svm->vcpu, 0);
save->dr6 = 0xffff0ff0;
kvm_set_rflags(&svm->vcpu, 2);
Expand Down
1 change: 1 addition & 0 deletions drivers/acpi/acpica/acobject.h
Expand Up @@ -284,6 +284,7 @@ struct acpi_object_addr_handler {
acpi_adr_space_handler handler;
struct acpi_namespace_node *node; /* Parent device */
void *context;
acpi_mutex context_mutex;
acpi_adr_space_setup setup;
union acpi_operand_object *region_list; /* Regions using this handler */
union acpi_operand_object *next;
Expand Down
7 changes: 7 additions & 0 deletions drivers/acpi/acpica/evhandler.c
Expand Up @@ -489,6 +489,13 @@ acpi_ev_install_space_handler(struct acpi_namespace_node *node,

/* Init handler obj */

status =
acpi_os_create_mutex(&handler_obj->address_space.context_mutex);
if (ACPI_FAILURE(status)) {
acpi_ut_remove_reference(handler_obj);
goto unlock_and_exit;
}

handler_obj->address_space.space_id = (u8)space_id;
handler_obj->address_space.handler_flags = flags;
handler_obj->address_space.region_list = NULL;
Expand Down
64 changes: 47 additions & 17 deletions drivers/acpi/acpica/evregion.c
Expand Up @@ -112,6 +112,8 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
union acpi_operand_object *region_obj2;
void *region_context = NULL;
struct acpi_connection_info *context;
acpi_mutex context_mutex;
u8 context_locked;
acpi_physical_address address;

ACPI_FUNCTION_TRACE(ev_address_space_dispatch);
Expand All @@ -136,6 +138,8 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
}

context = handler_desc->address_space.context;
context_mutex = handler_desc->address_space.context_mutex;
context_locked = FALSE;

/*
* It may be the case that the region has never been initialized.
Expand Down Expand Up @@ -204,6 +208,23 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
handler = handler_desc->address_space.handler;
address = (region_obj->region.address + region_offset);

ACPI_DEBUG_PRINT((ACPI_DB_OPREGION,
"Handler %p (@%p) Address %8.8X%8.8X [%s]\n",
&region_obj->region.handler->address_space, handler,
ACPI_FORMAT_UINT64(address),
acpi_ut_get_region_name(region_obj->region.
space_id)));

if (!(handler_desc->address_space.handler_flags &
ACPI_ADDR_HANDLER_DEFAULT_INSTALLED)) {
/*
* For handlers other than the default (supplied) handlers, we must
* exit the interpreter because the handler *might* block -- we don't
* know what it will do, so we can't hold the lock on the interpreter.
*/
acpi_ex_exit_interpreter();
}

/*
* Special handling for generic_serial_bus and general_purpose_io:
* There are three extra parameters that must be passed to the
Expand All @@ -212,6 +233,11 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
* 2) Length of the above buffer
* 3) Actual access length from the access_as() op
*
* Since we pass these extra parameters via the context, which is
* shared between threads, we must lock the context to avoid these
* parameters being changed from another thread before the handler
* has completed running.
*
* In addition, for general_purpose_io, the Address and bit_width fields
* are defined as follows:
* 1) Address is the pin number index of the field (bit offset from
Expand All @@ -221,6 +247,14 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
if ((region_obj->region.space_id == ACPI_ADR_SPACE_GSBUS) &&
context && field_obj) {

status =
acpi_os_acquire_mutex(context_mutex, ACPI_WAIT_FOREVER);
if (ACPI_FAILURE(status)) {
goto re_enter_interpreter;
}

context_locked = TRUE;

/* Get the Connection (resource_template) buffer */

context->connection = field_obj->field.resource_buffer;
Expand All @@ -230,6 +264,14 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
if ((region_obj->region.space_id == ACPI_ADR_SPACE_GPIO) &&
context && field_obj) {

status =
acpi_os_acquire_mutex(context_mutex, ACPI_WAIT_FOREVER);
if (ACPI_FAILURE(status)) {
goto re_enter_interpreter;
}

context_locked = TRUE;

/* Get the Connection (resource_template) buffer */

context->connection = field_obj->field.resource_buffer;
Expand All @@ -239,28 +281,15 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
bit_width = field_obj->field.bit_length;
}

ACPI_DEBUG_PRINT((ACPI_DB_OPREGION,
"Handler %p (@%p) Address %8.8X%8.8X [%s]\n",
&region_obj->region.handler->address_space, handler,
ACPI_FORMAT_UINT64(address),
acpi_ut_get_region_name(region_obj->region.
space_id)));

if (!(handler_desc->address_space.handler_flags &
ACPI_ADDR_HANDLER_DEFAULT_INSTALLED)) {
/*
* For handlers other than the default (supplied) handlers, we must
* exit the interpreter because the handler *might* block -- we don't
* know what it will do, so we can't hold the lock on the interpreter.
*/
acpi_ex_exit_interpreter();
}

/* Call the handler */

status = handler(function, address, bit_width, value, context,
region_obj2->extra.region_context);

if (context_locked) {
acpi_os_release_mutex(context_mutex);
}

if (ACPI_FAILURE(status)) {
ACPI_EXCEPTION((AE_INFO, status, "Returned by Handler for [%s]",
acpi_ut_get_region_name(region_obj->region.
Expand All @@ -277,6 +306,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
}
}

re_enter_interpreter:
if (!(handler_desc->address_space.handler_flags &
ACPI_ADDR_HANDLER_DEFAULT_INSTALLED)) {
/*
Expand Down
2 changes: 2 additions & 0 deletions drivers/acpi/acpica/evxfregn.c
Expand Up @@ -201,6 +201,8 @@ acpi_remove_address_space_handler(acpi_handle device,

/* Now we can delete the handler object */

acpi_os_release_mutex(handler_obj->address_space.
context_mutex);
acpi_ut_remove_reference(handler_obj);
goto unlock_and_exit;
}
Expand Down
2 changes: 0 additions & 2 deletions drivers/gpu/drm/msm/adreno/a5xx_gpu.c
Expand Up @@ -626,8 +626,6 @@ static int a5xx_hw_init(struct msm_gpu *gpu)
if (adreno_gpu->info->quirks & ADRENO_QUIRK_TWO_PASS_USE_WFI)
gpu_rmw(gpu, REG_A5XX_PC_DBG_ECO_CNTL, 0, (1 << 8));

gpu_write(gpu, REG_A5XX_PC_DBG_ECO_CNTL, 0xc0200100);

/* Enable USE_RETENTION_FLOPS */
gpu_write(gpu, REG_A5XX_CP_CHICKEN_DBG, 0x02000000);

Expand Down
2 changes: 2 additions & 0 deletions drivers/hid/hid-ids.h
Expand Up @@ -641,6 +641,8 @@
#define USB_DEVICE_ID_INNEX_GENESIS_ATARI 0x4745

#define USB_VENDOR_ID_ITE 0x048d
#define I2C_VENDOR_ID_ITE 0x103c
#define I2C_DEVICE_ID_ITE_VOYO_WINPAD_A15 0x184f
#define USB_DEVICE_ID_ITE_LENOVO_YOGA 0x8386
#define USB_DEVICE_ID_ITE_LENOVO_YOGA2 0x8350
#define I2C_DEVICE_ID_ITE_LENOVO_LEGION_Y720 0x837a
Expand Down
12 changes: 9 additions & 3 deletions drivers/hid/hid-ite.c
Expand Up @@ -23,11 +23,16 @@ static __u8 *ite_report_fixup(struct hid_device *hdev, __u8 *rdesc, unsigned int
hid_info(hdev, "Fixing up Acer Sw5-012 ITE keyboard report descriptor\n");
rdesc[163] = HID_MAIN_ITEM_RELATIVE;
}
/* For Acer One S1002 keyboard-dock */
/* For Acer One S1002/S1003 keyboard-dock */
if (*rsize == 188 && rdesc[185] == 0x81 && rdesc[186] == 0x02) {
hid_info(hdev, "Fixing up Acer S1002 ITE keyboard report descriptor\n");
hid_info(hdev, "Fixing up Acer S1002/S1003 ITE keyboard report descriptor\n");
rdesc[186] = HID_MAIN_ITEM_RELATIVE;
}
/* For Acer Aspire Switch 10E (SW3-016) keyboard-dock */
if (*rsize == 210 && rdesc[184] == 0x81 && rdesc[185] == 0x02) {
hid_info(hdev, "Fixing up Acer Aspire Switch 10E (SW3-016) ITE keyboard report descriptor\n");
rdesc[185] = HID_MAIN_ITEM_RELATIVE;
}
}

return rdesc;
Expand Down Expand Up @@ -114,7 +119,8 @@ static const struct hid_device_id ite_devices[] = {
/* ITE8910 USB kbd ctlr, with Synaptics touchpad connected to it. */
{ HID_DEVICE(BUS_USB, HID_GROUP_GENERIC,
USB_VENDOR_ID_SYNAPTICS,
USB_DEVICE_ID_SYNAPTICS_ACER_ONE_S1003) },
USB_DEVICE_ID_SYNAPTICS_ACER_ONE_S1003),
.driver_data = QUIRK_TOUCHPAD_ON_OFF_REPORT },
{ }
};
MODULE_DEVICE_TABLE(hid, ite_devices);
Expand Down
2 changes: 2 additions & 0 deletions drivers/hid/i2c-hid/i2c-hid-core.c
Expand Up @@ -171,6 +171,8 @@ static const struct i2c_hid_quirks {
I2C_HID_QUIRK_SET_PWR_WAKEUP_DEV },
{ I2C_VENDOR_ID_HANTICK, I2C_PRODUCT_ID_HANTICK_5288,
I2C_HID_QUIRK_NO_IRQ_AFTER_RESET },
{ I2C_VENDOR_ID_ITE, I2C_DEVICE_ID_ITE_VOYO_WINPAD_A15,
I2C_HID_QUIRK_NO_IRQ_AFTER_RESET },
{ I2C_VENDOR_ID_RAYDIUM, I2C_PRODUCT_ID_RAYDIUM_3118,
I2C_HID_QUIRK_NO_IRQ_AFTER_RESET },
{ USB_VENDOR_ID_ELAN, HID_ANY_ID,
Expand Down
10 changes: 6 additions & 4 deletions drivers/iommu/amd/iommu.c
Expand Up @@ -1502,6 +1502,10 @@ static bool increase_address_space(struct protection_domain *domain,
bool ret = true;
u64 *pte;

pte = (void *)get_zeroed_page(gfp);
if (!pte)
return false;

spin_lock_irqsave(&domain->lock, flags);

amd_iommu_domain_get_pgtable(domain, &pgtable);
Expand All @@ -1513,10 +1517,6 @@ static bool increase_address_space(struct protection_domain *domain,
if (WARN_ON_ONCE(pgtable.mode == PAGE_MODE_6_LEVEL))
goto out;

pte = (void *)get_zeroed_page(gfp);
if (!pte)
goto out;

*pte = PM_LEVEL_PDE(pgtable.mode, iommu_virt_to_phys(pgtable.root));

pgtable.root = pte;
Expand All @@ -1530,10 +1530,12 @@ static bool increase_address_space(struct protection_domain *domain,
*/
amd_iommu_domain_set_pgtable(domain, pte, pgtable.mode);

pte = NULL;
ret = true;

out:
spin_unlock_irqrestore(&domain->lock, flags);
free_page((unsigned long)pte);

return ret;
}
Expand Down
15 changes: 15 additions & 0 deletions drivers/misc/eeprom/eeprom_93xx46.c
Expand Up @@ -35,6 +35,10 @@ static const struct eeprom_93xx46_devtype_data atmel_at93c46d_data = {
EEPROM_93XX46_QUIRK_INSTRUCTION_LENGTH,
};

static const struct eeprom_93xx46_devtype_data microchip_93lc46b_data = {
.quirks = EEPROM_93XX46_QUIRK_EXTRA_READ_CYCLE,
};

struct eeprom_93xx46_dev {
struct spi_device *spi;
struct eeprom_93xx46_platform_data *pdata;
Expand All @@ -55,6 +59,11 @@ static inline bool has_quirk_instruction_length(struct eeprom_93xx46_dev *edev)
return edev->pdata->quirks & EEPROM_93XX46_QUIRK_INSTRUCTION_LENGTH;
}

static inline bool has_quirk_extra_read_cycle(struct eeprom_93xx46_dev *edev)
{
return edev->pdata->quirks & EEPROM_93XX46_QUIRK_EXTRA_READ_CYCLE;
}

static int eeprom_93xx46_read(void *priv, unsigned int off,
void *val, size_t count)
{
Expand Down Expand Up @@ -96,6 +105,11 @@ static int eeprom_93xx46_read(void *priv, unsigned int off,
dev_dbg(&edev->spi->dev, "read cmd 0x%x, %d Hz\n",
cmd_addr, edev->spi->max_speed_hz);

if (has_quirk_extra_read_cycle(edev)) {
cmd_addr <<= 1;
bits += 1;
}

spi_message_init(&m);

t[0].tx_buf = (char *)&cmd_addr;
Expand Down Expand Up @@ -363,6 +377,7 @@ static void select_deassert(void *context)
static const struct of_device_id eeprom_93xx46_of_table[] = {
{ .compatible = "eeprom-93xx46", },
{ .compatible = "atmel,at93c46d", .data = &atmel_at93c46d_data, },
{ .compatible = "microchip,93lc46b", .data = &microchip_93lc46b_data, },
{}
};
MODULE_DEVICE_TABLE(of, eeprom_93xx46_of_table);
Expand Down
1 change: 1 addition & 0 deletions drivers/mmc/host/sdhci-of-dwcmshc.c
Expand Up @@ -112,6 +112,7 @@ static const struct sdhci_ops sdhci_dwcmshc_ops = {
static const struct sdhci_pltfm_data sdhci_dwcmshc_pdata = {
.ops = &sdhci_dwcmshc_ops,
.quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN,
};

static int dwcmshc_probe(struct platform_device *pdev)
Expand Down
8 changes: 7 additions & 1 deletion drivers/nvme/host/pci.c
Expand Up @@ -3230,7 +3230,8 @@ static const struct pci_device_id nvme_id_table[] = {
{ PCI_DEVICE(0x126f, 0x2263), /* Silicon Motion unidentified */
.driver_data = NVME_QUIRK_NO_NS_DESC_LIST, },
{ PCI_DEVICE(0x1bb1, 0x0100), /* Seagate Nytro Flash Storage */
.driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY, },
.driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY |
NVME_QUIRK_NO_NS_DESC_LIST, },
{ PCI_DEVICE(0x1c58, 0x0003), /* HGST adapter */
.driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY, },
{ PCI_DEVICE(0x1c58, 0x0023), /* WDC SN200 adapter */
Expand All @@ -3244,6 +3245,9 @@ static const struct pci_device_id nvme_id_table[] = {
NVME_QUIRK_IGNORE_DEV_SUBNQN, },
{ PCI_DEVICE(0x1987, 0x5016), /* Phison E16 */
.driver_data = NVME_QUIRK_IGNORE_DEV_SUBNQN, },
{ PCI_DEVICE(0x1b4b, 0x1092), /* Lexar 256 GB SSD */
.driver_data = NVME_QUIRK_NO_NS_DESC_LIST |
NVME_QUIRK_IGNORE_DEV_SUBNQN, },
{ PCI_DEVICE(0x1d1d, 0x1f1f), /* LighNVM qemu device */
.driver_data = NVME_QUIRK_LIGHTNVM, },
{ PCI_DEVICE(0x1d1d, 0x2807), /* CNEX WL */
Expand All @@ -3261,6 +3265,8 @@ static const struct pci_device_id nvme_id_table[] = {
.driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
{ PCI_DEVICE(0x1d97, 0x2263), /* SPCC */
.driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
{ PCI_DEVICE(0x2646, 0x2262), /* KINGSTON SKC2000 NVMe SSD */
.driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
{ PCI_DEVICE(0x2646, 0x2263), /* KINGSTON A2000 NVMe SSD */
.driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
{ PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2001),
Expand Down
3 changes: 3 additions & 0 deletions drivers/pci/controller/cadence/pci-j721e.c
Expand Up @@ -64,6 +64,7 @@ enum j721e_pcie_mode {

struct j721e_pcie_data {
enum j721e_pcie_mode mode;
bool quirk_retrain_flag;
};

static inline u32 j721e_pcie_user_readl(struct j721e_pcie *pcie, u32 offset)
Expand Down Expand Up @@ -280,6 +281,7 @@ static struct pci_ops cdns_ti_pcie_host_ops = {

static const struct j721e_pcie_data j721e_pcie_rc_data = {
.mode = PCI_MODE_RC,
.quirk_retrain_flag = true,
};

static const struct j721e_pcie_data j721e_pcie_ep_data = {
Expand Down Expand Up @@ -388,6 +390,7 @@ static int j721e_pcie_probe(struct platform_device *pdev)

bridge->ops = &cdns_ti_pcie_host_ops;
rc = pci_host_bridge_priv(bridge);
rc->quirk_retrain_flag = data->quirk_retrain_flag;

cdns_pcie = &rc->pcie;
cdns_pcie->dev = dev;
Expand Down

0 comments on commit c9cb8ce

Please sign in to comment.