/* dwarf_lookup_cie - locate the cie @cie_ptr: pointer to help with lookup  */
static struct dwarf_cie* dwarf_lookup_cie(unsigned long cie_ptr)
/* dwarf_lookup_cie - locate the cie @cie_ptr: pointer to help with lookup  */
static struct dwarf_cie* dwarf_lookup_cie(unsigned long cie_ptr)
{
	struct dwarf_cie *cie;
	unsigned long flags;
	spin_lock_irqsave(&dwarf_cie_lock, flags);
	if (cached_cie && cached_cie->cie_pointer == cie_ptr) {
		cie = cached_cie;
		goto out;
	}
	list_for_each_entry(cie, &dwarf_cie_list, link) {
		if (cie->cie_pointer == cie_ptr) {
			cached_cie = cie;
			break;
		}
	}
	if (&cie->link == &dwarf_cie_list)
		cie = NULL;
out:
	spin_unlock_irqrestore(&dwarf_cie_lock, flags);
	return cie;
}