Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize samsung-j3ltespr .dts #82

Closed
wants to merge 6 commits into from
Closed

Initialize samsung-j3ltespr .dts #82

wants to merge 6 commits into from

Conversation

LorenDB
Copy link

@LorenDB LorenDB commented Apr 28, 2020

What works: USB networking with SSH
What doesn't: everything else

Copy link
Member

@stephan-gh stephan-gh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also make these two changes:

};
};

// TODO (wiki): Explain setup of dummy extcon device to make USB work
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;

// cd-gpios = <&msmgpio 38 GPIO_ACTIVE_LOW>;
cd-gpios = <&msmgpio 38 0x1>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#include <dt-bindings/gpio/gpio.h>

/ {
model = "Samsung Galaxy J3 2016";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to make this clear (since there is a variant without qcom), maybe add the model number here

Suggested change
model = "Samsung Galaxy J3 2016";
model = "Samsung Galaxy J3 2016 (SM-J320P)";


usb@78d9000 {
status = "okay";
etm@85e000 { status = "disabled"; };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this shouldn't be here

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. My browser has been doing weird things with copy and paste lately. Will fix it pronto

@LorenDB
Copy link
Author

LorenDB commented Apr 29, 2020

The build is failing but I'm not seeing the trailing whitespace it claims I have in there.

@stephan-gh
Copy link
Member

Well, you have the file twice in here now... (once in wrong path)

@LorenDB
Copy link
Author

LorenDB commented Apr 29, 2020

I think this will not work unless I either remove the first 5 commits and leave the last one only, so I'm going to close this PR and try a new one to streamline things.

@LorenDB LorenDB closed this Apr 29, 2020
K9100ii pushed a commit to K9100ii/msm8916-mainline-linux that referenced this pull request Dec 22, 2023
We can see that "Short form of movsx, dst_reg = (s8,s16,s32)src_reg" in
include/linux/filter.h, additionally, for BPF_ALU64 the value of the
destination register is unchanged whereas for BPF_ALU the upper 32 bits
of the destination register are zeroed, so it should clear the upper 32
bits for BPF_ALU.

[root@linux fedora]# echo 1 > /proc/sys/net/core/bpf_jit_enable
[root@linux fedora]# modprobe test_bpf

Before:
test_bpf: msm8916-mainline#81 ALU_MOVSX | BPF_B jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times)
test_bpf: msm8916-mainline#82 ALU_MOVSX | BPF_H jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times)

After:
test_bpf: msm8916-mainline#81 ALU_MOVSX | BPF_B jited:1 6 PASS
test_bpf: msm8916-mainline#82 ALU_MOVSX | BPF_H jited:1 6 PASS

By the way, the bpf selftest case "./test_progs -t verifier_movsx" can
also be fixed with this patch.

Fixes: f48012f ("LoongArch: BPF: Support sign-extension mov instructions")
Acked-by: Hengqi Chen <hengqi.chen@gmail.com>
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
kaechele pushed a commit to kaechele/msm8953-mainline-linux that referenced this pull request Feb 17, 2024
[ Upstream commit b16904f ]

With latest upstream llvm18, the following test cases failed:

  $ ./test_progs -j
  msm8916-mainline#13/2    bpf_cookie/multi_kprobe_link_api:FAIL
  msm8916-mainline#13/3    bpf_cookie/multi_kprobe_attach_api:FAIL
  msm8916-mainline#13      bpf_cookie:FAIL
  msm8916-mainline#77      fentry_fexit:FAIL
  msm8916-mainline#78/1    fentry_test/fentry:FAIL
  msm8916-mainline#78      fentry_test:FAIL
  msm8916-mainline#82/1    fexit_test/fexit:FAIL
  msm8916-mainline#82      fexit_test:FAIL
  msm8916-mainline#112/1   kprobe_multi_test/skel_api:FAIL
  msm8916-mainline#112/2   kprobe_multi_test/link_api_addrs:FAIL
  [...]
  msm8916-mainline#112     kprobe_multi_test:FAIL
  torvalds#356/17  test_global_funcs/global_func17:FAIL
  torvalds#356     test_global_funcs:FAIL

Further analysis shows llvm upstream patch [1] is responsible for the above
failures. For example, for function bpf_fentry_test7() in net/bpf/test_run.c,
without [1], the asm code is:

  0000000000000400 <bpf_fentry_test7>:
     400: f3 0f 1e fa                   endbr64
     404: e8 00 00 00 00                callq   0x409 <bpf_fentry_test7+0x9>
     409: 48 89 f8                      movq    %rdi, %rax
     40c: c3                            retq
     40d: 0f 1f 00                      nopl    (%rax)

... and with [1], the asm code is:

  0000000000005d20 <bpf_fentry_test7.specialized.1>:
    5d20: e8 00 00 00 00                callq   0x5d25 <bpf_fentry_test7.specialized.1+0x5>
    5d25: c3                            retq

... and <bpf_fentry_test7.specialized.1> is called instead of <bpf_fentry_test7>
and this caused test failures for msm8916-mainline#13/msm8916-mainline#77 etc. except torvalds#356.

For test case torvalds#356/17, with [1] (progs/test_global_func17.c)), the main prog
looks like:

  0000000000000000 <global_func17>:
       0:       b4 00 00 00 2a 00 00 00 w0 = 0x2a
       1:       95 00 00 00 00 00 00 00 exit

... which passed verification while the test itself expects a verification
failure.

Let us add 'barrier_var' style asm code in both places to prevent function
specialization which caused selftests failure.

  [1] llvm/llvm-project#72903

Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20231127050342.1945270-1-yonghong.song@linux.dev
Signed-off-by: Sasha Levin <sashal@kernel.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants