* [PATCH v2 02/13] powerpc: Rename 'funcaddr' to 'addr' in 'struct ppc64_opd_entry'
From: Christophe Leroy @ 2021-10-14 5:49 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Andrew Morton, James E.J. Bottomley, Helge Deller, Arnd Bergmann,
Kees Cook, Greg Kroah-Hartman
Cc: linux-arch, linux-ia64, linux-parisc, linux-kernel, linux-mm,
linuxppc-dev
In-Reply-To: <cover.1634190022.git.christophe.leroy@csgroup.eu>
There are three architectures with function descriptors, try to
have common names for the address they contain in order to
refactor some functions into generic functions later.
powerpc has 'funcaddr'
ia64 has 'ip'
parisc has 'addr'
Vote for 'addr' and update 'struct ppc64_opd_entry' accordingly.
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
arch/powerpc/include/asm/elf.h | 2 +-
arch/powerpc/include/asm/sections.h | 2 +-
arch/powerpc/kernel/module_64.c | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h
index a4406714c060..bb0f278f9ed4 100644
--- a/arch/powerpc/include/asm/elf.h
+++ b/arch/powerpc/include/asm/elf.h
@@ -178,7 +178,7 @@ void relocate(unsigned long final_address);
/* There's actually a third entry here, but it's unused */
struct ppc64_opd_entry {
- unsigned long funcaddr;
+ unsigned long addr;
unsigned long r2;
};
diff --git a/arch/powerpc/include/asm/sections.h b/arch/powerpc/include/asm/sections.h
index 6e4af4492a14..32e7035863ac 100644
--- a/arch/powerpc/include/asm/sections.h
+++ b/arch/powerpc/include/asm/sections.h
@@ -77,7 +77,7 @@ static inline void *dereference_function_descriptor(void *ptr)
struct ppc64_opd_entry *desc = ptr;
void *p;
- if (!get_kernel_nofault(p, (void *)&desc->funcaddr))
+ if (!get_kernel_nofault(p, (void *)&desc->addr))
ptr = p;
return ptr;
}
diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/module_64.c
index 6baa676e7cb6..82908c9be627 100644
--- a/arch/powerpc/kernel/module_64.c
+++ b/arch/powerpc/kernel/module_64.c
@@ -72,11 +72,11 @@ static func_desc_t func_desc(unsigned long addr)
}
static unsigned long func_addr(unsigned long addr)
{
- return func_desc(addr).funcaddr;
+ return func_desc(addr).addr;
}
static unsigned long stub_func_addr(func_desc_t func)
{
- return func.funcaddr;
+ return func.addr;
}
static unsigned int local_entry_offset(const Elf64_Sym *sym)
{
@@ -187,7 +187,7 @@ static int relacmp(const void *_x, const void *_y)
static unsigned long get_stubs_size(const Elf64_Ehdr *hdr,
const Elf64_Shdr *sechdrs)
{
- /* One extra reloc so it's always 0-funcaddr terminated */
+ /* One extra reloc so it's always 0-addr terminated */
unsigned long relocs = 1;
unsigned i;
--
2.31.1
^ permalink raw reply related
* [PATCH v2 00/13] Fix LKDTM for PPC64/IA64/PARISC
From: Christophe Leroy @ 2021-10-14 5:49 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Andrew Morton, James E.J. Bottomley, Helge Deller, Arnd Bergmann,
Kees Cook, Greg Kroah-Hartman
Cc: linux-arch, linux-ia64, linux-parisc, linux-kernel, linux-mm,
linuxppc-dev
PPC64/IA64/PARISC have function descriptors. LKDTM doesn't work
on those three architectures because LKDTM messes up function
descriptors with functions.
This series does some cleanup in the three architectures and
refactors function descriptors so that it can then easily use it
in a generic way in LKDTM.
Patch 8 is not absolutely necessary but it is a good trivial cleanup.
Changes in v2:
- Addressed received comments
- Moved dereference_[kernel]_function_descriptor() out of line
- Added patches to remove func_descr_t and func_desc_t in powerpc
- Using func_desc_t instead of funct_descr_t
- Renamed HAVE_DEREFERENCE_FUNCTION_DESCRIPTOR to HAVE_FUNCTION_DESCRIPTORS
- Added a new lkdtm test to check protection of function descriptors
Christophe Leroy (13):
powerpc: Move 'struct ppc64_opd_entry' back into asm/elf.h
powerpc: Rename 'funcaddr' to 'addr' in 'struct ppc64_opd_entry'
powerpc: Remove func_descr_t
powerpc: Prepare func_desc_t for refactorisation
ia64: Rename 'ip' to 'addr' in 'struct fdesc'
asm-generic: Use HAVE_FUNCTION_DESCRIPTORS to define associated stubs
asm-generic: Define 'func_desc_t' to commonly describe function
descriptors
asm-generic: Refactor dereference_[kernel]_function_descriptor()
lkdtm: Force do_nothing() out of line
lkdtm: Really write into kernel text in WRITE_KERN
lkdtm: Fix lkdtm_EXEC_RODATA()
lkdtm: Fix execute_[user]_location()
lkdtm: Add a test for function descriptors protection
arch/ia64/include/asm/elf.h | 2 +-
arch/ia64/include/asm/sections.h | 25 ++-------
arch/ia64/kernel/module.c | 6 +--
arch/parisc/include/asm/sections.h | 17 +++---
arch/parisc/kernel/process.c | 21 --------
arch/powerpc/include/asm/code-patching.h | 2 +-
arch/powerpc/include/asm/elf.h | 6 +++
arch/powerpc/include/asm/sections.h | 30 ++---------
arch/powerpc/include/asm/types.h | 6 ---
arch/powerpc/include/uapi/asm/elf.h | 8 ---
arch/powerpc/kernel/module_64.c | 38 +++++--------
arch/powerpc/kernel/signal_64.c | 8 +--
drivers/misc/lkdtm/core.c | 1 +
drivers/misc/lkdtm/lkdtm.h | 1 +
drivers/misc/lkdtm/perms.c | 68 ++++++++++++++++++++----
include/asm-generic/sections.h | 13 ++++-
include/linux/kallsyms.h | 2 +-
kernel/extable.c | 23 +++++++-
18 files changed, 138 insertions(+), 139 deletions(-)
--
2.31.1
^ permalink raw reply
* [PATCH v2 03/13] powerpc: Remove func_descr_t
From: Christophe Leroy @ 2021-10-14 5:49 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Andrew Morton, James E.J. Bottomley, Helge Deller, Arnd Bergmann,
Kees Cook, Greg Kroah-Hartman
Cc: linux-arch, linux-ia64, linux-parisc, linux-kernel, linux-mm,
linuxppc-dev
In-Reply-To: <cover.1634190022.git.christophe.leroy@csgroup.eu>
'func_descr_t' is redundant with 'struct ppc64_opd_entry'
Remove it.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
arch/powerpc/include/asm/code-patching.h | 2 +-
arch/powerpc/include/asm/types.h | 6 ------
arch/powerpc/kernel/signal_64.c | 8 ++++----
3 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/arch/powerpc/include/asm/code-patching.h b/arch/powerpc/include/asm/code-patching.h
index 4ba834599c4d..f3445188d319 100644
--- a/arch/powerpc/include/asm/code-patching.h
+++ b/arch/powerpc/include/asm/code-patching.h
@@ -110,7 +110,7 @@ static inline unsigned long ppc_function_entry(void *func)
* function's descriptor. The first entry in the descriptor is the
* address of the function text.
*/
- return ((func_descr_t *)func)->entry;
+ return ((struct ppc64_opd_entry *)func)->addr;
#else
return (unsigned long)func;
#endif
diff --git a/arch/powerpc/include/asm/types.h b/arch/powerpc/include/asm/types.h
index f1630c553efe..97da77bc48c9 100644
--- a/arch/powerpc/include/asm/types.h
+++ b/arch/powerpc/include/asm/types.h
@@ -23,12 +23,6 @@
typedef __vector128 vector128;
-typedef struct {
- unsigned long entry;
- unsigned long toc;
- unsigned long env;
-} func_descr_t;
-
#endif /* __ASSEMBLY__ */
#endif /* _ASM_POWERPC_TYPES_H */
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c
index 1831bba0582e..63ddbe7b108c 100644
--- a/arch/powerpc/kernel/signal_64.c
+++ b/arch/powerpc/kernel/signal_64.c
@@ -933,11 +933,11 @@ int handle_rt_signal64(struct ksignal *ksig, sigset_t *set,
* descriptor is the entry address of signal and the second
* entry is the TOC value we need to use.
*/
- func_descr_t __user *funct_desc_ptr =
- (func_descr_t __user *) ksig->ka.sa.sa_handler;
+ struct ppc64_opd_entry __user *funct_desc_ptr =
+ (struct ppc64_opd_entry __user *)ksig->ka.sa.sa_handler;
- err |= get_user(regs->ctr, &funct_desc_ptr->entry);
- err |= get_user(regs->gpr[2], &funct_desc_ptr->toc);
+ err |= get_user(regs->ctr, &funct_desc_ptr->addr);
+ err |= get_user(regs->gpr[2], &funct_desc_ptr->r2);
}
/* enter the signal handler in native-endian mode */
--
2.31.1
^ permalink raw reply related
* [PATCH v2 05/13] ia64: Rename 'ip' to 'addr' in 'struct fdesc'
From: Christophe Leroy @ 2021-10-14 5:49 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Andrew Morton, James E.J. Bottomley, Helge Deller, Arnd Bergmann,
Kees Cook, Greg Kroah-Hartman
Cc: linux-arch, linux-ia64, linux-parisc, linux-kernel, linux-mm,
linuxppc-dev
In-Reply-To: <cover.1634190022.git.christophe.leroy@csgroup.eu>
There are three architectures with function descriptors, try to
have common names for the address they contain in order to
refactor some functions into generic functions later.
powerpc has 'funcaddr'
ia64 has 'ip'
parisc has 'addr'
Vote for 'addr' and update 'struct fdesc' accordingly.
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
arch/ia64/include/asm/elf.h | 2 +-
arch/ia64/include/asm/sections.h | 2 +-
arch/ia64/kernel/module.c | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/ia64/include/asm/elf.h b/arch/ia64/include/asm/elf.h
index 6629301a2620..2ef5f9966ad1 100644
--- a/arch/ia64/include/asm/elf.h
+++ b/arch/ia64/include/asm/elf.h
@@ -226,7 +226,7 @@ struct got_entry {
* Layout of the Function Descriptor
*/
struct fdesc {
- uint64_t ip;
+ uint64_t addr;
uint64_t gp;
};
diff --git a/arch/ia64/include/asm/sections.h b/arch/ia64/include/asm/sections.h
index 3a033d2008b3..35f24e52149a 100644
--- a/arch/ia64/include/asm/sections.h
+++ b/arch/ia64/include/asm/sections.h
@@ -35,7 +35,7 @@ static inline void *dereference_function_descriptor(void *ptr)
struct fdesc *desc = ptr;
void *p;
- if (!get_kernel_nofault(p, (void *)&desc->ip))
+ if (!get_kernel_nofault(p, (void *)&desc->addr))
ptr = p;
return ptr;
}
diff --git a/arch/ia64/kernel/module.c b/arch/ia64/kernel/module.c
index 2cba53c1da82..4f6400cbf79e 100644
--- a/arch/ia64/kernel/module.c
+++ b/arch/ia64/kernel/module.c
@@ -602,15 +602,15 @@ get_fdesc (struct module *mod, uint64_t value, int *okp)
return value;
/* Look for existing function descriptor. */
- while (fdesc->ip) {
- if (fdesc->ip == value)
+ while (fdesc->addr) {
+ if (fdesc->addr == value)
return (uint64_t)fdesc;
if ((uint64_t) ++fdesc >= mod->arch.opd->sh_addr + mod->arch.opd->sh_size)
BUG();
}
/* Create new one */
- fdesc->ip = value;
+ fdesc->addr = value;
fdesc->gp = mod->arch.gp;
return (uint64_t) fdesc;
}
--
2.31.1
^ permalink raw reply related
* [PATCH v2 04/13] powerpc: Prepare func_desc_t for refactorisation
From: Christophe Leroy @ 2021-10-14 5:49 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Andrew Morton, James E.J. Bottomley, Helge Deller, Arnd Bergmann,
Kees Cook, Greg Kroah-Hartman
Cc: linux-arch, linux-ia64, linux-parisc, linux-kernel, linux-mm,
linuxppc-dev
In-Reply-To: <cover.1634190022.git.christophe.leroy@csgroup.eu>
In preparation of making func_desc_t generic, change it to
a struct containing 'addr' element.
In addition this allows using single helpers common to ELFv1 and ELFv2.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
arch/powerpc/kernel/module_64.c | 34 +++++++++++++++------------------
1 file changed, 15 insertions(+), 19 deletions(-)
diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/module_64.c
index 82908c9be627..dc99a3f6cee2 100644
--- a/arch/powerpc/kernel/module_64.c
+++ b/arch/powerpc/kernel/module_64.c
@@ -33,19 +33,13 @@
#ifdef PPC64_ELF_ABI_v2
/* An address is simply the address of the function. */
-typedef unsigned long func_desc_t;
+typedef struct {
+ unsigned long addr;
+} func_desc_t;
static func_desc_t func_desc(unsigned long addr)
{
- return addr;
-}
-static unsigned long func_addr(unsigned long addr)
-{
- return addr;
-}
-static unsigned long stub_func_addr(func_desc_t func)
-{
- return func;
+ return (func_desc_t){addr};
}
/* PowerPC64 specific values for the Elf64_Sym st_other field. */
@@ -68,15 +62,7 @@ typedef struct ppc64_opd_entry func_desc_t;
static func_desc_t func_desc(unsigned long addr)
{
- return *(struct ppc64_opd_entry *)addr;
-}
-static unsigned long func_addr(unsigned long addr)
-{
- return func_desc(addr).addr;
-}
-static unsigned long stub_func_addr(func_desc_t func)
-{
- return func.addr;
+ return *(func_desc_t *)addr;
}
static unsigned int local_entry_offset(const Elf64_Sym *sym)
{
@@ -93,6 +79,16 @@ void *dereference_module_function_descriptor(struct module *mod, void *ptr)
}
#endif
+static unsigned long func_addr(unsigned long addr)
+{
+ return func_desc(addr).addr;
+}
+
+static unsigned long stub_func_addr(func_desc_t func)
+{
+ return func.addr;
+}
+
#define STUB_MAGIC 0x73747562 /* stub */
/* Like PPC32, we need little trampolines to do > 24-bit jumps (into
--
2.31.1
^ permalink raw reply related
* [PATCH v2 01/13] powerpc: Move 'struct ppc64_opd_entry' back into asm/elf.h
From: Christophe Leroy @ 2021-10-14 5:49 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Andrew Morton, James E.J. Bottomley, Helge Deller, Arnd Bergmann,
Kees Cook, Greg Kroah-Hartman
Cc: linux-arch, linux-ia64, linux-parisc, linux-kernel, linux-mm,
linuxppc-dev
In-Reply-To: <cover.1634190022.git.christophe.leroy@csgroup.eu>
'struct ppc64_opd_entry' doesn't belong to uapi/asm/elf.h
It was initially in module_64.c and commit 2d291e902791 ("Fix compile
failure with non modular builds") moved it into asm/elf.h
But it was by mistake added outside of __KERNEL__ section,
therefore commit c3617f72036c ("UAPI: (Scripted) Disintegrate
arch/powerpc/include/asm") moved it to uapi/asm/elf.h
Move it back into asm/elf.h, this brings it back in line with
IA64 and PARISC architectures.
Fixes: 2d291e902791 ("Fix compile failure with non modular builds")
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
arch/powerpc/include/asm/elf.h | 6 ++++++
arch/powerpc/include/uapi/asm/elf.h | 8 --------
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/arch/powerpc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h
index b8425e3cfd81..a4406714c060 100644
--- a/arch/powerpc/include/asm/elf.h
+++ b/arch/powerpc/include/asm/elf.h
@@ -176,4 +176,10 @@ do { \
/* Relocate the kernel image to @final_address */
void relocate(unsigned long final_address);
+/* There's actually a third entry here, but it's unused */
+struct ppc64_opd_entry {
+ unsigned long funcaddr;
+ unsigned long r2;
+};
+
#endif /* _ASM_POWERPC_ELF_H */
diff --git a/arch/powerpc/include/uapi/asm/elf.h b/arch/powerpc/include/uapi/asm/elf.h
index 860c59291bfc..308857123a08 100644
--- a/arch/powerpc/include/uapi/asm/elf.h
+++ b/arch/powerpc/include/uapi/asm/elf.h
@@ -289,12 +289,4 @@ typedef elf_fpreg_t elf_vsrreghalf_t32[ELF_NVSRHALFREG];
/* Keep this the last entry. */
#define R_PPC64_NUM 253
-/* There's actually a third entry here, but it's unused */
-struct ppc64_opd_entry
-{
- unsigned long funcaddr;
- unsigned long r2;
-};
-
-
#endif /* _UAPI_ASM_POWERPC_ELF_H */
--
2.31.1
^ permalink raw reply related
* [PATCH v2 10/13] lkdtm: Really write into kernel text in WRITE_KERN
From: Christophe Leroy @ 2021-10-14 5:49 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Andrew Morton, James E.J. Bottomley, Helge Deller, Arnd Bergmann,
Kees Cook, Greg Kroah-Hartman
Cc: linux-arch, linux-ia64, linux-parisc, linux-kernel, linux-mm,
linuxppc-dev
In-Reply-To: <cover.1634190022.git.christophe.leroy@csgroup.eu>
WRITE_KERN is supposed to overwrite some kernel text, namely
do_overwritten() function.
But at the time being it overwrites do_overwritten() function
descriptor, not function text.
Fix it by dereferencing the function descriptor to obtain
function text pointer.
And make do_overwritten() noinline so that it is really
do_overwritten() which is called by lkdtm_WRITE_KERN().
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
drivers/misc/lkdtm/perms.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/misc/lkdtm/perms.c b/drivers/misc/lkdtm/perms.c
index 60b3b2fe929d..035fcca441f0 100644
--- a/drivers/misc/lkdtm/perms.c
+++ b/drivers/misc/lkdtm/perms.c
@@ -10,6 +10,7 @@
#include <linux/mman.h>
#include <linux/uaccess.h>
#include <asm/cacheflush.h>
+#include <asm/sections.h>
/* Whether or not to fill the target memory area with do_nothing(). */
#define CODE_WRITE true
@@ -37,7 +38,7 @@ static noinline void do_nothing(void)
}
/* Must immediately follow do_nothing for size calculuations to work out. */
-static void do_overwritten(void)
+static noinline void do_overwritten(void)
{
pr_info("do_overwritten wasn't overwritten!\n");
return;
@@ -113,8 +114,9 @@ void lkdtm_WRITE_KERN(void)
size_t size;
volatile unsigned char *ptr;
- size = (unsigned long)do_overwritten - (unsigned long)do_nothing;
- ptr = (unsigned char *)do_overwritten;
+ size = (unsigned long)dereference_function_descriptor(do_overwritten) -
+ (unsigned long)dereference_function_descriptor(do_nothing);
+ ptr = dereference_function_descriptor(do_overwritten);
pr_info("attempting bad %zu byte write at %px\n", size, ptr);
memcpy((void *)ptr, (unsigned char *)do_nothing, size);
--
2.31.1
^ permalink raw reply related
* [PATCH v2 11/13] lkdtm: Fix lkdtm_EXEC_RODATA()
From: Christophe Leroy @ 2021-10-14 5:50 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Andrew Morton, James E.J. Bottomley, Helge Deller, Arnd Bergmann,
Kees Cook, Greg Kroah-Hartman
Cc: linux-arch, linux-ia64, linux-parisc, linux-kernel, linux-mm,
linuxppc-dev
In-Reply-To: <cover.1634190022.git.christophe.leroy@csgroup.eu>
Behind its location, lkdtm_EXEC_RODATA() executes
lkdtm_rodata_do_nothing() which is a real function,
not a copy of do_nothing().
So executes it directly instead of using execute_location().
This is necessary because following patch will fix execute_location()
to use a copy of the function descriptor of do_nothing() and
function descriptor of lkdtm_rodata_do_nothing() might be different.
And fix displayed addresses by dereferencing the function descriptors.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
drivers/misc/lkdtm/perms.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/misc/lkdtm/perms.c b/drivers/misc/lkdtm/perms.c
index 035fcca441f0..5266dc28df6e 100644
--- a/drivers/misc/lkdtm/perms.c
+++ b/drivers/misc/lkdtm/perms.c
@@ -153,7 +153,14 @@ void lkdtm_EXEC_VMALLOC(void)
void lkdtm_EXEC_RODATA(void)
{
- execute_location(lkdtm_rodata_do_nothing, CODE_AS_IS);
+ pr_info("attempting ok execution at %px\n",
+ dereference_function_descriptor(do_nothing));
+ do_nothing();
+
+ pr_info("attempting bad execution at %px\n",
+ dereference_function_descriptor(lkdtm_rodata_do_nothing));
+ lkdtm_rodata_do_nothing();
+ pr_err("FAIL: func returned\n");
}
void lkdtm_EXEC_USERSPACE(void)
--
2.31.1
^ permalink raw reply related
* [PATCH v2 09/13] lkdtm: Force do_nothing() out of line
From: Christophe Leroy @ 2021-10-14 5:49 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Andrew Morton, James E.J. Bottomley, Helge Deller, Arnd Bergmann,
Kees Cook, Greg Kroah-Hartman
Cc: linux-arch, linux-ia64, linux-parisc, linux-kernel, linux-mm,
linuxppc-dev
In-Reply-To: <cover.1634190022.git.christophe.leroy@csgroup.eu>
LKDTM tests display that the run do_nothing() at a given
address, but in reality do_nothing() is inlined into the
caller.
Force it out of line so that it really runs text at the
displayed address.
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
drivers/misc/lkdtm/perms.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/misc/lkdtm/perms.c b/drivers/misc/lkdtm/perms.c
index 2dede2ef658f..60b3b2fe929d 100644
--- a/drivers/misc/lkdtm/perms.c
+++ b/drivers/misc/lkdtm/perms.c
@@ -21,7 +21,7 @@
/* This is non-const, so it will end up in the .data section. */
static u8 data_area[EXEC_SIZE];
-/* This is cost, so it will end up in the .rodata section. */
+/* This is const, so it will end up in the .rodata section. */
static const unsigned long rodata = 0xAA55AA55;
/* This is marked __ro_after_init, so it should ultimately be .rodata. */
@@ -31,7 +31,7 @@ static unsigned long ro_after_init __ro_after_init = 0x55AA5500;
* This just returns to the caller. It is designed to be copied into
* non-executable memory regions.
*/
-static void do_nothing(void)
+static noinline void do_nothing(void)
{
return;
}
--
2.31.1
^ permalink raw reply related
* [PATCH] powerpc/dcr: Use cmplwi instead of 3-argument cmpli
From: Michael Ellerman @ 2021-10-14 2:44 UTC (permalink / raw)
To: linuxppc-dev; +Cc: ndesaulniers
In dcr-low.S we use cmpli with three arguments, instead of four
arguments as defined in the ISA:
cmpli cr0,r3,1024
This appears to be a PPC440-ism, looking at the "PPC440x5 CPU Core
User’s Manual" it shows cmpli having no L field, but implied to be 0 due
to the core being 32-bit. It mentions that the ISA defines four
arguments and recommends using cmplwi.
dcr-low.S is only built 32-bit, because it is only built when
DCR_NATIVE=y, which is only selected by 40x and 44x. Looking at the
generated code (with gcc/gas) we see cmplwi as expected.
Although gas is happy with the 3-argument version when building for
32-bit, the LLVM assembler is not and errors out with:
arch/powerpc/sysdev/dcr-low.S:27:10: error: invalid operand for instruction
cmpli 0,%r3,1024; ...
^
Switching to the four argument version avoids any confusion when reading
the ISA, fixes the issue with the LLVM assembler, and also means the
code could be built 64-bit in future (though that's very unlikely).
Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
arch/powerpc/sysdev/dcr-low.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/sysdev/dcr-low.S b/arch/powerpc/sysdev/dcr-low.S
index efeeb1b885a1..329b9c4ae542 100644
--- a/arch/powerpc/sysdev/dcr-low.S
+++ b/arch/powerpc/sysdev/dcr-low.S
@@ -11,7 +11,7 @@
#include <asm/export.h>
#define DCR_ACCESS_PROLOG(table) \
- cmpli cr0,r3,1024; \
+ cmplwi cr0,r3,1024; \
rlwinm r3,r3,4,18,27; \
lis r5,table@h; \
ori r5,r5,table@l; \
--
2.25.1
^ permalink raw reply related
* Re: [PATCH v6 00/11] PCI: Drop duplicated tracking of a pci_dev's bound driver
From: Andy Shevchenko @ 2021-10-13 13:23 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Giovanni Cabiddu, Mark Rutland, Sathya Prakash,
Alexander Shishkin, Alexander Duyck,
maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT), qat-linux,
oss-drivers, Oliver O'Halloran, H. Peter Anvin, Jiri Olsa,
Thomas Gleixner, Marco Chiappero, Stefano Stabellini, Herbert Xu,
linux-scsi, Rafał Miłecki, Jesse Brandeburg,
Peter Zijlstra, Ingo Molnar, linux-pci,
open list:TI WILINK WIRELES..., Jakub Kicinski, Yisen Zhuang,
Suganath Prabu Subramani, Fiona Trahe, Andrew Donnellan,
Arnd Bergmann, Konrad Rzeszutek Wilk, Ido Schimmel,
Uwe Kleine-König, Simon Horman,
open list:LINUX FOR POWERPC PA SEMI PWRFICIENT,
Arnaldo Carvalho de Melo, Jack Xu, Borislav Petkov,
Michael Buesch, Jiri Pirko, Bjorn Helgaas, Namhyung Kim,
Boris Ostrovsky, Juergen Gross, Salil Mehta, Sreekanth Reddy,
xen-devel, Vadym Kochan, MPT-FusionLinux.pdl, Greg Kroah-Hartman,
USB, Wojciech Ziemba, Linux Kernel Mailing List, Mathias Nyman,
Zhou Wang, linux-crypto, Sascha Hauer, netdev, Frederic Barrat,
Paul Mackerras, Tomaszx Kowalik, Taras Chornyi, David S. Miller,
linux-perf-users
In-Reply-To: <20211013113356.GA1891412@bhelgaas>
On Wed, Oct 13, 2021 at 06:33:56AM -0500, Bjorn Helgaas wrote:
> On Wed, Oct 13, 2021 at 12:26:42PM +0300, Andy Shevchenko wrote:
> > On Wed, Oct 13, 2021 at 2:33 AM Bjorn Helgaas <helgaas@kernel.org> wrote:
> > > On Mon, Oct 04, 2021 at 02:59:24PM +0200, Uwe Kleine-König wrote:
...
> > It's a bit unusual. Other to_*_dev() are not NULL-aware IIRC.
>
> It is a little unusual. I only found three of 77 that are NULL-aware:
>
> to_moxtet_driver()
> to_siox_driver()
> to_spi_driver()
>
> It seems worthwhile to me because it makes the patch and the resulting
> code significantly cleaner.
I'm not objecting the change, just a remark.
...
> > > + for (id = drv ? drv->id_table : NULL; id && id->vendor; id++)
> > > + if (id->vendor == vendor && id->device == device)
> >
> > > + break;
> >
> > return true;
> >
> > > return id && id->vendor;
> >
> > return false;
>
> Good cleanup for a follow-up patch, but doesn't seem directly related
> to the objective here.
True. Maybe you can bake one while not forgotten?
...
> > > + return drv && drv->resume ?
> > > + drv->resume(pci_dev) : pci_pm_reenable_device(pci_dev);
> >
> > One line?
>
> I don't think I touched that line.
Then why they are both in + section?
...
> > > + struct pci_driver *drv = to_pci_driver(dev->dev.driver);
> > > const struct pci_error_handlers *err_handler =
> > > - dev->dev.driver ? to_pci_driver(dev->dev.driver)->err_handler : NULL;
> > > + drv ? drv->err_handler : NULL;
> >
> > Isn't dev->driver == to_pci_driver(dev->dev.driver)?
>
> Yes, I think so, but not sure what you're getting at here, can you
> elaborate?
Getting pointer from another pointer seems waste of resources, why we
can't simply
struct pci_driver *drv = dev->driver;
?
...
> > Stray change? Or is it in a separate patch in your tree?
>
> Could be skipped. The string now fits on one line so I combined it to
> make it more greppable.
This is inconsistency in your changes, in one case you are objecting of
doing something close to the changed lines, in the other you are doing
unrelated change.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply
* Re: [PATCH v6 00/11] PCI: Drop duplicated tracking of a pci_dev's bound driver
From: Bjorn Helgaas @ 2021-10-13 11:33 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Giovanni Cabiddu, Mark Rutland, Sathya Prakash,
Alexander Shishkin, Alexander Duyck,
maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT), qat-linux,
oss-drivers, Oliver O'Halloran, H. Peter Anvin, Jiri Olsa,
Thomas Gleixner, Marco Chiappero, Stefano Stabellini, Herbert Xu,
linux-scsi, Rafał Miłecki, Jesse Brandeburg,
Peter Zijlstra, Ingo Molnar, linux-pci,
open list:TI WILINK WIRELES..., Jakub Kicinski, Yisen Zhuang,
Suganath Prabu Subramani, Fiona Trahe, Andrew Donnellan,
Arnd Bergmann, Konrad Rzeszutek Wilk, Ido Schimmel,
Uwe Kleine-König, Simon Horman,
open list:LINUX FOR POWERPC PA SEMI PWRFICIENT,
Arnaldo Carvalho de Melo, Jack Xu, Borislav Petkov,
Michael Buesch, Jiri Pirko, Bjorn Helgaas, Namhyung Kim,
Boris Ostrovsky, Andy Shevchenko, Juergen Gross, Salil Mehta,
Sreekanth Reddy, xen-devel, Vadym Kochan, MPT-FusionLinux.pdl,
Greg Kroah-Hartman, USB, Wojciech Ziemba,
Linux Kernel Mailing List, Mathias Nyman, Zhou Wang, linux-crypto,
Sascha Hauer, netdev, Frederic Barrat, Paul Mackerras,
Tomaszx Kowalik, Taras Chornyi, David S. Miller, linux-perf-users
In-Reply-To: <CAHp75Vd0uYEdfB0XaQuUV34V91qJdHR5ARku1hX_TCJLJHEjxQ@mail.gmail.com>
On Wed, Oct 13, 2021 at 12:26:42PM +0300, Andy Shevchenko wrote:
> On Wed, Oct 13, 2021 at 2:33 AM Bjorn Helgaas <helgaas@kernel.org> wrote:
> > On Mon, Oct 04, 2021 at 02:59:24PM +0200, Uwe Kleine-König wrote:
>
> > I split some of the bigger patches apart so they only touched one
> > driver or subsystem at a time. I also updated to_pci_driver() so it
> > returns NULL when given NULL, which makes some of the validations
> > quite a bit simpler, especially in the PM code in pci-driver.c.
>
> It's a bit unusual. Other to_*_dev() are not NULL-aware IIRC.
It is a little unusual. I only found three of 77 that are NULL-aware:
to_moxtet_driver()
to_siox_driver()
to_spi_driver()
It seems worthwhile to me because it makes the patch and the resulting
code significantly cleaner. Here's one example without the NULL
check:
@@ -493,12 +493,15 @@ static void pci_device_remove(struct device *dev)
static void pci_device_shutdown(struct device *dev)
{
struct pci_dev *pci_dev = to_pci_dev(dev);
- struct pci_driver *drv = pci_dev->driver;
pm_runtime_resume(dev);
- if (drv && drv->shutdown)
- drv->shutdown(pci_dev);
+ if (pci_dev->dev.driver) {
+ struct pci_driver *drv = to_pci_driver(pci_dev->dev.driver);
+
+ if (drv->shutdown)
+ drv->shutdown(pci_dev);
+ }
static void pci_device_shutdown(struct device *dev)
{
struct pci_dev *pci_dev = to_pci_dev(dev);
pm_runtime_resume(dev);
if (pci_dev->dev.driver) {
struct pci_driver *drv = to_pci_driver(pci_dev->dev.driver);
if (drv->shutdown)
drv->shutdown(pci_dev);
}
and here's the same thing with the NULL check:
@@ -493,7 +493,7 @@ static void pci_device_remove(struct device *dev)
static void pci_device_shutdown(struct device *dev)
{
struct pci_dev *pci_dev = to_pci_dev(dev);
- struct pci_driver *drv = pci_dev->driver;
+ struct pci_driver *drv = to_pci_driver(dev->driver);
static void pci_device_shutdown(struct device *dev)
{
struct pci_dev *pci_dev = to_pci_dev(dev);
struct pci_driver *drv = to_pci_driver(dev->driver);
pm_runtime_resume(dev);
if (drv && drv->shutdown)
drv->shutdown(pci_dev);
> > static bool match_id(struct pci_dev *pdev, unsigned short vendor, unsigned short device)
> > {
> > + struct pci_driver *drv = to_pci_driver(pdev->dev.driver);
> > const struct pci_device_id *id;
> >
> > if (pdev->vendor == vendor && pdev->device == device)
> > return true;
>
> > + for (id = drv ? drv->id_table : NULL; id && id->vendor; id++)
> > + if (id->vendor == vendor && id->device == device)
>
> > + break;
>
> return true;
>
> > return id && id->vendor;
>
> return false;
Good cleanup for a follow-up patch, but doesn't seem directly related
to the objective here. The current patch is:
@@ -80,7 +80,7 @@ static struct resource video_rom_resource = {
*/
static bool match_id(struct pci_dev *pdev, unsigned short vendor, unsigned short device)
{
- struct pci_driver *drv = pdev->driver;
+ struct pci_driver *drv = to_pci_driver(pdev->dev.driver);
const struct pci_device_id *id;
if (pdev->vendor == vendor && pdev->device == device)
> > device_lock(&vf_dev->dev);
> > - if (vf_dev->dev.driver) {
> > + if (to_pci_driver(vf_dev->dev.driver)) {
>
> Hmm...
Yeah, it could be either of:
if (to_pci_driver(vf_dev->dev.driver))
if (vf_dev->dev.driver)
I went back and forth on that and went with to_pci_driver() on the
theory that we were testing the pci_driver * before and the patch is
more of a mechanical change and easier to review if we test the
pci_driver * after.
> > + if (!pci_dev->state_saved && pci_dev->current_state != PCI_D0
>
> > + && pci_dev->current_state != PCI_UNKNOWN) {
>
> Can we keep && on the previous line?
I think this is in pci_legacy_suspend(), and I didn't touch that line.
It shows up in the interdiff because without the NULL check in
to_pci_driver(), we had to indent this code another level. With the
NULL check, we don't need that extra indentation.
> > + pci_WARN_ONCE(pci_dev, pci_dev->current_state != prev,
> > + "PCI PM: Device state not saved by %pS\n",
> > + drv->suspend);
> > }
>
> ...
>
> > + return drv && drv->resume ?
> > + drv->resume(pci_dev) : pci_pm_reenable_device(pci_dev);
>
> One line?
I don't think I touched that line.
> > + struct pci_driver *drv = to_pci_driver(dev->dev.driver);
> > const struct pci_error_handlers *err_handler =
> > - dev->dev.driver ? to_pci_driver(dev->dev.driver)->err_handler : NULL;
> > + drv ? drv->err_handler : NULL;
>
> Isn't dev->driver == to_pci_driver(dev->dev.driver)?
Yes, I think so, but not sure what you're getting at here, can you
elaborate?
> > device_lock(&dev->dev);
> > + pdrv = to_pci_driver(dev->dev.driver);
> > if (!pci_dev_set_io_state(dev, state) ||
> > - !dev->dev.driver ||
> > - !(pdrv = to_pci_driver(dev->dev.driver))->err_handler ||
>
> > + !pdrv ||
> > + !pdrv->err_handler ||
>
> One line now?
>
> > !pdrv->err_handler->error_detected) {
>
> Or this and the previous line?
Could, but the "dev->driver" to "to_pci_driver(dev->dev.driver)"
changes are the heart of this patch, and I don't like to clutter it
with unrelated changes.
> > - result = PCI_ERS_RESULT_NONE;
> >
> > pcidev = pci_get_domain_bus_and_slot(domain, bus, devfn);
> > if (!pcidev || !pcidev->dev.driver) {
> > dev_err(&pdev->xdev->dev, "device or AER driver is NULL\n");
> > pci_dev_put(pcidev);
> > - return result;
> > + return PCI_ERS_RESULT_NONE;
> > }
> > pdrv = to_pci_driver(pcidev->dev.driver);
>
> What about splitting the conditional to two with clear error message
> in each and use pci_err() in the second one?
Could possibly be cleaned up. Felt like feature creep so I didn't.
> > default:
> > dev_err(&pdev->xdev->dev,
> > - "bad request in aer recovery "
> > - "operation!\n");
> > + "bad request in AER recovery operation!\n");
>
> Stray change? Or is it in a separate patch in your tree?
Could be skipped. The string now fits on one line so I combined it to
make it more greppable.
Bjorn
^ permalink raw reply
* Re: [PATCH v6 00/11] PCI: Drop duplicated tracking of a pci_dev's bound driver
From: Uwe Kleine-König @ 2021-10-13 10:58 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Giovanni Cabiddu, Mark Rutland, x86, Alexander Shishkin,
linux-pci, Alexander Duyck, qat-linux, oss-drivers,
Oliver O'Halloran, H. Peter Anvin, Jiri Olsa, Thomas Gleixner,
Marco Chiappero, Stefano Stabellini, Herbert Xu, linux-scsi,
Sathya Prakash, Jesse Brandeburg, Peter Zijlstra, Ingo Molnar,
Rafał Miłecki, Jakub Kicinski, Yisen Zhuang,
Suganath Prabu Subramani, Fiona Trahe, Andrew Donnellan,
Arnd Bergmann, Konrad Rzeszutek Wilk, Ido Schimmel, Simon Horman,
Arnaldo Carvalho de Melo, Wojciech Ziemba, Jack Xu,
Borislav Petkov, Michael Buesch, Jiri Pirko, Bjorn Helgaas,
Namhyung Kim, Boris Ostrovsky, Andy Shevchenko, Juergen Gross,
Salil Mehta, Sreekanth Reddy, xen-devel, Vadym Kochan,
MPT-FusionLinux.pdl, Taras Chornyi, netdev, linux-usb,
linux-wireless, linux-kernel, Mathias Nyman, Zhou Wang,
linux-crypto, kernel, Greg Kroah-Hartman, Frederic Barrat,
Paul Mackerras, Tomaszx Kowalik, linuxppc-dev, David S. Miller,
linux-perf-users
In-Reply-To: <20211013105428.GA1890798@bhelgaas>
[-- Attachment #1: Type: text/plain, Size: 1282 bytes --]
Hello,
On Wed, Oct 13, 2021 at 05:54:28AM -0500, Bjorn Helgaas wrote:
> On Wed, Oct 13, 2021 at 10:51:31AM +0200, Uwe Kleine-König wrote:
> > On Tue, Oct 12, 2021 at 06:32:12PM -0500, Bjorn Helgaas wrote:
> > > diff --git a/drivers/misc/cxl/guest.c b/drivers/misc/cxl/guest.c
> > > index d997c9c3ebb5..7eb3706cf42d 100644
> > > --- a/drivers/misc/cxl/guest.c
> > > +++ b/drivers/misc/cxl/guest.c
> > > @@ -20,38 +20,38 @@ static void pci_error_handlers(struct cxl_afu *afu,
> > > pci_channel_state_t state)
> > > {
> > > struct pci_dev *afu_dev;
> > > + struct pci_driver *afu_drv;
> > > + struct pci_error_handlers *err_handler;
> >
> > These two could be moved into the for loop (where afu_drv was with my
> > patch already). This is also possible in a few other drivers.
>
> That's true, they could. I tried to follow the prevailing style in
> the file. At least in cxl, I didn't see any other cases of
> declarations being in the minimal scope like that.
I don't care much, do whatever you consider nice. I'm happy you liked
the cleanup and that you took it.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply
* Re: [PATCH v6 00/11] PCI: Drop duplicated tracking of a pci_dev's bound driver
From: Bjorn Helgaas @ 2021-10-13 10:54 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Giovanni Cabiddu, Mark Rutland, x86, Alexander Shishkin,
linux-pci, Alexander Duyck, Jesse Brandeburg, Sathya Prakash,
oss-drivers, netdev, Oliver O'Halloran, H. Peter Anvin,
Jiri Olsa, Boris Ostrovsky, Paul Mackerras, Marco Chiappero,
Stefano Stabellini, Herbert Xu, linux-scsi, Ido Schimmel,
Rafał Miłecki, qat-linux, Peter Zijlstra, Ingo Molnar,
Jakub Kicinski, Yisen Zhuang, Frederic Barrat, Fiona Trahe,
Andrew Donnellan, Arnd Bergmann, Konrad Rzeszutek Wilk,
Suganath Prabu Subramani, Arnaldo Carvalho de Melo, Jack Xu,
Borislav Petkov, Michael Buesch, Jiri Pirko, Bjorn Helgaas,
Namhyung Kim, Thomas Gleixner, Andy Shevchenko, Juergen Gross,
Salil Mehta, Sreekanth Reddy, xen-devel, Vadym Kochan,
MPT-FusionLinux.pdl, linux-usb, linux-wireless, linux-kernel,
David S. Miller, Mathias Nyman, Zhou Wang, linux-crypto, kernel,
Greg Kroah-Hartman, Simon Horman, Wojciech Ziemba,
Tomaszx Kowalik, linuxppc-dev, Taras Chornyi, linux-perf-users
In-Reply-To: <20211013085131.5htnch5p6zv46mzn@pengutronix.de>
On Wed, Oct 13, 2021 at 10:51:31AM +0200, Uwe Kleine-König wrote:
> On Tue, Oct 12, 2021 at 06:32:12PM -0500, Bjorn Helgaas wrote:
> > On Mon, Oct 04, 2021 at 02:59:24PM +0200, Uwe Kleine-König wrote:
> > > Hello,
> > >
> > > this is v6 of the quest to drop the "driver" member from struct pci_dev
> > > which tracks the same data (apart from a constant offset) as dev.driver.
> >
> > I like this a lot and applied it to pci/driver for v5.16, thanks!
> >
> > I split some of the bigger patches apart so they only touched one
> > driver or subsystem at a time. I also updated to_pci_driver() so it
> > returns NULL when given NULL, which makes some of the validations
> > quite a bit simpler, especially in the PM code in pci-driver.c.
>
> OK.
>
> > Full interdiff from this v6 series:
> >
> > diff --git a/arch/x86/kernel/probe_roms.c b/arch/x86/kernel/probe_roms.c
> > index deaaef6efe34..36e84d904260 100644
> > --- a/arch/x86/kernel/probe_roms.c
> > +++ b/arch/x86/kernel/probe_roms.c
> > @@ -80,17 +80,15 @@ static struct resource video_rom_resource = {
> > */
> > static bool match_id(struct pci_dev *pdev, unsigned short vendor, unsigned short device)
> > {
> > + struct pci_driver *drv = to_pci_driver(pdev->dev.driver);
> > const struct pci_device_id *id;
> >
> > if (pdev->vendor == vendor && pdev->device == device)
> > return true;
> >
> > - if (pdev->dev.driver) {
> > - struct pci_driver *drv = to_pci_driver(pdev->dev.driver);
> > - for (id = drv->id_table; id && id->vendor; id++)
> > - if (id->vendor == vendor && id->device == device)
> > - break;
> > - }
> > + for (id = drv ? drv->id_table : NULL; id && id->vendor; id++)
> > + if (id->vendor == vendor && id->device == device)
> > + break;
> >
> > return id && id->vendor;
> > }
> > diff --git a/drivers/misc/cxl/guest.c b/drivers/misc/cxl/guest.c
> > index d997c9c3ebb5..7eb3706cf42d 100644
> > --- a/drivers/misc/cxl/guest.c
> > +++ b/drivers/misc/cxl/guest.c
> > @@ -20,38 +20,38 @@ static void pci_error_handlers(struct cxl_afu *afu,
> > pci_channel_state_t state)
> > {
> > struct pci_dev *afu_dev;
> > + struct pci_driver *afu_drv;
> > + struct pci_error_handlers *err_handler;
>
> These two could be moved into the for loop (where afu_drv was with my
> patch already). This is also possible in a few other drivers.
That's true, they could. I tried to follow the prevailing style in
the file. At least in cxl, I didn't see any other cases of
declarations being in the minimal scope like that.
Bjorn
^ permalink raw reply
* [PATCH] powerpc/64s: Default to 64K pages for 64 bit book3s
From: Joel Stanley @ 2021-10-13 23:31 UTC (permalink / raw)
To: linuxppc-dev
For 64-bit book3s the default should be 64K as that's what modern CPUs
are designed for.
The following defconfigs already set CONFIG_PPC_64K_PAGES:
cell_defconfig
pasemi_defconfig
powernv_defconfig
ppc64_defconfig
pseries_defconfig
skiroot_defconfig
The have the option removed from the defconfig, as it is now the
default.
The defconfigs that now need to set CONFIG_PPC_4K_PAGES to maintain
their existing behaviour are:
g5_defconfig
maple_defconfig
microwatt_defconfig
ps3_defconfig
Link: https://github.com/linuxppc/issues/issues/109
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
arch/powerpc/Kconfig | 1 +
arch/powerpc/configs/cell_defconfig | 1 -
arch/powerpc/configs/g5_defconfig | 1 +
arch/powerpc/configs/maple_defconfig | 1 +
arch/powerpc/configs/microwatt_defconfig | 2 +-
arch/powerpc/configs/pasemi_defconfig | 1 -
arch/powerpc/configs/powernv_defconfig | 1 -
arch/powerpc/configs/ppc64_defconfig | 1 -
arch/powerpc/configs/ps3_defconfig | 1 +
arch/powerpc/configs/pseries_defconfig | 1 -
arch/powerpc/configs/skiroot_defconfig | 1 -
11 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 8a584414ef67..e2c220fa91c0 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -708,6 +708,7 @@ config ARCH_MEMORY_PROBE
choice
prompt "Page size"
+ default PPC_64K_PAGES if PPC_BOOK3S_64
default PPC_4K_PAGES
help
Select the kernel logical page size. Increasing the page size
diff --git a/arch/powerpc/configs/cell_defconfig b/arch/powerpc/configs/cell_defconfig
index cc2c0d51f493..7fd9e596ea33 100644
--- a/arch/powerpc/configs/cell_defconfig
+++ b/arch/powerpc/configs/cell_defconfig
@@ -36,7 +36,6 @@ CONFIG_GEN_RTC=y
CONFIG_BINFMT_MISC=m
CONFIG_IRQ_ALL_CPUS=y
CONFIG_NUMA=y
-CONFIG_PPC_64K_PAGES=y
CONFIG_SCHED_SMT=y
CONFIG_PCIEPORTBUS=y
CONFIG_NET=y
diff --git a/arch/powerpc/configs/g5_defconfig b/arch/powerpc/configs/g5_defconfig
index 63d611cc160f..9d6212a8b195 100644
--- a/arch/powerpc/configs/g5_defconfig
+++ b/arch/powerpc/configs/g5_defconfig
@@ -26,6 +26,7 @@ CONFIG_CPU_FREQ_PMAC64=y
CONFIG_GEN_RTC=y
CONFIG_KEXEC=y
CONFIG_IRQ_ALL_CPUS=y
+CONFIG_PPC_4K_PAGES=y
CONFIG_PCI_MSI=y
CONFIG_NET=y
CONFIG_PACKET=y
diff --git a/arch/powerpc/configs/maple_defconfig b/arch/powerpc/configs/maple_defconfig
index 9424c1e67e1c..c821a97f4a89 100644
--- a/arch/powerpc/configs/maple_defconfig
+++ b/arch/powerpc/configs/maple_defconfig
@@ -25,6 +25,7 @@ CONFIG_UDBG_RTAS_CONSOLE=y
CONFIG_GEN_RTC=y
CONFIG_KEXEC=y
CONFIG_IRQ_ALL_CPUS=y
+CONFIG_PPC_4K_PAGES=y
CONFIG_PCI_MSI=y
CONFIG_NET=y
CONFIG_PACKET=y
diff --git a/arch/powerpc/configs/microwatt_defconfig b/arch/powerpc/configs/microwatt_defconfig
index 9465209b8c5b..556ec5eec684 100644
--- a/arch/powerpc/configs/microwatt_defconfig
+++ b/arch/powerpc/configs/microwatt_defconfig
@@ -1,7 +1,6 @@
# CONFIG_SWAP is not set
# CONFIG_CROSS_MEMORY_ATTACH is not set
CONFIG_HIGH_RES_TIMERS=y
-CONFIG_PREEMPT_VOLUNTARY=y
CONFIG_TICK_CPU_ACCOUNTING=y
CONFIG_LOG_BUF_SHIFT=16
CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=12
@@ -26,6 +25,7 @@ CONFIG_PPC_MICROWATT=y
# CONFIG_PPC_OF_BOOT_TRAMPOLINE is not set
CONFIG_CPU_FREQ=y
CONFIG_HZ_100=y
+CONFIG_PPC_4K_PAGES=y
# CONFIG_PPC_MEM_KEYS is not set
# CONFIG_SECCOMP is not set
# CONFIG_MQ_IOSCHED_KYBER is not set
diff --git a/arch/powerpc/configs/pasemi_defconfig b/arch/powerpc/configs/pasemi_defconfig
index 78606b7e42df..e00a703581c3 100644
--- a/arch/powerpc/configs/pasemi_defconfig
+++ b/arch/powerpc/configs/pasemi_defconfig
@@ -22,7 +22,6 @@ CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_HZ_1000=y
-CONFIG_PPC_64K_PAGES=y
# CONFIG_SECCOMP is not set
CONFIG_PCI_MSI=y
CONFIG_PCCARD=y
diff --git a/arch/powerpc/configs/powernv_defconfig b/arch/powerpc/configs/powernv_defconfig
index 8bfeea6c7de7..49f49c263935 100644
--- a/arch/powerpc/configs/powernv_defconfig
+++ b/arch/powerpc/configs/powernv_defconfig
@@ -62,7 +62,6 @@ CONFIG_MEMORY_FAILURE=y
CONFIG_HWPOISON_INJECT=m
CONFIG_TRANSPARENT_HUGEPAGE=y
CONFIG_DEFERRED_STRUCT_PAGE_INIT=y
-CONFIG_PPC_64K_PAGES=y
CONFIG_SCHED_SMT=y
CONFIG_PM=y
CONFIG_HOTPLUG_PCI=y
diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig
index 0ad2291337a7..203d0b7f0bb8 100644
--- a/arch/powerpc/configs/ppc64_defconfig
+++ b/arch/powerpc/configs/ppc64_defconfig
@@ -52,7 +52,6 @@ CONFIG_KEXEC_FILE=y
CONFIG_CRASH_DUMP=y
CONFIG_FA_DUMP=y
CONFIG_IRQ_ALL_CPUS=y
-CONFIG_PPC_64K_PAGES=y
CONFIG_SCHED_SMT=y
CONFIG_HOTPLUG_PCI=y
CONFIG_HOTPLUG_PCI_RPA=m
diff --git a/arch/powerpc/configs/ps3_defconfig b/arch/powerpc/configs/ps3_defconfig
index f300dcb937cc..7c95fab4b920 100644
--- a/arch/powerpc/configs/ps3_defconfig
+++ b/arch/powerpc/configs/ps3_defconfig
@@ -30,6 +30,7 @@ CONFIG_PS3_LPM=m
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
CONFIG_BINFMT_MISC=y
CONFIG_KEXEC=y
+CONFIG_PPC_4K_PAGES=y
# CONFIG_SPARSEMEM_VMEMMAP is not set
# CONFIG_COMPACTION is not set
CONFIG_SCHED_SMT=y
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig
index b183629f1bcf..de7641adb899 100644
--- a/arch/powerpc/configs/pseries_defconfig
+++ b/arch/powerpc/configs/pseries_defconfig
@@ -56,7 +56,6 @@ CONFIG_MEMORY_HOTPLUG=y
CONFIG_MEMORY_HOTREMOVE=y
CONFIG_KSM=y
CONFIG_TRANSPARENT_HUGEPAGE=y
-CONFIG_PPC_64K_PAGES=y
CONFIG_SCHED_SMT=y
CONFIG_HOTPLUG_PCI=y
CONFIG_HOTPLUG_PCI_RPA=m
diff --git a/arch/powerpc/configs/skiroot_defconfig b/arch/powerpc/configs/skiroot_defconfig
index c3ba614c973d..f491875700e8 100644
--- a/arch/powerpc/configs/skiroot_defconfig
+++ b/arch/powerpc/configs/skiroot_defconfig
@@ -43,7 +43,6 @@ CONFIG_KEXEC_FILE=y
CONFIG_PRESERVE_FA_DUMP=y
CONFIG_IRQ_ALL_CPUS=y
CONFIG_NUMA=y
-CONFIG_PPC_64K_PAGES=y
CONFIG_SCHED_SMT=y
CONFIG_CMDLINE="console=tty0 console=hvc0 ipr.fast_reboot=1 quiet"
# CONFIG_SECCOMP is not set
--
2.33.0
^ permalink raw reply related
* Re: linux-next: build warnings in Linus' tree
From: Rob Herring @ 2021-10-13 23:22 UTC (permalink / raw)
To: Anatolij Gustschin
Cc: Stephen Rothwell, Linux Next Mailing List, PowerPC,
Linux Kernel Mailing List, Arnd Bergmann
In-Reply-To: <20211014002841.7c4ccf2f@crub>
On Wed, Oct 13, 2021 at 5:28 PM Anatolij Gustschin <agust@denx.de> wrote:
>
> On Wed, 13 Oct 2021 17:17:25 -0500
> Rob Herring robh+dt@kernel.org wrote:
> ...
> >In general, you shouldn't need to be changing the drivers. Can you
> >tell me which warnings need driver changes?
>
> ethernet and mdio drivers share registers, so they use same unit-address:
>
> arch/powerpc/boot/dts/tqm5200.dts:127.17-133.5: Warning (unique_unit_address): /soc5200@f0000000/ethernet@3000: duplicate unit-address (also used in node /soc5200@f0000000/mdio@3000)
>
> arch/powerpc/boot/dts/mpc5200b.dtsi:218.23-223.5: Warning (unique_unit_address): /soc5200@f0000000/ethernet@3000: duplicate unit-address (also used in node /soc5200@f0000000/mdio@3000)
> also defined at arch/powerpc/boot/dts/digsy_mtc.dts:60.17-62.5
Those are W=1 warnings and off by default. You shouldn't fix them if
it breaks compatibility with the driver.
Rob
^ permalink raw reply
* [PATCH] powerpc/5200: dts: fix psc node warning
From: Anatolij Gustschin @ 2021-10-13 22:59 UTC (permalink / raw)
To: linuxppc-dev
Cc: devicetree, Stephen Rothwell, linux-kernel, Rob Herring,
Paul Mackerras
Fix build warning:
Warning (spi_bus_bridge): /soc5200@f0000000/psc@2000: node name for SPI buses should be 'spi'
Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
arch/powerpc/boot/dts/motionpro.dts | 4 ++++
arch/powerpc/boot/dts/o2d.dtsi | 6 +++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/boot/dts/motionpro.dts b/arch/powerpc/boot/dts/motionpro.dts
index 09f0eaa4ad49..cc217ddd50a0 100644
--- a/arch/powerpc/boot/dts/motionpro.dts
+++ b/arch/powerpc/boot/dts/motionpro.dts
@@ -19,6 +19,8 @@
label = "motionpro-readyled";
};
+/delete-node/ &psc2;
+
/ {
model = "promess,motionpro";
compatible = "promess,motionpro";
@@ -35,6 +37,8 @@
// PSC2 in spi master mode
psc@2200 { // PSC2
compatible = "fsl,mpc5200b-psc-spi","fsl,mpc5200-psc-spi";
+ reg = <0x2200 0x100>;
+ interrupts = <2 2 0>;
cell-index = <1>;
};
diff --git a/arch/powerpc/boot/dts/o2d.dtsi b/arch/powerpc/boot/dts/o2d.dtsi
index 898fe08a9fd0..34a836a37084 100644
--- a/arch/powerpc/boot/dts/o2d.dtsi
+++ b/arch/powerpc/boot/dts/o2d.dtsi
@@ -15,6 +15,8 @@
};
&gpt1 { gpio-controller; };
+/delete-node/ &psc1;
+
/ {
model = "ifm,o2d";
compatible = "ifm,o2d";
@@ -29,8 +31,10 @@
status = "disabled";
};
- psc@2000 { // PSC1
+ spi@2000 { // PSC1
compatible = "fsl,mpc5200b-psc-spi","fsl,mpc5200-psc-spi";
+ reg = <0x2000 0x100>;
+ interrupts = <2 1 0>;
#address-cells = <1>;
#size-cells = <0>;
cell-index = <0>;
--
2.17.1
^ permalink raw reply related
* Re: linux-next: build warnings in Linus' tree
From: Anatolij Gustschin @ 2021-10-13 22:28 UTC (permalink / raw)
To: Rob Herring
Cc: Stephen Rothwell, Linux Next Mailing List, PowerPC,
Linux Kernel Mailing List, Arnd Bergmann
In-Reply-To: <CAL_JsqJSqqYya-xe8YQs0-0KTF3LzwkyGD_2dUxQY9SKVV7RMw@mail.gmail.com>
On Wed, 13 Oct 2021 17:17:25 -0500
Rob Herring robh+dt@kernel.org wrote:
...
>In general, you shouldn't need to be changing the drivers. Can you
>tell me which warnings need driver changes?
ethernet and mdio drivers share registers, so they use same unit-address:
arch/powerpc/boot/dts/tqm5200.dts:127.17-133.5: Warning (unique_unit_address): /soc5200@f0000000/ethernet@3000: duplicate unit-address (also used in node /soc5200@f0000000/mdio@3000)
arch/powerpc/boot/dts/mpc5200b.dtsi:218.23-223.5: Warning (unique_unit_address): /soc5200@f0000000/ethernet@3000: duplicate unit-address (also used in node /soc5200@f0000000/mdio@3000)
also defined at arch/powerpc/boot/dts/digsy_mtc.dts:60.17-62.5
Anatolij
^ permalink raw reply
* Re: linux-next: build warnings in Linus' tree
From: Rob Herring @ 2021-10-13 22:17 UTC (permalink / raw)
To: Anatolij Gustschin
Cc: Stephen Rothwell, Linux Next Mailing List, PowerPC,
Linux Kernel Mailing List, Arnd Bergmann
In-Reply-To: <20211014001232.3becbe99@crub>
On Wed, Oct 13, 2021 at 5:12 PM Anatolij Gustschin <agust@denx.de> wrote:
>
> Hi Arnd, Rob,
>
> On Tue, 12 Oct 2021 16:39:56 +0200
> Arnd Bergmann arnd@arndb.de wrote:
> ...
> >Grant Likely was the original maintainer for MPC52xx until 2011,
> >Anatolij Gustschin is still listed as maintainer since then but hasn't
> >been active in it for a while either. Anatolij can probably best judge
> >which of these boards are still in going to be used with future kernels,
> >but I suspect once you start removing bits from 52xx, the newer
> >but less common 512x platform can go away as well.
>
> many of these boards are still used, i.e. o2d*, digsy_mtc, tqm5200.
> I've sent first series to fix some warnings. Other dts fixes
> require driver changes, so it will take some time to fix them.
In general, you shouldn't need to be changing the drivers. Can you
tell me which warnings need driver changes?
Rob
^ permalink raw reply
* Re: linux-next: build warnings in Linus' tree
From: Anatolij Gustschin @ 2021-10-13 22:12 UTC (permalink / raw)
To: Arnd Bergmann, Rob Herring
Cc: Stephen Rothwell, Linux Next Mailing List, PowerPC,
Linux Kernel Mailing List
In-Reply-To: <CAK8P3a1EcNuxT-w-8w-HDr2+idsP=vFZ3Cn27fX7o56GOuu_Cg@mail.gmail.com>
Hi Arnd, Rob,
On Tue, 12 Oct 2021 16:39:56 +0200
Arnd Bergmann arnd@arndb.de wrote:
...
>Grant Likely was the original maintainer for MPC52xx until 2011,
>Anatolij Gustschin is still listed as maintainer since then but hasn't
>been active in it for a while either. Anatolij can probably best judge
>which of these boards are still in going to be used with future kernels,
>but I suspect once you start removing bits from 52xx, the newer
>but less common 512x platform can go away as well.
many of these boards are still used, i.e. o2d*, digsy_mtc, tqm5200.
I've sent first series to fix some warnings. Other dts fixes
require driver changes, so it will take some time to fix them.
Anatolij
^ permalink raw reply
* [PATCH 1/4] powerpc/5200: dts: add missing pci ranges
From: Anatolij Gustschin @ 2021-10-13 22:05 UTC (permalink / raw)
To: linuxppc-dev
Cc: devicetree, Stephen Rothwell, linux-kernel, Rob Herring,
Paul Mackerras
In-Reply-To: <20211013220532.24759-1-agust@denx.de>
Add ranges property to fix build warnings:
Warning (pci_bridge): /pci@f0000d00: missing ranges for PCI bridge (or not a bridge)
Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
arch/powerpc/boot/dts/mpc5200b.dtsi | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/boot/dts/mpc5200b.dtsi b/arch/powerpc/boot/dts/mpc5200b.dtsi
index 648fe31795f4..8c645d2bc455 100644
--- a/arch/powerpc/boot/dts/mpc5200b.dtsi
+++ b/arch/powerpc/boot/dts/mpc5200b.dtsi
@@ -276,7 +276,9 @@
clock-frequency = <0>; // From boot loader
interrupts = <2 8 0 2 9 0 2 10 0>;
bus-range = <0 0>;
- // ranges = need to add
+ ranges = <0x42000000 0 0x80000000 0x80000000 0 0x10000000>,
+ <0x02000000 0 0x90000000 0x90000000 0 0x10000000>,
+ <0x01000000 0 0x00000000 0xa0000000 0 0x01000000>;
};
localbus: localbus {
--
2.17.1
^ permalink raw reply related
* [PATCH 4/4] powerpc/5200: dts: fix localbus node warnings
From: Anatolij Gustschin @ 2021-10-13 22:05 UTC (permalink / raw)
To: linuxppc-dev
Cc: devicetree, Stephen Rothwell, linux-kernel, Rob Herring,
Paul Mackerras
In-Reply-To: <20211013220532.24759-1-agust@denx.de>
Fix build warnings like:
localbus:ranges: 'oneOf' conditional failed, one must be fixed
...
Warning (unit_address_vs_reg): /localbus: node has a reg or ranges property, but no unit name
Warning (simple_bus_reg): /localbus/flash@0,0: simple-bus unit address format error, expected "0"
Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
arch/powerpc/boot/dts/a3m071.dts | 12 +++++-----
arch/powerpc/boot/dts/a4m072.dts | 20 ++++++++---------
arch/powerpc/boot/dts/charon.dts | 14 ++++++------
arch/powerpc/boot/dts/cm5200.dts | 7 ++++--
arch/powerpc/boot/dts/digsy_mtc.dts | 16 ++++++++------
arch/powerpc/boot/dts/lite5200.dts | 4 ++--
arch/powerpc/boot/dts/lite5200b.dts | 6 +++--
arch/powerpc/boot/dts/media5200.dts | 20 +++++++++--------
arch/powerpc/boot/dts/motionpro.dts | 32 +++++++++++++++------------
arch/powerpc/boot/dts/mpc5200b.dtsi | 2 +-
arch/powerpc/boot/dts/mucmc52.dts | 34 +++++++++++++++--------------
arch/powerpc/boot/dts/o2d.dts | 10 +++++----
arch/powerpc/boot/dts/o2d.dtsi | 12 +++++-----
arch/powerpc/boot/dts/o2d300.dts | 10 +++++----
arch/powerpc/boot/dts/o2dnt2.dts | 10 +++++----
arch/powerpc/boot/dts/o2i.dts | 4 ++--
arch/powerpc/boot/dts/o2mnt.dts | 4 ++--
arch/powerpc/boot/dts/o3dnt.dts | 10 +++++----
arch/powerpc/boot/dts/pcm030.dts | 2 +-
arch/powerpc/boot/dts/pcm032.dts | 26 ++++++++++++----------
arch/powerpc/boot/dts/tqm5200.dts | 4 ++--
arch/powerpc/boot/dts/uc101.dts | 14 +++++++-----
22 files changed, 151 insertions(+), 122 deletions(-)
diff --git a/arch/powerpc/boot/dts/a3m071.dts b/arch/powerpc/boot/dts/a3m071.dts
index 034cfd8aa95b..14e59aaa0ba7 100644
--- a/arch/powerpc/boot/dts/a3m071.dts
+++ b/arch/powerpc/boot/dts/a3m071.dts
@@ -87,15 +87,15 @@
};
};
- localbus {
+ localbus@80000000 {
compatible = "fsl,mpc5200b-lpb","simple-bus";
#address-cells = <2>;
#size-cells = <1>;
- ranges = <0 0 0xfc000000 0x02000000
- 3 0 0xe9000000 0x00080000
- 5 0 0xe8000000 0x00010000>;
+ ranges = <0 0 0xfc000000 0x02000000>,
+ <3 0 0xe9000000 0x00080000>,
+ <5 0 0xe8000000 0x00010000>;
- flash@0,0 {
+ flash@0 {
#address-cells = <1>;
#size-cells = <1>;
reg = <0 0x0 0x02000000>;
@@ -124,7 +124,7 @@
};
};
- fpga@3,0 {
+ fpga@300000000 {
compatible = "anonymous,a3m071-fpga";
reg = <3 0x0 0x00080000
5 0x0 0x00010000>;
diff --git a/arch/powerpc/boot/dts/a4m072.dts b/arch/powerpc/boot/dts/a4m072.dts
index d4270a2ec6c7..dede711957da 100644
--- a/arch/powerpc/boot/dts/a4m072.dts
+++ b/arch/powerpc/boot/dts/a4m072.dts
@@ -98,25 +98,25 @@
};
};
- localbus {
+ localbus@80000000 {
compatible = "fsl,mpc5200b-lpb","simple-bus";
#address-cells = <2>;
#size-cells = <1>;
- ranges = <0 0 0xfe000000 0x02000000
- 1 0 0x62000000 0x00400000
- 2 0 0x64000000 0x00200000
- 3 0 0x66000000 0x01000000
- 6 0 0x68000000 0x01000000
- 7 0 0x6a000000 0x00000004>;
-
- flash@0,0 {
+ ranges = <0 0 0xfe000000 0x02000000>,
+ <1 0 0x62000000 0x00400000>,
+ <2 0 0x64000000 0x00200000>,
+ <3 0 0x66000000 0x01000000>,
+ <6 0 0x68000000 0x01000000>,
+ <7 0 0x6a000000 0x00000004>;
+
+ flash@0 {
compatible = "cfi-flash";
reg = <0 0 0x02000000>;
bank-width = <2>;
#size-cells = <1>;
#address-cells = <1>;
};
- sram0@1,0 {
+ sram0@100000000 {
compatible = "mtd-ram";
reg = <1 0x00000 0x00400000>;
bank-width = <2>;
diff --git a/arch/powerpc/boot/dts/charon.dts b/arch/powerpc/boot/dts/charon.dts
index ea6e76ae2545..2e3518909321 100644
--- a/arch/powerpc/boot/dts/charon.dts
+++ b/arch/powerpc/boot/dts/charon.dts
@@ -177,15 +177,15 @@
};
};
- localbus {
+ localbus@80000000 {
compatible = "fsl,mpc5200-lpb","simple-bus";
#address-cells = <2>;
#size-cells = <1>;
- ranges = < 0 0 0xfc000000 0x02000000
- 1 0 0xe0000000 0x04000000 // CS1 range, SM501
- 3 0 0xe8000000 0x00080000>;
+ ranges = <0 0 0xfc000000 0x02000000>,
+ <1 0 0xe0000000 0x04000000>, // CS1 range, SM501
+ <3 0 0xe8000000 0x00080000>;
- flash@0,0 {
+ flash@0 {
compatible = "cfi-flash";
reg = <0 0 0x02000000>;
bank-width = <4>;
@@ -194,7 +194,7 @@
#address-cells = <1>;
};
- display@1,0 {
+ display@100000000 {
compatible = "smi,sm501";
reg = <1 0x00000000 0x00800000
1 0x03e00000 0x00200000>;
@@ -203,7 +203,7 @@
little-endian;
};
- mram0@3,0 {
+ mram0@300000000 {
compatible = "mtd-ram";
reg = <3 0x00000 0x80000>;
bank-width = <1>;
diff --git a/arch/powerpc/boot/dts/cm5200.dts b/arch/powerpc/boot/dts/cm5200.dts
index 66cae7be60c4..196f412f2c32 100644
--- a/arch/powerpc/boot/dts/cm5200.dts
+++ b/arch/powerpc/boot/dts/cm5200.dts
@@ -71,9 +71,12 @@
status = "disabled";
};
- localbus {
+ localbus@80000000 {
+ #address-cells = <2>;
+ #size-cells = <1>;
+
// 16-bit flash device at LocalPlus Bus CS0
- flash@0,0 {
+ flash@0 {
compatible = "cfi-flash";
reg = <0 0 0x2000000>;
bank-width = <2>;
diff --git a/arch/powerpc/boot/dts/digsy_mtc.dts b/arch/powerpc/boot/dts/digsy_mtc.dts
index 57024a4c1e7d..28355f037e1b 100644
--- a/arch/powerpc/boot/dts/digsy_mtc.dts
+++ b/arch/powerpc/boot/dts/digsy_mtc.dts
@@ -103,12 +103,14 @@
<0x01000000 0 0x00000000 0xa0000000 0 0x01000000>;
};
- localbus {
- ranges = <0 0 0xff000000 0x1000000
- 4 0 0x60000000 0x0001000>;
+ localbus@80000000 {
+ #address-cells = <2>;
+ #size-cells = <1>;
+ ranges = <0 0 0xff000000 0x1000000>,
+ <4 0 0x60000000 0x0001000>;
// 16-bit flash device at LocalPlus Bus CS0
- flash@0,0 {
+ flash@0 {
compatible = "cfi-flash";
reg = <0 0 0x1000000>;
bank-width = <2>;
@@ -134,21 +136,21 @@
};
};
- can@4,0 {
+ can@400000000 {
compatible = "nxp,sja1000";
reg = <4 0x000 0x80>;
nxp,external-clock-frequency = <24000000>;
interrupts = <1 2 3>; // Level-low
};
- can@4,100 {
+ can@400000100 {
compatible = "nxp,sja1000";
reg = <4 0x100 0x80>;
nxp,external-clock-frequency = <24000000>;
interrupts = <1 2 3>; // Level-low
};
- serial@4,200 {
+ serial@400000200 {
compatible = "nxp,sc28l92";
reg = <4 0x200 0x10>;
interrupts = <1 3 3>;
diff --git a/arch/powerpc/boot/dts/lite5200.dts b/arch/powerpc/boot/dts/lite5200.dts
index b9d8487813b4..4316669dc5bb 100644
--- a/arch/powerpc/boot/dts/lite5200.dts
+++ b/arch/powerpc/boot/dts/lite5200.dts
@@ -288,14 +288,14 @@
<0x01000000 0 0x00000000 0xb0000000 0 0x01000000>;
};
- localbus {
+ localbus@80000000 {
compatible = "fsl,mpc5200-lpb","simple-bus";
#address-cells = <2>;
#size-cells = <1>;
ranges = <0 0 0xff000000 0x01000000>;
- flash@0,0 {
+ flash@0 {
compatible = "amd,am29lv652d", "cfi-flash";
reg = <0 0 0x01000000>;
bank-width = <1>;
diff --git a/arch/powerpc/boot/dts/lite5200b.dts b/arch/powerpc/boot/dts/lite5200b.dts
index 7e2d91c7cb66..f31825477703 100644
--- a/arch/powerpc/boot/dts/lite5200b.dts
+++ b/arch/powerpc/boot/dts/lite5200b.dts
@@ -121,10 +121,12 @@
<0x01000000 0 0x00000000 0xb0000000 0 0x01000000>;
};
- localbus {
+ localbus@80000000 {
+ #address-cells = <2>;
+ #size-cells = <1>;
ranges = <0 0 0xfe000000 0x02000000>;
- flash@0,0 {
+ flash@0 {
compatible = "cfi-flash";
reg = <0 0 0x02000000>;
bank-width = <1>;
diff --git a/arch/powerpc/boot/dts/media5200.dts b/arch/powerpc/boot/dts/media5200.dts
index 96524ede16cd..e4bca32dbf10 100644
--- a/arch/powerpc/boot/dts/media5200.dts
+++ b/arch/powerpc/boot/dts/media5200.dts
@@ -102,26 +102,28 @@
interrupt-parent = <&mpc5200_pic>;
};
- localbus {
- ranges = < 0 0 0xfc000000 0x02000000
- 1 0 0xfe000000 0x02000000
- 2 0 0xf0010000 0x00010000
- 3 0 0xf0020000 0x00010000 >;
- flash@0,0 {
+ localbus@80000000 {
+ #address-cells = <2>;
+ #size-cells = <1>;
+ ranges = <0 0 0xfc000000 0x02000000>,
+ <1 0 0xfe000000 0x02000000>,
+ <2 0 0xf0010000 0x00010000>,
+ <3 0 0xf0020000 0x00010000>;
+ flash@0 {
compatible = "amd,am29lv28ml", "cfi-flash";
reg = <0 0x0 0x2000000>; // 32 MB
bank-width = <4>; // Width in bytes of the flash bank
device-width = <2>; // Two devices on each bank
};
- flash@1,0 {
+ flash@100000000 {
compatible = "amd,am29lv28ml", "cfi-flash";
reg = <1 0 0x2000000>; // 32 MB
bank-width = <4>; // Width in bytes of the flash bank
device-width = <2>; // Two devices on each bank
};
- media5200_fpga: fpga@2,0 {
+ media5200_fpga: fpga@200000000 {
compatible = "fsl,media5200-fpga";
interrupt-controller;
#interrupt-cells = <2>; // 0:bank 1:id; no type field
@@ -132,7 +134,7 @@
1 1 3>; // IRQ bank 1
};
- uart@3,0 {
+ uart@300000000 {
compatible = "ti,tl16c752bpt";
reg = <3 0 0x10000>;
interrupt-parent = <&media5200_fpga>;
diff --git a/arch/powerpc/boot/dts/motionpro.dts b/arch/powerpc/boot/dts/motionpro.dts
index c23676093da8..09f0eaa4ad49 100644
--- a/arch/powerpc/boot/dts/motionpro.dts
+++ b/arch/powerpc/boot/dts/motionpro.dts
@@ -85,41 +85,45 @@
status = "disabled";
};
- localbus {
- ranges = <0 0 0xff000000 0x01000000
- 1 0 0x50000000 0x00010000
- 2 0 0x50010000 0x00010000
- 3 0 0x50020000 0x00010000>;
+ localbus@80000000 {
+ #address-cells = <2>;
+ #size-cells = <1>;
+ ranges = <0 0 0xff000000 0x01000000>,
+ <1 0 0x50000000 0x00010000>,
+ <2 0 0x50010000 0x00010000>,
+ <3 0 0x50020000 0x00010000>;
// 8-bit DualPort SRAM on LocalPlus Bus CS1
- kollmorgen@1,0 {
+ kollmorgen@100000000 {
compatible = "promess,motionpro-kollmorgen";
reg = <1 0 0x10000>;
interrupts = <1 1 0>;
};
// 8-bit board CPLD on LocalPlus Bus CS2
- cpld@2,0 {
+ cpld@200000000 {
compatible = "promess,motionpro-cpld";
reg = <2 0 0x10000>;
};
// 8-bit custom Anybus Module on LocalPlus Bus CS3
- anybus@3,0 {
+ anybus@300000000 {
compatible = "promess,motionpro-anybus";
reg = <3 0 0x10000>;
};
- pro_module_general@3,0 {
- compatible = "promess,pro_module_general";
- reg = <3 0 3>;
- };
- pro_module_dio@3,800 {
+ /*
+ * pro_module_general@300000000 {
+ * compatible = "promess,pro_module_general";
+ * reg = <3 0 3>;
+ * };
+ */
+ pro_module_dio@300000800 {
compatible = "promess,pro_module_dio";
reg = <3 0x800 2>;
};
// 16-bit flash device at LocalPlus Bus CS0
- flash@0,0 {
+ flash@0 {
compatible = "cfi-flash";
reg = <0 0 0x01000000>;
bank-width = <2>;
diff --git a/arch/powerpc/boot/dts/mpc5200b.dtsi b/arch/powerpc/boot/dts/mpc5200b.dtsi
index ffa82c7e1055..5083661bce40 100644
--- a/arch/powerpc/boot/dts/mpc5200b.dtsi
+++ b/arch/powerpc/boot/dts/mpc5200b.dtsi
@@ -281,7 +281,7 @@
<0x01000000 0 0x00000000 0xa0000000 0 0x01000000>;
};
- localbus: localbus {
+ localbus: localbus@80000000 {
compatible = "fsl,mpc5200b-lpb","fsl,mpc5200-lpb","simple-bus";
#address-cells = <2>;
#size-cells = <1>;
diff --git a/arch/powerpc/boot/dts/mucmc52.dts b/arch/powerpc/boot/dts/mucmc52.dts
index e88a7bd4034d..0bf4f1a5bb19 100644
--- a/arch/powerpc/boot/dts/mucmc52.dts
+++ b/arch/powerpc/boot/dts/mucmc52.dts
@@ -111,12 +111,14 @@
<0x01000000 0 0x00000000 0xa0000000 0 0x01000000>;
};
- localbus {
- ranges = <0 0 0xff800000 0x00800000
- 1 0 0x80000000 0x00800000
- 3 0 0x80000000 0x00800000>;
-
- flash@0,0 {
+ localbus@80000000 {
+ #address-cells = <2>;
+ #size-cells = <1>;
+ ranges = <0 0 0xff800000 0x00800000>,
+ <1 0 0x80000000 0x00800000>,
+ <3 0 0x80000000 0x00800000>;
+
+ flash@0 {
compatible = "cfi-flash";
reg = <0 0 0x00800000>;
bank-width = <4>;
@@ -157,61 +159,61 @@
};
};
- simple100: gpio-controller-100@3,600100 {
+ simple100: gpio-controller-100@300600100 {
compatible = "manroland,mucmc52-aux-gpio";
reg = <3 0x00600100 0x1>;
gpio-controller;
#gpio-cells = <2>;
};
- simple104: gpio-controller-104@3,600104 {
+ simple104: gpio-controller-104@300600104 {
compatible = "manroland,mucmc52-aux-gpio";
reg = <3 0x00600104 0x1>;
gpio-controller;
#gpio-cells = <2>;
};
- simple200: gpio-controller-200@3,600200 {
+ simple200: gpio-controller-200@300600200 {
compatible = "manroland,mucmc52-aux-gpio";
reg = <3 0x00600200 0x1>;
gpio-controller;
#gpio-cells = <2>;
};
- simple201: gpio-controller-201@3,600201 {
+ simple201: gpio-controller-201@300600201 {
compatible = "manroland,mucmc52-aux-gpio";
reg = <3 0x00600201 0x1>;
gpio-controller;
#gpio-cells = <2>;
};
- simple202: gpio-controller-202@3,600202 {
+ simple202: gpio-controller-202@300600202 {
compatible = "manroland,mucmc52-aux-gpio";
reg = <3 0x00600202 0x1>;
gpio-controller;
#gpio-cells = <2>;
};
- simple203: gpio-controller-203@3,600203 {
+ simple203: gpio-controller-203@300600203 {
compatible = "manroland,mucmc52-aux-gpio";
reg = <3 0x00600203 0x1>;
gpio-controller;
#gpio-cells = <2>;
};
- simple204: gpio-controller-204@3,600204 {
+ simple204: gpio-controller-204@300600204 {
compatible = "manroland,mucmc52-aux-gpio";
reg = <3 0x00600204 0x1>;
gpio-controller;
#gpio-cells = <2>;
};
- simple206: gpio-controller-206@3,600206 {
+ simple206: gpio-controller-206@300600206 {
compatible = "manroland,mucmc52-aux-gpio";
reg = <3 0x00600206 0x1>;
gpio-controller;
#gpio-cells = <2>;
};
- simple207: gpio-controller-207@3,600207 {
+ simple207: gpio-controller-207@300600207 {
compatible = "manroland,mucmc52-aux-gpio";
reg = <3 0x00600207 0x1>;
gpio-controller;
#gpio-cells = <2>;
};
- simple20f: gpio-controller-20f@3,60020f {
+ simple20f: gpio-controller-20f@30060020f {
compatible = "manroland,mucmc52-aux-gpio";
reg = <3 0x0060020f 0x1>;
gpio-controller;
diff --git a/arch/powerpc/boot/dts/o2d.dts b/arch/powerpc/boot/dts/o2d.dts
index e0a8d3034417..fc7e8b46f058 100644
--- a/arch/powerpc/boot/dts/o2d.dts
+++ b/arch/powerpc/boot/dts/o2d.dts
@@ -16,11 +16,13 @@
reg = <0x00000000 0x08000000>; // 128MB
};
- localbus {
- ranges = <0 0 0xfc000000 0x02000000
- 3 0 0xe3000000 0x00100000>;
+ localbus@80000000 {
+ #address-cells = <2>;
+ #size-cells = <1>;
+ ranges = <0 0 0xfc000000 0x02000000>,
+ <3 0 0xe3000000 0x00100000>;
- flash@0,0 {
+ flash@0 {
compatible = "cfi-flash";
reg = <0 0 0x02000000>;
bank-width = <2>;
diff --git a/arch/powerpc/boot/dts/o2d.dtsi b/arch/powerpc/boot/dts/o2d.dtsi
index b55a9e5bd828..898fe08a9fd0 100644
--- a/arch/powerpc/boot/dts/o2d.dtsi
+++ b/arch/powerpc/boot/dts/o2d.dtsi
@@ -73,12 +73,14 @@
};
};
- localbus {
- ranges = <0 0 0xff000000 0x01000000
- 3 0 0xe3000000 0x00100000>;
+ localbus@80000000 {
+ #address-cells = <2>;
+ #size-cells = <1>;
+ ranges = <0 0 0xff000000 0x01000000>,
+ <3 0 0xe3000000 0x00100000>;
// flash device at LocalPlus Bus CS0
- flash@0,0 {
+ flash@0 {
compatible = "cfi-flash";
reg = <0 0 0x01000000>;
bank-width = <1>;
@@ -100,7 +102,7 @@
};
};
- csi@3,0 {
+ csi@300000000 {
compatible = "ifm,o2d-csi";
reg = <3 0 0x00100000>;
ifm,csi-clk-handle = <&gpt7>;
diff --git a/arch/powerpc/boot/dts/o2d300.dts b/arch/powerpc/boot/dts/o2d300.dts
index 55a25b700bed..f0faa73b786c 100644
--- a/arch/powerpc/boot/dts/o2d300.dts
+++ b/arch/powerpc/boot/dts/o2d300.dts
@@ -12,10 +12,12 @@
model = "ifm,o2d300";
compatible = "ifm,o2d";
- localbus {
- ranges = <0 0 0xfc000000 0x02000000
- 3 0 0xe3000000 0x00100000>;
- flash@0,0 {
+ localbus@80000000 {
+ #address-cells = <2>;
+ #size-cells = <1>;
+ ranges = <0 0 0xfc000000 0x02000000>,
+ <3 0 0xe3000000 0x00100000>;
+ flash@0 {
compatible = "cfi-flash";
reg = <0 0 0x02000000>;
bank-width = <2>;
diff --git a/arch/powerpc/boot/dts/o2dnt2.dts b/arch/powerpc/boot/dts/o2dnt2.dts
index c2eedbd1f5fc..ba2556fc227e 100644
--- a/arch/powerpc/boot/dts/o2dnt2.dts
+++ b/arch/powerpc/boot/dts/o2dnt2.dts
@@ -16,11 +16,13 @@
reg = <0x00000000 0x08000000>; // 128MB
};
- localbus {
- ranges = <0 0 0xfc000000 0x02000000
- 3 0 0xe3000000 0x00100000>;
+ localbus@80000000 {
+ #address-cells = <2>;
+ #size-cells = <1>;
+ ranges = <0 0 0xfc000000 0x02000000>,
+ <3 0 0xe3000000 0x00100000>;
- flash@0,0 {
+ flash@0 {
compatible = "cfi-flash";
reg = <0 0 0x02000000>;
bank-width = <2>;
diff --git a/arch/powerpc/boot/dts/o2i.dts b/arch/powerpc/boot/dts/o2i.dts
index 3fb2e0ad7387..971be0d3b18e 100644
--- a/arch/powerpc/boot/dts/o2i.dts
+++ b/arch/powerpc/boot/dts/o2i.dts
@@ -12,8 +12,8 @@
model = "ifm,o2i";
compatible = "ifm,o2d";
- localbus {
- flash@0,0 {
+ localbus@80000000 {
+ flash@0 {
partition@60000 {
label = "kernel";
reg = <0x00060000 0x00260000>;
diff --git a/arch/powerpc/boot/dts/o2mnt.dts b/arch/powerpc/boot/dts/o2mnt.dts
index c5e0ba6e8f2b..42056a8fe35c 100644
--- a/arch/powerpc/boot/dts/o2mnt.dts
+++ b/arch/powerpc/boot/dts/o2mnt.dts
@@ -12,8 +12,8 @@
model = "ifm,o2mnt";
compatible = "ifm,o2d";
- localbus {
- flash@0,0 {
+ localbus@80000000 {
+ flash@0 {
partition@60000 {
label = "kernel";
reg = <0x00060000 0x00260000>;
diff --git a/arch/powerpc/boot/dts/o3dnt.dts b/arch/powerpc/boot/dts/o3dnt.dts
index e4c1bdd41271..7cfcc0a9c89b 100644
--- a/arch/powerpc/boot/dts/o3dnt.dts
+++ b/arch/powerpc/boot/dts/o3dnt.dts
@@ -16,11 +16,13 @@
reg = <0x00000000 0x04000000>; // 64MB
};
- localbus {
- ranges = <0 0 0xfc000000 0x01000000
- 3 0 0xe3000000 0x00100000>;
+ localbus@80000000 {
+ #address-cells = <2>;
+ #size-cells = <1>;
+ ranges = <0 0 0xfc000000 0x01000000>,
+ <3 0 0xe3000000 0x00100000>;
- flash@0,0 {
+ flash@0 {
compatible = "cfi-flash";
reg = <0 0 0x01000000>;
bank-width = <2>;
diff --git a/arch/powerpc/boot/dts/pcm030.dts b/arch/powerpc/boot/dts/pcm030.dts
index 5cee474dcc4c..a4146b616b03 100644
--- a/arch/powerpc/boot/dts/pcm030.dts
+++ b/arch/powerpc/boot/dts/pcm030.dts
@@ -95,7 +95,7 @@
<0x01000000 0 0x00000000 0xb0000000 0 0x01000000>;
};
- localbus {
+ localbus@80000000 {
status = "disabled";
};
diff --git a/arch/powerpc/boot/dts/pcm032.dts b/arch/powerpc/boot/dts/pcm032.dts
index d00f13b62510..ea36ef5cdd02 100644
--- a/arch/powerpc/boot/dts/pcm032.dts
+++ b/arch/powerpc/boot/dts/pcm032.dts
@@ -92,17 +92,19 @@
<0x01000000 0 0x00000000 0xb0000000 0 0x01000000>;
};
- localbus {
- ranges = <0 0 0xfe000000 0x02000000
- 1 0 0xfc000000 0x02000000
- 2 0 0xfbe00000 0x00200000
- 3 0 0xf9e00000 0x02000000
- 4 0 0xf7e00000 0x02000000
- 5 0 0xe6000000 0x02000000
- 6 0 0xe8000000 0x02000000
- 7 0 0xea000000 0x02000000>;
-
- flash@0,0 {
+ localbus@80000000 {
+ #address-cells = <2>;
+ #size-cells = <1>;
+ ranges = <0 0 0xfe000000 0x02000000>,
+ <1 0 0xfc000000 0x02000000>,
+ <2 0 0xfbe00000 0x00200000>,
+ <3 0 0xf9e00000 0x02000000>,
+ <4 0 0xf7e00000 0x02000000>,
+ <5 0 0xe6000000 0x02000000>,
+ <6 0 0xe8000000 0x02000000>,
+ <7 0 0xea000000 0x02000000>;
+
+ flash@0 {
compatible = "cfi-flash";
reg = <0 0 0x02000000>;
bank-width = <4>;
@@ -139,7 +141,7 @@
};
};
- sram@2,0 {
+ sram@200000000 {
compatible = "mtd-ram";
reg = <2 0 0x00200000>;
bank-width = <2>;
diff --git a/arch/powerpc/boot/dts/tqm5200.dts b/arch/powerpc/boot/dts/tqm5200.dts
index 372177b19e60..24e97056b8e3 100644
--- a/arch/powerpc/boot/dts/tqm5200.dts
+++ b/arch/powerpc/boot/dts/tqm5200.dts
@@ -169,13 +169,13 @@
};
};
- localbus {
+ localbus@80000000 {
compatible = "fsl,mpc5200-lpb","simple-bus";
#address-cells = <2>;
#size-cells = <1>;
ranges = <0 0 0xfc000000 0x02000000>;
- flash@0,0 {
+ flash@0 {
compatible = "cfi-flash";
reg = <0 0 0x02000000>;
bank-width = <4>;
diff --git a/arch/powerpc/boot/dts/uc101.dts b/arch/powerpc/boot/dts/uc101.dts
index 2e34d019178b..c752712bcdbb 100644
--- a/arch/powerpc/boot/dts/uc101.dts
+++ b/arch/powerpc/boot/dts/uc101.dts
@@ -101,12 +101,14 @@
status = "disabled";
};
- localbus {
- ranges = <0 0 0xff800000 0x00800000
- 1 0 0x80000000 0x00800000
- 3 0 0x80000000 0x00800000>;
-
- flash@0,0 {
+ localbus@80000000 {
+ #address-cells = <2>;
+ #size-cells = <1>;
+ ranges = <0 0 0xff800000 0x00800000>,
+ <1 0 0x80000000 0x00800000>,
+ <3 0 0x80000000 0x00800000>;
+
+ flash@0 {
compatible = "cfi-flash";
reg = <0 0 0x00800000>;
bank-width = <2>;
--
2.17.1
^ permalink raw reply related
* [PATCH 3/4] powerpc/5200: dts: fix memory node unit name
From: Anatolij Gustschin @ 2021-10-13 22:05 UTC (permalink / raw)
To: linuxppc-dev
Cc: devicetree, Stephen Rothwell, linux-kernel, Rob Herring,
Paul Mackerras
In-Reply-To: <20211013220532.24759-1-agust@denx.de>
Fixes build warnings:
Warning (unit_address_vs_reg): /memory: node has a reg or ranges property, but no unit name
Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
arch/powerpc/boot/dts/charon.dts | 2 +-
arch/powerpc/boot/dts/digsy_mtc.dts | 2 +-
arch/powerpc/boot/dts/lite5200.dts | 2 +-
arch/powerpc/boot/dts/lite5200b.dts | 2 +-
arch/powerpc/boot/dts/media5200.dts | 2 +-
arch/powerpc/boot/dts/mpc5200b.dtsi | 2 +-
arch/powerpc/boot/dts/o2d.dts | 2 +-
arch/powerpc/boot/dts/o2d.dtsi | 2 +-
arch/powerpc/boot/dts/o2dnt2.dts | 2 +-
arch/powerpc/boot/dts/o3dnt.dts | 2 +-
arch/powerpc/boot/dts/pcm032.dts | 2 +-
arch/powerpc/boot/dts/tqm5200.dts | 2 +-
12 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/arch/powerpc/boot/dts/charon.dts b/arch/powerpc/boot/dts/charon.dts
index 6f9fe88a5f36..ea6e76ae2545 100644
--- a/arch/powerpc/boot/dts/charon.dts
+++ b/arch/powerpc/boot/dts/charon.dts
@@ -35,7 +35,7 @@
};
};
- memory {
+ memory@0 {
device_type = "memory";
reg = <0x00000000 0x08000000>; // 128MB
};
diff --git a/arch/powerpc/boot/dts/digsy_mtc.dts b/arch/powerpc/boot/dts/digsy_mtc.dts
index 010156649bfe..57024a4c1e7d 100644
--- a/arch/powerpc/boot/dts/digsy_mtc.dts
+++ b/arch/powerpc/boot/dts/digsy_mtc.dts
@@ -16,7 +16,7 @@
model = "intercontrol,digsy-mtc";
compatible = "intercontrol,digsy-mtc";
- memory {
+ memory@0 {
reg = <0x00000000 0x02000000>; // 32MB
};
diff --git a/arch/powerpc/boot/dts/lite5200.dts b/arch/powerpc/boot/dts/lite5200.dts
index 84a12e7915e9..b9d8487813b4 100644
--- a/arch/powerpc/boot/dts/lite5200.dts
+++ b/arch/powerpc/boot/dts/lite5200.dts
@@ -32,7 +32,7 @@
};
};
- memory {
+ memory@0 {
device_type = "memory";
reg = <0x00000000 0x04000000>; // 64MB
};
diff --git a/arch/powerpc/boot/dts/lite5200b.dts b/arch/powerpc/boot/dts/lite5200b.dts
index c361c59a9681..7e2d91c7cb66 100644
--- a/arch/powerpc/boot/dts/lite5200b.dts
+++ b/arch/powerpc/boot/dts/lite5200b.dts
@@ -31,7 +31,7 @@
led4 { gpios = <&gpio_simple 2 1>; };
};
- memory {
+ memory@0 {
reg = <0x00000000 0x10000000>; // 256MB
};
diff --git a/arch/powerpc/boot/dts/media5200.dts b/arch/powerpc/boot/dts/media5200.dts
index f7d7538eb69d..96524ede16cd 100644
--- a/arch/powerpc/boot/dts/media5200.dts
+++ b/arch/powerpc/boot/dts/media5200.dts
@@ -32,7 +32,7 @@
};
};
- memory {
+ memory@0 {
reg = <0x00000000 0x08000000>; // 128MB RAM
};
diff --git a/arch/powerpc/boot/dts/mpc5200b.dtsi b/arch/powerpc/boot/dts/mpc5200b.dtsi
index 8c645d2bc455..ffa82c7e1055 100644
--- a/arch/powerpc/boot/dts/mpc5200b.dtsi
+++ b/arch/powerpc/boot/dts/mpc5200b.dtsi
@@ -33,7 +33,7 @@
};
};
- memory: memory {
+ memory: memory@0 {
device_type = "memory";
reg = <0x00000000 0x04000000>; // 64MB
};
diff --git a/arch/powerpc/boot/dts/o2d.dts b/arch/powerpc/boot/dts/o2d.dts
index 24a46f65e529..e0a8d3034417 100644
--- a/arch/powerpc/boot/dts/o2d.dts
+++ b/arch/powerpc/boot/dts/o2d.dts
@@ -12,7 +12,7 @@
model = "ifm,o2d";
compatible = "ifm,o2d";
- memory {
+ memory@0 {
reg = <0x00000000 0x08000000>; // 128MB
};
diff --git a/arch/powerpc/boot/dts/o2d.dtsi b/arch/powerpc/boot/dts/o2d.dtsi
index 6661955a2be4..b55a9e5bd828 100644
--- a/arch/powerpc/boot/dts/o2d.dtsi
+++ b/arch/powerpc/boot/dts/o2d.dtsi
@@ -19,7 +19,7 @@
model = "ifm,o2d";
compatible = "ifm,o2d";
- memory {
+ memory@0 {
reg = <0x00000000 0x04000000>; // 64MB
};
diff --git a/arch/powerpc/boot/dts/o2dnt2.dts b/arch/powerpc/boot/dts/o2dnt2.dts
index eeba7f5507d5..c2eedbd1f5fc 100644
--- a/arch/powerpc/boot/dts/o2dnt2.dts
+++ b/arch/powerpc/boot/dts/o2dnt2.dts
@@ -12,7 +12,7 @@
model = "ifm,o2dnt2";
compatible = "ifm,o2d";
- memory {
+ memory@0 {
reg = <0x00000000 0x08000000>; // 128MB
};
diff --git a/arch/powerpc/boot/dts/o3dnt.dts b/arch/powerpc/boot/dts/o3dnt.dts
index fd00396b0593..e4c1bdd41271 100644
--- a/arch/powerpc/boot/dts/o3dnt.dts
+++ b/arch/powerpc/boot/dts/o3dnt.dts
@@ -12,7 +12,7 @@
model = "ifm,o3dnt";
compatible = "ifm,o2d";
- memory {
+ memory@0 {
reg = <0x00000000 0x04000000>; // 64MB
};
diff --git a/arch/powerpc/boot/dts/pcm032.dts b/arch/powerpc/boot/dts/pcm032.dts
index b6fdf861c7d6..d00f13b62510 100644
--- a/arch/powerpc/boot/dts/pcm032.dts
+++ b/arch/powerpc/boot/dts/pcm032.dts
@@ -20,7 +20,7 @@
model = "phytec,pcm032";
compatible = "phytec,pcm032";
- memory {
+ memory@0 {
reg = <0x00000000 0x08000000>; // 128MB
};
diff --git a/arch/powerpc/boot/dts/tqm5200.dts b/arch/powerpc/boot/dts/tqm5200.dts
index 40b139d92a19..372177b19e60 100644
--- a/arch/powerpc/boot/dts/tqm5200.dts
+++ b/arch/powerpc/boot/dts/tqm5200.dts
@@ -32,7 +32,7 @@
};
};
- memory {
+ memory@0 {
device_type = "memory";
reg = <0x00000000 0x04000000>; // 64MB
};
--
2.17.1
^ permalink raw reply related
* [PATCH 0/4] Update mpc5200 dts files to fix warnings
From: Anatolij Gustschin @ 2021-10-13 22:05 UTC (permalink / raw)
To: linuxppc-dev
Cc: devicetree, Stephen Rothwell, linux-kernel, Rob Herring,
Paul Mackerras
This series fixes localbus, memory and pci node build warnings.
It was tested with current linux-next on digsy_mtc and tqm5200
boards.
Anatolij Gustschin (4):
powerpc/5200: dts: add missing pci ranges
powerpc/5200: dts: fix pci ranges warnings
powerpc/5200: dts: fix memory node unit name
powerpc/5200: dts: fix localbus node warnings
arch/powerpc/boot/dts/a3m071.dts | 12 ++++-----
arch/powerpc/boot/dts/a4m072.dts | 26 ++++++++++----------
arch/powerpc/boot/dts/charon.dts | 22 ++++++++---------
arch/powerpc/boot/dts/cm5200.dts | 7 ++++--
arch/powerpc/boot/dts/digsy_mtc.dts | 24 +++++++++---------
arch/powerpc/boot/dts/lite5200.dts | 12 ++++-----
arch/powerpc/boot/dts/lite5200b.dts | 14 ++++++-----
arch/powerpc/boot/dts/media5200.dts | 28 +++++++++++----------
arch/powerpc/boot/dts/motionpro.dts | 32 +++++++++++++-----------
arch/powerpc/boot/dts/mpc5200b.dtsi | 8 +++---
arch/powerpc/boot/dts/mucmc52.dts | 38 +++++++++++++++--------------
arch/powerpc/boot/dts/o2d.dts | 12 +++++----
arch/powerpc/boot/dts/o2d.dtsi | 14 ++++++-----
arch/powerpc/boot/dts/o2d300.dts | 10 +++++---
arch/powerpc/boot/dts/o2dnt2.dts | 12 +++++----
arch/powerpc/boot/dts/o2i.dts | 4 +--
arch/powerpc/boot/dts/o2mnt.dts | 4 +--
arch/powerpc/boot/dts/o3dnt.dts | 12 +++++----
arch/powerpc/boot/dts/pcm030.dts | 8 +++---
arch/powerpc/boot/dts/pcm032.dts | 34 ++++++++++++++------------
arch/powerpc/boot/dts/tqm5200.dts | 12 ++++-----
arch/powerpc/boot/dts/uc101.dts | 14 ++++++-----
22 files changed, 195 insertions(+), 164 deletions(-)
--
2.17.1
^ permalink raw reply
* [PATCH 2/4] powerpc/5200: dts: fix pci ranges warnings
From: Anatolij Gustschin @ 2021-10-13 22:05 UTC (permalink / raw)
To: linuxppc-dev
Cc: devicetree, Stephen Rothwell, linux-kernel, Rob Herring,
Paul Mackerras
In-Reply-To: <20211013220532.24759-1-agust@denx.de>
Fix ranges property warnings:
pci@f0000d00:ranges: 'oneOf' conditional failed, one must be fixed:
Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
arch/powerpc/boot/dts/a4m072.dts | 6 +++---
arch/powerpc/boot/dts/charon.dts | 6 +++---
arch/powerpc/boot/dts/digsy_mtc.dts | 6 +++---
arch/powerpc/boot/dts/lite5200.dts | 6 +++---
arch/powerpc/boot/dts/lite5200b.dts | 6 +++---
arch/powerpc/boot/dts/media5200.dts | 6 +++---
arch/powerpc/boot/dts/mucmc52.dts | 6 +++---
arch/powerpc/boot/dts/pcm030.dts | 6 +++---
arch/powerpc/boot/dts/pcm032.dts | 6 +++---
arch/powerpc/boot/dts/tqm5200.dts | 6 +++---
10 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/arch/powerpc/boot/dts/a4m072.dts b/arch/powerpc/boot/dts/a4m072.dts
index a9cef5726422..d4270a2ec6c7 100644
--- a/arch/powerpc/boot/dts/a4m072.dts
+++ b/arch/powerpc/boot/dts/a4m072.dts
@@ -140,8 +140,8 @@
clock-frequency = <0>; /* From boot loader */
interrupts = <2 8 0 2 9 0 2 10 0>;
bus-range = <0 0>;
- ranges = <0x42000000 0 0x80000000 0x80000000 0 0x10000000
- 0x02000000 0 0x90000000 0x90000000 0 0x10000000
- 0x01000000 0 0x00000000 0xa0000000 0 0x01000000>;
+ ranges = <0x42000000 0 0x80000000 0x80000000 0 0x10000000>,
+ <0x02000000 0 0x90000000 0x90000000 0 0x10000000>,
+ <0x01000000 0 0x00000000 0xa0000000 0 0x01000000>;
};
};
diff --git a/arch/powerpc/boot/dts/charon.dts b/arch/powerpc/boot/dts/charon.dts
index 408b486b13df..6f9fe88a5f36 100644
--- a/arch/powerpc/boot/dts/charon.dts
+++ b/arch/powerpc/boot/dts/charon.dts
@@ -225,8 +225,8 @@
clock-frequency = <0>; // From boot loader
interrupts = <2 8 0 2 9 0 2 10 0>;
bus-range = <0 0>;
- ranges = <0x42000000 0 0x80000000 0x80000000 0 0x10000000
- 0x02000000 0 0x90000000 0x90000000 0 0x10000000
- 0x01000000 0 0x00000000 0xa0000000 0 0x01000000>;
+ ranges = <0x42000000 0 0x80000000 0x80000000 0 0x10000000>,
+ <0x02000000 0 0x90000000 0x90000000 0 0x10000000>,
+ <0x01000000 0 0x00000000 0xa0000000 0 0x01000000>;
};
};
diff --git a/arch/powerpc/boot/dts/digsy_mtc.dts b/arch/powerpc/boot/dts/digsy_mtc.dts
index 0e5e9d3acf79..010156649bfe 100644
--- a/arch/powerpc/boot/dts/digsy_mtc.dts
+++ b/arch/powerpc/boot/dts/digsy_mtc.dts
@@ -98,9 +98,9 @@
clock-frequency = <0>; // From boot loader
interrupts = <2 8 0 2 9 0 2 10 0>;
bus-range = <0 0>;
- ranges = <0x42000000 0 0x80000000 0x80000000 0 0x10000000
- 0x02000000 0 0x90000000 0x90000000 0 0x10000000
- 0x01000000 0 0x00000000 0xa0000000 0 0x01000000>;
+ ranges = <0x42000000 0 0x80000000 0x80000000 0 0x10000000>,
+ <0x02000000 0 0x90000000 0x90000000 0 0x10000000>,
+ <0x01000000 0 0x00000000 0xa0000000 0 0x01000000>;
};
localbus {
diff --git a/arch/powerpc/boot/dts/lite5200.dts b/arch/powerpc/boot/dts/lite5200.dts
index cb2782dd6132..84a12e7915e9 100644
--- a/arch/powerpc/boot/dts/lite5200.dts
+++ b/arch/powerpc/boot/dts/lite5200.dts
@@ -283,9 +283,9 @@
clock-frequency = <0>; // From boot loader
interrupts = <2 8 0 2 9 0 2 10 0>;
bus-range = <0 0>;
- ranges = <0x42000000 0 0x80000000 0x80000000 0 0x20000000
- 0x02000000 0 0xa0000000 0xa0000000 0 0x10000000
- 0x01000000 0 0x00000000 0xb0000000 0 0x01000000>;
+ ranges = <0x42000000 0 0x80000000 0x80000000 0 0x20000000>,
+ <0x02000000 0 0xa0000000 0xa0000000 0 0x10000000>,
+ <0x01000000 0 0x00000000 0xb0000000 0 0x01000000>;
};
localbus {
diff --git a/arch/powerpc/boot/dts/lite5200b.dts b/arch/powerpc/boot/dts/lite5200b.dts
index 2b86c81f9048..c361c59a9681 100644
--- a/arch/powerpc/boot/dts/lite5200b.dts
+++ b/arch/powerpc/boot/dts/lite5200b.dts
@@ -116,9 +116,9 @@
clock-frequency = <0>; // From boot loader
interrupts = <2 8 0 2 9 0 2 10 0>;
bus-range = <0 0>;
- ranges = <0x42000000 0 0x80000000 0x80000000 0 0x20000000
- 0x02000000 0 0xa0000000 0xa0000000 0 0x10000000
- 0x01000000 0 0x00000000 0xb0000000 0 0x01000000>;
+ ranges = <0x42000000 0 0x80000000 0x80000000 0 0x20000000>,
+ <0x02000000 0 0xa0000000 0xa0000000 0 0x10000000>,
+ <0x01000000 0 0x00000000 0xb0000000 0 0x01000000>;
};
localbus {
diff --git a/arch/powerpc/boot/dts/media5200.dts b/arch/powerpc/boot/dts/media5200.dts
index 61cae9dcddef..f7d7538eb69d 100644
--- a/arch/powerpc/boot/dts/media5200.dts
+++ b/arch/powerpc/boot/dts/media5200.dts
@@ -96,9 +96,9 @@
0xe000 0 0 1 &media5200_fpga 0 5 // CoralIP
>;
- ranges = <0x42000000 0 0x80000000 0x80000000 0 0x20000000
- 0x02000000 0 0xa0000000 0xa0000000 0 0x10000000
- 0x01000000 0 0x00000000 0xb0000000 0 0x01000000>;
+ ranges = <0x42000000 0 0x80000000 0x80000000 0 0x20000000>,
+ <0x02000000 0 0xa0000000 0xa0000000 0 0x10000000>,
+ <0x01000000 0 0x00000000 0xb0000000 0 0x01000000>;
interrupt-parent = <&mpc5200_pic>;
};
diff --git a/arch/powerpc/boot/dts/mucmc52.dts b/arch/powerpc/boot/dts/mucmc52.dts
index c6c66306308d..e88a7bd4034d 100644
--- a/arch/powerpc/boot/dts/mucmc52.dts
+++ b/arch/powerpc/boot/dts/mucmc52.dts
@@ -106,9 +106,9 @@
0x8000 0 0 3 &mpc5200_pic 0 2 3
0x8000 0 0 4 &mpc5200_pic 0 1 3
>;
- ranges = <0x42000000 0 0x60000000 0x60000000 0 0x10000000
- 0x02000000 0 0x90000000 0x90000000 0 0x10000000
- 0x01000000 0 0x00000000 0xa0000000 0 0x01000000>;
+ ranges = <0x42000000 0 0x60000000 0x60000000 0 0x10000000>,
+ <0x02000000 0 0x90000000 0x90000000 0 0x10000000>,
+ <0x01000000 0 0x00000000 0xa0000000 0 0x01000000>;
};
localbus {
diff --git a/arch/powerpc/boot/dts/pcm030.dts b/arch/powerpc/boot/dts/pcm030.dts
index b1bc731f7afd..5cee474dcc4c 100644
--- a/arch/powerpc/boot/dts/pcm030.dts
+++ b/arch/powerpc/boot/dts/pcm030.dts
@@ -90,9 +90,9 @@
0xc800 0 0 2 &mpc5200_pic 1 2 3
0xc800 0 0 3 &mpc5200_pic 1 3 3
0xc800 0 0 4 &mpc5200_pic 0 0 3>;
- ranges = <0x42000000 0 0x80000000 0x80000000 0 0x20000000
- 0x02000000 0 0xa0000000 0xa0000000 0 0x10000000
- 0x01000000 0 0x00000000 0xb0000000 0 0x01000000>;
+ ranges = <0x42000000 0 0x80000000 0x80000000 0 0x20000000>,
+ <0x02000000 0 0xa0000000 0xa0000000 0 0x10000000>,
+ <0x01000000 0 0x00000000 0xb0000000 0 0x01000000>;
};
localbus {
diff --git a/arch/powerpc/boot/dts/pcm032.dts b/arch/powerpc/boot/dts/pcm032.dts
index 780e13d99e7b..b6fdf861c7d6 100644
--- a/arch/powerpc/boot/dts/pcm032.dts
+++ b/arch/powerpc/boot/dts/pcm032.dts
@@ -87,9 +87,9 @@
0xc800 0 0 2 &mpc5200_pic 1 2 3
0xc800 0 0 3 &mpc5200_pic 1 3 3
0xc800 0 0 4 &mpc5200_pic 0 0 3>;
- ranges = <0x42000000 0 0x80000000 0x80000000 0 0x20000000
- 0x02000000 0 0xa0000000 0xa0000000 0 0x10000000
- 0x01000000 0 0x00000000 0xb0000000 0 0x01000000>;
+ ranges = <0x42000000 0 0x80000000 0x80000000 0 0x20000000>,
+ <0x02000000 0 0xa0000000 0xa0000000 0 0x10000000>,
+ <0x01000000 0 0x00000000 0xb0000000 0 0x01000000>;
};
localbus {
diff --git a/arch/powerpc/boot/dts/tqm5200.dts b/arch/powerpc/boot/dts/tqm5200.dts
index 9ed0bc78967e..40b139d92a19 100644
--- a/arch/powerpc/boot/dts/tqm5200.dts
+++ b/arch/powerpc/boot/dts/tqm5200.dts
@@ -200,8 +200,8 @@
clock-frequency = <0>; // From boot loader
interrupts = <2 8 0 2 9 0 2 10 0>;
bus-range = <0 0>;
- ranges = <0x42000000 0 0x80000000 0x80000000 0 0x10000000
- 0x02000000 0 0x90000000 0x90000000 0 0x10000000
- 0x01000000 0 0x00000000 0xa0000000 0 0x01000000>;
+ ranges = <0x42000000 0 0x80000000 0x80000000 0 0x10000000>,
+ <0x02000000 0 0x90000000 0x90000000 0 0x10000000>,
+ <0x01000000 0 0x00000000 0xa0000000 0 0x01000000>;
};
};
--
2.17.1
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox