Re: [PATCH] net/ethernet/freescale: fix warning for ucc_geth

2017-09-14 Thread Christophe LEROY
Hi, Le 14/09/2017 à 14:05, Valentin Longchamp a écrit : Simple printk format warning for the the ucc registers address. Did you test your patch with mpc83xx_defconfig ? I get a new warning with your patch: CC drivers/net/ethernet/freescale/ucc_geth.o In file included from ./include/li

Re: [PATCH v9 17/20] crypto: talitos: move to generic async completion

2017-10-17 Thread Christophe LEROY
Le 15/10/2017 à 11:20, Gilad Ben-Yossef a écrit : The talitos driver starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef Tested-by: Christophe Leroy --- drivers/crypto/talitos.c | 38

Re: [PATCH 4/9] powerpc: inline ip_fast_csum()

2016-02-29 Thread Christophe Leroy
Le 23/09/2015 07:43, Denis Kirjanov a écrit : On 9/22/15, Christophe Leroy wrote: In several architectures, ip_fast_csum() is inlined There are functions like ip_send_check() which do nothing much more than calling ip_fast_csum(). Inlining ip_fast_csum() allows the compiler to optimise

Re: [PATCH 8/9] powerpc: simplify csum_add(a, b) in case a or b is constant 0

2016-02-29 Thread Christophe Leroy
Le 23/10/2015 05:33, Scott Wood a écrit : On Tue, 2015-09-22 at 16:34 +0200, Christophe Leroy wrote: Simplify csum_add(a, b) in case a or b is constant 0 Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/checksum.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch

Re: [PATCH 6/9] powerpc32: optimise a few instructions in csum_partial()

2016-02-29 Thread Christophe Leroy
Le 23/10/2015 05:30, Scott Wood a écrit : On Tue, 2015-09-22 at 16:34 +0200, Christophe Leroy wrote: r5 does contain the value to be updated, so lets use r5 all way long for that. It makes the code more readable. To avoid confusion, it is better to use adde instead of addc The first

Re: [PATCH 5/5] drivers/net: support hdlc function for QE-UCC

2016-04-19 Thread Christophe Leroy
Le 30/03/2016 10:50, Zhao Qiang a écrit : The driver add hdlc support for Freescale QUICC Engine. It support NMSI and TSA mode. When using TSA, how does the TSA gets configured ? Especially how do you describe which Timeslot is switched to HDLC channels ? Is it possible to route some Timeslots t

[PATCH] netfilter: nf_conntrack_sip: CSeq 0 is a valid CSeq

2016-07-01 Thread Christophe Leroy
Do not drop packet when CSeq is 0 as 0 is also a valid value for CSeq. In order to do so, we replace obsolete simple_strtoul() which returns 0 on error by kstrtouint(). As kstrtouint() requires a NULL terminated string, we need to use a temporary buffer Signed-off-by: Christophe Leroy --- net

Re: [PATCH] netfilter: nf_conntrack_sip: CSeq 0 is a valid CSeq

2016-07-03 Thread Christophe Leroy
Le 04/07/2016 à 07:48, Liping Zhang a écrit : 2016-07-01 17:48 GMT+08:00 Christophe Leroy : Do not drop packet when CSeq is 0 as 0 is also a valid value for CSeq. --- a/net/netfilter/nf_conntrack_sip.c +++ b/net/netfilter/nf_conntrack_sip.c @@ -1368,6 +1368,7 @@ static int

[PATCH] net: fs_enet: mask interrupts for TX partial frames.

2015-08-11 Thread Christophe Leroy
igned-off-by: Christophe Leroy --- drivers/net/ethernet/freescale/fs_enet/mac-fec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/fs_enet/mac-fec.c b/drivers/net/ethernet/freescale/fs_enet/mac-fec.c index b34214e..016743e 100644 --- a/driver

[PATCH] net: fs_enet: explicitly remove I flag on TX partial frames

2015-08-11 Thread Christophe Leroy
We are not interested in interrupts for partially transmitted frames, we have to clear BD_ENET_TX_INTR explicitly otherwise it may remain from a previously used descriptor. Signed-off-by: Christophe Leroy --- drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 3 ++- 1 file changed, 2

[PATCH] net: ipv4: inlining ip_send_check()

2015-08-18 Thread Christophe Leroy
lwz r31,12(r1) c02d3e70: 7c 08 03 a6 mtlrr0 c02d3e74: 38 21 00 10 addir1,r1,16 c02d3e78: 4e 80 00 20 blr Signed-off-by: Christophe Leroy --- include/net/ip.h | 9 - net/ipv4/ip_output.c | 8 2 files changed, 8 insertions(+), 9 deleti

[PATCH 8/9] powerpc: simplify csum_add(a, b) in case a or b is constant 0

2015-09-22 Thread Christophe Leroy
Simplify csum_add(a, b) in case a or b is constant 0 Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/checksum.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/powerpc/include/asm/checksum.h b/arch/powerpc/include/asm/checksum.h index 56deea8..f8a9704 100644 --- a

[PATCH 6/9] powerpc32: optimise a few instructions in csum_partial()

2015-09-22 Thread Christophe Leroy
n the value of bit 31 and bit 30 of r4 instead of anding r4 with 3 then proceding on comparisons and substractions. Signed-off-by: Christophe Leroy --- arch/powerpc/lib/checksum_32.S | 37 + 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a

[PATCH 7/9] powerpc32: optimise csum_partial() loop

2015-09-22 Thread Christophe Leroy
h and parallele execution) Signed-off-by: Christophe Leroy --- arch/powerpc/lib/checksum_32.S | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/lib/checksum_32.S b/arch/powerpc/lib/checksum_32.S index 9c12602..0d34f47 100644 --- a/arch/powerpc/lib/checksum

[PATCH 9/9] powerpc: optimise csum_partial() call when len is constant

2015-09-22 Thread Christophe Leroy
multiple constant length * uses ip_fast_csum() for other 32bits multiple constant * uses __csum_partial() in all other cases Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/checksum.h | 80 ++--- arch/powerpc/lib/checksum_32.S | 4 +- arch/powerpc

[PATCH 5/9] powerpc32: rewrite csum_partial_copy_generic() based on copy_tofrom_user()

2015-09-22 Thread Christophe Leroy
for the checksum r7 and r8 which contains pointers to error feedback are used, so we stack them. On a TCP benchmark using socklib on the loopback interface on which checksum offload and scatter/gather have been deactivated, we get about 20% performance increase. Signed-off-by: Christophe Leroy -

[PATCH 3/9] powerpc32: checksum_wrappers_64 becomes checksum_wrappers

2015-09-22 Thread Christophe Leroy
also exists on powerpc32 This patch renames arch/powerpc/lib/checksum_wrappers_64.c to arch/powerpc/lib/checksum_wrappers.c and makes it non-conditional to CONFIG_WORD_SIZE Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/checksum.h | 9 - arch

[PATCH 1/9] powerpc: unexport csum_tcpudp_magic

2015-09-22 Thread Christophe Leroy
csum_tcpudp_magic is now an inline function, so there is nothing to export Signed-off-by: Christophe Leroy --- arch/powerpc/lib/ppc_ksyms.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc/lib/ppc_ksyms.c b/arch/powerpc/lib/ppc_ksyms.c index c7f8e95..f5e427e 100644 --- a/arch

[PATCH 0/9] powerpc32: set of optimisation of network checksum functions

2015-09-22 Thread Christophe Leroy
This patch serie gather patches related to checksum functions on powerpc. Some of those patches have already been submitted individually. Christophe Leroy (9): powerpc: unexport csum_tcpudp_magic powerpc: mark xer clobbered in csum_add() powerpc32: checksum_wrappers_64 becomes

[PATCH 2/9] powerpc: mark xer clobbered in csum_add()

2015-09-22 Thread Christophe Leroy
addc uses carry so xer is clobbered in csum_add() Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/checksum.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/checksum.h b/arch/powerpc/include/asm/checksum.h index e8d9ef4..d2ca07b 100644

[PATCH 4/9] powerpc: inline ip_fast_csum()

2015-09-22 Thread Christophe Leroy
In several architectures, ip_fast_csum() is inlined There are functions like ip_send_check() which do nothing much more than calling ip_fast_csum(). Inlining ip_fast_csum() allows the compiler to optimise better Suggested-by: Eric Dumazet Signed-off-by: Christophe Leroy --- arch/powerpc

Performance loss due to commit 37c3185 ([NET]: Added GSO toggle)

2015-06-20 Thread christophe leroy
Hello Herbert, In commit "[NET]: Added GSO toggle" 37c3185a02d4b85fbe134bf5204535405dd2c957, you force NETIF_F_HW_CSUM if GSO feature is selected. By default, SW GSO is active as soon as a network board has NETIF_F_SG feature. This means that function sk_setup_caps() forces NETIF_F_HW_CSUM for

Re: [PATCH v3 00/27] kill devm_ioremap_nocache

2017-12-24 Thread christophe leroy
Le 23/12/2017 à 16:57, Guenter Roeck a écrit : On 12/23/2017 05:48 AM, Greg KH wrote: On Sat, Dec 23, 2017 at 06:55:25PM +0800, Yisheng Xie wrote: Hi all, When I tried to use devm_ioremap function and review related code, I found devm_ioremap and devm_ioremap_nocache is almost the same with

Re: [PATCH v3 00/27] kill devm_ioremap_nocache

2017-12-24 Thread christophe leroy
Le 23/12/2017 à 14:48, Greg KH a écrit : On Sat, Dec 23, 2017 at 06:55:25PM +0800, Yisheng Xie wrote: Hi all, When I tried to use devm_ioremap function and review related code, I found devm_ioremap and devm_ioremap_nocache is almost the same with each other, except one use ioremap while the o

Re: [PATCH v3 00/27] kill devm_ioremap_nocache

2018-01-04 Thread Christophe LEROY
Le 25/12/2017 à 02:34, Yisheng Xie a écrit : On 2017/12/24 17:05, christophe leroy wrote: Le 23/12/2017 à 14:48, Greg KH a écrit : On Sat, Dec 23, 2017 at 06:55:25PM +0800, Yisheng Xie wrote: Hi all, When I tried to use devm_ioremap function and review related code, I found

[PATCH] net: fs_enet: do not call phy_stop() in interrupts

2018-01-16 Thread Christophe Leroy
This patch moves fs_timeout() actions into an async worker. Fixes: commit 48257c4f168e5 ("Add fs_enet ethernet network driver, for several embedded platforms") Signed-off-by: Christophe Leroy --- drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 16 +--- driv

[PATCH 1/3] net: fs_enet: merge NAPI RX and NAPI TX

2016-08-24 Thread Christophe Leroy
ed-off-by: Christophe Leroy --- .../net/ethernet/freescale/fs_enet/fs_enet-main.c | 259 + drivers/net/ethernet/freescale/fs_enet/fs_enet.h | 16 +- drivers/net/ethernet/freescale/fs_enet/mac-fcc.c | 57 ++--- drivers/net/ethernet/freescale/fs_enet/mac-fec.c

[PATCH 0/3] Optimisation of fs_enet ethernet driver

2016-08-24 Thread Christophe Leroy
This set optimises the freescale fs_enet ethernet driver: 1/ Merge of RX and TX NAPI functions in order to limit the amount of interrupts 2/ Do not unmap DMA when packets len is below copybreak, otherwise there is no benefit in copying the skb instead of allocating a new one 3/ Make copybreak value

[PATCH 2/3] net: fs_enet: don't unmap DMA when packet len is below copybreak

2016-08-24 Thread Christophe Leroy
eived Signed-off-by: Christophe Leroy --- .../net/ethernet/freescale/fs_enet/fs_enet-main.c | 36 -- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c

[PATCH 3/3] net: fs_enet: make rx_copybreak value configurable

2016-08-24 Thread Christophe Leroy
make it configurable. Signed-off-by: Christophe Leroy --- drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 8 +--- include/linux/fs_enet_pd.h| 1 - 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/freescale/fs_enet/fs_enet

Re: [PATCH] net: phy: micrel: remove suspend/resume

2016-08-24 Thread Christophe Leroy
Le 23/08/2016 à 21:03, Florian Fainelli a écrit : +others, On 08/23/2016 04:13 AM, Christophe Leroy wrote: In ERRATA DS8700A dated 05 May 2016, Microship recommends to not use software power down mode on KSZ8041 family. s/Microship/Microchip/ They say they have no plan to fix this

Re: [PATCH 1/3] net: fs_enet: merge NAPI RX and NAPI TX

2016-08-24 Thread Christophe Leroy
Le 24/08/2016 à 15:07, Eric Dumazet a écrit : On Wed, 2016-08-24 at 12:36 +0200, Christophe Leroy wrote: Initially, a NAPI TX routine has been implemented separately from NAPI RX, as done on the freescale/gianfar driver. By merging NAPI RX and NAPI TX, we reduce the amount of TX completion

Re: [PATCH] net: phy: micrel: remove suspend/resume

2016-08-25 Thread Christophe Leroy
Le 26/08/2016 à 06:35, Florian Fainelli a écrit : Le 24/08/2016 à 07:14, Christophe Leroy a écrit : Le 23/08/2016 à 21:03, Florian Fainelli a écrit : +others, On 08/23/2016 04:13 AM, Christophe Leroy wrote: In ERRATA DS8700A dated 05 May 2016, Microship recommends to not use software

[PATCH v2 0/3] Optimisation of fs_enet ethernet driver

2016-09-09 Thread Christophe Leroy
value configurable as the optimised value is not the same on all targets Christophe Leroy (3): net: fs_enet: merge NAPI RX and NAPI TX net: fs_enet: don't unmap DMA when packet len is below copybreak net: fs_enet: make rx_copybreak value configurable .../net/ethernet/freescale/fs_enet/fs

[PATCH v2 3/3] net: fs_enet: make rx_copybreak value configurable

2016-09-09 Thread Christophe Leroy
make it configurable. Signed-off-by: Christophe Leroy --- v2: ethtool parameter instead of module parameter .../net/ethernet/freescale/fs_enet/fs_enet-main.c | 40 ++ 1 file changed, 40 insertions(+) diff --git a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c b

[PATCH v2 1/3] net: fs_enet: merge NAPI RX and NAPI TX

2016-09-09 Thread Christophe Leroy
o call netif_wake_queue() at every packet successfully transmitted. Signed-off-by: Christophe Leroy --- v2: Limitation of TX completion loop to the size of the TX ring to avoid infinite loop. .../net/ethernet/freescale/fs_enet/fs_enet-main.c | 268 + drivers/net/ethernet/freescale/f

[PATCH v2 2/3] net: fs_enet: don't unmap DMA when packet len is below copybreak

2016-09-09 Thread Christophe Leroy
eived Signed-off-by: Christophe Leroy --- .../net/ethernet/freescale/fs_enet/fs_enet-main.c | 36 -- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c

Re: [PATCH] wan/fsl_ucc_hdlc: Fix size used in dma_free_coherent()

2016-10-08 Thread Christophe LEROY
Le 07/10/2016 à 22:58, Christophe JAILLET a écrit : Size used with 'dma_alloc_coherent()' and 'dma_free_coherent()' should be consistent. Here, the size of a pointer is used in dma_alloc... and the size of the pointed structure is used in dma_free... This has been spotted with coccinelle, usin

[PATCH v2] netfilter: nf_conntrack_sip: CSeq 0 is a valid CSeq

2016-08-03 Thread Christophe Leroy
Do not drop packet when CSeq is 0 as 0 is also a valid value for CSeq. simple_strtoul() will return 0 either when all digits are 0 or if there are no digits at all. Therefore when simple_strtoul() returns 0 we check if first character is digit 0 or not. Signed-off-by: Christophe Leroy --- v2

[PATCH] net: ethernet: fs_enet: Remove useless includes

2017-03-16 Thread Christophe Leroy
CONFIG_8xx is being deprecated. Since the includes dependent on CONFIG_8xx are useless, just drop them. Signed-off-by: Christophe Leroy --- drivers/net/ethernet/freescale/fs_enet/mac-fec.c | 6 -- drivers/net/ethernet/freescale/fs_enet/mac-scc.c | 6 -- 2 files changed, 12 deletions

[PATCH] isdn: hardware: mISDN: Remove reference to CONFIG_8xx

2017-03-16 Thread Christophe Leroy
several other drivers. Signed-off-by: Christophe Leroy --- drivers/isdn/hardware/mISDN/Kconfig | 6 +++--- drivers/isdn/hardware/mISDN/hfc_multi_8xx.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/isdn/hardware/mISDN/Kconfig b/drivers/isdn/hardware/mISDN

[PATCH] netfilter: nf_conntrack_sip: fix wrong memory initialisation

2017-03-01 Thread Christophe Leroy
s allocated in the BSS, it is already set to 0 Fixes: 82de0be6862cd ("netfilter: Add helper array register/unregister functions") Cc: sta...@vger.kernel.org Signed-off-by: Christophe Leroy --- net/netfilter/nf_conntrack_sip.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/netf

[PATCH 1/2] net: ethernet: ucc_geth: fix MEM_PART_MURAM mode

2017-02-07 Thread Christophe Leroy
Since commit 5093bb965a163 ("powerpc/QE: switch to the cpm_muram implementation"), muram area is not part of immrbar mapping anymore so immrbar_virt_to_phys() is not usable anymore. Fixes: 5093bb965a163 ("powerpc/QE: switch to the cpm_muram implementation) Signed-off-by: C

[PATCH 2/2] soc/fsl/qe: get rid of immrbar_virt_to_phys()

2017-02-07 Thread Christophe Leroy
immrbar_virt_to_phys() is not used anymore Signed-off-by: Christophe Leroy --- drivers/soc/fsl/qe/qe.c | 4 +--- include/soc/fsl/qe/immap_qe.h | 19 --- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/drivers/soc/fsl/qe/qe.c b/drivers/soc/fsl/qe/qe.c index

[PATCH 0/2] get rid of immrbar_virt_to_phys()

2017-02-07 Thread Christophe Leroy
ucc_geth ethernet driver is the only driver using immrbar_virt_to_phys() and it uses it incorrectly. This patch fixes ucc_geth driver then removes immrbar_virt_to_phys() Christophe Leroy (2): net: ethernet: ucc_geth: fix MEM_PART_MURAM mode soc/fsl/qe: get rid of immrbar_virt_to_phys

Re: [PATCH 1/2] net: ethernet: ucc_geth: fix MEM_PART_MURAM mode

2017-02-09 Thread Christophe LEROY
Acked-by: David S. Miller Le 07/02/2017 à 10:05, Christophe Leroy a écrit : Since commit 5093bb965a163 ("powerpc/QE: switch to the cpm_muram implementation"), muram area is not part of immrbar mapping anymore so immrbar_virt_to_phys() is not usable anymore. Fixes: 5093bb965a163 (&

[PATCH] powerpc/32: Implement csum_ipv6_magic in assembly

2018-05-18 Thread Christophe Leroy
rotlwi r10,r3,16 c4: 7c 63 52 14 add r3,r3,r10 c8: 7c 63 18 f8 not r3,r3 cc: 54 63 84 3e rlwinm r3,r3,16,16,31 d0: 4e 80 00 20 blr This patch implements it in assembly for PPC32 Link: https://github.com/linuxppc/linux/issues/9 Signed-off-by: Christophe

[PATCH] powerpc: Implement csum_ipv6_magic in assembly

2018-05-21 Thread Christophe Leroy
rotlwi r3,r0,16 ec: 7c 03 02 14 add r0,r3,r0 f0: 7c 03 00 f8 not r3,r0 f4: 78 63 84 22 rldicl r3,r3,48,48 f8: 4e 80 00 20 blr This patch implements it in assembly for both PPC32 and PPC64 Link: https://github.com/linuxppc/linux/issues/9 Signed-off-by: Chri

[PATCH v3] powerpc: Implement csum_ipv6_magic in assembly

2018-05-21 Thread Christophe Leroy
rotlwi r3,r0,16 ec: 7c 03 02 14 add r0,r3,r0 f0: 7c 03 00 f8 not r3,r0 f4: 78 63 84 22 rldicl r3,r3,48,48 f8: 4e 80 00 20 blr This patch implements it in assembly for both PPC32 and PPC64 Link: https://github.com/linuxppc/linux/issues/9 Signed-off-by: Chri

Re: [PATCH v3] powerpc: Implement csum_ipv6_magic in assembly

2018-05-23 Thread Christophe LEROY
Le 23/05/2018 à 20:34, Segher Boessenkool a écrit : On Tue, May 22, 2018 at 08:57:01AM +0200, Christophe Leroy wrote: The generic csum_ipv6_magic() generates a pretty bad result Please try with a more recent compiler, what you used is pretty ancient. It's not like recent compile

Re: [PATCH v3] powerpc: Implement csum_ipv6_magic in assembly

2018-05-24 Thread Christophe Leroy
On 05/24/2018 06:20 AM, Christophe LEROY wrote: Le 23/05/2018 à 20:34, Segher Boessenkool a écrit : On Tue, May 22, 2018 at 08:57:01AM +0200, Christophe Leroy wrote: The generic csum_ipv6_magic() generates a pretty bad result Please try with a more recent compiler, what you used is

[PATCH] sfc_ef100: Fix build failure on powerpc

2020-08-13 Thread Christophe Leroy
nough for an u32 calculation, so cast it as (u32) for the test, to avoid the need for _umoddi3. Fixes: adcfc3482fff ("sfc_ef100: read Design Parameters at probe time") Signed-off-by: Christophe Leroy --- drivers/net/ethernet/sfc/ef100_nic.c | 2 +- 1 file changed, 1 insertion(+), 1 dele

Re: [PATCH bpf-next 1/2] bpf: Remove bpf_jit_enable=2 debugging mode

2021-04-17 Thread Christophe Leroy
Le 16/04/2021 à 01:49, Alexei Starovoitov a écrit : On Thu, Apr 15, 2021 at 8:41 AM Quentin Monnet wrote: 2021-04-15 16:37 UTC+0200 ~ Daniel Borkmann On 4/15/21 11:32 AM, Jianlin Lv wrote: For debugging JITs, dumping the JITed image to kernel log is discouraged, "bpftool prog dump jited"

Re: sysctl: setting key "net.core.bpf_jit_enable": Invalid argument

2021-04-11 Thread Christophe Leroy
Le 11/04/2021 à 13:09, Paul Menzel a écrit : Dear Linux folks, Related to * [CVE-2021-29154] Linux kernel incorrect computation of branch displacements in BPF JIT compiler can be abused to execute arbitrary code in Kernel mode* [1], on the POWER8 system IBM S822LC with self-built Linux 5.1

[PATCH 3/3] powerpc/ebpf32: Use standard function call for functions within 32M distance

2021-04-12 Thread Christophe Leroy
calculate the amount of memory to allocate for the EBPF code, so assume the 4 instructions sequence is required, so that enough memory is allocated. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/ppc-opcode.h | 1 + arch/powerpc/net/bpf_jit.h| 3 +++ arch/powerpc/

[PATCH 1/3] powerpc/ebpf32: Fix comment on BPF_ALU{64} | BPF_LSH | BPF_K

2021-04-12 Thread Christophe Leroy
Replace <<== by <<= Signed-off-by: Christophe Leroy --- arch/powerpc/net/bpf_jit_comp32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/net/bpf_jit_comp32.c b/arch/powerpc/net/bpf_jit_comp32.c index 003843273b43..ca6fe1583460 100644 --- a/arch

[PATCH 2/3] powerpc/ebpf32: Rework 64 bits shifts to avoid tests and branches

2021-04-12 Thread Christophe Leroy
Re-implement BPF_ALU64 | BPF_{LSH/RSH/ARSH} | BPF_X with branchless implementation copied from misc_32.S. Signed-off-by: Christophe Leroy --- arch/powerpc/net/bpf_jit_comp32.c | 39 +++ 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/arch/powerpc/net

Re: [PATCH] ibmvnic: remove excessive irqsave

2021-03-04 Thread Christophe Leroy
Le 05/03/2021 à 02:43, angkery a écrit : From: Junlin Yang ibmvnic_remove locks multiple spinlocks while disabling interrupts: spin_lock_irqsave(&adapter->state_lock, flags); spin_lock_irqsave(&adapter->rwi_lock, flags); there is no need for the second irqsave,since interrupts are disabled

Re: [PATCH v2 0/7] Rid W=1 warnings in Ethernet

2021-01-15 Thread Christophe Leroy
Le 15/01/2021 à 12:18, Lee Jones a écrit : On Thu, 14 Jan 2021, Lee Jones wrote: On Thu, 14 Jan 2021, Jakub Kicinski wrote: On Thu, 14 Jan 2021 08:33:49 + Lee Jones wrote: On Wed, 13 Jan 2021, Jakub Kicinski wrote: On Wed, 13 Jan 2021 16:41:16 + Lee Jones wrote: Resending the s

Re: [PATCH net-next v2 08/17] ethernet: ucc_geth: remove {rx,tx}_glbl_pram_offset from struct ucc_geth_private

2021-01-19 Thread Christophe Leroy
Le 19/01/2021 à 16:07, Rasmus Villemoes a écrit : These fields are only used within ucc_geth_startup(), so they might as well be local variables in that function rather than being stashed in struct ucc_geth_private. Aside from making that struct a tiny bit smaller, it also shortens some lines

Re: [PATCH net-next v2 11/17] ethernet: ucc_geth: don't statically allocate eight ucc_geth_info

2021-01-19 Thread Christophe Leroy
Le 19/01/2021 à 16:07, Rasmus Villemoes a écrit : struct ucc_geth_info is somewhat large, and on systems with only one or two UCC instances, that just wastes a few KB of memory. So allocate and populate a chunk of memory at probe time instead of initializing them all during driver init. Note

Re: [PATCH net-next v2 13/17] ethernet: ucc_geth: remove bd_mem_part and all associated code

2021-01-19 Thread Christophe Leroy
Le 19/01/2021 à 16:07, Rasmus Villemoes a écrit : The bd_mem_part member of ucc_geth_info always has the value MEM_PART_SYSTEM, and AFAICT, there has never been any code setting it to any other value. Moreover, muram is a somewhat precious resource, so there's no point using that when normal m

Re: [PATCH net-next v2 14/17] ethernet: ucc_geth: replace kmalloc_array()+for loop by kcalloc()

2021-01-19 Thread Christophe Leroy
Can you detail a bit the change ? At least tell that the loop was a zeroising loop and that kcalloc() already zeroises the allocated memory ? Le 19/01/2021 à 16:07, Rasmus Villemoes a écrit : Signed-off-by: Rasmus Villemoes --- drivers/net/ethernet/freescale/ucc_geth.c | 14 --

Re: [PATCH net-next v2 11/17] ethernet: ucc_geth: don't statically allocate eight ucc_geth_info

2021-01-20 Thread Christophe Leroy
Le 20/01/2021 à 12:25, Rasmus Villemoes a écrit : On 20/01/2021 08.02, Christophe Leroy wrote: @@ -3715,25 +3713,23 @@ static int ucc_geth_probe(struct platform_device* ofdev)   if ((ucc_num < 0) || (ucc_num > 7))   return -ENODEV;   -    ug_info = &ugeth_in

[PATCH] watchdog: Remove MV64x60 watchdog driver

2021-03-18 Thread Christophe Leroy
Commit 92c8c16f3457 ("powerpc/embedded6xx: Remove C2K board support") removed the last selector of CONFIG_MV64X60. Therefore CONFIG_MV64X60_WDT cannot be selected anymore and can be removed. Signed-off-by: Christophe Leroy --- drivers/watchdog/Kconfig | 4 - drivers/watchdo

[PATCH] net: marvell: Remove reference to CONFIG_MV64X60

2021-03-18 Thread Christophe Leroy
Commit 92c8c16f3457 ("powerpc/embedded6xx: Remove C2K board support") removed last selector of CONFIG_MV64X60. As it is not a user selectable config item, all references to it are stale. Remove them. Signed-off-by: Christophe Leroy --- drivers/net/ethernet/marvell/Kconfig

[PATCH v2 0/8] Implement EBPF on powerpc32

2021-03-22 Thread Christophe Leroy
n calls (last patch - new) Christophe Leroy (8): powerpc/bpf: Remove classical BPF support for PPC32 powerpc/bpf: Change register numbering for bpf_set/is_seen_register() powerpc/bpf: Move common helpers into bpf_jit.h powerpc/bpf: Move common functions into bpf_jit_comp.c powerpc/bpf: Cha

[PATCH v2 3/8] powerpc/bpf: Move common helpers into bpf_jit.h

2021-03-22 Thread Christophe Leroy
Move functions bpf_flush_icache(), bpf_is_seen_register() and bpf_set_seen_register() in order to reuse them in future bpf_jit_comp32.c Signed-off-by: Christophe Leroy --- arch/powerpc/net/bpf_jit.h| 35 +++ arch/powerpc/net/bpf_jit64.h | 19

[PATCH v2 1/8] powerpc/bpf: Remove classical BPF support for PPC32

2021-03-22 Thread Christophe Leroy
!= 1305 FAIL (1 times) test_bpf: Summary: 371 PASSED, 7 FAILED, [119/366 JIT'ed] Fixing this is not worth the effort. Instead, remove support for classical BPF and prepare for adding Extended BPF support instead. Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig

[PATCH v2 2/8] powerpc/bpf: Change register numbering for bpf_set/is_seen_register()

2021-03-22 Thread Christophe Leroy
Instead of using BPF register number as input in functions bpf_set_seen_register() and bpf_is_seen_register(), use CPU register number directly. Signed-off-by: Christophe Leroy --- arch/powerpc/net/bpf_jit_comp64.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff

[PATCH v2 6/8] powerpc/asm: Add some opcodes in asm/ppc-opcode.h for PPC32 eBPF

2021-03-22 Thread Christophe Leroy
: Christophe Leroy --- arch/powerpc/include/asm/ppc-opcode.h | 12 1 file changed, 12 insertions(+) diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/arch/powerpc/include/asm/ppc-opcode.h index ed161ef2b3ca..5b60020dc1f4 100644 --- a/arch/powerpc/include/asm/ppc-opcode.h +++ b/arch

[PATCH v2 4/8] powerpc/bpf: Move common functions into bpf_jit_comp.c

2021-03-22 Thread Christophe Leroy
Move into bpf_jit_comp.c the functions that will remain common to PPC64 and PPC32 when we add support of EBPF for PPC32. Signed-off-by: Christophe Leroy --- arch/powerpc/net/Makefile | 2 +- arch/powerpc/net/bpf_jit.h| 6 + arch/powerpc/net/bpf_jit_comp.c | 269

[PATCH v2 7/8] powerpc/bpf: Implement extended BPF on PPC32

2021-03-22 Thread Christophe Leroy
following operations are only implemented for power of two constants: case BPF_ALU64 | BPF_MOD | BPF_K: /* dst %= imm */ case BPF_ALU64 | BPF_DIV | BPF_K: /* dst /= imm */ Signed-off-by: Christophe Leroy --- v2: - Simplify 16 bits swap - Rework tailcall, use stack fo

[PATCH v2 5/8] powerpc/bpf: Change values of SEEN_ flags

2021-03-22 Thread Christophe Leroy
Because PPC32 will use more non volatile registers, move SEEN_ flags to positions 0-2 which corresponds to special registers. Signed-off-by: Christophe Leroy --- arch/powerpc/net/bpf_jit.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/net/bpf_jit.h

[PATCH v2 8/8] powerpc/bpf: Reallocate BPF registers to volatile registers when possible on PPC32

2021-03-22 Thread Christophe Leroy
38: 7d 83 63 78 mr r3,r12 3c: 38 21 00 50 addir1,r1,80 40: 4e 80 00 20 blr Signed-off-by: Christophe Leroy --- arch/powerpc/net/bpf_jit.h| 16 arch/powerpc/net/bpf_jit64.h | 2 +- arch/powerpc/net/bpf_jit_comp.c | 2 ++ arch/powerp

Re: [PATCH v2 0/8] Implement EBPF on powerpc32

2021-03-26 Thread Christophe Leroy
Le 22/03/2021 à 18:53, Andrii Nakryiko a écrit : On Mon, Mar 22, 2021 at 9:37 AM Christophe Leroy wrote: This series implements extended BPF on powerpc32. For the implementation details, see the patch before the last. The following operations are not implemented: case

[PATCH] net: ucc_geth - fix Oops when changing number of buffers in the ring

2019-05-03 Thread Christophe Leroy
<80e3005c> 80c30098 3107 7d083910 [ 70.081690] ---[ end trace be7ccd9c1e1a9f12 ]--- This patch forbids the modification of the number of buffers in the ring while the interface is running. Fixes: ac421852b3a0 ("ucc_geth: add ethtool support") Cc: sta...@vger.kernel.org Signed-of

[RFC PATCH v1] powerpc/net: Implement eBPF on PPC32

2020-12-11 Thread Christophe Leroy
>>= imm */ case BPF_STX | BPF_XADD | BPF_DW: /* *(u64 *)(dst + off) += src */ Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig |3 +- arch/powerpc/include/asm/ppc-opcode.h | 11 + arch/powerpc/net/Makefile |6 +- arch/powe

[RFC PATCH v1 3/7] powerpc/bpf: Move common helpers into bpf_jit.h

2020-12-16 Thread Christophe Leroy
Move functions bpf_flush_icache(), bpf_is_seen_register() and bpf_set_seen_register() in order to reuse them in future bpf_jit_comp32.c Signed-off-by: Christophe Leroy --- arch/powerpc/net/bpf_jit.h| 35 +++ arch/powerpc/net/bpf_jit64.h | 19

[RFC PATCH v1 5/7] powerpc/bpf: Change values of SEEN_ flags

2020-12-16 Thread Christophe Leroy
Because PPC32 will use more non volatile registers, move SEEN_ flags to positions 0-2 which corresponds to special registers. Signed-off-by: Christophe Leroy --- arch/powerpc/net/bpf_jit.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/net/bpf_jit.h

[RFC PATCH v1 4/7] powerpc/bpf: Move common functions into bpf_jit_comp.c

2020-12-16 Thread Christophe Leroy
Move into bpf_jit_comp.c the functions that will remain common to PPC64 and PPC32 when we add support of EBPF for PPC32. Signed-off-by: Christophe Leroy --- arch/powerpc/net/Makefile | 2 +- arch/powerpc/net/bpf_jit.h| 6 + arch/powerpc/net/bpf_jit_comp.c | 269

[RFC PATCH v1 6/7] powerpc/asm: Add some opcodes in asm/ppc-opcode.h for PPC32 eBPF

2020-12-16 Thread Christophe Leroy
: Christophe Leroy --- arch/powerpc/include/asm/ppc-opcode.h | 12 1 file changed, 12 insertions(+) diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/arch/powerpc/include/asm/ppc-opcode.h index ed161ef2b3ca..5b60020dc1f4 100644 --- a/arch/powerpc/include/asm/ppc-opcode.h +++ b/arch

[RFC PATCH v1 2/7] powerpc/bpf: Change register numbering for bpf_set/is_seen_register()

2020-12-16 Thread Christophe Leroy
Instead of using BPF register number as input in functions bpf_set_seen_register() and bpf_is_seen_register(), use CPU register number directly. Signed-off-by: Christophe Leroy --- arch/powerpc/net/bpf_jit_comp64.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff

[RFC PATCH v1 7/7] powerpc/bpf: Implement extended BPF on PPC32

2020-12-16 Thread Christophe Leroy
BPF_ALU64 | BPF_DIV | BPF_K: /* dst /= imm */ Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig |2 +- arch/powerpc/net/Makefile |2 +- arch/powerpc/net/bpf_jit.h|4 + arch/powerpc/net/bpf_jit32.h | 58 ++ arch/powerpc/net/bpf_jit_comp3

[RFC PATCH v1 1/7] powerpc/bpf: Remove classical BPF support for PPC32

2020-12-16 Thread Christophe Leroy
!= 1305 FAIL (1 times) test_bpf: Summary: 371 PASSED, 7 FAILED, [119/366 JIT'ed] Fixing this is not worth the effort. Instead, remove support for classical BPF and prepare for adding Extended BPF support instead. Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig

[RFC PATCH v1 0/7] Implement EBPF on powerpc32

2020-12-16 Thread Christophe Leroy
This series implements extended BPF on powerpc32. For the implementation details, see the last patch. Below are the results on a powerpc 885 at 132 MHz: - with the patch, with and without bpf_jit_enable - without the patch, with bpf_jit_enable (ie with CBPF) With the patch, with bpf_jit_enable =

Re: [RFC PATCH v1 7/7] powerpc/bpf: Implement extended BPF on PPC32

2020-12-17 Thread Christophe Leroy
Le 17/12/2020 à 07:11, Alexei Starovoitov a écrit : On Wed, Dec 16, 2020 at 10:07:37AM +, Christophe Leroy wrote: Implement Extended Berkeley Packet Filter on Powerpc 32 Test result with test_bpf module: test_bpf: Summary: 378 PASSED, 0 FAILED, [354/366 JIT'ed]

powerpc32: BUG: KASAN: use-after-free in test_bpf_init+0x6f8/0xde8 [test_bpf]

2020-12-01 Thread Christophe Leroy
I've got the following KASAN error while running test_bpf module on a powerpc 8xx (32 bits). That's reproductible, happens each time at the same test. Can someone help me to investigate and fix that ? [ 209.381037] test_bpf: #298 LD_IND byte frag [ 209.383041] Pass 1: shrink = 0, seen = 0x30

Re: powerpc32: BUG: KASAN: use-after-free in test_bpf_init+0x6f8/0xde8 [test_bpf]

2020-12-01 Thread Christophe Leroy
Le 01/12/2020 à 15:03, Christophe Leroy a écrit : I've got the following KASAN error while running test_bpf module on a powerpc 8xx (32 bits). That's reproductible, happens each time at the same test. Can someone help me to investigate and fix that ? [  209.381037] test_bpf: #

Re: [PATCH 14/20] ethernet: ucc_geth: don't statically allocate eight ucc_geth_info

2020-12-08 Thread Christophe Leroy
Le 05/12/2020 à 20:17, Rasmus Villemoes a écrit : struct ucc_geth_info is somewhat large, and on systems with only one or two UCC instances, that just wastes a few KB of memory. So allocate and populate a chunk of memory at probe time instead of initializing them all during driver init. Note

Re: [PATCH 15/20] ethernet: ucc_geth: use UCC_GETH_{RX, TX}_BD_RING_ALIGNMENT macros directly

2020-12-08 Thread Christophe Leroy
Le 05/12/2020 à 20:17, Rasmus Villemoes a écrit : These macros both have the value 32, there's no point first initializing align to a lower value. If anything, one could throw in a BUILD_BUG_ON(UCC_GETH_TX_BD_RING_ALIGNMENT < 4), but it's not worth it - lots of code depends on named constants

Re: [PATCH 18/20] ethernet: ucc_geth: add helper to replace repeated switch statements

2020-12-08 Thread Christophe Leroy
Le 05/12/2020 à 20:17, Rasmus Villemoes a écrit : The translation from the ucc_geth_num_of_threads enum value to the actual count can be written somewhat more compactly with a small lookup table, allowing us to replace the four switch statements. Signed-off-by: Rasmus Villemoes --- drivers

Looking for guidance for porting home made audio driver to ASoC/FSL

2020-07-04 Thread Christophe Leroy
Hello I'm looking for guidance for porting a home made audio driver to ASoC/FSL on a custom board. The board has an MPC8321 freescale/NXP cpu. The board has a TDM bus connected to one of the cpu TDM port. On that TDM bus, there are three IDT 821034 quad codecs (PCM G.711) and an E1 chip that

[PATCH] SUNRPC: Add missing asm/cacheflush.h

2020-06-14 Thread Christophe Leroy
[-Wundef] #if ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE ^ Fixes: ca07eda33e01 ("SUNRPC: Refactor svc_recvfrom()") Signed-off-by: Christophe Leroy --- I detected this on linux-next on June 4th and warned Chuck. Seems like it went into mainline anyway. net/sunrpc/svcsock.c | 1 + 1

Re: [PATCH] SUNRPC: Add missing asm/cacheflush.h

2020-06-14 Thread Christophe Leroy
Le 14/06/2020 à 20:57, Chuck Lever a écrit : Hi Christophe - On Jun 14, 2020, at 1:07 PM, Christophe Leroy wrote: Even if that's only a warning, not including asm/cacheflush.h leads to svc_flush_bvec() being empty allthough powerpc defines ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE.

[PATCH v2] SUNRPC: Add missing definition of ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE

2020-06-14 Thread Christophe Leroy
[-Wundef] #if ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE ^ Include linux/highmem.h so that asm/cacheflush.h will be included. Reported-by: Christophe Leroy Reported-by: kernel test robot Cc: Chuck Lever Fixes: ca07eda33e01 ("SUNRPC: Refactor svc_recvfrom()") Signed-off-by: Christophe

Re: [PATCH] ucc_geth: Reset BQL queue when stopping device

2019-01-28 Thread Christophe Leroy
Hi, Le 28/01/2019 à 10:07, Mathias Thore a écrit : After a timeout event caused by for example a broadcast storm, when the MAC and PHY are reset, the BQL TX queue needs to be reset as well. Otherwise, the device will exhibit severe performance issues even after the storm has ended. What are th

Application of f8b39039cbf2a15f ("net: fs_enet: do not call phy_stop() in interrupts") to 4.9 and 4.14 stable

2018-10-17 Thread Christophe LEROY
Hi, Could you please apply f8b39039cbf2a15f2b8c9f081e1cbd5dee00aaf5 to 4.9 and 4.14 ? It fixes an Oops when Ethernet transmission times out. As you can observe in the commit log, the Oops what initially observed in 4.9. The fix has been in mainline since 4.15 Thanks Christophe

Re: Application of f8b39039cbf2a15f ("net: fs_enet: do not call phy_stop() in interrupts") to 4.9 and 4.14 stable

2018-11-07 Thread Christophe LEROY
ping ? Le 17/10/2018 à 14:08, Christophe LEROY a écrit : Hi, Could you please apply f8b39039cbf2a15f2b8c9f081e1cbd5dee00aaf5 to 4.9 and 4.14 ? It fixes an Oops when Ethernet transmission times out. As you can observe in the commit log, the Oops what initially observed in 4.9. The fix