Skip to content

Commit c3a43c7

Browse files
committed
pci: ipc performance fixes and cleanup
1 parent 9eeba5b commit c3a43c7

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

devices/pci/src/io.c

+3-17
Original file line numberDiff line numberDiff line change
@@ -60,20 +60,6 @@ uint64_t parseHex(const char *str) {
6060
return num;
6161
}
6262

63-
/* pciParseAddress(): parses a string in the format of bb.ss.ff
64-
* params: str - source string
65-
* params: bus - destination buffer for the bus
66-
* params: slot - destination buffer for the slot
67-
* params: function - destination buffer for the function
68-
* returns: nothing
69-
*/
70-
71-
static void pciParseAddress(const char *str, uint8_t *bus, uint8_t *slot, uint8_t *function) {
72-
*bus = parseHex(str);
73-
*slot = parseHex(str+3);
74-
*function = parseHex(str+6);
75-
}
76-
7763
/* pciReadFile(): reads from a PCI configuration space file under /dev/pci/
7864
* params: rcmd - read command message
7965
* returns: nothing, response relayed to devfs
@@ -87,14 +73,14 @@ void pciReadFile(RWCommand *rcmd) {
8773
if(!file) {
8874
rcmd->header.header.status = -ENOENT;
8975
rcmd->length = 0;
90-
luxSendDependency(rcmd);
76+
luxSendKernel(rcmd);
9177
return;
9278
}
9379

9480
if(rcmd->position >= file->size) {
9581
rcmd->header.header.status = -EIO;
9682
rcmd->length = 0;
97-
luxSendDependency(rcmd);
83+
luxSendKernel(rcmd);
9884
return;
9985
}
10086

@@ -107,5 +93,5 @@ void pciReadFile(RWCommand *rcmd) {
10793
rcmd->header.header.status = truelen;
10894
rcmd->header.header.length += truelen;
10995
rcmd->position += truelen;
110-
luxSendDependency(rcmd);
96+
luxSendKernel(rcmd);
11197
}

0 commit comments

Comments
 (0)