diff options
author | Jordan Niethe <jniethe5@gmail.com> | 2019-08-09 14:12:19 +1000 |
---|---|---|
committer | Oliver O'Halloran <oohall@gmail.com> | 2019-08-16 15:51:55 +1000 |
commit | f68639c6fcdf9261290a4601eda1ae6a406ba95a (patch) | |
tree | 5badd225d6b18b5b3595e1181f1697e99c8b388b /include/npu2.h | |
parent | df15dcfc8acc83591889fa3b33100734a6b6bdb7 (diff) | |
download | skiboot-f68639c6fcdf9261290a4601eda1ae6a406ba95a.zip skiboot-f68639c6fcdf9261290a4601eda1ae6a406ba95a.tar.gz skiboot-f68639c6fcdf9261290a4601eda1ae6a406ba95a.tar.bz2 |
pci: Use a macro for accessing PCI BDF Device Number
Currently when the Device Number bits of a BDF are needed the bit
operations to get it are free coded. There are many places where the
Device Number is used, so make a macro to use instead of free coding it
everytime.
Signed-off-by: Jordan Niethe <jniethe5@gmail.com>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Diffstat (limited to 'include/npu2.h')
-rw-r--r-- | include/npu2.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/npu2.h b/include/npu2.h index 372d1be..282ee8b 100644 --- a/include/npu2.h +++ b/include/npu2.h @@ -19,7 +19,7 @@ #define NPU2DEVLOG(l, p, fmt, a...) prlog(l, "NPU%d:%d:%d.%d " fmt, \ (p)->npu->phb_nvlink.opal_id, \ PCI_BUS_NUM((p)->bdfn), \ - ((p)->bdfn >> 3) & 0x1f, \ + PCI_DEV((p)->bdfn), \ (p)->bdfn & 0x7, ##a) #define NPU2DEVDBG(p, fmt, a...) NPU2DEVLOG(PR_DEBUG, p, fmt, ##a) #define NPU2DEVINF(p, fmt, a...) NPU2DEVLOG(PR_INFO, p, fmt, ##a) |