Re: [PATCH, RFC] fix parisc runtime hangs wrt pa_tlb_lock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -#define purge_tlb_start(x) spin_lock(&pa_tlb_lock)
> -#define purge_tlb_end(x) spin_unlock(&pa_tlb_lock)
> +#define purge_tlb_start(x)	do { unsigned long flags; spin_lock_irqsave(&pa_tlb_lock, flags)
> +#define purge_tlb_end(x)	     spin_unlock_irqrestore(&pa_tlb_lock, flags); } while (0)

To my taste, the handling of the "flags" variable is ugly and potentially
error prone.

I think it would be better to add another argument to the macros, and declare
the variable flags in the routines that use the macros (as is done for the
current users of spin_lock_irqsave macro).

Dave
-- 
J. David Anglin                                  dave.anglin@xxxxxxxxxxxxxx
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux