Lines Matching +full:locality +full:- +full:specific

1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * acpi.c - Architecture-Specific Low-Level ACPI Support
7 * Copyright (C) 2000, 2002-2003 Hewlett-Packard Co.
8 * David Mosberger-Tang <davidm@hpl.hp.com>
10 * Copyright (C) 2000,2001 J.I. Lee <jung-ik.lee@intel.com>
13 * Copyright (C) 2001 Takayoshi Kochi <t-kochi@bq.jp.nec.com>
49 [0 ... ACPI_MAX_PLATFORM_INTERRUPTS - 1] = -1
60 int vector = -1; in acpi_request_vector()
80 /* --------------------------------------------------------------------------
81 Boot-time Table Parsing
82 -------------------------------------------------------------------------- */
97 return -EINVAL; in acpi_parse_lapic_addr_ovr()
99 if (lapic->address) { in acpi_parse_lapic_addr_ovr()
101 ipi_base_addr = ioremap(lapic->address, 0); in acpi_parse_lapic_addr_ovr()
115 if (lsapic->lapic_flags & ACPI_MADT_ENABLED) { in acpi_parse_lsapic()
118 (lsapic->id << 8) | lsapic->eid; in acpi_parse_lsapic()
135 return -EINVAL; in acpi_parse_lapic_nmi()
149 return -EINVAL; in acpi_parse_iosapic()
151 return iosapic_init(iosapic->address, iosapic->global_irq_base); in acpi_parse_iosapic()
166 return -EINVAL; in acpi_parse_plat_int_src()
172 vector = iosapic_register_platform_intr(plintsrc->type, in acpi_parse_plat_int_src()
173 plintsrc->global_irq, in acpi_parse_plat_int_src()
174 plintsrc->io_sapic_vector, in acpi_parse_plat_int_src()
175 plintsrc->eid, in acpi_parse_plat_int_src()
176 plintsrc->id, in acpi_parse_plat_int_src()
177 ((plintsrc->inti_flags & ACPI_MADT_POLARITY_MASK) == in acpi_parse_plat_int_src()
180 ((plintsrc->inti_flags & ACPI_MADT_TRIGGER_MASK) == in acpi_parse_plat_int_src()
184 platform_intr_list[plintsrc->type] = vector; in acpi_parse_plat_int_src()
186 acpi_cpei_override = plintsrc->flags & ACPI_MADT_CPEI_OVERRIDE; in acpi_parse_plat_int_src()
192 acpi_cpei_phys_cpuid = ((plintsrc->id << 8) | (plintsrc->eid)) & 0xffff; in acpi_parse_plat_int_src()
205 * is present, otherwise return that its re-targettable in can_cpei_retarget()
249 return -EINVAL; in acpi_parse_int_src_ovr()
251 iosapic_override_isa_irq(p->source_irq, p->global_irq, in acpi_parse_int_src_ovr()
252 ((p->inti_flags & ACPI_MADT_POLARITY_MASK) == in acpi_parse_int_src_ovr()
255 ((p->inti_flags & ACPI_MADT_TRIGGER_MASK) == in acpi_parse_int_src_ovr()
269 return -EINVAL; in acpi_parse_nmi_src()
294 acpi_madt_rev = acpi_madt->header.revision; in acpi_parse_madt()
300 has_8259 = acpi_madt->flags & ACPI_MADT_PCAT_COMPAT; in acpi_parse_madt()
306 if (acpi_madt->address) in acpi_parse_madt()
307 ipi_base_addr = ioremap(acpi_madt->address, 0); in acpi_parse_madt()
311 acpi_madt_oem_check(acpi_madt->header.oem_id, in acpi_parse_madt()
312 acpi_madt->header.oem_table_id); in acpi_parse_madt()
335 pxm = pa->proximity_domain_lo; in get_processor_proximity_domain()
337 pxm += pa->proximity_domain_hi[0] << 8; in get_processor_proximity_domain()
346 pxm = ma->proximity_domain; in get_memory_proximity_domain()
354 * ACPI 2.0 SLIT (System Locality Information Table)
362 + slit->locality_count * slit->locality_count; in acpi_numa_slit_init()
363 if (slit->header.length != len) { in acpi_numa_slit_init()
366 len, slit->header.length); in acpi_numa_slit_init()
377 if (!(pa->flags & ACPI_SRAT_CPU_ENABLED)) in acpi_numa_processor_affinity_init()
392 (pa->apic_id << 8) | (pa->local_sapic_eid); in acpi_numa_processor_affinity_init()
409 paddr = ma->base_address; in acpi_numa_memory_affinity_init()
410 size = ma->length; in acpi_numa_memory_affinity_init()
413 if (!(ma->flags & ACPI_SRAT_MEM_ENABLED)) in acpi_numa_memory_affinity_init()
414 return -1; in acpi_numa_memory_affinity_init()
418 return -EINVAL; in acpi_numa_memory_affinity_init()
427 if (paddr < p->start_paddr) in acpi_numa_memory_affinity_init()
431 for (q = pend - 1; q >= p; q--) in acpi_numa_memory_affinity_init()
434 p->start_paddr = paddr; in acpi_numa_memory_affinity_init()
435 p->size = size; in acpi_numa_memory_affinity_init()
436 p->nid = pxm; in acpi_numa_memory_affinity_init()
453 * MCD - This can probably be dropped now. No need for pxm ID to node ID in acpi_numa_fixup()
495 memset(numa_slit, -1, sizeof(numa_slit)); in acpi_numa_fixup()
496 for (i = 0; i < slit_table->locality_count; i++) { in acpi_numa_fixup()
500 for (j = 0; j < slit_table->locality_count; j++) { in acpi_numa_fixup()
505 slit_table->entry[i * slit_table->locality_count + j]; in acpi_numa_fixup()
510 printk("ACPI 2.0 SLIT locality table:\n"); in acpi_numa_fixup()
560 if (fadt_header->revision != 3) in acpi_parse_fadt()
561 return -ENODEV; /* Only deal with ACPI 2.0 FADT */ in acpi_parse_fadt()
565 acpi_register_gsi(NULL, fadt->sci_interrupt, ACPI_LEVEL_SENSITIVE, in acpi_parse_fadt()
587 "Error parsing MADT - no LAPIC entries\n"); in early_acpi_boot_init()
601 /* Make boot-up look pretty */ in early_acpi_boot_init()
613 * ---- in acpi_boot_init()
616 * information -- the successor to MPS tables. in acpi_boot_init()
640 "Error parsing MADT - no IOSAPIC entries\n"); in acpi_boot_init()
643 /* System-Level Interrupt Routing */ in acpi_boot_init()
693 if (tmp == -1) in acpi_gsi_to_irq()
694 return -1; in acpi_gsi_to_irq()
703 return -1; in acpi_isa_irq_to_gsi()
716 * We don't have cpu-only-node hotadd. But if the system equips in acpi_map_cpu2node()
728 int additional_cpus __initdata = -1;
742 * are onlined, or offlined. The reason is per-cpu data-structures
748 * - Ashok Raj
751 * - If the BIOS specified disabled CPUs in ACPI/mptables use that.
752 * - The user can overwrite it with additional_cpus=NUM
753 * - Otherwise don't reserve additional CPUs.
760 disabled_cpus = total_cpus - available_cpus; in prefill_possible_map()
762 if (additional_cpus == -1) { in prefill_possible_map()
775 possible, max((possible - available_cpus), 0)); in prefill_possible_map()
789 return -EINVAL; in _acpi_map_lsapic()
812 ia64_cpu_to_sapicid[cpu] = -1; in acpi_unmap_cpu()
816 /* NUMA specific cleanup's */ in acpi_unmap_cpu()
842 if (obj->type != ACPI_TYPE_BUFFER || in acpi_map_iosapic()
843 obj->buffer.length < sizeof(*iosapic)) { in acpi_map_iosapic()
848 iosapic = (struct acpi_madt_io_sapic *)obj->buffer.pointer; in acpi_map_iosapic()
850 if (iosapic->header.type != ACPI_MADT_TYPE_IO_SAPIC) { in acpi_map_iosapic()
855 gsi_base = iosapic->global_irq_base; in acpi_map_iosapic()
904 * acpi_suspend_lowlevel() - save kernel state and suspend.