I can't find where the definition of the function pci_bus_read_config_byte()
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I can't find where the definition of the function pci_bus_read_config_byte()
Hi all,
I can't find where the definition of the function pci_bus_read_config_byte() in file linux/pci.h of kernel 2.16.20. Neither as the other versions. I also searched the *.s files and can't find the prototype definition. Is it just a empty function? It seems impossible.
I will use pci_read_config_byte() to read PCI config space byte. It calls pci_bus_read_config_byte() and I can't find the function's definiton. So the problem. Can you help me ? thank you very much!
I use cscope to navigate through source, its more powerfull that vi ctags.
Install cscope, then go in your src root and do
cscope -R
for the kernel it takes some times (on my old machine, 30s) but its far far quicker than grep and stuffs.
Its a very good little tool, to my mind..
result for your question:
in drivers/pci/access.c
Quote:
int pci_bus_read_config_##size \
(struct pci_bus *bus, unsigned int devfn, int pos, type *value) \
{ \
int res; \
unsigned long flags; \
u32 data = 0; \
if (PCI_##size##_BAD) return PCIBIOS_BAD_REGISTER_NUMBER; \
spin_lock_irqsave(&pci_lock, flags); \
res = bus->ops->read(bus, devfn, pos, len, &data); \
*value = (type)data; \
spin_unlock_irqrestore(&pci_lock, flags); \
return res; \
}
Find this C symbol:
Find this global definition:
Find functions called by this function:
Find functions calling this function:
Find this text string:
Change this text string:
Find this egrep pattern:
Find this file:
Find files #including this file:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.