Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2e380921 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge changes I9aeab111,I7c574d2e,I91a62cfc,I274ac72d,Ide59d8c2 into msm-next

* changes:
  workqueue: fix possible livelock with concurrent mod_delayed_work()
  pinctrl: qcom: Add syscore system suspend/resume
  arm64: Dump stack for all CPUs on SMP CPU stop
  arm64: Add back print of processor name and rev
  drivers: GICv3: remove the rtb logs of gic write and read
parents 5460afcd 52eea4fa
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -114,8 +114,8 @@ static inline void gic_write_bpr1(u32 val)
	write_sysreg_s(val, SYS_ICC_BPR1_EL1);
}

#define gic_read_typer(c)		readq_relaxed(c)
#define gic_write_irouter(v, c)		writeq_relaxed(v, c)
#define gic_read_typer(c)		readq_relaxed_no_log(c)
#define gic_write_irouter(v, c)		writeq_relaxed_no_log(v, c)

#define gic_flush_dcache_to_poc(a,l)	__flush_dcache_area((a), (l))

+3 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#include <asm/cpu.h>
#include <asm/cputype.h>
#include <asm/cpufeature.h>
#include <asm/elf.h>

#include <linux/bitops.h>
#include <linux/bug.h>
@@ -119,6 +120,8 @@ static int c_show(struct seq_file *m, void *v)
	int i, j;
	bool compat = personality(current->personality) == PER_LINUX32;

	seq_printf(m, "Processor\t: AArch64 Processor rev %d (%s)\n",
		read_cpuid_id() & 15, ELF_PLATFORM);
	for_each_present_cpu(i) {
		struct cpuinfo_arm64 *cpuinfo = &per_cpu(cpu_data, i);
		u32 midr = cpuinfo->reg_midr;
+9 −0
Original line number Diff line number Diff line
@@ -830,11 +830,20 @@ void arch_irq_work_raise(void)
}
#endif

static DEFINE_RAW_SPINLOCK(stop_lock);
/*
 * ipi_cpu_stop - handle IPI from smp_send_stop()
 */
static void ipi_cpu_stop(unsigned int cpu)
{
	if (system_state == SYSTEM_BOOTING ||
	    system_state == SYSTEM_RUNNING) {
		raw_spin_lock(&stop_lock);
		pr_crit("CPU%u: stopping\n", cpu);
		dump_stack();
		raw_spin_unlock(&stop_lock);
	}

	set_cpu_active(cpu, false);

	local_irq_disable();
+3 −2
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ static void gic_do_wait_for_rwp(void __iomem *base)
{
	u32 count = 1000000;	/* 1s! */

	while (readl_relaxed(base + GICD_CTLR) & GICD_CTLR_RWP) {
	while (readl_relaxed_no_log(base + GICD_CTLR) & GICD_CTLR_RWP) {
		count--;
		if (!count) {
			pr_err_ratelimited("RWP timeout, gone fishing\n");
@@ -178,7 +178,8 @@ static int gic_peek_irq(struct irq_data *d, u32 offset)
	else
		base = gic_data.dist_base;

	return !!(readl_relaxed(base + offset + (gic_irq(d) / 32) * 4) & mask);
	return !!(readl_relaxed_no_log
		(base + offset + (gic_irq(d) / 32) * 4) & mask);
}

static void gic_poke_irq(struct irq_data *d, u32 offset)
+54 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2013, Sony Mobile Communications AB.
 * Copyright (c) 2013, The Linux Foundation. All rights reserved.
 * Copyright (c) 2013-2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -27,6 +27,7 @@
#include <linux/gpio.h>
#include <linux/interrupt.h>
#include <linux/spinlock.h>
#include <linux/syscore_ops.h>
#include <linux/reboot.h>
#include <linux/pm.h>
#include <linux/log2.h>
@@ -70,6 +71,8 @@ struct msm_pinctrl {
	void __iomem *regs;
};

static struct msm_pinctrl *msm_pinctrl_data;

static int msm_get_groups_count(struct pinctrl_dev *pctldev)
{
	struct msm_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev);
@@ -877,6 +880,52 @@ static void msm_pinctrl_setup_pm_reset(struct msm_pinctrl *pctrl)
		}
}

#ifdef CONFIG_PM
static int msm_pinctrl_suspend(void)
{
	return 0;
}

static void msm_pinctrl_resume(void)
{
	int i, irq;
	u32 val;
	unsigned long flags;
	struct irq_desc *desc;
	const struct msm_pingroup *g;
	const char *name = "null";
	struct msm_pinctrl *pctrl = msm_pinctrl_data;

	if (!msm_show_resume_irq_mask)
		return;

	raw_spin_lock_irqsave(&pctrl->lock, flags);
	for_each_set_bit(i, pctrl->enabled_irqs, pctrl->chip.ngpio) {
		g = &pctrl->soc->groups[i];
		val = readl_relaxed(pctrl->regs + g->intr_status_reg);
		if (val & BIT(g->intr_status_bit)) {
			irq = irq_find_mapping(pctrl->chip.irqdomain, i);
			desc = irq_to_desc(irq);
			if (desc == NULL)
				name = "stray irq";
			else if (desc->action && desc->action->name)
				name = desc->action->name;

			pr_warn("%s: %d triggered %s\n", __func__, irq, name);
		}
	}
	raw_spin_unlock_irqrestore(&pctrl->lock, flags);
}
#else
#define msm_pinctrl_suspend NULL
#define msm_pinctrl_resume NULL
#endif

static struct syscore_ops msm_pinctrl_pm_ops = {
	.suspend = msm_pinctrl_suspend,
	.resume = msm_pinctrl_resume,
};

int msm_pinctrl_probe(struct platform_device *pdev,
		      const struct msm_pinctrl_soc_data *soc_data)
{
@@ -884,7 +933,8 @@ int msm_pinctrl_probe(struct platform_device *pdev,
	struct resource *res;
	int ret;

	pctrl = devm_kzalloc(&pdev->dev, sizeof(*pctrl), GFP_KERNEL);
	msm_pinctrl_data = pctrl = devm_kzalloc(&pdev->dev,
				sizeof(*pctrl), GFP_KERNEL);
	if (!pctrl) {
		dev_err(&pdev->dev, "Can't allocate msm_pinctrl\n");
		return -ENOMEM;
@@ -924,6 +974,7 @@ int msm_pinctrl_probe(struct platform_device *pdev,

	platform_set_drvdata(pdev, pctrl);

	register_syscore_ops(&msm_pinctrl_pm_ops);
	dev_dbg(&pdev->dev, "Probed Qualcomm pinctrl driver\n");

	return 0;
@@ -937,6 +988,7 @@ int msm_pinctrl_remove(struct platform_device *pdev)
	gpiochip_remove(&pctrl->chip);

	unregister_restart_handler(&pctrl->restart_nb);
	unregister_syscore_ops(&msm_pinctrl_pm_ops);

	return 0;
}
Loading