Skip to content

Commit

Permalink
Merge branch 'android-msm-bluecross-4.9' into android-msm-pixel-4.9
Browse files Browse the repository at this point in the history
Bug: 119540871
Change-Id: Ic655747be2e2733844ffd77251c2e275b32794c1
Signed-off-by: Robin Peng <robinpeng@google.com>
  • Loading branch information
Robin Peng committed Apr 1, 2019
2 parents 7bc52af + 03904fb commit 0f7bd72
Show file tree
Hide file tree
Showing 208 changed files with 1,679 additions and 811 deletions.
24 changes: 14 additions & 10 deletions Documentation/arm64/tagged-pointers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,21 @@ this byte for application use.
Passing tagged addresses to the kernel
--------------------------------------

All interpretation of userspace memory addresses by the kernel assumes
an address tag of 0x00.
Some initial work for supporting non-zero address tags passed to the
kernel has been done. As of now, the kernel supports tags in:

This includes, but is not limited to, addresses found in:
- user fault addresses

- pointer arguments to system calls, including pointers in structures
passed to system calls,
- pointer arguments (including pointers in structures), which don't
describe virtual memory ranges, passed to system calls

All other interpretations of userspace memory addresses by the kernel
assume an address tag of 0x00. This includes, but is not limited to,
addresses found in:

- pointer arguments (including pointers in structures), which describe
virtual memory ranges, passed to memory system calls (mmap, mprotect,
etc.)

- the stack pointer (sp), e.g. when interpreting it to deliver a
signal,
Expand All @@ -33,11 +41,7 @@ This includes, but is not limited to, addresses found in:

Using non-zero address tags in any of these locations may result in an
error code being returned, a (fatal) signal being raised, or other modes
of failure.

For these reasons, passing non-zero address tags to the kernel via
system calls is forbidden, and using a non-zero address tag for sp is
strongly discouraged.
of failure. Using a non-zero address tag for sp is strongly discouraged.

Programs maintaining a frame pointer and frame records that use non-zero
address tags may suffer impaired or inaccurate debug and profiling
Expand Down
18 changes: 18 additions & 0 deletions Documentation/cgroup-v2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,12 @@ All time durations are in microseconds.
$PERIOD duration. If only one number is written, $MAX is
updated.

cpu.pressure
A read-only nested-key file which exists on non-root cgroups.

Shows pressure stall information for CPU. See
Documentation/accounting/psi.txt for details.


5-2. Memory

Expand Down Expand Up @@ -925,6 +931,12 @@ PAGE_SIZE multiple when read back.
Swap usage hard limit. If a cgroup's swap usage reaches this
limit, anonymous meomry of the cgroup will not be swapped out.

memory.pressure
A read-only nested-key file which exists on non-root cgroups.

Shows pressure stall information for memory. See
Documentation/accounting/psi.txt for details.


5-2-2. Usage Guidelines

Expand Down Expand Up @@ -1055,6 +1067,12 @@ blk-mq devices.

8:16 rbps=2097152 wbps=max riops=max wiops=max

io.pressure
A read-only nested-key file which exists on non-root cgroups.

Shows pressure stall information for IO. See
Documentation/accounting/psi.txt for details.


5-3-2. Writeback

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION = 4
PATCHLEVEL = 9
SUBLEVEL = 163
SUBLEVEL = 165
EXTRAVERSION =
NAME = Roaring Lionus

Expand Down
8 changes: 4 additions & 4 deletions arch/arc/include/asm/uaccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ __arc_copy_from_user(void *to, const void __user *from, unsigned long n)
*/
"=&r" (tmp), "+r" (to), "+r" (from)
:
: "lp_count", "lp_start", "lp_end", "memory");
: "lp_count", "memory");

return n;
}
Expand Down Expand Up @@ -438,7 +438,7 @@ __arc_copy_to_user(void __user *to, const void *from, unsigned long n)
*/
"=&r" (tmp), "+r" (to), "+r" (from)
:
: "lp_count", "lp_start", "lp_end", "memory");
: "lp_count", "memory");

return n;
}
Expand Down Expand Up @@ -658,7 +658,7 @@ static inline unsigned long __arc_clear_user(void __user *to, unsigned long n)
" .previous \n"
: "+r"(d_char), "+r"(res)
: "i"(0)
: "lp_count", "lp_start", "lp_end", "memory");
: "lp_count", "memory");

return res;
}
Expand Down Expand Up @@ -691,7 +691,7 @@ __arc_strncpy_from_user(char *dst, const char __user *src, long count)
" .previous \n"
: "+r"(res), "+r"(dst), "+r"(src), "=r"(val)
: "g"(-EFAULT), "r"(count)
: "lp_count", "lp_start", "lp_end", "memory");
: "lp_count", "memory");

return res;
}
Expand Down
14 changes: 0 additions & 14 deletions arch/arc/lib/memcpy-archs.S
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,18 @@
#endif

#ifdef CONFIG_ARC_HAS_LL64
# define PREFETCH_READ(RX) prefetch [RX, 56]
# define PREFETCH_WRITE(RX) prefetchw [RX, 64]
# define LOADX(DST,RX) ldd.ab DST, [RX, 8]
# define STOREX(SRC,RX) std.ab SRC, [RX, 8]
# define ZOLSHFT 5
# define ZOLAND 0x1F
#else
# define PREFETCH_READ(RX) prefetch [RX, 28]
# define PREFETCH_WRITE(RX) prefetchw [RX, 32]
# define LOADX(DST,RX) ld.ab DST, [RX, 4]
# define STOREX(SRC,RX) st.ab SRC, [RX, 4]
# define ZOLSHFT 4
# define ZOLAND 0xF
#endif

ENTRY_CFI(memcpy)
prefetch [r1] ; Prefetch the read location
prefetchw [r0] ; Prefetch the write location
mov.f 0, r2
;;; if size is zero
jz.d [blink]
Expand Down Expand Up @@ -72,8 +66,6 @@ ENTRY_CFI(memcpy)
lpnz @.Lcopy32_64bytes
;; LOOP START
LOADX (r6, r1)
PREFETCH_READ (r1)
PREFETCH_WRITE (r3)
LOADX (r8, r1)
LOADX (r10, r1)
LOADX (r4, r1)
Expand Down Expand Up @@ -117,9 +109,7 @@ ENTRY_CFI(memcpy)
lpnz @.Lcopy8bytes_1
;; LOOP START
ld.ab r6, [r1, 4]
prefetch [r1, 28] ;Prefetch the next read location
ld.ab r8, [r1,4]
prefetchw [r3, 32] ;Prefetch the next write location

SHIFT_1 (r7, r6, 24)
or r7, r7, r5
Expand Down Expand Up @@ -162,9 +152,7 @@ ENTRY_CFI(memcpy)
lpnz @.Lcopy8bytes_2
;; LOOP START
ld.ab r6, [r1, 4]
prefetch [r1, 28] ;Prefetch the next read location
ld.ab r8, [r1,4]
prefetchw [r3, 32] ;Prefetch the next write location

SHIFT_1 (r7, r6, 16)
or r7, r7, r5
Expand Down Expand Up @@ -204,9 +192,7 @@ ENTRY_CFI(memcpy)
lpnz @.Lcopy8bytes_3
;; LOOP START
ld.ab r6, [r1, 4]
prefetch [r1, 28] ;Prefetch the next read location
ld.ab r8, [r1,4]
prefetchw [r3, 32] ;Prefetch the next write location

SHIFT_1 (r7, r6, 8)
or r7, r7, r5
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1490,8 +1490,8 @@ config NR_CPUS

config HOTPLUG_CPU
bool "Support for hot-pluggable CPUs"
select GENERIC_IRQ_MIGRATION
depends on SMP
select GENERIC_IRQ_MIGRATION
help
Say Y here to experiment with turning CPUs off and on. CPUs
can be controlled through /sys/devices/system/cpu.
Expand Down
1 change: 0 additions & 1 deletion arch/arm/include/asm/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#ifndef __ASSEMBLY__
struct irqaction;
struct pt_regs;
extern void migrate_irqs(void);

extern void asm_do_IRQ(unsigned int, struct pt_regs *);
void handle_IRQ(unsigned int, struct pt_regs *);
Expand Down
75 changes: 0 additions & 75 deletions arch/arm/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include <linux/smp.h>
#include <linux/init.h>
#include <linux/seq_file.h>
#include <linux/ratelimit.h>
#include <linux/errno.h>
#include <linux/list.h>
#include <linux/kallsyms.h>
Expand Down Expand Up @@ -120,77 +119,3 @@ int __init arch_probe_nr_irqs(void)
return nr_irqs;
}
#endif

#ifdef CONFIG_HOTPLUG_CPU
static bool migrate_one_irq(struct irq_desc *desc)
{
struct irq_data *d = irq_desc_get_irq_data(desc);
const struct cpumask *affinity = irq_data_get_affinity_mask(d);
struct irq_chip *c;
bool ret = false;
struct cpumask available_cpus;

/*
* If this is a per-CPU interrupt, or the affinity does not
* include this CPU, then we have nothing to do.
*/
if (irqd_is_per_cpu(d) || !cpumask_test_cpu(smp_processor_id(), affinity))
return false;

cpumask_copy(&available_cpus, affinity);
cpumask_andnot(&available_cpus, &available_cpus, cpu_isolated_mask);
affinity = &available_cpus;

if (cpumask_any_and(affinity, cpu_online_mask) >= nr_cpu_ids) {
cpumask_andnot(&available_cpus, cpu_online_mask,
cpu_isolated_mask);
if (cpumask_empty(affinity))
affinity = cpu_online_mask;
ret = true;
}

c = irq_data_get_irq_chip(d);
if (!c->irq_set_affinity) {
pr_debug("IRQ%u: unable to set affinity\n", d->irq);
} else {
int r = irq_set_affinity_locked(d, affinity, false);

if (r)
pr_warn_ratelimited("IRQ%u: set affinity failed(%d).\n",
d->irq, r);
}

return ret;
}

/*
* The current CPU has been marked offline. Migrate IRQs off this CPU.
* If the affinity settings do not allow other CPUs, force them onto any
* available CPU.
*
* Note: we must iterate over all IRQs, whether they have an attached
* action structure or not, as we need to get chained interrupts too.
*/
void migrate_irqs(void)
{
unsigned int i;
struct irq_desc *desc;
unsigned long flags;

local_irq_save(flags);

for_each_irq_desc(i, desc) {
bool affinity_broken;

raw_spin_lock(&desc->lock);
affinity_broken = migrate_one_irq(desc);
raw_spin_unlock(&desc->lock);

if (affinity_broken)
pr_warn_ratelimited("IRQ%u no longer affine to CPU%u\n",
i, smp_processor_id());
}

local_irq_restore(flags);
}
#endif /* CONFIG_HOTPLUG_CPU */
2 changes: 1 addition & 1 deletion arch/arm/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ int __cpu_disable(void)
/*
* OK - migrate IRQs away from this CPU
*/
migrate_irqs();
irq_migrate_all_off_this_cpu();

/*
* Flush user cache and TLB mappings, and then remove this CPU
Expand Down
7 changes: 6 additions & 1 deletion arch/arm/mach-omap2/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes)
u32 enable_mask, enable_shift;
u32 pipd_mask, pipd_shift;
u32 reg;
int ret;

if (dsi_id == 0) {
enable_mask = OMAP4_DSI1_LANEENABLE_MASK;
Expand All @@ -130,7 +131,11 @@ static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes)
return -ENODEV;
}

regmap_read(omap4_dsi_mux_syscon, OMAP4_DSIPHY_SYSCON_OFFSET, &reg);
ret = regmap_read(omap4_dsi_mux_syscon,
OMAP4_DSIPHY_SYSCON_OFFSET,
&reg);
if (ret)
return ret;

reg &= ~enable_mask;
reg &= ~pipd_mask;
Expand Down
8 changes: 4 additions & 4 deletions arch/arm/mach-s3c24xx/mach-osiris-dvs.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,16 @@ static int osiris_dvs_notify(struct notifier_block *nb,

switch (val) {
case CPUFREQ_PRECHANGE:
if (old_dvs & !new_dvs ||
cur_dvs & !new_dvs) {
if ((old_dvs && !new_dvs) ||
(cur_dvs && !new_dvs)) {
pr_debug("%s: exiting dvs\n", __func__);
cur_dvs = false;
gpio_set_value(OSIRIS_GPIO_DVS, 1);
}
break;
case CPUFREQ_POSTCHANGE:
if (!old_dvs & new_dvs ||
!cur_dvs & new_dvs) {
if ((!old_dvs && new_dvs) ||
(!cur_dvs && new_dvs)) {
pr_debug("entering dvs\n");
cur_dvs = true;
gpio_set_value(OSIRIS_GPIO_DVS, 0);
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/google/sdm845-b1c1-thermal-v2.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
quiet-therm-adc {
trips {
shutdown-config {
temperature = <62000>;
temperature = <64000>;
hysteresis = <1000>;
type = "critical";
};
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/google/sdm845-b1c1-thermal.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@
type = "passive";
};
shutdown-config {
temperature = <57000>;
temperature = <59000>;
hysteresis = <1000>;
type = "critical";
};
Expand Down
5 changes: 5 additions & 0 deletions arch/arm64/configs/b1c1_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ CONFIG_NET_SCH_HTB=y
CONFIG_NET_SCH_PRIO=y
CONFIG_NET_SCH_MULTIQ=y
CONFIG_NET_SCH_NETEM=y
CONFIG_NET_SCH_FQ_CODEL=y
CONFIG_NET_SCH_PIE=y
CONFIG_NET_SCH_INGRESS=y
CONFIG_NET_CLS_FW=y
CONFIG_NET_CLS_U32=y
Expand Down Expand Up @@ -286,6 +288,8 @@ CONFIG_SCSI_UFSHCD_PLATFORM=y
CONFIG_SCSI_UFS_QCOM=y
CONFIG_SCSI_UFS_QCOM_ICE=y
CONFIG_SCSI_UFSHCD_CMD_LOGGING=y
CONFIG_SCSI_UFS_IMPAIRED=y
CONFIG_SCSI_UFS_IMPAIRED_FRAGFTL=y
CONFIG_MD=y
CONFIG_BLK_DEV_DM=y
CONFIG_DM_CRYPT=y
Expand Down Expand Up @@ -369,6 +373,7 @@ CONFIG_POWER_RESET_QCOM=y
CONFIG_QCOM_DLOAD_MODE=y
CONFIG_POWER_RESET_XGENE=y
CONFIG_POWER_RESET_SYSCON=y
CONFIG_DEBUG_REBOOT=y
CONFIG_BATTERY_MAX1720X=y
CONFIG_GOOGLE_CHARGER=y
CONFIG_USB_OVERHEAT_MITIGATION=y
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/configs/cuttlefish_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ CONFIG_TASKSTATS=y
CONFIG_TASK_DELAY_ACCT=y
CONFIG_TASK_XACCT=y
CONFIG_TASK_IO_ACCOUNTING=y
CONFIG_PSI=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_CGROUP_FREEZER=y
Expand Down
Loading

0 comments on commit 0f7bd72

Please sign in to comment.