Skip to content

Commit aaf0846

Browse files
ghbaccountmergify[bot]
authored andcommitted
ArmPkg: remove ArmGicAcknowledgeInterrupt function.
A compiler warning was detected that 'IntId' could be used uninitialized in the `else` branch. Since there are no consumers of this function, it was decided to remove this function completely. Signed-off-by: Mike Maslenkin <[email protected]>
1 parent 11cffd9 commit aaf0846

File tree

2 files changed

+0
-70
lines changed

2 files changed

+0
-70
lines changed

ArmPkg/Drivers/ArmGic/ArmGicLib.c

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -154,55 +154,6 @@ ArmGicSendSgiTo (
154154
);
155155
}
156156

157-
/*
158-
* Acknowledge and return the value of the Interrupt Acknowledge Register
159-
*
160-
* InterruptId is returned separately from the register value because in
161-
* the GICv2 the register value contains the CpuId and InterruptId while
162-
* in the GICv3 the register value is only the InterruptId.
163-
*
164-
* @param GicInterruptInterfaceBase Base Address of the GIC CPU Interface
165-
* @param InterruptId InterruptId read from the Interrupt
166-
* Acknowledge Register
167-
*
168-
* @retval value returned by the Interrupt Acknowledge Register
169-
*
170-
*/
171-
UINTN
172-
EFIAPI
173-
ArmGicAcknowledgeInterrupt (
174-
IN UINTN GicInterruptInterfaceBase,
175-
OUT UINTN *InterruptId
176-
)
177-
{
178-
UINTN Value;
179-
UINTN IntId;
180-
ARM_GIC_ARCH_REVISION Revision;
181-
182-
ASSERT (InterruptId != NULL);
183-
Revision = ArmGicGetSupportedArchRevision ();
184-
if (Revision == ARM_GIC_ARCH_REVISION_2) {
185-
Value = ArmGicV2AcknowledgeInterrupt (GicInterruptInterfaceBase);
186-
IntId = Value & ARM_GIC_ICCIAR_ACKINTID;
187-
} else if (Revision == ARM_GIC_ARCH_REVISION_3) {
188-
Value = ArmGicV3AcknowledgeInterrupt ();
189-
IntId = Value;
190-
} else {
191-
ASSERT_EFI_ERROR (EFI_UNSUPPORTED);
192-
// Report Spurious interrupt which is what the above controllers would
193-
// return if no interrupt was available
194-
Value = 1023;
195-
}
196-
197-
if (InterruptId != NULL) {
198-
// InterruptId is required for the caller to know if a valid or spurious
199-
// interrupt has been read
200-
*InterruptId = IntId;
201-
}
202-
203-
return Value;
204-
}
205-
206157
VOID
207158
EFIAPI
208159
ArmGicEndOfInterrupt (

ArmPkg/Include/Library/ArmGicLib.h

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -172,27 +172,6 @@ ArmGicSendSgiTo (
172172
IN UINT8 SgiId
173173
);
174174

175-
/*
176-
* Acknowledge and return the value of the Interrupt Acknowledge Register
177-
*
178-
* InterruptId is returned separately from the register value because in
179-
* the GICv2 the register value contains the CpuId and InterruptId while
180-
* in the GICv3 the register value is only the InterruptId.
181-
*
182-
* @param GicInterruptInterfaceBase Base Address of the GIC CPU Interface
183-
* @param InterruptId InterruptId read from the Interrupt
184-
* Acknowledge Register
185-
*
186-
* @retval value returned by the Interrupt Acknowledge Register
187-
*
188-
*/
189-
UINTN
190-
EFIAPI
191-
ArmGicAcknowledgeInterrupt (
192-
IN UINTN GicInterruptInterfaceBase,
193-
OUT UINTN *InterruptId
194-
);
195-
196175
VOID
197176
EFIAPI
198177
ArmGicEndOfInterrupt (

0 commit comments

Comments
 (0)