mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-26 06:04:14 +08:00
ffedeeb780
Introduce new C macros for annotations of functions and data in assembly. There is a long-standing mess in macros like ENTRY, END, ENDPROC and similar. They are used in different manners and sometimes incorrectly. So introduce macros with clear use to annotate assembly as follows: a) Support macros for the ones below SYM_T_FUNC -- type used by assembler to mark functions SYM_T_OBJECT -- type used by assembler to mark data SYM_T_NONE -- type used by assembler to mark entries of unknown type They are defined as STT_FUNC, STT_OBJECT, and STT_NOTYPE respectively. According to the gas manual, this is the most portable way. I am not sure about other assemblers, so this can be switched back to %function and %object if this turns into a problem. Architectures can also override them by something like ", @function" if they need. SYM_A_ALIGN, SYM_A_NONE -- align the symbol? SYM_L_GLOBAL, SYM_L_WEAK, SYM_L_LOCAL -- linkage of symbols b) Mostly internal annotations, used by the ones below SYM_ENTRY -- use only if you have to (for non-paired symbols) SYM_START -- use only if you have to (for paired symbols) SYM_END -- use only if you have to (for paired symbols) c) Annotations for code SYM_INNER_LABEL_ALIGN -- only for labels in the middle of code SYM_INNER_LABEL -- only for labels in the middle of code SYM_FUNC_START_LOCAL_ALIAS -- use where there are two local names for one function SYM_FUNC_START_ALIAS -- use where there are two global names for one function SYM_FUNC_END_ALIAS -- the end of LOCAL_ALIASed or ALIASed function SYM_FUNC_START -- use for global functions SYM_FUNC_START_NOALIGN -- use for global functions, w/o alignment SYM_FUNC_START_LOCAL -- use for local functions SYM_FUNC_START_LOCAL_NOALIGN -- use for local functions, w/o alignment SYM_FUNC_START_WEAK -- use for weak functions SYM_FUNC_START_WEAK_NOALIGN -- use for weak functions, w/o alignment SYM_FUNC_END -- the end of SYM_FUNC_START_LOCAL, SYM_FUNC_START, SYM_FUNC_START_WEAK, ... For functions with special (non-C) calling conventions: SYM_CODE_START -- use for non-C (special) functions SYM_CODE_START_NOALIGN -- use for non-C (special) functions, w/o alignment SYM_CODE_START_LOCAL -- use for local non-C (special) functions SYM_CODE_START_LOCAL_NOALIGN -- use for local non-C (special) functions, w/o alignment SYM_CODE_END -- the end of SYM_CODE_START_LOCAL or SYM_CODE_START d) For data SYM_DATA_START -- global data symbol SYM_DATA_START_LOCAL -- local data symbol SYM_DATA_END -- the end of the SYM_DATA_START symbol SYM_DATA_END_LABEL -- the labeled end of SYM_DATA_START symbol SYM_DATA -- start+end wrapper around simple global data SYM_DATA_LOCAL -- start+end wrapper around simple local data ========== The macros allow to pair starts and ends of functions and mark functions correctly in the output ELF objects. All users of the old macros in x86 are converted to use these in further patches. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Borislav Petkov <bp@suse.de> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Andrey Ryabinin <aryabinin@virtuozzo.com> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Juergen Gross <jgross@suse.com> Cc: Len Brown <len.brown@intel.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: linux-arch@vger.kernel.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-pm@vger.kernel.org Cc: Mark Rutland <mark.rutland@arm.com> Cc: Pavel Machek <pavel@ucw.cz> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Will Deacon <will@kernel.org> Cc: x86-ml <x86@kernel.org> Cc: xen-devel@lists.xenproject.org Link: https://lkml.kernel.org/r/20191011115108.12392-2-jslaby@suse.cz
194 lines
4.0 KiB
ReStructuredText
194 lines
4.0 KiB
ReStructuredText
|
|
.. The Linux Kernel documentation master file, created by
|
|
sphinx-quickstart on Fri Feb 12 13:51:46 2016.
|
|
You can adapt this file completely to your liking, but it should at least
|
|
contain the root `toctree` directive.
|
|
|
|
.. _linux_doc:
|
|
|
|
The Linux Kernel documentation
|
|
==============================
|
|
|
|
This is the top level of the kernel's documentation tree. Kernel
|
|
documentation, like the kernel itself, is very much a work in progress;
|
|
that is especially true as we work to integrate our many scattered
|
|
documents into a coherent whole. Please note that improvements to the
|
|
documentation are welcome; join the linux-doc list at vger.kernel.org if
|
|
you want to help out.
|
|
|
|
Licensing documentation
|
|
-----------------------
|
|
|
|
The following describes the license of the Linux kernel source code
|
|
(GPLv2), how to properly mark the license of individual files in the source
|
|
tree, as well as links to the full license text.
|
|
|
|
* :ref:`kernel_licensing`
|
|
|
|
User-oriented documentation
|
|
---------------------------
|
|
|
|
The following manuals are written for *users* of the kernel — those who are
|
|
trying to get it to work optimally on a given system.
|
|
|
|
.. toctree::
|
|
:maxdepth: 2
|
|
|
|
admin-guide/index
|
|
kbuild/index
|
|
|
|
Firmware-related documentation
|
|
------------------------------
|
|
The following holds information on the kernel's expectations regarding the
|
|
platform firmwares.
|
|
|
|
.. toctree::
|
|
:maxdepth: 2
|
|
|
|
firmware-guide/index
|
|
|
|
Application-developer documentation
|
|
-----------------------------------
|
|
|
|
The user-space API manual gathers together documents describing aspects of
|
|
the kernel interface as seen by application developers.
|
|
|
|
.. toctree::
|
|
:maxdepth: 2
|
|
|
|
userspace-api/index
|
|
ioctl/index
|
|
|
|
|
|
Introduction to kernel development
|
|
----------------------------------
|
|
|
|
These manuals contain overall information about how to develop the kernel.
|
|
The kernel community is quite large, with thousands of developers
|
|
contributing over the course of a year. As with any large community,
|
|
knowing how things are done will make the process of getting your changes
|
|
merged much easier.
|
|
|
|
.. toctree::
|
|
:maxdepth: 2
|
|
|
|
process/index
|
|
dev-tools/index
|
|
doc-guide/index
|
|
kernel-hacking/index
|
|
trace/index
|
|
maintainer/index
|
|
fault-injection/index
|
|
livepatch/index
|
|
|
|
|
|
Kernel API documentation
|
|
------------------------
|
|
|
|
These books get into the details of how specific kernel subsystems work
|
|
from the point of view of a kernel developer. Much of the information here
|
|
is taken directly from the kernel source, with supplemental material added
|
|
as needed (or at least as we managed to add it — probably *not* all that is
|
|
needed).
|
|
|
|
.. toctree::
|
|
:maxdepth: 2
|
|
|
|
driver-api/index
|
|
core-api/index
|
|
locking/index
|
|
accounting/index
|
|
block/index
|
|
cdrom/index
|
|
ide/index
|
|
fb/index
|
|
fpga/index
|
|
hid/index
|
|
i2c/index
|
|
iio/index
|
|
isdn/index
|
|
infiniband/index
|
|
leds/index
|
|
media/index
|
|
netlabel/index
|
|
networking/index
|
|
pcmcia/index
|
|
power/index
|
|
target/index
|
|
timers/index
|
|
spi/index
|
|
w1/index
|
|
watchdog/index
|
|
virt/index
|
|
input/index
|
|
hwmon/index
|
|
gpu/index
|
|
security/index
|
|
sound/index
|
|
crypto/index
|
|
filesystems/index
|
|
vm/index
|
|
bpf/index
|
|
usb/index
|
|
PCI/index
|
|
misc-devices/index
|
|
mic/index
|
|
scheduler/index
|
|
|
|
Architecture-agnostic documentation
|
|
-----------------------------------
|
|
|
|
.. toctree::
|
|
:maxdepth: 2
|
|
|
|
asm-annotations
|
|
|
|
Architecture-specific documentation
|
|
-----------------------------------
|
|
|
|
These books provide programming details about architecture-specific
|
|
implementation.
|
|
|
|
.. toctree::
|
|
:maxdepth: 2
|
|
|
|
arm/index
|
|
arm64/index
|
|
ia64/index
|
|
m68k/index
|
|
mips/index
|
|
nios2/nios2
|
|
openrisc/index
|
|
parisc/index
|
|
powerpc/index
|
|
riscv/index
|
|
s390/index
|
|
sh/index
|
|
sparc/index
|
|
x86/index
|
|
xtensa/index
|
|
|
|
Filesystem Documentation
|
|
------------------------
|
|
|
|
The documentation in this section are provided by specific filesystem
|
|
subprojects.
|
|
|
|
.. toctree::
|
|
:maxdepth: 2
|
|
|
|
filesystems/ext4/index
|
|
|
|
Translations
|
|
------------
|
|
|
|
.. toctree::
|
|
:maxdepth: 2
|
|
|
|
translations/index
|
|
|
|
Indices and tables
|
|
==================
|
|
|
|
* :ref:`genindex`
|