Skip to content

Commit 0b5df84

Browse files
miguelafsilva5DavidMCerdeira
authored andcommitted
ref: Remove unused local macros
Signed-off-by: Miguel Silva <[email protected]>
1 parent c306b0f commit 0b5df84

File tree

4 files changed

+4
-62
lines changed

4 files changed

+4
-62
lines changed

src/arch/armv8/aarch32/exceptions.S

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
#include <asm_defs.h>
77
#include <arch/sysregs.h>
88

9-
#define ENTRY_SIZE (0x4)
10-
119
.text
1210

1311
.macro SAVE_HYP_GPRS

src/arch/riscv/iommu.c

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,6 @@
3434
#define RV_IOMMU_FCTL_WSI_BIT (0x1UL << 1)
3535
#define RV_IOMMU_FCTL_DEFAULT (RV_IOMMU_FCTL_WSI_BIT)
3636

37-
// Device Directory Table Pointer register
38-
#define RV_IOMMU_DDTP_MODE_OFF (0ULL)
39-
#define RV_IOMMU_DDTP_MODE_BARE (1ULL)
40-
#define RV_IOMMU_DDTP_MODE_1LVL (2ULL)
41-
#define RV_IOMMU_DDTP_MODE_2LVL (3ULL)
42-
#define RV_IOMMU_DDTP_MODE_3LVL (4ULL)
43-
44-
#define RV_IOMMU_DDTP_BUSY_BIT (0x1ULL << 4)
45-
4637
#define RV_IOMMU_DDTP_PPN_OFF (10)
4738
#define RV_IOMMU_DDTP_PPN_LEN (44)
4839
#define RV_IOMMU_DDTP_PPN_MASK BIT64_MASK(RV_IOMMU_DDTP_PPN_OFF, RV_IOMMU_DDTP_PPN_LEN)
@@ -55,8 +46,6 @@
5546
#define RV_IOMMU_XQCSR_EN_BIT (1ULL << 0)
5647
#define RV_IOMMU_XQCSR_IE_BIT (1ULL << 1)
5748
#define RV_IOMMU_XQCSR_MF_BIT (1ULL << 8)
58-
#define RV_IOMMU_XQCSR_ON_BIT (1ULL << 16)
59-
#define RV_IOMMU_XQCSR_BUSY_BIT (1ULL << 17)
6049

6150
// FQ CSR
6251
#define RV_IOMMU_FQCSR_OF_BIT (1ULL << 9)
@@ -120,7 +109,6 @@ struct riscv_iommu_regmap {
120109

121110
// # RISC-V IOMMU Device Directory Table
122111
#define RV_IOMMU_DC_VALID_BIT (1ULL << 0)
123-
#define RV_IOMMU_DC_DTF_BIT (1ULL << 4)
124112

125113
#define RV_IOMMU_DC_IOHGATP_PPN_OFF (0)
126114
#define RV_IOMMU_DC_IOHGATP_PPN_LEN (44)
@@ -131,36 +119,7 @@ struct riscv_iommu_regmap {
131119
#define RV_IOMMU_DC_IOHGATP_GSCID_MASK \
132120
BIT64_MASK(RV_IOMMU_DC_IOHGATP_GSCID_OFF, RV_IOMMU_DC_IOHGATP_GSCID_LEN)
133121
#define RV_IOMMU_DC_IOHGATP_MODE_OFF (60)
134-
#define RV_IOMMU_DC_IOHGATP_MODE_LEN (4)
135-
#define RV_IOMMU_DC_IOHGATP_MODE_MASK \
136-
BIT64_MASK(RV_IOMMU_DC_IOHGATP_MODE_OFF, RV_IOMMU_DC_IOHGATP_MODE_LEN)
137-
#define RV_IOMMU_IOHGATP_SV39X4 (8ULL << RV_IOMMU_DC_IOHGATP_MODE_OFF)
138-
#define RV_IOMMU_IOHGATP_BARE (0ULL << RV_IOMMU_DC_IOHGATP_MODE_OFF)
139-
140-
#define RV_IOMMU_DC_IOHGATP_PSCID_OFF (12)
141-
#define RV_IOMMU_DC_IOHGATP_PSCID_LEN (20)
142-
#define RV_IOMMU_DC_IOHGATP_PSCID_MASK \
143-
BIT64_MASK(RV_IOMMU_DC_IOHGATP_PSCID_OFF, RV_IOMMU_DC_IOHGATP_PSCID_LEN)
144-
145-
#define RV_IOMMU_DC_FSC_PPN_OFF (0)
146-
#define RV_IOMMU_DC_FSC_PPN_LEN (44)
147-
#define RV_IOMMU_DC_FSC_PPN_MASK BIT64_MASK(RV_IOMMU_DC_FSC_PPN_OFF, RV_IOMMU_DC_FSC_PPN_LEN)
148-
#define RV_IOMMU_DC_FSC_MODE_OFF (60)
149-
#define RV_IOMMU_DC_FSC_MODE_LEN (4)
150-
#define RV_IOMMU_DC_FSC_MODE_MASK BIT64_MASK(RV_IOMMU_DC_FSC_MODE_OFF, RV_IOMMU_DC_FSC_MODE_LEN)
151-
152-
#define RV_IOMMU_DC_MSIPTP_PPN_OFF (0)
153-
#define RV_IOMMU_DC_MSIPTP_PPN_LEN (44)
154-
#define RV_IOMMU_DC_MSIPTP_PPN_MASK \
155-
BIT64_MASK(RV_IOMMU_DC_MSIPTP_PPN_OFF, RV_IOMMU_DC_MSIPTP_PPN_LEN)
156-
#define RV_IOMMU_DC_MSIPTP_MODE_OFF (60)
157-
#define RV_IOMMU_DC_MSIPTP_MODE_LEN (4)
158-
#define RV_IOMMU_DC_MSIPTP_MODE_MASK \
159-
BIT64_MASK(RV_IOMMU_DC_MSIPTP_MODE_OFF, RV_IOMMU_DC_MSIPTP_MODE_LEN)
160-
161-
#define RV_IOMMU_DC_MSIMASK_OFF (0)
162-
#define RV_IOMMU_DC_MSIMASK_LEN (52)
163-
#define RV_IOMMU_DC_MSIMASK_MASK BIT64_MASK(RV_IOMMU_DC_MSIMASK_OFF, RV_IOMMU_DC_MSIMASK_LEN)
122+
#define RV_IOMMU_IOHGATP_SV39X4 (8ULL << RV_IOMMU_DC_IOHGATP_MODE_OFF)
164123

165124
struct ddt_entry {
166125
uint64_t tc;
@@ -176,10 +135,6 @@ struct ddt_entry {
176135
// # Fault Queue Record
177136
#define RV_IOMMU_FQ_CAUSE_OFF (0)
178137
#define RV_IOMMU_FQ_CAUSE_LEN (12)
179-
#define RV_IOMMU_FQ_PID_OFF (12)
180-
#define RV_IOMMU_FQ_PID_LEN (20)
181-
#define RV_IOMMU_FQ_TTYP_OFF (34)
182-
#define RV_IOMMU_FQ_TTYP_LEN (6)
183138
#define RV_IOMMU_FQ_DID_OFF (40)
184139
#define RV_IOMMU_FQ_DID_LEN (24)
185140

src/arch/riscv/irqc/aia/aplic.c

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,9 @@
99
#include <fences.h>
1010

1111
/** APLIC fields and masks defines */
12-
#define APLIC_DOMAINCFG_CTRL_MASK (0x1FF)
13-
14-
#define DOMAINCFG_DM (1U << 2)
15-
16-
#define INTP_IDENTITY (16)
17-
#define INTP_IDENTITY_MASK (0x3FF)
18-
19-
#define APLIC_DISABLE_IDELIVERY (0)
20-
#define APLIC_ENABLE_IDELIVERY (1)
21-
#define APLIC_DISABLE_IFORCE (0)
22-
#define APLIC_ENABLE_IFORCE (1)
23-
#define APLIC_IDC_ITHRESHOLD_EN_ALL (0)
24-
#define APLIC_IDC_ITHRESHOLD_DISBL_ALL (1)
12+
#define APLIC_ENABLE_IDELIVERY (1)
13+
#define APLIC_DISABLE_IFORCE (0)
14+
#define APLIC_IDC_ITHRESHOLD_EN_ALL (0)
2515

2616
/** APLIC public data */
2717
volatile struct aplic_control_hw* aplic_control;

src/arch/riscv/irqc/aia/vaplic.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
#define APLIC_MIN_PRIO (0xFF)
1515
#define UPDATE_ALL_HARTS (~0U)
16-
#define MASK_INTP_ZERO (0xFFFFFFFE)
1716

1817
#define SET_INTP_REG(reg, intp_id) (reg[intp_id / 32] = bit32_set(reg[intp_id / 32], intp_id % 32))
1918
#define GET_INTP_REG(reg, intp_id) ((bit32_get(reg[intp_id / 32], intp_id % 32) != 0) ? 1U : 0U)

0 commit comments

Comments
 (0)