bus_{read, write}_8 has been replace to bus_space{read,write} series in sys/bus.h.
Therefore, implement bus_{read,write}_8 won't work. Implementing the underlying
bus_space_{read, write} functions instead.
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Huh, I hadn't thought of doing it this way. This does seem like a better approach than D58318 and, assuming there's no concern about other code accidentally using these (which is no different to the intent of the existing bus_read_8/bus_write_8 stubbing), reintroducing the READ8/WRITE8 macros (whether called that or something else).
bus_read_8 has been replace to bus_space_read series in sys/bus.h.
Not sure what "bus_space_read series" is though, should that not be bus_space_read_8?
Also should probably be using read/write not just read everywhere in the commit message.
Sorry, it should be bus_space_{read,write} series.
Also should probably be using read/write not just read everywhere in the commit message.
I changed both parts you suggested. I'll reflect those changes in the final commit message. Thanks!
All of the consumers of this header is related to apei. But I think we can have apeivar_private.h if you want.
The _8 suffix remains unchanged before and after my patch. The purpose of this change is to replace the original bus_ series with the bus_space_ series.
Ok, I think I now can decipher what you're trying to get at. What you're trying to say, I think, is something like the following?
bus_{read,write}_8 are macro wrappers around the corresponding bus_space functions in sys/bus.h, so implementing bus_{read,write}_8 won't work. Implement the underlying bus_space functions instead.
No worries; normally these things are understandable even if they don't read as perfect English, but in this case for whatever reason I couldn't quite follow it :')
Might I suggest you use my interpretation as inspiration for amending your own message? (I mean, you can just copy the whole thing if you want, but you may prefer it to sound more like you!)
Yes, I plan to do so (copy and paste). Will reflect on the final commit msg. Thanks!
Comparing to sys/x86/include/bus.h and sys/dev/ntb/ntb_hw/ntb_hw_*.c, they just call the bus_space_tag_t parameter tag, and sys/x86/include/bus.h calls the bus_space_handle_t parameter bsh while ntb calls it handle. I think you could simplify those names. A verbatim copy of ntb's definitions would seem fine.
But those are style issues. Logic LGTM.