bool    (*check_apicid_used)(physid_mask_t *map, u32 apicid);
        void    (*init_apic_ldr)(void);
        void    (*ioapic_phys_id_map)(physid_mask_t *phys_map, physid_mask_t *retmap);
-       int     (*cpu_present_to_apicid)(int mps_cpu);
+       u32     (*cpu_present_to_apicid)(int mps_cpu);
        int     (*phys_pkg_id)(int cpuid_apic, int index_msb);
 
        u32     (*get_apic_id)(unsigned long x);
 extern u32 apic_flat_calc_apicid(unsigned int cpu);
 
 extern void default_ioapic_phys_id_map(physid_mask_t *phys_map, physid_mask_t *retmap);
-extern int default_cpu_present_to_apicid(int mps_cpu);
+extern u32 default_cpu_present_to_apicid(int mps_cpu);
 
 #else /* CONFIG_X86_LOCAL_APIC */
 
 
 /*
  * Wake up AP by INIT, INIT, STARTUP sequence.
  */
-static void send_init_sequence(int phys_apicid)
+static void send_init_sequence(u32 phys_apicid)
 {
        int maxlvt = lapic_get_maxlvt();
 
 /*
  * Wake up AP by INIT, INIT, STARTUP sequence.
  */
-static int wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip)
+static int wakeup_secondary_cpu_via_init(u32 phys_apicid, unsigned long start_eip)
 {
        unsigned long send_status = 0, accept_status = 0;
        int num_starts, j, maxlvt;
  * Returns zero if startup was successfully sent, else error code from
  * ->wakeup_secondary_cpu.
  */
-static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle)
+static int do_boot_cpu(u32 apicid, int cpu, struct task_struct *idle)
 {
        unsigned long start_ip = real_mode_header->trampoline_start;
        int ret;
 
 int native_kick_ap(unsigned int cpu, struct task_struct *tidle)
 {
-       int apicid = apic->cpu_present_to_apicid(cpu);
+       u32 apicid = apic->cpu_present_to_apicid(cpu);
        int err;
 
        lockdep_assert_irqs_enabled();
 bool smp_park_other_cpus_in_init(void)
 {
        unsigned int cpu, this_cpu = smp_processor_id();
-       unsigned int apicid;
+       u32 apicid;
 
        if (apic->wakeup_secondary_cpu_64 || apic->wakeup_secondary_cpu)
                return false;