LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 3/6] net/wan/fsl_ucc_hdlc: Adding ARPHRD_ETHER
From: David Gounaris @ 2018-08-29 13:13 UTC (permalink / raw)
  To: qiang.zhao, netdev, linuxppc-dev, robh+dt; +Cc: David Gounaris
In-Reply-To: <20180829131328.27901-1-david.gounaris@infinera.com>

This patch is to avoid discarding ethernet
packets when using HDLC_ETH protocol.

Signed-off-by: David Gounaris <david.gounaris@infinera.com>
---
 drivers/net/wan/fsl_ucc_hdlc.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c
index c8e526bf1130..0f703d7be5e0 100644
--- a/drivers/net/wan/fsl_ucc_hdlc.c
+++ b/drivers/net/wan/fsl_ucc_hdlc.c
@@ -376,6 +376,10 @@ static netdev_tx_t ucc_hdlc_tx(struct sk_buff *skb, struct net_device *dev)
 		dev->stats.tx_bytes += skb->len;
 		break;
 
+	case ARPHRD_ETHER:
+		dev->stats.tx_bytes += skb->len;
+		break;
+
 	default:
 		dev->stats.tx_dropped++;
 		dev_kfree_skb(skb);
@@ -513,6 +517,8 @@ static int hdlc_rx_done(struct ucc_hdlc_private *priv, int rx_work_limit)
 			break;
 
 		case ARPHRD_PPP:
+		case ARPHRD_ETHER:
+			
 			length -= HDLC_CRC_SIZE;
 
 			skb = dev_alloc_skb(length);
-- 
2.13.6

^ permalink raw reply related

* [PATCH v2 4/6] net/wan/fsl_ucc_hdlc: hmask
From: David Gounaris @ 2018-08-29 13:13 UTC (permalink / raw)
  To: qiang.zhao, netdev, linuxppc-dev, robh+dt; +Cc: David Gounaris
In-Reply-To: <20180829131328.27901-1-david.gounaris@infinera.com>

Ability to set hmask in the device-tree,
which can be used to change address
filtering of packets.

Signed-off-by: David Gounaris <david.gounaris@infinera.com>
---
 Documentation/devicetree/bindings/soc/fsl/cpm_qe/network.txt | 6 ++++++
 drivers/net/wan/fsl_ucc_hdlc.c                               | 5 ++++-
 drivers/net/wan/fsl_ucc_hdlc.h                               | 1 +
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/soc/fsl/cpm_qe/network.txt b/Documentation/devicetree/bindings/soc/fsl/cpm_qe/network.txt
index 03c741602c6d..6d2dd8a31482 100644
--- a/Documentation/devicetree/bindings/soc/fsl/cpm_qe/network.txt
+++ b/Documentation/devicetree/bindings/soc/fsl/cpm_qe/network.txt
@@ -98,6 +98,12 @@ The property below is dependent on fsl,tdm-interface:
 	usage: optional for tdm interface
 	value type: <empty>
 	Definition : Internal loopback connecting on TDM layer.
+- fsl,hmask
+	usage: optional
+	Value type: <u16>
+	Definition: HDLC address recognition. Set to zero to disable
+		    address filtering of packets:
+		    fsl,hmask = /bits/ 16 <0x0000>;
 
 Example for tdm interface:
 
diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c
index 0f703d7be5e0..be5b0096af3b 100644
--- a/drivers/net/wan/fsl_ucc_hdlc.c
+++ b/drivers/net/wan/fsl_ucc_hdlc.c
@@ -263,7 +263,7 @@ static int uhdlc_init(struct ucc_hdlc_private *priv)
 	iowrite16be(MAX_FRAME_LENGTH, &priv->ucc_pram->mflr);
 	iowrite16be(DEFAULT_RFTHR, &priv->ucc_pram->rfthr);
 	iowrite16be(DEFAULT_RFTHR, &priv->ucc_pram->rfcnt);
-	iowrite16be(DEFAULT_ADDR_MASK, &priv->ucc_pram->hmask);
+	iowrite16be(priv->hmask, &priv->ucc_pram->hmask);
 	iowrite16be(DEFAULT_HDLC_ADDR, &priv->ucc_pram->haddr1);
 	iowrite16be(DEFAULT_HDLC_ADDR, &priv->ucc_pram->haddr2);
 	iowrite16be(DEFAULT_HDLC_ADDR, &priv->ucc_pram->haddr3);
@@ -1097,6 +1097,9 @@ static int ucc_hdlc_probe(struct platform_device *pdev)
 		if (ret)
 			goto free_utdm;
 	}
+	
+	if (of_property_read_u16(np, "fsl,hmask", &uhdlc_priv->hmask))
+		uhdlc_priv->hmask = DEFAULT_ADDR_MASK;
 
 	ret = uhdlc_init(uhdlc_priv);
 	if (ret) {
diff --git a/drivers/net/wan/fsl_ucc_hdlc.h b/drivers/net/wan/fsl_ucc_hdlc.h
index c21134c1f180..b99fa2f1cd99 100644
--- a/drivers/net/wan/fsl_ucc_hdlc.h
+++ b/drivers/net/wan/fsl_ucc_hdlc.h
@@ -106,6 +106,7 @@ struct ucc_hdlc_private {
 
 	unsigned short encoding;
 	unsigned short parity;
+	unsigned short hmask;
 	u32 clocking;
 	spinlock_t lock;	/* lock for Tx BD and Tx buffer */
 #ifdef CONFIG_PM
-- 
2.13.6

^ permalink raw reply related

* [PATCH v2 6/6] net/wan/fsl_ucc_hdlc: tx timeout handler
From: David Gounaris @ 2018-08-29 13:13 UTC (permalink / raw)
  To: qiang.zhao, netdev, linuxppc-dev, robh+dt; +Cc: David Gounaris
In-Reply-To: <20180829131328.27901-1-david.gounaris@infinera.com>

Added tx timerout handler. This helps
when troubleshooting.

Signed-off-by: David Gounaris <david.gounaris@infinera.com>
---
 drivers/net/wan/fsl_ucc_hdlc.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c
index 248f1f5bcd04..629ef5049d27 100644
--- a/drivers/net/wan/fsl_ucc_hdlc.c
+++ b/drivers/net/wan/fsl_ucc_hdlc.c
@@ -1002,11 +1002,15 @@ static const struct dev_pm_ops uhdlc_pm_ops = {
 #define HDLC_PM_OPS NULL
 
 #endif
+static void uhdlc_tx_timeout(struct net_device *ndev) {
+	netdev_err(ndev, "%s\n", __FUNCTION__);
+}
 static const struct net_device_ops uhdlc_ops = {
 	.ndo_open       = uhdlc_open,
 	.ndo_stop       = uhdlc_close,
 	.ndo_start_xmit = hdlc_start_xmit,
 	.ndo_do_ioctl   = uhdlc_ioctl,
+	.ndo_tx_timeout	= uhdlc_tx_timeout,
 };
 
 static int ucc_hdlc_probe(struct platform_device *pdev)
@@ -1125,6 +1129,7 @@ static int ucc_hdlc_probe(struct platform_device *pdev)
 	hdlc = dev_to_hdlc(dev);
 	dev->tx_queue_len = 16;
 	dev->netdev_ops = &uhdlc_ops;
+	dev->watchdog_timeo = 2*HZ;
 	hdlc->attach = ucc_hdlc_attach;
 	hdlc->xmit = ucc_hdlc_tx;
 	netif_napi_add(dev, &uhdlc_priv->napi, ucc_hdlc_poll, 32);
-- 
2.13.6

^ permalink raw reply related

* [PATCH v2 5/6] net/wan/fsl_ucc_hdlc: GUMR for non tsa mode
From: David Gounaris @ 2018-08-29 13:13 UTC (permalink / raw)
  To: qiang.zhao, netdev, linuxppc-dev, robh+dt; +Cc: David Gounaris
In-Reply-To: <20180829131328.27901-1-david.gounaris@infinera.com>

The following bits in the GUMR is changed for non
tsa mode: CDS, CTSP and CTSS are set to zero.

When set, there is no tx interrupts from the controller.

Signed-off-by: David Gounaris <david.gounaris@infinera.com>
---
 drivers/net/wan/fsl_ucc_hdlc.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c
index be5b0096af3b..248f1f5bcd04 100644
--- a/drivers/net/wan/fsl_ucc_hdlc.c
+++ b/drivers/net/wan/fsl_ucc_hdlc.c
@@ -97,6 +97,13 @@ static int uhdlc_init(struct ucc_hdlc_private *priv)
 	if (priv->tsa) {
 		uf_info->tsa = 1;
 		uf_info->ctsp = 1;
+		uf_info->cds = 1;
+		uf_info->ctss = 1;
+	}
+	else {
+		uf_info->cds = 0;
+		uf_info->ctsp = 0;
+		uf_info->ctss = 0;
 	}
 
 	/* This sets HPM register in CMXUCR register which configures a
-- 
2.13.6

^ permalink raw reply related

* Re: Not able to boot cuImage for the target board with MPC8270 processor
From: sgosavi1 @ 2018-08-29 13:37 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <1fd6324f-515b-4e9e-a942-c606ad919dec@c-s.fr>

Yes, both these config options are enabled as you can see from the below
details from my .config file.

CONFIG_PPC_EARLY_DEBUG=y
CONFIG_PPC_EARLY_DEBUG_CPM=y
# CONFIG_PPC_EARLY_DEBUG_MEMCONS is not set
CONFIG_PPC_EARLY_DEBUG_CPM_ADDR=0x11a80



--
Sent from: http://linuxppc.10917.n7.nabble.com/linuxppc-dev-f3.html

^ permalink raw reply

* Re: Not able to boot cuImage for the target board with MPC8270 processor
From: sgosavi1 @ 2018-08-29 13:41 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <1fd6324f-515b-4e9e-a942-c606ad919dec@c-s.fr>

Thanks for your reply. Yes, both the options are enabled in the kernel
configuration for my board as seen below.

CONFIG_PPC_EARLY_DEBUG=y
CONFIG_PPC_EARLY_DEBUG_CPM=y
# CONFIG_PPC_EARLY_DEBUG_MEMCONS is not set
CONFIG_PPC_EARLY_DEBUG_CPM_ADDR=0x11a80



--
Sent from: http://linuxppc.10917.n7.nabble.com/linuxppc-dev-f3.html

^ permalink raw reply

* Re: [PATCH 2/3] mm/cow: optimise pte dirty/accessed bits handling in fork
From: Linus Torvalds @ 2018-08-29 15:42 UTC (permalink / raw)
  To: Nick Piggin
  Cc: linux-mm, linux-arch, Linux Kernel Mailing List, ppc-dev,
	Andrew Morton
In-Reply-To: <20180828112034.30875-3-npiggin@gmail.com>

On Tue, Aug 28, 2018 at 4:20 AM Nicholas Piggin <npiggin@gmail.com> wrote:
>
> fork clears dirty/accessed bits from new ptes in the child. This logic
> has existed since mapped page reclaim was done by scanning ptes when
> it may have been quite important. Today with physical based pte
> scanning, there is less reason to clear these bits.

Can you humor me, and make the dirty/accessed bit patches separate?

There is actually a difference wrt the dirty bit: if we unmap an area
with dirty pages, we have to do the special synchronous flush.

So a clean page in the virtual mapping is _literally_ cheaper to have.

> This eliminates a major source of faults powerpc/radix requires to set
> dirty/accessed bits in ptes, speeding up a fork/exit microbenchmark by
> about 5% on POWER9 (16600 -> 17500 fork/execs per second).

I don't think the dirty bit matters.

The accessed bit I think may be worth keeping, so by all means remove the mkold.

                  Linus

^ permalink raw reply

* Re: [PATCH] i2c: Convert to using %pOFn instead of device_node.name
From: Rob Herring @ 2018-08-29 18:42 UTC (permalink / raw)
  To: Peter Rosin
  Cc: linux-kernel@vger.kernel.org, Benjamin Herrenschmidt,
	Paul Mackerras, Michael Ellerman, Linux I2C, linuxppc-dev
In-Reply-To: <3fa33583-f748-1708-2274-0a6f4e81004b@axentia.se>

On Wed, Aug 29, 2018 at 1:03 PM Peter Rosin <peda@axentia.se> wrote:
>
> On 2018-08-28 03:52, Rob Herring wrote:
> > In preparation to remove the node name pointer from struct device_node,
> > convert printf users to use the %pOFn format specifier.
> >
> > Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > Cc: Paul Mackerras <paulus@samba.org>
> > Cc: Michael Ellerman <mpe@ellerman.id.au>
> > Cc: Peter Rosin <peda@axentia.se>
> > Cc: linux-i2c@vger.kernel.org
> > Cc: linuxppc-dev@lists.ozlabs.org
> > Signed-off-by: Rob Herring <robh@kernel.org>
> > ---
> >  drivers/i2c/busses/i2c-powermac.c | 15 ++++++++-------
> >  drivers/i2c/muxes/i2c-mux-gpmux.c |  4 ++--
> >  2 files changed, 10 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/i2c/busses/i2c-powermac.c b/drivers/i2c/busses/i2c-powermac.c
> > index f2a2067525ef..b706fd136ca5 100644
> > --- a/drivers/i2c/busses/i2c-powermac.c
> > +++ b/drivers/i2c/busses/i2c-powermac.c
> > @@ -390,7 +390,6 @@ static int i2c_powermac_probe(struct platform_device *dev)
> >       struct pmac_i2c_bus *bus = dev_get_platdata(&dev->dev);
> >       struct device_node *parent = NULL;
>
> Lose the initializer...

That's pretty much unrelated though. I'd have to write "Also, remove
the unnecessary parent pointer init" in the commit message and we all
know "Also" is a clue for belongs in a separate patch.

Rob

^ permalink raw reply

* [PATCH] of: make PowerMac cache node search conditional on CONFIG_PPC_PMAC
From: Rob Herring @ 2018-08-29 19:04 UTC (permalink / raw)
  To: Frank Rowand, devicetree
  Cc: linux-kernel, Benjamin Herrenschmidt, Michael Ellerman,
	linuxppc-dev

Cache nodes under the cpu node(s) is PowerMac specific according to the
comment above, so make the code enforce that.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 drivers/of/base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/base.c b/drivers/of/base.c
index 466e3c8582f0..cadcb470198a 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1963,7 +1963,7 @@ struct device_node *of_find_next_cache_node(const struct device_node *np)
 	/* OF on pmac has nodes instead of properties named "l2-cache"
 	 * beneath CPU nodes.
 	 */
-	if (!strcmp(np->type, "cpu"))
+	if (IS_ENABLED(CONFIG_PPC_PMAC) && !strcmp(np->type, "cpu"))
 		for_each_child_of_node(np, child)
 			if (!strcmp(child->type, "cache"))
 				return child;
-- 
2.17.1

^ permalink raw reply related

* [PATCH] mtd: Convert to using %pOFn instead of device_node.name
From: Rob Herring @ 2018-08-29 19:06 UTC (permalink / raw)
  To: linux-kernel, David Woodhouse
  Cc: Brian Norris, Boris Brezillon, Marek Vasut, Richard Weinberger,
	Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	linux-mtd, linuxppc-dev

In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Brian Norris <computersforpeace@gmail.com>
Cc: Boris Brezillon <boris.brezillon@bootlin.com>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linux-mtd@lists.infradead.org
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Rob Herring <robh@kernel.org>
---
One more %pOFn conversion for MTD. Please apply to MTD tree.

 drivers/mtd/devices/powernv_flash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/devices/powernv_flash.c b/drivers/mtd/devices/powernv_flash.c
index 33593122e49b..22f753e555ac 100644
--- a/drivers/mtd/devices/powernv_flash.c
+++ b/drivers/mtd/devices/powernv_flash.c
@@ -212,7 +212,7 @@ static int powernv_flash_set_driver_info(struct device *dev,
 	 * Going to have to check what details I need to set and how to
 	 * get them
 	 */
-	mtd->name = of_get_property(dev->of_node, "name", NULL);
+	mtd->name = devm_kasprintf(dev, GFP_KERNEL, "%pOFn", dev->of_node);
 	mtd->type = MTD_NORFLASH;
 	mtd->flags = MTD_WRITEABLE;
 	mtd->size = size;
-- 
2.17.1

^ permalink raw reply related

* Re: [PATCH] i2c: Convert to using %pOFn instead of device_node.name
From: Peter Rosin @ 2018-08-29 19:52 UTC (permalink / raw)
  To: Rob Herring
  Cc: linux-kernel@vger.kernel.org, Benjamin Herrenschmidt,
	Paul Mackerras, Michael Ellerman, Linux I2C, linuxppc-dev
In-Reply-To: <CAL_JsqJcDdntsi3D=neU=Dhx0Xku_XPFC_OCLRb8V==HTtviBQ@mail.gmail.com>

On 2018-08-29 20:42, Rob Herring wrote:
> On Wed, Aug 29, 2018 at 1:03 PM Peter Rosin <peda@axentia.se> wrote:
>>
>> On 2018-08-28 03:52, Rob Herring wrote:
>>> In preparation to remove the node name pointer from struct device_node,
>>> convert printf users to use the %pOFn format specifier.
>>>
>>> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>>> Cc: Paul Mackerras <paulus@samba.org>
>>> Cc: Michael Ellerman <mpe@ellerman.id.au>
>>> Cc: Peter Rosin <peda@axentia.se>
>>> Cc: linux-i2c@vger.kernel.org
>>> Cc: linuxppc-dev@lists.ozlabs.org
>>> Signed-off-by: Rob Herring <robh@kernel.org>
>>> ---
>>>  drivers/i2c/busses/i2c-powermac.c | 15 ++++++++-------
>>>  drivers/i2c/muxes/i2c-mux-gpmux.c |  4 ++--
>>>  2 files changed, 10 insertions(+), 9 deletions(-)
>>>
>>> diff --git a/drivers/i2c/busses/i2c-powermac.c b/drivers/i2c/busses/i2c-powermac.c
>>> index f2a2067525ef..b706fd136ca5 100644
>>> --- a/drivers/i2c/busses/i2c-powermac.c
>>> +++ b/drivers/i2c/busses/i2c-powermac.c
>>> @@ -390,7 +390,6 @@ static int i2c_powermac_probe(struct platform_device *dev)
>>>       struct pmac_i2c_bus *bus = dev_get_platdata(&dev->dev);
>>>       struct device_node *parent = NULL;
>>
>> Lose the initializer...
> 
> That's pretty much unrelated though.

I disagree. If you remove the need for the initializer, it's very much
related to also remove the initializer.

> I'd have to write "Also, remove
> the unnecessary parent pointer init" in the commit message and we all
> know "Also" is a clue for belongs in a separate patch.

How about: "This makes the parent pointer initializer redundant, lose it."

See, no "Also" in there, and no separate patch needed. Or don't mention it
at all.

Cheers,
Peter

^ permalink raw reply

* Re: Not able to boot cuImage for the target board with MPC8270 processor
From: Scott Wood @ 2018-08-29 19:16 UTC (permalink / raw)
  To: sgosavi1, linuxppc-dev
In-Reply-To: <1535541276673-0.post@n7.nabble.com>

On Wed, 2018-08-29 at 04:14 -0700, sgosavi1 wrote:
> Press <foo> to STOP AUTOBOOT!:autoboot in 2 seconds
> ## Booting image at ffc00000 ...
>    Image Name:   Linux-4.15.13
>    Created:      2018-08-29  10:45:39 UTC
>    Image Type:   PowerPC Linux Kernel Image (gzip compressed)
>    Data Size:    1166748 Bytes =  1.1 MB
>    Load Address: 00400000
>    Entry Point:  004007a4
>    Verifying Checksum ... OK
>    Uncompressing Kernel Image ... OK
> 
> 
> I also checked the kernel dump at location associated with "_log_buf" symbol
> in the System.map file in RAM but did not get any debug info.

If you didn't get any output beyond this then it's probably[1] failing in the
bootwrapper, not the kernel itself -- so neither _log_buf nor
CONFIG_PPC_EARLY_DEBUG would help.

> Please can anyone suggest if I am missing something here and how can I get
> the debug output on my serial console during bootup.

To debug, if you aren't able to use JTAG, add code to the bootwrapper to
manually poke at known CPM serial addresses early on, to see how far it's
progressing.

Are you sure the device tree you're using is correct for your board, including
all addresses being where your U-Boot configured them?

-Scott

[1] Another possibility would be that it's booting, but serial output isn't
working.

^ permalink raw reply

* [PATCH] hwmon: drop unnecessary OF name NULL checks
From: Rob Herring @ 2018-08-29 20:02 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: linux-kernel, Jean Delvare, Benjamin Herrenschmidt,
	Paul Mackerras, Michael Ellerman, linux-hwmon, linuxppc-dev

Checking the child node names is pointless as the DT node name can
never be NULL, so remove it.

Cc: Jean Delvare <jdelvare@suse.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linux-hwmon@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Rob Herring <robh@kernel.org>
---
 drivers/hwmon/ibmpowernv.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/hwmon/ibmpowernv.c b/drivers/hwmon/ibmpowernv.c
index 4935897f1527..0ccca87f5271 100644
--- a/drivers/hwmon/ibmpowernv.c
+++ b/drivers/hwmon/ibmpowernv.c
@@ -458,9 +458,6 @@ static int populate_attr_groups(struct platform_device *pdev)
 	for_each_child_of_node(opal, np) {
 		const char *label;
 
-		if (np->name == NULL)
-			continue;
-
 		type = get_sensor_type(np);
 		if (type == MAX_SENSOR_TYPE)
 			continue;
@@ -589,9 +586,6 @@ static int create_device_attrs(struct platform_device *pdev)
 		const char *label;
 		enum sensors type;
 
-		if (np->name == NULL)
-			continue;
-
 		type = get_sensor_type(np);
 		if (type == MAX_SENSOR_TYPE)
 			continue;
-- 
2.17.1

^ permalink raw reply related

* [PATCH] soc: fsl/qe: Use of_get_child_by_name helper
From: Rob Herring @ 2018-08-29 20:04 UTC (permalink / raw)
  To: Qiang Zhao; +Cc: linux-kernel, Li Yang, linuxppc-dev, linux-arm-kernel

Use the of_get_child_by_name() helper instead of open coding searching
for the 'firmware' child node. This removes directly accessing the name
pointer as well.

Cc: Qiang Zhao <qiang.zhao@nxp.com>
Cc: Li Yang <leoyang.li@nxp.com>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Rob Herring <robh@kernel.org>
---
 drivers/soc/fsl/qe/qe.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/soc/fsl/qe/qe.c b/drivers/soc/fsl/qe/qe.c
index 2ef6fc6487c1..612d9c551be5 100644
--- a/drivers/soc/fsl/qe/qe.c
+++ b/drivers/soc/fsl/qe/qe.c
@@ -588,11 +588,7 @@ struct qe_firmware_info *qe_get_firmware_info(void)
 	}
 
 	/* Find the 'firmware' child node */
-	for_each_child_of_node(qe, fw) {
-		if (strcmp(fw->name, "firmware") == 0)
-			break;
-	}
-
+	fw = of_get_child_by_name(qe, "firmware");
 	of_node_put(qe);
 
 	/* Did we find the 'firmware' node? */
-- 
2.17.1

^ permalink raw reply related

* Re: [PATCH] hwmon: drop unnecessary OF name NULL checks
From: Guenter Roeck @ 2018-08-29 20:27 UTC (permalink / raw)
  To: Rob Herring
  Cc: linux-kernel, Jean Delvare, Benjamin Herrenschmidt,
	Paul Mackerras, Michael Ellerman, linux-hwmon, linuxppc-dev
In-Reply-To: <20180829200221.13492-1-robh@kernel.org>

On Wed, Aug 29, 2018 at 03:02:21PM -0500, Rob Herring wrote:
> Checking the child node names is pointless as the DT node name can
> never be NULL, so remove it.
> 
> Cc: Jean Delvare <jdelvare@suse.com>
> Cc: Guenter Roeck <linux@roeck-us.net>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: linux-hwmon@vger.kernel.org
> Cc: linuxppc-dev@lists.ozlabs.org
> Signed-off-by: Rob Herring <robh@kernel.org>

Applied to hwmon-next.

Thanks,
Guenter

> ---
>  drivers/hwmon/ibmpowernv.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/drivers/hwmon/ibmpowernv.c b/drivers/hwmon/ibmpowernv.c
> index 4935897f1527..0ccca87f5271 100644
> --- a/drivers/hwmon/ibmpowernv.c
> +++ b/drivers/hwmon/ibmpowernv.c
> @@ -458,9 +458,6 @@ static int populate_attr_groups(struct platform_device *pdev)
>  	for_each_child_of_node(opal, np) {
>  		const char *label;
>  
> -		if (np->name == NULL)
> -			continue;
> -
>  		type = get_sensor_type(np);
>  		if (type == MAX_SENSOR_TYPE)
>  			continue;
> @@ -589,9 +586,6 @@ static int create_device_attrs(struct platform_device *pdev)
>  		const char *label;
>  		enum sensors type;
>  
> -		if (np->name == NULL)
> -			continue;
> -
>  		type = get_sensor_type(np);
>  		if (type == MAX_SENSOR_TYPE)
>  			continue;
> -- 
> 2.17.1
> 

^ permalink raw reply

* Re: [PATCH] fsl/qe: ucc: copy and paste bug in ucc_get_tdm_sync_shift()
From: Li Yang @ 2018-08-29 22:41 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: malat, linuxppc-dev, kernel-janitors, lkml, Zhao Qiang
In-Reply-To: <20180829093948.c7nbl27ju4uszrum@mwanda>

On Wed, Aug 29, 2018 at 4:42 AM Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
> On Mon, Jun 04, 2018 at 02:06:45PM +0200, Mathieu Malaterre wrote:
> > Where did the original go ?
> >
> > https://patchwork.ozlabs.org/patch/868158/
> >
> >
>
> Btw, we still haven't pushed a patch for this bug.

I will combine Zhao Qiang's patch with your description which is
better, and push as fix for 4.19.

Regards,
Leo

^ permalink raw reply

* Re: [PATCH 2/3] mm/cow: optimise pte dirty/accessed bits handling in fork
From: Nicholas Piggin @ 2018-08-29 23:12 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-mm, linux-arch, Linux Kernel Mailing List, ppc-dev,
	Andrew Morton
In-Reply-To: <CA+55aFwbZrsdZEh0ds1W3AWUeTamDRheQPKSi9O=--cEOSjr5g@mail.gmail.com>

On Wed, 29 Aug 2018 08:42:09 -0700
Linus Torvalds <torvalds@linux-foundation.org> wrote:

> On Tue, Aug 28, 2018 at 4:20 AM Nicholas Piggin <npiggin@gmail.com> wrote:
> >
> > fork clears dirty/accessed bits from new ptes in the child. This logic
> > has existed since mapped page reclaim was done by scanning ptes when
> > it may have been quite important. Today with physical based pte
> > scanning, there is less reason to clear these bits.  
> 
> Can you humor me, and make the dirty/accessed bit patches separate?

Yeah sure.

> There is actually a difference wrt the dirty bit: if we unmap an area
> with dirty pages, we have to do the special synchronous flush.
> 
> So a clean page in the virtual mapping is _literally_ cheaper to have.

Oh yeah true, that blasted thing. Good point.

Dirty micro fault seems to be the big one for my Skylake, takes 300
nanoseconds per access. Accessed takes about 100. (I think, have to
go over my benchmark a bit more carefully and re-test).

Dirty will happen less often though, particularly as most places we
do write to (stack, heap, etc) will be write protected for COW anyway,
I think. Worst case might be a big shared shm segment like a database
buffer cache, but those kind of forks should happen very very
infrequently I would hope.

Yes maybe we can do that. I'll split them up and try to get some
numbers for them individually.

Thanks,
Nick

^ permalink raw reply

* Re: [PATCH 2/3] mm/cow: optimise pte dirty/accessed bits handling in fork
From: Linus Torvalds @ 2018-08-29 23:15 UTC (permalink / raw)
  To: Nick Piggin
  Cc: linux-mm, linux-arch, Linux Kernel Mailing List, ppc-dev,
	Andrew Morton
In-Reply-To: <20180830091213.78b64354@roar.ozlabs.ibm.com>

On Wed, Aug 29, 2018 at 4:12 PM Nicholas Piggin <npiggin@gmail.com> wrote:
>
> Dirty micro fault seems to be the big one for my Skylake, takes 300
> nanoseconds per access. Accessed takes about 100. (I think, have to
> go over my benchmark a bit more carefully and re-test).

Yeah, but they only happen for shared areas after fork, which sounds
like it shouldn't be a big deal in most cases.

And I'm not entirely objecting to your patch per se, I just would want
to keep the accessed bit changes separate from the dirty bit ones.

*If* somebody has bisectable issues with it (performance or not), it
will then be clearer what the exact issue is.

            Linus

^ permalink raw reply

* Re: FSL/NXP P5020: USB problems with the latest Git kernels
From: Scott Wood @ 2018-08-29 23:30 UTC (permalink / raw)
  To: Darren Stevens; +Cc: Christian Zigotzky, linuxppc-dev
In-Reply-To: <4c796dccb9b.4d269848@auth.smtp.1and1.co.uk>

On Tue, 2018-08-28 at 20:13 +0100, Darren Stevens wrote:
> Hello Scott
> 
> On 27/08/2018, Scott Wood wrote:
> > On Mon, 2018-08-27 at 20:15 +0200, Christian Zigotzky wrote:
> > > Hello,
> > > 
> > > Our users tested the RC1 of kernel 4.19 on their P5020 boards today.
> > > Unfortunately the USB bug still exists. With mem values bigger than
> > > 4096M,
> > > the USB mouse and keyboard doesn't work. With the bootarg mem=4096M, the
> > > USB
> > > devices work without any problems. Please compile the RC1 and test it on
> > > your P5020 board. There is a problem with the memory management since
> > > 22/08/18. 
> > 
> > I just tested 4.19-rc1 on a T4240 and got a similar problem with MMC.  MMC
> > and
> > USB on these chips both have a 32-bit DMA limitation.  I'll look into it.
> 
> I've run a bisect locally on my system and found the following bad commit:
> 
> # first bad commit: [1b1eeca7e4c19fa76d409d4c7b338dba21f2df45] init: allow
> initcall tables to be emitted using relative references
> 
> I can't see why this would fail though, and it only seems to affect fsl
> machines, and on mine it killed the onboard sata as well.
> 
> Hope this helps.


The patch is changing the order of initcalls.  swiotlb_setup_bus_notifier()
and corenet_gen_publish_devices() are both machine_arch_initcall(), and if the
latter happens before the former, then the bus notifier gets missed and
swiotlb doesn't get used.

-Scott

^ permalink raw reply

* Re: [PATCH 2/3] mm/cow: optimise pte dirty/accessed bits handling in fork
From: Nicholas Piggin @ 2018-08-29 23:57 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-mm, linux-arch, Linux Kernel Mailing List, ppc-dev,
	Andrew Morton
In-Reply-To: <CA+55aFzBHNsLNs4TfOrMQXTsV9u8=7yAu4GbsOM84AQb-OhJmg@mail.gmail.com>

On Wed, 29 Aug 2018 16:15:37 -0700
Linus Torvalds <torvalds@linux-foundation.org> wrote:

> On Wed, Aug 29, 2018 at 4:12 PM Nicholas Piggin <npiggin@gmail.com> wrote:
> >
> > Dirty micro fault seems to be the big one for my Skylake, takes 300
> > nanoseconds per access. Accessed takes about 100. (I think, have to
> > go over my benchmark a bit more carefully and re-test).  
> 
> Yeah, but they only happen for shared areas after fork, which sounds
> like it shouldn't be a big deal in most cases.

You might be right there.

> 
> And I'm not entirely objecting to your patch per se, I just would want
> to keep the accessed bit changes separate from the dirty bit ones.
> 
> *If* somebody has bisectable issues with it (performance or not), it
> will then be clearer what the exact issue is.

Yeah that makes a lot of sense. I'll do a bit more testing and send
Andrew a respin at least with those split (and a good comment for
the dirty bit vs unmap handling that you pointed out).

Thanks,
Nick

^ permalink raw reply

* v4.17 regression: PowerMac G3 won't boot, was Re: [PATCH v5 1/3] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()
From: Finn Thain @ 2018-08-30  0:44 UTC (permalink / raw)
  To: Frank Rowand
  Cc: Stan Johnson, Rob Herring, Benjamin Herrenschmidt, Chintan Pandya,
	devicetree, linux-kernel, linuxppc-dev
In-Reply-To: <1520208889-3908-2-git-send-email-frowand.list@gmail.com>

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

Hi Frank,

Linux v4.17 and later will no longer boot on a G3 PowerMac. The boot hangs 
very early, before any video driver loads.

Stan and I were able to bisect the regression between v4.16 and v4.17 and 
arrived at commit 0b3ce78e90fc ("of: cache phandle nodes to reduce cost of 
of_find_node_by_phandle()").

I don't see any obvious bug in 0b3ce78e90fc or b9952b5218ad. But if you 
revert these from v4.18 (which is also affected) that certainly resolves 
the issue.

I did see this in the kernel messages:

Duplicate name in PowerPC,750, renamed to "l2-cache#1"
Duplicate name in mac-io, renamed to "ide#1"
Duplicate name in ide#1, renamed to "atapi-disk#1"
Duplicate name in multifunc-device, renamed to "pci1799,1#1"

No idea whether that's relevant; I haven't done any further investigation. 
Complete dmesg output is attached. Please let me know if there's any more 
information you need to help find the bug.

Thanks.

-- 

On Sun, 4 Mar 2018, frowand.list@gmail.com wrote:

> From: Frank Rowand <frank.rowand@sony.com>
> 
> Create a cache of the nodes that contain a phandle property.  Use this
> cache to find the node for a given phandle value instead of scanning
> the devicetree to find the node.  If the phandle value is not found
> in the cache, of_find_node_by_phandle() will fall back to the tree
> scan algorithm.
> 
> The cache is initialized in of_core_init().
> 
> The cache is freed via a late_initcall_sync() if modules are not
> enabled.
> 
> If the devicetree is created by the dtc compiler, with all phandle
> property values auto generated, then the size required by the cache
> could be 4 * (1 + number of phandles) bytes.  This results in an O(1)
> node lookup cost for a given phandle value.  Due to a concern that the
> phandle property values might not be consistent with what is generated
> by the dtc compiler, a mask has been added to the cache lookup algorithm.
> To maintain the O(1) node lookup cost, the size of the cache has been
> increased by rounding the number of entries up to the next power of
> two.
> 
> The overhead of finding the devicetree node containing a given phandle
> value has been noted by several people in the recent past, in some cases
> with a patch to add a hashed index of devicetree nodes, based on the
> phandle value of the node.  One concern with this approach is the extra
> space added to each node.  This patch takes advantage of the phandle
> property values auto generated by the dtc compiler, which begin with
> one and monotonically increase by one, resulting in a range of 1..n
> for n phandle values.  This implementation should also provide a good
> reduction of overhead for any range of phandle values that are mostly
> in a monotonic range.
> 
> Performance measurements by Chintan Pandya <cpandya@codeaurora.org>
> of several implementations of patches that are similar to this one
> suggest an expected reduction of boot time by ~400ms for his test
> system.  If the cache size was decreased to 64 entries, the boot
> time was reduced by ~340 ms.  The measurements were on a 4.9.73 kernel
> for arch/arm64/boot/dts/qcom/sda670-mtp.dts, contains 2371 nodes and
> 814 phandle values.
> 
> Reported-by: Chintan Pandya <cpandya@codeaurora.org>
> Signed-off-by: Frank Rowand <frank.rowand@sony.com>
> ---
> 
> Changes since v3:
>   - of_populate_phandle_cache(): add check for failed memory allocation
> 
> Changes since v2:
>   - add mask to calculation of phandle cache entry
>   - which results in better overhead reduction for devicetrees with
>     phandle properties not allocated in the monotonically increasing
>     range of 1..n
>   - due to mask, number of entries in cache potentially increased to
>     next power of two
>   - minor fixes as suggested by reviewers
>   - no longer using live_tree_max_phandle() so do not move it from
>     drivers/of/resolver.c to drivers/of/base.c
> 
> Changes since v1:
>   - change short description from
>     of: cache phandle nodes to reduce cost of of_find_node_by_phandle()
>   - rebase on v4.16-rc1
>   - reorder new functions in base.c to avoid forward declaration
>   - add locking around kfree(phandle_cache) for memory ordering
>   - add explicit check for non-null of phandle_cache in
>     of_find_node_by_phandle().  There is already a check for !handle,
>     which prevents accessing a null phandle_cache, but that dependency
>     is not obvious, so this check makes it more apparent.
>   - do not free phandle_cache if modules are enabled, so that
>     cached phandles will be available when modules are loaded
> 
>  drivers/of/base.c       | 86 ++++++++++++++++++++++++++++++++++++++++++++++---
>  drivers/of/of_private.h |  3 ++
>  drivers/of/resolver.c   |  3 --
>  3 files changed, 85 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/of/base.c b/drivers/of/base.c
> index ad28de96e13f..e71d157d7149 100644
> --- a/drivers/of/base.c
> +++ b/drivers/of/base.c
> @@ -91,10 +91,72 @@ int __weak of_node_to_nid(struct device_node *np)
>  }
>  #endif
>  
> +static struct device_node **phandle_cache;
> +static u32 phandle_cache_mask;
> +
> +/*
> + * Assumptions behind phandle_cache implementation:
> + *   - phandle property values are in a contiguous range of 1..n
> + *
> + * If the assumptions do not hold, then
> + *   - the phandle lookup overhead reduction provided by the cache
> + *     will likely be less
> + */
> +static void of_populate_phandle_cache(void)
> +{
> +	unsigned long flags;
> +	u32 cache_entries;
> +	struct device_node *np;
> +	u32 phandles = 0;
> +
> +	raw_spin_lock_irqsave(&devtree_lock, flags);
> +
> +	kfree(phandle_cache);
> +	phandle_cache = NULL;
> +
> +	for_each_of_allnodes(np)
> +		if (np->phandle && np->phandle != OF_PHANDLE_ILLEGAL)
> +			phandles++;
> +
> +	cache_entries = roundup_pow_of_two(phandles);
> +	phandle_cache_mask = cache_entries - 1;
> +
> +	phandle_cache = kcalloc(cache_entries, sizeof(*phandle_cache),
> +				GFP_ATOMIC);
> +	if (!phandle_cache)
> +		goto out;
> +
> +	for_each_of_allnodes(np)
> +		if (np->phandle && np->phandle != OF_PHANDLE_ILLEGAL)
> +			phandle_cache[np->phandle & phandle_cache_mask] = np;
> +
> +out:
> +	raw_spin_unlock_irqrestore(&devtree_lock, flags);
> +}
> +
> +#ifndef CONFIG_MODULES
> +static int __init of_free_phandle_cache(void)
> +{
> +	unsigned long flags;
> +
> +	raw_spin_lock_irqsave(&devtree_lock, flags);
> +
> +	kfree(phandle_cache);
> +	phandle_cache = NULL;
> +
> +	raw_spin_unlock_irqrestore(&devtree_lock, flags);
> +
> +	return 0;
> +}
> +late_initcall_sync(of_free_phandle_cache);
> +#endif
> +
>  void __init of_core_init(void)
>  {
>  	struct device_node *np;
>  
> +	of_populate_phandle_cache();
> +
>  	/* Create the kset, and register existing nodes */
>  	mutex_lock(&of_mutex);
>  	of_kset = kset_create_and_add("devicetree", NULL, firmware_kobj);
> @@ -1021,16 +1083,32 @@ int of_modalias_node(struct device_node *node, char *modalias, int len)
>   */
>  struct device_node *of_find_node_by_phandle(phandle handle)
>  {
> -	struct device_node *np;
> +	struct device_node *np = NULL;
>  	unsigned long flags;
> +	phandle masked_handle;
>  
>  	if (!handle)
>  		return NULL;
>  
>  	raw_spin_lock_irqsave(&devtree_lock, flags);
> -	for_each_of_allnodes(np)
> -		if (np->phandle == handle)
> -			break;
> +
> +	masked_handle = handle & phandle_cache_mask;
> +
> +	if (phandle_cache) {
> +		if (phandle_cache[masked_handle] &&
> +		    handle == phandle_cache[masked_handle]->phandle)
> +			np = phandle_cache[masked_handle];
> +	}
> +
> +	if (!np) {
> +		for_each_of_allnodes(np)
> +			if (np->phandle == handle) {
> +				if (phandle_cache)
> +					phandle_cache[masked_handle] = np;
> +				break;
> +			}
> +	}
> +
>  	of_node_get(np);
>  	raw_spin_unlock_irqrestore(&devtree_lock, flags);
>  	return np;
> diff --git a/drivers/of/of_private.h b/drivers/of/of_private.h
> index 0c609e7d0334..fa70650136b4 100644
> --- a/drivers/of/of_private.h
> +++ b/drivers/of/of_private.h
> @@ -131,6 +131,9 @@ extern void __of_update_property_sysfs(struct device_node *np,
>  extern void __of_sysfs_remove_bin_file(struct device_node *np,
>  				       struct property *prop);
>  
> +/* illegal phandle value (set when unresolved) */
> +#define OF_PHANDLE_ILLEGAL	0xdeadbeef
> +
>  /* iterators for transactions, used for overlays */
>  /* forward iterator */
>  #define for_each_transaction_entry(_oft, _te) \
> diff --git a/drivers/of/resolver.c b/drivers/of/resolver.c
> index 740d19bde601..b2ca8185c8c6 100644
> --- a/drivers/of/resolver.c
> +++ b/drivers/of/resolver.c
> @@ -19,9 +19,6 @@
>  
>  #include "of_private.h"
>  
> -/* illegal phandle value (set when unresolved) */
> -#define OF_PHANDLE_ILLEGAL	0xdeadbeef
> -
>  static phandle live_tree_max_phandle(void)
>  {
>  	struct device_node *node;
> 

[-- Attachment #2: Type: text/plain, Size: 14087 bytes --]

Total memory = 768MB; using 2048kB for hash table (at (ptrval))
Linux version 4.18.0-g5d852e5b3424 (root@nippy) (gcc version 8.1.0 (Debian 8.1.0-12)) #4 SMP Wed Aug 29 14:54:01 AEST 2018
Found a Heathrow mac-io controller, rev: 1, mapped at 0x(ptrval)
PowerMac motherboard: PowerMac G3 (Silk)
Using PowerMac machine description
bootconsole [udbg0] enabled
CPU maps initialized for 1 thread per core
 (thread shift is 0)
-----------------------------------------------------
Hash_size         = 0x200000
phys_mem_size     = 0x30000000
dcache_bsize      = 0x20
icache_bsize      = 0x20
cpu_features      = 0x000000000501a008
  possible        = 0x000000002f7ff04b
  always          = 0x0000000001000000
cpu_user_features = 0x8c000001 0x00000000
mmu_features      = 0x00000001
Hash              = 0x(ptrval)
Hash_mask         = 0x7fff
-----------------------------------------------------
Found Grackle (MPC106) PCI host bridge at 0x0000000080000000. Firmware bus number: 0->0
PCI host bridge /pci (primary) ranges:
  IO 0x00000000fe000000..0x00000000fe7fffff -> 0x0000000000000000
 MEM 0x00000000fd000000..0x00000000fdffffff -> 0x0000000000000000 
 MEM 0x0000000080000000..0x00000000fcffffff -> 0x0000000080000000 
nvram: OF partition at 0x1800
nvram: XP partition at 0x1300
nvram: NR partition at 0x1400
Top of RAM: 0x30000000, Total RAM: 0x30000000
Memory hole size: 0MB
Zone ranges:
  DMA      [mem 0x0000000000000000-0x000000002fffffff]
  Normal   empty
  HighMem  empty
Movable zone start for each node
Early memory node ranges
  node   0: [mem 0x0000000000000000-0x000000002fffffff]
Initmem setup node 0 [mem 0x0000000000000000-0x000000002fffffff]
On node 0 totalpages: 196608
  DMA zone: 1536 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 196608 pages, LIFO batch:31
percpu: Embedded 14 pages/cpu @(ptrval) s24684 r8192 d24468 u57344
pcpu-alloc: s24684 r8192 d24468 u57344 alloc=14*4096
pcpu-alloc: [0] 0 [0] 1 
Built 1 zonelists, mobility grouping on.  Total pages: 195072
Kernel command line: root=/dev/sda12 video=atyfb:vmode:14 log_buf_len=64k earlyprintk console=tty0
log_buf_len: 65536 bytes
early log buf free: 29884(91%)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 760236K/786432K available (5756K kernel code, 244K rwdata, 1332K rodata, 268K init, 175K bss, 26196K reserved, 0K cma-reserved, 0K highmem)
Kernel virtual memory layout:
  * 0xfffbf000..0xfffff000  : fixmap
  * 0xff800000..0xffc00000  : highmem PTEs
  * 0xfef5b000..0xff800000  : early ioremap
  * 0xf1000000..0xfef5b000  : vmalloc & ioremap
Hierarchical RCU implementation.
NR_IRQS: 512, nr_irqs: 512, preallocated irqs: 16
irq: Found primary Apple PIC /pci/mac-io for 64 irqs
irq: System has 64 possible interrupts
GMT Delta read from XPRAM: -360 minutes, DST: on
time_init: decrementer frequency = 16.708416 MHz
time_init: processor frequency   = 501.150000 MHz
clocksource: timebase: mask: 0xffffffffffffffff max_cycles: 0x3da7d2cd7, max_idle_ns: 440795202411 ns
clocksource: timebase mult[3bd99eb5] shift[24] registered
clockevent: decrementer mult[44700b4] shift[32] cpu[0]
Console: colour dummy device 80x25
console [tty0] enabled
bootconsole [udbg0] disabled
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
smp: Brought up 1 node, 1 CPU
Using standard scheduler topology
devtmpfs: initialized
Duplicate name in PowerPC,750, renamed to "l2-cache#1"
Duplicate name in mac-io, renamed to "ide#1"
Duplicate name in ide#1, renamed to "atapi-disk#1"
Duplicate name in multifunc-device, renamed to "pci1799,1#1"
random: get_random_u32 called from bucket_table_alloc+0x90/0x214 with crng_init=0
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 512 (order: 2, 16384 bytes)
NET: Registered protocol family 16
PCI: Probing PCI hardware
PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io  0x0000-0x7fffff]
pci_bus 0000:00: root bus resource [mem 0xfd000000-0xfdffffff] (bus address [0x00000000-0x00ffffff])
pci_bus 0000:00: root bus resource [mem 0x80000000-0xfcffffff]
pci_bus 0000:00: root bus resource [bus 00-ff]
pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to ff
pci 0000:00:00.0: [1057:0002] type 00 class 0x060000
pci 0000:00:0e.0: [1033:00cd] type 00 class 0x0c0010
pci 0000:00:0e.0: reg 0x10: [mem 0x80803000-0x80803fff]
pci 0000:00:0e.0: supports D2
pci 0000:00:0e.0: PME# supported from D2 D3hot
pci 0000:00:0f.0: [1033:0035] type 00 class 0x0c0310
pci 0000:00:0f.0: reg 0x10: [mem 0x80802000-0x80802fff]
pci 0000:00:0f.0: supports D1 D2
pci 0000:00:0f.0: PME# supported from D0 D1 D2 D3hot
pci 0000:00:0f.1: [1033:0035] type 00 class 0x0c0310
pci 0000:00:0f.1: reg 0x10: [mem 0x80801000-0x80801fff]
pci 0000:00:0f.1: supports D1 D2
pci 0000:00:0f.1: PME# supported from D0 D1 D2 D3hot
pci 0000:00:0f.2: [1033:00e0] type 00 class 0x0c0320
pci 0000:00:0f.2: reg 0x10: [mem 0x80800000-0x808000ff]
pci 0000:00:0f.2: supports D1 D2
pci 0000:00:0f.2: PME# supported from D0 D1 D2 D3hot
pci 0000:00:10.0: [106b:0010] type 00 class 0xff0000
pci 0000:00:10.0: reg 0x10: [mem 0xf3000000-0xf307ffff]
pci 0000:00:12.0: [1002:4750] type 00 class 0x030000
pci 0000:00:12.0: reg 0x10: [mem 0x81000000-0x81ffffff]
pci 0000:00:12.0: reg 0x14: [io  0x0c00-0x0cff]
pci 0000:00:12.0: reg 0x18: [mem 0x80804000-0x80804fff]
pci 0000:00:12.0: reg 0x30: [mem 0xfd000000-0xfd01ffff pref]
pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
PCI 0000:00 Cannot reserve Legacy IO [io  0x0000-0x0fff]
pci 0000:00:12.0: BAR 6: assigned [mem 0xfd000000-0xfd01ffff pref]
pci_bus 0000:00: resource 4 [io  0x0000-0x7fffff]
pci_bus 0000:00: resource 5 [mem 0xfd000000-0xfdffffff]
pci_bus 0000:00: resource 6 [mem 0x80000000-0xfcffffff]
pci 0000:00:12.0: vgaarb: VGA device added: decodes=io+mem,owns=mem,locks=none
pci 0000:00:12.0: vgaarb: bridge control possible
pci 0000:00:12.0: vgaarb: setting as boot device (VGA legacy resources not available)
vgaarb: loaded
SCSI subsystem initialized
libata version 3.00 loaded.
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
clocksource: Switched to clocksource timebase
NET: Registered protocol family 2
tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
TCP established hash table entries: 8192 (order: 3, 32768 bytes)
TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
UDP hash table entries: 512 (order: 2, 16384 bytes)
UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
pci 0000:00:0f.0: enabling device (0014 -> 0016)
pci 0000:00:0f.1: enabling device (0014 -> 0016)
pci 0000:00:0f.2: enabling device (0014 -> 0016)
PCI: CLS 32 bytes, default 32
Thermal assist unit 
using timers, 
shrink_timer: 200 jiffies
Initialise system trusted keyrings
workingset: timestamp_bits=30 max_order=18 bucket_order=0
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Key type asymmetric registered
Asymmetric key parser 'x509' registered
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
io scheduler noop registered
io scheduler deadline registered (default)
io scheduler mq-deadline registered (default)
io scheduler kyber registered
atyfb 0000:00:12.0: enabling device (0086 -> 0087)
atyfb: using auxiliary register aperture
atyfb: 3D RAGE PRO (Mach64 GP, PQFP, PCI) [0x4750 rev 0x7c]
atyfb: 6M SGRAM (1:1), 14.31818 MHz XTAL, 230 MHz PLL, 100 Mhz MCLK, 100 MHz XCLK
Console: switching to colour frame buffer device 128x48
atyfb: fb0: ATY Mach64 frame buffer device on PCI
pmac_zilog: 0.6 (Benjamin Herrenschmidt <benh@kernel.crashing.org>)
Generic non-volatile memory driver v1.1
brd: module loaded
loop: module loaded
MacIO PCI driver attached to Heathrow chipset
swim3 0.00015000:swim3: [fd0] SWIM3 floppy controller 
0.00013020:ch-a: ttyS0 at MMIO 0xf3013020 (irq = 16, base_baud = 230400) is a Z85c30 ESCC - Serial port
0.00013000:ch-b: ttyS1 at MMIO 0xf3013000 (irq = 17, base_baud = 230400) is a Z85c30 ESCC - Serial port
Macintosh Cuda and Egret driver.
mesh: configured for synchronous 5 MB/s
random: fast init done
ADB keyboard at 2, handler 1
Detected ADB keyboard, type ANSI.
input: ADB keyboard as /devices/virtual/input/input0
mesh: performing initial bus reset...
ADB mouse at 3, handler set to 2
input: ADB mouse as /devices/virtual/input/input1
scsi host0: MESH
pata-macio 0.00020000:ide: Activating pata-macio chipset Heathrow ATA, Apple bus ID 0
scsi host1: pata_macio
ata1: PATA max MWDMA2 irq 28
ata1.00: ATA-7: Maxtor 6Y120P0, YAR41BW0, max UDMA/133
ata1.00: 240121728 sectors, multi 0: LBA 
scsi 1:0:0:0: Direct-Access     ATA      Maxtor 6Y120P0   1BW0 PQ: 0 ANSI: 5
sd 1:0:0:0: [sda] 240121728 512-byte logical blocks: (123 GB/114 GiB)
sd 1:0:0:0: Attached scsi generic sg0 type 0
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
pata-macio 0.00021000:ide: Activating pata-macio chipset Heathrow ATA, Apple bus ID 1
scsi host2: pata_macio
ata2: PATA max MWDMA2 irq 30
eth0: BMAC at 00:05:02:fd:98:9c

firewire_ohci 0000:00:0e.0: enabling device (0014 -> 0016)
ata2.00: ATAPI: IOMEGA  ZIP 100       ATAPI, 25.D, max PIO2, CDB intr
ata2.01: ATAPI: MATSHITADVD-ROM SR-8582, 0B8b, max MWDMA2
scsi 2:0:0:0: Direct-Access     IOMEGA   ZIP 100          25.D PQ: 0 ANSI: 5
firewire_ohci 0000:00:0e.0: added OHCI v1.0 device as card 0, 4 IR + 4 IT contexts, quirks 0x1
aoe: cannot create debugfs directory
aoe: AoE v85 initialised.
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
sd 2:0:0:0: Attached scsi generic sg1 type 0
ehci-pci 0000:00:0f.2: EHCI Host Controller
ehci-pci 0000:00:0f.2: new USB bus registered, assigned bus number 1
ehci-pci 0000:00:0f.2: irq 25, io mem 0x80800000
ehci-pci 0000:00:0f.2: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.18
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: EHCI Host Controller
usb usb1: Manufacturer: Linux 4.18.0-g5d852e5b3424 ehci_hcd
usb usb1: SerialNumber: 0000:00:0f.2
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 5 ports detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci-pci: OHCI PCI platform driver
ohci-pci 0000:00:0f.0: OHCI PCI host controller
ohci-pci 0000:00:0f.0: new USB bus registered, assigned bus number 2
sd 2:0:0:0: [sdb] Attached SCSI removable disk
ohci-pci 0000:00:0f.0: irq 25, io mem 0x80802000
scsi 2:0:1:0: CD-ROM            MATSHITA DVD-ROM SR-8582  0B8b PQ: 0 ANSI: 5
sr 2:0:1:0: [sr0] scsi3-mmc drive: 24x/24x cd/rw xa/form2 cdda tray
cdrom: Uniform CD-ROM driver Revision: 3.20
sr 2:0:1:0: Attached scsi CD-ROM sr0
sr 2:0:1:0: Attached scsi generic sg2 type 5
usb usb2: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 4.18
usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: OHCI PCI host controller
usb usb2: Manufacturer: Linux 4.18.0-g5d852e5b3424 ohci_hcd
usb usb2: SerialNumber: 0000:00:0f.0
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 3 ports detected
ohci-pci 0000:00:0f.1: OHCI PCI host controller
ohci-pci 0000:00:0f.1: new USB bus registered, assigned bus number 3
ohci-pci 0000:00:0f.1: irq 25, io mem 0x80801000
usb usb3: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 4.18
usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb3: Product: OHCI PCI host controller
usb usb3: Manufacturer: Linux 4.18.0-g5d852e5b3424 ohci_hcd
usb usb3: SerialNumber: 0000:00:0f.1
firewire_core 0000:00:0e.0: created device fw0: GUID 00d0f52008006aff, S400
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
usbcore: registered new interface driver uas
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice
rtc-generic rtc-generic: rtc core: registered rtc-generic as rtc0
i2c /dev entries driver
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
NET: Registered protocol family 17
drmem: No dynamic reconfiguration memory found
Loading compiled-in X.509 certificates
net firewire0: IP over IEEE 1394 on card 0000:00:0e.0
firewire_core 0000:00:0e.0: refreshed device fw0
 sda: [mac] sda1 sda2 sda3 sda4 sda5 sda6 sda7 sda8 sda9 sda10 sda11 sda12 sda13 sda14 sda15
sd 1:0:0:0: [sda] Attached SCSI disk
EXT4-fs (sda12): mounting ext3 file system using the ext4 subsystem
EXT4-fs (sda12): mounted filesystem with ordered data mode. Opts: (null)
VFS: Mounted root (ext3 filesystem) readonly on device 8:12.
Freeing unused kernel memory: 268K
This architecture does not have kernel memory protection.
Adding 3145724k swap on /dev/sda13.  Priority:-2 extents:1 across:3145724k 
EXT4-fs (sda12): re-mounted. Opts: (null)
random: crng init done
EXT4-fs (sda12): re-mounted. Opts: errors=remount-ro
EXT4-fs (sda14): mounting ext3 file system using the ext4 subsystem
EXT4-fs (sda14): mounted filesystem with ordered data mode. Opts: (null)
phy registers:
 0000 0000 0000 0000 0000 0000 0000 0000
 0000 0000 0000 0000 0000 0000 0000 0000
 0000 0000 0000 0000 0000 0000 0000 0000
 0000 0000 0000 0000 0000 0000 0000 0000
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).

^ permalink raw reply

* Re: [PATCH] i2c: Convert to using %pOFn instead of device_node.name
From: Rob Herring @ 2018-08-30  0:49 UTC (permalink / raw)
  To: Peter Rosin
  Cc: linux-kernel@vger.kernel.org, Benjamin Herrenschmidt,
	Paul Mackerras, Michael Ellerman, Linux I2C, linuxppc-dev
In-Reply-To: <d2736c07-d653-a855-401d-120b0650ae79@axentia.se>

On Wed, Aug 29, 2018 at 7:25 PM Peter Rosin <peda@axentia.se> wrote:
>
> On 2018-08-29 20:42, Rob Herring wrote:
> > On Wed, Aug 29, 2018 at 1:03 PM Peter Rosin <peda@axentia.se> wrote:
> >>
> >> On 2018-08-28 03:52, Rob Herring wrote:
> >>> In preparation to remove the node name pointer from struct device_node,
> >>> convert printf users to use the %pOFn format specifier.
> >>>
> >>> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> >>> Cc: Paul Mackerras <paulus@samba.org>
> >>> Cc: Michael Ellerman <mpe@ellerman.id.au>
> >>> Cc: Peter Rosin <peda@axentia.se>
> >>> Cc: linux-i2c@vger.kernel.org
> >>> Cc: linuxppc-dev@lists.ozlabs.org
> >>> Signed-off-by: Rob Herring <robh@kernel.org>
> >>> ---
> >>>  drivers/i2c/busses/i2c-powermac.c | 15 ++++++++-------
> >>>  drivers/i2c/muxes/i2c-mux-gpmux.c |  4 ++--
> >>>  2 files changed, 10 insertions(+), 9 deletions(-)
> >>>
> >>> diff --git a/drivers/i2c/busses/i2c-powermac.c b/drivers/i2c/busses/i2c-powermac.c
> >>> index f2a2067525ef..b706fd136ca5 100644
> >>> --- a/drivers/i2c/busses/i2c-powermac.c
> >>> +++ b/drivers/i2c/busses/i2c-powermac.c
> >>> @@ -390,7 +390,6 @@ static int i2c_powermac_probe(struct platform_device *dev)
> >>>       struct pmac_i2c_bus *bus = dev_get_platdata(&dev->dev);
> >>>       struct device_node *parent = NULL;
> >>
> >> Lose the initializer...
> >
> > That's pretty much unrelated though.
>
> I disagree. If you remove the need for the initializer, it's very much
> related to also remove the initializer.

You're right. I'd stared at it a bit and missed that in fact parent is
only accessed within the case statement.

Rob

^ permalink raw reply

* Re: v4.17 regression: PowerMac G3 won't boot, was Re: [PATCH v5 1/3] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()
From: Rob Herring @ 2018-08-30  1:05 UTC (permalink / raw)
  To: fthain
  Cc: Frank Rowand, userm57, Benjamin Herrenschmidt, Chintan Pandya,
	devicetree, linux-kernel@vger.kernel.org, linuxppc-dev
In-Reply-To: <alpine.LNX.2.21.1808301025480.73@nippy.intranet>

On Wed, Aug 29, 2018 at 7:44 PM Finn Thain <fthain@telegraphics.com.au> wrote:
>
> Hi Frank,
>
> Linux v4.17 and later will no longer boot on a G3 PowerMac. The boot hangs
> very early, before any video driver loads.
>
> Stan and I were able to bisect the regression between v4.16 and v4.17 and
> arrived at commit 0b3ce78e90fc ("of: cache phandle nodes to reduce cost of
> of_find_node_by_phandle()").
>
> I don't see any obvious bug in 0b3ce78e90fc or b9952b5218ad. But if you
> revert these from v4.18 (which is also affected) that certainly resolves
> the issue.

Perhaps a bad assumption on phandle values causing a problem. Can you
provide a dump of all the phandle or linux,phandle values from
/proc/device-tree.

Rob

^ permalink raw reply

* RE: [PATCH] soc: fsl/qe: Use of_get_child_by_name helper
From: Qiang Zhao @ 2018-08-30  2:47 UTC (permalink / raw)
  To: Rob Herring
  Cc: linux-kernel@vger.kernel.org, Leo Li,
	linuxppc-dev@lists.ozlabs.org,
	linux-arm-kernel@lists.infradead.org
In-Reply-To: <20180829200425.16435-1-robh@kernel.org>

From: Rob Herring <robh@kernel.org>
date: 2018/8/30 4:04

> To: Qiang Zhao <qiang.zhao@nxp.com>
> Cc: linux-kernel@vger.kernel.org; Leo Li <leoyang.li@nxp.com>;
> linuxppc-dev@lists.ozlabs.org; linux-arm-kernel@lists.infradead.org
> Subject: [PATCH] soc: fsl/qe: Use of_get_child_by_name helper
>=20
> Use the of_get_child_by_name() helper instead of open coding searching fo=
r the
> 'firmware' child node. This removes directly accessing the name pointer a=
s well.
>=20
> Cc: Qiang Zhao <qiang.zhao@nxp.com>
> Cc: Li Yang <leoyang.li@nxp.com>
> Cc: linuxppc-dev@lists.ozlabs.org
> Cc: linux-arm-kernel@lists.infradead.org
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  drivers/soc/fsl/qe/qe.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
>=20
> diff --git a/drivers/soc/fsl/qe/qe.c b/drivers/soc/fsl/qe/qe.c index
> 2ef6fc6487c1..612d9c551be5 100644
> --- a/drivers/soc/fsl/qe/qe.c
> +++ b/drivers/soc/fsl/qe/qe.c
> @@ -588,11 +588,7 @@ struct qe_firmware_info *qe_get_firmware_info(void)
>  	}
>=20
>  	/* Find the 'firmware' child node */
> -	for_each_child_of_node(qe, fw) {
> -		if (strcmp(fw->name, "firmware") =3D=3D 0)
> -			break;
> -	}
> -
> +	fw =3D of_get_child_by_name(qe, "firmware");
>  	of_node_put(qe);
>=20
>  	/* Did we find the 'firmware' node? */
> --

Acked-by: Qiang Zhao <qiang.zhao@nxp.com>

^ permalink raw reply

* [PATCH kernel 4/4] KVM: PPC: Propagate errors to the guest when failed instead of ignoring
From: Alexey Kardashevskiy @ 2018-08-30  3:16 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Alexey Kardashevskiy, David Gibson, kvm-ppc, Paul Mackerras
In-Reply-To: <20180830031647.34134-1-aik@ozlabs.ru>

At the moment if the PUT_TCE{_INDIRECT} handlers fail to update
the hardware tables, we print a warning once, clear the entry and
continue. This is so as at the time the assumption was that if
a VFIO device is hotplugged into the guest, and the userspace replays
virtual DMA mappings (i.e. TCEs) to the hardware tables and if this fails,
then there is nothing useful we can do about it.

However the assumption is not valid as these handlers are not called for
TCE replay (VFIO ioctl interface is used for that) and these handlers
are for new TCEs.

This returns an error to the guest if there is a request which cannot be
processed. By now the only possible failure must be H_TOO_HARD.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
 arch/powerpc/kvm/book3s_64_vio.c    | 20 ++++++--------------
 arch/powerpc/kvm/book3s_64_vio_hv.c | 20 ++++++--------------
 2 files changed, 12 insertions(+), 28 deletions(-)

diff --git a/arch/powerpc/kvm/book3s_64_vio.c b/arch/powerpc/kvm/book3s_64_vio.c
index 5cd2a66..5e3151b 100644
--- a/arch/powerpc/kvm/book3s_64_vio.c
+++ b/arch/powerpc/kvm/book3s_64_vio.c
@@ -568,14 +568,10 @@ long kvmppc_h_put_tce(struct kvm_vcpu *vcpu, unsigned long liobn,
 			ret = kvmppc_tce_iommu_map(vcpu->kvm, stt, stit->tbl,
 					entry, ua, dir);
 
-		if (ret == H_SUCCESS)
-			continue;
-
-		if (ret == H_TOO_HARD)
+		if (ret != H_SUCCESS) {
+			kvmppc_clear_tce(stit->tbl, entry);
 			goto unlock_exit;
-
-		WARN_ON_ONCE(1);
-		kvmppc_clear_tce(stit->tbl, entry);
+		}
 	}
 
 	kvmppc_tce_put(stt, entry, tce);
@@ -660,14 +656,10 @@ long kvmppc_h_put_tce_indirect(struct kvm_vcpu *vcpu,
 					stit->tbl, entry + i, ua,
 					iommu_tce_direction(tce));
 
-			if (ret == H_SUCCESS)
-				continue;
-
-			if (ret == H_TOO_HARD)
+			if (ret != H_SUCCESS) {
+				kvmppc_clear_tce(stit->tbl, entry);
 				goto unlock_exit;
-
-			WARN_ON_ONCE(1);
-			kvmppc_clear_tce(stit->tbl, entry);
+			}
 		}
 
 		kvmppc_tce_put(stt, entry + i, tce);
diff --git a/arch/powerpc/kvm/book3s_64_vio_hv.c b/arch/powerpc/kvm/book3s_64_vio_hv.c
index e79ffbb..8d82133 100644
--- a/arch/powerpc/kvm/book3s_64_vio_hv.c
+++ b/arch/powerpc/kvm/book3s_64_vio_hv.c
@@ -380,14 +380,10 @@ long kvmppc_rm_h_put_tce(struct kvm_vcpu *vcpu, unsigned long liobn,
 			ret = kvmppc_rm_tce_iommu_map(vcpu->kvm, stt,
 					stit->tbl, entry, ua, dir);
 
-		if (ret == H_SUCCESS)
-			continue;
-
-		if (ret == H_TOO_HARD)
+		if (ret != H_SUCCESS) {
+			kvmppc_rm_clear_tce(stit->tbl, entry);
 			return ret;
-
-		WARN_ON_ONCE_RM(1);
-		kvmppc_rm_clear_tce(stit->tbl, entry);
+		}
 	}
 
 	kvmppc_tce_put(stt, entry, tce);
@@ -533,14 +529,10 @@ long kvmppc_rm_h_put_tce_indirect(struct kvm_vcpu *vcpu,
 					stit->tbl, entry + i, ua,
 					iommu_tce_direction(tce));
 
-			if (ret == H_SUCCESS)
-				continue;
-
-			if (ret == H_TOO_HARD)
+			if (ret != H_SUCCESS) {
+				kvmppc_rm_clear_tce(stit->tbl, entry);
 				goto unlock_exit;
-
-			WARN_ON_ONCE_RM(1);
-			kvmppc_rm_clear_tce(stit->tbl, entry);
+			}
 		}
 
 		kvmppc_tce_put(stt, entry + i, tce);
-- 
2.11.0

^ permalink raw reply related


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