WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@Project516
Copy link
Owner

This pull request includes several updates related to submodule management, GPIO initialization, and packaging scripts. The most significant changes are grouped below:

Submodule and Dependency Updates:

  • Updated the URL for the drivers/lego submodule in .gitmodules to point to project516/lego-linux-drivers instead of the previous ev3dev repository.
  • Updated the drivers/lego submodule to a new commit (bec2d381...) to reflect the latest changes from the new upstream.

Platform Device Initialization:

  • Changed GPIO initialization in legoev3_fiq_probe (arch/arm/mach-davinci/legoev3-fiq.c) to use gpio_request followed by an explicit call to gpio_direction_output, improving clarity and compatibility.

Build and Packaging:

  • Modified the bindeb-pkg build rule in scripts/Makefile.package to pass the -d flag to dpkg-buildpackage, which disables checking of build dependencies, potentially streamlining package builds in certain environments.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request updates the ev3-kernel codebase to achieve compatibility with kernel version 6.12.60. The changes focus on dependency management, deprecated API replacement, and build configuration adjustments.

Key Changes:

  • Migrated the lego-linux-drivers submodule to a new upstream repository (project516) and updated to the latest commit
  • Replaced deprecated gpio_request_one with the modern two-step gpio_request + gpio_direction_output pattern
  • Modified the Debian package build process to skip dependency checks for streamlined builds

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
.gitmodules Updates submodule URL to point to new upstream repository (project516/lego-linux-drivers)
drivers/lego Updates submodule commit reference to latest version from new upstream
arch/arm/mach-davinci/legoev3-fiq.c Replaces deprecated GPIO API with modern two-step initialization pattern
scripts/Makefile.package Adds -d flag to dpkg-buildpackage to disable build dependency checks

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Project516 Project516 marked this pull request as ready for review December 12, 2025 19:58
@Project516 Project516 merged commit 015b8fe into trixie Dec 12, 2025
0 of 2 checks passed
@Project516 Project516 deleted the trixie-dev branch December 12, 2025 19:59
Project516 pushed a commit that referenced this pull request Dec 18, 2025
[ Upstream commit 163e5f2b96632b7fb2eaa965562aca0dbdf9f996 ]

When using perf record with the `--overwrite` option, a segmentation fault
occurs if an event fails to open. For example:

  perf record -e cycles-ct -F 1000 -a --overwrite
  Error:
  cycles-ct:H: PMU Hardware doesn't support sampling/overflow-interrupts. Try 'perf stat'
  perf: Segmentation fault
      #0 0x6466b6 in dump_stack debug.c:366
      #1 0x646729 in sighandler_dump_stack debug.c:378
      #2 0x453fd1 in sigsegv_handler builtin-record.c:722
      #3 0x7f8454e65090 in __restore_rt libc-2.32.so[54090]
      #4 0x6c5671 in __perf_event__synthesize_id_index synthetic-events.c:1862
      #5 0x6c5ac0 in perf_event__synthesize_id_index synthetic-events.c:1943
      ev3dev#6 0x458090 in record__synthesize builtin-record.c:2075
      ev3dev#7 0x45a85a in __cmd_record builtin-record.c:2888
      ev3dev#8 0x45deb6 in cmd_record builtin-record.c:4374
      ev3dev#9 0x4e5e33 in run_builtin perf.c:349
      ev3dev#10 0x4e60bf in handle_internal_command perf.c:401
      ev3dev#11 0x4e6215 in run_argv perf.c:448
      ev3dev#12 0x4e653a in main perf.c:555
      ev3dev#13 0x7f8454e4fa72 in __libc_start_main libc-2.32.so[3ea72]
      ev3dev#14 0x43a3ee in _start ??:0

The --overwrite option implies --tail-synthesize, which collects non-sample
events reflecting the system status when recording finishes. However, when
evsel opening fails (e.g., unsupported event 'cycles-ct'), session->evlist
is not initialized and remains NULL. The code unconditionally calls
record__synthesize() in the error path, which iterates through the NULL
evlist pointer and causes a segfault.

To fix it, move the record__synthesize() call inside the error check block, so
it's only called when there was no error during recording, ensuring that evlist
is properly initialized.

Fixes: 4ea648a ("perf record: Add --tail-synthesize option")
Signed-off-by: Shuai Xue <[email protected]>
Signed-off-by: Namhyung Kim <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants