On 27/01/15 01:51, Luis R. Rodriguez wrote:
> 
> +#ifndef CONFIG_PREEMPT
> +extern struct { char _entry[32]; } preemptible_hypercall_page[];
> +
> +static inline bool xen_is_preemptible_hypercall(struct pt_regs *regs)
> +{
> +     return !user_mode_vm(regs) &&
> +             regs->ip >= (unsigned long)preemptible_hypercall_page &&
> +             regs->ip < (unsigned long)preemptible_hypercall_page + 
> PAGE_SIZE;

I asked for this test to be optimized.

        return (regs->ip >> PAGE_SHIFT)
            == ((unsigned long)preemptible_hypercall_page >> PAGE_SHIFT)
            && !user_mode_vm(regs);

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to