The build process recognizes that the code between CALLOUT_START and CALLOUT_END is a kernel callout that needs to be saved to a safe place in memory.
At the start of the source code (below the copyright boilerplate text and the comments) kernel callout source code has one of the following:
#include "callout.ah"
or:
.include "callout.ah"
The assembly syntax determines whether the callout uses #include or .include.
The included file defines the following macros:
The CALLOUT_START macro marks the start of a kernel callout. Its three parameters are:
If this code is the only version of this kernel callout available, or if the discovery process selects this routine to be used by the kernel, the startup library copies the code between CALLOUT_START and CALLOUT_END to a safe place in memory where it will be available for the kernel to use after the memory which was allocated for the startup code has been overwritten.
The syntax of the two macros depends on the assembly used in the source code. The following examples are two common versions (this code and all assembly code in this document uses GNU Assembler (GAS) syntax):
CALLOUT_START(timer_load_8254, 0, 0) CALLOUT_END(timer_load_8254)
and:
CALLOUT_START timer_load_8254, 0, 0 CALLOUT_END timer_load_8254
Keep whatever syntax is used in the file you started from, and replace the sections of code from the original file with code that works with your hardware.