Skip to content

Commit c1ca198

Browse files
committed
Merge remote-tracking branch 'googlesource/android-4.9-q'
2 parents 0451892 + ea282bd commit c1ca198

File tree

226 files changed

+1853
-643
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

226 files changed

+1853
-643
lines changed

Documentation/ABI/testing/sysfs-bus-iio

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1491,7 +1491,8 @@ What: /sys/bus/iio/devices/iio:deviceX/in_concentrationX_voc_raw
14911491
KernelVersion: 4.3
14921492
Contact: linux-iio@vger.kernel.org
14931493
Description:
1494-
Raw (unscaled no offset etc.) percentage reading of a substance.
1494+
Raw (unscaled no offset etc.) reading of a substance. Units
1495+
after application of scale and offset are percents.
14951496

14961497
What: /sys/bus/iio/devices/iio:deviceX/in_resistance_raw
14971498
What: /sys/bus/iio/devices/iio:deviceX/in_resistanceX_raw

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VERSION = 4
22
PATCHLEVEL = 9
3-
SUBLEVEL = 232
3+
SUBLEVEL = 233
44
EXTRAVERSION = -EMS-LTO-GCC11-DragonTC.CLANG.9
55
NAME = Roaring Lionus
66

arch/arm/include/asm/percpu.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
#ifndef _ASM_ARM_PERCPU_H_
1717
#define _ASM_ARM_PERCPU_H_
1818

19+
#include <asm/thread_info.h>
20+
1921
/*
2022
* Same as asm-generic/percpu.h, except that we store the per cpu offset
2123
* in the TPIDRPRW. TPIDRPRW only exists on V6K and V7

arch/arm/kernel/hw_breakpoint.c

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,12 @@ static void disable_single_step(struct perf_event *bp)
688688
arch_install_hw_breakpoint(bp);
689689
}
690690

691+
static int watchpoint_fault_on_uaccess(struct pt_regs *regs,
692+
struct arch_hw_breakpoint *info)
693+
{
694+
return !user_mode(regs) && info->ctrl.privilege == ARM_BREAKPOINT_USER;
695+
}
696+
691697
static void watchpoint_handler(unsigned long addr, unsigned int fsr,
692698
struct pt_regs *regs)
693699
{
@@ -747,16 +753,27 @@ static void watchpoint_handler(unsigned long addr, unsigned int fsr,
747753
}
748754

749755
pr_debug("watchpoint fired: address = 0x%x\n", info->trigger);
756+
757+
/*
758+
* If we triggered a user watchpoint from a uaccess routine,
759+
* then handle the stepping ourselves since userspace really
760+
* can't help us with this.
761+
*/
762+
if (watchpoint_fault_on_uaccess(regs, info))
763+
goto step;
764+
750765
perf_bp_event(wp, regs);
751766

752767
/*
753-
* If no overflow handler is present, insert a temporary
754-
* mismatch breakpoint so we can single-step over the
755-
* watchpoint trigger.
768+
* Defer stepping to the overflow handler if one is installed.
769+
* Otherwise, insert a temporary mismatch breakpoint so that
770+
* we can single-step over the watchpoint trigger.
756771
*/
757-
if (is_default_overflow_handler(wp))
758-
enable_single_step(wp, instruction_pointer(regs));
772+
if (!is_default_overflow_handler(wp))
773+
goto unlock;
759774

775+
step:
776+
enable_single_step(wp, instruction_pointer(regs));
760777
unlock:
761778
rcu_read_unlock();
762779
}

arch/arm/kernel/stacktrace.c

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@
1919
* A simple function epilogue looks like this:
2020
* ldm sp, {fp, sp, pc}
2121
*
22+
* When compiled with clang, pc and sp are not pushed. A simple function
23+
* prologue looks like this when built with clang:
24+
*
25+
* stmdb {..., fp, lr}
26+
* add fp, sp, #x
27+
* sub sp, sp, #y
28+
*
29+
* A simple function epilogue looks like this when built with clang:
30+
*
31+
* sub sp, fp, #x
32+
* ldm {..., fp, pc}
33+
*
34+
*
2235
* Note that with framepointer enabled, even the leaf functions have the same
2336
* prologue and epilogue, therefore we can ignore the LR value in this case.
2437
*/
@@ -31,6 +44,16 @@ int notrace unwind_frame(struct stackframe *frame)
3144
low = frame->sp;
3245
high = ALIGN(low, THREAD_SIZE);
3346

47+
#ifdef CONFIG_CC_IS_CLANG
48+
/* check current frame pointer is within bounds */
49+
if (fp < low + 4 || fp > high - 4)
50+
return -EINVAL;
51+
52+
frame->sp = frame->fp;
53+
frame->fp = *(unsigned long *)(fp);
54+
frame->pc = frame->lr;
55+
frame->lr = *(unsigned long *)(fp + 4);
56+
#else
3457
/* check current frame pointer is within bounds */
3558
if (fp < low + 12 || fp > high - 4)
3659
return -EINVAL;
@@ -39,6 +62,7 @@ int notrace unwind_frame(struct stackframe *frame)
3962
frame->fp = *(unsigned long *)(fp - 12);
4063
frame->sp = *(unsigned long *)(fp - 8);
4164
frame->pc = *(unsigned long *)(fp - 4);
65+
#endif
4266

4367
return 0;
4468
}

arch/arm/mach-at91/pm.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,26 +411,31 @@ static void __init at91_pm_sram_init(void)
411411
sram_pool = gen_pool_get(&pdev->dev, NULL);
412412
if (!sram_pool) {
413413
pr_warn("%s: sram pool unavailable!\n", __func__);
414-
return;
414+
goto out_put_device;
415415
}
416416

417417
sram_base = gen_pool_alloc(sram_pool, at91_pm_suspend_in_sram_sz);
418418
if (!sram_base) {
419419
pr_warn("%s: unable to alloc sram!\n", __func__);
420-
return;
420+
goto out_put_device;
421421
}
422422

423423
sram_pbase = gen_pool_virt_to_phys(sram_pool, sram_base);
424424
at91_suspend_sram_fn = __arm_ioremap_exec(sram_pbase,
425425
at91_pm_suspend_in_sram_sz, false);
426426
if (!at91_suspend_sram_fn) {
427427
pr_warn("SRAM: Could not map\n");
428-
return;
428+
goto out_put_device;
429429
}
430430

431431
/* Copy the pm suspend handler to SRAM */
432432
at91_suspend_sram_fn = fncpy(at91_suspend_sram_fn,
433433
&at91_pm_suspend_in_sram, at91_pm_suspend_in_sram_sz);
434+
return;
435+
436+
out_put_device:
437+
put_device(&pdev->dev);
438+
return;
434439
}
435440

436441
static const struct of_device_id atmel_pmc_ids[] __initconst = {

arch/arm/mach-socfpga/pm.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ static int socfpga_setup_ocram_self_refresh(void)
6060
if (!ocram_pool) {
6161
pr_warn("%s: ocram pool unavailable!\n", __func__);
6262
ret = -ENODEV;
63-
goto put_node;
63+
goto put_device;
6464
}
6565

6666
ocram_base = gen_pool_alloc(ocram_pool, socfpga_sdram_self_refresh_sz);
6767
if (!ocram_base) {
6868
pr_warn("%s: unable to alloc ocram!\n", __func__);
6969
ret = -ENOMEM;
70-
goto put_node;
70+
goto put_device;
7171
}
7272

7373
ocram_pbase = gen_pool_virt_to_phys(ocram_pool, ocram_base);
@@ -78,7 +78,7 @@ static int socfpga_setup_ocram_self_refresh(void)
7878
if (!suspend_ocram_base) {
7979
pr_warn("%s: __arm_ioremap_exec failed!\n", __func__);
8080
ret = -ENOMEM;
81-
goto put_node;
81+
goto put_device;
8282
}
8383

8484
/* Copy the code that puts DDR in self refresh to ocram */
@@ -92,6 +92,8 @@ static int socfpga_setup_ocram_self_refresh(void)
9292
if (!socfpga_sdram_self_refresh_in_ocram)
9393
ret = -EFAULT;
9494

95+
put_device:
96+
put_device(&pdev->dev);
9597
put_node:
9698
of_node_put(np);
9799

0 commit comments

Comments
 (0)