Re: [PATCH for review] [26/145] x86_64: Add initalization of the RDTSCP auxilliary values

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

 



Andi Kleen:
> ---
>  arch/x86_64/kernel/smpboot.c |    2 +
>  arch/x86_64/kernel/time.c    |   47 ++++++++++++++++++++++++++++++++-----------
>  include/asm-x86_64/proto.h   |    1
>  3 files changed, 38 insertions(+), 12 deletions(-)
>
> Index: linux/arch/x86_64/kernel/time.c
> ===================================================================
> --- linux.orig/arch/x86_64/kernel/time.c
> +++ linux/arch/x86_64/kernel/time.c
...
> +static int __cpuinit
> +time_cpu_notifier(struct notifier_block *nb, unsigned long action, void *hcpu)
>  {
> -	char *timename;
> -	char *gtod;
> +	unsigned cpu = (unsigned long) hcpu;

Is this some kind of "endian magic" ? I mean getting high or low word of 64 pointer to 32 variable ? Why cast just with (unsigned) doesn't work ?

> +	if (action == CPU_ONLINE &&
> +		cpu_has(&cpu_data[cpu], X86_FEATURE_RDTSCP)) {
> +		unsigned p;
> +		p = smp_processor_id() | (cpu_to_node(smp_processor_id())<<12);

Is this code runs under SMP ? I couldn't figure that out.

> +		write_rdtscp_aux(p);
> +	}
> +	return NOTIFY_DONE;
> +}

Thanks.

--
-o--=O`C
 #oo'L O
<___=E M

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux