Skip to content

Commit 61deafa

Browse files
committed
Merge tag 'x86_apic_for_6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 APIC update from Dave Hansen: "Coccinelle complained about some 64-bit divisions, but the divisor was really just a 32-bit value being stored as 'unsigned long'. Fixing the types fixes the warning" * tag 'x86_apic_for_6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/apic: Improve data types to fix Coccinelle warnings
2 parents 964bbdf + 0049f04 commit 61deafa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

arch/x86/kernel/apic/apic.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ void lapic_update_tsc_freq(void)
631631
static __initdata int lapic_cal_loops = -1;
632632
static __initdata long lapic_cal_t1, lapic_cal_t2;
633633
static __initdata unsigned long long lapic_cal_tsc1, lapic_cal_tsc2;
634-
static __initdata unsigned long lapic_cal_pm1, lapic_cal_pm2;
634+
static __initdata u32 lapic_cal_pm1, lapic_cal_pm2;
635635
static __initdata unsigned long lapic_cal_j1, lapic_cal_j2;
636636

637637
/*
@@ -641,7 +641,7 @@ static void __init lapic_cal_handler(struct clock_event_device *dev)
641641
{
642642
unsigned long long tsc = 0;
643643
long tapic = apic_read(APIC_TMCCT);
644-
unsigned long pm = acpi_pm_read_early();
644+
u32 pm = acpi_pm_read_early();
645645

646646
if (boot_cpu_has(X86_FEATURE_TSC))
647647
tsc = rdtsc();
@@ -666,7 +666,7 @@ static void __init lapic_cal_handler(struct clock_event_device *dev)
666666
}
667667

668668
static int __init
669-
calibrate_by_pmtimer(long deltapm, long *delta, long *deltatsc)
669+
calibrate_by_pmtimer(u32 deltapm, long *delta, long *deltatsc)
670670
{
671671
const long pm_100ms = PMTMR_TICKS_PER_SEC / 10;
672672
const long pm_thresh = pm_100ms / 100;
@@ -677,7 +677,7 @@ calibrate_by_pmtimer(long deltapm, long *delta, long *deltatsc)
677677
return -1;
678678
#endif
679679

680-
apic_printk(APIC_VERBOSE, "... PM-Timer delta = %ld\n", deltapm);
680+
apic_printk(APIC_VERBOSE, "... PM-Timer delta = %u\n", deltapm);
681681

682682
/* Check, if the PM timer is available */
683683
if (!deltapm)

0 commit comments

Comments
 (0)