Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

platform/x86/intel/vsec: remove platform_info from vsec device structure

In preparation for exporting an API to register Intel Vendor Specific
Extended Capabilities (VSEC) from other drivers, remove the pointer to
platform_info from intel_vsec_device. This prevents a potential page fault
when auxiliary drivers probe and attempt to dereference this pointer to
access the needed quirks field. Instead, just add the quirks to
intel_vsec_device.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20231129222132.2331261-5-david.e.box@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>

authored by

David E. Box and committed by
Hans de Goede
0a0a52ab dbc01b0c

+3 -3
+1 -1
drivers/platform/x86/intel/pmt/class.c
··· 31 31 * differences from the server platforms (which use the Out Of Band 32 32 * Management Services Module OOBMSM). 33 33 */ 34 - return !!(ivdev->info->quirks & VSEC_QUIRK_EARLY_HW); 34 + return !!(ivdev->quirks & VSEC_QUIRK_EARLY_HW); 35 35 } 36 36 EXPORT_SYMBOL_NS_GPL(intel_pmt_is_early_client_hw, INTEL_PMT); 37 37
+1 -1
drivers/platform/x86/intel/vsec.c
··· 194 194 intel_vsec_dev->pcidev = pdev; 195 195 intel_vsec_dev->resource = res; 196 196 intel_vsec_dev->num_resources = header->num_entries; 197 - intel_vsec_dev->info = info; 197 + intel_vsec_dev->quirks = info->quirks; 198 198 199 199 if (header->id == VSEC_ID_SDSI) 200 200 intel_vsec_dev->ida = &intel_vsec_sdsi_ida;
+1 -1
drivers/platform/x86/intel/vsec.h
··· 79 79 struct pci_dev *pcidev; 80 80 struct resource *resource; 81 81 struct ida *ida; 82 - struct intel_vsec_platform_info *info; 83 82 int num_resources; 84 83 int id; /* xa */ 85 84 void *priv_data; 86 85 size_t priv_data_size; 86 + unsigned long quirks; 87 87 }; 88 88 89 89 int intel_vsec_add_aux(struct pci_dev *pdev, struct device *parent,