Re: [GIT PULL] x86/asm for 2.6.36

From: H. Peter Anvin
Date: Fri Aug 06 2010 - 14:10:20 EST


On 08/06/2010 10:45 AM, H. Peter Anvin wrote:
>
> It's worth noting that in this particular case the code itself looks
> like this:
>
> set_64bit((unsigned long *)&irte->low, irte_modified->low);
> set_64bit((unsigned long *)&irte->high, irte_modified->high);
>
> ... where the existing cast is there because irte->low and irte->high
> are types __u64. In other words, with the "more logical" u64 prototype
> the casts should just get removed.
>

Looking through the build I'm currently running, so far, it is smoking
out a bunch of unnecessary casts and wrappers, for example, in kvm/mmu.c:

static void __set_spte(u64 *sptep, u64 spte)
{
#ifdef CONFIG_X86_64
set_64bit((unsigned long *)sptep, spte);
#else
set_64bit((unsigned long long *)sptep, spte);
#endif
}

... which just becomes the much cleaner ...

static void __set_spte(u64 *sptep, u64 spte)
{
set_64bit(sptep, spte);
}

I'll go through all these as this build finishes and give you an updated
tree to pull, ok?

-hpa
--
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/