* Re: [PATCH 1/4] treewide: remove unused address argument from pte_alloc functions (v2)
From: Peter Zijlstra @ 2018-10-24 8:37 UTC (permalink / raw)
To: Joel Fernandes (Google)
Cc: linux-mips, Rich Felker, linux-ia64, linux-sh, Catalin Marinas,
Dave Hansen, Will Deacon, Michal Hocko, linux-mm, lokeshgidra,
sparclinux, linux-riscv, elfring, Jonas Bonn, kvmarm, dancol,
Yoshinori Sato, linux-xtensa, linux-hexagon, Helge Deller,
maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT), hughd,
James E.J. Bottomley, kasan-dev, anton.ivanov, Ingo Molnar,
Geert Uytterhoeven, Andrey Ryabinin, linux-snps-arc, kernel-team,
Sam Creasey, Fenghua Yu, linux-s390, Jeff Dike, linux-um,
Stefan Kristiansson, Julia Lawall, linux-m68k, Borislav Petkov,
Andy Lutomirski, nios2-dev, Kirill A . Shutemov, Stafford Horne,
Guan Xuetao, Chris Zankel, Tony Luck, Richard Weinberger,
linux-parisc, Max Filippov, pantin, linux-kernel, minchan,
Thomas Gleixner, linux-alpha, Ley Foon Tan, akpm, linuxppc-dev,
David S. Miller
In-Reply-To: <20181013013200.206928-2-joel@joelfernandes.org>
On Fri, Oct 12, 2018 at 06:31:57PM -0700, Joel Fernandes (Google) wrote:
> This series speeds up mremap(2) syscall by copying page tables at the
> PMD level even for non-THP systems. There is concern that the extra
> 'address' argument that mremap passes to pte_alloc may do something
> subtle architecture related in the future that may make the scheme not
> work. Also we find that there is no point in passing the 'address' to
> pte_alloc since its unused. So this patch therefore removes this
> argument tree-wide resulting in a nice negative diff as well. Also
> ensuring along the way that the enabled architectures do not do anything
> funky with 'address' argument that goes unnoticed by the optimization.
Did you happen to look at the history of where that address argument
came from? -- just being curious here. ISTR something vague about
architectures having different paging structure for different memory
ranges.
^ permalink raw reply
* Re: [PATCH 0/8] add generic builtin command line
From: Maksym Kokhan @ 2018-10-24 8:57 UTC (permalink / raw)
To: Russell King
Cc: linux-mips, linux-efi, Ruslan Bilovol, Will Deacon,
Paul Mackerras, H. Peter Anvin, Daniel Walker, Frank Rowand, x86,
Ingo Molnar, Catalin Marinas, James Hogan, Daniel Walker,
devicetree, Rob Herring, Borislav Petkov, Thomas Gleixner,
Andrii Bordunov, Ard Biesheuvel, linux-kernel, Ralf Baechle,
Paul Burton, Andrew Morton, linuxppc-dev
In-Reply-To: <20181023144815.GP30658@n2100.armlinux.org.uk>
Do you mean, that you haven't seen patch for ARM, which I sent on
September 27 along with cover and patch 1? It is strange, because
you was the one from recipients. If so, you can see this patch here:
https://lore.kernel.org/patchwork/patch/992779/
On Tue, Oct 23, 2018 at 5:48 PM Russell King - ARM Linux
<linux@armlinux.org.uk> wrote:
>
> On Tue, Oct 23, 2018 at 05:43:18PM +0300, Maksym Kokhan wrote:
> > We still have no response to patches for x86, arm, arm64 and powerpc.
> > Is current generic command line implementation appropriate for these
> > architectures?
> > Is it possible to merge these patches in the current form (for x86,
> > arm, arm64 and powerpc)?
>
> You may wish to consider your recipients - I seem to only have received
> the cover and patch 1 (which doesn't include any ARM specific bits).
> It may be that you're not getting responses because people haven't seen
> your patches.
>
> Thanks.
>
> --
> RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
> FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
> According to speedtest.net: 11.9Mbps down 500kbps up
^ permalink raw reply
* Re: [PATCH v3 0/7] include: add setbits32/clrbits32/clrsetbits32/setbits64/clrbits64/clrsetbits64
From: Russell King - ARM Linux @ 2018-10-24 8:57 UTC (permalink / raw)
To: Corentin Labbe
Cc: Gilles.Muller, maxime.ripard, dri-devel, linux-ide, linux-sunxi,
paulus, linux-amlogic, cocci, narmstrong, airlied, wens, joabreu,
agust, alexandre.torgue, alistair, nicolas.palix, oss,
Julia.Lawall, linux-mediatek, matthias.bgg, peppe.cavallaro,
linux-arm-kernel, michal.lkml, netdev, linux-kernel, khilman,
carlo, tj, linuxppc-dev, davem
In-Reply-To: <1540366553-18541-1-git-send-email-clabbe@baylibre.com>
On Wed, Oct 24, 2018 at 07:35:46AM +0000, Corentin Labbe wrote:
> This patchset adds a new set of functions which are open-coded in lot of
> place.
> Basicly the pattern is always the same, "read, modify a bit, write"
> some driver and the powerpc arch already have thoses pattern them as functions. (like ahci_sunxi.c or dwmac-meson8b)
The advantage of them being open-coded is that it's _obvious_ to the
reviewer that there is a read-modify-write going on which, in a multi-
threaded environment, may need some locking (so it should trigger a
review of the locking around that code.)
With it hidden inside a helper which has no locking itself, it becomes
much easier to pass over in review, which means that races are much
more likely to go unspotted - and that is bad news.
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up
^ permalink raw reply
* Re: [PATCH 0/8] add generic builtin command line
From: Russell King - ARM Linux @ 2018-10-24 9:07 UTC (permalink / raw)
To: Maksym Kokhan
Cc: linux-mips, linux-efi, Ruslan Bilovol, Will Deacon,
Paul Mackerras, H. Peter Anvin, Daniel Walker, Frank Rowand, x86,
Ingo Molnar, Catalin Marinas, James Hogan, Daniel Walker,
devicetree, Rob Herring, Borislav Petkov, Thomas Gleixner,
Andrii Bordunov, Ard Biesheuvel, linux-kernel, Ralf Baechle,
Paul Burton, Andrew Morton, linuxppc-dev
In-Reply-To: <CAMT6-xhvqy5PeQmkQ8tsLRiML_pNJTxyq7dizRRvZTEqc7uzgg@mail.gmail.com>
On Wed, Oct 24, 2018 at 11:57:44AM +0300, Maksym Kokhan wrote:
> Do you mean, that you haven't seen patch for ARM, which I sent on
> September 27 along with cover and patch 1? It is strange, because
> you was the one from recipients. If so, you can see this patch here:
> https://lore.kernel.org/patchwork/patch/992779/
It seems that I have received patch 5, _but_ it's not threaded with
the cover message and patch 1. With 50k messages in my inbox, and 3k
messages since you sent the series, it's virtually impossible to find
it (I only found it by looking at my mail server logs from September
to find the subject, and then searching my mailbox for that subject.)
This is unnecessarily difficult.
> On Tue, Oct 23, 2018 at 5:48 PM Russell King - ARM Linux
> <linux@armlinux.org.uk> wrote:
> >
> > On Tue, Oct 23, 2018 at 05:43:18PM +0300, Maksym Kokhan wrote:
> > > We still have no response to patches for x86, arm, arm64 and powerpc.
> > > Is current generic command line implementation appropriate for these
> > > architectures?
> > > Is it possible to merge these patches in the current form (for x86,
> > > arm, arm64 and powerpc)?
> >
> > You may wish to consider your recipients - I seem to only have received
> > the cover and patch 1 (which doesn't include any ARM specific bits).
> > It may be that you're not getting responses because people haven't seen
> > your patches.
> >
> > Thanks.
> >
> > --
> > RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
> > FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
> > According to speedtest.net: 11.9Mbps down 500kbps up
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up
^ permalink raw reply
* Re: [PATCH 2/4] mm: speed up mremap by 500x on large regions (v2)
From: Kirill A. Shutemov @ 2018-10-24 10:12 UTC (permalink / raw)
To: Joel Fernandes (Google)
Cc: linux-mips, Rich Felker, linux-ia64, linux-sh, Peter Zijlstra,
Catalin Marinas, Dave Hansen, Will Deacon, mhocko, linux-mm,
lokeshgidra, sparclinux, linux-riscv, elfring, Jonas Bonn, kvmarm,
dancol, Yoshinori Sato, linux-xtensa, linux-hexagon, Helge Deller,
maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT), hughd,
James E.J. Bottomley, kasan-dev, anton.ivanov, Ingo Molnar,
Geert Uytterhoeven, Andrey Ryabinin, linux-snps-arc, kernel-team,
Sam Creasey, Fenghua Yu, linux-s390, Jeff Dike, linux-um,
Stefan Kristiansson, Julia Lawall, linux-m68k, Borislav Petkov,
Andy Lutomirski, nios2-dev, Stafford Horne, Guan Xuetao,
Chris Zankel, Tony Luck, Richard Weinberger, linux-parisc, pantin,
Max Filippov, linux-kernel, minchan, Thomas Gleixner, linux-alpha,
Ley Foon Tan, akpm, linuxppc-dev, David S. Miller
In-Reply-To: <20181013013200.206928-3-joel@joelfernandes.org>
On Fri, Oct 12, 2018 at 06:31:58PM -0700, Joel Fernandes (Google) wrote:
> diff --git a/mm/mremap.c b/mm/mremap.c
> index 9e68a02a52b1..2fd163cff406 100644
> --- a/mm/mremap.c
> +++ b/mm/mremap.c
> @@ -191,6 +191,54 @@ static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd,
> drop_rmap_locks(vma);
> }
>
> +static bool move_normal_pmd(struct vm_area_struct *vma, unsigned long old_addr,
> + unsigned long new_addr, unsigned long old_end,
> + pmd_t *old_pmd, pmd_t *new_pmd, bool *need_flush)
> +{
> + spinlock_t *old_ptl, *new_ptl;
> + struct mm_struct *mm = vma->vm_mm;
> +
> + if ((old_addr & ~PMD_MASK) || (new_addr & ~PMD_MASK)
> + || old_end - old_addr < PMD_SIZE)
> + return false;
> +
> + /*
> + * The destination pmd shouldn't be established, free_pgtables()
> + * should have release it.
> + */
> + if (WARN_ON(!pmd_none(*new_pmd)))
> + return false;
> +
> + /*
> + * We don't have to worry about the ordering of src and dst
> + * ptlocks because exclusive mmap_sem prevents deadlock.
> + */
> + old_ptl = pmd_lock(vma->vm_mm, old_pmd);
> + if (old_ptl) {
How can it ever be false?
> + pmd_t pmd;
> +
> + new_ptl = pmd_lockptr(mm, new_pmd);
> + if (new_ptl != old_ptl)
> + spin_lock_nested(new_ptl, SINGLE_DEPTH_NESTING);
> +
> + /* Clear the pmd */
> + pmd = *old_pmd;
> + pmd_clear(old_pmd);
> +
> + VM_BUG_ON(!pmd_none(*new_pmd));
> +
> + /* Set the new pmd */
> + set_pmd_at(mm, new_addr, new_pmd, pmd);
> + if (new_ptl != old_ptl)
> + spin_unlock(new_ptl);
> + spin_unlock(old_ptl);
> +
> + *need_flush = true;
> + return true;
> + }
> + return false;
> +}
> +
--
Kirill A. Shutemov
^ permalink raw reply
* [PATCH 0/2] arm64: Cut rebuild time when changing CONFIG_BLK_DEV_INITRD
From: Florian Fainelli @ 2018-10-23 23:40 UTC (permalink / raw)
To: linux-kernel
Cc: open list:MIPS, Alan Kao, open list:SUPERH, Will Deacon,
Paul Mackerras, open list:GENERIC INCLUDE/ASM HEADER FILES,
James E.J. Bottomley, Geert Uytterhoeven, Catalin Marinas,
Matt Turner, moderated list:H8/300 ARCHITECTURE, Marc Zyngier,
open list:USER-MODE LINUX UML, Thomas Gleixner, Richard Henderson,
Matt Redfearn, Greg Kroah-Hartman, Ralf Baechle, Richard Kuo,
Paul Burton, Andrew Morton, open list:IA64 Itanium PLATFORM,
James Hogan, Palmer Dabbelt, Max Filippov, Deepa Dinamani,
Vincent Chen, open list:S390, open list:C6X ARCHITECTURE,
Yoshinori Sato, open list:QUALCOMM HEXAGON ARCHITECTURE,
Helge Deller, Jan Henrik Weinstock, Andrey Ryabinin,
open list:TENSILICA XTENSA PORT xtensa, Jessica Yu,
Philippe Ombredanne, Aurelien Jacquiot,
open list:M68K ARCHITECTURE, Stafford Horne, linux-arm-kernel,
Chris Zankel, Tony Luck, open list:OPENRISC ARCHITECTURE,
Martin Schwidefsky, Kate Stewart, Heiko Carstens,
Alexei Starovoitov, Frank Rowand, Florian Fainelli,
Daniel Borkmann, open list:SYNOPSYS ARC ARCHITECTURE, Fenghua Yu,
arnd, Andrey Konovalov, Jeff Dike, Masahiro Yamada,
Borislav Petkov, Greentime Hu, Guan Xuetao,
open list:PARISC ARCHITECTURE, Ard Biesheuvel, Christoffer Dall,
open list:ALPHA PORT, Olof Johansson, Ley Foon Tan,
David S. Miller, Rich Felker, Hendrik Brueckner, Thomas Petazzoni,
H. Peter Anvin, open list:SPARC + UltraSPARC sparc/sparc64,
open list:RISC-V ARCHITECTURE, Greg Ungerer, Jonas Bonn,
Richard Weinberger, maintainer:X86 ARCHITECTURE 32-BIT AND 64-BIT,
Russell King, Ingo Molnar, Mark Salter,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE, Albert Ou,
Stefan Kristiansson, Rob Herring,
moderated list:NIOS2 ARCHITECTURE, Michal Simek, Vineet Gupta,
Stephen Boyd, Ivan Kokshaysky,
open list:LINUX FOR POWERPC 32-BIT AND 64-BIT
Hi all,
While investigating why ARM64 required a ton of objects to be rebuilt
when toggling CONFIG_DEV_BLK_INITRD, it became clear that this was
because we define __early_init_dt_declare_initrd() differently and we do
that in arch/arm64/include/asm/memory.h which gets included by a fair
amount of other header files, and translation units as well.
This patch series proposes adding an empty initrd.h to satisfy the need
for drivers/of/fdt.c to unconditionally include that file, and moves the
custom __early_init_dt_declare_initrd() definition away from
asm/memory.h
This cuts the number of objects rebuilds from 1920 down to 26, so a
factor 73 approximately.
Apologies for the long CC list, please let me know how you would go
about merging that and if another approach would be preferable, e.g:
introducing a CONFIG_ARCH_INITRD_BELOW_START_OK Kconfig option or
something like that.
Florian Fainelli (2):
arch: Add asm-generic/initrd.h and make use of it for most
architectures
arm64: Create asm/initrd.h
arch/alpha/include/asm/Kbuild | 1 +
arch/arc/include/asm/Kbuild | 1 +
arch/arm/include/asm/Kbuild | 1 +
arch/arm64/include/asm/initrd.h | 13 +++++++++++++
arch/arm64/include/asm/memory.h | 8 --------
arch/c6x/include/asm/Kbuild | 1 +
arch/h8300/include/asm/Kbuild | 1 +
arch/hexagon/include/asm/Kbuild | 1 +
arch/ia64/include/asm/Kbuild | 1 +
arch/m68k/include/asm/Kbuild | 1 +
arch/microblaze/include/asm/Kbuild | 1 +
arch/mips/include/asm/Kbuild | 1 +
arch/nds32/include/asm/Kbuild | 1 +
arch/nios2/include/asm/Kbuild | 1 +
arch/openrisc/include/asm/Kbuild | 1 +
arch/parisc/include/asm/Kbuild | 1 +
arch/powerpc/include/asm/Kbuild | 1 +
arch/riscv/include/asm/Kbuild | 1 +
arch/s390/include/asm/Kbuild | 1 +
arch/sh/include/asm/Kbuild | 1 +
arch/sparc/include/asm/Kbuild | 1 +
arch/um/include/asm/Kbuild | 1 +
arch/unicore32/include/asm/Kbuild | 1 +
arch/x86/include/asm/Kbuild | 1 +
arch/xtensa/include/asm/Kbuild | 1 +
drivers/of/fdt.c | 1 +
include/asm-generic/initrd.h | 1 +
27 files changed, 38 insertions(+), 8 deletions(-)
create mode 100644 arch/arm64/include/asm/initrd.h
create mode 100644 include/asm-generic/initrd.h
--
2.17.1
^ permalink raw reply
* [PATCH 1/2] arch: Add asm-generic/initrd.h and make use of it for most architectures
From: Florian Fainelli @ 2018-10-23 23:40 UTC (permalink / raw)
To: linux-kernel
Cc: open list:MIPS, Alan Kao, open list:SUPERH, Will Deacon,
Paul Mackerras, open list:GENERIC INCLUDE/ASM HEADER FILES,
James E.J. Bottomley, Geert Uytterhoeven, Catalin Marinas,
Matt Turner, moderated list:H8/300 ARCHITECTURE, Marc Zyngier,
open list:USER-MODE LINUX UML, Thomas Gleixner, Richard Henderson,
Matt Redfearn, Greg Kroah-Hartman, Ralf Baechle, Richard Kuo,
Paul Burton, Andrew Morton, open list:IA64 Itanium PLATFORM,
James Hogan, Palmer Dabbelt, Max Filippov, Deepa Dinamani,
Vincent Chen, open list:S390, open list:C6X ARCHITECTURE,
Yoshinori Sato, open list:QUALCOMM HEXAGON ARCHITECTURE,
Helge Deller, Jan Henrik Weinstock, Andrey Ryabinin,
open list:TENSILICA XTENSA PORT xtensa, Jessica Yu,
Philippe Ombredanne, Aurelien Jacquiot,
open list:M68K ARCHITECTURE, Stafford Horne, linux-arm-kernel,
Chris Zankel, Tony Luck, open list:OPENRISC ARCHITECTURE,
Martin Schwidefsky, Kate Stewart, Heiko Carstens,
Alexei Starovoitov, Frank Rowand, Florian Fainelli,
Daniel Borkmann, open list:SYNOPSYS ARC ARCHITECTURE, Fenghua Yu,
arnd, Andrey Konovalov, Jeff Dike, Masahiro Yamada,
Borislav Petkov, Greentime Hu, Guan Xuetao,
open list:PARISC ARCHITECTURE, Ard Biesheuvel, Christoffer Dall,
open list:ALPHA PORT, Olof Johansson, Ley Foon Tan,
David S. Miller, Rich Felker, Hendrik Brueckner, Thomas Petazzoni,
H. Peter Anvin, open list:SPARC + UltraSPARC sparc/sparc64,
open list:RISC-V ARCHITECTURE, Greg Ungerer, Jonas Bonn,
Richard Weinberger, maintainer:X86 ARCHITECTURE 32-BIT AND 64-BIT,
Russell King, Ingo Molnar, Mark Salter,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE, Albert Ou,
Stefan Kristiansson, Rob Herring,
moderated list:NIOS2 ARCHITECTURE, Michal Simek, Vineet Gupta,
Stephen Boyd, Ivan Kokshaysky,
open list:LINUX FOR POWERPC 32-BIT AND 64-BIT
In-Reply-To: <20181023234044.1138-1-f.fainelli@gmail.com>
In preparation for separating the definition of
__early_init_dt_declare_initrd() on ARM64 in order to cut the amount of
files that require a rebuild when CONFIG_BLK_DEV_INITRD value is
changed, introduce an empty asm-generic initrd.h file and update all
architectures but arm64 to make use of it.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
arch/alpha/include/asm/Kbuild | 1 +
arch/arc/include/asm/Kbuild | 1 +
arch/arm/include/asm/Kbuild | 1 +
arch/c6x/include/asm/Kbuild | 1 +
arch/h8300/include/asm/Kbuild | 1 +
arch/hexagon/include/asm/Kbuild | 1 +
arch/ia64/include/asm/Kbuild | 1 +
arch/m68k/include/asm/Kbuild | 1 +
arch/microblaze/include/asm/Kbuild | 1 +
arch/mips/include/asm/Kbuild | 1 +
arch/nds32/include/asm/Kbuild | 1 +
arch/nios2/include/asm/Kbuild | 1 +
arch/openrisc/include/asm/Kbuild | 1 +
arch/parisc/include/asm/Kbuild | 1 +
arch/powerpc/include/asm/Kbuild | 1 +
arch/riscv/include/asm/Kbuild | 1 +
arch/s390/include/asm/Kbuild | 1 +
arch/sh/include/asm/Kbuild | 1 +
arch/sparc/include/asm/Kbuild | 1 +
arch/um/include/asm/Kbuild | 1 +
arch/unicore32/include/asm/Kbuild | 1 +
arch/x86/include/asm/Kbuild | 1 +
arch/xtensa/include/asm/Kbuild | 1 +
include/asm-generic/initrd.h | 1 +
24 files changed, 24 insertions(+)
create mode 100644 include/asm-generic/initrd.h
diff --git a/arch/alpha/include/asm/Kbuild b/arch/alpha/include/asm/Kbuild
index 0580cb8c84b2..cd6f723aed1b 100644
--- a/arch/alpha/include/asm/Kbuild
+++ b/arch/alpha/include/asm/Kbuild
@@ -5,6 +5,7 @@ generic-y += compat.h
generic-y += exec.h
generic-y += export.h
generic-y += fb.h
+generic-y += initrd.h
generic-y += irq_work.h
generic-y += mcs_spinlock.h
generic-y += mm-arch-hooks.h
diff --git a/arch/arc/include/asm/Kbuild b/arch/arc/include/asm/Kbuild
index feed50ce89fa..ba18632aa493 100644
--- a/arch/arc/include/asm/Kbuild
+++ b/arch/arc/include/asm/Kbuild
@@ -10,6 +10,7 @@ generic-y += fb.h
generic-y += ftrace.h
generic-y += hardirq.h
generic-y += hw_irq.h
+generic-y += initrd.h
generic-y += irq_regs.h
generic-y += irq_work.h
generic-y += kmap_types.h
diff --git a/arch/arm/include/asm/Kbuild b/arch/arm/include/asm/Kbuild
index 1d66db9c9db5..b91d5b32e64f 100644
--- a/arch/arm/include/asm/Kbuild
+++ b/arch/arm/include/asm/Kbuild
@@ -4,6 +4,7 @@ generic-y += early_ioremap.h
generic-y += emergency-restart.h
generic-y += exec.h
generic-y += extable.h
+generic-y += initrd.h
generic-y += irq_regs.h
generic-y += kdebug.h
generic-y += local.h
diff --git a/arch/c6x/include/asm/Kbuild b/arch/c6x/include/asm/Kbuild
index 33a2c94fed0d..9e14cf6e89b4 100644
--- a/arch/c6x/include/asm/Kbuild
+++ b/arch/c6x/include/asm/Kbuild
@@ -13,6 +13,7 @@ generic-y += extable.h
generic-y += fb.h
generic-y += futex.h
generic-y += hw_irq.h
+generic-y += initrd.h
generic-y += io.h
generic-y += irq_regs.h
generic-y += irq_work.h
diff --git a/arch/h8300/include/asm/Kbuild b/arch/h8300/include/asm/Kbuild
index a5d0b2991f47..7d4e06a757c8 100644
--- a/arch/h8300/include/asm/Kbuild
+++ b/arch/h8300/include/asm/Kbuild
@@ -19,6 +19,7 @@ generic-y += futex.h
generic-y += hardirq.h
generic-y += hash.h
generic-y += hw_irq.h
+generic-y += initrd.h
generic-y += irq_regs.h
generic-y += irq_work.h
generic-y += kdebug.h
diff --git a/arch/hexagon/include/asm/Kbuild b/arch/hexagon/include/asm/Kbuild
index 47c4da3d64a4..0be62abf2123 100644
--- a/arch/hexagon/include/asm/Kbuild
+++ b/arch/hexagon/include/asm/Kbuild
@@ -13,6 +13,7 @@ generic-y += fb.h
generic-y += ftrace.h
generic-y += hardirq.h
generic-y += hw_irq.h
+generic-y += initrd.h
generic-y += iomap.h
generic-y += irq_regs.h
generic-y += irq_work.h
diff --git a/arch/ia64/include/asm/Kbuild b/arch/ia64/include/asm/Kbuild
index 557bbc8ba9f5..1a1f1e4ba0d5 100644
--- a/arch/ia64/include/asm/Kbuild
+++ b/arch/ia64/include/asm/Kbuild
@@ -1,5 +1,6 @@
generic-y += compat.h
generic-y += exec.h
+generic-y += initrd.h
generic-y += irq_work.h
generic-y += mcs_spinlock.h
generic-y += mm-arch-hooks.h
diff --git a/arch/m68k/include/asm/Kbuild b/arch/m68k/include/asm/Kbuild
index a4b8d3331a9e..9903551e0c9c 100644
--- a/arch/m68k/include/asm/Kbuild
+++ b/arch/m68k/include/asm/Kbuild
@@ -7,6 +7,7 @@ generic-y += exec.h
generic-y += extable.h
generic-y += futex.h
generic-y += hw_irq.h
+generic-y += initrd.h
generic-y += irq_regs.h
generic-y += irq_work.h
generic-y += kdebug.h
diff --git a/arch/microblaze/include/asm/Kbuild b/arch/microblaze/include/asm/Kbuild
index 569ba9e670c1..ec37e6304be5 100644
--- a/arch/microblaze/include/asm/Kbuild
+++ b/arch/microblaze/include/asm/Kbuild
@@ -11,6 +11,7 @@ generic-y += exec.h
generic-y += extable.h
generic-y += fb.h
generic-y += hardirq.h
+generic-y += initrd.h
generic-y += irq_regs.h
generic-y += irq_work.h
generic-y += kdebug.h
diff --git a/arch/mips/include/asm/Kbuild b/arch/mips/include/asm/Kbuild
index 9a81e72119da..005ef04a4c73 100644
--- a/arch/mips/include/asm/Kbuild
+++ b/arch/mips/include/asm/Kbuild
@@ -5,6 +5,7 @@ generic-y += device.h
generic-y += dma-contiguous.h
generic-y += emergency-restart.h
generic-y += export.h
+generic-y += initrd.h
generic-y += irq_work.h
generic-y += local64.h
generic-y += mcs_spinlock.h
diff --git a/arch/nds32/include/asm/Kbuild b/arch/nds32/include/asm/Kbuild
index dbc4e5422550..1400aaf0c840 100644
--- a/arch/nds32/include/asm/Kbuild
+++ b/arch/nds32/include/asm/Kbuild
@@ -25,6 +25,7 @@ generic-y += ftrace.h
generic-y += gpio.h
generic-y += hardirq.h
generic-y += hw_irq.h
+generic-y += initrd.h
generic-y += ioctl.h
generic-y += ioctls.h
generic-y += irq.h
diff --git a/arch/nios2/include/asm/Kbuild b/arch/nios2/include/asm/Kbuild
index 8fde4fa2c34f..d89de02549ee 100644
--- a/arch/nios2/include/asm/Kbuild
+++ b/arch/nios2/include/asm/Kbuild
@@ -18,6 +18,7 @@ generic-y += ftrace.h
generic-y += futex.h
generic-y += hardirq.h
generic-y += hw_irq.h
+generic-y += initrd.h
generic-y += irq_regs.h
generic-y += irq_work.h
generic-y += kdebug.h
diff --git a/arch/openrisc/include/asm/Kbuild b/arch/openrisc/include/asm/Kbuild
index eb87cd8327c8..296fd55e8473 100644
--- a/arch/openrisc/include/asm/Kbuild
+++ b/arch/openrisc/include/asm/Kbuild
@@ -15,6 +15,7 @@ generic-y += fb.h
generic-y += ftrace.h
generic-y += hardirq.h
generic-y += hw_irq.h
+generic-y += initrd.h
generic-y += irq.h
generic-y += irq_regs.h
generic-y += irq_work.h
diff --git a/arch/parisc/include/asm/Kbuild b/arch/parisc/include/asm/Kbuild
index 2013d639e735..1382d78a2477 100644
--- a/arch/parisc/include/asm/Kbuild
+++ b/arch/parisc/include/asm/Kbuild
@@ -5,6 +5,7 @@ generic-y += div64.h
generic-y += emergency-restart.h
generic-y += exec.h
generic-y += hw_irq.h
+generic-y += initrd.h
generic-y += irq_regs.h
generic-y += irq_work.h
generic-y += kdebug.h
diff --git a/arch/powerpc/include/asm/Kbuild b/arch/powerpc/include/asm/Kbuild
index 3196d227e351..e3ea67c30605 100644
--- a/arch/powerpc/include/asm/Kbuild
+++ b/arch/powerpc/include/asm/Kbuild
@@ -1,5 +1,6 @@
generic-y += div64.h
generic-y += export.h
+generic-y += initrd.h
generic-y += irq_regs.h
generic-y += irq_work.h
generic-y += local64.h
diff --git a/arch/riscv/include/asm/Kbuild b/arch/riscv/include/asm/Kbuild
index efdbe311e936..0e67ed69c423 100644
--- a/arch/riscv/include/asm/Kbuild
+++ b/arch/riscv/include/asm/Kbuild
@@ -17,6 +17,7 @@ generic-y += futex.h
generic-y += hardirq.h
generic-y += hash.h
generic-y += hw_irq.h
+generic-y += initrd.h
generic-y += ioctl.h
generic-y += ioctls.h
generic-y += ipcbuf.h
diff --git a/arch/s390/include/asm/Kbuild b/arch/s390/include/asm/Kbuild
index e3239772887a..dc618745d427 100644
--- a/arch/s390/include/asm/Kbuild
+++ b/arch/s390/include/asm/Kbuild
@@ -13,6 +13,7 @@ generic-y += div64.h
generic-y += emergency-restart.h
generic-y += export.h
generic-y += fb.h
+generic-y += initrd.h
generic-y += irq_regs.h
generic-y += irq_work.h
generic-y += kmap_types.h
diff --git a/arch/sh/include/asm/Kbuild b/arch/sh/include/asm/Kbuild
index 6a5609a55965..c006a7cf3a43 100644
--- a/arch/sh/include/asm/Kbuild
+++ b/arch/sh/include/asm/Kbuild
@@ -5,6 +5,7 @@ generic-y += div64.h
generic-y += dma-mapping.h
generic-y += emergency-restart.h
generic-y += exec.h
+generic-y += initrd.h
generic-y += irq_regs.h
generic-y += irq_work.h
generic-y += local.h
diff --git a/arch/sparc/include/asm/Kbuild b/arch/sparc/include/asm/Kbuild
index 410b263ef5c8..a5772c2a96c8 100644
--- a/arch/sparc/include/asm/Kbuild
+++ b/arch/sparc/include/asm/Kbuild
@@ -5,6 +5,7 @@ generic-y += div64.h
generic-y += emergency-restart.h
generic-y += exec.h
generic-y += export.h
+generic-y += initrd.h
generic-y += irq_regs.h
generic-y += irq_work.h
generic-y += linkage.h
diff --git a/arch/um/include/asm/Kbuild b/arch/um/include/asm/Kbuild
index b10dde6cb793..032cfe1b530b 100644
--- a/arch/um/include/asm/Kbuild
+++ b/arch/um/include/asm/Kbuild
@@ -12,6 +12,7 @@ generic-y += ftrace.h
generic-y += futex.h
generic-y += hardirq.h
generic-y += hw_irq.h
+generic-y += initrd.h
generic-y += io.h
generic-y += irq_regs.h
generic-y += irq_work.h
diff --git a/arch/unicore32/include/asm/Kbuild b/arch/unicore32/include/asm/Kbuild
index 1372553dc0a9..32e7dea45fcd 100644
--- a/arch/unicore32/include/asm/Kbuild
+++ b/arch/unicore32/include/asm/Kbuild
@@ -13,6 +13,7 @@ generic-y += ftrace.h
generic-y += futex.h
generic-y += hardirq.h
generic-y += hw_irq.h
+generic-y += initrd.h
generic-y += irq_regs.h
generic-y += irq_work.h
generic-y += kdebug.h
diff --git a/arch/x86/include/asm/Kbuild b/arch/x86/include/asm/Kbuild
index a0ab9ab61c75..290bd1c3ee2d 100644
--- a/arch/x86/include/asm/Kbuild
+++ b/arch/x86/include/asm/Kbuild
@@ -9,5 +9,6 @@ generated-y += xen-hypercalls.h
generic-y += dma-contiguous.h
generic-y += early_ioremap.h
generic-y += export.h
+generic-y += initrd.h
generic-y += mcs_spinlock.h
generic-y += mm-arch-hooks.h
diff --git a/arch/xtensa/include/asm/Kbuild b/arch/xtensa/include/asm/Kbuild
index 82c756431b49..f2c363f2d22a 100644
--- a/arch/xtensa/include/asm/Kbuild
+++ b/arch/xtensa/include/asm/Kbuild
@@ -9,6 +9,7 @@ generic-y += exec.h
generic-y += extable.h
generic-y += fb.h
generic-y += hardirq.h
+generic-y += initrd.h
generic-y += irq_regs.h
generic-y += irq_work.h
generic-y += kdebug.h
diff --git a/include/asm-generic/initrd.h b/include/asm-generic/initrd.h
new file mode 100644
index 000000000000..b1a49677fe25
--- /dev/null
+++ b/include/asm-generic/initrd.h
@@ -0,0 +1 @@
+/* no content, but patch(1) dislikes empty files */
--
2.17.1
^ permalink raw reply related
* [PATCH 2/2] arm64: Create asm/initrd.h
From: Florian Fainelli @ 2018-10-23 23:40 UTC (permalink / raw)
To: linux-kernel
Cc: open list:MIPS, Alan Kao, open list:SUPERH, Will Deacon,
Paul Mackerras, open list:GENERIC INCLUDE/ASM HEADER FILES,
James E.J. Bottomley, Geert Uytterhoeven, Catalin Marinas,
Matt Turner, moderated list:H8/300 ARCHITECTURE, Marc Zyngier,
open list:USER-MODE LINUX UML, Thomas Gleixner, Richard Henderson,
Matt Redfearn, Greg Kroah-Hartman, Ralf Baechle, Richard Kuo,
Paul Burton, Andrew Morton, open list:IA64 Itanium PLATFORM,
James Hogan, Palmer Dabbelt, Max Filippov, Deepa Dinamani,
Vincent Chen, open list:S390, open list:C6X ARCHITECTURE,
Yoshinori Sato, open list:QUALCOMM HEXAGON ARCHITECTURE,
Helge Deller, Jan Henrik Weinstock, Andrey Ryabinin,
open list:TENSILICA XTENSA PORT xtensa, Jessica Yu,
Philippe Ombredanne, Aurelien Jacquiot,
open list:M68K ARCHITECTURE, Stafford Horne, linux-arm-kernel,
Chris Zankel, Tony Luck, open list:OPENRISC ARCHITECTURE,
Martin Schwidefsky, Kate Stewart, Heiko Carstens,
Alexei Starovoitov, Frank Rowand, Florian Fainelli,
Daniel Borkmann, open list:SYNOPSYS ARC ARCHITECTURE, Fenghua Yu,
arnd, Andrey Konovalov, Jeff Dike, Masahiro Yamada,
Borislav Petkov, Greentime Hu, Guan Xuetao,
open list:PARISC ARCHITECTURE, Ard Biesheuvel, Christoffer Dall,
open list:ALPHA PORT, Olof Johansson, Ley Foon Tan,
David S. Miller, Rich Felker, Hendrik Brueckner, Thomas Petazzoni,
H. Peter Anvin, open list:SPARC + UltraSPARC sparc/sparc64,
open list:RISC-V ARCHITECTURE, Greg Ungerer, Jonas Bonn,
Richard Weinberger, maintainer:X86 ARCHITECTURE 32-BIT AND 64-BIT,
Russell King, Ingo Molnar, Mark Salter,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE, Albert Ou,
Stefan Kristiansson, Rob Herring,
moderated list:NIOS2 ARCHITECTURE, Michal Simek, Vineet Gupta,
Stephen Boyd, Ivan Kokshaysky,
open list:LINUX FOR POWERPC 32-BIT AND 64-BIT
In-Reply-To: <20181023234044.1138-1-f.fainelli@gmail.com>
ARM64 is the only architecture that requires a re-definition of
__early_init_dt_declare_initrd(). Now that we added the infrastructure
in asm-generic to provide an asm/initrd.h file, properly break up that
definition from asm/memory.h and make use of that header in
drivers/of/fdt.c where this is used.
This significantly cuts the number of objects that need to be rebuilt on
ARM64 due to the repercusions of including asm/memory.h in several
places.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
arch/arm64/include/asm/initrd.h | 13 +++++++++++++
arch/arm64/include/asm/memory.h | 8 --------
drivers/of/fdt.c | 1 +
3 files changed, 14 insertions(+), 8 deletions(-)
create mode 100644 arch/arm64/include/asm/initrd.h
diff --git a/arch/arm64/include/asm/initrd.h b/arch/arm64/include/asm/initrd.h
new file mode 100644
index 000000000000..0c9572485810
--- /dev/null
+++ b/arch/arm64/include/asm/initrd.h
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __ASM_INITRD_H
+#define __ASM_INITRD_H
+
+#ifdef CONFIG_BLK_DEV_INITRD
+#define __early_init_dt_declare_initrd(__start, __end) \
+ do { \
+ initrd_start = (__start); \
+ initrd_end = (__end); \
+ } while (0)
+#endif
+
+#endif /* __ASM_INITRD_H */
diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h
index b96442960aea..dc3ca21ba240 100644
--- a/arch/arm64/include/asm/memory.h
+++ b/arch/arm64/include/asm/memory.h
@@ -168,14 +168,6 @@
#define IOREMAP_MAX_ORDER (PMD_SHIFT)
#endif
-#ifdef CONFIG_BLK_DEV_INITRD
-#define __early_init_dt_declare_initrd(__start, __end) \
- do { \
- initrd_start = (__start); \
- initrd_end = (__end); \
- } while (0)
-#endif
-
#ifndef __ASSEMBLY__
#include <linux/bitops.h>
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 800ad252cf9c..4e4711af907b 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -28,6 +28,7 @@
#include <asm/setup.h> /* for COMMAND_LINE_SIZE */
#include <asm/page.h>
+#include <asm/initrd.h>
#include "of_private.h"
--
2.17.1
^ permalink raw reply related
* Re: [PATCH 2/4] mm: speed up mremap by 500x on large regions (v2)
From: Balbir Singh @ 2018-10-24 11:57 UTC (permalink / raw)
To: Kirill A. Shutemov
Cc: linux-mips, Rich Felker, linux-ia64, linux-sh, Peter Zijlstra,
Catalin Marinas, Dave Hansen, Will Deacon, mhocko, linux-mm,
lokeshgidra, Joel Fernandes (Google), linux-riscv, elfring,
Jonas Bonn, kvmarm, dancol, Yoshinori Sato, sparclinux,
linux-xtensa, linux-hexagon, Helge Deller,
maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT), hughd,
James E.J. Bottomley, kasan-dev, anton.ivanov, Ingo Molnar,
Geert Uytterhoeven, Andrey Ryabinin, linux-snps-arc, kernel-team,
Sam Creasey, Fenghua Yu, linux-s390, Jeff Dike, linux-um,
Stefan Kristiansson, Julia Lawall, linux-m68k, Borislav Petkov,
Andy Lutomirski, nios2-dev, Stafford Horne, Guan Xuetao,
Chris Zankel, Tony Luck, Richard Weinberger, linux-parisc, pantin,
Max Filippov, linux-kernel, minchan, Thomas Gleixner, linux-alpha,
Ley Foon Tan, akpm, linuxppc-dev, David S. Miller
In-Reply-To: <20181024101255.it4lptrjogalxbey@kshutemo-mobl1>
On Wed, Oct 24, 2018 at 01:12:56PM +0300, Kirill A. Shutemov wrote:
> On Fri, Oct 12, 2018 at 06:31:58PM -0700, Joel Fernandes (Google) wrote:
> > diff --git a/mm/mremap.c b/mm/mremap.c
> > index 9e68a02a52b1..2fd163cff406 100644
> > --- a/mm/mremap.c
> > +++ b/mm/mremap.c
> > @@ -191,6 +191,54 @@ static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd,
> > drop_rmap_locks(vma);
> > }
> >
> > +static bool move_normal_pmd(struct vm_area_struct *vma, unsigned long old_addr,
> > + unsigned long new_addr, unsigned long old_end,
> > + pmd_t *old_pmd, pmd_t *new_pmd, bool *need_flush)
> > +{
> > + spinlock_t *old_ptl, *new_ptl;
> > + struct mm_struct *mm = vma->vm_mm;
> > +
> > + if ((old_addr & ~PMD_MASK) || (new_addr & ~PMD_MASK)
> > + || old_end - old_addr < PMD_SIZE)
> > + return false;
> > +
> > + /*
> > + * The destination pmd shouldn't be established, free_pgtables()
> > + * should have release it.
> > + */
> > + if (WARN_ON(!pmd_none(*new_pmd)))
> > + return false;
> > +
> > + /*
> > + * We don't have to worry about the ordering of src and dst
> > + * ptlocks because exclusive mmap_sem prevents deadlock.
> > + */
> > + old_ptl = pmd_lock(vma->vm_mm, old_pmd);
> > + if (old_ptl) {
>
> How can it ever be false?
>
> > + pmd_t pmd;
> > +
> > + new_ptl = pmd_lockptr(mm, new_pmd);
Looks like this is largely inspired by move_huge_pmd(), I guess a lot of
the code applies, why not just reuse as much as possible? The same comments
w.r.t mmap_sem helping protect against lock order issues applies as well.
> > + if (new_ptl != old_ptl)
> > + spin_lock_nested(new_ptl, SINGLE_DEPTH_NESTING);
> > +
> > + /* Clear the pmd */
> > + pmd = *old_pmd;
> > + pmd_clear(old_pmd);
> > +
> > + VM_BUG_ON(!pmd_none(*new_pmd));
> > +
> > + /* Set the new pmd */
> > + set_pmd_at(mm, new_addr, new_pmd, pmd);
> > + if (new_ptl != old_ptl)
> > + spin_unlock(new_ptl);
> > + spin_unlock(old_ptl);
> > +
> > + *need_flush = true;
> > + return true;
> > + }
> > + return false;
> > +}
> > +
> --
> Kirill A. Shutemov
>
^ permalink raw reply
* Re: [PATCH 2/4] mm: speed up mremap by 500x on large regions (v2)
From: Kirill A. Shutemov @ 2018-10-24 12:57 UTC (permalink / raw)
To: Balbir Singh
Cc: linux-mips, Rich Felker, linux-ia64, linux-sh, Peter Zijlstra,
Catalin Marinas, Dave Hansen, Will Deacon, mhocko, linux-mm,
lokeshgidra, Joel Fernandes (Google), linux-riscv, elfring,
Jonas Bonn, kvmarm, dancol, Yoshinori Sato, sparclinux,
linux-xtensa, linux-hexagon, Helge Deller,
maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT), hughd,
James E.J. Bottomley, kasan-dev, anton.ivanov, Ingo Molnar,
Geert Uytterhoeven, Andrey Ryabinin, linux-snps-arc, kernel-team,
Sam Creasey, Fenghua Yu, linux-s390, Jeff Dike, linux-um,
Stefan Kristiansson, Julia Lawall, linux-m68k, Borislav Petkov,
Andy Lutomirski, nios2-dev, Stafford Horne, Guan Xuetao,
Chris Zankel, Tony Luck, Richard Weinberger, linux-parisc, pantin,
Max Filippov, linux-kernel, minchan, Thomas Gleixner, linux-alpha,
Ley Foon Tan, akpm, linuxppc-dev, David S. Miller
In-Reply-To: <20181024115733.GN8537@350D>
On Wed, Oct 24, 2018 at 10:57:33PM +1100, Balbir Singh wrote:
> On Wed, Oct 24, 2018 at 01:12:56PM +0300, Kirill A. Shutemov wrote:
> > On Fri, Oct 12, 2018 at 06:31:58PM -0700, Joel Fernandes (Google) wrote:
> > > diff --git a/mm/mremap.c b/mm/mremap.c
> > > index 9e68a02a52b1..2fd163cff406 100644
> > > --- a/mm/mremap.c
> > > +++ b/mm/mremap.c
> > > @@ -191,6 +191,54 @@ static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd,
> > > drop_rmap_locks(vma);
> > > }
> > >
> > > +static bool move_normal_pmd(struct vm_area_struct *vma, unsigned long old_addr,
> > > + unsigned long new_addr, unsigned long old_end,
> > > + pmd_t *old_pmd, pmd_t *new_pmd, bool *need_flush)
> > > +{
> > > + spinlock_t *old_ptl, *new_ptl;
> > > + struct mm_struct *mm = vma->vm_mm;
> > > +
> > > + if ((old_addr & ~PMD_MASK) || (new_addr & ~PMD_MASK)
> > > + || old_end - old_addr < PMD_SIZE)
> > > + return false;
> > > +
> > > + /*
> > > + * The destination pmd shouldn't be established, free_pgtables()
> > > + * should have release it.
> > > + */
> > > + if (WARN_ON(!pmd_none(*new_pmd)))
> > > + return false;
> > > +
> > > + /*
> > > + * We don't have to worry about the ordering of src and dst
> > > + * ptlocks because exclusive mmap_sem prevents deadlock.
> > > + */
> > > + old_ptl = pmd_lock(vma->vm_mm, old_pmd);
> > > + if (old_ptl) {
> >
> > How can it ever be false?
> >
> > > + pmd_t pmd;
> > > +
> > > + new_ptl = pmd_lockptr(mm, new_pmd);
>
>
> Looks like this is largely inspired by move_huge_pmd(), I guess a lot of
> the code applies, why not just reuse as much as possible? The same comments
> w.r.t mmap_sem helping protect against lock order issues applies as well.
pmd_lock() cannot fail, but __pmd_trans_huge_lock() can. We should not
copy the code blindly.
--
Kirill A. Shutemov
^ permalink raw reply
* Re: [PATCH 2/2] selftests/powerpc: Skip test instead of failing
From: Breno Leitao @ 2018-10-24 14:11 UTC (permalink / raw)
To: Tyrel Datwyler, linuxppc-dev; +Cc: Thiago Jung Bauermann
In-Reply-To: <56cdd832-6229-bf95-58ee-1783f931e7bd@linux.vnet.ibm.com>
Hi Tyrel,
On 10/23/2018 05:41 PM, Tyrel Datwyler wrote:
>> --- a/tools/testing/selftests/powerpc/ptrace/core-pkey.c
>> +++ b/tools/testing/selftests/powerpc/ptrace/core-pkey.c
>> @@ -352,17 +352,11 @@ static int write_core_pattern(const char *core_pattern)
>> FILE *f;
>>
>> f = fopen(core_pattern_file, "w");
>> - if (!f) {
>> - perror("Error writing to core_pattern file");
>> - return TEST_FAIL;
>> - }
>> + SKIP_IF(!f);
>>
>> ret = fwrite(core_pattern, 1, len, f);
>> fclose(f);
>> - if (ret != len) {
>> - perror("Error writing to core_pattern file");
>> - return TEST_FAIL;
>> - }
>> + SKIP_IF(ret != len);
> If we don't have proper privileges we should fail on the open, right?
> So wouldn't we still want to fail on the write if something goes
> wrong?
That is a good point. Should the test fail or skip if it is not possible
to create the infrastructure to run the core test?
Trying to find the answer in the current test sets, I find tests where
the self test skips if the test environment is not able to be set up, as
for example, when a memory allocation fails.
File: tools/testing/selftests/powerpc/alignment/alignment_handler.c
ci1 = mmap(NULL, bufsize, PROT_WRITE, MAP_SHARED,
fd, bufsize);
if ((ci0 == MAP_FAILED) || (ci1 == MAP_FAILED)) {
printf("\n");
perror("mmap failed");
SKIP_IF(1);
}
^ permalink raw reply
* Re: [PATCH 3/9] powerpc/mm: Remove extern from function definition
From: Breno Leitao @ 2018-10-24 14:59 UTC (permalink / raw)
To: LEROY Christophe; +Cc: linuxppc-dev
In-Reply-To: <20181023173828.Horde.uVbl4TiimFw-HLaYHTWqNw9@messagerie.si.c-s.fr>
hi Christophe,
On 10/23/2018 12:38 PM, LEROY Christophe wrote:
> Breno Leitao <leitao@debian.org> a écrit :
>>
>> This patch removes the keyword from the definition part, while keeps
>> it in
>> the declaration part.
>
> I think checkpatch also says that extern should be avoided in declarations.
Thanks for the review. I tried to look at this complain, but I didn't see
this behavior on checkpatch.pl from kernel 4.19. I created a commit that adds
a new extern prototype and checked the patch. Take a look:
# git show
commit 720cd4ee7bf3c0607eaea79e209b719bac79508e
Author: Breno Leitao <leitao@debian.org>
Date: Wed Oct 24 10:31:54 2018 -0400
powerpc/mm: New test function
New test function.
Signed-off-by: Breno Leitao <leitao@debian.org>
diff --git a/arch/powerpc/include/asm/hugetlb.h
b/arch/powerpc/include/asm/hugetlb.h
index 2d00cc530083..4a348e42cab6 100644
--- a/arch/powerpc/include/asm/hugetlb.h
+++ b/arch/powerpc/include/asm/hugetlb.h
@@ -167,6 +167,8 @@ extern int huge_ptep_set_access_flags(struct vm_area_struct *vma,
unsigned long addr, pte_t *ptep,
pte_t pte, int dirty);
+extern int test(int foo);
+
static inline pte_t huge_ptep_get(pte_t *ptep)
{
return *ptep;
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 5c390f5a5207..2e8f5f77f7f6 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -3204,6 +3204,11 @@ static void set_huge_ptep_writable(struct
vm_area_struct *vma,
update_mmu_cache(vma, address, ptep);
}
+int test(int foo)
+{
+ return foo;
+}
+
bool is_hugetlb_entry_migration(pte_t pte)
{
swp_entry_t swp;
# scripts/checkpatch.pl -g HEAD
total: 0 errors, 0 warnings, 19 lines checked
Commit 720cd4ee7bf3 ("powerpc/mm: New test function") has no obvious
style problems and is ready for submission.
^ permalink raw reply
* Re: [PATCH 3/9] powerpc/mm: Remove extern from function definition
From: LEROY Christophe @ 2018-10-24 15:12 UTC (permalink / raw)
To: Breno Leitao; +Cc: linuxppc-dev
In-Reply-To: <3bd3ed6e-3390-a80f-59f8-c1cc0efaa10f@debian.org>
Breno Leitao <leitao@debian.org> a écrit :
> hi Christophe,
>
> On 10/23/2018 12:38 PM, LEROY Christophe wrote:
>> Breno Leitao <leitao@debian.org> a écrit :
>>>
>>> This patch removes the keyword from the definition part, while keeps
>>> it in
>>> the declaration part.
>>
>> I think checkpatch also says that extern should be avoided in declarations.
>
> Thanks for the review. I tried to look at this complain, but I didn't see
> this behavior on checkpatch.pl from kernel 4.19. I created a commit that adds
> a new extern prototype and checked the patch. Take a look:
Use option --strict with checkpatch.pl
Christophe
>
> # git show
>
> commit 720cd4ee7bf3c0607eaea79e209b719bac79508e
> Author: Breno Leitao <leitao@debian.org>
> Date: Wed Oct 24 10:31:54 2018 -0400
>
> powerpc/mm: New test function
>
> New test function.
>
> Signed-off-by: Breno Leitao <leitao@debian.org>
>
> diff --git a/arch/powerpc/include/asm/hugetlb.h
> b/arch/powerpc/include/asm/hugetlb.h
> index 2d00cc530083..4a348e42cab6 100644
> --- a/arch/powerpc/include/asm/hugetlb.h
> +++ b/arch/powerpc/include/asm/hugetlb.h
> @@ -167,6 +167,8 @@ extern int huge_ptep_set_access_flags(struct
> vm_area_struct *vma,
> unsigned long addr, pte_t *ptep,
> pte_t pte, int dirty);
>
> +extern int test(int foo);
> +
> static inline pte_t huge_ptep_get(pte_t *ptep)
> {
> return *ptep;
>
> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> index 5c390f5a5207..2e8f5f77f7f6 100644
> --- a/mm/hugetlb.c
> +++ b/mm/hugetlb.c
> @@ -3204,6 +3204,11 @@ static void set_huge_ptep_writable(struct
> vm_area_struct *vma,
> update_mmu_cache(vma, address, ptep);
> }
>
> +int test(int foo)
> +{
> + return foo;
> +}
> +
> bool is_hugetlb_entry_migration(pte_t pte)
> {
> swp_entry_t swp;
>
>
> # scripts/checkpatch.pl -g HEAD
>
> total: 0 errors, 0 warnings, 19 lines checked
>
> Commit 720cd4ee7bf3 ("powerpc/mm: New test function") has no obvious
> style problems and is ready for submission.
^ permalink raw reply
* Re: [PATCH 1/3 v2] powerpc/fsl: Use new clockgen binding
From: Scott Wood @ 2018-10-24 17:41 UTC (permalink / raw)
To: andy.tang, sboyd, mturquette
Cc: mark.rutland, devicetree, linux-kernel, robh+dt, paulus,
linuxppc-dev, linux-clk
In-Reply-To: <20181024021122.3942-1-andy.tang@nxp.com>
On Wed, 2018-10-24 at 10:11 +0800, andy.tang@nxp.com wrote:
> From: Scott Wood <oss@buserror.net>
>
> The driver retains compatibility with old device trees, but we don't
> want the old nodes lying around to be copied, or used as a reference
> (some of the mux options are incorrect), or even just being clutter.
>
> We will also need the #clock-cells in the clockgen node in order to
> add fman nodes.
The comment about #clock-cells is no longer relevant to this patch, since that
has already been added.
-Scott
^ permalink raw reply
* Re: [PATCH] seccomp: Add pkru into seccomp_data
From: Florian Weimer @ 2018-10-24 18:06 UTC (permalink / raw)
To: Michael Sammler
Cc: Will Drewry, Kees Cook, linux-api, Ram Pai, Andy Lutomirski,
linuxppc-dev
In-Reply-To: <20181024153523.10974-1-msammler@mpi-sws.org>
* Michael Sammler:
> Add the current value of the PKRU register to data available for
> seccomp-bpf programs to work on. This allows filters based on the
> currently enabled protection keys.
> diff --git a/include/uapi/linux/seccomp.h b/include/uapi/linux/seccomp.h
> index 9efc0e73..e8b9ecfc 100644
> --- a/include/uapi/linux/seccomp.h
> +++ b/include/uapi/linux/seccomp.h
> @@ -52,12 +52,16 @@
> * @instruction_pointer: at the time of the system call.
> * @args: up to 6 system call arguments always stored as 64-bit values
> * regardless of the architecture.
> + * @pkru: value of the pkru register
> + * @reserved: pad the structure to a multiple of eight bytes
> */
> struct seccomp_data {
> int nr;
> __u32 arch;
> __u64 instruction_pointer;
> __u64 args[6];
> + __u32 pkru;
> + __u32 reserved;
> };
This doesn't cover the POWER implementation. Adding Cc:s.
And I think the kernel shouldn't expose the number of protection keys in
the ABI.
Thanks,
Florian
^ permalink raw reply
* Re: [PATCH 3/3 v2] clk: qoriq: update clock driver
From: Scott Wood @ 2018-10-24 18:37 UTC (permalink / raw)
To: andy.tang, sboyd, mturquette
Cc: mark.rutland, devicetree, linux-kernel, robh+dt, paulus,
linuxppc-dev, linux-clk
In-Reply-To: <20181024021122.3942-3-andy.tang@nxp.com>
On Wed, 2018-10-24 at 10:11 +0800, andy.tang@nxp.com wrote:
> From: Yuantian Tang <andy.tang@nxp.com>
>
> Legacy bindings are deleted. So the legacy support in driver
> can be deleted safely.
NACK (both this and 2/3). The legacy support is intended to preserve
compatibility, regardless of what the dts files in the current kernel tree do.
If years later we find it's been broken for a while and nobody complained,
then maybe it'll be time to remove it, but why deliberately throw away
compatibility the instant the users have been removed from reference DTs that
might be copied by board vendors, etc?
Note that even if we didn't care about long-term compatibility at all,
removing the support in the same patchset as the change to the dts files means
that the patches can't go in via separate trees (though if that's still the
intent, you should make it clear who you're asking to take what by putting
them in separate patchsets).
-Scott
^ permalink raw reply
* [PATCH v2 0/2] arm64: Cut rebuild time when changing CONFIG_BLK_DEV_INITRD
From: Florian Fainelli @ 2018-10-24 19:32 UTC (permalink / raw)
To: linux-kernel
Cc: open list:MIPS, open list:IA64 Itanium PLATFORM, open list:SUPERH,
Catalin Marinas, Will Deacon,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE,
open list:SPARC + UltraSPARC sparc/sparc64,
open list:RISC-V ARCHITECTURE,
open list:GENERIC INCLUDE/ASM HEADER FILES, open list:S390,
Florian Fainelli, open list:C6X ARCHITECTURE,
open list:QUALCOMM HEXAGON ARCHITECTURE,
open list:SYNOPSYS ARC ARCHITECTURE,
moderated list:H8/300 ARCHITECTURE,
open list:TENSILICA XTENSA PORT xtensa, Arnd Bergmann,
Marc Zyngier, open list:USER-MODE LINUX UML,
open list:M68K ARCHITECTURE, open list:OPENRISC ARCHITECTURE,
moderated list:ARM PORT, open list:PARISC ARCHITECTURE,
Greg Kroah-Hartman, open list:ALPHA PORT, Olof Johansson,
moderated list:NIOS2 ARCHITECTURE,
open list:LINUX FOR POWERPC 32-BIT AND 64-BIT
Hi all,
While investigating why ARM64 required a ton of objects to be rebuilt
when toggling CONFIG_DEV_BLK_INITRD, it became clear that this was
because we define __early_init_dt_declare_initrd() differently and we do
that in arch/arm64/include/asm/memory.h which gets included by a fair
amount of other header files, and translation units as well.
Changing the value of CONFIG_DEV_BLK_INITRD is a common thing with build
systems that generate two kernels: one with the initramfs and one
without. buildroot is one of these build systems, OpenWrt is also
another one that does this.
This patch series proposes adding an empty initrd.h to satisfy the need
for drivers/of/fdt.c to unconditionally include that file, and moves the
custom __early_init_dt_declare_initrd() definition away from
asm/memory.h
This cuts the number of objects rebuilds from 1920 down to 26, so a
factor 73 approximately.
Apologies for the long CC list, please let me know how you would go
about merging that and if another approach would be preferable, e.g:
introducing a CONFIG_ARCH_INITRD_BELOW_START_OK Kconfig option or
something like that.
Changes in v2:
- put an /* empty */ comment in the asm-generic/initrd.h file
- trim down the CC list to maximize the chances of people receiving this
Florian Fainelli (2):
arch: Add asm-generic/initrd.h and make use of it for most
architectures
arm64: Create asm/initrd.h
arch/alpha/include/asm/Kbuild | 1 +
arch/arc/include/asm/Kbuild | 1 +
arch/arm/include/asm/Kbuild | 1 +
arch/arm64/include/asm/initrd.h | 13 +++++++++++++
arch/arm64/include/asm/memory.h | 8 --------
arch/c6x/include/asm/Kbuild | 1 +
arch/h8300/include/asm/Kbuild | 1 +
arch/hexagon/include/asm/Kbuild | 1 +
arch/ia64/include/asm/Kbuild | 1 +
arch/m68k/include/asm/Kbuild | 1 +
arch/microblaze/include/asm/Kbuild | 1 +
arch/mips/include/asm/Kbuild | 1 +
arch/nds32/include/asm/Kbuild | 1 +
arch/nios2/include/asm/Kbuild | 1 +
arch/openrisc/include/asm/Kbuild | 1 +
arch/parisc/include/asm/Kbuild | 1 +
arch/powerpc/include/asm/Kbuild | 1 +
arch/riscv/include/asm/Kbuild | 1 +
arch/s390/include/asm/Kbuild | 1 +
arch/sh/include/asm/Kbuild | 1 +
arch/sparc/include/asm/Kbuild | 1 +
arch/um/include/asm/Kbuild | 1 +
arch/unicore32/include/asm/Kbuild | 1 +
arch/x86/include/asm/Kbuild | 1 +
arch/xtensa/include/asm/Kbuild | 1 +
drivers/of/fdt.c | 1 +
include/asm-generic/initrd.h | 1 +
27 files changed, 38 insertions(+), 8 deletions(-)
create mode 100644 arch/arm64/include/asm/initrd.h
create mode 100644 include/asm-generic/initrd.h
--
2.17.1
^ permalink raw reply
* [PATCH v2 1/2] arch: Add asm-generic/initrd.h and make use of it for most architectures
From: Florian Fainelli @ 2018-10-24 19:32 UTC (permalink / raw)
To: linux-kernel
Cc: open list:MIPS, open list:IA64 Itanium PLATFORM, open list:SUPERH,
Catalin Marinas, Will Deacon,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE,
open list:SPARC + UltraSPARC sparc/sparc64,
open list:RISC-V ARCHITECTURE,
open list:GENERIC INCLUDE/ASM HEADER FILES, open list:S390,
Florian Fainelli, open list:C6X ARCHITECTURE,
open list:QUALCOMM HEXAGON ARCHITECTURE,
open list:SYNOPSYS ARC ARCHITECTURE,
moderated list:H8/300 ARCHITECTURE,
open list:TENSILICA XTENSA PORT xtensa, Arnd Bergmann,
Marc Zyngier, open list:USER-MODE LINUX UML,
open list:M68K ARCHITECTURE, open list:OPENRISC ARCHITECTURE,
moderated list:ARM PORT, open list:PARISC ARCHITECTURE,
Greg Kroah-Hartman, open list:ALPHA PORT, Olof Johansson,
moderated list:NIOS2 ARCHITECTURE,
open list:LINUX FOR POWERPC 32-BIT AND 64-BIT
In-Reply-To: <20181024193256.23734-1-f.fainelli@gmail.com>
In preparation for separating the definition of
__early_init_dt_declare_initrd() on ARM64 in order to cut the amount of
files that require a rebuild when CONFIG_BLK_DEV_INITRD value is
changed, introduce an empty asm-generic initrd.h file and update all
architectures but arm64 to make use of it.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
arch/alpha/include/asm/Kbuild | 1 +
arch/arc/include/asm/Kbuild | 1 +
arch/arm/include/asm/Kbuild | 1 +
arch/c6x/include/asm/Kbuild | 1 +
arch/h8300/include/asm/Kbuild | 1 +
arch/hexagon/include/asm/Kbuild | 1 +
arch/ia64/include/asm/Kbuild | 1 +
arch/m68k/include/asm/Kbuild | 1 +
arch/microblaze/include/asm/Kbuild | 1 +
arch/mips/include/asm/Kbuild | 1 +
arch/nds32/include/asm/Kbuild | 1 +
arch/nios2/include/asm/Kbuild | 1 +
arch/openrisc/include/asm/Kbuild | 1 +
arch/parisc/include/asm/Kbuild | 1 +
arch/powerpc/include/asm/Kbuild | 1 +
arch/riscv/include/asm/Kbuild | 1 +
arch/s390/include/asm/Kbuild | 1 +
arch/sh/include/asm/Kbuild | 1 +
arch/sparc/include/asm/Kbuild | 1 +
arch/um/include/asm/Kbuild | 1 +
arch/unicore32/include/asm/Kbuild | 1 +
arch/x86/include/asm/Kbuild | 1 +
arch/xtensa/include/asm/Kbuild | 1 +
include/asm-generic/initrd.h | 1 +
24 files changed, 24 insertions(+)
create mode 100644 include/asm-generic/initrd.h
diff --git a/arch/alpha/include/asm/Kbuild b/arch/alpha/include/asm/Kbuild
index 0580cb8c84b2..cd6f723aed1b 100644
--- a/arch/alpha/include/asm/Kbuild
+++ b/arch/alpha/include/asm/Kbuild
@@ -5,6 +5,7 @@ generic-y += compat.h
generic-y += exec.h
generic-y += export.h
generic-y += fb.h
+generic-y += initrd.h
generic-y += irq_work.h
generic-y += mcs_spinlock.h
generic-y += mm-arch-hooks.h
diff --git a/arch/arc/include/asm/Kbuild b/arch/arc/include/asm/Kbuild
index feed50ce89fa..ba18632aa493 100644
--- a/arch/arc/include/asm/Kbuild
+++ b/arch/arc/include/asm/Kbuild
@@ -10,6 +10,7 @@ generic-y += fb.h
generic-y += ftrace.h
generic-y += hardirq.h
generic-y += hw_irq.h
+generic-y += initrd.h
generic-y += irq_regs.h
generic-y += irq_work.h
generic-y += kmap_types.h
diff --git a/arch/arm/include/asm/Kbuild b/arch/arm/include/asm/Kbuild
index 1d66db9c9db5..b91d5b32e64f 100644
--- a/arch/arm/include/asm/Kbuild
+++ b/arch/arm/include/asm/Kbuild
@@ -4,6 +4,7 @@ generic-y += early_ioremap.h
generic-y += emergency-restart.h
generic-y += exec.h
generic-y += extable.h
+generic-y += initrd.h
generic-y += irq_regs.h
generic-y += kdebug.h
generic-y += local.h
diff --git a/arch/c6x/include/asm/Kbuild b/arch/c6x/include/asm/Kbuild
index 33a2c94fed0d..9e14cf6e89b4 100644
--- a/arch/c6x/include/asm/Kbuild
+++ b/arch/c6x/include/asm/Kbuild
@@ -13,6 +13,7 @@ generic-y += extable.h
generic-y += fb.h
generic-y += futex.h
generic-y += hw_irq.h
+generic-y += initrd.h
generic-y += io.h
generic-y += irq_regs.h
generic-y += irq_work.h
diff --git a/arch/h8300/include/asm/Kbuild b/arch/h8300/include/asm/Kbuild
index a5d0b2991f47..7d4e06a757c8 100644
--- a/arch/h8300/include/asm/Kbuild
+++ b/arch/h8300/include/asm/Kbuild
@@ -19,6 +19,7 @@ generic-y += futex.h
generic-y += hardirq.h
generic-y += hash.h
generic-y += hw_irq.h
+generic-y += initrd.h
generic-y += irq_regs.h
generic-y += irq_work.h
generic-y += kdebug.h
diff --git a/arch/hexagon/include/asm/Kbuild b/arch/hexagon/include/asm/Kbuild
index 47c4da3d64a4..0be62abf2123 100644
--- a/arch/hexagon/include/asm/Kbuild
+++ b/arch/hexagon/include/asm/Kbuild
@@ -13,6 +13,7 @@ generic-y += fb.h
generic-y += ftrace.h
generic-y += hardirq.h
generic-y += hw_irq.h
+generic-y += initrd.h
generic-y += iomap.h
generic-y += irq_regs.h
generic-y += irq_work.h
diff --git a/arch/ia64/include/asm/Kbuild b/arch/ia64/include/asm/Kbuild
index 557bbc8ba9f5..1a1f1e4ba0d5 100644
--- a/arch/ia64/include/asm/Kbuild
+++ b/arch/ia64/include/asm/Kbuild
@@ -1,5 +1,6 @@
generic-y += compat.h
generic-y += exec.h
+generic-y += initrd.h
generic-y += irq_work.h
generic-y += mcs_spinlock.h
generic-y += mm-arch-hooks.h
diff --git a/arch/m68k/include/asm/Kbuild b/arch/m68k/include/asm/Kbuild
index a4b8d3331a9e..9903551e0c9c 100644
--- a/arch/m68k/include/asm/Kbuild
+++ b/arch/m68k/include/asm/Kbuild
@@ -7,6 +7,7 @@ generic-y += exec.h
generic-y += extable.h
generic-y += futex.h
generic-y += hw_irq.h
+generic-y += initrd.h
generic-y += irq_regs.h
generic-y += irq_work.h
generic-y += kdebug.h
diff --git a/arch/microblaze/include/asm/Kbuild b/arch/microblaze/include/asm/Kbuild
index 569ba9e670c1..ec37e6304be5 100644
--- a/arch/microblaze/include/asm/Kbuild
+++ b/arch/microblaze/include/asm/Kbuild
@@ -11,6 +11,7 @@ generic-y += exec.h
generic-y += extable.h
generic-y += fb.h
generic-y += hardirq.h
+generic-y += initrd.h
generic-y += irq_regs.h
generic-y += irq_work.h
generic-y += kdebug.h
diff --git a/arch/mips/include/asm/Kbuild b/arch/mips/include/asm/Kbuild
index 9a81e72119da..005ef04a4c73 100644
--- a/arch/mips/include/asm/Kbuild
+++ b/arch/mips/include/asm/Kbuild
@@ -5,6 +5,7 @@ generic-y += device.h
generic-y += dma-contiguous.h
generic-y += emergency-restart.h
generic-y += export.h
+generic-y += initrd.h
generic-y += irq_work.h
generic-y += local64.h
generic-y += mcs_spinlock.h
diff --git a/arch/nds32/include/asm/Kbuild b/arch/nds32/include/asm/Kbuild
index dbc4e5422550..1400aaf0c840 100644
--- a/arch/nds32/include/asm/Kbuild
+++ b/arch/nds32/include/asm/Kbuild
@@ -25,6 +25,7 @@ generic-y += ftrace.h
generic-y += gpio.h
generic-y += hardirq.h
generic-y += hw_irq.h
+generic-y += initrd.h
generic-y += ioctl.h
generic-y += ioctls.h
generic-y += irq.h
diff --git a/arch/nios2/include/asm/Kbuild b/arch/nios2/include/asm/Kbuild
index 8fde4fa2c34f..d89de02549ee 100644
--- a/arch/nios2/include/asm/Kbuild
+++ b/arch/nios2/include/asm/Kbuild
@@ -18,6 +18,7 @@ generic-y += ftrace.h
generic-y += futex.h
generic-y += hardirq.h
generic-y += hw_irq.h
+generic-y += initrd.h
generic-y += irq_regs.h
generic-y += irq_work.h
generic-y += kdebug.h
diff --git a/arch/openrisc/include/asm/Kbuild b/arch/openrisc/include/asm/Kbuild
index eb87cd8327c8..296fd55e8473 100644
--- a/arch/openrisc/include/asm/Kbuild
+++ b/arch/openrisc/include/asm/Kbuild
@@ -15,6 +15,7 @@ generic-y += fb.h
generic-y += ftrace.h
generic-y += hardirq.h
generic-y += hw_irq.h
+generic-y += initrd.h
generic-y += irq.h
generic-y += irq_regs.h
generic-y += irq_work.h
diff --git a/arch/parisc/include/asm/Kbuild b/arch/parisc/include/asm/Kbuild
index 2013d639e735..1382d78a2477 100644
--- a/arch/parisc/include/asm/Kbuild
+++ b/arch/parisc/include/asm/Kbuild
@@ -5,6 +5,7 @@ generic-y += div64.h
generic-y += emergency-restart.h
generic-y += exec.h
generic-y += hw_irq.h
+generic-y += initrd.h
generic-y += irq_regs.h
generic-y += irq_work.h
generic-y += kdebug.h
diff --git a/arch/powerpc/include/asm/Kbuild b/arch/powerpc/include/asm/Kbuild
index 3196d227e351..e3ea67c30605 100644
--- a/arch/powerpc/include/asm/Kbuild
+++ b/arch/powerpc/include/asm/Kbuild
@@ -1,5 +1,6 @@
generic-y += div64.h
generic-y += export.h
+generic-y += initrd.h
generic-y += irq_regs.h
generic-y += irq_work.h
generic-y += local64.h
diff --git a/arch/riscv/include/asm/Kbuild b/arch/riscv/include/asm/Kbuild
index efdbe311e936..0e67ed69c423 100644
--- a/arch/riscv/include/asm/Kbuild
+++ b/arch/riscv/include/asm/Kbuild
@@ -17,6 +17,7 @@ generic-y += futex.h
generic-y += hardirq.h
generic-y += hash.h
generic-y += hw_irq.h
+generic-y += initrd.h
generic-y += ioctl.h
generic-y += ioctls.h
generic-y += ipcbuf.h
diff --git a/arch/s390/include/asm/Kbuild b/arch/s390/include/asm/Kbuild
index e3239772887a..dc618745d427 100644
--- a/arch/s390/include/asm/Kbuild
+++ b/arch/s390/include/asm/Kbuild
@@ -13,6 +13,7 @@ generic-y += div64.h
generic-y += emergency-restart.h
generic-y += export.h
generic-y += fb.h
+generic-y += initrd.h
generic-y += irq_regs.h
generic-y += irq_work.h
generic-y += kmap_types.h
diff --git a/arch/sh/include/asm/Kbuild b/arch/sh/include/asm/Kbuild
index 6a5609a55965..c006a7cf3a43 100644
--- a/arch/sh/include/asm/Kbuild
+++ b/arch/sh/include/asm/Kbuild
@@ -5,6 +5,7 @@ generic-y += div64.h
generic-y += dma-mapping.h
generic-y += emergency-restart.h
generic-y += exec.h
+generic-y += initrd.h
generic-y += irq_regs.h
generic-y += irq_work.h
generic-y += local.h
diff --git a/arch/sparc/include/asm/Kbuild b/arch/sparc/include/asm/Kbuild
index 410b263ef5c8..a5772c2a96c8 100644
--- a/arch/sparc/include/asm/Kbuild
+++ b/arch/sparc/include/asm/Kbuild
@@ -5,6 +5,7 @@ generic-y += div64.h
generic-y += emergency-restart.h
generic-y += exec.h
generic-y += export.h
+generic-y += initrd.h
generic-y += irq_regs.h
generic-y += irq_work.h
generic-y += linkage.h
diff --git a/arch/um/include/asm/Kbuild b/arch/um/include/asm/Kbuild
index b10dde6cb793..032cfe1b530b 100644
--- a/arch/um/include/asm/Kbuild
+++ b/arch/um/include/asm/Kbuild
@@ -12,6 +12,7 @@ generic-y += ftrace.h
generic-y += futex.h
generic-y += hardirq.h
generic-y += hw_irq.h
+generic-y += initrd.h
generic-y += io.h
generic-y += irq_regs.h
generic-y += irq_work.h
diff --git a/arch/unicore32/include/asm/Kbuild b/arch/unicore32/include/asm/Kbuild
index 1372553dc0a9..32e7dea45fcd 100644
--- a/arch/unicore32/include/asm/Kbuild
+++ b/arch/unicore32/include/asm/Kbuild
@@ -13,6 +13,7 @@ generic-y += ftrace.h
generic-y += futex.h
generic-y += hardirq.h
generic-y += hw_irq.h
+generic-y += initrd.h
generic-y += irq_regs.h
generic-y += irq_work.h
generic-y += kdebug.h
diff --git a/arch/x86/include/asm/Kbuild b/arch/x86/include/asm/Kbuild
index a0ab9ab61c75..290bd1c3ee2d 100644
--- a/arch/x86/include/asm/Kbuild
+++ b/arch/x86/include/asm/Kbuild
@@ -9,5 +9,6 @@ generated-y += xen-hypercalls.h
generic-y += dma-contiguous.h
generic-y += early_ioremap.h
generic-y += export.h
+generic-y += initrd.h
generic-y += mcs_spinlock.h
generic-y += mm-arch-hooks.h
diff --git a/arch/xtensa/include/asm/Kbuild b/arch/xtensa/include/asm/Kbuild
index 82c756431b49..f2c363f2d22a 100644
--- a/arch/xtensa/include/asm/Kbuild
+++ b/arch/xtensa/include/asm/Kbuild
@@ -9,6 +9,7 @@ generic-y += exec.h
generic-y += extable.h
generic-y += fb.h
generic-y += hardirq.h
+generic-y += initrd.h
generic-y += irq_regs.h
generic-y += irq_work.h
generic-y += kdebug.h
diff --git a/include/asm-generic/initrd.h b/include/asm-generic/initrd.h
new file mode 100644
index 000000000000..40a8c178f10d
--- /dev/null
+++ b/include/asm-generic/initrd.h
@@ -0,0 +1 @@
+/* empty */
--
2.17.1
^ permalink raw reply related
* [PATCH v2 2/2] arm64: Create asm/initrd.h
From: Florian Fainelli @ 2018-10-24 19:32 UTC (permalink / raw)
To: linux-kernel
Cc: open list:MIPS, open list:IA64 Itanium PLATFORM, open list:SUPERH,
Catalin Marinas, Will Deacon,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE,
open list:SPARC + UltraSPARC sparc/sparc64,
open list:RISC-V ARCHITECTURE,
open list:GENERIC INCLUDE/ASM HEADER FILES, open list:S390,
Florian Fainelli, open list:C6X ARCHITECTURE,
open list:QUALCOMM HEXAGON ARCHITECTURE,
open list:SYNOPSYS ARC ARCHITECTURE,
moderated list:H8/300 ARCHITECTURE,
open list:TENSILICA XTENSA PORT xtensa, Arnd Bergmann,
Marc Zyngier, open list:USER-MODE LINUX UML,
open list:M68K ARCHITECTURE, open list:OPENRISC ARCHITECTURE,
moderated list:ARM PORT, open list:PARISC ARCHITECTURE,
Greg Kroah-Hartman, open list:ALPHA PORT, Olof Johansson,
moderated list:NIOS2 ARCHITECTURE,
open list:LINUX FOR POWERPC 32-BIT AND 64-BIT
In-Reply-To: <20181024193256.23734-1-f.fainelli@gmail.com>
ARM64 is the only architecture that requires a re-definition of
__early_init_dt_declare_initrd(). Now that we added the infrastructure
in asm-generic to provide an asm/initrd.h file, properly break up that
definition from asm/memory.h and make use of that header in
drivers/of/fdt.c where this is used.
This significantly cuts the number of objects that need to be rebuilt on
ARM64 due to the repercusions of including asm/memory.h in several
places.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
arch/arm64/include/asm/initrd.h | 13 +++++++++++++
arch/arm64/include/asm/memory.h | 8 --------
drivers/of/fdt.c | 1 +
3 files changed, 14 insertions(+), 8 deletions(-)
create mode 100644 arch/arm64/include/asm/initrd.h
diff --git a/arch/arm64/include/asm/initrd.h b/arch/arm64/include/asm/initrd.h
new file mode 100644
index 000000000000..0c9572485810
--- /dev/null
+++ b/arch/arm64/include/asm/initrd.h
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __ASM_INITRD_H
+#define __ASM_INITRD_H
+
+#ifdef CONFIG_BLK_DEV_INITRD
+#define __early_init_dt_declare_initrd(__start, __end) \
+ do { \
+ initrd_start = (__start); \
+ initrd_end = (__end); \
+ } while (0)
+#endif
+
+#endif /* __ASM_INITRD_H */
diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h
index b96442960aea..dc3ca21ba240 100644
--- a/arch/arm64/include/asm/memory.h
+++ b/arch/arm64/include/asm/memory.h
@@ -168,14 +168,6 @@
#define IOREMAP_MAX_ORDER (PMD_SHIFT)
#endif
-#ifdef CONFIG_BLK_DEV_INITRD
-#define __early_init_dt_declare_initrd(__start, __end) \
- do { \
- initrd_start = (__start); \
- initrd_end = (__end); \
- } while (0)
-#endif
-
#ifndef __ASSEMBLY__
#include <linux/bitops.h>
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 800ad252cf9c..4e4711af907b 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -28,6 +28,7 @@
#include <asm/setup.h> /* for COMMAND_LINE_SIZE */
#include <asm/page.h>
+#include <asm/initrd.h>
#include "of_private.h"
--
2.17.1
^ permalink raw reply related
* Re: [PATCH v2 0/2] arm64: Cut rebuild time when changing CONFIG_BLK_DEV_INITRD
From: Rob Herring @ 2018-10-24 19:55 UTC (permalink / raw)
To: Florian Fainelli
Cc: Linux-MIPS, linux-ia64, SH-Linux, Catalin Marinas, Will Deacon,
devicetree, sparclinux, linux-riscv,
open list:GENERIC INCLUDE/ASM HEADER FILES, linux-s390,
linux-c6x-dev, linux-hexagon, arcml,
moderated list:H8/300 ARCHITECTURE, linux-xtensa, Arnd Bergmann,
Marc Zyngier, linux-um, linux-m68k, Openrisc,
moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
linux-parisc, Greg Kroah-Hartman, linux-kernel@vger.kernel.org,
linux-alpha, Olof Johansson, nios2-dev, linuxppc-dev
In-Reply-To: <20181024193256.23734-1-f.fainelli@gmail.com>
On Wed, Oct 24, 2018 at 2:33 PM Florian Fainelli <f.fainelli@gmail.com> wrote:
>
> Hi all,
>
> While investigating why ARM64 required a ton of objects to be rebuilt
> when toggling CONFIG_DEV_BLK_INITRD, it became clear that this was
> because we define __early_init_dt_declare_initrd() differently and we do
> that in arch/arm64/include/asm/memory.h which gets included by a fair
> amount of other header files, and translation units as well.
I scratch my head sometimes as to why some config options rebuild so
much stuff. One down, ? to go. :)
> Changing the value of CONFIG_DEV_BLK_INITRD is a common thing with build
> systems that generate two kernels: one with the initramfs and one
> without. buildroot is one of these build systems, OpenWrt is also
> another one that does this.
>
> This patch series proposes adding an empty initrd.h to satisfy the need
> for drivers/of/fdt.c to unconditionally include that file, and moves the
> custom __early_init_dt_declare_initrd() definition away from
> asm/memory.h
>
> This cuts the number of objects rebuilds from 1920 down to 26, so a
> factor 73 approximately.
>
> Apologies for the long CC list, please let me know how you would go
> about merging that and if another approach would be preferable, e.g:
> introducing a CONFIG_ARCH_INITRD_BELOW_START_OK Kconfig option or
> something like that.
There may be a better way as of 4.20 because bootmem is now gone and
only memblock is used. This should unify what each arch needs to do
with initrd early. We need the physical address early for memblock
reserving. Then later on we need the virtual address to access the
initrd. Perhaps we should just change initrd_start and initrd_end to
physical addresses (or add 2 new variables would be less invasive and
allow for different translation than __va()). The sanity checks and
memblock reserve could also perhaps be moved to a common location.
Alternatively, given arm64 is the only oddball, I'd be fine with an
"if (IS_ENABLED(CONFIG_ARM64))" condition in the default
__early_init_dt_declare_initrd as long as we have a path to removing
it like the above option.
Rob
^ permalink raw reply
* Re: [PATCH v5 00/18] of: overlay: validation checks, subsequent fixes
From: Rob Herring @ 2018-10-24 19:57 UTC (permalink / raw)
To: Alan Tull
Cc: devicetree, linux-fpga, linuxppc-dev, Pantelis Antoniou,
linux-kernel@vger.kernel.org, Moritz Fischer, Paul Mackerras,
Frank Rowand
In-Reply-To: <CANk1AXSLZLn6XjC=nv3+pK_NQc_VL5MxWfOW9mLCgv_eFYvPPw@mail.gmail.com>
On Mon, Oct 22, 2018 at 4:25 PM Alan Tull <atull@kernel.org> wrote:
>
> On Thu, Oct 18, 2018 at 5:48 PM <frowand.list@gmail.com> wrote:
> >
> > From: Frank Rowand <frank.rowand@sony.com>
> >
> > Add checks to (1) overlay apply process and (2) memory freeing
> > triggered by overlay release. The checks are intended to detect
> > possible memory leaks and invalid overlays.
>
> I've tested v5, nothing new to report.
Does that mean everything broken or everything works great? In the
latter case, care to give a Tested-by.
Rob
^ permalink raw reply
* Re: [PATCH v2 0/2] arm64: Cut rebuild time when changing CONFIG_BLK_DEV_INITRD
From: Florian Fainelli @ 2018-10-24 20:01 UTC (permalink / raw)
To: Rob Herring
Cc: Linux-MIPS, linux-ia64, SH-Linux, Catalin Marinas, Will Deacon,
devicetree, sparclinux, linux-riscv,
open list:GENERIC INCLUDE/ASM HEADER FILES, linux-s390,
linux-c6x-dev, linux-hexagon, arcml,
moderated list:H8/300 ARCHITECTURE, linux-xtensa, Arnd Bergmann,
Marc Zyngier, linux-um, linux-m68k, Openrisc,
moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
linux-parisc, Greg Kroah-Hartman, linux-kernel@vger.kernel.org,
linux-alpha, Olof Johansson, nios2-dev, linuxppc-dev
In-Reply-To: <CAL_Jsq+KCOv6pXXHhHDZ+7-QUrmtMDvSjEVhK15yZ3qbnn61Ag@mail.gmail.com>
On 10/24/18 12:55 PM, Rob Herring wrote:
> On Wed, Oct 24, 2018 at 2:33 PM Florian Fainelli <f.fainelli@gmail.com> wrote:
>>
>> Hi all,
>>
>> While investigating why ARM64 required a ton of objects to be rebuilt
>> when toggling CONFIG_DEV_BLK_INITRD, it became clear that this was
>> because we define __early_init_dt_declare_initrd() differently and we do
>> that in arch/arm64/include/asm/memory.h which gets included by a fair
>> amount of other header files, and translation units as well.
>
> I scratch my head sometimes as to why some config options rebuild so
> much stuff. One down, ? to go. :)
>
This one was by far the most invasive one due to its include chain, but
yes, there would be many more that could be optimized.
>> Changing the value of CONFIG_DEV_BLK_INITRD is a common thing with build
>> systems that generate two kernels: one with the initramfs and one
>> without. buildroot is one of these build systems, OpenWrt is also
>> another one that does this.
>>
>> This patch series proposes adding an empty initrd.h to satisfy the need
>> for drivers/of/fdt.c to unconditionally include that file, and moves the
>> custom __early_init_dt_declare_initrd() definition away from
>> asm/memory.h
>>
>> This cuts the number of objects rebuilds from 1920 down to 26, so a
>> factor 73 approximately.
>>
>> Apologies for the long CC list, please let me know how you would go
>> about merging that and if another approach would be preferable, e.g:
>> introducing a CONFIG_ARCH_INITRD_BELOW_START_OK Kconfig option or
>> something like that.
>
> There may be a better way as of 4.20 because bootmem is now gone and
> only memblock is used. This should unify what each arch needs to do
> with initrd early. We need the physical address early for memblock
> reserving. Then later on we need the virtual address to access the
> initrd. Perhaps we should just change initrd_start and initrd_end to
> physical addresses (or add 2 new variables would be less invasive and
> allow for different translation than __va()). The sanity checks and
> memblock reserve could also perhaps be moved to a common location.
>
> Alternatively, given arm64 is the only oddball, I'd be fine with an
> "if (IS_ENABLED(CONFIG_ARM64))" condition in the default
> __early_init_dt_declare_initrd as long as we have a path to removing
> it like the above option.
OK, let me cook a patch doing that and meanwhile I will look at how much
work is involved to implement the above option you outlined, which also
sounds entirely reasonable.
Thanks!
--
Florian
^ permalink raw reply
* Re: [PATCH v2 0/2] arm64: Cut rebuild time when changing CONFIG_BLK_DEV_INITRD
From: Rob Herring @ 2018-10-24 21:25 UTC (permalink / raw)
To: Florian Fainelli
Cc: Linux-MIPS, linux-ia64, SH-Linux, Catalin Marinas, Will Deacon,
devicetree, sparclinux, linux-riscv,
open list:GENERIC INCLUDE/ASM HEADER FILES, linux-s390,
linux-c6x-dev, linux-hexagon, arcml,
moderated list:H8/300 ARCHITECTURE, linux-xtensa, Arnd Bergmann,
Marc Zyngier, linux-um, linux-m68k, Openrisc,
moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
linux-parisc, Greg Kroah-Hartman, linux-kernel@vger.kernel.org,
linux-alpha, Olof Johansson, nios2-dev, linuxppc-dev
In-Reply-To: <6e647f76-8523-09d3-9b72-d8d8abd213a4@gmail.com>
On Wed, Oct 24, 2018 at 3:01 PM Florian Fainelli <f.fainelli@gmail.com> wrote:
>
> On 10/24/18 12:55 PM, Rob Herring wrote:
> > On Wed, Oct 24, 2018 at 2:33 PM Florian Fainelli <f.fainelli@gmail.com> wrote:
> >>
> >> Hi all,
> >>
> >> While investigating why ARM64 required a ton of objects to be rebuilt
> >> when toggling CONFIG_DEV_BLK_INITRD, it became clear that this was
> >> because we define __early_init_dt_declare_initrd() differently and we do
> >> that in arch/arm64/include/asm/memory.h which gets included by a fair
> >> amount of other header files, and translation units as well.
> >
> > I scratch my head sometimes as to why some config options rebuild so
> > much stuff. One down, ? to go. :)
> >
>
> This one was by far the most invasive one due to its include chain, but
> yes, there would be many more that could be optimized.
>
> >> Changing the value of CONFIG_DEV_BLK_INITRD is a common thing with build
> >> systems that generate two kernels: one with the initramfs and one
> >> without. buildroot is one of these build systems, OpenWrt is also
> >> another one that does this.
> >>
> >> This patch series proposes adding an empty initrd.h to satisfy the need
> >> for drivers/of/fdt.c to unconditionally include that file, and moves the
> >> custom __early_init_dt_declare_initrd() definition away from
> >> asm/memory.h
> >>
> >> This cuts the number of objects rebuilds from 1920 down to 26, so a
> >> factor 73 approximately.
> >>
> >> Apologies for the long CC list, please let me know how you would go
> >> about merging that and if another approach would be preferable, e.g:
> >> introducing a CONFIG_ARCH_INITRD_BELOW_START_OK Kconfig option or
> >> something like that.
> >
> > There may be a better way as of 4.20 because bootmem is now gone and
> > only memblock is used. This should unify what each arch needs to do
> > with initrd early. We need the physical address early for memblock
> > reserving. Then later on we need the virtual address to access the
> > initrd. Perhaps we should just change initrd_start and initrd_end to
> > physical addresses (or add 2 new variables would be less invasive and
> > allow for different translation than __va()). The sanity checks and
> > memblock reserve could also perhaps be moved to a common location.
> >
> > Alternatively, given arm64 is the only oddball, I'd be fine with an
> > "if (IS_ENABLED(CONFIG_ARM64))" condition in the default
> > __early_init_dt_declare_initrd as long as we have a path to removing
> > it like the above option.
>
> OK, let me cook a patch doing that and meanwhile I will look at how much
> work is involved to implement the above option you outlined, which also
> sounds entirely reasonable.
BTW, I would suspect that initrd_below_start_ok being 1 is not okay
for most arches. I'm not sure how that would work. min_low_pfn is
typically based on the start of memory. arm64 is not even setting it.
Rob
> --
> Florian
^ permalink raw reply
* Re: [PATCH v5 2/6] soc/fsl/guts: Add definition for LX2160A
From: Li Yang @ 2018-10-24 21:39 UTC (permalink / raw)
To: Vabhav Sharma
Cc: Mark Rutland, Kate Stewart, Ulf Hansson, linux-kernel-owner,
Catalin Marinas, Michael Turquette, Will Deacon, Adrian Hunter,
yamada.masahiro, linux-clk, pankaj.bansal, udit.kumar,
Russell King, Viresh Kumar, Yinbo Zhu,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
Arnd Bergmann, linux-pm, linuxppc-dev, Scott Wood, Rob Herring,
V.Sethi, moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
sboyd, Greg Kroah-Hartman, Rafael J. Wysocki, lkml, Sudeep Holla,
Shawn Guo
In-Reply-To: <1539536883-1928-3-git-send-email-vabhav.sharma@nxp.com>
On Mon, Oct 15, 2018 at 12:14 AM Vabhav Sharma <vabhav.sharma@nxp.com> wrote:
>
> Adding compatible string "lx2160a-dcfg" to
> initialize guts driver for lx2160 and SoC die
> attribute definition for LX2160A
>
> Signed-off-by: Vabhav Sharma <vabhav.sharma@nxp.com>
> Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
Acked-by: Li Yang <leoyang.li@nxp.com>
> ---
> drivers/soc/fsl/guts.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/soc/fsl/guts.c b/drivers/soc/fsl/guts.c
> index 302e0c8..bcab1ee 100644
> --- a/drivers/soc/fsl/guts.c
> +++ b/drivers/soc/fsl/guts.c
> @@ -100,6 +100,11 @@ static const struct fsl_soc_die_attr fsl_soc_die[] = {
> .svr = 0x87000000,
> .mask = 0xfff70000,
> },
> + /* Die: LX2160A, SoC: LX2160A/LX2120A/LX2080A */
> + { .die = "LX2160A",
> + .svr = 0x87360000,
> + .mask = 0xff3f0000,
> + },
> { },
> };
>
> @@ -222,6 +227,7 @@ static const struct of_device_id fsl_guts_of_match[] = {
> { .compatible = "fsl,ls1088a-dcfg", },
> { .compatible = "fsl,ls1012a-dcfg", },
> { .compatible = "fsl,ls1046a-dcfg", },
> + { .compatible = "fsl,lx2160a-dcfg", },
> {}
> };
> MODULE_DEVICE_TABLE(of, fsl_guts_of_match);
> --
> 2.7.4
>
^ permalink raw reply
* Re: [PATCH v5 6/6] arm64: dts: add LX2160ARDB board support
From: Li Yang @ 2018-10-24 21:41 UTC (permalink / raw)
To: Vabhav Sharma
Cc: Mark Rutland, Kate Stewart, Ulf Hansson, linux-kernel-owner,
Catalin Marinas, Michael Turquette, Will Deacon, Adrian Hunter,
yamada.masahiro, Sriram Dash, linux-clk, Horia Geanta,
pankaj.bansal, udit.kumar, Russell King, Priyanka Jain,
Viresh Kumar, Yinbo Zhu,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
Arnd Bergmann, linux-pm, linuxppc-dev, Scott Wood, Rob Herring,
V.Sethi, moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
sboyd, Greg Kroah-Hartman, Ying Zhang, Rafael J. Wysocki, lkml,
Sudeep Holla, Ran Wang, Shawn Guo
In-Reply-To: <1539536883-1928-7-git-send-email-vabhav.sharma@nxp.com>
On Mon, Oct 15, 2018 at 12:14 AM Vabhav Sharma <vabhav.sharma@nxp.com> wrote:
>
> LX2160A reference design board (RDB) is a high-performance
> computing, evaluation, and development platform with LX2160A
> SoC.
>
> Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
> Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
> Signed-off-by: Vabhav Sharma <vabhav.sharma@nxp.com>
> Signed-off-by: Horia Geanta <horia.geanta@nxp.com>
> Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
> Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com>
> Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
Acked-by: Li Yang <leoyang.li@nxp.com>
> ---
> arch/arm64/boot/dts/freescale/Makefile | 1 +
> arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts | 119 ++++++++++++++++++++++
> 2 files changed, 120 insertions(+)
> create mode 100644 arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts
>
> diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile
> index 86e18ad..445b72b 100644
> --- a/arch/arm64/boot/dts/freescale/Makefile
> +++ b/arch/arm64/boot/dts/freescale/Makefile
> @@ -13,3 +13,4 @@ dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls2080a-rdb.dtb
> dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls2080a-simu.dtb
> dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls2088a-qds.dtb
> dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls2088a-rdb.dtb
> +dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-lx2160a-rdb.dtb
> diff --git a/arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts
> new file mode 100644
> index 0000000..6481e5f
> --- /dev/null
> +++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts
> @@ -0,0 +1,119 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +//
> +// Device Tree file for LX2160ARDB
> +//
> +// Copyright 2018 NXP
> +
> +/dts-v1/;
> +
> +#include "fsl-lx2160a.dtsi"
> +
> +/ {
> + model = "NXP Layerscape LX2160ARDB";
> + compatible = "fsl,lx2160a-rdb", "fsl,lx2160a";
> +
> + aliases {
> + crypto = &crypto;
> + serial0 = &uart0;
> + };
> +
> + chosen {
> + stdout-path = "serial0:115200n8";
> + };
> +
> + sb_3v3: regulator-sb3v3 {
> + compatible = "regulator-fixed";
> + regulator-name = "MC34717-3.3VSB";
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +};
> +
> +&crypto {
> + status = "okay";
> +};
> +
> +&esdhc0 {
> + sd-uhs-sdr104;
> + sd-uhs-sdr50;
> + sd-uhs-sdr25;
> + sd-uhs-sdr12;
> + status = "okay";
> +};
> +
> +&esdhc1 {
> + mmc-hs200-1_8v;
> + mmc-hs400-1_8v;
> + bus-width = <8>;
> + status = "okay";
> +};
> +
> +&i2c0 {
> + status = "okay";
> +
> + i2c-mux@77 {
> + compatible = "nxp,pca9547";
> + reg = <0x77>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + i2c@2 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + reg = <0x2>;
> +
> + power-monitor@40 {
> + compatible = "ti,ina220";
> + reg = <0x40>;
> + shunt-resistor = <1000>;
> + };
> + };
> +
> + i2c@3 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + reg = <0x3>;
> +
> + temperature-sensor@4c {
> + compatible = "nxp,sa56004";
> + reg = <0x4c>;
> + vcc-supply = <&sb_3v3>;
> + };
> +
> + temperature-sensor@4d {
> + compatible = "nxp,sa56004";
> + reg = <0x4d>;
> + vcc-supply = <&sb_3v3>;
> + };
> + };
> + };
> +};
> +
> +&i2c4 {
> + status = "okay";
> +
> + rtc@51 {
> + compatible = "nxp,pcf2129";
> + reg = <0x51>;
> + // IRQ10_B
> + interrupts = <0 150 0x4>;
> + };
> +};
> +
> +&uart0 {
> + status = "okay";
> +};
> +
> +&uart1 {
> + status = "okay";
> +};
> +
> +&usb0 {
> + status = "okay";
> +};
> +
> +&usb1 {
> + status = "okay";
> +};
> --
> 2.7.4
>
^ permalink raw reply
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