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