Skip to content

Commit

Permalink
Merge remote-tracking branch 'github/lineage-17.1' into lineage-18.1
Browse files Browse the repository at this point in the history
Change-Id: Ib7c727b12738429ed0cac22229db8a1c6c9b8a2c
  • Loading branch information
Flamefire committed Feb 18, 2022
2 parents 82913fc + f9f0c0b commit 7d305aa
Show file tree
Hide file tree
Showing 141 changed files with 843 additions and 328 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION = 4
PATCHLEVEL = 4
SUBLEVEL = 299
SUBLEVEL = 302
EXTRAVERSION =
NAME = Blurry Fish Butt

Expand Down
4 changes: 2 additions & 2 deletions arch/arm/boot/dts/qcom/msm8916.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
#size-cells = <2>;

aliases {
sdhc1 = &sdhc_1; /* SDC1 eMMC slot */
sdhc2 = &sdhc_2; /* SDC2 SD card slot */
mmc0 = &sdhc_1; /* SDC1 eMMC slot */
mmc1 = &sdhc_2; /* SDC2 SD card slot */
};

chosen { };
Expand Down
6 changes: 6 additions & 0 deletions arch/mips/bcm63xx/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,12 @@ struct clk *clk_get_parent(struct clk *clk)
}
EXPORT_SYMBOL(clk_get_parent);

int clk_set_parent(struct clk *clk, struct clk *parent)
{
return 0;
}
EXPORT_SYMBOL(clk_set_parent);

unsigned long clk_get_rate(struct clk *clk)
{
return clk->rate;
Expand Down
4 changes: 2 additions & 2 deletions arch/mips/include/asm/octeon/cvmx-bootinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ enum cvmx_chip_types_enum {

/* Functions to return string based on type */
#define ENUM_BRD_TYPE_CASE(x) \
case x: return(#x + 16); /* Skip CVMX_BOARD_TYPE_ */
case x: return (&#x[16]); /* Skip CVMX_BOARD_TYPE_ */
static inline const char *cvmx_board_type_to_string(enum
cvmx_board_types_enum type)
{
Expand Down Expand Up @@ -392,7 +392,7 @@ static inline const char *cvmx_board_type_to_string(enum
}

#define ENUM_CHIP_TYPE_CASE(x) \
case x: return(#x + 15); /* Skip CVMX_CHIP_TYPE */
case x: return (&#x[15]); /* Skip CVMX_CHIP_TYPE */
static inline const char *cvmx_chip_type_to_string(enum
cvmx_chip_types_enum type)
{
Expand Down
6 changes: 6 additions & 0 deletions arch/mips/lantiq/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@ struct clk *of_clk_get_from_provider(struct of_phandle_args *clkspec)
return NULL;
}

int clk_set_parent(struct clk *clk, struct clk *parent)
{
return 0;
}
EXPORT_SYMBOL(clk_set_parent);

static inline u32 get_counter_resolution(void)
{
u32 res;
Expand Down
2 changes: 1 addition & 1 deletion arch/parisc/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ void notrace handle_interruption(int code, struct pt_regs *regs)
* unless pagefault_disable() was called before.
*/

if (fault_space == 0 && !faulthandler_disabled())
if (faulthandler_disabled() || fault_space == 0)
{
/* Clean up and return if in exception table. */
if (fixup_exception(regs))
Expand Down
2 changes: 2 additions & 0 deletions arch/powerpc/boot/dts/fsl/qoriq-fman3l-0.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,15 @@ fman0: fman@400000 {
#size-cells = <0>;
compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
reg = <0xfc000 0x1000>;
fsl,erratum-a009885;
};

xmdio0: mdio@fd000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
reg = <0xfd000 0x1000>;
fsl,erratum-a009885;
};

ptp_timer0: ptp-timer@fe000 {
Expand Down
4 changes: 3 additions & 1 deletion arch/powerpc/kernel/btext.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,10 @@ int __init btext_find_display(int allow_nonstdout)
rc = btext_initialize(np);
printk("result: %d\n", rc);
}
if (rc == 0)
if (rc == 0) {
of_node_put(np);
break;
}
}
return rc;
}
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/prom_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -2526,7 +2526,7 @@ static void __init fixup_device_tree_efika_add_phy(void)

/* Check if the phy-handle property exists - bail if it does */
rv = prom_getprop(node, "phy-handle", prop, sizeof(prop));
if (!rv)
if (rv <= 0)
return;

/*
Expand Down
2 changes: 2 additions & 0 deletions arch/powerpc/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -732,10 +732,12 @@ void start_secondary(void *unused)
BUG();
}

#ifdef CONFIG_PROFILING
int setup_profiling_timer(unsigned int multiplier)
{
return 0;
}
#endif

#ifdef CONFIG_SCHED_SMT
/* cpumask of CPUs with asymetric SMT dependancy */
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/platforms/cell/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1107,6 +1107,7 @@ static int __init cell_iommu_fixed_mapping_init(void)
if (hbase < dbase || (hend > (dbase + dsize))) {
pr_debug("iommu: hash window doesn't fit in"
"real DMA window\n");
of_node_put(np);
return -1;
}
}
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/platforms/embedded6xx/hlwd-pic.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ void hlwd_pic_probe(void)
irq_set_chained_handler(cascade_virq,
hlwd_pic_irq_cascade);
hlwd_irq_host = host;
of_node_put(np);
break;
}
}
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/platforms/powernv/opal-lpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@ void opal_lpc_init(void)
if (!of_get_property(np, "primary", NULL))
continue;
opal_lpc_chip_id = of_get_ibm_chip_id(np);
of_node_put(np);
break;
}
if (opal_lpc_chip_id < 0)
Expand Down
6 changes: 4 additions & 2 deletions arch/s390/hypfs/hypfs_vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

static char local_guest[] = " ";
static char all_guests[] = "* ";
static char *all_groups = all_guests;
static char *guest_query;

struct diag2fc_data {
Expand Down Expand Up @@ -61,10 +62,11 @@ static int diag2fc(int size, char* query, void *addr)

memcpy(parm_list.userid, query, NAME_LEN);
ASCEBC(parm_list.userid, NAME_LEN);
parm_list.addr = (unsigned long) addr ;
memcpy(parm_list.aci_grp, all_groups, NAME_LEN);
ASCEBC(parm_list.aci_grp, NAME_LEN);
parm_list.addr = (unsigned long)addr;
parm_list.size = size;
parm_list.fmt = 0x02;
memset(parm_list.aci_grp, 0x40, NAME_LEN);
rc = -1;

diag_stat_inc(DIAG_STAT_X2FC);
Expand Down
4 changes: 2 additions & 2 deletions arch/um/include/shared/registers.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ extern int restore_fp_registers(int pid, unsigned long *fp_regs);
extern int save_fpx_registers(int pid, unsigned long *fp_regs);
extern int restore_fpx_registers(int pid, unsigned long *fp_regs);
extern int save_registers(int pid, struct uml_pt_regs *regs);
extern int restore_registers(int pid, struct uml_pt_regs *regs);
extern int init_registers(int pid);
extern int restore_pid_registers(int pid, struct uml_pt_regs *regs);
extern int init_pid_registers(int pid);
extern void get_safe_registers(unsigned long *regs, unsigned long *fp_regs);
extern unsigned long get_thread_reg(int reg, jmp_buf *buf);
extern int get_fp_registers(int pid, unsigned long *regs);
Expand Down
4 changes: 2 additions & 2 deletions arch/um/os-Linux/registers.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ int save_registers(int pid, struct uml_pt_regs *regs)
return 0;
}

int restore_registers(int pid, struct uml_pt_regs *regs)
int restore_pid_registers(int pid, struct uml_pt_regs *regs)
{
int err;

Expand All @@ -36,7 +36,7 @@ int restore_registers(int pid, struct uml_pt_regs *regs)
static unsigned long exec_regs[MAX_REG_NR];
static unsigned long exec_fp_regs[FP_SIZE];

int init_registers(int pid)
int init_pid_registers(int pid)
{
int err;

Expand Down
2 changes: 1 addition & 1 deletion arch/um/os-Linux/start_up.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ void __init os_early_checks(void)
check_tmpexec();

pid = start_ptraced_child();
if (init_registers(pid))
if (init_pid_registers(pid))
fatal("Failed to initialize default registers");
stop_ptraced_child(pid, 1, 1);
}
Expand Down
14 changes: 7 additions & 7 deletions arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -4417,20 +4417,20 @@ static int emulator_write_std(struct x86_emulate_ctxt *ctxt, gva_t addr, void *v
if (!system && kvm_x86_ops->get_cpl(vcpu) == 3)
access |= PFERR_USER_MASK;

/*
* FIXME: this should call handle_emulation_failure if X86EMUL_IO_NEEDED
* is returned, but our callers are not ready for that and they blindly
* call kvm_inject_page_fault. Ensure that they at least do not leak
* uninitialized kernel stack memory into cr2 and error code.
*/
memset(exception, 0, sizeof(*exception));
return kvm_write_guest_virt_helper(addr, val, bytes, vcpu,
access, exception);
}

int kvm_write_guest_virt_system(struct kvm_vcpu *vcpu, gva_t addr, void *val,
unsigned int bytes, struct x86_exception *exception)
{
/*
* FIXME: this should call handle_emulation_failure if X86EMUL_IO_NEEDED
* is returned, but our callers are not ready for that and they blindly
* call kvm_inject_page_fault. Ensure that they at least do not leak
* uninitialized kernel stack memory into cr2 and error code.
*/
memset(exception, 0, sizeof(*exception));
return kvm_write_guest_virt_helper(addr, val, bytes, vcpu,
PFERR_WRITE_MASK, exception);
}
Expand Down
3 changes: 2 additions & 1 deletion arch/x86/um/syscalls_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <linux/uaccess.h>
#include <asm/prctl.h> /* XXX This should get the constants from libc */
#include <os.h>
#include <registers.h>

long arch_prctl(struct task_struct *task, int code, unsigned long __user *addr)
{
Expand All @@ -32,7 +33,7 @@ long arch_prctl(struct task_struct *task, int code, unsigned long __user *addr)
switch (code) {
case ARCH_SET_FS:
case ARCH_SET_GS:
ret = restore_registers(pid, &current->thread.regs.regs);
ret = restore_pid_registers(pid, &current->thread.regs.regs);
if (ret)
return ret;
break;
Expand Down
3 changes: 2 additions & 1 deletion drivers/acpi/acpica/exoparg1.c
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,8 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
(walk_state, return_desc,
&temp_desc);
if (ACPI_FAILURE(status)) {
goto cleanup;
return_ACPI_STATUS
(status);
}

return_desc = temp_desc;
Expand Down
1 change: 1 addition & 0 deletions drivers/acpi/acpica/utdelete.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ acpi_ut_update_ref_count(union acpi_operand_object *object, u32 action)
ACPI_WARNING((AE_INFO,
"Obj %p, Reference Count is already zero, cannot decrement\n",
object));
return;
}

ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS,
Expand Down
6 changes: 4 additions & 2 deletions drivers/block/floppy.c
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ static DECLARE_DELAYED_WORK(fd_timer, fd_timer_workfn);
static void cancel_activity(void)
{
do_floppy = NULL;
cancel_delayed_work_sync(&fd_timer);
cancel_delayed_work(&fd_timer);
cancel_work_sync(&floppy_work);
}

Expand Down Expand Up @@ -3116,6 +3116,8 @@ static void raw_cmd_free(struct floppy_raw_cmd **ptr)
}
}

#define MAX_LEN (1UL << MAX_ORDER << PAGE_SHIFT)

static int raw_cmd_copyin(int cmd, void __user *param,
struct floppy_raw_cmd **rcmd)
{
Expand Down Expand Up @@ -3153,7 +3155,7 @@ static int raw_cmd_copyin(int cmd, void __user *param,
ptr->resultcode = 0;

if (ptr->flags & (FD_RAW_READ | FD_RAW_WRITE)) {
if (ptr->length <= 0)
if (ptr->length <= 0 || ptr->length >= MAX_LEN)
return -EINVAL;
ptr->kernel_data = (char *)fd_dma_mem_alloc(ptr->length);
fallback_on_nodma_alloc(&ptr->kernel_data, ptr->length);
Expand Down
3 changes: 3 additions & 0 deletions drivers/bluetooth/bfusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,9 @@ static int bfusb_probe(struct usb_interface *intf, const struct usb_device_id *i
data->bulk_out_ep = bulk_out_ep->desc.bEndpointAddress;
data->bulk_pkt_size = le16_to_cpu(bulk_out_ep->desc.wMaxPacketSize);

if (!data->bulk_pkt_size)
goto done;

rwlock_init(&data->lock);

data->reassembly = NULL;
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/mwave/3780i.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ typedef struct {
unsigned char ClockControl:1; /* RW: Clock control: 0=normal, 1=stop 3780i clocks */
unsigned char SoftReset:1; /* RW: Soft reset 0=normal, 1=soft reset active */
unsigned char ConfigMode:1; /* RW: Configuration mode, 0=normal, 1=config mode */
unsigned char Reserved:5; /* 0: Reserved */
unsigned short Reserved:13; /* 0: Reserved */
} DSP_ISA_SLAVE_CONTROL;


Expand Down
2 changes: 1 addition & 1 deletion drivers/crypto/qce/sha.c
Original file line number Diff line number Diff line change
Expand Up @@ -539,8 +539,8 @@ static int qce_ahash_register_one(const struct qce_ahash_def *def,

ret = crypto_register_ahash(alg);
if (ret) {
kfree(tmpl);
dev_err(qce->dev, "%s registration failed\n", base->cra_name);
kfree(tmpl);
return ret;
}

Expand Down
32 changes: 15 additions & 17 deletions drivers/dma/at_xdmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
#define AT_XDMAC_CNDC_NDE (0x1 << 0) /* Channel x Next Descriptor Enable */
#define AT_XDMAC_CNDC_NDSUP (0x1 << 1) /* Channel x Next Descriptor Source Update */
#define AT_XDMAC_CNDC_NDDUP (0x1 << 2) /* Channel x Next Descriptor Destination Update */
#define AT_XDMAC_CNDC_NDVIEW_MASK GENMASK(28, 27)
#define AT_XDMAC_CNDC_NDVIEW_NDV0 (0x0 << 3) /* Channel x Next Descriptor View 0 */
#define AT_XDMAC_CNDC_NDVIEW_NDV1 (0x1 << 3) /* Channel x Next Descriptor View 1 */
#define AT_XDMAC_CNDC_NDVIEW_NDV2 (0x2 << 3) /* Channel x Next Descriptor View 2 */
Expand Down Expand Up @@ -232,15 +233,15 @@ struct at_xdmac {

/* Linked List Descriptor */
struct at_xdmac_lld {
dma_addr_t mbr_nda; /* Next Descriptor Member */
u32 mbr_ubc; /* Microblock Control Member */
dma_addr_t mbr_sa; /* Source Address Member */
dma_addr_t mbr_da; /* Destination Address Member */
u32 mbr_cfg; /* Configuration Register */
u32 mbr_bc; /* Block Control Register */
u32 mbr_ds; /* Data Stride Register */
u32 mbr_sus; /* Source Microblock Stride Register */
u32 mbr_dus; /* Destination Microblock Stride Register */
u32 mbr_nda; /* Next Descriptor Member */
u32 mbr_ubc; /* Microblock Control Member */
u32 mbr_sa; /* Source Address Member */
u32 mbr_da; /* Destination Address Member */
u32 mbr_cfg; /* Configuration Register */
u32 mbr_bc; /* Block Control Register */
u32 mbr_ds; /* Data Stride Register */
u32 mbr_sus; /* Source Microblock Stride Register */
u32 mbr_dus; /* Destination Microblock Stride Register */
};

/* 64-bit alignment needed to update CNDA and CUBC registers in an atomic way. */
Expand Down Expand Up @@ -345,9 +346,6 @@ static void at_xdmac_start_xfer(struct at_xdmac_chan *atchan,

dev_vdbg(chan2dev(&atchan->chan), "%s: desc 0x%p\n", __func__, first);

if (at_xdmac_chan_is_enabled(atchan))
return;

/* Set transfer as active to not try to start it again. */
first->active_xfer = true;

Expand All @@ -363,7 +361,8 @@ static void at_xdmac_start_xfer(struct at_xdmac_chan *atchan,
*/
if (at_xdmac_chan_is_cyclic(atchan))
reg = AT_XDMAC_CNDC_NDVIEW_NDV1;
else if (first->lld.mbr_ubc & AT_XDMAC_MBR_UBC_NDV3)
else if ((first->lld.mbr_ubc &
AT_XDMAC_CNDC_NDVIEW_MASK) == AT_XDMAC_MBR_UBC_NDV3)
reg = AT_XDMAC_CNDC_NDVIEW_NDV3;
else
reg = AT_XDMAC_CNDC_NDVIEW_NDV2;
Expand Down Expand Up @@ -428,13 +427,12 @@ static dma_cookie_t at_xdmac_tx_submit(struct dma_async_tx_descriptor *tx)
spin_lock_irqsave(&atchan->lock, irqflags);
cookie = dma_cookie_assign(tx);

list_add_tail(&desc->xfer_node, &atchan->xfers_list);
spin_unlock_irqrestore(&atchan->lock, irqflags);

dev_vdbg(chan2dev(tx->chan), "%s: atchan 0x%p, add desc 0x%p to xfers_list\n",
__func__, atchan, desc);
list_add_tail(&desc->xfer_node, &atchan->xfers_list);
if (list_is_singular(&atchan->xfers_list))
at_xdmac_start_xfer(atchan, desc);

spin_unlock_irqrestore(&atchan->lock, irqflags);
return cookie;
}

Expand Down
Loading

0 comments on commit 7d305aa

Please sign in to comment.