summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/pptt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/pptt.c')
-rw-r--r--drivers/acpi/pptt.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/drivers/acpi/pptt.c b/drivers/acpi/pptt.c
index 065c4fc245d1..b72e6afaa8fb 100644
--- a/drivers/acpi/pptt.c
+++ b/drivers/acpi/pptt.c
@@ -164,7 +164,7 @@ static struct acpi_pptt_cache *acpi_find_cache_level(struct acpi_table_header *t
164} 164}
165 165
166/** 166/**
167 * acpi_count_levels() - Given a PPTT table, and a cpu node, count the caches 167 * acpi_count_levels() - Given a PPTT table, and a CPU node, count the caches
168 * @table_hdr: Pointer to the head of the PPTT table 168 * @table_hdr: Pointer to the head of the PPTT table
169 * @cpu_node: processor node we wish to count caches for 169 * @cpu_node: processor node we wish to count caches for
170 * 170 *
@@ -235,7 +235,7 @@ static int acpi_pptt_leaf_node(struct acpi_table_header *table_hdr,
235/** 235/**
236 * acpi_find_processor_node() - Given a PPTT table find the requested processor 236 * acpi_find_processor_node() - Given a PPTT table find the requested processor
237 * @table_hdr: Pointer to the head of the PPTT table 237 * @table_hdr: Pointer to the head of the PPTT table
238 * @acpi_cpu_id: cpu we are searching for 238 * @acpi_cpu_id: CPU we are searching for
239 * 239 *
240 * Find the subtable entry describing the provided processor. 240 * Find the subtable entry describing the provided processor.
241 * This is done by iterating the PPTT table looking for processor nodes 241 * This is done by iterating the PPTT table looking for processor nodes
@@ -456,21 +456,21 @@ static struct acpi_pptt_processor *acpi_find_processor_package_id(struct acpi_ta
456 456
457static void acpi_pptt_warn_missing(void) 457static void acpi_pptt_warn_missing(void)
458{ 458{
459 pr_warn_once("No PPTT table found, cpu and cache topology may be inaccurate\n"); 459 pr_warn_once("No PPTT table found, CPU and cache topology may be inaccurate\n");
460} 460}
461 461
462/** 462/**
463 * topology_get_acpi_cpu_tag() - Find a unique topology value for a feature 463 * topology_get_acpi_cpu_tag() - Find a unique topology value for a feature
464 * @table: Pointer to the head of the PPTT table 464 * @table: Pointer to the head of the PPTT table
465 * @cpu: Kernel logical cpu number 465 * @cpu: Kernel logical CPU number
466 * @level: A level that terminates the search 466 * @level: A level that terminates the search
467 * @flag: A flag which terminates the search 467 * @flag: A flag which terminates the search
468 * 468 *
469 * Get a unique value given a cpu, and a topology level, that can be 469 * Get a unique value given a CPU, and a topology level, that can be
470 * matched to determine which cpus share common topological features 470 * matched to determine which cpus share common topological features
471 * at that level. 471 * at that level.
472 * 472 *
473 * Return: Unique value, or -ENOENT if unable to locate cpu 473 * Return: Unique value, or -ENOENT if unable to locate CPU
474 */ 474 */
475static int topology_get_acpi_cpu_tag(struct acpi_table_header *table, 475static int topology_get_acpi_cpu_tag(struct acpi_table_header *table,
476 unsigned int cpu, int level, int flag) 476 unsigned int cpu, int level, int flag)
@@ -510,7 +510,7 @@ static int find_acpi_cpu_topology_tag(unsigned int cpu, int level, int flag)
510 return -ENOENT; 510 return -ENOENT;
511 } 511 }
512 retval = topology_get_acpi_cpu_tag(table, cpu, level, flag); 512 retval = topology_get_acpi_cpu_tag(table, cpu, level, flag);
513 pr_debug("Topology Setup ACPI cpu %d, level %d ret = %d\n", 513 pr_debug("Topology Setup ACPI CPU %d, level %d ret = %d\n",
514 cpu, level, retval); 514 cpu, level, retval);
515 acpi_put_table(table); 515 acpi_put_table(table);
516 516
@@ -519,9 +519,9 @@ static int find_acpi_cpu_topology_tag(unsigned int cpu, int level, int flag)
519 519
520/** 520/**
521 * acpi_find_last_cache_level() - Determines the number of cache levels for a PE 521 * acpi_find_last_cache_level() - Determines the number of cache levels for a PE
522 * @cpu: Kernel logical cpu number 522 * @cpu: Kernel logical CPU number
523 * 523 *
524 * Given a logical cpu number, returns the number of levels of cache represented 524 * Given a logical CPU number, returns the number of levels of cache represented
525 * in the PPTT. Errors caused by lack of a PPTT table, or otherwise, return 0 525 * in the PPTT. Errors caused by lack of a PPTT table, or otherwise, return 0
526 * indicating we didn't find any cache levels. 526 * indicating we didn't find any cache levels.
527 * 527 *
@@ -534,7 +534,7 @@ int acpi_find_last_cache_level(unsigned int cpu)
534 int number_of_levels = 0; 534 int number_of_levels = 0;
535 acpi_status status; 535 acpi_status status;
536 536
537 pr_debug("Cache Setup find last level cpu=%d\n", cpu); 537 pr_debug("Cache Setup find last level CPU=%d\n", cpu);
538 538
539 acpi_cpu_id = get_acpi_id_for_cpu(cpu); 539 acpi_cpu_id = get_acpi_id_for_cpu(cpu);
540 status = acpi_get_table(ACPI_SIG_PPTT, 0, &table); 540 status = acpi_get_table(ACPI_SIG_PPTT, 0, &table);
@@ -551,14 +551,14 @@ int acpi_find_last_cache_level(unsigned int cpu)
551 551
552/** 552/**
553 * cache_setup_acpi() - Override CPU cache topology with data from the PPTT 553 * cache_setup_acpi() - Override CPU cache topology with data from the PPTT
554 * @cpu: Kernel logical cpu number 554 * @cpu: Kernel logical CPU number
555 * 555 *
556 * Updates the global cache info provided by cpu_get_cacheinfo() 556 * Updates the global cache info provided by cpu_get_cacheinfo()
557 * when there are valid properties in the acpi_pptt_cache nodes. A 557 * when there are valid properties in the acpi_pptt_cache nodes. A
558 * successful parse may not result in any updates if none of the 558 * successful parse may not result in any updates if none of the
559 * cache levels have any valid flags set. Futher, a unique value is 559 * cache levels have any valid flags set. Further, a unique value is
560 * associated with each known CPU cache entry. This unique value 560 * associated with each known CPU cache entry. This unique value
561 * can be used to determine whether caches are shared between cpus. 561 * can be used to determine whether caches are shared between CPUs.
562 * 562 *
563 * Return: -ENOENT on failure to find table, or 0 on success 563 * Return: -ENOENT on failure to find table, or 0 on success
564 */ 564 */
@@ -567,7 +567,7 @@ int cache_setup_acpi(unsigned int cpu)
567 struct acpi_table_header *table; 567 struct acpi_table_header *table;
568 acpi_status status; 568 acpi_status status;
569 569
570 pr_debug("Cache Setup ACPI cpu %d\n", cpu); 570 pr_debug("Cache Setup ACPI CPU %d\n", cpu);
571 571
572 status = acpi_get_table(ACPI_SIG_PPTT, 0, &table); 572 status = acpi_get_table(ACPI_SIG_PPTT, 0, &table);
573 if (ACPI_FAILURE(status)) { 573 if (ACPI_FAILURE(status)) {
@@ -582,8 +582,8 @@ int cache_setup_acpi(unsigned int cpu)
582} 582}
583 583
584/** 584/**
585 * find_acpi_cpu_topology() - Determine a unique topology value for a given cpu 585 * find_acpi_cpu_topology() - Determine a unique topology value for a given CPU
586 * @cpu: Kernel logical cpu number 586 * @cpu: Kernel logical CPU number
587 * @level: The topological level for which we would like a unique ID 587 * @level: The topological level for which we would like a unique ID
588 * 588 *
589 * Determine a topology unique ID for each thread/core/cluster/mc_grouping 589 * Determine a topology unique ID for each thread/core/cluster/mc_grouping
@@ -596,7 +596,7 @@ int cache_setup_acpi(unsigned int cpu)
596 * other levels beyond this use a generated value to uniquely identify 596 * other levels beyond this use a generated value to uniquely identify
597 * a topological feature. 597 * a topological feature.
598 * 598 *
599 * Return: -ENOENT if the PPTT doesn't exist, or the cpu cannot be found. 599 * Return: -ENOENT if the PPTT doesn't exist, or the CPU cannot be found.
600 * Otherwise returns a value which represents a unique topological feature. 600 * Otherwise returns a value which represents a unique topological feature.
601 */ 601 */
602int find_acpi_cpu_topology(unsigned int cpu, int level) 602int find_acpi_cpu_topology(unsigned int cpu, int level)
@@ -606,12 +606,12 @@ int find_acpi_cpu_topology(unsigned int cpu, int level)
606 606
607/** 607/**
608 * find_acpi_cpu_cache_topology() - Determine a unique cache topology value 608 * find_acpi_cpu_cache_topology() - Determine a unique cache topology value
609 * @cpu: Kernel logical cpu number 609 * @cpu: Kernel logical CPU number
610 * @level: The cache level for which we would like a unique ID 610 * @level: The cache level for which we would like a unique ID
611 * 611 *
612 * Determine a unique ID for each unified cache in the system 612 * Determine a unique ID for each unified cache in the system
613 * 613 *
614 * Return: -ENOENT if the PPTT doesn't exist, or the cpu cannot be found. 614 * Return: -ENOENT if the PPTT doesn't exist, or the CPU cannot be found.
615 * Otherwise returns a value which represents a unique topological feature. 615 * Otherwise returns a value which represents a unique topological feature.
616 */ 616 */
617int find_acpi_cpu_cache_topology(unsigned int cpu, int level) 617int find_acpi_cpu_cache_topology(unsigned int cpu, int level)
@@ -643,17 +643,17 @@ int find_acpi_cpu_cache_topology(unsigned int cpu, int level)
643 643
644 644
645/** 645/**
646 * find_acpi_cpu_topology_package() - Determine a unique cpu package value 646 * find_acpi_cpu_topology_package() - Determine a unique CPU package value
647 * @cpu: Kernel logical cpu number 647 * @cpu: Kernel logical CPU number
648 * 648 *
649 * Determine a topology unique package ID for the given cpu. 649 * Determine a topology unique package ID for the given CPU.
650 * This ID can then be used to group peers, which will have matching ids. 650 * This ID can then be used to group peers, which will have matching ids.
651 * 651 *
652 * The search terminates when either a level is found with the PHYSICAL_PACKAGE 652 * The search terminates when either a level is found with the PHYSICAL_PACKAGE
653 * flag set or we reach a root node. 653 * flag set or we reach a root node.
654 * 654 *
655 * Return: -ENOENT if the PPTT doesn't exist, or the cpu cannot be found. 655 * Return: -ENOENT if the PPTT doesn't exist, or the CPU cannot be found.
656 * Otherwise returns a value which represents the package for this cpu. 656 * Otherwise returns a value which represents the package for this CPU.
657 */ 657 */
658int find_acpi_cpu_topology_package(unsigned int cpu) 658int find_acpi_cpu_topology_package(unsigned int cpu)
659{ 659{