LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 2/3] powerpc/cpuhp: BUG -> WARN conversion in offline path
From: Christophe Leroy @ 2021-09-20 14:26 UTC (permalink / raw)
  To: Nathan Lynch, linuxppc-dev; +Cc: tyreld, ldufour, aneesh.kumar, danielhb413
In-Reply-To: <20210920135504.1792219-3-nathanl@linux.ibm.com>



Le 20/09/2021 à 15:55, Nathan Lynch a écrit :
> If, due to bugs elsewhere, we get into unregister_cpu_online() with a CPU
> that isn't marked hotpluggable, we can emit a warning and return an
> appropriate error instead of crashing.

Is it only a bug situation, or is it something that can happen in real 
life ?

If it can happen in real life, kernels with panic_on_warn will still be 
impacted.

> 
> Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
> ---
>   arch/powerpc/kernel/sysfs.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c
> index defecb3b1b15..08d8072d6e7a 100644
> --- a/arch/powerpc/kernel/sysfs.c
> +++ b/arch/powerpc/kernel/sysfs.c
> @@ -928,7 +928,8 @@ static int unregister_cpu_online(unsigned int cpu)
>   	struct device_attribute *attrs, *pmc_attrs;
>   	int i, nattrs;
>   
> -	BUG_ON(!c->hotpluggable);
> +	if (WARN_RATELIMIT(!c->hotpluggable, "cpu %d can't be offlined\n", cpu))
> +		return -EBUSY;
>   
>   #ifdef CONFIG_PPC64
>   	if (cpu_has_feature(CPU_FTR_SMT))
> 

^ permalink raw reply

* [PATCH 3/3] powerpc/pseries/cpuhp: delete add/remove_by_count code
From: Nathan Lynch @ 2021-09-20 13:55 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: tyreld, ldufour, aneesh.kumar, danielhb413
In-Reply-To: <20210920135504.1792219-1-nathanl@linux.ibm.com>

The core DLPAR code supports two actions (add and remove) and three
subtypes of action:

* By DRC index: the action is attempted on a single specified resource.
  This is the usual case for processors.
* By indexed count: the action is attempted on a range of resources
  beginning at the specified index. This is implemented only by the memory
  DLPAR code.
* By count: the lower layer (CPU or memory) is responsible for locating the
  specified number of resources to which the action can be applied.

I cannot find any evidence of the "by count" subtype being used by drmgr or
qemu for processors. And when I try to exercise this code, the add case
does not work:

  $ ppc64_cpu --smt ; nproc
  SMT=8
  24
  $ printf "cpu remove count 2" > /sys/kernel/dlpar
  $ nproc
  8
  $ printf "cpu add count 2" > /sys/kernel/dlpar
  -bash: printf: write error: Invalid argument
  $ dmesg | tail -2
  pseries-hotplug-cpu: Failed to find enough CPUs (1 of 2) to add
  dlpar: Could not handle DLPAR request "cpu add count 2"
  $ nproc
  8
  $ drmgr -c cpu -a -q 2         # this uses the by-index method
  Validating CPU DLPAR capability...yes.
  CPU 1
  CPU 17
  $ nproc
  24

This is because find_drc_info_cpus_to_add() does not increment drc_index
appropriately during its search.

This is not hard to fix. But the _by_count() functions also have the
property that they attempt to roll back all prior operations if the entire
request cannot be satisfied, even though the rollback itself can encounter
errors. It's not possible to provide transaction-like behavior at this
level, and it's undesirable to have code that can only pretend to do that.
Any users of these functions cannot know what the state of the system is in
the error case. And the error paths are, to my knowledge, impossible to
test without adding custom error injection code.

Summary:

* This code has not worked reliably since its introduction.
* There is no evidence that it is used.
* It contains questionable rollback behaviors in error paths which are
  difficult to test.

So let's remove it.

Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
Fixes: ac71380071d1 ("powerpc/pseries: Add CPU dlpar remove functionality")
Fixes: 90edf184b9b7 ("powerpc/pseries: Add CPU dlpar add functionality")
Fixes: b015f6bc9547 ("powerpc/pseries: Add cpu DLPAR support for drc-info property")
---
 arch/powerpc/platforms/pseries/hotplug-cpu.c | 218 +------------------
 1 file changed, 2 insertions(+), 216 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c
index 87a0fbe9cf12..768997261ce8 100644
--- a/arch/powerpc/platforms/pseries/hotplug-cpu.c
+++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c
@@ -741,216 +741,6 @@ static int dlpar_cpu_remove_by_index(u32 drc_index)
 	return rc;
 }
 
-static int find_dlpar_cpus_to_remove(u32 *cpu_drcs, int cpus_to_remove)
-{
-	struct device_node *dn;
-	int cpus_found = 0;
-	int rc;
-
-	/* We want to find cpus_to_remove + 1 CPUs to ensure we do not
-	 * remove the last CPU.
-	 */
-	for_each_node_by_type(dn, "cpu") {
-		cpus_found++;
-
-		if (cpus_found > cpus_to_remove) {
-			of_node_put(dn);
-			break;
-		}
-
-		/* Note that cpus_found is always 1 ahead of the index
-		 * into the cpu_drcs array, so we use cpus_found - 1
-		 */
-		rc = of_property_read_u32(dn, "ibm,my-drc-index",
-					  &cpu_drcs[cpus_found - 1]);
-		if (rc) {
-			pr_warn("Error occurred getting drc-index for %pOFn\n",
-				dn);
-			of_node_put(dn);
-			return -1;
-		}
-	}
-
-	if (cpus_found < cpus_to_remove) {
-		pr_warn("Failed to find enough CPUs (%d of %d) to remove\n",
-			cpus_found, cpus_to_remove);
-	} else if (cpus_found == cpus_to_remove) {
-		pr_warn("Cannot remove all CPUs\n");
-	}
-
-	return cpus_found;
-}
-
-static int dlpar_cpu_remove_by_count(u32 cpus_to_remove)
-{
-	u32 *cpu_drcs;
-	int cpus_found;
-	int cpus_removed = 0;
-	int i, rc;
-
-	pr_debug("Attempting to hot-remove %d CPUs\n", cpus_to_remove);
-
-	cpu_drcs = kcalloc(cpus_to_remove, sizeof(*cpu_drcs), GFP_KERNEL);
-	if (!cpu_drcs)
-		return -EINVAL;
-
-	cpus_found = find_dlpar_cpus_to_remove(cpu_drcs, cpus_to_remove);
-	if (cpus_found <= cpus_to_remove) {
-		kfree(cpu_drcs);
-		return -EINVAL;
-	}
-
-	for (i = 0; i < cpus_to_remove; i++) {
-		rc = dlpar_cpu_remove_by_index(cpu_drcs[i]);
-		if (rc)
-			break;
-
-		cpus_removed++;
-	}
-
-	if (cpus_removed != cpus_to_remove) {
-		pr_warn("CPU hot-remove failed, adding back removed CPUs\n");
-
-		for (i = 0; i < cpus_removed; i++)
-			dlpar_cpu_add(cpu_drcs[i]);
-
-		rc = -EINVAL;
-	} else {
-		rc = 0;
-	}
-
-	kfree(cpu_drcs);
-	return rc;
-}
-
-static int find_drc_info_cpus_to_add(struct device_node *cpus,
-				     struct property *info,
-				     u32 *cpu_drcs, u32 cpus_to_add)
-{
-	struct of_drc_info drc;
-	const __be32 *value;
-	u32 count, drc_index;
-	int cpus_found = 0;
-	int i, j;
-
-	if (!info)
-		return -1;
-
-	value = of_prop_next_u32(info, NULL, &count);
-	if (value)
-		value++;
-
-	for (i = 0; i < count; i++) {
-		of_read_drc_info_cell(&info, &value, &drc);
-		if (strncmp(drc.drc_type, "CPU", 3))
-			break;
-
-		drc_index = drc.drc_index_start;
-		for (j = 0; j < drc.num_sequential_elems; j++) {
-			if (dlpar_cpu_exists(cpus, drc_index))
-				continue;
-
-			cpu_drcs[cpus_found++] = drc_index;
-
-			if (cpus_found == cpus_to_add)
-				return cpus_found;
-
-			drc_index += drc.sequential_inc;
-		}
-	}
-
-	return cpus_found;
-}
-
-static int find_drc_index_cpus_to_add(struct device_node *cpus,
-				      u32 *cpu_drcs, u32 cpus_to_add)
-{
-	int cpus_found = 0;
-	int index, rc;
-	u32 drc_index;
-
-	/* Search the ibm,drc-indexes array for possible CPU drcs to
-	 * add. Note that the format of the ibm,drc-indexes array is
-	 * the number of entries in the array followed by the array
-	 * of drc values so we start looking at index = 1.
-	 */
-	index = 1;
-	while (cpus_found < cpus_to_add) {
-		rc = of_property_read_u32_index(cpus, "ibm,drc-indexes",
-						index++, &drc_index);
-
-		if (rc)
-			break;
-
-		if (dlpar_cpu_exists(cpus, drc_index))
-			continue;
-
-		cpu_drcs[cpus_found++] = drc_index;
-	}
-
-	return cpus_found;
-}
-
-static int dlpar_cpu_add_by_count(u32 cpus_to_add)
-{
-	struct device_node *parent;
-	struct property *info;
-	u32 *cpu_drcs;
-	int cpus_added = 0;
-	int cpus_found;
-	int i, rc;
-
-	pr_debug("Attempting to hot-add %d CPUs\n", cpus_to_add);
-
-	cpu_drcs = kcalloc(cpus_to_add, sizeof(*cpu_drcs), GFP_KERNEL);
-	if (!cpu_drcs)
-		return -EINVAL;
-
-	parent = of_find_node_by_path("/cpus");
-	if (!parent) {
-		pr_warn("Could not find CPU root node in device tree\n");
-		kfree(cpu_drcs);
-		return -1;
-	}
-
-	info = of_find_property(parent, "ibm,drc-info", NULL);
-	if (info)
-		cpus_found = find_drc_info_cpus_to_add(parent, info, cpu_drcs, cpus_to_add);
-	else
-		cpus_found = find_drc_index_cpus_to_add(parent, cpu_drcs, cpus_to_add);
-
-	of_node_put(parent);
-
-	if (cpus_found < cpus_to_add) {
-		pr_warn("Failed to find enough CPUs (%d of %d) to add\n",
-			cpus_found, cpus_to_add);
-		kfree(cpu_drcs);
-		return -EINVAL;
-	}
-
-	for (i = 0; i < cpus_to_add; i++) {
-		rc = dlpar_cpu_add(cpu_drcs[i]);
-		if (rc)
-			break;
-
-		cpus_added++;
-	}
-
-	if (cpus_added < cpus_to_add) {
-		pr_warn("CPU hot-add failed, removing any added CPUs\n");
-
-		for (i = 0; i < cpus_added; i++)
-			dlpar_cpu_remove_by_index(cpu_drcs[i]);
-
-		rc = -EINVAL;
-	} else {
-		rc = 0;
-	}
-
-	kfree(cpu_drcs);
-	return rc;
-}
-
 int dlpar_cpu(struct pseries_hp_errorlog *hp_elog)
 {
 	u32 count, drc_index;
@@ -963,9 +753,7 @@ int dlpar_cpu(struct pseries_hp_errorlog *hp_elog)
 
 	switch (hp_elog->action) {
 	case PSERIES_HP_ELOG_ACTION_REMOVE:
-		if (hp_elog->id_type == PSERIES_HP_ELOG_ID_DRC_COUNT)
-			rc = dlpar_cpu_remove_by_count(count);
-		else if (hp_elog->id_type == PSERIES_HP_ELOG_ID_DRC_INDEX) {
+		if (hp_elog->id_type == PSERIES_HP_ELOG_ID_DRC_INDEX) {
 			rc = dlpar_cpu_remove_by_index(drc_index);
 			/*
 			 * Setting the isolation state of an UNISOLATED/CONFIGURED
@@ -979,9 +767,7 @@ int dlpar_cpu(struct pseries_hp_errorlog *hp_elog)
 			rc = -EINVAL;
 		break;
 	case PSERIES_HP_ELOG_ACTION_ADD:
-		if (hp_elog->id_type == PSERIES_HP_ELOG_ID_DRC_COUNT)
-			rc = dlpar_cpu_add_by_count(count);
-		else if (hp_elog->id_type == PSERIES_HP_ELOG_ID_DRC_INDEX)
+		if (hp_elog->id_type == PSERIES_HP_ELOG_ID_DRC_INDEX)
 			rc = dlpar_cpu_add(drc_index);
 		else
 			rc = -EINVAL;
-- 
2.31.1


^ permalink raw reply related

* [PATCH 2/3] powerpc/cpuhp: BUG -> WARN conversion in offline path
From: Nathan Lynch @ 2021-09-20 13:55 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: tyreld, ldufour, aneesh.kumar, danielhb413
In-Reply-To: <20210920135504.1792219-1-nathanl@linux.ibm.com>

If, due to bugs elsewhere, we get into unregister_cpu_online() with a CPU
that isn't marked hotpluggable, we can emit a warning and return an
appropriate error instead of crashing.

Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
---
 arch/powerpc/kernel/sysfs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c
index defecb3b1b15..08d8072d6e7a 100644
--- a/arch/powerpc/kernel/sysfs.c
+++ b/arch/powerpc/kernel/sysfs.c
@@ -928,7 +928,8 @@ static int unregister_cpu_online(unsigned int cpu)
 	struct device_attribute *attrs, *pmc_attrs;
 	int i, nattrs;
 
-	BUG_ON(!c->hotpluggable);
+	if (WARN_RATELIMIT(!c->hotpluggable, "cpu %d can't be offlined\n", cpu))
+		return -EBUSY;
 
 #ifdef CONFIG_PPC64
 	if (cpu_has_feature(CPU_FTR_SMT))
-- 
2.31.1


^ permalink raw reply related

* [PATCH 1/3] powerpc/pseries/cpuhp: cache node corrections
From: Nathan Lynch @ 2021-09-20 13:55 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: tyreld, ldufour, aneesh.kumar, danielhb413
In-Reply-To: <20210920135504.1792219-1-nathanl@linux.ibm.com>

On pseries, cache nodes in the device tree can be added and removed by the
CPU DLPAR code as well as the partition migration (mobility) code. PowerVM
partitions in dedicated processor mode typically have L2 and L3 cache
nodes.

The CPU DLPAR code has the following shortcomings:

* Cache nodes returned as siblings of a new CPU node by
  ibm,configure-connector are silently discarded; only the CPU node is
  added to the device tree.

* Cache nodes which become unreferenced in the processor removal path are
  not removed from the device tree. This can lead to duplicate nodes when
  the post-migration device tree update code replaces cache nodes.

This is long-standing behavior. Presumably it has gone mostly unnoticed
because the two bugs have the property of obscuring each other in common
simple scenarios (e.g. remove a CPU and add it back). Likely you'd notice
only if you cared to inspect the device tree or the sysfs cacheinfo
information.

Booted with two processors:

  $ pwd
  /sys/firmware/devicetree/base/cpus
  $ ls -1d */
  l2-cache@2010/
  l2-cache@2011/
  l3-cache@3110/
  l3-cache@3111/
  PowerPC,POWER9@0/
  PowerPC,POWER9@8/
  $ lsprop */l2-cache
  l2-cache@2010/l2-cache
                 00003110 (12560)
  l2-cache@2011/l2-cache
                 00003111 (12561)
  PowerPC,POWER9@0/l2-cache
                 00002010 (8208)
  PowerPC,POWER9@8/l2-cache
                 00002011 (8209)
  $ ls /sys/devices/system/cpu/cpu0/cache/
  index0  index1  index2  index3

After DLPAR-adding PowerPC,POWER9@10, we see that its associated cache
nodes are absent, its threads' L2+L3 cacheinfo is unpopulated, and it is
missing a cache level in its sched domain hierarchy:

  $ ls -1d */
  l2-cache@2010/
  l2-cache@2011/
  l3-cache@3110/
  l3-cache@3111/
  PowerPC,POWER9@0/
  PowerPC,POWER9@10/
  PowerPC,POWER9@8/
  $ lsprop PowerPC\,POWER9@10/l2-cache
  PowerPC,POWER9@10/l2-cache
                 00002012 (8210)
  $ ls /sys/devices/system/cpu/cpu16/cache/
  index0  index1
  $ grep . /sys/kernel/debug/sched/domains/cpu{0,8,16}/domain*/name
  /sys/kernel/debug/sched/domains/cpu0/domain0/name:SMT
  /sys/kernel/debug/sched/domains/cpu0/domain1/name:CACHE
  /sys/kernel/debug/sched/domains/cpu0/domain2/name:DIE
  /sys/kernel/debug/sched/domains/cpu8/domain0/name:SMT
  /sys/kernel/debug/sched/domains/cpu8/domain1/name:CACHE
  /sys/kernel/debug/sched/domains/cpu8/domain2/name:DIE
  /sys/kernel/debug/sched/domains/cpu16/domain0/name:SMT
  /sys/kernel/debug/sched/domains/cpu16/domain1/name:DIE

When removing PowerPC,POWER9@8, we see that its cache nodes are left
behind:

  $ ls -1d */
  l2-cache@2010/
  l2-cache@2011/
  l3-cache@3110/
  l3-cache@3111/
  PowerPC,POWER9@0/

When DLPAR is combined with VM migration, we can get duplicate nodes. E.g.
removing one processor, then migrating, adding a processor, and then
migrating again can result in warnings from the OF core during
post-migration device tree updates:

  Duplicate name in cpus, renamed to "l2-cache@2011#1"
  Duplicate name in cpus, renamed to "l3-cache@3111#1"

and nodes with duplicated phandles in the tree, making lookup behavior
unpredictable:

  $ lsprop l[23]-cache@*/ibm,phandle
  l2-cache@2010/ibm,phandle
                   00002010 (8208)
  l2-cache@2011#1/ibm,phandle
                   00002011 (8209)
  l2-cache@2011/ibm,phandle
                   00002011 (8209)
  l3-cache@3110/ibm,phandle
                   00003110 (12560)
  l3-cache@3111#1/ibm,phandle
                   00003111 (12561)
  l3-cache@3111/ibm,phandle
                   00003111 (12561)

Address these issues by:

* Correctly processing siblings of the node returned from
  dlpar_configure_connector().
* Removing cache nodes in the CPU remove path when it can be determined
  that they are not associated with other CPUs or caches.

Use the of_changeset API in both cases, which allows us to keep the error
handling in this code from becoming more complex while ensuring that the
device tree cannot become inconsistent.

Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
Fixes: ac71380 ("powerpc/pseries: Add CPU dlpar remove functionality")
Fixes: 90edf18 ("powerpc/pseries: Add CPU dlpar add functionality")
---
 arch/powerpc/platforms/pseries/hotplug-cpu.c | 72 +++++++++++++++++++-
 1 file changed, 70 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c
index d646c22e94ab..87a0fbe9cf12 100644
--- a/arch/powerpc/platforms/pseries/hotplug-cpu.c
+++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c
@@ -521,6 +521,27 @@ static bool valid_cpu_drc_index(struct device_node *parent, u32 drc_index)
 	return found;
 }
 
+static int pseries_cpuhp_attach_nodes(struct device_node *dn)
+{
+	struct of_changeset cs;
+	int ret;
+
+	/*
+	 * This device node is unattached but may have siblings; open-code the
+	 * traversal.
+	 */
+	for (of_changeset_init(&cs); dn != NULL; dn = dn->sibling) {
+		ret = of_changeset_attach_node(&cs, dn);
+		if (ret)
+			goto out;
+	}
+
+	ret = of_changeset_apply(&cs);
+out:
+	of_changeset_destroy(&cs);
+	return ret;
+}
+
 static ssize_t dlpar_cpu_add(u32 drc_index)
 {
 	struct device_node *dn, *parent;
@@ -563,7 +584,7 @@ static ssize_t dlpar_cpu_add(u32 drc_index)
 		return -EINVAL;
 	}
 
-	rc = dlpar_attach_node(dn, parent);
+	rc = pseries_cpuhp_attach_nodes(dn);
 
 	/* Regardless we are done with parent now */
 	of_node_put(parent);
@@ -600,6 +621,53 @@ static ssize_t dlpar_cpu_add(u32 drc_index)
 	return rc;
 }
 
+static unsigned int pseries_cpuhp_cache_use_count(const struct device_node *cachedn)
+{
+	unsigned int use_count = 0;
+	struct device_node *dn;
+
+	WARN_ON(!of_node_is_type(cachedn, "cache"));
+
+	for_each_of_cpu_node(dn) {
+		if (of_find_next_cache_node(dn) == cachedn)
+			use_count++;
+	}
+
+	for_each_node_by_type(dn, "cache") {
+		if (of_find_next_cache_node(dn) == cachedn)
+			use_count++;
+	}
+
+	return use_count;
+}
+
+static int pseries_cpuhp_detach_nodes(struct device_node *cpudn)
+{
+	struct device_node *dn;
+	struct of_changeset cs;
+	int ret = 0;
+
+	of_changeset_init(&cs);
+	ret = of_changeset_detach_node(&cs, cpudn);
+	if (ret)
+		goto out;
+
+	dn = cpudn;
+	while ((dn = of_find_next_cache_node(dn))) {
+		if (pseries_cpuhp_cache_use_count(dn) > 1)
+			break;
+
+		ret = of_changeset_detach_node(&cs, dn);
+		if (ret)
+			goto out;
+	}
+
+	ret = of_changeset_apply(&cs);
+out:
+	of_changeset_destroy(&cs);
+	return ret;
+}
+
 static ssize_t dlpar_cpu_remove(struct device_node *dn, u32 drc_index)
 {
 	int rc;
@@ -621,7 +689,7 @@ static ssize_t dlpar_cpu_remove(struct device_node *dn, u32 drc_index)
 		return rc;
 	}
 
-	rc = dlpar_detach_node(dn);
+	rc = pseries_cpuhp_detach_nodes(dn);
 	if (rc) {
 		int saved_rc = rc;
 
-- 
2.31.1


^ permalink raw reply related

* [PATCH 0/3] CPU DLPAR/hotplug for v5.16
From: Nathan Lynch @ 2021-09-20 13:55 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: tyreld, ldufour, aneesh.kumar, danielhb413

Fixes for some vintage bugs in handling cache node addition and removal, a
miscellaneous BUG->WARN conversion, and removal of the fragile "by count"
CPU DLPAR code that probably has no users.

Nathan Lynch (3):
  powerpc/pseries/cpuhp: cache node corrections
  powerpc/cpuhp: BUG -> WARN conversion in offline path
  powerpc/pseries/cpuhp: delete add/remove_by_count code

 arch/powerpc/kernel/sysfs.c                  |   3 +-
 arch/powerpc/platforms/pseries/hotplug-cpu.c | 290 +++++--------------
 2 files changed, 74 insertions(+), 219 deletions(-)

-- 
2.31.1


^ permalink raw reply

* Re: [PATCH v2 3/8] bpf powerpc: refactor JIT compiler code
From: Hari Bathini @ 2021-09-20 13:28 UTC (permalink / raw)
  To: Christophe Leroy, naveen.n.rao, mpe, ast, daniel
  Cc: songliubraving, netdev, john.fastabend, andrii, kpsingh, paulus,
	yhs, bpf, linuxppc-dev, kafai
In-Reply-To: <b73d67d5-3ec3-c618-7f4c-ffdd71650e7e@csgroup.eu>

Hi Christophe,

Thanks for reviewing the series.

On 17/09/21 9:40 pm, Christophe Leroy wrote:
> 
> 
> Le 17/09/2021 à 17:30, Hari Bathini a écrit :
>> Refactor powerpc JITing. This simplifies adding BPF_PROBE_MEM support.
> 
> Could you describe a bit more what you are refactoring exactly ?

I am trying to do more than BPF_PROBE_MEM needs. Will keep the changes 
minimal (BPF_PROBE_MEM specific) and update the changelog..

> 
> 
>>
>> Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
>> ---
>>
>> Changes in v2:
>> * New patch to refactor a bit of JITing code.
>>
>>
>>   arch/powerpc/net/bpf_jit_comp32.c | 50 +++++++++++---------
>>   arch/powerpc/net/bpf_jit_comp64.c | 76 ++++++++++++++++---------------
>>   2 files changed, 68 insertions(+), 58 deletions(-)
>>
>> diff --git a/arch/powerpc/net/bpf_jit_comp32.c 
>> b/arch/powerpc/net/bpf_jit_comp32.c
>> index b60b59426a24..c8ae14c316e3 100644
>> --- a/arch/powerpc/net/bpf_jit_comp32.c
>> +++ b/arch/powerpc/net/bpf_jit_comp32.c
>> @@ -276,17 +276,17 @@ int bpf_jit_build_body(struct bpf_prog *fp, u32 
>> *image, struct codegen_context *
>>       u32 exit_addr = addrs[flen];
>>       for (i = 0; i < flen; i++) {
>> -        u32 code = insn[i].code;
>>           u32 dst_reg = bpf_to_ppc(ctx, insn[i].dst_reg);
>> -        u32 dst_reg_h = dst_reg - 1;
>>           u32 src_reg = bpf_to_ppc(ctx, insn[i].src_reg);
>> -        u32 src_reg_h = src_reg - 1;
>>           u32 tmp_reg = bpf_to_ppc(ctx, TMP_REG);
>> +        u32 true_cond, code = insn[i].code;
>> +        u32 dst_reg_h = dst_reg - 1;
>> +        u32 src_reg_h = src_reg - 1;
> 
> All changes above seems unneeded and not linked to the current patch. 
> Please leave cosmetic changes outside and focus on necessary changes.
> 
>> +        u32 size = BPF_SIZE(code);
>>           s16 off = insn[i].off;
>>           s32 imm = insn[i].imm;
>>           bool func_addr_fixed;
>>           u64 func_addr;
>> -        u32 true_cond;
>>           /*
>>            * addrs[] maps a BPF bytecode address into a real offset from
>> @@ -809,25 +809,33 @@ int bpf_jit_build_body(struct bpf_prog *fp, u32 
>> *image, struct codegen_context *
>>           /*
>>            * BPF_LDX
>>            */
>> -        case BPF_LDX | BPF_MEM | BPF_B: /* dst = *(u8 *)(ul) (src + 
>> off) */
>> -            EMIT(PPC_RAW_LBZ(dst_reg, src_reg, off));
>> -            if (!fp->aux->verifier_zext)
>> -                EMIT(PPC_RAW_LI(dst_reg_h, 0));
>> -            break;
>> -        case BPF_LDX | BPF_MEM | BPF_H: /* dst = *(u16 *)(ul) (src + 
>> off) */
>> -            EMIT(PPC_RAW_LHZ(dst_reg, src_reg, off));
>> -            if (!fp->aux->verifier_zext)
>> -                EMIT(PPC_RAW_LI(dst_reg_h, 0));
>> -            break;
>> -        case BPF_LDX | BPF_MEM | BPF_W: /* dst = *(u32 *)(ul) (src + 
>> off) */
>> -            EMIT(PPC_RAW_LWZ(dst_reg, src_reg, off));
>> -            if (!fp->aux->verifier_zext)
>> +        /* dst = *(u8 *)(ul) (src + off) */
>> +        case BPF_LDX | BPF_MEM | BPF_B:
>> +        /* dst = *(u16 *)(ul) (src + off) */
>> +        case BPF_LDX | BPF_MEM | BPF_H:
>> +        /* dst = *(u32 *)(ul) (src + off) */
>> +        case BPF_LDX | BPF_MEM | BPF_W:
>> +        /* dst = *(u64 *)(ul) (src + off) */
>> +        case BPF_LDX | BPF_MEM | BPF_DW:
> Why changing the location of the comments ? I found it more readable 
> before.

Sure. I will revert that change.

>> +            switch (size) {
>> +            case BPF_B:
>> +                EMIT(PPC_RAW_LBZ(dst_reg, src_reg, off));
>> +                break;
>> +            case BPF_H:
>> +                EMIT(PPC_RAW_LHZ(dst_reg, src_reg, off));
>> +                break;
>> +            case BPF_W:
>> +                EMIT(PPC_RAW_LWZ(dst_reg, src_reg, off));
>> +                break;
>> +            case BPF_DW:
>> +                EMIT(PPC_RAW_LWZ(dst_reg_h, src_reg, off));
>> +                EMIT(PPC_RAW_LWZ(dst_reg, src_reg, off + 4));
>> +                break;
>> +            }
> 
> BPF_B, BPF_H, ... are not part of an enum. Are you sure GCC is happy to 
> have no default ?

I used gcc 10.3 for ppc32 & gcc 8.3 for ppc64. No warnings.
Though, no harm adding the below, I guess..

	default:
		break;

Thanks
Hari

^ permalink raw reply

* Re: [PATCH v2 1/3] powerpc/inst: Refactor ___get_user_instr()
From: kernel test robot @ 2021-09-20 12:34 UTC (permalink / raw)
  To: Christophe Leroy, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman
  Cc: linuxppc-dev, kbuild-all, linux-kernel
In-Reply-To: <9607dfbecab2ecccb712bbd25d2d5da882239d4c.1632118950.git.christophe.leroy@csgroup.eu>

[-- Attachment #1: Type: text/plain, Size: 6813 bytes --]

Hi Christophe,

I love your patch! Yet something to improve:

[auto build test ERROR on powerpc/next]
[also build test ERROR on v5.15-rc2 next-20210920]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Christophe-Leroy/powerpc-inst-Refactor-___get_user_instr/20210920-142409
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-allnoconfig (attached as .config)
compiler: powerpc-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/5cf46b9261bd40b829a760ac96f7e8209bda11b4
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Christophe-Leroy/powerpc-inst-Refactor-___get_user_instr/20210920-142409
        git checkout 5cf46b9261bd40b829a760ac96f7e8209bda11b4
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=powerpc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from arch/powerpc/include/asm/hw_breakpoint.h:13,
                    from arch/powerpc/include/asm/processor.h:43,
                    from arch/powerpc/include/asm/thread_info.h:40,
                    from include/linux/thread_info.h:60,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/powerpc/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:55,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:6,
                    from include/linux/mm.h:10,
                    from arch/powerpc/kernel/align.c:17:
   arch/powerpc/kernel/align.c: In function 'fix_alignment':
>> arch/powerpc/include/asm/inst.h:12:32: error: variable '__suffix' set but not used [-Werror=unused-but-set-variable]
      12 |         unsigned int __prefix, __suffix;                                \
         |                                ^~~~~~~~
   arch/powerpc/include/asm/inst.h:31:34: note: in expansion of macro '___get_user_instr'
      31 | #define __get_user_instr(x, ptr) ___get_user_instr(__get_user, x, ptr)
         |                                  ^~~~~~~~~~~~~~~~~
   arch/powerpc/kernel/align.c:310:21: note: in expansion of macro '__get_user_instr'
     310 |                 r = __get_user_instr(instr, (void __user *)regs->nip);
         |                     ^~~~~~~~~~~~~~~~
   cc1: all warnings being treated as errors
--
   In file included from arch/powerpc/include/asm/hw_breakpoint.h:13,
                    from arch/powerpc/include/asm/processor.h:43,
                    from arch/powerpc/include/asm/thread_info.h:40,
                    from include/linux/thread_info.h:60,
                    from arch/powerpc/include/asm/ptrace.h:323,
                    from arch/powerpc/include/asm/hw_irq.h:12,
                    from arch/powerpc/include/asm/irqflags.h:12,
                    from include/linux/irqflags.h:16,
                    from include/asm-generic/cmpxchg-local.h:6,
                    from arch/powerpc/include/asm/cmpxchg.h:526,
                    from arch/powerpc/include/asm/atomic.h:11,
                    from include/linux/atomic.h:7,
                    from include/linux/rcupdate.h:25,
                    from include/linux/rculist.h:11,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/uaccess.h:8,
                    from arch/powerpc/kernel/hw_breakpoint_constraints.c:3:
   arch/powerpc/kernel/hw_breakpoint_constraints.c: In function 'wp_get_instr_detail':
>> arch/powerpc/include/asm/inst.h:12:32: error: variable '__suffix' set but not used [-Werror=unused-but-set-variable]
      12 |         unsigned int __prefix, __suffix;                                \
         |                                ^~~~~~~~
   arch/powerpc/include/asm/inst.h:31:34: note: in expansion of macro '___get_user_instr'
      31 | #define __get_user_instr(x, ptr) ___get_user_instr(__get_user, x, ptr)
         |                                  ^~~~~~~~~~~~~~~~~
   arch/powerpc/kernel/hw_breakpoint_constraints.c:144:13: note: in expansion of macro '__get_user_instr'
     144 |         if (__get_user_instr(*instr, (void __user *)regs->nip))
         |             ^~~~~~~~~~~~~~~~
   cc1: all warnings being treated as errors


vim +/__suffix +12 arch/powerpc/include/asm/inst.h

650b55b707fdfa Jordan Niethe    2020-05-15   6  
35506a3e2d7c4d Christophe Leroy 2021-03-10   7  #define ___get_user_instr(gu_op, dest, ptr)				\
35506a3e2d7c4d Christophe Leroy 2021-03-10   8  ({									\
042e0860e1c1d6 Christophe Leroy 2021-05-20   9  	long __gui_ret;							\
9134806e149ebb Christophe Leroy 2021-05-20  10  	u32 __user *__gui_ptr = (u32 __user *)ptr;			\
35506a3e2d7c4d Christophe Leroy 2021-03-10  11  	struct ppc_inst __gui_inst;					\
35506a3e2d7c4d Christophe Leroy 2021-03-10 @12  	unsigned int __prefix, __suffix;				\
b3a9e523237013 Christophe Leroy 2021-05-20  13  									\
b3a9e523237013 Christophe Leroy 2021-05-20  14  	__chk_user_ptr(ptr);						\
9134806e149ebb Christophe Leroy 2021-05-20  15  	__gui_ret = gu_op(__prefix, __gui_ptr);				\
35506a3e2d7c4d Christophe Leroy 2021-03-10  16  	if (__gui_ret == 0) {						\
5cf46b9261bd40 Christophe Leroy 2021-09-20  17  		if (IS_ENABLED(CONFIG_PPC64) && (__prefix >> 26) == OP_PREFIX) { \
9134806e149ebb Christophe Leroy 2021-05-20  18  			__gui_ret = gu_op(__suffix, __gui_ptr + 1);	\
042e0860e1c1d6 Christophe Leroy 2021-05-20  19  			__gui_inst = ppc_inst_prefix(__prefix, __suffix); \
35506a3e2d7c4d Christophe Leroy 2021-03-10  20  		} else {						\
35506a3e2d7c4d Christophe Leroy 2021-03-10  21  			__gui_inst = ppc_inst(__prefix);		\
35506a3e2d7c4d Christophe Leroy 2021-03-10  22  		}							\
35506a3e2d7c4d Christophe Leroy 2021-03-10  23  		if (__gui_ret == 0)					\
35506a3e2d7c4d Christophe Leroy 2021-03-10  24  			(dest) = __gui_inst;				\
35506a3e2d7c4d Christophe Leroy 2021-03-10  25  	}								\
35506a3e2d7c4d Christophe Leroy 2021-03-10  26  	__gui_ret;							\
35506a3e2d7c4d Christophe Leroy 2021-03-10  27  })
35506a3e2d7c4d Christophe Leroy 2021-03-10  28  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 7634 bytes --]

^ permalink raw reply

* [PATCH] agp: define proper stubs for empty helpers
From: Arnd Bergmann @ 2021-09-20 12:17 UTC (permalink / raw)
  To: linux-fbdev, James E.J. Bottomley, Helge Deller, Michael Ellerman,
	David S. Miller
  Cc: linux-parisc, Arnd Bergmann, linux-kernel, dri-devel,
	Paul Mackerras, sparclinux, linuxppc-dev

From: Arnd Bergmann <arnd@arndb.de>

The empty unmap_page_from_agp() macro causes a warning when
building with 'make W=1' on a couple of architectures:

drivers/char/agp/generic.c: In function 'agp_generic_destroy_page':
drivers/char/agp/generic.c:1265:28: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
 1265 |   unmap_page_from_agp(page);

Change the definitions to a 'do { } while (0)' construct to
make these more reliable.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/parisc/include/asm/agp.h  | 4 ++--
 arch/powerpc/include/asm/agp.h | 4 ++--
 arch/sparc/include/asm/agp.h   | 6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/parisc/include/asm/agp.h b/arch/parisc/include/asm/agp.h
index cb04470e63d0..14ae54cfd368 100644
--- a/arch/parisc/include/asm/agp.h
+++ b/arch/parisc/include/asm/agp.h
@@ -8,8 +8,8 @@
  *
  */
 
-#define map_page_into_agp(page)		/* nothing */
-#define unmap_page_from_agp(page)	/* nothing */
+#define map_page_into_agp(page)		do { } while (0)
+#define unmap_page_from_agp(page)	do { } while (0)
 #define flush_agp_cache()		mb()
 
 /* GATT allocation. Returns/accepts GATT kernel virtual address. */
diff --git a/arch/powerpc/include/asm/agp.h b/arch/powerpc/include/asm/agp.h
index b29b1186f819..6b6485c988dd 100644
--- a/arch/powerpc/include/asm/agp.h
+++ b/arch/powerpc/include/asm/agp.h
@@ -5,8 +5,8 @@
 
 #include <asm/io.h>
 
-#define map_page_into_agp(page)
-#define unmap_page_from_agp(page)
+#define map_page_into_agp(page) do {} while (0)
+#define unmap_page_from_agp(page) do {} while (0)
 #define flush_agp_cache() mb()
 
 /* GATT allocation. Returns/accepts GATT kernel virtual address. */
diff --git a/arch/sparc/include/asm/agp.h b/arch/sparc/include/asm/agp.h
index efe0d6a12e5a..2d0ff84cee3f 100644
--- a/arch/sparc/include/asm/agp.h
+++ b/arch/sparc/include/asm/agp.h
@@ -4,9 +4,9 @@
 
 /* dummy for now */
 
-#define map_page_into_agp(page)
-#define unmap_page_from_agp(page)
-#define flush_agp_cache() mb()
+#define map_page_into_agp(page)		do { } while (0)
+#define unmap_page_from_agp(page)	do { } while (0)
+#define flush_agp_cache()		mb()
 
 /* GATT allocation. Returns/accepts GATT kernel virtual address. */
 #define alloc_gatt_pages(order)		\
-- 
2.29.2


^ permalink raw reply related

* [powerpc:merge] BUILD SUCCESS 044c2d99d9f43c6d6fde8bed00672517dd9a5a57
From: kernel test robot @ 2021-09-20  8:53 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev

tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git merge
branch HEAD: 044c2d99d9f43c6d6fde8bed00672517dd9a5a57  Automatic merge of 'fixes' into merge (2021-09-19 22:18)

elapsed time: 1190m

configs tested: 175
configs skipped: 3

The following configs have been built successfully.
More configs may be tested in the coming days.

gcc tested configs:
arm                                 defconfig
arm64                            allyesconfig
arm64                               defconfig
arm                              allyesconfig
arm                              allmodconfig
sh                          landisk_defconfig
arc                     haps_hs_smp_defconfig
arm                            mmp2_defconfig
powerpc                      ppc44x_defconfig
mips                      maltaaprp_defconfig
arm                         nhk8815_defconfig
powerpc                   bluestone_defconfig
powerpc                      bamboo_defconfig
powerpc                        cell_defconfig
powerpc                 mpc834x_mds_defconfig
powerpc                   motionpro_defconfig
alpha                               defconfig
arm                           sunxi_defconfig
arm                  colibri_pxa300_defconfig
mips                       capcella_defconfig
powerpc                        warp_defconfig
mips                  decstation_64_defconfig
powerpc                    sam440ep_defconfig
arm64                            alldefconfig
mips                        maltaup_defconfig
powerpc                     sequoia_defconfig
powerpc                      katmai_defconfig
arm                            zeus_defconfig
sh                                  defconfig
m68k                          amiga_defconfig
m68k                       m5249evb_defconfig
sh                          r7785rp_defconfig
arm                       netwinder_defconfig
arm                         lubbock_defconfig
mips                    maltaup_xpa_defconfig
powerpc                 mpc837x_mds_defconfig
arm                       imx_v4_v5_defconfig
mips                         db1xxx_defconfig
arm                   milbeaut_m10v_defconfig
sh                            migor_defconfig
arc                    vdk_hs38_smp_defconfig
xtensa                    smp_lx200_defconfig
mips                           ip32_defconfig
powerpc                      arches_defconfig
mips                       rbtx49xx_defconfig
arm                           viper_defconfig
mips                           ci20_defconfig
arm                        multi_v7_defconfig
m68k                             alldefconfig
arc                                 defconfig
mips                        vocore2_defconfig
arm                      jornada720_defconfig
arm                         axm55xx_defconfig
openrisc                            defconfig
mips                         mpc30x_defconfig
arm                           h5000_defconfig
nds32                            alldefconfig
mips                        workpad_defconfig
arm                            xcep_defconfig
arm                           omap1_defconfig
arm                          exynos_defconfig
powerpc                  mpc866_ads_defconfig
arm                         at91_dt_defconfig
powerpc               mpc834x_itxgp_defconfig
powerpc                     asp8347_defconfig
mips                       lemote2f_defconfig
powerpc                      cm5200_defconfig
powerpc                          g5_defconfig
arm                           tegra_defconfig
x86_64               randconfig-c001-20210920
arm                  randconfig-c002-20210920
i386                 randconfig-c001-20210920
x86_64               randconfig-c001-20210919
i386                 randconfig-c001-20210919
arm                  randconfig-c002-20210919
ia64                             allmodconfig
ia64                                defconfig
ia64                             allyesconfig
m68k                             allmodconfig
m68k                                defconfig
m68k                             allyesconfig
nios2                               defconfig
arc                              allyesconfig
nds32                             allnoconfig
nds32                               defconfig
csky                                defconfig
alpha                            allyesconfig
nios2                            allyesconfig
h8300                            allyesconfig
sh                               allmodconfig
xtensa                           allyesconfig
parisc                              defconfig
s390                                defconfig
s390                             allyesconfig
s390                             allmodconfig
parisc                           allyesconfig
sparc                            allyesconfig
sparc                               defconfig
i386                                defconfig
i386                             allyesconfig
mips                             allyesconfig
mips                             allmodconfig
powerpc                          allyesconfig
powerpc                          allmodconfig
powerpc                           allnoconfig
x86_64               randconfig-a002-20210919
x86_64               randconfig-a004-20210919
x86_64               randconfig-a006-20210919
x86_64               randconfig-a003-20210919
x86_64               randconfig-a001-20210919
x86_64               randconfig-a005-20210919
i386                 randconfig-a004-20210919
i386                 randconfig-a005-20210919
i386                 randconfig-a002-20210919
i386                 randconfig-a006-20210919
i386                 randconfig-a001-20210919
i386                 randconfig-a003-20210919
x86_64               randconfig-a014-20210920
x86_64               randconfig-a011-20210920
x86_64               randconfig-a013-20210920
x86_64               randconfig-a012-20210920
x86_64               randconfig-a015-20210920
x86_64               randconfig-a016-20210920
i386                 randconfig-a014-20210920
i386                 randconfig-a013-20210920
i386                 randconfig-a016-20210920
i386                 randconfig-a012-20210920
i386                 randconfig-a011-20210920
i386                 randconfig-a015-20210920
arc                  randconfig-r043-20210920
riscv                randconfig-r042-20210920
s390                 randconfig-r044-20210920
arc                  randconfig-r043-20210919
riscv                    nommu_k210_defconfig
riscv                    nommu_virt_defconfig
riscv                             allnoconfig
riscv                               defconfig
riscv                          rv32_defconfig
riscv                            allyesconfig
riscv                            allmodconfig
um                           x86_64_defconfig
um                             i386_defconfig
x86_64                    rhel-8.3-kselftests
x86_64                              defconfig
x86_64                               rhel-8.3
x86_64                                  kexec
x86_64                           allyesconfig

clang tested configs:
x86_64               randconfig-a002-20210920
x86_64               randconfig-a006-20210920
x86_64               randconfig-a005-20210920
x86_64               randconfig-a001-20210920
x86_64               randconfig-a004-20210920
x86_64               randconfig-a003-20210920
i386                 randconfig-a001-20210920
i386                 randconfig-a005-20210920
i386                 randconfig-a002-20210920
i386                 randconfig-a006-20210920
i386                 randconfig-a003-20210920
i386                 randconfig-a004-20210920
x86_64               randconfig-a013-20210919
x86_64               randconfig-a016-20210919
x86_64               randconfig-a012-20210919
x86_64               randconfig-a011-20210919
x86_64               randconfig-a014-20210919
x86_64               randconfig-a015-20210919
i386                 randconfig-a016-20210919
i386                 randconfig-a012-20210919
i386                 randconfig-a011-20210919
i386                 randconfig-a015-20210919
i386                 randconfig-a013-20210919
i386                 randconfig-a014-20210919
riscv                randconfig-r042-20210919
hexagon              randconfig-r045-20210919
s390                 randconfig-r044-20210919
hexagon              randconfig-r041-20210919

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply

* Re: [PATCH v2] lib/zlib_inflate/inffast: Check config in C to avoid unused function warning
From: Paul Menzel @ 2021-09-20  8:47 UTC (permalink / raw)
  To: Christophe Leroy, Nathan Chancellor, Nick Desaulniers
  Cc: llvm, Zhen Lei, linux-kernel, Paul Mackerras, Andrew Morton,
	linuxppc-dev
In-Reply-To: <00f8d7d7-cb13-203e-5a37-aee34a3258ff@csgroup.eu>

Dear Christophe,


Thank you for the review.

Am 20.09.21 um 10:36 schrieb Christophe Leroy:
> 
> 
> Le 20/09/2021 à 09:46, Paul Menzel a écrit :
>> Building Linux for ppc64le with Ubuntu clang version 12.0.0-3ubuntu1~21.04.1
>> shows the warning below.
>>
>>      arch/powerpc/boot/inffast.c:20:1: warning: unused function 'get_unaligned16' [-Wunused-function]
>>      get_unaligned16(const unsigned short *p)
>>      ^
>>      1 warning generated.
>>
>> Fix it, by moving the check from the preprocessor to C, so the compiler
>> sees the use.
>>
>> Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
>> ---
>>   lib/zlib_inflate/inffast.c | 7 ++-----
>>   1 file changed, 2 insertions(+), 5 deletions(-)
>>
>> diff --git a/lib/zlib_inflate/inffast.c b/lib/zlib_inflate/inffast.c
>> index f19c4fbe1be7..fb87a3120f0f 100644
>> --- a/lib/zlib_inflate/inffast.c
>> +++ b/lib/zlib_inflate/inffast.c
>> @@ -254,11 +254,8 @@ void inflate_fast(z_streamp strm, unsigned start)
>>               sfrom = (unsigned short *)(from);
>>               loops = len >> 1;
>>               do
>> -#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
>> -                *sout++ = *sfrom++;
>> -#else
>> -                *sout++ = get_unaligned16(sfrom++);
>> -#endif
>> +                *sout++ = 
>> IS_ENABLED(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) ?
>> +                *sfrom++ : get_unaligned16(sfrom++);
> 
> I think it would be more readable as
> 
> do {
>          if (IS_ENABLED(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS))
>                  *sout++ = *sfrom++;
>          else
>                  *sout++ = get_unaligned16(sfrom++);
> } while (--loops);

I prefer the ternary operator, as it’s less lines, and it’s clear, that 
only the variable assignment is affected by the condition. But as style 
is subjective, I sent v3.

>>               while (--loops);
>>               out = (unsigned char *)sout;
>>               from = (unsigned char *)sfrom;


Kind regards,

Paul

^ permalink raw reply

* [PATCH v3] lib/zlib_inflate/inffast: Check config in C to avoid unused function warning
From: Paul Menzel @ 2021-09-20  8:43 UTC (permalink / raw)
  To: Nathan Chancellor, Nick Desaulniers
  Cc: Paul Menzel, llvm, Zhen Lei, linux-kernel, Paul Mackerras,
	Andrew Morton, linuxppc-dev

Building Linux for ppc64le with Ubuntu clang version 12.0.0-3ubuntu1~21.04.1
shows the warning below.

    arch/powerpc/boot/inffast.c:20:1: warning: unused function 'get_unaligned16' [-Wunused-function]
    get_unaligned16(const unsigned short *p)
    ^
    1 warning generated.

Fix it, by moving the check from the preprocessor to C, so the compiler
sees the use.

Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
---
v2: Use IS_ENABLED
v3: Use if statement over ternary operator as requested by Christophe

 lib/zlib_inflate/inffast.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/lib/zlib_inflate/inffast.c b/lib/zlib_inflate/inffast.c
index f19c4fbe1be7..2843f9bb42ac 100644
--- a/lib/zlib_inflate/inffast.c
+++ b/lib/zlib_inflate/inffast.c
@@ -253,13 +253,12 @@ void inflate_fast(z_streamp strm, unsigned start)
 
 			sfrom = (unsigned short *)(from);
 			loops = len >> 1;
-			do
-#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
-			    *sout++ = *sfrom++;
-#else
-			    *sout++ = get_unaligned16(sfrom++);
-#endif
-			while (--loops);
+			do {
+			    if (IS_ENABLED(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS))
+				*sout++ = *sfrom++;
+			    else
+				*sout++ = get_unaligned16(sfrom++);
+			} while (--loops);
 			out = (unsigned char *)sout;
 			from = (unsigned char *)sfrom;
 		    } else { /* dist == 1 or dist == 2 */
-- 
2.33.0


^ permalink raw reply related

* Re: [PATCH v2] lib/zlib_inflate/inffast: Check config in C to avoid unused function warning
From: Christophe Leroy @ 2021-09-20  8:36 UTC (permalink / raw)
  To: Paul Menzel, Nathan Chancellor, Nick Desaulniers
  Cc: llvm, Zhen Lei, linux-kernel, Paul Mackerras, Andrew Morton,
	linuxppc-dev
In-Reply-To: <20210920074633.13089-1-pmenzel@molgen.mpg.de>



Le 20/09/2021 à 09:46, Paul Menzel a écrit :
> Building Linux for ppc64le with Ubuntu clang version 12.0.0-3ubuntu1~21.04.1
> shows the warning below.
> 
>      arch/powerpc/boot/inffast.c:20:1: warning: unused function 'get_unaligned16' [-Wunused-function]
>      get_unaligned16(const unsigned short *p)
>      ^
>      1 warning generated.
> 
> Fix it, by moving the check from the preprocessor to C, so the compiler
> sees the use.
> 
> Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
> ---
>   lib/zlib_inflate/inffast.c | 7 ++-----
>   1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/lib/zlib_inflate/inffast.c b/lib/zlib_inflate/inffast.c
> index f19c4fbe1be7..fb87a3120f0f 100644
> --- a/lib/zlib_inflate/inffast.c
> +++ b/lib/zlib_inflate/inffast.c
> @@ -254,11 +254,8 @@ void inflate_fast(z_streamp strm, unsigned start)
>   			sfrom = (unsigned short *)(from);
>   			loops = len >> 1;
>   			do
> -#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
> -			    *sout++ = *sfrom++;
> -#else
> -			    *sout++ = get_unaligned16(sfrom++);
> -#endif
> +			    *sout++ = IS_ENABLED(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) ?
> +				*sfrom++ : get_unaligned16(sfrom++);

I think it would be more readable as

do {
         if (IS_ENABLED(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS))
                 *sout++ = *sfrom++;
         else
                 *sout++ = get_unaligned16(sfrom++);
} while (--loops);



>   			while (--loops);
>   			out = (unsigned char *)sout;
>   			from = (unsigned char *)sfrom;
> 

^ permalink raw reply

* [PATCH v4 3/3] powerpc/atomics: Remove atomic_inc()/atomic_dec() and friends
From: Christophe Leroy @ 2021-09-20  8:31 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
  Cc: linuxppc-dev, linux-kernel
In-Reply-To: <db9d01d5c543c5add4b2beadb03d39e99c7ada2c.1632126669.git.christophe.leroy@csgroup.eu>

Now that atomic_add() and atomic_sub() handle immediate operands,
atomic_inc() and atomic_dec() have no added value compared to the
generic fallback which calls atomic_add(1) and atomic_sub(1).

Also remove atomic_inc_not_zero() which fallsback to
atomic_add_unless() which itself fallsback to
atomic_fetch_add_unless() which now handles immediate operands.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
v4: rebased

v2: New
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
 arch/powerpc/include/asm/atomic.h | 95 -------------------------------
 1 file changed, 95 deletions(-)

diff --git a/arch/powerpc/include/asm/atomic.h b/arch/powerpc/include/asm/atomic.h
index ce0d5a013c58..395d1feb5790 100644
--- a/arch/powerpc/include/asm/atomic.h
+++ b/arch/powerpc/include/asm/atomic.h
@@ -118,71 +118,6 @@ ATOMIC_OPS(xor, xor, "", K)
 #undef ATOMIC_OP_RETURN_RELAXED
 #undef ATOMIC_OP
 
-static __inline__ void arch_atomic_inc(atomic_t *v)
-{
-	int t;
-
-	__asm__ __volatile__(
-"1:	lwarx	%0,0,%2		# atomic_inc\n\
-	addic	%0,%0,1\n"
-"	stwcx.	%0,0,%2 \n\
-	bne-	1b"
-	: "=&r" (t), "+m" (v->counter)
-	: "r" (&v->counter)
-	: "cc", "xer");
-}
-#define arch_atomic_inc arch_atomic_inc
-
-static __inline__ int arch_atomic_inc_return_relaxed(atomic_t *v)
-{
-	int t;
-
-	__asm__ __volatile__(
-"1:	lwarx	%0,0,%2		# atomic_inc_return_relaxed\n"
-"	addic	%0,%0,1\n"
-"	stwcx.	%0,0,%2\n"
-"	bne-	1b"
-	: "=&r" (t), "+m" (v->counter)
-	: "r" (&v->counter)
-	: "cc", "xer");
-
-	return t;
-}
-
-static __inline__ void arch_atomic_dec(atomic_t *v)
-{
-	int t;
-
-	__asm__ __volatile__(
-"1:	lwarx	%0,0,%2		# atomic_dec\n\
-	addic	%0,%0,-1\n"
-"	stwcx.	%0,0,%2\n\
-	bne-	1b"
-	: "=&r" (t), "+m" (v->counter)
-	: "r" (&v->counter)
-	: "cc", "xer");
-}
-#define arch_atomic_dec arch_atomic_dec
-
-static __inline__ int arch_atomic_dec_return_relaxed(atomic_t *v)
-{
-	int t;
-
-	__asm__ __volatile__(
-"1:	lwarx	%0,0,%2		# atomic_dec_return_relaxed\n"
-"	addic	%0,%0,-1\n"
-"	stwcx.	%0,0,%2\n"
-"	bne-	1b"
-	: "=&r" (t), "+m" (v->counter)
-	: "r" (&v->counter)
-	: "cc", "xer");
-
-	return t;
-}
-
-#define arch_atomic_inc_return_relaxed arch_atomic_inc_return_relaxed
-#define arch_atomic_dec_return_relaxed arch_atomic_dec_return_relaxed
-
 #define arch_atomic_cmpxchg(v, o, n) \
 	(arch_cmpxchg(&((v)->counter), (o), (n)))
 #define arch_atomic_cmpxchg_relaxed(v, o, n) \
@@ -255,36 +190,6 @@ static __inline__ int arch_atomic_fetch_add_unless(atomic_t *v, int a, int u)
 }
 #define arch_atomic_fetch_add_unless arch_atomic_fetch_add_unless
 
-/**
- * atomic_inc_not_zero - increment unless the number is zero
- * @v: pointer of type atomic_t
- *
- * Atomically increments @v by 1, so long as @v is non-zero.
- * Returns non-zero if @v was non-zero, and zero otherwise.
- */
-static __inline__ int arch_atomic_inc_not_zero(atomic_t *v)
-{
-	int t1, t2;
-
-	__asm__ __volatile__ (
-	PPC_ATOMIC_ENTRY_BARRIER
-"1:	lwarx	%0,0,%2		# atomic_inc_not_zero\n\
-	cmpwi	0,%0,0\n\
-	beq-	2f\n\
-	addic	%1,%0,1\n"
-"	stwcx.	%1,0,%2\n\
-	bne-	1b\n"
-	PPC_ATOMIC_EXIT_BARRIER
-	"\n\
-2:"
-	: "=&r" (t1), "=&r" (t2)
-	: "r" (&v->counter)
-	: "cc", "xer", "memory");
-
-	return t1;
-}
-#define arch_atomic_inc_not_zero(v) arch_atomic_inc_not_zero((v))
-
 /*
  * Atomically test *v and decrement if it is greater than 0.
  * The function returns the old value of *v minus 1, even if
-- 
2.31.1


^ permalink raw reply related

* [PATCH v4 2/3] powerpc/atomics: Use immediate operand when possible
From: Christophe Leroy @ 2021-09-20  8:31 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
  Cc: linuxppc-dev, linux-kernel
In-Reply-To: <db9d01d5c543c5add4b2beadb03d39e99c7ada2c.1632126669.git.christophe.leroy@csgroup.eu>

Today we get the following code generation for atomic operations:

	c001bb2c:	39 20 00 01 	li      r9,1
	c001bb30:	7d 40 18 28 	lwarx   r10,0,r3
	c001bb34:	7d 09 50 50 	subf    r8,r9,r10
	c001bb38:	7d 00 19 2d 	stwcx.  r8,0,r3

	c001c7a8:	39 40 00 01 	li      r10,1
	c001c7ac:	7d 00 18 28 	lwarx   r8,0,r3
	c001c7b0:	7c ea 42 14 	add     r7,r10,r8
	c001c7b4:	7c e0 19 2d 	stwcx.  r7,0,r3

By allowing GCC to choose between immediate or regular operation,
we get:

	c001bb2c:	7d 20 18 28 	lwarx   r9,0,r3
	c001bb30:	39 49 ff ff 	addi    r10,r9,-1
	c001bb34:	7d 40 19 2d 	stwcx.  r10,0,r3
	--
	c001c7a4:	7d 40 18 28 	lwarx   r10,0,r3
	c001c7a8:	39 0a 00 01 	addi    r8,r10,1
	c001c7ac:	7d 00 19 2d 	stwcx.  r8,0,r3

For "and", the dot form has to be used because "andi" doesn't exist.

For logical operations we use unsigned 16 bits immediate.
For arithmetic operations we use signed 16 bits immediate.

On pmac32_defconfig, it reduces the text by approx another 8 kbytes.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Acked-by: Segher Boessenkool <segher@kernel.crashing.org>
---
v4: Rebased

v2: Use "addc/addic"
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
 arch/powerpc/include/asm/atomic.h | 56 +++++++++++++++----------------
 1 file changed, 28 insertions(+), 28 deletions(-)

diff --git a/arch/powerpc/include/asm/atomic.h b/arch/powerpc/include/asm/atomic.h
index 6a53ef178bfd..ce0d5a013c58 100644
--- a/arch/powerpc/include/asm/atomic.h
+++ b/arch/powerpc/include/asm/atomic.h
@@ -37,62 +37,62 @@ static __inline__ void arch_atomic_set(atomic_t *v, int i)
 	__asm__ __volatile__("stw%U0%X0 %1,%0" : "=m"UPD_CONSTR(v->counter) : "r"(i));
 }
 
-#define ATOMIC_OP(op, asm_op)						\
+#define ATOMIC_OP(op, asm_op, suffix, sign, ...)			\
 static __inline__ void arch_atomic_##op(int a, atomic_t *v)		\
 {									\
 	int t;								\
 									\
 	__asm__ __volatile__(						\
 "1:	lwarx	%0,0,%3		# atomic_" #op "\n"			\
-	#asm_op " %0,%2,%0\n"						\
+	#asm_op "%I2" suffix " %0,%0,%2\n"				\
 "	stwcx.	%0,0,%3 \n"						\
 "	bne-	1b\n"							\
 	: "=&r" (t), "+m" (v->counter)					\
-	: "r" (a), "r" (&v->counter)					\
-	: "cc");							\
+	: "r"#sign (a), "r" (&v->counter)				\
+	: "cc", ##__VA_ARGS__);						\
 }									\
 
-#define ATOMIC_OP_RETURN_RELAXED(op, asm_op)				\
+#define ATOMIC_OP_RETURN_RELAXED(op, asm_op, suffix, sign, ...)		\
 static inline int arch_atomic_##op##_return_relaxed(int a, atomic_t *v)	\
 {									\
 	int t;								\
 									\
 	__asm__ __volatile__(						\
 "1:	lwarx	%0,0,%3		# atomic_" #op "_return_relaxed\n"	\
-	#asm_op " %0,%2,%0\n"						\
+	#asm_op "%I2" suffix " %0,%0,%2\n"				\
 "	stwcx.	%0,0,%3\n"						\
 "	bne-	1b\n"							\
 	: "=&r" (t), "+m" (v->counter)					\
-	: "r" (a), "r" (&v->counter)					\
-	: "cc");							\
+	: "r"#sign (a), "r" (&v->counter)				\
+	: "cc", ##__VA_ARGS__);						\
 									\
 	return t;							\
 }
 
-#define ATOMIC_FETCH_OP_RELAXED(op, asm_op)				\
+#define ATOMIC_FETCH_OP_RELAXED(op, asm_op, suffix, sign, ...)		\
 static inline int arch_atomic_fetch_##op##_relaxed(int a, atomic_t *v)	\
 {									\
 	int res, t;							\
 									\
 	__asm__ __volatile__(						\
 "1:	lwarx	%0,0,%4		# atomic_fetch_" #op "_relaxed\n"	\
-	#asm_op " %1,%3,%0\n"						\
+	#asm_op "%I3" suffix " %1,%0,%3\n"				\
 "	stwcx.	%1,0,%4\n"						\
 "	bne-	1b\n"							\
 	: "=&r" (res), "=&r" (t), "+m" (v->counter)			\
-	: "r" (a), "r" (&v->counter)					\
-	: "cc");							\
+	: "r"#sign (a), "r" (&v->counter)				\
+	: "cc", ##__VA_ARGS__);						\
 									\
 	return res;							\
 }
 
-#define ATOMIC_OPS(op, asm_op)						\
-	ATOMIC_OP(op, asm_op)						\
-	ATOMIC_OP_RETURN_RELAXED(op, asm_op)				\
-	ATOMIC_FETCH_OP_RELAXED(op, asm_op)
+#define ATOMIC_OPS(op, asm_op, suffix, sign, ...)			\
+	ATOMIC_OP(op, asm_op, suffix, sign, ##__VA_ARGS__)		\
+	ATOMIC_OP_RETURN_RELAXED(op, asm_op, suffix, sign, ##__VA_ARGS__)\
+	ATOMIC_FETCH_OP_RELAXED(op, asm_op, suffix, sign, ##__VA_ARGS__)
 
-ATOMIC_OPS(add, add)
-ATOMIC_OPS(sub, subf)
+ATOMIC_OPS(add, add, "c", I, "xer")
+ATOMIC_OPS(sub, sub, "c", I, "xer")
 
 #define arch_atomic_add_return_relaxed arch_atomic_add_return_relaxed
 #define arch_atomic_sub_return_relaxed arch_atomic_sub_return_relaxed
@@ -101,13 +101,13 @@ ATOMIC_OPS(sub, subf)
 #define arch_atomic_fetch_sub_relaxed arch_atomic_fetch_sub_relaxed
 
 #undef ATOMIC_OPS
-#define ATOMIC_OPS(op, asm_op)						\
-	ATOMIC_OP(op, asm_op)						\
-	ATOMIC_FETCH_OP_RELAXED(op, asm_op)
+#define ATOMIC_OPS(op, asm_op, suffix, sign)				\
+	ATOMIC_OP(op, asm_op, suffix, sign)				\
+	ATOMIC_FETCH_OP_RELAXED(op, asm_op, suffix, sign)
 
-ATOMIC_OPS(and, and)
-ATOMIC_OPS(or, or)
-ATOMIC_OPS(xor, xor)
+ATOMIC_OPS(and, and, ".", K)
+ATOMIC_OPS(or, or, "", K)
+ATOMIC_OPS(xor, xor, "", K)
 
 #define arch_atomic_fetch_and_relaxed arch_atomic_fetch_and_relaxed
 #define arch_atomic_fetch_or_relaxed  arch_atomic_fetch_or_relaxed
@@ -241,15 +241,15 @@ static __inline__ int arch_atomic_fetch_add_unless(atomic_t *v, int a, int u)
 "1:	lwarx	%0,0,%1		# atomic_fetch_add_unless\n\
 	cmpw	0,%0,%3 \n\
 	beq	2f \n\
-	add	%0,%2,%0 \n"
+	add%I2c	%0,%0,%2 \n"
 "	stwcx.	%0,0,%1 \n\
 	bne-	1b \n"
 	PPC_ATOMIC_EXIT_BARRIER
-"	subf	%0,%2,%0 \n\
+"	sub%I2c	%0,%0,%2 \n\
 2:"
 	: "=&r" (t)
-	: "r" (&v->counter), "r" (a), "r" (u)
-	: "cc", "memory");
+	: "r" (&v->counter), "rI" (a), "r" (u)
+	: "cc", "memory", "xer");
 
 	return t;
 }
-- 
2.31.1


^ permalink raw reply related

* [PATCH v4 1/3] powerpc/bitops: Use immediate operand when possible
From: Christophe Leroy @ 2021-09-20  8:31 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
  Cc: linuxppc-dev, linux-kernel

Today we get the following code generation for bitops like
set or clear bit:

	c0009fe0:	39 40 08 00 	li      r10,2048
	c0009fe4:	7c e0 40 28 	lwarx   r7,0,r8
	c0009fe8:	7c e7 53 78 	or      r7,r7,r10
	c0009fec:	7c e0 41 2d 	stwcx.  r7,0,r8

	c000d568:	39 00 18 00 	li      r8,6144
	c000d56c:	7c c0 38 28 	lwarx   r6,0,r7
	c000d570:	7c c6 40 78 	andc    r6,r6,r8
	c000d574:	7c c0 39 2d 	stwcx.  r6,0,r7

Most set bits are constant on lower 16 bits, so it can easily
be replaced by the "immediate" version of the operation. Allow
GCC to choose between the normal or immediate form.

For clear bits, on 32 bits 'rlwinm' can be used instead of 'andc' for
when all bits to be cleared are consecutive.

On 64 bits we don't have any equivalent single operation for clearing,
single bits or a few bits, we'd need two 'rldicl' so it is not
worth it, the li/andc sequence is doing the same.

With this patch we get:

	c0009fe0:	7d 00 50 28 	lwarx   r8,0,r10
	c0009fe4:	61 08 08 00 	ori     r8,r8,2048
	c0009fe8:	7d 00 51 2d 	stwcx.  r8,0,r10

	c000d558:	7c e0 40 28 	lwarx   r7,0,r8
	c000d55c:	54 e7 05 64 	rlwinm  r7,r7,0,21,18
	c000d560:	7c e0 41 2d 	stwcx.  r7,0,r8

On pmac32_defconfig, it reduces the text by approx 10 kbytes.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
v4: Rebased

v3:
- Using the mask validation proposed by Segher

v2:
- Use "n" instead of "i" as constraint for the rlwinm mask
- Improve mask verification to handle more than single bit masks

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
 arch/powerpc/include/asm/bitops.h | 89 ++++++++++++++++++++++++++++---
 1 file changed, 81 insertions(+), 8 deletions(-)

diff --git a/arch/powerpc/include/asm/bitops.h b/arch/powerpc/include/asm/bitops.h
index 11847b6a244e..bbc5def2b85e 100644
--- a/arch/powerpc/include/asm/bitops.h
+++ b/arch/powerpc/include/asm/bitops.h
@@ -71,19 +71,61 @@ static inline void fn(unsigned long mask,	\
 	__asm__ __volatile__ (			\
 	prefix					\
 "1:"	PPC_LLARX "%0,0,%3,0\n"			\
-	stringify_in_c(op) "%0,%0,%2\n"		\
+	#op "%I2 %0,%0,%2\n"			\
 	PPC_STLCX "%0,0,%3\n"			\
 	"bne- 1b\n"				\
 	: "=&r" (old), "+m" (*p)		\
-	: "r" (mask), "r" (p)			\
+	: "rK" (mask), "r" (p)			\
 	: "cc", "memory");			\
 }
 
 DEFINE_BITOP(set_bits, or, "")
-DEFINE_BITOP(clear_bits, andc, "")
-DEFINE_BITOP(clear_bits_unlock, andc, PPC_RELEASE_BARRIER)
 DEFINE_BITOP(change_bits, xor, "")
 
+static __always_inline bool is_rlwinm_mask_valid(unsigned long x)
+{
+	if (!x)
+		return false;
+	if (x & 1)
+		x = ~x;	// make the mask non-wrapping
+	x += x & -x;	// adding the low set bit results in at most one bit set
+
+	return !(x & (x - 1));
+}
+
+#define DEFINE_CLROP(fn, prefix)					\
+static inline void fn(unsigned long mask, volatile unsigned long *_p)	\
+{									\
+	unsigned long old;						\
+	unsigned long *p = (unsigned long *)_p;				\
+									\
+	if (IS_ENABLED(CONFIG_PPC32) &&					\
+	    __builtin_constant_p(mask) && is_rlwinm_mask_valid(~mask)) {\
+		asm volatile (						\
+			prefix						\
+		"1:"	"lwarx	%0,0,%3\n"				\
+			"rlwinm	%0,%0,0,%2\n"				\
+			"stwcx.	%0,0,%3\n"				\
+			"bne- 1b\n"					\
+			: "=&r" (old), "+m" (*p)			\
+			: "n" (~mask), "r" (p)				\
+			: "cc", "memory");				\
+	} else {							\
+		asm volatile (						\
+			prefix						\
+		"1:"	PPC_LLARX "%0,0,%3,0\n"				\
+			"andc %0,%0,%2\n"				\
+			PPC_STLCX "%0,0,%3\n"				\
+			"bne- 1b\n"					\
+			: "=&r" (old), "+m" (*p)			\
+			: "r" (mask), "r" (p)				\
+			: "cc", "memory");				\
+	}								\
+}
+
+DEFINE_CLROP(clear_bits, "")
+DEFINE_CLROP(clear_bits_unlock, PPC_RELEASE_BARRIER)
+
 static inline void arch_set_bit(int nr, volatile unsigned long *addr)
 {
 	set_bits(BIT_MASK(nr), addr + BIT_WORD(nr));
@@ -116,12 +158,12 @@ static inline unsigned long fn(			\
 	__asm__ __volatile__ (				\
 	prefix						\
 "1:"	PPC_LLARX "%0,0,%3,%4\n"			\
-	stringify_in_c(op) "%1,%0,%2\n"			\
+	#op "%I2 %1,%0,%2\n"				\
 	PPC_STLCX "%1,0,%3\n"				\
 	"bne- 1b\n"					\
 	postfix						\
 	: "=&r" (old), "=&r" (t)			\
-	: "r" (mask), "r" (p), "i" (IS_ENABLED(CONFIG_PPC64) ? eh : 0)	\
+	: "rK" (mask), "r" (p), "i" (IS_ENABLED(CONFIG_PPC64) ? eh : 0)	\
 	: "cc", "memory");				\
 	return (old & mask);				\
 }
@@ -130,11 +172,42 @@ DEFINE_TESTOP(test_and_set_bits, or, PPC_ATOMIC_ENTRY_BARRIER,
 	      PPC_ATOMIC_EXIT_BARRIER, 0)
 DEFINE_TESTOP(test_and_set_bits_lock, or, "",
 	      PPC_ACQUIRE_BARRIER, 1)
-DEFINE_TESTOP(test_and_clear_bits, andc, PPC_ATOMIC_ENTRY_BARRIER,
-	      PPC_ATOMIC_EXIT_BARRIER, 0)
 DEFINE_TESTOP(test_and_change_bits, xor, PPC_ATOMIC_ENTRY_BARRIER,
 	      PPC_ATOMIC_EXIT_BARRIER, 0)
 
+static inline unsigned long test_and_clear_bits(unsigned long mask, volatile unsigned long *_p)
+{
+	unsigned long old, t;
+	unsigned long *p = (unsigned long *)_p;
+
+	if (IS_ENABLED(CONFIG_PPC32) &&
+	    __builtin_constant_p(mask) && is_rlwinm_mask_valid(mask)) {
+		asm volatile (
+			PPC_ATOMIC_ENTRY_BARRIER
+		"1:"	"lwarx %0,0,%3\n"
+			"rlwinm	%1,%0,0,%2\n"
+			"stwcx. %1,0,%3\n"
+			"bne- 1b\n"
+			PPC_ATOMIC_EXIT_BARRIER
+			: "=&r" (old), "=&r" (t)
+			: "n" (~mask), "r" (p)
+			: "cc", "memory");
+	} else {
+		asm volatile (
+			PPC_ATOMIC_ENTRY_BARRIER
+		"1:"	PPC_LLARX "%0,0,%3,0\n"
+			"andc	%1,%0,%2\n"
+			PPC_STLCX "%1,0,%3\n"
+			"bne- 1b\n"
+			PPC_ATOMIC_EXIT_BARRIER
+			: "=&r" (old), "=&r" (t)
+			: "r" (mask), "r" (p)
+			: "cc", "memory");
+	}
+
+	return (old & mask);
+}
+
 static inline int arch_test_and_set_bit(unsigned long nr,
 					volatile unsigned long *addr)
 {
-- 
2.31.1


^ permalink raw reply related

* [PATCH v2] lib/zlib_inflate/inffast: Check config in C to avoid unused function warning
From: Paul Menzel @ 2021-09-20  7:46 UTC (permalink / raw)
  To: Nathan Chancellor, Nick Desaulniers
  Cc: Paul Menzel, llvm, Zhen Lei, linux-kernel, Paul Mackerras,
	Andrew Morton, linuxppc-dev

Building Linux for ppc64le with Ubuntu clang version 12.0.0-3ubuntu1~21.04.1
shows the warning below.

    arch/powerpc/boot/inffast.c:20:1: warning: unused function 'get_unaligned16' [-Wunused-function]
    get_unaligned16(const unsigned short *p)
    ^
    1 warning generated.

Fix it, by moving the check from the preprocessor to C, so the compiler
sees the use.

Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
---
 lib/zlib_inflate/inffast.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/lib/zlib_inflate/inffast.c b/lib/zlib_inflate/inffast.c
index f19c4fbe1be7..fb87a3120f0f 100644
--- a/lib/zlib_inflate/inffast.c
+++ b/lib/zlib_inflate/inffast.c
@@ -254,11 +254,8 @@ void inflate_fast(z_streamp strm, unsigned start)
 			sfrom = (unsigned short *)(from);
 			loops = len >> 1;
 			do
-#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
-			    *sout++ = *sfrom++;
-#else
-			    *sout++ = get_unaligned16(sfrom++);
-#endif
+			    *sout++ = IS_ENABLED(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) ?
+				*sfrom++ : get_unaligned16(sfrom++);
 			while (--loops);
 			out = (unsigned char *)sout;
 			from = (unsigned char *)sfrom;
-- 
2.33.0


^ permalink raw reply related

* Re: [PATCH 1/2] powerpc/perf: Expose instruction and data address registers as part of extended regs
From: Michael Ellerman @ 2021-09-20  7:13 UTC (permalink / raw)
  To: Athira Rajeev
  Cc: Madhavan Srinivasan, rnsastry, kajoljain,
	Arnaldo Carvalho de Melo, Jiri Olsa, linuxppc-dev
In-Reply-To: <38CCAAE2-A157-4689-B774-43FC48883699@linux.vnet.ibm.com>

Athira Rajeev <atrajeev@linux.vnet.ibm.com> writes:
>> On 08-Sep-2021, at 10:47 AM, Michael Ellerman <mpe@ellerman.id.au> wrote:
>> 
>> Athira Rajeev <atrajeev@linux.vnet.ibm.com> writes:
>>> Patch adds support to include Sampled Instruction Address Register
>>> (SIAR) and Sampled Data Address Register (SDAR) SPRs as part of extended
>>> registers. Update the definition of PERF_REG_PMU_MASK_300/31 and
>>> PERF_REG_EXTENDED_MAX to include these SPR's.
>>> 
>>> Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
>>> ---
>>> arch/powerpc/include/uapi/asm/perf_regs.h | 12 +++++++-----
>>> arch/powerpc/perf/perf_regs.c             |  4 ++++
>>> 2 files changed, 11 insertions(+), 5 deletions(-)
>>> 
>> ...
>>> diff --git a/arch/powerpc/perf/perf_regs.c b/arch/powerpc/perf/perf_regs.c
>>> index b931eed..51d31b6 100644
>>> --- a/arch/powerpc/perf/perf_regs.c
>>> +++ b/arch/powerpc/perf/perf_regs.c
>>> @@ -90,7 +90,11 @@ static u64 get_ext_regs_value(int idx)
>>> 		return mfspr(SPRN_SIER2);
>>> 	case PERF_REG_POWERPC_SIER3:
>>> 		return mfspr(SPRN_SIER3);
>>> +	case PERF_REG_POWERPC_SDAR:
>>> +		return mfspr(SPRN_SDAR);
>>> #endif
>>> +	case PERF_REG_POWERPC_SIAR:
>>> +		return mfspr(SPRN_SIAR);
>>> 	default: return 0;
>>> 	}
>> 
>> This file is built for all powerpc configs that have PERF_EVENTS. Which
>> includes CPUs that don't have SDAR or SIAR.
>> 
>> Don't we need checks in perf_reg_value() like we do for SIER?
>
> Hi Michael,
>
> Thanks for the review.
>
> SIER is part of PERF_REG_PMU_MASK and hence check is needed to see if platform supports SIER.
> Incase of extended regs, they are part of PERF_REG_EXTENDED_MASK and this mask is
> filled with supported registers while registering the PMU ( ie during init_power9/10_pmu ). So these registers will be added
> only for supported platforms. The validity of extended mask is also done in PMU common code 
> ( In kernel/events/core.c with PERF_REG_EXTENDED_MASK check ). So an unsupported platform requesting for extended
> registers won’t get it.

Right, I'd forgotten how that works.

But I think part of the reason I didn't remember is that
PERF_REG_PMU_MASK_31 doesn't mention those regs by name, it's just a hex
constant, ie:

-#define PERF_REG_PMU_MASK_31   (0xfffULL << PERF_REG_POWERPC_MMCR0)
+#define PERF_REG_PMU_MASK_31   (0x3fffULL << PERF_REG_POWERPC_MMCR0)

Presumably you tested that the added 0x3 there sets the right bits for
SDAR and SIAR, but it's 1) not obvious and 2) fragile.

So I'd like it better if we constructed the PERF_REG_PMU_MASK_31, and
other similar masks, by or'ing together the actual register value
constants.

eg. something like:

#define PERF_REG_PMU_MASK_31	\
	((1ul << PERF_REG_POWERPC_MMCR0) | (1ul << PERF_REG_POWERPC_MMCR1) | \
	(1ul << PERF_REG_POWERPC_MMCR2) | (1ul << PERF_REG_POWERPC_MMCR3) | \
	(1ul << PERF_REG_POWERPC_SIER2) | (1ul << PERF_REG_POWERPC_SIER3) | \
	(1ul << PERF_REG_POWERPC_PMC1) | (1ul << PERF_REG_POWERPC_PMC2) | \
	(1ul << PERF_REG_POWERPC_PMC3) | (1ul << PERF_REG_POWERPC_PMC4) | \
	(1ul << PERF_REG_POWERPC_PMC5) | (1ul << PERF_REG_POWERPC_PMC6))


Also PERF_REG_EXTENDED_MAX should be part of the enum, just like
PERF_REG_POWERPC_MAX.

cheers

^ permalink raw reply

* Re: [PATCH 0/2] powerpc/perf: Add instruction and data address registers to extended regs
From: Michael Ellerman @ 2021-09-20  6:54 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Athira Rajeev
  Cc: kajoljain, Madhavan Srinivasan, linuxppc-dev, Jiri Olsa, rnsastry
In-Reply-To: <YTz+5JxjH45ER5N1@kernel.org>

Arnaldo Carvalho de Melo <acme@kernel.org> writes:
> Em Mon, Sep 06, 2021 at 08:13:13AM +0530, Athira Rajeev escreveu:
>> > On 02-Sep-2021, at 1:04 PM, kajoljain <kjain@linux.ibm.com> wrote:
>> > On 6/20/21 8:15 PM, Athira Rajeev wrote:
>> >> Patch set adds PMU registers namely Sampled Instruction Address Register
>> >> (SIAR) and Sampled Data Address Register (SDAR) as part of extended regs
>> >> in PowerPC. These registers provides the instruction/data address and
>> >> adding these to extended regs helps in debug purposes.
>> >> 
>> >> Patch 1/2 adds SIAR and SDAR as part of the extended regs mask.
>> >> Patch 2/2 includes perf tools side changes to add the SPRs to
>> >> sample_reg_mask to use with -I? option.
>> >> 
>> >> Athira Rajeev (2):
>> >>  powerpc/perf: Expose instruction and data address registers as part of
>> >>    extended regs
>> >>  tools/perf: Add perf tools support to expose instruction and data
>> >>    address registers as part of extended regs
>> >> 
>> > 
>> > Patchset looks good to me.
>> > 
>> > Reviewed-By: kajol Jain<kjain@linux.ibm.com>
>> 
>> Hi Arnaldo,
>> 
>> Requesting for your review on this patchset.
>
> So, this touches the kernel, usually I get a patchkit when the kernel
> bits landed, is that the case by now?

Not yet, I'd like some changes to the kernel patch.

cheers

^ permalink raw reply

* [PATCH v2 2/3] powerpc/inst: Define ppc_inst_t
From: Christophe Leroy @ 2021-09-20  6:22 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
  Cc: linuxppc-dev, linux-kernel
In-Reply-To: <9607dfbecab2ecccb712bbd25d2d5da882239d4c.1632118950.git.christophe.leroy@csgroup.eu>

In order to stop using 'struct ppc_inst' on PPC32,
define a ppc_inst_t typedef.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
v2: Anonymise the structure so that only the typedef can be used
---
 arch/powerpc/include/asm/code-patching.h      | 18 +++----
 arch/powerpc/include/asm/hw_breakpoint.h      |  4 +-
 arch/powerpc/include/asm/inst.h               | 36 ++++++-------
 arch/powerpc/include/asm/sstep.h              |  4 +-
 arch/powerpc/kernel/align.c                   |  4 +-
 arch/powerpc/kernel/epapr_paravirt.c          |  2 +-
 arch/powerpc/kernel/hw_breakpoint.c           |  4 +-
 .../kernel/hw_breakpoint_constraints.c        |  4 +-
 arch/powerpc/kernel/kprobes.c                 |  4 +-
 arch/powerpc/kernel/mce_power.c               |  2 +-
 arch/powerpc/kernel/optprobes.c               |  4 +-
 arch/powerpc/kernel/process.c                 |  2 +-
 arch/powerpc/kernel/setup_32.c                |  2 +-
 arch/powerpc/kernel/trace/ftrace.c            | 54 +++++++++----------
 arch/powerpc/kernel/vecemu.c                  |  2 +-
 arch/powerpc/lib/code-patching.c              | 38 ++++++-------
 arch/powerpc/lib/feature-fixups.c             |  4 +-
 arch/powerpc/lib/sstep.c                      |  4 +-
 arch/powerpc/lib/test_emulate_step.c          | 10 ++--
 arch/powerpc/mm/maccess.c                     |  2 +-
 arch/powerpc/perf/8xx-pmu.c                   |  2 +-
 arch/powerpc/xmon/xmon.c                      | 14 ++---
 arch/powerpc/xmon/xmon_bpts.h                 |  4 +-
 23 files changed, 112 insertions(+), 112 deletions(-)

diff --git a/arch/powerpc/include/asm/code-patching.h b/arch/powerpc/include/asm/code-patching.h
index a95f63788c6b..9bc0d752de23 100644
--- a/arch/powerpc/include/asm/code-patching.h
+++ b/arch/powerpc/include/asm/code-patching.h
@@ -23,20 +23,20 @@
 #define BRANCH_ABSOLUTE	0x2
 
 bool is_offset_in_branch_range(long offset);
-int create_branch(struct ppc_inst *instr, const u32 *addr,
+int create_branch(ppc_inst_t *instr, const u32 *addr,
 		  unsigned long target, int flags);
-int create_cond_branch(struct ppc_inst *instr, const u32 *addr,
+int create_cond_branch(ppc_inst_t *instr, const u32 *addr,
 		       unsigned long target, int flags);
 int patch_branch(u32 *addr, unsigned long target, int flags);
-int patch_instruction(u32 *addr, struct ppc_inst instr);
-int raw_patch_instruction(u32 *addr, struct ppc_inst instr);
+int patch_instruction(u32 *addr, ppc_inst_t instr);
+int raw_patch_instruction(u32 *addr, ppc_inst_t instr);
 
 static inline unsigned long patch_site_addr(s32 *site)
 {
 	return (unsigned long)site + *site;
 }
 
-static inline int patch_instruction_site(s32 *site, struct ppc_inst instr)
+static inline int patch_instruction_site(s32 *site, ppc_inst_t instr)
 {
 	return patch_instruction((u32 *)patch_site_addr(site), instr);
 }
@@ -57,11 +57,11 @@ static inline int modify_instruction_site(s32 *site, unsigned int clr, unsigned
 	return modify_instruction((unsigned int *)patch_site_addr(site), clr, set);
 }
 
-int instr_is_relative_branch(struct ppc_inst instr);
-int instr_is_relative_link_branch(struct ppc_inst instr);
+int instr_is_relative_branch(ppc_inst_t instr);
+int instr_is_relative_link_branch(ppc_inst_t instr);
 unsigned long branch_target(const u32 *instr);
-int translate_branch(struct ppc_inst *instr, const u32 *dest, const u32 *src);
-extern bool is_conditional_branch(struct ppc_inst instr);
+int translate_branch(ppc_inst_t *instr, const u32 *dest, const u32 *src);
+bool is_conditional_branch(ppc_inst_t instr);
 #ifdef CONFIG_PPC_BOOK3E_64
 void __patch_exception(int exc, unsigned long addr);
 #define patch_exception(exc, name) do { \
diff --git a/arch/powerpc/include/asm/hw_breakpoint.h b/arch/powerpc/include/asm/hw_breakpoint.h
index abebfbee5b1c..88053d3c68e6 100644
--- a/arch/powerpc/include/asm/hw_breakpoint.h
+++ b/arch/powerpc/include/asm/hw_breakpoint.h
@@ -56,11 +56,11 @@ static inline int nr_wp_slots(void)
 	return cpu_has_feature(CPU_FTR_DAWR1) ? 2 : 1;
 }
 
-bool wp_check_constraints(struct pt_regs *regs, struct ppc_inst instr,
+bool wp_check_constraints(struct pt_regs *regs, ppc_inst_t instr,
 			  unsigned long ea, int type, int size,
 			  struct arch_hw_breakpoint *info);
 
-void wp_get_instr_detail(struct pt_regs *regs, struct ppc_inst *instr,
+void wp_get_instr_detail(struct pt_regs *regs, ppc_inst_t *instr,
 			 int *type, int *size, unsigned long *ea);
 
 #ifdef CONFIG_HAVE_HW_BREAKPOINT
diff --git a/arch/powerpc/include/asm/inst.h b/arch/powerpc/include/asm/inst.h
index fea4d46155a9..055de1fa5d46 100644
--- a/arch/powerpc/include/asm/inst.h
+++ b/arch/powerpc/include/asm/inst.h
@@ -8,7 +8,7 @@
 ({									\
 	long __gui_ret;							\
 	u32 __user *__gui_ptr = (u32 __user *)ptr;			\
-	struct ppc_inst __gui_inst;					\
+	ppc_inst_t __gui_inst;						\
 	unsigned int __prefix, __suffix;				\
 									\
 	__chk_user_ptr(ptr);						\
@@ -34,29 +34,29 @@
  * Instruction data type for POWER
  */
 
-struct ppc_inst {
+typedef struct {
 	u32 val;
 #ifdef CONFIG_PPC64
 	u32 suffix;
 #endif
-} __packed;
+} __packed ppc_inst_t;
 
-static inline u32 ppc_inst_val(struct ppc_inst x)
+static inline u32 ppc_inst_val(ppc_inst_t x)
 {
 	return x.val;
 }
 
-static inline int ppc_inst_primary_opcode(struct ppc_inst x)
+static inline int ppc_inst_primary_opcode(ppc_inst_t x)
 {
 	return ppc_inst_val(x) >> 26;
 }
 
-#define ppc_inst(x) ((struct ppc_inst){ .val = (x) })
+#define ppc_inst(x) ((ppc_inst_t){ .val = (x) })
 
 #ifdef CONFIG_PPC64
-#define ppc_inst_prefix(x, y) ((struct ppc_inst){ .val = (x), .suffix = (y) })
+#define ppc_inst_prefix(x, y) ((ppc_inst_t){ .val = (x), .suffix = (y) })
 
-static inline u32 ppc_inst_suffix(struct ppc_inst x)
+static inline u32 ppc_inst_suffix(ppc_inst_t x)
 {
 	return x.suffix;
 }
@@ -64,14 +64,14 @@ static inline u32 ppc_inst_suffix(struct ppc_inst x)
 #else
 #define ppc_inst_prefix(x, y) ppc_inst(x)
 
-static inline u32 ppc_inst_suffix(struct ppc_inst x)
+static inline u32 ppc_inst_suffix(ppc_inst_t x)
 {
 	return 0;
 }
 
 #endif /* CONFIG_PPC64 */
 
-static inline struct ppc_inst ppc_inst_read(const u32 *ptr)
+static inline ppc_inst_t ppc_inst_read(const u32 *ptr)
 {
 	if (IS_ENABLED(CONFIG_PPC64) && (*ptr >> 26) == OP_PREFIX)
 		return ppc_inst_prefix(*ptr, *(ptr + 1));
@@ -79,17 +79,17 @@ static inline struct ppc_inst ppc_inst_read(const u32 *ptr)
 		return ppc_inst(*ptr);
 }
 
-static inline bool ppc_inst_prefixed(struct ppc_inst x)
+static inline bool ppc_inst_prefixed(ppc_inst_t x)
 {
 	return IS_ENABLED(CONFIG_PPC64) && ppc_inst_primary_opcode(x) == OP_PREFIX;
 }
 
-static inline struct ppc_inst ppc_inst_swab(struct ppc_inst x)
+static inline ppc_inst_t ppc_inst_swab(ppc_inst_t x)
 {
 	return ppc_inst_prefix(swab32(ppc_inst_val(x)), swab32(ppc_inst_suffix(x)));
 }
 
-static inline bool ppc_inst_equal(struct ppc_inst x, struct ppc_inst y)
+static inline bool ppc_inst_equal(ppc_inst_t x, ppc_inst_t y)
 {
 	if (ppc_inst_val(x) != ppc_inst_val(y))
 		return false;
@@ -98,7 +98,7 @@ static inline bool ppc_inst_equal(struct ppc_inst x, struct ppc_inst y)
 	return ppc_inst_suffix(x) == ppc_inst_suffix(y);
 }
 
-static inline int ppc_inst_len(struct ppc_inst x)
+static inline int ppc_inst_len(ppc_inst_t x)
 {
 	return ppc_inst_prefixed(x) ? 8 : 4;
 }
@@ -109,14 +109,14 @@ static inline int ppc_inst_len(struct ppc_inst x)
  */
 static inline u32 *ppc_inst_next(u32 *location, u32 *value)
 {
-	struct ppc_inst tmp;
+	ppc_inst_t tmp;
 
 	tmp = ppc_inst_read(value);
 
 	return (void *)location + ppc_inst_len(tmp);
 }
 
-static inline unsigned long ppc_inst_as_ulong(struct ppc_inst x)
+static inline unsigned long ppc_inst_as_ulong(ppc_inst_t x)
 {
 	if (IS_ENABLED(CONFIG_PPC32))
 		return ppc_inst_val(x);
@@ -128,7 +128,7 @@ static inline unsigned long ppc_inst_as_ulong(struct ppc_inst x)
 
 #define PPC_INST_STR_LEN sizeof("00000000 00000000")
 
-static inline char *__ppc_inst_as_str(char str[PPC_INST_STR_LEN], struct ppc_inst x)
+static inline char *__ppc_inst_as_str(char str[PPC_INST_STR_LEN], ppc_inst_t x)
 {
 	if (ppc_inst_prefixed(x))
 		sprintf(str, "%08x %08x", ppc_inst_val(x), ppc_inst_suffix(x));
@@ -145,6 +145,6 @@ static inline char *__ppc_inst_as_str(char str[PPC_INST_STR_LEN], struct ppc_ins
 	__str;				\
 })
 
-int copy_inst_from_kernel_nofault(struct ppc_inst *inst, u32 *src);
+int copy_inst_from_kernel_nofault(ppc_inst_t *inst, u32 *src);
 
 #endif /* _ASM_POWERPC_INST_H */
diff --git a/arch/powerpc/include/asm/sstep.h b/arch/powerpc/include/asm/sstep.h
index 1df867c2e054..50950deedb87 100644
--- a/arch/powerpc/include/asm/sstep.h
+++ b/arch/powerpc/include/asm/sstep.h
@@ -145,7 +145,7 @@ union vsx_reg {
  * otherwise.
  */
 extern int analyse_instr(struct instruction_op *op, const struct pt_regs *regs,
-			 struct ppc_inst instr);
+			 ppc_inst_t instr);
 
 /*
  * Emulate an instruction that can be executed just by updating
@@ -162,7 +162,7 @@ void emulate_update_regs(struct pt_regs *reg, struct instruction_op *op);
  * 0 if it could not be emulated, or -1 for an instruction that
  * should not be emulated (rfid, mtmsrd clearing MSR_RI, etc.).
  */
-extern int emulate_step(struct pt_regs *regs, struct ppc_inst instr);
+int emulate_step(struct pt_regs *regs, ppc_inst_t instr);
 
 /*
  * Emulate a load or store instruction by reading/writing the
diff --git a/arch/powerpc/kernel/align.c b/arch/powerpc/kernel/align.c
index bbb4181621dd..c0c9ce1dbfa6 100644
--- a/arch/powerpc/kernel/align.c
+++ b/arch/powerpc/kernel/align.c
@@ -105,7 +105,7 @@ static struct aligninfo spe_aligninfo[32] = {
  * so we don't need the address swizzling.
  */
 static int emulate_spe(struct pt_regs *regs, unsigned int reg,
-		       struct ppc_inst ppc_instr)
+		       ppc_inst_t ppc_instr)
 {
 	union {
 		u64 ll;
@@ -300,7 +300,7 @@ static int emulate_spe(struct pt_regs *regs, unsigned int reg,
 
 int fix_alignment(struct pt_regs *regs)
 {
-	struct ppc_inst instr;
+	ppc_inst_t instr;
 	struct instruction_op op;
 	int r, type;
 
diff --git a/arch/powerpc/kernel/epapr_paravirt.c b/arch/powerpc/kernel/epapr_paravirt.c
index 93b0f3ec8fb0..d4b8aff20815 100644
--- a/arch/powerpc/kernel/epapr_paravirt.c
+++ b/arch/powerpc/kernel/epapr_paravirt.c
@@ -37,7 +37,7 @@ static int __init early_init_dt_scan_epapr(unsigned long node,
 		return -1;
 
 	for (i = 0; i < (len / 4); i++) {
-		struct ppc_inst inst = ppc_inst(be32_to_cpu(insts[i]));
+		ppc_inst_t inst = ppc_inst(be32_to_cpu(insts[i]));
 		patch_instruction(epapr_hypercall_start + i, inst);
 #if !defined(CONFIG_64BIT) || defined(CONFIG_PPC_BOOK3E_64)
 		patch_instruction(epapr_ev_idle_start + i, inst);
diff --git a/arch/powerpc/kernel/hw_breakpoint.c b/arch/powerpc/kernel/hw_breakpoint.c
index 91a3be14808b..2669f80b3a49 100644
--- a/arch/powerpc/kernel/hw_breakpoint.c
+++ b/arch/powerpc/kernel/hw_breakpoint.c
@@ -523,7 +523,7 @@ static void larx_stcx_err(struct perf_event *bp, struct arch_hw_breakpoint *info
 
 static bool stepping_handler(struct pt_regs *regs, struct perf_event **bp,
 			     struct arch_hw_breakpoint **info, int *hit,
-			     struct ppc_inst instr)
+			     ppc_inst_t instr)
 {
 	int i;
 	int stepped;
@@ -616,7 +616,7 @@ int hw_breakpoint_handler(struct die_args *args)
 	int hit[HBP_NUM_MAX] = {0};
 	int nr_hit = 0;
 	bool ptrace_bp = false;
-	struct ppc_inst instr = ppc_inst(0);
+	ppc_inst_t instr = ppc_inst(0);
 	int type = 0;
 	int size = 0;
 	unsigned long ea;
diff --git a/arch/powerpc/kernel/hw_breakpoint_constraints.c b/arch/powerpc/kernel/hw_breakpoint_constraints.c
index 675d1f66ab72..484d285c4b86 100644
--- a/arch/powerpc/kernel/hw_breakpoint_constraints.c
+++ b/arch/powerpc/kernel/hw_breakpoint_constraints.c
@@ -80,7 +80,7 @@ static bool check_dawrx_constraints(struct pt_regs *regs, int type,
  * Return true if the event is valid wrt dawr configuration,
  * including extraneous exception. Otherwise return false.
  */
-bool wp_check_constraints(struct pt_regs *regs, struct ppc_inst instr,
+bool wp_check_constraints(struct pt_regs *regs, ppc_inst_t instr,
 			  unsigned long ea, int type, int size,
 			  struct arch_hw_breakpoint *info)
 {
@@ -136,7 +136,7 @@ static int cache_op_size(void)
 #endif
 }
 
-void wp_get_instr_detail(struct pt_regs *regs, struct ppc_inst *instr,
+void wp_get_instr_detail(struct pt_regs *regs, ppc_inst_t *instr,
 			 int *type, int *size, unsigned long *ea)
 {
 	struct instruction_op op;
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c
index 7a7cd6bda53e..89173338e2fa 100644
--- a/arch/powerpc/kernel/kprobes.c
+++ b/arch/powerpc/kernel/kprobes.c
@@ -124,7 +124,7 @@ int arch_prepare_kprobe(struct kprobe *p)
 {
 	int ret = 0;
 	struct kprobe *prev;
-	struct ppc_inst insn = ppc_inst_read(p->addr);
+	ppc_inst_t insn = ppc_inst_read(p->addr);
 
 	if ((unsigned long)p->addr & 0x03) {
 		printk("Attempt to register kprobe at an unaligned address\n");
@@ -244,7 +244,7 @@ NOKPROBE_SYMBOL(arch_prepare_kretprobe);
 static int try_to_emulate(struct kprobe *p, struct pt_regs *regs)
 {
 	int ret;
-	struct ppc_inst insn = ppc_inst_read(p->ainsn.insn);
+	ppc_inst_t insn = ppc_inst_read(p->ainsn.insn);
 
 	/* regs->nip is also adjusted if emulate_step returns 1 */
 	ret = emulate_step(regs, insn);
diff --git a/arch/powerpc/kernel/mce_power.c b/arch/powerpc/kernel/mce_power.c
index c2f55fe7092d..f2dd4daeddf8 100644
--- a/arch/powerpc/kernel/mce_power.c
+++ b/arch/powerpc/kernel/mce_power.c
@@ -455,7 +455,7 @@ static int mce_find_instr_ea_and_phys(struct pt_regs *regs, uint64_t *addr,
 	 * in real-mode is tricky and can lead to recursive
 	 * faults
 	 */
-	struct ppc_inst instr;
+	ppc_inst_t instr;
 	unsigned long pfn, instr_addr;
 	struct instruction_op op;
 	struct pt_regs tmp = *regs;
diff --git a/arch/powerpc/kernel/optprobes.c b/arch/powerpc/kernel/optprobes.c
index c79899abcec8..04b540c12800 100644
--- a/arch/powerpc/kernel/optprobes.c
+++ b/arch/powerpc/kernel/optprobes.c
@@ -153,7 +153,7 @@ static void patch_imm_load_insns(unsigned long val, int reg, kprobe_opcode_t *ad
 
 int arch_prepare_optimized_kprobe(struct optimized_kprobe *op, struct kprobe *p)
 {
-	struct ppc_inst branch_op_callback, branch_emulate_step, temp;
+	ppc_inst_t branch_op_callback, branch_emulate_step, temp;
 	unsigned long op_callback_addr, emulate_step_addr;
 	kprobe_opcode_t *buff;
 	long b_offset;
@@ -269,7 +269,7 @@ int arch_check_optimized_kprobe(struct optimized_kprobe *op)
 
 void arch_optimize_kprobes(struct list_head *oplist)
 {
-	struct ppc_inst instr;
+	ppc_inst_t instr;
 	struct optimized_kprobe *op;
 	struct optimized_kprobe *tmp;
 
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 50436b52c213..bcb7bfaea011 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -628,7 +628,7 @@ static void do_break_handler(struct pt_regs *regs)
 {
 	struct arch_hw_breakpoint null_brk = {0};
 	struct arch_hw_breakpoint *info;
-	struct ppc_inst instr = ppc_inst(0);
+	ppc_inst_t instr = ppc_inst(0);
 	int type = 0;
 	int size = 0;
 	unsigned long ea;
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 7ec5c47fce0e..4017b05ef643 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -75,7 +75,7 @@ EXPORT_SYMBOL(DMA_MODE_WRITE);
 notrace void __init machine_init(u64 dt_ptr)
 {
 	u32 *addr = (u32 *)patch_site_addr(&patch__memset_nocache);
-	struct ppc_inst insn;
+	ppc_inst_t insn;
 
 	/* Configure static keys first, now that we're relocated. */
 	setup_feature_keys();
diff --git a/arch/powerpc/kernel/trace/ftrace.c b/arch/powerpc/kernel/trace/ftrace.c
index d89c5df4f206..f293294ef5da 100644
--- a/arch/powerpc/kernel/trace/ftrace.c
+++ b/arch/powerpc/kernel/trace/ftrace.c
@@ -41,10 +41,10 @@
 #define	NUM_FTRACE_TRAMPS	8
 static unsigned long ftrace_tramps[NUM_FTRACE_TRAMPS];
 
-static struct ppc_inst
+static ppc_inst_t
 ftrace_call_replace(unsigned long ip, unsigned long addr, int link)
 {
-	struct ppc_inst op;
+	ppc_inst_t op;
 
 	addr = ppc_function_entry((void *)addr);
 
@@ -55,9 +55,9 @@ ftrace_call_replace(unsigned long ip, unsigned long addr, int link)
 }
 
 static int
-ftrace_modify_code(unsigned long ip, struct ppc_inst old, struct ppc_inst new)
+ftrace_modify_code(unsigned long ip, ppc_inst_t old, ppc_inst_t new)
 {
-	struct ppc_inst replaced;
+	ppc_inst_t replaced;
 
 	/*
 	 * Note:
@@ -90,24 +90,24 @@ ftrace_modify_code(unsigned long ip, struct ppc_inst old, struct ppc_inst new)
  */
 static int test_24bit_addr(unsigned long ip, unsigned long addr)
 {
-	struct ppc_inst op;
+	ppc_inst_t op;
 	addr = ppc_function_entry((void *)addr);
 
 	/* use the create_branch to verify that this offset can be branched */
 	return create_branch(&op, (u32 *)ip, addr, 0) == 0;
 }
 
-static int is_bl_op(struct ppc_inst op)
+static int is_bl_op(ppc_inst_t op)
 {
 	return (ppc_inst_val(op) & 0xfc000003) == 0x48000001;
 }
 
-static int is_b_op(struct ppc_inst op)
+static int is_b_op(ppc_inst_t op)
 {
 	return (ppc_inst_val(op) & 0xfc000003) == 0x48000000;
 }
 
-static unsigned long find_bl_target(unsigned long ip, struct ppc_inst op)
+static unsigned long find_bl_target(unsigned long ip, ppc_inst_t op)
 {
 	int offset;
 
@@ -127,7 +127,7 @@ __ftrace_make_nop(struct module *mod,
 {
 	unsigned long entry, ptr, tramp;
 	unsigned long ip = rec->ip;
-	struct ppc_inst op, pop;
+	ppc_inst_t op, pop;
 
 	/* read where this goes */
 	if (copy_inst_from_kernel_nofault(&op, (void *)ip)) {
@@ -221,7 +221,7 @@ static int
 __ftrace_make_nop(struct module *mod,
 		  struct dyn_ftrace *rec, unsigned long addr)
 {
-	struct ppc_inst op;
+	ppc_inst_t op;
 	unsigned int jmp[4];
 	unsigned long ip = rec->ip;
 	unsigned long tramp;
@@ -291,7 +291,7 @@ __ftrace_make_nop(struct module *mod,
 static unsigned long find_ftrace_tramp(unsigned long ip)
 {
 	int i;
-	struct ppc_inst instr;
+	ppc_inst_t instr;
 
 	/*
 	 * We have the compiler generated long_branch tramps at the end
@@ -329,9 +329,9 @@ static int add_ftrace_tramp(unsigned long tramp)
 static int setup_mcount_compiler_tramp(unsigned long tramp)
 {
 	int i;
-	struct ppc_inst op;
+	ppc_inst_t op;
 	unsigned long ptr;
-	struct ppc_inst instr;
+	ppc_inst_t instr;
 	static unsigned long ftrace_plt_tramps[NUM_FTRACE_TRAMPS];
 
 	/* Is this a known long jump tramp? */
@@ -396,7 +396,7 @@ static int setup_mcount_compiler_tramp(unsigned long tramp)
 static int __ftrace_make_nop_kernel(struct dyn_ftrace *rec, unsigned long addr)
 {
 	unsigned long tramp, ip = rec->ip;
-	struct ppc_inst op;
+	ppc_inst_t op;
 
 	/* Read where this goes */
 	if (copy_inst_from_kernel_nofault(&op, (void *)ip)) {
@@ -436,7 +436,7 @@ int ftrace_make_nop(struct module *mod,
 		    struct dyn_ftrace *rec, unsigned long addr)
 {
 	unsigned long ip = rec->ip;
-	struct ppc_inst old, new;
+	ppc_inst_t old, new;
 
 	/*
 	 * If the calling address is more that 24 bits away,
@@ -489,7 +489,7 @@ int ftrace_make_nop(struct module *mod,
  */
 #ifndef CONFIG_MPROFILE_KERNEL
 static int
-expected_nop_sequence(void *ip, struct ppc_inst op0, struct ppc_inst op1)
+expected_nop_sequence(void *ip, ppc_inst_t op0, ppc_inst_t op1)
 {
 	/*
 	 * We expect to see:
@@ -507,7 +507,7 @@ expected_nop_sequence(void *ip, struct ppc_inst op0, struct ppc_inst op1)
 }
 #else
 static int
-expected_nop_sequence(void *ip, struct ppc_inst op0, struct ppc_inst op1)
+expected_nop_sequence(void *ip, ppc_inst_t op0, ppc_inst_t op1)
 {
 	/* look for patched "NOP" on ppc64 with -mprofile-kernel */
 	if (!ppc_inst_equal(op0, ppc_inst(PPC_RAW_NOP())))
@@ -519,8 +519,8 @@ expected_nop_sequence(void *ip, struct ppc_inst op0, struct ppc_inst op1)
 static int
 __ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
 {
-	struct ppc_inst op[2];
-	struct ppc_inst instr;
+	ppc_inst_t op[2];
+	ppc_inst_t instr;
 	void *ip = (void *)rec->ip;
 	unsigned long entry, ptr, tramp;
 	struct module *mod = rec->arch.mod;
@@ -588,7 +588,7 @@ static int
 __ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
 {
 	int err;
-	struct ppc_inst op;
+	ppc_inst_t op;
 	u32 *ip = (u32 *)rec->ip;
 
 	/* read where this goes */
@@ -626,7 +626,7 @@ __ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
 
 static int __ftrace_make_call_kernel(struct dyn_ftrace *rec, unsigned long addr)
 {
-	struct ppc_inst op;
+	ppc_inst_t op;
 	void *ip = (void *)rec->ip;
 	unsigned long tramp, entry, ptr;
 
@@ -674,7 +674,7 @@ static int __ftrace_make_call_kernel(struct dyn_ftrace *rec, unsigned long addr)
 int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
 {
 	unsigned long ip = rec->ip;
-	struct ppc_inst old, new;
+	ppc_inst_t old, new;
 
 	/*
 	 * If the calling address is more that 24 bits away,
@@ -713,7 +713,7 @@ static int
 __ftrace_modify_call(struct dyn_ftrace *rec, unsigned long old_addr,
 					unsigned long addr)
 {
-	struct ppc_inst op;
+	ppc_inst_t op;
 	unsigned long ip = rec->ip;
 	unsigned long entry, ptr, tramp;
 	struct module *mod = rec->arch.mod;
@@ -807,7 +807,7 @@ int ftrace_modify_call(struct dyn_ftrace *rec, unsigned long old_addr,
 			unsigned long addr)
 {
 	unsigned long ip = rec->ip;
-	struct ppc_inst old, new;
+	ppc_inst_t old, new;
 
 	/*
 	 * If the calling address is more that 24 bits away,
@@ -847,7 +847,7 @@ int ftrace_modify_call(struct dyn_ftrace *rec, unsigned long old_addr,
 int ftrace_update_ftrace_func(ftrace_func_t func)
 {
 	unsigned long ip = (unsigned long)(&ftrace_call);
-	struct ppc_inst old, new;
+	ppc_inst_t old, new;
 	int ret;
 
 	old = ppc_inst_read((u32 *)&ftrace_call);
@@ -932,7 +932,7 @@ int ftrace_enable_ftrace_graph_caller(void)
 	unsigned long ip = (unsigned long)(&ftrace_graph_call);
 	unsigned long addr = (unsigned long)(&ftrace_graph_caller);
 	unsigned long stub = (unsigned long)(&ftrace_graph_stub);
-	struct ppc_inst old, new;
+	ppc_inst_t old, new;
 
 	old = ftrace_call_replace(ip, stub, 0);
 	new = ftrace_call_replace(ip, addr, 0);
@@ -945,7 +945,7 @@ int ftrace_disable_ftrace_graph_caller(void)
 	unsigned long ip = (unsigned long)(&ftrace_graph_call);
 	unsigned long addr = (unsigned long)(&ftrace_graph_caller);
 	unsigned long stub = (unsigned long)(&ftrace_graph_stub);
-	struct ppc_inst old, new;
+	ppc_inst_t old, new;
 
 	old = ftrace_call_replace(ip, addr, 0);
 	new = ftrace_call_replace(ip, stub, 0);
diff --git a/arch/powerpc/kernel/vecemu.c b/arch/powerpc/kernel/vecemu.c
index ae632569446f..fd9432875ebc 100644
--- a/arch/powerpc/kernel/vecemu.c
+++ b/arch/powerpc/kernel/vecemu.c
@@ -261,7 +261,7 @@ static unsigned int rfin(unsigned int x)
 
 int emulate_altivec(struct pt_regs *regs)
 {
-	struct ppc_inst instr;
+	ppc_inst_t instr;
 	unsigned int i, word;
 	unsigned int va, vb, vc, vd;
 	vector128 *vrs;
diff --git a/arch/powerpc/lib/code-patching.c b/arch/powerpc/lib/code-patching.c
index f9a3019e37b4..d1fd21d254a1 100644
--- a/arch/powerpc/lib/code-patching.c
+++ b/arch/powerpc/lib/code-patching.c
@@ -18,7 +18,7 @@
 #include <asm/setup.h>
 #include <asm/inst.h>
 
-static int __patch_instruction(u32 *exec_addr, struct ppc_inst instr, u32 *patch_addr)
+static int __patch_instruction(u32 *exec_addr, ppc_inst_t instr, u32 *patch_addr)
 {
 	if (!ppc_inst_prefixed(instr)) {
 		u32 val = ppc_inst_val(instr);
@@ -39,7 +39,7 @@ static int __patch_instruction(u32 *exec_addr, struct ppc_inst instr, u32 *patch
 	return -EFAULT;
 }
 
-int raw_patch_instruction(u32 *addr, struct ppc_inst instr)
+int raw_patch_instruction(u32 *addr, ppc_inst_t instr)
 {
 	return __patch_instruction(addr, instr, addr);
 }
@@ -141,7 +141,7 @@ static inline int unmap_patch_area(unsigned long addr)
 	return 0;
 }
 
-static int do_patch_instruction(u32 *addr, struct ppc_inst instr)
+static int do_patch_instruction(u32 *addr, ppc_inst_t instr)
 {
 	int err;
 	u32 *patch_addr = NULL;
@@ -180,14 +180,14 @@ static int do_patch_instruction(u32 *addr, struct ppc_inst instr)
 }
 #else /* !CONFIG_STRICT_KERNEL_RWX */
 
-static int do_patch_instruction(u32 *addr, struct ppc_inst instr)
+static int do_patch_instruction(u32 *addr, ppc_inst_t instr)
 {
 	return raw_patch_instruction(addr, instr);
 }
 
 #endif /* CONFIG_STRICT_KERNEL_RWX */
 
-int patch_instruction(u32 *addr, struct ppc_inst instr)
+int patch_instruction(u32 *addr, ppc_inst_t instr)
 {
 	/* Make sure we aren't patching a freed init section */
 	if (init_mem_is_free && init_section_contains(addr, 4)) {
@@ -200,7 +200,7 @@ NOKPROBE_SYMBOL(patch_instruction);
 
 int patch_branch(u32 *addr, unsigned long target, int flags)
 {
-	struct ppc_inst instr;
+	ppc_inst_t instr;
 
 	create_branch(&instr, addr, target, flags);
 	return patch_instruction(addr, instr);
@@ -232,7 +232,7 @@ bool is_offset_in_branch_range(long offset)
  * Helper to check if a given instruction is a conditional branch
  * Derived from the conditional checks in analyse_instr()
  */
-bool is_conditional_branch(struct ppc_inst instr)
+bool is_conditional_branch(ppc_inst_t instr)
 {
 	unsigned int opcode = ppc_inst_primary_opcode(instr);
 
@@ -250,7 +250,7 @@ bool is_conditional_branch(struct ppc_inst instr)
 }
 NOKPROBE_SYMBOL(is_conditional_branch);
 
-int create_branch(struct ppc_inst *instr, const u32 *addr,
+int create_branch(ppc_inst_t *instr, const u32 *addr,
 		  unsigned long target, int flags)
 {
 	long offset;
@@ -270,7 +270,7 @@ int create_branch(struct ppc_inst *instr, const u32 *addr,
 	return 0;
 }
 
-int create_cond_branch(struct ppc_inst *instr, const u32 *addr,
+int create_cond_branch(ppc_inst_t *instr, const u32 *addr,
 		       unsigned long target, int flags)
 {
 	long offset;
@@ -289,22 +289,22 @@ int create_cond_branch(struct ppc_inst *instr, const u32 *addr,
 	return 0;
 }
 
-static unsigned int branch_opcode(struct ppc_inst instr)
+static unsigned int branch_opcode(ppc_inst_t instr)
 {
 	return ppc_inst_primary_opcode(instr) & 0x3F;
 }
 
-static int instr_is_branch_iform(struct ppc_inst instr)
+static int instr_is_branch_iform(ppc_inst_t instr)
 {
 	return branch_opcode(instr) == 18;
 }
 
-static int instr_is_branch_bform(struct ppc_inst instr)
+static int instr_is_branch_bform(ppc_inst_t instr)
 {
 	return branch_opcode(instr) == 16;
 }
 
-int instr_is_relative_branch(struct ppc_inst instr)
+int instr_is_relative_branch(ppc_inst_t instr)
 {
 	if (ppc_inst_val(instr) & BRANCH_ABSOLUTE)
 		return 0;
@@ -312,7 +312,7 @@ int instr_is_relative_branch(struct ppc_inst instr)
 	return instr_is_branch_iform(instr) || instr_is_branch_bform(instr);
 }
 
-int instr_is_relative_link_branch(struct ppc_inst instr)
+int instr_is_relative_link_branch(ppc_inst_t instr)
 {
 	return instr_is_relative_branch(instr) && (ppc_inst_val(instr) & BRANCH_SET_LINK);
 }
@@ -359,7 +359,7 @@ unsigned long branch_target(const u32 *instr)
 	return 0;
 }
 
-int translate_branch(struct ppc_inst *instr, const u32 *dest, const u32 *src)
+int translate_branch(ppc_inst_t *instr, const u32 *dest, const u32 *src)
 {
 	unsigned long target;
 	target = branch_target(src);
@@ -412,7 +412,7 @@ static void __init test_trampoline(void)
 static void __init test_branch_iform(void)
 {
 	int err;
-	struct ppc_inst instr;
+	ppc_inst_t instr;
 	u32 tmp[2];
 	u32 *iptr = tmp;
 	unsigned long addr = (unsigned long)tmp;
@@ -494,7 +494,7 @@ static void __init test_create_function_call(void)
 {
 	u32 *iptr;
 	unsigned long dest;
-	struct ppc_inst instr;
+	ppc_inst_t instr;
 
 	/* Check we can create a function call */
 	iptr = (u32 *)ppc_function_entry(test_trampoline);
@@ -508,7 +508,7 @@ static void __init test_branch_bform(void)
 {
 	int err;
 	unsigned long addr;
-	struct ppc_inst instr;
+	ppc_inst_t instr;
 	u32 tmp[2];
 	u32 *iptr = tmp;
 	unsigned int flags;
@@ -586,7 +586,7 @@ static void __init test_translate_branch(void)
 {
 	unsigned long addr;
 	void *p, *q;
-	struct ppc_inst instr;
+	ppc_inst_t instr;
 	void *buf;
 
 	buf = vmalloc(PAGE_ALIGN(0x2000000 + 1));
diff --git a/arch/powerpc/lib/feature-fixups.c b/arch/powerpc/lib/feature-fixups.c
index cda17bee5afe..e4502ab949ae 100644
--- a/arch/powerpc/lib/feature-fixups.c
+++ b/arch/powerpc/lib/feature-fixups.c
@@ -47,7 +47,7 @@ static u32 *calc_addr(struct fixup_entry *fcur, long offset)
 static int patch_alt_instruction(u32 *src, u32 *dest, u32 *alt_start, u32 *alt_end)
 {
 	int err;
-	struct ppc_inst instr;
+	ppc_inst_t instr;
 
 	instr = ppc_inst_read(src);
 
@@ -613,7 +613,7 @@ void do_lwsync_fixups(unsigned long value, void *fixup_start, void *fixup_end)
 static void do_final_fixups(void)
 {
 #if defined(CONFIG_PPC64) && defined(CONFIG_RELOCATABLE)
-	struct ppc_inst inst;
+	ppc_inst_t inst;
 	u32 *src, *dest, *end;
 
 	if (PHYSICAL_START == 0)
diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c
index d8d5f901cee1..da8cd6a21ae2 100644
--- a/arch/powerpc/lib/sstep.c
+++ b/arch/powerpc/lib/sstep.c
@@ -1271,7 +1271,7 @@ static nokprobe_inline int trap_compare(long v1, long v2)
  * otherwise.
  */
 int analyse_instr(struct instruction_op *op, const struct pt_regs *regs,
-		  struct ppc_inst instr)
+		  ppc_inst_t instr)
 {
 #ifdef CONFIG_PPC64
 	unsigned int suffixopcode, prefixtype, prefix_r;
@@ -3495,7 +3495,7 @@ NOKPROBE_SYMBOL(emulate_loadstore);
  * or -1 if the instruction is one that should not be stepped,
  * such as an rfid, or a mtmsrd that would clear MSR_RI.
  */
-int emulate_step(struct pt_regs *regs, struct ppc_inst instr)
+int emulate_step(struct pt_regs *regs, ppc_inst_t instr)
 {
 	struct instruction_op op;
 	int r, err, type;
diff --git a/arch/powerpc/lib/test_emulate_step.c b/arch/powerpc/lib/test_emulate_step.c
index 8b4f6b3e96c4..4f141daafcff 100644
--- a/arch/powerpc/lib/test_emulate_step.c
+++ b/arch/powerpc/lib/test_emulate_step.c
@@ -792,7 +792,7 @@ static void __init test_lxvpx_stxvpx(void)
 #ifdef CONFIG_VSX
 static void __init test_plxvp_pstxvp(void)
 {
-	struct ppc_inst instr;
+	ppc_inst_t instr;
 	struct pt_regs regs;
 	union {
 		vector128 a;
@@ -906,7 +906,7 @@ struct compute_test {
 	struct {
 		char *descr;
 		unsigned long flags;
-		struct ppc_inst instr;
+		ppc_inst_t instr;
 		struct pt_regs regs;
 	} subtests[MAX_SUBTESTS + 1];
 };
@@ -1600,7 +1600,7 @@ static struct compute_test compute_tests[] = {
 };
 
 static int __init emulate_compute_instr(struct pt_regs *regs,
-					struct ppc_inst instr,
+					ppc_inst_t instr,
 					bool negative)
 {
 	int analysed;
@@ -1627,7 +1627,7 @@ static int __init emulate_compute_instr(struct pt_regs *regs,
 }
 
 static int __init execute_compute_instr(struct pt_regs *regs,
-					struct ppc_inst instr)
+					ppc_inst_t instr)
 {
 	extern int exec_instr(struct pt_regs *regs);
 
@@ -1658,7 +1658,7 @@ static void __init run_tests_compute(void)
 	struct compute_test *test;
 	struct pt_regs *regs, exp, got;
 	unsigned int i, j, k;
-	struct ppc_inst instr;
+	ppc_inst_t instr;
 	bool ignore_gpr, ignore_xer, ignore_ccr, passed, rc, negative;
 
 	for (i = 0; i < ARRAY_SIZE(compute_tests); i++) {
diff --git a/arch/powerpc/mm/maccess.c b/arch/powerpc/mm/maccess.c
index aad7c47e0030..5abae96b2b46 100644
--- a/arch/powerpc/mm/maccess.c
+++ b/arch/powerpc/mm/maccess.c
@@ -12,7 +12,7 @@ bool copy_from_kernel_nofault_allowed(const void *unsafe_src, size_t size)
 	return is_kernel_addr((unsigned long)unsafe_src);
 }
 
-int copy_inst_from_kernel_nofault(struct ppc_inst *inst, u32 *src)
+int copy_inst_from_kernel_nofault(ppc_inst_t *inst, u32 *src)
 {
 	unsigned int val, suffix;
 	int err;
diff --git a/arch/powerpc/perf/8xx-pmu.c b/arch/powerpc/perf/8xx-pmu.c
index f970d1510d3d..4738c4dbf567 100644
--- a/arch/powerpc/perf/8xx-pmu.c
+++ b/arch/powerpc/perf/8xx-pmu.c
@@ -153,7 +153,7 @@ static void mpc8xx_pmu_read(struct perf_event *event)
 
 static void mpc8xx_pmu_del(struct perf_event *event, int flags)
 {
-	struct ppc_inst insn = ppc_inst(PPC_RAW_MFSPR(10, SPRN_SPRG_SCRATCH2));
+	ppc_inst_t insn = ppc_inst(PPC_RAW_MFSPR(10, SPRN_SPRG_SCRATCH2));
 
 	mpc8xx_pmu_read(event);
 
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index dd8241c009e5..da9e89485d7a 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -125,7 +125,7 @@ static unsigned bpinstr = 0x7fe00008;	/* trap */
 static int cmds(struct pt_regs *);
 static int mread(unsigned long, void *, int);
 static int mwrite(unsigned long, void *, int);
-static int mread_instr(unsigned long, struct ppc_inst *);
+static int mread_instr(unsigned long, ppc_inst_t *);
 static int handle_fault(struct pt_regs *);
 static void byterev(unsigned char *, int);
 static void memex(void);
@@ -908,7 +908,7 @@ static struct bpt *new_breakpoint(unsigned long a)
 static void insert_bpts(void)
 {
 	int i;
-	struct ppc_inst instr, instr2;
+	ppc_inst_t instr, instr2;
 	struct bpt *bp, *bp2;
 
 	bp = bpts;
@@ -988,7 +988,7 @@ static void remove_bpts(void)
 {
 	int i;
 	struct bpt *bp;
-	struct ppc_inst instr;
+	ppc_inst_t instr;
 
 	bp = bpts;
 	for (i = 0; i < NBPTS; ++i, ++bp) {
@@ -1204,7 +1204,7 @@ static int do_step(struct pt_regs *regs)
  */
 static int do_step(struct pt_regs *regs)
 {
-	struct ppc_inst instr;
+	ppc_inst_t instr;
 	int stepped;
 
 	force_enable_xmon();
@@ -1459,7 +1459,7 @@ csum(void)
  */
 static long check_bp_loc(unsigned long addr)
 {
-	struct ppc_inst instr;
+	ppc_inst_t instr;
 
 	addr &= ~3;
 	if (!is_kernel_addr(addr)) {
@@ -2300,7 +2300,7 @@ mwrite(unsigned long adrs, void *buf, int size)
 }
 
 static int
-mread_instr(unsigned long adrs, struct ppc_inst *instr)
+mread_instr(unsigned long adrs, ppc_inst_t *instr)
 {
 	volatile int n;
 
@@ -3020,7 +3020,7 @@ generic_inst_dump(unsigned long adr, long count, int praddr,
 {
 	int nr, dotted;
 	unsigned long first_adr;
-	struct ppc_inst inst, last_inst = ppc_inst(0);
+	ppc_inst_t inst, last_inst = ppc_inst(0);
 
 	dotted = 0;
 	for (first_adr = adr; count > 0; --count, adr += ppc_inst_len(inst)) {
diff --git a/arch/powerpc/xmon/xmon_bpts.h b/arch/powerpc/xmon/xmon_bpts.h
index 57e6fb03de48..377068f52edb 100644
--- a/arch/powerpc/xmon/xmon_bpts.h
+++ b/arch/powerpc/xmon/xmon_bpts.h
@@ -5,8 +5,8 @@
 #define NBPTS	256
 #ifndef __ASSEMBLY__
 #include <asm/inst.h>
-#define BPT_SIZE	(sizeof(struct ppc_inst) * 2)
-#define BPT_WORDS	(BPT_SIZE / sizeof(struct ppc_inst))
+#define BPT_SIZE	(sizeof(ppc_inst_t) * 2)
+#define BPT_WORDS	(BPT_SIZE / sizeof(ppc_inst_t))
 
 extern unsigned int bpt_table[NBPTS * BPT_WORDS];
 #endif /* __ASSEMBLY__ */
-- 
2.31.1


^ permalink raw reply related

* [PATCH v2 3/3] powerpc/inst: Define ppc_inst_t as u32 on PPC32
From: Christophe Leroy @ 2021-09-20  6:22 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
  Cc: linuxppc-dev, linux-kernel
In-Reply-To: <9607dfbecab2ecccb712bbd25d2d5da882239d4c.1632118950.git.christophe.leroy@csgroup.eu>

Unlike PPC64 ABI, PPC32 uses the stack to pass a parameter defined
as a struct, even when the struct has a single simple element.

To avoid that, define ppc_inst_t as u32 on PPC32.

Keep it as 'struct ppc_inst' when __CHECKER__ is defined so that
sparse can perform type checking.

Also revert commit 511eea5e2ccd ("powerpc/kprobes: Fix Oops by passing
ppc_inst as a pointer to emulate_step() on ppc32") as now the
instruction to be emulated is passed as a register to emulate_step().

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
v2: Make it work with kprobes
---
 arch/powerpc/include/asm/inst.h | 15 +++++++++++++--
 arch/powerpc/kernel/optprobes.c |  8 ++------
 2 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/arch/powerpc/include/asm/inst.h b/arch/powerpc/include/asm/inst.h
index 055de1fa5d46..5c503816ebc0 100644
--- a/arch/powerpc/include/asm/inst.h
+++ b/arch/powerpc/include/asm/inst.h
@@ -34,6 +34,7 @@
  * Instruction data type for POWER
  */
 
+#if defined(CONFIG_PPC64) || defined(__CHECKER__)
 typedef struct {
 	u32 val;
 #ifdef CONFIG_PPC64
@@ -46,13 +47,23 @@ static inline u32 ppc_inst_val(ppc_inst_t x)
 	return x.val;
 }
 
+#define ppc_inst(x) ((ppc_inst_t){ .val = (x) })
+
+#else
+typedef u32 ppc_inst_t;
+
+static inline u32 ppc_inst_val(ppc_inst_t x)
+{
+	return x;
+}
+#define ppc_inst(x) (x)
+#endif
+
 static inline int ppc_inst_primary_opcode(ppc_inst_t x)
 {
 	return ppc_inst_val(x) >> 26;
 }
 
-#define ppc_inst(x) ((ppc_inst_t){ .val = (x) })
-
 #ifdef CONFIG_PPC64
 #define ppc_inst_prefix(x, y) ((ppc_inst_t){ .val = (x), .suffix = (y) })
 
diff --git a/arch/powerpc/kernel/optprobes.c b/arch/powerpc/kernel/optprobes.c
index 04b540c12800..7ab7f65fa6c6 100644
--- a/arch/powerpc/kernel/optprobes.c
+++ b/arch/powerpc/kernel/optprobes.c
@@ -228,12 +228,8 @@ int arch_prepare_optimized_kprobe(struct optimized_kprobe *op, struct kprobe *p)
 	/*
 	 * 3. load instruction to be emulated into relevant register, and
 	 */
-	if (IS_ENABLED(CONFIG_PPC64)) {
-		temp = ppc_inst_read(p->ainsn.insn);
-		patch_imm_load_insns(ppc_inst_as_ulong(temp), 4, buff + TMPL_INSN_IDX);
-	} else {
-		patch_imm_load_insns((unsigned long)p->ainsn.insn, 4, buff + TMPL_INSN_IDX);
-	}
+	temp = ppc_inst_read(p->ainsn.insn);
+	patch_imm_load_insns(ppc_inst_as_ulong(temp), 4, buff + TMPL_INSN_IDX);
 
 	/*
 	 * 4. branch back from trampoline
-- 
2.31.1


^ permalink raw reply related

* [PATCH v2 1/3] powerpc/inst: Refactor ___get_user_instr()
From: Christophe Leroy @ 2021-09-20  6:22 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
  Cc: linuxppc-dev, linux-kernel

PPC64 version of ___get_user_instr() can be used for PPC32 as well,
by simply disabling the suffix part with IS_ENABLED(CONFIG_PPC64).

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
 arch/powerpc/include/asm/inst.h | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/arch/powerpc/include/asm/inst.h b/arch/powerpc/include/asm/inst.h
index b11c0e2f9639..fea4d46155a9 100644
--- a/arch/powerpc/include/asm/inst.h
+++ b/arch/powerpc/include/asm/inst.h
@@ -4,8 +4,6 @@
 
 #include <asm/ppc-opcode.h>
 
-#ifdef CONFIG_PPC64
-
 #define ___get_user_instr(gu_op, dest, ptr)				\
 ({									\
 	long __gui_ret;							\
@@ -16,7 +14,7 @@
 	__chk_user_ptr(ptr);						\
 	__gui_ret = gu_op(__prefix, __gui_ptr);				\
 	if (__gui_ret == 0) {						\
-		if ((__prefix >> 26) == OP_PREFIX) {			\
+		if (IS_ENABLED(CONFIG_PPC64) && (__prefix >> 26) == OP_PREFIX) { \
 			__gui_ret = gu_op(__suffix, __gui_ptr + 1);	\
 			__gui_inst = ppc_inst_prefix(__prefix, __suffix); \
 		} else {						\
@@ -27,13 +25,6 @@
 	}								\
 	__gui_ret;							\
 })
-#else /* !CONFIG_PPC64 */
-#define ___get_user_instr(gu_op, dest, ptr)				\
-({									\
-	__chk_user_ptr(ptr);						\
-	gu_op((dest).val, (u32 __user *)(ptr));				\
-})
-#endif /* CONFIG_PPC64 */
 
 #define get_user_instr(x, ptr) ___get_user_instr(get_user, x, ptr)
 
-- 
2.31.1


^ permalink raw reply related

* [5.15-rc1][PPC/PCI] IPR adapter reset threw EEH and fail to recover while booting mainline on powerpc
From: Abdul Haleem @ 2021-09-20  5:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: sachinp, linux-scsi, linux-pci, dougmill, Brian King,
	linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 4129 bytes --]

Greeting's

IPR adapter reset triggers EEH errors and recovered 6 times and than 
task hung on today's mainline kernel on powerpc box with loads of hung 
task call traces

The problem is not seen with 5.14-rc7 (good)  and is last recreated on 
5.15-rc1 (bad) kernel

Console logs
EEH: Recovering PHB#134-PE#800000
EEH: PE location: N/A, PHB location: N/A
EEH: Frozen PHB#134-PE#800000 detected
EEH: Call Trace:
EEH: [c000000000054f90] __eeh_send_failure_event+0x70/0x150
EEH: [c00000000004e148] eeh_dev_check_failure+0x2e8/0x680
EEH: [c00000000004e5a8] eeh_check_failure+0xc8/0x100
EEH: [c008000000501c08] eeh_readl+0x70/0xa0 [ipr]
EEH: [c00800000050e76c] ipr_reset_enable_ioa+0x474/0x5a0 [ipr]
EEH: [c0080000005049a0] ipr_reset_ioa_job+0x78/0x150 [ipr]
EEH: [c008000000508f04] ipr_pci_slot_reset+0xac/0x140 [ipr]
EEH: [c000000000052ce8] eeh_report_reset+0xb8/0xe0
EEH: [c000000000054834] eeh_pe_report+0x254/0x4b4
EEH: [c000000000053efc] eeh_handle_normal_event+0x9dc/0xa80
EEH: [c000000000054de8] eeh_event_handler+0x108/0x190
EEH: [c00000000018151c] kthread+0x18c/0x1a0
EEH: [c00000000000cfd4] ret_from_kernel_thread+0x5c/0x64
EEH: PHB#134-PE#800000 has failed 6 times in the last hour and has been 
permanently disabled.
EEH: Unable to recover from failure from PHB#134-PE#800000.
Please try reseating or replacing it
EEH: of node=0134:80:00.0
EEH: PCI device/vendor: 034a1014
EEH: PCI cmd/status register: 00100546
EEH: PCI-E capabilities and status follow:
EEH: PCI-E 00: 0002a410 00008fc2 0000585e 0003f503
EEH: PCI-E 10: 10830000 00000000 00000000 00000000
EEH: PCI-E 20: 00000000
EEH: PCI-E AER capability register set follows:
EEH: PCI-E AER 00: 18820001 00000000 00400000 00462030
EEH: PCI-E AER 10: 00000000 0000e000 000001e0 00000000
EEH: PCI-E AER 20: 00000000 00000000 00000000 00000000
EEH: PCI-E AER 30: 00000000 00000000
EEH: Beginning: 'error_detected(permanent failure)'
PCI 0134:80:00.0#800000: EEH: not actionable (1,1,1)
[FAILED] Failed to start udev Wait for Complete Device Initialization.
See 'systemctl status systemd-udev-settle.service' for details.
          Starting Device-Mapper Multipath Device Controller...
[  OK  ] Started Device-Mapper Multipath Device Controller.
[  OK  ] Reached target Local File Systems (Pre).
[  OK  ] Reached target Local File Systems.
          Starting Create Volatile Files and Directories...
[  OK  ] Started Create Volatile Files and Directories.
[  OK  ] Reached target System Initialization.
[  OK  ] Reached target Basic System.
EEH: Finished:'error_detected(permanent failure)'
device-mapper: multipath service-time: version 0.3.0 loaded
INFO: task eehd:137 blocked for more than 122 seconds.
       Not tainted 5.15.0-rc1-autotest #3
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:eehd            state:D stack:    0 pid:  137 ppid:     2 
flags:0x00000800
Call Trace:
[c00000000d167650] [c0000000001c329c] __wake_up_common+0xcc/0x290 
(unreliable)
[c00000000d167840] [c00000000001e6c8] __switch_to+0x278/0x490
[c00000000d1678a0] [c000000000c8b9bc] __schedule+0x31c/0xa20
[c00000000d167960] [c000000000c8c128] schedule+0x68/0x120
[c00000000d167990] [c00800000050a3c4] __ipr_remove+0x10c/0x4b0 [ipr]
[c00000000d167a60] [c00800000050a828] ipr_remove+0xc0/0x110 [ipr]
[c00000000d167ae0] [c000000000732bd4] pci_device_remove+0x64/0x120
[c00000000d167b20] [c000000000811318] 
device_release_driver_internal+0x168/0x2c0
[c00000000d167b60] [c000000000724618] pci_stop_bus_device+0xa8/0x100
[c00000000d167ba0] [c000000000724810] 
pci_stop_and_remove_bus_device+0x20/0x40
[c00000000d167bd0] [c000000000075e60] pci_hp_remove_devices+0x90/0x130
[c00000000d167c60] [c000000000053cd8] eeh_handle_normal_event+0x7b8/0xa80
[c00000000d167d40] [c000000000054de8] eeh_event_handler+0x108/0x190
[c00000000d167da0] [c00000000018151c] kthread+0x18c/0x1a0
[c00000000d167e10] [c00000000000cfd4] ret_from_kernel_thread+0x5c/0x64
INFO: task systemd-udevd:473 blocked for more than 122 seconds.
       Not tainted 5.15.0-rc1-autotest #3

-- 
Regard's

Abdul Haleem
IBM Linux Technology Center


[-- Attachment #2: iprdebuglogs.txt --]
[-- Type: text/plain, Size: 79530 bytes --]



OF stdout device is: /vdevice/vty@30000000
Preparing to boot Linux version 5.15.0-rc1-autotest (root@ltcd11) (gcc (GCC) 8.4.1 20200928 (Red Hat 8.4.1-1), GNU ld version 2.30-93.el8) #5 SMP Mon Sep 13 10:16:56 EDT 2021
Detected machine type: 0000000000000101
command line: BOOT_IMAGE=/vmlinuz-5.15.0-rc1-autotest root=/dev/mapper/rhel_ltcd11-root ro crashkernel=auto rd.lvm.lv=rhel_ltcden11/root rd.lvm.lv=rhel_ltcden11-lp3/swap biosdevname=0 ipr.debug=1
Max number of cores passed to firmware: 256 (NR_CPUS = 2048)
Calling ibm,client-architecture-support... done
memory layout at init:
  memory_limit : 0000000000000000 (16 MB aligned)
  alloc_bottom : 0000000010560000
  alloc_top    : 0000000020000000
  alloc_top_hi : 0000000020000000
  rmo_top      : 0000000020000000
  ram_top      : 0000000020000000
instantiating rtas at 0x000000001ec30000... done
prom_hold_cpus: skipped
copying OF device tree...
Building dt strings...
Building dt structure...
Device tree strings 0x0000000010570000 -> 0x0000000010571aaa
Device tree struct  0x0000000010580000 -> 0x0000000010590000
Quiescing Open Firmware ...
Booting Linux via __start() @ 0x000000000a710000 ...
[    0.000000] crashkernel: memory value expected
[    0.000000] radix-mmu: Page sizes from device-tree:
[    0.000000] radix-mmu: Page size shift = 12 AP=0x0
[    0.000000] radix-mmu: Page size shift = 16 AP=0x5
[    0.000000] radix-mmu: Page size shift = 21 AP=0x1
[    0.000000] radix-mmu: Page size shift = 30 AP=0x2
[    0.000000] Activating Kernel Userspace Execution Prevention
[    0.000000] Activating Kernel Userspace Access Prevention
[    0.000000] radix-mmu: Mapped 0x0000000000000000-0x0000000001600000 with 2.00 MiB pages (exec)
[    0.000000] radix-mmu: Mapped 0x0000000001600000-0x0000000c80000000 with 2.00 MiB pages
[    0.000000] lpar: Using radix MMU under hypervisor
[    0.000000] Linux version 5.15.0-rc1-autotest (root@ltcd11) (gcc (GCC) 8.4.1 20200928 (Red Hat 8.4.1-1), GNU ld version 2.30-93.el8) #5 SMP Mon Sep 13 10:16:56 EDT 2021
[    0.000000] Found initrd at 0xc00000000c500000:0xc000000010558bc4
[    0.000000] Using pSeries machine description
[    0.000000] printk: bootconsole [udbg0] enabled
[    0.000000] Partition configured for 24 cpus.
[    0.000000] CPU maps initialized for 8 threads per core
[    0.000000] numa: Partition configured for 32 NUMA nodes.
[    0.000000] -----------------------------------------------------
[    0.000000] phys_mem_size     = 0xc80000000
[    0.000000] dcache_bsize      = 0x80
[    0.000000] icache_bsize      = 0x80
[    0.000000] cpu_features      = 0x000c00eb8f5f9187
[    0.000000]   possible        = 0x000ffbfbcf5fb187
[    0.000000]   always          = 0x0000000380008181
[    0.000000] cpu_user_features = 0xdc0065c2 0xaef60000
[    0.000000] mmu_features      = 0x3c007641
[    0.000000] firmware_features = 0x0000019fc45bfc57
[    0.000000] vmalloc start     = 0xc008000000000000
[    0.000000] IO start          = 0xc00a000000000000
[    0.000000] vmemmap start     = 0xc00c000000000000
[    0.000000] -----------------------------------------------------
[    0.000000] numa:   NODE_DATA [mem 0xc7fafb380-0xc7fb003ff]
[    0.000000] rfi-flush: fallback displacement flush available
[    0.000000] count-cache-flush: hardware flush enabled.
[    0.000000] link-stack-flush: software flush enabled.
[    0.000000] stf-barrier: eieio barrier available
[    0.000000] lpar: H_BLOCK_REMOVE supports base psize:0 psize:0 block size:8
[    0.000000] PPC64 nvram contains 15360 bytes
[    0.000000] barrier-nospec: using ORI speculation barrier
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000c7fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000c7fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000c7fffffff]
[    0.000000] percpu: Embedded 10 pages/cpu s590360 r0 d65000 u655360
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 818400
[    0.000000] Policy zone: Normal
[    0.000000] Kernel command line: BOOT_IMAGE=/vmlinuz-5.15.0-rc1-autotest root=/dev/mapper/rhel_ltcden11--lp3-root ro crashkernel=auto rd.lvm.lv=rhel_ltcden11-lp3/root rd.lvm.lv=rhel_ltcden11-lp3/swap biosdevname=0 ipr.debug=1
[    0.000000] Unknown command line parameters: BOOT_IMAGE=/vmlinuz-5.15.0-rc1-autotest crashkernel=auto biosdevname=0
[    0.000000] Dentry cache hash table entries: 8388608 (order: 10, 67108864 bytes, linear)
[    0.000000] Inode-cache hash table entries: 4194304 (order: 9, 33554432 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 52058944K/52428800K available (12928K kernel code, 5760K rwdata, 4096K rodata, 3904K init, 2625K bss, 369856K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=128, Order=0-3, MinObjects=0, CPUs=24, Nodes=32
[    0.000000] trace event string verifier disabled
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: 	RCU event tracing is enabled.
[    0.000000] rcu: 	RCU restricting CPUs from NR_CPUS=2048 to nr_cpu_ids=24.
[    0.000000] rcu: 	RCU debug extended QS entry/exit.
[    0.000000] 	Trampoline variant of Tasks RCU enabled.
[    0.000000] 	Rude variant of Tasks RCU enabled.
[    0.000000] 	Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=24
[    0.000000] NR_IRQS: 512, nr_irqs: 512, preallocated irqs: 16
[    0.000000] xive: Using IRQ range [400000-400017]
[    0.000000] xive: Interrupt handling initialized with spapr backend
[    0.000000] xive: Using priority 7 for all interrupts
[    0.000000] xive: Using 64kB queues
[    0.000000] rcu: 	Offload RCU callbacks from CPUs: (none).
[    0.000000] random: get_random_u64 called from start_kernel+0x65c/0x8bc with crng_init=0
[    0.000001] time_init: 56 bit decrementer (max: 7fffffffffffff)
[    0.000025] clocksource: timebase: mask: 0xffffffffffffffff max_cycles: 0x761537d007, max_idle_ns: 440795202126 ns
[    0.000065] clocksource: timebase mult[1f40000] shift[24] registered
[    0.000126] Console: colour dummy device 80x25
[    0.000146] printk: console [hvc0] enabled
[    0.000146] printk: console [hvc0] enabled
[    0.000164] printk: bootconsole [udbg0] disabled
[    0.000164] printk: bootconsole [udbg0] disabled
[    0.000202] pid_max: default: 32768 minimum: 301
[    0.000228] LSM: Security Framework initializing
[    0.000238] Yama: becoming mindful.
[    0.000245] SELinux:  Initializing.
[    0.000332] Mount-cache hash table entries: 131072 (order: 4, 1048576 bytes, linear)
[    0.000397] Mountpoint-cache hash table entries: 131072 (order: 4, 1048576 bytes, linear)
[    0.000993] POWER10 performance monitor hardware support registered
[    0.001012] rcu: Hierarchical SRCU implementation.
[    0.010106] Kprobe smoke test: started
[    0.017789] Kprobe smoke test: passed successfully
[    0.017976] smp: Bringing up secondary CPUs ...
[    0.022951] smp: Brought up 1 node, 24 CPUs
[    0.022959] numa: Node 0 CPUs: 0-23
[    0.022963] Big cores detected but using small core scheduling
[    0.023618] devtmpfs: initialized
[    0.025671] PCI host bridge /pci@800000020000010  ranges:
[    0.025681]  MEM 0x0000040000000000..0x000004007effffff -> 0x0000000080000000 
[    0.025686]  MEM 0x0000044000000000..0x0000047fffffffff -> 0x0006020000000000 
[    0.025704] PCI host bridge /pci@800000020000134  ranges:
[    0.025709]  MEM 0x0000040080000000..0x000004008fffffff -> 0x00000000e0000000 
[    0.025714]  MEM 0x0000041000000000..0x0000041fffffffff -> 0x0006202000000000 
[    0.025751] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.025759] futex hash table entries: 8192 (order: 4, 1048576 bytes, linear)
[    0.025968] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.026113] audit: initializing netlink subsys (disabled)
[    0.026159] audit: type=2000 audit(1631801812.020:1): state=initialized audit_enabled=0 res=1
[    0.026203] thermal_sys: Registered thermal governor 'fair_share'
[    0.026204] thermal_sys: Registered thermal governor 'step_wise'
[    0.026282] cpuidle: using governor menu
[    0.026448] pstore: Registered nvram as persistent store backend
[    0.026873] EEH: pSeries platform initialized
[    0.029200] software IO TLB: tearing down default memory pool
[    0.029262] PCI: Probing PCI hardware
[    0.029321] PCI host bridge to bus 0010:01
[    0.029326] pci_bus 0010:01: root bus resource [mem 0x40000000000-0x4007effffff] (bus address [0x80000000-0xfeffffff])
[    0.029332] pci_bus 0010:01: root bus resource [mem 0x44000000000-0x47fffffffff 64bit] (bus address [0x6020000000000-0x6023fffffffff])
[    0.029339] pci_bus 0010:01: root bus resource [bus 01-ff]
[    0.029855] pci 0010:01:00.0: No hypervisor support for SR-IOV on this device, IOV BARs disabled.
[    0.031328] pci 0010:01:00.0: PME# supported from D0 D3hot D3cold
[    0.032699] pci 0010:01:00.0: 63.008 Gb/s available PCIe bandwidth, limited by 8.0 GT/s PCIe x8 link at 0010:01:00.0 (capable of 126.016 Gb/s with 8.0 GT/s PCIe x16 link)
[    0.037434] IOMMU table initialized, virtual merging enabled
[    0.037490] PCI host bridge to bus 0134:80
[    0.037493] pci_bus 0134:80: Unknown NUMA node; performance will be reduced
[    0.037497] pci_bus 0134:80: root bus resource [mem 0x40080000000-0x4008fffffff] (bus address [0xe0000000-0xefffffff])
[    0.037503] pci_bus 0134:80: root bus resource [mem 0x41000000000-0x41fffffffff 64bit] (bus address [0x6202000000000-0x6202fffffffff])
[    0.037508] pci_bus 0134:80: root bus resource [bus 80-ff]
[    0.038166] pci 0134:80:00.0: No hypervisor support for SR-IOV on this device, IOV BARs disabled.
[    0.040026] pci 0134:80:00.0: PME# supported from D0 D3hot D3cold
[    0.041666] pci 0134:80:00.0: 63.008 Gb/s available PCIe bandwidth, limited by 8.0 GT/s PCIe x8 link at 0134:80:00.0 (capable of 126.016 Gb/s with 8.0 GT/s PCIe x16 link)
[    0.046896] pci 0010:01:00.0: Adding to iommu group 0
[    0.048009] pci 0134:80:00.0: Adding to iommu group 1
[    0.049538] EEH: Capable adapter found: recovery enabled.
[    0.049607] pseries-rng: Registering arch random hook.
[    0.050488] Kprobes globally optimized
[    0.050610] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    0.050615] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
[    0.079264] iommu: Default domain type: Translated 
[    0.079269] iommu: DMA domain TLB invalidation policy: strict mode 
[    0.079308] vgaarb: loaded
[    0.079398] SCSI subsystem initialized
[    0.079425] usbcore: registered new interface driver usbfs
[    0.079433] usbcore: registered new interface driver hub
[    0.079442] usbcore: registered new device driver usb
[    0.079496] EDAC MC: Ver: 3.0.0
[    0.079838] NetLabel: Initializing
[    0.079841] NetLabel:  domain hash size = 128
[    0.079843] NetLabel:  protocols = UNLABELED CIPSOv4 CALIPSO
[    0.079856] NetLabel:  unlabeled traffic allowed by default
[    0.079978] clocksource: Switched to clocksource timebase
[    0.086272] VFS: Disk quotas dquot_6.6.0
[    0.086308] VFS: Dquot-cache hash table entries: 8192 (order 0, 65536 bytes)
[    0.087857] NET: Registered PF_INET protocol family
[    0.088002] IP idents hash table entries: 262144 (order: 5, 2097152 bytes, linear)
[    0.090039] tcp_listen_portaddr_hash hash table entries: 32768 (order: 3, 524288 bytes, linear)
[    0.090105] TCP established hash table entries: 524288 (order: 6, 4194304 bytes, linear)
[    0.090810] TCP bind hash table entries: 65536 (order: 4, 1048576 bytes, linear)
[    0.090887] TCP: Hash tables configured (established 524288 bind 65536)
[    0.090934] UDP hash table entries: 32768 (order: 4, 1048576 bytes, linear)
[    0.091014] UDP-Lite hash table entries: 32768 (order: 4, 1048576 bytes, linear)
[    0.091153] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.091282] PCI: CLS 128 bytes, default 128
[    0.091355] Trying to unpack rootfs image as initramfs...
[    0.117522] vio_register_device_node: node lid missing 'reg'
[    0.117633] vas: GZIP feature is available
[    0.118526] hv-24x7: read 548 catalog entries, created 387 event attrs (0 failures), 387 descs
[    0.120504] Initialise system trusted keyrings
[    0.120560] workingset: timestamp_bits=38 max_order=20 bucket_order=0
[    0.121816] zbud: loaded
[    0.132036] NET: Registered PF_ALG protocol family
[    0.132043] Key type asymmetric registered
[    0.132047] Asymmetric key parser 'x509' registered
[    0.132063] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
[    0.132107] io scheduler mq-deadline registered
[    0.132112] io scheduler kyber registered
[    0.132382] atomic64_test: passed
[    0.132699] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.132892] Non-volatile memory driver v1.3
[    0.132916] Linux agpgart interface v0.103
[    0.133081] rdac: device handler registered
[    0.133119] hp_sw: device handler registered
[    0.133123] emc: device handler registered
[    0.133156] alua: device handler registered
[    0.133239] libphy: Fixed MDIO Bus: probed
[    0.133271] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.133281] ehci-pci: EHCI PCI platform driver
[    0.133290] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.133299] ohci-pci: OHCI PCI platform driver
[    0.133307] uhci_hcd: USB Universal Host Controller Interface driver
[    0.133339] usbcore: registered new interface driver usbserial_generic
[    0.133347] usbserial: USB Serial support registered for generic
[    0.133402] mousedev: PS/2 mouse device common for all mice
[    0.133506] rtc-generic rtc-generic: registered as rtc0
[    0.133532] rtc-generic rtc-generic: setting system clock to 2021-09-16T14:16:53 UTC (1631801813)
[    0.133611] xcede: xcede_record_size = 10
[    0.133615] xcede: Record 0 : hint = 1, latency = 0x1400 tb ticks, Wake-on-irq = 1
[    0.133620] xcede: Record 1 : hint = 2, latency = 0x3c00 tb ticks, Wake-on-irq = 0
[    0.133625] cpuidle: Skipping the 2 Extended CEDE idle states
[    0.133628] cpuidle: Fixed up CEDE exit latency to 10 us
[    0.133938] nx_compress_pseries ibm,compression-v1: nx842_OF_upd: max_sync_size new:65536 old:0
[    0.133945] nx_compress_pseries ibm,compression-v1: nx842_OF_upd: max_sync_sg new:510 old:0
[    0.133950] nx_compress_pseries ibm,compression-v1: nx842_OF_upd: max_sg_len new:4080 old:0
[    0.134062] alg: No test for 842 (842-nx)
[    0.134137] hid: raw HID events driver (C) Jiri Kosina
[    0.134250] usbcore: registered new interface driver usbhid
[    0.134256] usbhid: USB HID core driver
[    0.134271] drop_monitor: Initializing network drop monitor service
[    0.134350] Initializing XFRM netlink socket
[    0.134466] NET: Registered PF_INET6 protocol family
[    0.134706] Segment Routing with IPv6
[    0.134714] In-situ OAM (IOAM) with IPv6
[    0.134732] NET: Registered PF_PACKET protocol family
[    0.134786] Running instruction emulation self-tests ...
[    0.134792] emulate_step_test: ld             : PASS
[    0.134797] emulate_step_test: pld            : PASS
[    0.134801] emulate_step_test: lwz            : PASS
[    0.134806] emulate_step_test: plwz           : PASS
[    0.134810] emulate_step_test: lwzx           : PASS
[    0.134814] emulate_step_test: std            : PASS
[    0.134818] emulate_step_test: pstd           : PASS
[    0.134823] emulate_step_test: ldarx / stdcx. : PASS
[    0.134830] emulate_step_test: lfsx           : PASS
[    0.134834] emulate_step_test: stfsx          : PASS
[    0.134838] emulate_step_test: plfs           : PASS
[    0.134842] emulate_step_test: pstfs          : PASS
[    0.134846] emulate_step_test: lfdx           : PASS
[    0.134849] emulate_step_test: stfdx          : PASS
[    0.134853] emulate_step_test: plfd           : PASS
[    0.134856] emulate_step_test: pstfd          : PASS
[    0.134861] emulate_step_test: lvx            : PASS
[    0.134865] emulate_step_test: stvx           : PASS
[    0.134870] emulate_step_test: lxvd2x         : PASS
[    0.134875] emulate_step_test: stxvd2x        : PASS
[    0.134879] emulate_step_test: lxvp           : PASS
[    0.134884] emulate_step_test: stxvp          : PASS
[    0.134888] emulate_step_test: lxvpx          : PASS
[    0.134892] emulate_step_test: stxvpx         : PASS
[    0.134896] emulate_step_test: plxvp          : PASS
[    0.134900] emulate_step_test: pstxvp         : PASS
[    0.134904] emulate_step_test: nop            : R0 = LONG_MAX                                      PASS
[    0.134910] emulate_step_test: setb           : BFA = 1, CR = GT                                   PASS
[    0.134916] emulate_step_test: setb           : BFA = 4, CR = LT                                   PASS
[    0.134921] emulate_step_test: setb           : BFA = 5, CR = EQ                                   PASS
[    0.134926] emulate_step_test: add            : RA = LONG_MIN, RB = LONG_MIN                       PASS
[    0.134931] emulate_step_test: add            : RA = LONG_MIN, RB = LONG_MAX                       PASS
[    0.134936] emulate_step_test: add            : RA = LONG_MAX, RB = LONG_MAX                       PASS
[    0.134941] emulate_step_test: add            : RA = ULONG_MAX, RB = ULONG_MAX                     PASS
[    0.134946] emulate_step_test: add            : RA = ULONG_MAX, RB = 0x1                           PASS
[    0.134951] emulate_step_test: add            : RA = INT_MIN, RB = INT_MIN                         PASS
[    0.134956] emulate_step_test: add            : RA = INT_MIN, RB = INT_MAX                         PASS
[    0.134961] emulate_step_test: add            : RA = INT_MAX, RB = INT_MAX                         PASS
[    0.134967] emulate_step_test: add            : RA = UINT_MAX, RB = UINT_MAX                       PASS
[    0.134972] emulate_step_test: add            : RA = UINT_MAX, RB = 0x1                            PASS
[    0.134977] emulate_step_test: add.           : RA = LONG_MIN, RB = LONG_MIN                       PASS
[    0.134982] emulate_step_test: add.           : RA = LONG_MIN, RB = LONG_MAX                       PASS
[    0.134987] emulate_step_test: add.           : RA = LONG_MAX, RB = LONG_MAX                       PASS
[    0.134992] emulate_step_test: add.           : RA = ULONG_MAX, RB = ULONG_MAX                     PASS
[    0.134997] emulate_step_test: add.           : RA = ULONG_MAX, RB = 0x1                           PASS
[    0.135002] emulate_step_test: add.           : RA = INT_MIN, RB = INT_MIN                         PASS
[    0.135007] emulate_step_test: add.           : RA = INT_MIN, RB = INT_MAX                         PASS
[    0.135013] emulate_step_test: add.           : RA = INT_MAX, RB = INT_MAX                         PASS
[    0.135018] emulate_step_test: add.           : RA = UINT_MAX, RB = UINT_MAX                       PASS
[    0.135022] emulate_step_test: add.           : RA = UINT_MAX, RB = 0x1                            PASS
[    0.135028] emulate_step_test: addc           : RA = LONG_MIN, RB = LONG_MIN                       PASS
[    0.135033] emulate_step_test: addc           : RA = LONG_MIN, RB = LONG_MAX                       PASS
[    0.135038] emulate_step_test: addc           : RA = LONG_MAX, RB = LONG_MAX                       PASS
[    0.135043] emulate_step_test: addc           : RA = ULONG_MAX, RB = ULONG_MAX                     PASS
[    0.135048] emulate_step_test: addc           : RA = ULONG_MAX, RB = 0x1                           PASS
[    0.135053] emulate_step_test: addc           : RA = INT_MIN, RB = INT_MIN                         PASS
[    0.135058] emulate_step_test: addc           : RA = INT_MIN, RB = INT_MAX                         PASS
[    0.135064] emulate_step_test: addc           : RA = INT_MAX, RB = INT_MAX                         PASS
[    0.135069] emulate_step_test: addc           : RA = UINT_MAX, RB = UINT_MAX                       PASS
[    0.135074] emulate_step_test: addc           : RA = UINT_MAX, RB = 0x1                            PASS
[    0.135079] emulate_step_test: addc           : RA = LONG_MIN | INT_MIN, RB = LONG_MIN | INT_MIN   PASS
[    0.135085] emulate_step_test: addc.          : RA = LONG_MIN, RB = LONG_MIN                       PASS
[    0.135090] emulate_step_test: addc.          : RA = LONG_MIN, RB = LONG_MAX                       PASS
[    0.135098] emulate_step_test: addc.          : RA = LONG_MAX, RB = LONG_MAX                       PASS
[    0.135103] emulate_step_test: addc.          : RA = ULONG_MAX, RB = ULONG_MAX                     PASS
[    0.135109] emulate_step_test: addc.          : RA = ULONG_MAX, RB = 0x1                           PASS
[    0.135114] emulate_step_test: addc.          : RA = INT_MIN, RB = INT_MIN                         PASS
[    0.135119] emulate_step_test: addc.          : RA = INT_MIN, RB = INT_MAX                         PASS
[    0.135124] emulate_step_test: addc.          : RA = INT_MAX, RB = INT_MAX                         PASS
[    0.135130] emulate_step_test: addc.          : RA = UINT_MAX, RB = UINT_MAX                       PASS
[    0.135135] emulate_step_test: addc.          : RA = UINT_MAX, RB = 0x1                            PASS
[    0.135140] emulate_step_test: addc.          : RA = LONG_MIN | INT_MIN, RB = LONG_MIN | INT_MIN   PASS
[    0.135146] emulate_step_test: divde          : RA = LONG_MIN, RB = LONG_MIN                       PASS
[    0.135151] emulate_step_test: divde          : RA = 1L, RB = 0                                    PASS
[    0.135156] emulate_step_test: divde          : RA = LONG_MIN, RB = LONG_MAX                       PASS
[    0.135162] emulate_step_test: divde.         : RA = LONG_MIN, RB = LONG_MIN                       PASS
[    0.135167] emulate_step_test: divde.         : RA = 1L, RB = 0                                    PASS
[    0.135172] emulate_step_test: divde.         : RA = LONG_MIN, RB = LONG_MAX                       PASS
[    0.135177] emulate_step_test: divdeu         : RA = LONG_MIN, RB = LONG_MIN                       PASS
[    0.135183] emulate_step_test: divdeu         : RA = 1L, RB = 0                                    PASS
[    0.135188] emulate_step_test: divdeu         : RA = LONG_MIN, RB = LONG_MAX                       PASS
[    0.135193] emulate_step_test: divdeu         : RA = LONG_MAX - 1, RB = LONG_MAX                   PASS
[    0.135198] emulate_step_test: divdeu         : RA = LONG_MIN + 1, RB = LONG_MIN                   PASS
[    0.135203] emulate_step_test: divdeu.        : RA = LONG_MIN, RB = LONG_MIN                       PASS
[    0.135208] emulate_step_test: divdeu.        : RA = 1L, RB = 0                                    PASS
[    0.135213] emulate_step_test: divdeu.        : RA = LONG_MIN, RB = LONG_MAX                       PASS
[    0.135219] emulate_step_test: divdeu.        : RA = LONG_MAX - 1, RB = LONG_MAX                   PASS
[    0.135224] emulate_step_test: divdeu.        : RA = LONG_MIN + 1, RB = LONG_MIN                   PASS
[    0.135229] emulate_step_test: paddi          : RA = LONG_MIN, SI = SI_MIN, R = 0                  PASS
[    0.135234] emulate_step_test: paddi          : RA = LONG_MIN, SI = SI_MAX, R = 0                  PASS
[    0.135239] emulate_step_test: paddi          : RA = LONG_MAX, SI = SI_MAX, R = 0                  PASS
[    0.135245] emulate_step_test: paddi          : RA = ULONG_MAX, SI = SI_UMAX, R = 0                PASS
[    0.135250] emulate_step_test: paddi          : RA = ULONG_MAX, SI = 0x1, R = 0                    PASS
[    0.135255] emulate_step_test: paddi          : RA = INT_MIN, SI = SI_MIN, R = 0                   PASS
[    0.135260] emulate_step_test: paddi          : RA = INT_MIN, SI = SI_MAX, R = 0                   PASS
[    0.135265] emulate_step_test: paddi          : RA = INT_MAX, SI = SI_MAX, R = 0                   PASS
[    0.135270] emulate_step_test: paddi          : RA = UINT_MAX, SI = 0x1, R = 0                     PASS
[    0.135276] emulate_step_test: paddi          : RA = UINT_MAX, SI = SI_MAX, R = 0                  PASS
[    0.135281] emulate_step_test: paddi          : RA is r0, SI = SI_MIN, R = 0                       PASS
[    0.135286] emulate_step_test: paddi          : RA = 0, SI = SI_MIN, R = 0                         PASS
[    0.135292] emulate_step_test: paddi          : RA is r0, SI = 0, R = 1                            PASS
[    0.135297] emulate_step_test: paddi          : RA is r0, SI = SI_MIN, R = 1                       PASS
[    0.135302] emulate_step_test: paddi          : RA = R22(0), SI = 0, R = 1                         PASS
[    0.136064] registered taskstats version 1
[    0.136315] Loading compiled-in X.509 certificates
[    0.402845] random: fast init done
[    0.863696] Freeing initrd memory: 65856K
[    0.865419] alg: No test for pkcs1pad(rsa,sha1) (pkcs1pad(rsa-generic,sha1))
[    0.865939] Loaded X.509 cert 'Build time autogenerated kernel key: a5f791480b3ed63caeaff187da537ab36b5500c1'
[    0.866007] zswap: loaded using pool lzo/zbud
[    0.867046] pstore: Using crash dump compression: deflate
[    0.920244] Freeing unused kernel image (initmem) memory: 3904K
[    0.920254] Kernel memory protection not selected by kernel config.
[    0.920261] Run /init as init process
[    0.926916] systemd[1]: systemd 239 (239-45.el8) running in system mode. (+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=legacy)
[    0.927020] systemd[1]: Detected architecture ppc64-le.
[    0.927026] systemd[1]: Running in initial RAM disk.

Welcome to Red Hat Enterprise Linux 8.4 (Ootpa) dracut-049-135.git20210121.el8 (Initramfs)!

[    0.960343] systemd[1]: Set hostname to <ltcden11-lp3.aus.stglabs.ibm.com>.
[    0.993161] random: systemd: uninitialized urandom read (16 bytes read)
[    0.993191] systemd[1]: Reached target Swap.
[  OK  ] Reached target Swap.
[    0.993296] random: systemd: uninitialized urandom read (16 bytes read)
[    0.993304] systemd[1]: Reached target Timers.
[  OK  ] Reached target Timers.
[    0.993343] random: systemd: uninitialized urandom read (16 bytes read)
[    0.993352] systemd[1]: Reached target Slices.
[  OK  ] Reached target Slices.
[    0.993449] systemd[1]: Listening on udev Control Socket.
[  OK  ] Listening on udev Control Socket.
[    0.993519] systemd[1]: Listening on udev Kernel Socket.
[  OK  ] Listening on udev Kernel Socket.
[    0.993601] systemd[1]: Listening on Journal Socket (/dev/log).
[  OK  ] Listening on Journal Socket (/dev/log).
[  OK  ] Listening on Journal Socket.
         Starting Journal Service...
[  OK  ] Started Memstrack Anylazing Service.
[  OK  ] Reached target Sockets.
[  OK  ] Started Hardware RNG Entropy Gatherer Daemon.
         Starting Load Kernel Modules...
         Starting Create list of required st…ce nodes for the current kernel...
         Starting Setup Virtual Console...
[  OK  ] Started Create list of required sta…vice nodes for the current kernel.
         Starting Create Static Device Nodes in /dev...
[  OK  ] Started Create Static Device Nodes in /dev.
[    1.015760] fuse: init (API version 7.34)
[  OK  ] Started Load Kernel Modules.
         Starting Apply Kernel Variables...
[  OK  ] Started Journal Service.
[  OK  ] Started Apply Kernel Variables.
[  OK  ] Started Setup Virtual Console.
         Starting dracut ask for additional cmdline parameters...
[  OK  ] Started dracut ask for additional cmdline parameters.
         Starting dracut cmdline hook...
[  OK  ] Started dracut cmdline hook.
         Starting dracut pre-udev hook...
[    1.150387] device-mapper: uevent: version 1.0.3
[    1.150462] device-mapper: ioctl: 4.45.0-ioctl (2021-03-22) initialised: dm-devel@redhat.com
[  OK  ] Started dracut pre-udev hook.
         Starting udev Kernel Device Manager...
[  OK  ] Started udev Kernel Device Manager.
         Starting udev Coldplug all Devices...
         Mounting Kernel Configuration File System...
[  OK  ] Mounted Kernel Configuration File System.
[    1.234519] synth uevent: /devices/vio: failed to send uevent
[    1.234534] vio vio: uevent: failed to send synthetic uevent
[    1.234589] synth uevent: /devices/vio/4000: failed to send uevent
[    1.234595] vio 4000: uevent: failed to send synthetic uevent
[    1.234610] synth uevent: /devices/vio/4001: failed to send uevent
[    1.234616] vio 4001: uevent: failed to send synthetic uevent
[    1.234630] synth uevent: /devices/vio/4002: failed to send uevent
[    1.234636] vio 4002: uevent: failed to send synthetic uevent
[    1.234650] synth uevent: /devices/vio/4004: failed to send uevent
[    1.234656] vio 4004: uevent: failed to send synthetic uevent
[  OK  ] Started udev Coldplug all Devices.
         Starting Show Plymouth Boot Screen...
         Starting udev Wait for Complete Device Initialization...
         Starting dracut initqueue hook...
[    1.256579] ipr: IBM Power RAID SCSI Device Driver version: 2.6.4 (March 14, 2017)
[    1.256627] ipr: Entering ipr_probe_ioa
[    1.256636] ipr 0010:01:00.0: Found IOA with IRQ: 0
[    1.256925] ipr 0010:01:00.0: enabling device (0140 -> 0142)
[    1.257138] ipr 0010:01:00.0: ibm,query-pe-dma-windows(53) 10000 8000000 20000010 returned 0
[    1.257893] ipr 0010:01:00.0: ibm,create-pe-dma-window(54) 10000 8000000 20000010 10 24 returned 0 (liobn = 0x70000010 starting addr = 8000000 0)
[    1.260344] ibmveth 30000002 net0: renamed from eth0
[    1.260696] ibmvfc: IBM Virtual Fibre Channel Driver version: 1.0.11 (April 12, 2013)
[    1.261087] scsi host1: IBM POWER Virtual FC Adapter
[  OK  ] Started Show Plymouth Boot Screen.
[    1.261836] ibmvfc 300000cb: Partner initialization complete
[  OK  ] Reached target Paths.
[  OK  ] Started Forward Password Requests to Plymouth Directory Watch.
[    1.270767] ibmvfc 300000cb: Host partition: ltcden11-vios1, device: vfchost2 U78D8.ND0.FGD004S-P0-C1-C0-T1 U9080.HEX.134C488-V100-C203 max sectors 2048
[    1.284176] scsi 1:0:0:0: Direct-Access     IBM      2145             0000 PQ: 0 ANSI: 6
[    1.286246] scsi 1:0:0:0: alua: supports implicit TPGS
[    1.286254] scsi 1:0:0:0: alua: device naa.60050768108001b3a8000000000000c5 port group 10 rel port 680
[    1.286893] scsi 1:0:1:0: Direct-Access     IBM      2145             0000 PQ: 0 ANSI: 6
[    1.287436] scsi 1:0:1:0: alua: supports implicit TPGS
[    1.287442] scsi 1:0:1:0: alua: device naa.60050768108001b3a8000000000000c5 port group 11 rel port e80
[    1.290119] scsi 1:0:0:0: Attached scsi generic sg0 type 0
[    1.290170] scsi 1:0:1:0: Attached scsi generic sg1 type 0
[    1.293817] sd 1:0:1:0: Power-on or device reset occurred
[    1.293972] sd 1:0:0:0: Power-on or device reset occurred
[    1.341504] sd 1:0:1:0: alua: transition timeout set to 60 seconds
[    1.341512] sd 1:0:1:0: alua: port group 11 state A non-preferred supports tolusna
[    1.341631] sd 1:0:0:0: alua: transition timeout set to 60 seconds
[    1.341641] sd 1:0:0:0: alua: port group 10 state N non-preferred supports tolusna
[    1.341966] sd 1:0:1:0: [sdb] 209715200 512-byte logical blocks: (107 GB/100 GiB)
[    1.342053] sd 1:0:1:0: [sdb] Write Protect is off
[    1.342271] sd 1:0:1:0: [sdb] Write cache: disabled, read cache: enabled, supports DPO and FUA
[    1.343010] sd 1:0:0:0: [sda] 209715200 512-byte logical blocks: (107 GB/100 GiB)
[    1.343543] sd 1:0:0:0: [sda] Write Protect is off
[    1.344294] sd 1:0:0:0: [sda] Write cache: disabled, read cache: enabled, supports DPO and FUA
[    1.382396] ipr: Entering ipr_test_msi
[    1.382482] ipr 0010:01:00.0: IRQ assigned: 60
[    1.382493] ipr 0010:01:00.0: Received IRQ : 60
[    1.389983] ipr 0010:01:00.0: MSI test succeeded.
[    1.390005] ipr: Leaving ipr_test_msi
[    1.390010] ipr 0010:01:00.0: Request for 16 MSI-Xs succeeded.
[    1.390485] ipr: Entering ipr_alloc_mem
[    1.390894] ipr: Leaving ipr_alloc_mem
[    1.392712] ipr: Leaving ipr_probe_ioa
[    1.392716] ipr: Entering ipr_probe_ioa_part2
[    1.392721] ipr: Entering ipr_reset_enable_ioa
[    1.392777] ipr: Entering ipr_ioafp_identify_hrrq
[    1.392782] ipr 0010:01:00.0: Starting IOA initialization sequence.
[    1.392787] ipr: Leaving ipr_ioafp_identify_hrrq
[    1.392792] ipr: Leaving ipr_probe_ioa_part2
[    1.392797] scsi host0: IBM 0 Storage Adapter
[    1.392974] ipr: Entering ipr_worker_thread
[    1.392978] ipr: Leaving ipr_worker_thread
[    1.392982] ipr: Entering ipr_add_remove_thread
[    1.393003] ipr: Entering ipr_probe_ioa
[    1.393008] ipr 0134:80:00.0: Found IOA with IRQ: 0
[    1.393228] ipr 0134:80:00.0: enabling device (0140 -> 0142)
[    1.393424] ipr 0134:80:00.0: ibm,query-pe-dma-windows(53) 800000 8000000 20000134 returned 0
[    1.394214] ipr 0134:80:00.0: ibm,create-pe-dma-window(54) 800000 8000000 20000134 10 24 returned 0 (liobn = 0x70000134 starting addr = 8000000 0)
[    1.442260] ipr: Entering ipr_test_msi
[    1.442381] ipr 0134:80:00.0: IRQ assigned: 76
[    1.442388] ipr 0134:80:00.0: Received IRQ : 76
[    1.442395] ipr 0134:80:00.0: MSI test succeeded.
[    1.442407] ipr: Leaving ipr_test_msi
[    1.442410] ipr 0134:80:00.0: Request for 16 MSI-Xs succeeded.
[    1.442858] ipr: Entering ipr_alloc_mem
[    1.443204] ipr: Leaving ipr_alloc_mem
[    1.445029] ipr: Leaving ipr_probe_ioa
[    1.445032] ipr: Entering ipr_probe_ioa_part2
[    1.445035] ipr: Entering ipr_reset_enable_ioa
[    1.445128] ipr: Entering ipr_ioafp_identify_hrrq
[    1.445131] ipr 0134:80:00.0: Starting IOA initialization sequence.
[    1.445134] ipr: Leaving ipr_ioafp_identify_hrrq
[    1.445137] ipr: Leaving ipr_probe_ioa_part2
[    1.445140] scsi host2: IBM 0 Storage Adapter
[    1.445276] ipr: Entering ipr_worker_thread
[    1.445279] ipr: Leaving ipr_worker_thread
[    1.445282] ipr: Entering ipr_add_remove_thread
[    1.463025]  sdb: sdb1 sdb2 sdb3
[    1.464074] sd 1:0:1:0: [sdb] Attached SCSI disk
[    1.485033]  sda: sda1 sda2 sda3
[    1.488382] sd 1:0:0:0: [sda] Attached SCSI disk
[    3.180796] random: crng init done
[    3.180803] random: 7 urandom warning(s) missed due to ratelimiting
[   31.839978] ipr: Entering ipr_timeout
[   31.839978] ipr: Entering ipr_timeout
[   31.839982] ipr 0010:01:00.0: Adapter being reset due to command timeout.
[   31.839991] ipr 0134:80:00.0: Adapter being reset due to command timeout.
[   31.839993] ipr: Entering ipr_reset_shutdown_ioa
[   31.839997] ipr: Entering ipr_reset_shutdown_ioa
[   31.839998] ipr: Leaving ipr_reset_shutdown_ioa
[   31.840001] ipr: Leaving ipr_reset_shutdown_ioa
[   31.840003] ipr: Entering ipr_reset_alert
[   31.840005] ipr: Entering ipr_reset_alert
[   31.840161] ipr: Entering ipr_reset_start_timer
[   31.840165] ipr: Leaving ipr_reset_alert
[   31.840167] EEH: Recovering PHB#10-PE#10000
[   31.840169] ipr: Leaving ipr_timeout
[   31.840177] EEH: PE location: N/A, PHB location: N/A
[   31.840180] EEH: Frozen PHB#10-PE#10000 detected
[   31.840184] EEH: Call Trace:
[   31.840186] EEH: [c000000000054f90] __eeh_send_failure_event+0x70/0x150
[   31.840195] EEH: [c00000000004e148] eeh_dev_check_failure+0x2e8/0x680
[   31.840200] EEH: [c00000000004e5a8] eeh_check_failure+0xc8/0x100
[   31.840204] EEH: [c0080000008cd4c0] ipr_mask_and_clear_interrupts+0x1d8/0x200 [ipr]
[   31.840213] EEH: [c0080000008cd620] ipr_reset_alert+0x138/0x180 [ipr]
[   31.840220] EEH: [c0080000008c49a0] ipr_reset_ioa_job+0x78/0x150 [ipr]
[   31.840226] EEH: [c0080000008c7f00] ipr_timeout+0xd8/0x160 [ipr]
[   31.840232] EEH: [c0000000002201f0] call_timer_fn+0x50/0x200
[   31.840237] EEH: [c000000000221b90] run_timer_softirq+0x340/0x7c0
[   31.840241] EEH: [c000000000c95c7c] __do_softirq+0x15c/0x3d0
[   31.840246] EEH: [c000000000152058] irq_exit+0x168/0x1b0
[   31.840251] EEH: [c000000000027458] timer_interrupt+0x178/0x3e0
[   31.840256] EEH: [c000000000009a60] decrementer_common_virt+0x210/0x220
[   31.840260] EEH: [c0000000019afd40] init_stack+0x3d40/0x4000
[   31.840264] EEH: [c0000000009bc424] dedicated_cede_loop+0x94/0x1a0
[   31.840270] EEH: [c0000000009b8da4] cpuidle_enter_state+0x2d4/0x4e0
[   31.840274] EEH: [c0000000009b9048] cpuidle_enter+0x48/0x70
[   31.840277] EEH: [c0000000001a0ad4] call_cpuidle+0x44/0x80
[   31.840282] EEH: [c0000000001a10b0] do_idle+0x340/0x390
[   31.840286] EEH: [c0000000001a1334] cpu_startup_entry+0x34/0x40
[   31.840291] EEH: [c000000000012974] rest_init+0xf4/0x10c
[   31.840294] EEH: [c0000000010b4220] start_kernel+0x868/0x8bc
[   31.840299] ipr: Entering ipr_reset_start_timer
[   31.840299] EEH: [c00000000000d49c] start_here_common+0x1c/0x600
[   31.840303] ipr: Leaving ipr_reset_alert
[   31.840305] EEH: This PCI device has failed 1 times in the last hour and will be permanently disabled after 5 failures.
[   31.840307] EEH: Notify device drivers to shutdown
[   31.840311] ipr: Leaving ipr_timeout
[   31.840313] EEH: Beginning: 'error_detected(IO frozen)'
[   31.840315] PCI 0010:01:00.0#10000: EEH: Invoking ipr->error_detected(IO frozen)
[   31.840335] PCI 0010:01:00.0#10000: EEH: ipr driver reports: 'can recover'
[   31.840341] EEH: Finished:'error_detected(IO frozen)' with aggregate recovery state:'can recover'
[   31.840392] EEH: Collect temporary log
[   31.840891] EEH: of node=0010:01:00.0
[   31.840923] EEH: PCI device/vendor: 034a1014
[   31.840954] EEH: PCI cmd/status register: 00100546
[   31.840958] EEH: PCI-E capabilities and status follow:
[   31.841102] EEH: PCI-E 00: 0002a410 00008fc2 0000585e 0003f503 
[   31.841218] EEH: PCI-E 10: 10830000 00000000 00000000 00000000 
[   31.841222] EEH: PCI-E 20: 00000000 
[   31.841224] EEH: PCI-E AER capability register set follows:
[   31.841367] EEH: PCI-E AER 00: 18820001 00000000 00400000 00462030 
[   31.841483] EEH: PCI-E AER 10: 00000000 0000e000 000001e0 00000000 
[   31.841598] EEH: PCI-E AER 20: 00000000 00000000 00000000 00000000 
[   31.841630] EEH: PCI-E AER 30: 00000000 00000000 
[   31.842516] EEH: Enable I/O for affected devices
[   31.842551] EEH: Notify device drivers to resume I/O
[   31.842554] EEH: Beginning: 'mmio_enabled'
[   31.842557] PCI 0010:01:00.0#10000: EEH: Invoking ipr->mmio_enabled()
[   31.842559] PCI 0010:01:00.0#10000: EEH: ipr driver reports: 'need reset'
[   31.842562] EEH: Finished:'mmio_enabled' with aggregate recovery state:'need reset'
[   31.842568] EEH: Reset without hotplug activity
[   31.949977] ipr: Entering ipr_reset_start_timer
[   32.059975] ipr: Entering ipr_reset_start_timer
[   32.169974] ipr: Entering ipr_reset_start_timer
[   32.279975] ipr: Entering ipr_reset_start_timer
[   32.389975] ipr: Entering ipr_reset_start_timer
[   32.499975] ipr: Entering ipr_reset_start_timer
[   32.609975] ipr: Entering ipr_reset_start_timer
[   32.719976] ipr: Entering ipr_reset_start_timer
[   32.829975] ipr: Entering ipr_reset_start_timer
[   32.939975] ipr: Entering ipr_reset_start_timer
[   33.049975] ipr: Entering ipr_reset_start_timer
[   33.159975] ipr: Entering ipr_reset_start_timer
[   33.269975] ipr: Entering ipr_reset_start_timer
[   33.379976] ipr: Entering ipr_reset_start_timer
[   33.489975] ipr: Entering ipr_reset_start_timer
[   33.599975] ipr: Entering ipr_reset_start_timer
[   33.709975] ipr: Entering ipr_reset_start_timer
[   33.819975] ipr: Entering ipr_reset_start_timer
[   33.929975] ipr: Entering ipr_reset_start_timer
[   34.000356] ipr 0010:01:00.0: enabling device (0140 -> 0142)
[   34.023909] EEH: Beginning: 'slot_reset'
[   34.023913] PCI 0010:01:00.0#10000: EEH: Invoking ipr->slot_reset()
[   34.023915] ipr: Entering ipr_reset_restore_cfg_space
[   34.025673] ipr: Entering ipr_fail_all_ops
[   34.025677] ipr: Leaving ipr_fail_all_ops
[   34.025680] ipr: Leaving ipr_reset_restore_cfg_space
[   34.025683] ipr: Entering ipr_reset_enable_ioa
[   34.025697] ipr 0010:01:00.0: Initializing IOA.
[   34.025897] ipr: IPL stage = 0xff000000, IPL stage time = 65535
[   34.025901] PCI 0010:01:00.0#10000: EEH: ipr driver reports: 'recovered'
[   34.025903] EEH: Finished:'slot_reset' with aggregate recovery state:'recovered'
[   34.025908] EEH: Notify device driver to resume
[   34.025911] EEH: Beginning: 'resume'
[   34.025913] PCI 0010:01:00.0#10000: EEH: ipr driver reports: 'none'
[   34.025915] EEH: Finished:'resume'
[   34.025918] EEH: Recovery successful.
[   34.025922] EEH: Recovering PHB#10-PE#10000
[   34.025925] EEH: PE location: N/A, PHB location: N/A
[   34.025927] EEH: Frozen PHB#10-PE#10000 detected
[   34.025930] EEH: Call Trace:
[   34.025932] EEH: [c000000000054f90] __eeh_send_failure_event+0x70/0x150
[   34.025938] EEH: [c00000000004e148] eeh_dev_check_failure+0x2e8/0x680
[   34.025942] EEH: [c00000000004e5a8] eeh_check_failure+0xc8/0x100
[   34.025946] EEH: [c0080000008d1c70] ipr_reset_next_stage+0x198/0x370 [ipr]
[   34.025953] EEH: [c0080000008c49a0] ipr_reset_ioa_job+0x78/0x150 [ipr]
[   34.025960] EEH: [c0080000008c8f04] ipr_pci_slot_reset+0xac/0x140 [ipr]
[   34.025966] EEH: [c000000000052ce8] eeh_report_reset+0xb8/0xe0
[   34.025970] EEH: [c000000000054834] eeh_pe_report+0x254/0x4b4
[   34.025974] EEH: [c000000000053efc] eeh_handle_normal_event+0x9dc/0xa80
[   34.025979] EEH: [c000000000054de8] eeh_event_handler+0x108/0x190
[   34.025983] EEH: [c00000000018151c] kthread+0x18c/0x1a0
[   34.025987] EEH: [c00000000000cfd4] ret_from_kernel_thread+0x5c/0x64
[   34.025991] EEH: This PCI device has failed 2 times in the last hour and will be permanently disabled after 5 failures.
[   34.025995] EEH: Notify device drivers to shutdown
[   34.025998] EEH: Beginning: 'error_detected(IO frozen)'
[   34.026000] PCI 0010:01:00.0#10000: EEH: Invoking ipr->error_detected(IO frozen)
[   34.026011] PCI 0010:01:00.0#10000: EEH: ipr driver reports: 'can recover'
[   34.026016] EEH: Finished:'error_detected(IO frozen)' with aggregate recovery state:'can recover'
[   34.026059] EEH: Collect temporary log
[   34.026537] EEH: of node=0010:01:00.0
[   34.026568] EEH: PCI device/vendor: 034a1014
[   34.026600] EEH: PCI cmd/status register: 00100546
[   34.026603] EEH: PCI-E capabilities and status follow:
[   34.026745] EEH: PCI-E 00: 0002a410 00008fc2 0000585e 0003f503 
[   34.026860] EEH: PCI-E 10: 10830000 00000000 00000000 00000000 
[   34.026863] EEH: PCI-E 20: 00000000 
[   34.026866] EEH: PCI-E AER capability register set follows:
[   34.027010] EEH: PCI-E AER 00: 18820001 00000000 00400000 00462030 
[   34.027125] EEH: PCI-E AER 10: 00000000 0000e000 000001e0 00000000 
[   34.027239] EEH: PCI-E AER 20: 00000000 00000000 00000000 00000000 
[   34.027270] EEH: PCI-E AER 30: 00000000 00000000 
[   34.028118] EEH: Enable I/O for affected devices
[   34.028153] EEH: Notify device drivers to resume I/O
[   34.028155] EEH: Beginning: 'mmio_enabled'
[   34.028158] PCI 0010:01:00.0#10000: EEH: Invoking ipr->mmio_enabled()
[   34.028159] PCI 0010:01:00.0#10000: EEH: ipr driver reports: 'need reset'
[   34.028163] EEH: Finished:'mmio_enabled' with aggregate recovery state:'need reset'
[   34.028168] EEH: Reset without hotplug activity
[   34.039978] ipr: Entering ipr_reset_start_timer
[   34.149976] ipr: Entering ipr_reset_start_bist
[   34.149981] ipr: Entering ipr_reset_start_timer
[   34.149985] ipr: Leaving ipr_reset_start_bist
[   36.159976] ipr: Entering ipr_reset_bist_done
[   36.159981] ipr: Leaving ipr_reset_bist_done
[   36.159984] ipr: Entering ipr_reset_restore_cfg_space
[   36.162229] ipr: Entering ipr_fail_all_ops
[   36.162232] ipr: Leaving ipr_fail_all_ops
[   36.162234] ipr: Leaving ipr_reset_restore_cfg_space
[   36.162237] ipr: Entering ipr_reset_enable_ioa
[   36.162251] ipr: Entering ipr_ioafp_identify_hrrq
[   36.162254] ipr 0134:80:00.0: Starting IOA initialization sequence.
[   36.162258] ipr: Leaving ipr_ioafp_identify_hrrq
[   36.162637] ipr 0010:01:00.0: enabling device (0140 -> 0142)
[   36.185512] EEH: Beginning: 'slot_reset'
[   36.185516] PCI 0010:01:00.0#10000: EEH: Invoking ipr->slot_reset()
[   36.185518] ipr: Entering ipr_reset_restore_cfg_space
[   36.187270] ipr: Entering ipr_fail_all_ops
[   36.187274] ipr: Leaving ipr_fail_all_ops
[   36.187276] ipr: Leaving ipr_reset_restore_cfg_space
[   36.187279] ipr: Entering ipr_reset_enable_ioa
[   36.187286] ipr 0010:01:00.0: Initializing IOA.
[   36.187480] ipr: IPL stage = 0xff000000, IPL stage time = 65535
[   36.187484] PCI 0010:01:00.0#10000: EEH: ipr driver reports: 'recovered'
[   36.187486] EEH: Finished:'slot_reset' with aggregate recovery state:'recovered'
[   36.187491] EEH: Notify device driver to resume
[   36.187494] EEH: Beginning: 'resume'
[   36.187496] PCI 0010:01:00.0#10000: EEH: ipr driver reports: 'none'
[   36.187497] EEH: Finished:'resume'
[   36.187500] EEH: Recovery successful.
[   36.187504] EEH: Recovering PHB#10-PE#10000
[   36.187507] EEH: PE location: N/A, PHB location: N/A
[   36.187509] EEH: Frozen PHB#10-PE#10000 detected
[   36.187512] EEH: Call Trace:
[   36.187514] EEH: [c000000000054f90] __eeh_send_failure_event+0x70/0x150
[   36.187519] EEH: [c00000000004e148] eeh_dev_check_failure+0x2e8/0x680
[   36.187523] EEH: [c00000000004e5a8] eeh_check_failure+0xc8/0x100
[   36.187527] EEH: [c0080000008d1c70] ipr_reset_next_stage+0x198/0x370 [ipr]
[   36.187534] EEH: [c0080000008c49a0] ipr_reset_ioa_job+0x78/0x150 [ipr]
[   36.187541] EEH: [c0080000008c8f04] ipr_pci_slot_reset+0xac/0x140 [ipr]
[   36.187547] EEH: [c000000000052ce8] eeh_report_reset+0xb8/0xe0
[   36.187552] EEH: [c000000000054834] eeh_pe_report+0x254/0x4b4
[   36.187556] EEH: [c000000000053efc] eeh_handle_normal_event+0x9dc/0xa80
[   36.187560] EEH: [c000000000054de8] eeh_event_handler+0x108/0x190
[   36.187564] EEH: [c00000000018151c] kthread+0x18c/0x1a0
[   36.187568] EEH: [c00000000000cfd4] ret_from_kernel_thread+0x5c/0x64
[   36.187572] EEH: This PCI device has failed 3 times in the last hour and will be permanently disabled after 5 failures.
[   36.187576] EEH: Notify device drivers to shutdown
[   36.187578] EEH: Beginning: 'error_detected(IO frozen)'
[   36.187581] PCI 0010:01:00.0#10000: EEH: Invoking ipr->error_detected(IO frozen)
[   36.187591] PCI 0010:01:00.0#10000: EEH: ipr driver reports: 'can recover'
[   36.187595] EEH: Finished:'error_detected(IO frozen)' with aggregate recovery state:'can recover'
[   36.187636] EEH: Collect temporary log
[   36.188115] EEH: of node=0010:01:00.0
[   36.188146] EEH: PCI device/vendor: 034a1014
[   36.188177] EEH: PCI cmd/status register: 00100546
[   36.188180] EEH: PCI-E capabilities and status follow:
[   36.188324] EEH: PCI-E 00: 0002a410 00008fc2 0000585e 0003f503 
[   36.188439] EEH: PCI-E 10: 10830000 00000000 00000000 00000000 
[   36.188442] EEH: PCI-E 20: 00000000 
[   36.188444] EEH: PCI-E AER capability register set follows:
[   36.188587] EEH: PCI-E AER 00: 18820001 00000000 00400000 00462030 
[   36.188702] EEH: PCI-E AER 10: 00000000 0000e000 000001e0 00000000 
[   36.188816] EEH: PCI-E AER 20: 00000000 00000000 00000000 00000000 
[   36.188847] EEH: PCI-E AER 30: 00000000 00000000 
[   36.189681] EEH: Enable I/O for affected devices
[   36.189716] EEH: Notify device drivers to resume I/O
[   36.189719] EEH: Beginning: 'mmio_enabled'
[   36.189721] PCI 0010:01:00.0#10000: EEH: Invoking ipr->mmio_enabled()
[   36.189723] PCI 0010:01:00.0#10000: EEH: ipr driver reports: 'need reset'
[   36.189726] EEH: Finished:'mmio_enabled' with aggregate recovery state:'need reset'
[   36.189732] EEH: Reset without hotplug activity
[   38.320356] ipr 0010:01:00.0: enabling device (0140 -> 0142)
[   38.343242] EEH: Beginning: 'slot_reset'
[   38.343247] PCI 0010:01:00.0#10000: EEH: Invoking ipr->slot_reset()
[   38.343249] ipr: Entering ipr_reset_restore_cfg_space
[   38.345002] ipr: Entering ipr_fail_all_ops
[   38.345005] ipr: Leaving ipr_fail_all_ops
[   38.345008] ipr: Leaving ipr_reset_restore_cfg_space
[   38.345011] ipr: Entering ipr_reset_enable_ioa
[   38.345018] ipr 0010:01:00.0: Initializing IOA.
[   38.345220] ipr: IPL stage = 0xff000000, IPL stage time = 65535
[   38.345224] PCI 0010:01:00.0#10000: EEH: ipr driver reports: 'recovered'
[   38.345226] EEH: Finished:'slot_reset' with aggregate recovery state:'recovered'
[   38.345232] EEH: Notify device driver to resume
[   38.345234] EEH: Beginning: 'resume'
[   38.345236] PCI 0010:01:00.0#10000: EEH: ipr driver reports: 'none'
[   38.345238] EEH: Finished:'resume'
[   38.345241] EEH: Recovery successful.
[   38.345245] EEH: Recovering PHB#10-PE#10000
[   38.345247] EEH: PE location: N/A, PHB location: N/A
[   38.345250] EEH: Frozen PHB#10-PE#10000 detected
[   38.345253] EEH: Call Trace:
[   38.345254] EEH: [c000000000054f90] __eeh_send_failure_event+0x70/0x150
[   38.345259] EEH: [c00000000004e148] eeh_dev_check_failure+0x2e8/0x680
[   38.345264] EEH: [c00000000004e5a8] eeh_check_failure+0xc8/0x100
[   38.345268] EEH: [c0080000008d1c70] ipr_reset_next_stage+0x198/0x370 [ipr]
[   38.345274] EEH: [c0080000008c49a0] ipr_reset_ioa_job+0x78/0x150 [ipr]
[   38.345281] EEH: [c0080000008c8f04] ipr_pci_slot_reset+0xac/0x140 [ipr]
[   38.345287] EEH: [c000000000052ce8] eeh_report_reset+0xb8/0xe0
[   38.345291] EEH: [c000000000054834] eeh_pe_report+0x254/0x4b4
[   38.345295] EEH: [c000000000053efc] eeh_handle_normal_event+0x9dc/0xa80
[   38.345299] EEH: [c000000000054de8] eeh_event_handler+0x108/0x190
[   38.345303] EEH: [c00000000018151c] kthread+0x18c/0x1a0
[   38.345307] EEH: [c00000000000cfd4] ret_from_kernel_thread+0x5c/0x64
[   38.345311] EEH: This PCI device has failed 4 times in the last hour and will be permanently disabled after 5 failures.
[   38.345315] EEH: Notify device drivers to shutdown
[   38.345317] EEH: Beginning: 'error_detected(IO frozen)'
[   38.345319] PCI 0010:01:00.0#10000: EEH: Invoking ipr->error_detected(IO frozen)
[   38.345330] PCI 0010:01:00.0#10000: EEH: ipr driver reports: 'can recover'
[   38.345334] EEH: Finished:'error_detected(IO frozen)' with aggregate recovery state:'can recover'
[   38.345376] EEH: Collect temporary log
[   38.345854] EEH: of node=0010:01:00.0
[   38.345885] EEH: PCI device/vendor: 034a1014
[   38.345916] EEH: PCI cmd/status register: 00100546
[   38.345919] EEH: PCI-E capabilities and status follow:
[   38.346062] EEH: PCI-E 00: 0002a410 00008fc2 0000585e 0003f503 
[   38.346177] EEH: PCI-E 10: 10830000 00000000 00000000 00000000 
[   38.346180] EEH: PCI-E 20: 00000000 
[   38.346182] EEH: PCI-E AER capability register set follows:
[   38.346325] EEH: PCI-E AER 00: 18820001 00000000 00400000 00462030 
[   38.346440] EEH: PCI-E AER 10: 00000000 0000e000 000001e0 00000000 
[   38.346556] EEH: PCI-E AER 20: 00000000 00000000 00000000 00000000 
[   38.346587] EEH: PCI-E AER 30: 00000000 00000000 
[   38.347423] EEH: Enable I/O for affected devices
[   38.347458] EEH: Notify device drivers to resume I/O
[   38.347461] EEH: Beginning: 'mmio_enabled'
[   38.347463] PCI 0010:01:00.0#10000: EEH: Invoking ipr->mmio_enabled()
[   38.347464] PCI 0010:01:00.0#10000: EEH: ipr driver reports: 'need reset'
[   38.347468] EEH: Finished:'mmio_enabled' with aggregate recovery state:'need reset'
[   38.347473] EEH: Reset without hotplug activity
[   40.480353] ipr 0010:01:00.0: enabling device (0140 -> 0142)
[   40.503235] EEH: Beginning: 'slot_reset'
[   40.503239] PCI 0010:01:00.0#10000: EEH: Invoking ipr->slot_reset()
[   40.503241] ipr: Entering ipr_reset_restore_cfg_space
[   40.504991] ipr: Entering ipr_fail_all_ops
[   40.504995] ipr: Leaving ipr_fail_all_ops
[   40.504997] ipr: Leaving ipr_reset_restore_cfg_space
[   40.505000] ipr: Entering ipr_reset_enable_ioa
[   40.505007] ipr 0010:01:00.0: Initializing IOA.
[   40.505201] ipr: IPL stage = 0xff000000, IPL stage time = 65535
[   40.505205] PCI 0010:01:00.0#10000: EEH: ipr driver reports: 'recovered'
[   40.505207] EEH: Finished:'slot_reset' with aggregate recovery state:'recovered'
[   40.505212] EEH: Notify device driver to resume
[   40.505215] EEH: Beginning: 'resume'
[   40.505217] PCI 0010:01:00.0#10000: EEH: ipr driver reports: 'none'
[   40.505218] EEH: Finished:'resume'
[   40.505221] EEH: Recovery successful.
[   40.505225] EEH: Recovering PHB#10-PE#10000
[   40.505227] EEH: PE location: N/A, PHB location: N/A
[   40.505230] EEH: Frozen PHB#10-PE#10000 detected
[   40.505233] EEH: Call Trace:
[   40.505234] EEH: [c000000000054f90] __eeh_send_failure_event+0x70/0x150
[   40.505239] EEH: [c00000000004e148] eeh_dev_check_failure+0x2e8/0x680
[   40.505244] EEH: [c00000000004e5a8] eeh_check_failure+0xc8/0x100
[   40.505248] EEH: [c0080000008d1c70] ipr_reset_next_stage+0x198/0x370 [ipr]
[   40.505254] EEH: [c0080000008c49a0] ipr_reset_ioa_job+0x78/0x150 [ipr]
[   40.505261] EEH: [c0080000008c8f04] ipr_pci_slot_reset+0xac/0x140 [ipr]
[   40.505267] EEH: [c000000000052ce8] eeh_report_reset+0xb8/0xe0
[   40.505271] EEH: [c000000000054834] eeh_pe_report+0x254/0x4b4
[   40.505275] EEH: [c000000000053efc] eeh_handle_normal_event+0x9dc/0xa80
[   40.505279] EEH: [c000000000054de8] eeh_event_handler+0x108/0x190
[   40.505284] EEH: [c00000000018151c] kthread+0x18c/0x1a0
[   40.505287] EEH: [c00000000000cfd4] ret_from_kernel_thread+0x5c/0x64
[   40.505291] EEH: This PCI device has failed 5 times in the last hour and will be permanently disabled after 5 failures.
[   40.505295] EEH: Notify device drivers to shutdown
[   40.505298] EEH: Beginning: 'error_detected(IO frozen)'
[   40.505300] PCI 0010:01:00.0#10000: EEH: Invoking ipr->error_detected(IO frozen)
[   40.505310] PCI 0010:01:00.0#10000: EEH: ipr driver reports: 'can recover'
[   40.505314] EEH: Finished:'error_detected(IO frozen)' with aggregate recovery state:'can recover'
[   40.505355] EEH: Collect temporary log
[   40.505833] EEH: of node=0010:01:00.0
[   40.505864] EEH: PCI device/vendor: 034a1014
[   40.505895] EEH: PCI cmd/status register: 00100546
[   40.505898] EEH: PCI-E capabilities and status follow:
[   40.506041] EEH: PCI-E 00: 0002a410 00008fc2 0000585e 0003f503 
[   40.506157] EEH: PCI-E 10: 10830000 00000000 00000000 00000000 
[   40.506161] EEH: PCI-E 20: 00000000 
[   40.506163] EEH: PCI-E AER capability register set follows:
[   40.506305] EEH: PCI-E AER 00: 18820001 00000000 00400000 00462030 
[   40.506420] EEH: PCI-E AER 10: 00000000 0000e000 000001e0 00000000 
[   40.506534] EEH: PCI-E AER 20: 00000000 00000000 00000000 00000000 
[   40.506565] EEH: PCI-E AER 30: 00000000 00000000 
[   40.507411] EEH: Enable I/O for affected devices
[   40.507446] EEH: Notify device drivers to resume I/O
[   40.507449] EEH: Beginning: 'mmio_enabled'
[   40.507451] PCI 0010:01:00.0#10000: EEH: Invoking ipr->mmio_enabled()
[   40.507452] PCI 0010:01:00.0#10000: EEH: ipr driver reports: 'need reset'
[   40.507456] EEH: Finished:'mmio_enabled' with aggregate recovery state:'need reset'
[   40.507461] EEH: Reset without hotplug activity
[   42.640358] ipr 0010:01:00.0: enabling device (0140 -> 0142)
[   42.663240] EEH: Beginning: 'slot_reset'
[   42.663244] PCI 0010:01:00.0#10000: EEH: Invoking ipr->slot_reset()
[   42.663246] ipr: Entering ipr_reset_restore_cfg_space
[   42.664997] ipr: Entering ipr_fail_all_ops
[   42.665001] ipr: Leaving ipr_fail_all_ops
[   42.665003] ipr: Leaving ipr_reset_restore_cfg_space
[   42.665006] ipr: Entering ipr_reset_enable_ioa
[   42.665013] ipr 0010:01:00.0: Initializing IOA.
[   42.665213] ipr: IPL stage = 0xff000000, IPL stage time = 65535
[   42.665217] PCI 0010:01:00.0#10000: EEH: ipr driver reports: 'recovered'
[   42.665219] EEH: Finished:'slot_reset' with aggregate recovery state:'recovered'
[   42.665224] EEH: Notify device driver to resume
[   42.665227] EEH: Beginning: 'resume'
[   42.665229] PCI 0010:01:00.0#10000: EEH: ipr driver reports: 'none'
[   42.665230] EEH: Finished:'resume'
[   42.665233] EEH: Recovery successful.
[   42.665237] EEH: Recovering PHB#10-PE#10000
[   42.665240] EEH: PE location: N/A, PHB location: N/A
[   42.665242] EEH: Frozen PHB#10-PE#10000 detected
[   42.665245] EEH: Call Trace:
[   42.665247] EEH: [c000000000054f90] __eeh_send_failure_event+0x70/0x150
[   42.665252] EEH: [c00000000004e148] eeh_dev_check_failure+0x2e8/0x680
[   42.665256] EEH: [c00000000004e5a8] eeh_check_failure+0xc8/0x100
[   42.665260] EEH: [c0080000008d1c70] ipr_reset_next_stage+0x198/0x370 [ipr]
[   42.665267] EEH: [c0080000008c49a0] ipr_reset_ioa_job+0x78/0x150 [ipr]
[   42.665273] EEH: [c0080000008c8f04] ipr_pci_slot_reset+0xac/0x140 [ipr]
[   42.665279] EEH: [c000000000052ce8] eeh_report_reset+0xb8/0xe0
[   42.665284] EEH: [c000000000054834] eeh_pe_report+0x254/0x4b4
[   42.665288] EEH: [c000000000053efc] eeh_handle_normal_event+0x9dc/0xa80
[   42.665292] EEH: [c000000000054de8] eeh_event_handler+0x108/0x190
[   42.665296] EEH: [c00000000018151c] kthread+0x18c/0x1a0
[   42.665299] EEH: [c00000000000cfd4] ret_from_kernel_thread+0x5c/0x64
[   42.665303] EEH: PHB#10-PE#10000 has failed 6 times in the last hour and has been permanently disabled.
[   42.665307] EEH: Unable to recover from failure from PHB#10-PE#10000.
[   42.665307] Please try reseating or replacing it
[   42.665788] EEH: of node=0010:01:00.0
[   42.665819] EEH: PCI device/vendor: 034a1014
[   42.665851] EEH: PCI cmd/status register: 00100546
[   42.665854] EEH: PCI-E capabilities and status follow:
[   42.665996] EEH: PCI-E 00: 0002a410 00008fc2 0000585e 0003f503 
[   42.666112] EEH: PCI-E 10: 10830000 00000000 00000000 00000000 
[   42.666115] EEH: PCI-E 20: 00000000 
[   42.666117] EEH: PCI-E AER capability register set follows:
[   42.666260] EEH: PCI-E AER 00: 18820001 00000000 00400000 00462030 
[   42.666375] EEH: PCI-E AER 10: 00000000 0000e000 000001e0 00000000 
[   42.666489] EEH: PCI-E AER 20: 00000000 00000000 00000000 00000000 
[   42.666520] EEH: PCI-E AER 30: 00000000 00000000 
[   42.667476] EEH: Beginning: 'error_detected(permanent failure)'
[   42.667479] PCI 0010:01:00.0#10000: EEH: not actionable (1,1,1)
[   42.667481] EEH: Finished:'error_detected(permanent failure)'
[   42.667492] ipr: Entering ipr_remove
[   42.667542] ipr: Entering __ipr_remove
[   66.399976] ipr: Entering ipr_timeout
[   66.399983] ipr 0134:80:00.0: Adapter being reset due to command timeout.
[   66.399989] ipr: Entering ipr_reset_shutdown_ioa
[   66.399992] ipr: Leaving ipr_reset_shutdown_ioa
[   66.399995] ipr: Entering ipr_reset_alert
[   66.400049] ipr: Entering ipr_reset_start_timer
[   66.400054] ipr: Leaving ipr_reset_alert
[   66.400057] ipr: Leaving ipr_timeout
[   66.509975] ipr: Entering ipr_reset_start_timer
[   66.619975] ipr: Entering ipr_reset_start_timer
[   66.729975] ipr: Entering ipr_reset_start_timer
[   66.839975] ipr: Entering ipr_reset_start_timer
[   66.949975] ipr: Entering ipr_reset_start_timer
[   67.059975] ipr: Entering ipr_reset_start_timer
[   67.169975] ipr: Entering ipr_reset_start_timer
[   67.279975] ipr: Entering ipr_reset_start_timer
[   67.389975] ipr: Entering ipr_reset_start_timer
[   67.499975] ipr: Entering ipr_reset_start_timer
[   67.609975] ipr: Entering ipr_reset_start_timer
[   67.719975] ipr: Entering ipr_reset_start_timer
[   67.829975] ipr: Entering ipr_reset_start_timer
[   67.939975] ipr: Entering ipr_reset_start_timer
[   68.049976] ipr: Entering ipr_reset_start_timer
[   68.159975] ipr: Entering ipr_reset_start_timer
[   68.269975] ipr: Entering ipr_reset_start_timer
[   68.379977] ipr: Entering ipr_reset_start_timer
[   68.489975] ipr: Entering ipr_reset_start_timer
[   68.599975] ipr: Entering ipr_reset_start_timer
[   68.709975] ipr: Entering ipr_reset_start_bist
[   68.709979] ipr: Entering ipr_reset_start_timer
[   68.709983] ipr: Leaving ipr_reset_start_bist
[   70.719975] ipr: Entering ipr_reset_bist_done
[   70.719980] ipr: Leaving ipr_reset_bist_done
[   70.719983] ipr: Entering ipr_reset_restore_cfg_space
[   70.722256] ipr: Entering ipr_fail_all_ops
[   70.722260] ipr: Leaving ipr_fail_all_ops
[   70.722263] ipr: Leaving ipr_reset_restore_cfg_space
[   70.722266] ipr: Entering ipr_reset_enable_ioa
[   70.722280] ipr: Entering ipr_ioafp_identify_hrrq
[   70.722283] ipr 0134:80:00.0: Starting IOA initialization sequence.
[   70.722288] ipr: Leaving ipr_ioafp_identify_hrrq
[  100.959975] ipr: Entering ipr_timeout
[  100.959988] ipr 0134:80:00.0: Adapter being reset due to command timeout.
[  100.959995] ipr: Entering ipr_reset_shutdown_ioa
[  100.959998] ipr: Leaving ipr_reset_shutdown_ioa
[  100.960000] ipr: Entering ipr_reset_alert
[  100.960066] ipr: Entering ipr_reset_start_timer
[  100.960070] ipr: Leaving ipr_reset_alert
[  100.960072] ipr: Leaving ipr_timeout
[  101.069976] ipr: Entering ipr_reset_start_timer
[  101.179975] ipr: Entering ipr_reset_start_timer
[  101.289975] ipr: Entering ipr_reset_start_timer
[  101.399977] ipr: Entering ipr_reset_start_timer
[  101.509976] ipr: Entering ipr_reset_start_timer
[  101.619975] ipr: Entering ipr_reset_start_timer
[  101.729975] ipr: Entering ipr_reset_start_timer
[  101.839975] ipr: Entering ipr_reset_start_timer
[  101.949975] ipr: Entering ipr_reset_start_timer
[  102.059975] ipr: Entering ipr_reset_start_timer
[  102.169975] ipr: Entering ipr_reset_start_timer
[  102.279975] ipr: Entering ipr_reset_start_timer
[  102.389976] ipr: Entering ipr_reset_start_timer
[  102.499975] ipr: Entering ipr_reset_start_timer
[  102.609975] ipr: Entering ipr_reset_start_timer
[  102.719975] ipr: Entering ipr_reset_start_timer
[  102.829975] ipr: Entering ipr_reset_start_timer
[  102.939975] ipr: Entering ipr_reset_start_timer
[  103.049975] ipr: Entering ipr_reset_start_timer
[  103.159975] ipr: Entering ipr_reset_start_timer
[  103.269976] ipr: Entering ipr_reset_start_bist
[  103.269980] ipr: Entering ipr_reset_start_timer
[  103.269984] ipr: Leaving ipr_reset_start_bist
[  105.279975] ipr: Entering ipr_reset_bist_done
[  105.279980] ipr: Leaving ipr_reset_bist_done
[  105.279983] ipr: Entering ipr_reset_restore_cfg_space
[  105.282241] ipr: Entering ipr_fail_all_ops
[  105.282245] ipr: Leaving ipr_fail_all_ops
[  105.282248] ipr: Leaving ipr_reset_restore_cfg_space
[  105.282251] ipr: Entering ipr_reset_enable_ioa
[  105.282265] ipr: Entering ipr_ioafp_identify_hrrq
[  105.282268] ipr 0134:80:00.0: Starting IOA initialization sequence.
[  105.282273] ipr: Leaving ipr_ioafp_identify_hrrq
[FAILED] Failed to start udev Wait for Complete Device Initialization.
See 'systemctl status systemd-udev-settle.service' for details.
         Starting Device-Mapper Multipath Device Controller...
[  OK  ] Started Device-Mapper Multipath Device Controller.
[  OK  ] Reached target Local File Systems (Pre).
[  OK  ] Reached target Local File Systems.
         Starting Create Volatile Files and Directories...
[  OK  ] Started Create Volatile Files and Directories.
[  OK  ] Reached target System Initialization.
[  OK  ] Reached target Basic System.
[  121.492754] device-mapper: multipath service-time: version 0.3.0 loaded
[  135.519977] ipr: Entering ipr_timeout
[  135.519991] ipr 0134:80:00.0: Adapter being reset due to command timeout.
[  135.519996] ipr 0134:80:00.0: IOA taken offline - error recovery failed
[  135.520002] ipr: Entering ipr_reset_shutdown_ioa
[  135.520005] ipr: Leaving ipr_reset_shutdown_ioa
[  135.520008] ipr: Entering ipr_reset_alert
[  135.520083] ipr: Entering ipr_reset_start_timer
[  135.520088] ipr: Leaving ipr_reset_alert
[  135.520092] ipr: Leaving ipr_timeout
[  135.629975] ipr: Entering ipr_reset_start_timer
[  135.739975] ipr: Entering ipr_reset_start_timer
[  135.849975] ipr: Entering ipr_reset_start_timer
[  135.959975] ipr: Entering ipr_reset_start_timer
[  136.069977] ipr: Entering ipr_reset_start_timer
[  136.179975] ipr: Entering ipr_reset_start_timer
[  136.289975] ipr: Entering ipr_reset_start_timer
[  136.399975] ipr: Entering ipr_reset_start_timer
[  136.509975] ipr: Entering ipr_reset_start_timer
[  136.619976] ipr: Entering ipr_reset_start_timer
[  136.729976] ipr: Entering ipr_reset_start_timer
[  136.839976] ipr: Entering ipr_reset_start_timer
[  136.949975] ipr: Entering ipr_reset_start_timer
[  137.059977] ipr: Entering ipr_reset_start_timer
[  137.169975] ipr: Entering ipr_reset_start_timer
[  137.279975] ipr: Entering ipr_reset_start_timer
[  137.389975] ipr: Entering ipr_reset_start_timer
[  137.499975] ipr: Entering ipr_reset_start_timer
[  137.609975] ipr: Entering ipr_reset_start_timer
[  137.719975] ipr: Entering ipr_reset_start_timer
[  137.829976] ipr: Entering ipr_reset_start_bist
[  137.829980] ipr: Entering ipr_reset_start_timer
[  137.829984] ipr: Leaving ipr_reset_start_bist
[  139.839975] ipr: Entering ipr_reset_bist_done
[  139.839980] ipr: Leaving ipr_reset_bist_done
[  139.839983] ipr: Entering ipr_reset_restore_cfg_space
[  139.842243] ipr: Entering ipr_fail_all_ops
[  139.842247] ipr: Leaving ipr_fail_all_ops
[  139.842249] ipr: Leaving ipr_reset_restore_cfg_space
[  139.842252] ipr: Entering ipr_ioa_bringdown_done
[  139.842255] ipr: drivers/scsi/ipr.c: ipr_ioa_bringdown_done: Line: 7243
[  139.842259] ipr: Leaving ipr_ioa_bringdown_done
[  139.842266] ipr: Entering ipr_worker_thread
[  139.842270] ipr: Leaving ipr_worker_thread
[  139.842273] ipr: Entering ipr_add_remove_thread
[  243.679987] INFO: task eehd:137 blocked for more than 122 seconds.
[  243.680001]       Not tainted 5.15.0-rc1-autotest #5
[  243.680005] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  243.680009] task:eehd            state:D stack:    0 pid:  137 ppid:     2 flags:0x00000800
[  243.680016] Call Trace:
[  243.680018] [c000000008167650] [c0000000001dd368] info_print_prefix+0xa8/0x130 (unreliable)
[  243.680027] [c000000008167840] [c00000000001e6c8] __switch_to+0x278/0x490
[  243.680033] [c0000000081678a0] [c000000000c8b9bc] __schedule+0x31c/0xa20
[  243.680039] [c000000008167960] [c000000000c8c128] schedule+0x68/0x120
[  243.680043] [c000000008167990] [c0080000008ca3c4] __ipr_remove+0x10c/0x4b0 [ipr]
[  243.680053] [c000000008167a60] [c0080000008ca828] ipr_remove+0xc0/0x110 [ipr]
[  243.680061] [c000000008167ae0] [c000000000732bd4] pci_device_remove+0x64/0x120
[  243.680067] [c000000008167b20] [c000000000811318] device_release_driver_internal+0x168/0x2c0
[  243.680073] [c000000008167b60] [c000000000724618] pci_stop_bus_device+0xa8/0x100
[  243.680079] [c000000008167ba0] [c000000000724810] pci_stop_and_remove_bus_device+0x20/0x40
[  243.680083] [c000000008167bd0] [c000000000075e60] pci_hp_remove_devices+0x90/0x130
[  243.680089] [c000000008167c60] [c000000000053cd8] eeh_handle_normal_event+0x7b8/0xa80
[  243.680095] [c000000008167d40] [c000000000054de8] eeh_event_handler+0x108/0x190
[  243.680100] [c000000008167da0] [c00000000018151c] kthread+0x18c/0x1a0
[  243.680105] [c000000008167e10] [c00000000000cfd4] ret_from_kernel_thread+0x5c/0x64
[  243.680117] INFO: task systemd-udevd:476 blocked for more than 122 seconds.
[  243.680120]       Not tainted 5.15.0-rc1-autotest #5
[  243.680123] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  243.680126] task:systemd-udevd   state:D stack:    0 pid:  476 ppid:   455 flags:0x00040402
[  243.680131] Call Trace:
[  243.680133] [c00000000c4df620] [c0000000001c350c] __wake_up_common_lock+0xac/0x100 (unreliable)
[  243.680139] [c00000000c4df810] [c00000000001e6c8] __switch_to+0x278/0x490
[  243.680144] [c00000000c4df870] [c000000000c8b9bc] __schedule+0x31c/0xa20
[  243.680148] [c00000000c4df930] [c000000000c8c128] schedule+0x68/0x120
[  243.680152] [c00000000c4df960] [c000000000186cd4] async_synchronize_cookie_domain+0x144/0x1a0
[  243.680158] [c00000000c4dfa10] [c00000000024f2e4] do_init_module+0x1a4/0x320
[  243.680164] [c00000000c4dfa90] [c000000000252b88] load_module+0x2098/0x22f0
[  243.680169] [c00000000c4dfc90] [c000000000253100] __do_sys_finit_module+0xd0/0x150
[  243.680174] [c00000000c4dfdb0] [c00000000002ffe8] system_call_exception+0x158/0x2c0
[  243.680178] [c00000000c4dfe10] [c00000000000c764] system_call_common+0xf4/0x258
[  243.680184] --- interrupt: c00 at 0x7fff86a5a504
[  243.680188] NIP:  00007fff86a5a504 LR: 00007fff86caea9c CTR: 0000000000000000
[  243.680192] REGS: c00000000c4dfe80 TRAP: 0c00   Not tainted  (5.15.0-rc1-autotest)
[  243.680196] MSR:  800000000000d033 <SF,EE,PR,ME,IR,DR,RI,LE>  CR: 28222244  XER: 00000000
[  243.680204] IRQMASK: 0 
[  243.680204] GPR00: 0000000000000161 00007ffff1dcdfd0 00007fff86b47100 000000000000000e 
[  243.680204] GPR04: 0000000136b9b720 0000000000000000 000000000000000e 0000000000000000 
[  243.680204] GPR08: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
[  243.680204] GPR12: 0000000000000000 00007fff856784a0 0000000000020000 00000001109cd5a0 
[  243.680204] GPR16: 0000000110a10130 00000001109d57d8 0000000000000000 0000000000000000 
[  243.680204] GPR20: 0000000000000000 0000000000000000 0000000136b70de0 0000000000000008 
[  243.680204] GPR24: 0000000000000007 0000000000000000 0000000000000000 0000000136b94860 
[  243.680204] GPR28: 0000000136b9b720 0000000000020000 0000000000000000 0000000136b70de0 
[  243.680244] NIP [00007fff86a5a504] 0x7fff86a5a504
[  243.680247] LR [00007fff86caea9c] 0x7fff86caea9c
[  243.680250] --- interrupt: c00
[  243.680252] INFO: task systemd-udevd:478 blocked for more than 122 seconds.
[  243.680255]       Not tainted 5.15.0-rc1-autotest #5
[  243.680258] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  243.680261] task:systemd-udevd   state:D stack:    0 pid:  478 ppid:   455 flags:0x00040402
[  243.680266] Call Trace:
[  243.680268] [c00000000c4e7620] [c000000000000000] start_first_256B+0x0/0x38 (unreliable)
[  243.680273] [c00000000c4e7810] [c00000000001e6c8] __switch_to+0x278/0x490
[  243.680278] [c00000000c4e7870] [c000000000c8b9bc] __schedule+0x31c/0xa20
[  243.680282] [c00000000c4e7930] [c000000000c8c128] schedule+0x68/0x120
[  243.680287] [c00000000c4e7960] [c000000000186cd4] async_synchronize_cookie_domain+0x144/0x1a0
[  243.680292] [c00000000c4e7a10] [c00000000024f2e4] do_init_module+0x1a4/0x320
[  243.680297] [c00000000c4e7a90] [c000000000252b88] load_module+0x2098/0x22f0
[  243.680302] [c00000000c4e7c90] [c000000000253100] __do_sys_finit_module+0xd0/0x150
[  243.680307] [c00000000c4e7db0] [c00000000002ffe8] system_call_exception+0x158/0x2c0
[  243.680311] [c00000000c4e7e10] [c00000000000c764] system_call_common+0xf4/0x258
[  243.680317] --- interrupt: c00 at 0x7fff86a5a504
[  243.680320] NIP:  00007fff86a5a504 LR: 00007fff86caea9c CTR: 0000000000000000
[  243.680323] REGS: c00000000c4e7e80 TRAP: 0c00   Not tainted  (5.15.0-rc1-autotest)
[  243.680327] MSR:  800000000000d033 <SF,EE,PR,ME,IR,DR,RI,LE>  CR: 28222244  XER: 00000000
[  243.680335] IRQMASK: 0 
[  243.680335] GPR00: 0000000000000161 00007ffff1dcdfd0 00007fff86b47100 000000000000000e 
[  243.680335] GPR04: 00007fff86cbad30 0000000000000000 000000000000000e 0000000000000000 
[  243.680335] GPR08: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
[  243.680335] GPR12: 0000000000000000 00007fff856784a0 0000000000020000 00000001109cd5a0 
[  243.680335] GPR16: 0000000110a10130 00000001109d57d8 0000000000000000 0000000000000000 
[  243.680335] GPR20: 0000000000000000 00000001109d5810 0000000136b926b0 00007ffff1dce1f0 
[  243.680335] GPR24: 0000000110a10150 0000000000020000 0000000000000000 0000000136b730e0 
[  243.680335] GPR28: 00007fff86cbad30 0000000000020000 0000000000000000 0000000136b926b0 
[  243.680374] NIP [00007fff86a5a504] 0x7fff86a5a504
[  243.680377] LR [00007fff86caea9c] 0x7fff86caea9c
[  243.680380] --- interrupt: c00
[  366.559988] INFO: task eehd:137 blocked for more than 245 seconds.
[  366.560004]       Not tainted 5.15.0-rc1-autotest #5
[  366.560007] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  366.560012] task:eehd            state:D stack:    0 pid:  137 ppid:     2 flags:0x00000800
[  366.560018] Call Trace:
[  366.560020] [c000000008167650] [c0000000001dd368] info_print_prefix+0xa8/0x130 (unreliable)
[  366.560029] [c000000008167840] [c00000000001e6c8] __switch_to+0x278/0x490
[  366.560034] [c0000000081678a0] [c000000000c8b9bc] __schedule+0x31c/0xa20
[  366.560040] [c000000008167960] [c000000000c8c128] schedule+0x68/0x120
[  366.560045] [c000000008167990] [c0080000008ca3c4] __ipr_remove+0x10c/0x4b0 [ipr]
[  366.560054] [c000000008167a60] [c0080000008ca828] ipr_remove+0xc0/0x110 [ipr]
[  366.560061] [c000000008167ae0] [c000000000732bd4] pci_device_remove+0x64/0x120
[  366.560067] [c000000008167b20] [c000000000811318] device_release_driver_internal+0x168/0x2c0
[  366.560074] [c000000008167b60] [c000000000724618] pci_stop_bus_device+0xa8/0x100
[  366.560079] [c000000008167ba0] [c000000000724810] pci_stop_and_remove_bus_device+0x20/0x40
[  366.560084] [c000000008167bd0] [c000000000075e60] pci_hp_remove_devices+0x90/0x130
[  366.560090] [c000000008167c60] [c000000000053cd8] eeh_handle_normal_event+0x7b8/0xa80
[  366.560095] [c000000008167d40] [c000000000054de8] eeh_event_handler+0x108/0x190
[  366.560101] [c000000008167da0] [c00000000018151c] kthread+0x18c/0x1a0
[  366.560105] [c000000008167e10] [c00000000000cfd4] ret_from_kernel_thread+0x5c/0x64
[  366.560112] INFO: task kworker/u48:2:207 blocked for more than 122 seconds.
[  366.560115]       Not tainted 5.15.0-rc1-autotest #5
[  366.560118] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  366.560121] task:kworker/u48:2   state:D stack:    0 pid:  207 ppid:     2 flags:0x00000800
[  366.560127] Workqueue: events_unbound async_run_entry_fn
[  366.560131] Call Trace:
[  366.560133] [c000000008bd36c0] [c000000008bd3700] 0xc000000008bd3700 (unreliable)
[  366.560137] [c000000008bd38b0] [c00000000001e6c8] __switch_to+0x278/0x490
[  366.560142] [c000000008bd3910] [c000000000c8b9bc] __schedule+0x31c/0xa20
[  366.560147] [c000000008bd39d0] [c000000000c8c128] schedule+0x68/0x120
[  366.560151] [c000000008bd3a00] [c000000000c93ee8] schedule_timeout+0x348/0x3f0
[  366.560156] [c000000008bd3ae0] [c000000000c8e2cc] wait_for_completion+0xbc/0x270
[  366.560161] [c000000008bd3b50] [c000000000872670] do_scan_async+0x60/0x2b0
[  366.560167] [c000000008bd3bd0] [c000000000186a2c] async_run_entry_fn+0x5c/0x1c0
[  366.560171] [c000000008bd3c60] [c000000000175468] process_one_work+0x288/0x570
[  366.560177] [c000000008bd3d00] [c0000000001757c8] worker_thread+0x78/0x660
[  366.560182] [c000000008bd3da0] [c00000000018151c] kthread+0x18c/0x1a0
[  366.560187] [c000000008bd3e10] [c00000000000cfd4] ret_from_kernel_thread+0x5c/0x64
[  366.560196] INFO: task systemd-udevd:476 blocked for more than 245 seconds.
[  366.560199]       Not tainted 5.15.0-rc1-autotest #5
[  366.560202] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  366.560205] task:systemd-udevd   state:D stack:    0 pid:  476 ppid:   455 flags:0x00040402
[  366.560210] Call Trace:
[  366.560212] [c00000000c4df620] [c0000000001c350c] __wake_up_common_lock+0xac/0x100 (unreliable)
[  366.560218] [c00000000c4df810] [c00000000001e6c8] __switch_to+0x278/0x490
[  366.560224] [c00000000c4df870] [c000000000c8b9bc] __schedule+0x31c/0xa20
[  366.560228] [c00000000c4df930] [c000000000c8c128] schedule+0x68/0x120
[  366.560232] [c00000000c4df960] [c000000000186cd4] async_synchronize_cookie_domain+0x144/0x1a0
[  366.560238] [c00000000c4dfa10] [c00000000024f2e4] do_init_module+0x1a4/0x320
[  366.560243] [c00000000c4dfa90] [c000000000252b88] load_module+0x2098/0x22f0
[  366.560249] [c00000000c4dfc90] [c000000000253100] __do_sys_finit_module+0xd0/0x150
[  366.560254] [c00000000c4dfdb0] [c00000000002ffe8] system_call_exception+0x158/0x2c0
[  366.560258] [c00000000c4dfe10] [c00000000000c764] system_call_common+0xf4/0x258
[  366.560264] --- interrupt: c00 at 0x7fff86a5a504
[  366.560268] NIP:  00007fff86a5a504 LR: 00007fff86caea9c CTR: 0000000000000000
[  366.560271] REGS: c00000000c4dfe80 TRAP: 0c00   Not tainted  (5.15.0-rc1-autotest)
[  366.560275] MSR:  800000000000d033 <SF,EE,PR,ME,IR,DR,RI,LE>  CR: 28222244  XER: 00000000
[  366.560284] IRQMASK: 0 
[  366.560284] GPR00: 0000000000000161 00007ffff1dcdfd0 00007fff86b47100 000000000000000e 
[  366.560284] GPR04: 0000000136b9b720 0000000000000000 000000000000000e 0000000000000000 
[  366.560284] GPR08: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
[  366.560284] GPR12: 0000000000000000 00007fff856784a0 0000000000020000 00000001109cd5a0 
[  366.560284] GPR16: 0000000110a10130 00000001109d57d8 0000000000000000 0000000000000000 
[  366.560284] GPR20: 0000000000000000 0000000000000000 0000000136b70de0 0000000000000008 
[  366.560284] GPR24: 0000000000000007 0000000000000000 0000000000000000 0000000136b94860 
[  366.560284] GPR28: 0000000136b9b720 0000000000020000 0000000000000000 0000000136b70de0 
[  366.560324] NIP [00007fff86a5a504] 0x7fff86a5a504
[  366.560327] LR [00007fff86caea9c] 0x7fff86caea9c
[  366.560329] --- interrupt: c00
[  366.560332] INFO: task systemd-udevd:478 blocked for more than 245 seconds.
[  366.560335]       Not tainted 5.15.0-rc1-autotest #5
[  366.560338] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  366.560341] task:systemd-udevd   state:D stack:    0 pid:  478 ppid:   455 flags:0x00040402
[  366.560345] Call Trace:
[  366.560347] [c00000000c4e7620] [c000000000000000] start_first_256B+0x0/0x38 (unreliable)
[  366.560353] [c00000000c4e7810] [c00000000001e6c8] __switch_to+0x278/0x490
[  366.560357] [c00000000c4e7870] [c000000000c8b9bc] __schedule+0x31c/0xa20
[  366.560362] [c00000000c4e7930] [c000000000c8c128] schedule+0x68/0x120
[  366.560366] [c00000000c4e7960] [c000000000186cd4] async_synchronize_cookie_domain+0x144/0x1a0
[  366.560372] [c00000000c4e7a10] [c00000000024f2e4] do_init_module+0x1a4/0x320
[  366.560376] [c00000000c4e7a90] [c000000000252b88] load_module+0x2098/0x22f0
[  366.560381] [c00000000c4e7c90] [c000000000253100] __do_sys_finit_module+0xd0/0x150
[  366.560386] [c00000000c4e7db0] [c00000000002ffe8] system_call_exception+0x158/0x2c0
[  366.560391] [c00000000c4e7e10] [c00000000000c764] system_call_common+0xf4/0x258
[  366.560396] --- interrupt: c00 at 0x7fff86a5a504
[  366.560399] NIP:  00007fff86a5a504 LR: 00007fff86caea9c CTR: 0000000000000000
[  366.560403] REGS: c00000000c4e7e80 TRAP: 0c00   Not tainted  (5.15.0-rc1-autotest)
[  366.560407] MSR:  800000000000d033 <SF,EE,PR,ME,IR,DR,RI,LE>  CR: 28222244  XER: 00000000
[  366.560414] IRQMASK: 0 
[  366.560414] GPR00: 0000000000000161 00007ffff1dcdfd0 00007fff86b47100 000000000000000e 
[  366.560414] GPR04: 00007fff86cbad30 0000000000000000 000000000000000e 0000000000000000 
[  366.560414] GPR08: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
[  366.560414] GPR12: 0000000000000000 00007fff856784a0 0000000000020000 00000001109cd5a0 
[  366.560414] GPR16: 0000000110a10130 00000001109d57d8 0000000000000000 0000000000000000 
[  366.560414] GPR20: 0000000000000000 00000001109d5810 0000000136b926b0 00007ffff1dce1f0 
[  366.560414] GPR24: 0000000110a10150 0000000000020000 0000000000000000 0000000136b730e0 
[  366.560414] GPR28: 00007fff86cbad30 0000000000020000 0000000000000000 0000000136b926b0 
[  366.560453] NIP [00007fff86a5a504] 0x7fff86a5a504
[  366.560456] LR [00007fff86caea9c] 0x7fff86caea9c
[  366.560459] --- interrupt: c00



^ permalink raw reply

* Re: [GIT PULL] Please pull powerpc/linux.git powerpc-5.15-2 tag
From: pr-tracker-bot @ 2021-09-19 20:36 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: Linus Torvalds, linux-kernel, npiggin, ganeshgr, clg,
	linuxppc-dev
In-Reply-To: <87o88oiuc7.fsf@mpe.ellerman.id.au>

The pull request you sent on Sun, 19 Sep 2021 23:11:04 +1000:

> https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git tags/powerpc-5.15-2

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/62453a460a000156b100bf20ab78cf77232284d0

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html

^ permalink raw reply

* [GIT PULL] Please pull powerpc/linux.git powerpc-5.15-2 tag
From: Michael Ellerman @ 2021-09-19 13:11 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linuxppc-dev, ganeshgr, clg, npiggin, linux-kernel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi Linus,

Please pull powerpc fixes for 5.15:

The following changes since commit 6880fa6c56601bb8ed59df6c30fd390cc5f6dd8f:

  Linux 5.15-rc1 (2021-09-12 16:28:37 -0700)

are available in the git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git tags/powerpc-5.15-2

for you to fetch changes up to c006a06508db4841d256d82f42da392d6391f3d9:

  powerpc/xics: Set the IRQ chip data for the ICS native backend (2021-09-15 22:05:53 +1000)

- ------------------------------------------------------------------
powerpc fixes for 5.15 #2

Fix crashes when scv (System Call Vectored) is used to make a syscall when a transaction
is active, on Power9 or later.

Fix bad interactions between rfscv (Return-from scv) and Power9 fake-suspend mode.

Fix crashes when handling machine checks in LPARs using the Hash MMU.

Partly revert a recent change to our XICS interrupt controller code, which broke the
recently added Microwatt support.

Thanks to: Cédric Le Goater, Eirik Fuller, Ganesh Goudar, Gustavo Romero, Joel Stanley,
Nicholas Piggin.

- ------------------------------------------------------------------
Cédric Le Goater (1):
      powerpc/xics: Set the IRQ chip data for the ICS native backend

Ganesh Goudar (1):
      powerpc/mce: Fix access error in mce handler

Nicholas Piggin (4):
      powerpc/64s: system call scv tabort fix for corrupt irq soft-mask state
      selftests/powerpc: Add scv versions of the basic TM syscall tests
      powerpc/64s: system call rfscv workaround for TM bugs
      KVM: PPC: Book3S HV: Tolerate treclaim. in fake-suspend mode changing registers


 arch/powerpc/kernel/interrupt.c                     | 43 ++++++++++++++++++++
 arch/powerpc/kernel/interrupt_64.S                  | 41 -------------------
 arch/powerpc/kernel/mce.c                           | 17 +++++++-
 arch/powerpc/kvm/book3s_hv_rmhandlers.S             | 36 +++++++++++++++-
 arch/powerpc/sysdev/xics/xics-common.c              |  4 +-
 tools/testing/selftests/powerpc/tm/tm-syscall-asm.S | 37 ++++++++++++++++-
 tools/testing/selftests/powerpc/tm/tm-syscall.c     | 36 ++++++++++++----
 7 files changed, 159 insertions(+), 55 deletions(-)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEJFGtCPCthwEv2Y/bUevqPMjhpYAFAmFHMuoACgkQUevqPMjh
pYD59RAAsMPzDU+iT15Vm2dC9Ar4hmlLvC0Ew3I/JigC/XSf1bcyGPM4ybSUsoLj
wop5AeOyoaAtegWki3HxMM5iC99KRI9GuJd8Fa8yrSwKYz/O+6oqVJdq0oJY/rLl
NpHDgFCencKya/H0UV+Xobfb41ol25bGchMfcuhQw5G6JVCtWbYSFQXUefTcC3lt
GjYy9jLzvNT7DGlmJBJaeIU78vqRbXLmbHgBwLhxIIBD0us48BQX4elDWcP5Jjwr
UMyz962EaWLAb/nyac9BHzqO9OS6awYJGI5lx3CPJz3+VA6RI/Vu8WoentfejupP
GaiGnCcRBnUAkcUuapy0XQtcv9197yOLkLi5XUPgS82o9EuI2+TLtpoZCwLBOceu
HLpcjYbxf6rV79wYb+P5+oZkPIUi+JWEzF9hCMSFDIJO3mY8rqoDqbEnGEIdiQUi
6IhihFw6s4a15vd+sn0J1KsUvceeA98zE/7zFXW1tYTqxn2zlJFn923EJuHMr+24
mCQb4JvsWlUi+8YuEvr1659I0nstFJaUxY1BFDuFr5oR4/ZFDwnRUs2JbAw8No8Y
uzM7wuq1PMswnKLm5cnR3tsYOVgwTdR6O9wCe3Uva4PoOoB5Y97VpSU8ElfPI+c+
ePdHNteAjRiMLTggWzLryCUNw+2T8wny/r9nyx5tfI2JswXgSvg=
=KZ/U
-----END PGP SIGNATURE-----

^ permalink raw reply

* Re: [PATCH v2] powerpc/mce: Fix access error in mce handler
From: Michael Ellerman @ 2021-09-19 12:20 UTC (permalink / raw)
  To: linuxppc-dev, Ganesh Goudar, mpe; +Cc: mahesh, npiggin
In-Reply-To: <20210909064330.312432-1-ganeshgr@linux.ibm.com>

On Thu, 9 Sep 2021 12:13:30 +0530, Ganesh Goudar wrote:
> We queue an irq work for deferred processing of mce event
> in realmode mce handler, where translation is disabled.
> Queuing of the work may result in accessing memory outside
> RMO region, such access needs the translation to be enabled
> for an LPAR running with hash mmu else the kernel crashes.
> 
> After enabling translation in mce_handle_error() we used to
> leave it enabled to avoid crashing here, but now with the
> commit 74c3354bc1d89 ("powerpc/pseries/mce: restore msr before
> returning from handler") we are restoring the MSR to disable
> translation.
> 
> [...]

Applied to powerpc/fixes.

[1/1] powerpc/mce: Fix access error in mce handler
      https://git.kernel.org/powerpc/c/3a1e92d0896e928ac2a5b58962d05a39afef2e23

cheers

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox