Re: [PATCH v10 7/9] x86/tlb: enable tlb flush range support for x86

From: Alex Shi
Date: Thu Jul 19 2012 - 19:52:18 EST




>> +static inline void flush_tlb_mm_range(struct vm_area_struct *vma,
>> + unsigned long start, unsigned long end, unsigned long vmflag)
>> +{
>> + if (vma->vm_mm == current->active_mm)
>> + __flush_tlb();
>> +}
>
> There's a problem with this in one of my randconfig tests. It has
> !CONFIG_SMP and the warning is:
>
> mm/memory.c: In function âtlb_flush_mmuâ:
> mm/memory.c:230:2: warning: passing argument 1 of âflush_tlb_mm_rangeâ from incompatible pointer type
> /usr/src/linux-2.6/arch/x86/include/asm/tlbflush.h:108:20: note: expected âstruct vm_area_struct *â but argument is of type âstruct mm_struct *â
> mm/memory.c:230:2: warning: passing argument 1 of âflush_tlb_mm_rangeâ from incompatible pointer type
> /usr/src/linux-2.6/arch/x86/include/asm/tlbflush.h:108:20: note: expected âstruct vm_area_struct *â but argument is of type âstruct mm_struct *â
>
>
> Due to the fact that the macro flush_tlb actually resolves to
> flush_tlb_mm_range and this function has a different signature based on
> CONFIG_SMP. On !SMP expects struct vm_area_struct * as a first argument
> but on SMP its first argument is struct mm_struct *.
>
> So two different function signatures based on a config option? Now
> that's a first. What is going on?


Sure, it is a bug, the fix had sent:
https://lkml.org/lkml/2012/7/6/350

>


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