@@ -57,36 +57,6 @@
#define RTAS_TYPE_MSI 1
#define RTAS_TYPE_MSIX 2
-/* For set-indicator RTAS interface */
-#define INDICATOR_ISOLATION_MASK 0x0001 /* 9001 one bit */
-#define INDICATOR_GLOBAL_INTERRUPT_MASK 0x0002 /* 9005 one bit */
-#define INDICATOR_ERROR_LOG_MASK 0x0004 /* 9006 one bit */
-#define INDICATOR_IDENTIFY_MASK 0x0008 /* 9007 one bit */
-#define INDICATOR_RESET_MASK 0x0010 /* 9009 one bit */
-#define INDICATOR_DR_MASK 0x00e0 /* 9002 three bits */
-#define INDICATOR_ALLOCATION_MASK 0x0300 /* 9003 two bits */
-#define INDICATOR_EPOW_MASK 0x1c00 /* 9 three bits */
-#define INDICATOR_ENTITY_SENSE_MASK 0xe000 /* 9003 three bits */
-
-#define INDICATOR_ISOLATION_SHIFT 0x00 /* bit 0 */
-#define INDICATOR_GLOBAL_INTERRUPT_SHIFT 0x01 /* bit 1 */
-#define INDICATOR_ERROR_LOG_SHIFT 0x02 /* bit 2 */
-#define INDICATOR_IDENTIFY_SHIFT 0x03 /* bit 3 */
-#define INDICATOR_RESET_SHIFT 0x04 /* bit 4 */
-#define INDICATOR_DR_SHIFT 0x05 /* bits 5-7 */
-#define INDICATOR_ALLOCATION_SHIFT 0x08 /* bits 8-9 */
-#define INDICATOR_EPOW_SHIFT 0x0a /* bits 10-12 */
-#define INDICATOR_ENTITY_SENSE_SHIFT 0x0d /* bits 13-15 */
-
-#define INDICATOR_ENTITY_SENSE_EMPTY 0
-#define INDICATOR_ENTITY_SENSE_PRESENT 1
-
-#define DECODE_DRC_STATE(state, m, s) \
- ((((uint32_t)(state) & (uint32_t)(m))) >> (s))
-
-#define ENCODE_DRC_STATE(val, m, s) \
- (((uint32_t)(val) << (s)) & (uint32_t)(m))
-
#define FDT_MAX_SIZE 0x10000
#define _FDT(exp) \
do { \
@@ -442,6 +442,36 @@ int spapr_allocate_irq_block(int num, bool lsi, bool msi);
#define DIAGNOSTICS_RUN_MODE_IMMEDIATE 2
#define DIAGNOSTICS_RUN_MODE_PERIODIC 3
+/* For set-indicator RTAS interface */
+#define INDICATOR_ISOLATION_MASK 0x0001 /* 9001 one bit */
+#define INDICATOR_GLOBAL_INTERRUPT_MASK 0x0002 /* 9005 one bit */
+#define INDICATOR_ERROR_LOG_MASK 0x0004 /* 9006 one bit */
+#define INDICATOR_IDENTIFY_MASK 0x0008 /* 9007 one bit */
+#define INDICATOR_RESET_MASK 0x0010 /* 9009 one bit */
+#define INDICATOR_DR_MASK 0x00e0 /* 9002 three bits */
+#define INDICATOR_ALLOCATION_MASK 0x0300 /* 9003 two bits */
+#define INDICATOR_EPOW_MASK 0x1c00 /* 9 three bits */
+#define INDICATOR_ENTITY_SENSE_MASK 0xe000 /* 9003 three bits */
+
+#define INDICATOR_ISOLATION_SHIFT 0x00 /* bit 0 */
+#define INDICATOR_GLOBAL_INTERRUPT_SHIFT 0x01 /* bit 1 */
+#define INDICATOR_ERROR_LOG_SHIFT 0x02 /* bit 2 */
+#define INDICATOR_IDENTIFY_SHIFT 0x03 /* bit 3 */
+#define INDICATOR_RESET_SHIFT 0x04 /* bit 4 */
+#define INDICATOR_DR_SHIFT 0x05 /* bits 5-7 */
+#define INDICATOR_ALLOCATION_SHIFT 0x08 /* bits 8-9 */
+#define INDICATOR_EPOW_SHIFT 0x0a /* bits 10-12 */
+#define INDICATOR_ENTITY_SENSE_SHIFT 0x0d /* bits 13-15 */
+
+#define INDICATOR_ENTITY_SENSE_EMPTY 0
+#define INDICATOR_ENTITY_SENSE_PRESENT 1
+
+#define DECODE_DRC_STATE(state, m, s) \
+ ((((uint32_t)(state) & (uint32_t)(m))) >> (s))
+
+#define ENCODE_DRC_STATE(val, m, s) \
+ (((uint32_t)(val) << (s)) & (uint32_t)(m))
+
static inline uint64_t ppc64_phys_to_real(uint64_t addr)
{
return addr & ~0xF000000000000000ULL;
Move RTAS indicator defines and helpers from spapr_pci.c to spapr.h as these are needed by CPU hotplug code too. This patch doesn't change any functionality. Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com> --- hw/ppc/spapr_pci.c | 30 ------------------------------ include/hw/ppc/spapr.h | 30 ++++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 30 deletions(-)