Merge remote-tracking branch 'qcom_sm8250/lineage-20' into lineage-20
Change-Id: I8d0a8bc8101febe5e93dc2952f736080c5ee54c4
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
VERSION = 4
|
VERSION = 4
|
||||||
PATCHLEVEL = 19
|
PATCHLEVEL = 19
|
||||||
SUBLEVEL = 304
|
SUBLEVEL = 306
|
||||||
EXTRAVERSION =
|
EXTRAVERSION =
|
||||||
NAME = "People's Front"
|
NAME = "People's Front"
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ struct rt_sigframe {
|
|||||||
unsigned int sigret_magic;
|
unsigned int sigret_magic;
|
||||||
};
|
};
|
||||||
|
|
||||||
static int save_arcv2_regs(struct sigcontext *mctx, struct pt_regs *regs)
|
static int save_arcv2_regs(struct sigcontext __user *mctx, struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
int err = 0;
|
int err = 0;
|
||||||
#ifndef CONFIG_ISA_ARCOMPACT
|
#ifndef CONFIG_ISA_ARCOMPACT
|
||||||
@@ -77,12 +77,12 @@ static int save_arcv2_regs(struct sigcontext *mctx, struct pt_regs *regs)
|
|||||||
#else
|
#else
|
||||||
v2abi.r58 = v2abi.r59 = 0;
|
v2abi.r58 = v2abi.r59 = 0;
|
||||||
#endif
|
#endif
|
||||||
err = __copy_to_user(&mctx->v2abi, &v2abi, sizeof(v2abi));
|
err = __copy_to_user(&mctx->v2abi, (void const *)&v2abi, sizeof(v2abi));
|
||||||
#endif
|
#endif
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int restore_arcv2_regs(struct sigcontext *mctx, struct pt_regs *regs)
|
static int restore_arcv2_regs(struct sigcontext __user *mctx, struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
int err = 0;
|
int err = 0;
|
||||||
#ifndef CONFIG_ISA_ARCOMPACT
|
#ifndef CONFIG_ISA_ARCOMPACT
|
||||||
|
|||||||
@@ -794,7 +794,7 @@
|
|||||||
|
|
||||||
xoadc: xoadc@197 {
|
xoadc: xoadc@197 {
|
||||||
compatible = "qcom,pm8921-adc";
|
compatible = "qcom,pm8921-adc";
|
||||||
reg = <197>;
|
reg = <0x197>;
|
||||||
interrupts-extended = <&pmicintc 78 IRQ_TYPE_EDGE_RISING>;
|
interrupts-extended = <&pmicintc 78 IRQ_TYPE_EDGE_RISING>;
|
||||||
#address-cells = <2>;
|
#address-cells = <2>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
|
|||||||
@@ -801,16 +801,16 @@ static int __init sunxi_mc_smp_init(void)
|
|||||||
for (i = 0; i < ARRAY_SIZE(sunxi_mc_smp_data); i++) {
|
for (i = 0; i < ARRAY_SIZE(sunxi_mc_smp_data); i++) {
|
||||||
ret = of_property_match_string(node, "enable-method",
|
ret = of_property_match_string(node, "enable-method",
|
||||||
sunxi_mc_smp_data[i].enable_method);
|
sunxi_mc_smp_data[i].enable_method);
|
||||||
if (!ret)
|
if (ret >= 0)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
is_a83t = sunxi_mc_smp_data[i].is_a83t;
|
|
||||||
|
|
||||||
of_node_put(node);
|
of_node_put(node);
|
||||||
if (ret)
|
if (ret < 0)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
|
is_a83t = sunxi_mc_smp_data[i].is_a83t;
|
||||||
|
|
||||||
if (!sunxi_mc_smp_cpu_table_init())
|
if (!sunxi_mc_smp_cpu_table_init())
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ static void neon_poly1305_blocks(struct poly1305_desc_ctx *dctx, const u8 *src,
|
|||||||
{
|
{
|
||||||
if (unlikely(!dctx->sset)) {
|
if (unlikely(!dctx->sset)) {
|
||||||
if (!dctx->rset) {
|
if (!dctx->rset) {
|
||||||
poly1305_init_arch(dctx, src);
|
poly1305_init_arm64(&dctx->h, src);
|
||||||
src += POLY1305_BLOCK_SIZE;
|
src += POLY1305_BLOCK_SIZE;
|
||||||
len -= POLY1305_BLOCK_SIZE;
|
len -= POLY1305_BLOCK_SIZE;
|
||||||
dctx->rset = 1;
|
dctx->rset = 1;
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ int efi_set_mapping_permissions(struct mm_struct *mm, efi_memory_desc_t *md);
|
|||||||
({ \
|
({ \
|
||||||
efi_virtmap_load(); \
|
efi_virtmap_load(); \
|
||||||
__efi_fpsimd_begin(); \
|
__efi_fpsimd_begin(); \
|
||||||
spin_lock(&efi_rt_lock); \
|
raw_spin_lock(&efi_rt_lock); \
|
||||||
})
|
})
|
||||||
|
|
||||||
#define arch_efi_call_virt(p, f, args...) \
|
#define arch_efi_call_virt(p, f, args...) \
|
||||||
@@ -37,12 +37,12 @@ int efi_set_mapping_permissions(struct mm_struct *mm, efi_memory_desc_t *md);
|
|||||||
|
|
||||||
#define arch_efi_call_virt_teardown() \
|
#define arch_efi_call_virt_teardown() \
|
||||||
({ \
|
({ \
|
||||||
spin_unlock(&efi_rt_lock); \
|
raw_spin_unlock(&efi_rt_lock); \
|
||||||
__efi_fpsimd_end(); \
|
__efi_fpsimd_end(); \
|
||||||
efi_virtmap_unload(); \
|
efi_virtmap_unload(); \
|
||||||
})
|
})
|
||||||
|
|
||||||
extern spinlock_t efi_rt_lock;
|
extern raw_spinlock_t efi_rt_lock;
|
||||||
efi_status_t __efi_rt_asm_wrapper(void *, const char *, ...);
|
efi_status_t __efi_rt_asm_wrapper(void *, const char *, ...);
|
||||||
|
|
||||||
#define ARCH_EFI_IRQ_FLAGS_MASK (PSR_D_BIT | PSR_A_BIT | PSR_I_BIT | PSR_F_BIT)
|
#define ARCH_EFI_IRQ_FLAGS_MASK (PSR_D_BIT | PSR_A_BIT | PSR_I_BIT | PSR_F_BIT)
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ asmlinkage efi_status_t efi_handle_corrupted_x18(efi_status_t s, const char *f)
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFINE_SPINLOCK(efi_rt_lock);
|
DEFINE_RAW_SPINLOCK(efi_rt_lock);
|
||||||
|
|
||||||
asmlinkage u64 *efi_rt_stack_top __ro_after_init;
|
asmlinkage u64 *efi_rt_stack_top __ro_after_init;
|
||||||
|
|
||||||
|
|||||||
@@ -864,7 +864,7 @@ int __init db1200_dev_setup(void)
|
|||||||
i2c_register_board_info(0, db1200_i2c_devs,
|
i2c_register_board_info(0, db1200_i2c_devs,
|
||||||
ARRAY_SIZE(db1200_i2c_devs));
|
ARRAY_SIZE(db1200_i2c_devs));
|
||||||
spi_register_board_info(db1200_spi_devs,
|
spi_register_board_info(db1200_spi_devs,
|
||||||
ARRAY_SIZE(db1200_i2c_devs));
|
ARRAY_SIZE(db1200_spi_devs));
|
||||||
|
|
||||||
/* SWITCHES: S6.8 I2C/SPI selector (OFF=I2C ON=SPI)
|
/* SWITCHES: S6.8 I2C/SPI selector (OFF=I2C ON=SPI)
|
||||||
* S6.7 AC97/I2S selector (OFF=AC97 ON=I2S)
|
* S6.7 AC97/I2S selector (OFF=AC97 ON=I2S)
|
||||||
|
|||||||
@@ -581,7 +581,7 @@ int __init db1550_dev_setup(void)
|
|||||||
i2c_register_board_info(0, db1550_i2c_devs,
|
i2c_register_board_info(0, db1550_i2c_devs,
|
||||||
ARRAY_SIZE(db1550_i2c_devs));
|
ARRAY_SIZE(db1550_i2c_devs));
|
||||||
spi_register_board_info(db1550_spi_devs,
|
spi_register_board_info(db1550_spi_devs,
|
||||||
ARRAY_SIZE(db1550_i2c_devs));
|
ARRAY_SIZE(db1550_spi_devs));
|
||||||
|
|
||||||
c = clk_get(NULL, "psc0_intclk");
|
c = clk_get(NULL, "psc0_intclk");
|
||||||
if (!IS_ERR(c)) {
|
if (!IS_ERR(c)) {
|
||||||
|
|||||||
@@ -288,12 +288,10 @@ config ARCH_MAY_HAVE_PC_FDC
|
|||||||
|
|
||||||
config PPC_UDBG_16550
|
config PPC_UDBG_16550
|
||||||
bool
|
bool
|
||||||
default n
|
|
||||||
|
|
||||||
config GENERIC_TBSYNC
|
config GENERIC_TBSYNC
|
||||||
bool
|
bool
|
||||||
default y if PPC32 && SMP
|
default y if PPC32 && SMP
|
||||||
default n
|
|
||||||
|
|
||||||
config AUDIT_ARCH
|
config AUDIT_ARCH
|
||||||
bool
|
bool
|
||||||
@@ -312,13 +310,11 @@ config EPAPR_BOOT
|
|||||||
bool
|
bool
|
||||||
help
|
help
|
||||||
Used to allow a board to specify it wants an ePAPR compliant wrapper.
|
Used to allow a board to specify it wants an ePAPR compliant wrapper.
|
||||||
default n
|
|
||||||
|
|
||||||
config DEFAULT_UIMAGE
|
config DEFAULT_UIMAGE
|
||||||
bool
|
bool
|
||||||
help
|
help
|
||||||
Used to allow a board to specify it wants a uImage built by default
|
Used to allow a board to specify it wants a uImage built by default
|
||||||
default n
|
|
||||||
|
|
||||||
config ARCH_HIBERNATION_POSSIBLE
|
config ARCH_HIBERNATION_POSSIBLE
|
||||||
bool
|
bool
|
||||||
@@ -332,11 +328,9 @@ config ARCH_SUSPEND_POSSIBLE
|
|||||||
|
|
||||||
config PPC_DCR_NATIVE
|
config PPC_DCR_NATIVE
|
||||||
bool
|
bool
|
||||||
default n
|
|
||||||
|
|
||||||
config PPC_DCR_MMIO
|
config PPC_DCR_MMIO
|
||||||
bool
|
bool
|
||||||
default n
|
|
||||||
|
|
||||||
config PPC_DCR
|
config PPC_DCR
|
||||||
bool
|
bool
|
||||||
@@ -347,7 +341,6 @@ config PPC_OF_PLATFORM_PCI
|
|||||||
bool
|
bool
|
||||||
depends on PCI
|
depends on PCI
|
||||||
depends on PPC64 # not supported on 32 bits yet
|
depends on PPC64 # not supported on 32 bits yet
|
||||||
default n
|
|
||||||
|
|
||||||
config ARCH_SUPPORTS_DEBUG_PAGEALLOC
|
config ARCH_SUPPORTS_DEBUG_PAGEALLOC
|
||||||
depends on PPC32 || PPC_BOOK3S_64
|
depends on PPC32 || PPC_BOOK3S_64
|
||||||
@@ -450,14 +443,12 @@ config PPC_TRANSACTIONAL_MEM
|
|||||||
depends on SMP
|
depends on SMP
|
||||||
select ALTIVEC
|
select ALTIVEC
|
||||||
select VSX
|
select VSX
|
||||||
default n
|
|
||||||
---help---
|
---help---
|
||||||
Support user-mode Transactional Memory on POWERPC.
|
Support user-mode Transactional Memory on POWERPC.
|
||||||
|
|
||||||
config LD_HEAD_STUB_CATCH
|
config LD_HEAD_STUB_CATCH
|
||||||
bool "Reserve 256 bytes to cope with linker stubs in HEAD text" if EXPERT
|
bool "Reserve 256 bytes to cope with linker stubs in HEAD text" if EXPERT
|
||||||
depends on PPC64
|
depends on PPC64
|
||||||
default n
|
|
||||||
help
|
help
|
||||||
Very large kernels can cause linker branch stubs to be generated by
|
Very large kernels can cause linker branch stubs to be generated by
|
||||||
code in head_64.S, which moves the head text sections out of their
|
code in head_64.S, which moves the head text sections out of their
|
||||||
@@ -560,7 +551,6 @@ config RELOCATABLE
|
|||||||
config RELOCATABLE_TEST
|
config RELOCATABLE_TEST
|
||||||
bool "Test relocatable kernel"
|
bool "Test relocatable kernel"
|
||||||
depends on (PPC64 && RELOCATABLE)
|
depends on (PPC64 && RELOCATABLE)
|
||||||
default n
|
|
||||||
help
|
help
|
||||||
This runs the relocatable kernel at the address it was initially
|
This runs the relocatable kernel at the address it was initially
|
||||||
loaded at, which tends to be non-zero and therefore test the
|
loaded at, which tends to be non-zero and therefore test the
|
||||||
@@ -772,7 +762,6 @@ config PPC_SUBPAGE_PROT
|
|||||||
|
|
||||||
config PPC_COPRO_BASE
|
config PPC_COPRO_BASE
|
||||||
bool
|
bool
|
||||||
default n
|
|
||||||
|
|
||||||
config SCHED_SMT
|
config SCHED_SMT
|
||||||
bool "SMT (Hyperthreading) scheduler support"
|
bool "SMT (Hyperthreading) scheduler support"
|
||||||
@@ -895,7 +884,6 @@ config PPC_INDIRECT_PCI
|
|||||||
bool
|
bool
|
||||||
depends on PCI
|
depends on PCI
|
||||||
default y if 40x || 44x
|
default y if 40x || 44x
|
||||||
default n
|
|
||||||
|
|
||||||
config EISA
|
config EISA
|
||||||
bool
|
bool
|
||||||
@@ -992,7 +980,6 @@ source "drivers/pcmcia/Kconfig"
|
|||||||
|
|
||||||
config HAS_RAPIDIO
|
config HAS_RAPIDIO
|
||||||
bool
|
bool
|
||||||
default n
|
|
||||||
|
|
||||||
config RAPIDIO
|
config RAPIDIO
|
||||||
tristate "RapidIO support"
|
tristate "RapidIO support"
|
||||||
@@ -1028,7 +1015,6 @@ endmenu
|
|||||||
|
|
||||||
config NONSTATIC_KERNEL
|
config NONSTATIC_KERNEL
|
||||||
bool
|
bool
|
||||||
default n
|
|
||||||
|
|
||||||
menu "Advanced setup"
|
menu "Advanced setup"
|
||||||
depends on PPC32
|
depends on PPC32
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
config PPC_DISABLE_WERROR
|
config PPC_DISABLE_WERROR
|
||||||
bool "Don't build arch/powerpc code with -Werror"
|
bool "Don't build arch/powerpc code with -Werror"
|
||||||
default n
|
|
||||||
help
|
help
|
||||||
This option tells the compiler NOT to build the code under
|
This option tells the compiler NOT to build the code under
|
||||||
arch/powerpc with the -Werror flag (which means warnings
|
arch/powerpc with the -Werror flag (which means warnings
|
||||||
@@ -56,7 +55,6 @@ config PPC_EMULATED_STATS
|
|||||||
config CODE_PATCHING_SELFTEST
|
config CODE_PATCHING_SELFTEST
|
||||||
bool "Run self-tests of the code-patching code"
|
bool "Run self-tests of the code-patching code"
|
||||||
depends on DEBUG_KERNEL
|
depends on DEBUG_KERNEL
|
||||||
default n
|
|
||||||
|
|
||||||
config JUMP_LABEL_FEATURE_CHECKS
|
config JUMP_LABEL_FEATURE_CHECKS
|
||||||
bool "Enable use of jump label for cpu/mmu_has_feature()"
|
bool "Enable use of jump label for cpu/mmu_has_feature()"
|
||||||
@@ -70,7 +68,6 @@ config JUMP_LABEL_FEATURE_CHECKS
|
|||||||
config JUMP_LABEL_FEATURE_CHECK_DEBUG
|
config JUMP_LABEL_FEATURE_CHECK_DEBUG
|
||||||
bool "Do extra check on feature fixup calls"
|
bool "Do extra check on feature fixup calls"
|
||||||
depends on DEBUG_KERNEL && JUMP_LABEL_FEATURE_CHECKS
|
depends on DEBUG_KERNEL && JUMP_LABEL_FEATURE_CHECKS
|
||||||
default n
|
|
||||||
help
|
help
|
||||||
This tries to catch incorrect usage of cpu_has_feature() and
|
This tries to catch incorrect usage of cpu_has_feature() and
|
||||||
mmu_has_feature() in the code.
|
mmu_has_feature() in the code.
|
||||||
@@ -80,16 +77,13 @@ config JUMP_LABEL_FEATURE_CHECK_DEBUG
|
|||||||
config FTR_FIXUP_SELFTEST
|
config FTR_FIXUP_SELFTEST
|
||||||
bool "Run self-tests of the feature-fixup code"
|
bool "Run self-tests of the feature-fixup code"
|
||||||
depends on DEBUG_KERNEL
|
depends on DEBUG_KERNEL
|
||||||
default n
|
|
||||||
|
|
||||||
config MSI_BITMAP_SELFTEST
|
config MSI_BITMAP_SELFTEST
|
||||||
bool "Run self-tests of the MSI bitmap code"
|
bool "Run self-tests of the MSI bitmap code"
|
||||||
depends on DEBUG_KERNEL
|
depends on DEBUG_KERNEL
|
||||||
default n
|
|
||||||
|
|
||||||
config PPC_IRQ_SOFT_MASK_DEBUG
|
config PPC_IRQ_SOFT_MASK_DEBUG
|
||||||
bool "Include extra checks for powerpc irq soft masking"
|
bool "Include extra checks for powerpc irq soft masking"
|
||||||
default n
|
|
||||||
|
|
||||||
config XMON
|
config XMON
|
||||||
bool "Include xmon kernel debugger"
|
bool "Include xmon kernel debugger"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ obj-$(CONFIG_PPC32) += div64.o copy_32.o crtsavres.o strlen_32.o
|
|||||||
# so it is only needed for modules, and only for older linkers which
|
# so it is only needed for modules, and only for older linkers which
|
||||||
# do not support --save-restore-funcs
|
# do not support --save-restore-funcs
|
||||||
ifeq ($(call ld-ifversion, -lt, 225000000, y),y)
|
ifeq ($(call ld-ifversion, -lt, 225000000, y),y)
|
||||||
extra-$(CONFIG_PPC64) += crtsavres.o
|
always-$(CONFIG_PPC64) += crtsavres.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
obj-$(CONFIG_PPC_BOOK3S_64) += copyuser_power7.o copypage_power7.o \
|
obj-$(CONFIG_PPC_BOOK3S_64) += copyuser_power7.o copypage_power7.o \
|
||||||
|
|||||||
@@ -261,6 +261,8 @@ static int update_events_in_group(struct device_node *node, struct imc_pmu *pmu)
|
|||||||
attr_group->attrs = attrs;
|
attr_group->attrs = attrs;
|
||||||
do {
|
do {
|
||||||
ev_val_str = kasprintf(GFP_KERNEL, "event=0x%x", pmu->events[i].value);
|
ev_val_str = kasprintf(GFP_KERNEL, "event=0x%x", pmu->events[i].value);
|
||||||
|
if (!ev_val_str)
|
||||||
|
continue;
|
||||||
dev_str = device_str_attr_create(pmu->events[i].name, ev_val_str);
|
dev_str = device_str_attr_create(pmu->events[i].name, ev_val_str);
|
||||||
if (!dev_str)
|
if (!dev_str)
|
||||||
continue;
|
continue;
|
||||||
@@ -268,6 +270,8 @@ static int update_events_in_group(struct device_node *node, struct imc_pmu *pmu)
|
|||||||
attrs[j++] = dev_str;
|
attrs[j++] = dev_str;
|
||||||
if (pmu->events[i].scale) {
|
if (pmu->events[i].scale) {
|
||||||
ev_scale_str = kasprintf(GFP_KERNEL, "%s.scale", pmu->events[i].name);
|
ev_scale_str = kasprintf(GFP_KERNEL, "%s.scale", pmu->events[i].name);
|
||||||
|
if (!ev_scale_str)
|
||||||
|
continue;
|
||||||
dev_str = device_str_attr_create(ev_scale_str, pmu->events[i].scale);
|
dev_str = device_str_attr_create(ev_scale_str, pmu->events[i].scale);
|
||||||
if (!dev_str)
|
if (!dev_str)
|
||||||
continue;
|
continue;
|
||||||
@@ -277,6 +281,8 @@ static int update_events_in_group(struct device_node *node, struct imc_pmu *pmu)
|
|||||||
|
|
||||||
if (pmu->events[i].unit) {
|
if (pmu->events[i].unit) {
|
||||||
ev_unit_str = kasprintf(GFP_KERNEL, "%s.unit", pmu->events[i].name);
|
ev_unit_str = kasprintf(GFP_KERNEL, "%s.unit", pmu->events[i].name);
|
||||||
|
if (!ev_unit_str)
|
||||||
|
continue;
|
||||||
dev_str = device_str_attr_create(ev_unit_str, pmu->events[i].unit);
|
dev_str = device_str_attr_create(ev_unit_str, pmu->events[i].unit);
|
||||||
if (!dev_str)
|
if (!dev_str)
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
config ACADIA
|
config ACADIA
|
||||||
bool "Acadia"
|
bool "Acadia"
|
||||||
depends on 40x
|
depends on 40x
|
||||||
default n
|
|
||||||
select PPC40x_SIMPLE
|
select PPC40x_SIMPLE
|
||||||
select 405EZ
|
select 405EZ
|
||||||
help
|
help
|
||||||
@@ -11,7 +10,6 @@ config ACADIA
|
|||||||
config EP405
|
config EP405
|
||||||
bool "EP405/EP405PC"
|
bool "EP405/EP405PC"
|
||||||
depends on 40x
|
depends on 40x
|
||||||
default n
|
|
||||||
select 405GP
|
select 405GP
|
||||||
select PCI
|
select PCI
|
||||||
help
|
help
|
||||||
@@ -20,7 +18,6 @@ config EP405
|
|||||||
config HOTFOOT
|
config HOTFOOT
|
||||||
bool "Hotfoot"
|
bool "Hotfoot"
|
||||||
depends on 40x
|
depends on 40x
|
||||||
default n
|
|
||||||
select PPC40x_SIMPLE
|
select PPC40x_SIMPLE
|
||||||
select PCI
|
select PCI
|
||||||
help
|
help
|
||||||
@@ -29,7 +26,6 @@ config HOTFOOT
|
|||||||
config KILAUEA
|
config KILAUEA
|
||||||
bool "Kilauea"
|
bool "Kilauea"
|
||||||
depends on 40x
|
depends on 40x
|
||||||
default n
|
|
||||||
select 405EX
|
select 405EX
|
||||||
select PPC40x_SIMPLE
|
select PPC40x_SIMPLE
|
||||||
select PPC4xx_PCI_EXPRESS
|
select PPC4xx_PCI_EXPRESS
|
||||||
@@ -41,7 +37,6 @@ config KILAUEA
|
|||||||
config MAKALU
|
config MAKALU
|
||||||
bool "Makalu"
|
bool "Makalu"
|
||||||
depends on 40x
|
depends on 40x
|
||||||
default n
|
|
||||||
select 405EX
|
select 405EX
|
||||||
select PCI
|
select PCI
|
||||||
select PPC4xx_PCI_EXPRESS
|
select PPC4xx_PCI_EXPRESS
|
||||||
@@ -62,7 +57,6 @@ config WALNUT
|
|||||||
config XILINX_VIRTEX_GENERIC_BOARD
|
config XILINX_VIRTEX_GENERIC_BOARD
|
||||||
bool "Generic Xilinx Virtex board"
|
bool "Generic Xilinx Virtex board"
|
||||||
depends on 40x
|
depends on 40x
|
||||||
default n
|
|
||||||
select XILINX_VIRTEX_II_PRO
|
select XILINX_VIRTEX_II_PRO
|
||||||
select XILINX_VIRTEX_4_FX
|
select XILINX_VIRTEX_4_FX
|
||||||
select XILINX_INTC
|
select XILINX_INTC
|
||||||
@@ -80,7 +74,6 @@ config XILINX_VIRTEX_GENERIC_BOARD
|
|||||||
config OBS600
|
config OBS600
|
||||||
bool "OpenBlockS 600"
|
bool "OpenBlockS 600"
|
||||||
depends on 40x
|
depends on 40x
|
||||||
default n
|
|
||||||
select 405EX
|
select 405EX
|
||||||
select PPC40x_SIMPLE
|
select PPC40x_SIMPLE
|
||||||
help
|
help
|
||||||
@@ -90,7 +83,6 @@ config OBS600
|
|||||||
config PPC40x_SIMPLE
|
config PPC40x_SIMPLE
|
||||||
bool "Simple PowerPC 40x board support"
|
bool "Simple PowerPC 40x board support"
|
||||||
depends on 40x
|
depends on 40x
|
||||||
default n
|
|
||||||
help
|
help
|
||||||
This option enables the simple PowerPC 40x platform support.
|
This option enables the simple PowerPC 40x platform support.
|
||||||
|
|
||||||
@@ -156,7 +148,6 @@ config IBM405_ERR51
|
|||||||
config APM8018X
|
config APM8018X
|
||||||
bool "APM8018X"
|
bool "APM8018X"
|
||||||
depends on 40x
|
depends on 40x
|
||||||
default n
|
|
||||||
select PPC40x_SIMPLE
|
select PPC40x_SIMPLE
|
||||||
help
|
help
|
||||||
This option enables support for the AppliedMicro APM8018X evaluation
|
This option enables support for the AppliedMicro APM8018X evaluation
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
config PPC_47x
|
config PPC_47x
|
||||||
bool "Support for 47x variant"
|
bool "Support for 47x variant"
|
||||||
depends on 44x
|
depends on 44x
|
||||||
default n
|
|
||||||
select MPIC
|
select MPIC
|
||||||
help
|
help
|
||||||
This option enables support for the 47x family of processors and is
|
This option enables support for the 47x family of processors and is
|
||||||
@@ -11,7 +10,6 @@ config PPC_47x
|
|||||||
config BAMBOO
|
config BAMBOO
|
||||||
bool "Bamboo"
|
bool "Bamboo"
|
||||||
depends on 44x
|
depends on 44x
|
||||||
default n
|
|
||||||
select PPC44x_SIMPLE
|
select PPC44x_SIMPLE
|
||||||
select 440EP
|
select 440EP
|
||||||
select PCI
|
select PCI
|
||||||
@@ -21,7 +19,6 @@ config BAMBOO
|
|||||||
config BLUESTONE
|
config BLUESTONE
|
||||||
bool "Bluestone"
|
bool "Bluestone"
|
||||||
depends on 44x
|
depends on 44x
|
||||||
default n
|
|
||||||
select PPC44x_SIMPLE
|
select PPC44x_SIMPLE
|
||||||
select APM821xx
|
select APM821xx
|
||||||
select PCI_MSI
|
select PCI_MSI
|
||||||
@@ -44,7 +41,6 @@ config EBONY
|
|||||||
config SAM440EP
|
config SAM440EP
|
||||||
bool "Sam440ep"
|
bool "Sam440ep"
|
||||||
depends on 44x
|
depends on 44x
|
||||||
default n
|
|
||||||
select 440EP
|
select 440EP
|
||||||
select PCI
|
select PCI
|
||||||
help
|
help
|
||||||
@@ -53,7 +49,6 @@ config SAM440EP
|
|||||||
config SEQUOIA
|
config SEQUOIA
|
||||||
bool "Sequoia"
|
bool "Sequoia"
|
||||||
depends on 44x
|
depends on 44x
|
||||||
default n
|
|
||||||
select PPC44x_SIMPLE
|
select PPC44x_SIMPLE
|
||||||
select 440EPX
|
select 440EPX
|
||||||
help
|
help
|
||||||
@@ -62,7 +57,6 @@ config SEQUOIA
|
|||||||
config TAISHAN
|
config TAISHAN
|
||||||
bool "Taishan"
|
bool "Taishan"
|
||||||
depends on 44x
|
depends on 44x
|
||||||
default n
|
|
||||||
select PPC44x_SIMPLE
|
select PPC44x_SIMPLE
|
||||||
select 440GX
|
select 440GX
|
||||||
select PCI
|
select PCI
|
||||||
@@ -73,7 +67,6 @@ config TAISHAN
|
|||||||
config KATMAI
|
config KATMAI
|
||||||
bool "Katmai"
|
bool "Katmai"
|
||||||
depends on 44x
|
depends on 44x
|
||||||
default n
|
|
||||||
select PPC44x_SIMPLE
|
select PPC44x_SIMPLE
|
||||||
select 440SPe
|
select 440SPe
|
||||||
select PCI
|
select PCI
|
||||||
@@ -86,7 +79,6 @@ config KATMAI
|
|||||||
config RAINIER
|
config RAINIER
|
||||||
bool "Rainier"
|
bool "Rainier"
|
||||||
depends on 44x
|
depends on 44x
|
||||||
default n
|
|
||||||
select PPC44x_SIMPLE
|
select PPC44x_SIMPLE
|
||||||
select 440GRX
|
select 440GRX
|
||||||
select PCI
|
select PCI
|
||||||
@@ -96,7 +88,6 @@ config RAINIER
|
|||||||
config WARP
|
config WARP
|
||||||
bool "PIKA Warp"
|
bool "PIKA Warp"
|
||||||
depends on 44x
|
depends on 44x
|
||||||
default n
|
|
||||||
select 440EP
|
select 440EP
|
||||||
help
|
help
|
||||||
This option enables support for the PIKA Warp(tm) Appliance. The Warp
|
This option enables support for the PIKA Warp(tm) Appliance. The Warp
|
||||||
@@ -109,7 +100,6 @@ config WARP
|
|||||||
config ARCHES
|
config ARCHES
|
||||||
bool "Arches"
|
bool "Arches"
|
||||||
depends on 44x
|
depends on 44x
|
||||||
default n
|
|
||||||
select PPC44x_SIMPLE
|
select PPC44x_SIMPLE
|
||||||
select 460EX # Odd since it uses 460GT but the effects are the same
|
select 460EX # Odd since it uses 460GT but the effects are the same
|
||||||
select PCI
|
select PCI
|
||||||
@@ -120,7 +110,6 @@ config ARCHES
|
|||||||
config CANYONLANDS
|
config CANYONLANDS
|
||||||
bool "Canyonlands"
|
bool "Canyonlands"
|
||||||
depends on 44x
|
depends on 44x
|
||||||
default n
|
|
||||||
select 460EX
|
select 460EX
|
||||||
select PCI
|
select PCI
|
||||||
select PPC4xx_PCI_EXPRESS
|
select PPC4xx_PCI_EXPRESS
|
||||||
@@ -134,7 +123,6 @@ config CANYONLANDS
|
|||||||
config GLACIER
|
config GLACIER
|
||||||
bool "Glacier"
|
bool "Glacier"
|
||||||
depends on 44x
|
depends on 44x
|
||||||
default n
|
|
||||||
select PPC44x_SIMPLE
|
select PPC44x_SIMPLE
|
||||||
select 460EX # Odd since it uses 460GT but the effects are the same
|
select 460EX # Odd since it uses 460GT but the effects are the same
|
||||||
select PCI
|
select PCI
|
||||||
@@ -147,7 +135,6 @@ config GLACIER
|
|||||||
config REDWOOD
|
config REDWOOD
|
||||||
bool "Redwood"
|
bool "Redwood"
|
||||||
depends on 44x
|
depends on 44x
|
||||||
default n
|
|
||||||
select PPC44x_SIMPLE
|
select PPC44x_SIMPLE
|
||||||
select 460SX
|
select 460SX
|
||||||
select PCI
|
select PCI
|
||||||
@@ -160,7 +147,6 @@ config REDWOOD
|
|||||||
config EIGER
|
config EIGER
|
||||||
bool "Eiger"
|
bool "Eiger"
|
||||||
depends on 44x
|
depends on 44x
|
||||||
default n
|
|
||||||
select PPC44x_SIMPLE
|
select PPC44x_SIMPLE
|
||||||
select 460SX
|
select 460SX
|
||||||
select PCI
|
select PCI
|
||||||
@@ -172,7 +158,6 @@ config EIGER
|
|||||||
config YOSEMITE
|
config YOSEMITE
|
||||||
bool "Yosemite"
|
bool "Yosemite"
|
||||||
depends on 44x
|
depends on 44x
|
||||||
default n
|
|
||||||
select PPC44x_SIMPLE
|
select PPC44x_SIMPLE
|
||||||
select 440EP
|
select 440EP
|
||||||
select PCI
|
select PCI
|
||||||
@@ -182,7 +167,6 @@ config YOSEMITE
|
|||||||
config ISS4xx
|
config ISS4xx
|
||||||
bool "ISS 4xx Simulator"
|
bool "ISS 4xx Simulator"
|
||||||
depends on (44x || 40x)
|
depends on (44x || 40x)
|
||||||
default n
|
|
||||||
select 405GP if 40x
|
select 405GP if 40x
|
||||||
select 440GP if 44x && !PPC_47x
|
select 440GP if 44x && !PPC_47x
|
||||||
select PPC_FPU
|
select PPC_FPU
|
||||||
@@ -193,7 +177,7 @@ config ISS4xx
|
|||||||
config CURRITUCK
|
config CURRITUCK
|
||||||
bool "IBM Currituck (476fpe) Support"
|
bool "IBM Currituck (476fpe) Support"
|
||||||
depends on PPC_47x
|
depends on PPC_47x
|
||||||
default n
|
select I2C
|
||||||
select SWIOTLB
|
select SWIOTLB
|
||||||
select 476FPE
|
select 476FPE
|
||||||
select PPC4xx_PCI_EXPRESS
|
select PPC4xx_PCI_EXPRESS
|
||||||
@@ -203,7 +187,6 @@ config CURRITUCK
|
|||||||
config FSP2
|
config FSP2
|
||||||
bool "IBM FSP2 (476fpe) Support"
|
bool "IBM FSP2 (476fpe) Support"
|
||||||
depends on PPC_47x
|
depends on PPC_47x
|
||||||
default n
|
|
||||||
select 476FPE
|
select 476FPE
|
||||||
select IBM_EMAC_EMAC4 if IBM_EMAC
|
select IBM_EMAC_EMAC4 if IBM_EMAC
|
||||||
select IBM_EMAC_RGMII if IBM_EMAC
|
select IBM_EMAC_RGMII if IBM_EMAC
|
||||||
@@ -215,7 +198,6 @@ config FSP2
|
|||||||
config AKEBONO
|
config AKEBONO
|
||||||
bool "IBM Akebono (476gtr) Support"
|
bool "IBM Akebono (476gtr) Support"
|
||||||
depends on PPC_47x
|
depends on PPC_47x
|
||||||
default n
|
|
||||||
select SWIOTLB
|
select SWIOTLB
|
||||||
select 476FPE
|
select 476FPE
|
||||||
select PPC4xx_PCI_EXPRESS
|
select PPC4xx_PCI_EXPRESS
|
||||||
@@ -241,7 +223,6 @@ config AKEBONO
|
|||||||
config ICON
|
config ICON
|
||||||
bool "Icon"
|
bool "Icon"
|
||||||
depends on 44x
|
depends on 44x
|
||||||
default n
|
|
||||||
select PPC44x_SIMPLE
|
select PPC44x_SIMPLE
|
||||||
select 440SPe
|
select 440SPe
|
||||||
select PCI
|
select PCI
|
||||||
@@ -252,7 +233,6 @@ config ICON
|
|||||||
config XILINX_VIRTEX440_GENERIC_BOARD
|
config XILINX_VIRTEX440_GENERIC_BOARD
|
||||||
bool "Generic Xilinx Virtex 5 FXT board support"
|
bool "Generic Xilinx Virtex 5 FXT board support"
|
||||||
depends on 44x
|
depends on 44x
|
||||||
default n
|
|
||||||
select XILINX_VIRTEX_5_FXT
|
select XILINX_VIRTEX_5_FXT
|
||||||
select XILINX_INTC
|
select XILINX_INTC
|
||||||
help
|
help
|
||||||
@@ -280,7 +260,6 @@ config XILINX_ML510
|
|||||||
config PPC44x_SIMPLE
|
config PPC44x_SIMPLE
|
||||||
bool "Simple PowerPC 44x board support"
|
bool "Simple PowerPC 44x board support"
|
||||||
depends on 44x
|
depends on 44x
|
||||||
default n
|
|
||||||
help
|
help
|
||||||
This option enables the simple PowerPC 44x platform support.
|
This option enables the simple PowerPC 44x platform support.
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,6 @@ endif
|
|||||||
|
|
||||||
config PQ2ADS
|
config PQ2ADS
|
||||||
bool
|
bool
|
||||||
default n
|
|
||||||
|
|
||||||
config 8260
|
config 8260
|
||||||
bool
|
bool
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ source "arch/powerpc/platforms/amigaone/Kconfig"
|
|||||||
|
|
||||||
config KVM_GUEST
|
config KVM_GUEST
|
||||||
bool "KVM Guest support"
|
bool "KVM Guest support"
|
||||||
default n
|
|
||||||
select EPAPR_PARAVIRT
|
select EPAPR_PARAVIRT
|
||||||
---help---
|
---help---
|
||||||
This option enables various optimizations for running under the KVM
|
This option enables various optimizations for running under the KVM
|
||||||
@@ -34,7 +33,6 @@ config KVM_GUEST
|
|||||||
|
|
||||||
config EPAPR_PARAVIRT
|
config EPAPR_PARAVIRT
|
||||||
bool "ePAPR para-virtualization support"
|
bool "ePAPR para-virtualization support"
|
||||||
default n
|
|
||||||
help
|
help
|
||||||
Enables ePAPR para-virtualization support for guests.
|
Enables ePAPR para-virtualization support for guests.
|
||||||
|
|
||||||
@@ -74,7 +72,6 @@ config PPC_DT_CPU_FTRS
|
|||||||
config UDBG_RTAS_CONSOLE
|
config UDBG_RTAS_CONSOLE
|
||||||
bool "RTAS based debug console"
|
bool "RTAS based debug console"
|
||||||
depends on PPC_RTAS
|
depends on PPC_RTAS
|
||||||
default n
|
|
||||||
|
|
||||||
config PPC_SMP_MUXED_IPI
|
config PPC_SMP_MUXED_IPI
|
||||||
bool
|
bool
|
||||||
@@ -86,16 +83,13 @@ config PPC_SMP_MUXED_IPI
|
|||||||
|
|
||||||
config IPIC
|
config IPIC
|
||||||
bool
|
bool
|
||||||
default n
|
|
||||||
|
|
||||||
config MPIC
|
config MPIC
|
||||||
bool
|
bool
|
||||||
default n
|
|
||||||
|
|
||||||
config MPIC_TIMER
|
config MPIC_TIMER
|
||||||
bool "MPIC Global Timer"
|
bool "MPIC Global Timer"
|
||||||
depends on MPIC && FSL_SOC
|
depends on MPIC && FSL_SOC
|
||||||
default n
|
|
||||||
help
|
help
|
||||||
The MPIC global timer is a hardware timer inside the
|
The MPIC global timer is a hardware timer inside the
|
||||||
Freescale PIC complying with OpenPIC standard. When the
|
Freescale PIC complying with OpenPIC standard. When the
|
||||||
@@ -107,7 +101,6 @@ config MPIC_TIMER
|
|||||||
config FSL_MPIC_TIMER_WAKEUP
|
config FSL_MPIC_TIMER_WAKEUP
|
||||||
tristate "Freescale MPIC global timer wakeup driver"
|
tristate "Freescale MPIC global timer wakeup driver"
|
||||||
depends on FSL_SOC && MPIC_TIMER && PM
|
depends on FSL_SOC && MPIC_TIMER && PM
|
||||||
default n
|
|
||||||
help
|
help
|
||||||
The driver provides a way to wake up the system by MPIC
|
The driver provides a way to wake up the system by MPIC
|
||||||
timer.
|
timer.
|
||||||
@@ -115,43 +108,35 @@ config FSL_MPIC_TIMER_WAKEUP
|
|||||||
|
|
||||||
config PPC_EPAPR_HV_PIC
|
config PPC_EPAPR_HV_PIC
|
||||||
bool
|
bool
|
||||||
default n
|
|
||||||
select EPAPR_PARAVIRT
|
select EPAPR_PARAVIRT
|
||||||
|
|
||||||
config MPIC_WEIRD
|
config MPIC_WEIRD
|
||||||
bool
|
bool
|
||||||
default n
|
|
||||||
|
|
||||||
config MPIC_MSGR
|
config MPIC_MSGR
|
||||||
bool "MPIC message register support"
|
bool "MPIC message register support"
|
||||||
depends on MPIC
|
depends on MPIC
|
||||||
default n
|
|
||||||
help
|
help
|
||||||
Enables support for the MPIC message registers. These
|
Enables support for the MPIC message registers. These
|
||||||
registers are used for inter-processor communication.
|
registers are used for inter-processor communication.
|
||||||
|
|
||||||
config PPC_I8259
|
config PPC_I8259
|
||||||
bool
|
bool
|
||||||
default n
|
|
||||||
|
|
||||||
config U3_DART
|
config U3_DART
|
||||||
bool
|
bool
|
||||||
depends on PPC64
|
depends on PPC64
|
||||||
default n
|
|
||||||
|
|
||||||
config PPC_RTAS
|
config PPC_RTAS
|
||||||
bool
|
bool
|
||||||
default n
|
|
||||||
|
|
||||||
config RTAS_ERROR_LOGGING
|
config RTAS_ERROR_LOGGING
|
||||||
bool
|
bool
|
||||||
depends on PPC_RTAS
|
depends on PPC_RTAS
|
||||||
default n
|
|
||||||
|
|
||||||
config PPC_RTAS_DAEMON
|
config PPC_RTAS_DAEMON
|
||||||
bool
|
bool
|
||||||
depends on PPC_RTAS
|
depends on PPC_RTAS
|
||||||
default n
|
|
||||||
|
|
||||||
config RTAS_PROC
|
config RTAS_PROC
|
||||||
bool "Proc interface to RTAS"
|
bool "Proc interface to RTAS"
|
||||||
@@ -164,11 +149,9 @@ config RTAS_FLASH
|
|||||||
|
|
||||||
config MMIO_NVRAM
|
config MMIO_NVRAM
|
||||||
bool
|
bool
|
||||||
default n
|
|
||||||
|
|
||||||
config MPIC_U3_HT_IRQS
|
config MPIC_U3_HT_IRQS
|
||||||
bool
|
bool
|
||||||
default n
|
|
||||||
|
|
||||||
config MPIC_BROKEN_REGREAD
|
config MPIC_BROKEN_REGREAD
|
||||||
bool
|
bool
|
||||||
@@ -187,15 +170,12 @@ config EEH
|
|||||||
|
|
||||||
config PPC_MPC106
|
config PPC_MPC106
|
||||||
bool
|
bool
|
||||||
default n
|
|
||||||
|
|
||||||
config PPC_970_NAP
|
config PPC_970_NAP
|
||||||
bool
|
bool
|
||||||
default n
|
|
||||||
|
|
||||||
config PPC_P7_NAP
|
config PPC_P7_NAP
|
||||||
bool
|
bool
|
||||||
default n
|
|
||||||
|
|
||||||
config PPC_INDIRECT_PIO
|
config PPC_INDIRECT_PIO
|
||||||
bool
|
bool
|
||||||
@@ -289,7 +269,6 @@ config CPM2
|
|||||||
|
|
||||||
config FSL_ULI1575
|
config FSL_ULI1575
|
||||||
bool
|
bool
|
||||||
default n
|
|
||||||
select GENERIC_ISA_DMA
|
select GENERIC_ISA_DMA
|
||||||
help
|
help
|
||||||
Supports for the ULI1575 PCIe south bridge that exists on some
|
Supports for the ULI1575 PCIe south bridge that exists on some
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
config PPC64
|
config PPC64
|
||||||
bool "64-bit kernel"
|
bool "64-bit kernel"
|
||||||
default n
|
|
||||||
select ZLIB_DEFLATE
|
select ZLIB_DEFLATE
|
||||||
help
|
help
|
||||||
This option selects whether a 32-bit or a 64-bit kernel
|
This option selects whether a 32-bit or a 64-bit kernel
|
||||||
@@ -368,7 +367,6 @@ config PPC_MM_SLICES
|
|||||||
bool
|
bool
|
||||||
default y if PPC_BOOK3S_64
|
default y if PPC_BOOK3S_64
|
||||||
default y if PPC_8xx && HUGETLB_PAGE
|
default y if PPC_8xx && HUGETLB_PAGE
|
||||||
default n
|
|
||||||
|
|
||||||
config PPC_HAVE_PMU_SUPPORT
|
config PPC_HAVE_PMU_SUPPORT
|
||||||
bool
|
bool
|
||||||
@@ -382,7 +380,6 @@ config PPC_PERF_CTRS
|
|||||||
config FORCE_SMP
|
config FORCE_SMP
|
||||||
# Allow platforms to force SMP=y by selecting this
|
# Allow platforms to force SMP=y by selecting this
|
||||||
bool
|
bool
|
||||||
default n
|
|
||||||
select SMP
|
select SMP
|
||||||
|
|
||||||
config SMP
|
config SMP
|
||||||
@@ -423,7 +420,6 @@ config CHECK_CACHE_COHERENCY
|
|||||||
|
|
||||||
config PPC_DOORBELL
|
config PPC_DOORBELL
|
||||||
bool
|
bool
|
||||||
default n
|
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
config PPC_CELL
|
config PPC_CELL
|
||||||
bool
|
bool
|
||||||
default n
|
|
||||||
|
|
||||||
config PPC_CELL_COMMON
|
config PPC_CELL_COMMON
|
||||||
bool
|
bool
|
||||||
@@ -22,7 +21,6 @@ config PPC_CELL_NATIVE
|
|||||||
select IBM_EMAC_RGMII if IBM_EMAC
|
select IBM_EMAC_RGMII if IBM_EMAC
|
||||||
select IBM_EMAC_ZMII if IBM_EMAC #test only
|
select IBM_EMAC_ZMII if IBM_EMAC #test only
|
||||||
select IBM_EMAC_TAH if IBM_EMAC #test only
|
select IBM_EMAC_TAH if IBM_EMAC #test only
|
||||||
default n
|
|
||||||
|
|
||||||
config PPC_IBM_CELL_BLADE
|
config PPC_IBM_CELL_BLADE
|
||||||
bool "IBM Cell Blade"
|
bool "IBM Cell Blade"
|
||||||
@@ -55,7 +53,6 @@ config SPU_FS
|
|||||||
|
|
||||||
config SPU_BASE
|
config SPU_BASE
|
||||||
bool
|
bool
|
||||||
default n
|
|
||||||
select PPC_COPRO_BASE
|
select PPC_COPRO_BASE
|
||||||
|
|
||||||
config CBE_RAS
|
config CBE_RAS
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ config PPC_MAPLE
|
|||||||
select PPC_RTAS
|
select PPC_RTAS
|
||||||
select MMIO_NVRAM
|
select MMIO_NVRAM
|
||||||
select ATA_NONSTANDARD if ATA
|
select ATA_NONSTANDARD if ATA
|
||||||
default n
|
|
||||||
help
|
help
|
||||||
This option enables support for the Maple 970FX Evaluation Board.
|
This option enables support for the Maple 970FX Evaluation Board.
|
||||||
For more information, refer to <http://www.970eval.com>
|
For more information, refer to <http://www.970eval.com>
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
config PPC_PASEMI
|
config PPC_PASEMI
|
||||||
depends on PPC64 && PPC_BOOK3S && CPU_BIG_ENDIAN
|
depends on PPC64 && PPC_BOOK3S && CPU_BIG_ENDIAN
|
||||||
bool "PA Semi SoC-based platforms"
|
bool "PA Semi SoC-based platforms"
|
||||||
default n
|
|
||||||
select MPIC
|
select MPIC
|
||||||
select PCI
|
select PCI
|
||||||
select PPC_UDBG_16550
|
select PPC_UDBG_16550
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ config OPAL_PRD
|
|||||||
config PPC_MEMTRACE
|
config PPC_MEMTRACE
|
||||||
bool "Enable removal of RAM from kernel mappings for tracing"
|
bool "Enable removal of RAM from kernel mappings for tracing"
|
||||||
depends on PPC_POWERNV && MEMORY_HOTREMOVE
|
depends on PPC_POWERNV && MEMORY_HOTREMOVE
|
||||||
default n
|
|
||||||
help
|
help
|
||||||
Enabling this option allows for the removal of memory (RAM)
|
Enabling this option allows for the removal of memory (RAM)
|
||||||
from the kernel mappings to be used for hardware tracing.
|
from the kernel mappings to be used for hardware tracing.
|
||||||
|
|||||||
@@ -282,6 +282,8 @@ int __init opal_event_init(void)
|
|||||||
else
|
else
|
||||||
name = kasprintf(GFP_KERNEL, "opal");
|
name = kasprintf(GFP_KERNEL, "opal");
|
||||||
|
|
||||||
|
if (!name)
|
||||||
|
continue;
|
||||||
/* Install interrupt handler */
|
/* Install interrupt handler */
|
||||||
rc = request_irq(r->start, opal_interrupt, r->flags & IRQD_TRIGGER_MASK,
|
rc = request_irq(r->start, opal_interrupt, r->flags & IRQD_TRIGGER_MASK,
|
||||||
name, NULL);
|
name, NULL);
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ config PS3_HTAB_SIZE
|
|||||||
config PS3_DYNAMIC_DMA
|
config PS3_DYNAMIC_DMA
|
||||||
depends on PPC_PS3
|
depends on PPC_PS3
|
||||||
bool "PS3 Platform dynamic DMA page table management"
|
bool "PS3 Platform dynamic DMA page table management"
|
||||||
default n
|
|
||||||
help
|
help
|
||||||
This option will enable kernel support to take advantage of the
|
This option will enable kernel support to take advantage of the
|
||||||
per device dynamic DMA page table management provided by the Cell
|
per device dynamic DMA page table management provided by the Cell
|
||||||
@@ -89,7 +88,6 @@ config PS3_SYS_MANAGER
|
|||||||
config PS3_REPOSITORY_WRITE
|
config PS3_REPOSITORY_WRITE
|
||||||
bool "PS3 Repository write support" if PS3_ADVANCED
|
bool "PS3 Repository write support" if PS3_ADVANCED
|
||||||
depends on PPC_PS3
|
depends on PPC_PS3
|
||||||
default n
|
|
||||||
help
|
help
|
||||||
Enables support for writing to the PS3 System Repository.
|
Enables support for writing to the PS3 System Repository.
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ config PPC_PSERIES
|
|||||||
config PPC_SPLPAR
|
config PPC_SPLPAR
|
||||||
depends on PPC_PSERIES
|
depends on PPC_PSERIES
|
||||||
bool "Support for shared-processor logical partitions"
|
bool "Support for shared-processor logical partitions"
|
||||||
default n
|
|
||||||
help
|
help
|
||||||
Enabling this option will make the kernel run more efficiently
|
Enabling this option will make the kernel run more efficiently
|
||||||
on logically-partitioned pSeries systems which use shared
|
on logically-partitioned pSeries systems which use shared
|
||||||
@@ -99,7 +98,6 @@ config PPC_SMLPAR
|
|||||||
bool "Support for shared-memory logical partitions"
|
bool "Support for shared-memory logical partitions"
|
||||||
depends on PPC_PSERIES
|
depends on PPC_PSERIES
|
||||||
select LPARCFG
|
select LPARCFG
|
||||||
default n
|
|
||||||
help
|
help
|
||||||
Select this option to enable shared memory partition support.
|
Select this option to enable shared memory partition support.
|
||||||
With this option a system running in an LPAR can be given more
|
With this option a system running in an LPAR can be given more
|
||||||
|
|||||||
@@ -487,7 +487,7 @@ static int dlpar_memory_remove_by_index(u32 drc_index)
|
|||||||
int lmb_found;
|
int lmb_found;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
pr_info("Attempting to hot-remove LMB, drc index %x\n", drc_index);
|
pr_debug("Attempting to hot-remove LMB, drc index %x\n", drc_index);
|
||||||
|
|
||||||
lmb_found = 0;
|
lmb_found = 0;
|
||||||
for_each_drmem_lmb(lmb) {
|
for_each_drmem_lmb(lmb) {
|
||||||
@@ -501,14 +501,15 @@ static int dlpar_memory_remove_by_index(u32 drc_index)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!lmb_found)
|
if (!lmb_found) {
|
||||||
|
pr_debug("Failed to look up LMB for drc index %x\n", drc_index);
|
||||||
rc = -EINVAL;
|
rc = -EINVAL;
|
||||||
|
} else if (rc) {
|
||||||
if (rc)
|
pr_debug("Failed to hot-remove memory at %llx\n",
|
||||||
pr_info("Failed to hot-remove memory at %llx\n",
|
|
||||||
lmb->base_addr);
|
lmb->base_addr);
|
||||||
else
|
} else {
|
||||||
pr_info("Memory at %llx was hot-removed\n", lmb->base_addr);
|
pr_debug("Memory at %llx was hot-removed\n", lmb->base_addr);
|
||||||
|
}
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
@@ -761,7 +762,7 @@ static int dlpar_memory_add_by_count(u32 lmbs_to_add)
|
|||||||
if (!drmem_lmb_reserved(lmb))
|
if (!drmem_lmb_reserved(lmb))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
pr_info("Memory at %llx (drc index %x) was hot-added\n",
|
pr_debug("Memory at %llx (drc index %x) was hot-added\n",
|
||||||
lmb->base_addr, lmb->drc_index);
|
lmb->base_addr, lmb->drc_index);
|
||||||
drmem_remove_lmb_reservation(lmb);
|
drmem_remove_lmb_reservation(lmb);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,19 +6,16 @@
|
|||||||
config PPC4xx_PCI_EXPRESS
|
config PPC4xx_PCI_EXPRESS
|
||||||
bool
|
bool
|
||||||
depends on PCI && 4xx
|
depends on PCI && 4xx
|
||||||
default n
|
|
||||||
|
|
||||||
config PPC4xx_HSTA_MSI
|
config PPC4xx_HSTA_MSI
|
||||||
bool
|
bool
|
||||||
depends on PCI_MSI
|
depends on PCI_MSI
|
||||||
depends on PCI && 4xx
|
depends on PCI && 4xx
|
||||||
default n
|
|
||||||
|
|
||||||
config PPC4xx_MSI
|
config PPC4xx_MSI
|
||||||
bool
|
bool
|
||||||
depends on PCI_MSI
|
depends on PCI_MSI
|
||||||
depends on PCI && 4xx
|
depends on PCI && 4xx
|
||||||
default n
|
|
||||||
|
|
||||||
config PPC_MSI_BITMAP
|
config PPC_MSI_BITMAP
|
||||||
bool
|
bool
|
||||||
@@ -37,11 +34,9 @@ config PPC_SCOM
|
|||||||
config SCOM_DEBUGFS
|
config SCOM_DEBUGFS
|
||||||
bool "Expose SCOM controllers via debugfs"
|
bool "Expose SCOM controllers via debugfs"
|
||||||
depends on PPC_SCOM && DEBUG_FS
|
depends on PPC_SCOM && DEBUG_FS
|
||||||
default n
|
|
||||||
|
|
||||||
config GE_FPGA
|
config GE_FPGA
|
||||||
bool
|
bool
|
||||||
default n
|
|
||||||
|
|
||||||
config FSL_CORENET_RCPM
|
config FSL_CORENET_RCPM
|
||||||
bool
|
bool
|
||||||
|
|||||||
@@ -1,17 +1,14 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
config PPC_XIVE
|
config PPC_XIVE
|
||||||
bool
|
bool
|
||||||
default n
|
|
||||||
select PPC_SMP_MUXED_IPI
|
select PPC_SMP_MUXED_IPI
|
||||||
select HARDIRQS_SW_RESEND
|
select HARDIRQS_SW_RESEND
|
||||||
|
|
||||||
config PPC_XIVE_NATIVE
|
config PPC_XIVE_NATIVE
|
||||||
bool
|
bool
|
||||||
default n
|
|
||||||
select PPC_XIVE
|
select PPC_XIVE
|
||||||
depends on PPC_POWERNV
|
depends on PPC_POWERNV
|
||||||
|
|
||||||
config PPC_XIVE_SPAPR
|
config PPC_XIVE_SPAPR
|
||||||
bool
|
bool
|
||||||
default n
|
|
||||||
select PPC_XIVE
|
select PPC_XIVE
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
int num_digits(int val)
|
int num_digits(int val)
|
||||||
{
|
{
|
||||||
int m = 10;
|
long long m = 10;
|
||||||
int d = 1;
|
int d = 1;
|
||||||
|
|
||||||
if (val < 0) {
|
if (val < 0) {
|
||||||
|
|||||||
33
block/bio.c
33
block/bio.c
@@ -1672,13 +1672,33 @@ void bio_check_pages_dirty(struct bio *bio)
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(bio_check_pages_dirty);
|
EXPORT_SYMBOL_GPL(bio_check_pages_dirty);
|
||||||
|
|
||||||
|
void update_io_ticks(struct hd_struct *part, unsigned long now)
|
||||||
|
{
|
||||||
|
unsigned long stamp;
|
||||||
|
int cpu;
|
||||||
|
again:
|
||||||
|
stamp = READ_ONCE(part->stamp);
|
||||||
|
if (unlikely(stamp != now)) {
|
||||||
|
if (likely(cmpxchg(&part->stamp, stamp, now) == stamp)) {
|
||||||
|
cpu = part_stat_lock();
|
||||||
|
__part_stat_add(cpu, part, io_ticks, 1);
|
||||||
|
part_stat_unlock();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (part->partno) {
|
||||||
|
part = &part_to_disk(part)->part0;
|
||||||
|
goto again;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void generic_start_io_acct(struct request_queue *q, int op,
|
void generic_start_io_acct(struct request_queue *q, int op,
|
||||||
unsigned long sectors, struct hd_struct *part)
|
unsigned long sectors, struct hd_struct *part)
|
||||||
{
|
{
|
||||||
const int sgrp = op_stat_group(op);
|
const int sgrp = op_stat_group(op);
|
||||||
int cpu = part_stat_lock();
|
int cpu;
|
||||||
|
|
||||||
part_round_stats(q, cpu, part);
|
cpu = part_stat_lock();
|
||||||
|
update_io_ticks(part, jiffies);
|
||||||
part_stat_inc(cpu, part, ios[sgrp]);
|
part_stat_inc(cpu, part, ios[sgrp]);
|
||||||
part_stat_add(cpu, part, sectors[sgrp], sectors);
|
part_stat_add(cpu, part, sectors[sgrp], sectors);
|
||||||
part_inc_in_flight(q, part, op_is_write(op));
|
part_inc_in_flight(q, part, op_is_write(op));
|
||||||
@@ -1690,12 +1710,15 @@ EXPORT_SYMBOL(generic_start_io_acct);
|
|||||||
void generic_end_io_acct(struct request_queue *q, int req_op,
|
void generic_end_io_acct(struct request_queue *q, int req_op,
|
||||||
struct hd_struct *part, unsigned long start_time)
|
struct hd_struct *part, unsigned long start_time)
|
||||||
{
|
{
|
||||||
unsigned long duration = jiffies - start_time;
|
unsigned long now = jiffies;
|
||||||
|
unsigned long duration = now - start_time;
|
||||||
const int sgrp = op_stat_group(req_op);
|
const int sgrp = op_stat_group(req_op);
|
||||||
int cpu = part_stat_lock();
|
int cpu;
|
||||||
|
|
||||||
|
cpu = part_stat_lock();
|
||||||
|
update_io_ticks(part, now);
|
||||||
part_stat_add(cpu, part, nsecs[sgrp], jiffies_to_nsecs(duration));
|
part_stat_add(cpu, part, nsecs[sgrp], jiffies_to_nsecs(duration));
|
||||||
part_round_stats(q, cpu, part);
|
part_stat_add(cpu, part, time_in_queue, duration);
|
||||||
part_dec_in_flight(q, part, op_is_write(req_op));
|
part_dec_in_flight(q, part, op_is_write(req_op));
|
||||||
|
|
||||||
part_stat_unlock();
|
part_stat_unlock();
|
||||||
|
|||||||
@@ -1681,63 +1681,6 @@ static void add_acct_request(struct request_queue *q, struct request *rq,
|
|||||||
__elv_add_request(q, rq, where);
|
__elv_add_request(q, rq, where);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void part_round_stats_single(struct request_queue *q, int cpu,
|
|
||||||
struct hd_struct *part, unsigned long now,
|
|
||||||
unsigned int inflight)
|
|
||||||
{
|
|
||||||
if (inflight) {
|
|
||||||
__part_stat_add(cpu, part, time_in_queue,
|
|
||||||
inflight * (now - part->stamp));
|
|
||||||
__part_stat_add(cpu, part, io_ticks, (now - part->stamp));
|
|
||||||
}
|
|
||||||
part->stamp = now;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* part_round_stats() - Round off the performance stats on a struct disk_stats.
|
|
||||||
* @q: target block queue
|
|
||||||
* @cpu: cpu number for stats access
|
|
||||||
* @part: target partition
|
|
||||||
*
|
|
||||||
* The average IO queue length and utilisation statistics are maintained
|
|
||||||
* by observing the current state of the queue length and the amount of
|
|
||||||
* time it has been in this state for.
|
|
||||||
*
|
|
||||||
* Normally, that accounting is done on IO completion, but that can result
|
|
||||||
* in more than a second's worth of IO being accounted for within any one
|
|
||||||
* second, leading to >100% utilisation. To deal with that, we call this
|
|
||||||
* function to do a round-off before returning the results when reading
|
|
||||||
* /proc/diskstats. This accounts immediately for all queue usage up to
|
|
||||||
* the current jiffies and restarts the counters again.
|
|
||||||
*/
|
|
||||||
void part_round_stats(struct request_queue *q, int cpu, struct hd_struct *part)
|
|
||||||
{
|
|
||||||
struct hd_struct *part2 = NULL;
|
|
||||||
unsigned long now = jiffies;
|
|
||||||
unsigned int inflight[2];
|
|
||||||
int stats = 0;
|
|
||||||
|
|
||||||
if (part->stamp != now)
|
|
||||||
stats |= 1;
|
|
||||||
|
|
||||||
if (part->partno) {
|
|
||||||
part2 = &part_to_disk(part)->part0;
|
|
||||||
if (part2->stamp != now)
|
|
||||||
stats |= 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!stats)
|
|
||||||
return;
|
|
||||||
|
|
||||||
part_in_flight(q, part, inflight);
|
|
||||||
|
|
||||||
if (stats & 2)
|
|
||||||
part_round_stats_single(q, cpu, part2, now, inflight[1]);
|
|
||||||
if (stats & 1)
|
|
||||||
part_round_stats_single(q, cpu, part, now, inflight[0]);
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL_GPL(part_round_stats);
|
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
static void blk_pm_put_request(struct request *rq)
|
static void blk_pm_put_request(struct request *rq)
|
||||||
{
|
{
|
||||||
@@ -2775,9 +2718,10 @@ void blk_account_io_done(struct request *req, u64 now)
|
|||||||
cpu = part_stat_lock();
|
cpu = part_stat_lock();
|
||||||
part = req->part;
|
part = req->part;
|
||||||
|
|
||||||
|
update_io_ticks(part, jiffies);
|
||||||
part_stat_inc(cpu, part, ios[sgrp]);
|
part_stat_inc(cpu, part, ios[sgrp]);
|
||||||
part_stat_add(cpu, part, nsecs[sgrp], now - req->start_time_ns);
|
part_stat_add(cpu, part, nsecs[sgrp], now - req->start_time_ns);
|
||||||
part_round_stats(req->q, cpu, part);
|
part_stat_add(cpu, part, time_in_queue, nsecs_to_jiffies64(now - req->start_time_ns));
|
||||||
part_dec_in_flight(req->q, part, rq_data_dir(req));
|
part_dec_in_flight(req->q, part, rq_data_dir(req));
|
||||||
|
|
||||||
hd_struct_put(part);
|
hd_struct_put(part);
|
||||||
@@ -2837,11 +2781,12 @@ void blk_account_io_start(struct request *rq, bool new_io)
|
|||||||
part = &rq->rq_disk->part0;
|
part = &rq->rq_disk->part0;
|
||||||
hd_struct_get(part);
|
hd_struct_get(part);
|
||||||
}
|
}
|
||||||
part_round_stats(rq->q, cpu, part);
|
|
||||||
part_inc_in_flight(rq->q, part, rw);
|
part_inc_in_flight(rq->q, part, rw);
|
||||||
rq->part = part;
|
rq->part = part;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
update_io_ticks(part, jiffies);
|
||||||
|
|
||||||
part_stat_unlock();
|
part_stat_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -673,7 +673,6 @@ static void blk_account_io_merge(struct request *req)
|
|||||||
cpu = part_stat_lock();
|
cpu = part_stat_lock();
|
||||||
part = req->part;
|
part = req->part;
|
||||||
|
|
||||||
part_round_stats(req->q, cpu, part);
|
|
||||||
part_dec_in_flight(req->q, part, rq_data_dir(req));
|
part_dec_in_flight(req->q, part, rq_data_dir(req));
|
||||||
|
|
||||||
hd_struct_put(part);
|
hd_struct_put(part);
|
||||||
|
|||||||
@@ -1339,7 +1339,6 @@ static int diskstats_show(struct seq_file *seqf, void *v)
|
|||||||
struct hd_struct *hd;
|
struct hd_struct *hd;
|
||||||
char buf[BDEVNAME_SIZE];
|
char buf[BDEVNAME_SIZE];
|
||||||
unsigned int inflight[2];
|
unsigned int inflight[2];
|
||||||
int cpu;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if (&disk_to_dev(gp)->kobj.entry == block_class.devices.next)
|
if (&disk_to_dev(gp)->kobj.entry == block_class.devices.next)
|
||||||
@@ -1351,9 +1350,6 @@ static int diskstats_show(struct seq_file *seqf, void *v)
|
|||||||
|
|
||||||
disk_part_iter_init(&piter, gp, DISK_PITER_INCL_EMPTY_PART0);
|
disk_part_iter_init(&piter, gp, DISK_PITER_INCL_EMPTY_PART0);
|
||||||
while ((hd = disk_part_iter_next(&piter))) {
|
while ((hd = disk_part_iter_next(&piter))) {
|
||||||
cpu = part_stat_lock();
|
|
||||||
part_round_stats(gp->queue, cpu, hd);
|
|
||||||
part_stat_unlock();
|
|
||||||
part_in_flight(gp->queue, hd, inflight);
|
part_in_flight(gp->queue, hd, inflight);
|
||||||
seq_printf(seqf, "%4d %7d %s "
|
seq_printf(seqf, "%4d %7d %s "
|
||||||
"%lu %lu %lu %u "
|
"%lu %lu %lu %u "
|
||||||
|
|||||||
@@ -121,11 +121,7 @@ ssize_t part_stat_show(struct device *dev,
|
|||||||
struct hd_struct *p = dev_to_part(dev);
|
struct hd_struct *p = dev_to_part(dev);
|
||||||
struct request_queue *q = part_to_disk(p)->queue;
|
struct request_queue *q = part_to_disk(p)->queue;
|
||||||
unsigned int inflight[2];
|
unsigned int inflight[2];
|
||||||
int cpu;
|
|
||||||
|
|
||||||
cpu = part_stat_lock();
|
|
||||||
part_round_stats(q, cpu, p);
|
|
||||||
part_stat_unlock();
|
|
||||||
part_in_flight(q, p, inflight);
|
part_in_flight(q, p, inflight);
|
||||||
return sprintf(buf,
|
return sprintf(buf,
|
||||||
"%8lu %8lu %8llu %8u "
|
"%8lu %8lu %8llu %8u "
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ source "crypto/async_tx/Kconfig"
|
|||||||
#
|
#
|
||||||
menuconfig CRYPTO
|
menuconfig CRYPTO
|
||||||
tristate "Cryptographic API"
|
tristate "Cryptographic API"
|
||||||
|
select LIB_MEMNEQ
|
||||||
help
|
help
|
||||||
This option provides the core Cryptographic API.
|
This option provides the core Cryptographic API.
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
obj-$(CONFIG_CRYPTO) += crypto.o
|
obj-$(CONFIG_CRYPTO) += crypto.o
|
||||||
crypto-y := api.o cipher.o compress.o memneq.o
|
crypto-y := api.o cipher.o compress.o
|
||||||
|
|
||||||
obj-$(CONFIG_CRYPTO_WORKQUEUE) += crypto_wq.o
|
obj-$(CONFIG_CRYPTO_WORKQUEUE) += crypto_wq.o
|
||||||
|
|
||||||
|
|||||||
@@ -1032,9 +1032,13 @@ EXPORT_SYMBOL_GPL(af_alg_sendpage);
|
|||||||
void af_alg_free_resources(struct af_alg_async_req *areq)
|
void af_alg_free_resources(struct af_alg_async_req *areq)
|
||||||
{
|
{
|
||||||
struct sock *sk = areq->sk;
|
struct sock *sk = areq->sk;
|
||||||
|
struct af_alg_ctx *ctx;
|
||||||
|
|
||||||
af_alg_free_areq_sgls(areq);
|
af_alg_free_areq_sgls(areq);
|
||||||
sock_kfree_s(sk, areq, areq->areqlen);
|
sock_kfree_s(sk, areq, areq->areqlen);
|
||||||
|
|
||||||
|
ctx = alg_sk(sk)->private;
|
||||||
|
ctx->inflight = false;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(af_alg_free_resources);
|
EXPORT_SYMBOL_GPL(af_alg_free_resources);
|
||||||
|
|
||||||
@@ -1098,11 +1102,19 @@ EXPORT_SYMBOL_GPL(af_alg_poll);
|
|||||||
struct af_alg_async_req *af_alg_alloc_areq(struct sock *sk,
|
struct af_alg_async_req *af_alg_alloc_areq(struct sock *sk,
|
||||||
unsigned int areqlen)
|
unsigned int areqlen)
|
||||||
{
|
{
|
||||||
struct af_alg_async_req *areq = sock_kmalloc(sk, areqlen, GFP_KERNEL);
|
struct af_alg_ctx *ctx = alg_sk(sk)->private;
|
||||||
|
struct af_alg_async_req *areq;
|
||||||
|
|
||||||
|
/* Only one AIO request can be in flight. */
|
||||||
|
if (ctx->inflight)
|
||||||
|
return ERR_PTR(-EBUSY);
|
||||||
|
|
||||||
|
areq = sock_kmalloc(sk, areqlen, GFP_KERNEL);
|
||||||
if (unlikely(!areq))
|
if (unlikely(!areq))
|
||||||
return ERR_PTR(-ENOMEM);
|
return ERR_PTR(-ENOMEM);
|
||||||
|
|
||||||
|
ctx->inflight = true;
|
||||||
|
|
||||||
areq->areqlen = areqlen;
|
areq->areqlen = areqlen;
|
||||||
areq->sk = sk;
|
areq->sk = sk;
|
||||||
areq->last_rsgl = NULL;
|
areq->last_rsgl = NULL;
|
||||||
|
|||||||
@@ -29,9 +29,17 @@
|
|||||||
#include <crypto/internal/scompress.h>
|
#include <crypto/internal/scompress.h>
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
|
|
||||||
|
struct scomp_scratch {
|
||||||
|
spinlock_t lock;
|
||||||
|
void *src;
|
||||||
|
void *dst;
|
||||||
|
};
|
||||||
|
|
||||||
|
static DEFINE_PER_CPU(struct scomp_scratch, scomp_scratch) = {
|
||||||
|
.lock = __SPIN_LOCK_UNLOCKED(scomp_scratch.lock),
|
||||||
|
};
|
||||||
|
|
||||||
static const struct crypto_type crypto_scomp_type;
|
static const struct crypto_type crypto_scomp_type;
|
||||||
static void * __percpu *scomp_src_scratches;
|
|
||||||
static void * __percpu *scomp_dst_scratches;
|
|
||||||
static int scomp_scratch_users;
|
static int scomp_scratch_users;
|
||||||
static DEFINE_MUTEX(scomp_lock);
|
static DEFINE_MUTEX(scomp_lock);
|
||||||
|
|
||||||
@@ -65,76 +73,53 @@ static void crypto_scomp_show(struct seq_file *m, struct crypto_alg *alg)
|
|||||||
seq_puts(m, "type : scomp\n");
|
seq_puts(m, "type : scomp\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void crypto_scomp_free_scratches(void * __percpu *scratches)
|
static void crypto_scomp_free_scratches(void)
|
||||||
{
|
{
|
||||||
|
struct scomp_scratch *scratch;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!scratches)
|
|
||||||
return;
|
|
||||||
|
|
||||||
for_each_possible_cpu(i)
|
|
||||||
vfree(*per_cpu_ptr(scratches, i));
|
|
||||||
|
|
||||||
free_percpu(scratches);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void * __percpu *crypto_scomp_alloc_scratches(void)
|
|
||||||
{
|
|
||||||
void * __percpu *scratches;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
scratches = alloc_percpu(void *);
|
|
||||||
if (!scratches)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
for_each_possible_cpu(i) {
|
for_each_possible_cpu(i) {
|
||||||
void *scratch;
|
scratch = per_cpu_ptr(&scomp_scratch, i);
|
||||||
|
|
||||||
scratch = vmalloc_node(SCOMP_SCRATCH_SIZE, cpu_to_node(i));
|
vfree(scratch->src);
|
||||||
if (!scratch)
|
vfree(scratch->dst);
|
||||||
|
scratch->src = NULL;
|
||||||
|
scratch->dst = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static int crypto_scomp_alloc_scratches(void)
|
||||||
|
{
|
||||||
|
struct scomp_scratch *scratch;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for_each_possible_cpu(i) {
|
||||||
|
void *mem;
|
||||||
|
|
||||||
|
scratch = per_cpu_ptr(&scomp_scratch, i);
|
||||||
|
|
||||||
|
mem = vmalloc_node(SCOMP_SCRATCH_SIZE, cpu_to_node(i));
|
||||||
|
if (!mem)
|
||||||
goto error;
|
goto error;
|
||||||
*per_cpu_ptr(scratches, i) = scratch;
|
scratch->src = mem;
|
||||||
}
|
mem = vmalloc_node(SCOMP_SCRATCH_SIZE, cpu_to_node(i));
|
||||||
|
if (!mem)
|
||||||
return scratches;
|
goto error;
|
||||||
|
scratch->dst = mem;
|
||||||
error:
|
|
||||||
crypto_scomp_free_scratches(scratches);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void crypto_scomp_free_all_scratches(void)
|
|
||||||
{
|
|
||||||
if (!--scomp_scratch_users) {
|
|
||||||
crypto_scomp_free_scratches(scomp_src_scratches);
|
|
||||||
crypto_scomp_free_scratches(scomp_dst_scratches);
|
|
||||||
scomp_src_scratches = NULL;
|
|
||||||
scomp_dst_scratches = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static int crypto_scomp_alloc_all_scratches(void)
|
|
||||||
{
|
|
||||||
if (!scomp_scratch_users++) {
|
|
||||||
scomp_src_scratches = crypto_scomp_alloc_scratches();
|
|
||||||
if (!scomp_src_scratches)
|
|
||||||
return -ENOMEM;
|
|
||||||
scomp_dst_scratches = crypto_scomp_alloc_scratches();
|
|
||||||
if (!scomp_dst_scratches) {
|
|
||||||
crypto_scomp_free_scratches(scomp_src_scratches);
|
|
||||||
scomp_src_scratches = NULL;
|
|
||||||
return -ENOMEM;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
error:
|
||||||
|
crypto_scomp_free_scratches();
|
||||||
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int crypto_scomp_init_tfm(struct crypto_tfm *tfm)
|
static int crypto_scomp_init_tfm(struct crypto_tfm *tfm)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret = 0;
|
||||||
|
|
||||||
mutex_lock(&scomp_lock);
|
mutex_lock(&scomp_lock);
|
||||||
ret = crypto_scomp_alloc_all_scratches();
|
if (!scomp_scratch_users++)
|
||||||
|
ret = crypto_scomp_alloc_scratches();
|
||||||
mutex_unlock(&scomp_lock);
|
mutex_unlock(&scomp_lock);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@@ -146,42 +131,47 @@ static int scomp_acomp_comp_decomp(struct acomp_req *req, int dir)
|
|||||||
void **tfm_ctx = acomp_tfm_ctx(tfm);
|
void **tfm_ctx = acomp_tfm_ctx(tfm);
|
||||||
struct crypto_scomp *scomp = *tfm_ctx;
|
struct crypto_scomp *scomp = *tfm_ctx;
|
||||||
void **ctx = acomp_request_ctx(req);
|
void **ctx = acomp_request_ctx(req);
|
||||||
const int cpu = get_cpu();
|
struct scomp_scratch *scratch;
|
||||||
u8 *scratch_src = *per_cpu_ptr(scomp_src_scratches, cpu);
|
unsigned int dlen;
|
||||||
u8 *scratch_dst = *per_cpu_ptr(scomp_dst_scratches, cpu);
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!req->src || !req->slen || req->slen > SCOMP_SCRATCH_SIZE) {
|
if (!req->src || !req->slen || req->slen > SCOMP_SCRATCH_SIZE)
|
||||||
ret = -EINVAL;
|
return -EINVAL;
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (req->dst && !req->dlen) {
|
if (req->dst && !req->dlen)
|
||||||
ret = -EINVAL;
|
return -EINVAL;
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!req->dlen || req->dlen > SCOMP_SCRATCH_SIZE)
|
if (!req->dlen || req->dlen > SCOMP_SCRATCH_SIZE)
|
||||||
req->dlen = SCOMP_SCRATCH_SIZE;
|
req->dlen = SCOMP_SCRATCH_SIZE;
|
||||||
|
|
||||||
scatterwalk_map_and_copy(scratch_src, req->src, 0, req->slen, 0);
|
dlen = req->dlen;
|
||||||
|
|
||||||
|
scratch = raw_cpu_ptr(&scomp_scratch);
|
||||||
|
spin_lock(&scratch->lock);
|
||||||
|
|
||||||
|
scatterwalk_map_and_copy(scratch->src, req->src, 0, req->slen, 0);
|
||||||
if (dir)
|
if (dir)
|
||||||
ret = crypto_scomp_compress(scomp, scratch_src, req->slen,
|
ret = crypto_scomp_compress(scomp, scratch->src, req->slen,
|
||||||
scratch_dst, &req->dlen, *ctx);
|
scratch->dst, &req->dlen, *ctx);
|
||||||
else
|
else
|
||||||
ret = crypto_scomp_decompress(scomp, scratch_src, req->slen,
|
ret = crypto_scomp_decompress(scomp, scratch->src, req->slen,
|
||||||
scratch_dst, &req->dlen, *ctx);
|
scratch->dst, &req->dlen, *ctx);
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
if (!req->dst) {
|
if (!req->dst) {
|
||||||
req->dst = sgl_alloc(req->dlen, GFP_ATOMIC, NULL);
|
req->dst = sgl_alloc(req->dlen, GFP_ATOMIC, NULL);
|
||||||
if (!req->dst)
|
if (!req->dst) {
|
||||||
|
ret = -ENOMEM;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
scatterwalk_map_and_copy(scratch_dst, req->dst, 0, req->dlen,
|
} else if (req->dlen > dlen) {
|
||||||
|
ret = -ENOSPC;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
scatterwalk_map_and_copy(scratch->dst, req->dst, 0, req->dlen,
|
||||||
1);
|
1);
|
||||||
}
|
}
|
||||||
out:
|
out:
|
||||||
put_cpu();
|
spin_unlock(&scratch->lock);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -202,7 +192,8 @@ static void crypto_exit_scomp_ops_async(struct crypto_tfm *tfm)
|
|||||||
crypto_free_scomp(*ctx);
|
crypto_free_scomp(*ctx);
|
||||||
|
|
||||||
mutex_lock(&scomp_lock);
|
mutex_lock(&scomp_lock);
|
||||||
crypto_scomp_free_all_scratches();
|
if (!--scomp_scratch_users)
|
||||||
|
crypto_scomp_free_scratches();
|
||||||
mutex_unlock(&scomp_lock);
|
mutex_unlock(&scomp_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ static void lpit_update_residency(struct lpit_residency_info *info,
|
|||||||
struct acpi_lpit_native *lpit_native)
|
struct acpi_lpit_native *lpit_native)
|
||||||
{
|
{
|
||||||
info->frequency = lpit_native->counter_frequency ?
|
info->frequency = lpit_native->counter_frequency ?
|
||||||
lpit_native->counter_frequency : tsc_khz * 1000;
|
lpit_native->counter_frequency : mul_u32_u32(tsc_khz, 1000U);
|
||||||
if (!info->frequency)
|
if (!info->frequency)
|
||||||
info->frequency = 1;
|
info->frequency = 1;
|
||||||
|
|
||||||
|
|||||||
@@ -1797,13 +1797,13 @@ static void acpi_video_dev_register_backlight(struct acpi_video_device *device)
|
|||||||
return;
|
return;
|
||||||
count++;
|
count++;
|
||||||
|
|
||||||
acpi_get_parent(device->dev->handle, &acpi_parent);
|
if (ACPI_SUCCESS(acpi_get_parent(device->dev->handle, &acpi_parent))) {
|
||||||
|
|
||||||
pdev = acpi_get_pci_dev(acpi_parent);
|
pdev = acpi_get_pci_dev(acpi_parent);
|
||||||
if (pdev) {
|
if (pdev) {
|
||||||
parent = &pdev->dev;
|
parent = &pdev->dev;
|
||||||
pci_dev_put(pdev);
|
pci_dev_put(pdev);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
memset(&props, 0, sizeof(struct backlight_properties));
|
memset(&props, 0, sizeof(struct backlight_properties));
|
||||||
props.type = BACKLIGHT_FIRMWARE;
|
props.type = BACKLIGHT_FIRMWARE;
|
||||||
|
|||||||
@@ -566,6 +566,7 @@ acpi_fwnode_get_named_child_node(const struct fwnode_handle *fwnode,
|
|||||||
* @index: Index of the reference to return
|
* @index: Index of the reference to return
|
||||||
* @num_args: Maximum number of arguments after each reference
|
* @num_args: Maximum number of arguments after each reference
|
||||||
* @args: Location to store the returned reference with optional arguments
|
* @args: Location to store the returned reference with optional arguments
|
||||||
|
* (may be NULL)
|
||||||
*
|
*
|
||||||
* Find property with @name, verifify that it is a package containing at least
|
* Find property with @name, verifify that it is a package containing at least
|
||||||
* one object reference and if so, store the ACPI device object pointer to the
|
* one object reference and if so, store the ACPI device object pointer to the
|
||||||
@@ -624,6 +625,9 @@ int __acpi_node_get_property_reference(const struct fwnode_handle *fwnode,
|
|||||||
if (ret)
|
if (ret)
|
||||||
return ret == -ENODEV ? -EINVAL : ret;
|
return ret == -ENODEV ? -EINVAL : ret;
|
||||||
|
|
||||||
|
if (!args)
|
||||||
|
return 0;
|
||||||
|
|
||||||
args->fwnode = acpi_fwnode_handle(device);
|
args->fwnode = acpi_fwnode_handle(device);
|
||||||
args->nargs = 0;
|
args->nargs = 0;
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -4801,7 +4801,7 @@ static __poll_t binder_poll(struct file *filp,
|
|||||||
|
|
||||||
thread = binder_get_thread(proc);
|
thread = binder_get_thread(proc);
|
||||||
if (!thread)
|
if (!thread)
|
||||||
return POLLERR;
|
return EPOLLERR;
|
||||||
|
|
||||||
binder_inner_proc_lock(thread->proc);
|
binder_inner_proc_lock(thread->proc);
|
||||||
thread->looper |= BINDER_LOOPER_STATE_POLL;
|
thread->looper |= BINDER_LOOPER_STATE_POLL;
|
||||||
|
|||||||
@@ -280,7 +280,7 @@ static int binder_update_page_range(struct binder_alloc *alloc, int allocate,
|
|||||||
}
|
}
|
||||||
if (mm) {
|
if (mm) {
|
||||||
up_read(&mm->mmap_sem);
|
up_read(&mm->mmap_sem);
|
||||||
mmput(mm);
|
mmput_async(mm);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@@ -313,7 +313,7 @@ static int binder_update_page_range(struct binder_alloc *alloc, int allocate,
|
|||||||
err_no_vma:
|
err_no_vma:
|
||||||
if (mm) {
|
if (mm) {
|
||||||
up_read(&mm->mmap_sem);
|
up_read(&mm->mmap_sem);
|
||||||
mmput(mm);
|
mmput_async(mm);
|
||||||
}
|
}
|
||||||
return vma ? -ENOMEM : -ESRCH;
|
return vma ? -ENOMEM : -ESRCH;
|
||||||
}
|
}
|
||||||
@@ -424,17 +424,17 @@ static struct binder_buffer *binder_alloc_new_buf_locked(
|
|||||||
alloc->pid, extra_buffers_size);
|
alloc->pid, extra_buffers_size);
|
||||||
return ERR_PTR(-EINVAL);
|
return ERR_PTR(-EINVAL);
|
||||||
}
|
}
|
||||||
if (is_async &&
|
|
||||||
alloc->free_async_space < size + sizeof(struct binder_buffer)) {
|
/* Pad 0-size buffers so they get assigned unique addresses */
|
||||||
|
size = max(size, sizeof(void *));
|
||||||
|
|
||||||
|
if (is_async && alloc->free_async_space < size) {
|
||||||
binder_alloc_debug(BINDER_DEBUG_BUFFER_ALLOC,
|
binder_alloc_debug(BINDER_DEBUG_BUFFER_ALLOC,
|
||||||
"%d: binder_alloc_buf size %zd failed, no async space left\n",
|
"%d: binder_alloc_buf size %zd failed, no async space left\n",
|
||||||
alloc->pid, size);
|
alloc->pid, size);
|
||||||
return ERR_PTR(-ENOSPC);
|
return ERR_PTR(-ENOSPC);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Pad 0-size buffers so they get assigned unique addresses */
|
|
||||||
size = max(size, sizeof(void *));
|
|
||||||
|
|
||||||
while (n) {
|
while (n) {
|
||||||
buffer = rb_entry(n, struct binder_buffer, rb_node);
|
buffer = rb_entry(n, struct binder_buffer, rb_node);
|
||||||
BUG_ON(!buffer->free);
|
BUG_ON(!buffer->free);
|
||||||
@@ -535,7 +535,7 @@ static struct binder_buffer *binder_alloc_new_buf_locked(
|
|||||||
buffer->extra_buffers_size = extra_buffers_size;
|
buffer->extra_buffers_size = extra_buffers_size;
|
||||||
buffer->pid = pid;
|
buffer->pid = pid;
|
||||||
if (is_async) {
|
if (is_async) {
|
||||||
alloc->free_async_space -= size + sizeof(struct binder_buffer);
|
alloc->free_async_space -= size;
|
||||||
binder_alloc_debug(BINDER_DEBUG_BUFFER_ALLOC_ASYNC,
|
binder_alloc_debug(BINDER_DEBUG_BUFFER_ALLOC_ASYNC,
|
||||||
"%d: binder_alloc_buf size %zd async free %zd\n",
|
"%d: binder_alloc_buf size %zd async free %zd\n",
|
||||||
alloc->pid, size, alloc->free_async_space);
|
alloc->pid, size, alloc->free_async_space);
|
||||||
@@ -571,7 +571,7 @@ static struct binder_buffer *binder_alloc_new_buf_locked(
|
|||||||
* is the sum of the three given sizes (each rounded up to
|
* is the sum of the three given sizes (each rounded up to
|
||||||
* pointer-sized boundary)
|
* pointer-sized boundary)
|
||||||
*
|
*
|
||||||
* Return: The allocated buffer or %NULL if error
|
* Return: The allocated buffer or %ERR_PTR(-errno) if error
|
||||||
*/
|
*/
|
||||||
struct binder_buffer *binder_alloc_new_buf(struct binder_alloc *alloc,
|
struct binder_buffer *binder_alloc_new_buf(struct binder_alloc *alloc,
|
||||||
size_t data_size,
|
size_t data_size,
|
||||||
@@ -670,8 +670,7 @@ static void binder_free_buf_locked(struct binder_alloc *alloc,
|
|||||||
BUG_ON(buffer->user_data > alloc->buffer + alloc->buffer_size);
|
BUG_ON(buffer->user_data > alloc->buffer + alloc->buffer_size);
|
||||||
|
|
||||||
if (buffer->async_transaction) {
|
if (buffer->async_transaction) {
|
||||||
alloc->free_async_space += buffer_size + sizeof(struct binder_buffer);
|
alloc->free_async_space += buffer_size;
|
||||||
|
|
||||||
binder_alloc_debug(BINDER_DEBUG_BUFFER_ALLOC_ASYNC,
|
binder_alloc_debug(BINDER_DEBUG_BUFFER_ALLOC_ASYNC,
|
||||||
"%d: binder_free_buf size %zd async free %zd\n",
|
"%d: binder_free_buf size %zd async free %zd\n",
|
||||||
alloc->pid, size, alloc->free_async_space);
|
alloc->pid, size, alloc->free_async_space);
|
||||||
|
|||||||
@@ -317,7 +317,7 @@ mtk_stp_split(struct btmtkuart_dev *bdev, const unsigned char *data, int count,
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int btmtkuart_recv(struct hci_dev *hdev, const u8 *data, size_t count)
|
static void btmtkuart_recv(struct hci_dev *hdev, const u8 *data, size_t count)
|
||||||
{
|
{
|
||||||
struct btmtkuart_dev *bdev = hci_get_drvdata(hdev);
|
struct btmtkuart_dev *bdev = hci_get_drvdata(hdev);
|
||||||
const unsigned char *p_left = data, *p_h4;
|
const unsigned char *p_left = data, *p_h4;
|
||||||
@@ -356,25 +356,20 @@ static int btmtkuart_recv(struct hci_dev *hdev, const u8 *data, size_t count)
|
|||||||
bt_dev_err(bdev->hdev,
|
bt_dev_err(bdev->hdev,
|
||||||
"Frame reassembly failed (%d)", err);
|
"Frame reassembly failed (%d)", err);
|
||||||
bdev->rx_skb = NULL;
|
bdev->rx_skb = NULL;
|
||||||
return err;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sz_left -= sz_h4;
|
sz_left -= sz_h4;
|
||||||
p_left += sz_h4;
|
p_left += sz_h4;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int btmtkuart_receive_buf(struct serdev_device *serdev, const u8 *data,
|
static int btmtkuart_receive_buf(struct serdev_device *serdev, const u8 *data,
|
||||||
size_t count)
|
size_t count)
|
||||||
{
|
{
|
||||||
struct btmtkuart_dev *bdev = serdev_device_get_drvdata(serdev);
|
struct btmtkuart_dev *bdev = serdev_device_get_drvdata(serdev);
|
||||||
int err;
|
|
||||||
|
|
||||||
err = btmtkuart_recv(bdev->hdev, data, count);
|
btmtkuart_recv(bdev->hdev, data, count);
|
||||||
if (err < 0)
|
|
||||||
return err;
|
|
||||||
|
|
||||||
bdev->hdev->stat.byte_rx += count;
|
bdev->hdev->stat.byte_rx += count;
|
||||||
|
|
||||||
|
|||||||
@@ -497,7 +497,7 @@ static struct rockchip_clk_branch common_clk_branches[] __initdata = {
|
|||||||
GATE(HCLK_I2S_2CH, "hclk_i2s_2ch", "hclk_peri", 0, RK2928_CLKGATE_CON(7), 2, GFLAGS),
|
GATE(HCLK_I2S_2CH, "hclk_i2s_2ch", "hclk_peri", 0, RK2928_CLKGATE_CON(7), 2, GFLAGS),
|
||||||
GATE(0, "hclk_usb_peri", "hclk_peri", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(9), 13, GFLAGS),
|
GATE(0, "hclk_usb_peri", "hclk_peri", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(9), 13, GFLAGS),
|
||||||
GATE(HCLK_HOST2, "hclk_host2", "hclk_peri", 0, RK2928_CLKGATE_CON(7), 3, GFLAGS),
|
GATE(HCLK_HOST2, "hclk_host2", "hclk_peri", 0, RK2928_CLKGATE_CON(7), 3, GFLAGS),
|
||||||
GATE(HCLK_OTG, "hclk_otg", "hclk_peri", 0, RK2928_CLKGATE_CON(3), 13, GFLAGS),
|
GATE(HCLK_OTG, "hclk_otg", "hclk_peri", 0, RK2928_CLKGATE_CON(5), 13, GFLAGS),
|
||||||
GATE(0, "hclk_peri_ahb", "hclk_peri", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(9), 14, GFLAGS),
|
GATE(0, "hclk_peri_ahb", "hclk_peri", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(9), 14, GFLAGS),
|
||||||
GATE(HCLK_SPDIF, "hclk_spdif", "hclk_peri", 0, RK2928_CLKGATE_CON(10), 9, GFLAGS),
|
GATE(HCLK_SPDIF, "hclk_spdif", "hclk_peri", 0, RK2928_CLKGATE_CON(10), 9, GFLAGS),
|
||||||
GATE(HCLK_TSP, "hclk_tsp", "hclk_peri", 0, RK2928_CLKGATE_CON(10), 12, GFLAGS),
|
GATE(HCLK_TSP, "hclk_tsp", "hclk_peri", 0, RK2928_CLKGATE_CON(10), 12, GFLAGS),
|
||||||
|
|||||||
@@ -183,8 +183,11 @@ static int ccp_init_dm_workarea(struct ccp_dm_workarea *wa,
|
|||||||
|
|
||||||
wa->dma.address = dma_map_single(wa->dev, wa->address, len,
|
wa->dma.address = dma_map_single(wa->dev, wa->address, len,
|
||||||
dir);
|
dir);
|
||||||
if (dma_mapping_error(wa->dev, wa->dma.address))
|
if (dma_mapping_error(wa->dev, wa->dma.address)) {
|
||||||
|
kfree(wa->address);
|
||||||
|
wa->address = NULL;
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
}
|
||||||
|
|
||||||
wa->dma.length = len;
|
wa->dma.length = len;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,6 @@
|
|||||||
#define FLAGS_MODE_MASK 0x000f
|
#define FLAGS_MODE_MASK 0x000f
|
||||||
#define FLAGS_ENCRYPT BIT(0)
|
#define FLAGS_ENCRYPT BIT(0)
|
||||||
#define FLAGS_CBC BIT(1)
|
#define FLAGS_CBC BIT(1)
|
||||||
#define FLAGS_NEW_KEY BIT(3)
|
|
||||||
|
|
||||||
#define SAHARA_HDR_BASE 0x00800000
|
#define SAHARA_HDR_BASE 0x00800000
|
||||||
#define SAHARA_HDR_SKHA_ALG_AES 0
|
#define SAHARA_HDR_SKHA_ALG_AES 0
|
||||||
@@ -144,8 +143,6 @@ struct sahara_hw_link {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct sahara_ctx {
|
struct sahara_ctx {
|
||||||
unsigned long flags;
|
|
||||||
|
|
||||||
/* AES-specific context */
|
/* AES-specific context */
|
||||||
int keylen;
|
int keylen;
|
||||||
u8 key[AES_KEYSIZE_128];
|
u8 key[AES_KEYSIZE_128];
|
||||||
@@ -448,11 +445,9 @@ static int sahara_hw_descriptor_create(struct sahara_dev *dev)
|
|||||||
int ret;
|
int ret;
|
||||||
int i, j;
|
int i, j;
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
|
u32 len;
|
||||||
|
|
||||||
/* Copy new key if necessary */
|
|
||||||
if (ctx->flags & FLAGS_NEW_KEY) {
|
|
||||||
memcpy(dev->key_base, ctx->key, ctx->keylen);
|
memcpy(dev->key_base, ctx->key, ctx->keylen);
|
||||||
ctx->flags &= ~FLAGS_NEW_KEY;
|
|
||||||
|
|
||||||
if (dev->flags & FLAGS_CBC) {
|
if (dev->flags & FLAGS_CBC) {
|
||||||
dev->hw_desc[idx]->len1 = AES_BLOCK_SIZE;
|
dev->hw_desc[idx]->len1 = AES_BLOCK_SIZE;
|
||||||
@@ -464,11 +459,10 @@ static int sahara_hw_descriptor_create(struct sahara_dev *dev)
|
|||||||
dev->hw_desc[idx]->len2 = ctx->keylen;
|
dev->hw_desc[idx]->len2 = ctx->keylen;
|
||||||
dev->hw_desc[idx]->p2 = dev->key_phys_base;
|
dev->hw_desc[idx]->p2 = dev->key_phys_base;
|
||||||
dev->hw_desc[idx]->next = dev->hw_phys_desc[1];
|
dev->hw_desc[idx]->next = dev->hw_phys_desc[1];
|
||||||
|
|
||||||
dev->hw_desc[idx]->hdr = sahara_aes_key_hdr(dev);
|
dev->hw_desc[idx]->hdr = sahara_aes_key_hdr(dev);
|
||||||
|
|
||||||
idx++;
|
idx++;
|
||||||
}
|
|
||||||
|
|
||||||
dev->nb_in_sg = sg_nents_for_len(dev->in_sg, dev->total);
|
dev->nb_in_sg = sg_nents_for_len(dev->in_sg, dev->total);
|
||||||
if (dev->nb_in_sg < 0) {
|
if (dev->nb_in_sg < 0) {
|
||||||
@@ -490,24 +484,27 @@ static int sahara_hw_descriptor_create(struct sahara_dev *dev)
|
|||||||
DMA_TO_DEVICE);
|
DMA_TO_DEVICE);
|
||||||
if (ret != dev->nb_in_sg) {
|
if (ret != dev->nb_in_sg) {
|
||||||
dev_err(dev->device, "couldn't map in sg\n");
|
dev_err(dev->device, "couldn't map in sg\n");
|
||||||
goto unmap_in;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = dma_map_sg(dev->device, dev->out_sg, dev->nb_out_sg,
|
ret = dma_map_sg(dev->device, dev->out_sg, dev->nb_out_sg,
|
||||||
DMA_FROM_DEVICE);
|
DMA_FROM_DEVICE);
|
||||||
if (ret != dev->nb_out_sg) {
|
if (ret != dev->nb_out_sg) {
|
||||||
dev_err(dev->device, "couldn't map out sg\n");
|
dev_err(dev->device, "couldn't map out sg\n");
|
||||||
goto unmap_out;
|
goto unmap_in;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create input links */
|
/* Create input links */
|
||||||
dev->hw_desc[idx]->p1 = dev->hw_phys_link[0];
|
dev->hw_desc[idx]->p1 = dev->hw_phys_link[0];
|
||||||
sg = dev->in_sg;
|
sg = dev->in_sg;
|
||||||
|
len = dev->total;
|
||||||
for (i = 0; i < dev->nb_in_sg; i++) {
|
for (i = 0; i < dev->nb_in_sg; i++) {
|
||||||
dev->hw_link[i]->len = sg->length;
|
dev->hw_link[i]->len = min(len, sg->length);
|
||||||
dev->hw_link[i]->p = sg->dma_address;
|
dev->hw_link[i]->p = sg->dma_address;
|
||||||
if (i == (dev->nb_in_sg - 1)) {
|
if (i == (dev->nb_in_sg - 1)) {
|
||||||
dev->hw_link[i]->next = 0;
|
dev->hw_link[i]->next = 0;
|
||||||
} else {
|
} else {
|
||||||
|
len -= min(len, sg->length);
|
||||||
dev->hw_link[i]->next = dev->hw_phys_link[i + 1];
|
dev->hw_link[i]->next = dev->hw_phys_link[i + 1];
|
||||||
sg = sg_next(sg);
|
sg = sg_next(sg);
|
||||||
}
|
}
|
||||||
@@ -516,12 +513,14 @@ static int sahara_hw_descriptor_create(struct sahara_dev *dev)
|
|||||||
/* Create output links */
|
/* Create output links */
|
||||||
dev->hw_desc[idx]->p2 = dev->hw_phys_link[i];
|
dev->hw_desc[idx]->p2 = dev->hw_phys_link[i];
|
||||||
sg = dev->out_sg;
|
sg = dev->out_sg;
|
||||||
|
len = dev->total;
|
||||||
for (j = i; j < dev->nb_out_sg + i; j++) {
|
for (j = i; j < dev->nb_out_sg + i; j++) {
|
||||||
dev->hw_link[j]->len = sg->length;
|
dev->hw_link[j]->len = min(len, sg->length);
|
||||||
dev->hw_link[j]->p = sg->dma_address;
|
dev->hw_link[j]->p = sg->dma_address;
|
||||||
if (j == (dev->nb_out_sg + i - 1)) {
|
if (j == (dev->nb_out_sg + i - 1)) {
|
||||||
dev->hw_link[j]->next = 0;
|
dev->hw_link[j]->next = 0;
|
||||||
} else {
|
} else {
|
||||||
|
len -= min(len, sg->length);
|
||||||
dev->hw_link[j]->next = dev->hw_phys_link[j + 1];
|
dev->hw_link[j]->next = dev->hw_phys_link[j + 1];
|
||||||
sg = sg_next(sg);
|
sg = sg_next(sg);
|
||||||
}
|
}
|
||||||
@@ -540,9 +539,6 @@ static int sahara_hw_descriptor_create(struct sahara_dev *dev)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
unmap_out:
|
|
||||||
dma_unmap_sg(dev->device, dev->out_sg, dev->nb_out_sg,
|
|
||||||
DMA_FROM_DEVICE);
|
|
||||||
unmap_in:
|
unmap_in:
|
||||||
dma_unmap_sg(dev->device, dev->in_sg, dev->nb_in_sg,
|
dma_unmap_sg(dev->device, dev->in_sg, dev->nb_in_sg,
|
||||||
DMA_TO_DEVICE);
|
DMA_TO_DEVICE);
|
||||||
@@ -587,16 +583,17 @@ static int sahara_aes_process(struct ablkcipher_request *req)
|
|||||||
|
|
||||||
timeout = wait_for_completion_timeout(&dev->dma_completion,
|
timeout = wait_for_completion_timeout(&dev->dma_completion,
|
||||||
msecs_to_jiffies(SAHARA_TIMEOUT_MS));
|
msecs_to_jiffies(SAHARA_TIMEOUT_MS));
|
||||||
if (!timeout) {
|
|
||||||
dev_err(dev->device, "AES timeout\n");
|
|
||||||
return -ETIMEDOUT;
|
|
||||||
}
|
|
||||||
|
|
||||||
dma_unmap_sg(dev->device, dev->out_sg, dev->nb_out_sg,
|
dma_unmap_sg(dev->device, dev->out_sg, dev->nb_out_sg,
|
||||||
DMA_FROM_DEVICE);
|
DMA_FROM_DEVICE);
|
||||||
dma_unmap_sg(dev->device, dev->in_sg, dev->nb_in_sg,
|
dma_unmap_sg(dev->device, dev->in_sg, dev->nb_in_sg,
|
||||||
DMA_TO_DEVICE);
|
DMA_TO_DEVICE);
|
||||||
|
|
||||||
|
if (!timeout) {
|
||||||
|
dev_err(dev->device, "AES timeout\n");
|
||||||
|
return -ETIMEDOUT;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -611,7 +608,6 @@ static int sahara_aes_setkey(struct crypto_ablkcipher *tfm, const u8 *key,
|
|||||||
/* SAHARA only supports 128bit keys */
|
/* SAHARA only supports 128bit keys */
|
||||||
if (keylen == AES_KEYSIZE_128) {
|
if (keylen == AES_KEYSIZE_128) {
|
||||||
memcpy(ctx->key, key, keylen);
|
memcpy(ctx->key, key, keylen);
|
||||||
ctx->flags |= FLAGS_NEW_KEY;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -800,6 +796,7 @@ static int sahara_sha_hw_links_create(struct sahara_dev *dev,
|
|||||||
int start)
|
int start)
|
||||||
{
|
{
|
||||||
struct scatterlist *sg;
|
struct scatterlist *sg;
|
||||||
|
unsigned int len;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@@ -821,12 +818,14 @@ static int sahara_sha_hw_links_create(struct sahara_dev *dev,
|
|||||||
if (!ret)
|
if (!ret)
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
|
len = rctx->total;
|
||||||
for (i = start; i < dev->nb_in_sg + start; i++) {
|
for (i = start; i < dev->nb_in_sg + start; i++) {
|
||||||
dev->hw_link[i]->len = sg->length;
|
dev->hw_link[i]->len = min(len, sg->length);
|
||||||
dev->hw_link[i]->p = sg->dma_address;
|
dev->hw_link[i]->p = sg->dma_address;
|
||||||
if (i == (dev->nb_in_sg + start - 1)) {
|
if (i == (dev->nb_in_sg + start - 1)) {
|
||||||
dev->hw_link[i]->next = 0;
|
dev->hw_link[i]->next = 0;
|
||||||
} else {
|
} else {
|
||||||
|
len -= min(len, sg->length);
|
||||||
dev->hw_link[i]->next = dev->hw_phys_link[i + 1];
|
dev->hw_link[i]->next = dev->hw_phys_link[i + 1];
|
||||||
sg = sg_next(sg);
|
sg = sg_next(sg);
|
||||||
}
|
}
|
||||||
@@ -907,24 +906,6 @@ static int sahara_sha_hw_context_descriptor_create(struct sahara_dev *dev,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sahara_walk_and_recalc(struct scatterlist *sg, unsigned int nbytes)
|
|
||||||
{
|
|
||||||
if (!sg || !sg->length)
|
|
||||||
return nbytes;
|
|
||||||
|
|
||||||
while (nbytes && sg) {
|
|
||||||
if (nbytes <= sg->length) {
|
|
||||||
sg->length = nbytes;
|
|
||||||
sg_mark_end(sg);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
nbytes -= sg->length;
|
|
||||||
sg = sg_next(sg);
|
|
||||||
}
|
|
||||||
|
|
||||||
return nbytes;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int sahara_sha_prepare_request(struct ahash_request *req)
|
static int sahara_sha_prepare_request(struct ahash_request *req)
|
||||||
{
|
{
|
||||||
struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
|
struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
|
||||||
@@ -961,36 +942,20 @@ static int sahara_sha_prepare_request(struct ahash_request *req)
|
|||||||
hash_later, 0);
|
hash_later, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* nbytes should now be multiple of blocksize */
|
rctx->total = len - hash_later;
|
||||||
req->nbytes = req->nbytes - hash_later;
|
|
||||||
|
|
||||||
sahara_walk_and_recalc(req->src, req->nbytes);
|
|
||||||
|
|
||||||
/* have data from previous operation and current */
|
/* have data from previous operation and current */
|
||||||
if (rctx->buf_cnt && req->nbytes) {
|
if (rctx->buf_cnt && req->nbytes) {
|
||||||
sg_init_table(rctx->in_sg_chain, 2);
|
sg_init_table(rctx->in_sg_chain, 2);
|
||||||
sg_set_buf(rctx->in_sg_chain, rctx->rembuf, rctx->buf_cnt);
|
sg_set_buf(rctx->in_sg_chain, rctx->rembuf, rctx->buf_cnt);
|
||||||
|
|
||||||
sg_chain(rctx->in_sg_chain, 2, req->src);
|
sg_chain(rctx->in_sg_chain, 2, req->src);
|
||||||
|
|
||||||
rctx->total = req->nbytes + rctx->buf_cnt;
|
|
||||||
rctx->in_sg = rctx->in_sg_chain;
|
rctx->in_sg = rctx->in_sg_chain;
|
||||||
|
|
||||||
req->src = rctx->in_sg_chain;
|
|
||||||
/* only data from previous operation */
|
/* only data from previous operation */
|
||||||
} else if (rctx->buf_cnt) {
|
} else if (rctx->buf_cnt) {
|
||||||
if (req->src)
|
|
||||||
rctx->in_sg = req->src;
|
|
||||||
else
|
|
||||||
rctx->in_sg = rctx->in_sg_chain;
|
rctx->in_sg = rctx->in_sg_chain;
|
||||||
/* buf was copied into rembuf above */
|
|
||||||
sg_init_one(rctx->in_sg, rctx->rembuf, rctx->buf_cnt);
|
sg_init_one(rctx->in_sg, rctx->rembuf, rctx->buf_cnt);
|
||||||
rctx->total = rctx->buf_cnt;
|
|
||||||
/* no data from previous operation */
|
/* no data from previous operation */
|
||||||
} else {
|
} else {
|
||||||
rctx->in_sg = req->src;
|
rctx->in_sg = req->src;
|
||||||
rctx->total = req->nbytes;
|
|
||||||
req->src = rctx->in_sg;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* on next call, we only have the remaining data in the buffer */
|
/* on next call, we only have the remaining data in the buffer */
|
||||||
@@ -1011,7 +976,10 @@ static int sahara_sha_process(struct ahash_request *req)
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if (rctx->first) {
|
if (rctx->first) {
|
||||||
sahara_sha_hw_data_descriptor_create(dev, rctx, req, 0);
|
ret = sahara_sha_hw_data_descriptor_create(dev, rctx, req, 0);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
dev->hw_desc[0]->next = 0;
|
dev->hw_desc[0]->next = 0;
|
||||||
rctx->first = 0;
|
rctx->first = 0;
|
||||||
} else {
|
} else {
|
||||||
@@ -1019,7 +987,10 @@ static int sahara_sha_process(struct ahash_request *req)
|
|||||||
|
|
||||||
sahara_sha_hw_context_descriptor_create(dev, rctx, req, 0);
|
sahara_sha_hw_context_descriptor_create(dev, rctx, req, 0);
|
||||||
dev->hw_desc[0]->next = dev->hw_phys_desc[1];
|
dev->hw_desc[0]->next = dev->hw_phys_desc[1];
|
||||||
sahara_sha_hw_data_descriptor_create(dev, rctx, req, 1);
|
ret = sahara_sha_hw_data_descriptor_create(dev, rctx, req, 1);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
dev->hw_desc[1]->next = 0;
|
dev->hw_desc[1]->next = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1032,18 +1003,19 @@ static int sahara_sha_process(struct ahash_request *req)
|
|||||||
|
|
||||||
timeout = wait_for_completion_timeout(&dev->dma_completion,
|
timeout = wait_for_completion_timeout(&dev->dma_completion,
|
||||||
msecs_to_jiffies(SAHARA_TIMEOUT_MS));
|
msecs_to_jiffies(SAHARA_TIMEOUT_MS));
|
||||||
if (!timeout) {
|
|
||||||
dev_err(dev->device, "SHA timeout\n");
|
|
||||||
return -ETIMEDOUT;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (rctx->sg_in_idx)
|
if (rctx->sg_in_idx)
|
||||||
dma_unmap_sg(dev->device, dev->in_sg, dev->nb_in_sg,
|
dma_unmap_sg(dev->device, dev->in_sg, dev->nb_in_sg,
|
||||||
DMA_TO_DEVICE);
|
DMA_TO_DEVICE);
|
||||||
|
|
||||||
|
if (!timeout) {
|
||||||
|
dev_err(dev->device, "SHA timeout\n");
|
||||||
|
return -ETIMEDOUT;
|
||||||
|
}
|
||||||
|
|
||||||
memcpy(rctx->context, dev->context_base, rctx->context_size);
|
memcpy(rctx->context, dev->context_base, rctx->context_size);
|
||||||
|
|
||||||
if (req->result)
|
if (req->result && rctx->last)
|
||||||
memcpy(req->result, rctx->context, rctx->digest_size);
|
memcpy(req->result, rctx->context, rctx->digest_size);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -1187,8 +1159,7 @@ static int sahara_sha_import(struct ahash_request *req, const void *in)
|
|||||||
static int sahara_sha_cra_init(struct crypto_tfm *tfm)
|
static int sahara_sha_cra_init(struct crypto_tfm *tfm)
|
||||||
{
|
{
|
||||||
crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm),
|
crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm),
|
||||||
sizeof(struct sahara_sha_reqctx) +
|
sizeof(struct sahara_sha_reqctx));
|
||||||
SHA_BUFFER_LEN + SHA256_BLOCK_SIZE);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
#include <linux/virtio.h>
|
#include <linux/virtio.h>
|
||||||
#include <linux/crypto.h>
|
#include <linux/crypto.h>
|
||||||
#include <linux/spinlock.h>
|
#include <linux/spinlock.h>
|
||||||
|
#include <linux/interrupt.h>
|
||||||
#include <crypto/aead.h>
|
#include <crypto/aead.h>
|
||||||
#include <crypto/aes.h>
|
#include <crypto/aes.h>
|
||||||
#include <crypto/engine.h>
|
#include <crypto/engine.h>
|
||||||
@@ -39,6 +40,7 @@ struct data_queue {
|
|||||||
char name[32];
|
char name[32];
|
||||||
|
|
||||||
struct crypto_engine *engine;
|
struct crypto_engine *engine;
|
||||||
|
struct tasklet_struct done_task;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct virtio_crypto {
|
struct virtio_crypto {
|
||||||
|
|||||||
@@ -34,27 +34,28 @@ virtcrypto_clear_request(struct virtio_crypto_request *vc_req)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void virtcrypto_dataq_callback(struct virtqueue *vq)
|
static void virtcrypto_done_task(unsigned long data)
|
||||||
{
|
{
|
||||||
struct virtio_crypto *vcrypto = vq->vdev->priv;
|
struct data_queue *data_vq = (struct data_queue *)data;
|
||||||
|
struct virtqueue *vq = data_vq->vq;
|
||||||
struct virtio_crypto_request *vc_req;
|
struct virtio_crypto_request *vc_req;
|
||||||
unsigned long flags;
|
|
||||||
unsigned int len;
|
unsigned int len;
|
||||||
unsigned int qid = vq->index;
|
|
||||||
|
|
||||||
spin_lock_irqsave(&vcrypto->data_vq[qid].lock, flags);
|
|
||||||
do {
|
do {
|
||||||
virtqueue_disable_cb(vq);
|
virtqueue_disable_cb(vq);
|
||||||
while ((vc_req = virtqueue_get_buf(vq, &len)) != NULL) {
|
while ((vc_req = virtqueue_get_buf(vq, &len)) != NULL) {
|
||||||
spin_unlock_irqrestore(
|
|
||||||
&vcrypto->data_vq[qid].lock, flags);
|
|
||||||
if (vc_req->alg_cb)
|
if (vc_req->alg_cb)
|
||||||
vc_req->alg_cb(vc_req, len);
|
vc_req->alg_cb(vc_req, len);
|
||||||
spin_lock_irqsave(
|
|
||||||
&vcrypto->data_vq[qid].lock, flags);
|
|
||||||
}
|
}
|
||||||
} while (!virtqueue_enable_cb(vq));
|
} while (!virtqueue_enable_cb(vq));
|
||||||
spin_unlock_irqrestore(&vcrypto->data_vq[qid].lock, flags);
|
}
|
||||||
|
|
||||||
|
static void virtcrypto_dataq_callback(struct virtqueue *vq)
|
||||||
|
{
|
||||||
|
struct virtio_crypto *vcrypto = vq->vdev->priv;
|
||||||
|
struct data_queue *dq = &vcrypto->data_vq[vq->index];
|
||||||
|
|
||||||
|
tasklet_schedule(&dq->done_task);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int virtcrypto_find_vqs(struct virtio_crypto *vi)
|
static int virtcrypto_find_vqs(struct virtio_crypto *vi)
|
||||||
@@ -111,6 +112,8 @@ static int virtcrypto_find_vqs(struct virtio_crypto *vi)
|
|||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto err_engine;
|
goto err_engine;
|
||||||
}
|
}
|
||||||
|
tasklet_init(&vi->data_vq[i].done_task, virtcrypto_done_task,
|
||||||
|
(unsigned long)&vi->data_vq[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
kfree(names);
|
kfree(names);
|
||||||
@@ -443,11 +446,14 @@ static void virtcrypto_free_unused_reqs(struct virtio_crypto *vcrypto)
|
|||||||
static void virtcrypto_remove(struct virtio_device *vdev)
|
static void virtcrypto_remove(struct virtio_device *vdev)
|
||||||
{
|
{
|
||||||
struct virtio_crypto *vcrypto = vdev->priv;
|
struct virtio_crypto *vcrypto = vdev->priv;
|
||||||
|
int i;
|
||||||
|
|
||||||
dev_info(&vdev->dev, "Start virtcrypto_remove.\n");
|
dev_info(&vdev->dev, "Start virtcrypto_remove.\n");
|
||||||
|
|
||||||
if (virtcrypto_dev_started(vcrypto))
|
if (virtcrypto_dev_started(vcrypto))
|
||||||
virtcrypto_dev_stop(vcrypto);
|
virtcrypto_dev_stop(vcrypto);
|
||||||
|
for (i = 0; i < vcrypto->max_data_queues; i++)
|
||||||
|
tasklet_kill(&vcrypto->data_vq[i].done_task);
|
||||||
vdev->config->reset(vdev);
|
vdev->config->reset(vdev);
|
||||||
virtcrypto_free_unused_reqs(vcrypto);
|
virtcrypto_free_unused_reqs(vcrypto);
|
||||||
virtcrypto_clear_crypto_engines(vcrypto);
|
virtcrypto_clear_crypto_engines(vcrypto);
|
||||||
|
|||||||
@@ -1133,7 +1133,7 @@ static irqreturn_t thunderx_ocx_com_threaded_isr(int irq, void *irq_id)
|
|||||||
decode_register(other, OCX_OTHER_SIZE,
|
decode_register(other, OCX_OTHER_SIZE,
|
||||||
ocx_com_errors, ctx->reg_com_int);
|
ocx_com_errors, ctx->reg_com_int);
|
||||||
|
|
||||||
strncat(msg, other, OCX_MESSAGE_SIZE);
|
strlcat(msg, other, OCX_MESSAGE_SIZE);
|
||||||
|
|
||||||
for (lane = 0; lane < OCX_RX_LANES; lane++)
|
for (lane = 0; lane < OCX_RX_LANES; lane++)
|
||||||
if (ctx->reg_com_int & BIT(lane)) {
|
if (ctx->reg_com_int & BIT(lane)) {
|
||||||
@@ -1142,12 +1142,12 @@ static irqreturn_t thunderx_ocx_com_threaded_isr(int irq, void *irq_id)
|
|||||||
lane, ctx->reg_lane_int[lane],
|
lane, ctx->reg_lane_int[lane],
|
||||||
lane, ctx->reg_lane_stat11[lane]);
|
lane, ctx->reg_lane_stat11[lane]);
|
||||||
|
|
||||||
strncat(msg, other, OCX_MESSAGE_SIZE);
|
strlcat(msg, other, OCX_MESSAGE_SIZE);
|
||||||
|
|
||||||
decode_register(other, OCX_OTHER_SIZE,
|
decode_register(other, OCX_OTHER_SIZE,
|
||||||
ocx_lane_errors,
|
ocx_lane_errors,
|
||||||
ctx->reg_lane_int[lane]);
|
ctx->reg_lane_int[lane]);
|
||||||
strncat(msg, other, OCX_MESSAGE_SIZE);
|
strlcat(msg, other, OCX_MESSAGE_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctx->reg_com_int & OCX_COM_INT_CE)
|
if (ctx->reg_com_int & OCX_COM_INT_CE)
|
||||||
@@ -1217,7 +1217,7 @@ static irqreturn_t thunderx_ocx_lnk_threaded_isr(int irq, void *irq_id)
|
|||||||
decode_register(other, OCX_OTHER_SIZE,
|
decode_register(other, OCX_OTHER_SIZE,
|
||||||
ocx_com_link_errors, ctx->reg_com_link_int);
|
ocx_com_link_errors, ctx->reg_com_link_int);
|
||||||
|
|
||||||
strncat(msg, other, OCX_MESSAGE_SIZE);
|
strlcat(msg, other, OCX_MESSAGE_SIZE);
|
||||||
|
|
||||||
if (ctx->reg_com_link_int & OCX_COM_LINK_INT_UE)
|
if (ctx->reg_com_link_int & OCX_COM_LINK_INT_UE)
|
||||||
edac_device_handle_ue(ocx->edac_dev, 0, 0, msg);
|
edac_device_handle_ue(ocx->edac_dev, 0, 0, msg);
|
||||||
@@ -1896,7 +1896,7 @@ static irqreturn_t thunderx_l2c_threaded_isr(int irq, void *irq_id)
|
|||||||
|
|
||||||
decode_register(other, L2C_OTHER_SIZE, l2_errors, ctx->reg_int);
|
decode_register(other, L2C_OTHER_SIZE, l2_errors, ctx->reg_int);
|
||||||
|
|
||||||
strncat(msg, other, L2C_MESSAGE_SIZE);
|
strlcat(msg, other, L2C_MESSAGE_SIZE);
|
||||||
|
|
||||||
if (ctx->reg_int & mask_ue)
|
if (ctx->reg_int & mask_ue)
|
||||||
edac_device_handle_ue(l2c->edac_dev, 0, 0, msg);
|
edac_device_handle_ue(l2c->edac_dev, 0, 0, msg);
|
||||||
|
|||||||
@@ -292,6 +292,51 @@ static char ohci_driver_name[] = KBUILD_MODNAME;
|
|||||||
#define QUIRK_TI_SLLZ059 0x20
|
#define QUIRK_TI_SLLZ059 0x20
|
||||||
#define QUIRK_IR_WAKE 0x40
|
#define QUIRK_IR_WAKE 0x40
|
||||||
|
|
||||||
|
// On PCI Express Root Complex in any type of AMD Ryzen machine, VIA VT6306/6307/6308 with Asmedia
|
||||||
|
// ASM1083/1085 brings an inconvenience that the read accesses to 'Isochronous Cycle Timer' register
|
||||||
|
// (at offset 0xf0 in PCI I/O space) often causes unexpected system reboot. The mechanism is not
|
||||||
|
// clear, since the read access to the other registers is enough safe; e.g. 'Node ID' register,
|
||||||
|
// while it is probable due to detection of any type of PCIe error.
|
||||||
|
#define QUIRK_REBOOT_BY_CYCLE_TIMER_READ 0x80000000
|
||||||
|
|
||||||
|
#if IS_ENABLED(CONFIG_X86)
|
||||||
|
|
||||||
|
static bool has_reboot_by_cycle_timer_read_quirk(const struct fw_ohci *ohci)
|
||||||
|
{
|
||||||
|
return !!(ohci->quirks & QUIRK_REBOOT_BY_CYCLE_TIMER_READ);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define PCI_DEVICE_ID_ASMEDIA_ASM108X 0x1080
|
||||||
|
|
||||||
|
static bool detect_vt630x_with_asm1083_on_amd_ryzen_machine(const struct pci_dev *pdev)
|
||||||
|
{
|
||||||
|
const struct pci_dev *pcie_to_pci_bridge;
|
||||||
|
|
||||||
|
// Detect any type of AMD Ryzen machine.
|
||||||
|
if (!static_cpu_has(X86_FEATURE_ZEN))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// Detect VIA VT6306/6307/6308.
|
||||||
|
if (pdev->vendor != PCI_VENDOR_ID_VIA)
|
||||||
|
return false;
|
||||||
|
if (pdev->device != PCI_DEVICE_ID_VIA_VT630X)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// Detect Asmedia ASM1083/1085.
|
||||||
|
pcie_to_pci_bridge = pdev->bus->self;
|
||||||
|
if (pcie_to_pci_bridge->vendor != PCI_VENDOR_ID_ASMEDIA)
|
||||||
|
return false;
|
||||||
|
if (pcie_to_pci_bridge->device != PCI_DEVICE_ID_ASMEDIA_ASM108X)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
#define has_reboot_by_cycle_timer_read_quirk(ohci) false
|
||||||
|
#define detect_vt630x_with_asm1083_on_amd_ryzen_machine(pdev) false
|
||||||
|
#endif
|
||||||
|
|
||||||
/* In case of multiple matches in ohci_quirks[], only the first one is used. */
|
/* In case of multiple matches in ohci_quirks[], only the first one is used. */
|
||||||
static const struct {
|
static const struct {
|
||||||
unsigned short vendor, device, revision, flags;
|
unsigned short vendor, device, revision, flags;
|
||||||
@@ -1730,6 +1775,9 @@ static u32 get_cycle_time(struct fw_ohci *ohci)
|
|||||||
s32 diff01, diff12;
|
s32 diff01, diff12;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (has_reboot_by_cycle_timer_read_quirk(ohci))
|
||||||
|
return 0;
|
||||||
|
|
||||||
c2 = reg_read(ohci, OHCI1394_IsochronousCycleTimer);
|
c2 = reg_read(ohci, OHCI1394_IsochronousCycleTimer);
|
||||||
|
|
||||||
if (ohci->quirks & QUIRK_CYCLE_TIMER) {
|
if (ohci->quirks & QUIRK_CYCLE_TIMER) {
|
||||||
@@ -3633,6 +3681,9 @@ static int pci_probe(struct pci_dev *dev,
|
|||||||
if (param_quirks)
|
if (param_quirks)
|
||||||
ohci->quirks = param_quirks;
|
ohci->quirks = param_quirks;
|
||||||
|
|
||||||
|
if (detect_vt630x_with_asm1083_on_amd_ryzen_machine(dev))
|
||||||
|
ohci->quirks |= QUIRK_REBOOT_BY_CYCLE_TIMER_READ;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Because dma_alloc_coherent() allocates at least one page,
|
* Because dma_alloc_coherent() allocates at least one page,
|
||||||
* we save space by using a common buffer for the AR request/
|
* we save space by using a common buffer for the AR request/
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ static int ti_sci_debugfs_create(struct platform_device *pdev,
|
|||||||
{
|
{
|
||||||
struct device *dev = &pdev->dev;
|
struct device *dev = &pdev->dev;
|
||||||
struct resource *res;
|
struct resource *res;
|
||||||
char debug_name[50] = "ti_sci_debug@";
|
char debug_name[50];
|
||||||
|
|
||||||
/* Debug region is optional */
|
/* Debug region is optional */
|
||||||
res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
|
res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
|
||||||
@@ -193,10 +193,10 @@ static int ti_sci_debugfs_create(struct platform_device *pdev,
|
|||||||
/* Setup NULL termination */
|
/* Setup NULL termination */
|
||||||
info->debug_buffer[info->debug_region_size] = 0;
|
info->debug_buffer[info->debug_region_size] = 0;
|
||||||
|
|
||||||
info->d = debugfs_create_file(strncat(debug_name, dev_name(dev),
|
snprintf(debug_name, sizeof(debug_name), "ti_sci_debug@%s",
|
||||||
sizeof(debug_name) -
|
dev_name(dev));
|
||||||
sizeof("ti_sci_debug@")),
|
info->d = debugfs_create_file(debug_name, 0444, NULL, info,
|
||||||
0444, NULL, info, &ti_sci_debug_fops);
|
&ti_sci_debug_fops);
|
||||||
if (IS_ERR(info->d))
|
if (IS_ERR(info->d))
|
||||||
return PTR_ERR(info->d);
|
return PTR_ERR(info->d);
|
||||||
|
|
||||||
|
|||||||
@@ -392,7 +392,7 @@ static ssize_t amdgpu_debugfs_regs_smc_read(struct file *f, char __user *buf,
|
|||||||
int r;
|
int r;
|
||||||
|
|
||||||
if (!adev->smc_rreg)
|
if (!adev->smc_rreg)
|
||||||
return -EPERM;
|
return -EOPNOTSUPP;
|
||||||
|
|
||||||
if (size & 0x3 || *pos & 0x3)
|
if (size & 0x3 || *pos & 0x3)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
@@ -434,7 +434,7 @@ static ssize_t amdgpu_debugfs_regs_smc_write(struct file *f, const char __user *
|
|||||||
int r;
|
int r;
|
||||||
|
|
||||||
if (!adev->smc_wreg)
|
if (!adev->smc_wreg)
|
||||||
return -EPERM;
|
return -EOPNOTSUPP;
|
||||||
|
|
||||||
if (size & 0x3 || *pos & 0x3)
|
if (size & 0x3 || *pos & 0x3)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|||||||
@@ -2734,10 +2734,8 @@ static int kv_parse_power_table(struct amdgpu_device *adev)
|
|||||||
non_clock_info = (struct _ATOM_PPLIB_NONCLOCK_INFO *)
|
non_clock_info = (struct _ATOM_PPLIB_NONCLOCK_INFO *)
|
||||||
&non_clock_info_array->nonClockInfo[non_clock_array_index];
|
&non_clock_info_array->nonClockInfo[non_clock_array_index];
|
||||||
ps = kzalloc(sizeof(struct kv_ps), GFP_KERNEL);
|
ps = kzalloc(sizeof(struct kv_ps), GFP_KERNEL);
|
||||||
if (ps == NULL) {
|
if (ps == NULL)
|
||||||
kfree(adev->pm.dpm.ps);
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
|
||||||
adev->pm.dpm.ps[i].ps_priv = ps;
|
adev->pm.dpm.ps[i].ps_priv = ps;
|
||||||
k = 0;
|
k = 0;
|
||||||
idx = (u8 *)&power_state->v2.clockInfoIndex[0];
|
idx = (u8 *)&power_state->v2.clockInfoIndex[0];
|
||||||
|
|||||||
@@ -7346,10 +7346,9 @@ static int si_dpm_init(struct amdgpu_device *adev)
|
|||||||
kcalloc(4,
|
kcalloc(4,
|
||||||
sizeof(struct amdgpu_clock_voltage_dependency_entry),
|
sizeof(struct amdgpu_clock_voltage_dependency_entry),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (!adev->pm.dpm.dyn_state.vddc_dependency_on_dispclk.entries) {
|
if (!adev->pm.dpm.dyn_state.vddc_dependency_on_dispclk.entries)
|
||||||
amdgpu_free_extended_power_table(adev);
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
|
||||||
adev->pm.dpm.dyn_state.vddc_dependency_on_dispclk.count = 4;
|
adev->pm.dpm.dyn_state.vddc_dependency_on_dispclk.count = 4;
|
||||||
adev->pm.dpm.dyn_state.vddc_dependency_on_dispclk.entries[0].clk = 0;
|
adev->pm.dpm.dyn_state.vddc_dependency_on_dispclk.entries[0].clk = 0;
|
||||||
adev->pm.dpm.dyn_state.vddc_dependency_on_dispclk.entries[0].v = 0;
|
adev->pm.dpm.dyn_state.vddc_dependency_on_dispclk.entries[0].v = 0;
|
||||||
|
|||||||
@@ -573,8 +573,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
|
|||||||
struct drm_mode_set set;
|
struct drm_mode_set set;
|
||||||
uint32_t __user *set_connectors_ptr;
|
uint32_t __user *set_connectors_ptr;
|
||||||
struct drm_modeset_acquire_ctx ctx;
|
struct drm_modeset_acquire_ctx ctx;
|
||||||
int ret;
|
int ret, i, num_connectors = 0;
|
||||||
int i;
|
|
||||||
|
|
||||||
if (!drm_core_check_feature(dev, DRIVER_MODESET))
|
if (!drm_core_check_feature(dev, DRIVER_MODESET))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
@@ -739,6 +738,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
|
|||||||
connector->name);
|
connector->name);
|
||||||
|
|
||||||
connector_set[i] = connector;
|
connector_set[i] = connector;
|
||||||
|
num_connectors++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -747,7 +747,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
|
|||||||
set.y = crtc_req->y;
|
set.y = crtc_req->y;
|
||||||
set.mode = mode;
|
set.mode = mode;
|
||||||
set.connectors = connector_set;
|
set.connectors = connector_set;
|
||||||
set.num_connectors = crtc_req->count_connectors;
|
set.num_connectors = num_connectors;
|
||||||
set.fb = fb;
|
set.fb = fb;
|
||||||
|
|
||||||
if (drm_drv_uses_atomic_modeset(dev))
|
if (drm_drv_uses_atomic_modeset(dev))
|
||||||
@@ -760,7 +760,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
|
|||||||
drm_framebuffer_put(fb);
|
drm_framebuffer_put(fb);
|
||||||
|
|
||||||
if (connector_set) {
|
if (connector_set) {
|
||||||
for (i = 0; i < crtc_req->count_connectors; i++) {
|
for (i = 0; i < num_connectors; i++) {
|
||||||
if (connector_set[i])
|
if (connector_set[i])
|
||||||
drm_connector_put(connector_set[i]);
|
drm_connector_put(connector_set[i]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -818,8 +818,11 @@ int drm_dev_register(struct drm_device *dev, unsigned long flags)
|
|||||||
goto err_minors;
|
goto err_minors;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (drm_core_check_feature(dev, DRIVER_MODESET))
|
if (drm_core_check_feature(dev, DRIVER_MODESET)) {
|
||||||
drm_modeset_register_all(dev);
|
ret = drm_modeset_register_all(dev);
|
||||||
|
if (ret)
|
||||||
|
goto err_unload;
|
||||||
|
}
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
@@ -831,6 +834,9 @@ int drm_dev_register(struct drm_device *dev, unsigned long flags)
|
|||||||
|
|
||||||
goto out_unlock;
|
goto out_unlock;
|
||||||
|
|
||||||
|
err_unload:
|
||||||
|
if (dev->driver->unload)
|
||||||
|
dev->driver->unload(dev);
|
||||||
err_minors:
|
err_minors:
|
||||||
remove_compat_control_link(dev);
|
remove_compat_control_link(dev);
|
||||||
drm_minor_unregister(dev, DRM_MINOR_PRIMARY);
|
drm_minor_unregister(dev, DRM_MINOR_PRIMARY);
|
||||||
|
|||||||
@@ -1840,6 +1840,8 @@ static int hdmi_bind(struct device *dev, struct device *master, void *data)
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
crtc = exynos_drm_crtc_get_by_type(drm_dev, EXYNOS_DISPLAY_TYPE_HDMI);
|
crtc = exynos_drm_crtc_get_by_type(drm_dev, EXYNOS_DISPLAY_TYPE_HDMI);
|
||||||
|
if (IS_ERR(crtc))
|
||||||
|
return PTR_ERR(crtc);
|
||||||
crtc->pipe_clk = &hdata->phy_clk;
|
crtc->pipe_clk = &hdata->phy_clk;
|
||||||
|
|
||||||
ret = hdmi_create_connector(encoder);
|
ret = hdmi_create_connector(encoder);
|
||||||
|
|||||||
@@ -284,6 +284,7 @@ static void mdp4_crtc_atomic_disable(struct drm_crtc *crtc,
|
|||||||
{
|
{
|
||||||
struct mdp4_crtc *mdp4_crtc = to_mdp4_crtc(crtc);
|
struct mdp4_crtc *mdp4_crtc = to_mdp4_crtc(crtc);
|
||||||
struct mdp4_kms *mdp4_kms = get_kms(crtc);
|
struct mdp4_kms *mdp4_kms = get_kms(crtc);
|
||||||
|
unsigned long flags;
|
||||||
|
|
||||||
DBG("%s", mdp4_crtc->name);
|
DBG("%s", mdp4_crtc->name);
|
||||||
|
|
||||||
@@ -296,6 +297,14 @@ static void mdp4_crtc_atomic_disable(struct drm_crtc *crtc,
|
|||||||
mdp_irq_unregister(&mdp4_kms->base, &mdp4_crtc->err);
|
mdp_irq_unregister(&mdp4_kms->base, &mdp4_crtc->err);
|
||||||
mdp4_disable(mdp4_kms);
|
mdp4_disable(mdp4_kms);
|
||||||
|
|
||||||
|
if (crtc->state->event && !crtc->state->active) {
|
||||||
|
WARN_ON(mdp4_crtc->event);
|
||||||
|
spin_lock_irqsave(&mdp4_kms->dev->event_lock, flags);
|
||||||
|
drm_crtc_send_vblank_event(crtc, crtc->state->event);
|
||||||
|
crtc->state->event = NULL;
|
||||||
|
spin_unlock_irqrestore(&mdp4_kms->dev->event_lock, flags);
|
||||||
|
}
|
||||||
|
|
||||||
mdp4_crtc->enabled = false;
|
mdp4_crtc->enabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2307,7 +2307,7 @@ int r100_cs_track_check(struct radeon_device *rdev, struct r100_cs_track *track)
|
|||||||
switch (prim_walk) {
|
switch (prim_walk) {
|
||||||
case 1:
|
case 1:
|
||||||
for (i = 0; i < track->num_arrays; i++) {
|
for (i = 0; i < track->num_arrays; i++) {
|
||||||
size = track->arrays[i].esize * track->max_indx * 4;
|
size = track->arrays[i].esize * track->max_indx * 4UL;
|
||||||
if (track->arrays[i].robj == NULL) {
|
if (track->arrays[i].robj == NULL) {
|
||||||
DRM_ERROR("(PW %u) Vertex array %u no buffer "
|
DRM_ERROR("(PW %u) Vertex array %u no buffer "
|
||||||
"bound\n", prim_walk, i);
|
"bound\n", prim_walk, i);
|
||||||
@@ -2326,7 +2326,7 @@ int r100_cs_track_check(struct radeon_device *rdev, struct r100_cs_track *track)
|
|||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
for (i = 0; i < track->num_arrays; i++) {
|
for (i = 0; i < track->num_arrays; i++) {
|
||||||
size = track->arrays[i].esize * (nverts - 1) * 4;
|
size = track->arrays[i].esize * (nverts - 1) * 4UL;
|
||||||
if (track->arrays[i].robj == NULL) {
|
if (track->arrays[i].robj == NULL) {
|
||||||
DRM_ERROR("(PW %u) Vertex array %u no buffer "
|
DRM_ERROR("(PW %u) Vertex array %u no buffer "
|
||||||
"bound\n", prim_walk, i);
|
"bound\n", prim_walk, i);
|
||||||
|
|||||||
@@ -1278,7 +1278,7 @@ static int r600_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx)
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
tmp = (reg - CB_COLOR0_BASE) / 4;
|
tmp = (reg - CB_COLOR0_BASE) / 4;
|
||||||
track->cb_color_bo_offset[tmp] = radeon_get_ib_value(p, idx) << 8;
|
track->cb_color_bo_offset[tmp] = (u64)radeon_get_ib_value(p, idx) << 8;
|
||||||
ib[idx] += (u32)((reloc->gpu_offset >> 8) & 0xffffffff);
|
ib[idx] += (u32)((reloc->gpu_offset >> 8) & 0xffffffff);
|
||||||
track->cb_color_base_last[tmp] = ib[idx];
|
track->cb_color_base_last[tmp] = ib[idx];
|
||||||
track->cb_color_bo[tmp] = reloc->robj;
|
track->cb_color_bo[tmp] = reloc->robj;
|
||||||
@@ -1305,7 +1305,7 @@ static int r600_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx)
|
|||||||
"0x%04X\n", reg);
|
"0x%04X\n", reg);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
track->htile_offset = radeon_get_ib_value(p, idx) << 8;
|
track->htile_offset = (u64)radeon_get_ib_value(p, idx) << 8;
|
||||||
ib[idx] += (u32)((reloc->gpu_offset >> 8) & 0xffffffff);
|
ib[idx] += (u32)((reloc->gpu_offset >> 8) & 0xffffffff);
|
||||||
track->htile_bo = reloc->robj;
|
track->htile_bo = reloc->robj;
|
||||||
track->db_dirty = true;
|
track->db_dirty = true;
|
||||||
|
|||||||
@@ -676,11 +676,16 @@ static void radeon_crtc_init(struct drm_device *dev, int index)
|
|||||||
if (radeon_crtc == NULL)
|
if (radeon_crtc == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
radeon_crtc->flip_queue = alloc_workqueue("radeon-crtc", WQ_HIGHPRI, 0);
|
||||||
|
if (!radeon_crtc->flip_queue) {
|
||||||
|
kfree(radeon_crtc);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
drm_crtc_init(dev, &radeon_crtc->base, &radeon_crtc_funcs);
|
drm_crtc_init(dev, &radeon_crtc->base, &radeon_crtc_funcs);
|
||||||
|
|
||||||
drm_mode_crtc_set_gamma_size(&radeon_crtc->base, 256);
|
drm_mode_crtc_set_gamma_size(&radeon_crtc->base, 256);
|
||||||
radeon_crtc->crtc_id = index;
|
radeon_crtc->crtc_id = index;
|
||||||
radeon_crtc->flip_queue = alloc_workqueue("radeon-crtc", WQ_HIGHPRI, 0);
|
|
||||||
rdev->mode_info.crtcs[index] = radeon_crtc;
|
rdev->mode_info.crtcs[index] = radeon_crtc;
|
||||||
|
|
||||||
if (rdev->family >= CHIP_BONAIRE) {
|
if (rdev->family >= CHIP_BONAIRE) {
|
||||||
|
|||||||
@@ -1206,13 +1206,17 @@ int radeon_vm_init(struct radeon_device *rdev, struct radeon_vm *vm)
|
|||||||
r = radeon_bo_create(rdev, pd_size, align, true,
|
r = radeon_bo_create(rdev, pd_size, align, true,
|
||||||
RADEON_GEM_DOMAIN_VRAM, 0, NULL,
|
RADEON_GEM_DOMAIN_VRAM, 0, NULL,
|
||||||
NULL, &vm->page_directory);
|
NULL, &vm->page_directory);
|
||||||
if (r)
|
if (r) {
|
||||||
|
kfree(vm->page_tables);
|
||||||
|
vm->page_tables = NULL;
|
||||||
return r;
|
return r;
|
||||||
|
}
|
||||||
r = radeon_vm_clear_bo(rdev, vm->page_directory);
|
r = radeon_vm_clear_bo(rdev, vm->page_directory);
|
||||||
if (r) {
|
if (r) {
|
||||||
radeon_bo_unref(&vm->page_directory);
|
radeon_bo_unref(&vm->page_directory);
|
||||||
vm->page_directory = NULL;
|
vm->page_directory = NULL;
|
||||||
|
kfree(vm->page_tables);
|
||||||
|
vm->page_tables = NULL;
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3612,6 +3612,10 @@ static int si_cp_start(struct radeon_device *rdev)
|
|||||||
for (i = RADEON_RING_TYPE_GFX_INDEX; i <= CAYMAN_RING_TYPE_CP2_INDEX; ++i) {
|
for (i = RADEON_RING_TYPE_GFX_INDEX; i <= CAYMAN_RING_TYPE_CP2_INDEX; ++i) {
|
||||||
ring = &rdev->ring[i];
|
ring = &rdev->ring[i];
|
||||||
r = radeon_ring_lock(rdev, ring, 2);
|
r = radeon_ring_lock(rdev, ring, 2);
|
||||||
|
if (r) {
|
||||||
|
DRM_ERROR("radeon: cp failed to lock ring (%d).\n", r);
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
/* clear the compute context state */
|
/* clear the compute context state */
|
||||||
radeon_ring_write(ring, PACKET3_COMPUTE(PACKET3_CLEAR_STATE, 0));
|
radeon_ring_write(ring, PACKET3_COMPUTE(PACKET3_CLEAR_STATE, 0));
|
||||||
|
|||||||
@@ -1494,8 +1494,10 @@ static int sumo_parse_power_table(struct radeon_device *rdev)
|
|||||||
non_clock_array_index = power_state->v2.nonClockInfoIndex;
|
non_clock_array_index = power_state->v2.nonClockInfoIndex;
|
||||||
non_clock_info = (struct _ATOM_PPLIB_NONCLOCK_INFO *)
|
non_clock_info = (struct _ATOM_PPLIB_NONCLOCK_INFO *)
|
||||||
&non_clock_info_array->nonClockInfo[non_clock_array_index];
|
&non_clock_info_array->nonClockInfo[non_clock_array_index];
|
||||||
if (!rdev->pm.power_state[i].clock_info)
|
if (!rdev->pm.power_state[i].clock_info) {
|
||||||
|
kfree(rdev->pm.dpm.ps);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
}
|
||||||
ps = kzalloc(sizeof(struct sumo_ps), GFP_KERNEL);
|
ps = kzalloc(sizeof(struct sumo_ps), GFP_KERNEL);
|
||||||
if (ps == NULL) {
|
if (ps == NULL) {
|
||||||
kfree(rdev->pm.dpm.ps);
|
kfree(rdev->pm.dpm.ps);
|
||||||
|
|||||||
@@ -1769,8 +1769,10 @@ static int trinity_parse_power_table(struct radeon_device *rdev)
|
|||||||
non_clock_array_index = power_state->v2.nonClockInfoIndex;
|
non_clock_array_index = power_state->v2.nonClockInfoIndex;
|
||||||
non_clock_info = (struct _ATOM_PPLIB_NONCLOCK_INFO *)
|
non_clock_info = (struct _ATOM_PPLIB_NONCLOCK_INFO *)
|
||||||
&non_clock_info_array->nonClockInfo[non_clock_array_index];
|
&non_clock_info_array->nonClockInfo[non_clock_array_index];
|
||||||
if (!rdev->pm.power_state[i].clock_info)
|
if (!rdev->pm.power_state[i].clock_info) {
|
||||||
|
kfree(rdev->pm.dpm.ps);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
}
|
||||||
ps = kzalloc(sizeof(struct sumo_ps), GFP_KERNEL);
|
ps = kzalloc(sizeof(struct sumo_ps), GFP_KERNEL);
|
||||||
if (ps == NULL) {
|
if (ps == NULL) {
|
||||||
kfree(rdev->pm.dpm.ps);
|
kfree(rdev->pm.dpm.ps);
|
||||||
|
|||||||
@@ -302,6 +302,9 @@ static void kgsl_destroy_ion(struct kgsl_memdesc *memdesc)
|
|||||||
struct kgsl_mem_entry, memdesc);
|
struct kgsl_mem_entry, memdesc);
|
||||||
struct kgsl_dma_buf_meta *meta = entry->priv_data;
|
struct kgsl_dma_buf_meta *meta = entry->priv_data;
|
||||||
|
|
||||||
|
if (memdesc->priv & KGSL_MEMDESC_MAPPED)
|
||||||
|
return;
|
||||||
|
|
||||||
if (meta != NULL) {
|
if (meta != NULL) {
|
||||||
remove_dmabuf_list(meta);
|
remove_dmabuf_list(meta);
|
||||||
dma_buf_unmap_attachment(meta->attach, meta->table,
|
dma_buf_unmap_attachment(meta->attach, meta->table,
|
||||||
@@ -330,6 +333,9 @@ static void kgsl_destroy_anon(struct kgsl_memdesc *memdesc)
|
|||||||
struct scatterlist *sg;
|
struct scatterlist *sg;
|
||||||
struct page *page;
|
struct page *page;
|
||||||
|
|
||||||
|
if (memdesc->priv & KGSL_MEMDESC_MAPPED)
|
||||||
|
return;
|
||||||
|
|
||||||
for_each_sg(memdesc->sgt->sgl, sg, memdesc->sgt->nents, i) {
|
for_each_sg(memdesc->sgt->sgl, sg, memdesc->sgt->nents, i) {
|
||||||
page = sg_page(sg);
|
page = sg_page(sg);
|
||||||
for (j = 0; j < (sg->length >> PAGE_SHIFT); j++) {
|
for (j = 0; j < (sg->length >> PAGE_SHIFT); j++) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2002,2007-2021, The Linux Foundation. All rights reserved.
|
* Copyright (c) 2002,2007-2021, The Linux Foundation. All rights reserved.
|
||||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
* Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
@@ -492,6 +492,8 @@ kgsl_mmu_unmap(struct kgsl_pagetable *pagetable,
|
|||||||
size = kgsl_memdesc_footprint(memdesc);
|
size = kgsl_memdesc_footprint(memdesc);
|
||||||
|
|
||||||
ret = pagetable->pt_ops->mmu_unmap(pagetable, memdesc);
|
ret = pagetable->pt_ops->mmu_unmap(pagetable, memdesc);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
atomic_dec(&pagetable->stats.entries);
|
atomic_dec(&pagetable->stats.entries);
|
||||||
atomic_long_sub(size, &pagetable->stats.mapped);
|
atomic_long_sub(size, &pagetable->stats.mapped);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
|
||||||
* Copyright (c) 2002,2007-2021, The Linux Foundation. All rights reserved.
|
* Copyright (c) 2002,2007-2021, The Linux Foundation. All rights reserved.
|
||||||
|
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <asm/cacheflush.h>
|
#include <asm/cacheflush.h>
|
||||||
@@ -595,6 +595,9 @@ static int kgsl_unlock_sgt(struct sg_table *sgt)
|
|||||||
|
|
||||||
static void kgsl_page_alloc_free(struct kgsl_memdesc *memdesc)
|
static void kgsl_page_alloc_free(struct kgsl_memdesc *memdesc)
|
||||||
{
|
{
|
||||||
|
if (memdesc->priv & KGSL_MEMDESC_MAPPED)
|
||||||
|
return;
|
||||||
|
|
||||||
kgsl_page_alloc_unmap_kernel(memdesc);
|
kgsl_page_alloc_unmap_kernel(memdesc);
|
||||||
/* we certainly do not expect the hostptr to still be mapped */
|
/* we certainly do not expect the hostptr to still be mapped */
|
||||||
BUG_ON(memdesc->hostptr);
|
BUG_ON(memdesc->hostptr);
|
||||||
@@ -695,6 +698,9 @@ static void kgsl_cma_coherent_free(struct kgsl_memdesc *memdesc)
|
|||||||
{
|
{
|
||||||
unsigned long attrs = 0;
|
unsigned long attrs = 0;
|
||||||
|
|
||||||
|
if (memdesc->priv & KGSL_MEMDESC_MAPPED)
|
||||||
|
return;
|
||||||
|
|
||||||
if (memdesc->hostptr) {
|
if (memdesc->hostptr) {
|
||||||
if (memdesc->priv & KGSL_MEMDESC_SECURE) {
|
if (memdesc->priv & KGSL_MEMDESC_SECURE) {
|
||||||
atomic_long_sub(memdesc->size,
|
atomic_long_sub(memdesc->size,
|
||||||
|
|||||||
@@ -2533,8 +2533,8 @@ static void wacom_wac_finger_slot(struct wacom_wac *wacom_wac,
|
|||||||
{
|
{
|
||||||
struct hid_data *hid_data = &wacom_wac->hid_data;
|
struct hid_data *hid_data = &wacom_wac->hid_data;
|
||||||
bool mt = wacom_wac->features.touch_max > 1;
|
bool mt = wacom_wac->features.touch_max > 1;
|
||||||
bool prox = hid_data->tipswitch &&
|
bool touch_down = hid_data->tipswitch && hid_data->confidence;
|
||||||
report_touch_events(wacom_wac);
|
bool prox = touch_down && report_touch_events(wacom_wac);
|
||||||
|
|
||||||
if (wacom_wac->shared->has_mute_touch_switch &&
|
if (wacom_wac->shared->has_mute_touch_switch &&
|
||||||
!wacom_wac->shared->is_touch_on) {
|
!wacom_wac->shared->is_touch_on) {
|
||||||
@@ -2573,24 +2573,6 @@ static void wacom_wac_finger_slot(struct wacom_wac *wacom_wac,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool wacom_wac_slot_is_active(struct input_dev *dev, int key)
|
|
||||||
{
|
|
||||||
struct input_mt *mt = dev->mt;
|
|
||||||
struct input_mt_slot *s;
|
|
||||||
|
|
||||||
if (!mt)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
for (s = mt->slots; s != mt->slots + mt->num_slots; s++) {
|
|
||||||
if (s->key == key &&
|
|
||||||
input_mt_get_value(s, ABS_MT_TRACKING_ID) >= 0) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void wacom_wac_finger_event(struct hid_device *hdev,
|
static void wacom_wac_finger_event(struct hid_device *hdev,
|
||||||
struct hid_field *field, struct hid_usage *usage, __s32 value)
|
struct hid_field *field, struct hid_usage *usage, __s32 value)
|
||||||
{
|
{
|
||||||
@@ -2633,16 +2615,10 @@ static void wacom_wac_finger_event(struct hid_device *hdev,
|
|||||||
|
|
||||||
|
|
||||||
if (usage->usage_index + 1 == field->report_count) {
|
if (usage->usage_index + 1 == field->report_count) {
|
||||||
if (equivalent_usage == wacom_wac->hid_data.last_slot_field) {
|
if (equivalent_usage == wacom_wac->hid_data.last_slot_field)
|
||||||
bool touch_removed = wacom_wac_slot_is_active(wacom_wac->touch_input,
|
|
||||||
wacom_wac->hid_data.id) && !wacom_wac->hid_data.tipswitch;
|
|
||||||
|
|
||||||
if (wacom_wac->hid_data.confidence || touch_removed) {
|
|
||||||
wacom_wac_finger_slot(wacom_wac, wacom_wac->touch_input);
|
wacom_wac_finger_slot(wacom_wac, wacom_wac->touch_input);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void wacom_wac_finger_pre_report(struct hid_device *hdev,
|
static void wacom_wac_finger_pre_report(struct hid_device *hdev,
|
||||||
struct hid_report *report)
|
struct hid_report *report)
|
||||||
|
|||||||
@@ -48,8 +48,6 @@ module_param(pm_save_enable, int, 0444);
|
|||||||
MODULE_PARM_DESC(pm_save_enable,
|
MODULE_PARM_DESC(pm_save_enable,
|
||||||
"Save/restore state on power down: 1 = never, 2 = self-hosted");
|
"Save/restore state on power down: 1 = never, 2 = self-hosted");
|
||||||
|
|
||||||
/* The number of ETMv4 currently registered */
|
|
||||||
static int etm4_count;
|
|
||||||
static struct etmv4_drvdata *etmdrvdata[NR_CPUS];
|
static struct etmv4_drvdata *etmdrvdata[NR_CPUS];
|
||||||
static void etm4_set_default_config(struct etmv4_config *config);
|
static void etm4_set_default_config(struct etmv4_config *config);
|
||||||
static int etm4_set_event_filters(struct etmv4_drvdata *drvdata,
|
static int etm4_set_event_filters(struct etmv4_drvdata *drvdata,
|
||||||
@@ -1373,26 +1371,23 @@ static struct notifier_block etm4_cpu_pm_nb = {
|
|||||||
.notifier_call = etm4_cpu_pm_notify,
|
.notifier_call = etm4_cpu_pm_notify,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Setup PM. Called with cpus locked. Deals with error conditions and counts */
|
/* Setup PM. Deals with error conditions and counts */
|
||||||
static int etm4_pm_setup_cpuslocked(void)
|
static int __init etm4_pm_setup(void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (etm4_count++)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
ret = cpu_pm_register_notifier(&etm4_cpu_pm_nb);
|
ret = cpu_pm_register_notifier(&etm4_cpu_pm_nb);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto reduce_count;
|
return ret;
|
||||||
|
|
||||||
ret = cpuhp_setup_state_nocalls_cpuslocked(CPUHP_AP_ARM_CORESIGHT_STARTING,
|
ret = cpuhp_setup_state_nocalls(CPUHP_AP_ARM_CORESIGHT_STARTING,
|
||||||
"arm/coresight4:starting",
|
"arm/coresight4:starting",
|
||||||
etm4_starting_cpu, etm4_dying_cpu);
|
etm4_starting_cpu, etm4_dying_cpu);
|
||||||
|
|
||||||
if (ret)
|
if (ret)
|
||||||
goto unregister_notifier;
|
goto unregister_notifier;
|
||||||
|
|
||||||
ret = cpuhp_setup_state_nocalls_cpuslocked(CPUHP_AP_ONLINE_DYN,
|
ret = cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN,
|
||||||
"arm/coresight4:online",
|
"arm/coresight4:online",
|
||||||
etm4_online_cpu, NULL);
|
etm4_online_cpu, NULL);
|
||||||
|
|
||||||
@@ -1403,21 +1398,15 @@ static int etm4_pm_setup_cpuslocked(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* failed dyn state - remove others */
|
/* failed dyn state - remove others */
|
||||||
cpuhp_remove_state_nocalls_cpuslocked(CPUHP_AP_ARM_CORESIGHT_STARTING);
|
cpuhp_remove_state_nocalls(CPUHP_AP_ARM_CORESIGHT_STARTING);
|
||||||
|
|
||||||
unregister_notifier:
|
unregister_notifier:
|
||||||
cpu_pm_unregister_notifier(&etm4_cpu_pm_nb);
|
cpu_pm_unregister_notifier(&etm4_cpu_pm_nb);
|
||||||
|
|
||||||
reduce_count:
|
|
||||||
--etm4_count;
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void etm4_pm_clear(void)
|
static void __init etm4_pm_clear(void)
|
||||||
{
|
{
|
||||||
if (--etm4_count != 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
cpu_pm_unregister_notifier(&etm4_cpu_pm_nb);
|
cpu_pm_unregister_notifier(&etm4_cpu_pm_nb);
|
||||||
cpuhp_remove_state_nocalls(CPUHP_AP_ARM_CORESIGHT_STARTING);
|
cpuhp_remove_state_nocalls(CPUHP_AP_ARM_CORESIGHT_STARTING);
|
||||||
if (hp_online) {
|
if (hp_online) {
|
||||||
@@ -1477,27 +1466,15 @@ static int etm4_probe(struct amba_device *adev, const struct amba_id *id)
|
|||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
cpus_read_lock();
|
|
||||||
ret = smp_call_function_single(drvdata->cpu,
|
ret = smp_call_function_single(drvdata->cpu,
|
||||||
etm4_init_arch_data, drvdata, 1);
|
etm4_init_arch_data, drvdata, 1);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "ETM arch init failed\n");
|
dev_err(dev, "ETM arch init failed\n");
|
||||||
cpus_read_unlock();
|
|
||||||
return ret;
|
return ret;
|
||||||
} else if (!etm4_arch_supported(drvdata->arch)) {
|
} else if (!etm4_arch_supported(drvdata->arch)) {
|
||||||
cpus_read_unlock();
|
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = etm4_pm_setup_cpuslocked();
|
|
||||||
cpus_read_unlock();
|
|
||||||
|
|
||||||
/* etm4_pm_setup_cpuslocked() does its own cleanup - exit on error */
|
|
||||||
if (ret) {
|
|
||||||
etmdrvdata[drvdata->cpu] = NULL;
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
etm4_init_trace_id(drvdata);
|
etm4_init_trace_id(drvdata);
|
||||||
etm4_set_default(&drvdata->config);
|
etm4_set_default(&drvdata->config);
|
||||||
|
|
||||||
@@ -1539,7 +1516,6 @@ static int etm4_probe(struct amba_device *adev, const struct amba_id *id)
|
|||||||
|
|
||||||
err_arch_supported:
|
err_arch_supported:
|
||||||
etmdrvdata[drvdata->cpu] = NULL;
|
etmdrvdata[drvdata->cpu] = NULL;
|
||||||
etm4_pm_clear();
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1566,4 +1542,23 @@ static struct amba_driver etm4x_driver = {
|
|||||||
.probe = etm4_probe,
|
.probe = etm4_probe,
|
||||||
.id_table = etm4_ids,
|
.id_table = etm4_ids,
|
||||||
};
|
};
|
||||||
builtin_amba_driver(etm4x_driver);
|
|
||||||
|
static int __init etm4x_init(void)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
ret = etm4_pm_setup();
|
||||||
|
|
||||||
|
/* etm4_pm_setup() does its own cleanup - exit on error */
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
ret = amba_driver_register(&etm4x_driver);
|
||||||
|
if (ret) {
|
||||||
|
pr_err("Error registering etm4x driver\n");
|
||||||
|
etm4_pm_clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
device_initcall(etm4x_init);
|
||||||
|
|||||||
@@ -426,7 +426,7 @@ struct etmv4_drvdata {
|
|||||||
u8 ctxid_size;
|
u8 ctxid_size;
|
||||||
u8 vmid_size;
|
u8 vmid_size;
|
||||||
u8 ccsize;
|
u8 ccsize;
|
||||||
u8 ccitmin;
|
u16 ccitmin;
|
||||||
u8 s_ex_level;
|
u8 s_ex_level;
|
||||||
u8 ns_ex_level;
|
u8 ns_ex_level;
|
||||||
u8 q_support;
|
u8 q_support;
|
||||||
|
|||||||
@@ -413,7 +413,7 @@ static int tmc_set_etf_buffer(struct coresight_device *csdev,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
/* wrap head around to the amount of space we have */
|
/* wrap head around to the amount of space we have */
|
||||||
head = handle->head & ((buf->nr_pages << PAGE_SHIFT) - 1);
|
head = handle->head & (((unsigned long)buf->nr_pages << PAGE_SHIFT) - 1);
|
||||||
|
|
||||||
/* find the page to write to */
|
/* find the page to write to */
|
||||||
buf->cur = head / PAGE_SIZE;
|
buf->cur = head / PAGE_SIZE;
|
||||||
|
|||||||
@@ -40,7 +40,8 @@ struct etr_perf_buffer {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* Convert the perf index to an offset within the ETR buffer */
|
/* Convert the perf index to an offset within the ETR buffer */
|
||||||
#define PERF_IDX2OFF(idx, buf) ((idx) % ((buf)->nr_pages << PAGE_SHIFT))
|
#define PERF_IDX2OFF(idx, buf) \
|
||||||
|
((idx) % ((unsigned long)(buf)->nr_pages << PAGE_SHIFT))
|
||||||
|
|
||||||
/* Lower limit for ETR hardware buffer */
|
/* Lower limit for ETR hardware buffer */
|
||||||
#define TMC_ETR_PERF_MIN_BUF_SIZE SZ_1M
|
#define TMC_ETR_PERF_MIN_BUF_SIZE SZ_1M
|
||||||
@@ -1577,7 +1578,7 @@ alloc_etr_buf(struct tmc_drvdata *drvdata, struct perf_event *event,
|
|||||||
* than the size requested via sysfs.
|
* than the size requested via sysfs.
|
||||||
*/
|
*/
|
||||||
if ((nr_pages << PAGE_SHIFT) > drvdata->size) {
|
if ((nr_pages << PAGE_SHIFT) > drvdata->size) {
|
||||||
etr_buf = tmc_alloc_etr_buf(drvdata, (nr_pages << PAGE_SHIFT),
|
etr_buf = tmc_alloc_etr_buf(drvdata, ((ssize_t)nr_pages << PAGE_SHIFT),
|
||||||
0, node, NULL);
|
0, node, NULL);
|
||||||
if (!IS_ERR(etr_buf))
|
if (!IS_ERR(etr_buf))
|
||||||
goto done;
|
goto done;
|
||||||
|
|||||||
@@ -394,7 +394,7 @@ ssize_t tmc_sg_table_get_data(struct tmc_sg_table *sg_table,
|
|||||||
static inline unsigned long
|
static inline unsigned long
|
||||||
tmc_sg_table_buf_size(struct tmc_sg_table *sg_table)
|
tmc_sg_table_buf_size(struct tmc_sg_table *sg_table)
|
||||||
{
|
{
|
||||||
return sg_table->data_pages.nr_pages << PAGE_SHIFT;
|
return (unsigned long)sg_table->data_pages.nr_pages << PAGE_SHIFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct coresight_device *tmc_etr_get_catu_device(struct tmc_drvdata *drvdata);
|
struct coresight_device *tmc_etr_get_catu_device(struct tmc_drvdata *drvdata);
|
||||||
|
|||||||
@@ -233,8 +233,17 @@ static bool is_ack(struct s3c24xx_i2c *i2c)
|
|||||||
int tries;
|
int tries;
|
||||||
|
|
||||||
for (tries = 50; tries; --tries) {
|
for (tries = 50; tries; --tries) {
|
||||||
if (readl(i2c->regs + S3C2410_IICCON)
|
unsigned long tmp = readl(i2c->regs + S3C2410_IICCON);
|
||||||
& S3C2410_IICCON_IRQPEND) {
|
|
||||||
|
if (!(tmp & S3C2410_IICCON_ACKEN)) {
|
||||||
|
/*
|
||||||
|
* Wait a bit for the bus to stabilize,
|
||||||
|
* delay estimated experimentally.
|
||||||
|
*/
|
||||||
|
usleep_range(100, 200);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (tmp & S3C2410_IICCON_IRQPEND) {
|
||||||
if (!(readl(i2c->regs + S3C2410_IICSTAT)
|
if (!(readl(i2c->regs + S3C2410_IICSTAT)
|
||||||
& S3C2410_IICSTAT_LASTBIT))
|
& S3C2410_IICSTAT_LASTBIT))
|
||||||
return true;
|
return true;
|
||||||
@@ -287,16 +296,6 @@ static void s3c24xx_i2c_message_start(struct s3c24xx_i2c *i2c,
|
|||||||
|
|
||||||
stat |= S3C2410_IICSTAT_START;
|
stat |= S3C2410_IICSTAT_START;
|
||||||
writel(stat, i2c->regs + S3C2410_IICSTAT);
|
writel(stat, i2c->regs + S3C2410_IICSTAT);
|
||||||
|
|
||||||
if (i2c->quirks & QUIRK_POLL) {
|
|
||||||
while ((i2c->msg_num != 0) && is_ack(i2c)) {
|
|
||||||
i2c_s3c_irq_nextbyte(i2c, stat);
|
|
||||||
stat = readl(i2c->regs + S3C2410_IICSTAT);
|
|
||||||
|
|
||||||
if (stat & S3C2410_IICSTAT_ARBITR)
|
|
||||||
dev_err(i2c->dev, "deal with arbitration loss\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void s3c24xx_i2c_stop(struct s3c24xx_i2c *i2c, int ret)
|
static inline void s3c24xx_i2c_stop(struct s3c24xx_i2c *i2c, int ret)
|
||||||
@@ -703,7 +702,7 @@ static void s3c24xx_i2c_wait_idle(struct s3c24xx_i2c *i2c)
|
|||||||
static int s3c24xx_i2c_doxfer(struct s3c24xx_i2c *i2c,
|
static int s3c24xx_i2c_doxfer(struct s3c24xx_i2c *i2c,
|
||||||
struct i2c_msg *msgs, int num)
|
struct i2c_msg *msgs, int num)
|
||||||
{
|
{
|
||||||
unsigned long timeout;
|
unsigned long timeout = 0;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (i2c->suspended)
|
if (i2c->suspended)
|
||||||
@@ -726,15 +725,18 @@ static int s3c24xx_i2c_doxfer(struct s3c24xx_i2c *i2c,
|
|||||||
s3c24xx_i2c_message_start(i2c, msgs);
|
s3c24xx_i2c_message_start(i2c, msgs);
|
||||||
|
|
||||||
if (i2c->quirks & QUIRK_POLL) {
|
if (i2c->quirks & QUIRK_POLL) {
|
||||||
ret = i2c->msg_idx;
|
while ((i2c->msg_num != 0) && is_ack(i2c)) {
|
||||||
|
unsigned long stat = readl(i2c->regs + S3C2410_IICSTAT);
|
||||||
|
|
||||||
if (ret != num)
|
i2c_s3c_irq_nextbyte(i2c, stat);
|
||||||
dev_dbg(i2c->dev, "incomplete xfer (%d)\n", ret);
|
|
||||||
|
|
||||||
goto out;
|
stat = readl(i2c->regs + S3C2410_IICSTAT);
|
||||||
|
if (stat & S3C2410_IICSTAT_ARBITR)
|
||||||
|
dev_err(i2c->dev, "deal with arbitration loss\n");
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
timeout = wait_event_timeout(i2c->wait, i2c->msg_num == 0, HZ * 5);
|
timeout = wait_event_timeout(i2c->wait, i2c->msg_num == 0, HZ * 5);
|
||||||
|
}
|
||||||
|
|
||||||
ret = i2c->msg_idx;
|
ret = i2c->msg_idx;
|
||||||
|
|
||||||
|
|||||||
@@ -641,7 +641,7 @@ void mthca_free_mailbox(struct mthca_dev *dev, struct mthca_mailbox *mailbox)
|
|||||||
|
|
||||||
int mthca_SYS_EN(struct mthca_dev *dev)
|
int mthca_SYS_EN(struct mthca_dev *dev)
|
||||||
{
|
{
|
||||||
u64 out;
|
u64 out = 0;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = mthca_cmd_imm(dev, 0, &out, 0, 0, CMD_SYS_EN, CMD_TIME_CLASS_D);
|
ret = mthca_cmd_imm(dev, 0, &out, 0, 0, CMD_SYS_EN, CMD_TIME_CLASS_D);
|
||||||
@@ -1961,7 +1961,7 @@ int mthca_WRITE_MGM(struct mthca_dev *dev, int index,
|
|||||||
int mthca_MGID_HASH(struct mthca_dev *dev, struct mthca_mailbox *mailbox,
|
int mthca_MGID_HASH(struct mthca_dev *dev, struct mthca_mailbox *mailbox,
|
||||||
u16 *hash)
|
u16 *hash)
|
||||||
{
|
{
|
||||||
u64 imm;
|
u64 imm = 0;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = mthca_cmd_imm(dev, mailbox->dma, &imm, 0, 0, CMD_MGID_HASH,
|
err = mthca_cmd_imm(dev, mailbox->dma, &imm, 0, 0, CMD_MGID_HASH,
|
||||||
|
|||||||
@@ -382,7 +382,7 @@ static int mthca_init_icm(struct mthca_dev *mdev,
|
|||||||
struct mthca_init_hca_param *init_hca,
|
struct mthca_init_hca_param *init_hca,
|
||||||
u64 icm_size)
|
u64 icm_size)
|
||||||
{
|
{
|
||||||
u64 aux_pages;
|
u64 aux_pages = 0;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = mthca_SET_ICM_SIZE(mdev, icm_size, &aux_pages);
|
err = mthca_SET_ICM_SIZE(mdev, icm_size, &aux_pages);
|
||||||
|
|||||||
@@ -280,6 +280,7 @@ static const struct xpad_device {
|
|||||||
{ 0x146b, 0x0604, "Bigben Interactive DAIJA Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 },
|
{ 0x146b, 0x0604, "Bigben Interactive DAIJA Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 },
|
||||||
{ 0x1532, 0x0a00, "Razer Atrox Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOXONE },
|
{ 0x1532, 0x0a00, "Razer Atrox Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOXONE },
|
||||||
{ 0x1532, 0x0a03, "Razer Wildcat", 0, XTYPE_XBOXONE },
|
{ 0x1532, 0x0a03, "Razer Wildcat", 0, XTYPE_XBOXONE },
|
||||||
|
{ 0x1532, 0x0a29, "Razer Wolverine V2", 0, XTYPE_XBOXONE },
|
||||||
{ 0x15e4, 0x3f00, "Power A Mini Pro Elite", 0, XTYPE_XBOX360 },
|
{ 0x15e4, 0x3f00, "Power A Mini Pro Elite", 0, XTYPE_XBOX360 },
|
||||||
{ 0x15e4, 0x3f0a, "Xbox Airflo wired controller", 0, XTYPE_XBOX360 },
|
{ 0x15e4, 0x3f0a, "Xbox Airflo wired controller", 0, XTYPE_XBOX360 },
|
||||||
{ 0x15e4, 0x3f10, "Batarang Xbox 360 controller", 0, XTYPE_XBOX360 },
|
{ 0x15e4, 0x3f10, "Batarang Xbox 360 controller", 0, XTYPE_XBOX360 },
|
||||||
|
|||||||
@@ -717,6 +717,44 @@ static void atkbd_deactivate(struct atkbd *atkbd)
|
|||||||
ps2dev->serio->phys);
|
ps2dev->serio->phys);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_X86
|
||||||
|
static bool atkbd_is_portable_device(void)
|
||||||
|
{
|
||||||
|
static const char * const chassis_types[] = {
|
||||||
|
"8", /* Portable */
|
||||||
|
"9", /* Laptop */
|
||||||
|
"10", /* Notebook */
|
||||||
|
"14", /* Sub-Notebook */
|
||||||
|
"31", /* Convertible */
|
||||||
|
"32", /* Detachable */
|
||||||
|
};
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < ARRAY_SIZE(chassis_types); i++)
|
||||||
|
if (dmi_match(DMI_CHASSIS_TYPE, chassis_types[i]))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* On many modern laptops ATKBD_CMD_GETID may cause problems, on these laptops
|
||||||
|
* the controller is always in translated mode. In this mode mice/touchpads will
|
||||||
|
* not work. So in this case simply assume a keyboard is connected to avoid
|
||||||
|
* confusing some laptop keyboards.
|
||||||
|
*
|
||||||
|
* Skipping ATKBD_CMD_GETID ends up using a fake keyboard id. Using the standard
|
||||||
|
* 0xab83 id is ok in translated mode, only atkbd_select_set() checks atkbd->id
|
||||||
|
* and in translated mode that is a no-op.
|
||||||
|
*/
|
||||||
|
static bool atkbd_skip_getid(struct atkbd *atkbd)
|
||||||
|
{
|
||||||
|
return atkbd->translated && atkbd_is_portable_device();
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static inline bool atkbd_skip_getid(struct atkbd *atkbd) { return false; }
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* atkbd_probe() probes for an AT keyboard on a serio port.
|
* atkbd_probe() probes for an AT keyboard on a serio port.
|
||||||
*/
|
*/
|
||||||
@@ -725,6 +763,7 @@ static int atkbd_probe(struct atkbd *atkbd)
|
|||||||
{
|
{
|
||||||
struct ps2dev *ps2dev = &atkbd->ps2dev;
|
struct ps2dev *ps2dev = &atkbd->ps2dev;
|
||||||
unsigned char param[2];
|
unsigned char param[2];
|
||||||
|
bool skip_getid;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Some systems, where the bit-twiddling when testing the io-lines of the
|
* Some systems, where the bit-twiddling when testing the io-lines of the
|
||||||
@@ -746,17 +785,18 @@ static int atkbd_probe(struct atkbd *atkbd)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
param[0] = param[1] = 0xa5; /* initialize with invalid values */
|
param[0] = param[1] = 0xa5; /* initialize with invalid values */
|
||||||
if (ps2_command(ps2dev, param, ATKBD_CMD_GETID)) {
|
skip_getid = atkbd_skip_getid(atkbd);
|
||||||
|
if (skip_getid || ps2_command(ps2dev, param, ATKBD_CMD_GETID)) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If the get ID command failed, we check if we can at least set the LEDs on
|
* If the get ID command was skipped or failed, we check if we can at least set
|
||||||
* the keyboard. This should work on every keyboard out there. It also turns
|
* the LEDs on the keyboard. This should work on every keyboard out there.
|
||||||
* the LEDs off, which we want anyway.
|
* It also turns the LEDs off, which we want anyway.
|
||||||
*/
|
*/
|
||||||
param[0] = 0;
|
param[0] = 0;
|
||||||
if (ps2_command(ps2dev, param, ATKBD_CMD_SETLEDS))
|
if (ps2_command(ps2dev, param, ATKBD_CMD_SETLEDS))
|
||||||
return -1;
|
return -1;
|
||||||
atkbd->id = 0xabba;
|
atkbd->id = skip_getid ? 0xab83 : 0xabba;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -355,6 +355,14 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = {
|
|||||||
},
|
},
|
||||||
.driver_data = (void *)(SERIO_QUIRK_DRITEK)
|
.driver_data = (void *)(SERIO_QUIRK_DRITEK)
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
/* Acer TravelMate P459-G2-M */
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
|
||||||
|
DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate P459-G2-M"),
|
||||||
|
},
|
||||||
|
.driver_data = (void *)(SERIO_QUIRK_NOMUX)
|
||||||
|
},
|
||||||
{
|
{
|
||||||
/* Amoi M636/A737 */
|
/* Amoi M636/A737 */
|
||||||
.matches = {
|
.matches = {
|
||||||
|
|||||||
@@ -113,6 +113,8 @@ static int dvb_device_open(struct inode *inode, struct file *file)
|
|||||||
err = file->f_op->open(inode, file);
|
err = file->f_op->open(inode, file);
|
||||||
up_read(&minor_rwsem);
|
up_read(&minor_rwsem);
|
||||||
mutex_unlock(&dvbdev_mutex);
|
mutex_unlock(&dvbdev_mutex);
|
||||||
|
if (err)
|
||||||
|
dvb_device_put(dvbdev);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
fail:
|
fail:
|
||||||
|
|||||||
@@ -387,6 +387,7 @@ static struct msm_vidc_ctrl msm_venc_ctrls[] = {
|
|||||||
(1 << V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_2_0) |
|
(1 << V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_2_0) |
|
||||||
(1 << V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_3_0) |
|
(1 << V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_3_0) |
|
||||||
(1 << V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_4_0) |
|
(1 << V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_4_0) |
|
||||||
|
(1 << V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_4_5) |
|
||||||
(1 << V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_5_0) |
|
(1 << V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_5_0) |
|
||||||
(1 << V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_6_0) |
|
(1 << V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_6_0) |
|
||||||
(1 << V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_7_0)
|
(1 << V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_7_0)
|
||||||
|
|||||||
@@ -5056,7 +5056,7 @@ static int msm_vidc_check_mbpf_supported(struct msm_vidc_inst *inst)
|
|||||||
mutex_unlock(&core->lock);
|
mutex_unlock(&core->lock);
|
||||||
if (mbpf > 2*capability->mbs_per_frame.max) {
|
if (mbpf > 2*capability->mbs_per_frame.max) {
|
||||||
msm_vidc_print_running_insts(inst->core);
|
msm_vidc_print_running_insts(inst->core);
|
||||||
return -ENOMEM;
|
return -EBUSY;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -19,7 +19,8 @@ static void init_codecs(struct venus_core *core)
|
|||||||
struct venus_caps *caps = core->caps, *cap;
|
struct venus_caps *caps = core->caps, *cap;
|
||||||
unsigned long bit;
|
unsigned long bit;
|
||||||
|
|
||||||
if (hweight_long(core->dec_codecs) + hweight_long(core->enc_codecs) > MAX_CODEC_NUM)
|
if (hweight_long(core->dec_codecs) +
|
||||||
|
hweight_long(core->enc_codecs) > MAX_CODEC_NUM)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for_each_set_bit(bit, &core->dec_codecs, MAX_CODEC_NUM) {
|
for_each_set_bit(bit, &core->dec_codecs, MAX_CODEC_NUM) {
|
||||||
|
|||||||
@@ -222,7 +222,8 @@ static int venus_write_queue(struct venus_hfi_device *hdev,
|
|||||||
wr_ptr = (u32 *)(queue->qmem.kva + (wr_idx << 2));
|
wr_ptr = (u32 *)(queue->qmem.kva + (wr_idx << 2));
|
||||||
|
|
||||||
if (wr_ptr < (u32 *)queue->qmem.kva ||
|
if (wr_ptr < (u32 *)queue->qmem.kva ||
|
||||||
wr_ptr > (u32 *)(queue->qmem.kva + queue->qmem.size - sizeof(*wr_ptr)))
|
wr_ptr > (u32 *)(queue->qmem.kva +
|
||||||
|
queue->qmem.size - sizeof(*wr_ptr)))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (new_wr_idx < qsize) {
|
if (new_wr_idx < qsize) {
|
||||||
@@ -294,7 +295,8 @@ static int venus_read_queue(struct venus_hfi_device *hdev,
|
|||||||
rd_ptr = (u32 *)(queue->qmem.kva + (rd_idx << 2));
|
rd_ptr = (u32 *)(queue->qmem.kva + (rd_idx << 2));
|
||||||
|
|
||||||
if (rd_ptr < (u32 *)queue->qmem.kva ||
|
if (rd_ptr < (u32 *)queue->qmem.kva ||
|
||||||
rd_ptr > (u32 *)(queue->qmem.kva + queue->qmem.size - sizeof(*rd_ptr)))
|
rd_ptr > (u32 *)(queue->qmem.kva +
|
||||||
|
queue->qmem.size - sizeof(*rd_ptr)))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
dwords = *rd_ptr >> 2;
|
dwords = *rd_ptr >> 2;
|
||||||
|
|||||||
@@ -1040,6 +1040,7 @@ int cx231xx_init_isoc(struct cx231xx *dev, int max_packets,
|
|||||||
if (!dev->video_mode.isoc_ctl.urb) {
|
if (!dev->video_mode.isoc_ctl.urb) {
|
||||||
dev_err(dev->dev,
|
dev_err(dev->dev,
|
||||||
"cannot alloc memory for usb buffers\n");
|
"cannot alloc memory for usb buffers\n");
|
||||||
|
kfree(dma_q->p_left_data);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1049,6 +1050,7 @@ int cx231xx_init_isoc(struct cx231xx *dev, int max_packets,
|
|||||||
dev_err(dev->dev,
|
dev_err(dev->dev,
|
||||||
"cannot allocate memory for usbtransfer\n");
|
"cannot allocate memory for usbtransfer\n");
|
||||||
kfree(dev->video_mode.isoc_ctl.urb);
|
kfree(dev->video_mode.isoc_ctl.urb);
|
||||||
|
kfree(dma_q->p_left_data);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -277,6 +277,7 @@ void pvr2_context_disconnect(struct pvr2_context *mp)
|
|||||||
{
|
{
|
||||||
pvr2_hdw_disconnect(mp->hdw);
|
pvr2_hdw_disconnect(mp->hdw);
|
||||||
mp->disconnect_flag = !0;
|
mp->disconnect_flag = !0;
|
||||||
|
if (!pvr2_context_shutok())
|
||||||
pvr2_context_notify(mp);
|
pvr2_context_notify(mp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -868,9 +868,10 @@ static const struct block_device_operations mmc_bdops = {
|
|||||||
static int mmc_blk_part_switch_pre(struct mmc_card *card,
|
static int mmc_blk_part_switch_pre(struct mmc_card *card,
|
||||||
unsigned int part_type)
|
unsigned int part_type)
|
||||||
{
|
{
|
||||||
|
const unsigned int mask = EXT_CSD_PART_CONFIG_ACC_RPMB;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
if (part_type == EXT_CSD_PART_CONFIG_ACC_RPMB) {
|
if ((part_type & mask) == mask) {
|
||||||
if (card->ext_csd.cmdq_en) {
|
if (card->ext_csd.cmdq_en) {
|
||||||
ret = mmc_cmdq_disable(card);
|
ret = mmc_cmdq_disable(card);
|
||||||
if (ret)
|
if (ret)
|
||||||
@@ -885,9 +886,10 @@ static int mmc_blk_part_switch_pre(struct mmc_card *card,
|
|||||||
static int mmc_blk_part_switch_post(struct mmc_card *card,
|
static int mmc_blk_part_switch_post(struct mmc_card *card,
|
||||||
unsigned int part_type)
|
unsigned int part_type)
|
||||||
{
|
{
|
||||||
|
const unsigned int mask = EXT_CSD_PART_CONFIG_ACC_RPMB;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
if (part_type == EXT_CSD_PART_CONFIG_ACC_RPMB) {
|
if ((part_type & mask) == mask) {
|
||||||
mmc_retune_unpause(card->host);
|
mmc_retune_unpause(card->host);
|
||||||
if (card->reenable_cmdq && !card->ext_csd.cmdq_en)
|
if (card->reenable_cmdq && !card->ext_csd.cmdq_en)
|
||||||
ret = mmc_cmdq_enable(card);
|
ret = mmc_cmdq_enable(card);
|
||||||
@@ -3184,4 +3186,3 @@ module_exit(mmc_blk_exit);
|
|||||||
|
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
MODULE_DESCRIPTION("Multimedia Card (MMC) block device driver");
|
MODULE_DESCRIPTION("Multimedia Card (MMC) block device driver");
|
||||||
|
|
||||||
|
|||||||
@@ -726,6 +726,7 @@ EXPORT_SYMBOL(mmc_remove_host);
|
|||||||
*/
|
*/
|
||||||
void mmc_free_host(struct mmc_host *host)
|
void mmc_free_host(struct mmc_host *host)
|
||||||
{
|
{
|
||||||
|
cancel_delayed_work_sync(&host->detect);
|
||||||
mmc_crypto_free_host(host);
|
mmc_crypto_free_host(host);
|
||||||
mmc_pwrseq_free(host);
|
mmc_pwrseq_free(host);
|
||||||
put_device(&host->class_dev);
|
put_device(&host->class_dev);
|
||||||
|
|||||||
@@ -938,13 +938,14 @@ config MMC_SDHCI_XENON
|
|||||||
|
|
||||||
config MMC_SDHCI_OMAP
|
config MMC_SDHCI_OMAP
|
||||||
tristate "TI SDHCI Controller Support"
|
tristate "TI SDHCI Controller Support"
|
||||||
|
depends on ARCH_OMAP2PLUS || ARCH_KEYSTONE || COMPILE_TEST
|
||||||
depends on MMC_SDHCI_PLTFM && OF
|
depends on MMC_SDHCI_PLTFM && OF
|
||||||
select THERMAL
|
select THERMAL
|
||||||
imply TI_SOC_THERMAL
|
imply TI_SOC_THERMAL
|
||||||
help
|
help
|
||||||
This selects the Secure Digital Host Controller Interface (SDHCI)
|
This selects the Secure Digital Host Controller Interface (SDHCI)
|
||||||
support present in TI's DRA7 SOCs. The controller supports
|
support present in TI's Keystone/OMAP2+/DRA7 SOCs. The controller
|
||||||
SD/MMC/SDIO devices.
|
supports SD/MMC/SDIO devices.
|
||||||
|
|
||||||
If you have a controller with this interface, say Y or M here.
|
If you have a controller with this interface, say Y or M here.
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
|
* Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
|
||||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* drivers/mmc/host/sdhci-msm.c - Qualcomm Technologies, Inc. MSM SDHCI Platform
|
* drivers/mmc/host/sdhci-msm.c - Qualcomm Technologies, Inc. MSM SDHCI Platform
|
||||||
* driver source file
|
* driver source file
|
||||||
@@ -5042,6 +5042,44 @@ static int sdhci_msm_notify_load(struct sdhci_host *host, enum mmc_load state)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int sdhci_msm_gcc_reset(struct device *dev, struct sdhci_host *host)
|
||||||
|
{
|
||||||
|
|
||||||
|
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
|
||||||
|
struct sdhci_msm_host *msm_host = pltfm_host->priv;
|
||||||
|
struct reset_control *reset = msm_host->core_reset;
|
||||||
|
int ret = -EOPNOTSUPP;
|
||||||
|
|
||||||
|
if (!reset) {
|
||||||
|
dev_err(dev, "unable to acquire core_reset\n");
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = reset_control_assert(reset);
|
||||||
|
if (ret) {
|
||||||
|
dev_err(dev, "core_reset assert failed %d\n", ret);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The hardware requirement for delay between assert/deassert
|
||||||
|
* is at least 3-4 sleep clock (32.7KHz) cycles, which comes to
|
||||||
|
* ~125us (4/32768). To be on the safe side add 200us delay.
|
||||||
|
*/
|
||||||
|
usleep_range(200, 210);
|
||||||
|
|
||||||
|
ret = reset_control_deassert(reset);
|
||||||
|
if (ret) {
|
||||||
|
dev_err(dev, "core_reset deassert failed %d\n", ret);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
usleep_range(200, 210);
|
||||||
|
|
||||||
|
out:
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
static void sdhci_msm_hw_reset(struct sdhci_host *host)
|
static void sdhci_msm_hw_reset(struct sdhci_host *host)
|
||||||
{
|
{
|
||||||
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
|
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
|
||||||
@@ -5063,28 +5101,10 @@ static void sdhci_msm_hw_reset(struct sdhci_host *host)
|
|||||||
host->mmc->cqe_enabled = false;
|
host->mmc->cqe_enabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = reset_control_assert(msm_host->core_reset);
|
sdhci_msm_gcc_reset(&pdev->dev, host);
|
||||||
if (ret) {
|
|
||||||
dev_err(&pdev->dev, "%s: core_reset assert failed, err = %d\n",
|
|
||||||
__func__, ret);
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The hardware requirement for delay between assert/deassert
|
|
||||||
* is at least 3-4 sleep clock (32.7KHz) cycles, which comes to
|
|
||||||
* ~125us (4/32768). To be on the safe side add 200us delay.
|
|
||||||
*/
|
|
||||||
usleep_range(200, 210);
|
|
||||||
|
|
||||||
ret = reset_control_deassert(msm_host->core_reset);
|
|
||||||
if (ret)
|
|
||||||
dev_err(&pdev->dev, "%s: core_reset deassert failed, err = %d\n",
|
|
||||||
__func__, ret);
|
|
||||||
|
|
||||||
sdhci_msm_registers_restore(host);
|
sdhci_msm_registers_restore(host);
|
||||||
msm_host->reg_store = false;
|
msm_host->reg_store = false;
|
||||||
out:
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5411,6 +5431,7 @@ static int sdhci_msm_probe(struct platform_device *pdev)
|
|||||||
goto pltfm_free;
|
goto pltfm_free;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sdhci_msm_gcc_reset(&pdev->dev, host);
|
||||||
/* Setup Clocks */
|
/* Setup Clocks */
|
||||||
|
|
||||||
/* Setup SDCC bus voter clock. */
|
/* Setup SDCC bus voter clock. */
|
||||||
|
|||||||
@@ -521,7 +521,7 @@ static void blktrans_notify_add(struct mtd_info *mtd)
|
|||||||
{
|
{
|
||||||
struct mtd_blktrans_ops *tr;
|
struct mtd_blktrans_ops *tr;
|
||||||
|
|
||||||
if (mtd->type == MTD_ABSENT)
|
if (mtd->type == MTD_ABSENT || mtd->type == MTD_UBIVOLUME)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
list_for_each_entry(tr, &blktrans_majors, list)
|
list_for_each_entry(tr, &blktrans_majors, list)
|
||||||
@@ -564,7 +564,7 @@ int register_mtd_blktrans(struct mtd_blktrans_ops *tr)
|
|||||||
list_add(&tr->list, &blktrans_majors);
|
list_add(&tr->list, &blktrans_majors);
|
||||||
|
|
||||||
mtd_for_each_device(mtd)
|
mtd_for_each_device(mtd)
|
||||||
if (mtd->type != MTD_ABSENT)
|
if (mtd->type != MTD_ABSENT && mtd->type != MTD_UBIVOLUME)
|
||||||
tr->add_mtd(tr, mtd);
|
tr->add_mtd(tr, mtd);
|
||||||
|
|
||||||
mutex_unlock(&mtd_table_mutex);
|
mutex_unlock(&mtd_table_mutex);
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
#define ERR_BYTE 0xFF /* Value returned for read
|
#define ERR_BYTE 0xFF /* Value returned for read
|
||||||
bytes when read failed */
|
bytes when read failed */
|
||||||
#define IFC_TIMEOUT_MSECS 500 /* Maximum number of mSecs to wait
|
#define IFC_TIMEOUT_MSECS 1000 /* Maximum timeout to wait
|
||||||
for IFC NAND Machine */
|
for IFC NAND Machine */
|
||||||
|
|
||||||
struct fsl_ifc_ctrl;
|
struct fsl_ifc_ctrl;
|
||||||
|
|||||||
@@ -1227,6 +1227,8 @@ static int vsc73xx_gpio_probe(struct vsc73xx *vsc)
|
|||||||
|
|
||||||
vsc->gc.label = devm_kasprintf(vsc->dev, GFP_KERNEL, "VSC%04x",
|
vsc->gc.label = devm_kasprintf(vsc->dev, GFP_KERNEL, "VSC%04x",
|
||||||
vsc->chipid);
|
vsc->chipid);
|
||||||
|
if (!vsc->gc.label)
|
||||||
|
return -ENOMEM;
|
||||||
vsc->gc.ngpio = 4;
|
vsc->gc.ngpio = 4;
|
||||||
vsc->gc.owner = THIS_MODULE;
|
vsc->gc.owner = THIS_MODULE;
|
||||||
vsc->gc.parent = vsc->dev;
|
vsc->gc.parent = vsc->dev;
|
||||||
|
|||||||
@@ -7847,6 +7847,8 @@ static void bnxt_sp_task(struct work_struct *work)
|
|||||||
bnxt_cfg_ntp_filters(bp);
|
bnxt_cfg_ntp_filters(bp);
|
||||||
if (test_and_clear_bit(BNXT_HWRM_EXEC_FWD_REQ_SP_EVENT, &bp->sp_event))
|
if (test_and_clear_bit(BNXT_HWRM_EXEC_FWD_REQ_SP_EVENT, &bp->sp_event))
|
||||||
bnxt_hwrm_exec_fwd_req(bp);
|
bnxt_hwrm_exec_fwd_req(bp);
|
||||||
|
if (test_and_clear_bit(BNXT_HWRM_PF_UNLOAD_SP_EVENT, &bp->sp_event))
|
||||||
|
netdev_info(bp->dev, "Receive PF driver unload event!\n");
|
||||||
if (test_and_clear_bit(BNXT_VXLAN_ADD_PORT_SP_EVENT, &bp->sp_event)) {
|
if (test_and_clear_bit(BNXT_VXLAN_ADD_PORT_SP_EVENT, &bp->sp_event)) {
|
||||||
bnxt_hwrm_tunnel_dst_port_alloc(
|
bnxt_hwrm_tunnel_dst_port_alloc(
|
||||||
bp, bp->vxlan_port,
|
bp, bp->vxlan_port,
|
||||||
@@ -8407,8 +8409,6 @@ static void bnxt_cfg_ntp_filters(struct bnxt *bp)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (test_and_clear_bit(BNXT_HWRM_PF_UNLOAD_SP_EVENT, &bp->sp_event))
|
|
||||||
netdev_info(bp->dev, "Receive PF driver unload event!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -1650,8 +1650,10 @@ static netdev_tx_t bcmgenet_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||||||
/* Note: if we ever change from DMA_TX_APPEND_CRC below we
|
/* Note: if we ever change from DMA_TX_APPEND_CRC below we
|
||||||
* will need to restore software padding of "runt" packets
|
* will need to restore software padding of "runt" packets
|
||||||
*/
|
*/
|
||||||
|
len_stat |= DMA_TX_APPEND_CRC;
|
||||||
|
|
||||||
if (!i) {
|
if (!i) {
|
||||||
len_stat |= DMA_TX_APPEND_CRC | DMA_SOP;
|
len_stat |= DMA_SOP;
|
||||||
if (skb->ip_summed == CHECKSUM_PARTIAL)
|
if (skb->ip_summed == CHECKSUM_PARTIAL)
|
||||||
len_stat |= DMA_TX_DO_CSUM;
|
len_stat |= DMA_TX_DO_CSUM;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6449,6 +6449,14 @@ static void tg3_dump_state(struct tg3 *tp)
|
|||||||
int i;
|
int i;
|
||||||
u32 *regs;
|
u32 *regs;
|
||||||
|
|
||||||
|
/* If it is a PCI error, all registers will be 0xffff,
|
||||||
|
* we don't dump them out, just report the error and return
|
||||||
|
*/
|
||||||
|
if (tp->pdev->error_state != pci_channel_io_normal) {
|
||||||
|
netdev_err(tp->dev, "PCI channel ERROR!\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
regs = kzalloc(TG3_REG_BLK_SIZE, GFP_ATOMIC);
|
regs = kzalloc(TG3_REG_BLK_SIZE, GFP_ATOMIC);
|
||||||
if (!regs)
|
if (!regs)
|
||||||
return;
|
return;
|
||||||
@@ -11199,7 +11207,8 @@ static void tg3_reset_task(struct work_struct *work)
|
|||||||
rtnl_lock();
|
rtnl_lock();
|
||||||
tg3_full_lock(tp, 0);
|
tg3_full_lock(tp, 0);
|
||||||
|
|
||||||
if (tp->pcierr_recovery || !netif_running(tp->dev)) {
|
if (tp->pcierr_recovery || !netif_running(tp->dev) ||
|
||||||
|
tp->pdev->error_state != pci_channel_io_normal) {
|
||||||
tg3_flag_clear(tp, RESET_TASK_PENDING);
|
tg3_flag_clear(tp, RESET_TASK_PENDING);
|
||||||
tg3_full_unlock(tp);
|
tg3_full_unlock(tp);
|
||||||
rtnl_unlock();
|
rtnl_unlock();
|
||||||
|
|||||||
@@ -99,12 +99,18 @@ static struct workqueue_struct *i40e_wq;
|
|||||||
static void netdev_hw_addr_refcnt(struct i40e_mac_filter *f,
|
static void netdev_hw_addr_refcnt(struct i40e_mac_filter *f,
|
||||||
struct net_device *netdev, int delta)
|
struct net_device *netdev, int delta)
|
||||||
{
|
{
|
||||||
|
struct netdev_hw_addr_list *ha_list;
|
||||||
struct netdev_hw_addr *ha;
|
struct netdev_hw_addr *ha;
|
||||||
|
|
||||||
if (!f || !netdev)
|
if (!f || !netdev)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
netdev_for_each_mc_addr(ha, netdev) {
|
if (is_unicast_ether_addr(f->macaddr) || is_link_local_ether_addr(f->macaddr))
|
||||||
|
ha_list = &netdev->uc;
|
||||||
|
else
|
||||||
|
ha_list = &netdev->mc;
|
||||||
|
|
||||||
|
netdev_hw_addr_list_for_each(ha, ha_list) {
|
||||||
if (ether_addr_equal(ha->addr, f->macaddr)) {
|
if (ether_addr_equal(ha->addr, f->macaddr)) {
|
||||||
ha->refcount += delta;
|
ha->refcount += delta;
|
||||||
if (ha->refcount <= 0)
|
if (ha->refcount <= 0)
|
||||||
@@ -14470,6 +14476,9 @@ static void i40e_pci_error_reset_done(struct pci_dev *pdev)
|
|||||||
struct i40e_pf *pf = pci_get_drvdata(pdev);
|
struct i40e_pf *pf = pci_get_drvdata(pdev);
|
||||||
|
|
||||||
i40e_reset_and_rebuild(pf, false, false);
|
i40e_reset_and_rebuild(pf, false, false);
|
||||||
|
#ifdef CONFIG_PCI_IOV
|
||||||
|
i40e_restore_all_vfs_msi_state(pdev);
|
||||||
|
#endif /* CONFIG_PCI_IOV */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -99,6 +99,32 @@ void i40e_vc_notify_reset(struct i40e_pf *pf)
|
|||||||
(u8 *)&pfe, sizeof(struct virtchnl_pf_event));
|
(u8 *)&pfe, sizeof(struct virtchnl_pf_event));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_PCI_IOV
|
||||||
|
void i40e_restore_all_vfs_msi_state(struct pci_dev *pdev)
|
||||||
|
{
|
||||||
|
u16 vf_id;
|
||||||
|
u16 pos;
|
||||||
|
|
||||||
|
/* Continue only if this is a PF */
|
||||||
|
if (!pdev->is_physfn)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!pci_num_vf(pdev))
|
||||||
|
return;
|
||||||
|
|
||||||
|
pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_SRIOV);
|
||||||
|
if (pos) {
|
||||||
|
struct pci_dev *vf_dev = NULL;
|
||||||
|
|
||||||
|
pci_read_config_word(pdev, pos + PCI_SRIOV_VF_DID, &vf_id);
|
||||||
|
while ((vf_dev = pci_get_device(pdev->vendor, vf_id, vf_dev))) {
|
||||||
|
if (vf_dev->is_virtfn && vf_dev->physfn == pdev)
|
||||||
|
pci_restore_msi_state(vf_dev);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif /* CONFIG_PCI_IOV */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* i40e_vc_notify_vf_reset
|
* i40e_vc_notify_vf_reset
|
||||||
* @vf: pointer to the VF structure
|
* @vf: pointer to the VF structure
|
||||||
@@ -3143,16 +3169,16 @@ static int i40e_validate_cloud_filter(struct i40e_vf *vf,
|
|||||||
bool found = false;
|
bool found = false;
|
||||||
int bkt;
|
int bkt;
|
||||||
|
|
||||||
if (!tc_filter->action) {
|
if (tc_filter->action != VIRTCHNL_ACTION_TC_REDIRECT) {
|
||||||
dev_info(&pf->pdev->dev,
|
dev_info(&pf->pdev->dev,
|
||||||
"VF %d: Currently ADq doesn't support Drop Action\n",
|
"VF %d: ADQ doesn't support this action (%d)\n",
|
||||||
vf->vf_id);
|
vf->vf_id, tc_filter->action);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* action_meta is TC number here to which the filter is applied */
|
/* action_meta is TC number here to which the filter is applied */
|
||||||
if (!tc_filter->action_meta ||
|
if (!tc_filter->action_meta ||
|
||||||
tc_filter->action_meta > I40E_MAX_VF_VSI) {
|
tc_filter->action_meta > vf->num_tc) {
|
||||||
dev_info(&pf->pdev->dev, "VF %d: Invalid TC number %u\n",
|
dev_info(&pf->pdev->dev, "VF %d: Invalid TC number %u\n",
|
||||||
vf->vf_id, tc_filter->action_meta);
|
vf->vf_id, tc_filter->action_meta);
|
||||||
goto err;
|
goto err;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user