Merge 7d42e98182 ("Merge tag 'gpio-fixes-for-v5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux") into android-mainline
Steps on the way to 5.15-rc3 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Ife2fb5a9ff2ee97675da424c72bb5889736a6a62
This commit is contained in:
+2
-2
@@ -977,12 +977,12 @@ L: platform-driver-x86@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/platform/x86/amd-pmc.*
|
||||
|
||||
AMD POWERPLAY
|
||||
AMD POWERPLAY AND SWSMU
|
||||
M: Evan Quan <evan.quan@amd.com>
|
||||
L: amd-gfx@lists.freedesktop.org
|
||||
S: Supported
|
||||
T: git https://gitlab.freedesktop.org/agd5f/linux.git
|
||||
F: drivers/gpu/drm/amd/pm/powerplay/
|
||||
F: drivers/gpu/drm/amd/pm/
|
||||
|
||||
AMD PTDMA DRIVER
|
||||
M: Sanjay R Mehta <sanju.mehta@amd.com>
|
||||
|
||||
@@ -50,9 +50,6 @@ pgprot_t __acpi_get_mem_attribute(phys_addr_t addr);
|
||||
void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size);
|
||||
#define acpi_os_ioremap acpi_os_ioremap
|
||||
|
||||
void __iomem *acpi_os_memmap(acpi_physical_address phys, acpi_size size);
|
||||
#define acpi_os_memmap acpi_os_memmap
|
||||
|
||||
typedef u64 phys_cpuid_t;
|
||||
#define PHYS_CPUID_INVALID INVALID_HWID
|
||||
|
||||
|
||||
@@ -525,6 +525,11 @@ alternative_endif
|
||||
#define EXPORT_SYMBOL_NOKASAN(name) EXPORT_SYMBOL(name)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_KASAN_HW_TAGS
|
||||
#define EXPORT_SYMBOL_NOHWKASAN(name)
|
||||
#else
|
||||
#define EXPORT_SYMBOL_NOHWKASAN(name) EXPORT_SYMBOL_NOKASAN(name)
|
||||
#endif
|
||||
/*
|
||||
* Emit a 64-bit absolute little endian symbol reference in a way that
|
||||
* ensures that it will be resolved at build time, even when building a
|
||||
|
||||
@@ -99,11 +99,17 @@ void mte_check_tfsr_el1(void);
|
||||
|
||||
static inline void mte_check_tfsr_entry(void)
|
||||
{
|
||||
if (!system_supports_mte())
|
||||
return;
|
||||
|
||||
mte_check_tfsr_el1();
|
||||
}
|
||||
|
||||
static inline void mte_check_tfsr_exit(void)
|
||||
{
|
||||
if (!system_supports_mte())
|
||||
return;
|
||||
|
||||
/*
|
||||
* The asynchronous faults are sync'ed automatically with
|
||||
* TFSR_EL1 on kernel entry but for exit an explicit dsb()
|
||||
|
||||
@@ -12,11 +12,13 @@ extern char *strrchr(const char *, int c);
|
||||
#define __HAVE_ARCH_STRCHR
|
||||
extern char *strchr(const char *, int c);
|
||||
|
||||
#ifndef CONFIG_KASAN_HW_TAGS
|
||||
#define __HAVE_ARCH_STRCMP
|
||||
extern int strcmp(const char *, const char *);
|
||||
|
||||
#define __HAVE_ARCH_STRNCMP
|
||||
extern int strncmp(const char *, const char *, __kernel_size_t);
|
||||
#endif
|
||||
|
||||
#define __HAVE_ARCH_STRLEN
|
||||
extern __kernel_size_t strlen(const char *);
|
||||
|
||||
@@ -273,8 +273,7 @@ pgprot_t __acpi_get_mem_attribute(phys_addr_t addr)
|
||||
return __pgprot(PROT_DEVICE_nGnRnE);
|
||||
}
|
||||
|
||||
static void __iomem *__acpi_os_ioremap(acpi_physical_address phys,
|
||||
acpi_size size, bool memory)
|
||||
void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size)
|
||||
{
|
||||
efi_memory_desc_t *md, *region = NULL;
|
||||
pgprot_t prot;
|
||||
@@ -300,11 +299,9 @@ static void __iomem *__acpi_os_ioremap(acpi_physical_address phys,
|
||||
* It is fine for AML to remap regions that are not represented in the
|
||||
* EFI memory map at all, as it only describes normal memory, and MMIO
|
||||
* regions that require a virtual mapping to make them accessible to
|
||||
* the EFI runtime services. Determine the region default
|
||||
* attributes by checking the requested memory semantics.
|
||||
* the EFI runtime services.
|
||||
*/
|
||||
prot = memory ? __pgprot(PROT_NORMAL_NC) :
|
||||
__pgprot(PROT_DEVICE_nGnRnE);
|
||||
prot = __pgprot(PROT_DEVICE_nGnRnE);
|
||||
if (region) {
|
||||
switch (region->type) {
|
||||
case EFI_LOADER_CODE:
|
||||
@@ -364,16 +361,6 @@ static void __iomem *__acpi_os_ioremap(acpi_physical_address phys,
|
||||
return __ioremap(phys, size, prot);
|
||||
}
|
||||
|
||||
void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size)
|
||||
{
|
||||
return __acpi_os_ioremap(phys, size, false);
|
||||
}
|
||||
|
||||
void __iomem *acpi_os_memmap(acpi_physical_address phys, acpi_size size)
|
||||
{
|
||||
return __acpi_os_ioremap(phys, size, true);
|
||||
}
|
||||
|
||||
/*
|
||||
* Claim Synchronous External Aborts as a firmware first notification.
|
||||
*
|
||||
|
||||
@@ -1526,9 +1526,13 @@ static bool unmap_kernel_at_el0(const struct arm64_cpu_capabilities *entry,
|
||||
/*
|
||||
* For reasons that aren't entirely clear, enabling KPTI on Cavium
|
||||
* ThunderX leads to apparent I-cache corruption of kernel text, which
|
||||
* ends as well as you might imagine. Don't even try.
|
||||
* ends as well as you might imagine. Don't even try. We cannot rely
|
||||
* on the cpus_have_*cap() helpers here to detect the CPU erratum
|
||||
* because cpucap detection order may change. However, since we know
|
||||
* affected CPUs are always in a homogeneous configuration, it is
|
||||
* safe to rely on this_cpu_has_cap() here.
|
||||
*/
|
||||
if (cpus_have_const_cap(ARM64_WORKAROUND_CAVIUM_27456)) {
|
||||
if (this_cpu_has_cap(ARM64_WORKAROUND_CAVIUM_27456)) {
|
||||
str = "ARM64_WORKAROUND_CAVIUM_27456";
|
||||
__kpti_forced = -1;
|
||||
}
|
||||
|
||||
@@ -142,12 +142,7 @@ void mte_enable_kernel_async(void)
|
||||
#ifdef CONFIG_KASAN_HW_TAGS
|
||||
void mte_check_tfsr_el1(void)
|
||||
{
|
||||
u64 tfsr_el1;
|
||||
|
||||
if (!system_supports_mte())
|
||||
return;
|
||||
|
||||
tfsr_el1 = read_sysreg_s(SYS_TFSR_EL1);
|
||||
u64 tfsr_el1 = read_sysreg_s(SYS_TFSR_EL1);
|
||||
|
||||
if (unlikely(tfsr_el1 & SYS_TFSR_EL1_TF1)) {
|
||||
/*
|
||||
@@ -199,6 +194,9 @@ void mte_thread_init_user(void)
|
||||
|
||||
void mte_thread_switch(struct task_struct *next)
|
||||
{
|
||||
if (!system_supports_mte())
|
||||
return;
|
||||
|
||||
mte_update_sctlr_user(next);
|
||||
|
||||
/*
|
||||
|
||||
@@ -173,4 +173,4 @@ L(done):
|
||||
ret
|
||||
|
||||
SYM_FUNC_END_PI(strcmp)
|
||||
EXPORT_SYMBOL_NOKASAN(strcmp)
|
||||
EXPORT_SYMBOL_NOHWKASAN(strcmp)
|
||||
|
||||
@@ -258,4 +258,4 @@ L(ret0):
|
||||
ret
|
||||
|
||||
SYM_FUNC_END_PI(strncmp)
|
||||
EXPORT_SYMBOL_NOKASAN(strncmp)
|
||||
EXPORT_SYMBOL_NOHWKASAN(strncmp)
|
||||
|
||||
+7
-16
@@ -284,8 +284,7 @@ acpi_map_lookup_virt(void __iomem *virt, acpi_size size)
|
||||
#define should_use_kmap(pfn) page_is_ram(pfn)
|
||||
#endif
|
||||
|
||||
static void __iomem *acpi_map(acpi_physical_address pg_off, unsigned long pg_sz,
|
||||
bool memory)
|
||||
static void __iomem *acpi_map(acpi_physical_address pg_off, unsigned long pg_sz)
|
||||
{
|
||||
unsigned long pfn;
|
||||
|
||||
@@ -295,8 +294,7 @@ static void __iomem *acpi_map(acpi_physical_address pg_off, unsigned long pg_sz,
|
||||
return NULL;
|
||||
return (void __iomem __force *)kmap(pfn_to_page(pfn));
|
||||
} else
|
||||
return memory ? acpi_os_memmap(pg_off, pg_sz) :
|
||||
acpi_os_ioremap(pg_off, pg_sz);
|
||||
return acpi_os_ioremap(pg_off, pg_sz);
|
||||
}
|
||||
|
||||
static void acpi_unmap(acpi_physical_address pg_off, void __iomem *vaddr)
|
||||
@@ -311,10 +309,9 @@ static void acpi_unmap(acpi_physical_address pg_off, void __iomem *vaddr)
|
||||
}
|
||||
|
||||
/**
|
||||
* __acpi_os_map_iomem - Get a virtual address for a given physical address range.
|
||||
* acpi_os_map_iomem - Get a virtual address for a given physical address range.
|
||||
* @phys: Start of the physical address range to map.
|
||||
* @size: Size of the physical address range to map.
|
||||
* @memory: true if remapping memory, false if IO
|
||||
*
|
||||
* Look up the given physical address range in the list of existing ACPI memory
|
||||
* mappings. If found, get a reference to it and return a pointer to it (its
|
||||
@@ -324,8 +321,8 @@ static void acpi_unmap(acpi_physical_address pg_off, void __iomem *vaddr)
|
||||
* During early init (when acpi_permanent_mmap has not been set yet) this
|
||||
* routine simply calls __acpi_map_table() to get the job done.
|
||||
*/
|
||||
static void __iomem __ref
|
||||
*__acpi_os_map_iomem(acpi_physical_address phys, acpi_size size, bool memory)
|
||||
void __iomem __ref
|
||||
*acpi_os_map_iomem(acpi_physical_address phys, acpi_size size)
|
||||
{
|
||||
struct acpi_ioremap *map;
|
||||
void __iomem *virt;
|
||||
@@ -356,7 +353,7 @@ static void __iomem __ref
|
||||
|
||||
pg_off = round_down(phys, PAGE_SIZE);
|
||||
pg_sz = round_up(phys + size, PAGE_SIZE) - pg_off;
|
||||
virt = acpi_map(phys, size, memory);
|
||||
virt = acpi_map(phys, size);
|
||||
if (!virt) {
|
||||
mutex_unlock(&acpi_ioremap_lock);
|
||||
kfree(map);
|
||||
@@ -375,17 +372,11 @@ out:
|
||||
mutex_unlock(&acpi_ioremap_lock);
|
||||
return map->virt + (phys - map->phys);
|
||||
}
|
||||
|
||||
void __iomem *__ref
|
||||
acpi_os_map_iomem(acpi_physical_address phys, acpi_size size)
|
||||
{
|
||||
return __acpi_os_map_iomem(phys, size, false);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(acpi_os_map_iomem);
|
||||
|
||||
void *__ref acpi_os_map_memory(acpi_physical_address phys, acpi_size size)
|
||||
{
|
||||
return (void *)__acpi_os_map_iomem(phys, size, true);
|
||||
return (void *)acpi_os_map_iomem(phys, size);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(acpi_os_map_memory);
|
||||
|
||||
|
||||
@@ -1116,6 +1116,9 @@ int device_create_managed_software_node(struct device *dev,
|
||||
to_swnode(fwnode)->managed = true;
|
||||
set_secondary_fwnode(dev, fwnode);
|
||||
|
||||
if (device_is_registered(dev))
|
||||
software_node_notify(dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(device_create_managed_software_node);
|
||||
|
||||
@@ -395,7 +395,7 @@ static void aspeed_sgpio_irq_handler(struct irq_desc *desc)
|
||||
reg = ioread32(bank_reg(data, bank, reg_irq_status));
|
||||
|
||||
for_each_set_bit(p, ®, 32)
|
||||
generic_handle_domain_irq(gc->irq.domain, i * 32 + p);
|
||||
generic_handle_domain_irq(gc->irq.domain, i * 32 + p * 2);
|
||||
}
|
||||
|
||||
chained_irq_exit(ic, desc);
|
||||
|
||||
@@ -141,7 +141,7 @@ static int rockchip_gpio_get_direction(struct gpio_chip *chip,
|
||||
u32 data;
|
||||
|
||||
data = rockchip_gpio_readl_bit(bank, offset, bank->gpio_regs->port_ddr);
|
||||
if (data & BIT(offset))
|
||||
if (data)
|
||||
return GPIO_LINE_DIRECTION_OUT;
|
||||
|
||||
return GPIO_LINE_DIRECTION_IN;
|
||||
@@ -195,7 +195,7 @@ static int rockchip_gpio_set_debounce(struct gpio_chip *gc,
|
||||
unsigned int cur_div_reg;
|
||||
u64 div;
|
||||
|
||||
if (!IS_ERR(bank->db_clk)) {
|
||||
if (bank->gpio_type == GPIO_TYPE_V2 && !IS_ERR(bank->db_clk)) {
|
||||
div_debounce_support = true;
|
||||
freq = clk_get_rate(bank->db_clk);
|
||||
max_debounce = (GENMASK(23, 0) + 1) * 2 * 1000000 / freq;
|
||||
|
||||
@@ -184,7 +184,7 @@ static void uniphier_gpio_irq_mask(struct irq_data *data)
|
||||
|
||||
uniphier_gpio_reg_update(priv, UNIPHIER_GPIO_IRQ_EN, mask, 0);
|
||||
|
||||
return irq_chip_mask_parent(data);
|
||||
irq_chip_mask_parent(data);
|
||||
}
|
||||
|
||||
static void uniphier_gpio_irq_unmask(struct irq_data *data)
|
||||
@@ -194,7 +194,7 @@ static void uniphier_gpio_irq_unmask(struct irq_data *data)
|
||||
|
||||
uniphier_gpio_reg_update(priv, UNIPHIER_GPIO_IRQ_EN, mask, mask);
|
||||
|
||||
return irq_chip_unmask_parent(data);
|
||||
irq_chip_unmask_parent(data);
|
||||
}
|
||||
|
||||
static int uniphier_gpio_irq_set_type(struct irq_data *data, unsigned int type)
|
||||
|
||||
@@ -313,9 +313,11 @@ static struct gpio_desc *acpi_request_own_gpiod(struct gpio_chip *chip,
|
||||
|
||||
ret = gpio_set_debounce_timeout(desc, agpio->debounce_timeout);
|
||||
if (ret)
|
||||
gpiochip_free_own_desc(desc);
|
||||
dev_warn(chip->parent,
|
||||
"Failed to set debounce-timeout for pin 0x%04X, err %d\n",
|
||||
pin, ret);
|
||||
|
||||
return ret ? ERR_PTR(ret) : desc;
|
||||
return desc;
|
||||
}
|
||||
|
||||
static bool acpi_gpio_in_ignore_list(const char *controller_in, int pin_in)
|
||||
|
||||
@@ -971,7 +971,6 @@ out:
|
||||
void kgd2kfd_device_exit(struct kfd_dev *kfd)
|
||||
{
|
||||
if (kfd->init_complete) {
|
||||
svm_migrate_fini((struct amdgpu_device *)kfd->kgd);
|
||||
device_queue_manager_uninit(kfd->dqm);
|
||||
kfd_interrupt_exit(kfd);
|
||||
kfd_topology_remove_device(kfd);
|
||||
|
||||
@@ -891,9 +891,16 @@ int svm_migrate_init(struct amdgpu_device *adev)
|
||||
pgmap->ops = &svm_migrate_pgmap_ops;
|
||||
pgmap->owner = SVM_ADEV_PGMAP_OWNER(adev);
|
||||
pgmap->flags = MIGRATE_VMA_SELECT_DEVICE_PRIVATE;
|
||||
|
||||
/* Device manager releases device-specific resources, memory region and
|
||||
* pgmap when driver disconnects from device.
|
||||
*/
|
||||
r = devm_memremap_pages(adev->dev, pgmap);
|
||||
if (IS_ERR(r)) {
|
||||
pr_err("failed to register HMM device memory\n");
|
||||
|
||||
/* Disable SVM support capability */
|
||||
pgmap->type = 0;
|
||||
devm_release_mem_region(adev->dev, res->start,
|
||||
res->end - res->start + 1);
|
||||
return PTR_ERR(r);
|
||||
@@ -908,12 +915,3 @@ int svm_migrate_init(struct amdgpu_device *adev)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void svm_migrate_fini(struct amdgpu_device *adev)
|
||||
{
|
||||
struct dev_pagemap *pgmap = &adev->kfd.dev->pgmap;
|
||||
|
||||
devm_memunmap_pages(adev->dev, pgmap);
|
||||
devm_release_mem_region(adev->dev, pgmap->range.start,
|
||||
pgmap->range.end - pgmap->range.start + 1);
|
||||
}
|
||||
|
||||
@@ -47,7 +47,6 @@ unsigned long
|
||||
svm_migrate_addr_to_pfn(struct amdgpu_device *adev, unsigned long addr);
|
||||
|
||||
int svm_migrate_init(struct amdgpu_device *adev);
|
||||
void svm_migrate_fini(struct amdgpu_device *adev);
|
||||
|
||||
#else
|
||||
|
||||
@@ -55,10 +54,6 @@ static inline int svm_migrate_init(struct amdgpu_device *adev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline void svm_migrate_fini(struct amdgpu_device *adev)
|
||||
{
|
||||
/* empty */
|
||||
}
|
||||
|
||||
#endif /* IS_ENABLED(CONFIG_HSA_AMD_SVM) */
|
||||
|
||||
|
||||
@@ -118,6 +118,13 @@ static void svm_range_remove_notifier(struct svm_range *prange)
|
||||
mmu_interval_notifier_remove(&prange->notifier);
|
||||
}
|
||||
|
||||
static bool
|
||||
svm_is_valid_dma_mapping_addr(struct device *dev, dma_addr_t dma_addr)
|
||||
{
|
||||
return dma_addr && !dma_mapping_error(dev, dma_addr) &&
|
||||
!(dma_addr & SVM_RANGE_VRAM_DOMAIN);
|
||||
}
|
||||
|
||||
static int
|
||||
svm_range_dma_map_dev(struct amdgpu_device *adev, struct svm_range *prange,
|
||||
unsigned long offset, unsigned long npages,
|
||||
@@ -139,8 +146,7 @@ svm_range_dma_map_dev(struct amdgpu_device *adev, struct svm_range *prange,
|
||||
|
||||
addr += offset;
|
||||
for (i = 0; i < npages; i++) {
|
||||
if (WARN_ONCE(addr[i] && !dma_mapping_error(dev, addr[i]),
|
||||
"leaking dma mapping\n"))
|
||||
if (svm_is_valid_dma_mapping_addr(dev, addr[i]))
|
||||
dma_unmap_page(dev, addr[i], PAGE_SIZE, dir);
|
||||
|
||||
page = hmm_pfn_to_page(hmm_pfns[i]);
|
||||
@@ -209,7 +215,7 @@ void svm_range_dma_unmap(struct device *dev, dma_addr_t *dma_addr,
|
||||
return;
|
||||
|
||||
for (i = offset; i < offset + npages; i++) {
|
||||
if (!dma_addr[i] || dma_mapping_error(dev, dma_addr[i]))
|
||||
if (!svm_is_valid_dma_mapping_addr(dev, dma_addr[i]))
|
||||
continue;
|
||||
pr_debug("dma unmapping 0x%llx\n", dma_addr[i] >> PAGE_SHIFT);
|
||||
dma_unmap_page(dev, dma_addr[i], PAGE_SIZE, dir);
|
||||
@@ -1165,7 +1171,7 @@ svm_range_map_to_gpu(struct amdgpu_device *adev, struct amdgpu_vm *vm,
|
||||
unsigned long last_start;
|
||||
int last_domain;
|
||||
int r = 0;
|
||||
int64_t i;
|
||||
int64_t i, j;
|
||||
|
||||
last_start = prange->start + offset;
|
||||
|
||||
@@ -1178,7 +1184,11 @@ svm_range_map_to_gpu(struct amdgpu_device *adev, struct amdgpu_vm *vm,
|
||||
for (i = offset; i < offset + npages; i++) {
|
||||
last_domain = dma_addr[i] & SVM_RANGE_VRAM_DOMAIN;
|
||||
dma_addr[i] &= ~SVM_RANGE_VRAM_DOMAIN;
|
||||
if ((prange->start + i) < prange->last &&
|
||||
|
||||
/* Collect all pages in the same address range and memory domain
|
||||
* that can be mapped with a single call to update mapping.
|
||||
*/
|
||||
if (i < offset + npages - 1 &&
|
||||
last_domain == (dma_addr[i + 1] & SVM_RANGE_VRAM_DOMAIN))
|
||||
continue;
|
||||
|
||||
@@ -1201,6 +1211,10 @@ svm_range_map_to_gpu(struct amdgpu_device *adev, struct amdgpu_vm *vm,
|
||||
NULL, dma_addr,
|
||||
&vm->last_update,
|
||||
&table_freed);
|
||||
|
||||
for (j = last_start - prange->start; j <= i; j++)
|
||||
dma_addr[j] |= last_domain;
|
||||
|
||||
if (r) {
|
||||
pr_debug("failed %d to map to gpu 0x%lx\n", r, prange->start);
|
||||
goto out;
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#define DC_LOGGER \
|
||||
engine->ctx->logger
|
||||
|
||||
#define DC_TRACE_LEVEL_MESSAGE(...) /* do nothing */
|
||||
#define DC_TRACE_LEVEL_MESSAGE(...) do { } while (0)
|
||||
#define IS_DC_I2CAUX_LOGGING_ENABLED() (false)
|
||||
#define LOG_FLAG_Error_I2cAux LOG_ERROR
|
||||
#define LOG_FLAG_I2cAux_DceAux LOG_I2C_AUX
|
||||
@@ -76,7 +76,7 @@ enum {
|
||||
#define DEFAULT_AUX_ENGINE_MULT 0
|
||||
#define DEFAULT_AUX_ENGINE_LENGTH 69
|
||||
|
||||
#define DC_TRACE_LEVEL_MESSAGE(...) /* do nothing */
|
||||
#define DC_TRACE_LEVEL_MESSAGE(...) do { } while (0)
|
||||
|
||||
static void release_engine(
|
||||
struct dce_aux *engine)
|
||||
|
||||
@@ -6867,6 +6867,8 @@ static int si_dpm_enable(struct amdgpu_device *adev)
|
||||
si_enable_auto_throttle_source(adev, AMDGPU_DPM_AUTO_THROTTLE_SRC_THERMAL, true);
|
||||
si_thermal_start_thermal_controller(adev);
|
||||
|
||||
ni_update_current_ps(adev, boot_ps);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -222,31 +222,42 @@ static int icl_sagv_max_dclk(const struct intel_qgv_info *qi)
|
||||
|
||||
struct intel_sa_info {
|
||||
u16 displayrtids;
|
||||
u8 deburst, deprogbwlimit;
|
||||
u8 deburst, deprogbwlimit, derating;
|
||||
};
|
||||
|
||||
static const struct intel_sa_info icl_sa_info = {
|
||||
.deburst = 8,
|
||||
.deprogbwlimit = 25, /* GB/s */
|
||||
.displayrtids = 128,
|
||||
.derating = 10,
|
||||
};
|
||||
|
||||
static const struct intel_sa_info tgl_sa_info = {
|
||||
.deburst = 16,
|
||||
.deprogbwlimit = 34, /* GB/s */
|
||||
.displayrtids = 256,
|
||||
.derating = 10,
|
||||
};
|
||||
|
||||
static const struct intel_sa_info rkl_sa_info = {
|
||||
.deburst = 16,
|
||||
.deprogbwlimit = 20, /* GB/s */
|
||||
.displayrtids = 128,
|
||||
.derating = 10,
|
||||
};
|
||||
|
||||
static const struct intel_sa_info adls_sa_info = {
|
||||
.deburst = 16,
|
||||
.deprogbwlimit = 38, /* GB/s */
|
||||
.displayrtids = 256,
|
||||
.derating = 10,
|
||||
};
|
||||
|
||||
static const struct intel_sa_info adlp_sa_info = {
|
||||
.deburst = 16,
|
||||
.deprogbwlimit = 38, /* GB/s */
|
||||
.displayrtids = 256,
|
||||
.derating = 20,
|
||||
};
|
||||
|
||||
static int icl_get_bw_info(struct drm_i915_private *dev_priv, const struct intel_sa_info *sa)
|
||||
@@ -302,7 +313,7 @@ static int icl_get_bw_info(struct drm_i915_private *dev_priv, const struct intel
|
||||
bw = icl_calc_bw(sp->dclk, clpchgroup * 32 * num_channels, ct);
|
||||
|
||||
bi->deratedbw[j] = min(maxdebw,
|
||||
bw * 9 / 10); /* 90% */
|
||||
bw * (100 - sa->derating) / 100);
|
||||
|
||||
drm_dbg_kms(&dev_priv->drm,
|
||||
"BW%d / QGV %d: num_planes=%d deratedbw=%u\n",
|
||||
@@ -400,7 +411,9 @@ void intel_bw_init_hw(struct drm_i915_private *dev_priv)
|
||||
|
||||
if (IS_DG2(dev_priv))
|
||||
dg2_get_bw_info(dev_priv);
|
||||
else if (IS_ALDERLAKE_S(dev_priv) || IS_ALDERLAKE_P(dev_priv))
|
||||
else if (IS_ALDERLAKE_P(dev_priv))
|
||||
icl_get_bw_info(dev_priv, &adlp_sa_info);
|
||||
else if (IS_ALDERLAKE_S(dev_priv))
|
||||
icl_get_bw_info(dev_priv, &adls_sa_info);
|
||||
else if (IS_ROCKETLAKE(dev_priv))
|
||||
icl_get_bw_info(dev_priv, &rkl_sa_info);
|
||||
|
||||
@@ -805,11 +805,14 @@ void intel_dmc_ucode_resume(struct drm_i915_private *dev_priv)
|
||||
*/
|
||||
void intel_dmc_ucode_fini(struct drm_i915_private *dev_priv)
|
||||
{
|
||||
int id;
|
||||
|
||||
if (!HAS_DMC(dev_priv))
|
||||
return;
|
||||
|
||||
intel_dmc_ucode_suspend(dev_priv);
|
||||
drm_WARN_ON(&dev_priv->drm, dev_priv->dmc.wakeref);
|
||||
|
||||
kfree(dev_priv->dmc.dmc_info[DMC_FW_MAIN].payload);
|
||||
for (id = 0; id < DMC_FW_MAX; id++)
|
||||
kfree(dev_priv->dmc.dmc_info[id].payload);
|
||||
}
|
||||
|
||||
@@ -356,11 +356,8 @@ static void i915_ttm_delete_mem_notify(struct ttm_buffer_object *bo)
|
||||
{
|
||||
struct drm_i915_gem_object *obj = i915_ttm_to_gem(bo);
|
||||
|
||||
if (likely(obj)) {
|
||||
/* This releases all gem object bindings to the backend. */
|
||||
if (likely(obj))
|
||||
i915_ttm_free_cached_io_st(obj);
|
||||
__i915_gem_free_object(obj);
|
||||
}
|
||||
}
|
||||
|
||||
static struct intel_memory_region *
|
||||
@@ -875,8 +872,12 @@ void i915_ttm_bo_destroy(struct ttm_buffer_object *bo)
|
||||
{
|
||||
struct drm_i915_gem_object *obj = i915_ttm_to_gem(bo);
|
||||
|
||||
/* This releases all gem object bindings to the backend. */
|
||||
__i915_gem_free_object(obj);
|
||||
|
||||
i915_gem_object_release_memory_region(obj);
|
||||
mutex_destroy(&obj->ttm.get_io_page.lock);
|
||||
|
||||
if (obj->ttm.created)
|
||||
call_rcu(&obj->rcu, __i915_gem_free_object_rcu);
|
||||
}
|
||||
|
||||
+2
-2
@@ -2263,7 +2263,7 @@ retry:
|
||||
list_for_each_entry(req, &ci->i_unsafe_dirops,
|
||||
r_unsafe_dir_item) {
|
||||
s = req->r_session;
|
||||
if (unlikely(s->s_mds > max)) {
|
||||
if (unlikely(s->s_mds >= max)) {
|
||||
spin_unlock(&ci->i_unsafe_lock);
|
||||
goto retry;
|
||||
}
|
||||
@@ -2277,7 +2277,7 @@ retry:
|
||||
list_for_each_entry(req, &ci->i_unsafe_iops,
|
||||
r_unsafe_target_item) {
|
||||
s = req->r_session;
|
||||
if (unlikely(s->s_mds > max)) {
|
||||
if (unlikely(s->s_mds >= max)) {
|
||||
spin_unlock(&ci->i_unsafe_lock);
|
||||
goto retry;
|
||||
}
|
||||
|
||||
+6
-8
@@ -48,10 +48,9 @@ struct ext2_group_desc * ext2_get_group_desc(struct super_block * sb,
|
||||
struct ext2_sb_info *sbi = EXT2_SB(sb);
|
||||
|
||||
if (block_group >= sbi->s_groups_count) {
|
||||
ext2_error (sb, "ext2_get_group_desc",
|
||||
"block_group >= groups_count - "
|
||||
"block_group = %d, groups_count = %lu",
|
||||
block_group, sbi->s_groups_count);
|
||||
WARN(1, "block_group >= groups_count - "
|
||||
"block_group = %d, groups_count = %lu",
|
||||
block_group, sbi->s_groups_count);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -59,10 +58,9 @@ struct ext2_group_desc * ext2_get_group_desc(struct super_block * sb,
|
||||
group_desc = block_group >> EXT2_DESC_PER_BLOCK_BITS(sb);
|
||||
offset = block_group & (EXT2_DESC_PER_BLOCK(sb) - 1);
|
||||
if (!sbi->s_group_desc[group_desc]) {
|
||||
ext2_error (sb, "ext2_get_group_desc",
|
||||
"Group descriptor not loaded - "
|
||||
"block_group = %d, group_desc = %lu, desc = %lu",
|
||||
block_group, group_desc, offset);
|
||||
WARN(1, "Group descriptor not loaded - "
|
||||
"block_group = %d, group_desc = %lu, desc = %lu",
|
||||
block_group, group_desc, offset);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
+4
-2
@@ -190,8 +190,10 @@ int inode_init_always(struct super_block *sb, struct inode *inode)
|
||||
mapping_set_gfp_mask(mapping, GFP_HIGHUSER_MOVABLE);
|
||||
mapping->private_data = NULL;
|
||||
mapping->writeback_index = 0;
|
||||
__init_rwsem(&mapping->invalidate_lock, "mapping.invalidate_lock",
|
||||
&sb->s_type->invalidate_lock_key);
|
||||
init_rwsem(&mapping->invalidate_lock);
|
||||
lockdep_set_class_and_name(&mapping->invalidate_lock,
|
||||
&sb->s_type->invalidate_lock_key,
|
||||
"mapping.invalidate_lock");
|
||||
inode->i_private = NULL;
|
||||
inode->i_mapping = mapping;
|
||||
INIT_HLIST_HEAD(&inode->i_dentry); /* buggered by rcu freeing */
|
||||
|
||||
@@ -14,14 +14,6 @@ static inline void __iomem *acpi_os_ioremap(acpi_physical_address phys,
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef acpi_os_memmap
|
||||
static inline void __iomem *acpi_os_memmap(acpi_physical_address phys,
|
||||
acpi_size size)
|
||||
{
|
||||
return ioremap_cache(phys, size);
|
||||
}
|
||||
#endif
|
||||
|
||||
extern bool acpi_permanent_mmap;
|
||||
|
||||
void __iomem __ref
|
||||
|
||||
+16
-14
@@ -338,20 +338,19 @@ __setup("rootflags=", root_data_setup);
|
||||
__setup("rootfstype=", fs_names_setup);
|
||||
__setup("rootdelay=", root_delay_setup);
|
||||
|
||||
static int __init split_fs_names(char *page, char *names)
|
||||
/* This can return zero length strings. Caller should check */
|
||||
static int __init split_fs_names(char *page, size_t size, char *names)
|
||||
{
|
||||
int count = 0;
|
||||
int count = 1;
|
||||
char *p = page;
|
||||
|
||||
strcpy(p, root_fs_names);
|
||||
strlcpy(p, root_fs_names, size);
|
||||
while (*p++) {
|
||||
if (p[-1] == ',')
|
||||
if (p[-1] == ',') {
|
||||
p[-1] = '\0';
|
||||
count++;
|
||||
}
|
||||
}
|
||||
*p = '\0';
|
||||
|
||||
for (p = page; *p; p += strlen(p)+1)
|
||||
count++;
|
||||
|
||||
return count;
|
||||
}
|
||||
@@ -404,12 +403,16 @@ void __init mount_block_root(char *name, int flags)
|
||||
scnprintf(b, BDEVNAME_SIZE, "unknown-block(%u,%u)",
|
||||
MAJOR(ROOT_DEV), MINOR(ROOT_DEV));
|
||||
if (root_fs_names)
|
||||
num_fs = split_fs_names(fs_names, root_fs_names);
|
||||
num_fs = split_fs_names(fs_names, PAGE_SIZE, root_fs_names);
|
||||
else
|
||||
num_fs = list_bdev_fs_names(fs_names, PAGE_SIZE);
|
||||
retry:
|
||||
for (i = 0, p = fs_names; i < num_fs; i++, p += strlen(p)+1) {
|
||||
int err = do_mount_root(name, p, flags, root_mount_data);
|
||||
int err;
|
||||
|
||||
if (!*p)
|
||||
continue;
|
||||
err = do_mount_root(name, p, flags, root_mount_data);
|
||||
switch (err) {
|
||||
case 0:
|
||||
goto out;
|
||||
@@ -543,19 +546,18 @@ static int __init mount_nodev_root(void)
|
||||
fs_names = (void *)__get_free_page(GFP_KERNEL);
|
||||
if (!fs_names)
|
||||
return -EINVAL;
|
||||
num_fs = split_fs_names(fs_names, root_fs_names);
|
||||
num_fs = split_fs_names(fs_names, PAGE_SIZE, root_fs_names);
|
||||
|
||||
for (i = 0, fstype = fs_names; i < num_fs;
|
||||
i++, fstype += strlen(fstype) + 1) {
|
||||
if (!*fstype)
|
||||
continue;
|
||||
if (!fs_is_nodev(fstype))
|
||||
continue;
|
||||
err = do_mount_root(root_device_name, fstype, root_mountflags,
|
||||
root_mount_data);
|
||||
if (!err)
|
||||
break;
|
||||
if (err != -EACCES && err != -EINVAL)
|
||||
panic("VFS: Unable to mount root \"%s\" (%s), err=%d\n",
|
||||
root_device_name, fstype, err);
|
||||
}
|
||||
|
||||
free_page((unsigned long)fs_names);
|
||||
|
||||
@@ -266,16 +266,19 @@ int test_init(struct tdescr *td)
|
||||
td->feats_supported |= FEAT_SSBS;
|
||||
if (getauxval(AT_HWCAP) & HWCAP_SVE)
|
||||
td->feats_supported |= FEAT_SVE;
|
||||
if (feats_ok(td))
|
||||
if (feats_ok(td)) {
|
||||
fprintf(stderr,
|
||||
"Required Features: [%s] supported\n",
|
||||
feats_to_string(td->feats_required &
|
||||
td->feats_supported));
|
||||
else
|
||||
} else {
|
||||
fprintf(stderr,
|
||||
"Required Features: [%s] NOT supported\n",
|
||||
feats_to_string(td->feats_required &
|
||||
~td->feats_supported));
|
||||
td->result = KSFT_SKIP;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Perform test specific additional initialization */
|
||||
|
||||
Reference in New Issue
Block a user