discovery.c (d9a0788093565c300f7c8dd034dbfa6ac4da9aa6) | discovery.c (86fc85c75bcd9b0f28afadd60c9f890669b42ba4) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Intel Platform Monitory Technology Discovery driver 4 * 5 * Copyright (c) 2025, Intel Corporation. 6 * All Rights Reserved. 7 */ 8 --- 569 unchanged lines hidden (view full) --- 578 * fully initialized and counted. All other resources are device-managed 579 * and will be cleaned up automatically during device_unregister(). 580 */ 581 pmt_features_remove(auxdev); 582 583 return ret; 584} 585 | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Intel Platform Monitory Technology Discovery driver 4 * 5 * Copyright (c) 2025, Intel Corporation. 6 * All Rights Reserved. 7 */ 8 --- 569 unchanged lines hidden (view full) --- 578 * fully initialized and counted. All other resources are device-managed 579 * and will be cleaned up automatically during device_unregister(). 580 */ 581 pmt_features_remove(auxdev); 582 583 return ret; 584} 585 |
586static void pmt_get_features(struct intel_pmt_entry *entry, struct feature *f) 587{ 588 int num_guids = f->table.header.num_guids; 589 int i; 590 591 for (i = 0; i < num_guids; i++) { 592 if (f->table.guids[i] != entry->guid) 593 continue; 594 595 entry->feature_flags |= BIT(f->id); 596 597 if (feature_layout[f->id] == LAYOUT_RMID) 598 entry->num_rmids = f->table.rmid.num_rmids; 599 else 600 entry->num_rmids = 0; /* entry is kzalloc but set anyway */ 601 } 602} 603 604void intel_pmt_get_features(struct intel_pmt_entry *entry) 605{ 606 struct feature *feature; 607 608 mutex_lock(&feature_list_lock); 609 list_for_each_entry(feature, &pmt_feature_list, list) { 610 if (feature->priv->parent != &entry->ep->pcidev->dev) 611 continue; 612 613 pmt_get_features(entry, feature); 614 } 615 mutex_unlock(&feature_list_lock); 616} 617EXPORT_SYMBOL_NS_GPL(intel_pmt_get_features, "INTEL_PMT"); 618 |
|
586static const struct auxiliary_device_id pmt_features_id_table[] = { 587 { .name = "intel_vsec.discovery" }, 588 {} 589}; 590MODULE_DEVICE_TABLE(auxiliary, pmt_features_id_table); 591 592static struct auxiliary_driver pmt_features_aux_driver = { 593 .id_table = pmt_features_id_table, 594 .remove = pmt_features_remove, 595 .probe = pmt_features_probe, 596}; 597module_auxiliary_driver(pmt_features_aux_driver); 598 599MODULE_AUTHOR("David E. Box <david.e.box@linux.intel.com>"); 600MODULE_DESCRIPTION("Intel PMT Discovery driver"); 601MODULE_LICENSE("GPL"); 602MODULE_IMPORT_NS("INTEL_PMT"); | 619static const struct auxiliary_device_id pmt_features_id_table[] = { 620 { .name = "intel_vsec.discovery" }, 621 {} 622}; 623MODULE_DEVICE_TABLE(auxiliary, pmt_features_id_table); 624 625static struct auxiliary_driver pmt_features_aux_driver = { 626 .id_table = pmt_features_id_table, 627 .remove = pmt_features_remove, 628 .probe = pmt_features_probe, 629}; 630module_auxiliary_driver(pmt_features_aux_driver); 631 632MODULE_AUTHOR("David E. Box <david.e.box@linux.intel.com>"); 633MODULE_DESCRIPTION("Intel PMT Discovery driver"); 634MODULE_LICENSE("GPL"); 635MODULE_IMPORT_NS("INTEL_PMT"); |