Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\apic\io_apic.c Create Date:2022-07-28 08:30:36
Last Modify:2020-03-16 21:24:45 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:io_apic_get_unique_id

Proto:static int io_apic_get_unique_id(int ioapic, int apic_id)

Type:int

Parameter:

TypeParameterName
intioapic
intapic_id
2457  apic_id_map = PHYSID_MASK_NONE
2460  i = 0
2471  If physids_empty(apic_id_map) Then ioapic_phys_id_map( & Bitmask of physically existing CPUs:, & apic_id_map)
2474  raw_spin_lock_irqsave( & ioapic_lock, flags)
2475  raw = io_apic_read(ioapic, 0)
2476  raw_spin_unlock_irqrestore( & ioapic_lock, flags)
2478  If apic_id >= get_physical_broadcast - Get number of physical broadcast IDs Then
2479  printk(warning conditions "IOAPIC[%d]: Invalid apic_id %d, trying %d\n", ioapic, apic_id, ID)
2481  apic_id = ID
2488  If check_apicid_used( & apic_id_map, apic_id) Then
2491  If Not check_apicid_used( & apic_id_map, i) Then Break
2495  If i == get_physical_broadcast - Get number of physical broadcast IDs Then panic - halt the system*@fmt: The text string to print* Display a message, then perform cleanups.* This function never returns.
2498  printk(warning conditions "IOAPIC[%d]: apic_id %d already used, trying %d\n", ioapic, apic_id, i)
2501  apic_id = i
2504  apicid_to_cpu_present(apic_id, & tmp)
2505  physids_or(apic_id_map, apic_id_map, tmp)
2507  If ID != apic_id Then
2508  ID = apic_id
2510  raw_spin_lock_irqsave( & ioapic_lock, flags)
2511  io_apic_write(ioapic, 0, raw)
2512  raw = io_apic_read(ioapic, 0)
2513  raw_spin_unlock_irqrestore( & ioapic_lock, flags)
2516  If ID != apic_id Then
2517  pr_err("IOAPIC[%d]: Unable to change apic_id!\n", ioapic)
2519  Return -1
2523  Define the default level of output to be very little* This can be turned up by using apic=verbose for more* information and apic=debug for _lots_ of information.* apic_verbosity is defined in apic.c(APIC_VERBOSE, formational "IOAPIC[%d]: Assigned apic_id %d\n", ioapic, apic_id)
2526  Return apic_id
Caller
NameDescribe
io_apic_unique_id