Full Code of free-electrons/elixir for AI

master 7ee53451c17e cached
167 files
1005.5 KB
284.6k tokens
2359 symbols
1 requests
Download .txt
Showing preview only (1,059K chars total). Download the full file or copy to clipboard to get everything.
Repository: free-electrons/elixir
Branch: master
Commit: 7ee53451c17e
Files: 167
Total size: 1005.5 KB

Directory structure:
gitextract_uz81yfub/

├── .dockerignore
├── .editorconfig
├── .gitignore
├── .mailmap
├── .travis.yml
├── CHANGELOG.adoc
├── COPYING
├── README.adoc
├── docker/
│   ├── 000-default.conf
│   ├── Dockerfile
│   └── gitconfig
├── elixir/
│   ├── __init__.py
│   ├── api.py
│   ├── autocomplete.py
│   ├── data.py
│   ├── filters/
│   │   ├── __init__.py
│   │   ├── configin.py
│   │   ├── cppinc.py
│   │   ├── cpppathinc.py
│   │   ├── defconfig.py
│   │   ├── dtscompcode.py
│   │   ├── dtscompdocs.py
│   │   ├── dtscompdts.py
│   │   ├── dtsi.py
│   │   ├── ident.py
│   │   ├── kconfig.py
│   │   ├── kconfigidents.py
│   │   ├── makefiledir.py
│   │   ├── makefiledtb.py
│   │   ├── makefilefile.py
│   │   ├── makefileo.py
│   │   ├── makefilesrctree.py
│   │   ├── makefilesubdir.py
│   │   ├── projects.py
│   │   └── utils.py
│   ├── lib.py
│   ├── query.py
│   ├── web.py
│   └── web_utils.py
├── find-file-doc-comments.pl
├── find_compatible_dts.py
├── projects/
│   ├── amazon-freertos.sh
│   ├── arm-trusted-firmware.sh
│   ├── barebox.sh
│   ├── bluez.sh
│   ├── busybox.sh
│   ├── coreboot.sh
│   ├── dpdk.sh
│   ├── freebsd.sh
│   ├── glibc.sh
│   ├── grub.sh
│   ├── iproute2.sh
│   ├── linux.sh
│   ├── llvm.sh
│   ├── mesa.sh
│   ├── musl.sh
│   ├── ofono.sh
│   ├── op-tee.sh
│   ├── opensbi.sh
│   ├── qemu.sh
│   ├── toybox.sh
│   ├── u-boot.sh
│   ├── uclibc-ng.sh
│   ├── xen.sh
│   └── zephyr.sh
├── requirements.txt
├── samples/
│   └── projects/
│       └── linuxtest.sh
├── script.sh
├── static/
│   ├── autocomplete.js
│   ├── dynamic-references.js
│   ├── fonts/
│   │   └── ubuntu/
│   │       ├── LICENCE-FAQ.txt
│   │       ├── LICENCE.txt
│   │       └── copyright.txt
│   ├── messages.json
│   ├── robots.txt
│   ├── script.js
│   └── style.css
├── t/
│   ├── 050-testhelpers.t
│   ├── 100-basic.t
│   ├── 200-api.t
│   ├── 300-doc-comments.t
│   ├── 400-web.t
│   ├── TestClass.pm
│   ├── TestEnvironment.pm
│   ├── TestHelpers.pm
│   ├── api_test.py
│   ├── interact.pl
│   └── tree/
│       ├── arch/
│       │   ├── arm/
│       │   │   └── xen/
│       │   │       └── hypercall.S
│       │   └── x86/
│       │       └── include/
│       │           ├── asm/
│       │           │   ├── acpi.h
│       │           │   ├── ist.h
│       │           │   ├── orc_types.h
│       │           │   └── uprobes.h
│       │           └── uapi/
│       │               └── asm/
│       │                   └── ist.h
│       ├── drivers/
│       │   ├── firmware/
│       │   │   └── broadcom/
│       │   │       └── bcm74xx_sprom.c
│       │   └── i2c/
│       │       ├── i2c-boardinfo.c
│       │       ├── i2c-core-acpi.c
│       │       ├── i2c-core-base.c
│       │       ├── i2c-core-of.c
│       │       ├── i2c-core-slave.c
│       │       ├── i2c-core-smbus.c
│       │       ├── i2c-core.h
│       │       ├── i2c-dev.c
│       │       ├── i2c-smbus.c
│       │       └── i2c-stub.c
│       ├── include/
│       │   ├── acpi/
│       │   │   ├── acpi_bus.h
│       │   │   └── acpi_drivers.h
│       │   ├── asm-generic/
│       │   │   ├── barrier.h
│       │   │   ├── io.h
│       │   │   ├── pci_iomap.h
│       │   │   ├── qrwlock.h
│       │   │   ├── qspinlock.h
│       │   │   └── qspinlock_types.h
│       │   ├── linux/
│       │   │   ├── acpi.h
│       │   │   ├── apm_bios.h
│       │   │   ├── assoc_array.h
│       │   │   ├── cred.h
│       │   │   ├── i2c-smbus.h
│       │   │   ├── i2c.h
│       │   │   ├── key.h
│       │   │   ├── kmod.h
│       │   │   ├── log2.h
│       │   │   ├── logic_pio.h
│       │   │   ├── memblock.h
│       │   │   ├── of.h
│       │   │   ├── of_platform.h
│       │   │   ├── plist.h
│       │   │   ├── pm.h
│       │   │   ├── pm_wakeup.h
│       │   │   ├── radix-tree.h
│       │   │   ├── rbtree.h
│       │   │   ├── rcu_node_tree.h
│       │   │   ├── rcu_segcblist.h
│       │   │   ├── rcu_sync.h
│       │   │   ├── rcupdate.h
│       │   │   ├── rcutree.h
│       │   │   ├── srcu.h
│       │   │   ├── srcutree.h
│       │   │   ├── stackdepot.h
│       │   │   ├── uprobes.h
│       │   │   └── xarray.h
│       │   ├── trace/
│       │   │   └── events/
│       │   │       └── i2c.h
│       │   └── uapi/
│       │       └── linux/
│       │           ├── apm_bios.h
│       │           ├── eventpoll.h
│       │           ├── i2c.h
│       │           └── rseq.h
│       ├── issue102.c
│       ├── issue131.h
│       ├── issue134.c
│       ├── issue150.S
│       ├── issue186-counterexamples.c
│       ├── issue186.c
│       ├── issue188.c
│       ├── issue192.c
│       └── syscall_define.c
├── templates/
│   ├── error.html
│   ├── header.html
│   ├── ident.html
│   ├── layout.html
│   ├── sidebar.html
│   ├── source.html
│   ├── topbar.html
│   └── tree.html
├── update.py
├── utils/
│   ├── index
│   ├── query.py
│   └── speedtest.py
└── wsgi.py

================================================
FILE CONTENTS
================================================

================================================
FILE: .dockerignore
================================================
# Generated files
**/__pycache__
tags
/.cache/
.idea/
env
venv/
.venv/
**/*.py[cod]

**/*.db
**/repo
**/data

.git
.gitignore
.gitattributes

# Editor and other backup files
**/*.swp
**/*~
**/~*


================================================
FILE: .editorconfig
================================================
# see https://editorconfig.org for the format of this file
root = true

[*]
end_of_line = LF
indent_style = space
indent_size = 4


================================================
FILE: .gitignore
================================================
# Generated files
__pycache__
tags
/.cache/
.idea/
env/
venv/
/data/

# Web-specific
http/images
http/*.html
http/favicon.ico
http/robots.txt

# Editor and other backup files
*.swp
*~
~*
.envrc


================================================
FILE: .mailmap
================================================
Christopher White <cxwembedded@gmail.com>
Christopher White <cxwembedded@gmail.com> <cwhite@d3engineering.com>
Michael Opdenacker <michael.opdenacker@bootlin.com> <michael@bootlin.com>
Michael Opdenacker <michael.opdenacker@bootlin.com> <michael@free-electrons.com>
Michael Opdenacker <michael.opdenacker@bootlin.com> <michael.opdenacker@free-electrons.com>
Mikaël Bouillot <mikael.bouillot@bootlin.com> <jxaojeib@corbac.com>
Mikaël Bouillot <mikael.bouillot@bootlin.com> <mikael.bouillot@free-electrons.com>


================================================
FILE: .travis.yml
================================================
# .travis.yml for Elixir, https://github.com/bootlin/elixir
language: python

os:
  - linux

dist:
  - jammy

python:
  - "3.10"

before_install:
  - sudo apt-get -y install libdb-dev python3-pytest libjansson4 universal-ctags
  - pip install jinja2 pygments bsddb3 falcon

script:
  - prove -v


================================================
FILE: CHANGELOG.adoc
================================================
= Elixir Changelog

== 2024-08 - WSGI update

* Migrated Elixir from a CGI-based architecture to a WSGI-based architecture. This should improve performance.
* Python files were moved from `./http` to `./elixir`.
* Made autocomplete use a prefix search that's native for the database. This should massively improve autocomplete performance.

Changes to configuration of most HTTP servers will be required.
Some HTTP servers may not support WSGI natively and may require a separate WSGI server to proxy to
(for example, lighthttpd and nginx do not support WSGI, but you can proxy requests to uWSGI).
We also recommend using Python virtual environments to manage dependencies.
Check "Manual Installation" section of README for details.

== 2025-03 - Query refactor

The query tool was extracted to utils/query.py. Example call: `python3 -m utils.query file v6.8 /README'.
Version and cmd (file/ident) parameters changed order, to allow for commands that do not take version as a parameter.



================================================
FILE: COPYING
================================================
                    GNU AFFERO GENERAL PUBLIC LICENSE
                       Version 3, 19 November 2007

 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.

  The licenses for most software and other practical works are designed
to take away your freedom to share and change the works.  By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.

  Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.

  A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate.  Many developers of free software are heartened and
encouraged by the resulting cooperation.  However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.

  The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community.  It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server.  Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.

  An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals.  This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.

  The precise terms and conditions for copying, distribution and
modification follow.

                       TERMS AND CONDITIONS

  0. Definitions.

  "This License" refers to version 3 of the GNU Affero General Public License.

  "Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.

  "The Program" refers to any copyrightable work licensed under this
License.  Each licensee is addressed as "you".  "Licensees" and
"recipients" may be individuals or organizations.

  To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy.  The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.

  A "covered work" means either the unmodified Program or a work based
on the Program.

  To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy.  Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.

  To "convey" a work means any kind of propagation that enables other
parties to make or receive copies.  Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.

  An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License.  If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.

  1. Source Code.

  The "source code" for a work means the preferred form of the work
for making modifications to it.  "Object code" means any non-source
form of a work.

  A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.

  The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form.  A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.

  The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities.  However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work.  For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.

  The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.

  The Corresponding Source for a work in source code form is that
same work.

  2. Basic Permissions.

  All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met.  This License explicitly affirms your unlimited
permission to run the unmodified Program.  The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work.  This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.

  You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force.  You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright.  Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.

  Conveying under any other circumstances is permitted solely under
the conditions stated below.  Sublicensing is not allowed; section 10
makes it unnecessary.

  3. Protecting Users' Legal Rights From Anti-Circumvention Law.

  No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.

  When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.

  4. Conveying Verbatim Copies.

  You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.

  You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.

  5. Conveying Modified Source Versions.

  You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:

    a) The work must carry prominent notices stating that you modified
    it, and giving a relevant date.

    b) The work must carry prominent notices stating that it is
    released under this License and any conditions added under section
    7.  This requirement modifies the requirement in section 4 to
    "keep intact all notices".

    c) You must license the entire work, as a whole, under this
    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

  A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit.  Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.

  6. Conveying Non-Source Forms.

  You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:

    a) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by the
    Corresponding Source fixed on a durable physical medium
    customarily used for software interchange.

    b) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by a
    written offer, valid for at least three years and valid for as
    long as you offer spare parts or customer support for that product
    model, to give anyone who possesses the object code either (1) a
    copy of the Corresponding Source for all the software in the
    product that is covered by this License, on a durable physical
    medium customarily used for software interchange, for a price no
    more than your reasonable cost of physically performing this
    conveying of source, or (2) access to copy the
    Corresponding Source from a network server at no charge.

    c) Convey individual copies of the object code with a copy of the
    written offer to provide the Corresponding Source.  This
    alternative is allowed only occasionally and noncommercially, and
    only if you received the object code with such an offer, in accord
    with subsection 6b.

    d) Convey the object code by offering access from a designated
    place (gratis or for a charge), and offer equivalent access to the
    Corresponding Source in the same way through the same place at no
    further charge.  You need not require recipients to copy the
    Corresponding Source along with the object code.  If the place to
    copy the object code is a network server, the Corresponding Source
    may be on a different server (operated by you or a third party)
    that supports equivalent copying facilities, provided you maintain
    clear directions next to the object code saying where to find the
    Corresponding Source.  Regardless of what server hosts the
    Corresponding Source, you remain obligated to ensure that it is
    available for as long as needed to satisfy these requirements.

    e) Convey the object code using peer-to-peer transmission, provided
    you inform other peers where the object code and Corresponding
    Source of the work are being offered to the general public at no
    charge under subsection 6d.

  A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.

  A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling.  In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage.  For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product.  A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.

  "Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source.  The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.

  If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information.  But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).

  The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed.  Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.

  Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.

  7. Additional Terms.

  "Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law.  If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.

  When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it.  (Additional permissions may be written to require their own
removal in certain cases when you modify the work.)  You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.

  Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:

    a) Disclaiming warranty or limiting liability differently from the
    terms of sections 15 and 16 of this License; or

    b) Requiring preservation of specified reasonable legal notices or
    author attributions in that material or in the Appropriate Legal
    Notices displayed by works containing it; or

    c) Prohibiting misrepresentation of the origin of that material, or
    requiring that modified versions of such material be marked in
    reasonable ways as different from the original version; or

    d) Limiting the use for publicity purposes of names of licensors or
    authors of the material; or

    e) Declining to grant rights under trademark law for use of some
    trade names, trademarks, or service marks; or

    f) Requiring indemnification of licensors and authors of that
    material by anyone who conveys the material (or modified versions of
    it) with contractual assumptions of liability to the recipient, for
    any liability that these contractual assumptions directly impose on
    those licensors and authors.

  All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10.  If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term.  If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.

  If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.

  Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.

  8. Termination.

  You may not propagate or modify a covered work except as expressly
provided under this License.  Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).

  However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.

  Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.

  Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License.  If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.

  9. Acceptance Not Required for Having Copies.

  You are not required to accept this License in order to receive or
run a copy of the Program.  Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance.  However,
nothing other than this License grants you permission to propagate or
modify any covered work.  These actions infringe copyright if you do
not accept this License.  Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.

  10. Automatic Licensing of Downstream Recipients.

  Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License.  You are not responsible
for enforcing compliance by third parties with this License.

  An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations.  If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.

  You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License.  For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.

  11. Patents.

  A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based.  The
work thus licensed is called the contributor's "contributor version".

  A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version.  For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.

  Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.

  In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement).  To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.

  If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients.  "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.

  If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.

  A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License.  You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.

  Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.

  12. No Surrender of Others' Freedom.

  If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all.  For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.

  13. Remote Network Interaction; Use with the GNU General Public License.

  Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software.  This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.

  Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work.  The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.

  14. Revised Versions of this License.

  The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time.  Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

  Each version is given a distinguishing version number.  If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation.  If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.

  If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.

  Later license versions may give you additional or different
permissions.  However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.

  15. Disclaimer of Warranty.

  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. Limitation of Liability.

  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.

  17. Interpretation of Sections 15 and 16.

  If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

  If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source.  For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code.  There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.

  You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<http://www.gnu.org/licenses/>.


================================================
FILE: README.adoc
================================================
= The Elixir Cross Referencer
:doctype: book
:pp: {plus}{plus}
:toc:
:toc-placement!:

Elixir is a source code cross-referencer inspired by
https://en.wikipedia.org/wiki/LXR_Cross_Referencer[LXR]. It's written
in Python and its main purpose is to index every release of a C or C{pp}
project (like the Linux kernel) while keeping a minimal footprint.

It uses Git as a source-code file store and Berkeley DB for cross-reference
data. Internally, it indexes Git _blobs_ rather than trees of files to avoid
duplicating work and data. It has a straightforward data structure
(reminiscent of older LXR releases) to keep queries simple and fast.

You can see it in action on https://elixir.bootlin.com/

link:CHANGELOG.adoc[Changelog]

toc::[]

= Requirements

* Python >= 3.8
* Git >= 1.9
* The Jinja2 and Pygments (>= 2.7) Python libraries
* Berkeley DB (and its Python binding)
* Universal Ctags
* Perl (for non-greedy regexes and automated testing)
* Falcon and `mod_wsgi` (for the REST API)

= Architecture

The shell script (`script.sh`) is the lower layer and provides commands
to interact with Git and other Unix utilities. The Python commands use
the shell script's services to provide access to the annotated source
code and identifier lists (`query.py`) or to create and update the
databases (`update.py`). Finally, the web interface (`web.py`) and
uses the query interface to generate HTML pages and to answer REST
queries, respectively.

When installing the system, you should test each layer manually and make
sure it works correctly before moving on to the next one.

= Manual Installation

== Install Dependencies

____
For Debian
____

----
sudo apt install python3-pip python3-venv libdb-dev python3-dev build-essential universal-ctags perl git apache2 libapache2-mod-wsgi-py3 libjansson4
----

== Download Elixir Project

----
git clone https://github.com/bootlin/elixir.git /usr/local/elixir/
----

== Create a virtualenv for Elixir

----
python -m venv /usr/local/elixir/venv
. /usr/local/elixir/venv/bin/activate
pip install -r /usr/local/elixir/requirements.txt
----

== Create directories for project data

----
mkdir -p /path/elixir-data/linux/repo
mkdir -p /path/elixir-data/linux/data
----

== Set environment variables

Two environment variables are used to tell Elixir where to find the project's
local git repository and its databases:

* `LXR_REPO_DIR` (the git repository directory for your project)
* `LXR_DATA_DIR` (the database directory for your project)

Now open `/etc/profile` and append the following content.

----
export LXR_REPO_DIR=/path/elixir-data/linux/repo
export LXR_DATA_DIR=/path/elixir-data/linux/data
----

And then run `source /etc/profile`.

== Clone Kernel source code

First clone the master tree released by Linus Torvalds:

----
cd /path/elixir-data/linux
git clone --bare https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git repo
----

Then, you should also declare a `stable` remote branch corresponding to the `stable` tree, to get all release updates:

----
cd repo
git remote add stable git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
git fetch stable
----

Then, you can also declare an `history` remote branch corresponding to the old Linux versions not present in the other repos, to get all the old version still available:

----
cd repo
git remote add history https://github.com/bootlin/linux-history.git
git fetch history --tags
----

Feel free to add more remote branches in this way, as Elixir will consider tags from all remote branches.

== First Test

----
cd /usr/local/elixir/
./script.sh list-tags
----

== Create Database

----
. ./venv/bin/activate
./update.py <number of threads>
----

____
Generating the full database can take a long time: it takes about 15 hours on a Xeon E3-1245 v5 to index 1800 tags in the Linux kernel. For that reason, you may want to tweak the script (for example, by limiting the number of tags with a "head") in order to test the update and query commands. You can even create a new Git repository and just create one tag instead of using the official kernel repository which is very large.
____

== Second Test

Verify that the queries work:

 $ python3 -m utils.query ident v4.10 raw_spin_unlock_irq C
 $ python3 -m utils.query file v4.10 /kernel/sched/clock.c

NOTE: `v4.10` can be replaced with any other tag.
NOTE: Don't forget to activate the virtual environment!

== Configure httpd

The CGI interface (`web.py`) is meant to be called from your web
server. Since it includes support for indexing multiple projects,
it expects a different variable (`LXR_PROJ_DIR`) which points to a
directory with a specific structure:

* `<LXR_PROJ_DIR>`
 ** `<project 1>`
  *** `data`
  *** `repo`
 ** `<project 2>`
  *** `data`
  *** `repo`
 ** `<project 3>`
  *** `data`
  *** `repo`

It will then generate the other two variables upon calling the query
command.

Now replace `/etc/apache2/sites-enabled/000-default.conf` with `docker/000-default.conf`.
Note: If using httpd (RedHat/Centos) instead of apache2 (Ubuntu/Debian),
the default config file to edit is `/etc/httpd/conf.d/elixir.conf`.

Finally, start the httpd server.

----
systemctl restart apache2
----


== Configure SELinux policy

When running systemd with SELinux enabled, httpd server can only visit limited directories.
If your /path/elixir-data/ is not one of these allowed directories, you will be responded with 500 status code.

To allow httpd server to visit /path/elixir-data/, run following codes:
----
chcon -R -t httpd_sys_rw_content_t /path/elixir-data/
----

To check if it takes effect, run the following codes:
----
ls -Z /path/elixir-data/
----

In case you want to check SELinux log related with httpd, run the following codes:
----
audit2why -a | grep httpd | less
----

== Configure systemd log directory

By default, the error log of elixir will be put in /tmp/elixir-errors.
However, systemd enables PrivateTmp by default.
And, the final error directory will be like /tmp/systemd-private-xxxxx-httpd.service-xxxx/tmp/elixir-errors.
If you want to disable it, configure httpd.service with the following attribute:
----
PrivateTmp=false
----

== Configuration for other servers

Other HTTP servers (like nginx or lighthttpd) may not support WSGI and may require a separate WSGI server, like uWSGI.

Information about how to configure uWSGI with Lighthttpd can be found here:
https://redmine.lighttpd.net/projects/lighttpd/wiki/HowToPythonWSGI#Python-WSGI-apps-via-uwsgi-SCGI-FastCGI-or-HTTP-using-the-uWSGI-server

Pull requests with example uWSGI configuration for Elixir are welcome.

= REST API usage

After configuring httpd, you can test the API usage:

== ident query

Send a get request to `/api/ident/<Project>/<Ident>?version=<version>&family=<family>`.
For example:

 curl http://127.0.0.1/api/ident/barebox/cdev?version=latest&family=C

The response body is of the following structure:

----
{
    "definitions":
        [{"path": "commands/loadb.c", "line": 71, "type": "variable"}, ...],
    "references":
        [{"path": "arch/arm/boards/cm-fx6/board.c", "line": "64,64,71,72,75", "type": null}, ...]
}
----

= Maintenance and enhancements

== Using a cache to improve performance

At Bootlin, we're using the https://varnish-cache.org/[Varnish http cache]
as a front-end to reduce the load on the server running the Elixir code.

 .-------------.           .---------------.           .-----------------------.
 | Http client | --------> | Varnish cache | --------> | Apache running Elixir |
 '-------------'           '---------------'           '-----------------------'

== Keeping Elixir databases up to date

To keep your Elixir databases up to date and index new versions that are released,
we're proposing to use a script like `index /srv/elixir-data --all` which is called
through a daily cron job.

You can set `$ELIXIR_THREADS` if you want to change the number of threads used by
update.py for indexing (by default the number of CPUs on your system).

= Building Docker images

Dockerfiles are provided in the `docker/` directory.
To build the image, run the following commands:

 # git clone https://github.com/bootlin/elixir.git ./elixir
 # docker build -t elixir --build-arg ELIXIR_VERSION=`git rev-parse --short HEAD` -f ./elixir/docker/Dockerfile ./elixir

ELIXIR_VER build argument is optional. Since .git directory is not copied into Docker image by default,
the option is used to pass a version string to Elixir.

You can then run the image using `docker run`.
Here we mount a host directory as Elixir data:

 # mkdir ./elixir-data
 # docker run -v ./elixir-data/:/srv/elixir-data -d --name elixir-container elixir

The Docker image does not contain any repositories.
To index a repository, you can use the `index-repository` script.
For example, to add the https://musl.libc.org/[musl] repository, run:

 # docker exec -it elixir-container index /srv/elixir-data musl

Or, to run indexing in a separate container:

 # docker run -v ./elixir-data/:/srv/elixir-data \
    --entrypoint index elixir /srv/elixir-data musl

You can also use `index /srv/elixir-data --all` to start indexing all officially supported repositories.

After indexing is done, Elixir should be available under the following URL on your host:
http://172.17.0.2/musl/latest/source

If 172.17.0.2 does not answer, you can check the IP address of the container by running:

 # docker inspect elixir-container | grep IPAddress

== Automatic repository updates

The Docker image does not automatically update repositories by itself.
You can, for example, start `index /srv/elixir-data --all` in the container (or in a separate container, with Elixir data volume/directory mounted)
from cron on the host to periodically update repositories.

== Using Docker image as a development server

You can easily use the Docker image as a development server by following the steps above, but mounting Elixir source directory from the host
into `/usr/local/elixir/` in the container when running `docker run elixir`.

Changes in the code made on the host should be automatically reflected in the container.
You can use `apache2ctl` to restart Apache.
Error logs are available in `/var/log/apache2/error.log` within the container.

= Hardware requirements

Performance requirements depend mostly on the amount of traffic that you get
on your Elixir service. However, a fast server also helps for the initial
indexing of the projects.

SSD storage is strongly recommended because of the frequent access to
git repositories.

At Bootlin, here are a few details about the server we're using:

* As of July 2019, our Elixir service consumes 17 GB of data (supporting all projects),
or for the Linux kernel alone (version 5.2 being the latest), 12 GB for indexing data,
and 2 GB for the git repository.
* We're using an LXD instance with 8 GB of RAM on a cloud server with 8 CPU cores
running at 3.1 GHz.

= Contributing to Elixir

== Supporting a new project

Elixir has a very simple modular architecture that allows to support
new source code projects by just adding a new file to the Elixir sources.

Elixir's assumptions:

* Project sources have to be available in a git repository
* All project releases are associated to a given git tag. Elixir
only considers such tags.

First make an installation of Elixir by following the above instructions.
See the `projects` subdirectory for projects that are already supported.

Once Elixir works for at least one project, it's time to clone the git
repository for the project you want to support:

 cd /srv/git
 git clone --bare https://github.com/zephyrproject-rtos/zephyr

After doing this, you may also reference and fetch remote branches for this project,
for example corresponding to the `stable` tree for the Linux kernel (see the
instructions for Linux earlier in this document).

Now, in your `LXR_PROJ_DIR` directory, create a new directory for the
new project:

 cd $LXR_PROJ_DIR
 mkdir -p zephyr/data
 ln -s /srv/git/zephyr.git repo
 export LXR_DATA_DIR=$LXR_PROJ_DIR/data
 export LXR_REPO_DIR=$LXR_PROJ_DIR/repo

Now, go back to the Elixir sources and test that tags are correctly
extracted:

 ./script.sh list-tags

Depending on how you want to show the available versions on the Elixir pages,
you may have to apply substitutions to each tag string, for example to add
a `v` prefix if missing, for consistency with how other project versions are
shown. You may also decide to ignore specific tags. All this can be done
by redefining the default `list_tags()` function in a new `projects/<projectname>.sh`
file. Here's an example (`projects/zephyr.sh` file):

 list_tags()
 {
     echo "$tags" |
     grep -v '^zephyr-v'
 }

Note that `<project_name>` *must* match the name of the directory that
you created under `LXR_PROJ_DIR`.

The next step is to make sure that versions are classified as you wish
in the version menu. This classification work is done through the
`list_tags_h()` function which generates the output of the `./scripts.sh list-tags -h`
command. Here's what you get for the Linux project:

 v4 v4.16 v4.16
 v4 v4.16 v4.16-rc7
 v4 v4.16 v4.16-rc6
 v4 v4.16 v4.16-rc5
 v4 v4.16 v4.16-rc4
 v4 v4.16 v4.16-rc3
 v4 v4.16 v4.16-rc2
 v4 v4.16 v4.16-rc1
 ...

The first column is the top level menu entry for versions.
The second one is the next level menu entry, and
the third one is the actual version that can be selected by the menu.
Note that this third entry must correspond to the exact
name of the tag in git.

If the default behavior is not what you want, you will have
to customize the `list_tags_h` function.

You should also make sure that Elixir properly identifies
the most recent versions:

 ./script.sh get-latest-tags | head

If needed, customize the `get_latest_tags()` function.

If you want to enable support for `compatible` properties in Devicetree files,
add `dts_comp_support=1` at the beginning of `projects/<projectname>.sh`.

You are now ready to generate Elixir's database for your
new project:

 ./update.py <number of threads>

You can then check that Elixir works through your http server.

== Coding style

If you wish to contribute to Elixir's Python code, please
follow the https://www.python.org/dev/peps/pep-0008/[official coding style for Python].

== How to send patches

The best way to share your contributions with us is to https://github.com/bootlin/elixir/pulls[file a pull
request on GitHub].

= Automated testing

Elixir includes a simple test suite in `t/`.  To run it,
from the top-level Elixir directory, run:

 prove

The test suite uses code extracted from Linux v5.4 in `t/tree`.

== Licensing of code in `t/tree`

The copied code is licensed as described in the https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/COPYING[COPYING] file included with
Linux.  All the files copied carry SPDX license identifiers of `GPL-2.0+` or
`GPL-2.0-or-later`.  Per https://www.gnu.org/licenses/gpl-faq.en.html#AllCompatibility[GNU's compatibility table], GPL 2.0+ code can be used
under GPLv3 provided the combination is under GPLv3.  Moreover, https://www.gnu.org/licenses/license-list.en.html#AGPLv3.0[GNU's overview
of AGPLv3] indicates that its terms "effectively consist of the terms of GPLv3"
plus the network-use paragraph.  Therefore, the developers have a good-faith
belief that licensing these files under AGPLv3 is authorized.  (See also https://github.com/Freemius/wordpress-sdk/issues/166#issuecomment-310561976[this
issue comment] for another example of a similar situation.)

= License

Elixir is copyright (c) 2017--2020 its contributors.  It is licensed AGPLv3.
See the `COPYING` file included with Elixir for details.


================================================
FILE: docker/000-default.conf
================================================
<Directory /usr/local/elixir/>
    AllowOverride None
    Require all denied
    <FilesMatch "wsgi.py">
        Require all granted
    </FilesMatch>
</Directory>
<Directory /usr/local/elixir/static/>
    AllowOverride None
    Require all granted
</Directory>
<VirtualHost *:80>
    ServerName MY_LOCAL_IP
    DocumentRoot /usr/local/elixir/

    SetEnv LXR_PROJ_DIR /srv/elixir-data/
    # restart-interval is 12 hours
    WSGIDaemonProcess Elixir processes=16 threads=1 \
        display-name=%{GROUP} restart-interval=43200 \
        home=/usr/local/elixir/ python-home=/usr/local/elixir/venv/
    WSGIApplicationGroup %{GLOBAL}

    WSGIProcessGroup Elixir
    WSGIScriptAliasMatch "^/(?!static/)" /usr/local/elixir/wsgi.py/$1

    AllowEncodedSlashes On
    RewriteEngine on
    RewriteRule "^/$" "/linux/latest/source" [R]
    RewriteRule "^/robots.txt$" "/static/robots.txt" [L]
    RewriteRule "^/favicon.ico$" "/static/img/favicon.ico" [L]
</VirtualHost>


================================================
FILE: docker/Dockerfile
================================================
FROM debian:bookworm AS build

RUN \
  apt-get update && \
  apt-get --no-install-recommends -y install \
    git build-essential pkg-config autoconf automake \
    python3 python3-pip python3-dev python3-docutils \
    libdb-dev \
    libseccomp-dev libjansson-dev libyaml-dev libxml2-dev

WORKDIR /build-berkeleydb/

# NOTE wheel version MUST be sycnhronized with requirements.txt
RUN pip wheel berkeleydb==18.1.10

WORKDIR /build-ctags/

RUN git clone --branch v6.1.0 --depth 1 https://github.com/universal-ctags/ctags.git
WORKDIR ctags
RUN ./autogen.sh && ./configure && make -j $(nproc)

FROM debian:bookworm

RUN \
  apt-get update && \
  apt-get --no-install-recommends -y install \
    python3 \
    python3-pip \
    python3-venv \
    libdb5.3 \
    perl \
    git \
    apache2 \
    libapache2-mod-wsgi-py3 \
    libjansson4 \
    libyaml-0-2 \
    wget

COPY ./requirements.txt /usr/local/elixir/

WORKDIR /usr/local/elixir/

COPY --from=build /build-berkeleydb/berkeleydb-*.whl /tmp/build/

RUN python3 -m venv venv && \
    . ./venv/bin/activate && \
    pip install /tmp/build/berkeleydb-*.whl && \
    pip install -r requirements.txt

COPY --from=build /build-ctags/ctags/ctags /usr/bin/ctags

RUN mkdir -p /srv/elixir-data/

COPY ./docker/000-default.conf /etc/apache2/sites-available/000-default.conf
COPY ./docker/gitconfig /etc/gitconfig

RUN a2enmod rewrite

EXPOSE 80

ARG ELIXIR_VERSION

ENV ELIXIR_VERSION=$ELIXIR_VERSION \
    ELIXIR_ROOT=/srv/elixir-data \
    PATH="/usr/local/elixir/utils:/usr/local/elixir/venv/bin:$PATH" \
    PYTHONUNBUFFERED=1

COPY . /usr/local/elixir/

ENTRYPOINT ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]


================================================
FILE: docker/gitconfig
================================================
[safe]
    directory = *


================================================
FILE: elixir/__init__.py
================================================


================================================
FILE: elixir/api.py
================================================
#!/usr/bin/env python3

#  This file is part of Elixir, a source code cross-referencer.
#
#  Copyright (C) 2019--2020 Carmeli Tamir and contributors.
#
#  Elixir is free software: you can redistribute it and/or modify
#  it under the terms of the GNU Affero General Public License as published by
#  the Free Software Foundation, either version 3 of the License, or
#  (at your option) any later version.
#
#  Elixir is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU Affero General Public License for more details.
#
#  You should have received a copy of the GNU Affero General Public License
#  along with Elixir.  If not, see <http://www.gnu.org/licenses/>.

import json
import os

import falcon
from urllib import parse
import sys

from .query import get_query
from .lib import validFamily
from .web_utils import validate_version

class ApiIdentGetterResource:
    def on_get(self, req, resp, project, ident):
        version = validate_version(req.get_param('version'))
        if version is None:
            raise falcon.HTTPInvalidParam('', 'version')

        family = req.get_param('family')
        if not validFamily(family):
            family = 'C'

        query = get_query(req.context.config.project_dir, project)
        if not query:
            resp.status = falcon.HTTP_NOT_FOUND
            return

        if version in ('latest', 'latest-rc'):
            rc = version == 'latest-rc'
            version = query.get_latest_tag(rc=rc)

        symbol_definitions, symbol_references, symbol_doccomments, _ = query.search_ident(version, ident, family)

        resp.status = falcon.HTTP_200
        resp.content_type = falcon.MEDIA_JSON
        resp.media = {
            'definitions': [sym.__dict__ for sym in symbol_definitions],
            'references': [sym.__dict__ for sym in symbol_references],
            'documentations': [sym.__dict__ for sym in symbol_doccomments]
        }

        query.close()



================================================
FILE: elixir/autocomplete.py
================================================
#!/usr/bin/env python3
#  This file is part of Elixir, a source code cross-referencer.
#
#  Copyright (C) 2017--2020 Maxime Chretien <maxime.chretien@bootlin.com>
#                           and contributors.
#
#  Elixir is free software: you can redistribute it and/or modify
#  it under the terms of the GNU Affero General Public License as published by
#  the Free Software Foundation, either version 3 of the License, or
#  (at your option) any later version.
#
#  Elixir is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU Affero General Public License for more details.
#
#  You should have received a copy of the GNU Affero General Public License
#  along with Elixir.  If not, see <http://www.gnu.org/licenses/>.

import sys
import os
import json
from urllib import parse
from berkeleydb.db import DB_SET_RANGE
import falcon

from .lib import autoBytes, validFamily
from .query import get_query
from .web_utils import validate_project, validate_ident

class AutocompleteResource:
    def on_get(self, req, resp):
        ident_prefix = req.get_param('q')
        family = req.get_param('f')
        project = req.get_param('p')

        ident_prefix = validate_ident(ident_prefix)
        if ident_prefix is None:
            raise falcon.HTTPInvalidParam('', 'ident')

        project = validate_project(project)
        if project is None:
            raise falcon.HTTPInvalidParam('', 'project')

        if not validFamily(family):
            family = 'C'

        query = get_query(req.context.config.project_dir, project)
        if not query:
            resp.status = falcon.HTTP_NOT_FOUND
            return

        if family == 'B':
            # DTS identifiers are stored quoted
            process = lambda x: parse.unquote(x)
            db = query.db.comps
        else:
            process = lambda x: x
            db = query.db.defs

        response = []

        i = 0
        cur = db.db.cursor()
        query_bytes = autoBytes(parse.quote(ident_prefix))
        # Find "the smallest key greater than or equal to the specified key"
        # https://docs.oracle.com/cd/E17276_01/html/api_reference/C/dbcget.html
        # In practice this should mean "the key that starts with provided prefix"
        # See docs about the default comparison function for B-Tree databases:
        # https://docs.oracle.com/cd/E17276_01/html/api_reference/C/dbset_bt_compare.html
        key, _ = cur.get(query_bytes, DB_SET_RANGE)
        while i <= 10:
            if key.startswith(query_bytes):
                # If found key starts with the prefix, add to response
                # and move to the next key
                i += 1
                response.append(process(key.decode("utf-8")))
                key, _ = cur.next()
            else:
                # If found key does not start with the prefix, stop
                break

        resp.status = falcon.HTTP_200
        resp.content_type = falcon.MEDIA_JSON
        resp.media = response

        query.close()



================================================
FILE: elixir/data.py
================================================
#!/usr/bin/env python3

#  This file is part of Elixir, a source code cross-referencer.
#
#  Copyright (C) 2017--2020 Mikaël Bouillot <mikael.bouillot@bootlin.com>
#  and contributors
#
#  Elixir is free software: you can redistribute it and/or modify
#  it under the terms of the GNU Affero General Public License as published by
#  the Free Software Foundation, either version 3 of the License, or
#  (at your option) any later version.
#
#  Elixir is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU Affero General Public License for more details.
#
#  You should have received a copy of the GNU Affero General Public License
#  along with Elixir.  If not, see <http://www.gnu.org/licenses/>.

import berkeleydb
import re
from . import lib
import os
import os.path
import errno

deflist_regex = re.compile(b'(\d*)(\w)(\d*)(\w),?')
deflist_macro_regex = re.compile('\dM\d+(\w)')

##################################################################################

defTypeR = {
    'c': 'config',
    'd': 'define',
    'e': 'enum',
    'E': 'enumerator',
    'f': 'function',
    'l': 'label',
    'M': 'macro',
    'm': 'member',
    'p': 'prototype',
    's': 'struct',
    't': 'typedef',
    'u': 'union',
    'v': 'variable',
    'x': 'externvar'}

defTypeD = {v: k for k, v in defTypeR.items()}

##################################################################################

maxId = 999999999

class DefList:
    '''Stores associations between a blob ID, a type (e.g., "function"),
        a line number and a file family.
        Also stores in which families the ident exists for faster tests.'''
    def __init__(self, data=b'#'):
        self.data, self.families = data.split(b'#')

    def iter(self, dummy=False):
        # Get all element in a list of sublists and sort them
        entries = deflist_regex.findall(self.data)
        entries.sort(key=lambda x:int(x[0]))
        for id, type, line, family in entries:
            id = int(id)
            type = defTypeR [type.decode()]
            line = int(line)
            family = family.decode()
            yield id, type, line, family
        if dummy:
            yield maxId, None, None, None

    def append(self, id, type, line, family):
        if type not in defTypeD:
            return
        p = str(id) + defTypeD[type] + str(line) + family
        if self.data != b'':
            p = ',' + p
        self.data += p.encode()
        self.add_family(family)

    def pack(self):
        return self.data + b'#' + self.families

    def add_family(self, family):
        family = family.encode()
        if not family in self.families.split(b','):
            if self.families != b'':
                family = b',' + family
            self.families += family

    def get_families(self):
        return self.families.decode().split(',')

    def get_macros(self):
        return deflist_macro_regex.findall(self.data.decode()) or ''

class PathList:
    '''Stores associations between a blob ID and a file path.
        Inserted by update.py sorted by blob ID.'''
    def __init__(self, data=b''):
        self.data = data

    def iter(self, dummy=False):
        for p in self.data.split(b'\n')[:-1]:
            id, path = p.split(b' ',maxsplit=1)
            id = int(id)
            path = path.decode()
            yield id, path
        if dummy:
            yield maxId, None

    def append(self, id, path):
        p = str(id).encode() + b' ' + path + b'\n'
        self.data += p

    def pack(self):
        return self.data

class RefList:
    '''Stores a mapping from blob ID to list of lines
        and the corresponding family.'''
    def __init__(self, data=b''):
        self.data = data

    def iter(self, dummy=False):
        # Split all elements in a list of sublists and sort them
        entries = [x.split(b':') for x in self.data.split(b'\n')[:-1]]
        entries.sort(key=lambda x:int(x[0]))
        for b, c, d in entries:
            b = int(b.decode())
            c = c.decode()
            d = d.decode()
            yield b, c, d
        if dummy:
            yield maxId, None, None

    def append(self, id, lines, family):
        p = str(id) + ':' + lines + ':' + family + '\n'
        self.data += p.encode()

    def pack(self):
        return self.data

class BsdDB:
    def __init__(self, filename, readonly, contentType, shared=False):
        self.filename = filename
        self.db = berkeleydb.db.DB()
        flags = berkeleydb.db.DB_THREAD if shared else 0

        if readonly:
            flags |= berkeleydb.db.DB_RDONLY
            self.db.open(filename, flags=flags)
        else:
            flags |= berkeleydb.db.DB_CREATE
            self.db.open(filename, flags=flags, mode=0o644, dbtype=berkeleydb.db.DB_BTREE)
        self.ctype = contentType

    def exists(self, key):
        key = lib.autoBytes(key)
        return self.db.exists(key)

    def get(self, key):
        key = lib.autoBytes(key)
        p = self.db.get(key)
        return self.ctype(p) if p is not None else None

    def get_keys(self):
        return self.db.keys()

    def put(self, key, val, sync=False):
        key = lib.autoBytes(key)
        val = lib.autoBytes(val)
        if type(val) is not bytes:
            val = val.pack()
        self.db.put(key, val)
        if sync:
            self.db.sync()

    def close(self):
        self.db.close()

    def __len__(self):
        return self.db.stat()["nkeys"]

class DB:
    def __init__(self, dir, readonly=True, dtscomp=False, shared=False):
        if os.path.isdir(dir):
            self.dir = dir
        else:
            raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT), dir)

        ro = readonly

        self.vars = BsdDB(dir + '/variables.db', ro, lambda x: int(x.decode()), shared=shared)
            # Key-value store of basic information
        self.blob = BsdDB(dir + '/blobs.db', ro, lambda x: int(x.decode()), shared=shared)
            # Map hash to sequential integer serial number
        self.hash = BsdDB(dir + '/hashes.db', ro, lambda x: x, shared=shared)
            # Map serial number back to hash
        self.file = BsdDB(dir + '/filenames.db', ro, lambda x: x.decode(), shared=shared)
            # Map serial number to filename
        self.vers = BsdDB(dir + '/versions.db', ro, PathList, shared=shared)
        self.defs = BsdDB(dir + '/definitions.db', ro, DefList, shared=shared)
        self.defs_cache = {}
        NOOP = lambda x: x
        self.defs_cache['C'] = BsdDB(dir + '/definitions-cache-C.db', ro, NOOP, shared=shared)
        self.defs_cache['K'] = BsdDB(dir + '/definitions-cache-K.db', ro, NOOP, shared=shared)
        self.defs_cache['D'] = BsdDB(dir + '/definitions-cache-D.db', ro, NOOP, shared=shared)
        self.defs_cache['M'] = BsdDB(dir + '/definitions-cache-M.db', ro, NOOP, shared=shared)
        assert sorted(self.defs_cache.keys()) == sorted(lib.CACHED_DEFINITIONS_FAMILIES)
        self.refs = BsdDB(dir + '/references.db', ro, RefList, shared=shared)
        self.docs = BsdDB(dir + '/doccomments.db', ro, RefList, shared=shared)
        self.dtscomp = dtscomp
        if dtscomp:
            self.comps = BsdDB(dir + '/compatibledts.db', ro, RefList, shared=shared)
            self.comps_docs = BsdDB(dir + '/compatibledts_docs.db', ro, RefList, shared=shared)
            # Use a RefList in case there are multiple doc comments for an identifier

    def close(self):
        self.vars.close()
        self.blob.close()
        self.hash.close()
        self.file.close()
        self.vers.close()
        self.defs.close()
        self.defs_cache['C'].close()
        self.defs_cache['K'].close()
        self.defs_cache['D'].close()
        self.defs_cache['M'].close()
        self.refs.close()
        self.docs.close()
        if self.dtscomp:
            self.comps.close()
            self.comps_docs.close()



================================================
FILE: elixir/filters/__init__.py
================================================
from typing import List

from .utils import Filter, FilterContext
from .projects import project_filters, default_filters

# Returns a list of applicable filters for project_name under provided filter context
def get_filters(ctx: FilterContext, project_name: str) -> List[Filter]:
    filter_classes = project_filters.get(project_name, default_filters)
    filters = []

    for filter_cls in filter_classes:
        if type(filter_cls) == tuple and len(filter_cls) == 2:
            cls, kwargs = filter_cls
            filters.append(cls(**kwargs))
        elif type(filter_cls) == type:
            filters.append(filter_cls())
        else:
            raise ValueError(f"Invalid filter: {filter_cls}, " \
                    "should be either a two element tuple or a type. " \
                    "Make sure project_filters in project.py is valid.")

    return [f for f in filters if f.check_if_applies(ctx)]



================================================
FILE: elixir/filters/configin.py
================================================
import re
from .utils import Filter, FilterContext, decode_number, encode_number, filename_without_ext_matches

# Filters for Config.in includes
# source "path/file"
# Example: uclibc-ng/v1.0.47/source/extra/Configs/Config.in#L176
class ConfigInFilter(Filter):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.configin = []

    def check_if_applies(self, ctx) -> bool:
        return super().check_if_applies(ctx) and \
                filename_without_ext_matches(ctx.filepath, {'Config'})

    def transform_raw_code(self, ctx, code: str) -> str:
        def keep_configin(m):
            self.configin.append(m.group(4))
            return f'{ m.group(1) }{ m.group(2) }{ m.group(3) }"__KEEPCONFIGIN__{ encode_number(len(self.configin)) }"'

        return re.sub('^(\s*)(source)(\s*)\"(.*)\"', keep_configin, code, flags=re.MULTILINE)

    def untransform_formatted_code(self, ctx: FilterContext, html: str) -> str:
        def replace_configin(m):
            w = self.configin[decode_number(m.group(1)) - 1]
            return f'<a href="{ ctx.get_absolute_source_url(w) }">{ w }</a>'

        return re.sub('__KEEPCONFIGIN__([A-J]+)', replace_configin, html, flags=re.MULTILINE)



================================================
FILE: elixir/filters/cppinc.py
================================================
import re
from .utils import Filter, FilterContext, encode_number, decode_number, extension_matches

# Filters for cpp includes like these:
# #include "file"
# Example: musl/v1.2.5/source/src/dirent/dirfd.c#L2
# #include "__dirent.h"
class CppIncFilter(Filter):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.cppinc = []

    def check_if_applies(self, ctx) -> bool:
        return super().check_if_applies(ctx) and \
                extension_matches(ctx.filepath, {'dts', 'dtsi', 'c', 'cc', 'cpp', 'c++', 'cxx', 'h', 's'})

    def transform_raw_code(self, ctx, code: str) -> str:
        def keep_cppinc(m):
            self.cppinc.append(m.group(3))
            return f'{ m.group(1) }#include{ m.group(2) }"__KEEPCPPINC__{ encode_number(len(self.cppinc)) }"'

        return re.sub('^(\s*)#include(\s*)\"(.*?)\"', keep_cppinc, code, flags=re.MULTILINE)

    def untransform_formatted_code(self, ctx: FilterContext, html: str) -> str:
        def replace_cppinc(m):
            w = self.cppinc[decode_number(m.group(1)) - 1]
            url = ctx.get_relative_source_url(w)
            return f'<a href="{ url }">{ w }</a>'

        return re.sub('__KEEPCPPINC__([A-J]+)', replace_cppinc, html, flags=re.MULTILINE)



================================================
FILE: elixir/filters/cpppathinc.py
================================================
import re
from typing import List
from .utils import Filter, FilterContext, encode_number, decode_number, extension_matches

# Filters for cpp includes like these:
# #include <file>

# Such filters work typically for standalone projects (like kernels and bootloaders)
# If we make references to other projects, we could
# end up with links to headers which are outside the project
# Example: u-boot/v2023.10/source/env/embedded.c#L16
# prefix_path: a list of paths, will be used to replace the prefix path during the
# untransform_formatted_code step
class CppPathIncFilter(Filter):
    def __init__(self, prefix_path: List[str] = ["include"], *args, **kwargs):
        self.prefix_path = prefix_path
        super().__init__(*args, **kwargs)
        self.cpppathinc = []

    def check_if_applies(self, ctx) -> bool:
        return super().check_if_applies(ctx) and \
                extension_matches(ctx.filepath, {'dts', 'dtsi', 'c', 'cc', 'cpp', 'c++', 'cxx', 'h', 's'})

    def transform_raw_code(self, ctx, code: str) -> str:
        def keep_cpppathinc(m):
            m1 = m.group(1)
            m2 = m.group(2)
            inc = m.group(3)
            if re.match('^asm/.*', inc):
                # Keep the original string in case the path contains "asm/"
                # Because there are then multiple include possibilites, one per architecture
                return m.group(0)
            else:
                self.cpppathinc.append(inc)
                return f'{ m1 }#include{ m2 }<__KEEPCPPPATHINC__{ encode_number(len(self.cpppathinc)) }>'

        return re.sub('^(\s*)#include(\s*)<(.*?)>', keep_cpppathinc, code, flags=re.MULTILINE)

    def untransform_formatted_code(self, ctx: FilterContext, html: str) -> str:
        def replace_cpppathinc(m):
            w = self.cpppathinc[decode_number(m.group(1)) - 1]
            for p in self.prefix_path:
                path = f"/{p}/{w}"
                if ctx.query.file_exists(ctx.tag, path):
                    return f'<a href="{ ctx.get_absolute_source_url(path) }">{ w }</a>'
            return w

        return re.sub('__KEEPCPPPATHINC__([A-J]+)', replace_cpppathinc, html, flags=re.MULTILINE)



================================================
FILE: elixir/filters/defconfig.py
================================================
import re
from .utils import Filter, FilterContext, encode_number, decode_number, extension_matches

# Filter for kconfig identifier in defconfigs
# Replaces defconfig identifiers with links to definitions/references
# `CONFIG_OPTION=y`
# Example: u-boot/v2023.10/source/configs/A13-OLinuXino_defconfig#L1
class DefConfigIdentsFilter(Filter):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.defconfigidents = []

    def check_if_applies(self, ctx) -> bool:
        return super().check_if_applies(ctx) and \
                ctx.filepath.endswith('defconfig')

    def transform_raw_code(self, ctx, code: str) -> str:
        def keep_defconfigidents(m):
            self.defconfigidents.append(m.group(1))
            return '__KEEPDEFCONFIGIDENTS__' + encode_number(len(self.defconfigidents))

        return re.sub('(CONFIG_[\w]+)', keep_defconfigidents, code, flags=re.MULTILINE)

    def untransform_formatted_code(self, ctx: FilterContext, html: str) -> str:
        def replace_defconfigidents(m):
            i = self.defconfigidents[decode_number(m.group(1)) - 1]
            return f'<a class="ident" href="{ ctx.get_ident_url(i, "K") }">{ i }</a>'

        return re.sub('__KEEPDEFCONFIGIDENTS__([A-J]+)', replace_defconfigidents, html, flags=re.MULTILINE)



================================================
FILE: elixir/filters/dtscompcode.py
================================================
import re
from .utils import Filter, FilterContext, encode_number, decode_number, extension_matches

# Filter for DT compatible strings in code (C family) files
# Finds assigments to properties and variables named 'compatible' and recognized by
# Query.get_tokenized_file()
# .compatible = "device"
# Example: u-boot/v2023.10/source/drivers/phy/nop-phy.c#L84
class DtsCompCodeFilter(Filter):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.dtscompC = []

    def check_if_applies(self, ctx) -> bool:
        return super().check_if_applies(ctx) and \
            ctx.query.dts_comp_support and \
            extension_matches(ctx.filepath, {'c', 'cc', 'cpp', 'c++', 'cxx', 'h', 's'})

    def transform_raw_code(self, ctx, code: str) -> str:
        # quit early if source file does not contain any strings that could be an assignment to a 'compatible' property
        # this is much faster than the match-and-replace regex, especially for big files
        compatible_search = re.search('\.(\033\[31m)?compatible(\033\[0m)?\s*=', code, flags=re.MULTILINE)
        if compatible_search is None:
            return code

        def keep_dtscompC(m):
            self.dtscompC.append(m.group(4))
            return f'{ m.group(1) }"__KEEPDTSCOMPC__{ encode_number(len(self.dtscompC)) }"'

        return re.sub('(\s*{*\s*\.(\033\[31m)?compatible(\033\[0m)?\s*=\s*)\"(.+?)\"',
                      keep_dtscompC, code, flags=re.MULTILINE)

    def untransform_formatted_code(self, ctx: FilterContext, html: str) -> str:
        def replace_dtscompC(m):
            i = self.dtscompC[decode_number(m.group(1)) - 1]
            return f'<a class="ident" href="{ ctx.get_ident_url(i, "B") }">{ i }</a>'

        return re.sub('__KEEPDTSCOMPC__([A-J]+)', replace_dtscompC, html, flags=re.MULTILINE)



================================================
FILE: elixir/filters/dtscompdocs.py
================================================
import re
from urllib.parse import quote
from .utils import Filter, FilterContext, encode_number, decode_number

# Filter for DT compatible strings in documentation (B family) files
# syscon
# Example: linux/v6.9.4/source/Documentation/devicetree/bindings/thermal/brcm,avs-ro-thermal.yaml#L17
# Note that this also finds strings in comments, descriptions and other potentially unrelated properties
class DtsCompDocsFilter(Filter):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.dtscompB = []

    def check_if_applies(self, ctx) -> bool:
        return super().check_if_applies(ctx) and \
            ctx.query.dts_comp_support and \
            ctx.filepath.startswith('/Documentation/devicetree/bindings')

    def transform_raw_code(self, ctx, code: str) -> str:
        def keep_dtscompB(m):
            text = m.group(1)

            if ctx.query.dts_comp_exists(quote(text)):
                self.dtscompB.append(text)
                return f'__KEEPDTSCOMPB__{ encode_number(len(self.dtscompB)) }'
            else:
                return m.group(0)

        return re.sub('([\w-]+,?[\w-]+)', keep_dtscompB, code, flags=re.MULTILINE)

    def untransform_formatted_code(self, ctx: FilterContext, html: str) -> str:
        def replace_dtscompB(m):
            i = self.dtscompB[decode_number(m.group(1)) - 1]

            return f'<a class="ident" href="{ ctx.get_ident_url(i, "B") }">{ i }</a>'

        return re.sub('__KEEPDTSCOMPB__([A-J]+)', replace_dtscompB, html, flags=re.MULTILINE)



================================================
FILE: elixir/filters/dtscompdts.py
================================================
import re
from .utils import Filter, FilterContext, encode_number, decode_number, extension_matches

# Filter for DT compatible strings in DTS (D family) files
# compatible = "device"
# Example: u-boot/v2023.10/source/arch/arm/dts/ac5-98dx35xx-rd.dts#L37
class DtsCompDtsFilter(Filter):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.dtscompD = []

    def check_if_applies(self, ctx) -> bool:
        return super().check_if_applies(ctx) and \
            ctx.query.dts_comp_support and \
            extension_matches(ctx.filepath, {'dts', 'dtsi'})

    def transform_raw_code(self, ctx, code: str) -> str:
        def sub_func(m):
            match = m.group(0)
            strings = re.findall("\"(.+?)\"", m.group(1))

            for string in strings:
                self.dtscompD.append(string)
                match = match.replace(string, '__KEEPDTSCOMPD__' + encode_number(len(self.dtscompD)))

            return match

        return re.sub('\s*compatible(.*?)$', sub_func, code, flags=re.MULTILINE)

    def untransform_formatted_code(self, ctx: FilterContext, html: str) -> str:
        def replace_dtscompD(m):
            i = self.dtscompD[decode_number(m.group(1)) - 1]

            return f'<a class="ident" href="{ ctx.get_ident_url(i, "B") }">{ i }</a>'

        return re.sub('__KEEPDTSCOMPD__([A-J]+)', replace_dtscompD, html, flags=re.MULTILINE)



================================================
FILE: elixir/filters/dtsi.py
================================================
import re
from .utils import Filter, FilterContext, encode_number, decode_number, extension_matches

# Filters for dts includes as follows:
# Replaces include directives in dts/dtsi files with links to source
# /include/ "file"
# Example: u-boot/v2023.10/source/arch/powerpc/dts/t1023si-post.dtsi#L12
class DtsiFilter(Filter):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.dtsi = []

    def check_if_applies(self, ctx) -> bool:
        return super().check_if_applies(ctx) and \
                extension_matches(ctx.filepath, {'dts', 'dtsi'})

    def transform_raw_code(self, ctx, code: str) -> str:
        def keep_dtsi(m):
            self.dtsi.append(m.group(3))
            return f'{ m.group(1) }/include/{ m.group(2) }"__KEEPDTSI__{ encode_number(len(self.dtsi)) }"'

        return re.sub('^(\s*)/include/(\s*)\"(.*?)\"', keep_dtsi, code, flags=re.MULTILINE)

    def untransform_formatted_code(self, ctx: FilterContext, html: str) -> str:
        def replace_dtsi(m):
            w = self.dtsi[decode_number(m.group(1)) - 1]
            return f'<a href="{ ctx.get_relative_source_url(w) }">{ w }</a>'

        return re.sub('__KEEPDTSI__([A-J]+)', replace_dtsi, html, flags=re.MULTILINE)



================================================
FILE: elixir/filters/ident.py
================================================
import re
from .utils import Filter, FilterContext, encode_number, decode_number

# Filter for identifier links
# Replaces identifiers marked by Query.get_tokenized_file() with links to ident page.
# If Query.get_tokenized_file() detects that a file belongs to a family that can contain
# indexed identifiers, it processes the file by adding unprintable markers
# ('\033[31m' + token + b'\033[0m') to tokens that have an entry in the definitions
# database. This filter replaces these marked tokens with links to their ident pages,
# unless the token starts with CONFIG_ - these tokens are handled by the Kconfig filter.
class IdentFilter(Filter):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.idents = []

    def transform_raw_code(self, ctx, code: str) -> str:
        def sub_func(m):
            self.idents.append(m.group(1))
            return '__KEEPIDENTS__' + encode_number(len(self.idents))

        return re.sub('\033\[31m(?!CONFIG_)(.*?)\033\[0m', sub_func, code, flags=re.MULTILINE)

    def untransform_formatted_code(self, ctx: FilterContext, html: str) -> str:
        def sub_func(m):
            i = self.idents[decode_number(m.group(2)) - 1]
            link = f'<a class="ident" href="{ ctx.get_ident_url(i) }">{ i }</a>'
            return str(m.group(1) or '') + link

        return re.sub('__(<.+?>)?KEEPIDENTS__([A-J]+)', sub_func, html, flags=re.MULTILINE)



================================================
FILE: elixir/filters/kconfig.py
================================================
import re
from .utils import Filter, FilterContext, encode_number, decode_number, filename_without_ext_matches

# Filters for Kconfig includes
# Replaces KConfig includes (source keyword) with links to included files
# `source "path/file"`
# Example: u-boot/v2023.10/source/Kconfig#L10
class KconfigFilter(Filter):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.kconfig = []

    def check_if_applies(self, ctx) -> bool:
        return super().check_if_applies(ctx) and \
                filename_without_ext_matches(ctx.filepath, {'Kconfig'})

    def transform_raw_code(self, ctx, code: str) -> str:
        def keep_kconfig(m):
            self.kconfig.append(m.group(4))
            return f'{ m.group(1) }{ m.group(2) }{ m.group(3) }"__KEEPKCONFIG__{ encode_number(len(self.kconfig)) }"'

        return re.sub('^(\s*)(source)(\s*)\"([\w/_\.-]+)\"', keep_kconfig, code, flags=re.MULTILINE)

    def untransform_formatted_code(self, ctx: FilterContext, html: str) -> str:
        def replace_kconfig(m):
            w = self.kconfig[decode_number(m.group(1)) - 1]
            return f'<a href="{ ctx.get_absolute_source_url(w) }">{ w }</a>'

        return re.sub('__KEEPKCONFIG__([A-J]+)', replace_kconfig, html, flags=re.MULTILINE)



================================================
FILE: elixir/filters/kconfigidents.py
================================================
import re
from .utils import Filter, FilterContext, encode_number, decode_number

# Filter for kconfig identifier links
# Replaces KConfig identifiers with links to definitions and references
# `config OPTION`
# Example: u-boot/v2023.10/source/Kconfig#L17
# Note: Prepends identifier with CONFIG_
class KconfigIdentsFilter(Filter):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.kconfigidents = []

    def transform_raw_code(self, ctx, code: str) -> str:
      def keep_kconfigidents(m):
          self.kconfigidents.append(m.group(1))
          return f'__KEEPKCONFIGIDENTS__{ encode_number(len(self.kconfigidents)) }'

      return re.sub('\033\[31m(?=CONFIG_)(.*?)\033\[0m', keep_kconfigidents, code, flags=re.MULTILINE)

    def untransform_formatted_code(self, ctx: FilterContext, html: str) -> str:
        def replace_kconfigidents(m):
            i = self.kconfigidents[decode_number(m.group(2)) - 1]

            n = i
            #Remove the CONFIG_ when we are in a Kconfig file
            if ctx.family == 'K':
                n = n[7:]

            return f'{ m.group(1) or "" }<a class="ident" href="{ ctx.get_ident_url(i, "K") }">{ n }</a>'

        return re.sub('__(<.+?>)?KEEPKCONFIGIDENTS__([A-J]+)', replace_kconfigidents, html, flags=re.MULTILINE)



================================================
FILE: elixir/filters/makefiledir.py
================================================
from os.path import dirname
import re
from .utils import Filter, FilterContext, decode_number, encode_number, filename_without_ext_matches

# Filters for Makefile directory includes as follows:
# obj-$(VALUE) += dir/
# Example: u-boot/v2023.10/source/Makefile#L867
class MakefileDirFilter(Filter):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.makefiledir = []

    def check_if_applies(self, ctx) -> bool:
        return super().check_if_applies(ctx) and \
                filename_without_ext_matches(ctx.filepath, {'Makefile'})

    def transform_raw_code(self, ctx, code: str) -> str:
        def keep_makefiledir(m):
            filedir = dirname(ctx.filepath)

            if filedir != '/':
                filedir += '/'

            if ctx.query.file_exists(ctx.tag, filedir + m.group(1) + '/Makefile'):
                self.makefiledir.append(m.group(1))
                return f'__KEEPMAKEFILEDIR__{ encode_number(len(self.makefiledir)) }/{ m.group(2) }'
            else:
                return m.group(0)

        return re.sub('(?<=\s)([-\w/]+)/(\s+|$)', keep_makefiledir, code, flags=re.MULTILINE)

    def untransform_formatted_code(self, ctx: FilterContext, html: str) -> str:
        def replace_makefiledir(m):
            w = self.makefiledir[decode_number(m.group(1)) - 1]
            filedir = dirname(ctx.filepath)

            if filedir != '/':
                filedir += '/'

            fpath = f'{ filedir }{ w }/Makefile'

            return f'<a href="{ ctx.get_absolute_source_url(fpath) }">{ w }/</a>'

        return re.sub('__KEEPMAKEFILEDIR__([A-J]+)/', replace_makefiledir, html, flags=re.MULTILINE)



================================================
FILE: elixir/filters/makefiledtb.py
================================================
from os.path import dirname
import re
from .utils import Filter, FilterContext, decode_number, encode_number, filename_without_ext_matches

# Filters for Makefile file includes like these:
# dtb-y += file.dtb
# Example: u-boot/v2023.10/source/Makefile#L992
class MakefileDtbFilter(Filter):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.makefiledtb = []

    def check_if_applies(self, ctx) -> bool:
        return super().check_if_applies(ctx) and \
                filename_without_ext_matches(ctx.filepath, {'Makefile'})

    def transform_raw_code(self, ctx, code: str) -> str:
        def keep_makefiledtb(m):
            self.makefiledtb.append(m.group(1))
            return f'__KEEPMAKEFILEDTB__{ encode_number(len(self.makefiledtb)) }.dtb'

        return re.sub('(?<=\s)([-\w/+\.]+)\.dtb', keep_makefiledtb, code, flags=re.MULTILINE)

    def untransform_formatted_code(self, ctx: FilterContext, html: str) -> str:
        def replace_makefiledtb(m):
            w = self.makefiledtb[decode_number(m.group(1)) - 1]
            filedir = dirname(ctx.filepath)

            if filedir != '/':
                filedir += '/'

            npath = f'{ filedir }{ w }.dts'
            return f'<a href="{ ctx.get_absolute_source_url(npath) }">{ w }.dtb</a>'

        return re.sub('__KEEPMAKEFILEDTB__([A-J]+)\.dtb', replace_makefiledtb, html, flags=re.MULTILINE)



================================================
FILE: elixir/filters/makefilefile.py
================================================
from os.path import dirname
import re
from .utils import Filter, FilterContext, decode_number, encode_number, filename_without_ext_matches

# Filters for files listed in Makefiles
# path/file
# Example: u-boot/v2023.10/source/Makefile#L1509
class MakefileFileFilter(Filter):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.makefilefile = []

    def check_if_applies(self, ctx) -> bool:
        return super().check_if_applies(ctx) and \
                filename_without_ext_matches(ctx.filepath, {'Makefile'})

    def transform_raw_code(self, ctx, code: str) -> str:
        def keep_makefilefile(m):
            filedir = dirname(ctx.filepath)

            if filedir != '/':
                filedir += '/'

            if ctx.query.file_exists(ctx.tag, filedir + m.group(1)):
                self.makefilefile.append(m.group(1))
                return f'__KEEPMAKEFILEFILE__{ encode_number(len(self.makefilefile)) }{ m.group(2) }'
            else:
                return m.group(0)

        return re.sub('(?:(?<=\s|=)|(?<=-I))(?!/)([-\w/]+/[-\w\.]+)(\s+|\)|$)', keep_makefilefile, code, flags=re.MULTILINE)

    def untransform_formatted_code(self, ctx: FilterContext, html: str) -> str:
        def replace_makefilefile(m):
            w = self.makefilefile[decode_number(m.group(1)) - 1]
            filedir = dirname(ctx.filepath)

            if filedir != '/':
                filedir += '/'

            npath = filedir + w
            return f'<a href="{ ctx.get_absolute_source_url(npath) }">{ w }</a>'

        return re.sub('__KEEPMAKEFILEFILE__([A-J]+)', replace_makefilefile, html, flags=re.MULTILINE)



================================================
FILE: elixir/filters/makefileo.py
================================================
from os.path import dirname
import re
from .utils import Filter, FilterContext, decode_number, encode_number, filename_without_ext_matches

# Filters for Makefile file includes like these:
# file.o
# Example: u-boot/v2023.10/source/Makefile#L1767
class MakefileOFilter(Filter):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.makefileo = []

    def check_if_applies(self, ctx) -> bool:
        return super().check_if_applies(ctx) and \
                filename_without_ext_matches(ctx.filepath, {'Makefile'})

    def transform_raw_code(self, ctx, code: str) -> str:
        def keep_makefileo(m):
            self.makefileo.append(m.group(1))
            return f'__KEEPMAKEFILEO__{ encode_number(len(self.makefileo)) }.o'

        return re.sub('(?<=\s)([-\w/]+)\.o(?!\w)(?! :?=)', keep_makefileo, code, flags=re.MULTILINE)

    def untransform_formatted_code(self, ctx: FilterContext, html: str) -> str:
        def replace_makefileo(m):
            w = self.makefileo[decode_number(m.group(1)) - 1]

            filedir = dirname(ctx.filepath)
            if filedir != '/':
                filedir += '/'

            npath = f'{ filedir }{ w }.c'
            return f'<a href="{ ctx.get_absolute_source_url(npath) }">{ w }.o</a>'

        return re.sub('__KEEPMAKEFILEO__([A-J]+)\.o', replace_makefileo, html, flags=re.MULTILINE)



================================================
FILE: elixir/filters/makefilesrctree.py
================================================
import re
from .utils import Filter, FilterContext, decode_number, encode_number, filename_without_ext_matches

# Filters for files listed in Makefiles using $(srctree)
# $(srctree)/Makefile
# Example: u-boot/v2023.10/source/Makefile#L1983
class MakefileSrcTreeFilter(Filter):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.makefilesrctree = []

    def check_if_applies(self, ctx) -> bool:
        return super().check_if_applies(ctx) and \
            filename_without_ext_matches(ctx.filepath, {'Makefile'})

    def transform_raw_code(self, ctx, code: str) -> str:
        def keep_makefilesrctree(m):
            if ctx.query.file_exists(ctx.tag, '/' + m.group(1)):
                self.makefilesrctree.append(m.group(1))
                return f'__KEEPMAKEFILESRCTREE__{ encode_number(len(self.makefilesrctree)) }{ m.group(2) }'
            else:
                return m.group(0)

        return re.sub('(?:(?<=\s|=)|(?<=-I))(?!/)\$\(srctree\)/((?:[-\w/]+/)?[-\w\.]+)(\s+|\)|$)',
                      keep_makefilesrctree, code, flags=re.MULTILINE)

    def untransform_formatted_code(self, ctx: FilterContext, html: str) -> str:
        def replace_makefilesrctree(m):
            w = self.makefilesrctree[decode_number(m.group(1)) - 1]
            url = ctx.get_absolute_source_url(w)
            return f'<a href="{ url }">$(srctree)/{ w }</a>'

        return re.sub('__KEEPMAKEFILESRCTREE__([A-J]+)', replace_makefilesrctree, html, flags=re.MULTILINE)



================================================
FILE: elixir/filters/makefilesubdir.py
================================================
from os.path import dirname
import re
from .utils import Filter, FilterContext, decode_number, encode_number, filename_without_ext_matches

# Filters for Makefile directory includes as follows:
# subdir-y += dir
# Example: u-boot/v2023.10/source/examples/Makefile#L9
class MakefileSubdirFilter(Filter):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.makefilesubdir = []

    def check_if_applies(self, ctx) -> bool:
        return super().check_if_applies(ctx) and \
            filename_without_ext_matches(ctx.filepath, {'Makefile'})

    def transform_raw_code(self, ctx, code: str) -> str:
        def keep_makefilesubdir(m):
            self.makefilesubdir.append(m.group(5))
            n = encode_number(len(self.makefilesubdir))
            return f'{ m.group(1) }{ m.group(2) }{ m.group(3) }{ m.group(4) }__KEEPMAKESUBDIR__{ n }{ m.group(6) }'

        return re.sub('(subdir-y)(\s+)(\+=|:=)(\s+)([-\w]+)(\s*|$)', keep_makefilesubdir, code, flags=re.MULTILINE)

    def untransform_formatted_code(self, ctx: FilterContext, html: str) -> str:
        def replace_makefilesubdir(m):
            w = self.makefilesubdir[decode_number(m.group(1)) - 1]
            filedir = dirname(ctx.filepath)

            if filedir != '/':
                filedir += '/'

            npath = f'{ filedir }{ w }/Makefile'
            return f'<a href="{ ctx.get_absolute_source_url(npath) }">{ w }</a>'

        return re.sub('__KEEPMAKESUBDIR__([A-J]+)', replace_makefilesubdir, html, flags=re.MULTILINE)



================================================
FILE: elixir/filters/projects.py
================================================
from .ident import IdentFilter

from .cppinc import CppIncFilter
from .cpppathinc import CppPathIncFilter

from .defconfig import DefConfigIdentsFilter
from .configin import ConfigInFilter

from .kconfig import KconfigFilter
from .kconfigidents import KconfigIdentsFilter

from .dtsi import DtsiFilter
from .dtscompdocs import DtsCompDocsFilter
from .dtscompcode import DtsCompCodeFilter
from .dtscompdts import DtsCompDtsFilter

from .makefileo import MakefileOFilter
from .makefiledtb import MakefileDtbFilter
from .makefiledir import MakefileDirFilter
from .makefilesubdir import MakefileSubdirFilter
from .makefilefile import MakefileFileFilter
from .makefilesrctree import MakefileSrcTreeFilter
from .makefilesubdir import MakefileSubdirFilter


# List of filters applied to all projects
default_filters = [
    DtsCompCodeFilter,
    DtsCompDtsFilter,
    DtsCompDocsFilter,
    IdentFilter,
    CppIncFilter,
]

# List of filters for Kconfig files
common_kconfig_filters = [
    KconfigFilter,
    KconfigIdentsFilter,
    DefConfigIdentsFilter,
]

# List of filters for Makefiles
common_makefile_filters = [
    MakefileOFilter,
    MakefileDtbFilter,
    MakefileDirFilter,
    MakefileFileFilter,
    MakefileSubdirFilter,
    MakefileSrcTreeFilter,
]

# Dictionary of custom per-projects filters.
# Projects not present in this dictionary only use default_filters.
# Use `*` to unpack filter lists defined above,
# you can pass additional options to filters by putting a Filter
# class and a dictionary with options in a tuple, like this:
# (FilterCls, {"option": True}).
# Check filter files and utils.py for information about available options
project_filters = {
    'amazon-freertos': [
        *default_filters,
        MakefileSubdirFilter,
    ],
    'arm-trusted-firmware': [
        *default_filters,
        CppPathIncFilter,
    ],
    'barebox': [
        *default_filters,
        DtsiFilter,
        *common_kconfig_filters,
        CppPathIncFilter,
        *common_makefile_filters,
    ],
    'coreboot': [
        *default_filters,
        DtsiFilter,
        *common_kconfig_filters,
        *common_makefile_filters,
    ],
    'iproute2': [
        *default_filters,
        *common_makefile_filters,
    ],
    'linux': [
        *default_filters,
        DtsiFilter,
        *common_kconfig_filters,
        *common_makefile_filters,
        # include/uapi contains includes to user headers under #ifndef __KERNEL__
        # Our solution is to ignore all includes in such paths
        (CppPathIncFilter, {"path_exceptions": {'^/include/uapi/.*'}}),
    ],
    'opensbi': [
        *default_filters,
        *common_kconfig_filters,
    ],
    'qemu': [
        *default_filters,
        *common_kconfig_filters,
    ],
    'u-boot': [
        *default_filters,
        DtsiFilter,
        *common_kconfig_filters,
        CppPathIncFilter,
        *common_makefile_filters,
    ],
    'uclibc-ng': [
        *default_filters,
        ConfigInFilter,
    ],
    'vpp': [
        *default_filters,
        (CppPathIncFilter, {"prefix_path": ['src', 'src/plugins', 'src/vpp-api', 'src/vpp-api/vapi']}),
        MakefileFileFilter,
    ],
    'zephyr': [
        *default_filters,
        DtsiFilter,
        *common_kconfig_filters,
        CppPathIncFilter,
    ],
}



================================================
FILE: elixir/filters/utils.py
================================================
import re
import os
from dataclasses import dataclass
from typing import Callable, List
from ..query import Query

# Context data used by Filters
# tag: browsed version, unqoted
# family: family of file
# path: path of file
# get_ident_url: function that returns URL to identifier passed as argument
# get_absolute_source_url: function that returns a URL to file with absolute path passed as an argument
# get_relative_source_url: function that returns a URL to file in directory of current file
@dataclass
class FilterContext:
    query: Query
    tag: str
    family: str
    filepath: str
    get_ident_url: Callable[[str], str]
    get_absolute_source_url: Callable[[str], str]
    get_relative_source_url: Callable[[str], str]

# Filter interface/base class
# Filters are used to add extra information, like links, to code formatted into HTML by Pygments.
# Filters consist of two parts: the first part runs on unformatted code, transforming it
# to mark interesting identifiers, for example keywords. How the identifiers are marked is
# up to the filter, but it's important to be careful to not break formatting.
# The second part runs on HTML, replacing markings left by the first part with HTML code.
# path_exceptions: list of regexes, disables filter if path of the filtered file matches a regex from the list
class Filter:
    def __init__(self, path_exceptions: List[str] = []):
        self.path_exceptions = path_exceptions

    # Return True if filter can be applied to file with path
    def check_if_applies(self, ctx: FilterContext) -> bool:
        for p in self.path_exceptions:
            if re.match(p, ctx.filepath):
                return False

        return True

    # Add information required by filter by transforming raw source code.
    # Known identifiers are marked by '\033[31m' and '\033[0m'. Note that these marked
    # identifiers are usually handled by IdentFilter or KconfigIdentsFilter.
    def transform_raw_code(self, ctx: FilterContext, code: str) -> str:
        return code

    # Replace information left by `transform_raw_code` with target HTML
    # html: HTML output from code formatter
    def untransform_formatted_code(self, ctx: FilterContext, html: str) -> str:
        return html


# Returns true if filename from filepath, with removed extension, is in the
# allowed_filenames_without_ext iterable
def filename_without_ext_matches(filepath: str, allowed_filenames_without_ext) -> bool:
    filename = os.path.basename(filepath)
    filename_without_ext, _ = os.path.splitext(filename)
    return filename_without_ext in allowed_filenames_without_ext

# Returns true if extension of filename from filepath is in the
# allowed_extensions iterable
def extension_matches(filepath: str, allowed_extensions) -> bool:
    _, file_ext_dot = os.path.splitext(filepath)
    file_ext = file_ext_dot[1:].lower()
    return file_ext in allowed_extensions


# Encodes an integer into a string of characters (A-J)
# encode_number(10239) = 'BACDJ'
def encode_number(number):
    result = ''

    while number != 0:
        number, rem = divmod(number, 10)
        rem = chr(ord('A') + rem)
        result = rem + result

    return result

# Decodes a string of characters returned by encode_number into an integer
# decode_number('BACDJ') = 10239
def decode_number(string):
    result = ''

    while string != '':
        string, char = string[:-1], string[-1]
        char = str(ord(char) - ord('A'))
        result = char + result

    return int(result)



================================================
FILE: elixir/lib.py
================================================
#!/usr/bin/env python3

#  This file is part of Elixir, a source code cross-referencer.
#
#  Copyright (C) 2017  Mikaël Bouillot
#  <mikael.bouillot@bootlin.com>
#
#  Elixir is free software: you can redistribute it and/or modify
#  it under the terms of the GNU Affero General Public License as published by
#  the Free Software Foundation, either version 3 of the License, or
#  (at your option) any later version.
#
#  Elixir is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU Affero General Public License for more details.
#
#  You should have received a copy of the GNU Affero General Public License
#  along with Elixir.  If not, see <http://www.gnu.org/licenses/>.

import sys
import logging
import subprocess, os

logger = logging.getLogger(__name__)

CURRENT_DIR = os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + '/../')

def script(*args, env=None):
    args = (os.path.join(CURRENT_DIR, 'script.sh'),) + args
    # subprocess.run was introduced in Python 3.5
    # fall back to subprocess.check_output if it's not available
    if hasattr(subprocess, 'run'):
        p = subprocess.run(args, stdout=subprocess.PIPE, env=env)
        p = p.stdout
    else:
        p = subprocess.check_output(args)
    return p

def run_cmd(*args, env=None):
    p = subprocess.run(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env)
    if len(p.stderr) != 0:
        logger.error('command %s printed to stderr: \n%s', str(args), p.stderr.decode('utf-8'))
    return p.stdout, p.returncode

# Invoke ./script.sh with the given arguments
# Returns the list of output lines

def scriptLines(*args, env=None):
    p = script(*args, env=env)
    p = p.split(b'\n')
    del p[-1]
    return p

def unescape(bstr):
    subs = (
        ('\1','\n'),
    )
    for a,b in subs:
        a = a.encode()
        b = b.encode()
        bstr = bstr.replace(a, b)
    return bstr

def decode(byte_object):
    # decode('ascii') fails on special chars
    # FIXME: major hack until we handle everything as bytestrings
    try:
        return byte_object.decode('utf-8')
    except UnicodeDecodeError:
        return byte_object.decode('iso-8859-1')

# List of tokens which we don't want to consider as identifiers
# Typically for very frequent variable names and things redefined by #define
# TODO: allow to have per project blacklists

blacklist = (
    b'NULL',
    b'__',
    b'adapter',
    b'addr',
    b'arg',
    b'attr',
    b'base',
    b'bp',
    b'buf',
    b'buffer',
    b'c',
    b'card',
    b'char',
    b'chip',
    b'cmd',
    b'codec',
    b'const',
    b'count',
    b'cpu',
    b'ctx',
    b'data',
    b'default',
    b'define',
    b'desc',
    b'dev',
    b'driver',
    b'else',
    b'end',
    b'endif',
    b'entry',
    b'err',
    b'error',
    b'event',
    b'extern',
    b'failed',
    b'flags',
    b'h',
    b'host',
    b'hw',
    b'i',
    b'id',
    b'idx',
    b'if',
    b'index',
    b'info',
    b'inline',
    b'int',
    b'irq',
    b'j',
    b'len',
    b'length',
    b'list',
    b'lock',
    b'long',
    b'mask',
    b'mode',
    b'msg',
    b'n',
    b'name',
    b'net',
    b'next',
    b'offset',
    b'ops',
    b'out',
    b'p',
    b'pdev',
    b'port',
    b'priv',
    b'ptr',
    b'q',
    b'r',
    b'rc',
    b'rdev',
    b'reg',
    b'regs',
    b'req',
    b'res',
    b'result',
    b'ret',
    b'return',
    b'retval',
    b'root',
    b's',
    b'sb',
    b'size',
    b'sizeof',
    b'sk',
    b'skb',
    b'spec',
    b'start',
    b'state',
    b'static',
    b'status',
    b'struct',
    b't',
    b'tmp',
    b'tp',
    b'type',
    b'val',
    b'value',
    b'vcpu',
    b'x'
)

def isIdent(bstr):
    if (len(bstr) < 2 or
        bstr in blacklist or
        bstr.startswith(b'~')):
        return False
    else:
        return True

def autoBytes(arg):
    if type(arg) is str:
        arg = arg.encode()
    elif type(arg) is int:
        arg = str(arg).encode()
    return arg

def getDataDir():
    try:
        return os.environ['LXR_DATA_DIR']
    except KeyError:
        print(sys.argv[0] + ': LXR_DATA_DIR needs to be set')
        exit(1)

def getRepoDir():
    try:
        return os.environ['LXR_REPO_DIR']
    except KeyError:
        print(sys.argv[0] + ': LXR_REPO_DIR needs to be set')
        exit(1)

def currentProject():
    return os.path.basename(os.path.dirname(getDataDir()))

# List all families supported by Elixir
families = ['A', 'B', 'C', 'D', 'K', 'M']

# Those families have databases that cache the content of definitions.db.
# This allows faster lookup.
CACHED_DEFINITIONS_FAMILIES = ['C', 'K', 'D', 'M']

def validFamily(family):
    return family in families

def getFileFamily(filename):
    name, ext = os.path.splitext(filename)
    name, ext = name.lower(), ext.lower()

    if ext in ['.c', '.cc', '.cpp', '.c++', '.cxx', '.h', '.s'] :
        return 'C' # C file family and ASM
    elif ext in ['.dts', '.dtsi'] :
        return 'D' # Devicetree files
    elif name[:7] == 'kconfig' and ext != '.rst':
        # Some files are named like Kconfig-nommu so we only check the first 7 letters
        # We also exclude documentation files that can be named kconfig
        return 'K' # Kconfig files
    elif name[:8] == 'makefile' and ext != '.rst' or ext == '.mk':
        return 'M' # Makefiles
    else :
        return None

# 1 char values are file families
# 2 chars values with a M are macros families
compatibility_list = {
    'C' : ['C', 'K'],
    'K' : ['K'],
    'D' : ['D', 'CM'],
    'M' : ['K']
}

# Check if families are compatible
# First argument can be a list of different families
# Second argument is the key for choosing the right array in the compatibility list
def compatibleFamily(file_family, requested_family):
    return any(item in file_family for item in compatibility_list[requested_family])

# Check if a macro is compatible with the requested family
# First argument can be a list of different families
# Second argument is the key for choosing the right array in the compatibility list
def compatibleMacro(macro_family, requested_family):
    result = False
    for item in macro_family:
        item += 'M'
        result = result or item in compatibility_list[requested_family]
    return result


================================================
FILE: elixir/query.py
================================================
#!/usr/bin/env python3

#  This file is part of Elixir, a source code cross-referencer.
#
#  Copyright (C) 2017--2020 Mikaël Bouillot <mikael.bouillot@bootlin.com>
#  and contributors
#
#  Elixir is free software: you can redistribute it and/or modify
#  it under the terms of the GNU Affero General Public License as published by
#  the Free Software Foundation, either version 3 of the License, or
#  (at your option) any later version.
#
#  Elixir is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU Affero General Public License for more details.
#
#  You should have received a copy of the GNU Affero General Public License
#  along with Elixir.  If not, see <http://www.gnu.org/licenses/>.

from .lib import script, scriptLines, decode
from . import lib
from . import data
import os
from collections import OrderedDict
from urllib import parse

from io import BytesIO

class SymbolInstance(object):
    def __init__(self, path, line, type=None):
        self.path = path
        self.line = line
        self.type = type

    def __repr__(self):
        type_repr = ""
        if self.type:
            type_repr = f" , type: {self.type}"

        return f"Symbol in path: {self.path}, line: {self.line}" + type_repr

    def __str__(self):
        return self.__repr__()

# Returns a Query class instance or None if project data directory does not exist
# basedir: absolute path to parent directory of all project data directories, ex. "/srv/elixir-data/"
# project: name of the project, directory in basedir, ex. "linux"
def get_query(basedir, project):
    datadir = basedir + '/' + project + '/data'
    repodir = basedir + '/' + project + '/repo'

    if not os.path.exists(datadir) or not os.path.exists(repodir):
        return None

    return Query(datadir, repodir)

class Query:
    def __init__(self, data_dir, repo_dir):
        self.repo_dir = repo_dir
        self.data_dir = data_dir
        self.dts_comp_support = int(self.script('dts-comp'))
        self.db = data.DB(data_dir, readonly=True, dtscomp=self.dts_comp_support)
        self.file_cache = {}

    def script(self, *args):
        return script(*args, env=self.getEnv())

    def scriptLines(self, *args):
        return scriptLines(*args, env=self.getEnv())

    def getEnv(self):
        return {
            **os.environ,
            "LXR_REPO_DIR": self.repo_dir,
            "LXR_DATA_DIR": self.data_dir,
        }

    def close(self):
        self.db.close()

    # Check if a dts compatible string exists
    def dts_comp_exists(self, ident):
        if self.dts_comp_support:
            return self.db.comps.exists(ident)
        else:
            return False

    # Returns True if file exists
    def file_exists(self, version, path):
        if version not in self.file_cache:
            version_cache = set()
            last_dir = None
            for _, path in self.db.vers.get(version).iter():
                dirname, filename = os.path.split(path)
                if dirname != last_dir:
                    last_dir = dirname
                    version_cache.add(dirname)
                version_cache.add(path)

            self.file_cache[version] = version_cache

        return path.strip('/') in self.file_cache[version]

    # Returns the contents of the specified file
    # Tokens are marked for further processing
    # Example: v3.1-rc10 /Makefile
    def get_tokenized_file(self, version, path):
        filename = os.path.basename(path)
        family = lib.getFileFamily(filename)

        if family != None:
            assert family in lib.CACHED_DEFINITIONS_FAMILIES, f"family {family} must have its definitions cached"

            buffer = BytesIO()
            tokens = self.scriptLines('tokenize-file', version, path, family)
            even = True

            prefix = b''
            if family == 'K':
                prefix = b'CONFIG_'

            for tok in tokens:
                even = not even
                tok2 = prefix + tok
                if even and self.db.defs_cache[family].exists(tok2):
                    tok = b'\033[31m' + tok2 + b'\033[0m'
                else:
                    tok = lib.unescape(tok)
                buffer.write(tok)
            return decode(buffer.getvalue())
        else:
            return decode(self.script('get-file', version, path))

    # Returns the contents (trees or blobs) of the specified directory
    # Example: v3.1-rc10 /arch
    def get_dir_contents(self, version, path):
        entries_str =  decode(self.script('get-dir', version, path))
        return entries_str.split("\n")[:-1]

    # Returns indexed versions, as a tree of OrderedDict.
    # It has a depth of 3, for example: v3 v3.1 v3.1-rc10.
    def get_versions(self):
        versions = OrderedDict()

        for line in self.scriptLines('list-tags', '-h'):
            taginfo = decode(line).split(' ')
            num = len(taginfo)
            topmenu, submenu = 'FIXME', 'FIXME'

            if num == 1:
                tag, = taginfo
            elif num == 2:
                submenu, tag = taginfo
            elif num == 3:
                topmenu, submenu, tag = taginfo
            else:
                raise Exception("unexpected number of fields in taginfo")

            if self.db.vers.exists(tag):
                if topmenu not in versions:
                    versions[topmenu] = OrderedDict()
                if submenu not in versions[topmenu]:
                    versions[topmenu][submenu] = []
                versions[topmenu][submenu].append(tag)

        return versions

    # Returns the type (blob or tree) associated to
    # the given path. Example:
    # > ./query.py type v3.1-rc10 /Makefile
    # blob
    # > ./query.py type v3.1-rc10 /arch
    # tree
    def get_file_type(self, version, path):
        return decode(self.script('get-type', version, path)).strip()

    # Returns identifier search results
    def search_ident(self, version, ident, family):
        # DT bindings compatible strings are handled differently
        if family == 'B':
            return self.get_idents_comps(version, ident)
        else:
            return self.get_idents_defs(version, ident, family)

    # Returns the latest tag that is included in the database.
    # This excludes release candidates if `rc` is False.
    def get_latest_tag(self, rc):
        if rc:
            sorted_tags = reversed(self.scriptLines('list-tags'))
        else:
            sorted_tags = self.scriptLines('get-latest-tags')

        for tag in sorted_tags:
            if self.db.vers.exists(tag):
                return tag.decode()

        # return the oldest tag, even if it does not exist in the database
        return sorted_tags[-1].decode()

    def get_file_raw(self, version, path):
        return decode(self.script('get-file', version, path))

    def get_idents_comps(self, version, ident):

        # DT bindings compatible strings are handled differently
        # They are defined in C files
        # Used in DT files
        # Documented in documentation files
        symbol_c = []
        symbol_dts = []
        symbol_docs = []

        # DT compatible strings are quoted in the database
        ident = parse.quote(ident)

        if not self.dts_comp_support or not self.db.comps.exists(ident):
            return symbol_c, symbol_dts, symbol_docs, False

        files_this_version = self.db.vers.get(version).iter()
        comps = self.db.comps.get(ident).iter(dummy=True)

        if self.db.comps_docs.exists(ident):
            comps_docs = self.db.comps_docs.get(ident).iter(dummy=True)
        else:
            comps_docs = data.RefList().iter(dummy=True)

        comps_idx, comps_lines, comps_family = next(comps)
        comps_docs_idx, comps_docs_lines, comps_docs_family = next(comps_docs)
        compsCBuf = [] # C/CPP/ASM files
        compsDBuf = [] # DT files
        compsBBuf = [] # DT bindings docs files

        for file_idx, file_path in files_this_version:
            while comps_idx < file_idx:
                comps_idx, comps_lines, comps_family = next(comps)

            while comps_docs_idx < file_idx:
                comps_docs_idx, comps_docs_lines, comps_docs_family = next(comps_docs)

            if comps_idx == file_idx:
                if comps_family == 'C':
                    compsCBuf.append((file_path, comps_lines))
                elif comps_family == 'D':
                    compsDBuf.append((file_path, comps_lines))

            if comps_docs_idx == file_idx:
                compsBBuf.append((file_path, comps_docs_lines))

        for path, cline in sorted(compsCBuf):
            symbol_c.append(SymbolInstance(path, cline, 'compatible'))

        for path, dlines in sorted(compsDBuf):
            symbol_dts.append(SymbolInstance(path, dlines))

        for path, blines in sorted(compsBBuf):
            symbol_docs.append(SymbolInstance(path, blines))

        return symbol_c, symbol_dts, symbol_docs, True

    def get_idents_defs(self, version, ident, family):

        symbol_definitions = []
        symbol_references = []
        symbol_doccomments = []

        if not self.db.defs.exists(ident):
            return symbol_definitions, symbol_references, symbol_doccomments, False

        if not self.db.vers.exists(version):
            return symbol_definitions, symbol_references, symbol_doccomments, True

        files_this_version = self.db.vers.get(version).iter()
        this_ident = self.db.defs.get(ident)
        defs_this_ident = this_ident.iter(dummy=True)
        macros_this_ident = this_ident.get_macros()
        # FIXME: see why we can have a discrepancy between defs_this_ident and refs
        if self.db.refs.exists(ident):
            refs = self.db.refs.get(ident).iter(dummy=True)
        else:
            refs = data.RefList().iter(dummy=True)

        if self.db.docs.exists(ident):
            docs = self.db.docs.get(ident).iter(dummy=True)
        else:
            docs = data.RefList().iter(dummy=True)

        # vers, defs, refs, and docs are all populated by update.py in order of
        # idx, and there is a one-to-one mapping between blob hashes and idx
        # values.  Therefore, we can sequentially step through the defs, refs,
        # and docs for each file in a version.

        def_idx, def_type, def_line, def_family = next(defs_this_ident)
        ref_idx, ref_lines, ref_family = next(refs)
        doc_idx, doc_line, doc_family = next(docs)

        dBuf = []
        rBuf = []
        docBuf = []

        for file_idx, file_path in files_this_version:
            # Advance defs, refs, and docs to the current file
            while def_idx < file_idx:
                def_idx, def_type, def_line, def_family = next(defs_this_ident)
            while ref_idx < file_idx:
                ref_idx, ref_lines, ref_family = next(refs)
            while doc_idx < file_idx:
                doc_idx, doc_line, doc_family = next(docs)

            # Copy information about this identifier into dBuf, rBuf, and docBuf.
            while def_idx == file_idx:
                if (def_family == family or family == 'A'
                    or lib.compatibleMacro(macros_this_ident, family)):
                    dBuf.append((file_path, def_type, def_line))
                def_idx, def_type, def_line, def_family = next(defs_this_ident)

            if ref_idx == file_idx:
                if lib.compatibleFamily(family, ref_family) or family == 'A':
                    rBuf.append((file_path, ref_lines))

            if doc_idx == file_idx: # TODO should this be a `while`?
                docBuf.append((file_path, doc_line))

        # Sort dBuf by path name before sorting by type in the loop
        dBuf.sort()

        for path, type, dline in sorted(dBuf, key=lambda d: d[1], reverse=True):
            symbol_definitions.append(SymbolInstance(path, dline, type))

        for path, rlines in sorted(rBuf):
            symbol_references.append(SymbolInstance(path, rlines))

        for path, docline in sorted(docBuf):
            symbol_doccomments.append(SymbolInstance(path, docline))

        return symbol_definitions, symbol_references, symbol_doccomments, True



================================================
FILE: elixir/web.py
================================================
#!/usr/bin/env python3

#  This file is part of Elixir, a source code cross-referencer.
#
#  Copyright (C) 2017--2020 Mikaël Bouillot <mikael.bouillot@bootlin.com>
#  and contributors.
#
#  Elixir is free software: you can redistribute it and/or modify
#  it under the terms of the GNU Affero General Public License as published by
#  the Free Software Foundation, either version 3 of the License, or
#  (at your option) any later version.
#
#  Elixir is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU Affero General Public License for more details.
#
#  You should have received a copy of the GNU Affero General Public License
#  along with Elixir.  If not, see <http://www.gnu.org/licenses/>.

import logging
import os
import sys
import re
import threading
import time
import datetime
from collections import OrderedDict, namedtuple
from re import search, sub
from typing import Any, Callable, NamedTuple, Tuple
from urllib import parse
import falcon
import jinja2

from .lib import validFamily, getFileFamily
from .query import Query, SymbolInstance
from .filters import get_filters
from .filters.utils import FilterContext
from .autocomplete import AutocompleteResource
from .api import ApiIdentGetterResource
from .query import get_query
from .web_utils import ProjectConverter, IdentConverter, validate_version, validate_project, validate_ident, \
        get_elixir_version_string, get_elixir_repo_url, RequestContext, Config

VERSION_CACHE_DURATION_SECONDS = 2 * 60  # 2 minutes
ADD_ISSUE_LINK = "https://github.com/bootlin/elixir/issues/new"
ELIXIR_VERSION_STRING = get_elixir_version_string()
ELIXIR_REPO_LINK = get_elixir_repo_url(ELIXIR_VERSION_STRING)

DEFAULT_PROJECT = 'linux'

# Error with extra information about browsed project,
# to be used in project/version URLs
class ElixirProjectError(falcon.errors.HTTPError):
    def __init__(self, title, description, project=None, version=None, query=None,
                 status=falcon.HTTP_BAD_REQUEST, extra_template_args={}, **kwargs):
        self.project = project
        self.version = version
        self.query = query
        self.extra_template_args = extra_template_args
        super().__init__(status, title=title, description=description, **kwargs)

# Generate a summary of error details for a bug report
def generate_error_details(req, resp, title, details):
    return f"Request date: {datetime.datetime.now()}\n" + \
           f"Path: {req.path}\n" + \
           f"Query string: {req.query_string}\n" + \
           f"Method: {req.method}\n" + \
           f"Status code: {resp.status}\n" + \
           f"Error title: {title}\n" + \
           f"Error details: {details}\n"

def get_github_issue_url(details: str):
    body = ("TODO: add information on how you reached the error here and " +
            "validate the details below.\n\n" +
            "---\n\n" +
            details)

    return ADD_ISSUE_LINK + "?body=" + parse.quote(body)


# Generate an error page from ElixirProjectError
def get_project_error_page(req, resp, exception: ElixirProjectError):
    report_error_details = generate_error_details(req, resp, exception.title, exception.description)

    template_ctx = {
        'projects': get_projects(req.context.config.project_dir),
        'topbar_families': TOPBAR_FAMILIES,
        'current_version_path': (None, None, None),
        'current_family': 'A',
        'source_base_url': '/',
        'elixir_version_string': req.context.config.version_string,
        'elixir_repo_url': req.context.config.repo_url,

        'referer': req.referer if req.referer != req.uri else None,
        'bug_report_url': get_github_issue_url(report_error_details),
        'home_page_url': '/',
        'report_error_details': report_error_details,

        'error_title': exception.title,
    }

    if exception.project is not None and exception.query is not None:
        # Add details about current project
        query = exception.query
        project = exception.project
        version = exception.version

        versions_raw = get_versions_cached(query, req.context, project)
        get_url_with_new_version = lambda v: stringify_source_path(project, v, '/')
        versions, current_version_path = get_versions(versions_raw, get_url_with_new_version, version)

        if current_version_path[2] is None:
            # If details about current version are not available, make base links
            # point to latest.
            # current_tag is not set to latest to avoid latest being highlighted in the sidebar
            version = query.get_latest_tag()

        template_ctx = {
            **template_ctx,

            'current_project': project,
            'current_tag': version,
            'versions': versions,
            'current_version_path': current_version_path,

            'home_page_url': get_source_base_url(project, version),
            'source_base_url': get_source_base_url(project, version),
            'ident_base_url': get_ident_base_url(project, version),
        }

    if exception.description is not None:
        template_ctx['error_details'] = exception.description

    template_ctx = {
        **template_ctx,
        **exception.extra_template_args,
    }

    template = req.context.jinja_env.get_template('error.html')
    result = template.render(template_ctx)

    if exception.query is not None:
        exception.query.close()

    return result

# Generate an error page from falcon exceptions
def get_error_page(req, resp, exception: ElixirProjectError):
    report_error_details = generate_error_details(req, resp, exception.title, exception.description)

    template_ctx = {
        'projects': get_projects(req.context.config.project_dir),
        'topbar_families': TOPBAR_FAMILIES,
        'current_version_path': (None, None, None),
        'current_family': 'A',
        'source_base_url': '/',

        'referer': req.referer,
        'bug_report_url': ADD_ISSUE_LINK + parse.quote(report_error_details),
        'report_error_details': report_error_details,

        'error_title': exception.title,
    }

    if exception.description is not None:
        template_ctx['error_details'] = exception.description

    template = req.context.jinja_env.get_template('error.html')
    return template.render(template_ctx)

# Validates project and version, returns project, version and query.
# To be used in project/version URLs
def validate_project_and_version(ctx, project, version):
    project = validate_project(parse.unquote(project))
    if project is None:
        raise ElixirProjectError('Error', 'Invalid project name')

    query = get_query(ctx.config.project_dir, project)
    if not query:
        raise ElixirProjectError('Error', 'Unknown project', status=falcon.HTTP_NOT_FOUND)

    version = validate_version(parse.unquote(version))
    if version is None:
        raise ElixirProjectError('Error', 'Invalid version', project=project, query=query)

    return project, version, query


# Returns base url of source pages
# project and version are assumed to be unquoted
def get_source_base_url(project: str, version: str) -> str:
    return f'/{ parse.quote(project, safe="") }/{ parse.quote(version, safe="") }/source'

# Converts ParsedSourcePath to a string with corresponding URL path
def stringify_source_path(project: str, version: str, path: str) -> str:
    if not path.startswith('/'):
        path = '/' + path
    path = f'{ get_source_base_url(project, version) }{ path }'
    return path.rstrip('/')

# Handles the '/' URL
class IndexResource:
    def on_get(self, req, resp):
        ctx = req.context
        project = DEFAULT_PROJECT

        query = get_query(ctx.config.project_dir, project)
        if not query:
            raise ElixirProjectError('Error', f'Unknown default project: {project}',
                                     status=falcon.HTTP_INTERNAL_SERVER_ERROR)

        version = query.get_latest_tag()
        resp.status = falcon.HTTP_FOUND
        resp.location = stringify_source_path(project, version, '/')
        return

# Handles source URLs
# Path parameters are asssumed to be unquoted by converters
class SourceResource:
    def on_get(self, req, resp, project: str, version: str, path: str):
        project, version, query = validate_project_and_version(req.context, project, version)

        if not path.startswith('/') and len(path) != 0:
            path = f'/{ path }'

        if path.endswith('/'):
            resp.status = falcon.HTTP_MOVED_PERMANENTLY
            resp.location = stringify_source_path(project, version, path)
            return

        # Check if path contains only allowed characters
        if not search('^[A-Za-z0-9_/.,+-]*$', path):
            raise ElixirProjectError('Error', 'Path contains characters that are not allowed',
                              project=project, version=version, query=query)

        if version in ('latest', 'latest-rc'):
            rc = version == 'latest-rc'
            version = query.get_latest_tag(rc=rc)
            resp.status = falcon.HTTP_FOUND
            resp.location = stringify_source_path(project, version, path)
            return

        raw_param = req.get_param('raw')
        if raw_param is not None and raw_param.strip() != '0':
            generate_raw_source(resp, query, project, version, path)
        else:
            resp.content_type = falcon.MEDIA_HTML
            resp.status, resp.text = generate_source_page(req.context, query, project, version, path)

        query.close()

# Handles source URLs without a path, ex. '/u-boot/v2023.10/source'.
# Note lack of trailing slash
class SourceWithoutPathResource(SourceResource):
    def on_get(self, req, resp, project: str, version: str):
        return super().on_get(req, resp, project, version, '')


# Returns base url of ident pages
# project and version assumed unquoted
def get_ident_base_url(project: str, version: str, family: str|None = None) -> str:
    project = parse.quote(project, safe="")
    version = parse.quote(version, safe="")
    if family is not None:
        return f'/{ project }/{ version }/{ parse.quote(family, safe="") }/ident'
    else:
        return f'/{ project }/{ version }/ident'

# Converts ParsedIdentPath to a string with corresponding URL path
def stringify_ident_path(project, version, family, ident) -> str:
    path = f'{ get_ident_base_url(project, version, family) }/{ parse.quote(ident, safe="") }'
    return path.rstrip('/')

# Handles redirect from ident with form (POST/GET with query parameters)
# to default ident URL format
class IdentPostRedirectResource:
    def on_get(self, req, resp, project: str, version: str, family: str|None = None, _ident: str|None = None):
        get_ident = req.get_param('i', required=False)
        get_family = req.get_param('f', required=False)
        if get_ident is None:
            project, version, _ = validate_project_and_version(req.context, project, version)
            resp.status = falcon.HTTP_FOUND
            resp.location = stringify_source_path(project, version, "")
        else:
            return self.handle(req, resp, project, version, get_ident, get_family)

    def on_post(self, req, resp, project: str, version: str, family: str|None = None, _ident: str|None = None):
        form = req.get_media()
        post_ident = form.get('i')
        post_family = form.get('f')
        return self.handle(req, resp, project, version, post_ident, post_family)

    def handle(self, req, resp, project: str, version: str, ident: str, family: str):
        project, version, query = validate_project_and_version(req.context, project, version)

        if not validFamily(family):
            family = 'C'

        if not ident:
            raise ElixirProjectError('Error', 'Invalid identifier',
                              project=project, version=version, query=query,
                              extra_template_args={
                                  'searched_ident': parse.unquote(ident),
                                  'current_family': family,
                              })

        ident = ident.strip()
        resp.status = falcon.HTTP_MOVED_PERMANENTLY
        resp.location = stringify_ident_path(project, version, family, ident)

        query.close()

# Handles ident URLs when family is specified in the URL, both POST and GET
# See IdentPostRedirectResource for behavior on POST
# Path parameters are asssumed to be unquoted by converters
class IdentResource(IdentPostRedirectResource):
    def on_get(self, req, resp, project: str, version: str, family: str, ident: str):
        project, version, query = validate_project_and_version(req.context, project, version)

        family = parse.unquote(family)
        if not validFamily(family):
            family = 'C'

        ident = parse.unquote(ident)
        validated_ident = validate_ident(ident)
        if validated_ident is None:
            raise ElixirProjectError('Error', 'Invalid identifier',
                              project=project, version=version, query=query,
                              extra_template_args={
                                  'searched_ident': ident,
                                  'current_family': family,
                              })

        ident = validated_ident

        if version in ('latest', 'latest-rc'):
            rc = version == 'latest-rc'
            version = query.get_latest_tag(rc=rc)
            resp.status = falcon.HTTP_FOUND
            resp.location = stringify_ident_path(project, version, family, ident)
            return

        resp.content_type = falcon.MEDIA_HTML
        resp.status, resp.text = generate_ident_page(req.context, query, project, version, family, ident)

        query.close()

# Handles ident URLs when family is not specified in the URL
# Also handles POST requests for ident URLs without family - IdentPostRedirectResource is
# inherited from IdentResource
class IdentWithoutFamilyResource(IdentResource):
    def on_get(self, req, resp, project: str, version: str, ident: str):
        super().on_get(req, resp, project, version, 'C', ident)

# Handles /{project}/{version} URL, without path
class IncompleteURLRedirectResource:
    def on_get(self, req, resp, project: str, version: str = "latest"):
        ctx = req.context

        query = get_query(ctx.config.project_dir, project)
        if not query:
            raise ElixirProjectError('Error', f'Unknown default project: {project}',
                                     status=falcon.HTTP_INTERNAL_SERVER_ERROR)

        if version in ('latest', 'latest-rc') or len(version) == 0:
            rc = version == 'latest-rc'
            version = query.get_latest_tag(rc=rc)

        resp.status = falcon.HTTP_FOUND
        resp.location = stringify_source_path(project, version, '/')

# Handles /{project}/{version}/... URLs with unknown "command"
class UnknownPathResource:
    def on_get(self, req, resp, project: str, version: str, family: str = "", subcmd: str = "", path: str = ""):
        project, version, query = validate_project_and_version(req.context, project, version)

        raise ElixirProjectError('Error', 'Invalid path',
                          project=project, version=version, query=query,
                          extra_template_args={
                              'current_family': 'A',
                          })


# File families available in the dropdown next to search input in the topbar
TOPBAR_FAMILIES = {
    'A': 'All symbols',
    'C': 'C/CPP/ASM',
    'K': 'Kconfig',
    'D': 'Devicetree',
    'B': 'DT compatible',
}

# Returns a list of names of top-level directories in basedir
def get_directories(basedir: str) -> list[str]:
    directories = []
    for filename in os.listdir(basedir):
        filepath = os.path.join(basedir, filename)
        if os.path.isdir(filepath):
            directories.append(filename)
    return sorted(directories)

# Tuple of project name and URL to root of that project
# Used to render project list
ProjectEntry = namedtuple('ProjectEntry', 'name, url')

# Returns a list of ProjectEntry tuples of projects stored in directory basedir
def get_projects(basedir: str) -> list[ProjectEntry]:
    return [ProjectEntry(p, f"/{p}/latest/source") for p in get_directories(basedir)]

# Tuple of version name and URL to chosen resource with that version
# Used to render version list in the sidebar
VersionEntry = namedtuple('VersionEntry', 'version, url')

# Takes result of Query.get_versions() and prepares it for the sidebar template.
#  Returns an OrderedDict with version information and optionally a triple with
#  (major, minor, version) of current_version. The triple is useful, because sometimes
#  the major or minor of a version (in this context) is a custom string (ex. FIXME).
# versions: OrderedDict with major parts of versions as keys, values are OrderedDicts
#   with minor version parts as keys and complete version strings as values
# get_url: function that takes a version string and returns the URL
#   for that version. Meaning of the URL can depend on the context
# current_version: string with currently browsed version
def get_versions(versions: OrderedDict[str, OrderedDict[str, str]],
                 get_url: Callable[[str], str],
                 current_version: str) -> Tuple[dict[str, dict[str, list[VersionEntry]]], Tuple[str|None, str|None, str|None]]:

    result = OrderedDict()
    current_version_path = (None, None, None)
    for major, minor_verions in versions.items():
        for minor, patch_versions in minor_verions.items():
            for v in patch_versions:
                if major not in result:
                    result[major] = OrderedDict()
                if minor not in result[major]:
                    result[major][minor] = []
                result[major][minor].append(VersionEntry(v, get_url(v)))
                if v == current_version:
                    current_version_path = (major, minor, v)

    return result, current_version_path

# Caches get_versions result in a context object
def get_versions_cached(q, ctx, project):
    with ctx.versions_cache_lock:
        if project not in ctx.versions_cache:
            ctx.versions_cache[project] = (time.time(), q.get_versions())
            cached_versions = ctx.versions_cache[project]
        else:
            cached_versions = ctx.versions_cache[project]
            if time.time()-cached_versions[0] > VERSION_CACHE_DURATION_SECONDS:
                ctx.versions_cache[project] = (time.time(), q.get_versions())
                cached_versions = ctx.versions_cache[project]

        return cached_versions[1]

# Retruns template context used by the layout template
# get_url_with_new_version: see get_url parameter of get_versions
# project: name of the project
# version: version of the project
def get_layout_template_context(q: Query, ctx: RequestContext, get_url_with_new_version: Callable[[str], str],
                                project: str, version: str) -> dict[str, Any]:
    versions_raw = get_versions_cached(q, ctx, project)
    versions, current_version_path = get_versions(versions_raw, get_url_with_new_version, version)

    return {
        'projects': get_projects(ctx.config.project_dir),
        'versions': versions,
        'current_version_path': current_version_path,
        'topbar_families': TOPBAR_FAMILIES,
        'elixir_version_string': ctx.config.version_string,
        'elixir_repo_url': ctx.config.repo_url,

        'source_base_url': get_source_base_url(project, version),
        'ident_base_url': get_ident_base_url(project, version),
        'current_project': project,
        'current_tag': parse.unquote(version),
        'current_family': 'A',
    }

# Generate raw source response
def generate_raw_source(resp, query, project, version, path):
    type = query.get_file_type(version, path)
    if type != 'blob':
        raise ElixirProjectError('File not found', 'This file does not exist.',
                                 query=query, project=project, version=version)
    else:
        code = query.get_file_raw(version, path)
        resp.content_type = 'application/octet-stream'
        resp.text = code
        resp.downloadable_as = path.split('/')[-1]
        # Cache for 24 hours
        resp.cache_control = ('max-age=86400',)
        # Sandbox result just in case
        resp.headers['Content-Security-Policy'] = "sandbox; default-src 'none'"

# Guesses file format based on filename, returns code formatted as HTML
def format_code(filename: str, code: str) -> str:
    import pygments
    import pygments.lexers
    import pygments.formatters
    from pygments.lexers.asm import GasLexer
    from pygments.lexers.r import SLexer

    try:
        lexer = pygments.lexers.guess_lexer_for_filename(filename, code)
        if filename.endswith('.S') and isinstance(lexer, SLexer):
            lexer = GasLexer()
    except pygments.util.ClassNotFound:
        lexer = pygments.lexers.get_lexer_by_name('text')

    lexer.stripnl = False
    formatter = pygments.formatters.HtmlFormatter(
        # Adds line numbers column to output
        linenos=True,
        # Wraps line numbers in link (a) tags
        anchorlinenos=True,
        # Wraps each line in a span tag with id='codeline-{line_number}'
        linespans='codeline',
    )
    return pygments.highlight(code, lexer, formatter)

# Generate formatted HTML of a file, apply filters (for ex. to add identifier links)
# q: Query object
# project: name of the requested project
# version: requested version of the project
# path: path to the file in the repository
def generate_source(q: Query, project: str, version: str, path: str) -> str:
    code = q.get_tokenized_file(version, path)

    _, fname = os.path.split(path)
    _, extension = os.path.splitext(fname)
    extension = extension[1:].lower()
    family = getFileFamily(fname)

    source_base_url = get_source_base_url(project, version)

    def get_ident_url(ident, ident_family=None):
        if ident_family is None:
            ident_family = family
        return stringify_ident_path(project, version, ident_family, ident)

    filter_ctx = FilterContext(
        q,
        version,
        family,
        path,
        get_ident_url,
        lambda path: f'{ source_base_url }{ "/" if not path.startswith("/") else "" }{ path }',
        lambda rel_path: f'{ source_base_url }{ os.path.dirname(path) }/{ rel_path }',
    )

    filters = get_filters(filter_ctx, project)

    # Apply filters
    for f in filters:
        code = f.transform_raw_code(filter_ctx, code)

    html_code_block = format_code(fname, code)

    # Replace line numbers by links to the corresponding line in the current file
    html_code_block = sub('href="#codeline-(\d+)', 'name="L\\1" id="L\\1" href="#L\\1', html_code_block)

    for f in filters:
        html_code_block = f.untransform_formatted_code(filter_ctx, html_code_block)

    return html_code_block

# Represents a file entry in git tree
# type : either tree (directory), blob (file) or symlink
# name: filename of the file
# path: path of the file, path to the target in case of symlinks
# url: absolute URL of the file
# size: int, file size in bytes, None for directories and symlinks
DirectoryEntry = namedtuple('DirectoryEntry', 'type, name, path, url, size')

# Returns a list of DirectoryEntry objects with information about files in a directory
# base_url: file URLs will be created by appending file path to this URL. It shouldn't end with a slash
# tag: requested repository tag
# path: path to the directory in the repository
def get_directory_entries(q: Query, base_url, tag: str, path: str) -> list[DirectoryEntry]:
    dir_entries = []
    lines = q.get_dir_contents(tag, path)

    for l in lines:
        type, name, size, perm = l.split(' ')
        file_path = f"{ path }/{ name }"

        if type == 'tree':
            dir_entries.append(DirectoryEntry('tree', name, file_path, f"{ base_url }{ file_path }", None))
        elif type == 'blob':
            # 120000 permission means it's a symlink
            if perm == '120000':
                dir_path = path if path.endswith('/') else path + '/'
                link_contents = q.get_file_raw(tag, file_path)
                link_target_path = os.path.abspath(dir_path + link_contents)

                dir_entries.append(DirectoryEntry('symlink', name, link_target_path, f"{ base_url }{ link_target_path }", size))
            else:
                dir_entries.append(DirectoryEntry('blob', name, file_path, f"{ base_url }{ file_path }", size))

    return dir_entries

# Generates response (status code and optionally HTML) of the `source` route
def generate_source_page(ctx: RequestContext, q: Query,
                         project: str, version: str, path: str) -> tuple[int, str]:

    status = falcon.HTTP_OK
    source_base_url = get_source_base_url(project, version)

    type = q.get_file_type(version, path)

    # Generate breadcrumbs
    path_split = path.split('/')[1:]
    path_temp = ''
    breadcrumb_urls = []
    for p in path_split:
        path_temp += '/'+p
        breadcrumb_urls.append((p, f'{ source_base_url }{ path_temp }'))

    if type == 'tree':
        back_path = os.path.dirname(path[:-1])
        if back_path == '/':
            back_path = ''

        template_ctx = {
            'dir_entries': get_directory_entries(q, source_base_url, version, path),
            'back_url': f'{ source_base_url }{ back_path }' if path != '' else None,
        }
        template = ctx.jinja_env.get_template('tree.html')
    elif type == 'blob':
        template_ctx = {
            'code': generate_source(q, project, version, path),
            'path': path,
        }
        template = ctx.jinja_env.get_template('source.html')
    else:
        raise ElixirProjectError('File not found', 'This file does not exist.',
                                 status=falcon.HTTP_NOT_FOUND,
                                 query=q, project=project, version=version,
                                 extra_template_args={'breadcrumb_urls': breadcrumb_urls})

    # Create titles like this:
    # root path: "Linux source code (v5.5.6) - Bootlin"
    # first level path: "arch - Linux source code (v5.5.6) - Bootlin"
    # deeper paths: "Makefile - arch/um/Makefile - Linux source code (v5.5.6) - Bootlin"
    if path == '':
        title_path = ''
    elif len(path_split) == 1:
        title_path = f'{ path_split[0] } - '
    else:
        title_path = f'{ path_split[-1] } - { "/".join(path_split) } - '

    get_url_with_new_version = lambda v: stringify_source_path(project, v, path)

    # Create template context
    data = {
        **get_layout_template_context(q, ctx, get_url_with_new_version, project, version),

        'title_path': title_path,
        'path': path,
        'breadcrumb_urls': breadcrumb_urls,

        **template_ctx,
    }

    return (status, template.render(data))

# Represents line in a file with URL to that line
LineWithURL = namedtuple('LineWithURL', 'lineno, url')

# Represents a symbol occurrence to be rendered by ident template
# type : type of the symbol
# path: path of the file that contains the symbol
# line: list of LineWithURL
SymbolEntry = namedtuple('SymbolEntry', 'type, path, lines')

# Converts SymbolInstance into SymbolEntry
# path of SymbolInstance will be appended to base_url
def symbol_instance_to_entry(base_url: str, symbol: SymbolInstance) -> SymbolEntry:
    # TODO this should be a responsibility of Query
    if type(symbol.line) is str:
        line_numbers = symbol.line.split(',')
    else:
        line_numbers = [symbol.line]

    lines = [
        LineWithURL(l, f'{ base_url }/{ symbol.path }#L{ l }')
        for l in line_numbers
    ]

    return SymbolEntry(symbol.type, symbol.path, lines)

# Generates response (status code and optionally HTML) of the `ident` route
# basedir: path to data directory, ex: "/srv/elixir-data"
def generate_ident_page(ctx: RequestContext, q: Query,
                        project: str, version: str, family: str, ident: str) -> tuple[int, str]:

    status = falcon.HTTP_OK
    source_base_url = get_source_base_url(project, version)
    symbol_definitions, symbol_references, symbol_doccomments, symbol_exists = q.search_ident(
            version, ident, family)
    symbol_sections = []

    if len(symbol_definitions) or len(symbol_references):
        if len(symbol_doccomments):
            symbol_sections.append({
                'title': 'Documented',
                'symbols': {'_unknown': [symbol_instance_to_entry(source_base_url, sym) for sym in symbol_doccomments]},
            })

        if len(symbol_definitions):
            defs_by_type = OrderedDict({})

            # TODO this should be a responsibility of Query
            for sym in symbol_definitions:
                if sym.type not in defs_by_type:
                    defs_by_type[sym.type] = [symbol_instance_to_entry(source_base_url, sym)]
                else:
                    defs_by_type[sym.type].append(symbol_instance_to_entry(source_base_url, sym))

            symbol_sections.append({
                'title': 'Defined',
                'symbols': defs_by_type,
            })
        else:
            symbol_sections.append({
                'message': 'No definitions found in the database',
            })

        if len(symbol_references):
            symbol_sections.append({
                'title': 'Referenced',
                'symbols': {'_unknown': [symbol_instance_to_entry(source_base_url, sym) for sym in symbol_references]},
            })
        else:
            symbol_sections.append({
                'message': 'No references found in the database',
            })

    elif ident != '':
        status = falcon.HTTP_NOT_FOUND

    get_url_with_new_version = lambda v: stringify_ident_path(project, v, family, ident)

    data = {
        **get_layout_template_context(q, ctx, get_url_with_new_version, project, version),

        'searched_ident': ident,
        'current_family': family,

        'symbol_sections': symbol_sections,

        'symbol_exists': symbol_exists,
    }

    template = ctx.jinja_env.get_template('ident.html')
    return (status, template.render(data))


def get_jinja_env():
    script_dir = os.path.dirname(os.path.realpath(__file__))
    templates_dir = os.path.join(script_dir, '../templates/')
    loader = jinja2.FileSystemLoader(templates_dir)
    return jinja2.Environment(loader=loader)

# see https://falcon.readthedocs.io/en/v3.1.2/user/recipes/raw-url-path.html
# Replaces the default, unquoted URL with a quoted version
# NOTE: this is non-standard and it's not guaranteed to work on all WSGI servers
class RawPathComponent:
    def process_request(self, req, _):
        raw_uri = req.env.get('RAW_URI') or req.env.get('REQUEST_URI')
        if raw_uri:
            req.path, _, _ = raw_uri.partition('?')

# Adds request context to all requests
class RequestContextMiddleware:
    def __init__(self, jinja_env):
        self.jinja_env = jinja_env
        self.versions_cache = {}
        self.versions_cache_lock = threading.Lock()

    def process_request(self, req, _resp):
        req.context = RequestContext(
            Config(req.env['LXR_PROJ_DIR'], ELIXIR_VERSION_STRING, ELIXIR_REPO_LINK),
            self.jinja_env,
            logging.getLogger(__name__),
            self.versions_cache,
            self.versions_cache_lock,
        )

# Serialies caught exceptions to JSON or HTML
# See https://falcon.readthedocs.io/en/stable/api/app.html#falcon.App.set_error_serializer
def error_serializer(req, resp, exception):
    preferred = req.client_prefers((falcon.MEDIA_HTML, falcon.MEDIA_JSON))

    if preferred is not None:
        if preferred == falcon.MEDIA_JSON:
            resp.data = exception.to_json()
            resp.content_type = falcon.MEDIA_JSON
        elif preferred == falcon.MEDIA_HTML:
            if isinstance(exception, ElixirProjectError):
                resp.text = get_project_error_page(req, resp, exception)
            else:
                resp.text = get_error_page(req, resp, exception)
            resp.content_type = falcon.MEDIA_HTML

    resp.append_header('Vary', 'Accept')

# Builds and returns the Falcon application
def get_application():
    app = falcon.App(middleware=[
        RawPathComponent(),
        RequestContextMiddleware(get_jinja_env()),
    ])

    app.router_options.converters['project'] = ProjectConverter
    app.router_options.converters['ident'] = IdentConverter

    app.set_error_serializer(error_serializer)

    app.add_route('/', IndexResource())
    app.add_route('/{project}/{version}/source/{path:path}', SourceResource())
    app.add_route('/{project}/{version}/source', SourceWithoutPathResource())
    app.add_route('/{project}/{version}/ident', IdentPostRedirectResource())
    app.add_route('/{project}/{version}/ident/{ident}', IdentWithoutFamilyResource())
    app.add_route('/{project}/{version}/{family}/ident/{ident}', IdentResource())

    app.add_route('/acp', AutocompleteResource())
    app.add_route('/api/ident/{project:project}/{ident:ident}', ApiIdentGetterResource())

    app.add_route('/{project}', IncompleteURLRedirectResource())
    app.add_route('/{project}/{version}', IncompleteURLRedirectResource())
    app.add_route('/{project}/{version}/', IncompleteURLRedirectResource())
    app.add_route('/{project}/{version}/{family}', UnknownPathResource())
    app.add_route('/{project}/{version}/{family}/{subcmd}', UnknownPathResource())
    app.add_route('/{project}/{version}/{family}/{subcmd}/{path:path}', UnknownPathResource())

    return app

application = get_application()



================================================
FILE: elixir/web_utils.py
================================================
import os
import re
import logging
import threading
from urllib import parse
from typing import Any, Dict, NamedTuple
import falcon
import jinja2

from .lib import validFamily, run_cmd

ELIXIR_DIR = os.path.normpath(os.path.dirname(__file__) + "/../")
ELIXIR_REPO_LINK = 'https://github.com/bootlin/elixir/'

def get_elixir_version_string():
    version = os.environ.get('ELIXIR_VERSION')
    if version is not None and len(version) != 0:
        return version

    try:
        # try to get Elixir version from git
        result, return_code = run_cmd('git',
            '-C', ELIXIR_DIR,
            '-c', f'safe.directory={ ELIXIR_DIR }',
            'rev-parse', '--short', 'HEAD'
        )

        if return_code == 0:
            return result.decode('utf-8')

    except Exception:
        logging.exception("failed to get elixir commit hash")

    return ''

def get_elixir_repo_url(version):
    if re.match('^[0-9a-f]{5,12}$', version) or version.startswith('v'):
        return ELIXIR_REPO_LINK + f'tree/{ version }'
    else:
        return ELIXIR_REPO_LINK

# Elixir config, currently contains only path to directory with projects
class Config(NamedTuple):
    project_dir: str
    version_string: str
    repo_url: str

# Basic information about handled request - current Elixir configuration, configured Jinja environment
# and logger
class RequestContext(NamedTuple):
    config: Config
    jinja_env: jinja2.Environment
    logger: logging.Logger
    versions_cache: Dict[str, str]
    versions_cache_lock: threading.Lock

def validate_project(project: str) -> str|None:
    if project is not None and re.match(r'^[a-zA-Z0-9_.,:/-]+$', project):
        return project.strip()

# Validates and unquotes project parameter
class ProjectConverter(falcon.routing.BaseConverter):
    def convert(self, value: str) -> str:
        value = parse.unquote(value)
        project = validate_project(value)
        if project is None:
            raise falcon.HTTPBadRequest('Error', 'Invalid project name')
        return project

def validate_version(version) -> str|None:
    if version is not None and re.match(r'^[a-zA-Z0-9_.,:/-]+$', version):
        return version.strip()

def validate_ident(ident: str) -> str|None:
    if ident is not None and re.match(r'^[A-Za-z0-9_,.+?#-]+$', ident):
        return ident.strip()

# Validates and unquotes identifier parameter
class IdentConverter(falcon.routing.BaseConverter):
    def convert(self, value: str) -> str|None:
        value = parse.unquote(value)
        return validate_ident(value)



================================================
FILE: find-file-doc-comments.pl
================================================
#!/usr/bin/env perl
# find-file-doc-comments.pl: Find the doc comments for a file.
# Usage: find-file-doc-comments.pl <C source file name>

#  This file is part of Elixir, a source code cross-referencer.
#
#  By Christopher White <cwhite@d3engineering.com>
#  Copyright (c) 2019--2020 D3 Engineering, LLC.
#
#  Elixir is free software: you can redistribute it and/or modify
#  it under the terms of the GNU Affero General Public License as published by
#  the Free Software Foundation, either version 3 of the License, or
#  (at your option) any later version.
#
#  Elixir is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU Affero General Public License for more details.
#
#  You should have received a copy of the GNU Affero General Public License
#  along with Elixir.  If not, see <http://www.gnu.org/licenses/>.

use 5.010001;
use strict;
use warnings;
use autodie;

my $VERBOSE = $ENV{V};

exit main(@ARGV);

sub main {
    die "Need a filename" unless @_;
    my $filename = shift;
    die "Could not read $filename" unless -r $filename;
    say "Processing file $filename" if $VERBOSE;

    # Fatalize all warnings, and log which file triggered the warning.
    local $SIG{__WARN__} = sub {
        die "While processing $filename: $_[0]\n";
    };

    # Do `script.sh parse-defs` on the file
    my @ctags = qx{ ctags -x --c-kinds=+p-m --language-force=C "$filename" |
            grep -av "^operator " |
            awk '{print \$1" "\$2" "\$3}' };
    die "Could not get ctags: $!" if $!;
    say "No ctags results" if $VERBOSE && !@ctags;
    return 0 unless @ctags;

    # Make a list of [name, type, line] arrays
    my @ctags_parsed = map { [split] } @ctags;

    # Flip it around to index functions and types by line.  Don't index anything
    # by name, since there can be multiple names with different types/lines (#186).
    my %definition_lines;
    my %definition_types;
    for my $tag (@ctags_parsed) {
        $definition_lines{$tag->[2]} = $tag->[0];
        $definition_types{$tag->[2]} = $tag->[1] // '<none>';
    }

    if($VERBOSE) {
        for my $tag (sort { $a->[2] <=> $b->[2] } @ctags_parsed) {
            say $tag->[2], ': ', $tag->[0], ' is a(n) ', $tag->[1];
        }
    }

    # Read the source file
    open my $fh, '<', $filename;
    my @source_lines = (undef, <$fh>);
        # undef => indices in @source_lines match ctags's 1-based linenos
    close $fh;

    # Work backwards through the file and look for doc comments
    my %doc_comments;

    my $doc_comment_opener = qr{^\h*\/\*\*(?:\h|$)};    # Start of doc comment
    my $comment_leader = qr{\h+\*\h+(?:(?:struct|enum|union|typedef)\h+)?};

    for(my $lineno = $#source_lines ; $lineno >= 1 ; --$lineno) {
        next unless exists $definition_lines{$lineno};
        my $definition_name = $definition_lines{$lineno};
        my $definition_type = $definition_types{$lineno};
        say "\nChecking $definition_type $definition_name @ $lineno" if $VERBOSE;

        # Comment header: be liberal in what we accept.  For example, do not
        # check the type of the definition/declaration against the type in
        # the comment header.  I don't think this will be a problem.
        my $this_doc_comment_header =
            qr{^$comment_leader\Q$definition_name\E(?:\h|\(|:|$)};
        say "  Regex is -$this_doc_comment_header-" if $VERBOSE;

        # Make sure we get back past the first line of multiline definitions
        if($definition_type eq 'macro') {
            --$lineno while $lineno && $source_lines[$lineno] !~ /^\h*#\h*define/;
        } elsif($definition_type eq 'function') {
            # Try to handle the case of "int\nfoo()"
            if($source_lines[$lineno] =~ /^\h*\Q$definition_name\E\b/) {
                --$lineno while $lineno && $source_lines[$lineno] =~ /^[a-z_]/i;
            }
        }

        # Assume cflags gave us the first line of the definition, or we got
        # back to it manually.  Move to the first line that might be a doc comment.
        --$lineno;

        # If we ran off the beginning of the file, there's no doc comment.
        next if $lineno <= 0;

        # TODO make sure we're not still in the definition.
        # E.g., memblock.h:for_each_mem_range().  The defintion is reported
        # on the second line of the #define, not the first line.

        say "  Starting search for docs at line $lineno" if $VERBOSE;

        # Find the last line that could be a doc-comment header
        # for this function.
        while($lineno && $source_lines[$lineno] =~
            qr{
                    ^\h*$               # Empty line
                |   ^\h+\*\/            # End of comment
                |   ^\h+\*(?:\h|$)      # Continuation of comment
                |   $this_doc_comment_header
            }x) {
            if($VERBOSE) {
                my $line = $source_lines[$lineno];
                chomp $line;
                say "  skipped $lineno '$line'";
            }
            --$lineno;
        }
        ++$lineno;  # Check the last line that matched,
                    # because we may have just skipped past $this_doc_comment_header

        # Is it actually a header for this function?
        say "  Checking line $lineno for header" if $VERBOSE;
        next unless $source_lines[$lineno] =~ $this_doc_comment_header;

        # We have found a header.  Confirm it's a doc comment.
        --$lineno;
        next unless $lineno > 0 && $source_lines[$lineno] =~ $doc_comment_opener;
        say "  * Match" if $VERBOSE;

        # We have found a doc comment for this function!  Record it.
        push @{$doc_comments{$definition_name}}, $lineno;
    } # foreach line in reverse order

    # Report the doc comments for each function
    for my $definition_name (keys %doc_comments) {
        my $comment_lines = $doc_comments{$definition_name};
        say "$definition_name $_" foreach @$comment_lines;
    }

    return 0;
} #main


================================================
FILE: find_compatible_dts.py
================================================
#!/usr/bin/env python3

#  This file is part of Elixir, a source code cross-referencer.
#
#  Copyright (C) 2017--2020  Maxime Chretien <maxime.chretien@bootlin.com>
#                            and contributors
#
#  Elixir is free software: you can redistribute it and/or modify
#  it under the terms of the GNU Affero General Public License as published by
#  the Free Software Foundation, either version 3 of the License, or
#  (at your option) any later version.
#
#  Elixir is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU Affero General Public License for more details.
#
#  You should have received a copy of the GNU Affero General Public License
#  along with Elixir.  If not, see <http://www.gnu.org/licenses/>.

import re
from urllib import parse
from elixir.lib import decode

class FindCompatibleDTS:
    def __init__(self):
        # Compile regexes
        self.regex_c = re.compile("\s*{*\s*\.compatible\s*=\s*\"(.+?)\"")
        self.regex_dts1 = re.compile("\s*compatible")
        self.regex_dts2 = re.compile("\"(.+?)\"")
        self.regex_bindings = re.compile("([\w-]+,?[\w-]+)")

    def parse_c(self, content):
        return self.regex_c.findall(content)

    def parse_dts(self, content):
        ret = []
        if self.regex_dts1.match(content) != None:
            ret = self.regex_dts2.findall(content)
        return ret

    def parse_bindings(self, content):
        # There are a lot of wrong results
        # but we don't apply that to a lot of files
        # so it should be fine
        return self.regex_bindings.findall(content)

    def run(self, file_lines, family):
        ident_list = []

        # Iterate though lines and search for idents
        for num, line in enumerate(file_lines, 1):
            line = decode(line)
            if family == 'C':
                ret = self.parse_c(line)
            elif family == 'D':
                ret = self.parse_dts(line)
            elif family == 'B':
                ret = self.parse_bindings(line)

            for i in range(len(ret)):
                ident_list.append(str(parse.quote(ret[i])) + ' ' + str(num))

        return ident_list



================================================
FILE: projects/amazon-freertos.sh
================================================
# Elixir definitions for Amazon FreeRTOS

list_tags_h()
{

    echo "$tags" |
    grep -v '^v' |
    tac |
    sed -r 's/^([0-9][0-9][0-9][0-9])([0-9][0-9])(.*)$/\1 \1\2 \1\2\3/'

    echo "$tags" |
    grep '^v' |
    tac |
    sed -r 's/^(v[0-9]*)\.([0-9]*)(.*)$/\1 \1.\2 \1.\2\3/'
}

get_latest_tags()
{
    git tag | grep '^20' | sort -Vr
}


================================================
FILE: projects/arm-trusted-firmware.sh
================================================
# Elixir definitions for Arm Trusted Firmware
# https://github.com/ARM-software/arm-trusted-firmware

# Enable DT bindings compatible strings support
dts_comp_support=1

list_tags_h()
{
    echo "$tags" |
    grep -v 'for-v0\.4' |
    tac |
    sed -r 's/^(v[0-9]*)\.([0-9]*)(.*)$/\1 \1.\2 \1.\2\3/'

    echo "$tags" |
    grep 'for-v0\.4' |
    tac |
    sed -r 's/^/custom for-v0.4 /'
}


================================================
FILE: projects/barebox.sh
================================================
# Elixir definitions for Barebox

# Enable DT bindings compatible strings support
dts_comp_support=1

list_tags_h()
{
    echo "$tags" |
    grep '^v20' |
    tac |
    sed -r 's/^(v20..)\.([0-9][0-9])\.(.*)$/\1 \1.\2 \1.\2.\3/'

    echo "$tags" |
    grep '^v2\.0' |
    tac |
    sed -r 's/^(v2\.0)(.*)$/old \1 \1\2/'

    echo "$tags" |
    grep '^freescale' |
    tac |
    sed -r 's/^(freescale)(.*)$/old \1 \1\2/'
}


================================================
FILE: projects/bluez.sh
================================================
# Elixir definitions for BlueZ
list_tags()
{
    echo "$tags" |
    grep '^[0-9]'
}

list_tags_h()
{
    echo "$tags" |
    grep '^[0-9]' |
    sort -rV |
    sed -E 's/^([0-9]*)\.([0-9]*)$/v\1 v\1.\2 \1.\2/'
}

get_latest_tags()
{
    git tag | grep '^[0-9]\.' | sort -Vr
}


================================================
FILE: projects/busybox.sh
================================================
# Elixir definitions for BusyBox

version_dir()
{
    tr '_.' '._';
}

version_rev()
{
    tr '._' '_.';
}

list_tags_h()
{
    echo "$tags" |
    tac |
    sed -r 's/^([0-9]*)\.([0-9]*)(.*)$/v\1 \1.\2 \1.\2\3/'
}



================================================
FILE: projects/coreboot.sh
================================================
# Elixir definitions for Coreboot

list_tags_h()
{
    echo "$tags" |
    tac |
    sed -r 's/^([0-9]*)\.([0-9]*)(.*)$/v\1 v\1.\2 \1.\2\3/'
}


================================================
FILE: projects/dpdk.sh
================================================
# Elixir definitions for DPDK

list_tags_h()
{
    echo "$tags" |
    grep -vE '^v1\.|^v2\.' |
    tac |
    sed -r 's/^v([0-9]*)\.([0-9]*)(.*)$/v\1 v\1.\2 v\1.\2\3/'

    echo "$tags" |
    grep -E '^v1\.|^v2\.' |
    tac |
    sed -r 's/^v(1|2)\.([0-9])(.*)$/old v\1.\2 v\1.\2\3/'
}


================================================
FILE: projects/freebsd.sh
================================================
# FreeBSD

version_dir()
{
    grep "^release/[0-9]*\.[0-9]*\.[0-9]*$" |
    sed -e 's,^release/,v,' |
    sed -e 's,\.0$,,';
}

version_rev()
{
    grep "^v" |
    sed -e 's,v[0-9]*\.[0-9]*$,&\.0,' |
    sed -e 's,^v,release/,';
}


================================================
FILE: projects/glibc.sh
================================================
# Elixir definitions for glibc

list_tags()
{
    echo "$tags" |
    grep -v 'cvs'
}

list_tags_h()
{
    echo "$tags" |
    grep "glibc" |
    grep -v "fedora" |
    grep -v "cvs" |
    tac |
    sed -r 's/^glibc-([0-9]*)(\.[0-9]*)(.*)$/v\1 v\1\2 glibc-\1\2\3/'

    echo "$tags" |
    grep -v "cvs" |
    grep "fedora" |
    tac |
    sed -r 's/^fedora\/glibc-([0-9]*)(\.[0-9]*)(.*)$/fedora v\1\2 fedora\/glibc-\1\2\3/'
}


================================================
FILE: projects/grub.sh
================================================
# Elixir definitions for Grub

list_tags_h()
{
    echo "$tags" |
    tac |
    sed -r 's/^(grub-)?([0-9]+).([0-9]+)([A-Za-z0-9\.-]*)$/\2 \2.\3 \1\2.\3\4/'
}


================================================
FILE: projects/iproute2.sh
================================================


================================================
FILE: projects/linux.sh
================================================
# Elixir definitions for Linux

# Enable DT bindings compatible strings support
dts_comp_support=1

get_tags()
{
    git tag |
    version_dir |
    sed -r 's/^(pre|lia64-|)(v?[0-9\.]*)(pre|-[^pf].*?|)(alpha|-[pf].*?|)([0-9]*)(.*?)$/\2#\3@\4@\5@\60@\1.0/' |
    sort -V |
    sed -r 's/^(.*?)#(.*?)@(.*?)@(.*?)@(.*?)0@(.*?)\.0$/\6\1\2\3\4\5/'
}

list_tags_h()
{
    echo "$tags" |
    tac |
    sed -r 's/^(pre|lia64-|)(v?)([0-9]*)\.([0-9]*)(.*)$/v\3 v\3.\4 \1\2\3.\4\5/'
}


================================================
FILE: projects/llvm.sh
================================================
# Elixir definitions for LLVM

list_tags()
{
    echo "$tags" |
    tac |
    grep ^llvmorg-[0-9]*[\.][0-9]*
}

list_tags_h()
{
    echo "$tags" |
    grep ^llvmorg |
    grep -v init |
    tac |
    sed -r 's/^llvmorg-([0-9]*)\.([0-9]*)(.*)$/v\1 v\1.\2 llvmorg-\1.\2\3/'
}

get_latest_tags()
{
    git tag | grep 'llvmorg' | grep -v init | sort -Vr
}


================================================
FILE: projects/mesa.sh
================================================
# Elixir definitions for Mesa

list_tags()
{
    echo "$tags" |
    tac |
    grep ^mesa-[0-9]*[\.][0-9]*
}

list_tags_h()
{
    echo "$tags" |
    grep ^mesa-[0-9]*[\.][0-9]* |
    tac |
    sed -r 's/^mesa-([0-9]*)(\.[0-9]*)(.*)$/v\1 v\1\2 mesa-\1\2\3/'
}

get_latest_tags()
{
    git tag | version_dir | grep ^mesa-[0-9]*[\.][0-9]* | grep -v '\-rc' | sort -Vr
}


================================================
FILE: projects/musl.sh
================================================
# Elixir definitions for Musl
# Using the default ones so far!


================================================
FILE: projects/ofono.sh
================================================
# Elixir definitions for Ofono

list_tags_h()
{
    echo "$tags" |
    tac |
    sed -r 's/^([0-9]*)\.([0-9]*)(.*)$/v\1 v\1.\2 \1.\2\3/'
}


================================================
FILE: projects/op-tee.sh
================================================
# Elixir definitions for OP-TEE Trusted OS

list_tags_h()
{
    echo "$tags" |
    grep '^[0-9]\.' |
    tac |
    sed -r 's/^([0-9]*)\.([0-9]*)(.*)$/v\1 \1.\2 \1.\2\3/'
}

list_tags()
{
    echo "$tags" |
    grep '^[0-9]\.'
}

get_latest_tags()
{
    git tag | grep '^[0-9]\.' | grep -v '\-rc' | sort -Vr
}


================================================
FILE: projects/opensbi.sh
================================================


================================================
FILE: projects/qemu.sh
================================================
# Elixir definitions for QEMU

list_tags_h()
{
    echo "$tags" |
    grep -E "^v[0-9].*" |
    tac |
    sed -r 's/^(v[0-9])\.([0-9]*)(.*)$/\1 \1.\2 \1.\2\3/'

    echo "$tags" |
    grep "release" |
    tac |
    sed -r 's/^(release)_([0-9_]*)$/old \1 \1_\2/'

    echo "old initial initial"
}


================================================
FILE: projects/toybox.sh
================================================
# Elixir definitions for Toybox

list_tags_h()
{
    echo "$tags" |
    tac |
    sed -r 's/^([0-9]*)\.([0-9]*)(.*)$/\1 \1.\2 \1.\2\3/'
}

================================================
FILE: projects/u-boot.sh
================================================
# Elixir definitions for U-Boot

# Enable DT bindings compatible strings support
dts_comp_support=1

list_tags_h()
{
    echo "$tags" |
    grep '^v20' |
    tac |
    sed -r 's/^(v20..)\.([0-9][0-9])(.*)$/\1 \1.\2 \1.\2\3/'

    echo "$tags" |
    grep -E '^(v1|U)' |
    tac |
    sed -r 's/^/old by-version /'

    echo "$tags" |
    grep -E '^(LABEL|DENX)' |
    tac |
    sed -r 's/^/old by-date /'
}


================================================
FILE: projects/uclibc-ng.sh
================================================
# Elixir definitions for uclibc-ng
# Using the default ones so far


================================================
FILE: projects/xen.sh
================================================
# Xen hypervisor

version_dir()
{
    grep "^RELEASE" |
    sed -e 's/^RELEASE-/v/';
}

version_rev()
{
    grep "^v" |
    sed -e 's/^v/RELEASE-/';
}


================================================
FILE: projects/zephyr.sh
================================================
# Elixir definitions for Zephyr

# Enable DT bindings compatible strings support
dts_comp_support=1

list_tags()
{
    echo "$tags" |
    grep -v '^zephyr-v'
}

list_tags_h()
{
    echo "$tags" |
    grep -v '^zephyr-v' |
    tac |
    sed -r 's/^(v[0-9]*)\.([0-9]*)(.*)$/\1 \1.\2 \1.\2\3/'
}

get_latest_tags()
{
    git tag | grep -v '^zephyr-v' | version_dir | grep -v '\-rc' | sort -Vr
}


================================================
FILE: requirements.txt
================================================
Jinja2~=3.1.5
Pygments~=2.18.0
Falcon~=4.0.2
pytest==7.2.1

# NOTE binary wheels of berkeleydb are not distributed - on Debian this may
# require installing build-essentials, python3-dev and libdb-dev
# NOTE keep in sync with wheel version in the Dockerfile
berkeleydb==18.1.10


================================================
FILE: samples/projects/linuxtest.sh
================================================
# Elixir definitions for Linux testing (only one tag)
# Copy this file to the "projects" directory

list_tags()
{
    echo "v5.6.1"
}

list_tags_h()
{
    echo "v5 v5.6 v5.6.1"
}

get_latest_tags()
{
    echo "v5.6.1"
}


================================================
FILE: script.sh
================================================
#!/bin/sh

#  This file is part of Elixir, a source code cross-referencer.
#
#  Copyright (C) 2017--2020  Mikaël Bouillot
#  <mikael.bouillot@bootlin.com> and contributors
#  Portions copyright (c) 2019 D3 Engineering, LLC
#
#  Elixir is free software: you can redistribute it and/or modify
#  it under the terms of the GNU Affero General Public License as published by
#  the Free Software Foundation, either version 3 of the License, or
#  (at your option) any later version.
#
#  Elixir is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU Affero General Public License for more details.
#
#  You should have received a copy of the GNU Affero General Public License
#  along with Elixir.  If not, see <http://www.gnu.org/licenses/>.

if [ ! -d "$LXR_REPO_DIR" ]; then
    echo "$0: Can't find repository"
    exit 1
fi

# Get our path so we can find peer find-file-doc-comments.pl later
cur_dir=`pwd`
script_path=`realpath "$0"`
cd `dirname "$script_path"`
script_dir=`pwd`
cd "$cur_dir"
dts_comp_support=0 # DT bindings compatible strings support (disable by default)

version_dir()
{
    cat;
}

version_rev()
{
    cat;
}

get_tags()
{
    git tag |
    version_dir |
    sed 's/$/.0/' |
    sort -V |
    sed 's/\.0$//'
}

list_tags()
{
    echo "$tags"
}

list_tags_h()
{
    echo "$tags" |
    tac |
    sed -r 's/^(v[0-9]*)\.([0-9]*)(.*)$/\1 \1.\2 \1.\2\3/'
}

get_latest_tags()
{
    git tag | version_dir | grep -v '\-rc' | sort -Vr
}

get_type()
{
    v=`echo $opt1 | version_rev`
    git cat-file -t "$v:`denormalize $opt2`" 2>/dev/null
}

get_blob()
{
    git cat-file blob $opt1
}

get_file()
{
    v=`echo $opt1 | version_rev`
    git cat-file blob "$v:`denormalize $opt2`" 2>/dev/null
}

get_dir()
{
        v=`echo $opt1 | version_rev`
        git ls-tree -l "$v:`denormalize $opt2`" 2>/dev/null |
        awk '{print $2" "$5" "$4" "$1}' |
        grep -v ' \.' |
        sort -t ' ' -k 1,1r -k 2,2
}

tokenize_file()
{
    if [ "$opt1" = -b ]; then
        ref=$opt2
    else
        v=`echo $opt1 | version_rev`
        ref="$v:`denormalize $opt2`"
    fi

    if [ $opt3 = "D" ]; then #Don't cut around '-' in devicetrees
        regex='s%((/\*.*?\*/|//.*?\001|[^'"'"']"(\\.|.)*?"|# *include *<.*?>|[^\w-])+)([\w-]+)?%\1\n\4\n%g'
    else
        regex='s%((/\*.*?\*/|//.*?\001|[^'"'"']"(\\.|.)*?"|# *include *<.*?>|\W)+)(\w+)?%\1\n\4\n%g'
    fi

    git cat-file blob $ref 2>/dev/null |
    tr '\n' '\1' |
    perl -pe "$regex" |
    head -n -1
}

list_blobs()
{
    v=`echo $opt2 | version_rev`

    if [ "$opt1" = '-p' ]; then
        # "path" option: return blob hash and full path
        format='\1 \2'
    elif [ "$opt1" = '-f' ]; then
        # "file" option: return blob hash and file name (without its path)
        format='\1 \4'
    else
        # default option: return only blob hash
        format='\1'
        v=`echo $opt1 | version_rev`
    fi

    git ls-tree -r "$v" |
    sed -r "s/^\S* blob (\S*)\t(([^/]*\/)*(.*))$/$format/; /^\S* commit .*$/d"
}

untokenize()
{
    tr -d '\n' |
    sed 's/>/\*\//g' |
    sed 's/</\/\*/g' |
    tr '\1\2\3' '\n<>'
}

parse_defs()
{
    case $opt3 in
    "C")
        parse_defs_C
        ;;
    "K")
        parse_defs_K
        ;;
    "D")
        parse_defs_D
        ;;
    esac
}

parse_defs_C()
{
    tmp=`mktemp -d`
    full_path=$tmp/$opt2
    git cat-file blob "$opt1" > "$full_path"

    # Use ctags to parse most of the defs
    ctags -x --kinds-c=+p+x --extras='-{anonymous}' "$full_path" |
    grep -avE -e "^operator " -e "^CONFIG_" |
    awk '{print $1" "$2" "$3}'

    # Parse function macros, e.g., in .S files
    perl -ne '/^\s*ENTRY\((\w+)\)/ and print "$1 function $.\n"' "$full_path"
    perl -ne '/^SYSCALL_DEFINE[0-9]\(\s*(\w+)\W/ and print "sys_$1 function $.\n"' "$full_path"

    rm "$full_path"
    rmdir $tmp
}

parse_defs_K()
{
    tmp=`mktemp -d`
    full_path=$tmp/$opt2
    git cat-file blob "$opt1" > "$full_path"
    ctags -x --language-force=kconfig --kinds-kconfig=c --extras-kconfig=-{configPrefixed} "$full_path" |
    awk '{print "CONFIG_"$1" "$2" "$3}'
    rm "$full_path"
    rmdir $tmp
}

parse_defs_D()
{
    tmp=`mktemp -d`
    full_path=$tmp/$opt2
    git cat-file blob "$opt1" > "$full_path"
    ctags -x --language-force=dts "$full_path" |
    awk '{print $1" "$2" "$3}'
    rm "$full_path"
    rmdir $tmp
}

parse_docs()
{
    tmpfile=`mktemp`

    git cat-file blob "$opt1" > "$tmpfile"
    "$script_dir/find-file-doc-comments.pl" "$tmpfile" || exit "$?"

    rm -rf "$tmpfile"
}

dts_comp()
{
    echo $dts_comp_support
}

project=$(basename `dirname $LXR_REPO_DIR`)

plugin=$script_dir/projects/$project.sh
if [ -f "$plugin" ] ; then
    . $plugin
fi

cd "$LXR_REPO_DIR"

test $# -gt 0 || set help

cmd=$1
opt1=$2
opt2=$3
opt3=$4
shift

denormalize()
{
    echo $1 | cut -c 2-
}

case $cmd in
    list-tags)
        tags=`get_tags`

        if [ "$opt1" = '-h' ]; then
            list_tags_h
        else
            list_tags
        fi
        ;;

    get-latest-tags)
        get_latest_tags
        ;;

    get-type)
        get_type
        ;;

    get-blob)
        get_blob
        ;;

    get-file)
        get_file
        ;;

    get-dir)
        get_dir
        ;;

    list-blobs)
        list_blobs
        ;;

    tokenize-file)
        tokenize_file
        ;;

    untokenize)
        untokenize
        ;;

    parse-defs)
        parse_defs
        ;;

    parse-docs)
        parse_docs
        ;;

    dts-comp)
        dts_comp
        ;;

    help)
        echo "Usage: $0 subcommand [args]..."
        exit 1
        ;;

    *)
        echo "$0: Unknown subcommand: $cmd"
        exit 1
esac


================================================
FILE: static/autocomplete.js
================================================
/*
 * @license MIT
 *
 * Autocomplete.js v2.7.1
 * Developed by Baptiste Donaux
 * http://autocomplete-js.com
 *
 * (c) 2017, Baptiste Donaux
 *
 * Built with Browserify and modified by
 * Maxime Chretien <maxime.chretien@bootlin.com>
 * for the needs of Elixir Cross Referencer
 * https://github.com/bootlin/elixir
 *
 */

var currentScript = document.currentScript;

(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
var AutoComplete = require('autocomplete-js');

AutoComplete({
    Url: "/acp",
    Limit: 10,
    MinChars: 4,
    Delay: 500,
    SelectCallback: _ => document.getElementById("search-form").requestSubmit(),
}, "#search-input");

},{"autocomplete-js":2}],2:[function(require,module,exports){
(function (global){
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.AutoComplete = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
"use strict";
var ConditionOperator;
(function (ConditionOperator) {
    ConditionOperator[ConditionOperator["AND"] = 0] = "AND";
    ConditionOperator[ConditionOperator["OR"] = 1] = "OR";
})(ConditionOperator || (ConditionOperator = {}));
var EventType;
(function (EventType) {
    EventType[EventType["KEYDOWN"] = 0] = "KEYDOWN";
    EventType[EventType["KEYUP"] = 1] = "KEYUP";
})(EventType || (EventType = {}));
/**
 * Core
 *
 * @class
 * @author Baptiste Donaux <baptiste.donaux@gmail.com> @baptistedonaux
 */
var AutoComplete = /** @class */ (function () {
    // Constructor
    function AutoComplete(params, selector) {
        if (params === void 0) { params = {}; }
        if (selector === void 0) { selector = "[data-autocomplete]"; }
        if (Array.isArray(selector)) {
            selector.forEach(function (s) {
                new AutoComplete(params, s);
            });
        }
        else if (typeof selector == "string") {
            var elements = document.querySelectorAll(selector);
            Array.prototype.forEach.call(elements, function (input) {
                new AutoComplete(params, input);
            });
        }
        else {
            var specificParams = AutoComplete.merge(AutoComplete.defaults, params, {
                DOMResults: document.createElement("div")
            });
            AutoComplete.prototype.create(specificParams, selector);
            return specificParams;
        }
    }
    AutoComplete.prototype.create = function (params, element) {
        params.Input = element;
        if (params.Input.nodeName.match(/^INPUT$/i) && (params.Input.hasAttribute("type") === false || params.Input.getAttribute("type").match(/^TEXT|SEARCH$/i))) {
            params.Input.setAttribute("autocomplete", "off");
            params._Position(params);
            params.Input.parentNode.appendChild(params.DOMResults);
            params.$Listeners = {
                blur: params._Blur.bind(params),
                destroy: AutoComplete.prototype.destroy.bind(null, params),
                focus: params._Focus.bind(params),
                keyup: AutoComplete.prototype.event.bind(null, params, EventType.KEYUP),
                keydown: AutoComplete.prototype.event.bind(null, params, EventType.KEYDOWN),
                position: params._Position.bind(params)
            };
            for (var event in params.$Listeners) {
                params.Input.addEventListener(event, params.$Listeners[event]);
            }
        }

        // Init cache for all families
        var e = document.getElementsByName("f")[0];
        for (var i = 0; i < e.options.length; i++) {
            var family = encodeURIComponent(e.options[i].value);
            params.$Cache[family] = {};
        }
    };
    AutoComplete.prototype.getEventsByType = function (params, type) {
        var mappings = {};
        for (var key in params.KeyboardMappings) {
            var event = EventType.KEYUP;
            if (params.KeyboardMappings[key].Event !== undefined) {
                event = params.KeyboardMappings[key].Event;
            }
            if (event == type) {
                mappings[key] = params.KeyboardMappings[key];
            }
        }
        return mappings;
    };
    AutoComplete.prototype.event = function (params, type, event) {
        var eventIdentifier = function (condition) {
            if ((match === true && mapping.Operator == ConditionOperator.AND) || (match === false && mapping.Operator == ConditionOperator.OR)) {
                condition = AutoComplete.merge({
                    Not: false
                }, condition);
                if (condition.hasOwnProperty("Is")) {
                    if (condition.Is == event.keyCode) {
                        match = !condition.Not;
                    }
                    else {
                        match = condition.Not;
                    }
                }
                else if (condition.hasOwnProperty("From") && condition.hasOwnProperty("To")) {
                    if (event.keyCode >= condition.From && event.keyCode <= condition.To) {
                        match = !condition.Not;
                    }
                    else {
                        match = condition.Not;
                    }
                }
            }
        };
        for (var name in AutoComplete.prototype.getEventsByType(params, type)) {
            var mapping = AutoComplete.merge({
                Operator: ConditionOperator.AND
            }, params.KeyboardMappings[name]), match = ConditionOperator.AND == mapping.Operator;
            mapping.Conditions.forEach(eventIdentifier);
            if (match === true) {
                mapping.Callback.call(params, event);
            }
        }
    };
    AutoComplete.prototype.makeRequest = function (params, callback, callbackErr) {
        var propertyHttpHeaders = Object.getOwnPropertyNames(params.HttpHeaders), request = new XMLHttpRequest(), method = params._HttpMethod(), url = params._Url(), queryParams = params._Pre(), queryParamsStringify = encodeURIComponent(params._QueryArg()) + "=" + encodeURIComponent(queryParams);
        if (method.match(/^GET$/i)) {
            if (url.indexOf("?") !== -1) {
                url += "&" + queryParamsStringify;
            }
            else {
                url += "?" + queryParamsStringify;
            }
        }

        // Send select family to display only relevant elements
        var e = document.getElementsByName("f")[0];
        var family = encodeURIComponent(e.options[e.selectedIndex].value);
        url += "&f=" + encodeURIComponent(family);

        // Send project name
        url += "&p=" + encodeURIComponent(currentScript.getAttribute('project'));

        request.open(method, url, true);
        for (var i = propertyHttpHeaders.length - 1; i >= 0; i--) {
            request.setRequestHeader(propertyHttpHeaders[i], params.HttpHeaders[propertyHttpHeaders[i]]);
        }
        request.onreadystatechange = function () {
            if (request.readyState == 4 && request.status == 200) {
                var e = document.getElementsByName("f")[0];
                var family = encodeURIComponent(e.options[e.selectedIndex].value);
                params.$Cache[family][queryParams] = request.response;
                callback(request.response);
            }
            else if (request.status >= 400) {
                callbackErr();
            }
        };
        return request;
    };
    AutoComplete.prototype.ajax = function (params, request, timeout) {
        if (timeout === void 0) { timeout = true; }
        if (params.$AjaxTimer) {
            window.clearTimeout(params.$AjaxTimer);
        }
        if (timeout === true) {
            params.$AjaxTimer = window.setTimeout(AutoComplete.prototype.ajax.bind(null, params, request, false), params.Delay);
        }
        else {
            if (params.Request) {
                params.Request.abort();
            }
            params.Request = request;
            params.Request.send(params._QueryArg() + "=" + params._Pre());
        }
    };
    AutoComplete.prototype.cache = function (params, callback, callbackErr) {
        var e = document.getElementsByName("f")[0];
        var family = encodeURIComponent(e.options[e.selectedIndex].value);

        var response = params._Cache(family, params._Pre());
        if (response === undefined) {
            var request = AutoComplete.prototype.makeRequest(params, callback, callbackErr);
            AutoComplete.prototype.ajax(params, request);
        }
        else {
            callback(response);
        }
    };
    AutoComplete.prototype.destroy = function (params) {
        for (var event in params.$Listeners) {
            params.Input.removeEventListener(event, params.$Listeners[event]);
        }
        params.DOMResults.parentNode.removeChild(params.DOMResults);
    };
    AutoComplete.merge = function () {
        var merge = {}, tmp;
        for (var i = 0; i < arguments.length; i++) {
            for (tmp in arguments[i]) {
                merge[tmp] = arguments[i][tmp];
            }
        }
        return merge;
    };
    AutoComplete.defaults = {
        Delay: 150,
        EmptyMessage: "No result here",
        Highlight: {
            getRegex: function (value) {
                return new RegExp(value, "ig");
            },
            transform: function (value) {
                return "<strong>" + value + "</strong>";
            }
        },
        HttpHeaders: {
            "Content-type": "application/x-www-form-urlencoded"
        },
        Limit: 0,
        MinChars: 0,
        HttpMethod: "GET",
        QueryArg: "q",
        Url: null,
        SelectCallback: null,
        KeyboardMappings: {
            "Enter": {
                Conditions: [{
                        Is: 13,
                        Not: false
                    }],
                Callback: function (event) {
                    if (this.DOMResults.getAttribute("class").indexOf("open") != -1) {
                        var liActive = this.DOMResults.querySelector("li.active");
                        if (liActive !== null) {
                            event.preventDefault();
                            this._Select(liActive);
                            this.DOMResults.setAttribute("class", "autocomplete");
                        }
                    }
                },
                Operator: ConditionOperator.AND,
                Event: EventType.KEYDOWN
            },
            "KeyUpAndDown_down": {
                Conditions: [{
                        Is: 38,
                        Not: false
                    },
                    {
                        Is: 40,
                        Not: false
                    }],
                Callback: function (event) {
                    event.preventDefault();
                },
                Operator: ConditionOperator.OR,
                Event: EventType.KEYDOWN
            },
            "KeyUpAndDown_up": {
                Conditions: [{
                        Is: 38,
                        Not: false
                    },
                    {
                        Is: 40,
                        Not: false
                    }],
                Callback: function (event) {
                    event.preventDefault();
                    var first = this.DOMResults.querySelector("li:first-child:not(.locked)"), last = this.DOMResults.querySelector("li:last-child:not(.locked)"), active = this.DOMResults.querySelector("li.active");
                    if (active) {
                        var currentIndex = Array.prototype.indexOf.call(active.parentNode.children, active), position = currentIndex + (event.keyCode - 39), lisCount = this.DOMResults.getElementsByTagName("li").length;
                        if (position < 0 || position >= lisCount) {
                            active.classList.remove("active");
                            active = null;
                        }
                        if (active) {
                            active.classList.remove("active");
                            active.parentElement.children.item(position).classList.add("active");
                        }
                    }
                    else if (last && event.keyCode == 38) {
                        last.classList.add("active");
                    }
                    else if (first) {
                        first.classList.add("active");
                    }
                },
                Operator: ConditionOperator.OR,
                Event: EventType.KEYUP
            },
            "AlphaNum": {
                Conditions: [{
                        Is: 13,
                        Not: true
                    }, {
                        From: 35,
                        To: 40,
                       
Download .txt
gitextract_uz81yfub/

├── .dockerignore
├── .editorconfig
├── .gitignore
├── .mailmap
├── .travis.yml
├── CHANGELOG.adoc
├── COPYING
├── README.adoc
├── docker/
│   ├── 000-default.conf
│   ├── Dockerfile
│   └── gitconfig
├── elixir/
│   ├── __init__.py
│   ├── api.py
│   ├── autocomplete.py
│   ├── data.py
│   ├── filters/
│   │   ├── __init__.py
│   │   ├── configin.py
│   │   ├── cppinc.py
│   │   ├── cpppathinc.py
│   │   ├── defconfig.py
│   │   ├── dtscompcode.py
│   │   ├── dtscompdocs.py
│   │   ├── dtscompdts.py
│   │   ├── dtsi.py
│   │   ├── ident.py
│   │   ├── kconfig.py
│   │   ├── kconfigidents.py
│   │   ├── makefiledir.py
│   │   ├── makefiledtb.py
│   │   ├── makefilefile.py
│   │   ├── makefileo.py
│   │   ├── makefilesrctree.py
│   │   ├── makefilesubdir.py
│   │   ├── projects.py
│   │   └── utils.py
│   ├── lib.py
│   ├── query.py
│   ├── web.py
│   └── web_utils.py
├── find-file-doc-comments.pl
├── find_compatible_dts.py
├── projects/
│   ├── amazon-freertos.sh
│   ├── arm-trusted-firmware.sh
│   ├── barebox.sh
│   ├── bluez.sh
│   ├── busybox.sh
│   ├── coreboot.sh
│   ├── dpdk.sh
│   ├── freebsd.sh
│   ├── glibc.sh
│   ├── grub.sh
│   ├── iproute2.sh
│   ├── linux.sh
│   ├── llvm.sh
│   ├── mesa.sh
│   ├── musl.sh
│   ├── ofono.sh
│   ├── op-tee.sh
│   ├── opensbi.sh
│   ├── qemu.sh
│   ├── toybox.sh
│   ├── u-boot.sh
│   ├── uclibc-ng.sh
│   ├── xen.sh
│   └── zephyr.sh
├── requirements.txt
├── samples/
│   └── projects/
│       └── linuxtest.sh
├── script.sh
├── static/
│   ├── autocomplete.js
│   ├── dynamic-references.js
│   ├── fonts/
│   │   └── ubuntu/
│   │       ├── LICENCE-FAQ.txt
│   │       ├── LICENCE.txt
│   │       └── copyright.txt
│   ├── messages.json
│   ├── robots.txt
│   ├── script.js
│   └── style.css
├── t/
│   ├── 050-testhelpers.t
│   ├── 100-basic.t
│   ├── 200-api.t
│   ├── 300-doc-comments.t
│   ├── 400-web.t
│   ├── TestClass.pm
│   ├── TestEnvironment.pm
│   ├── TestHelpers.pm
│   ├── api_test.py
│   ├── interact.pl
│   └── tree/
│       ├── arch/
│       │   ├── arm/
│       │   │   └── xen/
│       │   │       └── hypercall.S
│       │   └── x86/
│       │       └── include/
│       │           ├── asm/
│       │           │   ├── acpi.h
│       │           │   ├── ist.h
│       │           │   ├── orc_types.h
│       │           │   └── uprobes.h
│       │           └── uapi/
│       │               └── asm/
│       │                   └── ist.h
│       ├── drivers/
│       │   ├── firmware/
│       │   │   └── broadcom/
│       │   │       └── bcm74xx_sprom.c
│       │   └── i2c/
│       │       ├── i2c-boardinfo.c
│       │       ├── i2c-core-acpi.c
│       │       ├── i2c-core-base.c
│       │       ├── i2c-core-of.c
│       │       ├── i2c-core-slave.c
│       │       ├── i2c-core-smbus.c
│       │       ├── i2c-core.h
│       │       ├── i2c-dev.c
│       │       ├── i2c-smbus.c
│       │       └── i2c-stub.c
│       ├── include/
│       │   ├── acpi/
│       │   │   ├── acpi_bus.h
│       │   │   └── acpi_drivers.h
│       │   ├── asm-generic/
│       │   │   ├── barrier.h
│       │   │   ├── io.h
│       │   │   ├── pci_iomap.h
│       │   │   ├── qrwlock.h
│       │   │   ├── qspinlock.h
│       │   │   └── qspinlock_types.h
│       │   ├── linux/
│       │   │   ├── acpi.h
│       │   │   ├── apm_bios.h
│       │   │   ├── assoc_array.h
│       │   │   ├── cred.h
│       │   │   ├── i2c-smbus.h
│       │   │   ├── i2c.h
│       │   │   ├── key.h
│       │   │   ├── kmod.h
│       │   │   ├── log2.h
│       │   │   ├── logic_pio.h
│       │   │   ├── memblock.h
│       │   │   ├── of.h
│       │   │   ├── of_platform.h
│       │   │   ├── plist.h
│       │   │   ├── pm.h
│       │   │   ├── pm_wakeup.h
│       │   │   ├── radix-tree.h
│       │   │   ├── rbtree.h
│       │   │   ├── rcu_node_tree.h
│       │   │   ├── rcu_segcblist.h
│       │   │   ├── rcu_sync.h
│       │   │   ├── rcupdate.h
│       │   │   ├── rcutree.h
│       │   │   ├── srcu.h
│       │   │   ├── srcutree.h
│       │   │   ├── stackdepot.h
│       │   │   ├── uprobes.h
│       │   │   └── xarray.h
│       │   ├── trace/
│       │   │   └── events/
│       │   │       └── i2c.h
│       │   └── uapi/
│       │       └── linux/
│       │           ├── apm_bios.h
│       │           ├── eventpoll.h
│       │           ├── i2c.h
│       │           └── rseq.h
│       ├── issue102.c
│       ├── issue131.h
│       ├── issue134.c
│       ├── issue150.S
│       ├── issue186-counterexamples.c
│       ├── issue186.c
│       ├── issue188.c
│       ├── issue192.c
│       └── syscall_define.c
├── templates/
│   ├── error.html
│   ├── header.html
│   ├── ident.html
│   ├── layout.html
│   ├── sidebar.html
│   ├── source.html
│   ├── topbar.html
│   └── tree.html
├── update.py
├── utils/
│   ├── index
│   ├── query.py
│   └── speedtest.py
└── wsgi.py
Download .txt
SYMBOL INDEX (2359 symbols across 96 files)

FILE: elixir/api.py
  class ApiIdentGetterResource (line 31) | class ApiIdentGetterResource:
    method on_get (line 32) | def on_get(self, req, resp, project, ident):

FILE: elixir/autocomplete.py
  class AutocompleteResource (line 31) | class AutocompleteResource:
    method on_get (line 32) | def on_get(self, req, resp):

FILE: elixir/data.py
  class DefList (line 55) | class DefList:
    method __init__ (line 59) | def __init__(self, data=b'#'):
    method iter (line 62) | def iter(self, dummy=False):
    method append (line 75) | def append(self, id, type, line, family):
    method pack (line 84) | def pack(self):
    method add_family (line 87) | def add_family(self, family):
    method get_families (line 94) | def get_families(self):
    method get_macros (line 97) | def get_macros(self):
  class PathList (line 100) | class PathList:
    method __init__ (line 103) | def __init__(self, data=b''):
    method iter (line 106) | def iter(self, dummy=False):
    method append (line 115) | def append(self, id, path):
    method pack (line 119) | def pack(self):
  class RefList (line 122) | class RefList:
    method __init__ (line 125) | def __init__(self, data=b''):
    method iter (line 128) | def iter(self, dummy=False):
    method append (line 140) | def append(self, id, lines, family):
    method pack (line 144) | def pack(self):
  class BsdDB (line 147) | class BsdDB:
    method __init__ (line 148) | def __init__(self, filename, readonly, contentType, shared=False):
    method exists (line 161) | def exists(self, key):
    method get (line 165) | def get(self, key):
    method get_keys (line 170) | def get_keys(self):
    method put (line 173) | def put(self, key, val, sync=False):
    method close (line 182) | def close(self):
    method __len__ (line 185) | def __len__(self):
  class DB (line 188) | class DB:
    method __init__ (line 189) | def __init__(self, dir, readonly=True, dtscomp=False, shared=False):
    method close (line 222) | def close(self):

FILE: elixir/filters/__init__.py
  function get_filters (line 7) | def get_filters(ctx: FilterContext, project_name: str) -> List[Filter]:

FILE: elixir/filters/configin.py
  class ConfigInFilter (line 7) | class ConfigInFilter(Filter):
    method __init__ (line 8) | def __init__(self, *args, **kwargs):
    method check_if_applies (line 12) | def check_if_applies(self, ctx) -> bool:
    method transform_raw_code (line 16) | def transform_raw_code(self, ctx, code: str) -> str:
    method untransform_formatted_code (line 23) | def untransform_formatted_code(self, ctx: FilterContext, html: str) ->...

FILE: elixir/filters/cppinc.py
  class CppIncFilter (line 8) | class CppIncFilter(Filter):
    method __init__ (line 9) | def __init__(self, *args, **kwargs):
    method check_if_applies (line 13) | def check_if_applies(self, ctx) -> bool:
    method transform_raw_code (line 17) | def transform_raw_code(self, ctx, code: str) -> str:
    method untransform_formatted_code (line 24) | def untransform_formatted_code(self, ctx: FilterContext, html: str) ->...

FILE: elixir/filters/cpppathinc.py
  class CppPathIncFilter (line 14) | class CppPathIncFilter(Filter):
    method __init__ (line 15) | def __init__(self, prefix_path: List[str] = ["include"], *args, **kwar...
    method check_if_applies (line 20) | def check_if_applies(self, ctx) -> bool:
    method transform_raw_code (line 24) | def transform_raw_code(self, ctx, code: str) -> str:
    method untransform_formatted_code (line 39) | def untransform_formatted_code(self, ctx: FilterContext, html: str) ->...

FILE: elixir/filters/defconfig.py
  class DefConfigIdentsFilter (line 8) | class DefConfigIdentsFilter(Filter):
    method __init__ (line 9) | def __init__(self, *args, **kwargs):
    method check_if_applies (line 13) | def check_if_applies(self, ctx) -> bool:
    method transform_raw_code (line 17) | def transform_raw_code(self, ctx, code: str) -> str:
    method untransform_formatted_code (line 24) | def untransform_formatted_code(self, ctx: FilterContext, html: str) ->...

FILE: elixir/filters/dtscompcode.py
  class DtsCompCodeFilter (line 9) | class DtsCompCodeFilter(Filter):
    method __init__ (line 10) | def __init__(self, *args, **kwargs):
    method check_if_applies (line 14) | def check_if_applies(self, ctx) -> bool:
    method transform_raw_code (line 19) | def transform_raw_code(self, ctx, code: str) -> str:
    method untransform_formatted_code (line 33) | def untransform_formatted_code(self, ctx: FilterContext, html: str) ->...

FILE: elixir/filters/dtscompdocs.py
  class DtsCompDocsFilter (line 9) | class DtsCompDocsFilter(Filter):
    method __init__ (line 10) | def __init__(self, *args, **kwargs):
    method check_if_applies (line 14) | def check_if_applies(self, ctx) -> bool:
    method transform_raw_code (line 19) | def transform_raw_code(self, ctx, code: str) -> str:
    method untransform_formatted_code (line 31) | def untransform_formatted_code(self, ctx: FilterContext, html: str) ->...

FILE: elixir/filters/dtscompdts.py
  class DtsCompDtsFilter (line 7) | class DtsCompDtsFilter(Filter):
    method __init__ (line 8) | def __init__(self, *args, **kwargs):
    method check_if_applies (line 12) | def check_if_applies(self, ctx) -> bool:
    method transform_raw_code (line 17) | def transform_raw_code(self, ctx, code: str) -> str:
    method untransform_formatted_code (line 30) | def untransform_formatted_code(self, ctx: FilterContext, html: str) ->...

FILE: elixir/filters/dtsi.py
  class DtsiFilter (line 8) | class DtsiFilter(Filter):
    method __init__ (line 9) | def __init__(self, *args, **kwargs):
    method check_if_applies (line 13) | def check_if_applies(self, ctx) -> bool:
    method transform_raw_code (line 17) | def transform_raw_code(self, ctx, code: str) -> str:
    method untransform_formatted_code (line 24) | def untransform_formatted_code(self, ctx: FilterContext, html: str) ->...

FILE: elixir/filters/ident.py
  class IdentFilter (line 11) | class IdentFilter(Filter):
    method __init__ (line 12) | def __init__(self, *args, **kwargs):
    method transform_raw_code (line 16) | def transform_raw_code(self, ctx, code: str) -> str:
    method untransform_formatted_code (line 23) | def untransform_formatted_code(self, ctx: FilterContext, html: str) ->...

FILE: elixir/filters/kconfig.py
  class KconfigFilter (line 8) | class KconfigFilter(Filter):
    method __init__ (line 9) | def __init__(self, *args, **kwargs):
    method check_if_applies (line 13) | def check_if_applies(self, ctx) -> bool:
    method transform_raw_code (line 17) | def transform_raw_code(self, ctx, code: str) -> str:
    method untransform_formatted_code (line 24) | def untransform_formatted_code(self, ctx: FilterContext, html: str) ->...

FILE: elixir/filters/kconfigidents.py
  class KconfigIdentsFilter (line 9) | class KconfigIdentsFilter(Filter):
    method __init__ (line 10) | def __init__(self, *args, **kwargs):
    method transform_raw_code (line 14) | def transform_raw_code(self, ctx, code: str) -> str:
    method untransform_formatted_code (line 21) | def untransform_formatted_code(self, ctx: FilterContext, html: str) ->...

FILE: elixir/filters/makefiledir.py
  class MakefileDirFilter (line 8) | class MakefileDirFilter(Filter):
    method __init__ (line 9) | def __init__(self, *args, **kwargs):
    method check_if_applies (line 13) | def check_if_applies(self, ctx) -> bool:
    method transform_raw_code (line 17) | def transform_raw_code(self, ctx, code: str) -> str:
    method untransform_formatted_code (line 32) | def untransform_formatted_code(self, ctx: FilterContext, html: str) ->...

FILE: elixir/filters/makefiledtb.py
  class MakefileDtbFilter (line 8) | class MakefileDtbFilter(Filter):
    method __init__ (line 9) | def __init__(self, *args, **kwargs):
    method check_if_applies (line 13) | def check_if_applies(self, ctx) -> bool:
    method transform_raw_code (line 17) | def transform_raw_code(self, ctx, code: str) -> str:
    method untransform_formatted_code (line 24) | def untransform_formatted_code(self, ctx: FilterContext, html: str) ->...

FILE: elixir/filters/makefilefile.py
  class MakefileFileFilter (line 8) | class MakefileFileFilter(Filter):
    method __init__ (line 9) | def __init__(self, *args, **kwargs):
    method check_if_applies (line 13) | def check_if_applies(self, ctx) -> bool:
    method transform_raw_code (line 17) | def transform_raw_code(self, ctx, code: str) -> str:
    method untransform_formatted_code (line 32) | def untransform_formatted_code(self, ctx: FilterContext, html: str) ->...

FILE: elixir/filters/makefileo.py
  class MakefileOFilter (line 8) | class MakefileOFilter(Filter):
    method __init__ (line 9) | def __init__(self, *args, **kwargs):
    method check_if_applies (line 13) | def check_if_applies(self, ctx) -> bool:
    method transform_raw_code (line 17) | def transform_raw_code(self, ctx, code: str) -> str:
    method untransform_formatted_code (line 24) | def untransform_formatted_code(self, ctx: FilterContext, html: str) ->...

FILE: elixir/filters/makefilesrctree.py
  class MakefileSrcTreeFilter (line 7) | class MakefileSrcTreeFilter(Filter):
    method __init__ (line 8) | def __init__(self, *args, **kwargs):
    method check_if_applies (line 12) | def check_if_applies(self, ctx) -> bool:
    method transform_raw_code (line 16) | def transform_raw_code(self, ctx, code: str) -> str:
    method untransform_formatted_code (line 27) | def untransform_formatted_code(self, ctx: FilterContext, html: str) ->...

FILE: elixir/filters/makefilesubdir.py
  class MakefileSubdirFilter (line 8) | class MakefileSubdirFilter(Filter):
    method __init__ (line 9) | def __init__(self, *args, **kwargs):
    method check_if_applies (line 13) | def check_if_applies(self, ctx) -> bool:
    method transform_raw_code (line 17) | def transform_raw_code(self, ctx, code: str) -> str:
    method untransform_formatted_code (line 25) | def untransform_formatted_code(self, ctx: FilterContext, html: str) ->...

FILE: elixir/filters/utils.py
  class FilterContext (line 15) | class FilterContext:
  class Filter (line 31) | class Filter:
    method __init__ (line 32) | def __init__(self, path_exceptions: List[str] = []):
    method check_if_applies (line 36) | def check_if_applies(self, ctx: FilterContext) -> bool:
    method transform_raw_code (line 46) | def transform_raw_code(self, ctx: FilterContext, code: str) -> str:
    method untransform_formatted_code (line 51) | def untransform_formatted_code(self, ctx: FilterContext, html: str) ->...
  function filename_without_ext_matches (line 57) | def filename_without_ext_matches(filepath: str, allowed_filenames_withou...
  function extension_matches (line 64) | def extension_matches(filepath: str, allowed_extensions) -> bool:
  function encode_number (line 72) | def encode_number(number):
  function decode_number (line 84) | def decode_number(string):

FILE: elixir/lib.py
  function script (line 29) | def script(*args, env=None):
  function run_cmd (line 40) | def run_cmd(*args, env=None):
  function scriptLines (line 49) | def scriptLines(*args, env=None):
  function unescape (line 55) | def unescape(bstr):
  function decode (line 65) | def decode(byte_object):
  function isIdent (line 182) | def isIdent(bstr):
  function autoBytes (line 190) | def autoBytes(arg):
  function getDataDir (line 197) | def getDataDir():
  function getRepoDir (line 204) | def getRepoDir():
  function currentProject (line 211) | def currentProject():
  function validFamily (line 221) | def validFamily(family):
  function getFileFamily (line 224) | def getFileFamily(filename):
  function compatibleFamily (line 253) | def compatibleFamily(file_family, requested_family):
  function compatibleMacro (line 259) | def compatibleMacro(macro_family, requested_family):

FILE: elixir/query.py
  class SymbolInstance (line 30) | class SymbolInstance(object):
    method __init__ (line 31) | def __init__(self, path, line, type=None):
    method __repr__ (line 36) | def __repr__(self):
    method __str__ (line 43) | def __str__(self):
  function get_query (line 49) | def get_query(basedir, project):
  class Query (line 58) | class Query:
    method __init__ (line 59) | def __init__(self, data_dir, repo_dir):
    method script (line 66) | def script(self, *args):
    method scriptLines (line 69) | def scriptLines(self, *args):
    method getEnv (line 72) | def getEnv(self):
    method close (line 79) | def close(self):
    method dts_comp_exists (line 83) | def dts_comp_exists(self, ident):
    method file_exists (line 90) | def file_exists(self, version, path):
    method get_tokenized_file (line 108) | def get_tokenized_file(self, version, path):
    method get_dir_contents (line 137) | def get_dir_contents(self, version, path):
    method get_versions (line 143) | def get_versions(self):
    method get_file_type (line 175) | def get_file_type(self, version, path):
    method search_ident (line 179) | def search_ident(self, version, ident, family):
    method get_latest_tag (line 188) | def get_latest_tag(self, rc):
    method get_file_raw (line 201) | def get_file_raw(self, version, path):
    method get_idents_comps (line 204) | def get_idents_comps(self, version, ident):
    method get_idents_defs (line 261) | def get_idents_defs(self, version, ident, family):

FILE: elixir/web.py
  class ElixirProjectError (line 54) | class ElixirProjectError(falcon.errors.HTTPError):
    method __init__ (line 55) | def __init__(self, title, description, project=None, version=None, que...
  function generate_error_details (line 64) | def generate_error_details(req, resp, title, details):
  function get_github_issue_url (line 73) | def get_github_issue_url(details: str):
  function get_project_error_page (line 83) | def get_project_error_page(req, resp, exception: ElixirProjectError):
  function get_error_page (line 149) | def get_error_page(req, resp, exception: ElixirProjectError):
  function validate_project_and_version (line 174) | def validate_project_and_version(ctx, project, version):
  function get_source_base_url (line 192) | def get_source_base_url(project: str, version: str) -> str:
  function stringify_source_path (line 196) | def stringify_source_path(project: str, version: str, path: str) -> str:
  class IndexResource (line 203) | class IndexResource:
    method on_get (line 204) | def on_get(self, req, resp):
  class SourceResource (line 220) | class SourceResource:
    method on_get (line 221) | def on_get(self, req, resp, project: str, version: str, path: str):
  class SourceWithoutPathResource (line 255) | class SourceWithoutPathResource(SourceResource):
    method on_get (line 256) | def on_get(self, req, resp, project: str, version: str):
  function get_ident_base_url (line 262) | def get_ident_base_url(project: str, version: str, family: str|None = No...
  function stringify_ident_path (line 271) | def stringify_ident_path(project, version, family, ident) -> str:
  class IdentPostRedirectResource (line 277) | class IdentPostRedirectResource:
    method on_get (line 278) | def on_get(self, req, resp, project: str, version: str, family: str|No...
    method on_post (line 288) | def on_post(self, req, resp, project: str, version: str, family: str|N...
    method handle (line 294) | def handle(self, req, resp, project: str, version: str, ident: str, fa...
  class IdentResource (line 317) | class IdentResource(IdentPostRedirectResource):
    method on_get (line 318) | def on_get(self, req, resp, project: str, version: str, family: str, i...
  class IdentWithoutFamilyResource (line 352) | class IdentWithoutFamilyResource(IdentResource):
    method on_get (line 353) | def on_get(self, req, resp, project: str, version: str, ident: str):
  class IncompleteURLRedirectResource (line 357) | class IncompleteURLRedirectResource:
    method on_get (line 358) | def on_get(self, req, resp, project: str, version: str = "latest"):
  class UnknownPathResource (line 374) | class UnknownPathResource:
    method on_get (line 375) | def on_get(self, req, resp, project: str, version: str, family: str = ...
  function get_directories (line 395) | def get_directories(basedir: str) -> list[str]:
  function get_projects (line 408) | def get_projects(basedir: str) -> list[ProjectEntry]:
  function get_versions (line 424) | def get_versions(versions: OrderedDict[str, OrderedDict[str, str]],
  function get_versions_cached (line 444) | def get_versions_cached(q, ctx, project):
  function get_layout_template_context (line 461) | def get_layout_template_context(q: Query, ctx: RequestContext, get_url_w...
  function generate_raw_source (line 482) | def generate_raw_source(resp, query, project, version, path):
  function format_code (line 498) | def format_code(filename: str, code: str) -> str:
  function generate_source (line 528) | def generate_source(q: Query, project: str, version: str, path: str) -> ...
  function get_directory_entries (line 581) | def get_directory_entries(q: Query, base_url, tag: str, path: str) -> li...
  function generate_source_page (line 605) | def generate_source_page(ctx: RequestContext, q: Query,
  function symbol_instance_to_entry (line 680) | def symbol_instance_to_entry(base_url: str, symbol: SymbolInstance) -> S...
  function generate_ident_page (line 696) | def generate_ident_page(ctx: RequestContext, q: Query,
  function get_jinja_env (line 761) | def get_jinja_env():
  class RawPathComponent (line 770) | class RawPathComponent:
    method process_request (line 771) | def process_request(self, req, _):
  class RequestContextMiddleware (line 777) | class RequestContextMiddleware:
    method __init__ (line 778) | def __init__(self, jinja_env):
    method process_request (line 783) | def process_request(self, req, _resp):
  function error_serializer (line 794) | def error_serializer(req, resp, exception):
  function get_application (line 811) | def get_application():

FILE: elixir/web_utils.py
  function get_elixir_version_string (line 15) | def get_elixir_version_string():
  function get_elixir_repo_url (line 36) | def get_elixir_repo_url(version):
  class Config (line 43) | class Config(NamedTuple):
  class RequestContext (line 50) | class RequestContext(NamedTuple):
  function validate_project (line 57) | def validate_project(project: str) -> str|None:
  class ProjectConverter (line 62) | class ProjectConverter(falcon.routing.BaseConverter):
    method convert (line 63) | def convert(self, value: str) -> str:
  function validate_version (line 70) | def validate_version(version) -> str|None:
  function validate_ident (line 74) | def validate_ident(ident: str) -> str|None:
  class IdentConverter (line 79) | class IdentConverter(falcon.routing.BaseConverter):
    method convert (line 80) | def convert(self, value: str) -> str|None:

FILE: find_compatible_dts.py
  class FindCompatibleDTS (line 25) | class FindCompatibleDTS:
    method __init__ (line 26) | def __init__(self):
    method parse_c (line 33) | def parse_c(self, content):
    method parse_dts (line 36) | def parse_dts(self, content):
    method parse_bindings (line 42) | def parse_bindings(self, content):
    method run (line 48) | def run(self, file_lines, family):

FILE: static/autocomplete.js
  function r (line 19) | function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==...
  function r (line 32) | function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==...
  function AutoComplete (line 52) | function AutoComplete(params, selector) {

FILE: static/dynamic-references.js
  function identUrl (line 3) | function identUrl(project, ident, version, family) {
  function generateSymbolDefinitionsHTML (line 31) | function generateSymbolDefinitionsHTML(symbolDefinitions, project, versi...
  function generateSymbolReferencesHTML (line 80) | function generateSymbolReferencesHTML(symbolReferences, project, version) {
  function generateDocCommentsHTML (line 112) | function generateDocCommentsHTML(symbolDocComments, project, version) {
  function generateReferencesHTML (line 142) | function generateReferencesHTML(data, project, version) {
  function showPopup (line 153) | function showPopup(referencePopup, target) {
  function hidePopup (line 177) | function hidePopup(referencePopup) {
  function cancelLoadingPopup (line 211) | function cancelLoadingPopup() {

FILE: static/script.js
  function getTags (line 6) | function getTags() {
  function generateResults (line 18) | function generateResults(filter, tags) {
  function setupVersionsFilter (line 43) | function setupVersionsFilter() {
  function setupVersionsTree (line 62) | function setupVersionsTree() {
  function isWidescreen (line 71) | function isWidescreen() {
  function toggleMenu (line 76) | function toggleMenu() {
  function setupSidebarSwitch (line 88) | function setupSidebarSwitch() {
  function parseLineId (line 117) | function parseLineId(lineId) {
  function parseLineRangeAnchor (line 134) | function parseLineRangeAnchor(hashStr) {
  function highlightFromTo (line 158) | function highlightFromTo(firstLine, lastLine) {
  function clearRangeHighlight (line 169) | function clearRangeHighlight() {
  function addClassToRangeOfElements (line 176) | function addClassToRangeOfElements(first, last, class_name) {
  function setupLineRangeHandlers (line 187) | function setupLineRangeHandlers() {
  function setupAutoscrollingPrevention (line 280) | function setupAutoscrollingPrevention() {
  function setupAnchorOffsetHandler (line 294) | function setupAnchorOffsetHandler() {
  function setupGoToTop (line 312) | function setupGoToTop() {
  function randomChoice (line 322) | function randomChoice(arr) {
  function updateBannerContents (line 326) | function updateBannerContents(msg) {
  function updateMessageBanner (line 343) | function updateMessageBanner() {
  function cycleBanner (line 355) | function cycleBanner(delay=500) {
  function sleep (line 363) | function sleep(duration) {
  function cycleBannerWithData (line 367) | async function cycleBannerWithData(data, delay=500) {

FILE: t/api_test.py
  class APITest (line 31) | class APITest(testing.TestCase):
    method setUp (line 32) | def setUp(self):
    method test_identifier_not_found (line 37) | def test_identifier_not_found(self):
    method test_missing_version (line 43) | def test_missing_version(self):
    method test_existing_identifier (line 53) | def test_existing_identifier(self):

FILE: t/tree/arch/x86/include/asm/acpi.h
  type device (line 39) | struct device
  type device (line 41) | struct device
  function disable_acpi (line 45) | static inline void disable_acpi(void)
  function acpi_noirq_set (line 54) | static inline void acpi_noirq_set(void) { acpi_noirq = 1; }
  function acpi_disable_pci (line 55) | static inline void acpi_disable_pci(void)
  function acpi_processor_cstate_check (line 70) | static inline unsigned int acpi_processor_cstate_check(unsigned int max_...
  function arch_has_acpi_pdc (line 89) | static inline bool arch_has_acpi_pdc(void)
  function arch_acpi_set_pdc_bits (line 96) | static inline void arch_acpi_set_pdc_bits(u32 *buf)
  function acpi_has_cpu_in_madt (line 115) | static inline bool acpi_has_cpu_in_madt(void)
  function acpi_arch_set_root_pointer (line 121) | static inline void acpi_arch_set_root_pointer(u64 addr)
  function u64 (line 127) | static inline u64 acpi_arch_get_root_pointer(void)
  function acpi_noirq_set (line 142) | static inline void acpi_noirq_set(void) { }
  function acpi_disable_pci (line 143) | static inline void acpi_disable_pci(void) { }
  function disable_acpi (line 144) | static inline void disable_acpi(void) { }
  function acpi_generic_reduced_hw_init (line 146) | static inline void acpi_generic_reduced_hw_init(void) { }
  function x86_default_set_root_pointer (line 148) | static inline void x86_default_set_root_pointer(u64 addr) { }
  function u64 (line 150) | static inline u64 x86_default_get_root_pointer(void)
  function pgprot_t (line 166) | static inline pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr)

FILE: t/tree/arch/x86/include/asm/ist.h
  type ist_info (line 12) | struct ist_info

FILE: t/tree/arch/x86/include/asm/orc_types.h
  type orc_entry (line 73) | struct orc_entry {
  type unwind_hint (line 88) | struct unwind_hint {

FILE: t/tree/arch/x86/include/asm/uprobes.h
  type u8 (line 15) | typedef u8 uprobe_opcode_t;
  type uprobe_xol_ops (line 23) | struct uprobe_xol_ops
  type arch_uprobe (line 25) | struct arch_uprobe {
  type arch_uprobe_task (line 50) | struct arch_uprobe_task {

FILE: t/tree/arch/x86/include/uapi/asm/ist.h
  type ist_info (line 23) | struct ist_info {

FILE: t/tree/drivers/firmware/broadcom/bcm74xx_sprom.c
  function create_key (line 35) | static void create_key(const char *prefix, const char *postfix,
  function get_nvram_var (line 48) | static int get_nvram_var(const char *prefix, const char *postfix,
  function NVRAM_READ_VAL (line 88) | NVRAM_READ_VAL(u8)
  function nvram_read_leddc (line 115) | static void nvram_read_leddc(const char *prefix, const char *name,
  function nvram_read_macaddr (line 140) | static void nvram_read_macaddr(const char *prefix, const char *name,
  function nvram_read_alpha2 (line 155) | static void nvram_read_alpha2(const char *prefix, const char *name,
  function bcm47xx_sprom_fill_auto (line 187) | static void bcm47xx_sprom_fill_auto(struct ssb_sprom *sprom,
  function bcm47xx_fill_sprom_path_r4589 (line 408) | static void bcm47xx_fill_sprom_path_r4589(struct ssb_sprom *sprom,
  function bcm47xx_fill_sprom_path_r45 (line 459) | static void bcm47xx_fill_sprom_path_r45(struct ssb_sprom *sprom,
  function bcm47xx_is_valid_mac (line 482) | static bool bcm47xx_is_valid_mac(u8 *mac)
  function bcm47xx_increase_mac_addr (line 487) | static int bcm47xx_increase_mac_addr(u8 *mac, u8 num)
  function bcm47xx_fill_sprom_ethernet (line 509) | static void bcm47xx_fill_sprom_ethernet(struct ssb_sprom *sprom,
  function bcm47xx_fill_board_data (line 554) | static void bcm47xx_fill_board_data(struct ssb_sprom *sprom, const char ...
  function bcm47xx_fill_sprom (line 563) | void bcm47xx_fill_sprom(struct ssb_sprom *sprom, const char *prefix,
  function bcm47xx_get_sprom_ssb (line 593) | static int bcm47xx_get_sprom_ssb(struct ssb_bus *bus, struct ssb_sprom *...
  function bcm47xx_sprom_apply_prefix_alias (line 623) | static void bcm47xx_sprom_apply_prefix_alias(char *prefix, size_t prefix...
  function bcm47xx_get_sprom_bcma (line 648) | static int bcm47xx_get_sprom_bcma(struct bcma_bus *bus, struct ssb_sprom...
  function bcm47xx_sprom_register_fallbacks (line 705) | int bcm47xx_sprom_register_fallbacks(void)

FILE: t/tree/drivers/i2c/i2c-boardinfo.c
  function i2c_register_board_info (line 52) | int i2c_register_board_info(int busnum, struct i2c_board_info const *inf...

FILE: t/tree/drivers/i2c/i2c-core-acpi.c
  type i2c_acpi_handler_data (line 18) | struct i2c_acpi_handler_data {
  type gsb_buffer (line 23) | struct gsb_buffer {
  type i2c_acpi_lookup (line 33) | struct i2c_acpi_lookup {
  function i2c_acpi_get_i2c_resource (line 55) | bool i2c_acpi_get_i2c_resource(struct acpi_resource *ares,
  function i2c_acpi_fill_info (line 72) | static int i2c_acpi_fill_info(struct acpi_resource *ares, void *data)
  type acpi_device_id (line 99) | struct acpi_device_id
  function i2c_acpi_do_lookup (line 108) | static int i2c_acpi_do_lookup(struct acpi_device *adev,
  function i2c_acpi_add_resource (line 136) | static int i2c_acpi_add_resource(struct acpi_resource *ares, void *data)
  function i2c_acpi_get_irq (line 155) | int i2c_acpi_get_irq(struct i2c_client *client)
  function i2c_acpi_get_info (line 177) | static int i2c_acpi_get_info(struct acpi_device *adev,
  function i2c_acpi_register_device (line 221) | static void i2c_acpi_register_device(struct i2c_adapter *adapter,
  function acpi_status (line 236) | static acpi_status i2c_acpi_add_device(acpi_handle handle, u32 level,
  function i2c_acpi_register_devices (line 264) | void i2c_acpi_register_devices(struct i2c_adapter *adap)
  type acpi_device_id (line 279) | struct acpi_device_id
  type acpi_device_id (line 280) | struct acpi_device_id
  type i2c_client (line 281) | struct i2c_client
  type acpi_device_id (line 289) | struct acpi_device_id
  function acpi_status (line 302) | static acpi_status i2c_acpi_lookup_speed(acpi_handle handle, u32 level,
  function u32 (line 335) | u32 i2c_acpi_find_bus_speed(struct device *dev)
  function i2c_acpi_find_match_adapter (line 373) | static int i2c_acpi_find_match_adapter(struct device *dev, const void *d...
  type i2c_adapter (line 383) | struct i2c_adapter
  type device (line 385) | struct device
  type i2c_client (line 394) | struct i2c_client
  type acpi_device (line 394) | struct acpi_device
  type device (line 396) | struct device
  function i2c_acpi_notify (line 402) | static int i2c_acpi_notify(struct notifier_block *nb, unsigned long value,
  type notifier_block (line 438) | struct notifier_block
  type i2c_client (line 459) | struct i2c_client
  type device (line 459) | struct device
  type i2c_board_info (line 460) | struct i2c_board_info
  type i2c_acpi_lookup (line 462) | struct i2c_acpi_lookup
  type i2c_adapter (line 463) | struct i2c_adapter
  type i2c_client (line 464) | struct i2c_client
  type acpi_device (line 465) | struct acpi_device
  function acpi_gsb_i2c_read_bytes (line 501) | static int acpi_gsb_i2c_read_bytes(struct i2c_client *client,
  function acpi_gsb_i2c_write_bytes (line 544) | static int acpi_gsb_i2c_write_bytes(struct i2c_client *client,
  function acpi_status (line 577) | static acpi_status
  function i2c_acpi_install_space_handler (line 694) | int i2c_acpi_install_space_handler(struct i2c_adapter *adapter)
  function i2c_acpi_remove_space_handler (line 736) | void i2c_acpi_remove_space_handler(struct i2c_adapter *adapter)

FILE: t/tree/drivers/i2c/i2c-core-base.c
  type i2c_adapter (line 62) | struct i2c_adapter
  type i2c_driver (line 62) | struct i2c_driver
  function i2c_transfer_trace_reg (line 67) | int i2c_transfer_trace_reg(void)
  function i2c_transfer_trace_unreg (line 73) | void i2c_transfer_trace_unreg(void)
  type i2c_device_id (line 78) | struct i2c_device_id
  type i2c_device_id (line 78) | struct i2c_device_id
  type i2c_client (line 79) | struct i2c_client
  function i2c_device_match (line 93) | static int i2c_device_match(struct device *dev, struct device_driver *drv)
  function i2c_device_uevent (line 116) | static int i2c_device_uevent(struct device *dev, struct kobj_uevent_env ...
  function get_scl_gpio_value (line 133) | static int get_scl_gpio_value(struct i2c_adapter *adap)
  function set_scl_gpio_value (line 138) | static void set_scl_gpio_value(struct i2c_adapter *adap, int val)
  function get_sda_gpio_value (line 143) | static int get_sda_gpio_value(struct i2c_adapter *adap)
  function set_sda_gpio_value (line 148) | static void set_sda_gpio_value(struct i2c_adapter *adap, int val)
  function i2c_generic_bus_free (line 153) | static int i2c_generic_bus_free(struct i2c_adapter *adap)
  function i2c_generic_scl_recovery (line 177) | int i2c_generic_scl_recovery(struct i2c_adapter *adap)
  function i2c_recover_bus (line 237) | int i2c_recover_bus(struct i2c_adapter *adap)
  function i2c_init_recovery (line 247) | static void i2c_init_recovery(struct i2c_adapter *adap)
  function i2c_smbus_host_notify_to_irq (line 290) | static int i2c_smbus_host_notify_to_irq(const struct i2c_client *client)
  function i2c_device_probe (line 306) | static int i2c_device_probe(struct device *dev)
  function i2c_device_remove (line 407) | static int i2c_device_remove(struct device *dev)
  function i2c_device_shutdown (line 434) | static void i2c_device_shutdown(struct device *dev)
  function i2c_client_dev_release (line 446) | static void i2c_client_dev_release(struct device *dev)
  function show_name (line 451) | static ssize_t
  function show_modalias (line 459) | static ssize_t
  type attribute (line 477) | struct attribute
  type bus_type (line 485) | struct bus_type
  type device_type (line 494) | struct device_type
  type i2c_client (line 511) | struct i2c_client
  type device (line 511) | struct device
  function i2c_encode_flags_to_addr (line 521) | static unsigned short i2c_encode_flags_to_addr(struct i2c_client *client)
  function i2c_check_addr_validity (line 537) | static int i2c_check_addr_validity(unsigned int addr, unsigned short flags)
  function i2c_check_7bit_addr_validity_strict (line 555) | int i2c_check_7bit_addr_validity_strict(unsigned short addr)
  function __i2c_check_addr_busy (line 572) | static int __i2c_check_addr_busy(struct device *dev, void *addrp)
  function i2c_check_mux_parents (line 583) | static int i2c_check_mux_parents(struct i2c_adapter *adapter, int addr)
  function i2c_check_mux_children (line 598) | static int i2c_check_mux_children(struct device *dev, void *addrp)
  function i2c_check_addr_busy (line 611) | static int i2c_check_addr_busy(struct i2c_adapter *adapter, int addr)
  function i2c_adapter_lock_bus (line 632) | static void i2c_adapter_lock_bus(struct i2c_adapter *adapter,
  function i2c_adapter_trylock_bus (line 644) | static int i2c_adapter_trylock_bus(struct i2c_adapter *adapter,
  function i2c_adapter_unlock_bus (line 656) | static void i2c_adapter_unlock_bus(struct i2c_adapter *adapter,
  function i2c_dev_set_name (line 662) | static void i2c_dev_set_name(struct i2c_adapter *adap,
  function i2c_dev_irq_from_resources (line 682) | int i2c_dev_irq_from_resources(const struct resource *resources,
  type i2c_client (line 724) | struct i2c_client
  type i2c_adapter (line 725) | struct i2c_adapter
  type i2c_board_info (line 725) | struct i2c_board_info
  type i2c_client (line 727) | struct i2c_client
  type i2c_client (line 815) | struct i2c_client
  type i2c_adapter (line 816) | struct i2c_adapter
  type i2c_board_info (line 816) | struct i2c_board_info
  type i2c_client (line 818) | struct i2c_client
  function i2c_unregister_device (line 831) | void i2c_unregister_device(struct i2c_client *client)
  type i2c_device_id (line 848) | struct i2c_device_id
  function dummy_probe (line 853) | static int dummy_probe(struct i2c_client *client,
  function dummy_remove (line 859) | static int dummy_remove(struct i2c_client *client)
  type i2c_driver (line 864) | struct i2c_driver
  type i2c_client (line 889) | struct i2c_client
  type i2c_adapter (line 889) | struct i2c_adapter
  type i2c_board_info (line 891) | struct i2c_board_info
  type i2c_client (line 913) | struct i2c_client
  type i2c_adapter (line 913) | struct i2c_adapter
  type i2c_client (line 915) | struct i2c_client
  type i2c_dummy_devres (line 922) | struct i2c_dummy_devres {
  function devm_i2c_release_dummy (line 926) | static void devm_i2c_release_dummy(struct device *dev, void *res)
  type i2c_client (line 943) | struct i2c_client
  type device (line 943) | struct device
  type i2c_adapter (line 944) | struct i2c_adapter
  type i2c_dummy_devres (line 947) | struct i2c_dummy_devres
  type i2c_client (line 948) | struct i2c_client
  type i2c_client (line 988) | struct i2c_client
  type i2c_client (line 988) | struct i2c_client
  type device_node (line 992) | struct device_node
  function i2c_adapter_dev_release (line 1011) | static void i2c_adapter_dev_release(struct device *dev)
  function i2c_adapter_depth (line 1017) | unsigned int i2c_adapter_depth(struct i2c_adapter *adapter)
  function i2c_sysfs_new_device (line 1041) | static ssize_t
  function i2c_sysfs_delete_device (line 1109) | static ssize_t
  type attribute (line 1156) | struct attribute
  type device_type (line 1164) | struct device_type
  type i2c_adapter (line 1179) | struct i2c_adapter
  type device (line 1179) | struct device
  type class_compat (line 1188) | struct class_compat
  function i2c_scan_static_board_info (line 1191) | static void i2c_scan_static_board_info(struct i2c_adapter *adapter)
  function i2c_do_add_adapter (line 1207) | static int i2c_do_add_adapter(struct i2c_driver *driver,
  function __process_new_adapter (line 1216) | static int __process_new_adapter(struct device_driver *d, void *data)
  type i2c_lock_operations (line 1221) | struct i2c_lock_operations
  function i2c_host_notify_irq_teardown (line 1227) | static void i2c_host_notify_irq_teardown(struct i2c_adapter *adap)
  function i2c_host_notify_irq_map (line 1242) | static int i2c_host_notify_irq_map(struct irq_domain *h,
  type irq_domain_ops (line 1251) | struct irq_domain_ops
  function i2c_setup_host_notify_irq_domain (line 1255) | static int i2c_setup_host_notify_irq_domain(struct i2c_adapter *adap)
  function i2c_handle_smbus_host_notify (line 1283) | int i2c_handle_smbus_host_notify(struct i2c_adapter *adap, unsigned shor...
  function i2c_register_adapter (line 1300) | static int i2c_register_adapter(struct i2c_adapter *adap)
  function __i2c_add_numbered_adapter (line 1402) | static int __i2c_add_numbered_adapter(struct i2c_adapter *adap)
  function i2c_add_adapter (line 1429) | int i2c_add_adapter(struct i2c_adapter *adapter)
  function i2c_add_numbered_adapter (line 1478) | int i2c_add_numbered_adapter(struct i2c_adapter *adap)
  function i2c_do_del_adapter (line 1487) | static void i2c_do_del_adapter(struct i2c_driver *driver,
  function __unregister_client (line 1504) | static int __unregister_client(struct device *dev, void *dummy)
  function __unregister_dummy (line 1512) | static int __unregister_dummy(struct device *dev, void *dummy)
  function __process_removed_adapter (line 1519) | static int __process_removed_adapter(struct device_driver *d, void *data)
  function i2c_del_adapter (line 1533) | void i2c_del_adapter(struct i2c_adapter *adap)
  function i2c_parse_fw_timings (line 1624) | void i2c_parse_fw_timings(struct device *dev, struct i2c_timings *t, boo...
  function i2c_for_each_dev (line 1664) | int i2c_for_each_dev(void *data, int (*fn)(struct device *dev, void *data))
  function __process_new_driver (line 1676) | static int __process_new_driver(struct device *dev, void *data)
  function i2c_register_driver (line 1688) | int i2c_register_driver(struct module *owner, struct i2c_driver *driver)
  function __process_removed_driver (line 1717) | static int __process_removed_driver(struct device *dev, void *data)
  function i2c_del_driver (line 1729) | void i2c_del_driver(struct i2c_driver *driver)
  type i2c_client (line 1751) | struct i2c_client
  type i2c_client (line 1751) | struct i2c_client
  function i2c_release_client (line 1765) | void i2c_release_client(struct i2c_client *client)
  type i2c_cmd_arg (line 1772) | struct i2c_cmd_arg {
  function i2c_cmd (line 1777) | static int i2c_cmd(struct device *dev, void *_arg)
  function i2c_clients_command (line 1792) | void i2c_clients_command(struct i2c_adapter *adap, unsigned int cmd, voi...
  function i2c_init (line 1802) | static int __init i2c_init(void)
  function i2c_exit (line 1847) | static void __exit i2c_exit(void)
  function i2c_quirk_error (line 1875) | static int i2c_quirk_error(struct i2c_adapter *adap, struct i2c_msg *msg...
  function i2c_check_for_quirks (line 1883) | static int i2c_check_for_quirks(struct i2c_adapter *adap, struct i2c_msg...
  function __i2c_transfer (line 1949) | int __i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
  function i2c_transfer (line 2016) | int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
  function i2c_transfer_buffer_flags (line 2062) | int i2c_transfer_buffer_flags(const struct i2c_client *client, char *buf,
  function i2c_get_device_id (line 2090) | int i2c_get_device_id(const struct i2c_client *client,
  function i2c_default_probe (line 2132) | static int i2c_default_probe(struct i2c_adapter *adap, unsigned short addr)
  function i2c_detect_address (line 2160) | static int i2c_detect_address(struct i2c_client *temp_client,
  function i2c_detect (line 2222) | static int i2c_detect(struct i2c_adapter *adapter, struct i2c_driver *dr...
  function i2c_probe_func_quick_read (line 2266) | int i2c_probe_func_quick_read(struct i2c_adapter *adap, unsigned short a...
  type i2c_client (line 2273) | struct i2c_client
  type i2c_adapter (line 2274) | struct i2c_adapter
  type i2c_board_info (line 2275) | struct i2c_board_info
  type i2c_adapter (line 2277) | struct i2c_adapter
  type i2c_adapter (line 2315) | struct i2c_adapter
  type i2c_adapter (line 2317) | struct i2c_adapter
  function i2c_put_adapter (line 2335) | void i2c_put_adapter(struct i2c_adapter *adap)
  function u8 (line 2357) | u8 *i2c_get_dma_safe_msg_buf(struct i2c_msg *msg, unsigned int threshold)
  function i2c_put_dma_safe_msg_buf (line 2385) | void i2c_put_dma_safe_msg_buf(u8 *buf, struct i2c_msg *msg, bool xferred)

FILE: t/tree/drivers/i2c/i2c-core-of.c
  function of_i2c_get_board_info (line 22) | int of_i2c_get_board_info(struct device *dev, struct device_node *node,
  type i2c_client (line 64) | struct i2c_client
  type i2c_adapter (line 64) | struct i2c_adapter
  type device_node (line 65) | struct device_node
  type i2c_client (line 67) | struct i2c_client
  type i2c_board_info (line 68) | struct i2c_board_info
  function of_i2c_register_devices (line 85) | void of_i2c_register_devices(struct i2c_adapter *adap)
  function of_dev_or_parent_node_match (line 116) | static int of_dev_or_parent_node_match(struct device *dev, const void *d...
  type i2c_client (line 128) | struct i2c_client
  type device_node (line 128) | struct device_node
  type device (line 130) | struct device
  type i2c_client (line 131) | struct i2c_client
  type i2c_adapter (line 146) | struct i2c_adapter
  type device_node (line 146) | struct device_node
  type device (line 148) | struct device
  type i2c_adapter (line 149) | struct i2c_adapter
  type i2c_adapter (line 165) | struct i2c_adapter
  type device_node (line 165) | struct device_node
  type i2c_adapter (line 167) | struct i2c_adapter
  type of_device_id (line 182) | struct of_device_id
  type of_device_id (line 183) | struct of_device_id
  type i2c_client (line 184) | struct i2c_client
  type of_device_id (line 211) | struct of_device_id
  type of_device_id (line 212) | struct of_device_id
  type i2c_client (line 213) | struct i2c_client
  type of_device_id (line 215) | struct of_device_id
  function of_i2c_notify (line 229) | static int of_i2c_notify(struct notifier_block *nb, unsigned long action,
  type notifier_block (line 278) | struct notifier_block

FILE: t/tree/drivers/i2c/i2c-core-slave.c
  function i2c_slave_register (line 17) | int i2c_slave_register(struct i2c_client *client, i2c_slave_cb_t slave_cb)
  function i2c_slave_unregister (line 59) | int i2c_slave_unregister(struct i2c_client *client)
  function i2c_detect_slave_mode (line 93) | bool i2c_detect_slave_mode(struct device *dev)

FILE: t/tree/drivers/i2c/i2c-core-smbus.c
  function u8 (line 28) | static u8 crc8(u16 data)
  function u8 (line 41) | static u8 i2c_smbus_pec(u8 crc, u8 *p, size_t count)
  function u8 (line 51) | static u8 i2c_smbus_msg_pec(u8 pec, struct i2c_msg *msg)
  function i2c_smbus_add_pec (line 62) | static inline void i2c_smbus_add_pec(struct i2c_msg *msg)
  function i2c_smbus_check_pec (line 73) | static int i2c_smbus_check_pec(u8 cpec, struct i2c_msg *msg)
  function s32 (line 93) | s32 i2c_smbus_read_byte(const struct i2c_client *client)
  function s32 (line 113) | s32 i2c_smbus_write_byte(const struct i2c_client *client, u8 value)
  function s32 (line 128) | s32 i2c_smbus_read_byte_data(const struct i2c_client *client, u8 command)
  function s32 (line 149) | s32 i2c_smbus_write_byte_data(const struct i2c_client *client, u8 command,
  function s32 (line 168) | s32 i2c_smbus_read_word_data(const struct i2c_client *client, u8 command)
  function s32 (line 189) | s32 i2c_smbus_write_word_data(const struct i2c_client *client, u8 command,
  function s32 (line 215) | s32 i2c_smbus_read_block_data(const struct i2c_client *client, u8 command,
  function s32 (line 242) | s32 i2c_smbus_write_block_data(const struct i2c_client *client, u8 command,
  function s32 (line 258) | s32 i2c_smbus_read_i2c_block_data(const struct i2c_client *client, u8 co...
  function s32 (line 278) | s32 i2c_smbus_write_i2c_block_data(const struct i2c_client *client, u8 c...
  function i2c_smbus_try_get_dmabuf (line 293) | static void i2c_smbus_try_get_dmabuf(struct i2c_msg *msg, u8 init_val)
  function s32 (line 313) | static s32 i2c_smbus_xfer_emulated(struct i2c_adapter *adapter, u16 addr,
  function s32 (line 525) | s32 i2c_smbus_xfer(struct i2c_adapter *adapter, u16 addr,
  function s32 (line 543) | s32 __i2c_smbus_xfer(struct i2c_adapter *adapter, u16 addr,
  function s32 (line 630) | s32 i2c_smbus_read_i2c_block_data_or_emulated(const struct i2c_client *c...
  type i2c_client (line 688) | struct i2c_client
  type i2c_adapter (line 688) | struct i2c_adapter
  type i2c_smbus_alert_setup (line 689) | struct i2c_smbus_alert_setup
  type i2c_board_info (line 691) | struct i2c_board_info
  function of_i2c_setup_smbus_alert (line 701) | int of_i2c_setup_smbus_alert(struct i2c_adapter *adapter)

FILE: t/tree/drivers/i2c/i2c-core.h
  type i2c_devinfo (line 8) | struct i2c_devinfo {
  type rw_semaphore (line 17) | struct rw_semaphore
  type list_head (line 18) | struct list_head
  type resource (line 22) | struct resource
  function i2c_in_atomic_xfer_mode (line 30) | static inline bool i2c_in_atomic_xfer_mode(void)
  function __i2c_lock_bus_helper (line 35) | static inline int __i2c_lock_bus_helper(struct i2c_adapter *adap)
  function __i2c_check_suspended (line 50) | static inline int __i2c_check_suspended(struct i2c_adapter *adap)
  type acpi_device_id (line 62) | struct acpi_device_id
  type acpi_device_id (line 63) | struct acpi_device_id
  type i2c_client (line 64) | struct i2c_client
  type i2c_adapter (line 65) | struct i2c_adapter
  type i2c_client (line 67) | struct i2c_client
  function i2c_acpi_register_devices (line 69) | static inline void i2c_acpi_register_devices(struct i2c_adapter *adap) { }
  type acpi_device_id (line 70) | struct acpi_device_id
  type acpi_device_id (line 71) | struct acpi_device_id
  type i2c_client (line 72) | struct i2c_client
  function i2c_acpi_get_irq (line 77) | static inline int i2c_acpi_get_irq(struct i2c_client *client)
  type notifier_block (line 82) | struct notifier_block
  type i2c_adapter (line 85) | struct i2c_adapter
  type i2c_adapter (line 86) | struct i2c_adapter
  function i2c_acpi_install_space_handler (line 88) | static inline int i2c_acpi_install_space_handler(struct i2c_adapter *ada...
  function i2c_acpi_remove_space_handler (line 89) | static inline void i2c_acpi_remove_space_handler(struct i2c_adapter *ada...
  type i2c_adapter (line 93) | struct i2c_adapter
  function of_i2c_register_devices (line 95) | static inline void of_i2c_register_devices(struct i2c_adapter *adap) { }
  type notifier_block (line 97) | struct notifier_block

FILE: t/tree/drivers/i2c/i2c-dev.c
  type i2c_dev (line 40) | struct i2c_dev {
  type i2c_dev (line 51) | struct i2c_dev
  type i2c_dev (line 53) | struct i2c_dev
  type i2c_dev (line 66) | struct i2c_dev
  type i2c_adapter (line 66) | struct i2c_adapter
  type i2c_dev (line 68) | struct i2c_dev
  function put_i2c_dev (line 87) | static void put_i2c_dev(struct i2c_dev *i2c_dev)
  function name_show (line 95) | static ssize_t name_show(struct device *dev,
  type attribute (line 106) | struct attribute
  function i2cdev_read (line 131) | static ssize_t i2cdev_read(struct file *file, char __user *buf, size_t c...
  function i2cdev_write (line 156) | static ssize_t i2cdev_write(struct file *file, const char __user *buf,
  function i2cdev_check (line 178) | static int i2cdev_check(struct device *dev, void *addrp)
  function i2cdev_check_mux_parents (line 189) | static int i2cdev_check_mux_parents(struct i2c_adapter *adapter, int addr)
  function i2cdev_check_mux_children (line 202) | static int i2cdev_check_mux_children(struct device *dev, void *addrp)
  function i2cdev_check_addr (line 218) | static int i2cdev_check_addr(struct i2c_adapter *adapter, unsigned int a...
  function noinline (line 233) | static noinline int i2cdev_ioctl_rdwr(struct i2c_client *client,
  function noinline (line 309) | static noinline int i2cdev_ioctl_smbus(struct i2c_client *client,
  function i2cdev_ioctl (line 390) | static long i2cdev_ioctl(struct file *file, unsigned int cmd, unsigned l...
  type i2c_smbus_ioctl_data32 (line 493) | struct i2c_smbus_ioctl_data32 {
  type i2c_msg32 (line 500) | struct i2c_msg32 {
  type i2c_rdwr_ioctl_data32 (line 507) | struct i2c_rdwr_ioctl_data32 {
  function compat_i2cdev_ioctl (line 512) | static long compat_i2cdev_ioctl(struct file *file, unsigned int cmd, uns...
  function i2cdev_open (line 575) | static int i2cdev_open(struct inode *inode, struct file *file)
  function i2cdev_release (line 605) | static int i2cdev_release(struct inode *inode, struct file *file)
  type file_operations (line 616) | struct file_operations
  type class (line 629) | struct class
  function i2cdev_attach_adapter (line 631) | static int i2cdev_attach_adapter(struct device *dev, void *dummy)
  function i2cdev_detach_adapter (line 670) | static int i2cdev_detach_adapter(struct device *dev, void *dummy)
  function i2cdev_notifier_call (line 691) | static int i2cdev_notifier_call(struct notifier_block *nb, unsigned long...
  type notifier_block (line 706) | struct notifier_block
  function i2c_dev_init (line 716) | static int __init i2c_dev_init(void)
  function i2c_dev_exit (line 752) | static void __exit i2c_dev_exit(void)

FILE: t/tree/drivers/i2c/i2c-smbus.c
  type i2c_smbus_alert (line 19) | struct i2c_smbus_alert {
  type alert_data (line 24) | struct alert_data {
  function smbus_do_alert (line 31) | static int smbus_do_alert(struct device *dev, void *addrp)
  function irqreturn_t (line 65) | static irqreturn_t smbus_alert(int irq, void *d)
  function smbalert_work (line 110) | static void smbalert_work(struct work_struct *work)
  function smbalert_probe (line 121) | static int smbalert_probe(struct i2c_client *ara,
  function smbalert_remove (line 161) | static int smbalert_remove(struct i2c_client *ara)
  type i2c_device_id (line 169) | struct i2c_device_id
  type i2c_driver (line 175) | struct i2c_driver
  function i2c_handle_smbus_alert (line 196) | int i2c_handle_smbus_alert(struct i2c_client *ara)

FILE: t/tree/drivers/i2c/i2c-stub.c
  type smbus_block_data (line 63) | struct smbus_block_data {
  type stub_chip (line 70) | struct stub_chip {
  type stub_chip (line 87) | struct stub_chip
  type smbus_block_data (line 90) | struct smbus_block_data
  type device (line 90) | struct device
  type stub_chip (line 91) | struct stub_chip
  type smbus_block_data (line 94) | struct smbus_block_data
  function u16 (line 112) | static u16 *stub_get_wordp(struct stub_chip *chip, u8 offset)
  function s32 (line 124) | static s32 stub_xfer(struct i2c_adapter *adap, u16 addr, unsigned short ...
  function u32 (line 300) | static u32 stub_func(struct i2c_adapter *adapter)
  type i2c_algorithm (line 305) | struct i2c_algorithm
  type i2c_adapter (line 310) | struct i2c_adapter
  function i2c_stub_allocate_banks (line 317) | static int __init i2c_stub_allocate_banks(int i)
  function i2c_stub_free (line 346) | static void i2c_stub_free(void)
  function i2c_stub_init (line 355) | static int __init i2c_stub_init(void)
  function i2c_stub_exit (line 403) | static void __exit i2c_stub_exit(void)

FILE: t/tree/include/acpi/acpi_bus.h
  type acpi_handle_list (line 17) | struct acpi_handle_list {
  type acpi_buffer (line 25) | struct acpi_buffer
  type acpi_buffer (line 25) | struct acpi_buffer
  type acpi_object_list (line 29) | struct acpi_object_list
  type acpi_object_list (line 33) | struct acpi_object_list
  type acpi_handle_list (line 34) | struct acpi_handle_list
  type acpi_buffer (line 37) | struct acpi_buffer
  type acpi_pld_info (line 40) | struct acpi_pld_info
  type acpi_device (line 81) | struct acpi_device
  type proc_dir_entry (line 89) | struct proc_dir_entry
  type acpi_bus_device_type (line 91) | enum acpi_bus_device_type {
  type acpi_driver (line 102) | struct acpi_driver
  type acpi_device (line 103) | struct acpi_device
  type acpi_hotplug_profile (line 110) | struct acpi_hotplug_profile {
  type acpi_hotplug_profile (line 118) | struct acpi_hotplug_profile
  type kobject (line 119) | struct kobject
  type acpi_scan_handler (line 124) | struct acpi_scan_handler {
  type acpi_hotplug_context (line 140) | struct acpi_hotplug_context {
  type acpi_device (line 152) | struct acpi_device
  type acpi_device (line 153) | struct acpi_device
  type acpi_device (line 154) | struct acpi_device
  type acpi_device_ops (line 156) | struct acpi_device_ops {
  type acpi_driver (line 164) | struct acpi_driver {
  type acpi_device_status (line 181) | struct acpi_device_status {
  type acpi_device_flags (line 192) | struct acpi_device_flags {
  type acpi_device_dir (line 211) | struct acpi_device_dir {
  type u64 (line 220) | typedef u64 acpi_bus_address;
  type acpi_hardware_id (line 224) | struct acpi_hardware_id {
  type acpi_pnp_type (line 229) | struct acpi_pnp_type {
  type acpi_device_pnp (line 236) | struct acpi_device_pnp {
  type acpi_device (line 249) | struct acpi_device
  type acpi_device_power_flags (line 256) | struct acpi_device_power_flags {
  type acpi_device_power_state (line 266) | struct acpi_device_power_state {
  type acpi_device_power (line 277) | struct acpi_device_power {
  type acpi_device_perf_flags (line 285) | struct acpi_device_perf_flags {
  type acpi_device_perf_state (line 289) | struct acpi_device_perf_state {
  type acpi_device_perf (line 299) | struct acpi_device_perf {
  type acpi_device_wakeup_flags (line 307) | struct acpi_device_wakeup_flags {
  type acpi_device_wakeup_context (line 312) | struct acpi_device_wakeup_context {
  type acpi_device_wakeup (line 317) | struct acpi_device_wakeup {
  type acpi_device_physical_node (line 329) | struct acpi_device_physical_node {
  type acpi_device_properties (line 336) | struct acpi_device_properties {
  type acpi_device_data (line 343) | struct acpi_device_data {
  type acpi_gpio_mapping (line 350) | struct acpi_gpio_mapping
  type acpi_device (line 353) | struct acpi_device {
  type acpi_data_node (line 384) | struct acpi_data_node {
  type fwnode_operations (line 395) | struct fwnode_operations
  type fwnode_operations (line 396) | struct fwnode_operations
  type fwnode_operations (line 397) | struct fwnode_operations
  type fwnode_handle (line 399) | struct fwnode_handle
  type fwnode_handle (line 400) | struct fwnode_handle
  function is_acpi_node (line 402) | static inline bool is_acpi_node(const struct fwnode_handle *fwnode)
  function is_acpi_static_node (line 427) | static inline bool is_acpi_static_node(const struct fwnode_handle *fwnode)
  function acpi_data_node_match (line 433) | static inline bool acpi_data_node_match(const struct fwnode_handle *fwnode,
  type fwnode_handle (line 440) | struct fwnode_handle
  type acpi_device (line 440) | struct acpi_device
  type acpi_device (line 445) | struct acpi_device
  function acpi_set_device_status (line 453) | static inline void acpi_set_device_status(struct acpi_device *adev, u32 ...
  function acpi_set_hp_context (line 458) | static inline void acpi_set_hp_context(struct acpi_device *adev,
  type acpi_device (line 465) | struct acpi_device
  type acpi_hotplug_context (line 466) | struct acpi_hotplug_context
  type acpi_device (line 467) | struct acpi_device
  type acpi_device (line 468) | struct acpi_device
  type bus_type (line 471) | struct bus_type
  type acpi_bus_event (line 478) | struct acpi_bus_event {
  type kobject (line 486) | struct kobject
  type acpi_device (line 492) | struct acpi_device
  type notifier_block (line 493) | struct notifier_block
  type notifier_block (line 494) | struct notifier_block
  type acpi_device (line 500) | struct acpi_device
  type acpi_device (line 501) | struct acpi_device
  type acpi_device (line 502) | struct acpi_device
  type acpi_device (line 505) | struct acpi_device
  type acpi_device (line 509) | struct acpi_device
  type acpi_device (line 510) | struct acpi_device
  type acpi_device (line 511) | struct acpi_device
  type acpi_device (line 513) | struct acpi_device
  type acpi_device (line 515) | struct acpi_device
  type device (line 516) | struct device
  type acpi_device (line 517) | struct acpi_device
  type device (line 518) | struct device
  function acpi_bus_can_wakeup (line 523) | static inline bool acpi_bus_can_wakeup(acpi_handle handle) { return fals...
  type acpi_scan_handler (line 530) | struct acpi_scan_handler
  type acpi_driver (line 531) | struct acpi_driver
  type acpi_driver (line 532) | struct acpi_driver
  type acpi_device (line 534) | struct acpi_device
  type acpi_device (line 536) | struct acpi_device
  type acpi_device_id (line 537) | struct acpi_device_id
  type acpi_device (line 538) | struct acpi_device
  type acpi_device (line 540) | struct acpi_device
  type acpi_device (line 541) | struct acpi_device
  function acpi_device_enumerated (line 543) | static inline bool acpi_device_enumerated(struct acpi_device *adev)
  type acpi_bus_type (line 563) | struct acpi_bus_type {
  type acpi_bus_type (line 571) | struct acpi_bus_type
  type acpi_bus_type (line 572) | struct acpi_bus_type
  type device (line 573) | struct device
  type acpi_device (line 573) | struct acpi_device
  type device (line 574) | struct device
  type acpi_pci_root (line 576) | struct acpi_pci_root {
  type acpi_device (line 589) | struct acpi_device
  type dev_dma_attr (line 590) | enum dev_dma_attr
  type acpi_device (line 590) | struct acpi_device
  type device (line 591) | struct device
  type device (line 593) | struct device
  type dev_dma_attr (line 593) | enum dev_dma_attr
  type acpi_device (line 595) | struct acpi_device
  type acpi_device (line 595) | struct acpi_device
  type acpi_pci_root (line 598) | struct acpi_pci_root
  type acpi_device (line 600) | struct acpi_device
  type acpi_device (line 601) | struct acpi_device
  type acpi_device (line 604) | struct acpi_device
  function acpi_device_always_present (line 606) | static inline bool acpi_device_always_present(struct acpi_device *adev)
  type device (line 613) | struct device
  type acpi_device (line 614) | struct acpi_device
  type device (line 614) | struct device
  type acpi_device_wakeup_context (line 615) | struct acpi_device_wakeup_context
  type acpi_device (line 616) | struct acpi_device
  type device (line 617) | struct device
  type device (line 618) | struct device
  type device (line 619) | struct device
  type device (line 620) | struct device
  function acpi_pm_wakeup_event (line 622) | static inline void acpi_pm_wakeup_event(struct device *dev)
  function acpi_status (line 625) | static inline acpi_status acpi_add_pm_notifier(struct acpi_device *adev,
  function acpi_status (line 631) | static inline acpi_status acpi_remove_pm_notifier(struct acpi_device *adev)
  function acpi_pm_device_can_wakeup (line 635) | static inline bool acpi_pm_device_can_wakeup(struct device *dev)
  function acpi_pm_device_sleep_state (line 639) | static inline int acpi_pm_device_sleep_state(struct device *d, int *p, i...
  function acpi_pm_set_device_wakeup (line 647) | static inline int acpi_pm_set_device_wakeup(struct device *dev, bool ena...
  function acpi_pm_set_bridge_wakeup (line 651) | static inline int acpi_pm_set_bridge_wakeup(struct device *dev, bool ena...
  function acpi_sleep_state_supported (line 660) | static inline bool acpi_sleep_state_supported(u8 sleep_state) { return f...
  function u32 (line 666) | static inline u32 acpi_target_system_state(void) { return ACPI_STATE_S0; }
  function acpi_device_power_manageable (line 669) | static inline bool acpi_device_power_manageable(struct acpi_device *adev)
  function acpi_device_can_wakeup (line 674) | static inline bool acpi_device_can_wakeup(struct acpi_device *adev)
  function acpi_device_can_poweroff (line 679) | static inline bool acpi_device_can_poweroff(struct acpi_device *adev)
  function acpi_dev_put (line 686) | static inline void acpi_dev_put(struct acpi_device *adev)
  function register_acpi_bus_type (line 692) | static inline int register_acpi_bus_type(void *bus) { return 0; }
  function unregister_acpi_bus_type (line 693) | static inline int unregister_acpi_bus_type(void *bus) { return 0; }

FILE: t/tree/include/acpi/acpi_drivers.h
  type pci_bus (line 76) | struct pci_bus
  type pci_dev (line 79) | struct pci_dev
  type pci_dev (line 81) | struct pci_dev
  type pci_bus (line 89) | struct pci_bus
  type acpi_pci_root (line 89) | struct acpi_pci_root
  function pci_acpi_crs_quirks (line 94) | static inline void pci_acpi_crs_quirks(void) { }
  type acpi_device (line 110) | struct acpi_device
  function is_dock_device (line 112) | static inline int is_dock_device(struct acpi_device *adev)

FILE: t/tree/include/asm-generic/io.h
  function u8 (line 75) | static inline u8 __raw_readb(const volatile void __iomem *addr)
  function u16 (line 83) | static inline u16 __raw_readw(const volatile void __iomem *addr)
  function u32 (line 91) | static inline u32 __raw_readl(const volatile void __iomem *addr)
  function u64 (line 100) | static inline u64 __raw_readq(const volatile void __iomem *addr)
  function __raw_writeb (line 109) | static inline void __raw_writeb(u8 value, volatile void __iomem *addr)
  function __raw_writew (line 117) | static inline void __raw_writew(u16 value, volatile void __iomem *addr)
  function __raw_writel (line 125) | static inline void __raw_writel(u32 value, volatile void __iomem *addr)
  function __raw_writeq (line 134) | static inline void __raw_writeq(u64 value, volatile void __iomem *addr)
  function u8 (line 148) | static inline u8 readb(const volatile void __iomem *addr)
  function u16 (line 161) | static inline u16 readw(const volatile void __iomem *addr)
  function u32 (line 174) | static inline u32 readl(const volatile void __iomem *addr)
  function u64 (line 188) | static inline u64 readq(const volatile void __iomem *addr)
  function writeb (line 202) | static inline void writeb(u8 value, volatile void __iomem *addr)
  function writew (line 212) | static inline void writew(u16 value, volatile void __iomem *addr)
  function writel (line 222) | static inline void writel(u32 value, volatile void __iomem *addr)
  function writeq (line 233) | static inline void writeq(u64 value, volatile void __iomem *addr)
  function u8 (line 249) | static inline u8 readb_relaxed(const volatile void __iomem *addr)
  function u16 (line 257) | static inline u16 readw_relaxed(const volatile void __iomem *addr)
  function u32 (line 265) | static inline u32 readl_relaxed(const volatile void __iomem *addr)
  function u64 (line 273) | static inline u64 readq_relaxed(const volatile void __iomem *addr)
  function writeb_relaxed (line 281) | static inline void writeb_relaxed(u8 value, volatile void __iomem *addr)
  function writew_relaxed (line 289) | static inline void writew_relaxed(u16 value, volatile void __iomem *addr)
  function writel_relaxed (line 297) | static inline void writel_relaxed(u32 value, volatile void __iomem *addr)
  function writeq_relaxed (line 305) | static inline void writeq_relaxed(u64 value, volatile void __iomem *addr)
  function readsb (line 317) | static inline void readsb(const volatile void __iomem *addr, void *buffer,
  function readsw (line 333) | static inline void readsw(const volatile void __iomem *addr, void *buffer,
  function readsl (line 349) | static inline void readsl(const volatile void __iomem *addr, void *buffer,
  function readsq (line 366) | static inline void readsq(const volatile void __iomem *addr, void *buffer,
  function writesb (line 383) | static inline void writesb(volatile void __iomem *addr, const void *buffer,
  function writesw (line 398) | static inline void writesw(volatile void __iomem *addr, const void *buffer,
  function writesl (line 413) | static inline void writesl(volatile void __iomem *addr, const void *buffer,
  function writesq (line 429) | static inline void writesq(volatile void __iomem *addr, const void *buffer,
  function u8 (line 461) | static inline u8 inb(unsigned long addr)
  function u16 (line 474) | static inline u16 inw(unsigned long addr)
  function u32 (line 487) | static inline u32 inl(unsigned long addr)
  function outb (line 500) | static inline void outb(u8 value, unsigned long addr)
  function outw (line 510) | static inline void outw(u16 value, unsigned long addr)
  function outl (line 520) | static inline void outl(u32 value, unsigned long addr)
  function u8 (line 530) | static inline u8 inb_p(unsigned long addr)
  function u16 (line 538) | static inline u16 inw_p(unsigned long addr)
  function u32 (line 546) | static inline u32 inl_p(unsigned long addr)
  function outb_p (line 554) | static inline void outb_p(u8 value, unsigned long addr)
  function outw_p (line 562) | static inline void outw_p(u16 value, unsigned long addr)
  function outl_p (line 570) | static inline void outl_p(u32 value, unsigned long addr)
  function insb (line 583) | static inline void insb(unsigned long addr, void *buffer, unsigned int c...
  function insw (line 591) | static inline void insw(unsigned long addr, void *buffer, unsigned int c...
  function insl (line 599) | static inline void insl(unsigned long addr, void *buffer, unsigned int c...
  function outsb (line 607) | static inline void outsb(unsigned long addr, const void *buffer,
  function outsw (line 616) | static inline void outsw(unsigned long addr, const void *buffer,
  function outsl (line 625) | static inline void outsl(unsigned long addr, const void *buffer,
  function insb_p (line 634) | static inline void insb_p(unsigned long addr, void *buffer, unsigned int...
  function insw_p (line 642) | static inline void insw_p(unsigned long addr, void *buffer, unsigned int...
  function insl_p (line 650) | static inline void insl_p(unsigned long addr, void *buffer, unsigned int...
  function outsb_p (line 658) | static inline void outsb_p(unsigned long addr, const void *buffer,
  function outsw_p (line 667) | static inline void outsw_p(unsigned long addr, const void *buffer,
  function outsl_p (line 676) | static inline void outsl_p(unsigned long addr, const void *buffer,
  function u8 (line 686) | static inline u8 ioread8(const volatile void __iomem *addr)
  function u16 (line 694) | static inline u16 ioread16(const volatile void __iomem *addr)
  function u32 (line 702) | static inline u32 ioread32(const volatile void __iomem *addr)
  function u64 (line 711) | static inline u64 ioread64(const volatile void __iomem *addr)
  function iowrite8 (line 720) | static inline void iowrite8(u8 value, volatile void __iomem *addr)
  function iowrite16 (line 728) | static inline void iowrite16(u16 value, volatile void __iomem *addr)
  function iowrite32 (line 736) | static inline void iowrite32(u32 value, volatile void __iomem *addr)
  function iowrite64 (line 745) | static inline void iowrite64(u64 value, volatile void __iomem *addr)
  function u16 (line 754) | static inline u16 ioread16be(const volatile void __iomem *addr)
  function u32 (line 762) | static inline u32 ioread32be(const volatile void __iomem *addr)
  function u64 (line 771) | static inline u64 ioread64be(const volatile void __iomem *addr)
  function iowrite16be (line 780) | static inline void iowrite16be(u16 value, void volatile __iomem *addr)
  function iowrite32be (line 788) | static inline void iowrite32be(u32 value, volatile void __iomem *addr)
  function iowrite64be (line 797) | static inline void iowrite64be(u64 value, volatile void __iomem *addr)
  function ioread8_rep (line 806) | static inline void ioread8_rep(const volatile void __iomem *addr, void *...
  function ioread16_rep (line 815) | static inline void ioread16_rep(const volatile void __iomem *addr,
  function ioread32_rep (line 824) | static inline void ioread32_rep(const volatile void __iomem *addr,
  function ioread64_rep (line 834) | static inline void ioread64_rep(const volatile void __iomem *addr,
  function iowrite8_rep (line 844) | static inline void iowrite8_rep(volatile void __iomem *addr,
  function iowrite16_rep (line 854) | static inline void iowrite16_rep(volatile void __iomem *addr,
  function iowrite32_rep (line 864) | static inline void iowrite32_rep(volatile void __iomem *addr,
  function iowrite64_rep (line 875) | static inline void iowrite64_rep(volatile void __iomem *addr,
  type pci_dev (line 891) | struct pci_dev
  type pci_dev (line 892) | struct pci_dev
  function pci_iounmap (line 896) | static inline void pci_iounmap(struct pci_dev *dev, void __iomem *p)
  function virt_to_phys (line 908) | static inline unsigned long virt_to_phys(volatile void *address)
  function iounmap (line 969) | static inline void iounmap(void __iomem *addr)
  function ioport_unmap (line 1020) | static inline void ioport_unmap(void __iomem *p)
  function unxlate_dev_mem_ptr (line 1051) | static inline void unxlate_dev_mem_ptr(phys_addr_t phys, void *addr)
  function virt_to_bus (line 1058) | static inline unsigned long virt_to_bus(void *address)
  function memset_io (line 1080) | static inline void memset_io(volatile void __iomem *addr, int value,
  function memcpy_fromio (line 1097) | static inline void memcpy_fromio(void *buffer,
  function memcpy_toio (line 1115) | static inline void memcpy_toio(volatile void __iomem *addr, const void *...

FILE: t/tree/include/asm-generic/pci_iomap.h
  type pci_dev (line 10) | struct pci_dev
  type pci_dev (line 13) | struct pci_dev
  type pci_dev (line 14) | struct pci_dev
  type pci_dev (line 15) | struct pci_dev
  type pci_dev (line 18) | struct pci_dev
  type pci_dev (line 25) | struct pci_dev
  type pci_dev (line 32) | struct pci_dev
  type pci_dev (line 37) | struct pci_dev
  type pci_dev (line 41) | struct pci_dev
  type pci_dev (line 47) | struct pci_dev

FILE: t/tree/include/asm-generic/qrwlock.h
  type qrwlock (line 30) | struct qrwlock
  type qrwlock (line 31) | struct qrwlock
  function queued_read_trylock (line 38) | static inline int queued_read_trylock(struct qrwlock *lock)
  function queued_write_trylock (line 57) | static inline int queued_write_trylock(struct qrwlock *lock)
  function queued_read_lock (line 72) | static inline void queued_read_lock(struct qrwlock *lock)
  function queued_write_lock (line 88) | static inline void queued_write_lock(struct qrwlock *lock)
  function queued_read_unlock (line 102) | static inline void queued_read_unlock(struct qrwlock *lock)
  function queued_write_unlock (line 114) | static inline void queued_write_unlock(struct qrwlock *lock)

FILE: t/tree/include/asm-generic/qspinlock.h
  function __always_inline (line 20) | static __always_inline int queued_spin_is_locked(struct qspinlock *lock)
  function __always_inline (line 39) | static __always_inline int queued_spin_value_unlocked(struct qspinlock l...
  function __always_inline (line 49) | static __always_inline int queued_spin_is_contended(struct qspinlock *lock)
  function __always_inline (line 58) | static __always_inline int queued_spin_trylock(struct qspinlock *lock)
  type qspinlock (line 68) | struct qspinlock
  function __always_inline (line 74) | static __always_inline void queued_spin_lock(struct qspinlock *lock)
  function __always_inline (line 89) | static __always_inline void queued_spin_unlock(struct qspinlock *lock)
  function __always_inline (line 99) | static __always_inline bool virt_spin_lock(struct qspinlock *lock)

FILE: t/tree/include/asm-generic/qspinlock_types.h
  type arch_spinlock_t (line 22) | typedef struct qspinlock {

FILE: t/tree/include/linux/acpi.h
  function acpi_handle (line 38) | static inline acpi_handle acpi_device_handle(struct acpi_device *adev)
  type fwnode_handle (line 50) | struct fwnode_handle
  type fwnode_handle (line 52) | struct fwnode_handle
  type fwnode_handle (line 54) | struct fwnode_handle
  function acpi_free_fwnode_static (line 63) | static inline void acpi_free_fwnode_static(struct fwnode_handle *fwnode)
  function has_acpi_companion (line 84) | static inline bool has_acpi_companion(struct device *dev)
  function acpi_preset_companion (line 89) | static inline void acpi_preset_companion(struct device *dev,
  type acpi_device (line 95) | struct acpi_device
  type device (line 100) | struct device
  type acpi_device (line 100) | struct acpi_device
  type acpi_irq_model_id (line 102) | enum acpi_irq_model_id {
  type acpi_irq_model_id (line 111) | enum acpi_irq_model_id
  type acpi_interrupt_id (line 113) | enum acpi_interrupt_id {
  type acpi_address_range_id (line 122) | enum acpi_address_range_id {
  type acpi_subtable_header (line 133) | struct acpi_subtable_header
  type acpi_hmat_structure (line 134) | struct acpi_hmat_structure
  type acpi_table_header (line 137) | struct acpi_table_header
  type acpi_debugger_ops (line 144) | struct acpi_debugger_ops {
  type acpi_debugger (line 152) | struct acpi_debugger {
  type module (line 160) | struct module
  type acpi_debugger_ops (line 161) | struct acpi_debugger_ops
  type acpi_debugger_ops (line 162) | struct acpi_debugger_ops
  function acpi_debugger_init (line 169) | static inline int acpi_debugger_init(void)
  function acpi_register_debugger (line 174) | static inline int acpi_register_debugger(struct module *owner,
  function acpi_unregister_debugger (line 180) | static inline void acpi_unregister_debugger(const struct acpi_debugger_o...
  function acpi_debugger_create_thread (line 184) | static inline int acpi_debugger_create_thread(acpi_osd_exec_callback fun...
  function acpi_debugger_write_log (line 190) | static inline int acpi_debugger_write_log(const char *msg)
  function acpi_debugger_read_cmd (line 195) | static inline int acpi_debugger_read_cmd(char *buffer, u32 buffer_length)
  function acpi_debugger_wait_command_ready (line 200) | static inline int acpi_debugger_wait_command_ready(void)
  function acpi_debugger_notify_command_complete (line 205) | static inline int acpi_debugger_notify_command_complete(void)
  type acpi_subtable_proc (line 215) | struct acpi_subtable_proc {
  type acpi_subtable_proc (line 236) | struct acpi_subtable_proc
  type acpi_madt_type (line 238) | enum acpi_madt_type
  type acpi_table_header (line 241) | struct acpi_table_header
  type acpi_subtable_header (line 242) | struct acpi_subtable_header
  type acpi_table_slit (line 245) | struct acpi_table_slit
  type acpi_srat_cpu_affinity (line 248) | struct acpi_srat_cpu_affinity
  function acpi_numa_processor_affinity_init (line 250) | static inline void
  type acpi_srat_x2apic_cpu_affinity (line 254) | struct acpi_srat_x2apic_cpu_affinity
  type acpi_srat_gicc_affinity (line 257) | struct acpi_srat_gicc_affinity
  function acpi_numa_gicc_affinity_init (line 259) | static inline void
  type acpi_srat_mem_affinity (line 263) | struct acpi_srat_mem_affinity
  type u32 (line 266) | typedef u32 phys_cpuid_t;
  function invalid_logical_cpuid (line 270) | static inline bool invalid_logical_cpuid(u32 cpuid)
  function invalid_phys_cpuid (line 275) | static inline bool invalid_phys_cpuid(phys_cpuid_t phys_id)
  function acpi_sci_irq_valid (line 303) | static inline bool acpi_sci_irq_valid(void)
  type device (line 311) | struct device
  type acpi_irq_model_id (line 315) | enum acpi_irq_model_id
  type fwnode_handle (line 316) | struct fwnode_handle
  type irq_domain (line 318) | struct irq_domain
  type fwnode_handle (line 320) | struct fwnode_handle
  type irq_domain_ops (line 321) | struct irq_domain_ops
  function acpi_get_override_irq (line 327) | static inline int acpi_get_override_irq(u32 gsi, int *trigger, int *pola...
  type pci_dev (line 339) | struct pci_dev
  type pci_dev (line 341) | struct pci_dev
  function acpi_penalize_sci_irq (line 347) | static inline void acpi_penalize_sci_irq(int irq, int trigger,
  type pci_dev (line 352) | struct pci_dev
  type acpi_device (line 361) | struct acpi_device
  type acpi_buffer (line 369) | struct acpi_buffer
  type acpi_buffer (line 370) | struct acpi_buffer
  type acpi_buffer (line 372) | struct acpi_buffer
  type acpi_buffer (line 374) | struct acpi_buffer
  type acpi_buffer (line 378) | struct acpi_buffer
  function acpi_map_pxm_to_online_node (line 408) | static inline int acpi_map_pxm_to_online_node(int pxm)
  function acpi_map_pxm_to_node (line 412) | static inline int acpi_map_pxm_to_node(int pxm)
  function acpi_get_node (line 416) | static inline int acpi_get_node(acpi_handle handle)
  type acpi_resource (line 427) | struct acpi_resource
  type resource (line 427) | struct resource
  type acpi_resource (line 428) | struct acpi_resource
  type resource (line 428) | struct resource
  type acpi_resource (line 429) | struct acpi_resource
  type resource_win (line 430) | struct resource_win
  type acpi_resource (line 431) | struct acpi_resource
  type resource_win (line 432) | struct resource_win
  type acpi_resource (line 435) | struct acpi_resource
  type resource (line 436) | struct resource
  type list_head (line 438) | struct list_head
  type acpi_device (line 439) | struct acpi_device
  type list_head (line 439) | struct list_head
  type acpi_resource (line 440) | struct acpi_resource
  type acpi_device (line 442) | struct acpi_device
  type list_head (line 443) | struct list_head
  type acpi_resource (line 444) | struct acpi_resource
  function acpi_dev_filter_resource_type_cb (line 447) | static inline int acpi_dev_filter_resource_type_cb(struct acpi_resource ...
  type acpi_device (line 453) | struct acpi_device
  type resource (line 453) | struct resource
  type resource (line 455) | struct resource
  type resource (line 460) | struct resource
  type acpi_osc_context (line 476) | struct acpi_osc_context {
  type acpi_osc_context (line 483) | struct acpi_osc_context
  type acpi_predicate (line 579) | enum acpi_predicate {
  type acpi_platform_list (line 587) | struct acpi_platform_list {
  type acpi_platform_list (line 596) | struct acpi_platform_list
  type acpi_device_id (line 607) | struct acpi_device_id
  type acpi_device_id (line 607) | struct acpi_device_id
  type device (line 608) | struct device
  type device (line 610) | struct device
  type device (line 611) | struct device
  type device_driver (line 612) | struct device_driver
  type device (line 613) | struct device
  type kobj_uevent_env (line 613) | struct kobj_uevent_env
  type device (line 614) | struct device
  type platform_device (line 617) | struct platform_device
  type acpi_device (line 617) | struct acpi_device
  type property_entry (line 618) | struct property_entry
  function acpi_device_set_enumerated (line 621) | static inline void acpi_device_set_enumerated(struct acpi_device *adev)
  function acpi_device_clear_enumerated (line 626) | static inline void acpi_device_clear_enumerated(struct acpi_device *adev)
  type acpi_reconfig_event (line 631) | enum acpi_reconfig_event  {
  type notifier_block (line 636) | struct notifier_block
  type notifier_block (line 637) | struct notifier_block
  type acpi_table_header (line 640) | struct acpi_table_header
  type arch_timer_mem (line 643) | struct arch_timer_mem
  function acpi_arch_set_root_pointer (line 647) | static inline void acpi_arch_set_root_pointer(u64 addr)
  function u64 (line 653) | static inline u64 acpi_arch_get_root_pointer(void)
  type fwnode_handle (line 669) | struct fwnode_handle
  function acpi_dev_found (line 671) | static inline bool acpi_dev_found(const char *hid)
  function acpi_dev_present (line 676) | static inline bool acpi_dev_present(const char *hid, const char *uid, s6...
  type acpi_device (line 681) | struct acpi_device
  function acpi_dev_put (line 687) | static inline void acpi_dev_put(struct acpi_device *adev) {}
  function is_acpi_node (line 689) | static inline bool is_acpi_node(struct fwnode_handle *fwnode)
  function is_acpi_device_node (line 694) | static inline bool is_acpi_device_node(struct fwnode_handle *fwnode)
  type acpi_device (line 699) | struct acpi_device
  type fwnode_handle (line 699) | struct fwnode_handle
  function is_acpi_data_node (line 704) | static inline bool is_acpi_data_node(struct fwnode_handle *fwnode)
  type acpi_data_node (line 709) | struct acpi_data_node
  type fwnode_handle (line 709) | struct fwnode_handle
  function acpi_data_node_match (line 714) | static inline bool acpi_data_node_match(struct fwnode_handle *fwnode,
  type fwnode_handle (line 720) | struct fwnode_handle
  type acpi_device (line 720) | struct acpi_device
  function has_acpi_companion (line 725) | static inline bool has_acpi_companion(struct device *dev)
  function acpi_preset_companion (line 730) | static inline void acpi_preset_companion(struct device *dev,
  type acpi_device (line 735) | struct acpi_device
  type device (line 740) | struct device
  type acpi_device (line 740) | struct acpi_device
  function acpi_early_init (line 745) | static inline void acpi_early_init(void) { }
  function acpi_subsystem_init (line 746) | static inline void acpi_subsystem_init(void) { }
  function early_acpi_boot_init (line 748) | static inline int early_acpi_boot_init(void)
  function acpi_boot_init (line 752) | static inline int acpi_boot_init(void)
  function acpi_boot_table_init (line 757) | static inline void acpi_boot_table_init(void)
  function acpi_mps_check (line 762) | static inline int acpi_mps_check(void)
  function acpi_check_resource_conflict (line 767) | static inline int acpi_check_resource_conflict(struct resource *res)
  function acpi_check_region (line 772) | static inline int acpi_check_region(resource_size_t start, resource_size...
  type acpi_table_header (line 778) | struct acpi_table_header
  function acpi_table_parse (line 779) | static inline int acpi_table_parse(char *id,
  function acpi_nvs_register (line 785) | static inline int acpi_nvs_register(__u64 start, __u64 size)
  function acpi_nvs_for_each_region (line 790) | static inline int acpi_nvs_for_each_region(int (*func)(__u64, __u64, voi...
  type acpi_device_id (line 796) | struct acpi_device_id
  type acpi_device_id (line 798) | struct acpi_device_id
  type acpi_device_id (line 799) | struct acpi_device_id
  type device (line 799) | struct device
  type device (line 804) | struct device
  function acpi_driver_match_device (line 809) | static inline bool acpi_driver_match_device(struct device *dev,
  function acpi_device_uevent_modalias (line 823) | static inline int acpi_device_uevent_modalias(struct device *dev,
  function acpi_device_modalias (line 829) | static inline int acpi_device_modalias(struct device *dev,
  function acpi_dma_supported (line 835) | static inline bool acpi_dma_supported(struct acpi_device *adev)
  function acpi_get_dma_attr (line 840) | static inline enum dev_dma_attr acpi_get_dma_attr(struct acpi_device *adev)
  function acpi_dma_get_range (line 845) | static inline int acpi_dma_get_range(struct device *dev, u64 *dma_addr,
  function acpi_dma_configure (line 851) | static inline int acpi_dma_configure(struct device *dev,
  function acpi_device_set_enumerated (line 859) | static inline void acpi_device_set_enumerated(struct acpi_device *adev)
  function acpi_device_clear_enumerated (line 863) | static inline void acpi_device_clear_enumerated(struct acpi_device *adev)
  function acpi_reconfig_notifier_register (line 867) | static inline int acpi_reconfig_notifier_register(struct notifier_block ...
  function acpi_reconfig_notifier_unregister (line 872) | static inline int acpi_reconfig_notifier_unregister(struct notifier_bloc...
  type acpi_device (line 877) | struct acpi_device
  type resource (line 877) | struct resource
  function acpi_ioapic_add (line 887) | static inline int acpi_ioapic_add(acpi_handle root) { return 0; }
  function arch_reserve_mem_area (line 906) | static inline void arch_reserve_mem_area(acpi_physical_address addr,
  type device (line 916) | struct device
  type device (line 917) | struct device
  type device (line 918) | struct device
  type device (line 919) | struct device
  type device (line 920) | struct device
  function acpi_dev_runtime_suspend (line 922) | static inline int acpi_dev_runtime_suspend(struct device *dev) { return ...
  function acpi_dev_runtime_resume (line 923) | static inline int acpi_dev_runtime_resume(struct device *dev) { return 0; }
  function acpi_subsys_runtime_suspend (line 924) | static inline int acpi_subsys_runtime_suspend(struct device *dev) { retu...
  function acpi_subsys_runtime_resume (line 925) | static inline int acpi_subsys_runtime_resume(struct device *dev) { retur...
  function acpi_dev_pm_attach (line 926) | static inline int acpi_dev_pm_attach(struct device *dev, bool power_on)
  type device (line 933) | struct device
  type device (line 934) | struct device
  type device (line 935) | struct device
  type device (line 936) | struct device
  type device (line 937) | struct device
  type device (line 938) | struct device
  type device (line 939) | struct device
  function acpi_subsys_prepare (line 943) | static inline int acpi_subsys_prepare(struct device *dev) { return 0; }
  function acpi_subsys_complete (line 944) | static inline void acpi_subsys_complete(struct device *dev) {}
  function acpi_subsys_suspend_late (line 945) | static inline int acpi_subsys_suspend_late(struct device *dev) { return ...
  function acpi_subsys_suspend_noirq (line 946) | static inline int acpi_subsys_suspend_noirq(struct device *dev) { return...
  function acpi_subsys_suspend (line 947) | static inline int acpi_subsys_suspend(struct device *dev) { return 0; }
  function acpi_subsys_freeze (line 948) | static inline int acpi_subsys_freeze(struct device *dev) { return 0; }
  function acpi_subsys_poweroff (line 949) | static inline int acpi_subsys_poweroff(struct device *dev) { return 0; }
  function acpi_ec_mark_gpe_for_wake (line 950) | static inline void acpi_ec_mark_gpe_for_wake(void) {}
  function acpi_ec_set_gpe_wake_mask (line 951) | static inline void acpi_ec_set_gpe_wake_mask(u8 action) {}
  type _ddebug (line 965) | struct _ddebug
  type acpi_resource (line 1008) | struct acpi_resource
  type acpi_resource_gpio (line 1009) | struct acpi_resource_gpio
  type acpi_device (line 1010) | struct acpi_device
  function acpi_gpio_get_irq_resource (line 1012) | static inline bool acpi_gpio_get_irq_resource(struct acpi_resource *ares,
  function acpi_dev_gpio_irq_get (line 1017) | static inline int acpi_dev_gpio_irq_get(struct acpi_device *adev, int in...
  type acpi_device (line 1026) | struct acpi_device
  type fwnode_handle (line 1028) | struct fwnode_handle
  type fwnode_reference_args (line 1030) | struct fwnode_reference_args
  function acpi_node_get_property_reference (line 1032) | static inline int acpi_node_get_property_reference(
  function acpi_dev_has_props (line 1041) | static inline bool acpi_dev_has_props(const struct acpi_device *adev)
  type acpi_device_properties (line 1046) | struct acpi_device_properties
  type acpi_device_data (line 1047) | struct acpi_device_data
  type fwnode_handle (line 1050) | struct fwnode_handle
  type acpi_device (line 1052) | struct acpi_device
  type dev_prop_type (line 1053) | enum dev_prop_type
  type fwnode_handle (line 1055) | struct fwnode_handle
  type dev_prop_type (line 1056) | enum dev_prop_type
  type acpi_device (line 1058) | struct acpi_device
  type dev_prop_type (line 1059) | enum dev_prop_type
  type fwnode_handle (line 1061) | struct fwnode_handle
  type fwnode_handle (line 1061) | struct fwnode_handle
  type fwnode_handle (line 1062) | struct fwnode_handle
  type fwnode_handle (line 1063) | struct fwnode_handle
  type fwnode_handle (line 1063) | struct fwnode_handle
  type acpi_probe_entry (line 1065) | struct acpi_probe_entry
  type acpi_subtable_header (line 1066) | struct acpi_subtable_header
  type acpi_probe_entry (line 1067) | struct acpi_probe_entry
  type acpi_probe_entry (line 1084) | struct acpi_probe_entry {
  type acpi_probe_entry (line 1109) | struct acpi_probe_entry
  function acpi_dev_get_property (line 1120) | static inline int acpi_dev_get_property(struct acpi_device *adev,
  function __acpi_node_get_property_reference (line 1127) | static inline int
  function acpi_node_get_property_reference (line 1135) | static inline int
  function acpi_node_prop_get (line 1143) | static inline int acpi_node_prop_get(const struct fwnode_handle *fwnode,
  function acpi_dev_prop_get (line 1150) | static inline int acpi_dev_prop_get(const struct acpi_device *adev,
  function acpi_dev_prop_read_single (line 1157) | static inline int acpi_dev_prop_read_single(const struct acpi_device *adev,
  function acpi_node_prop_read (line 1165) | static inline int acpi_node_prop_read(const struct fwnode_handle *fwnode,
  function acpi_dev_prop_read (line 1173) | static inline int acpi_dev_prop_read(const struct acpi_device *adev,
  type fwnode_handle (line 1181) | struct fwnode_handle
  type fwnode_handle (line 1182) | struct fwnode_handle
  type fwnode_handle (line 1183) | struct fwnode_handle
  type fwnode_handle (line 1188) | struct fwnode_handle
  type fwnode_handle (line 1189) | struct fwnode_handle
  type fwnode_handle (line 1194) | struct fwnode_handle
  type fwnode_handle (line 1195) | struct fwnode_handle
  type fwnode_handle (line 1196) | struct fwnode_handle
  function acpi_graph_get_remote_endpoint (line 1201) | static inline int
  function acpi_table_upgrade (line 1225) | static inline void acpi_table_upgrade(void) { }
  function acpi_has_watchdog (line 1231) | static inline bool acpi_has_watchdog(void) { return false; }
  function acpi_parse_spcr (line 1238) | static inline int acpi_parse_spcr(bool enable_earlycon, bool enable_cons...
  type resource (line 1245) | struct resource
  function acpi_irq_get (line 1247) | static inline
  function lpit_read_residency_count_address (line 1257) | static inline int lpit_read_residency_count_address(u64 *address)
  function acpi_pptt_cpu_is_thread (line 1270) | static inline int acpi_pptt_cpu_is_thread(unsigned int cpu)
  function find_acpi_cpu_topology (line 1274) | static inline int find_acpi_cpu_topology(unsigned int cpu, int level)
  function find_acpi_cpu_topology_package (line 1278) | static inline int find_acpi_cpu_topology_package(unsigned int cpu)
  function find_acpi_cpu_topology_hetero_id (line 1282) | static inline int find_acpi_cpu_topology_hetero_id(unsigned int cpu)
  function find_acpi_cpu_cache_topology (line 1286) | static inline int find_acpi_cpu_cache_topology(unsigned int cpu, int level)
  type device (line 1293) | struct device
  type kobject_action (line 1293) | enum kobject_action
  function acpi_platform_notify (line 1295) | static inline int

FILE: t/tree/include/linux/apm_bios.h
  type apm_info (line 26) | struct apm_info {
  type apm_info (line 85) | struct apm_info

FILE: t/tree/include/linux/assoc_array.h
  type assoc_array (line 22) | struct assoc_array {
  type assoc_array_ops (line 30) | struct assoc_array_ops {
  type assoc_array_edit (line 52) | struct assoc_array_edit
  function assoc_array_init (line 54) | static inline void assoc_array_init(struct assoc_array *array)
  type assoc_array (line 60) | struct assoc_array
  type assoc_array (line 64) | struct assoc_array
  type assoc_array_ops (line 65) | struct assoc_array_ops
  type assoc_array (line 67) | struct assoc_array
  type assoc_array_ops (line 68) | struct assoc_array_ops
  type assoc_array_edit (line 69) | struct assoc_array_edit
  type assoc_array (line 69) | struct assoc_array
  type assoc_array_ops (line 70) | struct assoc_array_ops
  type assoc_array_edit (line 73) | struct assoc_array_edit
  type assoc_array_edit (line 75) | struct assoc_array_edit
  type assoc_array (line 75) | struct assoc_array
  type assoc_array_ops (line 76) | struct assoc_array_ops
  type assoc_array_edit (line 78) | struct assoc_array_edit
  type assoc_array (line 78) | struct assoc_array
  type assoc_array_ops (line 79) | struct assoc_array_ops
  type assoc_array_edit (line 80) | struct assoc_array_edit
  type assoc_array_edit (line 81) | struct assoc_array_edit
  type assoc_array (line 82) | struct assoc_array
  type assoc_array_ops (line 83) | struct assoc_array_ops

FILE: t/tree/include/linux/cred.h
  type cred (line 19) | struct cred
  type inode (line 20) | struct inode
  type group_info (line 25) | struct group_info {
  type group_info (line 40) | struct group_info
  type group_info (line 40) | struct group_info
  type group_info (line 56) | struct group_info
  type group_info (line 58) | struct group_info
  type group_info (line 59) | struct group_info
  type group_info (line 63) | struct group_info
  type group_info (line 65) | struct group_info
  type cred (line 66) | struct cred
  type group_info (line 66) | struct group_info
  type group_info (line 68) | struct group_info
  function groups_free (line 70) | static inline void groups_free(struct group_info *group_info)
  function in_group_p (line 74) | static inline int in_group_p(kgid_t grp)
  function in_egroup_p (line 78) | static inline int in_egroup_p(kgid_t grp)
  function groups_search (line 82) | static inline int groups_search(const struct group_info *group_info, kgi...
  type cred (line 111) | struct cred {
  type cred (line 155) | struct cred
  type task_struct (line 156) | struct task_struct
  type task_struct (line 157) | struct task_struct
  type cred (line 158) | struct cred
  type task_struct (line 158) | struct task_struct
  type cred (line 159) | struct cred
  type cred (line 160) | struct cred
  type cred (line 161) | struct cred
  type cred (line 162) | struct cred
  type cred (line 163) | struct cred
  type cred (line 164) | struct cred
  type cred (line 164) | struct cred
  type cred (line 165) | struct cred
  type cred (line 166) | struct cred
  type task_struct (line 166) | struct task_struct
  type cred (line 167) | struct cred
  type inode (line 167) | struct inode
  type cred (line 168) | struct cred
  type cred (line 169) | struct cred
  type cred (line 170) | struct cred
  type inode (line 170) | struct inode
  type cred (line 171) | struct cred
  type cred (line 171) | struct cred
  type cred (line 178) | struct cred
  type task_struct (line 179) | struct task_struct
  type cred (line 182) | struct cred
  function __validate_creds (line 184) | static inline void __validate_creds(const struct cred *cred,
  type task_struct (line 201) | struct task_struct
  function validate_creds (line 203) | static inline void validate_creds(const struct cred *cred)
  function validate_creds_for_do_exit (line 206) | static inline void validate_creds_for_do_exit(struct task_struct *tsk)
  function validate_process_creds (line 209) | static inline void validate_process_creds(void)
  function cap_ambient_invariant_ok (line 214) | static inline bool cap_ambient_invariant_ok(const struct cred *cred)
  type cred (line 228) | struct cred
  type cred (line 228) | struct cred
  type cred (line 247) | struct cred
  type cred (line 247) | struct cred
  type cred (line 249) | struct cred
  type cred (line 249) | struct cred
  type cred (line 257) | struct cred
  type cred (line 257) | struct cred
  type cred (line 259) | struct cred
  type cred (line 259) | struct cred
  function put_cred (line 280) | static inline void put_cred(const struct cred *_cred)
  type user_namespace (line 390) | struct user_namespace
  type user_namespace (line 394) | struct user_namespace

FILE: t/tree/include/linux/i2c-smbus.h
  type i2c_smbus_alert_setup (line 30) | struct i2c_smbus_alert_setup {
  type i2c_client (line 34) | struct i2c_client
  type i2c_adapter (line 34) | struct i2c_adapter
  type i2c_smbus_alert_setup (line 35) | struct i2c_smbus_alert_setup
  type i2c_client (line 36) | struct i2c_client
  type i2c_adapter (line 39) | struct i2c_adapter
  function of_i2c_setup_smbus_alert (line 41) | static inline int of_i2c_setup_smbus_alert(struct i2c_adapter *adap)

FILE: t/tree/include/linux/i2c.h
  type bus_type (line 24) | struct bus_type
  type device_type (line 25) | struct device_type
  type device_type (line 26) | struct device_type
  type i2c_msg (line 30) | struct i2c_msg
  type i2c_algorithm (line 31) | struct i2c_algorithm
  type i2c_adapter (line 32) | struct i2c_adapter
  type i2c_client (line 33) | struct i2c_client
  type i2c_driver (line 34) | struct i2c_driver
  type i2c_device_identity (line 35) | struct i2c_device_identity
  type i2c_board_info (line 37) | struct i2c_board_info
  type i2c_slave_event (line 38) | enum i2c_slave_event
  type i2c_client (line 39) | struct i2c_client
  type i2c_slave_event (line 40) | enum i2c_slave_event
  type module (line 42) | struct module
  type property_entry (line 43) | struct property_entry
  type i2c_client (line 53) | struct i2c_client
  function i2c_master_recv (line 64) | static inline int i2c_master_recv(const struct i2c_client *client,
  function i2c_master_recv_dmasafe (line 79) | static inline int i2c_master_recv_dmasafe(const struct i2c_client *client,
  function i2c_master_send (line 94) | static inline int i2c_master_send(const struct i2c_client *client,
  function i2c_master_send_dmasafe (line 109) | static inline int i2c_master_send_dmasafe(const struct i2c_client *client,
  type i2c_adapter (line 118) | struct i2c_adapter
  type i2c_msg (line 118) | struct i2c_msg
  type i2c_adapter (line 121) | struct i2c_adapter
  type i2c_msg (line 121) | struct i2c_msg
  type i2c_adapter (line 129) | struct i2c_adapter
  type i2c_adapter (line 134) | struct i2c_adapter
  type i2c_client (line 141) | struct i2c_client
  type i2c_client (line 142) | struct i2c_client
  type i2c_client (line 143) | struct i2c_client
  type i2c_client (line 145) | struct i2c_client
  type i2c_client (line 147) | struct i2c_client
  type i2c_client (line 149) | struct i2c_client
  function s32 (line 152) | static inline s32
  function s32 (line 160) | static inline s32
  type i2c_client (line 168) | struct i2c_client
  type i2c_client (line 170) | struct i2c_client
  type i2c_client (line 173) | struct i2c_client
  type i2c_client (line 175) | struct i2c_client
  type i2c_client (line 179) | struct i2c_client
  type i2c_client (line 181) | struct i2c_client
  type i2c_device_identity (line 182) | struct i2c_device_identity
  type i2c_device_identity (line 191) | struct i2c_device_identity {
  type i2c_alert_protocol (line 212) | enum i2c_alert_protocol {
  type i2c_driver (line 253) | struct i2c_driver {
  type i2c_client (line 313) | struct i2c_client {
  type i2c_client (line 339) | struct i2c_client
  type device (line 339) | struct device
  type i2c_adapter (line 340) | struct i2c_adapter
  type device (line 340) | struct device
  type i2c_device_id (line 341) | struct i2c_device_id
  type i2c_device_id (line 341) | struct i2c_device_id
  type i2c_client (line 342) | struct i2c_client
  type i2c_client (line 344) | struct i2c_client
  type kobject (line 344) | struct kobject
  type device (line 346) | struct device
  type i2c_client (line 350) | struct i2c_client
  function i2c_set_clientdata (line 355) | static inline void i2c_set_clientdata(struct i2c_client *dev, void *data)
  type i2c_slave_event (line 363) | enum i2c_slave_event {
  type i2c_client (line 371) | struct i2c_client
  type i2c_client (line 372) | struct i2c_client
  type device (line 373) | struct device
  function i2c_slave_event (line 375) | static inline int i2c_slave_event(struct i2c_client *client,
  function i2c_detect_slave_mode (line 381) | static inline bool i2c_detect_slave_mode(struct device *dev) { return fa...
  type i2c_board_info (line 409) | struct i2c_board_info {
  type i2c_client (line 442) | struct i2c_client
  type i2c_adapter (line 443) | struct i2c_adapter
  type i2c_board_info (line 443) | struct i2c_board_info
  type i2c_client (line 445) | struct i2c_client
  type i2c_adapter (line 446) | struct i2c_adapter
  type i2c_board_info (line 446) | struct i2c_board_info
  type i2c_client (line 454) | struct i2c_client
  type i2c_adapter (line 455) | struct i2c_adapter
  type i2c_board_info (line 456) | struct i2c_board_info
  type i2c_adapter (line 458) | struct i2c_adapter
  type i2c_adapter (line 461) | struct i2c_adapter
  type i2c_client (line 466) | struct i2c_client
  type i2c_adapter (line 467) | struct i2c_adapter
  type i2c_client (line 469) | struct i2c_client
  type i2c_adapter (line 470) | struct i2c_adapter
  type i2c_client (line 472) | struct i2c_client
  type device (line 473) | struct device
  type i2c_adapter (line 473) | struct i2c_adapter
  type i2c_client (line 475) | struct i2c_client
  type i2c_client (line 476) | struct i2c_client
  type i2c_client (line 480) | struct i2c_client
  type i2c_board_info (line 489) | struct i2c_board_info
  function i2c_register_board_info (line 492) | static inline int
  type i2c_algorithm (line 526) | struct i2c_algorithm {
  type i2c_lock_operations (line 564) | struct i2c_lock_operations {
  type i2c_timings (line 579) | struct i2c_timings {
  type i2c_bus_recovery_info (line 611) | struct i2c_bus_recovery_info {
  type i2c_adapter (line 628) | struct i2c_adapter
  type i2c_adapter (line 631) | struct i2c_adapter
  type i2c_adapter_quirks (line 654) | struct i2c_adapter_quirks {
  type i2c_adapter (line 685) | struct i2c_adapter {
  type i2c_adapter (line 717) | struct i2c_adapter
  function i2c_set_adapdata (line 722) | static inline void i2c_set_adapdata(struct i2c_adapter *adap, void *data)
  type i2c_adapter (line 727) | struct i2c_adapter
  type i2c_adapter (line 728) | struct i2c_adapter
  type device (line 731) | struct device
  type device (line 740) | struct device
  function i2c_lock_bus (line 752) | static inline void
  function i2c_trylock_bus (line 766) | static inline int
  function i2c_unlock_bus (line 778) | static inline void
  function i2c_mark_adapter_suspended (line 794) | static inline void i2c_mark_adapter_suspended(struct i2c_adapter *adap)
  function i2c_mark_adapter_resumed (line 809) | static inline void i2c_mark_adapter_resumed(struct i2c_adapter *adap)
  type i2c_adapter (line 836) | struct i2c_adapter
  type i2c_adapter (line 837) | struct i2c_adapter
  type i2c_adapter (line 838) | struct i2c_adapter
  type module (line 840) | struct module
  type i2c_driver (line 840) | struct i2c_driver
  type i2c_driver (line 841) | struct i2c_driver
  type i2c_client (line 847) | struct i2c_client
  type i2c_client (line 847) | struct i2c_client
  type i2c_client (line 848) | struct i2c_client
  type i2c_adapter (line 852) | struct i2c_adapter
  type i2c_adapter (line 855) | struct i2c_adapter
  type i2c_adapter (line 856) | struct i2c_adapter
  type i2c_adapter (line 857) | struct i2c_adapter
  type device (line 859) | struct device
  type i2c_timings (line 859) | struct i2c_timings
  function u32 (line 862) | static inline u32 i2c_get_functionality(struct i2c_adapter *adap)
  function i2c_check_functionality (line 868) | static inline int i2c_check_functionality(struct i2c_adapter *adap, u32 ...
  function i2c_check_quirks (line 880) | static inline bool i2c_check_quirks(struct i2c_adapter *adap, u64 quirks)
  function i2c_adapter_id (line 888) | static inline int i2c_adapter_id(struct i2c_adapter *adap)
  function u8 (line 893) | static inline u8 i2c_8bit_addr_from_msg(const struct i2c_msg *msg)
  type i2c_msg (line 898) | struct i2c_msg
  type i2c_msg (line 899) | struct i2c_msg
  type i2c_adapter (line 901) | struct i2c_adapter
  type i2c_client (line 929) | struct i2c_client
  type device_node (line 929) | struct device_node
  type i2c_adapter (line 932) | struct i2c_adapter
  type device_node (line 932) | struct device_node
  type i2c_adapter (line 935) | struct i2c_adapter
  type device_node (line 935) | struct device_node
  type of_device_id (line 937) | struct of_device_id
  type of_device_id (line 938) | struct of_device_id
  type i2c_client (line 939) | struct i2c_client
  type device (line 941) | struct device
  type device_node (line 941) | struct device_node
  type i2c_board_info (line 942) | struct i2c_board_info
  type i2c_client (line 946) | struct i2c_client
  type device_node (line 946) | struct device_node
  type i2c_adapter (line 951) | struct i2c_adapter
  type device_node (line 951) | struct device_node
  type i2c_adapter (line 956) | struct i2c_adapter
  type device_node (line 956) | struct device_node
  type of_device_id (line 961) | struct of_device_id
  type of_device_id (line 962) | struct of_device_id
  type i2c_client (line 963) | struct i2c_client
  function of_i2c_get_board_info (line 968) | static inline int of_i2c_get_board_info(struct device *dev,
  type acpi_resource (line 977) | struct acpi_resource
  type acpi_resource_i2c_serialbus (line 978) | struct acpi_resource_i2c_serialbus
  type acpi_resource (line 981) | struct acpi_resource
  type acpi_resource_i2c_serialbus (line 982) | struct acpi_resource_i2c_serialbus
  type device (line 983) | struct device
  type i2c_client (line 984) | struct i2c_client
  type device (line 984) | struct device
  type i2c_board_info (line 985) | struct i2c_board_info
  type i2c_adapter (line 986) | struct i2c_adapter
  function i2c_acpi_get_i2c_resource (line 988) | static inline bool i2c_acpi_get_i2c_resource(struct acpi_resource *ares,
  function u32 (line 993) | static inline u32 i2c_acpi_find_bus_speed(struct device *dev)
  type i2c_client (line 997) | struct i2c_client
  type device (line 997) | struct device
  type i2c_board_info (line 998) | struct i2c_board_info
  type i2c_adapter (line 1002) | struct i2c_adapter

FILE: t/tree/include/linux/key.h
  type key_serial_t (line 28) | typedef int32_t key_serial_t;
  type key_perm_t (line 31) | typedef uint32_t key_perm_t;
  type key (line 33) | struct key
  type net (line 34) | struct net
  type seq_file (line 74) | struct seq_file
  type user_struct (line 75) | struct user_struct
  type signal_struct (line 76) | struct signal_struct
  type cred (line 77) | struct cred
  type key_type (line 79) | struct key_type
  type key_owner (line 80) | struct key_owner
  type key_tag (line 81) | struct key_tag
  type keyring_list (line 82) | struct keyring_list
  type keyring_name (line 83) | struct keyring_name
  type key_tag (line 85) | struct key_tag {
  type keyring_index_key (line 91) | struct keyring_index_key {
  type __key_reference_with_attributes (line 130) | struct __key_reference_with_attributes
  function key_ref_t (line 132) | static inline key_ref_t make_key_ref(const struct key *key,
  type key (line 138) | struct key
  type key (line 140) | struct key
  function is_key_possessed (line 143) | static inline bool is_key_possessed(const key_ref_t key_ref)
  type key (line 148) | struct key
  type key_type (line 149) | struct key_type
  type key (line 151) | struct key
  type key_restriction (line 153) | struct key_restriction {
  type key_state (line 159) | enum key_state {
  type key (line 172) | struct key {
  type key (line 257) | struct key
  type key_type (line 257) | struct key_type
  type cred (line 260) | struct cred
  type key_restriction (line 263) | struct key_restriction
  type key (line 273) | struct key
  type key (line 274) | struct key
  type key (line 275) | struct key
  type key_tag (line 276) | struct key_tag
  type key_tag (line 277) | struct key_tag
  type key (line 279) | struct key
  type key (line 279) | struct key
  type key (line 285) | struct key
  type key (line 285) | struct key
  function key_ref_put (line 290) | static inline void key_ref_put(key_ref_t key_ref)
  type key (line 295) | struct key
  type key_type (line 295) | struct key_type
  type key_tag (line 297) | struct key_tag
  type key (line 300) | struct key
  type key_type (line 300) | struct key_type
  type key_tag (line 302) | struct key_tag
  type key (line 304) | struct key
  type key_type (line 304) | struct key_type
  type key_tag (line 306) | struct key_tag
  type key (line 319) | struct key
  type key_type (line 319) | struct key_type
  type key (line 358) | struct key
  type key (line 360) | struct key
  type key (line 374) | struct key
  type key (line 375) | struct key
  type key (line 377) | struct key
  type key (line 378) | struct key
  type key (line 379) | struct key
  type key (line 382) | struct key
  type key (line 383) | struct key
  type key (line 385) | struct key
  type cred (line 386) | struct cred
  type key_restriction (line 389) | struct key_restriction
  type key (line 390) | struct key
  type key (line 392) | struct key
  type key_type (line 393) | struct key_type
  type key (line 395) | struct key
  type key (line 397) | struct key
  type key_type (line 400) | struct key_type
  type key (line 404) | struct key
  type key (line 405) | struct key
  type key (line 410) | struct key
  function key_serial_t (line 412) | static inline key_serial_t key_serial(const struct key *key)
  type key (line 417) | struct key
  type user_namespace (line 421) | struct user_namespace
  function key_read_state (line 434) | static inline short key_read_state(const struct key *key)
  function key_is_positive (line 447) | static inline bool key_is_positive(const struct key *key)
  function key_is_negative (line 452) | static inline bool key_is_negative(const struct key *key)
  type ctl_table (line 470) | struct ctl_table
  type cred (line 475) | struct cred
  type cred (line 476) | struct cred
  type cred (line 477) | struct cred

FILE: t/tree/include/linux/kmod.h
  function request_module (line 23) | extern __printf(2, 3)
  function request_module_nowait (line 31) | static inline int request_module_nowait(const char *name, ...) { return ...

FILE: t/tree/include/linux/log2.h
  function __ilog2_u32 (line 21) | static inline __attribute__((const))
  function __ilog2_u64 (line 29) | static inline __attribute__((const))
  function is_power_of_2 (line 44) | static inline __attribute__((const))
  function __roundup_pow_of_two (line 54) | static inline __attribute__((const))
  function __rounddown_pow_of_two (line 64) | static inline __attribute__((const))
  function __attribute_const__ (line 197) | static inline __attribute_const__
  function __bits_per (line 224) | static inline __attribute__((const))

FILE: t/tree/include/linux/logic_pio.h
  type logic_pio_hwaddr (line 18) | struct logic_pio_hwaddr {
  type logic_pio_host_ops (line 30) | struct logic_pio_host_ops {
  type logic_pio_hwaddr (line 116) | struct logic_pio_hwaddr
  type fwnode_handle (line 116) | struct fwnode_handle
  type fwnode_handle (line 117) | struct fwnode_handle
  type logic_pio_hwaddr (line 119) | struct logic_pio_hwaddr
  type logic_pio_hwaddr (line 120) | struct logic_pio_hwaddr

FILE: t/tree/include/linux/memblock.h
  type memblock_flags (line 35) | enum memblock_flags {
  type memblock_region (line 49) | struct memblock_region {
  type memblock_type (line 66) | struct memblock_type {
  type memblock (line 82) | struct memblock {
  type memblock (line 92) | struct memblock
  function memblock_discard (line 102) | static inline void memblock_discard(void) {}
  type memblock_type (line 120) | struct memblock_type
  type memblock_flags (line 133) | enum memblock_flags
  type memblock_type (line 134) | struct memblock_type
  type memblock_type (line 135) | struct memblock_type
  type memblock_flags (line 138) | enum memblock_flags
  type memblock_type (line 139) | struct memblock_type
  type memblock_type (line 140) | struct memblock_type
  function memblock_is_hotpluggable (line 203) | static inline bool memblock_is_hotpluggable(struct memblock_region *m)
  function memblock_is_mirror (line 208) | static inline bool memblock_is_mirror(struct memblock_region *m)
  function memblock_is_nomap (line 213) | static inline bool memblock_is_nomap(struct memblock_region *m)
  type zone (line 240) | struct zone
  type memblock_type (line 315) | struct memblock_type
  function memblock_set_region_node (line 317) | static inline void memblock_set_region_node(struct memblock_region *r, i...
  function memblock_get_region_node (line 322) | static inline int memblock_get_region_node(const struct memblock_region *r)
  function memblock_set_region_node (line 327) | static inline void memblock_set_region_node(struct memblock_region *r, i...
  function memblock_get_region_node (line 331) | static inline int memblock_get_region_node(const struct memblock_region *r)
  function phys_addr_t (line 353) | static inline phys_addr_t memblock_phys_alloc(phys_addr_t size,
  function memblock_free_early (line 406) | static inline void __init memblock_free_early(phys_addr_t base,
  function memblock_free_early_nid (line 412) | static inline void __init memblock_free_early_nid(phys_addr_t base,
  function memblock_free_late (line 418) | static inline void __init memblock_free_late(phys_addr_t base, phys_addr...
  function memblock_set_bottom_up (line 426) | static inline void __init memblock_set_bottom_up(bool enable)
  function memblock_bottom_up (line 436) | static inline bool memblock_bottom_up(void)
  function memblock_dump_all (line 457) | static inline void memblock_dump_all(void)
  function memblock_region_memory_base_pfn (line 488) | static inline unsigned long memblock_region_memory_base_pfn(const struct...
  function memblock_region_memory_end_pfn (line 499) | static inline unsigned long memblock_region_memory_end_pfn(const struct ...
  function memblock_region_reserved_base_pfn (line 510) | static inline unsigned long memblock_region_reserved_base_pfn(const stru...
  function memblock_region_reserved_end_pfn (line 521) | static inline unsigned long memblock_region_reserved_end_pfn(const struc...
  function early_memtest (line 564) | static inline void early_memtest(phys_addr_t start, phys_addr_t end)

FILE: t/tree/include/linux/of.h
  type u32 (line 28) | typedef u32 phandle;
  type u32 (line 29) | typedef u32 ihandle;
  type property (line 31) | struct property {
  type of_irq_controller (line 48) | struct of_irq_controller
  type device_node (line 51) | struct device_node {
  type of_phandle_args (line 74) | struct of_phandle_args {
  type of_phandle_iterator (line 80) | struct of_phandle_iterator {
  type of_reconfig_data (line 97) | struct of_reconfig_data {
  type kobj_type (line 104) | struct kobj_type
  type fwnode_operations (line 105) | struct fwnode_operations
  function of_node_init (line 106) | static inline void of_node_init(struct device_node *node)
  type device_node (line 121) | struct device_node
  type device_node (line 121) | struct device_node
  type device_node (line 122) | struct device_node
  type device_node (line 125) | struct device_node
  type device_node (line 125) | struct device_node
  function of_node_put (line 129) | static inline void of_node_put(struct device_node *node) { }
  type device_node (line 133) | struct device_node
  type device_node (line 134) | struct device_node
  type device_node (line 135) | struct device_node
  type device_node (line 136) | struct device_node
  function is_of_node (line 155) | static inline bool is_of_node(const struct fwnode_handle *fwnode)
  function of_have_populated_dt (line 178) | static inline bool of_have_populated_dt(void)
  function of_node_is_root (line 183) | static inline bool of_node_is_root(const struct device_node *node)
  function of_node_check_flag (line 188) | static inline int of_node_check_flag(struct device_node *n, unsigned lon...
  function of_node_test_and_set_flag (line 193) | static inline int of_node_test_and_set_flag(struct device_node *n,
  function of_node_set_flag (line 199) | static inline void of_node_set_flag(struct device_node *n, unsigned long...
  function of_node_clear_flag (line 204) | static inline void of_node_clear_flag(struct device_node *n, unsigned lo...
  function of_property_check_flag (line 210) | static inline int of_property_check_flag(struct property *p, unsigned lo...
  function of_property_set_flag (line 215) | static inline void of_property_set_flag(struct property *p, unsigned lon...
  function of_property_clear_flag (line 220) | static inline void of_property_clear_flag(struct property *p, unsigned l...
  type device_node (line 226) | struct device_node
  type device_node (line 226) | struct device_node
  type device_node (line 227) | struct device_node
  type device_node (line 227) | struct device_node
  function u64 (line 234) | static inline u64 of_read_number(const __be32 *cell, int size)
  function of_read_ulong (line 243) | static inline unsigned long of_read_ulong(const __be32 *cell, int size)
  type device_node (line 256) | struct device_node
  type device_node (line 257) | struct device_node
  type device_node (line 259) | struct device_node
  type device_node (line 267) | struct device_node
  type device_node (line 267) | struct device_node
  type device_node (line 269) | struct device_node
  type device_node (line 269) | struct device_node
  type device_node (line 271) | struct device_node
  type device_node (line 271) | struct device_node
  type device_node (line 273) | struct device_node
  type device_node (line 274) | struct device_node
  type of_device_id (line 275) | struct of_device_id
  type of_device_id (line 276) | struct of_device_id
  type device_node (line 278) | struct device_node
  type device_node (line 280) | struct device_node
  type device_node (line 285) | struct device_node
  type device_node (line 286) | struct device_node
  type device_node (line 286) | struct device_node
  type device_node (line 287) | struct device_node
  type device_node (line 287) | struct device_node
  type device_node (line 288) | struct device_node
  type device_node (line 288) | struct device_node
  type device_node (line 289) | struct device_node
  type device_node (line 290) | struct device_node
  type device_node (line 291) | struct device_node
  type device_node (line 291) | struct device_node
  type device_node (line 293) | struct device_node
  type device_node (line 293) | struct device_node
  type device_node (line 295) | struct device_node
  type device_node (line 295) | struct device_node
  type device_node (line 299) | struct device_node
  type device_node (line 299) | struct device_node
  type device_node (line 301) | struct device_node
  type device_node (line 302) | struct device_node
  type property (line 304) | struct property
  type device_node (line 304) | struct device_node
  type device_node (line 307) | struct device_node
  type device_node (line 309) | struct device_node
  type device_node (line 312) | struct device_node
  type device_node (line 315) | struct device_node
  type device_node (line 318) | struct device_node
  type device_node (line 321) | struct device_node
  type device_node (line 326) | struct device_node
  type device_node (line 328) | struct device_node
  type device_node (line 334) | struct device_node
  type device_node (line 337) | struct device_node
  type device_node (line 340) | struct device_node
  type device_node (line 343) | struct device_node
  type device_node (line 345) | struct device_node
  type device_node (line 347) | struct device_node
  type device_node (line 348) | struct device_node
  type device_node (line 349) | struct device_node
  type device_node (line 352) | struct device_node
  type device_node (line 353) | struct device_node
  type device_node (line 353) | struct device_node
  type device_node (line 358) | struct device_node
  type device_node (line 359) | struct device_node
  type of_device_id (line 360) | struct of_device_id
  type of_device_id (line 361) | struct of_device_id
  type device_node (line 361) | struct device_node
  type device_node (line 362) | struct device_node
  type of_phandle_args (line 363) | struct of_phandle_args
  type device_node (line 364) | struct device_node
  type device_node (line 364) | struct device_node
  type device_node (line 367) | struct device_node
  type of_phandle_args (line 369) | struct of_phandle_args
  type device_node (line 370) | struct device_node
  type of_phandle_args (line 372) | struct of_phandle_args
  type device_node (line 373) | struct device_node
  type of_phandle_args (line 375) | struct of_phandle_args
  type device_node (line 376) | struct device_node
  type of_phandle_iterator (line 380) | struct of_phandle_iterator
  type device_node (line 381) | struct device_node
  type of_phandle_iterator (line 386) | struct of_phandle_iterator
  type of_phandle_iterator (line 387) | struct of_phandle_iterator
  type device_node (line 392) | struct device_node
  type of_device_id (line 394) | struct of_device_id
  type device_node (line 400) | struct device_node
  type property (line 400) | struct property
  type device_node (line 401) | struct device_node
  type property (line 401) | struct property
  type device_node (line 402) | struct device_node
  type property (line 402) | struct property
  type device_node (line 411) | struct device_node
  type device_node (line 412) | struct device_node
  function of_property_read_u8_array (line 434) | static inline int of_property_read_u8_array(const struct device_node *np,
  function of_property_read_u16_array (line 464) | static inline int of_property_read_u16_array(const struct device_node *np,
  function of_property_read_u32_array (line 492) | static inline int of_property_read_u32_array(const struct device_node *np,
  function of_property_read_u64_array (line 520) | static inline int of_property_read_u64_array(const struct device_node *np,
  type property (line 540) | struct property
  type property (line 549) | struct property
  type device_node (line 551) | struct device_node
  type device_node (line 553) | struct device_node
  type device_node (line 555) | struct device_node
  type device_node (line 557) | struct device_node
  function of_core_init (line 561) | static inline void of_core_init(void)
  function is_of_node (line 565) | static inline bool is_of_node(const struct fwnode_handle *fwnode)
  type device_node (line 570) | struct device_node
  type fwnode_handle (line 570) | struct fwnode_handle
  function of_node_name_eq (line 575) | static inline bool of_node_name_eq(const struct device_node *np, const c...
  function of_node_name_prefix (line 580) | static inline bool of_node_name_prefix(const struct device_node *np, con...
  type device_node (line 585) | struct device_node
  type device_node (line 590) | struct device_node
  type device_node (line 590) | struct device_node
  type device_node (line 596) | struct device_node
  type device_node (line 596) | struct device_node
  type device_node (line 602) | struct device_node
  type device_node (line 603) | struct device_node
  type of_device_id (line 604) | struct of_device_id
  type of_device_id (line 605) | struct of_device_id
  type device_node (line 610) | struct device_node
  type device_node (line 615) | struct device_node
  type device_node (line 621) | struct device_node
  type device_node (line 626) | struct device_node
  type device_node (line 626) | struct device_node
  type device_node (line 631) | struct device_node
  type device_node (line 632) | struct device_node
  type device_node (line 632) | struct device_node
  type device_node (line 637) | struct device_node
  type device_node (line 638) | struct device_node
  type device_node (line 638) | struct device_node
  type device_node (line 643) | struct device_node
  type device_node (line 644) | struct device_node
  function of_have_populated_dt (line 651) | static inline bool of_have_populated_dt(void)
  type device_node (line 656) | struct device_node
  type device_node (line 656) | struct device_node
  type device_node (line 662) | struct device_node
  type device_node (line 663) | struct device_node
  function of_device_is_compatible (line 669) | static inline int of_device_is_compatible(const struct device_node *device,
  function of_device_compatible_match (line 675) | static inline  int of_device_compatible_match(struct device_node *device,
  function of_device_is_available (line 681) | static inline bool of_device_is_available(const struct device_node *device)
  function of_device_is_big_endian (line 686) | static inline bool of_device_is_big_endian(const struct device_node *dev...
  type property (line 691) | struct property
  type device_node (line 691) | struct device_node
  type device_node (line 698) | struct device_node
  type device_node (line 699) | struct device_node
  function of_property_count_elems_of_size (line 706) | static inline int of_property_count_elems_of_size(const struct device_no...
  function of_property_read_u8_array (line 712) | static inline int of_property_read_u8_array(const struct device_node *np,
  function of_property_read_u16_array (line 718) | static inline int of_property_read_u16_array(const struct device_node *np,
  function of_property_read_u32_array (line 724) | static inline int of_property_read_u32_array(const struct device_node *np,
  function of_property_read_u64_array (line 731) | static inline int of_property_read_u64_array(const struct device_node *np,
  function of_property_read_u32_index (line 738) | static inline int of_property_read_u32_index(const struct device_node *np,
  function of_property_read_u64_index (line 744) | static inline int of_property_read_u64_index(const struct device_node *np,
  type device_node (line 750) | struct device_node
  type device_node (line 757) | struct device_node
  type device_node (line 763) | struct device_node
  type device_node (line 763) | struct device_node
  function of_n_addr_cells (line 768) | static inline int of_n_addr_cells(struct device_node *np)
  function of_n_size_cells (line 773) | static inline int of_n_size_cells(struct device_node *np)
  function of_property_read_variable_u8_array (line 778) | static inline int of_property_read_variable_u8_array(const struct device...
  function of_property_read_variable_u16_array (line 785) | static inline int of_property_read_variable_u16_array(const struct devic...
  function of_property_read_variable_u32_array (line 792) | static inline int of_property_read_variable_u32_array(const struct devic...
  function of_property_read_u64 (line 801) | static inline int of_property_read_u64(const struct device_node *np,
  function of_property_read_variable_u64_array (line 807) | static inline int of_property_read_variable_u64_array(const struct devic...
  function of_property_read_string (line 816) | static inline int of_property_read_string(const struct device_node *np,
  function of_property_match_string (line 823) | static inline int of_property_match_string(const struct device_node *np,
  function of_property_read_string_helper (line 830) | static inline int of_property_read_string_helper(const struct device_nod...
  type device_node (line 837) | struct device_node
  type device_node (line 837) | struct device_node
  function of_parse_phandle_with_args (line 844) | static inline int of_parse_phandle_with_args(const struct device_node *np,
  function of_parse_phandle_with_args_map (line 853) | static inline int of_parse_phandle_with_args_map(const struct device_nod...
  function of_parse_phandle_with_fixed_args (line 862) | static inline int of_parse_phandle_with_fixed_args(const struct device_n...
  function of_count_phandle_with_args (line 869) | static inline int of_count_phandle_with_args(struct device_node *np,
  function of_phandle_iterator_init (line 876) | static inline int of_phandle_iterator_init(struct of_phandle_iterator *it,
  function of_phandle_iterator_next (line 885) | static inline int of_phandle_iterator_next(struct of_phandle_iterator *it)
  function of_phandle_iterator_args (line 890) | static inline int of_phandle_iterator_args(struct of_phandle_iterator *it,
  function of_alias_get_id (line 897) | static inline int of_alias_get_id(struct device_node *np, const char *stem)
  function of_alias_get_highest_id (line 902) | static inline int of_alias_get_highest_id(const char *stem)
  function of_alias_get_alias_list (line 907) | static inline int of_alias_get_alias_list(const struct of_device_id *mat...
  function of_machine_is_compatible (line 914) | static inline int of_machine_is_compatible(const char *compat)
  function of_console_check (line 919) | static inline bool of_console_check(const struct device_node *dn, const ...
  function __be32 (line 924) | static inline const __be32 *of_prop_next_u32(struct property *prop,
  type property (line 930) | struct property
  function of_node_check_flag (line 936) | static inline int of_node_check_flag(struct device_node *n, unsigned lon...
  function of_node_test_and_set_flag (line 941) | static inline int of_node_test_and_set_flag(struct device_node *n,
  function of_node_set_flag (line 947) | static inline void of_node_set_flag(struct device_node *n, unsigned long...
  function of_node_clear_flag (line 951) | static inline void of_node_clear_flag(struct device_node *n, unsigned lo...
  function of_property_check_flag (line 955) | static inline int of_property_check_flag(struct property *p, unsigned lo...
  function of_property_set_flag (line 960) | static inline void of_property_set_flag(struct property *p, unsigned lon...
  function of_property_clear_flag (line 964) | static inline void of_property_clear_flag(struct property *p, unsigned l...
  function of_cpu_node_to_id (line 968) | static inline int of_cpu_node_to_id(struct device_node *np)
  function of_map_rid (line 973) | static inline int of_map_rid(struct device_node *np, u32 rid,
  function of_prop_val_eq (line 991) | static inline int of_prop_val_eq(struct property *p1, struct property *p2)
  type device_node (line 998) | struct device_node
  function of_node_to_nid (line 1000) | static inline int of_node_to_nid(struct device_node *device)
  function of_numa_init (line 1009) | static inline int of_numa_init(void)
  type device_node (line 1015) | struct device_node
  type device_node (line 1016) | struct device_node
  type of_device_id (line 1017) | struct of_device_id
  type device_node (line 1022) | struct device_node
  function of_node_is_type (line 1027) | static inline bool of_node_is_type(const struct device_node *np, const c...
  function of_property_count_u8_elems (line 1045) | static inline int of_property_count_u8_elems(const struct device_node *np,
  function of_property_count_u16_elems (line 1062) | static inline int of_property_count_u16_elems(const struct device_node *np,
  function of_property_count_u32_elems (line 1079) | static inline int of_property_count_u32_elems(const struct device_node *np,
  function of_property_count_u64_elems (line 1096) | static inline int of_property_count_u64_elems(const struct device_node *np,
  function of_property_read_string_array (line 1115) | static inline int of_property_read_string_array(const struct device_node...
  function of_property_count_strings (line 1134) | static inline int of_property_count_strings(const struct device_node *np,
  function of_property_read_string_index (line 1158) | static inline int of_property_read_string_index(const struct device_node...
  function of_property_read_bool (line 1174) | static inline bool of_property_read_bool(const struct device_node *np,
  function of_property_read_u8 (line 1182) | static inline int of_property_read_u8(const struct device_node *np,
  function of_property_read_u16 (line 1189) | static inline int of_property_read_u16(const struct device_node *np,
  function of_property_read_u32 (line 1196) | static inline int of_property_read_u32(const struct device_node *np,
  function of_property_read_s32 (line 1203) | static inline int of_property_read_s32(const struct device_node *np,
  function of_get_child_count (line 1259) | static inline int of_get_child_count(const struct device_node *np)
  function of_get_available_child_count (line 1270) | static inline int of_get_available_child_count(const struct device_node ...
  type device_node (line 1295) | struct device_node
  type device_node (line 1295) | struct device_node
  type device_node (line 1296) | struct device_node
  type device_node (line 1297) | struct device_node
  type of_changeset_entry (line 1320) | struct of_changeset_entry {
  type of_changeset (line 1338) | struct of_changeset {
  type of_reconfig_change (line 1342) | enum of_reconfig_change {
  type notifier_block (line 1349) | struct notifier_block
  type notifier_block (line 1350) | struct notifier_block
  type of_reconfig_data (line 1351) | struct of_reconfig_data
  type of_reconfig_data (line 1353) | struct of_reconfig_data
  type of_changeset (line 1355) | struct of_changeset
  type of_changeset (line 1356) | struct of_changeset
  type of_changeset (line 1357) | struct of_changeset
  type of_changeset (line 1358) | struct of_changeset
  type of_changeset (line 1359) | struct of_changeset
  type device_node (line 1360) | struct device_node
  type property (line 1361) | struct property
  function of_changeset_attach_node (line 1363) | static inline int of_changeset_attach_node(struct of_changeset *ocs,
  function of_changeset_detach_node (line 1369) | static inline int of_changeset_detach_node(struct of_changeset *ocs,
  function of_changeset_add_property (line 1375) | static inline int of_changeset_add_property(struct of_changeset *ocs,
  function of_changeset_remove_property (line 1381) | static inline int of_changeset_remove_property(struct of_changeset *ocs,
  function of_changeset_update_property (line 1387) | static inline int of_changeset_update_property(struct of_changeset *ocs,
  function of_reconfig_notifier_register (line 1393) | static inline int of_reconfig_notifier_register(struct notifier_block *nb)
  function of_reconfig_notifier_unregister (line 1397) | static inline int of_reconfig_notifier_unregister(struct notifier_block ...
  function of_reconfig_notify (line 1401) | static inline int of_reconfig_notify(unsigned long action,
  function of_reconfig_get_state_change (line 1406) | static inline int of_reconfig_get_state_change(unsigned long action,
  function of_device_is_system_power_controller (line 1419) | static inline bool of_device_is_system_power_controller(const struct dev...
  type of_overlay_notify_action (line 1428) | enum of_overlay_notify_action {
  type of_overlay_notify_data (line 1435) | struct of_overlay_notify_data {
  type notifier_block (line 1447) | struct notifier_block
  type notifier_block (line 1448) | struct notifier_block
  function of_overlay_fdt_apply (line 1452) | static inline int of_overlay_fdt_apply(void *overlay_fdt, u32 overlay_fd...
  function of_overlay_remove (line 1458) | static inline int of_overlay_remove(int *ovcs_id)
  function of_overlay_remove_all (line 1463) | static inline int of_overlay_remove_all(void)
  function of_overlay_notifier_register (line 1468) | static inline int of_overlay_notifier_register(struct notifier_block *nb)
  function of_overlay_notifier_unregister (line 1473) | static inline int of_overlay_notifier_unregister(struct notifier_block *nb)

FILE: t/tree/include/linux/of_platform.h
  type of_dev_auxdata (line 37) | struct of_dev_auxdata {
  type of_device_id (line 49) | struct of_device_id
  type platform_device (line 52) | struct platform_device
  type device_node (line 52) | struct device_node
  type device (line 54) | struct device
  type platform_device (line 56) | struct platform_device
  type device_node (line 56) | struct device_node
  type platform_device (line 58) | struct platform_device
  type device_node (line 58) | struct device_node
  type platform_device (line 65) | struct platform_device
  type device_node (line 65) | struct device_node
  type device (line 67) | struct device
  type device (line 69) | struct device
  type device_node (line 70) | struct device_node
  type of_device_id (line 71) | struct of_device_id
  type device (line 72) | struct device
  type device_node (line 74) | struct device_node
  type of_device_id (line 75) | struct of_device_id
  type of_dev_auxdata (line 76) | struct of_dev_auxdata
  type device (line 77) | struct device
  type device_node (line 78) | struct device_node
  type of_dev_auxdata (line 79) | struct of_dev_auxdata
  type device (line 80) | struct device
  type device (line 81) | struct device
  type device (line 83) | struct device
  type device (line 85) | struct device
  function of_platform_populate (line 87) | static inline int of_platform_populate(struct device_node *root,
  function of_platform_default_populate (line 94) | static inline int of_platform_default_populate(struct device_node *root,
  function of_platform_depopulate (line 100) | static inline void of_platform_depopulate(struct device *parent) { }
  function devm_of_platform_populate (line 102) | static inline int devm_of_platform_populate(struct device *dev)
  function devm_of_platform_depopulate (line 107) | static inline void devm_of_platform_depopulate(struct device *dev) { }
  function of_platform_register_reconfig_notifier (line 113) | static inline void of_platform_register_reconfig_notifier(void) { }

FILE: t/tree/include/linux/plist.h
  type plist_head (line 79) | struct plist_head {
  type plist_node (line 83) | struct plist_node {
  function plist_head_init (line 121) | static inline void
  function plist_node_init (line 132) | static inline void plist_node_init(struct plist_node *node, int prio)
  type plist_node (line 139) | struct plist_node
  type plist_head (line 139) | struct plist_head
  type plist_node (line 140) | struct plist_node
  type plist_head (line 140) | struct plist_head
  type plist_node (line 142) | struct plist_node
  type plist_head (line 142) | struct plist_head
  function plist_head_empty (line 210) | static inline int plist_head_empty(const struct plist_head *head)
  function plist_node_empty (line 219) | static inline int plist_node_empty(const struct plist_node *node)
  type plist_node (line 280) | struct plist_node
  type plist_head (line 280) | struct plist_head
  type plist_node (line 292) | struct plist_node
  type plist_head (line 292) | struct plist_head

FILE: t/tree/include/linux/pm.h
  type device (line 25) | struct device
  type device (line 27) | struct device
  type device (line 28) | struct device
  function pm_vt_switch_required (line 30) | static inline void pm_vt_switch_required(struct device *dev, bool required)
  function pm_vt_switch_unregister (line 33) | static inline void pm_vt_switch_unregister(struct device *dev)
  type device (line 42) | struct device
  type pm_message_t (line 50) | typedef struct pm_message {
  type dev_pm_ops (line 278) | struct dev_pm_ops {
  type rpm_status (line 496) | enum rpm_status {
  type rpm_request (line 518) | enum rpm_request {
  type wakeup_source (line 526) | struct wakeup_source
  type wake_irq (line 527) | struct wake_irq
  type pm_domain_data (line 528) | struct pm_domain_data
  type pm_subsys_data (line 530) | struct pm_subsys_data {
  type dev_pm_info (line 573) | struct dev_pm_info {
  type device (line 633) | struct device
  type device (line 634) | struct device
  type dev_pm_domain (line 649) | struct dev_pm_domain {
  type device (line 735) | struct device
  type device (line 735) | struct device
  type device (line 736) | struct device
  type device (line 738) | struct device
  type device (line 739) | struct device
  type device (line 740) | struct device
  type device (line 741) | struct device
  type device (line 742) | struct device
  type device (line 743) | struct device
  type device (line 744) | struct device
  type device (line 745) | struct device
  type device (line 746) | struct device
  type device (line 747) | struct device
  type device (line 748) | struct device
  type device (line 749) | struct device
  type device (line 750) | struct device
  type device (line 751) | struct device
  type device (line 752) | struct device
  type device (line 753) | struct device
  type device (line 754) | struct device
  type device (line 755) | struct device
  type device (line 756) | struct device
  type device (line 757) | struct device
  type device (line 759) | struct device
  type device (line 760) | struct device
  function dpm_suspend_start (line 767) | static inline int dpm_suspend_start(pm_message_t state)
  function device_pm_wait_for_dev (line 774) | static inline int device_pm_wait_for_dev(struct device *a, struct device...
  function dpm_for_each_dev (line 779) | static inline void dpm_for_each_dev(void *data, void (*fn)(struct device...
  type dpm_order (line 806) | enum dpm_order {

FILE: t/tree/include/linux/pm_wakeup.h
  type wake_irq (line 18) | struct wake_irq
  type wakeup_source (line 43) | struct wakeup_source {
  function device_can_wakeup (line 72) | static inline bool device_can_wakeup(struct device *dev)
  function device_may_wakeup (line 77) | static inline bool device_may_wakeup(struct device *dev)
  function device_set_wakeup_path (line 82) | static inline void device_set_wakeup_path(struct device *dev)
  type wakeup_source (line 88) | struct wakeup_source
  type wakeup_source (line 89) | struct wakeup_source
  type wakeup_source (line 90) | struct wakeup_source
  type wakeup_source (line 91) | struct wakeup_source
  type wakeup_source (line 92) | struct wakeup_source
  type device (line 92) | struct device
  type wakeup_source (line 94) | struct wakeup_source
  type device (line 95) | struct device
  type device (line 96) | struct device
  type device (line 97) | struct device
  type device (line 98) | struct device
  type device (line 99) | struct device
  type wakeup_source (line 100) | struct wakeup_source
  type device (line 101) | struct device
  type wakeup_source (line 102) | struct wakeup_source
  type device (line 103) | struct device
  type wakeup_source (line 104) | struct wakeup_source
  type device (line 105) | struct device
  function device_set_wakeup_capable (line 109) | static inline void device_set_wakeup_capable(struct device *dev, bool ca...
  function device_can_wakeup (line 114) | static inline bool device_can_wakeup(struct device *dev)
  type wakeup_source (line 119) | struct wakeup_source
  function wakeup_source_destroy (line 124) | static inline void wakeup_source_destroy(struct wakeup_source *ws) {}
  function wakeup_source_add (line 126) | static inline void wakeup_source_add(struct wakeup_source *ws) {}
  function wakeup_source_remove (line 128) | static inline void wakeup_source_remove(struct wakeup_source *ws) {}
  type wakeup_source (line 130) | struct wakeup_source
  type device (line 130) | struct device
  function wakeup_source_unregister (line 136) | static inline void wakeup_source_unregister(struct wakeup_source *ws) {}
  function device_wakeup_enable (line 138) | static inline int device_wakeup_enable(struct device *dev)
  function device_wakeup_disable (line 144) | static inline int device_wakeup_disable(struct device *dev)
  function device_set_wakeup_enable (line 150) | static inline int device_set_wakeup_enable(struct device *dev, bool enable)
  function device_init_wakeup (line 156) | static inline int device_init_wakeup(struct device *dev, bool val)
  function device_may_wakeup (line 163) | static inline bool device_may_wakeup(struct device *dev)
  function device_set_wakeup_path (line 168) | static inline void device_set_wakeup_path(struct device *dev) {}
  function __pm_stay_awake (line 170) | static inline void __pm_stay_awake(struct wakeup_source *ws) {}
  function pm_stay_awake (line 172) | static inline void pm_stay_awake(struct device *dev) {}
  function __pm_relax (line 174) | static inline void __pm_relax(struct wakeup_source *ws) {}
  function pm_relax (line 176) | static inline void pm_relax(struct device *dev) {}
  function pm_wakeup_ws_event (line 178) | static inline void pm_wakeup_ws_event(struct wakeup_source *ws,
  function pm_wakeup_dev_event (line 181) | static inline void pm_wakeup_dev_event(struct device *dev, unsigned int ...
  function __pm_wakeup_event (line 186) | static inline void __pm_wakeup_event(struct wakeup_source *ws, unsigned ...
  function pm_wakeup_event (line 191) | static inline void pm_wakeup_event(struct device *dev, unsigned int msec)
  function pm_wakeup_hard_event (line 196) | static inline void pm_wakeup_hard_event(struct device *dev)

FILE: t/tree/include/linux/radix-tree.h
  function radix_tree_is_internal_node (line 43) | static inline bool radix_tree_is_internal_node(void *ptr)
  function radix_tree_empty (line 74) | static inline bool radix_tree_empty(const struct radix_tree_root *root)
  type radix_tree_iter (line 94) | struct radix_tree_iter {
  function radix_tree_deref_retry (line 192) | static inline int radix_tree_deref_retry(void *arg)
  function radix_tree_exception (line 202) | static inline int radix_tree_exception(void *arg)
  type radix_tree_root (line 207) | struct radix_tree_root
  type radix_tree_root (line 209) | struct radix_tree_root
  type radix_tree_node (line 210) | struct radix_tree_node
  type radix_tree_root (line 211) | struct radix_tree_root
  type radix_tree_root (line 212) | struct radix_tree_root
  type radix_tree_root (line 214) | struct radix_tree_root
  type radix_tree_node (line 214) | struct radix_tree_node
  type radix_tree_root (line 216) | struct radix_tree_root
  type radix_tree_iter (line 217) | struct radix_tree_iter
  type radix_tree_root (line 218) | struct radix_tree_root
  type radix_tree_root (line 220) | struct radix_tree_root
  type radix_tree_iter (line 221) | struct radix_tree_iter
  type radix_tree_root (line 222) | struct radix_tree_root
  type radix_tree_root (line 223) | struct radix_tree_root
  type radix_tree_root (line 224) | struct radix_tree_root
  type radix_tree_root (line 230) | struct radix_tree_root
  type radix_tree_root (line 232) | struct radix_tree_root
  type radix_tree_root (line 234) | struct radix_tree_root
  type radix_tree_root (line 236) | struct radix_tree_root
  type radix_tree_iter (line 237) | struct radix_tree_iter
  type radix_tree_root (line 238) | struct radix_tree_root
  type radix_tree_root (line 241) | struct radix_tree_root
  type radix_tree_root (line 244) | struct radix_tree_root
  function radix_tree_preload_end (line 246) | static inline void radix_tree_preload_end(void)
  type radix_tree_root (line 251) | struct radix_tree_root
  type radix_tree_iter (line 252) | struct radix_tree_iter
  function __rcu (line 268) | __rcu **
  type radix_tree_root (line 297) | struct radix_tree_root
  type radix_tree_iter (line 298) | struct radix_tree_iter
  type radix_tree_root (line 311) | struct radix_tree_root
  type radix_tree_iter (line 312) | struct radix_tree_iter
  function __rcu (line 328) | __rcu **radix_tree_iter_retry(struct radix_tree_iter *iter)
  function __radix_tree_iter_add (line 335) | static inline unsigned long
  type radix_tree_iter (line 352) | struct radix_tree_iter
  function radix_tree_chunk_size (line 360) | static __always_inline long
  function __rcu (line 385) | __rcu **radix_tree_next_slot(void __rcu **slot,

FILE: t/tree/include/linux/rbtree.h
  type rb_node (line 24) | struct rb_node {
  type rb_root (line 31) | struct rb_root {
  type rb_node (line 49) | struct rb_node
  type rb_root (line 49) | struct rb_root
  type rb_node (line 50) | struct rb_node
  type rb_root (line 50) | struct rb_root
  type rb_node (line 54) | struct rb_node
  type rb_node (line 54) | struct rb_node
  type rb_node (line 55) | struct rb_node
  type rb_node (line 55) | struct rb_node
  type rb_node (line 56) | struct rb_node
  type rb_root (line 56) | struct rb_root
  type rb_node (line 57) | struct rb_node
  type rb_root (line 57) | struct rb_root
  type rb_node (line 60) | struct rb_node
  type rb_root (line 60) | struct rb_root
  type rb_node (line 61) | struct rb_node
  type rb_node (line 61) | struct rb_node
  type rb_node (line 64) | struct rb_node
  type rb_node (line 64) | struct rb_node
  type rb_root (line 65) | struct rb_root
  type rb_node (line 66) | struct rb_node
  type rb_node (line 66) | struct rb_node
  type rb_root (line 67) | struct rb_root
  function rb_link_node (line 69) | static inline void rb_link_node(struct rb_node *node, struct rb_node *pa...
  function rb_link_node_rcu (line 78) | static inline void rb_link_node_rcu(struct rb_node *node, struct rb_node...
  type rb_root_cached (line 125) | struct rb_root_cached {
  function rb_insert_color_cached (line 135) | static inline void rb_insert_color_cached(struct rb_node *node,
  function rb_erase_cached (line 144) | static inline void rb_erase_cached(struct rb_node *node,
  function rb_replace_node_cached (line 152) | static inline void rb_replace_node_cached(struct rb_node *victim,

FILE: t/tree/include/linux/rcu_segcblist.h
  type rcu_cblist (line 21) | struct rcu_cblist {
  type rcu_segcblist (line 67) | struct rcu_segcblist {

FILE: t/tree/include/linux/rcu_sync.h
  type rcu_sync (line 17) | struct rcu_sync {
  function rcu_sync_is_idle (line 32) | static inline bool rcu_sync_is_idle(struct rcu_sync *rsp)
  type rcu_sync (line 39) | struct rcu_sync
  type rcu_sync (line 40) | struct rcu_sync
  type rcu_sync (line 41) | struct rcu_sync
  type rcu_sync (line 42) | struct rcu_sync
  type rcu_sync (line 43) | struct rcu_sync

FILE: t/tree/include/linux/rcupdate.h
  type rcu_head (line 38) | struct rcu_head
  function __rcu_read_lock (line 57) | static inline void __rcu_read_lock(void)
  function __rcu_read_unlock (line 62) | static inline void __rcu_read_unlock(void)
  function rcu_preempt_depth (line 67) | static inline int rcu_preempt_depth(void)
  function rcu_sysrq_start (line 85) | static inline void rcu_sysrq_start(void) { }
  function rcu_sysrq_end (line 86) | static inline void rcu_sysrq_end(void) { }
  function rcu_user_enter (line 93) | static inline void rcu_user_enter(void) { }
  function rcu_user_exit (line 94) | static inline void rcu_user_exit(void) { }
  function rcu_init_nohz (line 100) | static inline void rcu_init_nohz(void) { }
  type rcu_head (line 139) | struct rcu_head
  function exit_tasks_rcu_start (line 148) | static inline void exit_tasks_rcu_start(void) { }
  function exit_tasks_rcu_finish (line 149) | static inline void exit_tasks_rcu_finish(void) { }
  type rcu_head (line 187) | struct rcu_head
  type rcu_head (line 188) | struct rcu_head
  type rcu_head (line 189) | struct rcu_head
  type rcu_head (line 190) | struct rcu_head
  function init_rcu_head (line 192) | static inline void init_rcu_head(struct rcu_head *head) { }
  function destroy_rcu_head (line 193) | static inline void destroy_rcu_head(struct rcu_head *head) { }
  function init_rcu_head_on_stack (line 194) | static inline void init_rcu_head_on_stack(struct rcu_head *head) { }
  function destroy_rcu_head_on_stack (line 195) | static inline void destroy_rcu_head_on_stack(struct rcu_head *head) { }
  function rcu_lockdep_current_cpu_online (line 201) | static inline bool rcu_lockdep_current_cpu_online(void) { return true; }
  function rcu_lock_acquire (line 206) | static inline void rcu_lock_acquire(struct lockdep_map *map)
  function rcu_lock_release (line 211) | static inline void rcu_lock_release(struct lockdep_map *map)
  type lockdep_map (line 216) | struct lockdep_map
  type lockdep_map (line 217) | struct lockdep_map
  type lockdep_map (line 218) | struct lockdep_map
  type lockdep_map (line 219) | struct lockdep_map
  function rcu_read_lock_held (line 231) | static inline int rcu_read_lock_held(void)
  function rcu_read_lock_bh_held (line 236) | static inline int rcu_read_lock_bh_held(void)
  function rcu_read_lock_sched_held (line 241) | static inline int rcu_read_lock_sched_held(void)
  function rcu_read_lock_any_held (line 246) | static inline int rcu_read_lock_any_held(void)
  function rcu_preempt_sleep_check (line 270) | static inline void rcu_preempt_sleep_check(void)
  function rcu_preempt_sleep_check (line 276) | static inline void rcu_preempt_sleep_check(void) { }
  function __always_inline (line 595) | static __always_inline void rcu_read_lock(void)
  function rcu_read_unlock (line 647) | static inline void rcu_read_unlock(void)
  function rcu_read_lock_bh (line 668) | static inline void rcu_read_lock_bh(void)
  function rcu_read_unlock_bh (line 682) | static inline void rcu_read_unlock_bh(void)
  function rcu_read_lock_sched (line 703) | static inline void rcu_read_lock_sched(void)
  function notrace (line 713) | static inline notrace void rcu_read_lock_sched_notrace(void)
  function rcu_read_unlock_sched (line 724) | static inline void rcu_read_unlock_sched(void)
  function notrace (line 734) | static inline notrace void rcu_read_unlock_sched_notrace(void)
  function rcu_head_init (line 868) | static inline void rcu_head_init(struct rcu_head *rhp)
  function rcu_head_after_call_rcu (line 886) | static inline bool

FILE: t/tree/include/linux/rcutree.h
  function rcu_virt_note_context_switch (line 30) | static inline void rcu_virt_note_context_switch(int cpu)
  type rcu_head (line 36) | struct rcu_head

FILE: t/tree/include/linux/srcu.h
  type srcu_struct (line 24) | struct srcu_struct
  type srcu_struct (line 28) | struct srcu_struct
  type lock_class_key (line 29) | struct lock_class_key
  type srcu_struct (line 41) | struct srcu_struct
  type srcu_struct (line 54) | struct srcu_struct { }
  type srcu_struct (line 57) | struct srcu_struct
  type rcu_head (line 57) | struct rcu_head
  type rcu_head (line 58) | struct rcu_head
  type srcu_struct (line 59) | struct srcu_struct
  type srcu_struct (line 60) | struct srcu_struct
  type srcu_struct (line 61) | struct srcu_struct
  type srcu_struct (line 62) | struct srcu_struct
  function srcu_read_lock_held (line 82) | static inline int srcu_read_lock_held(const struct srcu_struct *ssp)
  function srcu_read_lock_held (line 91) | static inline int srcu_read_lock_held(const struct srcu_struct *ssp)
  function srcu_read_lock (line 150) | static inline int srcu_read_lock(struct srcu_struct *ssp) __acquires(ssp)
  function notrace (line 160) | static inline notrace int
  function srcu_read_unlock (line 176) | static inline void srcu_read_unlock(struct srcu_struct *ssp, int idx)
  function notrace (line 185) | static inline notrace void
  function smp_mb__after_srcu_read_unlock (line 200) | static inline void smp_mb__after_srcu_read_unlock(void)

FILE: t/tree/include/linux/srcutree.h
  type srcu_node (line 17) | struct srcu_node
  type srcu_struct (line 18) | struct srcu_struct
  type srcu_data (line 24) | struct srcu_data {
  type srcu_node (line 48) | struct srcu_node {
  type srcu_struct (line 64) | struct srcu_struct {
  type srcu_struct (line 137) | struct srcu_struct
  type srcu_struct (line 138) | struct srcu_struct
  type srcu_struct (line 139) | struct srcu_struct

FILE: t/tree/include/linux/stackdepot.h
  type u32 (line 14) | typedef u32 depot_stack_handle_t;

FILE: t/tree/include/linux/uprobes.h
  type vm_area_struct (line 19) | struct vm_area_struct
  type mm_struct (line 20) | struct mm_struct
  type inode (line 21) | struct inode
  type notifier_block (line 22) | struct notifier_block
  type page (line 23) | struct page
  type uprobe_filter_ctx (line 30) | enum uprobe_filter_ctx {
  type uprobe_consumer (line 36) | struct uprobe_consumer {
  type uprobe_task_state (line 51) | enum uprobe_task_state {
  type uprobe_task (line 61) | struct uprobe_task {
  type return_instance (line 83) | struct return_instance {
  type rp_check (line 93) | enum rp_check {
  type xol_area (line 99) | struct xol_area
  type uprobes_state (line 101) | struct uprobes_state {
  type arch_uprobe (line 106) | struct arch_uprobe
  type mm_struct (line 106) | struct mm_struct
  type arch_uprobe (line 107) | struct arch_uprobe
  type mm_struct (line 107) | struct mm_struct
  type pt_regs (line 110) | struct pt_regs
  type pt_regs (line 111) | struct pt_regs
  type arch_uprobe (line 112) | struct arch_uprobe
  type mm_struct (line 112) | struct mm_struct
  type inode (line 113) | struct inode
  type uprobe_consumer (line 113) | struct uprobe_consumer
  type inode (line 114) | struct inode
  type uprobe_consumer (line 114) | struct uprobe_consumer
  type inode (line 115) | struct inode
  type uprobe_consumer (line 115) | struct uprobe_consumer
  type inode (line 116) | struct inode
  type uprobe_consumer (line 116) | struct uprobe_consumer
  type vm_area_struct (line 117) | struct vm_area_struct
  type vm_area_struct (line 118) | struct vm_area_struct
  type mm_struct (line 121) | struct mm_struct
  type mm_struct (line 121) | struct mm_struct
  type task_struct (line 122) | struct task_struct
  type task_struct (line 123) | struct task_struct
  type pt_regs (line 124) | struct pt_regs
  type pt_regs (line 125) | struct pt_regs
  type pt_regs (line 126) | struct pt_regs
  type arch_uprobe (line 128) | struct arch_uprobe
  type pt_regs (line 128) | struct pt_regs
  type mm_struct (line 129) | struct mm_struct
  type arch_uprobe (line 130) | struct arch_uprobe
  type mm_struct (line 130) | struct mm_struct
  type arch_uprobe (line 131) | struct arch_uprobe
  type pt_regs (line 131) | struct pt_regs
  type arch_uprobe (line 132) | struct arch_uprobe
  type pt_regs (line 132) | struct pt_regs
  type task_struct (line 133) | struct task_struct
  type notifier_block (line 134) | struct notifier_block
  type arch_uprobe (line 135) | struct arch_uprobe
  type pt_regs (line 135) | struct pt_regs
  type pt_regs (line 136) | struct pt_regs
  type return_instance (line 137) | struct return_instance
  type rp_check (line 137) | enum rp_check
  type pt_regs (line 137) | struct pt_regs
  type arch_uprobe (line 138) | struct arch_uprobe
  type pt_regs (line 138) | struct pt_regs
  type page (line 139) | struct page
  type uprobes_state (line 142) | struct uprobes_state {
  function uprobes_init (line 145) | static inline void uprobes_init(void)
  function uprobe_register (line 151) | static inline int
  function uprobe_register_refctr (line 156) | static inline int uprobe_register_refctr(struct inode *inode, loff_t off...
  function uprobe_apply (line 160) | static inline int
  function uprobe_unregister (line 165) | static inline void
  function uprobe_mmap (line 169) | static inline int uprobe_mmap(struct vm_area_struct *vma)
  function uprobe_munmap (line 173) | static inline void
  function uprobe_start_dup_mmap (line 177) | static inline void uprobe_start_dup_mmap(void)
  function uprobe_end_dup_mmap (line 180) | static inline void uprobe_end_dup_mmap(void)
  function uprobe_dup_mmap (line 183) | static inline void
  function uprobe_notify_resume (line 187) | static inline void uprobe_notify_resume(struct pt_regs *regs)
  function uprobe_deny_signal (line 190) | static inline bool uprobe_deny_signal(void)
  function uprobe_free_utask (line 194) | static inline void uprobe_free_utask(struct task_struct *t)
  function uprobe_copy_process (line 197) | static inline void uprobe_copy_process(struct task_struct *t, unsigned l...
  function uprobe_clear_state (line 200) | static inline void uprobe_clear_state(struct mm_struct *mm)

FILE: t/tree/include/linux/xarray.h
  function xa_to_value (line 65) | static inline unsigned long xa_to_value(const void *entry)
  function xa_is_value (line 77) | static inline bool xa_is_value(const void *entry)
  function xa_pointer_tag (line 125) | static inline unsigned int xa_pointer_tag(void *entry)
  function xa_to_internal (line 155) | static inline unsigned long xa_to_internal(const void *entry)
  function xa_is_internal (line 167) | static inline bool xa_is_internal(const void *entry)
  function xa_is_zero (line 183) | static inline bool xa_is_zero(const void *entry)
  function xa_is_err (line 199) | static inline bool xa_is_err(const void *entry)
  function xa_err (line 217) | static inline int xa_err(void *entry)
  type xa_limit (line 236) | struct xa_limit {
  type xa_mark_t (line 246) | typedef unsigned __bitwise xa_mark_t;
  type xa_lock_type (line 254) | enum xa_lock_type {
  type xarray (line 292) | struct xarray {
  type xarray (line 347) | struct xarray
  type xarray (line 348) | struct xarray
  type xarray (line 349) | struct xarray
  type xarray (line 350) | struct xarray
  type xarray (line 352) | struct xarray
  type xarray (line 353) | struct xarray
  type xarray (line 354) | struct xarray
  type xarray (line 355) | struct xarray
  type xarray (line 357) | struct xarray
  type xarray (line 359) | struct xarray
  type xarray (line 361) | struct xarray
  function xa_init_flags (line 374) | static inline void xa_init_flags(struct xarray *xa, gfp_t flags)
  function xa_init (line 389) | static inline void xa_init(struct xarray *xa)
  function xa_empty (line 401) | static inline bool xa_empty(const struct xarray *xa)
  function xa_marked (line 414) | static inline bool xa_marked(const struct xarray *xa, xa_mark_t mark)
  type xarray (line 519) | struct xarray
  type xarray (line 520) | struct xarray
  type xarray (line 521) | struct xarray
  type xarray (line 523) | struct xarray
  type xarray (line 525) | struct xarray
  type xa_limit (line 526) | struct xa_limit
  type xarray (line 527) | struct xarray
  type xa_limit (line 528) | struct xa_limit
  type xarray (line 529) | struct xarray
  type xarray (line 530) | struct xarray
  type xarray (line 546) | struct xarray
  type xarray (line 572) | struct xarray
  type xarray (line 597) | struct xarray
  type xarray (line 621) | struct xarray
  type xarray (line 647) | struct xarray
  type xarray (line 674) | struct xarray
  type xarray (line 701) | struct xarray
  function xa_insert (line 730) | static inline int __must_check xa_insert(struct xarray *xa,
  function xa_insert_bh (line 759) | static inline int __must_check xa_insert_bh(struct xarray *xa,
  function xa_insert_irq (line 788) | static inline int __must_check xa_insert_irq(struct xarray *xa,
  function __must_check (line 817) | static inline __must_check int xa_alloc(struct xarray *xa, u32 *id,
  function xa_alloc_bh (line 846) | static inline int __must_check xa_alloc_bh(struct xarray *xa, u32 *id,
  function xa_alloc_irq (line 875) | static inline int __must_check xa_alloc_irq(struct xarray *xa, u32 *id,
  function xa_alloc_cyclic (line 908) | static inline int xa_alloc_cyclic(struct xarray *xa, u32 *id, void *entry,
  function xa_alloc_cyclic_bh (line 941) | static inline int xa_alloc_cyclic_bh(struct xarray *xa, u32 *id, void *e...
  function xa_alloc_cyclic_irq (line 974) | static inline int xa_alloc_cyclic_irq(struct xarray *xa, u32 *id, void *...
  function __must_check (line 1004) | static inline __must_check
  function __must_check (line 1022) | static inline __must_check
  function __must_check (line 1040) | static inline __must_check
  function xa_release (line 1055) | static inline void xa_release(struct xarray *xa, unsigned long index)
  type xa_node (line 1087) | struct xa_node {
  type xarray (line 1105) | struct xarray
  type xa_node (line 1106) | struct xa_node
  type xarray (line 1127) | struct xarray
  type xarray (line 1134) | struct xarray
  type xarray (line 1141) | struct xarray
  type xa_node (line 1142) | struct xa_node
  type xarray (line 1150) | struct xarray
  type xa_node (line 1151) | struct xa_node
  type xa_node (line 1159) | struct xa_node
  type xarray (line 1159) | struct xarray
  type xa_node (line 1160) | struct xa_node
  type xa_node (line 1167) | struct xa_node
  type xarray (line 1167) | struct xarray
  type xa_node (line 1168) | struct xa_node
  type xa_node (line 1175) | struct xa_node
  type xa_node (line 1181) | struct xa_node
  type xa_node (line 1183) | struct xa_node
  function xa_is_node (line 1187) | static inline bool xa_is_node(const void *entry)
  function xa_to_sibling (line 1199) | static inline unsigned long xa_to_sibling(const void *entry)
  function xa_is_sibling (line 1210) | static inline bool xa_is_sibling(const void *entry)
  function xa_is_retry (line 1224) | static inline bool xa_is_retry(const void *entry)
  function xa_is_advanced (line 1235) | static inline bool xa_is_advanced(const void *entry)
  type xa_node (line 1252) | struct xa_node
  type xa_state (line 1271) | struct xa_state {
  function xas_error (line 1350) | static inline int xas_error(const struct xa_state *xas)
  function xas_set_err (line 1364) | static inline void xas_set_err(struct xa_state *xas, long err)
  function xas_invalid (line 1375) | static inline bool xas_invalid(const struct xa_state *xas)
  function xas_valid (line 1386) | static inline bool xas_valid(const struct xa_state *xas)
  function xas_is_node (line 1397) | static inline bool xas_is_node(const struct xa_state *xas)
  function xas_not_node (line 1403) | static inline bool xas_not_node(struct xa_node *node)
  function xas_frozen (line 1409) | static inline bool xas_frozen(struct xa_node *node)
  function xas_top (line 1415) | static inline bool xas_top(struct xa_node *node)
  function xas_reset (line 1430) | static inline void xas_reset(struct xa_state *xas)
  function xas_retry (line 1447) | static inline bool xas_retry(struct xa_state *xas, const void *entry)
  type xa_state (line 1457) | struct xa_state
  type xa_state (line 1458) | struct xa_state
  type xa_state (line 1459) | struct xa_state
  type xa_state (line 1460) | struct xa_state
  type xa_state (line 1462) | struct xa_state
  type xa_state (line 1463) | struct xa_state
  type xa_state (line 1464) | struct xa_state
  type xa_state (line 1465) | struct xa_state
  type xa_state (line 1466) | struct xa_state
  type xa_state (line 1468) | struct xa_state
  type xa_state (line 1469) | struct xa_state
  type xa_state (line 1471) | struct xa_state
  type xa_state (line 1487) | struct xa_state
  type xa_node (line 1489) | struct xa_node
  function xas_set (line 1505) | static inline void xas_set(struct xa_state *xas, unsigned long index)
  function xas_set_order (line 1517) | static inline void xas_set_order(struct xa_state *xas, unsigned long index,
  function xas_set_update (line 1539) | static inline void xas_set_update(struct xa_state *xas, xa_update_node_t...
  type xa_state (line 1555) | struct xa_state
  type xa_node (line 1557) | struct xa_node
  function xas_find_chunk (line 1580) | static inline unsigned int xas_find_chunk(struct xa_state *xas, bool adv...
  type xa_state (line 1612) | struct xa_state
  type xa_node (line 1615) | struct xa_node
  type xa_state (line 1689) | struct xa_state
  type xa_state (line 1690) | struct xa_state
  type xa_state (line 1708) | struct xa_state
  type xa_node (line 1710) | struct xa_node
  type xa_state (line 1737) | struct xa_state
  type xa_node (line 1739) | struct xa_node

FILE: t/tree/include/uapi/linux/apm_bios.h
  type apm_event_t (line 22) | typedef unsigned short	apm_event_t;
  type apm_eventinfo_t (line 23) | typedef unsigned short	apm_eventinfo_t;
  type apm_bios_info (line 25) | struct apm_bios_info {

FILE: t/tree/include/uapi/linux/eventpoll.h
  type epoll_event (line 77) | struct epoll_event {
  function ep_take_care_of_epollwakeup (line 83) | static inline void ep_take_care_of_epollwakeup(struct epoll_event *epev)
  function ep_take_care_of_epollwakeup (line 89) | static inline void ep_take_care_of_epollwakeup(struct epoll_event *epev)

FILE: t/tree/include/uapi/linux/i2c.h
  type i2c_msg (line 69) | struct i2c_msg {

FILE: t/tree/include/uapi/linux/rseq.h
  type rseq_cpu_id_state (line 16) | enum rseq_cpu_id_state {
  type rseq_flags (line 21) | enum rseq_flags {
  type rseq_cs_flags_bit (line 25) | enum rseq_cs_flags_bit {
  type rseq_cs_flags (line 31) | enum rseq_cs_flags {
  type rseq_cs (line 45) | struct rseq_cs {
  type rseq (line 62) | struct rseq {

FILE: t/tree/issue102.c
  function foo (line 1) | void foo(void)
  function documented_function_XYZZY (line 9) | void documented_function_XYZZY(void)

FILE: t/tree/issue131.h
  type class (line 9) | struct class {
  function foo (line 13) | void foo(struct class *klass)

FILE: t/tree/issue134.c
  function issue134_function1 (line 20) | int issue134_function1(int p1)
  function issue134_function2 (line 33) | void __sched issue134_function2(struct completion *x)
  type issue134_struct1 (line 48) | struct issue134_struct1
  type issue134_struct2 (line 49) | struct issue134_struct2

FILE: t/tree/issue186-counterexamples.c
  function i186c_fn1 (line 8) | static int i186c_fn1(struct platform_device *pdev)
  function i186c_fn2 (line 16) | static int i186c_fn2(struct platform_device *pdev)

FILE: t/tree/issue186.c
  function undocumented_function (line 5) | static int undocumented_function(struct platform_device *pdev)

FILE: t/tree/issue188.c
  function undocumented_function (line 4) | static int undocumented_function(struct platform_device *pdev)

FILE: t/tree/issue192.c
  function issue192a (line 8) | int
  function AMAZING_RETURN_TYPE (line 20) | AMAZING_RETURN_TYPE

FILE: t/tree/syscall_define.c
  function SYSCALL_DEFINE3 (line 1) | SYSCALL_DEFINE3(init_module)

FILE: update.py
  class UpdateIds (line 74) | class UpdateIds(Thread):
    method __init__ (line 75) | def __init__(self, tag_buf):
    method run (line 79) | def run(self):
    method update_blob_ids (line 101) | def update_blob_ids(self, tag):
  class UpdateVersions (line 134) | class UpdateVersions(Thread):
    method __init__ (line 135) | def __init__(self, tag_buf):
    method run (line 139) | def run(self):
    method update_versions (line 165) | def update_versions(self, tag):
  function generate_defs_caches (line 192) | def generate_defs_caches():
  class UpdateDefs (line 201) | class UpdateDefs(Thread):
    method __init__ (line 202) | def __init__(self, start, inc):
    method run (line 207) | def run(self):
    method update_definitions (line 233) | def update_definitions(self, idxes):
  class UpdateRefs (line 271) | class UpdateRefs(Thread):
    method __init__ (line 272) | def __init__(self, start, inc):
    method run (line 277) | def run(self):
    method update_references (line 301) | def update_references(self, idxes):
  class UpdateDocs (line 355) | class UpdateDocs(Thread):
    method __init__ (line 356) | def __init__(self, start, inc):
    method run (line 361) | def run(self):
    method update_doc_comments (line 384) | def update_doc_comments(self, idxes):
  class UpdateComps (line 414) | class UpdateComps(Thread):
    method __init__ (line 415) | def __init__(self, start, inc):
    method run (line 420) | def run(self):
    method update_compatibles (line 445) | def update_compatibles(self, idxes):
  class UpdateCompsDocs (line 481) | class UpdateCompsDocs(Thread):
    method __init__ (line 482) | def __init__(self, start, inc):
    method run (line 487) | def run(self):
    method update_compatibles_bindings (line 512) | def update_compatibles_bindings(self, idxes):
  function progress (line 550) | def progress(msg, current):

FILE: utils/query.py
  function cmd_stats (line 4) | def cmd_stats(q, **kwargs):
  function cmd_versions (line 12) | def cmd_versions(q, **kwargs):
  function cmd_ident (line 18) | def cmd_ident(q, version, ident, family, **kwargs):
  function cmd_file (line 32) | def cmd_file(q, version, path, **kwargs):

FILE: utils/speedtest.py
  function init_query (line 72) | def init_query(project):
  function get_ident (line 85) | def get_ident(query, ident, version):
  function get_file (line 92) | def get_file(query, path, version):
Condensed preview — 167 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,093K chars).
[
  {
    "path": ".dockerignore",
    "chars": 195,
    "preview": "# Generated files\n**/__pycache__\ntags\n/.cache/\n.idea/\nenv\nvenv/\n.venv/\n**/*.py[cod]\n\n**/*.db\n**/repo\n**/data\n\n.git\n.giti"
  },
  {
    "path": ".editorconfig",
    "chars": 130,
    "preview": "# see https://editorconfig.org for the format of this file\nroot = true\n\n[*]\nend_of_line = LF\nindent_style = space\nindent"
  },
  {
    "path": ".gitignore",
    "chars": 194,
    "preview": "# Generated files\n__pycache__\ntags\n/.cache/\n.idea/\nenv/\nvenv/\n/data/\n\n# Web-specific\nhttp/images\nhttp/*.html\nhttp/favico"
  },
  {
    "path": ".mailmap",
    "chars": 509,
    "preview": "Christopher White <cxwembedded@gmail.com>\nChristopher White <cxwembedded@gmail.com> <cwhite@d3engineering.com>\nMichael O"
  },
  {
    "path": ".travis.yml",
    "chars": 295,
    "preview": "# .travis.yml for Elixir, https://github.com/bootlin/elixir\nlanguage: python\n\nos:\n  - linux\n\ndist:\n  - jammy\n\npython:\n  "
  },
  {
    "path": "CHANGELOG.adoc",
    "chars": 988,
    "preview": "= Elixir Changelog\n\n== 2024-08 - WSGI update\n\n* Migrated Elixir from a CGI-based architecture to a WSGI-based architectu"
  },
  {
    "path": "COPYING",
    "chars": 34520,
    "preview": "                    GNU AFFERO GENERAL PUBLIC LICENSE\n                       Version 3, 19 November 2007\n\n Copyright (C)"
  },
  {
    "path": "README.adoc",
    "chars": 15671,
    "preview": "= The Elixir Cross Referencer\n:doctype: book\n:pp: {plus}{plus}\n:toc:\n:toc-placement!:\n\nElixir is a source code cross-ref"
  },
  {
    "path": "docker/000-default.conf",
    "chars": 965,
    "preview": "<Directory /usr/local/elixir/>\n    AllowOverride None\n    Require all denied\n    <FilesMatch \"wsgi.py\">\n        Require "
  },
  {
    "path": "docker/Dockerfile",
    "chars": 1661,
    "preview": "FROM debian:bookworm AS build\n\nRUN \\\n  apt-get update && \\\n  apt-get --no-install-recommends -y install \\\n    git build-"
  },
  {
    "path": "docker/gitconfig",
    "chars": 25,
    "preview": "[safe]\n    directory = *\n"
  },
  {
    "path": "elixir/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "elixir/api.py",
    "chars": 2072,
    "preview": "#!/usr/bin/env python3\n\n#  This file is part of Elixir, a source code cross-referencer.\n#\n#  Copyright (C) 2019--2020 Ca"
  },
  {
    "path": "elixir/autocomplete.py",
    "chars": 3133,
    "preview": "#!/usr/bin/env python3\n#  This file is part of Elixir, a source code cross-referencer.\n#\n#  Copyright (C) 2017--2020 Max"
  },
  {
    "path": "elixir/data.py",
    "chars": 8025,
    "preview": "#!/usr/bin/env python3\n\n#  This file is part of Elixir, a source code cross-referencer.\n#\n#  Copyright (C) 2017--2020 Mi"
  },
  {
    "path": "elixir/filters/__init__.py",
    "chars": 916,
    "preview": "from typing import List\n\nfrom .utils import Filter, FilterContext\nfrom .projects import project_filters, default_filters"
  },
  {
    "path": "elixir/filters/configin.py",
    "chars": 1235,
    "preview": "import re\nfrom .utils import Filter, FilterContext, decode_number, encode_number, filename_without_ext_matches\n\n# Filter"
  },
  {
    "path": "elixir/filters/cppinc.py",
    "chars": 1269,
    "preview": "import re\nfrom .utils import Filter, FilterContext, encode_number, decode_number, extension_matches\n\n# Filters for cpp i"
  },
  {
    "path": "elixir/filters/cpppathinc.py",
    "chars": 2178,
    "preview": "import re\nfrom typing import List\nfrom .utils import Filter, FilterContext, encode_number, decode_number, extension_matc"
  },
  {
    "path": "elixir/filters/defconfig.py",
    "chars": 1317,
    "preview": "import re\nfrom .utils import Filter, FilterContext, encode_number, decode_number, extension_matches\n\n# Filter for kconfi"
  },
  {
    "path": "elixir/filters/dtscompcode.py",
    "chars": 1844,
    "preview": "import re\nfrom .utils import Filter, FilterContext, encode_number, decode_number, extension_matches\n\n# Filter for DT com"
  },
  {
    "path": "elixir/filters/dtscompdocs.py",
    "chars": 1548,
    "preview": "import re\nfrom urllib.parse import quote\nfrom .utils import Filter, FilterContext, encode_number, decode_number\n\n# Filte"
  },
  {
    "path": "elixir/filters/dtscompdts.py",
    "chars": 1421,
    "preview": "import re\nfrom .utils import Filter, FilterContext, encode_number, decode_number, extension_matches\n\n# Filter for DT com"
  },
  {
    "path": "elixir/filters/dtsi.py",
    "chars": 1252,
    "preview": "import re\nfrom .utils import Filter, FilterContext, encode_number, decode_number, extension_matches\n\n# Filters for dts i"
  },
  {
    "path": "elixir/filters/ident.py",
    "chars": 1436,
    "preview": "import re\nfrom .utils import Filter, FilterContext, encode_number, decode_number\n\n# Filter for identifier links\n# Replac"
  },
  {
    "path": "elixir/filters/kconfig.py",
    "chars": 1288,
    "preview": "import re\nfrom .utils import Filter, FilterContext, encode_number, decode_number, filename_without_ext_matches\n\n# Filter"
  },
  {
    "path": "elixir/filters/kconfigidents.py",
    "chars": 1321,
    "preview": "import re\nfrom .utils import Filter, FilterContext, encode_number, decode_number\n\n# Filter for kconfig identifier links\n"
  },
  {
    "path": "elixir/filters/makefiledir.py",
    "chars": 1687,
    "preview": "from os.path import dirname\nimport re\nfrom .utils import Filter, FilterContext, decode_number, encode_number, filename_w"
  },
  {
    "path": "elixir/filters/makefiledtb.py",
    "chars": 1418,
    "preview": "from os.path import dirname\nimport re\nfrom .utils import Filter, FilterContext, decode_number, encode_number, filename_w"
  },
  {
    "path": "elixir/filters/makefilefile.py",
    "chars": 1669,
    "preview": "from os.path import dirname\nimport re\nfrom .utils import Filter, FilterContext, decode_number, encode_number, filename_w"
  },
  {
    "path": "elixir/filters/makefileo.py",
    "chars": 1387,
    "preview": "from os.path import dirname\nimport re\nfrom .utils import Filter, FilterContext, decode_number, encode_number, filename_w"
  },
  {
    "path": "elixir/filters/makefilesrctree.py",
    "chars": 1515,
    "preview": "import re\nfrom .utils import Filter, FilterContext, decode_number, encode_number, filename_without_ext_matches\n\n# Filter"
  },
  {
    "path": "elixir/filters/makefilesubdir.py",
    "chars": 1548,
    "preview": "from os.path import dirname\nimport re\nfrom .utils import Filter, FilterContext, decode_number, encode_number, filename_w"
  },
  {
    "path": "elixir/filters/projects.py",
    "chars": 3302,
    "preview": "from .ident import IdentFilter\n\nfrom .cppinc import CppIncFilter\nfrom .cpppathinc import CppPathIncFilter\n\nfrom .defconf"
  },
  {
    "path": "elixir/filters/utils.py",
    "chars": 3504,
    "preview": "import re\nimport os\nfrom dataclasses import dataclass\nfrom typing import Callable, List\nfrom ..query import Query\n\n# Con"
  },
  {
    "path": "elixir/lib.py",
    "chars": 6388,
    "preview": "#!/usr/bin/env python3\n\n#  This file is part of Elixir, a source code cross-referencer.\n#\n#  Copyright (C) 2017  Mikaël "
  },
  {
    "path": "elixir/query.py",
    "chars": 12332,
    "preview": "#!/usr/bin/env python3\n\n#  This file is part of Elixir, a source code cross-referencer.\n#\n#  Copyright (C) 2017--2020 Mi"
  },
  {
    "path": "elixir/web.py",
    "chars": 33861,
    "preview": "#!/usr/bin/env python3\n\n#  This file is part of Elixir, a source code cross-referencer.\n#\n#  Copyright (C) 2017--2020 Mi"
  },
  {
    "path": "elixir/web_utils.py",
    "chars": 2557,
    "preview": "import os\nimport re\nimport logging\nimport threading\nfrom urllib import parse\nfrom typing import Any, Dict, NamedTuple\nim"
  },
  {
    "path": "find-file-doc-comments.pl",
    "chars": 6090,
    "preview": "#!/usr/bin/env perl\n# find-file-doc-comments.pl: Find the doc comments for a file.\n# Usage: find-file-doc-comments.pl <C"
  },
  {
    "path": "find_compatible_dts.py",
    "chars": 2281,
    "preview": "#!/usr/bin/env python3\n\n#  This file is part of Elixir, a source code cross-referencer.\n#\n#  Copyright (C) 2017--2020  M"
  },
  {
    "path": "projects/amazon-freertos.sh",
    "chars": 345,
    "preview": "# Elixir definitions for Amazon FreeRTOS\n\nlist_tags_h()\n{\n\n    echo \"$tags\" |\n    grep -v '^v' |\n    tac |\n    sed -r 's"
  },
  {
    "path": "projects/arm-trusted-firmware.sh",
    "chars": 390,
    "preview": "# Elixir definitions for Arm Trusted Firmware\n# https://github.com/ARM-software/arm-trusted-firmware\n\n# Enable DT bindin"
  },
  {
    "path": "projects/barebox.sh",
    "chars": 423,
    "preview": "# Elixir definitions for Barebox\n\n# Enable DT bindings compatible strings support\ndts_comp_support=1\n\nlist_tags_h()\n{\n  "
  },
  {
    "path": "projects/bluez.sh",
    "chars": 275,
    "preview": "# Elixir definitions for BlueZ\nlist_tags()\n{\n    echo \"$tags\" |\n    grep '^[0-9]'\n}\n\nlist_tags_h()\n{\n    echo \"$tags\" |\n"
  },
  {
    "path": "projects/busybox.sh",
    "chars": 215,
    "preview": "# Elixir definitions for BusyBox\n\nversion_dir()\n{\n    tr '_.' '._';\n}\n\nversion_rev()\n{\n    tr '._' '_.';\n}\n\nlist_tags_h("
  },
  {
    "path": "projects/coreboot.sh",
    "chars": 142,
    "preview": "# Elixir definitions for Coreboot\n\nlist_tags_h()\n{\n    echo \"$tags\" |\n    tac |\n    sed -r 's/^([0-9]*)\\.([0-9]*)(.*)$/v"
  },
  {
    "path": "projects/dpdk.sh",
    "chars": 285,
    "preview": "# Elixir definitions for DPDK\n\nlist_tags_h()\n{\n    echo \"$tags\" |\n    grep -vE '^v1\\.|^v2\\.' |\n    tac |\n    sed -r 's/^"
  },
  {
    "path": "projects/freebsd.sh",
    "chars": 232,
    "preview": "# FreeBSD\n\nversion_dir()\n{\n    grep \"^release/[0-9]*\\.[0-9]*\\.[0-9]*$\" |\n    sed -e 's,^release/,v,' |\n    sed -e 's,\\.0"
  },
  {
    "path": "projects/glibc.sh",
    "chars": 424,
    "preview": "# Elixir definitions for glibc\n\nlist_tags()\n{\n    echo \"$tags\" |\n    grep -v 'cvs'\n}\n\nlist_tags_h()\n{\n    echo \"$tags\" |"
  },
  {
    "path": "projects/grub.sh",
    "chars": 158,
    "preview": "# Elixir definitions for Grub\n\nlist_tags_h()\n{\n    echo \"$tags\" |\n    tac |\n    sed -r 's/^(grub-)?([0-9]+).([0-9]+)([A-"
  },
  {
    "path": "projects/iproute2.sh",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "projects/linux.sh",
    "chars": 474,
    "preview": "# Elixir definitions for Linux\n\n# Enable DT bindings compatible strings support\ndts_comp_support=1\n\nget_tags()\n{\n    git"
  },
  {
    "path": "projects/llvm.sh",
    "chars": 352,
    "preview": "# Elixir definitions for LLVM\n\nlist_tags()\n{\n    echo \"$tags\" |\n    tac |\n    grep ^llvmorg-[0-9]*[\\.][0-9]*\n}\n\nlist_tag"
  },
  {
    "path": "projects/mesa.sh",
    "chars": 365,
    "preview": "# Elixir definitions for Mesa\n\nlist_tags()\n{\n    echo \"$tags\" |\n    tac |\n    grep ^mesa-[0-9]*[\\.][0-9]*\n}\n\nlist_tags_h"
  },
  {
    "path": "projects/musl.sh",
    "chars": 63,
    "preview": "# Elixir definitions for Musl\n# Using the default ones so far!\n"
  },
  {
    "path": "projects/ofono.sh",
    "chars": 139,
    "preview": "# Elixir definitions for Ofono\n\nlist_tags_h()\n{\n    echo \"$tags\" |\n    tac |\n    sed -r 's/^([0-9]*)\\.([0-9]*)(.*)$/v\\1 "
  },
  {
    "path": "projects/op-tee.sh",
    "chars": 309,
    "preview": "# Elixir definitions for OP-TEE Trusted OS\n\nlist_tags_h()\n{\n    echo \"$tags\" |\n    grep '^[0-9]\\.' |\n    tac |\n    sed -"
  },
  {
    "path": "projects/opensbi.sh",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "projects/qemu.sh",
    "chars": 296,
    "preview": "# Elixir definitions for QEMU\n\nlist_tags_h()\n{\n    echo \"$tags\" |\n    grep -E \"^v[0-9].*\" |\n    tac |\n    sed -r 's/^(v["
  },
  {
    "path": "projects/toybox.sh",
    "chars": 137,
    "preview": "# Elixir definitions for Toybox\n\nlist_tags_h()\n{\n    echo \"$tags\" |\n    tac |\n    sed -r 's/^([0-9]*)\\.([0-9]*)(.*)$/\\1 "
  },
  {
    "path": "projects/u-boot.sh",
    "chars": 406,
    "preview": "# Elixir definitions for U-Boot\n\n# Enable DT bindings compatible strings support\ndts_comp_support=1\n\nlist_tags_h()\n{\n   "
  },
  {
    "path": "projects/uclibc-ng.sh",
    "chars": 67,
    "preview": "# Elixir definitions for uclibc-ng\n# Using the default ones so far\n"
  },
  {
    "path": "projects/xen.sh",
    "chars": 151,
    "preview": "# Xen hypervisor\n\nversion_dir()\n{\n    grep \"^RELEASE\" |\n    sed -e 's/^RELEASE-/v/';\n}\n\nversion_rev()\n{\n    grep \"^v\" |\n"
  },
  {
    "path": "projects/zephyr.sh",
    "chars": 392,
    "preview": "# Elixir definitions for Zephyr\n\n# Enable DT bindings compatible strings support\ndts_comp_support=1\n\nlist_tags()\n{\n    e"
  },
  {
    "path": "requirements.txt",
    "chars": 278,
    "preview": "Jinja2~=3.1.5\nPygments~=2.18.0\nFalcon~=4.0.2\npytest==7.2.1\n\n# NOTE binary wheels of berkeleydb are not distributed - on "
  },
  {
    "path": "samples/projects/linuxtest.sh",
    "chars": 220,
    "preview": "# Elixir definitions for Linux testing (only one tag)\n# Copy this file to the \"projects\" directory\n\nlist_tags()\n{\n    ec"
  },
  {
    "path": "script.sh",
    "chars": 5784,
    "preview": "#!/bin/sh\n\n#  This file is part of Elixir, a source code cross-referencer.\n#\n#  Copyright (C) 2017--2020  Mikaël Bouillo"
  },
  {
    "path": "static/autocomplete.js",
    "chars": 23391,
    "preview": "/*\n * @license MIT\n *\n * Autocomplete.js v2.7.1\n * Developed by Baptiste Donaux\n * http://autocomplete-js.com\n *\n * (c) "
  },
  {
    "path": "static/dynamic-references.js",
    "chars": 7753,
    "preview": "\"use strict\";\n\nfunction identUrl(project, ident, version, family) {\n  return `/api/ident/${project}/${ident}?version=${v"
  },
  {
    "path": "static/fonts/ubuntu/LICENCE-FAQ.txt",
    "chars": 8978,
    "preview": "                        Ubuntu Font Family Licensing FAQ\n\n  Stylistic Foundations\n\n   The Ubuntu Font Family is the firs"
  },
  {
    "path": "static/fonts/ubuntu/LICENCE.txt",
    "chars": 4673,
    "preview": "-------------------------------\nUBUNTU FONT LICENCE Version 1.0\n-------------------------------\n\nPREAMBLE\nThis licence a"
  },
  {
    "path": "static/fonts/ubuntu/copyright.txt",
    "chars": 155,
    "preview": "Copyright 2010,2011 Canonical Ltd.\n\nThis Font Software is licensed under the Ubuntu Font Licence, Version\n1.0.  https://"
  },
  {
    "path": "static/messages.json",
    "chars": 2854,
    "preview": "[\n    {\n        \"title\": \"Embedded Linux training (on-line)\",\n        \"body\": \"Apr 13-23, 2026\",\n        \"action\": \"Regi"
  },
  {
    "path": "static/robots.txt",
    "chars": 38,
    "preview": "User-Agent: *\nAllow: /\nCrawl-Delay: 2\n"
  },
  {
    "path": "static/script.js",
    "chars": 11960,
    "preview": "\"use strict\";\n\n/* Tags menu filter */\n\n// Get a dictionary of tag name -> tag link from HTML\nfunction getTags() {\n  cons"
  },
  {
    "path": "static/style.css",
    "chars": 36638,
    "preview": "@charset \"UTF-8\";\n\n/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n html{line-height:1.15;-"
  },
  {
    "path": "t/050-testhelpers.t",
    "chars": 1594,
    "preview": "#!/usr/bin/env perl\n# t/50-testhelpers.t: test TestHelpers.pm\n#\n# Copyright (c) 2020 Christopher White, <cxwembedded@gma"
  },
  {
    "path": "t/100-basic.t",
    "chars": 5094,
    "preview": "#!/usr/bin/env perl\n# 100-basic.t: Test basic elixir functions against the files in tree/ .\n#\n# Copyright (c) 2020 D3 En"
  },
  {
    "path": "t/200-api.t",
    "chars": 1221,
    "preview": "#!/usr/bin/env perl\n# 200-api.t: Test elixir's REST api against the files in tree/ .\n#\n# Copyright (c) 2020 Tamir Carmel"
  },
  {
    "path": "t/300-doc-comments.t",
    "chars": 6529,
    "preview": "#!/usr/bin/env perl\n# 300-doc-comments.t: Test elixir doc-comment extraction against the files in tree/ .\n#\n# Copyright "
  },
  {
    "path": "t/400-web.t",
    "chars": 2744,
    "preview": "#!/usr/bin/env perl\n# t/400-web.pl: Test web.py\n#\n# Copyright (c) 2020 Christopher White, <cxwembedded@gmail.com>.\n#\n# E"
  },
  {
    "path": "t/TestClass.pm",
    "chars": 1863,
    "preview": "# A minified OOP library - https://metacpan.org/pod/distribution/Mo/ReadMe.pod\n\npackage TestClass;\n# use Mo qw(build def"
  },
  {
    "path": "t/TestEnvironment.pm",
    "chars": 8488,
    "preview": "#!/usr/bin/env perl\n# TestEnvironment.pm: A class representing an Elixir test environment.\n# See license information at "
  },
  {
    "path": "t/TestHelpers.pm",
    "chars": 14191,
    "preview": "#!/usr/bin/env perl\n# TestHelpers.pm: Common routines for use in tests.\n# See license information at end of file.\n#\n# Fo"
  },
  {
    "path": "t/api_test.py",
    "chars": 3058,
    "preview": "#!/usr/bin/env python3\n\n#  This file is part of Elixir, a source code cross-referencer.\n#\n#  Copyright (C) 2020 Carmeli "
  },
  {
    "path": "t/interact.pl",
    "chars": 2153,
    "preview": "#!/usr/bin/env perl\n# t/interact.pl: Open a shell on a DB of the files in tree/ .\n#\n# Copyright (c) 2020 Christopher Whi"
  },
  {
    "path": "t/tree/arch/arm/xen/hypercall.S",
    "chars": 3816,
    "preview": "/******************************************************************************\n * hypercall.S\n *\n * Xen hypercall wrapp"
  },
  {
    "path": "t/tree/arch/x86/include/asm/acpi.h",
    "chars": 4654,
    "preview": "/* SPDX-License-Identifier: GPL-2.0-or-later */\n#ifndef _ASM_X86_ACPI_H\n#define _ASM_X86_ACPI_H\n\n/*\n *  Copyright (C) 20"
  },
  {
    "path": "t/tree/arch/x86/include/asm/ist.h",
    "chars": 294,
    "preview": "/* SPDX-License-Identifier: GPL-2.0-or-later */\n/*\n * Include file for the interface to IST BIOS\n * Copyright 2002 Andy "
  },
  {
    "path": "t/tree/arch/x86/include/asm/orc_types.h",
    "chars": 2977,
    "preview": "/* SPDX-License-Identifier: GPL-2.0-or-later */\n/*\n * Copyright (C) 2017 Josh Poimboeuf <jpoimboe@redhat.com>\n */\n\n#ifnd"
  },
  {
    "path": "t/tree/arch/x86/include/asm/uprobes.h",
    "chars": 1017,
    "preview": "/* SPDX-License-Identifier: GPL-2.0-or-later */\n#ifndef _ASM_UPROBES_H\n#define _ASM_UPROBES_H\n/*\n * User-space Probes (U"
  },
  {
    "path": "t/tree/arch/x86/include/uapi/asm/ist.h",
    "chars": 869,
    "preview": "/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */\n/*\n * Include file for the interface to IST BIOS\n * Copy"
  },
  {
    "path": "t/tree/drivers/firmware/broadcom/bcm74xx_sprom.c",
    "chars": 28017,
    "preview": "/*\n *  Copyright (C) 2004 Florian Schirmer <jolt@tuxbox.org>\n *  Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org>\n *  "
  },
  {
    "path": "t/tree/drivers/i2c/i2c-boardinfo.c",
    "chars": 2991,
    "preview": "// SPDX-License-Identifier: GPL-2.0-or-later\n/*\n * i2c-boardinfo.c - collect pre-declarations of I2C devices\n */\n\n#inclu"
  },
  {
    "path": "t/tree/drivers/i2c/i2c-core-acpi.c",
    "chars": 18598,
    "preview": "// SPDX-License-Identifier: GPL-2.0-or-later\n/*\n * Linux I2C core ACPI support code\n *\n * Copyright (C) 2014 Intel Corp,"
  },
  {
    "path": "t/tree/drivers/i2c/i2c-core-base.c",
    "chars": 66631,
    "preview": "// SPDX-License-Identifier: GPL-2.0-or-later\n/*\n * Linux I2C core\n *\n * Copyright (C) 1995-99 Simon G. Vogl\n *   With so"
  },
  {
    "path": "t/tree/drivers/i2c/i2c-core-of.c",
    "chars": 6606,
    "preview": "// SPDX-License-Identifier: GPL-2.0-or-later\n/*\n * Linux I2C core OF support code\n *\n * Copyright (C) 2008 Jochen Friedr"
  },
  {
    "path": "t/tree/drivers/i2c/i2c-core-slave.c",
    "chars": 2884,
    "preview": "// SPDX-License-Identifier: GPL-2.0-or-later\n/*\n * Linux I2C core slave support code\n *\n * Copyright (C) 2014 by Wolfram"
  },
  {
    "path": "t/tree/drivers/i2c/i2c-core-smbus.c",
    "chars": 20508,
    "preview": "// SPDX-License-Identifier: GPL-2.0-or-later\n/*\n * Linux I2C core SMBus and SMBus emulation code\n *\n * This file contain"
  },
  {
    "path": "t/tree/drivers/i2c/i2c-core.h",
    "chars": 2926,
    "preview": "/* SPDX-License-Identifier: GPL-2.0-or-later */\n/*\n * i2c-core.h - interfaces internal to the I2C framework\n */\n\n#includ"
  },
  {
    "path": "t/tree/drivers/i2c/i2c-dev.c",
    "chars": 19787,
    "preview": "// SPDX-License-Identifier: GPL-2.0-or-later\n/*\n    i2c-dev.c - i2c-bus driver, char device interface\n\n    Copyright (C)"
  },
  {
    "path": "t/tree/drivers/i2c/i2c-smbus.c",
    "chars": 5181,
    "preview": "// SPDX-License-Identifier: GPL-2.0-or-later\n/*\n * i2c-smbus.c - SMBus extensions to the I2C protocol\n *\n * Copyright (C"
  },
  {
    "path": "t/tree/drivers/i2c/i2c-stub.c",
    "chars": 10060,
    "preview": "// SPDX-License-Identifier: GPL-2.0-or-later\n/*\n    i2c-stub.c - I2C/SMBus chip emulator\n\n    Copyright (c) 2004 Mark M."
  },
  {
    "path": "t/tree/include/acpi/acpi_bus.h",
    "chars": 19353,
    "preview": "/* SPDX-License-Identifier: GPL-2.0-or-later */\n/*\n *  acpi_bus.h - ACPI Bus Driver ($Revision: 22 $)\n *\n *  Copyright ("
  },
  {
    "path": "t/tree/include/acpi/acpi_drivers.h",
    "chars": 3680,
    "preview": "/* SPDX-License-Identifier: GPL-2.0-or-later */\n/*\n *  acpi_drivers.h  ($Revision: 31 $)\n *\n *  Copyright (C) 2001, 2002"
  },
  {
    "path": "t/tree/include/asm-generic/barrier.h",
    "chars": 5906,
    "preview": "/* SPDX-License-Identifier: GPL-2.0-or-later */\n/*\n * Generic barrier definitions.\n *\n * It should be possible to use th"
  },
  {
    "path": "t/tree/include/asm-generic/io.h",
    "chars": 22880,
    "preview": "/* SPDX-License-Identifier: GPL-2.0-or-later */\n/* Generic I/O port emulation.\n *\n * Copyright (C) 2007 Red Hat, Inc. Al"
  },
  {
    "path": "t/tree/include/asm-generic/pci_iomap.h",
    "chars": 1775,
    "preview": "/* SPDX-License-Identifier: GPL-2.0+ */\n/* Generic I/O port emulation.\n *\n * Copyright (C) 2007 Red Hat, Inc. All Rights"
  },
  {
    "path": "t/tree/include/asm-generic/qrwlock.h",
    "chars": 3427,
    "preview": "/* SPDX-License-Identifier: GPL-2.0-or-later */\n/*\n * Queue read/write lock\n *\n * (C) Copyright 2013-2014 Hewlett-Packar"
  },
  {
    "path": "t/tree/include/asm-generic/qspinlock.h",
    "chars": 3265,
    "preview": "/* SPDX-License-Identifier: GPL-2.0-or-later */\n/*\n * Queued spinlock\n *\n * (C) Copyright 2013-2015 Hewlett-Packard Deve"
  },
  {
    "path": "t/tree/include/asm-generic/qspinlock_types.h",
    "chars": 2376,
    "preview": "/* SPDX-License-Identifier: GPL-2.0-or-later */\n/*\n * Queued spinlock\n *\n * (C) Copyright 2013-2015 Hewlett-Packard Deve"
  },
  {
    "path": "t/tree/include/linux/acpi.h",
    "chars": 37436,
    "preview": "/* SPDX-License-Identifier: GPL-2.0-or-later */\n/*\n * acpi.h - ACPI Interface\n *\n * Copyright (C) 2001 Paul Diefenbaugh "
  },
  {
    "path": "t/tree/include/linux/apm_bios.h",
    "chars": 2305,
    "preview": "/* SPDX-License-Identifier: GPL-2.0-or-later */\n/*\n * Include file for the interface to an APM BIOS\n * Copyright 1994-20"
  },
  {
    "path": "t/tree/include/linux/assoc_array.h",
    "chars": 2949,
    "preview": "/* SPDX-License-Identifier: GPL-2.0-or-later */\n/* Generic associative array implementation.\n *\n * See Documentation/cor"
  },
  {
    "path": "t/tree/include/linux/cred.h",
    "chars": 12621,
    "preview": "/* SPDX-License-Identifier: GPL-2.0-or-later */\n/* Credentials management - see Documentation/security/credentials.rst\n "
  },
  {
    "path": "t/tree/include/linux/i2c-smbus.h",
    "chars": 1316,
    "preview": "/* SPDX-License-Identifier: GPL-2.0-or-later */\n/*\n * i2c-smbus.h - SMBus extensions to the I2C protocol\n *\n * Copyright"
  },
  {
    "path": "t/tree/include/linux/i2c.h",
    "chars": 37313,
    "preview": "/* SPDX-License-Identifier: GPL-2.0-or-later */\n/*\n * i2c.h - definitions for the Linux i2c bus interface\n * Copyright ("
  },
  {
    "path": "t/tree/include/linux/key.h",
    "chars": 15696,
    "preview": "/* SPDX-License-Identifier: GPL-2.0-or-later */\n/* Authentication token and access key management\n *\n * Copyright (C) 20"
  },
  {
    "path": "t/tree/include/linux/kmod.h",
    "chars": 1045,
    "preview": "/* SPDX-License-Identifier: GPL-2.0-or-later */\n#ifndef __LINUX_KMOD_H__\n#define __LINUX_KMOD_H__\n\n/*\n *\tinclude/linux/k"
  },
  {
    "path": "t/tree/include/linux/log2.h",
    "chars": 6335,
    "preview": "/* SPDX-License-Identifier: GPL-2.0-or-later */\n/* Integer base 2 logarithm calculation\n *\n * Copyright (C) 2006 Red Hat"
  },
  {
    "path": "t/tree/include/linux/logic_pio.h",
    "chars": 3322,
    "preview": "// SPDX-License-Identifier: GPL-2.0+\n/*\n * Copyright (C) 2017 HiSilicon Limited, All Rights Reserved.\n * Author: Gabriel"
  },
  {
    "path": "t/tree/include/linux/memblock.h",
    "chars": 18987,
    "preview": "/* SPDX-License-Identifier: GPL-2.0-or-later */\n#ifndef _LINUX_MEMBLOCK_H\n#define _LINUX_MEMBLOCK_H\n#ifdef __KERNEL__\n\n/"
  },
  {
    "path": "t/tree/include/linux/of.h",
    "chars": 43042,
    "preview": "/* SPDX-License-Identifier: GPL-2.0+ */\n#ifndef _LINUX_OF_H\n#define _LINUX_OF_H\n/*\n * Definitions for talking to the Ope"
  },
  {
    "path": "t/tree/include/linux/of_platform.h",
    "chars": 3974,
    "preview": "/* SPDX-License-Identifier: GPL-2.0+ */\n#ifndef _LINUX_OF_PLATFORM_H\n#define _LINUX_OF_PLATFORM_H\n/*\n *    Copyright (C)"
  },
  {
    "path": "t/tree/include/linux/plist.h",
    "chars": 8872,
    "preview": "/* SPDX-License-Identifier: GPL-2.0-or-later */\n/*\n * Descending-priority-sorted double-linked list\n *\n * (C) 2002-2003 "
  },
  {
    "path": "t/tree/include/linux/pm.h",
    "chars": 34037,
    "preview": "/* SPDX-License-Identifier: GPL-2.0-or-later */\n/*\n *  pm.h - Power management interface\n *\n *  Copyright (C) 2000 Andre"
  },
  {
    "path": "t/tree/include/linux/pm_wakeup.h",
    "chars": 5874,
    "preview": "/* SPDX-License-Identifier: GPL-2.0-or-later */\n/*\n *  pm_wakeup.h - Power management wakeup interface\n *\n *  Copyright "
  },
  {
    "path": "t/tree/include/linux/radix-tree.h",
    "chars": 15983,
    "preview": "/* SPDX-License-Identifier: GPL-2.0-or-later */\n/*\n * Copyright (C) 2001 Momchil Velikov\n * Portions Copyright (C) 2001 "
  },
  {
    "path": "t/tree/include/linux/rbtree.h",
    "chars": 5210,
    "preview": "/* SPDX-License-Identifier: GPL-2.0-or-later */\n/*\n  Red Black Trees\n  (C) 1999  Andrea Arcangeli <andrea@suse.de>\n  \n\n "
  },
  {
    "path": "t/tree/include/linux/rcu_node_tree.h",
    "chars": 3793,
    "preview": "/* SPDX-License-Identifier: GPL-2.0+ */\n/*\n * RCU node combining tree definitions.  These are used to compute\n * global "
  },
  {
    "path": "t/tree/include/linux/rcu_segcblist.h",
    "chars": 2836,
    "preview": "/* SPDX-License-Identifier: GPL-2.0+ */\n/*\n * RCU segmented callback lists\n *\n * This seemingly RCU-private file must be"
  },
  {
    "path": "t/tree/include/linux/rcu_sync.h",
    "chars": 1494,
    "preview": "/* SPDX-License-Identifier: GPL-2.0+ */\n/*\n * RCU-based infrastructure for lightweight reader-writer locking\n *\n * Copyr"
  },
  {
    "path": "t/tree/include/linux/rcupdate.h",
    "chars": 33297,
    "preview": "/* SPDX-License-Identifier: GPL-2.0+ */\n/*\n * Read-Copy Update mechanism for mutual exclusion\n *\n * Copyright IBM Corpor"
  },
  {
    "path": "t/tree/include/linux/rcutree.h",
    "chars": 1975,
    "preview": "/* SPDX-License-Identifier: GPL-2.0+ */\n/*\n * Read-Copy Update mechanism for mutual exclusion (tree-based version)\n *\n *"
  },
  {
    "path": "t/tree/include/linux/srcu.h",
    "chars": 6730,
    "preview": "/* SPDX-License-Identifier: GPL-2.0+ */\n/*\n * Sleepable Read-Copy Update mechanism for mutual exclusion\n *\n * Copyright "
  },
  {
    "path": "t/tree/include/linux/srcutree.h",
    "chars": 4991,
    "preview": "/* SPDX-License-Identifier: GPL-2.0+ */\n/*\n * Sleepable Read-Copy Update mechanism for mutual exclusion,\n *\ttree variant"
  },
  {
    "path": "t/tree/include/linux/stackdepot.h",
    "chars": 539,
    "preview": "/* SPDX-License-Identifier: GPL-2.0-or-later */\n/*\n * A generic stack depot implementation\n *\n * Author: Alexander Potap"
  },
  {
    "path": "t/tree/include/linux/uprobes.h",
    "chars": 6143,
    "preview": "/* SPDX-License-Identifier: GPL-2.0-or-later */\n#ifndef _LINUX_UPROBES_H\n#define _LINUX_UPROBES_H\n/*\n * User-space Probe"
  },
  {
    "path": "t/tree/include/linux/xarray.h",
    "chars": 54905,
    "preview": "/* SPDX-License-Identifier: GPL-2.0+ */\n#ifndef _LINUX_XARRAY_H\n#define _LINUX_XARRAY_H\n/*\n * eXtensible Arrays\n * Copyr"
  },
  {
    "path": "t/tree/include/trace/events/i2c.h",
    "chars": 4047,
    "preview": "/* SPDX-License-Identifier: GPL-2.0-or-later */\n/* I2C message transfer tracepoints\n *\n * Copyright (C) 2013 Red Hat, In"
  },
  {
    "path": "t/tree/include/uapi/linux/apm_bios.h",
    "chars": 3698,
    "preview": "/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */\n/*\n * Include file for the interface to an APM BIOS\n * C"
  },
  {
    "path": "t/tree/include/uapi/linux/eventpoll.h",
    "chars": 2878,
    "preview": "/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */\n/*\n *  include/linux/eventpoll.h ( Efficient event polli"
  },
  {
    "path": "t/tree/include/uapi/linux/i2c.h",
    "chars": 7145,
    "preview": "/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */\n/* -----------------------------------------------------"
  },
  {
    "path": "t/tree/include/uapi/linux/rseq.h",
    "chars": 4919,
    "preview": "/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */\n#ifndef _UAPI_LINUX_RSEQ_H\n#define _UAPI_LINUX_RSEQ_H\n\n/"
  },
  {
    "path": "t/tree/issue102.c",
    "chars": 214,
    "preview": "void foo(void)\n{\n}\n/* This file triggers the bug described in #102. */\n\n/**\n * documented_function_XYZZY\n */\nvoid docume"
  },
  {
    "path": "t/tree/issue131.h",
    "chars": 290,
    "preview": "/* This file triggers the bug described in #131. */\n\n/**\n * struct class - structure\n * @member:     A member\n *\n * Desc"
  },
  {
    "path": "t/tree/issue134.c",
    "chars": 841,
    "preview": "/*\n * issue134.c: tests exhibiting problems noted in\n * https://github.com/bootlin/elixir/issues/134#issue-624392766\n *\n"
  },
  {
    "path": "t/tree/issue150.S",
    "chars": 208,
    "preview": "/* Function memset should be located as a definition --- #150. */\n\n#include <asm/assembler.h>\n\n    .text\n\nENTRY(memset)\n"
  },
  {
    "path": "t/tree/issue186-counterexamples.c",
    "chars": 389,
    "preview": "// SPDX-License-Identifier: CC0-1.0\n// This file is the situation of #186, but with documentation.\n\n#ifdef SOMETHING\n/**"
  },
  {
    "path": "t/tree/issue186.c",
    "chars": 219,
    "preview": "// SPDX-License-Identifier: CC0-1.0\n// This file triggers the bug described in #186.\n\n#ifdef SOMETHING\nstatic int undocu"
  },
  {
    "path": "t/tree/issue188.c",
    "chars": 214,
    "preview": "// SPDX-License-Identifier: CC0-1.0\n// This file triggers the bug described in #188.\n\nstatic int undocumented_function(s"
  },
  {
    "path": "t/tree/issue192.c",
    "chars": 405,
    "preview": "/* t/tree/issue192.c */\n/* SPDX-License-Identifier: CC0-1.0 */\n/* This file triggers the bug described in #192. */\n\n/**\n"
  },
  {
    "path": "t/tree/syscall_define.c",
    "chars": 33,
    "preview": "SYSCALL_DEFINE3(init_module)\n{\n}\n"
  },
  {
    "path": "templates/error.html",
    "chars": 907,
    "preview": "{% extends \"layout.html\" %}\n\n{% block title %}\n    Elixir error - Bootlin\n{% endblock %}\n\n{% block main %}\n\n<div class=\""
  },
  {
    "path": "templates/header.html",
    "chars": 1849,
    "preview": "<header class=\"header\">\n    <nav>\n        <ul class=\"nav-links\">\n            <li><a href=\"https://bootlin.com/\">Home</a>"
  },
  {
    "path": "templates/ident.html",
    "chars": 2847,
    "preview": "{% extends \"layout.html\" %}\n\n{% block title %}\n    {{ searched_ident|e }} identifier - {{ current_project|capitalize }} "
  },
  {
    "path": "templates/layout.html",
    "chars": 4007,
    "preview": "<!doctype html>\n<html class=\"no-js\">\n    <head>\n        <meta charset=\"utf-8\">\n        <meta http-equiv=\"x-ua-compatible"
  },
  {
    "path": "templates/sidebar.html",
    "chars": 2473,
    "preview": "<aside class=\"sidebar\" id=\"menu\">\n    <div class=\"filter\">\n        <select class=\"select-projects\" onchange=\"window.loca"
  },
  {
    "path": "templates/source.html",
    "chars": 559,
    "preview": "{% extends \"layout.html\" %}\n\n{% block title %}\n    {{ title_path }} {{ current_project|capitalize }} source code {{ curr"
  },
  {
    "path": "templates/topbar.html",
    "chars": 1390,
    "preview": "<header class=\"topbar\">\n    <div class=\"breadcrumb\">\n        <a href=\"#menu\" class=\"open-menu icon-menu screenreader\" ti"
  },
  {
    "path": "templates/tree.html",
    "chars": 1724,
    "preview": "{% extends \"layout.html\" %}\n\n{% block title %}\n    {{ title_path }} {{ current_project|capitalize }} source code ({{ cur"
  },
  {
    "path": "update.py",
    "chars": 20752,
    "preview": "#!/usr/bin/env python3\n\n#  This file is part of Elixir, a source code cross-referencer.\n#\n#  Copyright (C) 2017--2020 Mi"
  },
  {
    "path": "utils/index",
    "chars": 5850,
    "preview": "#!/bin/bash\n\nif test $# -lt 2; then\n    echo \"Usage: $0 <elixir_data_path> <project_name> [<repo_urls>...]\"\n    echo \"Us"
  },
  {
    "path": "utils/query.py",
    "chars": 2507,
    "preview": "from elixir.query import Query\nfrom elixir import lib\n\ndef cmd_stats(q, **kwargs):\n    print(\"Versions: \", len(q.db.vers"
  },
  {
    "path": "utils/speedtest.py",
    "chars": 5092,
    "preview": "#!/usr/bin/env python3\n\n#  This file is part of Elixir, a source code cross-referencer.\n#\n#  Copyright (C) 2020 Maxime C"
  },
  {
    "path": "wsgi.py",
    "chars": 35,
    "preview": "from elixir.web import application\n"
  }
]

About this extraction

This page contains the full source code of the free-electrons/elixir GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 167 files (1005.5 KB), approximately 284.6k tokens, and a symbol index with 2359 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!