Re: [PATCH v2] ARC: bpf: Correct conditional check in 'check_jmp_32'

2024-11-15 Thread Shahab Vahedi
Hi Vineet, Could you pick up this patch [1] in your "next"? Thanks, Shahab [1] https://lore.kernel.org/bpf/920e71ab-2375-4722-bcf3-d6aaf8e68...@vahedi.org/T/#t ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.o

Re: [PATCH v2] ARC: bpf: Correct conditional check in 'check_jmp_32'

2024-11-13 Thread Shahab Vahedi
disp = get_displacement(curr_off + addendum, targ_off); > > -   if (ARC_CC_AL) > +   if (cond == ARC_CC_AL) >     return is_valid_far_disp(disp); >     else >     return is_valid_near_disp(disp); > -- > 2.43.0 Thank you for your contribution! Acked-by:

Re: [PATCH] ARC: bpf_jit_arcv2: Remove redundant condition check

2024-11-13 Thread Shahab Vahedi
Hardev wrote: > Shahab wrote:  > > > > Vadim wrote: > > > > > > > > > The original code is obviously optimized out, but the intention, I > > > believe, was to check if the jump is conditional or not. > > > So the proper fix should change the code to check cond: > > > > > > - if (ARC_CC_AL) >

Re: [PATCH] ARC: bpf_jit_arcv2: Remove redundant condition check

2024-11-12 Thread Shahab Vahedi
Vadim Fedorenko wrote: > The original code is obviously optimized out, but the intention, I > believe, was to check if the jump is conditional or not. > So the proper fix should change the code to check cond: > > - if (ARC_CC_AL) > + if (cond == ARC_CC_AL) That is absolutely correct. If a new p

Re: [PATCH] arc: rename aux.h to arc_aux.h

2024-09-25 Thread Shahab Vahedi
lore.kernel.org/linux-snps-arc/20240520142647.70440-1-egyszer...@freemail.hu/T/#u > > https://patchwork.ozlabs.org/project/linux-arc/patch/20240520142647.70440-1-egyszer...@freemail.hu/ They look good to me. Thank you Szőke! Reviewed-by: Shahab Vahedi Cheers, Shahab _

[PATCH bpf-next] MAINTAINERS: BPF ARC JIT: update my e-mail address

2024-09-09 Thread Shahab Vahedi
The previous e-mail address from Synopsys is not available anymore. Signed-off-by: Shahab Vahedi Cc: Vineet Gupta Cc: Francois Bedard Cc: linux-snps-arc@lists.infradead.org Cc: Alexei Starovoitov --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS

[PATCH bpf-next] ARC, bpf: Fix issues reported by the static analyzers

2024-05-24 Thread Shahab Vahedi
From: Shahab Vahedi Also updated couple of comments along the way. One of the issues reported was indeed a bug in the code: memset(ctx, 0, sizeof(ctx)) // original line memset(ctx, 0, sizeof(*ctx)) // fixed line That was a nice catch. Reported-by: kernel test robot Closes

[PATCH 6/7] v2: Fix most of the "Checks" from "checkpatch.pl"

2024-04-30 Thread Shahab Vahedi
From: Shahab Vahedi If they're left untouched, then it was decided like that. The command that was used for checkpatch.pl: $ checkpatch.pl ... --strict --no-signoff \ --ignore AVOID_BUG,SPLIT_STRING,COMMIT_MESSAGE \

[PATCH 7/7] v2: Check "bpf_jit_binary_lock_ro()" return value

2024-04-30 Thread Shahab Vahedi
From: Shahab Vahedi ...after the rebase. --- arch/arc/net/bpf_jit_core.c | 29 - 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/arch/arc/net/bpf_jit_core.c b/arch/arc/net/bpf_jit_core.c index 00c99b339b4a..6f6b4ffccf2c 100644 --- a/arch/arc/net

[PATCH 1/7] v2: Turn "emit" from global into a context var

2024-04-30 Thread Shahab Vahedi
From: Shahab Vahedi Plus an easter egg: Add "static" to do_{normal,extra}_pass() proto-type, so GCC won't complain about missing proto-type before invocation. --- arch/arc/net/bpf_jit.h | 14 +- arch/arc/net/bpf_jit_arcv2.c | 409 ++

[PATCH 3/7] v2: Use memset() in jit_ctx_init()

2024-04-30 Thread Shahab Vahedi
From: Shahab Vahedi --- arch/arc/net/bpf_jit_core.c | 21 + 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/arch/arc/net/bpf_jit_core.c b/arch/arc/net/bpf_jit_core.c index 79ec0bbf1153..9c0fdd514967 100644 --- a/arch/arc/net/bpf_jit_core.c +++ b/arch/arc/net

[PATCH 5/7] v2: Fix typos

2024-04-30 Thread Shahab Vahedi
From: Shahab Vahedi --- arch/arc/net/bpf_jit_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arc/net/bpf_jit_core.c b/arch/arc/net/bpf_jit_core.c index 9c0fdd514967..6692272fa1ac 100644 --- a/arch/arc/net/bpf_jit_core.c +++ b/arch/arc/net/bpf_jit_core.c

[PATCH 2/7] v2: Turn "zext_thyself" from global into a context var

2024-04-30 Thread Shahab Vahedi
From: Shahab Vahedi also: - Update some comments along the way. - Refactor the gen_swap()'s "if/else" to present the logic better - Remove "extern" from the proto-type --- arch/arc/net/bpf_jit.h | 14 +- arch/arc/net/bpf_jit_arcv2.c | 51 +

[PATCH 4/7] v2: MAINTAINERS: Add "BPF JIT for ARC" entry

2024-04-30 Thread Shahab Vahedi
From: Shahab Vahedi --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 943921d642ad..b6a946d24f00 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3712,6 +3712,12 @@ S: Maintained F: Documentation/devicetree/bindings/iio/imu/bosch

[off-list] [PATCH 0/7 bpf-next v2] ARC: Add eBPF JIT support

2024-04-30 Thread Shahab Vahedi
From: Shahab Vahedi [off-list] Hi Björn, First and foremost, I apologise that it took me a long time to rework what we have discussed about the first version of "ARC: Add eBPF JIT support" patch. In order to make the second review easier for you, since you already have reviewed P

Re: [PATCH bpf-next v1] ARC: Add eBPF JIT support

2024-04-30 Thread Shahab Vahedi
Shahab Vahedi writes: > > Björn Töpel writes: >> >> Please try to avoid static inline in the C-files. The compiler usually >> knows better. > > I will replace them with "static" then. I have tried [1] this and the test execution time took a perfo

[PATCH bpf-next v2] ARC: Add eBPF JIT support

2024-04-30 Thread Shahab Vahedi
From: Shahab Vahedi This will add eBPF JIT support to the 32-bit ARCv2 processors. The implementation is qualified by running the BPF tests on a Synopsys HSDK board with "ARC HS38 v2.1c at 500 MHz" as the 4-core CPU. The test_bpf.ko reports 2-10 fold improvements in execution time of

Re: [PATCH bpf-next v1] ARC: Add eBPF JIT support

2024-03-05 Thread Shahab Vahedi
Hi Björn, Thank you very much for your inputs. Please find my remarks below. Björn Töpel writes: > Shahab Vahedi writes: > > What's the easiest way to test test this w/o ARC HW? Is there a qemu > port avaiable? Yes, there is a (downstream) port available on GitHub [1]. If

Re: [PATCH bpf-next v1] ARC: Add eBPF JIT support

2024-02-26 Thread Shahab Vahedi
Hello list, I know this is not a small patch, but could someone skim over it? If there's anything that I can do to make the review process easier, please let me know. I already intend to change the "commit message" in the following ways: - Fix a typo: interpretor -> interpreter - Mentioning the

Re: [PATCH bpf-next v1] ARC: Add eBPF JIT support

2024-02-14 Thread Shahab Vahedi
On 2/14/24 03:39, Alexei Starovoitov wrote: > On Tue, Feb 13, 2024 at 5:20 AM Shahab Vahedi wrote: > > Could you share performance numbers interpreter vs JITed ? I see noticeable improvements on every selected test. To list a few: ---8<-- test_bpf: #0

[PATCH bpf-next v1] ARC: Add eBPF JIT support

2024-02-13 Thread Shahab Vahedi
From: Shahab Vahedi This will add eBPF JIT support to the 32-bit ARCv2 processors. The implementation is qualified by running the BPF tests on a Synopsys HSDK board with "ARC HS38 v2.1c at 500 MHz" as the 4-core CPU. Deployment and structure The related codes

Re: [PATCH 13/21] arc: dma-mapping: skip invalidating before bidirectional DMA

2023-04-06 Thread Shahab Vahedi
e like arm/arm64/xtensa instead, and use just a >> writeback before the DMA when we do the invalidate afterwards. >> >> Signed-off-by: Arnd Bergmann > > Reviewed-by: Vineet Gupta > > Shahab can you give this a spin on hsdk - run glibc testsuite over ssh > and make

Re: [PATCH net 1/1] net: stmmac: check fwnode for phy device before scanning for phy

2023-04-05 Thread Shahab Vahedi
Cc Vineet Gupta On 4/5/23 12:07, Shahab Vahedi wrote: > On 4/5/23 11:39, Michael Sit Wei Hong wrote: >> Some DT devices already have phy device configured in the DT/ACPI. >> Current implementation scans for a phy unconditionally even though >> there is a phy listed in th

Re: [PATCH net 1/1] net: stmmac: check fwnode for phy device before scanning for phy

2023-04-05 Thread Shahab Vahedi
here is any phy device listed in > fwnode and decide whether to scan for a phy to attach to.y > > Reported-by: Martin Blumenstingl > Fixes: fe2cfbc96803 ("net: stmmac: check if MAC needs to attach to a PHY") > Signed-off-by: Michael Sit Wei Hong > --- Works fine

Re: [PATCH net v5 2/3] net: stmmac: check if MAC needs to attach to a PHY

2023-04-05 Thread Shahab Vahedi
Fixing the CC header. Apologies for the inconvenience. -- Same happens on ARC HSDK [1]: # dmesg | grep stmmaceth stmmaceth f0008000.ethernet: use coherent DMA ops stmmaceth f0008000.ethernet: IRQ eth_wake_irq not found stmmaceth f0008000.ethernet: IRQ eth_lpi not found stmmaceth f000

Re: [PATCH 13/21] arc: dma-mapping: skip invalidating before bidirectional DMA

2023-04-04 Thread Shahab Vahedi
On 4/2/23 08:52, Vineet Gupta wrote: > CC Shahab > > On 3/27/23 17:43, Arnd Bergmann wrote: >> From: Arnd Bergmann >> >> Some architectures that need to invalidate buffers after bidirectional >> DMA because of speculative prefetching only do a simpler writeback >> before that DMA, while architectu

Re: [Buildroot] [PATCH v4 1/1] package/bpftool: revert bpf_cookie patch to allow building

2023-02-10 Thread Shahab Vahedi
On 2/9/23 21:27, Arnout Vandecappelle wrote: > > On 09/02/2023 13:23, Shahab Vahedi wrote: >> >> On 2/8/23 17:36, Arnout Vandecappelle wrote: >>> >>> It's not clear to me why you did a revert of the cookie feature rather than >>> using those

Re: [Buildroot] [PATCH v4 1/1] package/bpftool: revert bpf_cookie patch to allow building

2023-02-09 Thread Shahab Vahedi
Hi Arnout, On 2/8/23 17:36, Arnout Vandecappelle wrote: > > It's not clear to me why you did a revert of the cookie feature rather than > using those patches. I think the first two or three should be sufficient to > fix your issue? Ideally, the correct way would be applying that pending series.

[PATCH v3 2/2] ARC: update definitions in elf/elf.h

2022-11-27 Thread Shahab Vahedi
/tst-strerror UNSUPPORTED: string/tst-strsignal UNSUPPORTED: time/tst-clock_settime UNSUPPORTED: time/tst-settimeofday Summary of test results: 21 FAIL 4184 PASS 69 UNSUPPORTED 16 XFAIL 2 XPASS Signed-off-by: Shahab Vahedi --- ChangeLog: v3: - Fix a collision in glibcelf.py

[PATCH v3 1/2] scripts: Add "|" operator support to glibcpp's parsing

2022-11-27 Thread Shahab Vahedi
e "/src/glibc/scripts/glibcelf.py", line 223, in _parse_elf_h raise IOError('parse error in elf.h') OSError: parse error in elf.h [1] ARC: update definitions in elf/elf.h https://sourceware.org/pipermail/libc-alpha/2022-November/143503.html [2] tst-glibcelf, tst-relro-l

[PATCH v3 0/2] Update ARC definitions in elf/elf.h

2022-11-27 Thread Shahab Vahedi
second one is related to the actual update of definitions in elf.h header. Rationale for the CCs: Florian Weimer -- Changes related to glibcpp and glibcelf Vineet Gupta -- Changes related to elf.h (ARC section) Shahab Vahedi (2): scripts: Add "|" operator support to glibcpp'

Re: [PATCH] ARC: update definitions in elf/elf.h

2022-11-21 Thread Shahab Vahedi
Hi Vineet, FYI, a second version of the patch is submitted [1]. Regarding what has changed, a changelog is put right after the sign-off line. On 11/19/22 01:34, Vineet Gupta wrote: > On 11/18/22 05:15, Shahab Vahedi wrote: >> The majority of the update is about adding new de

[PATCH v2] ARC: update definitions in elf/elf.h

2022-11-21 Thread Shahab Vahedi
https://sourceware.org/pipermail/elfutils-devel/2022q4/005530.html [2] https://sourceware.org/pipermail/elfutils-devel/2022q4/005548.html Signed-off-by: Shahab Vahedi --- Chagelog: v2: - Rename instances of R_ARC_JUMP_SLOT to R_ARC_JMP_SLOT. - Remove an unnecessary extra empty line introduced in elf/

Re: [PATCH v2 3/5] memblock: allow to specify flags with memblock_add_node()

2021-10-04 Thread Shahab Vahedi
t; } else { > #ifdef CONFIG_HIGHMEM > high_mem_start = base; > high_mem_sz = size; > in_use = 1; > - memblock_add_node(base, size, 1); > + memblock_add_node(base, size, 1, MEMBLOCK_NONE); > memblock_reserve(b

Re: [PATCH 3/3] memblock: cleanup memblock_free interface

2021-09-23 Thread Shahab Vahedi
y: Linus Torvalds > Signed-off-by: Mike Rapoport arch/arc part: Reviewed-by: Shahab Vahedi Thanks, Shahab ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc

Re: [PATCH] clocksource: arc_timer: eliminate redefined macro error

2021-09-23 Thread Shahab Vahedi
Hi Randy, I have one minor comment. On 9/23/21 5:18 AM, Randy Dunlap wrote: > > --- linux-next-20210917.orig/include/soc/arc/timers.h > +++ linux-next-20210917/include/soc/arc/timers.h > @@ -17,7 +17,7 @@ > #define ARC_REG_TIMER1_CNT 0x100 /* timer 1 count */ > > /* CTRL reg bits */ > -#

Re: [PATCH] ARC: entry: fix off-by-one error in syscall number validation

2021-04-29 Thread Shahab Vahedi
On 4/23/21 9:52 PM, Vineet Gupta wrote: > diff --git a/arch/arc/kernel/entry.S b/arch/arc/kernel/entry.S > index 1743506081da..aea9b558993d 100644 > --- a/arch/arc/kernel/entry.S > +++ b/arch/arc/kernel/entry.S > @@ -255,7 +255,7 @@ ENTRY(EV_Trap) > ; Normal syscall case > >

Re: [PATCH 04/15] arc: TCG and decoder glue code and helpers

2021-01-15 Thread Shahab Vahedi
Hi Richard, On 12/1/20 10:35 PM, Richard Henderson wrote: > On 11/11/20 10:17 AM, cupertinomira...@gmail.com wrote: >> From: Cupertino Miranda >> +void helper_enter(CPUARCState *env, uint32_t u6) >> +{ >> +/* nothing to do? then bye-bye! */ >> +if (!u6) { >> +return; >> +} >>