When a cherry pick has already been completed this can confuse pickman
and make it hard for a reviewer to figure out what is going on.
Attempt to detect already-applied commits (by commit subject) as a way
to reduce duplicate cherry-picks and improve the reliability of the
automation.
The agent now compares actual patch content using git show and diff,
only skipping commits that are similar with minor differences like
line numbers or conflict resolutions. This should reduces false
positives while maintaining robust duplicate detection.
Series-to: concept
Cover-letter:
pickman: Provide better ways to check cherry-picks
After a few weeks of using this tool a couple of things have come to
light, mostly in a recent attempt to cherry-pick ~260 commits.
Firstly, it is hard to manually check a cherry-pick against the
original. The GitLab GUI allows you to click on both, but it does not
give a sense of the detail.
Secondly, commits have sometimes already been applied to the tree, but
in this case effort is still paid to cherry pick it, sometimes with
unfortunate results.
Thirdly, building once at the end does not catch every problems. In the
case in question, about five commits were mangled, three of which would
have been caught by doing a build.
This series introduces a new 'check' command which provides a simple
check of the diff delta between an original commit and its cherry pick.,
thus providing a list of suspect cherry-picks, e.g. (omitting some long
lines):
Cherry-pick Delta% Original Subject
----------- ------ ---------- -------
aaea489b2a 100 9bab7d2a7c net: wget: let wget_with_dns work with
e557daec17 100 f0315babfb hash: Plumb crc8 into the hash functions
08a86f1769 40 6acada5daa configs: j7*: Enable TI_COMMON_CMD_OPTIONS
de37f6abb6 100 fc37a73e66 fdt: Swap the signature for
d1437b065a 100 e2cc9b4fc1 tools: binman: add 'fit, encrypt' property
09b800b0df 100 12d7be498a Docker/CI: Only test Xtensa on amd64 hosts
0256d8140c 100 ece1631f5e test/cmd/wget: replace bogus response with
e005799d8f 33 15e0c5e390 lmb: Remove lmb_alloc_addr_flags()
eaba5aae8f 79 99afa58e6d sandbox: Correct guard around readq/writeq
c347fb4b1a 41 99145eec2d x86: select CONFIG_64BIT for X86_64
14192a60e0 89 60a684e0a9 trace: add support for 'trace wipe'
8f58cfe76d 66 905204ddcf test: test_trace.py: test 'trace wipe'
12 problem commit(s) found
The -d option shows a diff of the patch diffs, which can aid a fast
review.
This series also includes some updates to the agent prompt to build
after each commit, some refactoring and tidy-ups to remove pylint
warnings and a way to tell the agent about possible already-applied
commits.
Further refinements will likely be needed as time goes on.
END
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Create an AgentCommit namedtuple for passing data to the agent to save
confusing about ordering.
Document CommitInfo while we are here.
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Add a --diff/-d option to the check command that displays the difference
between the original commit and the cherry-picked commit for commits
which show a large discrepancy. This helps identify what changed during
the cherry-pick process.
Also add a --no-colour option to disable coloured output when needed,
e.g. when outputting to a log file.
Features:
- Shows unified diff between original and cherry-picked patch content
- Uses coloured output by default, can be disabled with --no-colour
- Works in both verbose and summary modes
- Includes comprehensive tests for both colour modes
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Some cherry-picks end up with large deltas compared to their original
commits, indicating potential problems. Add a check command to identify
these commits for review.
The check command:
- Analyses all commits on current branch vs ci/master
- Compares original vs cherry-picked commit statistics
- Shows commits with deltas above threshold (default 20%)
- Supports verbose mode with detailed analysis
- Color codes results: red ≥50%, yellow ≥threshold
- Skips merge commits and small commits (default <10 lines)
Also enhance the cherry-pick agent to:
- Check delta after each commit and build validation
- Attempt recovery for large deltas before continuing
- Build each commit individually for early problem detection
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Add per-commit delta-checking and build-validation to the cherry-pick
and review agents:
- Check commit deltas after each cherry-pick to catch problems early
- Run buildman after each commit instead of only at the end
- Add recovery strategies for commits with large deltas
- Include delta checking in rebase operations
- Improve error handling and reporting
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Add too-many-positional-arguments to existing pylint-disable comments
for functions with many parameters:
- agent.py: 4 functions updated
- control.py: 1 function updated
- database.py: 2 functions updated
- gitlab_api.py: 1 function updated
These functions require many parameters for their interface contracts
and the warnings don't add value.
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Replace long, hardcoded URLs in tests with named constants defined at
the top of the file. This improves code maintainability by providing a
single point of change for test URLs and helps with line-length
violations.
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Break long lines to comply with 80-character limit and remove trailing
whitespace across agent.py, control.py, database.py, gitlab_api.py, and
__main__.py
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Judith Mendez <jm@ti.com> says:
This patch series adds config options for Sitara K3 boards
to support MMC UHS modes.
While testing with SD card boot and eMMC boot,
found missing eMMC boot support for am62ax in am62a7_init,
patch 1/7, and missing config option to support eMMC boot.
While we are here, for am62ax, enable config option to
change MMC bus modes and enable r5 SDHCI ADMA for faster boot
time.
Also for all k3 Sitara boards, cleanup MMC ENV configs that
are no longer needed since we no longer load env from MMC
device.
Link: https://lore.kernel.org/r/20241220203704.2076499-1-jm@ti.com
(cherry picked from commit abc4a9dbfd)
Add the basic 'hello world ta' command which increment
of the value passed. This provides easy test for
establishing a session with OP-TEE TA and verify.
It includes following "hello world ta" subcommands:
optee hello; default value '0' is passed and gets incremented.
optee hello <value>; value to increment via OP-TEE HELLO
WORLD TA.
To enable the OP-TEE side HELLO WORLD example please refer
https://optee.readthedocs.io/en/latest/building/gits/optee_examples/optee_examples.html
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
(cherry picked from commit e3cf80fbe0)
Enable MMC_SPEED_MODE_SET config option in defconfig to enable
changing MMC bus modes with mmc rescan for am62ax device.
Signed-off-by: Judith Mendez <jm@ti.com>
(cherry picked from commit 9cdb04101d)
Enable SPL_MMC_SDHCI_ADMA config option for r5 SPL
to improve boot time during r5 SPL stage.
Signed-off-by: Judith Mendez <jm@ti.com>
(cherry picked from commit 72355e74db)
Since we do not load env from MMC device anymore, remove
any MMC env config options.
Signed-off-by: Judith Mendez <jm@ti.com>
(cherry picked from commit c106c882bd)
This adds FS and raw boot mode support for eMMC similar to other K3
platforms.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
(cherry picked from commit aa14b5ec13)
Linux DTS compatible MDIO bitbanging driver.
Both clause 22 and clause 45 MDIO supported and validated.
Heavily based on the Linux drivers (more or less the same code base).
Signed-off-by: Markus Gothe <markus.gothe@genexis.eu>
(cherry picked from commit 3912611cd1)
This reverts commit 431be621c6.
Section 3.3 of Reduced Gigabit Media Independent Interface (RGMII)
Version 2.0 (4/1/2002) details that a PHYs using a ~2ns internal delay
are referred to as RGMII-ID. This internal delay is optional.
Page 147-148 of the Marvell Doc. No. MV-S107146-U0 Rev. F details
timings of the RX/TX delays. We see that with the TX/RX_CLK delay
enabled, our RX/TX_CTL signal is shifted w.r.t CLK to reflect the delay
added.
In 431be62 there is no timing difference between RGMII and RGMII-ID, and
so programmers wanting to explicitly set their PHY to RGMII will find
that delay added anyway. This could throw off timing if that internal
delay is undesired.
We should be handling all 4 possible RGMII cases of PHY_INTERFACE_MODE:
RGMII, RGMII_ID, RGMII_TXID, and RGMII_RXID. Reverting 431be62
implements this.
See also m88e1111_config_init_rgmii_delays in the equivalent driver in
Linux (drivers/net/phy/marvell.c), which does not set these delays in
RGMII mode.
68e6eca was tested out on an 88E1512 PHY in RGMII-ID mode. This
reversion has been tested by myself on an 88E1518 in RGMII-ID mode. This
patch affects boards using this driver in "rgmii" mode, as the internal
delay will no longer be enabled. Namely kikwood-nsa310s.
Signed-off-by: Rufus Segar <rhs@riseup.net>
(cherry picked from commit c5cda4ae4a)
Move to using OF_UPSTREAM config and thus using the devicetree
subtree and remove unused device tree files.
Signed-off-by: Udit Kumar <u-kumar1@ti.com>
Acked-by: Sumit Garg <sumit.garg@linaro.org>
(cherry picked from commit d4749f55f2)
Currently the driver relies on bootph flag to probe it during PRE_RELOC
stage but with the upcoming cleanup of v6.13, we don't have the bootph
property in the parent nodes anymore and ti_sci driver being one of the
parent nodes required during SPL stage would end up hampering the probe
model [0].
Add DM_FLAG_PRE_RELOC to ti_sci driver for mitigating this issue.
[0]: https://source.denx.de/u-boot/custodians/u-boot-dm/-/issues/21
Suggested-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
(cherry picked from commit 998e00cfce)
The Texas Instruments Foundational Security (TIFS) firmware must match
the security level configured on the SoC. To boot Security Enforced (SE)
variants of the AM62Px, add another tiboot3 build which packages the
Security Enforced (SE) firmware variant for AM62Px SoCs.
Signed-off-by: Bryan Brattlof <bb@ti.com>
(cherry picked from commit 8fa355d822)
OSPI Boot requires overrides specific to R5 and also
to use DMA in R5 SPL stage the DM_TIFS needs to be used.
Add the corresponding overrides for R5 SPL stage.
Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com>
Signed-off-by: Prasanth Babu Mantena <p-mantena@ti.com>
Reviewed-by: Udit Kumar <u-kumar1@ti.com>
(cherry picked from commit 1c4eeff48c)
The wget command currently cannot work correctly with mtk_eth driver.
This patch fixed this by increase DMA ring size and invalidate ring data
after use.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
(cherry picked from commit c949686e55)
Enable GDMA cpu bridge only when 10Gb interface is enabled for GMAC other
than GMAC0, or when MT7988 internal switch is used.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
(cherry picked from commit b9dfb5636b)
Not all platforms supports sgmii and/or usxgmii. So we add Kconfig
options for these features and enable them only for supported
platforms.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
(cherry picked from commit 5ac929fd1a)
MT7629 need extra setting for gmac2 to work. So additional
capability is added for mt7629 to handle this case.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
(cherry picked from commit d8d7e56654)