x86, es7000: remove dead code, clean up
[safe/jmp/linux-2.6] / arch / x86 / kernel / es7000_32.c
1 /*
2  * Written by: Garry Forsgren, Unisys Corporation
3  *             Natalie Protasevich, Unisys Corporation
4  * This file contains the code to configure and interface
5  * with Unisys ES7000 series hardware system manager.
6  *
7  * Copyright (c) 2003 Unisys Corporation.  All Rights Reserved.
8  *
9  * This program is free software; you can redistribute it and/or modify it
10  * under the terms of version 2 of the GNU General Public License as
11  * published by the Free Software Foundation.
12  *
13  * This program is distributed in the hope that it would be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program; if not, write the Free Software Foundation, Inc., 59
19  * Temple Place - Suite 330, Boston MA 02111-1307, USA.
20  *
21  * Contact information: Unisys Corporation, Township Line & Union Meeting
22  * Roads-A, Unisys Way, Blue Bell, Pennsylvania, 19424, or:
23  *
24  * http://www.unisys.com
25  */
26 #include <linux/notifier.h>
27 #include <linux/spinlock.h>
28 #include <linux/cpumask.h>
29 #include <linux/threads.h>
30 #include <linux/kernel.h>
31 #include <linux/module.h>
32 #include <linux/reboot.h>
33 #include <linux/string.h>
34 #include <linux/types.h>
35 #include <linux/errno.h>
36 #include <linux/acpi.h>
37 #include <linux/init.h>
38 #include <linux/smp.h>
39
40 #include <asm/apicdef.h>
41 #include <asm/atomic.h>
42 #include <asm/fixmap.h>
43 #include <asm/mpspec.h>
44 #include <asm/setup.h>
45 #include <asm/apic.h>
46 #include <asm/ipi.h>
47 #include <asm/nmi.h>
48 #include <asm/smp.h>
49 #include <asm/io.h>
50
51 /*
52  * ES7000 chipsets
53  */
54
55 #define NON_UNISYS                      0
56 #define ES7000_CLASSIC                  1
57 #define ES7000_ZORRO                    2
58
59 #define MIP_REG                         1
60 #define MIP_PSAI_REG                    4
61
62 #define MIP_BUSY                        1
63 #define MIP_SPIN                        0xf0000
64 #define MIP_VALID                       0x0100000000000000ULL
65 #define MIP_SW_APIC                     0x1020b
66
67 #define MIP_PORT(val)                   ((val >> 32) & 0xffff)
68
69 #define MIP_RD_LO(val)                  (val & 0xffffffff)
70
71 struct mip_reg {
72         unsigned long long              off_0x00;
73         unsigned long long              off_0x08;
74         unsigned long long              off_0x10;
75         unsigned long long              off_0x18;
76         unsigned long long              off_0x20;
77         unsigned long long              off_0x28;
78         unsigned long long              off_0x30;
79         unsigned long long              off_0x38;
80 };
81
82 struct mip_reg_info {
83         unsigned long long              mip_info;
84         unsigned long long              delivery_info;
85         unsigned long long              host_reg;
86         unsigned long long              mip_reg;
87 };
88
89 struct psai {
90         unsigned long long              entry_type;
91         unsigned long long              addr;
92         unsigned long long              bep_addr;
93 };
94
95 #ifdef CONFIG_ACPI
96 struct es7000_oem_table {
97         struct acpi_table_header        Header;
98         u32                             OEMTableAddr;
99         u32                             OEMTableSize;
100 };
101 #endif
102
103 /*
104  * ES7000 Globals
105  */
106
107 static volatile unsigned long           *psai = NULL;
108 static struct mip_reg                   *mip_reg;
109 static struct mip_reg                   *host_reg;
110 static int                              mip_port;
111 static unsigned long                    mip_addr, host_addr;
112
113 int                                     es7000_plat;
114
115 /*
116  * GSI override for ES7000 platforms.
117  */
118
119 static unsigned int                     base;
120
121 static int
122 es7000_rename_gsi(int ioapic, int gsi)
123 {
124         if (es7000_plat == ES7000_ZORRO)
125                 return gsi;
126
127         if (!base) {
128                 int i;
129                 for (i = 0; i < nr_ioapics; i++)
130                         base += nr_ioapic_registers[i];
131         }
132
133         if (!ioapic && (gsi < 16))
134                 gsi += base;
135
136         return gsi;
137 }
138
139 static int wakeup_secondary_cpu_via_mip(int cpu, unsigned long eip)
140 {
141         unsigned long vect = 0, psaival = 0;
142
143         if (psai == NULL)
144                 return -1;
145
146         vect = ((unsigned long)__pa(eip)/0x1000) << 16;
147         psaival = (0x1000000 | vect | cpu);
148
149         while (*psai & 0x1000000)
150                 ;
151
152         *psai = psaival;
153
154         return 0;
155 }
156
157 static int __init es7000_update_genapic(void)
158 {
159         apic->wakeup_cpu = wakeup_secondary_cpu_via_mip;
160
161         /* MPENTIUMIII */
162         if (boot_cpu_data.x86 == 6 &&
163             (boot_cpu_data.x86_model >= 7 || boot_cpu_data.x86_model <= 11)) {
164                 es7000_update_genapic_to_cluster();
165                 apic->wait_for_init_deassert = NULL;
166                 apic->wakeup_cpu = wakeup_secondary_cpu_via_mip;
167         }
168
169         return 0;
170 }
171
172 static void __init setup_unisys(void)
173 {
174         /*
175          * Determine the generation of the ES7000 currently running.
176          *
177          * es7000_plat = 1 if the machine is a 5xx ES7000 box
178          * es7000_plat = 2 if the machine is a x86_64 ES7000 box
179          *
180          */
181         if (!(boot_cpu_data.x86 <= 15 && boot_cpu_data.x86_model <= 2))
182                 es7000_plat = ES7000_ZORRO;
183         else
184                 es7000_plat = ES7000_CLASSIC;
185         ioapic_renumber_irq = es7000_rename_gsi;
186
187         x86_quirks->update_genapic = es7000_update_genapic;
188 }
189
190 /*
191  * Parse the OEM Table:
192  */
193 static int __init parse_unisys_oem(char *oemptr)
194 {
195         int                     i;
196         int                     success = 0;
197         unsigned char           type, size;
198         unsigned long           val;
199         char                    *tp = NULL;
200         struct psai             *psaip = NULL;
201         struct mip_reg_info     *mi;
202         struct mip_reg          *host, *mip;
203
204         tp = oemptr;
205
206         tp += 8;
207
208         for (i = 0; i <= 6; i++) {
209                 type = *tp++;
210                 size = *tp++;
211                 tp -= 2;
212                 switch (type) {
213                 case MIP_REG:
214                         mi = (struct mip_reg_info *)tp;
215                         val = MIP_RD_LO(mi->host_reg);
216                         host_addr = val;
217                         host = (struct mip_reg *)val;
218                         host_reg = __va(host);
219                         val = MIP_RD_LO(mi->mip_reg);
220                         mip_port = MIP_PORT(mi->mip_info);
221                         mip_addr = val;
222                         mip = (struct mip_reg *)val;
223                         mip_reg = __va(mip);
224                         pr_debug("es7000_mipcfg: host_reg = 0x%lx \n",
225                                  (unsigned long)host_reg);
226                         pr_debug("es7000_mipcfg: mip_reg = 0x%lx \n",
227                                  (unsigned long)mip_reg);
228                         success++;
229                         break;
230                 case MIP_PSAI_REG:
231                         psaip = (struct psai *)tp;
232                         if (tp != NULL) {
233                                 if (psaip->addr)
234                                         psai = __va(psaip->addr);
235                                 else
236                                         psai = NULL;
237                                 success++;
238                         }
239                         break;
240                 default:
241                         break;
242                 }
243                 tp += size;
244         }
245
246         if (success < 2)
247                 es7000_plat = NON_UNISYS;
248         else
249                 setup_unisys();
250
251         return es7000_plat;
252 }
253
254 #ifdef CONFIG_ACPI
255
256 static unsigned long                    oem_addrX;
257 static unsigned long                    oem_size;
258
259 static int __init find_unisys_acpi_oem_table(unsigned long *oem_addr)
260 {
261         struct acpi_table_header *header = NULL;
262         int i = 0;
263         acpi_size tbl_size;
264
265         while (ACPI_SUCCESS(acpi_get_table_with_size("OEM1", i++, &header, &tbl_size))) {
266                 if (!memcmp((char *) &header->oem_id, "UNISYS", 6)) {
267                         struct es7000_oem_table *t = (void *)header;
268
269                         oem_addrX = t->OEMTableAddr;
270                         oem_size = t->OEMTableSize;
271                         early_acpi_os_unmap_memory(header, tbl_size);
272
273                         *oem_addr = (unsigned long)__acpi_map_table(oem_addrX,
274                                                                     oem_size);
275                         return 0;
276                 }
277                 early_acpi_os_unmap_memory(header, tbl_size);
278         }
279         return -1;
280 }
281
282 static void __init unmap_unisys_acpi_oem_table(unsigned long oem_addr)
283 {
284         if (!oem_addr)
285                 return;
286
287         __acpi_unmap_table((char *)oem_addr, oem_size);
288 }
289 #endif
290
291 static void es7000_spin(int n)
292 {
293         int i = 0;
294
295         while (i++ < n)
296                 rep_nop();
297 }
298
299 static int __init
300 es7000_mip_write(struct mip_reg *mip_reg)
301 {
302         int status = 0;
303         int spin;
304
305         spin = MIP_SPIN;
306         while ((host_reg->off_0x38 & MIP_VALID) != 0) {
307                 if (--spin <= 0) {
308                         printk("es7000_mip_write: Timeout waiting for Host Valid Flag");
309                         return -1;
310                 }
311                 es7000_spin(MIP_SPIN);
312         }
313
314         memcpy(host_reg, mip_reg, sizeof(struct mip_reg));
315         outb(1, mip_port);
316
317         spin = MIP_SPIN;
318
319         while ((mip_reg->off_0x38 & MIP_VALID) == 0) {
320                 if (--spin <= 0) {
321                         printk("es7000_mip_write: Timeout waiting for MIP Valid Flag");
322                         return -1;
323                 }
324                 es7000_spin(MIP_SPIN);
325         }
326
327         status = (mip_reg->off_0x00 & 0xffff0000000000ULL) >> 48;
328         mip_reg->off_0x38 &= ~MIP_VALID;
329
330         return status;
331 }
332
333 static void __init es7000_enable_apic_mode(void)
334 {
335         struct mip_reg es7000_mip_reg;
336         int mip_status;
337
338         if (!es7000_plat)
339                 return;
340
341         printk("ES7000: Enabling APIC mode.\n");
342         memset(&es7000_mip_reg, 0, sizeof(struct mip_reg));
343         es7000_mip_reg.off_0x00 = MIP_SW_APIC;
344         es7000_mip_reg.off_0x38 = MIP_VALID;
345
346         while ((mip_status = es7000_mip_write(&es7000_mip_reg)) != 0) {
347                 printk("es7000_enable_apic_mode: command failed, status = %x\n",
348                         mip_status);
349         }
350 }
351
352 static void es7000_vector_allocation_domain(int cpu, cpumask_t *retmask)
353 {
354         /* Careful. Some cpus do not strictly honor the set of cpus
355          * specified in the interrupt destination when using lowest
356          * priority interrupt delivery mode.
357          *
358          * In particular there was a hyperthreading cpu observed to
359          * deliver interrupts to the wrong hyperthread when only one
360          * hyperthread was specified in the interrupt desitination.
361          */
362         *retmask = (cpumask_t){ { [0] = APIC_ALL_CPUS, } };
363 }
364
365
366 static void es7000_wait_for_init_deassert(atomic_t *deassert)
367 {
368 #ifndef CONFIG_ES7000_CLUSTERED_APIC
369         while (!atomic_read(deassert))
370                 cpu_relax();
371 #endif
372         return;
373 }
374
375 static unsigned int es7000_get_apic_id(unsigned long x)
376 {
377         return (x >> 24) & 0xFF;
378 }
379
380 #ifdef CONFIG_ACPI
381 static int es7000_check_dsdt(void)
382 {
383         struct acpi_table_header header;
384
385         if (ACPI_SUCCESS(acpi_get_table_header(ACPI_SIG_DSDT, 0, &header)) &&
386             !strncmp(header.oem_id, "UNISYS", 6))
387                 return 1;
388         return 0;
389 }
390 #endif
391
392 static void es7000_send_IPI_mask(const struct cpumask *mask, int vector)
393 {
394         default_send_IPI_mask_sequence_phys(mask, vector);
395 }
396
397 static void es7000_send_IPI_allbutself(int vector)
398 {
399         default_send_IPI_mask_allbutself_phys(cpu_online_mask, vector);
400 }
401
402 static void es7000_send_IPI_all(int vector)
403 {
404         es7000_send_IPI_mask(cpu_online_mask, vector);
405 }
406
407 static int es7000_apic_id_registered(void)
408 {
409         return 1;
410 }
411
412 static const cpumask_t *target_cpus_cluster(void)
413 {
414         return &CPU_MASK_ALL;
415 }
416
417 static const cpumask_t *es7000_target_cpus(void)
418 {
419         return &cpumask_of_cpu(smp_processor_id());
420 }
421
422 static unsigned long
423 es7000_check_apicid_used(physid_mask_t bitmap, int apicid)
424 {
425         return 0;
426 }
427 static unsigned long es7000_check_apicid_present(int bit)
428 {
429         return physid_isset(bit, phys_cpu_present_map);
430 }
431
432 static unsigned long calculate_ldr(int cpu)
433 {
434         unsigned long id = per_cpu(x86_bios_cpu_apicid, cpu);
435
436         return SET_APIC_LOGICAL_ID(id);
437 }
438
439 /*
440  * Set up the logical destination ID.
441  *
442  * Intel recommends to set DFR, LdR and TPR before enabling
443  * an APIC.  See e.g. "AP-388 82489DX User's Manual" (Intel
444  * document number 292116).  So here it goes...
445  */
446 static void es7000_init_apic_ldr_cluster(void)
447 {
448         unsigned long val;
449         int cpu = smp_processor_id();
450
451         apic_write(APIC_DFR, APIC_DFR_CLUSTER);
452         val = calculate_ldr(cpu);
453         apic_write(APIC_LDR, val);
454 }
455
456 static void es7000_init_apic_ldr(void)
457 {
458         unsigned long val;
459         int cpu = smp_processor_id();
460
461         apic_write(APIC_DFR, APIC_DFR_FLAT);
462         val = calculate_ldr(cpu);
463         apic_write(APIC_LDR, val);
464 }
465
466 static void es7000_setup_apic_routing(void)
467 {
468         int apic = per_cpu(x86_bios_cpu_apicid, smp_processor_id());
469         printk("Enabling APIC mode:  %s. Using %d I/O APICs, target cpus %lx\n",
470                 (apic_version[apic] == 0x14) ?
471                         "Physical Cluster" : "Logical Cluster",
472                         nr_ioapics, cpus_addr(*es7000_target_cpus())[0]);
473 }
474
475 static int es7000_apicid_to_node(int logical_apicid)
476 {
477         return 0;
478 }
479
480
481 static int es7000_cpu_present_to_apicid(int mps_cpu)
482 {
483         if (!mps_cpu)
484                 return boot_cpu_physical_apicid;
485         else if (mps_cpu < nr_cpu_ids)
486                 return per_cpu(x86_bios_cpu_apicid, mps_cpu);
487         else
488                 return BAD_APICID;
489 }
490
491 static physid_mask_t es7000_apicid_to_cpu_present(int phys_apicid)
492 {
493         static int id = 0;
494         physid_mask_t mask;
495
496         mask = physid_mask_of_physid(id);
497         ++id;
498
499         return mask;
500 }
501
502 /* Mapping from cpu number to logical apicid */
503 static int es7000_cpu_to_logical_apicid(int cpu)
504 {
505 #ifdef CONFIG_SMP
506         if (cpu >= nr_cpu_ids)
507                 return BAD_APICID;
508         return cpu_2_logical_apicid[cpu];
509 #else
510         return logical_smp_processor_id();
511 #endif
512 }
513
514 static physid_mask_t es7000_ioapic_phys_id_map(physid_mask_t phys_map)
515 {
516         /* For clustered we don't have a good way to do this yet - hack */
517         return physids_promote(0xff);
518 }
519
520 static int es7000_check_phys_apicid_present(int cpu_physical_apicid)
521 {
522         boot_cpu_physical_apicid = read_apic_id();
523         return 1;
524 }
525
526 static unsigned int
527 es7000_cpu_mask_to_apicid_cluster(const struct cpumask *cpumask)
528 {
529         int cpus_found = 0;
530         int num_bits_set;
531         int apicid;
532         int cpu;
533
534         num_bits_set = cpumask_weight(cpumask);
535         /* Return id to all */
536         if (num_bits_set == nr_cpu_ids)
537                 return 0xFF;
538         /*
539          * The cpus in the mask must all be on the apic cluster.  If are not
540          * on the same apicid cluster return default value of target_cpus():
541          */
542         cpu = cpumask_first(cpumask);
543         apicid = es7000_cpu_to_logical_apicid(cpu);
544
545         while (cpus_found < num_bits_set) {
546                 if (cpumask_test_cpu(cpu, cpumask)) {
547                         int new_apicid = es7000_cpu_to_logical_apicid(cpu);
548
549                         if (APIC_CLUSTER(apicid) != APIC_CLUSTER(new_apicid)) {
550                                 printk("%s: Not a valid mask!\n", __func__);
551
552                                 return 0xFF;
553                         }
554                         apicid = new_apicid;
555                         cpus_found++;
556                 }
557                 cpu++;
558         }
559         return apicid;
560 }
561
562 static unsigned int es7000_cpu_mask_to_apicid(const cpumask_t *cpumask)
563 {
564         int cpus_found = 0;
565         int num_bits_set;
566         int apicid;
567         int cpu;
568
569         num_bits_set = cpus_weight(*cpumask);
570         /* Return id to all */
571         if (num_bits_set == nr_cpu_ids)
572                 return es7000_cpu_to_logical_apicid(0);
573         /*
574          * The cpus in the mask must all be on the apic cluster.  If are not
575          * on the same apicid cluster return default value of target_cpus():
576          */
577         cpu = first_cpu(*cpumask);
578         apicid = es7000_cpu_to_logical_apicid(cpu);
579         while (cpus_found < num_bits_set) {
580                 if (cpu_isset(cpu, *cpumask)) {
581                         int new_apicid = es7000_cpu_to_logical_apicid(cpu);
582
583                         if (APIC_CLUSTER(apicid) != APIC_CLUSTER(new_apicid)) {
584                                 printk("%s: Not a valid mask!\n", __func__);
585
586                                 return es7000_cpu_to_logical_apicid(0);
587                         }
588                         apicid = new_apicid;
589                         cpus_found++;
590                 }
591                 cpu++;
592         }
593         return apicid;
594 }
595
596 static unsigned int
597 es7000_cpu_mask_to_apicid_and(const struct cpumask *inmask,
598                               const struct cpumask *andmask)
599 {
600         int apicid = es7000_cpu_to_logical_apicid(0);
601         cpumask_var_t cpumask;
602
603         if (!alloc_cpumask_var(&cpumask, GFP_ATOMIC))
604                 return apicid;
605
606         cpumask_and(cpumask, inmask, andmask);
607         cpumask_and(cpumask, cpumask, cpu_online_mask);
608         apicid = es7000_cpu_mask_to_apicid(cpumask);
609
610         free_cpumask_var(cpumask);
611
612         return apicid;
613 }
614
615 static int es7000_phys_pkg_id(int cpuid_apic, int index_msb)
616 {
617         return cpuid_apic >> index_msb;
618 }
619
620 void __init es7000_update_genapic_to_cluster(void)
621 {
622         apic->target_cpus = target_cpus_cluster;
623         apic->irq_delivery_mode = dest_LowestPrio;
624         /* logical delivery broadcast to all procs: */
625         apic->irq_dest_mode = 1;
626
627         apic->init_apic_ldr = es7000_init_apic_ldr_cluster;
628
629         apic->cpu_mask_to_apicid = es7000_cpu_mask_to_apicid_cluster;
630 }
631
632 static int probe_es7000(void)
633 {
634         /* probed later in mptable/ACPI hooks */
635         return 0;
636 }
637
638 static __init int
639 es7000_mps_oem_check(struct mpc_table *mpc, char *oem, char *productid)
640 {
641         if (mpc->oemptr) {
642                 struct mpc_oemtable *oem_table =
643                         (struct mpc_oemtable *)mpc->oemptr;
644
645                 if (!strncmp(oem, "UNISYS", 6))
646                         return parse_unisys_oem((char *)oem_table);
647         }
648         return 0;
649 }
650
651 #ifdef CONFIG_ACPI
652 /* Hook from generic ACPI tables.c */
653 static int __init es7000_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
654 {
655         unsigned long oem_addr = 0;
656         int check_dsdt;
657         int ret = 0;
658
659         /* check dsdt at first to avoid clear fix_map for oem_addr */
660         check_dsdt = es7000_check_dsdt();
661
662         if (!find_unisys_acpi_oem_table(&oem_addr)) {
663                 if (check_dsdt) {
664                         ret = parse_unisys_oem((char *)oem_addr);
665                 } else {
666                         setup_unisys();
667                         ret = 1;
668                 }
669                 /*
670                  * we need to unmap it
671                  */
672                 unmap_unisys_acpi_oem_table(oem_addr);
673         }
674         return ret;
675 }
676 #else
677 static int __init es7000_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
678 {
679         return 0;
680 }
681 #endif
682
683
684 struct genapic apic_es7000 = {
685
686         .name                           = "es7000",
687         .probe                          = probe_es7000,
688         .acpi_madt_oem_check            = es7000_acpi_madt_oem_check,
689         .apic_id_registered             = es7000_apic_id_registered,
690
691         .irq_delivery_mode              = dest_Fixed,
692         /* phys delivery to target CPUs: */
693         .irq_dest_mode                  = 0,
694
695         .target_cpus                    = es7000_target_cpus,
696         .disable_esr                    = 1,
697         .dest_logical                   = 0,
698         .check_apicid_used              = es7000_check_apicid_used,
699         .check_apicid_present           = es7000_check_apicid_present,
700
701         .vector_allocation_domain       = es7000_vector_allocation_domain,
702         .init_apic_ldr                  = es7000_init_apic_ldr,
703
704         .ioapic_phys_id_map             = es7000_ioapic_phys_id_map,
705         .setup_apic_routing             = es7000_setup_apic_routing,
706         .multi_timer_check              = NULL,
707         .apicid_to_node                 = es7000_apicid_to_node,
708         .cpu_to_logical_apicid          = es7000_cpu_to_logical_apicid,
709         .cpu_present_to_apicid          = es7000_cpu_present_to_apicid,
710         .apicid_to_cpu_present          = es7000_apicid_to_cpu_present,
711         .setup_portio_remap             = NULL,
712         .check_phys_apicid_present      = es7000_check_phys_apicid_present,
713         .enable_apic_mode               = es7000_enable_apic_mode,
714         .phys_pkg_id                    = es7000_phys_pkg_id,
715         .mps_oem_check                  = es7000_mps_oem_check,
716
717         .get_apic_id                    = es7000_get_apic_id,
718         .set_apic_id                    = NULL,
719         .apic_id_mask                   = 0xFF << 24,
720
721         .cpu_mask_to_apicid             = es7000_cpu_mask_to_apicid,
722         .cpu_mask_to_apicid_and         = es7000_cpu_mask_to_apicid_and,
723
724         .send_IPI_mask                  = es7000_send_IPI_mask,
725         .send_IPI_mask_allbutself       = NULL,
726         .send_IPI_allbutself            = es7000_send_IPI_allbutself,
727         .send_IPI_all                   = es7000_send_IPI_all,
728         .send_IPI_self                  = default_send_IPI_self,
729
730         .wakeup_cpu                     = NULL,
731
732         .trampoline_phys_low            = 0x467,
733         .trampoline_phys_high           = 0x469,
734
735         .wait_for_init_deassert         = es7000_wait_for_init_deassert,
736
737         /* Nothing to do for most platforms, since cleared by the INIT cycle: */
738         .smp_callin_clear_local_apic    = NULL,
739         .store_NMI_vector               = NULL,
740         .inquire_remote_apic            = default_inquire_remote_apic,
741
742         .read                           = native_apic_mem_read,
743         .write                          = native_apic_mem_write,
744         .icr_read                       = native_apic_icr_read,
745         .icr_write                      = native_apic_icr_write,
746         .wait_icr_idle                  = native_apic_wait_icr_idle,
747         .safe_wait_icr_idle             = native_safe_apic_wait_icr_idle,
748 };