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

hwmon: add ETH support for N300 #9

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

joelsmithTT
Copy link
Contributor

No description provided.

Copy link
Contributor

@olofj olofj left a comment

Choose a reason for hiding this comment

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

I didn't go through the whole diff yet, but meeting means I'd rather send this now than wait until I can do the rest.

eth.c Outdated Show resolved Hide resolved
eth.c Show resolved Hide resolved
eth.c Show resolved Hide resolved
eth.c Outdated Show resolved Hide resolved
eth.c Outdated Show resolved Hide resolved
eth.c Show resolved Hide resolved
@alewycky-tenstorrent
Copy link
Contributor

Sorry, I'm going to go back on something I said earlier. I said that we shouldn't use the fact that BAR4 happens to cover the kernel driver's TLB. But BAR0 can be reduced below 512MB in some systems, so BAR4 is the only assured way to access that TLB. Could you please use BAR4 instead? Conveniently, the last TLB is located at offset 0 in BAR 4.

wormhole.c Outdated Show resolved Hide resolved
eth.c Outdated Show resolved Hide resolved
eth.c Outdated Show resolved Hide resolved
eth.c Outdated Show resolved Hide resolved
eth.c Outdated Show resolved Hide resolved
wormhole.c Outdated Show resolved Hide resolved
wormhole.c Outdated Show resolved Hide resolved
wormhole.c Outdated Show resolved Hide resolved
eth.c Outdated Show resolved Hide resolved
eth.c Outdated Show resolved Hide resolved
eth.c Outdated Show resolved Hide resolved
eth.c Outdated Show resolved Hide resolved
An upcoming change for Metal will require remote transfers to use a
connected ETH core.
@joelsmithTT joelsmithTT force-pushed the joelsmith/wh-eth2 branch 3 times, most recently from 1e37425 to 5890df3 Compare March 8, 2024 16:50
Problem: ETH core request and response queues can not be shared between
processes without synchronization, and KMD uses an ETH core in its hwmon
code path for N300 devices.  Although KMD exposes a locking API,
userspace is free to interact with ETH cores without using this API.

Workaround: track whether processes with an open device have used the
locking API.  If all such processes have used it, assume they are using
it correctly.  If any such process has not used it, assume that we can
not access an ETH core safely and return -EBUSY in the code path for
reading telemetry from the remote chip on an N300 board.
@mikey
Copy link
Contributor

mikey commented May 9, 2024

If I manually merge this with master, it runs CI and the CI passes. 👍
https://github.com/mikey/tt-kmd/actions/runs/9021603861

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.

None yet

4 participants