函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\apic\io_apic.c Create Date:2022-07-27 09:29:57
Last Modify:2020-03-16 21:24:45 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:This code may look a bit paranoid, but it's supposed to cooperate with* a wide range of boards and BIOS bugs. Fortunately only the timer IRQ* is so screwy. Thanks to Brian Perkins for testing/hacking this beast* fanatically on his truly buggy board.

函数原型:static inline void __init check_timer(void)

返回类型:void

参数:

2128  irq_data等于irq_get_irq_data(0)
2129  data等于和中断控制器相关的私有数据
2130  cfg等于irqd_cfg(irq_data)
2131  node等于cpu_to_node(0)
2134  no_pin1等于0
2136  如果非HPET replaces the PIT, when enabled. So we need to know, which of* the two timers is used则返回
2139  local_irq_save(flags)
2144  mask(0)
2155  apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT)
2156  init(1)
2158  pin1等于Find the pin to which IRQ[irq] (ISA) is connected
2159  apic1等于find_isa_irq_apic(0, mp_INT)
2160  pin2等于pin
2161  apic2等于apic
2163  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(Debugging macros, formational "..TIMER: vector=0x%02X apic1=%d pin1=%d apic2=%d pin2=%d\n", vector, apic1, pin1, apic2, pin2)
2174  如果pin1恒等于负1则
2175  panic_if_irq_remap("BIOS bug: timer not connected to IO-APIC")
2176  pin1等于pin2
2177  apic1等于apic2
2178  no_pin1等于1
2179  否则如果pin2恒等于负1则
2180  pin2等于pin1
2181  apic2等于apic1
2184  如果pin1不等于负1则
2186  如果no_pin1
2188  否则
2196  如果idx不等于负1且irq_trigger(idx)则unmask_ioapic_irq(irq_get_irq_data(0))
2199  irq_domain_deactivate_irq(irq_data)
2200  irq_domain_activate_irq(irq_data, false)
2202  如果disable_timer_pin_1大于0则clear_IO_APIC_pin(0, pin1)
2204  转到:out
2206  panic_if_irq_remap("timer doesn't work through Interrupt-remapped IO-APIC")
2207  禁止中断()
2208  clear_IO_APIC_pin(apic1, pin1)
2209  如果非no_pin1Define 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(Debugging macros, r conditions "..MP-BIOS bug: 8254 timer not connected to IO-APIC\n")
2213  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(Debugging macros, formational "...trying to set up timer (IRQ0) through the 8259A ...\n")
2215  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(Debugging macros, formational "..... (found apic %d pin %d) ...\n", apic2, pin2)
2220  Reroute an IRQ to a different pin.
2221  irq_domain_deactivate_irq(irq_data)
2222  irq_domain_activate_irq(irq_data, false)
2223  unmask(0)
2226  转到:out
2231  禁止中断()
2232  mask(0)
2233  clear_IO_APIC_pin(apic2, pin2)
2234  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(Debugging macros, formational "....... failed.\n")
2237  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(Debugging macros, formational "...trying to set up timer as Virtual Wire IRQ...\n")
2240  lapic_register_intr(0)
2241  apic_write(APIC_LVT0, APIC_DM_FIXED | vector)
2242  unmask(0)
2244  如果There is a nasty bug in some older SMP boards, their mptable lies* about the timer IRQ
2245  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(Debugging macros, formational "..... works.\n")
2246  转到:out
2248  禁止中断()
2249  mask(0)
2250  apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_FIXED | vector)
2251  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(Debugging macros, formational "..... failed.\n")
2253  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(Debugging macros, formational "...trying to set up timer as ExtINT IRQ...\n")
2256  init(0)
2257  make_irq(0)
2258  apic_write(APIC_LVT0, APIC_DM_EXTINT)
2260  This looks a bit hackish but it's about the only one way of sending* a few INTA cycles to 8259As and any associated glue logic
2262  如果There is a nasty bug in some older SMP boards, their mptable lies* about the timer IRQ
2263  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(Debugging macros, formational "..... works.\n")
2264  转到:out
2266  禁止中断()
2267  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(Debugging macros, formational "..... failed :(.\n")
2268  如果apic_is_x2apic_enabled()则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(Debugging macros, formational "Perhaps problem with the pre-enabled x2apic mode\nTry booting with x2apic and interrupt-remapping disabled in the bios.\n")
2272  panic - halt the system*@fmt: The text string to print* Display a message, then perform cleanups.* This function never returns.
2274  out :
2275  local_irq_restore(flags)
调用者
名称描述
setup_IO_APIC