aboutsummaryrefslogtreecommitdiff
path: root/include/pci.h
diff options
context:
space:
mode:
authorRussell Currey <ruscur@russell.cc>2016-08-18 16:42:53 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-08-30 17:02:03 +1000
commit863ac3c5d2f8a5ea5d471167f3da5cb07aab72fc (patch)
tree17f09f160713ecc6bc14928d9ef8cc1c53e65c66 /include/pci.h
parent2b426c488eae5b5ba175ba6a8434d288582347fa (diff)
downloadskiboot-863ac3c5d2f8a5ea5d471167f3da5cb07aab72fc.zip
skiboot-863ac3c5d2f8a5ea5d471167f3da5cb07aab72fc.tar.gz
skiboot-863ac3c5d2f8a5ea5d471167f3da5cb07aab72fc.tar.bz2
pci: Standardise on uint64_t pe_number
Throughout skiboot (and the kernel) PE numbers are named "pe_no", "pe_num" and "pe_number", and sized as 16, 32 and 64bit uints depending on where you look. This is annoying and potentially misleading in cases such as the OPAL API, where different calls have different int sizes even though the PE number they want is the same. Fix this by making *everything* uint64_t pe_number. In doing this, there are some whitespace fixes and mve_number gets dragged into this as well for cases like set_msi_{32/64} where they essentially mean the same thing. Signed-off-by: Russell Currey <ruscur@russell.cc> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include/pci.h')
-rw-r--r--include/pci.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/include/pci.h b/include/pci.h
index 1915adc..61ece8f 100644
--- a/include/pci.h
+++ b/include/pci.h
@@ -213,8 +213,9 @@ struct phb_ops {
uint64_t eeh_action_token);
int64_t (*eeh_freeze_set)(struct phb *phb, uint64_t pe_number,
uint64_t eeh_action_token);
- int64_t (*err_inject)(struct phb *phb, uint32_t pe_no, uint32_t type,
- uint32_t func, uint64_t addr, uint64_t mask);
+ int64_t (*err_inject)(struct phb *phb, uint64_t pe_number,
+ uint32_t type, uint32_t func, uint64_t addr,
+ uint64_t mask);
int64_t (*get_diag_data)(struct phb *phb, void *diag_buffer,
uint64_t diag_buffer_len);
int64_t (*get_diag_data2)(struct phb *phb, void *diag_buffer,
@@ -236,7 +237,7 @@ struct phb_ops {
uint16_t window_num, uint64_t addr,
uint64_t pci_addr, uint64_t size);
- int64_t (*map_pe_mmio_window)(struct phb *phb, uint16_t pe_number,
+ int64_t (*map_pe_mmio_window)(struct phb *phb, uint64_t pe_number,
uint16_t window_type, uint16_t window_num,
uint16_t segment_num);
@@ -248,34 +249,34 @@ struct phb_ops {
int64_t (*set_peltv)(struct phb *phb, uint32_t parent_pe,
uint32_t child_pe, uint8_t state);
- int64_t (*map_pe_dma_window)(struct phb *phb, uint16_t pe_number,
+ int64_t (*map_pe_dma_window)(struct phb *phb, uint64_t pe_number,
uint16_t window_id, uint16_t tce_levels,
uint64_t tce_table_addr,
uint64_t tce_table_size,
uint64_t tce_page_size);
- int64_t (*map_pe_dma_window_real)(struct phb *phb, uint16_t pe_number,
+ int64_t (*map_pe_dma_window_real)(struct phb *phb, uint64_t pe_number,
uint16_t dma_window_number,
uint64_t pci_start_addr,
uint64_t pci_mem_size);
int64_t (*set_mve)(struct phb *phb, uint32_t mve_number,
- uint32_t pe_number);
+ uint64_t pe_number);
int64_t (*set_mve_enable)(struct phb *phb, uint32_t mve_number,
uint32_t state);
- int64_t (*set_xive_pe)(struct phb *phb, uint32_t pe_number,
+ int64_t (*set_xive_pe)(struct phb *phb, uint64_t pe_number,
uint32_t xive_num);
int64_t (*get_xive_source)(struct phb *phb, uint32_t xive_num,
int32_t *interrupt_source_number);
- int64_t (*get_msi_32)(struct phb *phb, uint32_t mve_number,
+ int64_t (*get_msi_32)(struct phb *phb, uint64_t mve_number,
uint32_t xive_num, uint8_t msi_range,
uint32_t *msi_address, uint32_t *message_data);
- int64_t (*get_msi_64)(struct phb *phb, uint32_t mve_number,
+ int64_t (*get_msi_64)(struct phb *phb, uint64_t mve_number,
uint32_t xive_num, uint8_t msi_range,
uint64_t *msi_address, uint32_t *message_data);
@@ -296,11 +297,12 @@ struct phb_ops {
/* TCE Kill abstraction */
int64_t (*tce_kill)(struct phb *phb, uint32_t kill_type,
- uint32_t pe_num, uint32_t tce_size,
+ uint64_t pe_number, uint32_t tce_size,
uint64_t dma_addr, uint32_t npages);
/* Put phb in capi mode or pcie mode */
- int64_t (*set_capi_mode)(struct phb *phb, uint64_t mode, uint64_t pe_number);
+ int64_t (*set_capi_mode)(struct phb *phb, uint64_t mode,
+ uint64_t pe_number);
int64_t (*set_capp_recovery)(struct phb *phb);
};