]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
8 years agoMerge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux...
Michael Ellerman [Mon, 2 Nov 2015 02:59:48 +0000 (13:59 +1100)]
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux into next

Freescale updates from Scott:

"Highlights include 64-bit book3e kexec/kdump support, a rework of the
qoriq clock driver, device tree changes including qoriq fman nodes,
support for a new 85xx board, and some fixes.

Note that there is a trivial merge conflict with the clock tree's next
branch, in the clock Makefile."

8 years agopowerpc/msi: Fix section mismatch warning in msi_bitmap_alloc()
Denis Kirjanov [Wed, 21 Oct 2015 11:29:13 +0000 (14:29 +0300)]
powerpc/msi: Fix section mismatch warning in msi_bitmap_alloc()

Building with CONFIG_DEBUG_SECTION_MISMATCH gives the following warning:

  The function .msi_bitmap_alloc() references
  the function __init .memblock_virt_alloc_try_nid().

Memory allocation in msi_bitmap_alloc() uses either slab allocator or
memblock boot time allocator depending on slab_is_available().

So the section mismatch warning is correct, but in practice there is no
bug so mark msi_bitmap_alloc() as __init_refok.

Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
[mpe: Flesh out change log a bit]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/prom: Use of_get_next_parent() in of_get_ibm_chip_id()
Michael Ellerman [Mon, 26 Oct 2015 00:48:46 +0000 (09:48 +0900)]
powerpc/prom: Use of_get_next_parent() in of_get_ibm_chip_id()

Use of_get_next_parent() to simplifiy the logic in of_get_ibm_chip_id().

Original-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/pseries: Correct string length in pseries_of_derive_parent()
Nathan Fontenot [Tue, 27 Oct 2015 15:46:47 +0000 (10:46 -0500)]
powerpc/pseries: Correct string length in pseries_of_derive_parent()

Commit a030e1e4bbd085bbcfd0a23f8d355fcd41f39bed make a change to use
kstrndup() instead of kmalloc() + strlcpy() in the pseries_of_derive_parent()
routine that introduces a subtle change in the parent path name generated.
The kstrndup() routine will copy n characters followed by a terminating null,
whereas strlcpy() will copy n-1 characters and add a terminating null.

This slight difference results in having a parent path that includes the
tailing '/' character, "/cpus/" vs. "/cpus". This then causes the subsequent
call to of_find_node_by_path() to fail, and in the case of DLPAR add
operations the DLPAR request fails.

This patch decrements the pointer returned from kbasename() to point to the
'/' character before the base name instead of the base name. This then
adjusts the string length calculations to not include the trailing '/'
in the parent path name.

Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/e6500: hw tablewalk: make sure we invalidate and write to the same tlb entry
Kevin Hao [Thu, 22 Oct 2015 12:23:48 +0000 (20:23 +0800)]
powerpc/e6500: hw tablewalk: make sure we invalidate and write to the same tlb entry

In order to workaround Erratum A-008139, we have to invalidate the
tlb entry with tlbilx before overwriting. Due to the performance
consideration, we don't add any memory barrier when acquire/release
the tcd lock. This means the two load instructions for esel_next do
have the possibility to return different value. This is definitely
not acceptable due to the Erratum A-008139. We have two options to
fix this issue:
  a) Add memory barrier when acquire/release tcd lock to order the
     load/store to esel_next.
  b) Just make sure to invalidate and write to the same tlb entry and
     tolerate the race that we may get the wrong value and overwrite
     the tlb entry just updated by the other thread.

We observe better performance using option b. So reserve an additional
register to save the value of the esel_next.

Signed-off-by: Kevin Hao <haokexin@gmail.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
8 years agopowerpc/mpc85xx: Add FSL QorIQ DPAA FMan support to the SoC device tree(s)
Igal Liberman [Wed, 5 Aug 2015 03:42:07 +0000 (06:42 +0300)]
powerpc/mpc85xx: Add FSL QorIQ DPAA FMan support to the SoC device tree(s)

Based on prior work by Andy Fleming <afleming@freescale.com>

Signed-off-by: Shruti Kanetkar <Shruti@freescale.com>
Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
Signed-off-by: Igal Liberman <Igal.Liberman@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
8 years agopowerpc/mpc85xx: Create dts components for the FSL QorIQ DPAA FMan
Igal Liberman [Wed, 5 Aug 2015 03:38:12 +0000 (06:38 +0300)]
powerpc/mpc85xx: Create dts components for the FSL QorIQ DPAA FMan

Based on prior work by Andy Fleming <afleming@freescale.com>

Signed-off-by: Shruti Kanetkar <Shruti@freescale.com>
Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
Signed-off-by: Igal Liberman <Igal.Liberman@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
8 years agopowerpc/fsl: Add #clock-cells and clockgen label to clockgen nodes
Scott Wood [Tue, 27 Oct 2015 22:41:16 +0000 (17:41 -0500)]
powerpc/fsl: Add #clock-cells and clockgen label to clockgen nodes

This allows new-style clock references to be used, which is needed for
fman.  The old clock nodes will be removed and all clock references
converted to new-style once the qoriq-cpufreq driver is updated to stop
depending on the old-style references in cpu nodes.

Signed-off-by: Scott Wood <scottwood@freescale.com>
8 years agoMerge branch 'clock' into HEAD
Scott Wood [Tue, 27 Oct 2015 23:14:16 +0000 (18:14 -0500)]
Merge branch 'clock' into HEAD

This is a major overhaul of the clk-qoriq driver, which I'm merging
via PPC with Stephen Boyd's ack in order to apply subsequent PPC patches
that depend on it.

8 years agopowerpc: handle error case in cpm_muram_alloc()
Christophe Leroy [Fri, 21 Aug 2015 16:48:31 +0000 (18:48 +0200)]
powerpc: handle error case in cpm_muram_alloc()

rh_alloc() returns (unsigned long)-ERRxx on error, which may
result in overwriting memory outside the MURAM AREA.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Scott Wood <scottwood@freescale.com>
8 years agopowerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake
Sudeep Holla [Mon, 21 Sep 2015 15:47:00 +0000 (16:47 +0100)]
powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake

mpic_irq_set_wake return -ENXIO for non FSL MPIC and sets IRQF_NO_SUSPEND
flag for FSL ones. enable_irq_wake already returns -ENXIO if irq_set_wak
is not implemented. Also there's no need to set the IRQF_NO_SUSPEND flag
as it doesn't guarantee wakeup for that interrupt.

This patch removes the redundant mpic_irq_set_wake and sets the
IRQCHIP_SKIP_SET_WAKE for only FSL MPIC.

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Hongtao Jia <hongtao.jia@freescale.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
8 years agopowerpc/book3e-64: Enable kexec
Tiejun Chen [Wed, 7 Oct 2015 03:48:22 +0000 (22:48 -0500)]
powerpc/book3e-64: Enable kexec

Allow KEXEC for book3e, and bypass or convert non-book3e stuff
in kexec code.

Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
[scottwood@freescale.com: move code to minimize diff, and cleanup]
Signed-off-by: Scott Wood <scottwood@freescale.com>
8 years agopowerpc/book3e-64/kexec: Set "r4 = 0" when entering spinloop
Scott Wood [Wed, 7 Oct 2015 03:48:21 +0000 (22:48 -0500)]
powerpc/book3e-64/kexec: Set "r4 = 0" when entering spinloop

book3e_secondary_core_init will only create a TLB entry if r4 = 0,
so do so.

Signed-off-by: Scott Wood <scottwood@freescale.com>
8 years agopowerpc/booke: Only use VIRT_PHYS_OFFSET on booke32
Scott Wood [Wed, 7 Oct 2015 03:48:20 +0000 (22:48 -0500)]
powerpc/booke: Only use VIRT_PHYS_OFFSET on booke32

The way VIRT_PHYS_OFFSET is not correct on book3e-64, because
it does not account for CONFIG_RELOCATABLE other than via the
32-bit-only virt_phys_offset.

book3e-64 can (and if the comment about a GCC miscompilation is still
relevant, should) use the normal ppc64 __va/__pa.

At this point, only booke-32 will use VIRT_PHYS_OFFSET, so given the
issues with its calculation, restrict its definition to booke-32.

Signed-off-by: Scott Wood <scottwood@freescale.com>
8 years agopowerpc/book3e-64/kexec: Enable SMP release
Scott Wood [Wed, 7 Oct 2015 03:48:19 +0000 (22:48 -0500)]
powerpc/book3e-64/kexec: Enable SMP release

The SMP release mechanism for FSL book3e is different from when booting
with normal hardware.  In theory we could simulate the normal spin
table mechanism, but not at the addresses U-Boot put in the device tree
-- so there'd need to be even more communication between the kernel and
kexec to set that up.  Instead, kexec-tools will set a boolean property
linux,booted-from-kexec in the /chosen node.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Cc: devicetree@vger.kernel.org
8 years agopowerpc/book3e-64/kexec: create an identity TLB mapping
Tiejun Chen [Wed, 7 Oct 2015 03:48:18 +0000 (22:48 -0500)]
powerpc/book3e-64/kexec: create an identity TLB mapping

book3e has no real MMU mode so we have to create an identity TLB
mapping to make sure we can access the real physical address.

Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
[scottwood: cleanup, and split off some changes]
Signed-off-by: Scott Wood <scottwood@freescale.com>
8 years agopowerpc/book3e-64: Don't limit paca to 256 MiB
Scott Wood [Wed, 7 Oct 2015 03:48:17 +0000 (22:48 -0500)]
powerpc/book3e-64: Don't limit paca to 256 MiB

This limit only makes sense on book3s, and on book3e it can cause
problems with kdump if we don't have any memory under 256 MiB.

Signed-off-by: Scott Wood <scottwood@freescale.com>
8 years agopowerpc/book3e/kdump: Enable crash_kexec_wait_realmode
Scott Wood [Wed, 7 Oct 2015 03:48:16 +0000 (22:48 -0500)]
powerpc/book3e/kdump: Enable crash_kexec_wait_realmode

While book3e doesn't have "real mode", we still want to wait for
all the non-crash cpus to complete their shutdown.

Signed-off-by: Scott Wood <scottwood@freescale.com>
8 years agopowerpc/book3e: support CONFIG_RELOCATABLE
Tiejun Chen [Wed, 7 Oct 2015 03:48:15 +0000 (22:48 -0500)]
powerpc/book3e: support CONFIG_RELOCATABLE

book3e is different with book3s since 3s includes the exception
vectors code in head_64.S as it relies on absolute addressing
which is only possible within this compilation unit. So we have
to get that label address with got.

And when boot a relocated kernel, we should reset ipvr properly again
after .relocate.

Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
[scottwood: cleanup and ifdef removal]
Signed-off-by: Scott Wood <scottwood@freescale.com>
8 years agopowerpc/booke64: Fix args to copy_and_flush
Tiejun Chen [Wed, 7 Oct 2015 03:48:14 +0000 (22:48 -0500)]
powerpc/booke64: Fix args to copy_and_flush

Convert r4/r5, not r6, to a virtual address when calling
copy_and_flush.  Otherwise, r3 is already virtual, and copy_to_flush
tries to access r3+r6, PAGE_OFFSET gets added twice.

This isn't normally seen because on book3e we normally enter with
the kernel at zero and thus skip copy_to_flush -- but it will be
needed for kexec support.

Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
[scottwood: split patch and rewrote changelog]
Signed-off-by: Scott Wood <scottwood@freescale.com>
8 years agopowerpc/book3e-64: rename interrupt_end_book3e with __end_interrupts
Tiejun Chen [Wed, 7 Oct 2015 03:48:13 +0000 (22:48 -0500)]
powerpc/book3e-64: rename interrupt_end_book3e with __end_interrupts

Rename 'interrupt_end_book3e' to '__end_interrupts' so that the symbol
can be used by both book3s and book3e.

Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
[scottwood: edit changelog]
Signed-off-by: Scott Wood <scottwood@freescale.com>
8 years agopowerpc/e6500: kexec: Handle hardware threads
Scott Wood [Wed, 7 Oct 2015 03:48:12 +0000 (22:48 -0500)]
powerpc/e6500: kexec: Handle hardware threads

The new kernel will be expecting secondary threads to be disabled,
not spinning.

Signed-off-by: Scott Wood <scottwood@freescale.com>
8 years agopowerpc/85xx: Implement 64-bit kexec support
Tiejun Chen [Wed, 7 Oct 2015 03:48:11 +0000 (22:48 -0500)]
powerpc/85xx: Implement 64-bit kexec support

Unlike 32-bit 85xx kexec, we don't do a core reset.

Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
[scottwood: edit changelog, and cleanup]
Signed-off-by: Scott Wood <scottwood@freescale.com>
8 years agopowerpc/fsl-booke-64: Don't limit ppc64_rma_size to one TLB entry
Scott Wood [Wed, 7 Oct 2015 03:48:10 +0000 (22:48 -0500)]
powerpc/fsl-booke-64: Don't limit ppc64_rma_size to one TLB entry

This is required for kdump to work when loaded at at an address that
does not fall within the first TLB entry -- which can easily happen
because while the lower limit is enforced via reserved memory, which
doesn't affect how much is mapped, the upper limit is enforced via a
different mechanism that does.  Thus, more TLB entries are needed than
would normally be used, as the total memory to be mapped might not be a
power of two.

Signed-off-by: Scott Wood <scottwood@freescale.com>
8 years agoclk: qoriq: Add ls1043a support.
Hou Zhiqiang [Fri, 23 Oct 2015 08:01:21 +0000 (16:01 +0800)]
clk: qoriq: Add ls1043a support.

Signed-off-by: Hou Zhiqiang <B48286@freescale.com>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Scott Wood <scottwood@freescale.com>
8 years agoclk: qoriq: Fix wrong data in p2041_cmux_grp2
Scott Wood [Fri, 23 Oct 2015 04:21:46 +0000 (23:21 -0500)]
clk: qoriq: Fix wrong data in p2041_cmux_grp2

Signed-off-by: Scott Wood <scottwood@freescale.com>
8 years agopowerpc/85xx: Load all early TLB entries at once
Scott Wood [Wed, 7 Oct 2015 03:48:09 +0000 (22:48 -0500)]
powerpc/85xx: Load all early TLB entries at once

Use an AS=1 trampoline TLB entry to allow all normal TLB1 entries to
be loaded at once.  This avoids the need to keep the translation that
code is executing from in the same TLB entry in the final TLB
configuration as during early boot, which in turn is helpful for
relocatable kernels (e.g. kdump) where the kernel is not running from
what would be the first TLB entry.

On e6500, we limit map_mem_in_cams() to the primary hwthread of a
core (the boot cpu is always considered primary, as a kdump kernel
can be entered on any cpu).  Each TLB only needs to be set up once,
and when we do, we don't want another thread to be running when we
create a temporary trampoline TLB1 entry.

Signed-off-by: Scott Wood <scottwood@freescale.com>
8 years agoclk: qoriq: Add ls2080a support.
Scott Wood [Sun, 20 Sep 2015 04:29:55 +0000 (23:29 -0500)]
clk: qoriq: Add ls2080a support.

LS2080A is the first implementation of the chassis 3 clockgen, which
has a different register layout than previous chips.  It is also little
endian, unlike previous chips.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: qoriq: Move chip-specific knowledge into driver
Scott Wood [Sun, 20 Sep 2015 04:29:54 +0000 (23:29 -0500)]
clk: qoriq: Move chip-specific knowledge into driver

The device tree should describe the chips (or chip-like subblocks) in
the system, but it generally does not describe individual registers --
it should identify, rather than describe, a programming interface.

This has not been the case with the QorIQ clockgen nodes.  The
knowledge of what each bit setting of CLKCnCSR means is encoded in
three places (binding, pll node, and mux node), and the last also needs
to know which options are valid on a particular chip.  All three of
these locations are considered stable ABI, making it difficult to fix
mistakes (of which I have found several), much less refactor the
abstraction to be able to address problems, limitations, or new chips.

Under the current binding, a pll clock specifier of 2 means that the
PLL is divided by 4 -- and the driver implements this, unless there
happen to be four clock-output-names rather than 3, in which case it
interprets it as PLL divided by 3.  This does not appear in the binding
documentation at all.  That hack is now considered stable ABI.

The current device tree nodes contain errors, such as saying that
T1040 can set a core clock to PLL/4 when only PLL and PLL/2 are options.
The current binding also ignores some restrictions on clock selection,
such as p5020's requirement that if a core uses the "wrong" PLL, that
PLL must be clocked lower than the "correct" PLL and be at most 80% of
the rated CPU frequency.

Possibly because of the lack of the ability to express such nuance in
the binding, some valid options are omitted from the device trees, such
as the ability on p4080 to run cores 0-3 from PLL3 and cores 4-7 from
PLL1 (again, only if they are at most 80% of rated CPU frequency).
This omission, combined with excessive caution in the cpufreq driver
(addressed in a subsequent patch), means that currently on a 1500 MHz
p4080 with typical PLL configuration, cpufreq can lower the frequency
to 1200 MHz on half the CPUs and do nothing on the others.  With this
patchset, all CPUs can be lowered to 1200 MHz on a rev2 p4080, and on a
rev3 p4080 half can be lowered to 750 MHz and the other half to 600
MHz.

The current binding only deals with CPU clocks.  To describe FMan in
the device tree, we need to describe its clock.  Some chips have
additional muxes that work like the CPU muxes, but are not described in
the device tree.  Others require inspecting the Reset Control Word to
determine which PLL is used.  Rather than continue to extend this mess,
replace it.  Have the driver bind to the chip-specific clockgen
compatible, and keep the detailed description of quirky chip variations
in the driver, where it can be easily fixed, refactored, and extended.

Older device trees will continue to work (including a workaround for
old ls1021a device trees that are missing compatible and reg in the
clockgen node, which even the old binding required).  The pll/mux
details in old device trees will be ignored, but "clocks" properties
pointing at the old nodes will still work, and be directed at the
corresponding new clock.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agopowerpc/fsl: Move fsl_guts.h out of arch/powerpc
Scott Wood [Sun, 20 Sep 2015 04:29:53 +0000 (23:29 -0500)]
powerpc/fsl: Move fsl_guts.h out of arch/powerpc

Freescale's Layerscape ARM chips use the same structure.

Signed-off-by: Scott Wood <scottwood@freescale.com>
8 years agopowerpc/eeh: Fix recursive fenced PHB on Broadcom shiner adapter
Gavin Shan [Thu, 15 Oct 2015 04:22:35 +0000 (15:22 +1100)]
powerpc/eeh: Fix recursive fenced PHB on Broadcom shiner adapter

Similar to commit b6541db ("powerpc/eeh: Block PCI config access
upon frozen PE"), this blocks the PCI config space of Broadcom
Shiner adapter until PE reset is completed, to avoid recursive
fenced PHB when dumping PCI config registers during the period
of error recovery.

   ~# lspci -ns 0003:03:00.0
   0003:03:00.0 0200: 14e4:168a (rev 10)
   ~# lspci -s 0003:03:00.0
   0003:03:00.0 Ethernet controller: Broadcom Corporation \
                NetXtreme II BCM57800 1/10 Gigabit Ethernet (rev 10)

Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/powernv: Simplify pnv_eeh_set_option()
Gavin Shan [Thu, 8 Oct 2015 03:58:59 +0000 (14:58 +1100)]
powerpc/powernv: Simplify pnv_eeh_set_option()

This simplifies pnv_eeh_set_option() to avoid unnecessary nested
if statements, to improve readability. No functional changes.

Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/powernv: Remove pnv_eeh_cap_start()
Gavin Shan [Thu, 8 Oct 2015 03:58:58 +0000 (14:58 +1100)]
powerpc/powernv: Remove pnv_eeh_cap_start()

This moves the logic of pnv_eeh_cap_start() to pnv_eeh_find_cap()
as the function is only called by pnv_eeh_find_cap(). The logic
of both functions are pretty simple. No need to have separate
functions.

Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/powernv: Cleanup on EEH comments
Gavin Shan [Thu, 8 Oct 2015 03:58:57 +0000 (14:58 +1100)]
powerpc/powernv: Cleanup on EEH comments

This applies cleanup on eeh-powernv.c, no functional changes:

   * Remove unnecessary comments and empty line.
   * Correct inaccurate comments.

Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/pseries: Cleanup on pseries_eeh_get_state()
Gavin Shan [Thu, 8 Oct 2015 03:58:56 +0000 (14:58 +1100)]
powerpc/pseries: Cleanup on pseries_eeh_get_state()

This cleans up pseries_eeh_get_state(), no functional changes:

   * Return EEH_STATE_NOT_SUPPORT early when the 2nd RTAS output
     argument is zero to avoid nested if statements.
   * Skip clearing bits in the PE state represented by variable
     "result" to simplify the code.

Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/eeh: More relaxed condition for enabled IO path
Gavin Shan [Thu, 8 Oct 2015 03:58:55 +0000 (14:58 +1100)]
powerpc/eeh: More relaxed condition for enabled IO path

When one or both of the below two flags are marked in the PE state, the
PE's IO path is regarded as enabled: EEH_STATE_MMIO_ACTIVE or
EEH_STATE_MMIO_ENABLED.

Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/eeh: Force reset on fenced PHB
Gavin Shan [Thu, 8 Oct 2015 03:58:54 +0000 (14:58 +1100)]
powerpc/eeh: Force reset on fenced PHB

On fenced PHB, the error handlers in the drivers of its subordinate
devices could return PCI_ERS_RESULT_CAN_RECOVER, indicating no reset
will be issued during the recovery. It's conflicting with the fact
that fenced PHB won't be recovered without reset.

This limits the return value from the error handlers in the drivers
of the fenced PHB's subordinate devices to PCI_ERS_RESULT_NEED_NONE
or PCI_ERS_RESULT_NEED_RESET, to ensure reset will be issued during
recovery.

Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Reviewed-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/eeh: More relaxed hotplug criterion
Gavin Shan [Thu, 8 Oct 2015 03:58:53 +0000 (14:58 +1100)]
powerpc/eeh: More relaxed hotplug criterion

Currently, we rely on the existence of struct pci_driver::err_handler
to decide if the corresponding PCI device should be unplugged during
EEH recovery (partially hotplug case). However that check is not
sufficient. Some device drivers implement only some of the EEH error
handlers to collect diag-data. That means the driver still expects a
hotplug to recover from the EEH error.

This makes the hotplug criterion more relaxed: if the device driver
doesn't provide all necessary EEH error handlers, it will experience
hotplug during EEH recovery.

Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
[mpe: Minor change log rewording]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/eeh: Don't unfreeze PHB PE after reset
Gavin Shan [Thu, 8 Oct 2015 03:58:52 +0000 (14:58 +1100)]
powerpc/eeh: Don't unfreeze PHB PE after reset

On PowerNV platform, the PE is kept in frozen state until the PE
reset is completed to avoid recursive EEH error caused by MMIO
access during the period of EEH reset. The PE's frozen state is
cleared after BARs of PCI device included in the PE are restored
and enabled. However, we needn't clear the frozen state for PHB PE
explicitly at this point as there is no real PE for PHB PE. As the
PHB PE is always binding with PE#0, we actually clear PE#0, which
is wrong. It doesn't incur any problem though.

This checks if the PE is PHB PE and doesn't clear the frozen state
if it is.

Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/ps3: Quieten boot wrapper output with run_cmd
Geoff Levand [Mon, 19 Oct 2015 17:53:26 +0000 (10:53 -0700)]
powerpc/ps3: Quieten boot wrapper output with run_cmd

Add a boot wrapper script function run_cmd which will run a shell command
quietly and only print the output if either V=1 or an error occurs.

Also, run the ps3 dd commands with run_cmd to clean up the build output.

Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/prom: Avoid reference to potentially freed memory
Christophe Jaillet [Fri, 16 Oct 2015 21:38:45 +0000 (23:38 +0200)]
powerpc/prom: Avoid reference to potentially freed memory

of_get_property() is used inside the loop, but then the reference to the
node is dropped before dereferencing the prop pointer, which could by then
point to junk if the node has been freed.

Instead use of_property_read_u32() to actually read the property
value before dropping the reference.

of_property_read_u32() requires at least one cell (u32) to be present,
which is stricter than the old logic which would happily dereference a
property of any size. However we believe all device trees in the wild
have at least one cell.

Skiboot may produce memory nodes with more than one cell, but that is
OK, of_property_read_u32() will return the first one.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
[mpe: Expand change log with device tree details]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/cell: Drop CONFIG_TUNE_CELL in favour of CONFIG_CELL_CPU
Michael Ellerman [Tue, 13 Oct 2015 08:17:07 +0000 (19:17 +1100)]
powerpc/cell: Drop CONFIG_TUNE_CELL in favour of CONFIG_CELL_CPU

The TUNE_CELL option allows you to build a kernel that runs on multiple
CPUs but is tuned (ie. optimised) to run on Cell CPUs. Now days no one
is building a distro in that fashion, and any users who are building
custom kernels for their Cell machines are better off building with
CONFIG_CELL_CPU, which builds a kernel that only runs on Cell and
therefore can be optimised even more aggresively.

Dropping the option also avoids confusing other users, who are presented
with an option to tune for Cell when they are not building for a Cell
CPU at all.

Suggested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agoselftests/powerpc: Run EBB tests only on POWER8
Denis Kirjanov [Sun, 18 Oct 2015 10:23:53 +0000 (13:23 +0300)]
selftests/powerpc: Run EBB tests only on POWER8

EBB (Event Based Branches) are currently only available on POWER8, so we
should skip them on other CPUs.

I've found that at least one test loops forever on 970MP (cycles_with_freeze_test).

Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
[mpe: Minor change log editing, add skip to cpu_event_vs_ebb_test]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/fsl_pci: Don't set up inbound windows in kdump crash kernel
Scott Wood [Wed, 7 Oct 2015 03:48:08 +0000 (22:48 -0500)]
powerpc/fsl_pci: Don't set up inbound windows in kdump crash kernel

Otherwise, because the top end of the crash kernel is treated as the
absolute top of memory rather than the beginning of a reserved region,
in-flight DMA from the previous kernel that targets areas above the
crash kernel can trigger a storm of PCI errors.  We only do this for
kdump, not normal kexec, in case kexec is being used to upgrade to a
kernel that wants a different inbound memory map.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Cc: Mingkai Hu <Mingkai.hu@freescale.com>
8 years agopowerpc/85xx: Don't use generic timebase sync on 64-bit
Scott Wood [Wed, 7 Oct 2015 03:48:07 +0000 (22:48 -0500)]
powerpc/85xx: Don't use generic timebase sync on 64-bit

85xx currently uses the generic timebase sync mechanism when
CONFIG_KEXEC is enabled, because 32-bit 85xx kexec support does a hard
reset of each core.  64-bit 85xx kexec does not do this, so we neither
need nor want this (nor is the generic timebase sync code built on
ppc64).

FWIW, I don't like the fact that the hard reset is done on 32-bit
kexec, and I especially don't like the timebase sync being triggered
only on the presence of CONFIG_KEXEC rather than actually booting in
that environment, but that's beyond the scope of this patch...

Signed-off-by: Scott Wood <scottwood@freescale.com>
8 years agopowerpc/fsl-corenet: Disable coreint if kexec is enabled
Scott Wood [Wed, 7 Oct 2015 03:48:06 +0000 (22:48 -0500)]
powerpc/fsl-corenet: Disable coreint if kexec is enabled

Problems have been observed in coreint (EPR) mode if interrupts are
left pending (due to the lack of device quiescence with kdump) after
having tried to deliver to a CPU but unable to deliver due to MSR[EE]
-- interrupts no longer get reliably delivered in the new kernel.  I
tried various ways of fixing it up inside the crash kernel itself, and
none worked (including resetting the entire mpic).  Masking all
interrupts and issuing EOIs in the crashing kernel did help a lot of
the time, but the behavior was not consistent.

Thus, stick to standard IACK mode when kdump is a possibility.

Signed-off-by: Scott Wood <scottwood@freescale.com>
8 years agopowerpc/fsl-booke-64: Allow booting from the secondary thread
Scott Wood [Wed, 7 Oct 2015 03:48:05 +0000 (22:48 -0500)]
powerpc/fsl-booke-64: Allow booting from the secondary thread

This allows SMP kernels to work as kdump crash kernels.  While crash
kernels don't really need to be SMP, this prevents things from breaking
if a user does it anyway (which is not something you want to only find
out once the main kernel has crashed in the field, especially if
whether it works or not depends on which cpu crashed).

Signed-off-by: Scott Wood <scottwood@freescale.com>
8 years agopowerpc/b4860: Renamed the L2 caches
poonam aggrwal [Sat, 19 Sep 2015 18:15:42 +0000 (23:45 +0530)]
powerpc/b4860: Renamed the L2 caches

To make provision for more than one L2 caches in the system, change the
name from L2 to L2_1; same as in T4 platforms.
* Also remove the L2 entry from common file
  "arch/powerpc/boot/dts/fsl/b4si-post.dtsi"
  Keep them only in separate files for b4860 and b4420.

Signed-off-by: Shaveta Leekha <shaveta@freescale.com>
Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
8 years agopowerpc/fsl: Move Freescale device tree files into fsl folder
Hongtao Jia [Fri, 18 Sep 2015 04:00:24 +0000 (12:00 +0800)]
powerpc/fsl: Move Freescale device tree files into fsl folder

It makes no sense that some Freescale device tree files are in fsl
directory while some others not. This patch move Freescale device tree
files into fsl folder. To do that the following two steps are made:
- Move Freescale device tree files into fsl folder.
- Update the include path in these files from "fsl/*.dtsi" to "*.dtsi".

Please add "fsl/" prefix when you make dtb using Makefile.

Signed-off-by: Jia Hongtao <hongtao.jia@freescale.com>
[scottwood: fixed cuImage rule]
Signed-off-by: Scott Wood <scottwood@freescale.com>
8 years agopowerpc/b4860: Removed LIODN register from sRIO node
poonam aggrwal [Thu, 10 Sep 2015 02:01:20 +0000 (07:31 +0530)]
powerpc/b4860: Removed LIODN register from sRIO node

In case of B4860 LIODN register for sRIO is not in GUTs block but in
the sRIO register space.

Signed-off-by: Varun Sethi <Varun.Sethi@freescale.com>
Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
8 years agopowerpc/85xx: Add support for Varisys Cyrus board
Andy Fleming [Wed, 2 Sep 2015 18:07:58 +0000 (13:07 -0500)]
powerpc/85xx: Add support for Varisys Cyrus board

This board uses a P5020 chip, and boots just fine using
the corenet_generic code. The device tree is very similar to the
P5020DS, except that there is no Flash memory. The environment is,
instead, stored on an MMC card on the motherboard.

Signed-off-by: Andy Fleming <afleming@gmail.com>
[scottwood: fixed trailing whitespace]
Signed-off-by: Scott Wood <scottwood@freescale.com>
8 years agopowerpc/fsl_pci: Check for get_user/probe_kernel_address failure
Scott Wood [Mon, 24 Aug 2015 16:43:03 +0000 (11:43 -0500)]
powerpc/fsl_pci: Check for get_user/probe_kernel_address failure

Signed-off-by: Scott Wood <scottwood@freescale.com>
Reported-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Hongtao Jia <hongtao.jia@freescale.com>
8 years agopowerpc/t104xd4rdb: add DS26522 nodes to device tree
Zhao Qiang [Fri, 21 Aug 2015 02:48:56 +0000 (10:48 +0800)]
powerpc/t104xd4rdb: add DS26522 nodes to device tree

DS26522 is used for tdm, configured by SPI bus.
Add nodes under spi node to t104xd4rdb.dtsi.

Signed-off-by: Zhao Qiang <qiang.zhao@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
8 years agopowerpc/dts: don't fall back to fsl,pq3-gpio for fsl,mpc8572-gpio
Uwe Kleine-König [Fri, 31 Jul 2015 09:16:06 +0000 (11:16 +0200)]
powerpc/dts: don't fall back to fsl,pq3-gpio for fsl,mpc8572-gpio

While the handling of fsl,pq3-gpio and fsl,mpc8572-gpio is done in the
same driver and the two hardly differ, the latter controller needs a
workaround for an erratum in the gpio_get callback. To make this
difference more explicit remove fsl,pq3-gpio from the list of
compatibles for mpc8572 machines.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Scott Wood <scottwood@freescale.com>
8 years agopowerpc/dts: Add and fix 1588 timer node for eTSEC
Yangbo Lu [Wed, 29 Jul 2015 07:12:38 +0000 (15:12 +0800)]
powerpc/dts: Add and fix 1588 timer node for eTSEC

Add 1588 timer node in files:
arch/powerpc/boot/dts/bsc9131rdb.dtsi
arch/powerpc/boot/dts/bsc9132qds.dtsi
arch/powerpc/boot/dts/p1010rdb.dtsi
arch/powerpc/boot/dts/p1020rdb-pd.dts
arch/powerpc/boot/dts/p1021rdb-pc.dtsi
arch/powerpc/boot/dts/p1022ds.dtsi
arch/powerpc/boot/dts/p1025twr.dtsi
For P2020RDB-PC, registers' values should be calculated
based on default 1588 reference clock(300MHz) not 250MHz,
and fix this in file:
arch/powerpc/boot/dts/p2020rdb-pc.dtsi

Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
8 years agopowerpc/corenet: use the mixed mode of MPIC when enabling CPU hotplug
chenhui zhao [Thu, 23 Jul 2015 03:55:45 +0000 (11:55 +0800)]
powerpc/corenet: use the mixed mode of MPIC when enabling CPU hotplug

Core reset may cause issue if using the proxy mode of MPIC.
Use the mixed mode of MPIC if enabling CPU hotplug.

Signed-off-by: Chenhui Zhao <chenhui.zhao@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
8 years agoselftests/powerpc: Allow the tm-syscall test to build with old headers
Michael Ellerman [Thu, 15 Oct 2015 00:39:28 +0000 (11:39 +1100)]
selftests/powerpc: Allow the tm-syscall test to build with old headers

When building against older kernel headers, currently the tm-syscall
test fails to build because PPC_FEATURE2_HTM_NOSC is not defined.

Tweak the test so that if PPC_FEATURE2_HTM_NOSC is not defined it still
builds, but prints a warning at run time and marks the test as skipped.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agoselftests/powerpc: Sort the list of SUB_DIRS to build
Michael Ellerman [Wed, 14 Oct 2015 09:50:35 +0000 (20:50 +1100)]
selftests/powerpc: Sort the list of SUB_DIRS to build

This list has gotten too long. Split it into individual lines and sort
them, so in future we can add new entries more cleanly.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agoselftests/powerpc: Add tests of unmuxed IPC calls
Michael Ellerman [Wed, 14 Oct 2015 09:48:04 +0000 (20:48 +1100)]
selftests/powerpc: Add tests of unmuxed IPC calls

This is just a simple test which confirms that the individual IPC
syscalls are all available.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/xmon: Add some more elements to the existing PACA dump list
Michael Ellerman [Wed, 14 Oct 2015 05:58:36 +0000 (16:58 +1100)]
powerpc/xmon: Add some more elements to the existing PACA dump list

This patch adds a set of new elements to the existing PACA dump list
inside an xmon session which can be listed below improving the overall
xmon debug support.

With this patch, a typical xmon PACA dump looks something like this.

paca for cpu 0x0 @ c00000000fdc0000:
 possible             = yes
 present              = yes
 online               = yes
 lock_token           = 0x8000             (0xa)
 paca_index           = 0x0                (0x8)
 kernel_toc           = 0xc000000001393200 (0x10)
 kernelbase           = 0xc000000000000000 (0x18)
 kernel_msr           = 0xb000000000001033 (0x20)
 emergency_sp         = 0xc00000003fff0000 (0x28)
 mc_emergency_sp      = 0xc00000003ffec000 (0x2e0)
 in_mce               = 0x0                (0x2e8)
 hmi_event_available  = 0x0                (0x2ea)
 data_offset          = 0x1fe7b0000        (0x30)
 hw_cpu_id            = 0x0                (0x38)
 cpu_start            = 0x1                (0x3a)
 kexec_state          = 0x0                (0x3b)
 slb_shadow[0]:       = 0xc000000008000000 0x40016e7779000510
 slb_shadow[1]:       = 0xd000000008000001 0x400142add1000510
 vmalloc_sllp         = 0x510              (0x1b8)
 slb_cache_ptr        = 0x4                (0x1ba)
 slb_cache[0]:        = 0x000000000003f000
 slb_cache[1]:        = 0x0000000000000001
 slb_cache[2]:        = 0x0000000000000003
 slb_cache[3]:        = 0x0000000000001000
 slb_cache[4]:        = 0x0000000000001000
 slb_cache[5]:        = 0x0000000000000000
 slb_cache[6]:        = 0x0000000000000000
 slb_cache[7]:        = 0x0000000000000000
 dscr_default         = 0x0                (0x58)
 __current            = 0xc000000001331e80 (0x290)
 kstack               = 0xc000000001393e30 (0x298)
 stab_rr              = 0x11               (0x2a0)
 saved_r1             = 0xc0000001fffef5e0 (0x2a8)
 trap_save            = 0x0                (0x2b8)
 soft_enabled         = 0x0                (0x2ba)
 irq_happened         = 0x1                (0x2bb)
 io_sync              = 0x0                (0x2bc)
 irq_work_pending     = 0x0                (0x2bd)
 nap_state_lost       = 0x0                (0x2be)
 sprg_vdso            = 0x0                (0x2c0)
 tm_scratch           = 0x8000000100009033 (0x2c8)
 core_idle_state_ptr  = (null)             (0x2d0)
 thread_idle_state    = 0x0                (0x2d8)
 thread_mask          = 0x0                (0x2d9)
 subcore_sibling_mask = 0x0                (0x2da)
 user_time            = 0x0                (0x2f0)
 system_time          = 0x0                (0x2f8)
 user_time_scaled     = 0x0                (0x300)
 starttime            = 0x3f462418b5cf4    (0x308)
 starttime_user       = 0x3f4622a57092a    (0x310)
 startspurr           = 0xd62a5718         (0x318)
 utime_sspurr         = 0x0                (0x320)
 stolen_time          = 0x0                (0x328)

Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
[mpe: Endian swap slb_shadow before display, minor formatting]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/xmon: Paginate kernel log buffer display
Sam bobroff [Thu, 8 Oct 2015 00:50:24 +0000 (11:50 +1100)]
powerpc/xmon: Paginate kernel log buffer display

The kernel log buffer is often much longer than the size of a terminal
so paginate it's output.

Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/xmon: Paged output for paca display
Sam bobroff [Thu, 8 Oct 2015 00:50:23 +0000 (11:50 +1100)]
powerpc/xmon: Paged output for paca display

The paca display is already more than 24 lines, which can be problematic
if you have an old school 80x24 terminal, or more likely you are on a
virtual terminal which does not scroll for whatever reason.

This patch adds a new command "#", which takes a single (hex) numeric
argument: lines per page. It will cause the output of "dp" and "dpa"
to be broken into pages, if necessary.

Sample output:

0:mon> # 10
0:mon> dp1
paca for cpu 0x1 @ c00000000fdc0480:
 possible         = yes
 present          = yes
 online           = yes
 lock_token       = 0x8000             (0x8)
 paca_index       = 0x1                (0xa)
 kernel_toc       = 0xc000000000eb2400 (0x10)
 kernelbase       = 0xc000000000000000 (0x18)
 kernel_msr       = 0xb000000000001032 (0x20)
 emergency_sp     = 0xc00000003ffe8000 (0x28)
 mc_emergency_sp  = 0xc00000003ffe4000 (0x2e0)
 in_mce           = 0x0                (0x2e8)
 data_offset      = 0x7f170000         (0x30)
 hw_cpu_id        = 0x8                (0x38)
 cpu_start        = 0x1                (0x3a)
 kexec_state      = 0x0                (0x3b)
[Hit a key (a:all, q:truncate, any:next page)]
0:mon>
 __current        = 0xc00000007e696620 (0x290)
 kstack           = 0xc00000007e6ebe30 (0x298)
 stab_rr          = 0xb                (0x2a0)
 saved_r1         = 0xc00000007ef37860 (0x2a8)
 trap_save        = 0x0                (0x2b8)
 soft_enabled     = 0x0                (0x2ba)
 irq_happened     = 0x1                (0x2bb)
 io_sync          = 0x0                (0x2bc)
 irq_work_pending = 0x0                (0x2bd)
 nap_state_lost   = 0x0                (0x2be)
0:mon>

Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
[mpe: Use bool, make some variables static]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/mpc5xxx: Use of_get_next_parent to simplify code
Christophe Jaillet [Sun, 11 Oct 2015 20:27:40 +0000 (22:27 +0200)]
powerpc/mpc5xxx: Use of_get_next_parent to simplify code

of_get_next_parent can be used to simplify the while() loop and
avoid the need of a temp variable.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/numa: Use of_get_next_parent to simplify code
Christophe Jaillet [Sun, 11 Oct 2015 20:23:27 +0000 (22:23 +0200)]
powerpc/numa: Use of_get_next_parent to simplify code

of_get_next_parent can be used to simplify the while() loop and
avoid the need of a temp variable.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc: Delete old orphaned PrPMC 280/2800 DTS and boot file.
Paul Gortmaker [Tue, 13 Oct 2015 23:20:51 +0000 (19:20 -0400)]
powerpc: Delete old orphaned PrPMC 280/2800 DTS and boot file.

In commit 3c8464a9b12bf83807b6e2c896d7e7b633e1cae7 ("powerpc:
Delete old PrPMC 280/2800 support") we got rid of most of the C
code, and the Makefile/Kconfig hooks, but it seems I left the
platform's DTS file orphaned in the tree as well as the boot code.
Here we get rid of them both.

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agodrivers/macintosh: adb: fix misleading Kconfig help text
Aaro Koskinen [Thu, 1 Oct 2015 19:41:40 +0000 (22:41 +0300)]
drivers/macintosh: adb: fix misleading Kconfig help text

CONFIG_INPUT_KEYBDEV does not exist and no additional keyboard-specific
options are needed to get the keyboard working.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc: discard .exit.data at runtime
Stephen Rothwell [Wed, 7 Oct 2015 23:28:28 +0000 (10:28 +1100)]
powerpc: discard .exit.data at runtime

.exit.text is discarded at run time and there are some references from
that to .exit.data, so we need to discard .exit.data at run time as well.

Fixes these errors:

`.exit.data' referenced in section `.exit.text' of drivers/built-in.o: defined in discarded section `.exit.data' of drivers/built-in.o
`.exit.data' referenced in section `.exit.text' of drivers/built-in.o: defined in discarded section `.exit.data' of drivers/built-in.o

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/eeh: atomic_dec_if_positive() to update passthru count
Gavin Shan [Thu, 27 Aug 2015 05:58:27 +0000 (15:58 +1000)]
powerpc/eeh: atomic_dec_if_positive() to update passthru count

No need to have two atomic opertions (update and fetch/check) when
decreasing PE's number of passed devices as one atomic operation
is enough.

Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agocxl: Free virtual PHB when removing
Andrew Donnellan [Tue, 13 Oct 2015 04:09:44 +0000 (15:09 +1100)]
cxl: Free virtual PHB when removing

When adding a vPHB in cxl_pci_vphb_add(), we allocate a pci_controller
struct using pcibios_alloc_controller(). However, we don't free it in
cxl_pci_vphb_remove(), causing a leak.

Call pcibios_free_controller() in cxl_pci_vphb_remove() to free the vPHB
data structure correctly.

Signed-off-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/pci: export pcibios_free_controller()
Andrew Donnellan [Thu, 10 Sep 2015 06:28:34 +0000 (16:28 +1000)]
powerpc/pci: export pcibios_free_controller()

Export pcibios_free_controller(), so it can be used by the cxl module to
free virtual PHBs.

Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc: Individual System V IPC system calls
Sam bobroff [Tue, 13 Oct 2015 01:49:28 +0000 (12:49 +1100)]
powerpc: Individual System V IPC system calls

This patch provides individual system call numbers for the following
System V IPC system calls, on PowerPC, so that they do not need to be
multiplexed:
* semop, semget, semctl, semtimedop
* msgsnd, msgrcv, msgget, msgctl
* shmat, shmdt, shmget, shmctl

Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/pseries: Drop always true CONFIG_PSERIES_MSI
Michael Ellerman [Thu, 1 Oct 2015 06:44:34 +0000 (16:44 +1000)]
powerpc/pseries: Drop always true CONFIG_PSERIES_MSI

Now that pseries selects PCI_MSI && PCI, EEH will always be true, and
therefore CONFIG_PSERIES_MSI will always be true. So drop it, and move
msi.o to obj-y.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/pseries: Move PCI objects to obj-y
Michael Ellerman [Thu, 1 Oct 2015 06:44:33 +0000 (16:44 +1000)]
powerpc/pseries: Move PCI objects to obj-y

Make it entirely clear in the Makefile that we always build the pci
related files by moving them to obj-y.

Note that CONFIG_EEH is now always enabled on pseries, because it
depends on PSERIES && PCI.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/pseries: Remove use of CONFIG_PCI
Michael Ellerman [Thu, 1 Oct 2015 06:44:32 +0000 (16:44 +1000)]
powerpc/pseries: Remove use of CONFIG_PCI

Now that we always have CONFIG_PCI=y for pseries, we can stop guarding
code with CONFIG_PCI ifdefs.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/pseries: Make PCI non-optional
Michael Ellerman [Thu, 1 Oct 2015 06:44:31 +0000 (16:44 +1000)]
powerpc/pseries: Make PCI non-optional

The pseries build with PCI=n looks to have been broken for at least 5
years, and no one's noticed or cared.

Following the obvious breakages backward, the first commit I can find
that builds is the parent of 2eb4afb69ff3 ("powerpc/pci: Move pseries
code into pseries platform specific area") from April 2009.

A distro would never ship a PCI=n kernel, so it is only useful for folks
building custom kernels. Also on KVM the virtio devices appear on PCI,
so it would only be useful if you were building kernels specifically to
run on PowerVM and with no PCI devices.

The added code complexity, and testing load (which we've clearly not
been doing), is not justified by the small reduction in kernel size for
such a niche use case.

So just make PCI non-optional on pseries.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agoscripts/kconfig/Makefile: Fix KBUILD_DEFCONFIG check when building with O=
Michael Ellerman [Thu, 15 Oct 2015 03:33:57 +0000 (14:33 +1100)]
scripts/kconfig/Makefile: Fix KBUILD_DEFCONFIG check when building with O=

My recent commit d2036f30cfe1 ("scripts/kconfig/Makefile: Allow
KBUILD_DEFCONFIG to be a target"), contained a bug in that when it
checks if KBUILD_DEFCONFIG is a file it forgets to prepend $(srctree) to
the path.

This causes the build to fail when building out of tree (with O=), and
when the value of KBUILD_DEFCONFIG is 'defconfig'. In that case we will
fail to find the 'defconfig' file, because we look in the build
directory not $(srctree), and so we will call Make again with
'defconfig' as the target. From there we loop infinitely calling 'make
defconfig' again and again.

The fix is simple, we need to look for the file under $(srctree).

Fixes: d2036f30cfe1 ("scripts/kconfig/Makefile: Allow KBUILD_DEFCONFIG to be a target")
Reported-by: Olof Johansson <olof@lixom.net>
Acked-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/mm: Differentiate between hugetlb and THP during page walk
Aneesh Kumar K.V [Fri, 9 Oct 2015 03:02:21 +0000 (08:32 +0530)]
powerpc/mm: Differentiate between hugetlb and THP during page walk

We need to properly identify whether a hugepage is an explicit or
a transparent hugepage in follow_huge_addr(). We used to depend
on hugepage shift argument to do that. But in some case that can
result in wrong results. For ex:

On finding a transparent hugepage we set hugepage shift to PMD_SHIFT.
But we can end up clearing the thp pte, via pmdp_huge_get_and_clear.
We do prevent reusing the pfn page via the usage of
kick_all_cpus_sync(). But that happens after we updated the pte to 0.
Hence in follow_huge_addr() we can find hugepage shift set, but transparent
huge page check fail for a thp pte.

NOTE: We fixed a variant of this race against thp split in commit
691e95fd7396905a38d98919e9c150dbc3ea21a3
("powerpc/mm/thp: Make page table walk safe against thp split/collapse")

Without this patch, we may hit the BUG_ON(flags & FOLL_GET) in
follow_page_mask occasionally.

In the long term, we may want to switch ppc64 64k page size config to
enable CONFIG_ARCH_WANT_GENERAL_HUGETLB

Reported-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/mm: Disable hugepd for 64K page size.
Aneesh Kumar K.V [Mon, 7 Sep 2015 07:23:53 +0000 (12:53 +0530)]
powerpc/mm: Disable hugepd for 64K page size.

After commit e2b3d202d1dba8f3546ed28224ce485bc50010be
("powerpc: Switch 16GB and 16MB explicit hugepages to a
different page table format"), we don't need to support
is_hugepd() for 64K page size.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/pseries/hvcserver: don't memset pi_buff if it is null
Colin Ian King [Thu, 8 Oct 2015 19:00:58 +0000 (20:00 +0100)]
powerpc/pseries/hvcserver: don't memset pi_buff if it is null

pi_buff is being memset before it is sanity checked. Move the
memset after the null pi_buff sanity check to avoid an oops.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc: Fix _ALIGN_* errors due to type difference.
Aneesh Kumar K.V [Thu, 8 Oct 2015 07:59:28 +0000 (13:29 +0530)]
powerpc: Fix _ALIGN_* errors due to type difference.

This avoid errors like

        unsigned int usize = 1 << 30;
        int size = 1 << 30;
        unsigned long addr = 64UL << 30 ;

        value = _ALIGN_DOWN(addr, usize); -> 0
        value = _ALIGN_DOWN(addr, size);  -> 0x1000000000

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/kexec: Wait 1s for secondaries to enter OPAL
Samuel Mendoza-Jonas [Wed, 22 Jul 2015 05:54:29 +0000 (15:54 +1000)]
powerpc/kexec: Wait 1s for secondaries to enter OPAL

Always include a timeout when waiting for secondary cpus to enter OPAL
in the kexec path, rather than only when crashing.

Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/8xx: Shorten irq_chip name for the SIU
Christophe Leroy [Fri, 21 Aug 2015 11:05:15 +0000 (13:05 +0200)]
powerpc/8xx: Shorten irq_chip name for the SIU

show_interrupts() expects the irq_chip name to be max 8 characters
otherwise everything get misaligned

# cat /proc/interrupts
           CPU0
 17:          0   CPM PIC   0 Level     error
 19:          0  MPC8XX SIU  15 Level     tbint
 20:         90   CPM PIC   4 Level     cpm_uart
 38:      29746  MPC8XX SIU   5 Level     fs_enet-mac
 39:          0  MPC8XX SIU   7 Level     fs_enet-mac
 47:        401   CPM PIC   5 Level     fsl_spi
 68:          1  MPC8XX SIU   2 Level     phy_interrupt, phy_interrupt, phy_interrupt
LOC:    7225485   Local timer interrupts for timer event device
LOC:          9   Local timer interrupts for others
SPU:          0   Spurious interrupts
PMI:          0   Performance monitoring interrupts
MCE:          0   Machine check exceptions

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/msi: Free the bitmap if it was slab allocated
Denis Kirjanov [Wed, 16 Sep 2015 19:26:14 +0000 (22:26 +0300)]
powerpc/msi: Free the bitmap if it was slab allocated

During the MSI bitmap test on boot kmemleak spews the following trace:

unreferenced object 0xc00000016e86c900 (size 64):
    comm "swapper/0", pid 1, jiffies 4294893173 (age 518.024s)
    hex dump (first 32 bytes):
00 00 01 ff 7f ff 7f 37 00 00 00 00 00 00 00 00
.......7........
ff ff ff ff ff ff ff ff 01 ff ff ff ff
ff ff ff
................
backtrace:
[<c00000000003eebc>] .zalloc_maybe_bootmem+0x3c/0x380
[<c000000000042d6c>] .msi_bitmap_alloc+0x3c/0xb0
[<c000000000a9aff8>] .msi_bitmap_selftest+0x30/0x2b4
[<c0000000000090f4>] .do_one_initcall+0xd4/0x270
[<c000000000a8e250>] .kernel_init_freeable+0x1a0/0x280
[<c000000000009b5c>] .kernel_init+0x1c/0x120
[<c000000000007fbc>] .ret_from_kernel_thread+0x58/0x9c

Add a flag to msi_bitmap for tracking allocations from slab and memblock
so we can properly free/handle memory in msi_bitmap_free().

Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
[mpe: Reword changelog & use bitmap_from_slab in the if]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/pseries: re-use code from of_helpers module
Andy Shevchenko [Thu, 1 Oct 2015 09:46:10 +0000 (12:46 +0300)]
powerpc/pseries: re-use code from of_helpers module

The derive_parent() has similar semantics to what we have in newly introduced
of_helpers module. The replacement reduces code base and propagates the actual
error code to the caller.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/pseries: handle nodes without '/'
Andy Shevchenko [Thu, 1 Oct 2015 09:46:09 +0000 (12:46 +0300)]
powerpc/pseries: handle nodes without '/'

In case we have node without '/' strrchr() returns NULL which might lead to
crash. Replace strrchr() by kbasename() and modify condition to avoid such
behaviour.

Suggested-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/pseries: replace kmalloc + strlcpy
Andy Shevchenko [Thu, 1 Oct 2015 09:46:08 +0000 (12:46 +0300)]
powerpc/pseries: replace kmalloc + strlcpy

The helper kstrndup() will do the same in one line.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/pseries: fix a potential memory leak
Andy Shevchenko [Thu, 1 Oct 2015 09:46:07 +0000 (12:46 +0300)]
powerpc/pseries: fix a potential memory leak

In case we have a full node name like /foo/bar and /foo is not found the
parent_path left unfreed. So, free a memory before return to a caller.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/pseries: extract of_helpers module
Andy Shevchenko [Thu, 1 Oct 2015 09:46:06 +0000 (12:46 +0300)]
powerpc/pseries: extract of_helpers module

Extract a new module to share the code between other modules.

There is no functional change.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agoagp/uninorth: fix a memleak in create_gatt_table
Denis Kirjanov [Fri, 12 Jun 2015 06:57:11 +0000 (09:57 +0300)]
agp/uninorth: fix a memleak in create_gatt_table

Fix the memory leak in create_gatt_table:
we've lost a kfree on the exit path for the pages array allocated
in uninorth_create_gatt_table

Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/nvram: Fix function name in some errors messages.
Christophe Jaillet [Fri, 17 Jul 2015 07:20:00 +0000 (09:20 +0200)]
powerpc/nvram: Fix function name in some errors messages.

'nvram_create_os_partition' should be 'nvram_create_partition'.
Use __func__ to have it right, as done elsewhere in this file.

Signed-off-by: Christophe Jaillet <christophe.jaillet@wanadoo.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/nvram: Add missing kfree in error path
Christophe Jaillet [Fri, 17 Jul 2015 07:19:59 +0000 (09:19 +0200)]
powerpc/nvram: Add missing kfree in error path

If 'nvram_write_header' fails, then 'new_part' should be freed, otherwise,
there is a memory leak.

Signed-off-by: Christophe Jaillet <christophe.jaillet@wanadoo.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc: Add ppc64le_defconfig
Michael Ellerman [Wed, 23 Sep 2015 05:40:35 +0000 (15:40 +1000)]
powerpc: Add ppc64le_defconfig

Based directly on ppc64_defconfig using merge_config.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agoscripts/kconfig/Makefile: Allow KBUILD_DEFCONFIG to be a target
Michael Ellerman [Wed, 23 Sep 2015 05:40:34 +0000 (15:40 +1000)]
scripts/kconfig/Makefile: Allow KBUILD_DEFCONFIG to be a target

Arch Makefiles can set KBUILD_DEFCONFIG to tell kbuild the name of the
defconfig that should be built by default.

However currently there is an assumption that KBUILD_DEFCONFIG points to
a file at arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG).

We would like to use a target, using merge_config, as our defconfig, so
adapt the logic in scripts/kconfig/Makefile to allow that.

To minimise the chance of breaking anything, we first check if
KBUILD_DEFCONFIG is a file, and if so we do the old logic. If it's not a
file, then we call the top-level Makefile with KBUILD_DEFCONFIG as the
target.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Acked-by: Michal Marek <mmarek@suse.com>
8 years agopowerpc/mm: Add virt_to_pfn and use this instead of opencoding
Aneesh Kumar K.V [Thu, 3 Sep 2015 07:50:56 +0000 (13:20 +0530)]
powerpc/mm: Add virt_to_pfn and use this instead of opencoding

This add helper virt_to_pfn and remove the opencoded usage of the
same.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/vdso: Avoid link stack corruption in __get_datapage()
Michael Neuling [Fri, 25 Sep 2015 04:01:40 +0000 (14:01 +1000)]
powerpc/vdso: Avoid link stack corruption in __get_datapage()

powerpc has a link register (lr) used for calling functions. We "bl
<func>" to call a function, and "blr" to return back to the call site.

The lr is only a single register, so if we call another function from
inside this function (ie. nested calls), software must save away the
lr on the software stack before calling the new function. Before
returning (ie. before the "blr"), the lr is restored by software from
the software stack.

This makes branch prediction quite difficult for the processor as it
will only know the branch target just before the "blr".

To help with this, modern powerpc processors keep a (non-architected)
hardware stack of lr called a "link stack". When a "bl <func>" is
run, the lr is pushed onto this stack. When a "blr" is called, the
branch predictor pops the lr value from the top of the link stack, and
uses it to predict the branch target. Hence the processor pipeline
knows a lot earlier the branch target.

This works great but there are some cases where you call "bl" but
without a matching "blr". Once such case is when trying to determine
the program counter (which can't be read directly). Here you "bl+4;
mflr" to get the program counter. If you do this, the link stack will
get out of sync with reality, causing the branch predictor to
mis-predict subsequent function returns.

To avoid this, modern micro-architectures have a special case of bl.
Using the form "bcl 20,31,+4", ensures the processor doesn't push to
the link stack.

The 32 and 64 bit variants of __get_datapage() use a "bl; mflr" to
determine the loaded address of the VDSO. The current versions of
these attempt to use this special bl variant.

Unfortunately they use +8 rather than the required +4. Hence the
current code results in the link stack getting out of sync with
reality and hence the resulting performance degradation.

This patch moves it to bcl+4 by moving __kernel_datapage_offset out of
__get_datapage().

With this patch, running a gettimeofday() (which uses
__get_datapage()) microbenchmark we get a decent bump in performance
on POWER7/8.

For the benchmark in tools/testing/selftests/powerpc/benchmarks/gettimeofday.c
  POWER8:
    64bit gets ~4% improvement
    32bit gets ~9% improvement
  POWER7:
    64bit gets ~7% improvement

Signed-off-by: Michael Neuling <mikey@neuling.org>
Reported-by: Aaron Sawdey <sawdey@us.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/selftest: Add gettimeofday() benchmark
Michael Neuling [Fri, 25 Sep 2015 04:01:39 +0000 (14:01 +1000)]
powerpc/selftest: Add gettimeofday() benchmark

This adds a benchmark directory to the powerpc selftests and adds a
gettimeofday() benchmark to it.

Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/slb: Use a local to avoid multiple calls to get_slb_shadow()
Michael Ellerman [Thu, 13 Aug 2015 07:11:18 +0000 (17:11 +1000)]
powerpc/slb: Use a local to avoid multiple calls to get_slb_shadow()

For no reason other than it looks ugly.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/slb: Define an enum for the bolted indexes
Anshuman Khandual [Thu, 13 Aug 2015 07:07:54 +0000 (17:07 +1000)]
powerpc/slb: Define an enum for the bolted indexes

This patch defines macros for the three bolted SLB indexes we use.
Switch the functions that take the indexes as an argument to use the
enum.

Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/vdso: Emit GNU & SysV hashes
Michael Ellerman [Fri, 7 Aug 2015 03:05:42 +0000 (13:05 +1000)]
powerpc/vdso: Emit GNU & SysV hashes

Andy Lutomirski says:

  Some dynamic loaders may be slightly faster if a GNU hash is
  available.

  This is unlikely to have any measurable effect on the time it takes
  to resolve vdso symbols (since there are so few of them).  In some
  contexts, it can be a win for a different reason: if every DSO has a
  GNU hash section, then libc can avoid calculating SysV hashes at
  all. Both musl and glibc appear to have this optimization.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/ps3: Refresh ps3_defconfig
Geoff Levand [Mon, 14 Sep 2015 21:36:35 +0000 (14:36 -0700)]
powerpc/ps3: Refresh ps3_defconfig

Refresh and remove obsolete CONFIG_EXT3_FS.

Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>