1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 22fa8937fSXiantao Zhang #ifndef _IA64_MSI_DEF_H 32fa8937fSXiantao Zhang #define _IA64_MSI_DEF_H 42fa8937fSXiantao Zhang 52fa8937fSXiantao Zhang /* 62fa8937fSXiantao Zhang * Shifts for APIC-based data 72fa8937fSXiantao Zhang */ 82fa8937fSXiantao Zhang 92fa8937fSXiantao Zhang #define MSI_DATA_VECTOR_SHIFT 0 102fa8937fSXiantao Zhang #define MSI_DATA_VECTOR(v) (((u8)v) << MSI_DATA_VECTOR_SHIFT) 112fa8937fSXiantao Zhang #define MSI_DATA_VECTOR_MASK 0xffffff00 122fa8937fSXiantao Zhang 132fa8937fSXiantao Zhang #define MSI_DATA_DELIVERY_MODE_SHIFT 8 142fa8937fSXiantao Zhang #define MSI_DATA_DELIVERY_FIXED (0 << MSI_DATA_DELIVERY_MODE_SHIFT) 152fa8937fSXiantao Zhang #define MSI_DATA_DELIVERY_LOWPRI (1 << MSI_DATA_DELIVERY_MODE_SHIFT) 162fa8937fSXiantao Zhang 172fa8937fSXiantao Zhang #define MSI_DATA_LEVEL_SHIFT 14 182fa8937fSXiantao Zhang #define MSI_DATA_LEVEL_DEASSERT (0 << MSI_DATA_LEVEL_SHIFT) 192fa8937fSXiantao Zhang #define MSI_DATA_LEVEL_ASSERT (1 << MSI_DATA_LEVEL_SHIFT) 202fa8937fSXiantao Zhang 212fa8937fSXiantao Zhang #define MSI_DATA_TRIGGER_SHIFT 15 222fa8937fSXiantao Zhang #define MSI_DATA_TRIGGER_EDGE (0 << MSI_DATA_TRIGGER_SHIFT) 232fa8937fSXiantao Zhang #define MSI_DATA_TRIGGER_LEVEL (1 << MSI_DATA_TRIGGER_SHIFT) 242fa8937fSXiantao Zhang 252fa8937fSXiantao Zhang /* 262fa8937fSXiantao Zhang * Shift/mask fields for APIC-based bus address 272fa8937fSXiantao Zhang */ 282fa8937fSXiantao Zhang 292fa8937fSXiantao Zhang #define MSI_ADDR_DEST_ID_SHIFT 4 302fa8937fSXiantao Zhang #define MSI_ADDR_HEADER 0xfee00000 312fa8937fSXiantao Zhang 322fa8937fSXiantao Zhang #define MSI_ADDR_DEST_ID_MASK 0xfff0000f 332fa8937fSXiantao Zhang #define MSI_ADDR_DEST_ID_CPU(cpu) ((cpu) << MSI_ADDR_DEST_ID_SHIFT) 342fa8937fSXiantao Zhang 352fa8937fSXiantao Zhang #define MSI_ADDR_DEST_MODE_SHIFT 2 362fa8937fSXiantao Zhang #define MSI_ADDR_DEST_MODE_PHYS (0 << MSI_ADDR_DEST_MODE_SHIFT) 372fa8937fSXiantao Zhang #define MSI_ADDR_DEST_MODE_LOGIC (1 << MSI_ADDR_DEST_MODE_SHIFT) 382fa8937fSXiantao Zhang 392fa8937fSXiantao Zhang #define MSI_ADDR_REDIRECTION_SHIFT 3 402fa8937fSXiantao Zhang #define MSI_ADDR_REDIRECTION_CPU (0 << MSI_ADDR_REDIRECTION_SHIFT) 412fa8937fSXiantao Zhang #define MSI_ADDR_REDIRECTION_LOWPRI (1 << MSI_ADDR_REDIRECTION_SHIFT) 422fa8937fSXiantao Zhang 432fa8937fSXiantao Zhang #endif/* _IA64_MSI_DEF_H */ 44