* [patch added to the 3.12 stable tree] locking/mutex: Disable optimistic spinning on some architectures
From: Jiri Slaby @ 2014-07-29 15:09 UTC (permalink / raw)
To: stable
Cc: Peter Zijlstra, Catalin Marinas, Will Deacon, James Bottomley,
Davidlohr Bueso, sparclinux, Jiri Slaby, Ingo Molnar,
Russell King, James E.J. Bottomley, Linus Torvalds, Paul McKenney,
James Hogan, Chris Metcalf, John David Anglin, linux-arm-kernel,
Jason Low, Waiman Long, Vineet Gupta, linux-kernel, linuxppc-dev,
David Miller
In-Reply-To: <1406646576-1299-1-git-send-email-jslaby@suse.cz>
From: Peter Zijlstra <peterz@infradead.org>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit 4badad352a6bb202ec68afa7a574c0bb961e5ebc upstream.
The optimistic spin code assumes regular stores and cmpxchg() play nice;
this is found to not be true for at least: parisc, sparc32, tile32,
metag-lock1, arc-!llsc and hexagon.
There is further wreckage, but this in particular seemed easy to
trigger, so blacklist this.
Opt in for known good archs.
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Reported-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: David Miller <davem@davemloft.net>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Cc: James Bottomley <James.Bottomley@hansenpartnership.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Jason Low <jason.low2@hp.com>
Cc: Waiman Long <waiman.long@hp.com>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>
Cc: John David Anglin <dave.anglin@bell.net>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Davidlohr Bueso <davidlohr@hp.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: sparclinux@vger.kernel.org
Link: http://lkml.kernel.org/r/20140606175316.GV13930@laptop.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
arch/arm/Kconfig | 1 +
arch/arm64/Kconfig | 1 +
arch/powerpc/Kconfig | 1 +
arch/sparc/Kconfig | 1 +
arch/x86/Kconfig | 1 +
kernel/Kconfig.locks | 5 ++++-
6 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index e47fcd1e9645..99e1ce978cf9 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -5,6 +5,7 @@ config ARM
select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
select ARCH_HAVE_CUSTOM_GPIO_H
+ select ARCH_SUPPORTS_ATOMIC_RMW
select ARCH_WANT_IPC_PARSE_VERSION
select BUILDTIME_EXTABLE_SORT if MMU
select CLONE_BACKWARDS
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index c04454876bcb..fe70eaea0e28 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -1,6 +1,7 @@
config ARM64
def_bool y
select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
+ select ARCH_SUPPORTS_ATOMIC_RMW
select ARCH_WANT_OPTIONAL_GPIOLIB
select ARCH_WANT_COMPAT_IPC_PARSE_VERSION
select ARCH_WANT_FRAME_POINTERS
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index d5d026b6d237..2e0ddfadc0b9 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -138,6 +138,7 @@ config PPC
select OLD_SIGSUSPEND
select OLD_SIGACTION if PPC32
select HAVE_DEBUG_STACKOVERFLOW
+ select ARCH_SUPPORTS_ATOMIC_RMW
config EARLY_PRINTK
bool
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index 4e5683877b93..d60f34dbae89 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -75,6 +75,7 @@ config SPARC64
select ARCH_HAVE_NMI_SAFE_CMPXCHG
select HAVE_C_RECORDMCOUNT
select NO_BOOTMEM
+ select ARCH_SUPPORTS_ATOMIC_RMW
config ARCH_DEFCONFIG
string
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index eb2dfa61eabe..9dc1a24d41b8 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -123,6 +123,7 @@ config X86
select COMPAT_OLD_SIGACTION if IA32_EMULATION
select RTC_LIB
select HAVE_DEBUG_STACKOVERFLOW
+ select ARCH_SUPPORTS_ATOMIC_RMW
config INSTRUCTION_DECODER
def_bool y
diff --git a/kernel/Kconfig.locks b/kernel/Kconfig.locks
index d2b32ac27a39..ecee67a00f5f 100644
--- a/kernel/Kconfig.locks
+++ b/kernel/Kconfig.locks
@@ -220,6 +220,9 @@ config INLINE_WRITE_UNLOCK_IRQRESTORE
endif
+config ARCH_SUPPORTS_ATOMIC_RMW
+ bool
+
config MUTEX_SPIN_ON_OWNER
def_bool y
- depends on SMP && !DEBUG_MUTEXES
+ depends on SMP && !DEBUG_MUTEXES && ARCH_SUPPORTS_ATOMIC_RMW
--
2.0.1
^ permalink raw reply related
* Re: [PATCH] powerpc/pci: reorder pci bus/bridge unregistration during PHB removal
From: Tyrel Datwyler @ 2014-07-29 17:54 UTC (permalink / raw)
To: Michael Ellerman; +Cc: nfont, linuxppc-dev, paulus
In-Reply-To: <1406598256.11977.1.camel@concordia>
On 07/28/2014 06:44 PM, Michael Ellerman wrote:
> On Mon, 2014-07-28 at 20:48 -0400, Tyrel Datwyler wrote:
>> Commit bcdde7e made __sysfs_remove_dir() recursive and introduced a BUG_ON
>> during PHB removal while attempting to delete the power managment attribute
>> group of the bus. This is a result of tearing the bridge and bus devices down
>> out of order in remove_phb_dynamic. Since, the the bus resides below the bridge
>> in the sysfs device tree it should be torn down first.
>>
>> This patch simply moves the device_unregister call for the PHB bridge device
>> after the device_unregister call for the PHB bus.
>>
>> Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
>
> That commit went into 3.13, so shouldn't this be CC to stable?
Darn it. Yes, it should.
>
> And also:
>
> Fixes: bcdde7e221a8 ("sysfs: make __sysfs_remove_dir() recursive")
>
> cheers
>
>
^ permalink raw reply
* Re: [PATCH v6 0/2] Add Freescale ASRC driver
From: Mark Brown @ 2014-07-29 18:23 UTC (permalink / raw)
To: Nicolin Chen
Cc: mark.rutland, devicetree, alsa-devel, b42378, timur, pawel.moll,
ijc+devicetree, tiwai, linux-kernel, rdunlap, b02247, lgirdwood,
perex, varkabhadram, robh+dt, galak, grant.likely, tklauser,
shawn.guo, linuxppc-dev
In-Reply-To: <cover.1406628283.git.nicoleotsuka@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 248 bytes --]
On Tue, Jul 29, 2014 at 06:08:51PM +0800, Nicolin Chen wrote:
> This series of patches add Freescale ASRC module driver support along
> with the extra request in imx-sdma structure required by SDMA Device
> to Device script.
Applied both, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply
* [PATCH] net/fsl: fix misspelled word
From: Shruti Kanetkar @ 2014-07-29 19:44 UTC (permalink / raw)
To: scottwood; +Cc: Shruti Kanetkar, linuxppc-dev, Madalin Bucur
From: Madalin Bucur <madalin.bucur@freescale.com>
Fix one misspelled word reported by codespell.
Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com>
Signed-off-by: Shruti Kanetkar <Shruti@freescale.com>
---
drivers/net/ethernet/freescale/xgmac_mdio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/xgmac_mdio.c b/drivers/net/ethernet/freescale/xgmac_mdio.c
index 0c9d55c..8173407 100644
--- a/drivers/net/ethernet/freescale/xgmac_mdio.c
+++ b/drivers/net/ethernet/freescale/xgmac_mdio.c
@@ -46,7 +46,7 @@ struct tgec_mdio_controller {
#define MDIO_DATA_BSY (1 << 31)
/*
- * Wait untill the MDIO bus is free
+ * Wait until the MDIO bus is free
*/
static int xgmac_wait_until_free(struct device *dev,
struct tgec_mdio_controller __iomem *regs)
--
1.8.3.1
^ permalink raw reply related
* Re: [PATCH] net/fsl: fix misspelled word
From: Scott Wood @ 2014-07-29 19:45 UTC (permalink / raw)
To: Shruti Kanetkar; +Cc: linuxppc-dev, Madalin Bucur
In-Reply-To: <1406663055-8700-1-git-send-email-Shruti@Freescale.com>
On Tue, 2014-07-29 at 14:44 -0500, Shruti Kanetkar wrote:
> From: Madalin Bucur <madalin.bucur@freescale.com>
>
> Fix one misspelled word reported by codespell.
>
> Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com>
> Signed-off-by: Shruti Kanetkar <Shruti@freescale.com>
> ---
> drivers/net/ethernet/freescale/xgmac_mdio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
netdev patches go to the netdev list and maintainer.
-Scott
^ permalink raw reply
* [PATCH] net/fsl: Add format length modifier to avoid negative values
From: Shruti Kanetkar @ 2014-07-29 19:45 UTC (permalink / raw)
To: scottwood; +Cc: Shruti Kanetkar, linuxppc-dev
Signed-off-by: Shruti Kanetkar <Shruti@Freescale.com>
---
drivers/net/ethernet/freescale/xgmac_mdio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/xgmac_mdio.c b/drivers/net/ethernet/freescale/xgmac_mdio.c
index 8173407..6e7db66 100644
--- a/drivers/net/ethernet/freescale/xgmac_mdio.c
+++ b/drivers/net/ethernet/freescale/xgmac_mdio.c
@@ -163,7 +163,7 @@ static int xgmac_mdio_read(struct mii_bus *bus, int phy_id, int regnum)
/* Return all Fs if nothing was there */
if (in_be32(®s->mdio_stat) & MDIO_STAT_RD_ER) {
dev_err(&bus->dev,
- "Error while reading PHY%d reg at %d.%d\n",
+ "Error while reading PHY%d reg at %d.%hhu\n",
phy_id, dev_addr, regnum);
return 0xffff;
}
--
1.8.3.1
^ permalink raw reply related
* Re: [PATCH v2 5/7] powerpc/corenet: Add MDIO bus muxing support to the board device tree(s)
From: Scott Wood @ 2014-07-29 19:58 UTC (permalink / raw)
To: Emil Medve; +Cc: linuxppc-dev
In-Reply-To: <loom.20140728T081519-636@post.gmane.org>
On Mon, 2014-07-28 at 06:51 +0000, Emil Medve wrote:
> Hello Scott,
>
>
> Scott Wood <scottwood <at> freescale.com> writes:
> > On Wed, 2014-07-16 at 15:17 -0500, Shruti Kanetkar wrote:
> > > + mdio <at> fd000 {
> > > + /* For 10g interfaces */
> > > + phy_xaui_slot1: xaui-phy <at> slot1 {
> > > + status = "disabled";
> > > + compatible = "ethernet-phy-ieee802.3-c45";
> > > + reg = <0x7>; /* default switch setting on slot1 of AMC2PEX */
> > > + };
> >
> > Why xaui-phy and not ethernet-phy?
> >
> > As for the device_type discussion from v1, there is a generic binding
> > that says device_type "should" be ethernet-phy.
>
> I have no strong feelings about this and we can use ethernet-phy, but:
>
> 1. The binding is old/stale (?) as it still uses device_type and the kernel
> doesn't seem to use anymore the device_type for PHY(s)
Yes.
> 2. The binding asks "ethernet-phy" for the device_type property, not for the
> name. As such TBI PHY(s) use (upstream) the tbi-phy@ node name
It shows ethernet-phy as the name in the example. ePAPR urges generic
node names (this was also a recommendation for IEEE1275), and has
ethernet-phy on the preferred list. Is a xaui-phy not an ethernet phy?
> > > + mdio0: mdio <at> fc000 {
> > > + };
> >
> > Why is the empty node needed?
>
> For the label
For mdio-parent-bus, or is there some other dts layer that makes this
node non-empty?
-Scott
^ permalink raw reply
* [PATCH] powerpc/pci: reorder pci bus/bridge unregistration during PHB removal
From: Tyrel Datwyler @ 2014-07-29 17:48 UTC (permalink / raw)
To: linuxppc-dev; +Cc: stable, paulus, Tyrel Datwyler, nfont
Commit bcdde7e made __sysfs_remove_dir() recursive and introduced a BUG_ON
during PHB removal while attempting to delete the power managment attribute
group of the bus. This is a result of tearing the bridge and bus devices down
out of order in remove_phb_dynamic. Since, the the bus resides below the bridge
in the sysfs device tree it should be torn down first.
This patch simply moves the device_unregister call for the PHB bridge device
after the device_unregister call for the PHB bus.
Fixes: bcdde7e221a8 ("sysfs: make __sysfs_remove_dir() recursive")
Cc: stable@vger.kernel.org
Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
---
v2:
- Included stable kernel list on Cc per comment by mpe
arch/powerpc/platforms/pseries/pci_dlpar.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/pci_dlpar.c b/arch/powerpc/platforms/pseries/pci_dlpar.c
index 203cbf0..89e2381 100644
--- a/arch/powerpc/platforms/pseries/pci_dlpar.c
+++ b/arch/powerpc/platforms/pseries/pci_dlpar.c
@@ -118,10 +118,10 @@ int remove_phb_dynamic(struct pci_controller *phb)
}
}
- /* Unregister the bridge device from sysfs and remove the PCI bus */
- device_unregister(b->bridge);
+ /* Remove the PCI bus and unregister the bridge device from sysfs */
phb->bus = NULL;
pci_remove_bus(b);
+ device_unregister(b->bridge);
/* Now release the IO resource */
if (res->flags & IORESOURCE_IO)
--
1.7.12.4
^ permalink raw reply related
* Re: qe: move qe from arch/powerpc to drivers
From: Scott Wood @ 2014-07-30 0:19 UTC (permalink / raw)
To: Zhao Qiang; +Cc: B07421, R63061, linuxppc-dev
In-Reply-To: <1403580712-30153-1-git-send-email-B45475@freescale.com>
On Tue, Jun 24, 2014 at 11:31:52AM +0800, Zhao Qiang wrote:
> ls1 has qe and ls1 has arm cpu.
> move qe from arch/powerpc to drivers.
>
> Signed-off-by: Zhao Qiang <B45475@freescale.com>
This is a very terse changelog. Explain more about what QE is, and what
this patch accomplishes (it doesn't seem to get rid of the PPC
dependency, just moving code at this stage)
I don't see a MAINTAINERS update for the new path. Who is going to
maintain it?
I don't think drivers/qe is the right place for it. Directories directly
under drivers/ tend to be for classes of devices, not instances. In any
case, LKML should be CCed when creating a new directory directly under
drivers/ or under a subdirectory of drivers/ that doesn't have its own
mailing list.
This came up before, without a resolution. See:
http://www.spinics.net/lists/kernel/msg1621335.html
> diff --git a/arch/powerpc/platforms/83xx/km83xx.c b/arch/powerpc/platforms/83xx/km83xx.c
> index bf4c447..22c0d6d 100644
> --- a/arch/powerpc/platforms/83xx/km83xx.c
> +++ b/arch/powerpc/platforms/83xx/km83xx.c
> @@ -37,8 +37,8 @@
> #include <asm/udbg.h>
> #include <sysdev/fsl_soc.h>
> #include <sysdev/fsl_pci.h>
> -#include <asm/qe.h>
> -#include <asm/qe_ic.h>
> +#include <linux/qe.h>
> +#include <linux/qe_ic.h>
If you're moving it out of asm/ please give it an fsl prefix.
> diff --git a/drivers/qe/Kconfig b/drivers/qe/Kconfig
> new file mode 100644
> index 0000000..dc16e9a
> --- /dev/null
> +++ b/drivers/qe/Kconfig
> @@ -0,0 +1,35 @@
> +#
> +# QE Communication options
> +#
> +menuconfig QUICC_ENGINE
> + bool "Freescale QUICC Engine (QE) Support"
> + depends on FSL_SOC && PPC32
> + select PPC_LIB_RHEAP
> + select CRC32
> + help
> + The QUICC Engine (QE) is a new generation of communications
> + coprocessors on Freescale embedded CPUs (akin to CPM in older chips).
> + Selecting this option means that you wish to build a kernel
> + for a machine with a QE coprocessor.
> +
> +if QUICC_ENGINE
> +
> +config UCC_SLOW
> + bool
> + default y if SERIAL_QE
> + help
> + This option provides qe_lib support to UCC slow
> + protocols: UART, BISYNC, QMC
> +
> +config UCC_FAST
> + bool
> + default y if UCC_GETH
> + help
> + This option provides qe_lib support to UCC fast
> + protocols: HDLC, Ethernet, ATM, transparent
> +
> +config UCC
> + bool
> + default y if UCC_FAST || UCC_SLOW
> +
> +endif
These config options could use better namespacing.
-Scott
^ permalink raw reply
* [PATCH v7] flexcan: add err_irq handler for flexcan
From: Zhao Qiang @ 2014-07-30 2:17 UTC (permalink / raw)
To: linuxppc-dev, wg, mkl, linux-can, B07421; +Cc: Zhao Qiang
when flexcan is not physically linked, command 'cantest' will
trigger an err_irq, add err_irq handler for it.
Signed-off-by: Zhao Qiang <B45475@freescale.com>
---
Changes for v2:
- use a space instead of tab
- use flexcan_poll_state instead of print
Changes for v3:
- return IRQ_HANDLED if err is triggered
- stop transmitted packets when there is an err_interrupt
Changes for v4:
- call flexcan_irq
Changes for v5:
- move err_int_handling code from flexcan_irq to flexcan_err_irq
- call flexcan_err_irq from flexcan_irq
Changes for v6:
- move RX_IRQ handling back to flexcan_irq
Changes for v7:
- seperate err_irq_handling code from rx_irq_handling code and move it to err_irq_handler.
drivers/net/can/flexcan.c | 73 ++++++++++++++++++++++++++++++++++++-----------
1 file changed, 57 insertions(+), 16 deletions(-)
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index f425ec2..12385f8 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -208,6 +208,7 @@ struct flexcan_priv {
void __iomem *base;
u32 reg_esr;
u32 reg_ctrl_default;
+ int err_irq;
struct clk *clk_ipg;
struct clk *clk_per;
@@ -690,6 +691,38 @@ static int flexcan_poll(struct napi_struct *napi, int quota)
return work_done;
}
+static irqreturn_t flexcan_err_irq(int irq, void *dev_id)
+{
+ struct net_device *dev = dev_id;
+ struct flexcan_priv *priv = netdev_priv(dev);
+ struct flexcan_regs __iomem *regs = priv->base;
+ u32 reg_ctrl, reg_esr;
+ irqreturn_t ret = IRQ_NONE;
+
+ reg_esr = flexcan_read(®s->esr);
+ reg_ctrl = flexcan_read(®s->ctrl);
+
+ if (reg_esr & FLEXCAN_ESR_ALL_INT) {
+ flexcan_write(reg_esr & FLEXCAN_ESR_ALL_INT, ®s->esr);
+ ret = IRQ_HANDLED;
+ }
+
+ if (reg_esr & FLEXCAN_ESR_ERR_INT)
+ flexcan_write(reg_ctrl & ~FLEXCAN_CTRL_ERR_MSK, ®s->ctrl);
+
+ if ((reg_esr & FLEXCAN_ESR_ERR_STATE) ||
+ flexcan_has_and_handle_berr(priv, reg_esr)) {
+ /* The error bits are cleared on read,
+ * save them for later use.
+ */
+ priv->reg_esr = reg_esr & FLEXCAN_ESR_ERR_BUS;
+ flexcan_write(priv->reg_ctrl_default & ~FLEXCAN_CTRL_ERR_ALL,
+ ®s->ctrl);
+ napi_schedule(&priv->napi);
+ }
+ return ret;
+}
+
static irqreturn_t flexcan_irq(int irq, void *dev_id)
{
struct net_device *dev = dev_id;
@@ -698,11 +731,10 @@ static irqreturn_t flexcan_irq(int irq, void *dev_id)
struct flexcan_regs __iomem *regs = priv->base;
u32 reg_iflag1, reg_esr;
- reg_iflag1 = flexcan_read(®s->iflag1);
reg_esr = flexcan_read(®s->esr);
- /* ACK all bus error and state change IRQ sources */
- if (reg_esr & FLEXCAN_ESR_ALL_INT)
- flexcan_write(reg_esr & FLEXCAN_ESR_ALL_INT, ®s->esr);
+ reg_iflag1 = flexcan_read(®s->iflag1);
+
+ flexcan_err_irq(irq, dev);
/*
* schedule NAPI in case of:
@@ -710,18 +742,9 @@ static irqreturn_t flexcan_irq(int irq, void *dev_id)
* - state change IRQ
* - bus error IRQ and bus error reporting is activated
*/
- if ((reg_iflag1 & FLEXCAN_IFLAG_RX_FIFO_AVAILABLE) ||
- (reg_esr & FLEXCAN_ESR_ERR_STATE) ||
- flexcan_has_and_handle_berr(priv, reg_esr)) {
- /*
- * The error bits are cleared on read,
- * save them for later use.
- */
- priv->reg_esr = reg_esr & FLEXCAN_ESR_ERR_BUS;
+ if (reg_iflag1 & FLEXCAN_IFLAG_RX_FIFO_AVAILABLE) {
flexcan_write(FLEXCAN_IFLAG_DEFAULT &
~FLEXCAN_IFLAG_RX_FIFO_AVAILABLE, ®s->imask1);
- flexcan_write(priv->reg_ctrl_default & ~FLEXCAN_CTRL_ERR_ALL,
- ®s->ctrl);
napi_schedule(&priv->napi);
}
@@ -944,10 +967,17 @@ static int flexcan_open(struct net_device *dev)
if (err)
goto out_close;
+ if (priv->err_irq) {
+ err = request_irq(priv->err_irq, flexcan_err_irq, IRQF_SHARED,
+ dev->name, dev);
+ if (err)
+ goto out_free_irq;
+ }
+
/* start chip and queuing */
err = flexcan_chip_start(dev);
if (err)
- goto out_free_irq;
+ goto out_free_err_irq;
can_led_event(dev, CAN_LED_EVENT_OPEN);
@@ -956,6 +986,9 @@ static int flexcan_open(struct net_device *dev)
return 0;
+ out_free_err_irq:
+ if (priv->err_irq)
+ free_irq(priv->err_irq, dev);
out_free_irq:
free_irq(dev->irq, dev);
out_close:
@@ -977,6 +1010,9 @@ static int flexcan_close(struct net_device *dev)
flexcan_chip_stop(dev);
free_irq(dev->irq, dev);
+ if (priv->err_irq)
+ free_irq(priv->err_irq, dev);
+
clk_disable_unprepare(priv->clk_per);
clk_disable_unprepare(priv->clk_ipg);
@@ -1099,7 +1135,7 @@ static int flexcan_probe(struct platform_device *pdev)
struct resource *mem;
struct clk *clk_ipg = NULL, *clk_per = NULL;
void __iomem *base;
- int err, irq;
+ int err, irq, err_irq;
u32 clock_freq = 0;
if (pdev->dev.of_node)
@@ -1126,6 +1162,10 @@ static int flexcan_probe(struct platform_device *pdev)
if (irq <= 0)
return -ENODEV;
+ err_irq = platform_get_irq(pdev, 1);
+ if (err_irq <= 0)
+ err_irq = 0;
+
base = devm_ioremap_resource(&pdev->dev, mem);
if (IS_ERR(base))
return PTR_ERR(base);
@@ -1149,6 +1189,7 @@ static int flexcan_probe(struct platform_device *pdev)
dev->flags |= IFF_ECHO;
priv = netdev_priv(dev);
+ priv->err_irq = err_irq;
priv->can.clock.freq = clock_freq;
priv->can.bittiming_const = &flexcan_bittiming_const;
priv->can.do_set_mode = flexcan_set_mode;
--
1.8.5
^ permalink raw reply related
* [PATCH 0/4] ASoC: fsl: Add stream names to CPU DAI drivers for DPCM
From: Nicolin Chen @ 2014-07-30 3:10 UTC (permalink / raw)
To: broonie
Cc: alsa-devel, lgirdwood, tiwai, b42378, b02247, linux-kernel, timur,
Li.Xiubo, perex, linuxppc-dev
DPCM needs extra dapm routes in the machine driver to route audio
between Front-End and Back-End. In order to differ the stream names
in the route map from CODECs, we here add specific stream names to
all Freescale ASoC CPU DAI drivers so that we can implement ASRC via
DPCM to each of them.
Document for DPCM: ./Documentation/sound/alsa/soc/DPCM.txt
Nicolin Chen (4):
ASoC: fsl_esai: Add stream names for DPCM usage
ASoC: fsl_sai: Add stream names for DPCM usage
ASoC: fsl_spdif: Add stream names for DPCM usage
ASoC: fsl_ssi: Add stream names for DPCM usage
sound/soc/fsl/fsl_esai.c | 2 ++
sound/soc/fsl/fsl_sai.c | 2 ++
sound/soc/fsl/fsl_spdif.c | 2 ++
sound/soc/fsl/fsl_ssi.c | 2 ++
4 files changed, 8 insertions(+)
--
1.8.4
^ permalink raw reply
* [PATCH 1/4] ASoC: fsl_esai: Add stream names for DPCM usage
From: Nicolin Chen @ 2014-07-30 3:10 UTC (permalink / raw)
To: broonie
Cc: alsa-devel, lgirdwood, tiwai, b42378, b02247, linux-kernel, timur,
Li.Xiubo, perex, linuxppc-dev
In-Reply-To: <cover.1406688048.git.nicoleotsuka@gmail.com>
DPCM needs extra dapm routes in the machine driver to route audio
between Front-End and Back-End. In order to differ the stream names
in the route map from CODECs, we here add specific stream names to
ESAI driver so that we can implement ASRC via DPCM to it.
Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
---
sound/soc/fsl/fsl_esai.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c
index d719caf..72d154e 100644
--- a/sound/soc/fsl/fsl_esai.c
+++ b/sound/soc/fsl/fsl_esai.c
@@ -624,12 +624,14 @@ static int fsl_esai_dai_probe(struct snd_soc_dai *dai)
static struct snd_soc_dai_driver fsl_esai_dai = {
.probe = fsl_esai_dai_probe,
.playback = {
+ .stream_name = "CPU-Playback",
.channels_min = 1,
.channels_max = 12,
.rates = FSL_ESAI_RATES,
.formats = FSL_ESAI_FORMATS,
},
.capture = {
+ .stream_name = "CPU-Capture",
.channels_min = 1,
.channels_max = 8,
.rates = FSL_ESAI_RATES,
--
1.8.4
^ permalink raw reply related
* [PATCH 2/4] ASoC: fsl_sai: Add stream names for DPCM usage
From: Nicolin Chen @ 2014-07-30 3:10 UTC (permalink / raw)
To: broonie
Cc: alsa-devel, lgirdwood, tiwai, b42378, b02247, linux-kernel, timur,
Li.Xiubo, perex, linuxppc-dev
In-Reply-To: <cover.1406688048.git.nicoleotsuka@gmail.com>
DPCM needs extra dapm routes in the machine driver to route audio
between Front-End and Back-End. In order to differ the stream names
in the route map from CODECs, we here add specific stream names to
SAI driver so that we can implement ASRC via DPCM to it.
Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
---
sound/soc/fsl/fsl_sai.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index 364410b..faa0497 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -455,12 +455,14 @@ static int fsl_sai_dai_probe(struct snd_soc_dai *cpu_dai)
static struct snd_soc_dai_driver fsl_sai_dai = {
.probe = fsl_sai_dai_probe,
.playback = {
+ .stream_name = "CPU-Playback",
.channels_min = 1,
.channels_max = 2,
.rates = SNDRV_PCM_RATE_8000_96000,
.formats = FSL_SAI_FORMATS,
},
.capture = {
+ .stream_name = "CPU-Capture",
.channels_min = 1,
.channels_max = 2,
.rates = SNDRV_PCM_RATE_8000_96000,
--
1.8.4
^ permalink raw reply related
* [PATCH 3/4] ASoC: fsl_spdif: Add stream names for DPCM usage
From: Nicolin Chen @ 2014-07-30 3:10 UTC (permalink / raw)
To: broonie
Cc: alsa-devel, lgirdwood, tiwai, b42378, b02247, linux-kernel, timur,
Li.Xiubo, perex, linuxppc-dev
In-Reply-To: <cover.1406688048.git.nicoleotsuka@gmail.com>
DPCM needs extra dapm routes in the machine driver to route audio
between Front-End and Back-End. In order to differ the stream names
in the route map from CODECs, we here add specific stream names to
SPDIF driver so that we can implement ASRC via DPCM to it.
Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
---
sound/soc/fsl/fsl_spdif.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c
index 495b9f3..70acfe4 100644
--- a/sound/soc/fsl/fsl_spdif.c
+++ b/sound/soc/fsl/fsl_spdif.c
@@ -975,12 +975,14 @@ static int fsl_spdif_dai_probe(struct snd_soc_dai *dai)
static struct snd_soc_dai_driver fsl_spdif_dai = {
.probe = &fsl_spdif_dai_probe,
.playback = {
+ .stream_name = "CPU-Playback",
.channels_min = 2,
.channels_max = 2,
.rates = FSL_SPDIF_RATES_PLAYBACK,
.formats = FSL_SPDIF_FORMATS_PLAYBACK,
},
.capture = {
+ .stream_name = "CPU-Capture",
.channels_min = 2,
.channels_max = 2,
.rates = FSL_SPDIF_RATES_CAPTURE,
--
1.8.4
^ permalink raw reply related
* [PATCH 4/4] ASoC: fsl_ssi: Add stream names for DPCM usage
From: Nicolin Chen @ 2014-07-30 3:10 UTC (permalink / raw)
To: broonie
Cc: alsa-devel, lgirdwood, tiwai, b42378, b02247, linux-kernel, timur,
Li.Xiubo, perex, linuxppc-dev
In-Reply-To: <cover.1406688048.git.nicoleotsuka@gmail.com>
DPCM needs extra dapm routes in the machine driver to route audio
between Front-End and Back-End. In order to differ the stream names
in the route map from CODECs, we here add specific stream names to
SSI driver so that we can implement ASRC via DPCM to it.
Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
---
sound/soc/fsl/fsl_ssi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 3043d57..87eb577 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -1032,12 +1032,14 @@ static const struct snd_soc_dai_ops fsl_ssi_dai_ops = {
static struct snd_soc_dai_driver fsl_ssi_dai_template = {
.probe = fsl_ssi_dai_probe,
.playback = {
+ .stream_name = "CPU-Playback",
.channels_min = 1,
.channels_max = 2,
.rates = FSLSSI_I2S_RATES,
.formats = FSLSSI_I2S_FORMATS,
},
.capture = {
+ .stream_name = "CPU-Capture",
.channels_min = 1,
.channels_max = 2,
.rates = FSLSSI_I2S_RATES,
--
1.8.4
^ permalink raw reply related
* scheduler crash on Power
From: Sukadev Bhattiprolu @ 2014-07-30 7:22 UTC (permalink / raw)
To: peterz, bruno, jwboyer; +Cc: linuxppc-dev, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 7435 bytes --]
I am getting this crash on a Powerpc system using 3.16.0-rc7 kernel plus
some patches related to perf (24x7 counters) that Cody Schafer posted here:
https://lkml.org/lkml/2014/5/27/768
I don't get the crash on an unpatched kernel though.
I have been staring at the perf event patches, but can't find anything
impacting the scheduler. Besides the patches had worked on 3.16.0-rc2
kernel on a different Power system.
The crash occurs on an idle system, a minute or two after booting to
runlevel 3.
kernel/sched/core.c:
---
5877 static void init_sched_groups_capacity(int cpu, struct sched_domain *sd)
5878 {
5879 struct sched_group *sg = sd->groups;
5880
5881 WARN_ON(!sg);
5882
5883 do {
5884 sg->group_weight = cpumask_weight(sched_group_cpus(sg));
---
I tried applying the patch discussed in https://lkml.org/lkml/2014/7/16/386
but doesn't seem to help.
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index bc1638b..50702a8 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5842,6 +5842,8 @@ build_sched_groups(struct sched_domain *sd, int cpu)
continue;
group = get_group(i, sdd, &sg);
+ cpumask_clear(sched_group_cpus(sg));
+ sg->sgc->capacity = 0;
cpumask_setall(sched_group_mask(sg));
for_each_cpu(j, span) {
I am also attaching the debug messages that Peterz added
here: https://lkml.org/lkml/2014/7/17/288
Appreciate any debug suggestions.
Sukadev
----
Red Hat Enterprise Linux Server 7.0 (Maipo)
Kernel 3.16.0-rc7-24x7+ on an ppc64
ltcbrazos2-lp07 login:
Red Hat Enterprise Linux Server 7.0 (Maipo)
Kernel 3.16.0-rc7-24x7+ on an ppc64
ltcbrazos2-lp07 login: [ 181.915974] ------------[ cut here ]------------
[ 181.915991] WARNING: at ../kernel/sched/core.c:5881
[ 181.915994] Modules linked in: sg cfg80211 rfkill nx_crypto ibmveth pseries_rng xfs libcrc32c sd_mod crc_t10dif crct10dif_common ibmvscsi scsi_transport_srp scsi_tgt dm_mirror dm_region_hash dm_log dm_mod
[ 181.916024] CPU: 4 PID: 1087 Comm: kworker/4:2 Not tainted 3.16.0-rc7-24x7+ #15
[ 181.916034] Workqueue: events .topology_work_fn
[ 181.916038] task: c0000000dbd40000 ti: c0000000da400000 task.ti: c0000000da400000
[ 181.916043] NIP: c0000000000d7528 LR: c0000000000d7578 CTR: 0000000000000000
[ 181.916047] REGS: c0000000da403580 TRAP: 0700 Not tainted (3.16.0-rc7-24x7+)
[ 181.916051] MSR: 8000000100029032 <SF,EE,ME,IR,DR,RI> CR: 28484c24 XER: 00000000
[ 181.916063] CFAR: c0000000000d74f4 SOFTE: 1
GPR00: c0000000000d7578 c0000000da403800 c000000000eaa7f0 0000000000000800
GPR04: 0000000000000800 0000000000000800 0000000000000000 c0000000009cf878
GPR08: c0000000009cf880 0000000000000001 0000000000000010 0000000000000000
GPR12: 0000000000000000 c00000000ebe1200 0000000000000800 c0000000cc2f0000
GPR16: c000000000ef0a68 0000000000000078 c0000000e5000000 0000000000000078
GPR20: 0000000000000000 0000000000000001 c0000000cc2f0000 0000000000000001
GPR24: c000000000db4402 000000000000000f 0000000000000000 c0000000dea39300
GPR28: c000000000ef0ae0 c0000000e5440000 0000000000000000 c000000000ef4f7c
[ 181.916146] NIP [c0000000000d7528] .build_sched_domains+0xc28/0xd90
[ 181.916151] LR [c0000000000d7578] .build_sched_domains+0xc78/0xd90
[ 181.916155] Call Trace:
[ 181.916159] [c0000000da403800] [c0000000000d7578] .build_sched_domains+0xc78/0xd90 (unreliable)
[ 181.916166] [c0000000da403950] [c0000000000d7950] .partition_sched_domains+0x260/0x3f0
[ 181.916175] [c0000000da403a30] [c000000000141704] .rebuild_sched_domains_locked+0x54/0x70
[ 181.916182] [c0000000da403ab0] [c000000000143a98] .rebuild_sched_domains+0x28/0x50
[ 181.916188] [c0000000da403b30] [c00000000004f250] .topology_work_fn+0x10/0x30
[ 181.916194] [c0000000da403ba0] [c0000000000b7100] .process_one_work+0x1a0/0x4c0
[ 181.916199] [c0000000da403c40] [c0000000000b7970] .worker_thread+0x180/0x630
[ 181.916205] [c0000000da403d30] [c0000000000bfc88] .kthread+0x108/0x130
[ 181.916214] [c0000000da403e30] [c00000000000a3e4] .ret_from_kernel_thread+0x58/0x74
[ 181.916220] Instruction dump:
[ 181.916223] 7f47492a e93c0000 e90a0010 7d0a4378 7d4a482a 814a0000 2f8a0000 419e0008
[ 181.916235] 7f48492a ebdd0010 7fc90074 7929d182 <0b090000> 48000014 60000000 60000000
[ 181.916245] ---[ end trace 6e9d20016598c36c ]---
[ 181.916253] Unable to handle kernel paging request for data at address 0x00000018
[ 181.916257] Faulting instruction address: 0xc00000000039d1c0
[ 181.916263] Oops: Kernel access of bad area, sig: 11 [#1]
[ 181.916267] SMP NR_CPUS=2048 NUMA pSeries
[ 181.916271] Modules linked in: sg cfg80211 rfkill nx_crypto ibmveth pseries_rng xfs libcrc32c sd_mod crc_t10dif crct10dif_common ibmvscsi scsi_transport_srp scsi_tgt dm_mirror dm_region_hash dm_log dm_mod
[ 181.916293] CPU: 4 PID: 1087 Comm: kworker/4:2 Tainted: G W 3.16.0-rc7-24x7+ #15
[ 181.916299] Workqueue: events .topology_work_fn
[ 181.916303] task: c0000000dbd40000 ti: c0000000da400000 task.ti: c0000000da400000
[ 181.916309] NIP: c00000000039d1c0 LR: c0000000000d754c CTR: 0000000000000000
[ 181.916313] REGS: c0000000da4034d0 TRAP: 0300 Tainted: G W (3.16.0-rc7-24x7+)
[ 181.916317] MSR: 8000000100009032 <SF,EE,ME,IR,DR,RI> CR: 28484c24 XER: 00000000
[ 181.916327] CFAR: c000000000009358 DAR: 0000000000000018 DSISR: 40000000 SOFTE: 1
GPR00: c0000000000d754c c0000000da403750 c000000000eaa7f0 0000000000000018
GPR04: 0000000000000800 0000000000000800 0000000000000000 c0000000009cf878
GPR08: c0000000009cf880 0000000000000001 0000000000000010 0000000000000000
GPR12: 0000000000000000 c00000000ebe1200 0000000000000800 c0000000cc2f0000
GPR16: c000000000ef0a68 0000000000000078 c0000000e5000000 0000000000000078
GPR20: 0000000000000000 0000000000000001 c0000000cc2f0000 0000000000000001
GPR24: c000000000db4402 0000000000000020 0000000000000018 0000000000000800
GPR28: 0000000000000020 0000000000000110 0000000000000000 0000000000000010
[ 181.916406] NIP [c00000000039d1c0] .__bitmap_weight+0x70/0x100
[ 181.916411] LR [c0000000000d754c] .build_sched_domains+0xc4c/0xd90
[ 181.916415] Call Trace:
[ 181.916418] [c0000000da403750] [c0000000da403800] 0xc0000000da403800 (unreliable)
[ 181.916424] [c0000000da403800] [c0000000000d754c] .build_sched_domains+0xc4c/0xd90
[ 181.916430] [c0000000da403950] [c0000000000d7950] .partition_sched_domains+0x260/0x3f0
[ 181.916436] [c0000000da403a30] [c000000000141704] .rebuild_sched_domains_locked+0x54/0x70
[ 181.916442] [c0000000da403ab0] [c000000000143a98] .rebuild_sched_domains+0x28/0x50
[ 181.916448] [c0000000da403b30] [c00000000004f250] .topology_work_fn+0x10/0x30
[ 181.916453] [c0000000da403ba0] [c0000000000b7100] .process_one_work+0x1a0/0x4c0
[ 181.916458] [c0000000da403c40] [c0000000000b7970] .worker_thread+0x180/0x630
[ 181.916463] [c0000000da403d30] [c0000000000bfc88] .kthread+0x108/0x130
[ 181.916468] [c0000000da403e30] [c00000000000a3e4] .ret_from_kernel_thread+0x58/0x74
[ 181.916472] Instruction dump:
[ 181.916475] 409d00b4 3bbcffff 3be3fff8 7bbd1f48 3bc00000 7fa3ea14 48000018 60000000
[ 181.916484] 60000000 60000000 60000000 60420000 <e87f0009> 4bcb74e9 60000000 7fbfe840
[ 181.916493] ---[ end trace 6e9d20016598c36d ]---
[ 181.924408]
[ 183.931081] Kernel panic - not syncing: Fatal exception
[ 183.954314] Rebooting in 10 seconds..
[-- Attachment #2: debug.dmsg --]
[-- Type: text/plain, Size: 48866 bytes --]
Red Hat Enterprise Linux Server 7.0 (Maipo)
Kernel 3.16.0-rc7 on an ppc64
ltcbrazos2-lp07 login: [ OK ] Started Show Plymouth Reboot Screen.
[ OK ] Stopped Postfix Mail Transport Agent.
[ OK ] Stopped target Network.
Stopping LSB: Bring up/down networking...
[ OK ] Stopped LSB: Bring up/down networking.
Stopping Network Manager...
[ OK ] Stopped Network Manager.
[ OK ] Stopped target Basic System.
[ OK ] Stopped target Slices.
[ OK ] Removed slice User and Session Slice.
[ OK ] Stopped target Paths.
[ OK ] Stopped target Timers.
[ OK ] Stopped target Sockets.
[ OK ] Closed Avahi mDNS/DNS-SD Stack Activation Socket.
[ OK ] Closed D-Bus System Message Bus Socket.
[ OK ] Stopped target System Initialization.
Stopping Setup Virtual Console...
[ OK ] Stopped Setup Virtual Console.
[ OK ] Stopped target Encrypted Volumes.
Stopping Load/Save Random Seed...
Stopping Apply Kernel Variables...
[ OK ] Stopped Apply Kernel Variables.
Stopping Update UTMP about System Reboot/Shutdown...
[ OK ] Stopped target Swap.
Deactivating swap /dev/dm-1...
Deactivating swap /dev/dm-1...
Deactivating swap /dev/dm-1...
Deactivating swap /dev/dm-1...
Deactivating swap /dev/dm-1...
Deactivating swap /dev/dm-1...
[ OK ] Stopped Load/Save Random Seed.
[ OK ] Stopped Update UTMP about System Reboot/Shutdown.
Stopping Security Auditing Service...
Stopping Create Volatile Files and Directories...
[ OK ] Stopped Create Volatile Files and Directories.
Stopping Import network configuration from initramfs...
[ OK ] Stopped Import network configuration from initramfs.
[ OK ] Deactivated swap /dev/rhel_ltcbrazos2-lp07/swap.
[ OK ] Deactivated swap /dev/disk/by-uuid/a943c471-4382-480...e-9782b5d3d2ab.
[ OK ] Deactivated swap /dev/disk/by-id/dm-uuid-LVM-p1mvXnt...NIVU5f85SS81no.
[ OK ] Deactivated swap /dev/disk/by-id/dm-name-rhel_ltcbrazos2--lp07-swap.
[ OK ] Deactivated swap /dev/mapper/rhel_ltcbrazos2--lp07-swap.
[ OK ] Deactivated swap /dev/dm-1.
[ 2433.045467] audit: type=1305 audit(1406703087.290:102): audit_pid=0 old=1093 auid=4294967295 ses=4294967295 res=1
[ OK ] Stopped Security Auditing Service.
[ 2433.046079] audit: type=1131 audit(1406703087.290:103): pid=1 uid=0 auid=4294967295 ses=4294967295 msg=' comm="auditd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ OK ] Stopped target Local File Systems.
Unmounting /boot...
Stopping Configure read-only root support...
[ OK ] Stopped Configure read-only root support.
[ 2433.046851] audit: type=1131 audit(1406703087.290:104): pid=1 uid=0 auid=4294967295 ses=4294967295 msg=' comm="rhel-readonly" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Stopping Monitoring of LVM2 mirrors, snapshots etc. ...ress polling...
[ 2433.108826] audit: type=1131 audit(1406703087.350:105): pid=1 uid=0 auid=4294967295 ses=4294967295 msg=' comm="lvm2-monitor" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ OK ] Stopped Monitoring of LVM2 mirrors, snapshots etc. u...ogress polling.
Stopping LVM2 metadata daemon...
[ 2433.109666] audit: type=1131 audit(1406703087.350:106): pid=1 uid=0 auid=4294967295 ses=4294967295 msg=' comm="lvm2-lvmetad" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ OK ] Stopped LVM2 metadata daemon.
[ 2433.120492] audit: type=1131 audit(1406703087.360:107): pid=1 uid=0 auid=4294967295 ses=4294967295 msg=' comm="systemd-remount-fs" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 2433.120583] audit: type=1131 audit(1406703087.360:108): pid=1 uid=0 auid=4294967295 ses=4294967295 msg=' comm="systemd-readahead-replay" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 2433.120671] audit: type=1131 audit(1406703087.360:109): pid=1 uid=0 auid=4294967295 ses=4294967295 msg=' comm="systemd-readahead-collect" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ OK ] Unmounted /boot.
[ OK ] Reached target Unmount All Filesystems.
[ OK ] Stopped target Local File Systems (Pre).
Stopping Remount Root and Kernel File Systems...
[ OK ] Stopped Remount Root and Kernel File Systems.
Stopping Replay Read-Ahead Data...
[ OK ] Stopped Replay Read-Ahead Data.
Stopping Collect Read-Ahead Data...
[ OK ] Stopped Collect Read-Ahead Data.
[ OK ] Reached target Shutdown.
[ 2433.195428] systemd-journald[585]: Received SIGTERM
Sending SIGTERM to remaining processes...
Sending SIGKILL to remaining processes...
Unmounting file systems.
Unmounting /dev/hugepages.
Unmounting /dev/mqueue.
Unmounting /sys/kernel/debug.
Unmounting /sys/kernel/config.
All filesystems unmounted.
Deactivating swaps.
All swaps deactivated.
Detaching loop devices.
All loop devices detached.
Detaching DM devices.
Detaching DM 253:1.
Not all DM devices detached, 1 left.
Detaching DM devices.
Not all DM devices detached, 1 left.
Cannot finalize remaining file systems and devices, giving up.
Storage is finalized.
[ 2433.524953] reboot: Restarting system
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
1 = SMS Menu 5 = Default Boot List
8 = Open Firmware Prompt 6 = Stored Boot List
Memory Keyboard Network Speaker
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM STARTING SOFTWARE IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM PLEASE WAIT... IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
/
Elapsed time since release of system processors: 0 mins 9 secs
Red Hat Enterprise Linux Server, with Linux 3.16.0-rc7
Red Hat Enterprise Linux Server, with Linux 3.16.0-rc7-24x7
Red Hat Enterprise Linux Server, with Linux 3.16.0-rc2-24x7
Red Hat Enterprise Linux Server, with Linux 3.10.0-suka-backports
Red Hat Enterprise Linux Server, with Linux 3.10.0-123.el7.ppc64
Red Hat Enterprise Linux Server, with Linux 0-rescue-fa07989832f3430ebf3>
Use the ^ and v keys to change the selection.
Press 'e' to edit the selected item, or 'c' for a command prompt.
OF stdout device is: /vdevice/vty@30000000
Preparing to boot Linux version 3.16.0-rc7-24x7+ (root@ltcbrazos2-lp07.austin.ibm.com) (gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) ) #17 SMP Wed Jul 30 02:49:19 EDT 2014
Detected machine type: 0000000000000101
Max number of cores passed to firmware: 256 (NR_CPUS = 2048)
Calling ibm,client-architecture-support... done
command line: BOOT_IMAGE=/vmlinux-3.16.0-rc7-24x7 root=UUID=e72c49fa-e137-43ff-ab41-44f3124572eb ro vconsole.keymap=us rd.lvm.lv=rhel_ltcbrazos2-lp07/root rd.lvm.lv=rhel_ltcbrazos2-lp07/swap crashkernel=auto vconsole.font=latarcyrheb-sun16 earlyprinkt=keep sched_debug
memory layout at init:
memory_limit : 0000000000000000 (16 MB aligned)
alloc_bottom : 000000000a5f0000
alloc_top : 0000000010000000
alloc_top_hi : 0000000010000000
rmo_top : 0000000010000000
ram_top : 0000000010000000
instantiating rtas at 0x000000000ee20000... done
prom_hold_cpus: skipped
copying OF device tree...
Building dt strings...
Building dt structure...
Device tree strings 0x000000000a600000 -> 0x000000000a6016d4
Device tree struct 0x000000000a610000 -> 0x000000000a640000
Calling quiesce...
returning from prom_init
[ 0.000000] crashkernel: memory value expected
[ 0.000000] Using pSeries machine description
[ 0.000000] Page sizes from device-tree:
[ 0.000000] base_shift=12: shift=12, sllp=0x0000, avpnm=0x00000000, tlbiel=1, penc=0
[ 0.000000] base_shift=12: shift=16, sllp=0x0000, avpnm=0x00000000, tlbiel=1, penc=7
[ 0.000000] base_shift=12: shift=24, sllp=0x0000, avpnm=0x00000000, tlbiel=1, penc=56
[ 0.000000] base_shift=16: shift=16, sllp=0x0110, avpnm=0x00000000, tlbiel=1, penc=1
[ 0.000000] base_shift=16: shift=24, sllp=0x0110, avpnm=0x00000000, tlbiel=1, penc=8
[ 0.000000] base_shift=24: shift=24, sllp=0x0100, avpnm=0x00000001, tlbiel=0, penc=0
[ 0.000000] base_shift=34: shift=34, sllp=0x0120, avpnm=0x000007ff, tlbiel=0, penc=3
[ 0.000000] Using 1TB segments
[ 0.000000] kvm_cma: CMA: reserved 256 MiB
[ 0.000000] Found initrd at 0xc000000009a00000:0xc00000000a5eb9b8
[ 0.000000] bootconsole [udbg0] enabled
[ 0.000000] Partition configured for 32 cpus.
[ 0.000000] CPU maps initialized for 8 threads per core
-> smp_release_cpus()
spinning_secondaries = 15
<- smp_release_cpus()
[ 0.000000] Starting Linux PPC64 #17 SMP Wed Jul 30 02:49:19 EDT 2014
[ 0.000000] -----------------------------------------------------
[ 0.000000] ppc64_pft_size = 0x1a
[ 0.000000] physicalMemorySize = 0x100000000
[ 0.000000] htab_hash_mask = 0x7ffff
[ 0.000000] -----------------------------------------------------
<- setup_system()
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 3.16.0-rc7-24x7+ (root@ltcbrazos2-lp07.austin.ibm.com) (gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) ) #17 SMP Wed Jul 30 02:49:19 EDT 2014
[ 0.000000] [boot]0012 Setup Arch
[ 0.000000] PPC64 nvram contains 15360 bytes
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x00000000-0xffffffff]
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 1: [mem 0x00000000-0xffffffff]
[ 0.000000] Could not find start_pfn for node 0
[ 0.000000] [boot]0015 Setup Done
[ 0.000000] PERCPU: Embedded 2 pages/cpu @c000000001200000 s102272 r0 d28800 u131072
[ 0.000000] Built 2 zonelists in Node order, mobility grouping on. Total pages: 65480
[ 0.000000] Policy zone: DMA
[ 0.000000] Kernel command line: BOOT_IMAGE=/vmlinux-3.16.0-rc7-24x7 root=UUID=e72c49fa-e137-43ff-ab41-44f3124572eb ro vconsole.keymap=us rd.lvm.lv=rhel_ltcbrazos2-lp07/root rd.lvm.lv=rhel_ltcbrazos2-lp07/swap crashkernel=auto vconsole.font=latarcyrheb-sun16 earlyprinkt=keep sched_debug
[ 0.000000] PID hash table entries: 4096 (order: -1, 32768 bytes)
[ 0.000000] Sorting __ex_table...
[ 0.000000] Memory: 3793664K/4194304K available (7488K kernel code, 1728K rwdata, 1808K rodata, 4352K init, 2435K bss, 400640K reserved)
[ 0.000000] SLUB: HWalign=128, Order=0-3, MinObjects=0, CPUs=32, Nodes=256
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU restricting CPUs from NR_CPUS=2048 to nr_cpu_ids=32.
[ 0.000000] Offload RCU callbacks from all CPUs
[ 0.000000] Offload RCU callbacks from CPUs: 0-31.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=32
[ 0.000000] NR_IRQS:512 nr_irqs:512 16
[ 0.000001] clocksource: timebase mult[1f40000] shift[24] registered
[ 0.000122] Console: colour dummy device 80x25
[ 0.000141] console [hvc0] enabled
[ 0.000141] console [hvc0] enabled
[ 0.000156] bootconsole [udbg0] disabled
[ 0.000156] bootconsole [udbg0] disabled
[ 0.001244] allocated 1048576 bytes of page_cgroup
[ 0.001252] please try 'cgroup_disable=memory' option if you don't want memory cgroups
[ 0.001287] mempolicy: Enabling automatic NUMA balancing. Configure with numa_balancing= or the kernel.numa_balancing sysctl
[ 0.001293] pid_max: default: 32768 minimum: 301
[ 0.001328] Security Framework initialized
[ 0.001338] SELinux: Initializing.
[ 0.001403] Dentry cache hash table entries: 524288 (order: 6, 4194304 bytes)
[ 0.002058] Inode-cache hash table entries: 262144 (order: 5, 2097152 bytes)
[ 0.002384] Mount-cache hash table entries: 8192 (order: 0, 65536 bytes)
[ 0.002388] Mountpoint-cache hash table entries: 8192 (order: 0, 65536 bytes)
[ 0.002603] Initializing cgroup subsys memory
[ 0.002667] Initializing cgroup subsys devices
[ 0.002673] Initializing cgroup subsys freezer
[ 0.002677] Initializing cgroup subsys net_cls
[ 0.002682] Initializing cgroup subsys blkio
[ 0.002687] Initializing cgroup subsys perf_event
[ 0.002690] Initializing cgroup subsys hugetlb
[ 0.002805] EEH: pSeries platform initialized
[ 0.002819] POWER8 performance monitor hardware support registered
[ 0.020203] Brought up 16 CPUs
[ 0.024297] __sdt_alloc: allocated c0000000e7ab0000 with cpus:
[ 0.024330] __sdt_alloc: allocated c0000000e7ae0000 with cpus:
[ 0.024363] __sdt_alloc: allocated c0000000e7b10000 with cpus:
[ 0.024396] __sdt_alloc: allocated c0000000e7b40000 with cpus:
[ 0.024428] __sdt_alloc: allocated c0000000e7b70000 with cpus:
[ 0.024460] __sdt_alloc: allocated c0000000e7ba0000 with cpus:
[ 0.024493] __sdt_alloc: allocated c0000000e7bd0000 with cpus:
[ 0.024526] __sdt_alloc: allocated c0000000e7c00000 with cpus:
[ 0.024558] __sdt_alloc: allocated c0000000e7c30000 with cpus:
[ 0.024591] __sdt_alloc: allocated c0000000e7c60000 with cpus:
[ 0.024623] __sdt_alloc: allocated c0000000e7c90000 with cpus:
[ 0.024655] __sdt_alloc: allocated c0000000e7cc0000 with cpus:
[ 0.024688] __sdt_alloc: allocated c0000000e7cf0000 with cpus:
[ 0.024720] __sdt_alloc: allocated c0000000e7d20000 with cpus:
[ 0.024753] __sdt_alloc: allocated c0000000e7d50000 with cpus:
[ 0.024785] __sdt_alloc: allocated c0000000e7d80000 with cpus:
[ 0.024819] __sdt_alloc: allocated c0000000e7db0000 with cpus:
[ 0.024852] __sdt_alloc: allocated c0000000e7de0000 with cpus:
[ 0.024884] __sdt_alloc: allocated c0000000e7e10000 with cpus:
[ 0.024916] __sdt_alloc: allocated c0000000e7e40000 with cpus:
[ 0.024949] __sdt_alloc: allocated c0000000e7e70000 with cpus:
[ 0.024981] __sdt_alloc: allocated c0000000e7ea0000 with cpus:
[ 0.025013] __sdt_alloc: allocated c0000000e7ed0000 with cpus:
[ 0.025045] __sdt_alloc: allocated c0000000e7f00000 with cpus:
[ 0.025078] __sdt_alloc: allocated c0000000e7f30000 with cpus:
[ 0.025110] __sdt_alloc: allocated c0000000e7f60000 with cpus:
[ 0.025143] __sdt_alloc: allocated c0000000e7f90000 with cpus:
[ 0.025175] __sdt_alloc: allocated c0000000e7fc0000 with cpus:
[ 0.025208] __sdt_alloc: allocated c0000000e7ff0000 with cpus:
[ 0.025240] __sdt_alloc: allocated c0000000e6020000 with cpus:
[ 0.025273] __sdt_alloc: allocated c0000000e6050000 with cpus:
[ 0.025305] __sdt_alloc: allocated c0000000e6080000 with cpus:
[ 0.025339] __sdt_alloc: allocated c0000000e60b0000 with cpus:
[ 0.025372] __sdt_alloc: allocated c0000000e60e0000 with cpus:
[ 0.025404] __sdt_alloc: allocated c0000000e6110000 with cpus:
[ 0.025436] __sdt_alloc: allocated c0000000e6140000 with cpus:
[ 0.025469] __sdt_alloc: allocated c0000000e6170000 with cpus:
[ 0.025501] __sdt_alloc: allocated c0000000e61a0000 with cpus:
[ 0.025533] __sdt_alloc: allocated c0000000e61d0000 with cpus:
[ 0.025566] __sdt_alloc: allocated c0000000e6200000 with cpus:
[ 0.025598] __sdt_alloc: allocated c0000000e6230000 with cpus:
[ 0.025630] __sdt_alloc: allocated c0000000e6260000 with cpus:
[ 0.025663] __sdt_alloc: allocated c0000000e6290000 with cpus:
[ 0.025695] __sdt_alloc: allocated c0000000e62c0000 with cpus:
[ 0.025727] __sdt_alloc: allocated c0000000e62f0000 with cpus:
[ 0.025758] __sdt_alloc: allocated c0000000e6320000 with cpus:
[ 0.025791] __sdt_alloc: allocated c0000000e6350000 with cpus:
[ 0.025822] __sdt_alloc: allocated c0000000e6380000 with cpus:
[ 0.025850] build_sched_groups: got group c0000000e7ab0000 with cpus:
[ 0.025853] build_sched_groups: got group c0000000e7ae0000 with cpus:
[ 0.025856] build_sched_groups: got group c0000000e7b10000 with cpus:
[ 0.025859] build_sched_groups: got group c0000000e7b40000 with cpus:
[ 0.025862] build_sched_groups: got group c0000000e7b70000 with cpus:
[ 0.025865] build_sched_groups: got group c0000000e7ba0000 with cpus:
[ 0.025869] build_sched_groups: got group c0000000e7bd0000 with cpus:
[ 0.025872] build_sched_groups: got group c0000000e7c00000 with cpus:
[ 0.025875] build_sched_groups: got group c0000000e7db0000 with cpus:
[ 0.025879] build_sched_groups: got group c0000000e7f30000 with cpus:
[ 0.025885] build_sched_groups: got group c0000000e7c30000 with cpus:
[ 0.025888] build_sched_groups: got group c0000000e7c60000 with cpus:
[ 0.025891] build_sched_groups: got group c0000000e7c90000 with cpus:
[ 0.025894] build_sched_groups: got group c0000000e7cc0000 with cpus:
[ 0.025897] build_sched_groups: got group c0000000e7cf0000 with cpus:
[ 0.025900] build_sched_groups: got group c0000000e7d20000 with cpus:
[ 0.025903] build_sched_groups: got group c0000000e7d50000 with cpus:
[ 0.025907] build_sched_groups: got group c0000000e7d80000 with cpus:
[ 0.026779] devtmpfs: initialized
[ 0.034324] EEH: devices created
[ 0.034767] atomic64_test: passed
[ 0.035333] NET: Registered protocol family 16
[ 0.035399] EEH: No capable adapters found
[ 0.035448] IBM eBus Device Driver
[ 0.035552] cpuidle: using governor menu
[ 0.035671] pstore: Registered nvram as persistent store backend
[ 0.037405] PCI: Probing PCI hardware
[ 0.037414] opal: Node not found
[ 0.037420] opal_async_comp_init: Opal node not found
[ 0.037506] pseries-rng: Registering arch random hook.
[ 0.040874] vgaarb: loaded
[ 0.040939] SCSI subsystem initialized
[ 0.040975] usbcore: registered new interface driver usbfs
[ 0.040984] usbcore: registered new interface driver hub
[ 0.041030] usbcore: registered new device driver usb
[ 0.041235] NetLabel: Initializing
[ 0.041238] NetLabel: domain hash size = 128
[ 0.041240] NetLabel: protocols = UNLABELED CIPSOv4
[ 0.041250] NetLabel: unlabeled traffic allowed by default
[ 0.041378] Switched to clocksource timebase
[ 0.046206] NET: Registered protocol family 2
[ 0.046401] TCP established hash table entries: 32768 (order: 2, 262144 bytes)
[ 0.046462] TCP bind hash table entries: 32768 (order: 3, 524288 bytes)
[ 0.046524] TCP: Hash tables configured (established 32768 bind 32768)
[ 0.046535] TCP: reno registered
[ 0.046542] UDP hash table entries: 2048 (order: 0, 65536 bytes)
[ 0.046553] UDP-Lite hash table entries: 2048 (order: 0, 65536 bytes)
[ 0.046624] NET: Registered protocol family 1
[ 0.046675] Unpacking initramfs...
[ 0.197080] Freeing initrd memory: 12160K (c000000009a00000 - c00000000a5e0000)
[ 0.201424] IOMMU table initialized, virtual merging enabled
[ 0.230054] hv-24x7: read 1246 catalog entries, created 1265 event attrs (0 failures), 127 descs
[ 0.230510] futex hash table entries: 8192 (order: 4, 1048576 bytes)
[ 0.230641] Initialise system trusted keyring
[ 0.230661] audit: initializing netlink subsys (disabled)
[ 0.230679] audit: type=2000 audit(1406703165.220:1): initialized
[ 0.231859] HugeTLB registered 16 MB page size, pre-allocated 0 pages
[ 0.231863] HugeTLB registered 16 GB page size, pre-allocated 0 pages
[ 0.233593] zbud: loaded
[ 0.233784] VFS: Disk quotas dquot_6.5.2
[ 0.233830] Dquot-cache hash table entries: 8192 (order 0, 65536 bytes)
[ 0.234002] msgmni has been set to 8076
[ 0.234071] Key type big_key registered
[ 0.234936] alg: No test for stdrng (krng)
[ 0.234955] NET: Registered protocol family 38
[ 0.234962] Key type asymmetric registered
[ 0.234965] Asymmetric key parser 'x509' registered
[ 0.235002] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[ 0.235116] io scheduler noop registered
[ 0.235120] io scheduler deadline registered (default)
[ 0.235231] io scheduler cfq registered
[ 0.235304] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
[ 0.235312] pciehp: PCI Express Hot Plug Controller Driver version: 0.4
[ 0.235316] rpaphp: RPA HOT Plug PCI Controller Driver version: 0.1
[ 0.235798] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 0.236105] Linux agpgart interface v0.103
[ 0.236182] rdac: device handler registered
[ 0.236329] hp_sw: device handler registered
[ 0.236333] emc: device handler registered
[ 0.236336] alua: device handler registered
[ 0.236373] libphy: Fixed MDIO Bus: probed
[ 0.236442] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.236451] ehci-pci: EHCI PCI platform driver
[ 0.236460] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.236468] ohci-pci: OHCI PCI platform driver
[ 0.236476] uhci_hcd: USB Universal Host Controller Interface driver
[ 0.236517] usbcore: registered new interface driver usbserial
[ 0.236524] usbcore: registered new interface driver usbserial_generic
[ 0.236531] usbserial: USB Serial support registered for generic
[ 0.236603] mousedev: PS/2 mouse device common for all mice
[ 0.236825] rtc-generic rtc-generic: rtc core: registered rtc-generic as rtc0
[ 0.236843] powernv-cpufreq: power-mgt node not found
[ 0.236846] powernv-cpufreq: powernv-cpufreq disabled. System does not support PState control
[ 0.237052] hidraw: raw HID events driver (C) Jiri Kosina
[ 0.237146] usbcore: registered new interface driver usbhid
[ 0.237149] usbhid: USB HID core driver
[ 0.237164] drop_monitor: Initializing network drop monitor service
[ 0.237224] TCP: cubic registered
[ 0.237235] Initializing XFRM netlink socket
[ 0.237328] NET: Registered protocol family 10
[ 0.237521] NET: Registered protocol family 17
[ 0.237707] Loading compiled-in X.509 certificates
[ 0.238282] Loaded X.509 cert 'Magrathea: Glacier signing key: 60ef07e620363bf1993b6d295d264cddf46db0ea'
[ 0.238298] registered taskstats version 1
[ 0.242885] rtc-generic rtc-generic: setting system clock to 2014-07-30 06:52:45 UTC (1406703165)
[ 0.243331] Freeing unused kernel memory: 4352K (c000000000920000 - c000000000d60000)
[ 0.253009] systemd[1]: systemd 208 running in system mode. (+PAM +LIBWRAP +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ)
[ 0.253095] systemd[1]: Running in initial RAM disk.
Welcome to Red Hat Enterprise Linux Server 7.0 (Maipo) dracut-033-161.el7 (Initramfs)!
[ 0.253327] systemd[1]: Set hostname to <ltcbrazos2-lp07.austin.ibm.com>.
[ 0.253854] random: systemd urandom read with 17 bits of entropy available
[ 0.277123] systemd[1]: Expecting device dev-disk-by\x2duuid-e72c49fa\x2de137\x2d43ff\x2dab41\x2d44f3124572eb.device...
Expecting device dev-disk-by\x2duuid-e72c49fa\x2de13...572eb.device...
[ 0.277348] systemd[1]: Starting -.slice.
[ OK ] Created slice -.slice.
[ 0.277721] systemd[1]: Created slice -.slice.
[ 0.277752] systemd[1]: Starting System Slice.
[ OK ] Created slice System Slice.
[ 0.277946] systemd[1]: Created slice System Slice.
[ 0.277976] systemd[1]: Starting Slices.
[ OK ] Reached target Slices.
[ 0.278120] systemd[1]: Reached target Slices.
[ 0.278150] systemd[1]: Starting Timers.
[ OK ] Reached target Timers.
[ 0.278289] systemd[1]: Reached target Timers.
[ 0.278318] systemd[1]: Starting Journal Socket.
[ OK ] Listening on Journal Socket.
[ 0.278489] systemd[1]: Listening on Journal Socket.
[ 0.278641] systemd[1]: Starting dracut cmdline hook...
Starting dracut cmdline hook...
[ 0.279120] systemd[1]: Started Load Kernel Modules.
[ 0.279129] systemd[1]: Starting Setup Virtual Console...
Starting Setup Virtual Console...
[ 0.279524] systemd[1]: Starting Journal Service...
Starting Journal Service...
[ OK ] Started Journal Service.
[ 0.280348] systemd[1]: Started Journal Service.
[ OK ] Listening on udev Kernel Socket.
[ OK ] Listening on udev Control Socket.
[ OK ] Reached target Sockets.
Starting Create list of required static device nodes...rrent kernel...
Starting Apply Kernel Variables...
[ OK ] Reached target Swap.
[ OK ] Reached target Local File Systems.
[ 0.296357] systemd-journald[189]: Vacuuming done, freed 0 bytes
[ OK ] Started Setup Virtual Console.
[ OK ] Started Apply Kernel Variables.
[ OK ] Started Create list of required static device nodes ...current kernel.
Starting Create static device nodes in /dev...
[ OK ] Started Create static device nodes in /dev.
[ OK ] Started dracut cmdline hook.
Starting dracut pre-udev hook...
[ 0.420406] device-mapper: uevent: version 1.0.3
[ 0.420563] device-mapper: ioctl: 4.27.0-ioctl (2013-10-30) initialised: dm-devel@redhat.com
[ OK ] Started dracut pre-udev hook.
Starting udev Kernel Device Manager...
[ 0.445276] systemd-udevd[320]: starting version 208
[ OK ] Started udev Kernel Device Manager.
Starting udev Coldplug all Devices...
Mounting Configuration File System...
[ OK ] Mounted Configuration File System.
[ OK ] Started udev Coldplug all Devices.
Starting dracut initqueue hook...
[ OK ] Reached target System Initialization.
Starting Show Plymouth Boot Screen...
[ 0.495293] ibmvscsi 30000003: SRP_VERSION: 16.a
[ 0.495520] scsi0 : IBM POWER Virtual SCSI Adapter 1.5.9
[ 0.495774] ibmvscsi 30000003: partner initialization complete
[ 0.495834] ibmvscsi 30000003: host srp version: 16.a, host partition ltcbrazos2-vios (1), OS 3, max io 262144
[ 0.495908] ibmvscsi 30000003: Client reserve enabled
[ 0.495924] ibmvscsi 30000003: sent SRP login
[ 0.495959] ibmvscsi 30000003: SRP_LOGIN succeeded
[ 0.513152] ibmvscsi 30000004: SRP_VERSION: 16.a
[ 0.513301] scsi 0:0:1:0: Direct-Access AIX VDASD 0001 PQ: 0 ANSI: 3
[ 0.513378] scsi1 : IBM POWER Virtual SCSI Adapter 1.5.9
[ 0.513613] ibmvscsi 30000004: partner initialization complete
[ 0.513659] ibmvscsi 30000004: host srp version: 16.a, host partition ltcbrazos2-vios (1), OS 3, max io 262144
[ 0.513724] ibmvscsi 30000004: Client reserve enabled
[ 0.513735] ibmvscsi 30000004: sent SRP login
[ 0.513773] ibmvscsi 30000004: SRP_LOGIN succeeded
[ OK ] Started Show Plymouth Boot Screen.
[ OK ] Reached target Paths.
[ OK ] Reached target Basic System.
[ 0.532850] scsi 1:0:1:0: Direct-Access AIX VDASD 0001 PQ: 0 ANSI: 3
Starting File System Check on /dev/disk/by-uuid/e72c...44f3124572eb...
[ 0.565312] sd 0:0:1:0: [sda] 41943040 512-byte logical blocks: (21.4 GB/20.0 GiB)
[ 0.565365] sd 0:0:1:0: [sda] Write Protect is off
[ 0.565366] sd 1:0:1:0: [sdb] 41943040 512-byte logical blocks: (21.4 GB/20.0 GiB)
[ 0.565424] sd 0:0:1:0: [sda] Cache data unavailable
[ 0.565424] sd 1:0:1:0: [sdb] Write Protect is off
[ 0.565435] sd 0:0:1:0: [sda] Assuming drive cache: write through
[ 0.565479] sd 1:0:1:0: [sdb] Cache data unavailable
[ 0.565485] sd 1:0:1:0: [sdb] Assuming drive cache: write through
[ 0.566287] sda: sda1 sda2 sda3
[ 0.566344] sdb: sdb1
[ 0.566763] sd 0:0:1:0: [sda] Attached SCSI disk
[ 0.566773] sd 1:0:1:0: [sdb] Attached SCSI disk
systemd-fsck[385]: fsck: error 2 (No such file or directory) while executing fsck.ext2 for /dev/disk/by-uuid/e72c49fa-e137-43ff-ab41-44f3124572eb
[ OK ] Started File System Check on /dev/disk/by-uuid/e72c4...1-44f3124572eb.
[ OK ] Started dracut initqueue hook.
Mounting /sysroot...
[ 1.277941] SGI XFS with ACLs, security attributes, large block/inode numbers, no debug enabled
[ 1.279694] XFS (dm-0): Mounting V4 Filesystem
[ 9.504734] XFS (dm-0): Ending clean mount
[ OK ] Mounted /sysroot.
[ OK ] Reached target Initrd Root File System.
Starting Reload Configuration from the Real Root...
[ OK ] Started Reload Configuration from the Real Root.
[ OK ] Reached target Initrd File Systems.
[ OK ] Reached target Initrd Default Target.
[ 9.641131] random: nonblocking pool is initialized
[ 9.649710] systemd-journald[189]: Received SIGTERM
[ 9.802718] SELinux: Disabled at runtime.
[ 9.881394] audit: type=1404 audit(1406703175.140:2): selinux=0 auid=4294967295 ses=4294967295
Welcome to Red Hat Enterprise Linux Server 7.0 (Maipo)!
[ OK ] Stopped Switch Root.
[ OK ] Stopped target Switch Root.
[ OK ] Stopped target Initrd File Systems.
Stopping File System Check on /dev/disk/by-uuid/e72c...44f3124572eb...
[ OK ] Stopped File System Check on /dev/disk/by-uuid/e72c4...1-44f3124572eb.
[ OK ] Stopped target Initrd Root File System.
[ OK ] Created slice User and Session Slice.
[ OK ] Created slice system-serial\x2dgetty.slice.
Expecting device dev-hvc0.device...
[ OK ] Created slice system-getty.slice.
[ OK ] Reached target Remote File Systems.
Starting Collect Read-Ahead Data...
Starting Replay Read-Ahead Data...
[ OK ] Reached target Slices.
[ OK ] Listening on Delayed Shutdown Socket.
[ OK ] Listening on /dev/initctl Compatibility Named Pipe.
[ OK ] Listening on udev Kernel Socket.
[ OK ] Listening on udev Control Socket.
Starting udev Coldplug all Devices...
Mounting Debug File System...
[ OK ] Set up automount Arbitrary Executable File Formats F...utomount Point.
Starting Create list of required static device nodes...rrent kernel...
Mounting POSIX Message Queue File System...
Mounting Huge Pages File System...
[ OK ] Reached target Encrypted Volumes.
[ OK ] Listening on LVM2 metadata daemon socket.
[ OK ] Listening on Device-mapper event daemon FIFOs.
Starting Monitoring of LVM2 mirrors, snapshots etc. ...ress polling...
Expecting device dev-mapper-rhel_ltcbrazos2\x2d\x2dl...dswap.device...
Expecting device dev-disk-by\x2duuid-5db39dc3\x2df94...1ffc1.device...
[ OK ] Stopped Trigger Flushing of Journal to Persistent Storage.
Stopping Journal Service...
[ OK ] Stopped Journal Service.
Starting Journal Service...
[ OK ] Started Journal Service.
[ OK ] Started Collect Read-Ahead Data.
[ OK ] Started Replay Read-Ahead Data.
Starting Apply Kernel Variables...
[ 10.395081] systemd-journald[589]: Vacuuming done, freed 0 bytes
Starting File System Check on Root Device...
[ OK ] Mounted Debug File System.
[ OK ] Mounted POSIX Message Queue File System.
[ OK ] Mounted Huge Pages File System.
[ OK ] Started udev Coldplug all Devices.
[ OK ] Started Apply Kernel Variables.
Starting LVM2 metadata daemon...
[ OK ] Started LVM2 metadata daemon.
[ OK ] Started Create list of required static device nodes ...current kernel.
Starting Create static device nodes in /dev...
systemd-fsck[597]: /sbin/fsck.xfs: XFS file system.
[ OK ] Started File System Check on Root Device.
Starting Remount Root and Kernel File Systems...
[ OK ] Started Create static device nodes in /dev.
Starting udev Kernel Device Manager...
[ OK ] Started Remount Root and Kernel File Systems.
Starting Import network configuration from initramfs...
Starting Configure read-only root support...
Starting Load/Save Random Seed...
[ OK ] Reached target Local File Systems (Pre).
[ 10.457650] systemd-udevd[609]: starting version 208
[ OK ] Started udev Kernel Device Manager.
[ OK ] Started Import network configuration from initramfs.
[ OK ] Started Load/Save Random Seed.
[ OK ] Started Configure read-only root support.
[ OK ] Found device /dev/hvc0.
[ 10.687095] Registering IBM pSeries RNG driver
Starting LVM2 PV scan on device 8:17...
[ OK ] Started LVM2 PV scan on device 8:17.
Starting LVM2 PV scan on device 8:3...
[ OK ] Started Monitoring of LVM2 mirrors, snapshots etc. u...ogress polling.
[ OK ] Started LVM2 PV scan on device 8:3.
[ OK ] Found device /dev/mapper/rhel_ltcbrazos2--lp07-swap.
Activating swap /dev/mapper/rhel_ltcbrazos2--lp07-swap...
[ 10.822245] Adding 4194240k swap on /dev/mapper/rhel_ltcbrazos2--lp07-swap. Priority:-1 extents:1 across:4194240k FS
[ OK ] Activated swap /dev/mapper/rhel_ltcbrazos2--lp07-swap.
[ OK ] Reached target Swap.
[ OK ] Found device VDASD.
Starting File System Check on /dev/disk/by-uuid/5db3...55e1b851ffc1...
systemd-fsck[1074]: /sbin/fsck.xfs: XFS file system.
[ OK ] Started File System Check on /dev/disk/by-uuid/5db39...7-55e1b851ffc1.
Mounting /boot...
[ 10.854032] XFS (sda2): Mounting V4 Filesystem
[ *** ] A start job is running for /boot[ 20.081762] XFS (sda2): Ending clean mount
[ OK ] Mounted /boot.
[ OK ] Reached target Local File Systems.
Starting Trigger Flushing of Journal to Persistent Storage...
Starting Create Volatile Files and Directories...
Starting Security Auditing Service...
Starting Tell Plymouth To Write Out Runtime Data...
[ 20.095524] systemd-journald[589]: Received request to flush runtime journal from PID 1
[ OK ] Started Trigger Flushing of Journal to Persistent Storage.
[ 20.107505] audit: type=1305 audit(1406703185.360:3): audit_pid=1090 old=0 auid=4294967295 ses=4294967295 res=1
[ OK ] Started Create Volatile Files and Directories.
[ OK ] Started Tell Plymouth To Write Out Runtime Data.
[ OK ] Started Security Auditing Service.
Starting Update UTMP about System Reboot/Shutdown...
[ OK ] Started Update UTMP about System Reboot/Shutdown.
[ OK ] Reached target System Initialization.
[ OK ] Reached target Timers.
[ OK ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
[ OK ] Listening on D-Bus System Message Bus Socket.
[ OK ] Reached target Sockets.
[ OK ] Reached target Paths.
[ OK ] Reached target Basic System.
Starting LSB: Start the iprupdate utility...
Starting Dump dmesg to /var/log/dmesg...
Red Hat Enterprise Linux Server 7.0 (Maipo)
Kernel 3.16.0-rc7-24x7+ on an ppc64
ltcbrazos2-lp07 login: [ 61.011764] __sdt_alloc: allocated c000000006fc0000 with cpus:
[ 61.011809] __sdt_alloc: allocated c0000000d2070000 with cpus:
[ 61.011849] __sdt_alloc: allocated c0000000e0260000 with cpus:
[ 61.011884] __sdt_alloc: allocated c0000000e33d0000 with cpus:
[ 61.011926] __sdt_alloc: allocated c0000000e44b0000 with cpus:
[ 61.011961] __sdt_alloc: allocated c0000000dc5b0000 with cpus:
[ 61.012001] __sdt_alloc: allocated c0000000e0be0000 with cpus:
[ 61.012036] __sdt_alloc: allocated c0000000df540000 with cpus:
[ 61.012075] __sdt_alloc: allocated c0000000df6f0000 with cpus:
[ 61.012109] __sdt_alloc: allocated c0000000df590000 with cpus:
[ 61.012160] __sdt_alloc: allocated c0000000dd200000 with cpus:
[ 61.012202] __sdt_alloc: allocated c0000000dfcb0000 with cpus:
[ 61.012248] __sdt_alloc: allocated c0000000dca00000 with cpus:
[ 61.012301] __sdt_alloc: allocated c0000000df7f0000 with cpus:
[ 61.012346] __sdt_alloc: allocated c0000000dc660000 with cpus:
[ 61.012392] __sdt_alloc: allocated c0000000da0c0000 with cpus:
[ 61.012437] __sdt_alloc: allocated c0000000dd420000 with cpus:
[ 61.012482] __sdt_alloc: allocated c0000000e3800000 with cpus:
[ 61.012536] __sdt_alloc: allocated c0000000dec20000 with cpus:
[ 61.012585] __sdt_alloc: allocated c0000000def20000 with cpus:
[ 61.012629] __sdt_alloc: allocated c0000000e4a80000 with cpus:
[ 61.012672] __sdt_alloc: allocated c0000000e2390000 with cpus:
[ 61.012728] __sdt_alloc: allocated c000000007700000 with cpus:
[ 61.012773] __sdt_alloc: allocated c0000000077a0000 with cpus:
[ 61.012822] __sdt_alloc: allocated c0000000e6ef0000 with cpus:
[ 61.012859] __sdt_alloc: allocated c0000000e6f90000 with cpus:
[ 61.012905] __sdt_alloc: allocated c0000000d90c0000 with cpus:
[ 61.012959] __sdt_alloc: allocated c0000000e5980000 with cpus:
[ 61.013010] __sdt_alloc: allocated c0000000d9b10000 with cpus:
[ 61.013054] __sdt_alloc: allocated c0000000d2bd0000 with cpus:
[ 61.013092] __sdt_alloc: allocated c0000000e5fb0000 with cpus:
[ 61.013152] __sdt_alloc: allocated c0000000dab70000 with cpus:
[ 61.013216] __sdt_alloc: allocated c0000000e0fc0000 with cpus:
[ 61.013265] __sdt_alloc: allocated c0000000db9e0000 with cpus:
[ 61.013304] __sdt_alloc: allocated c0000000d9ea0000 with cpus:
[ 61.013354] __sdt_alloc: allocated c0000000de120000 with cpus:
[ 61.013406] __sdt_alloc: allocated c0000000d9e90000 with cpus:
[ 61.013466] __sdt_alloc: allocated c0000000e3620000 with cpus:
[ 61.013510] __sdt_alloc: allocated c0000000e3e80000 with cpus:
[ 61.013547] __sdt_alloc: allocated c0000000ddf40000 with cpus:
[ 61.013606] __sdt_alloc: allocated c0000000dec80000 with cpus:
[ 61.013656] __sdt_alloc: allocated c0000000df5f0000 with cpus:
[ 61.013692] __sdt_alloc: allocated c000000007c90000 with cpus:
[ 61.013725] __sdt_alloc: allocated c0000000e5a90000 with cpus:
[ 61.013760] __sdt_alloc: allocated c0000000e2490000 with cpus:
[ 61.013793] __sdt_alloc: allocated c0000000069d0000 with cpus:
[ 61.013830] __sdt_alloc: allocated c0000000def80000 with cpus:
[ 61.013870] __sdt_alloc: allocated c0000000da570000 with cpus:
[ 61.013911] build_sched_groups: got group c000000006fc0000 with cpus:
[ 61.013916] build_sched_groups: got group c0000000d2070000 with cpus:
[ 61.013920] build_sched_groups: got group c0000000e0260000 with cpus:
[ 61.013925] build_sched_groups: got group c0000000e33d0000 with cpus:
[ 61.013929] build_sched_groups: got group c0000000e44b0000 with cpus:
[ 61.013934] build_sched_groups: got group c0000000dc5b0000 with cpus:
[ 61.013938] build_sched_groups: got group c0000000e0be0000 with cpus:
[ 61.013942] build_sched_groups: got group c0000000df540000 with cpus:
[ 61.013947] build_sched_groups: got group c0000000dd420000 with cpus:
[ 61.014851] build_sched_groups: got group c0000000df6f0000 with cpus:
[ 61.014858] build_sched_groups: got group c0000000df590000 with cpus:
[ 61.014862] build_sched_groups: got group c0000000dd200000 with cpus:
[ 61.014866] build_sched_groups: got group c0000000dfcb0000 with cpus:
[ 61.014871] build_sched_groups: got group c0000000dca00000 with cpus:
[ 61.014876] build_sched_groups: got group c0000000df7f0000 with cpus:
[ 61.014880] build_sched_groups: got group c0000000dc660000 with cpus:
[ 61.014885] build_sched_groups: got group c0000000da0c0000 with cpus:
[ 61.015837] ------------[ cut here ]------------
[ 61.015842] WARNING: at ../kernel/sched/core.c:5889
[ 61.015845] Modules linked in: sg cfg80211 rfkill ibmveth pseries_rng nx_crypto xfs libcrc32c sd_mod crc_t10dif crct10dif_common ibmvscsi scsi_transport_srp scsi_tgt dm_mirror dm_region_hash dm_log dm_mod
[ 61.015874] CPU: 4 PID: 1549 Comm: kworker/4:2 Not tainted 3.16.0-rc7-24x7+ #17
[ 61.015886] Workqueue: events .topology_work_fn
[ 61.015891] task: c0000000cd900000 ti: c0000000cda80000 task.ti: c0000000cda80000
[ 61.015895] NIP: c0000000000d73b8 LR: c0000000000d73f8 CTR: 0000000000000000
[ 61.015899] REGS: c0000000cda83570 TRAP: 0700 Not tainted (3.16.0-rc7-24x7+)
[ 61.015903] MSR: 8000000100029032 <SF,EE,ME,IR,DR,RI> CR: 28484024 XER: 0000000b
[ 61.015914] CFAR: c0000000000d7384 SOFTE: 1
GPR00: c0000000000d73f8 c0000000cda837f0 c000000000eaa7f0 0000000000000800
GPR04: 0000000000000800 0000000000000800 0000000000000000 c0000000009cf678
GPR08: c0000000009cf680 0000000000000001 0000000000000010 0000000000000000
GPR12: 0000000000000000 c00000000ebe1200 0000000000000000 c0000000d9af0018
GPR16: 0000000000000078 c000000000ef0a68 0000000000000078 c0000000d9af0000
GPR20: 0000000000000000 0000000000000000 c0000000d9af0000 0000000000000001
GPR24: c000000000db4402 000000000000000f 0000000000000000 c000000000ef0ae0
GPR28: c0000000063c5b00 c0000000e3790000 0000000000000000 c000000000ef4f7c
[ 61.015977] NIP [c0000000000d73b8] .build_sched_domains+0xab8/0xdf0
[ 61.015982] LR [c0000000000d73f8] .build_sched_domains+0xaf8/0xdf0
[ 61.015986] Call Trace:
[ 61.015990] [c0000000cda837f0] [c0000000000d73f8] .build_sched_domains+0xaf8/0xdf0 (unreliable)
[ 61.015997] [c0000000cda83950] [c0000000000d79b0] .partition_sched_domains+0x260/0x3f0
[ 61.016006] [c0000000cda83a30] [c000000000141764] .rebuild_sched_domains_locked+0x54/0x70
[ 61.016012] [c0000000cda83ab0] [c000000000143af8] .rebuild_sched_domains+0x28/0x50
[ 61.016018] [c0000000cda83b30] [c00000000004f250] .topology_work_fn+0x10/0x30
[ 61.016025] [c0000000cda83ba0] [c0000000000b7100] .process_one_work+0x1a0/0x4c0
[ 61.016032] [c0000000cda83c40] [c0000000000b7970] .worker_thread+0x180/0x630
[ 61.016039] [c0000000cda83d30] [c0000000000bfc88] .kthread+0x108/0x130
[ 61.016049] [c0000000cda83e30] [c00000000000a3e4] .ret_from_kernel_thread+0x58/0x74
[ 61.016058] Instruction dump:
[ 61.016061] 7f47492a e93b0000 e90a0010 7d0a4378 7d4a482a 814a0000 2f8a0000 419e0008
[ 61.016072] 7f48492a ebdd0010 7fc90074 7929d182 <0b090000> 60420000 387e0018 38800800
[ 61.016082] ---[ end trace c7c13ef8e2257429 ]---
[ 61.016091] Unable to handle kernel paging request for data at address 0x00000018
[ 61.016098] Faulting instruction address: 0xc00000000039d260
[ 61.016103] Oops: Kernel access of bad area, sig: 11 [#1]
[ 61.016105] SMP NR_CPUS=2048 NUMA pSeries
[ 61.016110] Modules linked in: sg cfg80211 rfkill ibmveth pseries_rng nx_crypto xfs libcrc32c sd_mod crc_t10dif crct10dif_common ibmvscsi scsi_transport_srp scsi_tgt dm_mirror dm_region_hash dm_log dm_mod
[ 61.016133] CPU: 4 PID: 1549 Comm: kworker/4:2 Tainted: G W 3.16.0-rc7-24x7+ #17
[ 61.016139] Workqueue: events .topology_work_fn
[ 61.016146] task: c0000000cd900000 ti: c0000000cda80000 task.ti: c0000000cda80000
[ 61.016151] NIP: c00000000039d260 LR: c0000000000d73cc CTR: 0000000000000000
[ 61.016156] REGS: c0000000cda834c0 TRAP: 0300 Tainted: G W (3.16.0-rc7-24x7+)
[ 61.016159] MSR: 8000000100009032 <SF,EE,ME,IR,DR,RI> CR: 28484024 XER: 0000000b
[ 61.016169] CFAR: c000000000009358 DAR: 0000000000000018 DSISR: 40000000 SOFTE: 1
GPR00: c0000000000d73cc c0000000cda83740 c000000000eaa7f0 0000000000000018
GPR04: 0000000000000800 0000000000000800 0000000000000000 c0000000009cf678
GPR08: c0000000009cf680 0000000000000001 0000000000000010 0000000000000000
GPR12: 0000000000000000 c00000000ebe1200 0000000000000000 c0000000d9af0018
GPR16: 0000000000000078 c000000000ef0a68 0000000000000078 c0000000d9af0000
GPR20: 0000000000000000 0000000000000000 c0000000d9af0000 0000000000000001
GPR24: c000000000db4402 0000000000000020 0000000000000018 0000000000000800
GPR28: 0000000000000020 0000000000000110 0000000000000000 0000000000000010
[ 61.016233] NIP [c00000000039d260] .__bitmap_weight+0x70/0x100
[ 61.016237] LR [c0000000000d73cc] .build_sched_domains+0xacc/0xdf0
[ 61.016241] Call Trace:
[ 61.016244] [c0000000cda83740] [c0000000cda837f0] 0xc0000000cda837f0 (unreliable)
[ 61.016250] [c0000000cda837f0] [c0000000000d73cc] .build_sched_domains+0xacc/0xdf0
[ 61.016256] [c0000000cda83950] [c0000000000d79b0] .partition_sched_domains+0x260/0x3f0
[ 61.016262] [c0000000cda83a30] [c000000000141764] .rebuild_sched_domains_locked+0x54/0x70
[ 61.016268] [c0000000cda83ab0] [c000000000143af8] .rebuild_sched_domains+0x28/0x50
[ 61.016274] [c0000000cda83b30] [c00000000004f250] .topology_work_fn+0x10/0x30
[ 61.016279] [c0000000cda83ba0] [c0000000000b7100] .process_one_work+0x1a0/0x4c0
[ 61.016284] [c0000000cda83c40] [c0000000000b7970] .worker_thread+0x180/0x630
[ 61.016289] [c0000000cda83d30] [c0000000000bfc88] .kthread+0x108/0x130
[ 61.016295] [c0000000cda83e30] [c00000000000a3e4] .ret_from_kernel_thread+0x58/0x74
[ 61.016300] Instruction dump:
[ 61.016303] 409d00b4 3bbcffff 3be3fff8 7bbd1f48 3bc00000 7fa3ea14 48000018 60000000
[ 61.016311] 60000000 60000000 60000000 60420000 <e87f0009> 4bcb7449 60000000 7fbfe840
[ 61.016320] ---[ end trace c7c13ef8e225742a ]---
[ 61.022697]
[ 63.022747] Kernel panic - not syncing: Fatal exception
[ 63.046921] Rebooting in 10 seconds..Connection to hmc-eio.austin.ibm.com closed.
You have mail in /home/suka/Mail/mbox
suka@suka-t410 ~/
[-- Attachment #3: debug.patch --]
[-- Type: text/plain, Size: 1464 bytes --]
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index bc1638b..fc1eabe 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5842,6 +5842,15 @@ build_sched_groups(struct sched_domain *sd, int cpu)
continue;
group = get_group(i, sdd, &sg);
+
+ if (!cpumask_empty(sched_group_cpus(sg)))
+ printk("%s FAIL\n", __func__);
+
+ printk("%s: got group %p with cpus: %pc\n", __func__, sg,
+ sched_group_cpus(sg));
+
+ cpumask_clear(sched_group_cpus(sg));
+ sg->sgc->capacity = 0;
cpumask_setall(sched_group_mask(sg));
for_each_cpu(j, span) {
@@ -6403,6 +6412,8 @@ static int __sdt_alloc(const struct cpumask *cpu_map)
if (!sg)
return -ENOMEM;
+ printk("%s: allocated %p with cpus: %pc\n",
+ __func__, sg, sched_group_cpus(sg));
sg->next = sg;
*per_cpu_ptr(sdd->sg, j) = sg;
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 6fe2c84..168bea5 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -28,6 +28,7 @@
#include <linux/ioport.h>
#include <linux/dcache.h>
#include <linux/cred.h>
+#include <linux/cpumask.h>
#include <net/addrconf.h>
#include <asm/page.h> /* for PAGE_SIZE */
@@ -1389,6 +1390,8 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
return dentry_name(buf, end,
((const struct file *)ptr)->f_path.dentry,
spec, fmt);
+ case 'c':
+ return buf + cpulist_scnprintf(buf, end-buf, ptr);
}
spec.flags |= SMALL;
if (spec.field_width == -1) {
^ permalink raw reply related
* [PATCH v4 00/16] powernv: vfio: Add Dynamic DMA windows (DDW)
From: Alexey Kardashevskiy @ 2014-07-30 9:31 UTC (permalink / raw)
To: linuxppc-dev
Cc: Alexey Kardashevskiy, Michael Ellerman, Paul Mackerras,
Gavin Shan
This prepares existing upstream kernel for DDW (Dynamic DMA windows) and
adds actual DDW support for VFIO.
This patchset does not contain any in-kernel acceleration stuff.
This patchset does not enable DDW for emulated devices.
Changes:
v4:
* addressed Ben's comments
* big rework with moving tce_xxx callbacks out of ppc_md
v3:
* applied multiple comments from Gavin regarding error checking
and callbacks placements
v2:
* moved "Account TCE pages in locked_vm" here (was in later series)
* added counting for huge window to locked_vm (ugly but better than nothing)
* fixed bug with missing >>PAGE_SHIFT when calling pfn_to_page
Alexey Kardashevskiy (16):
rcu: Define notrace version of list_for_each_entry_rcu and
list_entry_rcu
KVM: PPC: Use RCU for arch.spapr_tce_tables
mm: Add helpers for locked_vm
KVM: PPC: Account TCE-containing pages in locked_vm
powerpc/iommu: Fix comments with it_page_shift
powerpc/powernv: Make invalidate() a callback
powerpc/spapr: vfio: Implement spapr_tce_iommu_ops
powerpc/powernv: Convert/move set_bypass() callback to
take_ownership()
powerpc/iommu: Fix IOMMU ownership control functions
powerpc: Move tce_xxx callbacks from ppc_md to iommu_table
powerpc/powernv: Release replaced TCE
powerpc/pseries/lpar: Enable VFIO
powerpc/powernv: Implement Dynamic DMA windows (DDW) for IODA
vfio: powerpc/spapr: Reuse locked_vm accounting helpers
vfio: powerpc/spapr: Use it_page_size
vfio: powerpc/spapr: Enable Dynamic DMA windows
arch/powerpc/include/asm/iommu.h | 33 ++-
arch/powerpc/include/asm/kvm_host.h | 1 +
arch/powerpc/include/asm/machdep.h | 25 --
arch/powerpc/include/asm/tce.h | 38 +++
arch/powerpc/kernel/iommu.c | 158 ++++++++-----
arch/powerpc/kernel/vio.c | 5 +-
arch/powerpc/kvm/book3s.c | 2 +-
arch/powerpc/kvm/book3s_64_vio.c | 43 +++-
arch/powerpc/kvm/book3s_64_vio_hv.c | 6 +-
arch/powerpc/platforms/cell/iommu.c | 9 +-
arch/powerpc/platforms/pasemi/iommu.c | 8 +-
arch/powerpc/platforms/powernv/pci-ioda.c | 239 ++++++++++++++++---
arch/powerpc/platforms/powernv/pci-p5ioc2.c | 4 +-
arch/powerpc/platforms/powernv/pci.c | 86 ++++---
arch/powerpc/platforms/powernv/pci.h | 16 +-
arch/powerpc/platforms/pseries/iommu.c | 77 ++++--
arch/powerpc/sysdev/dart_iommu.c | 13 +-
drivers/vfio/vfio_iommu_spapr_tce.c | 348 ++++++++++++++++++++++++----
include/linux/mm.h | 3 +
include/linux/rculist.h | 38 +++
include/uapi/linux/vfio.h | 37 ++-
mm/mlock.c | 49 ++++
22 files changed, 990 insertions(+), 248 deletions(-)
--
2.0.0
^ permalink raw reply
* [PATCH v4 02/16] KVM: PPC: Use RCU for arch.spapr_tce_tables
From: Alexey Kardashevskiy @ 2014-07-30 9:31 UTC (permalink / raw)
To: linuxppc-dev
Cc: Alexey Kardashevskiy, Michael Ellerman, Paul Mackerras,
Gavin Shan
In-Reply-To: <1406712695-9491-1-git-send-email-aik@ozlabs.ru>
At the moment spapr_tce_tables is not protected against races. This makes
use of RCU-variants of list helpers. As some bits are executed in real
mode, this makes use of just introduced list_for_each_entry_rcu_notrace().
This converts release_spapr_tce_table() to a RCU scheduled handler.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
Changes:
* total rework
* kfree() for kvmppc_spapr_tce_table is moved to call_rcu_sched() callback
* used new list_for_each_entry_rcu_notrace
---
arch/powerpc/include/asm/kvm_host.h | 1 +
arch/powerpc/kvm/book3s.c | 2 +-
arch/powerpc/kvm/book3s_64_vio.c | 23 +++++++++++++----------
arch/powerpc/kvm/book3s_64_vio_hv.c | 6 ++++--
4 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h
index bb66d8b..cd22c31 100644
--- a/arch/powerpc/include/asm/kvm_host.h
+++ b/arch/powerpc/include/asm/kvm_host.h
@@ -180,6 +180,7 @@ struct kvmppc_spapr_tce_table {
struct kvm *kvm;
u64 liobn;
u32 window_size;
+ struct rcu_head rcu;
struct page *pages[0];
};
diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c
index c254c27..9e17d19 100644
--- a/arch/powerpc/kvm/book3s.c
+++ b/arch/powerpc/kvm/book3s.c
@@ -886,7 +886,7 @@ int kvmppc_core_init_vm(struct kvm *kvm)
{
#ifdef CONFIG_PPC64
- INIT_LIST_HEAD(&kvm->arch.spapr_tce_tables);
+ INIT_LIST_HEAD_RCU(&kvm->arch.spapr_tce_tables);
INIT_LIST_HEAD(&kvm->arch.rtas_tokens);
#endif
diff --git a/arch/powerpc/kvm/book3s_64_vio.c b/arch/powerpc/kvm/book3s_64_vio.c
index 54cf9bc..5958f7d 100644
--- a/arch/powerpc/kvm/book3s_64_vio.c
+++ b/arch/powerpc/kvm/book3s_64_vio.c
@@ -45,19 +45,16 @@ static long kvmppc_stt_npages(unsigned long window_size)
* sizeof(u64), PAGE_SIZE) / PAGE_SIZE;
}
-static void release_spapr_tce_table(struct kvmppc_spapr_tce_table *stt)
+static void release_spapr_tce_table(struct rcu_head *head)
{
- struct kvm *kvm = stt->kvm;
+ struct kvmppc_spapr_tce_table *stt = container_of(head,
+ struct kvmppc_spapr_tce_table, rcu);
int i;
- mutex_lock(&kvm->lock);
- list_del(&stt->list);
for (i = 0; i < kvmppc_stt_npages(stt->window_size); i++)
__free_page(stt->pages[i]);
+ kvm_put_kvm(stt->kvm);
kfree(stt);
- mutex_unlock(&kvm->lock);
-
- kvm_put_kvm(kvm);
}
static int kvm_spapr_tce_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
@@ -87,8 +84,13 @@ static int kvm_spapr_tce_mmap(struct file *file, struct vm_area_struct *vma)
static int kvm_spapr_tce_release(struct inode *inode, struct file *filp)
{
struct kvmppc_spapr_tce_table *stt = filp->private_data;
+ struct kvm *kvm = stt->kvm;
+
+ mutex_lock(&kvm->lock);
+ list_del_rcu(&stt->list);
+ call_rcu_sched(&stt->rcu, release_spapr_tce_table);
+ mutex_unlock(&kvm->lock);
- release_spapr_tce_table(stt);
return 0;
}
@@ -106,7 +108,8 @@ long kvm_vm_ioctl_create_spapr_tce(struct kvm *kvm,
int i;
/* Check this LIOBN hasn't been previously allocated */
- list_for_each_entry(stt, &kvm->arch.spapr_tce_tables, list) {
+ list_for_each_entry_rcu_notrace(stt, &kvm->arch.spapr_tce_tables,
+ list) {
if (stt->liobn == args->liobn)
return -EBUSY;
}
@@ -131,7 +134,7 @@ long kvm_vm_ioctl_create_spapr_tce(struct kvm *kvm,
kvm_get_kvm(kvm);
mutex_lock(&kvm->lock);
- list_add(&stt->list, &kvm->arch.spapr_tce_tables);
+ list_add_rcu(&stt->list, &kvm->arch.spapr_tce_tables);
mutex_unlock(&kvm->lock);
diff --git a/arch/powerpc/kvm/book3s_64_vio_hv.c b/arch/powerpc/kvm/book3s_64_vio_hv.c
index 89e96b3..b1914d9 100644
--- a/arch/powerpc/kvm/book3s_64_vio_hv.c
+++ b/arch/powerpc/kvm/book3s_64_vio_hv.c
@@ -50,7 +50,8 @@ long kvmppc_h_put_tce(struct kvm_vcpu *vcpu, unsigned long liobn,
/* udbg_printf("H_PUT_TCE(): liobn=0x%lx ioba=0x%lx, tce=0x%lx\n", */
/* liobn, ioba, tce); */
- list_for_each_entry(stt, &kvm->arch.spapr_tce_tables, list) {
+ list_for_each_entry_rcu_notrace(stt, &kvm->arch.spapr_tce_tables,
+ list) {
if (stt->liobn == liobn) {
unsigned long idx = ioba >> SPAPR_TCE_SHIFT;
struct page *page;
@@ -82,7 +83,8 @@ long kvmppc_h_get_tce(struct kvm_vcpu *vcpu, unsigned long liobn,
struct kvm *kvm = vcpu->kvm;
struct kvmppc_spapr_tce_table *stt;
- list_for_each_entry(stt, &kvm->arch.spapr_tce_tables, list) {
+ list_for_each_entry_rcu_notrace(stt, &kvm->arch.spapr_tce_tables,
+ list) {
if (stt->liobn == liobn) {
unsigned long idx = ioba >> SPAPR_TCE_SHIFT;
struct page *page;
--
2.0.0
^ permalink raw reply related
* [PATCH v4 03/16] mm: Add helpers for locked_vm
From: Alexey Kardashevskiy @ 2014-07-30 9:31 UTC (permalink / raw)
To: linuxppc-dev
Cc: Alexey Kardashevskiy, Michael Ellerman, Paul Mackerras,
Gavin Shan
In-Reply-To: <1406712695-9491-1-git-send-email-aik@ozlabs.ru>
This adds 2 helpers to change the locked_vm counter:
- try_increase_locked_vm - may fail if new locked_vm value will be greater
than the RLIMIT_MEMLOCK limit;
- decrease_locked_vm.
These will be used by drivers capable of locking memory by userspace
request. For example, VFIO can use it to check if it can lock DMA memory
or PPC-KVM can use it to check if it can lock memory for TCE tables.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
include/linux/mm.h | 3 +++
mm/mlock.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 52 insertions(+)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index e03dd29..1cb219d 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -2113,5 +2113,8 @@ void __init setup_nr_node_ids(void);
static inline void setup_nr_node_ids(void) {}
#endif
+extern long try_increment_locked_vm(long npages);
+extern void decrement_locked_vm(long npages);
+
#endif /* __KERNEL__ */
#endif /* _LINUX_MM_H */
diff --git a/mm/mlock.c b/mm/mlock.c
index b1eb536..39e4b55 100644
--- a/mm/mlock.c
+++ b/mm/mlock.c
@@ -864,3 +864,52 @@ void user_shm_unlock(size_t size, struct user_struct *user)
spin_unlock(&shmlock_user_lock);
free_uid(user);
}
+
+/**
+ * try_increment_locked_vm() - checks if new locked_vm value is going to
+ * be less than RLIMIT_MEMLOCK and increments it by npages if it is.
+ *
+ * @npages: the number of pages to add to locked_vm.
+ *
+ * Returns 0 if succeeded or negative value if failed.
+ */
+long try_increment_locked_vm(long npages)
+{
+ long ret = 0, locked, lock_limit;
+
+ if (!current || !current->mm)
+ return -ESRCH; /* process exited */
+
+ down_write(¤t->mm->mmap_sem);
+ locked = current->mm->locked_vm + npages;
+ lock_limit = rlimit(RLIMIT_MEMLOCK) >> PAGE_SHIFT;
+ if (locked > lock_limit && !capable(CAP_IPC_LOCK)) {
+ pr_warn("RLIMIT_MEMLOCK (%ld) exceeded\n",
+ rlimit(RLIMIT_MEMLOCK));
+ ret = -ENOMEM;
+ } else {
+ current->mm->locked_vm += npages;
+ }
+ up_write(¤t->mm->mmap_sem);
+
+ return ret;
+}
+EXPORT_SYMBOL_GPL(try_increment_locked_vm);
+
+/**
+ * decrement_locked_vm() - decrements the current task's locked_vm counter.
+ *
+ * @npages: the number to decrement by.
+ */
+void decrement_locked_vm(long npages)
+{
+ if (!current || !current->mm)
+ return; /* process exited */
+
+ down_write(¤t->mm->mmap_sem);
+ if (npages > current->mm->locked_vm)
+ npages = current->mm->locked_vm;
+ current->mm->locked_vm -= npages;
+ up_write(¤t->mm->mmap_sem);
+}
+EXPORT_SYMBOL_GPL(decrement_locked_vm);
--
2.0.0
^ permalink raw reply related
* [PATCH v4 04/16] KVM: PPC: Account TCE-containing pages in locked_vm
From: Alexey Kardashevskiy @ 2014-07-30 9:31 UTC (permalink / raw)
To: linuxppc-dev
Cc: Alexey Kardashevskiy, Michael Ellerman, Paul Mackerras,
Gavin Shan
In-Reply-To: <1406712695-9491-1-git-send-email-aik@ozlabs.ru>
At the moment pages used for TCE tables (not pages addressed by TCEs) are
not counter in locked_vm counter so a malicious userspace tool can
call ioctl(KVM_CREATE_SPAPR_TCE) as many times as RLIMIT_NOFILE and
lock a lot of memory.
This adds counting for pages used for TCE tables.
This counts the number of pages required for a table plus pages for
the kvmppc_spapr_tce_table struct (TCE table descriptor) itself.
This does not change the amount of (de)allocated memory.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
Changes:
v4:
* fixed counting for kvmppc_spapr_tce_table (used to be +1 page)
* added 2 helpers to common MM code for later reuse from vfio-spapr
---
arch/powerpc/kvm/book3s_64_vio.c | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/kvm/book3s_64_vio.c b/arch/powerpc/kvm/book3s_64_vio.c
index 5958f7d..b32aeb1 100644
--- a/arch/powerpc/kvm/book3s_64_vio.c
+++ b/arch/powerpc/kvm/book3s_64_vio.c
@@ -45,16 +45,33 @@ static long kvmppc_stt_npages(unsigned long window_size)
* sizeof(u64), PAGE_SIZE) / PAGE_SIZE;
}
+static long kvmppc_account_memlimit(long npages, bool inc)
+{
+ long stt_pages = ALIGN(sizeof(struct kvmppc_spapr_tce_table) +
+ (abs(npages) * sizeof(struct page *)), PAGE_SIZE);
+
+ npages += stt_pages;
+ if (inc)
+ return try_increment_locked_vm(npages);
+
+ decrement_locked_vm(npages);
+
+ return 0;
+}
+
static void release_spapr_tce_table(struct rcu_head *head)
{
struct kvmppc_spapr_tce_table *stt = container_of(head,
struct kvmppc_spapr_tce_table, rcu);
int i;
+ long npages = kvmppc_stt_npages(stt->window_size);
- for (i = 0; i < kvmppc_stt_npages(stt->window_size); i++)
+ for (i = 0; i < npages; i++)
__free_page(stt->pages[i]);
kvm_put_kvm(stt->kvm);
kfree(stt);
+
+ kvmppc_account_memlimit(npages, false);
}
static int kvm_spapr_tce_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
@@ -115,6 +132,9 @@ long kvm_vm_ioctl_create_spapr_tce(struct kvm *kvm,
}
npages = kvmppc_stt_npages(args->window_size);
+ ret = kvmppc_account_memlimit(npages, true);
+ if (ret)
+ goto fail;
stt = kzalloc(sizeof(*stt) + npages * sizeof(struct page *),
GFP_KERNEL);
--
2.0.0
^ permalink raw reply related
* [PATCH v4 07/16] powerpc/spapr: vfio: Implement spapr_tce_iommu_ops
From: Alexey Kardashevskiy @ 2014-07-30 9:31 UTC (permalink / raw)
To: linuxppc-dev
Cc: Alexey Kardashevskiy, Michael Ellerman, Paul Mackerras,
Gavin Shan
In-Reply-To: <1406712695-9491-1-git-send-email-aik@ozlabs.ru>
Modern IBM POWERPC systems support multiple IOMMU tables per PE
so we need a more reliable way (compared to container_of()) to get
a PE pointer from the iommu_table struct pointer used in IOMMU functions.
At the moment IOMMU group data points to an iommu_table struct. This
introduces a spapr_tce_iommu_group struct which keeps an iommu_owner
and a spapr_tce_iommu_ops struct. For IODA, iommu_owner is a pointer to
the pnv_ioda_pe struct, for others it is still a pointer to
the iommu_table struct. The ops structs correspond to the type which
iommu_owner points to.
At the moment a get_table() callback is the only one. It returns
an iommu_table for a bus address.
As the IOMMU group data pointer points to variable type instead of
iommu_table, VFIO SPAPR TCE driver is fixed to use new type.
This changes the tce_container struct to keep iommu_group instead of
iommu_table.
So, it was:
- iommu_table points to iommu_group via iommu_table::it_group;
- iommu_group points to iommu_table via iommu_group_get_iommudata();
now it is:
- iommu_table points to iommu_group via iommu_table::it_group;
- iommu_group points to spapr_tce_iommu_group via
iommu_group_get_iommudata();
- spapr_tce_iommu_group points to either (depending on .get_table()):
- iommu_table;
- pnv_ioda_pe;
This uses pnv_ioda1_iommu_get_table for both IODA1&2 but IODA2 will
have own pnv_ioda2_iommu_get_table soon and pnv_ioda1_iommu_get_table
will only be used for IODA1.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
arch/powerpc/include/asm/iommu.h | 6 ++
arch/powerpc/include/asm/tce.h | 15 ++++
arch/powerpc/kernel/iommu.c | 34 ++++++++-
arch/powerpc/platforms/powernv/pci-ioda.c | 39 +++++++++-
arch/powerpc/platforms/powernv/pci-p5ioc2.c | 1 +
arch/powerpc/platforms/powernv/pci.c | 2 +-
arch/powerpc/platforms/pseries/iommu.c | 10 ++-
drivers/vfio/vfio_iommu_spapr_tce.c | 113 +++++++++++++++++++++-------
8 files changed, 184 insertions(+), 36 deletions(-)
diff --git a/arch/powerpc/include/asm/iommu.h b/arch/powerpc/include/asm/iommu.h
index 42632c7..84ee339 100644
--- a/arch/powerpc/include/asm/iommu.h
+++ b/arch/powerpc/include/asm/iommu.h
@@ -108,13 +108,19 @@ extern void iommu_free_table(struct iommu_table *tbl, const char *node_name);
*/
extern struct iommu_table *iommu_init_table(struct iommu_table * tbl,
int nid);
+
+struct spapr_tce_iommu_ops;
#ifdef CONFIG_IOMMU_API
extern void iommu_register_group(struct iommu_table *tbl,
+ void *iommu_owner,
+ struct spapr_tce_iommu_ops *ops,
int pci_domain_number, unsigned long pe_num);
extern int iommu_add_device(struct device *dev);
extern void iommu_del_device(struct device *dev);
#else
static inline void iommu_register_group(struct iommu_table *tbl,
+ void *iommu_owner,
+ struct spapr_tce_iommu_ops *ops,
int pci_domain_number,
unsigned long pe_num)
{
diff --git a/arch/powerpc/include/asm/tce.h b/arch/powerpc/include/asm/tce.h
index 743f36b..8bfe98f 100644
--- a/arch/powerpc/include/asm/tce.h
+++ b/arch/powerpc/include/asm/tce.h
@@ -50,5 +50,20 @@
#define TCE_PCI_READ 0x1 /* read from PCI allowed */
#define TCE_VB_WRITE 0x1 /* write from VB allowed */
+struct spapr_tce_iommu_group;
+
+#define TCE_DEFAULT_WINDOW ~(0ULL)
+
+struct spapr_tce_iommu_ops {
+ struct iommu_table *(*get_table)(
+ struct spapr_tce_iommu_group *data,
+ phys_addr_t addr);
+};
+
+struct spapr_tce_iommu_group {
+ void *iommu_owner;
+ struct spapr_tce_iommu_ops *ops;
+};
+
#endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_TCE_H */
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c
index f84f799..e203314 100644
--- a/arch/powerpc/kernel/iommu.c
+++ b/arch/powerpc/kernel/iommu.c
@@ -877,24 +877,52 @@ void iommu_free_coherent(struct iommu_table *tbl, size_t size,
*/
static void group_release(void *iommu_data)
{
- struct iommu_table *tbl = iommu_data;
- tbl->it_group = NULL;
+ kfree(iommu_data);
}
+static struct iommu_table *spapr_tce_get_default_table(
+ struct spapr_tce_iommu_group *data, phys_addr_t addr)
+{
+ struct iommu_table *tbl = data->iommu_owner;
+
+ if (addr == TCE_DEFAULT_WINDOW)
+ return tbl;
+
+ if ((addr >> tbl->it_page_shift) < tbl->it_size)
+ return tbl;
+
+ return NULL;
+}
+
+static struct spapr_tce_iommu_ops spapr_tce_default_ops = {
+ .get_table = spapr_tce_get_default_table
+};
+
void iommu_register_group(struct iommu_table *tbl,
+ void *iommu_owner, struct spapr_tce_iommu_ops *ops,
int pci_domain_number, unsigned long pe_num)
{
struct iommu_group *grp;
char *name;
+ struct spapr_tce_iommu_group *data;
+
+ data = kzalloc(sizeof(*data), GFP_KERNEL);
+ if (!data)
+ return;
+
+ data->iommu_owner = iommu_owner ? iommu_owner : tbl;
+ data->ops = ops ? ops : &spapr_tce_default_ops;
grp = iommu_group_alloc();
if (IS_ERR(grp)) {
pr_warn("powerpc iommu api: cannot create new group, err=%ld\n",
PTR_ERR(grp));
+ kfree(data);
return;
}
+
tbl->it_group = grp;
- iommu_group_set_iommudata(grp, tbl, group_release);
+ iommu_group_set_iommudata(grp, data, group_release);
name = kasprintf(GFP_KERNEL, "domain%d-pe%lx",
pci_domain_number, pe_num);
if (!name)
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
index 007497f..495137b 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -23,6 +23,7 @@
#include <linux/io.h>
#include <linux/msi.h>
#include <linux/memblock.h>
+#include <linux/iommu.h>
#include <asm/sections.h>
#include <asm/io.h>
@@ -584,6 +585,34 @@ static void pnv_pci_ioda2_tce_invalidate(struct pnv_ioda_pe *pe,
}
}
+static bool pnv_pci_ioda_check_addr(struct iommu_table *tbl, __u64 start_addr)
+{
+ unsigned long entry = start_addr >> tbl->it_page_shift;
+ unsigned long start = tbl->it_offset;
+ unsigned long end = start + tbl->it_size;
+
+ return (start <= entry) && (entry < end);
+}
+
+static struct iommu_table *pnv_ioda1_iommu_get_table(
+ struct spapr_tce_iommu_group *data,
+ phys_addr_t addr)
+{
+ struct pnv_ioda_pe *pe = data->iommu_owner;
+
+ if (addr == TCE_DEFAULT_WINDOW)
+ return &pe->tce32.table;
+
+ if (pnv_pci_ioda_check_addr(&pe->tce32.table, addr))
+ return &pe->tce32.table;
+
+ return NULL;
+}
+
+static struct spapr_tce_iommu_ops pnv_pci_ioda1_ops = {
+ .get_table = pnv_ioda1_iommu_get_table,
+};
+
static void pnv_pci_ioda_setup_dma_pe(struct pnv_phb *phb,
struct pnv_ioda_pe *pe, unsigned int base,
unsigned int segs)
@@ -663,7 +692,8 @@ static void pnv_pci_ioda_setup_dma_pe(struct pnv_phb *phb,
TCE_PCI_SWINV_PAIR);
}
iommu_init_table(tbl, phb->hose->node);
- iommu_register_group(tbl, phb->hose->global_number, pe->pe_number);
+ iommu_register_group(tbl, pe, &pnv_pci_ioda1_ops,
+ phb->hose->global_number, pe->pe_number);
if (pe->pdev)
set_iommu_table_base_and_group(&pe->pdev->dev, tbl);
@@ -729,6 +759,10 @@ static void pnv_pci_ioda2_setup_bypass_pe(struct pnv_phb *phb,
pnv_pci_ioda2_set_bypass(&pe->tce32.table, true);
}
+static struct spapr_tce_iommu_ops pnv_pci_ioda2_ops = {
+ .get_table = pnv_ioda1_iommu_get_table,
+};
+
static void pnv_pci_ioda2_setup_dma_pe(struct pnv_phb *phb,
struct pnv_ioda_pe *pe)
{
@@ -794,7 +828,8 @@ static void pnv_pci_ioda2_setup_dma_pe(struct pnv_phb *phb,
tbl->it_type |= (TCE_PCI_SWINV_CREATE | TCE_PCI_SWINV_FREE);
}
iommu_init_table(tbl, phb->hose->node);
- iommu_register_group(tbl, phb->hose->global_number, pe->pe_number);
+ iommu_register_group(tbl, pe, &pnv_pci_ioda2_ops,
+ phb->hose->global_number, pe->pe_number);
if (pe->pdev)
set_iommu_table_base_and_group(&pe->pdev->dev, tbl);
diff --git a/arch/powerpc/platforms/powernv/pci-p5ioc2.c b/arch/powerpc/platforms/powernv/pci-p5ioc2.c
index 94ce348..b79066d 100644
--- a/arch/powerpc/platforms/powernv/pci-p5ioc2.c
+++ b/arch/powerpc/platforms/powernv/pci-p5ioc2.c
@@ -89,6 +89,7 @@ static void pnv_pci_p5ioc2_dma_dev_setup(struct pnv_phb *phb,
if (phb->p5ioc2.iommu_table.it_map == NULL) {
iommu_init_table(&phb->p5ioc2.iommu_table, phb->hose->node);
iommu_register_group(&phb->p5ioc2.iommu_table,
+ NULL, NULL,
pci_domain_nr(phb->hose->bus), phb->opal_id);
}
diff --git a/arch/powerpc/platforms/powernv/pci.c b/arch/powerpc/platforms/powernv/pci.c
index 74a2626..cc54e3b 100644
--- a/arch/powerpc/platforms/powernv/pci.c
+++ b/arch/powerpc/platforms/powernv/pci.c
@@ -674,7 +674,7 @@ static struct iommu_table *pnv_pci_setup_bml_iommu(struct pci_controller *hose)
pnv_pci_setup_iommu_table(tbl, __va(be64_to_cpup(basep)),
be32_to_cpup(sizep), 0, IOMMU_PAGE_SHIFT_4K);
iommu_init_table(tbl, hose->node);
- iommu_register_group(tbl, pci_domain_nr(hose->bus), 0);
+ iommu_register_group(tbl, NULL, NULL, pci_domain_nr(hose->bus), 0);
/* Deal with SW invalidated TCEs when needed (BML way) */
swinvp = of_get_property(hose->dn, "linux,tce-sw-invalidate-info",
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index 33b552f..a047754 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -616,7 +616,7 @@ static void pci_dma_bus_setup_pSeries(struct pci_bus *bus)
iommu_table_setparms(pci->phb, dn, tbl);
pci->iommu_table = iommu_init_table(tbl, pci->phb->node);
- iommu_register_group(tbl, pci_domain_nr(bus), 0);
+ iommu_register_group(tbl, NULL, NULL, pci_domain_nr(bus), 0);
/* Divide the rest (1.75GB) among the children */
pci->phb->dma_window_size = 0x80000000ul;
@@ -661,7 +661,7 @@ static void pci_dma_bus_setup_pSeriesLP(struct pci_bus *bus)
ppci->phb->node);
iommu_table_setparms_lpar(ppci->phb, pdn, tbl, dma_window);
ppci->iommu_table = iommu_init_table(tbl, ppci->phb->node);
- iommu_register_group(tbl, pci_domain_nr(bus), 0);
+ iommu_register_group(tbl, NULL, NULL, pci_domain_nr(bus), 0);
pr_debug(" created table: %p\n", ppci->iommu_table);
}
}
@@ -688,7 +688,8 @@ static void pci_dma_dev_setup_pSeries(struct pci_dev *dev)
phb->node);
iommu_table_setparms(phb, dn, tbl);
PCI_DN(dn)->iommu_table = iommu_init_table(tbl, phb->node);
- iommu_register_group(tbl, pci_domain_nr(phb->bus), 0);
+ iommu_register_group(tbl, NULL, NULL,
+ pci_domain_nr(phb->bus), 0);
set_iommu_table_base_and_group(&dev->dev,
PCI_DN(dn)->iommu_table);
return;
@@ -1104,7 +1105,8 @@ static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev)
pci->phb->node);
iommu_table_setparms_lpar(pci->phb, pdn, tbl, dma_window);
pci->iommu_table = iommu_init_table(tbl, pci->phb->node);
- iommu_register_group(tbl, pci_domain_nr(pci->phb->bus), 0);
+ iommu_register_group(tbl, NULL, NULL,
+ pci_domain_nr(pci->phb->bus), 0);
pr_debug(" created table: %p\n", pci->iommu_table);
} else {
pr_debug(" found DMA window, table: %p\n", pci->iommu_table);
diff --git a/drivers/vfio/vfio_iommu_spapr_tce.c b/drivers/vfio/vfio_iommu_spapr_tce.c
index a84788b..46c2bc8 100644
--- a/drivers/vfio/vfio_iommu_spapr_tce.c
+++ b/drivers/vfio/vfio_iommu_spapr_tce.c
@@ -43,7 +43,7 @@ static void tce_iommu_detach_group(void *iommu_data,
*/
struct tce_container {
struct mutex lock;
- struct iommu_table *tbl;
+ struct iommu_group *grp;
bool enabled;
};
@@ -51,9 +51,14 @@ static int tce_iommu_enable(struct tce_container *container)
{
int ret = 0;
unsigned long locked, lock_limit, npages;
- struct iommu_table *tbl = container->tbl;
+ struct iommu_table *tbl;
+ struct spapr_tce_iommu_group *data;
- if (!container->tbl)
+ if (!container->grp)
+ return -ENXIO;
+
+ data = iommu_group_get_iommudata(container->grp);
+ if (!data || !data->iommu_owner || !data->ops->get_table)
return -ENXIO;
if (!current->mm)
@@ -80,6 +85,10 @@ static int tce_iommu_enable(struct tce_container *container)
* that would effectively kill the guest at random points, much better
* enforcing the limit based on the max that the guest can map.
*/
+ tbl = data->ops->get_table(data, TCE_DEFAULT_WINDOW);
+ if (!tbl)
+ return -ENXIO;
+
down_write(¤t->mm->mmap_sem);
npages = (tbl->it_size << IOMMU_PAGE_SHIFT_4K) >> PAGE_SHIFT;
locked = current->mm->locked_vm + npages;
@@ -89,7 +98,6 @@ static int tce_iommu_enable(struct tce_container *container)
rlimit(RLIMIT_MEMLOCK));
ret = -ENOMEM;
} else {
-
current->mm->locked_vm += npages;
container->enabled = true;
}
@@ -100,16 +108,27 @@ static int tce_iommu_enable(struct tce_container *container)
static void tce_iommu_disable(struct tce_container *container)
{
+ struct spapr_tce_iommu_group *data;
+ struct iommu_table *tbl;
+
if (!container->enabled)
return;
container->enabled = false;
- if (!container->tbl || !current->mm)
+ if (!container->grp || !current->mm)
+ return;
+
+ data = iommu_group_get_iommudata(container->grp);
+ if (!data || !data->iommu_owner || !data->ops->get_table)
+ return;
+
+ tbl = data->ops->get_table(data, TCE_DEFAULT_WINDOW);
+ if (!tbl)
return;
down_write(¤t->mm->mmap_sem);
- current->mm->locked_vm -= (container->tbl->it_size <<
+ current->mm->locked_vm -= (tbl->it_size <<
IOMMU_PAGE_SHIFT_4K) >> PAGE_SHIFT;
up_write(¤t->mm->mmap_sem);
}
@@ -136,11 +155,11 @@ static void tce_iommu_release(void *iommu_data)
{
struct tce_container *container = iommu_data;
- WARN_ON(container->tbl && !container->tbl->it_group);
+ WARN_ON(container->grp);
tce_iommu_disable(container);
- if (container->tbl && container->tbl->it_group)
- tce_iommu_detach_group(iommu_data, container->tbl->it_group);
+ if (container->grp)
+ tce_iommu_detach_group(iommu_data, container->grp);
mutex_destroy(&container->lock);
@@ -160,8 +179,17 @@ static long tce_iommu_ioctl(void *iommu_data,
case VFIO_IOMMU_SPAPR_TCE_GET_INFO: {
struct vfio_iommu_spapr_tce_info info;
- struct iommu_table *tbl = container->tbl;
+ struct iommu_table *tbl;
+ struct spapr_tce_iommu_group *data;
+ if (WARN_ON(!container->grp))
+ return -ENXIO;
+
+ data = iommu_group_get_iommudata(container->grp);
+ if (WARN_ON(!data || !data->iommu_owner || !data->ops))
+ return -ENXIO;
+
+ tbl = data->ops->get_table(data, TCE_DEFAULT_WINDOW);
if (WARN_ON(!tbl))
return -ENXIO;
@@ -185,13 +213,16 @@ static long tce_iommu_ioctl(void *iommu_data,
}
case VFIO_IOMMU_MAP_DMA: {
struct vfio_iommu_type1_dma_map param;
- struct iommu_table *tbl = container->tbl;
+ struct iommu_table *tbl;
+ struct spapr_tce_iommu_group *data;
unsigned long tce, i;
- if (!tbl)
+ if (WARN_ON(!container->grp))
return -ENXIO;
- BUG_ON(!tbl->it_group);
+ data = iommu_group_get_iommudata(container->grp);
+ if (WARN_ON(!data || !data->iommu_owner || !data->ops))
+ return -ENXIO;
minsz = offsetofend(struct vfio_iommu_type1_dma_map, size);
@@ -216,6 +247,11 @@ static long tce_iommu_ioctl(void *iommu_data,
if (param.flags & VFIO_DMA_MAP_FLAG_WRITE)
tce |= TCE_PCI_WRITE;
+ tbl = data->ops->get_table(data, param.iova);
+ if (!tbl)
+ return -ENXIO;
+ BUG_ON(!tbl->it_group);
+
ret = iommu_tce_put_param_check(tbl, param.iova, tce);
if (ret)
return ret;
@@ -238,9 +274,14 @@ static long tce_iommu_ioctl(void *iommu_data,
}
case VFIO_IOMMU_UNMAP_DMA: {
struct vfio_iommu_type1_dma_unmap param;
- struct iommu_table *tbl = container->tbl;
+ struct iommu_table *tbl;
+ struct spapr_tce_iommu_group *data;
- if (WARN_ON(!tbl))
+ if (WARN_ON(!container->grp))
+ return -ENXIO;
+
+ data = iommu_group_get_iommudata(container->grp);
+ if (WARN_ON(!data || !data->iommu_owner || !data->ops))
return -ENXIO;
minsz = offsetofend(struct vfio_iommu_type1_dma_unmap,
@@ -259,6 +300,12 @@ static long tce_iommu_ioctl(void *iommu_data,
if (param.size & ~IOMMU_PAGE_MASK_4K)
return -EINVAL;
+ tbl = data->ops->get_table(data, param.iova);
+ if (WARN_ON(!tbl))
+ return -ENXIO;
+
+ BUG_ON(!tbl->it_group);
+
ret = iommu_tce_clear_param_check(tbl, param.iova, 0,
param.size >> IOMMU_PAGE_SHIFT_4K);
if (ret)
@@ -293,16 +340,16 @@ static int tce_iommu_attach_group(void *iommu_data,
{
int ret;
struct tce_container *container = iommu_data;
- struct iommu_table *tbl = iommu_group_get_iommudata(iommu_group);
+ struct iommu_table *tbl;
+ struct spapr_tce_iommu_group *data;
- BUG_ON(!tbl);
mutex_lock(&container->lock);
/* pr_debug("tce_vfio: Attaching group #%u to iommu %p\n",
iommu_group_id(iommu_group), iommu_group); */
- if (container->tbl) {
+ if (container->grp) {
pr_warn("tce_vfio: Only one group per IOMMU container is allowed, existing id=%d, attaching id=%d\n",
- iommu_group_id(container->tbl->it_group),
+ iommu_group_id(container->grp),
iommu_group_id(iommu_group));
ret = -EBUSY;
} else if (container->enabled) {
@@ -310,9 +357,16 @@ static int tce_iommu_attach_group(void *iommu_data,
iommu_group_id(iommu_group));
ret = -EBUSY;
} else {
+ data = iommu_group_get_iommudata(iommu_group);
+ if (WARN_ON(!data || !data->iommu_owner || !data->ops))
+ return -ENXIO;
+
+ tbl = data->ops->get_table(data, TCE_DEFAULT_WINDOW);
+ BUG_ON(!tbl);
+
ret = iommu_take_ownership(tbl);
if (!ret)
- container->tbl = tbl;
+ container->grp = iommu_group;
}
mutex_unlock(&container->lock);
@@ -324,24 +378,31 @@ static void tce_iommu_detach_group(void *iommu_data,
struct iommu_group *iommu_group)
{
struct tce_container *container = iommu_data;
- struct iommu_table *tbl = iommu_group_get_iommudata(iommu_group);
+ struct iommu_table *tbl;
+ struct spapr_tce_iommu_group *data;
- BUG_ON(!tbl);
mutex_lock(&container->lock);
- if (tbl != container->tbl) {
+ if (iommu_group != container->grp) {
pr_warn("tce_vfio: detaching group #%u, expected group is #%u\n",
iommu_group_id(iommu_group),
- iommu_group_id(tbl->it_group));
+ iommu_group_id(container->grp));
} else {
if (container->enabled) {
pr_warn("tce_vfio: detaching group #%u from enabled container, forcing disable\n",
- iommu_group_id(tbl->it_group));
+ iommu_group_id(container->grp));
tce_iommu_disable(container);
}
/* pr_debug("tce_vfio: detaching group #%u from iommu %p\n",
iommu_group_id(iommu_group), iommu_group); */
- container->tbl = NULL;
+ container->grp = NULL;
+
+ data = iommu_group_get_iommudata(iommu_group);
+ BUG_ON(!data || !data->iommu_owner || !data->ops);
+
+ tbl = data->ops->get_table(data, TCE_DEFAULT_WINDOW);
+ BUG_ON(!tbl);
+
iommu_release_ownership(tbl);
}
mutex_unlock(&container->lock);
--
2.0.0
^ permalink raw reply related
* [PATCH v4 05/16] powerpc/iommu: Fix comments with it_page_shift
From: Alexey Kardashevskiy @ 2014-07-30 9:31 UTC (permalink / raw)
To: linuxppc-dev
Cc: Alexey Kardashevskiy, Michael Ellerman, Paul Mackerras,
Gavin Shan
In-Reply-To: <1406712695-9491-1-git-send-email-aik@ozlabs.ru>
There is a couple of commented debug prints which still use
IOMMU_PAGE_SHIFT() which is not defined for POWERPC anymore, replace
them with it_page_shift.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
---
arch/powerpc/kernel/iommu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c
index 88e3ec6..f84f799 100644
--- a/arch/powerpc/kernel/iommu.c
+++ b/arch/powerpc/kernel/iommu.c
@@ -1037,7 +1037,7 @@ int iommu_tce_build(struct iommu_table *tbl, unsigned long entry,
/* if (unlikely(ret))
pr_err("iommu_tce: %s failed on hwaddr=%lx ioba=%lx kva=%lx ret=%d\n",
- __func__, hwaddr, entry << IOMMU_PAGE_SHIFT(tbl),
+ __func__, hwaddr, entry << tbl->it_page_shift,
hwaddr, ret); */
return ret;
@@ -1056,7 +1056,7 @@ int iommu_put_tce_user_mode(struct iommu_table *tbl, unsigned long entry,
direction != DMA_TO_DEVICE, &page);
if (unlikely(ret != 1)) {
/* pr_err("iommu_tce: get_user_pages_fast failed tce=%lx ioba=%lx ret=%d\n",
- tce, entry << IOMMU_PAGE_SHIFT(tbl), ret); */
+ tce, entry << tbl->it_page_shift, ret); */
return -EFAULT;
}
hwaddr = (unsigned long) page_address(page) + offset;
--
2.0.0
^ permalink raw reply related
* [PATCH v4 08/16] powerpc/powernv: Convert/move set_bypass() callback to take_ownership()
From: Alexey Kardashevskiy @ 2014-07-30 9:31 UTC (permalink / raw)
To: linuxppc-dev
Cc: Alexey Kardashevskiy, Michael Ellerman, Paul Mackerras,
Gavin Shan
In-Reply-To: <1406712695-9491-1-git-send-email-aik@ozlabs.ru>
At the moment the iommu_table struct has a set_bypass() which enables/
disables DMA bypass on IODA2 PHB. This is exposed to POWERPC IOMMU code
which calls this callback when external IOMMU users such as VFIO are
about to get over a PHB.
Since the set_bypass() is not really an iommu_table function but PE's
function, and we have an ops struct per IOMMU owner, let's move
set_bypass() to the spapr_tce_iommu_ops struct.
As arch/powerpc/kernel/iommu.c is more about POWERPC IOMMU tables and
has very little to do with PEs, this moves take_ownership() calls to
the VFIO SPAPR TCE driver.
This renames set_bypass() to take_ownership() as it is not necessarily
just enabling bypassing, it can be something else/more so let's give it
a generic name. The bool parameter is inverted.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
---
arch/powerpc/include/asm/iommu.h | 1 -
arch/powerpc/include/asm/tce.h | 2 ++
arch/powerpc/kernel/iommu.c | 12 ------------
arch/powerpc/platforms/powernv/pci-ioda.c | 18 +++++++++++-------
drivers/vfio/vfio_iommu_spapr_tce.c | 17 +++++++++++++++++
5 files changed, 30 insertions(+), 20 deletions(-)
diff --git a/arch/powerpc/include/asm/iommu.h b/arch/powerpc/include/asm/iommu.h
index 84ee339..2b0b01d 100644
--- a/arch/powerpc/include/asm/iommu.h
+++ b/arch/powerpc/include/asm/iommu.h
@@ -77,7 +77,6 @@ struct iommu_table {
#ifdef CONFIG_IOMMU_API
struct iommu_group *it_group;
#endif
- void (*set_bypass)(struct iommu_table *tbl, bool enable);
};
/* Pure 2^n version of get_order */
diff --git a/arch/powerpc/include/asm/tce.h b/arch/powerpc/include/asm/tce.h
index 8bfe98f..5ee4987 100644
--- a/arch/powerpc/include/asm/tce.h
+++ b/arch/powerpc/include/asm/tce.h
@@ -58,6 +58,8 @@ struct spapr_tce_iommu_ops {
struct iommu_table *(*get_table)(
struct spapr_tce_iommu_group *data,
phys_addr_t addr);
+ void (*take_ownership)(struct spapr_tce_iommu_group *data,
+ bool enable);
};
struct spapr_tce_iommu_group {
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c
index e203314..06984d5 100644
--- a/arch/powerpc/kernel/iommu.c
+++ b/arch/powerpc/kernel/iommu.c
@@ -1116,14 +1116,6 @@ int iommu_take_ownership(struct iommu_table *tbl)
memset(tbl->it_map, 0xff, sz);
iommu_clear_tces_and_put_pages(tbl, tbl->it_offset, tbl->it_size);
- /*
- * Disable iommu bypass, otherwise the user can DMA to all of
- * our physical memory via the bypass window instead of just
- * the pages that has been explicitly mapped into the iommu
- */
- if (tbl->set_bypass)
- tbl->set_bypass(tbl, false);
-
return 0;
}
EXPORT_SYMBOL_GPL(iommu_take_ownership);
@@ -1138,10 +1130,6 @@ void iommu_release_ownership(struct iommu_table *tbl)
/* Restore bit#0 set by iommu_init_table() */
if (tbl->it_offset == 0)
set_bit(0, tbl->it_map);
-
- /* The kernel owns the device now, we can restore the iommu bypass */
- if (tbl->set_bypass)
- tbl->set_bypass(tbl, true);
}
EXPORT_SYMBOL_GPL(iommu_release_ownership);
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
index 495137b..f828c57 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -709,10 +709,8 @@ static void pnv_pci_ioda_setup_dma_pe(struct pnv_phb *phb,
__free_pages(tce_mem, get_order(TCE32_TABLE_SIZE * segs));
}
-static void pnv_pci_ioda2_set_bypass(struct iommu_table *tbl, bool enable)
+static void pnv_pci_ioda2_set_bypass(struct pnv_ioda_pe *pe, bool enable)
{
- struct pnv_ioda_pe *pe = container_of(tbl, struct pnv_ioda_pe,
- tce32.table);
uint16_t window_id = (pe->pe_number << 1 ) + 1;
int64_t rc;
@@ -752,15 +750,21 @@ static void pnv_pci_ioda2_setup_bypass_pe(struct pnv_phb *phb,
/* TVE #1 is selected by PCI address bit 59 */
pe->tce_bypass_base = 1ull << 59;
- /* Install set_bypass callback for VFIO */
- pe->tce32.table.set_bypass = pnv_pci_ioda2_set_bypass;
-
/* Enable bypass by default */
- pnv_pci_ioda2_set_bypass(&pe->tce32.table, true);
+ pnv_pci_ioda2_set_bypass(pe, true);
+}
+
+static void pnv_ioda2_take_ownership(struct spapr_tce_iommu_group *data,
+ bool enable)
+{
+ struct pnv_ioda_pe *pe = data->iommu_owner;
+
+ pnv_pci_ioda2_set_bypass(pe, !enable);
}
static struct spapr_tce_iommu_ops pnv_pci_ioda2_ops = {
.get_table = pnv_ioda1_iommu_get_table,
+ .take_ownership = pnv_ioda2_take_ownership,
};
static void pnv_pci_ioda2_setup_dma_pe(struct pnv_phb *phb,
diff --git a/drivers/vfio/vfio_iommu_spapr_tce.c b/drivers/vfio/vfio_iommu_spapr_tce.c
index 46c2bc8..d9845af 100644
--- a/drivers/vfio/vfio_iommu_spapr_tce.c
+++ b/drivers/vfio/vfio_iommu_spapr_tce.c
@@ -47,6 +47,14 @@ struct tce_container {
bool enabled;
};
+
+static void tce_iommu_take_ownership_notify(struct spapr_tce_iommu_group *data,
+ bool enable)
+{
+ if (data && data->ops && data->ops->take_ownership)
+ data->ops->take_ownership(data, enable);
+}
+
static int tce_iommu_enable(struct tce_container *container)
{
int ret = 0;
@@ -367,6 +375,12 @@ static int tce_iommu_attach_group(void *iommu_data,
ret = iommu_take_ownership(tbl);
if (!ret)
container->grp = iommu_group;
+ /*
+ * Disable iommu bypass, otherwise the user can DMA to all of
+ * our physical memory via the bypass window instead of just
+ * the pages that has been explicitly mapped into the iommu
+ */
+ tce_iommu_take_ownership_notify(data, true);
}
mutex_unlock(&container->lock);
@@ -404,6 +418,9 @@ static void tce_iommu_detach_group(void *iommu_data,
BUG_ON(!tbl);
iommu_release_ownership(tbl);
+
+ /* Kernel owns the device now, we can restore bypass */
+ tce_iommu_take_ownership_notify(data, false);
}
mutex_unlock(&container->lock);
}
--
2.0.0
^ permalink raw reply related
* [PATCH v4 06/16] powerpc/powernv: Make invalidate() a callback
From: Alexey Kardashevskiy @ 2014-07-30 9:31 UTC (permalink / raw)
To: linuxppc-dev
Cc: Alexey Kardashevskiy, Michael Ellerman, Paul Mackerras,
Gavin Shan
In-Reply-To: <1406712695-9491-1-git-send-email-aik@ozlabs.ru>
At the moment pnv_pci_ioda_tce_invalidate() gets the PE pointer via
container_of(tbl). Since we are going to have to add Dynamic DMA windows
and that means having 2 IOMMU tables per PE, this is not going to work.
This implements pnv_pci_ioda(1|2)_tce_invalidate as a pnv_ioda_pe callback.
This adds a pnv_iommu_table wrapper around iommu_table and stores a pointer
to PE there. PNV's ppc_md.tce_build() call uses this to find PE and
do the invalidation. This will be used later for Dynamic DMA windows too.
This registers invalidate() callbacks for IODA1 and IODA2:
- pnv_pci_ioda1_tce_invalidate;
- pnv_pci_ioda2_tce_invalidate.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
Changes:
v4:
* changed commit log to explain why this change is needed
---
arch/powerpc/platforms/powernv/pci-ioda.c | 33 +++++++++++--------------------
arch/powerpc/platforms/powernv/pci.c | 31 +++++++++++++++++++++--------
arch/powerpc/platforms/powernv/pci.h | 13 +++++++++++-
3 files changed, 47 insertions(+), 30 deletions(-)
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
index 9f28e18..007497f 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -462,7 +462,7 @@ static void pnv_pci_ioda_dma_dev_setup(struct pnv_phb *phb, struct pci_dev *pdev
pe = &phb->ioda.pe_array[pdn->pe_number];
WARN_ON(get_dma_ops(&pdev->dev) != &dma_iommu_ops);
- set_iommu_table_base(&pdev->dev, &pe->tce32_table);
+ set_iommu_table_base(&pdev->dev, &pe->tce32.table);
}
static int pnv_pci_ioda_dma_set_mask(struct pnv_phb *phb,
@@ -489,7 +489,7 @@ static int pnv_pci_ioda_dma_set_mask(struct pnv_phb *phb,
} else {
dev_info(&pdev->dev, "Using 32-bit DMA via iommu\n");
set_dma_ops(&pdev->dev, &dma_iommu_ops);
- set_iommu_table_base(&pdev->dev, &pe->tce32_table);
+ set_iommu_table_base(&pdev->dev, &pe->tce32.table);
}
return 0;
}
@@ -499,7 +499,7 @@ static void pnv_ioda_setup_bus_dma(struct pnv_ioda_pe *pe, struct pci_bus *bus)
struct pci_dev *dev;
list_for_each_entry(dev, &bus->devices, bus_list) {
- set_iommu_table_base_and_group(&dev->dev, &pe->tce32_table);
+ set_iommu_table_base_and_group(&dev->dev, &pe->tce32.table);
if (dev->subordinate)
pnv_ioda_setup_bus_dma(pe, dev->subordinate);
}
@@ -584,19 +584,6 @@ static void pnv_pci_ioda2_tce_invalidate(struct pnv_ioda_pe *pe,
}
}
-void pnv_pci_ioda_tce_invalidate(struct iommu_table *tbl,
- __be64 *startp, __be64 *endp, bool rm)
-{
- struct pnv_ioda_pe *pe = container_of(tbl, struct pnv_ioda_pe,
- tce32_table);
- struct pnv_phb *phb = pe->phb;
-
- if (phb->type == PNV_PHB_IODA1)
- pnv_pci_ioda1_tce_invalidate(pe, tbl, startp, endp, rm);
- else
- pnv_pci_ioda2_tce_invalidate(pe, tbl, startp, endp, rm);
-}
-
static void pnv_pci_ioda_setup_dma_pe(struct pnv_phb *phb,
struct pnv_ioda_pe *pe, unsigned int base,
unsigned int segs)
@@ -654,9 +641,11 @@ static void pnv_pci_ioda_setup_dma_pe(struct pnv_phb *phb,
}
/* Setup linux iommu table */
- tbl = &pe->tce32_table;
+ tbl = &pe->tce32.table;
pnv_pci_setup_iommu_table(tbl, addr, TCE32_TABLE_SIZE * segs,
base << 28, IOMMU_PAGE_SHIFT_4K);
+ pe->tce32.pe = pe;
+ pe->tce_invalidate = pnv_pci_ioda1_tce_invalidate;
/* OPAL variant of P7IOC SW invalidated TCEs */
swinvp = of_get_property(phb->hose->dn, "ibm,opal-tce-kill", NULL);
@@ -693,7 +682,7 @@ static void pnv_pci_ioda_setup_dma_pe(struct pnv_phb *phb,
static void pnv_pci_ioda2_set_bypass(struct iommu_table *tbl, bool enable)
{
struct pnv_ioda_pe *pe = container_of(tbl, struct pnv_ioda_pe,
- tce32_table);
+ tce32.table);
uint16_t window_id = (pe->pe_number << 1 ) + 1;
int64_t rc;
@@ -734,10 +723,10 @@ static void pnv_pci_ioda2_setup_bypass_pe(struct pnv_phb *phb,
pe->tce_bypass_base = 1ull << 59;
/* Install set_bypass callback for VFIO */
- pe->tce32_table.set_bypass = pnv_pci_ioda2_set_bypass;
+ pe->tce32.table.set_bypass = pnv_pci_ioda2_set_bypass;
/* Enable bypass by default */
- pnv_pci_ioda2_set_bypass(&pe->tce32_table, true);
+ pnv_pci_ioda2_set_bypass(&pe->tce32.table, true);
}
static void pnv_pci_ioda2_setup_dma_pe(struct pnv_phb *phb,
@@ -785,9 +774,11 @@ static void pnv_pci_ioda2_setup_dma_pe(struct pnv_phb *phb,
}
/* Setup linux iommu table */
- tbl = &pe->tce32_table;
+ tbl = &pe->tce32.table;
pnv_pci_setup_iommu_table(tbl, addr, tce_table_size, 0,
IOMMU_PAGE_SHIFT_4K);
+ pe->tce32.pe = pe;
+ pe->tce_invalidate = pnv_pci_ioda2_tce_invalidate;
/* OPAL variant of PHB3 invalidated TCEs */
swinvp = of_get_property(phb->hose->dn, "ibm,opal-tce-kill", NULL);
diff --git a/arch/powerpc/platforms/powernv/pci.c b/arch/powerpc/platforms/powernv/pci.c
index 4dff552..74a2626 100644
--- a/arch/powerpc/platforms/powernv/pci.c
+++ b/arch/powerpc/platforms/powernv/pci.c
@@ -550,6 +550,27 @@ struct pci_ops pnv_pci_ops = {
.write = pnv_pci_write_config,
};
+static void pnv_tce_invalidate(struct iommu_table *tbl, __be64 *startp,
+ __be64 *endp, bool rm)
+{
+ struct pnv_iommu_table *ptbl = container_of(tbl,
+ struct pnv_iommu_table, table);
+ struct pnv_ioda_pe *pe = ptbl->pe;
+
+ /*
+ * Some implementations won't cache invalid TCEs and thus may not
+ * need that flush. We'll probably turn it_type into a bit mask
+ * of flags if that becomes the case
+ */
+ if (!(tbl->it_type & TCE_PCI_SWINV_FREE))
+ return;
+
+ if (!pe || !pe->tce_invalidate)
+ return;
+
+ pe->tce_invalidate(pe, tbl, startp, endp, rm);
+}
+
static int pnv_tce_build(struct iommu_table *tbl, long index, long npages,
unsigned long uaddr, enum dma_data_direction direction,
struct dma_attrs *attrs, bool rm)
@@ -570,12 +591,7 @@ static int pnv_tce_build(struct iommu_table *tbl, long index, long npages,
*(tcep++) = cpu_to_be64(proto_tce |
(rpn++ << tbl->it_page_shift));
- /* Some implementations won't cache invalid TCEs and thus may not
- * need that flush. We'll probably turn it_type into a bit mask
- * of flags if that becomes the case
- */
- if (tbl->it_type & TCE_PCI_SWINV_CREATE)
- pnv_pci_ioda_tce_invalidate(tbl, tces, tcep - 1, rm);
+ pnv_tce_invalidate(tbl, tces, tcep - 1, rm);
return 0;
}
@@ -599,8 +615,7 @@ static void pnv_tce_free(struct iommu_table *tbl, long index, long npages,
while (npages--)
*(tcep++) = cpu_to_be64(0);
- if (tbl->it_type & TCE_PCI_SWINV_FREE)
- pnv_pci_ioda_tce_invalidate(tbl, tces, tcep - 1, rm);
+ pnv_tce_invalidate(tbl, tces, tcep - 1, rm);
}
static void pnv_tce_free_vm(struct iommu_table *tbl, long index, long npages)
diff --git a/arch/powerpc/platforms/powernv/pci.h b/arch/powerpc/platforms/powernv/pci.h
index 6f5ff69..32847a5 100644
--- a/arch/powerpc/platforms/powernv/pci.h
+++ b/arch/powerpc/platforms/powernv/pci.h
@@ -22,6 +22,16 @@ enum pnv_phb_model {
#define PNV_IODA_PE_BUS (1 << 1) /* PE has primary PCI bus */
#define PNV_IODA_PE_BUS_ALL (1 << 2) /* PE has subordinate buses */
+struct pnv_ioda_pe;
+typedef void (*pnv_invalidate_fn)(struct pnv_ioda_pe *pe,
+ struct iommu_table *tbl,
+ __be64 *startp, __be64 *endp, bool rm);
+
+struct pnv_iommu_table {
+ struct iommu_table table;
+ struct pnv_ioda_pe *pe;
+};
+
/* Data associated with a PE, including IOMMU tracking etc.. */
struct pnv_phb;
struct pnv_ioda_pe {
@@ -49,9 +59,10 @@ struct pnv_ioda_pe {
unsigned int dma_weight;
/* "Base" iommu table, ie, 4K TCEs, 32-bit DMA */
+ pnv_invalidate_fn tce_invalidate;
int tce32_seg;
int tce32_segcount;
- struct iommu_table tce32_table;
+ struct pnv_iommu_table tce32;
phys_addr_t tce_inval_reg_phys;
/* 64-bit TCE bypass region */
--
2.0.0
^ permalink raw reply related
* [PATCH v4 09/16] powerpc/iommu: Fix IOMMU ownership control functions
From: Alexey Kardashevskiy @ 2014-07-30 9:31 UTC (permalink / raw)
To: linuxppc-dev
Cc: Alexey Kardashevskiy, Michael Ellerman, Paul Mackerras,
Gavin Shan
In-Reply-To: <1406712695-9491-1-git-send-email-aik@ozlabs.ru>
This adds missing locks in iommu_take_ownership()/
iommu_release_ownership().
This marks all pages busy in iommu_table::it_map in order to catch
errors if there is an attempt to use this table while ownership over it
is taken.
This only clears TCE content if there is no page marked busy in it_map.
Clearing must be done outside of the table locks as iommu_clear_tce()
called from iommu_clear_tces_and_put_pages() does this.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
arch/powerpc/kernel/iommu.c | 36 +++++++++++++++++++++++++++++-------
1 file changed, 29 insertions(+), 7 deletions(-)
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c
index 06984d5..c94b11d 100644
--- a/arch/powerpc/kernel/iommu.c
+++ b/arch/powerpc/kernel/iommu.c
@@ -1103,33 +1103,55 @@ EXPORT_SYMBOL_GPL(iommu_put_tce_user_mode);
int iommu_take_ownership(struct iommu_table *tbl)
{
- unsigned long sz = (tbl->it_size + 7) >> 3;
+ unsigned long flags, i, sz = (tbl->it_size + 7) >> 3;
+ int ret = 0, bit0 = 0;
+
+ spin_lock_irqsave(&tbl->large_pool.lock, flags);
+ for (i = 0; i < tbl->nr_pools; i++)
+ spin_lock(&tbl->pools[i].lock);
if (tbl->it_offset == 0)
- clear_bit(0, tbl->it_map);
+ bit0 = test_and_clear_bit(0, tbl->it_map);
if (!bitmap_empty(tbl->it_map, tbl->it_size)) {
pr_err("iommu_tce: it_map is not empty");
- return -EBUSY;
+ ret = -EBUSY;
+ if (bit0)
+ set_bit(0, tbl->it_map);
+ } else {
+ memset(tbl->it_map, 0xff, sz);
}
- memset(tbl->it_map, 0xff, sz);
- iommu_clear_tces_and_put_pages(tbl, tbl->it_offset, tbl->it_size);
+ for (i = 0; i < tbl->nr_pools; i++)
+ spin_unlock(&tbl->pools[i].lock);
+ spin_unlock_irqrestore(&tbl->large_pool.lock, flags);
- return 0;
+ if (!ret)
+ iommu_clear_tces_and_put_pages(tbl, tbl->it_offset,
+ tbl->it_size);
+ return ret;
}
EXPORT_SYMBOL_GPL(iommu_take_ownership);
void iommu_release_ownership(struct iommu_table *tbl)
{
- unsigned long sz = (tbl->it_size + 7) >> 3;
+ unsigned long flags, i, sz = (tbl->it_size + 7) >> 3;
iommu_clear_tces_and_put_pages(tbl, tbl->it_offset, tbl->it_size);
+
+ spin_lock_irqsave(&tbl->large_pool.lock, flags);
+ for (i = 0; i < tbl->nr_pools; i++)
+ spin_lock(&tbl->pools[i].lock);
+
memset(tbl->it_map, 0, sz);
/* Restore bit#0 set by iommu_init_table() */
if (tbl->it_offset == 0)
set_bit(0, tbl->it_map);
+
+ for (i = 0; i < tbl->nr_pools; i++)
+ spin_unlock(&tbl->pools[i].lock);
+ spin_unlock_irqrestore(&tbl->large_pool.lock, flags);
}
EXPORT_SYMBOL_GPL(iommu_release_ownership);
--
2.0.0
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox