[PATCH v1 16/19] powerpc/nohash: Refactor ptep_test_and_clear_young()

2023-09-11 Thread Christophe Leroy
Remove ptep_test_and_clear_young() macro, make __ptep_test_and_clear_young() common to nohash/32 and nohash/64 and change it to become ptep_test_and_clear_young() Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/32/pgtable.h | 11 --- arch/powerpc/include/asm/nohash

[PATCH v1 03/19] powerpc/40x: Remove stale PTE_ATOMIC_UPDATES macro

2023-09-11 Thread Christophe Leroy
S. Remove left over PTE_ATOMIC_UPDATES macro. Fixes: 2c74e2586bb9 ("powerpc/40x: Rework 40x PTE access and TLB miss") Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/32/pte-40x.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/powerpc/include/asm/nohash/32/pte-40x

[PATCH v1 14/19] powerpc/nohash: Deduplicate _PAGE_CHG_MASK

2023-09-11 Thread Christophe Leroy
_PAGE_CHG_MASK is identical between nohash/32 and nohash/64, deduplicate it. While at it, clean the #ifdef for PTE_RPN_MASK in nohash/32 as it is already CONFIG_PPC32. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/32/pgtable.h | 8 +--- arch/powerpc/include/asm/nohash

[PATCH v1 15/19] powerpc/nohash: Deduplicate pte helpers

2023-09-11 Thread Christophe Leroy
Deduplicate following helpers that are identical on nohash/32 and nohash/64: pte_mkwrite_novma() pte_mkdirty() pte_mkyoung() pte_wrprotect() pte_mkexec() pte_young() Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/32/pgtable.h | 36 arch

[PATCH v1 08/19] powerpc/nohash: Remove {pte/pmd}_protnone()

2023-09-11 Thread Christophe Leroy
Only book3s/64 selects ARCH_SUPPORTS_NUMA_BALANCING so CONFIG_NUMA_BALANCING can't be selected on nohash targets. Remove pte_protnone() and pmd_protnone(). Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/pgtable.h | 17 - 1 file changed, 17 deletions

[PATCH v1 09/19] powerpc/nohash: Refactor declaration of {map/unmap}_kernel_page()

2023-09-11 Thread Christophe Leroy
map_kernel_page() and unmap_kernel_page() have the same prototypes on nohash/32 and nohash/64, keep only one declaration. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/32/pgtable.h | 8 arch/powerpc/include/asm/nohash/64/pgtable.h | 2 -- arch/powerpc/include/asm

[PATCH v1 05/19] powerpc: Deduplicate prototypes of ptep_set_access_flags() and phys_mem_access_prot()

2023-09-11 Thread Christophe Leroy
Prototypes of ptep_set_access_flags() and phys_mem_access_prot() are identical for book3s and nohash. Deduplicate them. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/pgtable.h | 9 - arch/powerpc/include/asm/nohash/pgtable.h | 10 -- arch/powerpc/include

[PATCH v1 11/19] powerpc/nohash: Replace #ifdef CONFIG_44x by IS_ENABLED(CONFIG_44x) in pgtable.h

2023-09-11 Thread Christophe Leroy
No need of a #ifdef, use IS_ENABLED(CONFIG_44x) Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/32/pgtable.h | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/include/asm/nohash/32/pgtable.h b/arch/powerpc/include/asm/nohash/32

[PATCH v1 12/19] powerpc/nohash: Refactor pte_update()

2023-09-11 Thread Christophe Leroy
pte_update() is similar. Take the nohash/32 version which works on nohash/64 and add the debug call to assert_pte_locked() which is only on nohash/64. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/32/pgtable.h | 33 --- arch/powerpc/include/asm/nohash/64

[PATCH v1 00/19] cleanup/refactor pgtable.h

2023-09-11 Thread Christophe Leroy
This series is a cleanup of pgtable.h for nohash mainly Main purpose is to refactor a lot of common code between nohash/32 and nohash/64. This series is a prerequisite for following series that will rework PAGE flags and implement execute-only protection. Christophe Leroy (19): powerpc/8xx

[PATCH v1 18/19] powerpc/nohash: Refactor pte_clear()

2023-09-11 Thread Christophe Leroy
pte_clear() are doing the same on nohash/32 and nohash/64, Keep the static inline version of nohash/64, make it common and remove the macro version of nohash/32. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/32/pgtable.h | 3 --- arch/powerpc/include/asm/nohash/64

Re: [PATCH v3 2/5] fbdev: Replace fb_pgprotect() with fb_pgprot_device()

2023-09-11 Thread Christophe Leroy
Le 11/09/2023 à 15:08, Thomas Zimmermann a écrit : > Rename the fbdev mmap helper fb_pgprotect() to pgprot_framebuffer(). > The helper sets VMA page-access flags for framebuffers in device I/O > memory. > > Also clean up the helper's parameters and return value. Instead of > the VMA instance,

Re: [PATCH 0/2] m68k/powerpc: Kill references to non-existent README.legal

2023-09-07 Thread Christophe Leroy
Le 07/09/2023 à 16:21, Geert Uytterhoeven a écrit : > Hi all, > > Several source files contain license boilerplate that refers to the file > "README.legal", which never existed in upstream Linux. This is a relic > from the early port of Linux to the m68k processor family, before it was >

Re: [PATCH] powerpc/64e: Fix wrong test in __ptep_test_and_clear_young()

2023-09-05 Thread Christophe Leroy
Le 05/09/2023 à 06:46, Christophe Leroy a écrit : > > > Le 05/09/2023 à 04:36, Michael Ellerman a écrit : >> Christophe Leroy writes: >>> Commit 45201c879469 ("powerpc/nohash: Remove hash related code from >>> nohash headers.") replaced: >&

Re: [PATCH] powerpc/64e: Fix wrong test in __ptep_test_and_clear_young()

2023-09-04 Thread Christophe Leroy
Le 05/09/2023 à 04:36, Michael Ellerman a écrit : > Christophe Leroy writes: >> Commit 45201c879469 ("powerpc/nohash: Remove hash related code from >> nohash headers.") replaced: >> >>if ((pte_val(*ptep) & (_PAGE_ACCESSED

Re: [PATCH v4] drivers/net: process the result of hdlc_open() and add call of hdlc_close() in uhdlc_close()

2023-09-04 Thread Christophe Leroy
Le 04/09/2023 à 19:03, Christophe Leroy a écrit : > > > Le 04/09/2023 à 14:31, Alexandra Diupina a écrit : >> Process the result of hdlc_open() and call uhdlc_close() >> in case of an error. It is necessary to pass the error >> code up the control flow, sim

Re: [PATCH v4] drivers/net: process the result of hdlc_open() and add call of hdlc_close() in uhdlc_close()

2023-09-04 Thread Christophe Leroy
> uhdlc_close() function definition before uhdlc_open() > v3: Fix the commits tree > v2: Remove the 'rc' variable (stores the return value of the > hdlc_open()) as Christophe Leroy suggested > drivers/net/wan/fsl_ucc_hdlc.c | 8 +++- > 1 file changed, 7 insertions(+), 1

Re: KASAN debug kernel fails to boot at early stage when CONFIG_SMP=y is set (kernel 6.5-rc5, PowerMac G4 3,6)

2023-09-04 Thread Christophe Leroy
Le 04/09/2023 à 16:48, Christophe Leroy a écrit : > > > Le 03/09/2023 à 23:06, Erhard Furtner a écrit : >> On Fri, 1 Sep 2023 07:43:34 +0000 >> Christophe Leroy wrote: >> >>>>> Can you try what happens when you remove the call to kasan_init() >&g

Re: KASAN debug kernel fails to boot at early stage when CONFIG_SMP=y is set (kernel 6.5-rc5, PowerMac G4 3,6)

2023-09-04 Thread Christophe Leroy
Le 03/09/2023 à 23:06, Erhard Furtner a écrit : > On Fri, 1 Sep 2023 07:43:34 + > Christophe Leroy wrote: > >>>> Can you try what happens when you remove the call to kasan_init() at the >>>> start of setup_arch() in arch/powerpc/kernel/setup-common.c >&g

Re: [PATCH v2 1/3] kconfig: add dependencies of POWER_RESET for mips malta

2023-09-04 Thread Christophe Leroy
Le 04/09/2023 à 12:51, Philippe Mathieu-Daudé a écrit : > On 4/9/23 11:24, Yuan Tan wrote: >> Hi, >> >> On 9/4/2023 3:40 PM, Philippe Mathieu-Daudé wrote: >>> Hi, >>> >>> On 1/9/23 04:42, Yuan Tan wrote: MIPS Malta's power off depends on PCI, PCI_QUIRKS, and POWER_RESET_PIIX4_POWEROFF

[PATCH] powerpc/64e: Fix wrong test in __ptep_test_and_clear_young()

2023-09-02 Thread Christophe Leroy
return 0; Fix it. Fixes: 45201c879469 ("powerpc/nohash: Remove hash related code from nohash headers.") Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/64/pgtable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/nohash/64/p

Re: [PATCH] powerpc/powernv: use appropiate error code

2023-09-01 Thread Christophe Leroy
Le 01/09/2023 à 19:19, mirim...@outlook.com a écrit : > [Vous ne recevez pas souvent de courriers de mirim...@outlook.com. Découvrez > pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ] > > From: Immad Mir > > -1 is not a valid error code. This patch replaces it

Re: KASAN debug kernel fails to boot at early stage when CONFIG_SMP=y is set (kernel 6.5-rc5, PowerMac G4 3,6)

2023-09-01 Thread Christophe Leroy
Le 01/09/2023 à 00:44, Erhard Furtner a écrit : > On Thu, 31 Aug 2023 05:32:46 + > Christophe Leroy wrote: > >> Ok so there is some corrupted memory somewhere. >> >> Can you try what happens when you remove the call to kasan_init() at the >> start of se

Re: [PATCH v2 3/3] kconfig: add dependencies of POWER_RESET for PowerMac

2023-09-01 Thread Christophe Leroy
Le 01/09/2023 à 04:43, Yuan Tan a écrit : > PowerMac's power off depends on ADB_CUDA to work. Enable it when > POWER_RESET is set for convenience. > > Suggested-by: Zhangjin Wu > Signed-off-by: Yuan Tan > --- > arch/powerpc/platforms/powermac/Kconfig | 1 + > 1 file changed, 1 insertion(+)

Re: Framebuffer mmap on PowerPC

2023-08-31 Thread Christophe Leroy
Le 31/08/2023 à 19:38, Christophe Leroy a écrit : > > > Le 31/08/2023 à 16:41, Thomas Zimmermann a écrit : >> Hi, >> >> there's a per-architecture function called fb_pgprotect() that sets >> VMA's vm_page_prot for mmaped framebuffers. Most architectures use

Re: Framebuffer mmap on PowerPC

2023-08-31 Thread Christophe Leroy
Le 31/08/2023 à 16:41, Thomas Zimmermann a écrit : > Hi, > > there's a per-architecture function called fb_pgprotect() that sets > VMA's vm_page_prot for mmaped framebuffers. Most architectures use a > simple implementation based on pgprot_writecomine() [1] or > pgprot_noncached(). [2] > >

Re: KASAN debug kernel fails to boot at early stage when CONFIG_SMP=y is set (kernel 6.5-rc5, PowerMac G4 3,6)

2023-08-30 Thread Christophe Leroy
Le 28/08/2023 à 01:17, Erhard Furtner a écrit : > On Thu, 24 Aug 2023 21:36:26 +1000 > Michael Ellerman wrote: > >>> printk: bootconsole [udbg0] enabled >>> Total memory = 2048MB; using 4096kB for hash table >>> mapin_ram:125 >>> mmu_mapin_ram:169 0 3000 140 200 >>>

Re: [PATCH] macintosh/ams: linux/platform_device.h is needed

2023-08-29 Thread Christophe Leroy
Le 30/08/2023 à 00:58, Randy Dunlap a écrit : > ams.h uses struct platform_device, so the header should be used > to prevent build errors: > > drivers/macintosh/ams/ams-input.c: In function 'ams_input_enable': > drivers/macintosh/ams/ams-input.c:68:45: error: invalid use of undefined type >

Re: [PATCH v3] fsl_ucc_hdlc: process the result of hold_open()

2023-08-28 Thread Christophe Leroy
n for QE-UCC") > Signed-off-by: Alexandra Diupina Reviewed-by: Christophe Leroy > --- > v3: Fix the commits tree > v2: Remove the 'rc' variable (stores the return value of the > hdlc_open()) as Christophe Leroy suggested > drivers/net/wan/fsl_ucc_hdlc.c | 2 +- > 1 file c

Re: [PATCH v2] fsl_ucc_hdlc: add a check of the return value from hdlc_open

2023-08-28 Thread Christophe Leroy
n for QE-UCC") > Signed-off-by: Alexandra Diupina > --- > v2: Remove the 'rc' variable (stores the return value of the > hdlc_open()) as Christophe Leroy suggested > drivers/net/wan/fsl_ucc_hdlc.c | 7 ++- > 1 file changed, 2 insertions(+), 5 deletions(-) I think you

Re: [PATCH] fsl_ucc_hdlc: add a check of the return value from hdlc_open

2023-08-26 Thread Christophe Leroy
Le 25/08/2023 à 16:31, Alexandra Diupina a écrit : > [Vous ne recevez pas souvent de courriers de adiup...@astralinux.ru. > Découvrez pourquoi ceci est important à > https://aka.ms/LearnAboutSenderIdentification ] > > Process the result of hold_open() and return it from > uhdlc_open() in case

Re: [PATCH v3 5/5] powerpc/bpf: use patch_instructions()

2023-08-25 Thread Christophe Leroy
Le 25/08/2023 à 17:18, Hari Bathini a écrit : > Use the newly introduced patch_instructions() that handles patching > multiple instructions with one call. This improves speed of exectution > for JIT'ing bpf programs. > > Without this patch (on a POWER9 lpar): > ># time modprobe test_bpf >

Re: [PATCH v3 2/5] powerpc/bpf: implement bpf_arch_text_invalidate for bpf_prog_pack

2023-08-25 Thread Christophe Leroy
Le 25/08/2023 à 17:18, Hari Bathini a écrit : > Implement bpf_arch_text_invalidate and use it to fill unused part of > the bpf_prog_pack with trap instructions when a BPF program is freed. > > Signed-off-by: Hari Bathini > --- > arch/powerpc/net/bpf_jit_comp.c | 22 +++--- >

Re: [PATCH v3 1/5] powerpc/bpf: implement bpf_arch_text_copy

2023-08-25 Thread Christophe Leroy
Le 25/08/2023 à 17:18, Hari Bathini a écrit : > bpf_arch_text_copy is used to dump JITed binary to RX page, allowing > multiple BPF programs to share the same page. Use patch_instruction() > to implement it. By using patch_instruction() for doing that you are mapping and unmapping the same

[PATCH] powerpc/8xx: Fix pte_access_permitted() for PAGE_NONE

2023-08-25 Thread Christophe Leroy
pc/mm: Introduce _PAGE_NA") Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/32/pte-8xx.h | 7 +++ arch/powerpc/include/asm/nohash/pgtable.h| 2 ++ 2 files changed, 9 insertions(+) diff --git a/arch/powerpc/include/asm/nohash/32/pte-8xx.h b/arch/powerpc/include/asm

Re: [PATCH] kbuild: Show Kconfig fragments in "help"

2023-08-24 Thread Christophe Leroy
Le 25/08/2023 à 00:36, Kees Cook a écrit : > Doing a "make help" would show only hard-coded Kconfig targets and > depended on the archhelp target to include ".config" targets. There was > nothing showing global kernel/configs/ targets. Solve this by walking > the wildcard list and include them

Re: [powerpc:next] BUILD REGRESSION 0f71dcfb4aef6043da6cc509e7a7f6a3ae87c12d

2023-08-24 Thread Christophe Leroy
Le 24/08/2023 à 13:49, kernel test robot a écrit : > tree/branch: > https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next > branch HEAD: 0f71dcfb4aef6043da6cc509e7a7f6a3ae87c12d powerpc/ftrace: Add > support for -fpatchable-function-entry > > Error/Warning reports: > >

[PATCH net-next] kunit: Fix checksum tests on big endian CPUs

2023-08-23 Thread Christophe Leroy
errors and it will naturally work on all endianness. Fixes: 688eb8191b47 ("x86/csum: Improve performance of `csum_partial`") Signed-off-by: Christophe Leroy --- lib/checksum_kunit.c | 54 +++- 1 file changed, 38 insertions(+), 16 deletions(-) diff -

Re: [PATCH] powerpc: Drop zalloc_maybe_bootmem()

2023-08-23 Thread Christophe Leroy
ppc_md.discover_phbs()") > moved the boot-time calls later, after slab setup, meaning there's no > longer any need for zalloc_maybe_bootmem(), kzalloc() can be used in all > cases. > > Signed-off-by: Michael Ellerman Reviewed-by: Christophe Leroy > --- > arch/power

Re: [PATCH rfc v2 05/10] powerpc: mm: use try_vma_locked_page_fault()

2023-08-22 Thread Christophe Leroy
Le 21/08/2023 à 14:30, Kefeng Wang a écrit : > Use new try_vma_locked_page_fault() helper to simplify code. > No functional change intended. Does it really simplifies code ? It's 32 insertions versus 34 deletions so only removing 2 lines. I don't like the struct vm_fault you are adding

Re: KASAN debug kernel fails to boot at early stage when CONFIG_SMP=y is set (kernel 6.5-rc5, PowerMac G4 3,6)

2023-08-22 Thread Christophe Leroy
Le 18/08/2023 à 18:23, Erhard Furtner a écrit : > On Fri, 18 Aug 2023 15:47:38 + > Christophe Leroy wrote: > >> I'm wondering if the problem is just linked to the kernel being built >> with CONFIG_SMP or if it is the actual startup of a secondary CPU that >> cau

[PATCH] powerpc/85xx: Mark some functions static and add missing includes to fix no previous prototype error

2023-08-22 Thread Christophe Leroy
:78:6: error: no previous prototype for 'power4_enable_pmcs' [-Werror=missing-prototypes] 78 | void power4_enable_pmcs(void) | ^~ Signed-off-by: Christophe Leroy Cc: Arnd Bergmann --- arch/powerpc/kernel/pmc.c | 2 +- arch/powerpc/platforms

[PATCH] powerpc/64e: Fix circular dependency with CONFIG_SMP disabled

2023-08-22 Thread Christophe Leroy
: 3a24ea0df83e ("powerpc/kuap: Use ASM feature fixups instead of static branches") Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/mmu.h | 5 - arch/powerpc/include/asm/nohash/mmu-e500.h | 3 +++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --

Re: [PATCH] powerpc/perf: Convert fsl_emb notifier to state machine callbacks

2023-08-21 Thread Christophe Leroy
Le 18/08/2023 à 10:59, Christophe Leroy a écrit : >CC arch/powerpc/perf/core-fsl-emb.o > arch/powerpc/perf/core-fsl-emb.c:675:6: error: no previous prototype for > 'hw_perf_event_setup' [-Werror=missing-prototypes] >675 | void hw_perf_event_s

Re: [PATCH v4 21/28] net: wan: Add framer framework support

2023-08-20 Thread Christophe Leroy
Hi Linus, Le 20/08/2023 à 23:06, Linus Walleij a écrit : > On Fri, Aug 18, 2023 at 6:41 PM Christophe Leroy > wrote: > >> From: Herve Codina >> >> A framer is a component in charge of an E1/T1 line interface. >> Connected usually to a TDM bus, it converts T

Re: [PATCH v4 27/28] ASoC: codecs: Add support for the framer codec

2023-08-19 Thread Christophe Leroy
Le 19/08/2023 à 01:18, Randy Dunlap a écrit : > Hi, > > On 8/18/23 09:39, Christophe Leroy wrote: >> +config SND_SOC_FRAMER >> +tristate "Framer codec" >> +depends on GENERIC_FRAMER >> +help >> + Enable support for the framer c

Re: [PATCH] treewide: drop CONFIG_EMBEDDED

2023-08-19 Thread Christophe Leroy
Hi, Le 19/08/2023 à 05:33, Jesse T a écrit : >>> Should there be a warning here to update change it instead of removal? >>> >>> kconfig doesn't have a warning mechanism AFAIK. >>> Do you have an idea of how this would work? > > No, unfortunately. As you said without a warning it would be

[PATCH v4 20/28] wan: qmc_hdlc: Add runtime timeslots changes support

2023-08-18 Thread Christophe Leroy
From: Herve Codina QMC channels support runtime timeslots changes but nothing is done at the QMC HDLC driver to handle these changes. Use existing IFACE ioctl in order to configure the timeslots to use. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Signed-off-by: Christophe Leroy

[PATCH v4 21/28] net: wan: Add framer framework support

2023-08-18 Thread Christophe Leroy
changes - get/set the framer configuration Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Signed-off-by: Christophe Leroy --- v4: Fixed wrong names in three EXPORT_SYMBOL() --- drivers/net/wan/Kconfig| 2 + drivers/net/wan/Makefile | 2 + drivers/net/wan

[PATCH v4 24/28] net: wan: framer: Add support for the Lantiq PEF2256 framer

2023-08-18 Thread Christophe Leroy
From: Herve Codina The Lantiq PEF2256 is a framer and line interface component designed to fulfill all required interfacing between an analog E1/T1/J1 line and the digital PCM system highway/H.100 bus. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Signed-off-by: Christophe Leroy

[PATCH v4 27/28] ASoC: codecs: Add support for the framer codec

2023-08-18 Thread Christophe Leroy
Codina Reviewed-by: Christophe Leroy Signed-off-by: Christophe Leroy --- sound/soc/codecs/Kconfig| 15 ++ sound/soc/codecs/Makefile | 2 + sound/soc/codecs/framer-codec.c | 413 3 files changed, 430 insertions(+) create mode 100644 sound/soc/codecs

[PATCH v4 28/28] net: wan: fsl_qmc_hdlc: Add framer support

2023-08-18 Thread Christophe Leroy
according to IF_IFACE_{E1,T1} information. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Signed-off-by: Christophe Leroy --- drivers/net/wan/fsl_qmc_hdlc.c | 239 - 1 file changed, 235 insertions(+), 4 deletions(-) diff --git a/drivers/net/wan/fsl_qmc_hdlc.c

[PATCH v4 22/28] dt-bindings: net: Add the Lantiq PEF2256 E1/T1/J1 framer

2023-08-18 Thread Christophe Leroy
From: Herve Codina The Lantiq PEF2256 is a framer and line interface component designed to fulfill all required interfacing between an analog E1/T1/J1 line and the digital PCM system highway/H.100 bus. Signed-off-by: Herve Codina Signed-off-by: Christophe Leroy --- .../bindings/net/lantiq

[PATCH v4 23/28] mfd: core: Ensure disabled devices are skiped without aborting

2023-08-18 Thread Christophe Leroy
disabled one fixes the issue. Fixes: 22380b65dc70 ("mfd: mfd-core: Ensure disabled devices are ignored without error") Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Signed-off-by: Christophe Leroy --- drivers/mfd/mfd-core.c | 17 - 1 file changed, 12 insert

[PATCH v4 25/28] pinctrl: Add support for the Lantic PEF2256 pinmux

2023-08-18 Thread Christophe Leroy
-by: Christophe Leroy Signed-off-by: Christophe Leroy --- drivers/pinctrl/Kconfig| 14 ++ drivers/pinctrl/Makefile | 1 + drivers/pinctrl/pinctrl-pef2256-regs.h | 65 ++ drivers/pinctrl/pinctrl-pef2256.c | 308 + 4 files changed, 388

[PATCH v4 26/28] MAINTAINERS: Add the Lantiq PEF2256 driver entry

2023-08-18 Thread Christophe Leroy
From: Herve Codina After contributing the driver, add myself as the maintainer for the Lantiq PEF2256 driver. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Signed-off-by: Christophe Leroy --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b

[PATCH v4 15/28] soc: fsl: cpm1: qmc: Split Tx and Rx TSA entries setup

2023-08-18 Thread Christophe Leroy
From: Herve Codina The Tx and Rx entries for a given channel are set in one function. In order to modify Rx entries and Tx entries independently of one other, split this function in one for the Rx part and one for the Tx part. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Signed

[PATCH v4 13/28] soc: fsl: cpm1: qmc: Check available timeslots in qmc_check_chans()

2023-08-18 Thread Christophe Leroy
and check the available timeslots instead of the used timeslots in qmc_check_chans(). Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Signed-off-by: Christophe Leroy --- drivers/soc/fsl/qe/qmc.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/soc

[PATCH v4 14/28] soc: fsl: cpm1: qmc: Add support for disabling channel TSA entries

2023-08-18 Thread Christophe Leroy
From: Herve Codina In order to allow runtime timeslot route changes, disabling channel TSA entries needs to be supported. Add support for this new feature. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Signed-off-by: Christophe Leroy --- drivers/soc/fsl/qe/qmc.c | 20

[PATCH v4 18/28] soc: fsl: cpm1: qmc: Remove timeslots handling from setup_chan()

2023-08-18 Thread Christophe Leroy
From: Herve Codina Timeslots setting is done at channel start() and stop(). There is no more need to do that during setup_chan(). Simply remove timeslot setting from setup_chan(). Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Signed-off-by: Christophe Leroy --- drivers/soc/fsl

[PATCH v4 10/28] soc: fsl: cpm1: qmc: Rename qmc_setup_tsa* to qmc_init_tsa*

2023-08-18 Thread Christophe Leroy
From: Herve Codina qmc_setup_tsa* are called once at initialisation. They initialize the QMC TSA table. In order to introduce setup function later on for dynamic timeslots management, rename the function to avoid later confusion. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy

[PATCH v4 04/28] soc: fsl: cpm1: qmc: Extend the API to provide Rx status

2023-08-18 Thread Christophe Leroy
, these flags have no meaning. Keep only one read complete() API and update the consumers working in transparent mode. In this case, the newly introduced flags parameter is simply unused. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Signed-off-by: Christophe Leroy --- drivers/soc/fsl/qe

[PATCH v4 06/28] dt-bindings: net: Add support for QMC HDLC

2023-08-18 Thread Christophe Leroy
bus used by the QMC HDLC and the E1/T1 line. The QMC HDLC can use this framer to get information about the E1/T1 line and configure the E1/T1 line. Signed-off-by: Herve Codina Signed-off-by: Christophe Leroy --- .../devicetree/bindings/net/fsl,qmc-hdlc.yaml | 46 +++ 1 file

[PATCH v4 16/28] soc: fsl: cpm1: qmc: Introduce is_tsa_64rxtx flag

2023-08-18 Thread Christophe Leroy
each time we need it. It is set once at initialization. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Signed-off-by: Christophe Leroy --- drivers/soc/fsl/qe/qmc.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/soc/fsl/qe/qmc.c b/drivers/soc/fsl/qe

[PATCH v4 19/28] soc: fsl: cpm1: qmc: Introduce functions to change timeslots at runtime

2023-08-18 Thread Christophe Leroy
. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Signed-off-by: Christophe Leroy --- drivers/soc/fsl/qe/qmc.c | 51 include/soc/fsl/qe/qmc.h | 10 2 files changed, 61 insertions(+) diff --git a/drivers/soc/fsl/qe/qmc.c b/drivers/soc/fsl

[PATCH v4 03/28] soc: fsl: cpm1: qmc: Fix rx channel reset

2023-08-18 Thread Christophe Leroy
the channel from stopped state to started state. Fix the issue removing the is_rx_stopped flag setting from qmc_chan_reset() Fixes: 3178d58e0b97 ("soc: fsl: cpm1: Add support for QMC") Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Signed-off-by: Christophe Leroy --- drivers/

[PATCH v4 12/28] soc: fsl: cpm1: qmc: Remove no more needed checks from qmc_check_chans()

2023-08-18 Thread Christophe Leroy
From: Herve Codina The newly introduced qmc_chan_setup_tsa* functions check that the channel entries are not already used. These checks are also performed by qmc_check_chans() and are no more needed. Remove them from qmc_check_chans(). Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy

[PATCH v4 09/28] soc: fsl: cpm1: qmc: Introduce available timeslots masks

2023-08-18 Thread Christophe Leroy
. changing timeslots at runtime). Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Signed-off-by: Christophe Leroy --- drivers/soc/fsl/qe/qmc.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/soc/fsl/qe/qmc.c b/drivers/soc/fsl/qe/qmc.c index

[PATCH v4 05/28] soc: fsl: cpm1: qmc: Remove inline function specifiers

2023-08-18 Thread Christophe Leroy
by: Andrew Lunn Reviewed-by: Christophe Leroy Signed-off-by: Christophe Leroy --- drivers/soc/fsl/qe/qmc.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/soc/fsl/qe/qmc.c b/drivers/soc/fsl/qe/qmc.c index 2d2a9d88ba6c..459e0bbd723d 100644 --- a/drivers/

[PATCH v4 17/28] soc: fsl: cpm1: qmc: Handle timeslot entries at channel start() and stop()

2023-08-18 Thread Christophe Leroy
From: Herve Codina In order to support runtime timeslot route changes, enable the channel timeslot entries at channel start() and disable them at channel stop(). Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Signed-off-by: Christophe Leroy --- drivers/soc/fsl/qe/qmc.c | 175

[PATCH v4 07/28] net: wan: Add support for QMC HDLC

2023-08-18 Thread Christophe Leroy
From: Herve Codina The QMC HDLC driver provides support for HDLC using the QMC (QUICC Multichannel Controller) to transfer the HDLC data. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Signed-off-by: Christophe Leroy --- drivers/net/wan/Kconfig| 12 + drivers/net/wan

[PATCH v4 11/28] soc: fsl: cpm1: qmc: Introduce qmc_chan_setup_tsa*

2023-08-18 Thread Christophe Leroy
From: Herve Codina Introduce the qmc_chan_setup_tsa* functions to setup entries related to the given channel. Use them during QMC channels setup. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Signed-off-by: Christophe Leroy --- drivers/soc/fsl/qe/qmc.c | 161

[PATCH v4 08/28] MAINTAINERS: Add the Freescale QMC HDLC driver entry

2023-08-18 Thread Christophe Leroy
From: Herve Codina After contributing the driver, add myself as the maintainer for the Freescale QMC HDLC driver. Signed-off-by: Herve Codina Signed-off-by: Christophe Leroy --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index

[PATCH v4 00/28] Add support for QMC HDLC, framer infrastruture and PEF2256 framer (v4)

2023-08-18 Thread Christophe Leroy
20230323103154.264546-1-herve.cod...@bootlin.com/ Changes v3 -> v4 - Fixes build failure with CONFIG_MODULES in patch 21 (net: wan: Add framer framework support) Changes v2 -> v3 - Patches 1, 2, 3, 4 Add 'Reviewed-by: Christophe Leroy ' - New patch Remove inline keyword from the exis

[PATCH v4 02/28] soc: fsl: cpm1: qmc: Fix __iomem addresses declaration

2023-08-18 Thread Christophe Leroy
... Indeed, some variable were declared 'type *__iomem var' instead of 'type __iomem *var'. Use the correct declaration to remove these warnings. Fixes: 3178d58e0b97 ("soc: fsl: cpm1: Add support for QMC") Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Signed-off-by:

[PATCH v4 01/28] soc: fsl: cpm1: tsa: Fix __iomem addresses declaration

2023-08-18 Thread Christophe Leroy
'type *__iomem var' instead of 'type __iomem *var'. Use the correct declaration to remove these warnings. Fixes: 1d4ba0b81c1c ("soc: fsl: cpm1: Add support for TSA") Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Signed-off-by: Christophe Leroy --- drivers/soc/f

[PATCH 1/2] powerpc: Introduce PAGE_NONE_X to replace PAGE_EXECONLY

2023-08-18 Thread Christophe Leroy
-Radix. And update access_error() so that a non exec fault on a VM_EXEC only mapping is always invalid, even when the underlying layer don't always generate a fault for that. Signed-off-by: Christophe Leroy Cc: Russell Currey Cc: Kees Cook --- arch/powerpc/include/asm/book3s/32/pgtable.h | 1

[PATCH 2/2] powerpc/8xx: Honor execonly protection

2023-08-18 Thread Christophe Leroy
On powerpc 8xx, exec does not imply read so redefine PAGE_NONE_X as PAGE_NONE + X Signed-off-by: Christophe Leroy Cc: Russell Currey Cc: Kees Cook --- arch/powerpc/include/asm/nohash/32/pte-8xx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm

Re: KASAN debug kernel fails to boot at early stage when CONFIG_SMP=y is set (kernel 6.5-rc5, PowerMac G4 3,6)

2023-08-18 Thread Christophe Leroy
Le 18/08/2023 à 11:16, Erhard Furtner a écrit : > On Fri, 18 Aug 2023 09:13:21 +1000 > Michael Ellerman wrote: > >> Try just removing the call to btext_unmap() entirely and see how far it goes? >> >> cheers > > Ok, I commented out btext_unmap() in MMU_init() and the freeze just happens >

[PATCH] powerpc/perf: Convert fsl_emb notifier to state machine callbacks

2023-08-18 Thread Christophe Leroy
t;perf: Rework and fix the arch CPU-hotplug hooks") Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Christophe Leroy Cc: Arnd Bergmann --- arch/powerpc/perf/core-fsl-emb.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/perf/core-fsl-emb.c

[PATCH] dma-mapping, powerpc: Move arch_dma_set_mask() prototype into dma-map-ops.h

2023-08-18 Thread Christophe Leroy
arch_dma_set_mask() definition into dma-map-ops.h and include it in arch/powerpc/kernel/dma-mask.c Signed-off-by: Christophe Leroy Cc: Arnd Bergmann --- arch/powerpc/kernel/dma-mask.c | 1 + include/linux/dma-map-ops.h| 6 ++ kernel/dma/mapping.c | 6 -- 3 files changed, 7

[PATCH v2] powerpc/512x: Make mpc512x_select_reset_compat() static

2023-08-18 Thread Christophe Leroy
mpc512x_select_reset_compat() is only used in the file it is defined. Make it static. Move mpc512x_restart_init() after mpc512x_select_reset_compat(). Signed-off-by: Christophe Leroy --- v2: Move mpc512x_restart_init() after mpc512x_select_reset_compat(). --- arch/powerpc/platforms/512x

[PATCH] powerpc/4xx: Add missing includes to fix no previous prototype errors

2023-08-17 Thread Christophe Leroy
/platforms/4xx/soc.c:193:6: warning: no previous prototype for 'ppc4xx_reset_system' [-Wmissing-prototypes] 193 | void ppc4xx_reset_system(char *cmd) | ^~~ Add missing includes to get the missing prototypes. Signed-off-by: Christophe Leroy Cc: Arnd Bergmann --- arch

[PATCH v2] powerpc/47x: Remove early_init_mmu_47x() to fix no previous prototype

2023-08-17 Thread Christophe Leroy
) | ^~ early_init_mmu_47x() is used only at one place and only locally. Fold it into its only caller and remove it. Signed-off-by: Christophe Leroy Cc: Arnd Bergmann --- v2: Remove prototype mmu_init_secondary() belonging to another patch --- arch/powerpc/mm/nohash/tlb.c | 19 +-- 1 file changed, 5

[PATCH] powerpc/47x: Add prototype for mmu_init_secondary()

2023-08-17 Thread Christophe Leroy
Add a prototype in mmu_decl.h Signed-off-by: Christophe Leroy Cc: Arnd Bergmann --- arch/powerpc/mm/mmu_decl.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/mm/mmu_decl.h b/arch/powerpc/mm/mmu_decl.h index c6dccb4f06dc..7f9ff0640124 100644 --- a/arch/powerpc/mm/mmu_decl.h

[PATCH] powerpc/47x: Remove early_init_mmu_47x() to fix no previous prototype

2023-08-17 Thread Christophe Leroy
) | ^~ early_init_mmu_47x() is used only at one place and only locally. Fold it into its only caller and remove it. Signed-off-by: Christophe Leroy Cc: Arnd Bergmann --- arch/powerpc/mm/mmu_decl.h | 1 + arch/powerpc/mm/nohash/tlb.c | 19 +-- 2 files changed, 6 insertions(+), 14 deletions(-) diff

[PATCH] powerpc/4xx: Remove pika_dtm_[un]register_shutdown() to fix no previous prototype

2023-08-17 Thread Christophe Leroy
iated list as it will now remain empty hence becomes useless. Signed-off-by: Christophe Leroy Cc: Arnd Bergmann --- arch/powerpc/platforms/44x/warp.c | 55 --- 1 file changed, 55 deletions(-) diff --git a/arch/powerpc/platforms/44x/warp.c b/arch/powerpc/platforms/44x/wa

[PATCH] powerpc/4xx: Remove WatchdogHandler() to fix no previous prototype error

2023-08-17 Thread Christophe Leroy
Signed-off-by: Christophe Leroy Cc: Arnd Bergmann --- arch/powerpc/kernel/traps.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index f5ce282dc4b8..eeff136b83d9 100644 --- a/arch/powerpc/kernel/traps.c +++ b/ar

[PATCH] powerpc/8xx: Remove init_internal_rtc() to fix no previous prototype error

2023-08-17 Thread Christophe Leroy
Signed-off-by: Christophe Leroy Cc: Arnd Bergmann --- arch/powerpc/platforms/8xx/m8xx_setup.c | 17 + 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/arch/powerpc/platforms/8xx/m8xx_setup.c b/arch/powerpc/platforms/8xx/m8xx_setup.c index 3c5c4e08b6a9..2336b687b

[PATCH] powerpc/82xx: Remove CONFIG_8260 and CONFIG_8272

2023-08-17 Thread Christophe Leroy
CONFIG_8272 is never used, remove it. CONFIG_8260 is redundant with CONFIG_PPC_82xx, remove it. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/cputable.h | 2 +- arch/powerpc/platforms/82xx/Kconfig | 25 - arch/powerpc/platforms/Kconfig | 2 +- 3

[PATCH] powerpc/82xx: Remove pq2_init_pci

2023-08-17 Thread Christophe Leroy
Commit 859b21a008eb ("powerpc: drop PowerQUICC II Family ADS platform support") removed last user of pq2_init_pci. Remove it. Signed-off-by: Christophe Leroy --- arch/powerpc/platforms/82xx/pq2.c | 46 --- 1 file changed, 46 deletions(-) diff --git a/ar

Re: KASAN debug kernel fails to boot at early stage when CONFIG_SMP=y is set (kernel 6.5-rc5, PowerMac G4 3,6)

2023-08-16 Thread Christophe Leroy
Le 15/08/2023 à 22:01, Erhard Furtner a écrit : > On Tue, 15 Aug 2023 17:25:13 + > Christophe Leroy wrote: > >> I just sent a patch with additional pr_info() in order to help locate >> the issue, please provide output with that patch. >> >> Thanks >>

[PATCH 2/2] powerpc/83xx: Split usb.c

2023-08-16 Thread Christophe Leroy
usb.c contains three independent parts with no common part. Split it. Signed-off-by: Christophe Leroy --- arch/powerpc/platforms/83xx/Makefile | 3 + .../platforms/83xx/{usb.c => usb_831x.c} | 118 -- arch/powerpc/platforms/83xx/usb_834x.c|

[PATCH 1/2] powerpc/83xx: Fix style problems in usb.c and remove unneccessary includes from mpc83xx.h

2023-08-16 Thread Christophe Leroy
Replace printk(KERN_WARN with pr_warn( Remove a couple of blank lines Re-align multi-line code. Replace asm/io.h by linux/io.h mpc83xx.h doesn't need linux/device.h or asm/pci-bridge.h Signed-off-by: Christophe Leroy --- arch/powerpc/platforms/83xx/mpc83xx.h | 2 -- arch/powerpc/platforms

[PATCH] powerpc/512x: Make mpc512x_select_reset_compat() static

2023-08-16 Thread Christophe Leroy
mpc512x_select_reset_compat() is only used in the file it is defined. Make it static. Signed-off-by: Christophe Leroy --- arch/powerpc/platforms/512x/mpc512x.h| 1 - arch/powerpc/platforms/512x/mpc512x_shared.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/arch

[PATCH] powerpc/fsl_pci: Make fsl_add_bridge() static

2023-08-16 Thread Christophe Leroy
Since commit 905e75c46dba ("powerpc/fsl-pci: Unify pci/pcie initialization code") fsl_add_bridge() is not used anymore outside of fsl_pci.c Make it static. Signed-off-by: Christophe Leroy --- arch/powerpc/sysdev/fsl_pci.c | 2 +- arch/powerpc/sysdev/fsl_pci.h | 1 - 2 files

[PATCH v2] powerpc/32s: Cleanup the mess in __set_pte_at()

2023-08-15 Thread Christophe Leroy
__set_pte_at() handles 3 main cases with #ifdefs plus the 'percpu' subcase which leads to code duplication. Rewrite the function using IS_ENABLED() to minimise the total number of cases and remove duplicated code. Signed-off-by: Christophe Leroy --- v2: Reorganise comments, first case becomes

Re: KASAN debug kernel fails to boot at early stage when CONFIG_SMP=y is set (kernel 6.5-rc5, PowerMac G4 3,6)

2023-08-15 Thread Christophe Leroy
Le 14/08/2023 à 19:27, Erhard Furtner a écrit : > On Mon, 14 Aug 2023 09:40:44 + > Christophe Leroy wrote: > >> Interesting. That means we get stuck somewhere around MMU_init() >> >> We know that MMU_init_hw() is called and runs at least until: >> >&

[PATCH] Add pr_info() traces for investigation

2023-08-15 Thread Christophe Leroy
Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/btext.c | 2 ++ arch/powerpc/mm/book3s32/kuap.c | 5 + arch/powerpc/mm/book3s32/mmu.c | 3 +++ arch/powerpc/mm/kasan/init_32.c | 3 +++ arch/powerpc/mm/pgtable_32.c| 4 5 files changed, 17 insertions(+) diff --git a/arch

[PATCH] powerpc: Move zalloc_maybe_bootmem() into pci-common.c

2023-08-15 Thread Christophe Leroy
zalloc_maybe_bootmem() is only used by PCI related functions. Move it into pci-common.c and remove the always built alloc.c Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/pci.h | 2 ++ arch/powerpc/include/asm/setup.h | 1 - arch/powerpc/kernel/pci-common.c | 16

<    1   2   3   4   5   6   7   8   9   10   >