/* Return: old value of the task priority level  */
static unsigned long EFIAPI efi_raise_tpl(efi_uintn_t new_tpl)
/* Return: old value of the task priority level  */
static unsigned long EFIAPI efi_raise_tpl(efi_uintn_t new_tpl)
{
	efi_uintn_t old_tpl = efi_tpl;
	EFI_ENTRY("0x%zx", new_tpl);
	if (new_tpl < efi_tpl)
		EFI_PRINT("WARNING: new_tpl < current_tpl in %s\n", __func__);
	efi_tpl = new_tpl;
	if (efi_tpl > TPL_HIGH_LEVEL)
		efi_tpl = TPL_HIGH_LEVEL;
	EFI_EXIT(EFI_SUCCESS);
	return old_tpl;
}