Skip to content

Commit

Permalink
Merge branch 'android-4.19-stable' of https://android.googlesource.co…
Browse files Browse the repository at this point in the history
  • Loading branch information
ppajda committed Jun 19, 2023
2 parents 55dd602 + 5ac3d09 commit 259b8c3
Show file tree
Hide file tree
Showing 115 changed files with 1,642 additions and 1,473 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 4
PATCHLEVEL = 19
SUBLEVEL = 284
SUBLEVEL = 286
EXTRAVERSION =
NAME = "People's Front"

Expand Down Expand Up @@ -900,6 +900,10 @@ endif
KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable)

KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable)

# These result in bogus false positives
KBUILD_CFLAGS += $(call cc-disable-warning, dangling-pointer)

ifdef CONFIG_FRAME_POINTER
KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
else
Expand Down
1,813 changes: 882 additions & 931 deletions android/abi_gki_aarch64.xml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions android/abi_gki_aarch64_qcom
Original file line number Diff line number Diff line change
Expand Up @@ -1426,6 +1426,7 @@
kernel_read
kernel_write
kern_path
kill_anon_super
kobject_add
kobject_init
kobj_sysfs_ops
Expand Down
82 changes: 82 additions & 0 deletions arch/arm/boot/dts/stm32f7-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,88 @@
slew-rate = <2>;
};
};

can1_pins_a: can1-0 {
pins1 {
pinmux = <STM32_PINMUX('A', 12, AF9)>; /* CAN1_TX */
};
pins2 {
pinmux = <STM32_PINMUX('A', 11, AF9)>; /* CAN1_RX */
bias-pull-up;
};
};

can1_pins_b: can1-1 {
pins1 {
pinmux = <STM32_PINMUX('B', 9, AF9)>; /* CAN1_TX */
};
pins2 {
pinmux = <STM32_PINMUX('B', 8, AF9)>; /* CAN1_RX */
bias-pull-up;
};
};

can1_pins_c: can1-2 {
pins1 {
pinmux = <STM32_PINMUX('D', 1, AF9)>; /* CAN1_TX */
};
pins2 {
pinmux = <STM32_PINMUX('D', 0, AF9)>; /* CAN1_RX */
bias-pull-up;

};
};

can1_pins_d: can1-3 {
pins1 {
pinmux = <STM32_PINMUX('H', 13, AF9)>; /* CAN1_TX */
};
pins2 {
pinmux = <STM32_PINMUX('H', 14, AF9)>; /* CAN1_RX */
bias-pull-up;

};
};

can2_pins_a: can2-0 {
pins1 {
pinmux = <STM32_PINMUX('B', 6, AF9)>; /* CAN2_TX */
};
pins2 {
pinmux = <STM32_PINMUX('B', 5, AF9)>; /* CAN2_RX */
bias-pull-up;
};
};

can2_pins_b: can2-1 {
pins1 {
pinmux = <STM32_PINMUX('B', 13, AF9)>; /* CAN2_TX */
};
pins2 {
pinmux = <STM32_PINMUX('B', 12, AF9)>; /* CAN2_RX */
bias-pull-up;
};
};

can3_pins_a: can3-0 {
pins1 {
pinmux = <STM32_PINMUX('A', 15, AF11)>; /* CAN3_TX */
};
pins2 {
pinmux = <STM32_PINMUX('A', 8, AF11)>; /* CAN3_RX */
bias-pull-up;
};
};

can3_pins_b: can3-1 {
pins1 {
pinmux = <STM32_PINMUX('B', 4, AF11)>; /* CAN3_TX */
};
pins2 {
pinmux = <STM32_PINMUX('B', 3, AF11)>; /* CAN3_RX */
bias-pull-up;
};
};
};
};
};
25 changes: 24 additions & 1 deletion arch/arm/kernel/unwind.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,29 @@ static int unwind_exec_pop_subset_r0_to_r3(struct unwind_ctrl_block *ctrl,
return URC_OK;
}

static unsigned long unwind_decode_uleb128(struct unwind_ctrl_block *ctrl)
{
unsigned long bytes = 0;
unsigned long insn;
unsigned long result = 0;

/*
* unwind_get_byte() will advance `ctrl` one instruction at a time, so
* loop until we get an instruction byte where bit 7 is not set.
*
* Note: This decodes a maximum of 4 bytes to output 28 bits data where
* max is 0xfffffff: that will cover a vsp increment of 1073742336, hence
* it is sufficient for unwinding the stack.
*/
do {
insn = unwind_get_byte(ctrl);
result |= (insn & 0x7f) << (bytes * 7);
bytes++;
} while (!!(insn & 0x80) && (bytes != sizeof(result)));

return result;
}

/*
* Execute the current unwind instruction.
*/
Expand Down Expand Up @@ -366,7 +389,7 @@ static int unwind_exec_insn(struct unwind_ctrl_block *ctrl)
if (ret)
goto error;
} else if (insn == 0xb2) {
unsigned long uleb128 = unwind_get_byte(ctrl);
unsigned long uleb128 = unwind_decode_uleb128(ctrl);

ctrl->vrs[SP] += 0x204 + (uleb128 << 2);
} else {
Expand Down
4 changes: 2 additions & 2 deletions arch/arm64/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,8 @@ static void do_bad_area(unsigned long addr, unsigned int esr, struct pt_regs *re
}
}

#define VM_FAULT_BADMAP 0x010000
#define VM_FAULT_BADACCESS 0x020000
#define VM_FAULT_BADMAP ((__force vm_fault_t)0x010000)
#define VM_FAULT_BADACCESS ((__force vm_fault_t)0x020000)

static int __do_page_fault(struct vm_area_struct *vma, unsigned long addr,
unsigned int mm_flags, unsigned long vm_flags,
Expand Down
36 changes: 24 additions & 12 deletions arch/x86/boot/boot.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,66 +114,78 @@ typedef unsigned int addr_t;

static inline u8 rdfs8(addr_t addr)
{
u8 *ptr = (u8 *)absolute_pointer(addr);
u8 v;
asm volatile("movb %%fs:%1,%0" : "=q" (v) : "m" (*(u8 *)addr));
asm volatile("movb %%fs:%1,%0" : "=q" (v) : "m" (*ptr));
return v;
}
static inline u16 rdfs16(addr_t addr)
{
u16 *ptr = (u16 *)absolute_pointer(addr);
u16 v;
asm volatile("movw %%fs:%1,%0" : "=r" (v) : "m" (*(u16 *)addr));
asm volatile("movw %%fs:%1,%0" : "=r" (v) : "m" (*ptr));
return v;
}
static inline u32 rdfs32(addr_t addr)
{
u32 *ptr = (u32 *)absolute_pointer(addr);
u32 v;
asm volatile("movl %%fs:%1,%0" : "=r" (v) : "m" (*(u32 *)addr));
asm volatile("movl %%fs:%1,%0" : "=r" (v) : "m" (*ptr));
return v;
}

static inline void wrfs8(u8 v, addr_t addr)
{
asm volatile("movb %1,%%fs:%0" : "+m" (*(u8 *)addr) : "qi" (v));
u8 *ptr = (u8 *)absolute_pointer(addr);
asm volatile("movb %1,%%fs:%0" : "+m" (*ptr) : "qi" (v));
}
static inline void wrfs16(u16 v, addr_t addr)
{
asm volatile("movw %1,%%fs:%0" : "+m" (*(u16 *)addr) : "ri" (v));
u16 *ptr = (u16 *)absolute_pointer(addr);
asm volatile("movw %1,%%fs:%0" : "+m" (*ptr) : "ri" (v));
}
static inline void wrfs32(u32 v, addr_t addr)
{
asm volatile("movl %1,%%fs:%0" : "+m" (*(u32 *)addr) : "ri" (v));
u32 *ptr = (u32 *)absolute_pointer(addr);
asm volatile("movl %1,%%fs:%0" : "+m" (*ptr) : "ri" (v));
}

static inline u8 rdgs8(addr_t addr)
{
u8 *ptr = (u8 *)absolute_pointer(addr);
u8 v;
asm volatile("movb %%gs:%1,%0" : "=q" (v) : "m" (*(u8 *)addr));
asm volatile("movb %%gs:%1,%0" : "=q" (v) : "m" (*ptr));
return v;
}
static inline u16 rdgs16(addr_t addr)
{
u16 *ptr = (u16 *)absolute_pointer(addr);
u16 v;
asm volatile("movw %%gs:%1,%0" : "=r" (v) : "m" (*(u16 *)addr));
asm volatile("movw %%gs:%1,%0" : "=r" (v) : "m" (*ptr));
return v;
}
static inline u32 rdgs32(addr_t addr)
{
u32 *ptr = (u32 *)absolute_pointer(addr);
u32 v;
asm volatile("movl %%gs:%1,%0" : "=r" (v) : "m" (*(u32 *)addr));
asm volatile("movl %%gs:%1,%0" : "=r" (v) : "m" (*ptr));
return v;
}

static inline void wrgs8(u8 v, addr_t addr)
{
asm volatile("movb %1,%%gs:%0" : "+m" (*(u8 *)addr) : "qi" (v));
u8 *ptr = (u8 *)absolute_pointer(addr);
asm volatile("movb %1,%%gs:%0" : "+m" (*ptr) : "qi" (v));
}
static inline void wrgs16(u16 v, addr_t addr)
{
asm volatile("movw %1,%%gs:%0" : "+m" (*(u16 *)addr) : "ri" (v));
u16 *ptr = (u16 *)absolute_pointer(addr);
asm volatile("movw %1,%%gs:%0" : "+m" (*ptr) : "ri" (v));
}
static inline void wrgs32(u32 v, addr_t addr)
{
asm volatile("movl %1,%%gs:%0" : "+m" (*(u32 *)addr) : "ri" (v));
u32 *ptr = (u32 *)absolute_pointer(addr);
asm volatile("movl %1,%%gs:%0" : "+m" (*ptr) : "ri" (v));
}

/* Note: these only return true/false, not a signed return value! */
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/boot/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static void copy_boot_params(void)
u16 cl_offset;
};
const struct old_cmdline * const oldcmd =
(const struct old_cmdline *)OLD_CL_ADDRESS;
absolute_pointer(OLD_CL_ADDRESS);

BUILD_BUG_ON(sizeof boot_params != 4096);
memcpy(&boot_params.hdr, &hdr, sizeof hdr);
Expand Down
2 changes: 0 additions & 2 deletions drivers/acpi/thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1172,8 +1172,6 @@ static int acpi_thermal_resume(struct device *dev)
return -EINVAL;

for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE; i++) {
if (!(&tz->trips.active[i]))
break;
if (!tz->trips.active[i].flags.valid)
break;
tz->trips.active[i].flags.enabled = 1;
Expand Down
34 changes: 26 additions & 8 deletions drivers/ata/libata-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -3053,18 +3053,36 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc)
return 0;
}

static struct ata_device *ata_find_dev(struct ata_port *ap, int devno)
static struct ata_device *ata_find_dev(struct ata_port *ap, unsigned int devno)
{
if (!sata_pmp_attached(ap)) {
if (likely(devno >= 0 &&
devno < ata_link_max_devices(&ap->link)))
/*
* For the non-PMP case, ata_link_max_devices() returns 1 (SATA case),
* or 2 (IDE master + slave case). However, the former case includes
* libsas hosted devices which are numbered per scsi host, leading
* to devno potentially being larger than 0 but with each struct
* ata_device having its own struct ata_port and struct ata_link.
* To accommodate these, ignore devno and always use device number 0.
*/
if (likely(!sata_pmp_attached(ap))) {
int link_max_devices = ata_link_max_devices(&ap->link);

if (link_max_devices == 1)
return &ap->link.device[0];

if (devno < link_max_devices)
return &ap->link.device[devno];
} else {
if (likely(devno >= 0 &&
devno < ap->nr_pmp_links))
return &ap->pmp_link[devno].device[0];

return NULL;
}

/*
* For PMP-attached devices, the device number corresponds to C
* (channel) of SCSI [H:C:I:L], indicating the port pmp link
* for the device.
*/
if (devno < ap->nr_pmp_links)
return &ap->pmp_link[devno].device[0];

return NULL;
}

Expand Down
6 changes: 4 additions & 2 deletions drivers/base/regmap/regmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1825,15 +1825,17 @@ int _regmap_raw_write(struct regmap *map, unsigned int reg,
size_t val_count = val_len / val_bytes;
size_t chunk_count, chunk_bytes;
size_t chunk_regs = val_count;
size_t max_data = map->max_raw_write - map->format.reg_bytes -
map->format.pad_bytes;
int ret, i;

if (!val_count)
return -EINVAL;

if (map->use_single_write)
chunk_regs = 1;
else if (map->max_raw_write && val_len > map->max_raw_write)
chunk_regs = map->max_raw_write / val_bytes;
else if (map->max_raw_write && val_len > max_data)
chunk_regs = max_data / val_bytes;

chunk_count = val_count / chunk_regs;
chunk_bytes = chunk_regs * val_bytes;
Expand Down
4 changes: 2 additions & 2 deletions drivers/block/nbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1547,7 +1547,7 @@ static int nbd_dev_dbg_init(struct nbd_device *nbd)
return -EIO;

dir = debugfs_create_dir(nbd_name(nbd), nbd_dbg_dir);
if (!dir) {
if (IS_ERR(dir)) {
dev_err(nbd_to_dev(nbd), "Failed to create debugfs dir for '%s'\n",
nbd_name(nbd));
return -EIO;
Expand All @@ -1573,7 +1573,7 @@ static int nbd_dbg_init(void)
struct dentry *dbg_dir;

dbg_dir = debugfs_create_dir("nbd", NULL);
if (!dbg_dir)
if (IS_ERR(dbg_dir))
return -EIO;

nbd_dbg_dir = dbg_dir;
Expand Down
8 changes: 4 additions & 4 deletions drivers/dma/pl330.c
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,7 @@ static bool _trigger(struct pl330_thread *thrd)
return true;
}

static bool _start(struct pl330_thread *thrd)
static bool pl330_start_thread(struct pl330_thread *thrd)
{
switch (_state(thrd)) {
case PL330_STATE_FAULT_COMPLETING:
Expand Down Expand Up @@ -1690,7 +1690,7 @@ static int pl330_update(struct pl330_dmac *pl330)
thrd->req_running = -1;

/* Get going again ASAP */
_start(thrd);
pl330_start_thread(thrd);

/* For now, just make a list of callbacks to be done */
list_add_tail(&descdone->rqd, &pl330->req_done);
Expand Down Expand Up @@ -2076,7 +2076,7 @@ static void pl330_tasklet(unsigned long data)
} else {
/* Make sure the PL330 Channel thread is active */
spin_lock(&pch->thread->dmac->lock);
_start(pch->thread);
pl330_start_thread(pch->thread);
spin_unlock(&pch->thread->dmac->lock);
}

Expand All @@ -2094,7 +2094,7 @@ static void pl330_tasklet(unsigned long data)
if (power_down) {
pch->active = true;
spin_lock(&pch->thread->dmac->lock);
_start(pch->thread);
pl330_start_thread(pch->thread);
spin_unlock(&pch->thread->dmac->lock);
power_down = false;
}
Expand Down
Loading

0 comments on commit 259b8c3

Please sign in to comment.