From: Indrek Kruusa <indrek.kruusa@gmail.com>
To: Nguyen Minh Tien <tien.nguyenminh@embeddedlinux.blog>
Cc: Wilken Gottwalt <wilken.gottwalt@posteo.net>,
Bjorn Andersson <andersson@kernel.org>,
Chen-Yu Tsai <wens@kernel.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Samuel Holland <samuel@sholland.org>,
linux-remoteproc@vger.kernel.org, linux-sunxi@lists.linux.dev,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
Indrek Kruusa <indrek.kruusa@gmail.com>
Subject: Re: [PATCH 0/3] hwspinlock: sun6i: Allwinner D1 and T113 support
Date: Thu, 22 Oct 2026 22:01:15 +0300 [thread overview]
Message-ID: <20261022190203.1998156-1-indrek.kruusa@gmail.com> (raw)
In-Reply-To: <20260927025626.69614-1-tien.nguyenminh@embeddedlinux.blog>
Hi,
I managed to run this patch series on a Sipeed Lichee RV Dock (Allwinner D1),
in this setup:
- FreeRTOS on the HiFi4 DSP, running a task that contends for the lock
- a test kernel module touching the same shared memory, with and without
taking the lock
The series is applied on top of v7.3-rc7.
What I ran:
- probe: 3005000.hwlock binds and the driver reports 32 locks
- mutual exclusion: lock 0, taken alternately by the C906 and the HiFi4.
Each side added 1 to a shared counter under the lock, 1,000,000 times:
counter=2000000 expected=2000000 -> EXACT
tripwire linux=0 dsp=0 -> no overlap
A tripwire field is set while inside the critical section and read by the
other side, so overlap is caught independently of the counter.
- negative control, identical loop with the lock not taken:
counter=1885761 expected=2000000 -> LOST UPDATES (5.7% lost)
tripwire linux=100302 dsp=674915 -> OVERLAP DETECTED
The loss rate in the negative control varies between runs (5-19% observed);
the log linked below is one sample.
Tested-by: Indrek Kruusa <indrek.kruusa@gmail.com>
I put this test setup together with AI assistance. Sources, build
instructions, ready-to-use images (DSP firmware included) for the RV Dock
and for the Nezha (untested), and the captured console logs are here:
https://github.com/ikruusa/d1-hwspinlock-test
Greetings,
Indrek
next prev parent reply other threads:[~2026-10-22 19:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-27 2:56 Nguyen Minh Tien
2026-09-27 2:56 ` [PATCH 1/3] hwspinlock: sun6i: Get the clock and the reset without names Nguyen Minh Tien
2026-09-27 2:56 ` [PATCH 2/3] dt-bindings: hwlock: sun6i: Add compatible for Allwinner D1 Nguyen Minh Tien
2026-09-28 16:51 ` Conor Dooley
2026-09-27 2:56 ` [PATCH 3/3] riscv: dts: allwinner: d1-t113: Add the hardware spinlock Nguyen Minh Tien
2026-09-27 11:27 ` Wilken Gottwalt
2026-09-30 13:02 ` Nguyen Minh Tien
2026-09-30 14:05 ` Wilken Gottwalt
2026-10-02 7:32 ` Conor Dooley
2026-10-02 7:48 ` Wilken Gottwalt
2026-10-02 7:50 ` Chen-Yu Tsai
2026-10-02 8:37 ` Conor Dooley
2026-10-02 7:48 ` Chen-Yu Tsai
2026-10-22 19:01 ` Indrek Kruusa [this message]
2026-10-22 19:19 ` [PATCH 0/3] hwspinlock: sun6i: Allwinner D1 and T113 support Wilken Gottwalt
2026-10-22 19:54 ` Indrek Kruusa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261022190203.1998156-1-indrek.kruusa@gmail.com \
--to=indrek.kruusa@gmail.com \
--cc=andersson@kernel.org \
--cc=jernej.skrabec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=samuel@sholland.org \
--cc=tien.nguyenminh@embeddedlinux.blog \
--cc=wens@kernel.org \
--cc=wilken.gottwalt@posteo.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®