Re: [patch -mm 22/28] x86_64: Convert to cleckevents

2007-06-25 Thread Andrew Morton
On Sat, 23 Jun 2007 13:32:47 -
Thomas Gleixner <[EMAIL PROTECTED]> wrote:

> Convert x86_64 to the clockevents code. Share code with i386 for
> hpet and PIT.
> 
> Build and whitespace fixups from:
>  Venki Pallipadi <[EMAIL PROTECTED]>
> and
>  Chris Wright <[EMAIL PROTECTED]>

semi-fixes.

> if (no_ctr_free) {
> -   i = 3;
> -   rdmsrl(MSR_K7_EVNTSEL3, evntsel3);
> -   wrmsrl(MSR_K7_EVNTSEL3, 0);
> -   rdmsrl(MSR_K7_PERFCTR3, pmc3);
> +i = 3;
> +rdmsrl(MSR_K7_EVNTSEL3, evntsel3);
> +wrmsrl(MSR_K7_EVNTSEL3, 0);
> +rdmsrl(MSR_K7_PERFCTR3, pmc3);
> } else {
> -   reserve_perfctr_nmi(MSR_K7_PERFCTR0 + i);
> -   reserve_evntsel_nmi(MSR_K7_EVNTSEL0 + i);
> +reserve_perfctr_nmi(MSR_K7_PERFCTR0 + i);
> +reserve_evntsel_nmi(MSR_K7_EVNTSEL0 + i);
> }
> local_irq_save(flags);
> /* start meauring cycles, incrementing from 0 */
> @@ -275,119 +236,38 @@ static unsigned int __init tsc_calibrate
> wrmsrl(MSR_K7_EVNTSEL0 + i, 1 << 22 | 3 << 16 | 0x76);
> rdtscl(tsc_start);
> do {
> -   rdmsrl(MSR_K7_PERFCTR0 + i, pmc_now);
> -   tsc_now = get_cycles_sync();
> +rdmsrl(MSR_K7_PERFCTR0 + i, pmc_now);
> +tsc_now = get_cycles_sync();
> } while ((tsc_now - tsc_start) < TICK_COUNT);
>  
> local_irq_restore(flags);
> if (no_ctr_free) {
> -   wrmsrl(MSR_K7_EVNTSEL3, 0);
> -   wrmsrl(MSR_K7_PERFCTR3, pmc3);
> -   wrmsrl(MSR_K7_EVNTSEL3, evntsel3);
> +wrmsrl(MSR_K7_EVNTSEL3, 0);
> +wrmsrl(MSR_K7_PERFCTR3, pmc3);
> +wrmsrl(MSR_K7_EVNTSEL3, evntsel3);
> } else {
> -   release_perfctr_nmi(MSR_K7_PERFCTR0 + i);
> -   release_evntsel_nmi(MSR_K7_EVNTSEL0 + i);
> +release_perfctr_nmi(MSR_K7_PERFCTR0 + i);
> +release_evntsel_nmi(MSR_K7_EVNTSEL0 + i);
> }

There's still bulk whitespace bustage in here.

(However checkpatch only says

Use #include  instead of 
#1913: FILE: arch/x86_64/kernel/tsc.c:11:
+#include 
)


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


Re: [patch -mm 22/28] x86_64: Convert to cleckevents

2007-06-25 Thread Andrew Morton
On Sat, 23 Jun 2007 13:32:47 -
Thomas Gleixner [EMAIL PROTECTED] wrote:

 Convert x86_64 to the clockevents code. Share code with i386 for
 hpet and PIT.
 
 Build and whitespace fixups from:
  Venki Pallipadi [EMAIL PROTECTED]
 and
  Chris Wright [EMAIL PROTECTED]

semi-fixes.

 if (no_ctr_free) {
 -   i = 3;
 -   rdmsrl(MSR_K7_EVNTSEL3, evntsel3);
 -   wrmsrl(MSR_K7_EVNTSEL3, 0);
 -   rdmsrl(MSR_K7_PERFCTR3, pmc3);
 +i = 3;
 +rdmsrl(MSR_K7_EVNTSEL3, evntsel3);
 +wrmsrl(MSR_K7_EVNTSEL3, 0);
 +rdmsrl(MSR_K7_PERFCTR3, pmc3);
 } else {
 -   reserve_perfctr_nmi(MSR_K7_PERFCTR0 + i);
 -   reserve_evntsel_nmi(MSR_K7_EVNTSEL0 + i);
 +reserve_perfctr_nmi(MSR_K7_PERFCTR0 + i);
 +reserve_evntsel_nmi(MSR_K7_EVNTSEL0 + i);
 }
 local_irq_save(flags);
 /* start meauring cycles, incrementing from 0 */
 @@ -275,119 +236,38 @@ static unsigned int __init tsc_calibrate
 wrmsrl(MSR_K7_EVNTSEL0 + i, 1  22 | 3  16 | 0x76);
 rdtscl(tsc_start);
 do {
 -   rdmsrl(MSR_K7_PERFCTR0 + i, pmc_now);
 -   tsc_now = get_cycles_sync();
 +rdmsrl(MSR_K7_PERFCTR0 + i, pmc_now);
 +tsc_now = get_cycles_sync();
 } while ((tsc_now - tsc_start)  TICK_COUNT);
  
 local_irq_restore(flags);
 if (no_ctr_free) {
 -   wrmsrl(MSR_K7_EVNTSEL3, 0);
 -   wrmsrl(MSR_K7_PERFCTR3, pmc3);
 -   wrmsrl(MSR_K7_EVNTSEL3, evntsel3);
 +wrmsrl(MSR_K7_EVNTSEL3, 0);
 +wrmsrl(MSR_K7_PERFCTR3, pmc3);
 +wrmsrl(MSR_K7_EVNTSEL3, evntsel3);
 } else {
 -   release_perfctr_nmi(MSR_K7_PERFCTR0 + i);
 -   release_evntsel_nmi(MSR_K7_EVNTSEL0 + i);
 +release_perfctr_nmi(MSR_K7_PERFCTR0 + i);
 +release_evntsel_nmi(MSR_K7_EVNTSEL0 + i);
 }

There's still bulk whitespace bustage in here.

(However checkpatch only says

Use #include linux/hpet.h instead of asm/hpet.h
#1913: FILE: arch/x86_64/kernel/tsc.c:11:
+#include asm/hpet.h
)

edits the diff, fixes it
-
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/