The Linux Kernel API

This documentation is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 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 General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

For more details see the file COPYING in the source distribution of Linux.


Table of Contents

1. Driver Basics
Driver Entry and Exit points
module_init — driver initialization entry point
module_exit — driver exit entry point
Atomic and pointer manipulation
atomic_read — read atomic variable
atomic_set — set atomic variable
atomic_add — add integer to atomic variable
atomic_sub — subtract the atomic variable
atomic_sub_and_test — subtract value from variable and test result
atomic_inc — increment atomic variable
atomic_dec — decrement atomic variable
atomic_dec_and_test — decrement and test
atomic_inc_and_test — increment and test
atomic_add_negative — add and test if negative
atomic_add_return — add and return
atomic_add_unless — add unless the number is a given value
get_unaligned — get value from possibly mis-aligned location
put_unaligned — put value to a possibly mis-aligned location
Delaying, scheduling, and timer routines
pid_alive — check that a task structure is not stale
is_init — check if a task structure is init
__wake_up — wake up threads blocked on a waitqueue.
__wake_up_sync — wake up threads blocked on a waitqueue.
task_nice — return the nice value of a given task.
sched_setscheduler — change the scheduling policy and/or RT priority of
yield — yield the current processor to other threads.
__round_jiffies — function to round jiffies to a full second
__round_jiffies_relative — function to round jiffies to a full second
round_jiffies — function to round jiffies to a full second
round_jiffies_relative — function to round jiffies to a full second
init_timer — initialize a timer.
mod_timer — modify a timer's timeout
del_timer — deactive a timer.
del_timer_sync — deactivate a timer and wait for the handler to finish.
getnstimeofday — Returns the time of day in a timespec
do_gettimeofday — Returns the time of day in a timeval
do_settimeofday — Sets the time of day
schedule_timeout — sleep until timeout
msleep — sleep safely even with waitqueue interruptions
msleep_interruptible — sleep waiting for signals
High-resolution timers
ktime_set — Set a ktime_t variable from a seconds/nanoseconds value
ktime_sub — subtract two ktime_t variables
ktime_add — add two ktime_t variables
ktime_add_ns — Add a scalar nanoseconds value to a ktime_t variable
timespec_to_ktime — convert a timespec to ktime_t format
timeval_to_ktime — convert a timeval to ktime_t format
ktime_to_timespec — convert a ktime_t variable to timespec format
ktime_to_timeval — convert a ktime_t variable to timeval format
ktime_to_ns — convert a ktime_t variable to scalar nanoseconds
struct hrtimer — the basic hrtimer structure
struct hrtimer_sleeper — simple sleeper structure
struct hrtimer_base — the timer base for a specific clock
ktime_get_real — get the real (wall-) time in ktime_t format
ktime_get_ts — get the monotonic clock in timespec format
hrtimer_start — (re)start an relative timer on the current CPU
hrtimer_try_to_cancel — try to deactivate a timer
hrtimer_cancel — cancel a timer and wait for the handler to finish.
hrtimer_get_remaining — get remaining time for the timer
hrtimer_init — initialize a timer to the given clock
hrtimer_get_res — get the timer resolution for a clock
Workqueues and Kevents
run_scheduled_work — run scheduled work synchronously
queue_work — queue work on a workqueue
queue_delayed_work — queue work on a workqueue after delay
queue_delayed_work_on — queue work on specific CPU after delay
flush_workqueue — ensure that any scheduled work has run to completion.
destroy_workqueue — safely terminate a workqueue
schedule_work — put work task in global workqueue
schedule_delayed_work — put work task in global workqueue after delay
schedule_delayed_work_on — queue work in global workqueue on CPU after delay
cancel_rearming_delayed_workqueue — reliably kill off a delayed
cancel_rearming_delayed_work — reliably kill off a delayed keventd
execute_in_process_context — reliably execute the routine with user context
Internal Functions
reparent_to_init — Reparent the calling kernel thread to the init task
sys_tgkill — send signal to one specific thread
kthread_run — create and wake a thread.
kthread_should_stop — should this kthread return now?
kthread_create — create a kthread.
kthread_bind — bind a just-created kthread to a cpu.
kthread_stop — stop a thread created by kthread_create.
Kernel objects manipulation
kobject_get_path — generate and return the path associated with a given kobj
kobject_init — initialize object.
kobject_add — add an object to the hierarchy.
kobject_register — initialize and add an object.
kobject_set_name — Set the name of an object
kobject_del — unlink kobject from hierarchy.
kobject_unregister — remove object from hierarchy and decrement refcount.
kobject_get — increment refcount for object.
kobject_put — decrement refcount for object.
kset_register — initialize and add a kset.
kset_unregister — remove a kset.
subsystem_register — register a subsystem.
subsys_create_file — export sysfs attribute file.
Kernel utility functions
container_of — cast a member of a structure out to the containing structure
printk — print a kernel message
acquire_console_sem — lock the console system for exclusive use.
release_console_sem — unlock the console system
console_conditional_schedule — yield the CPU if required
printk_timed_ratelimit — caller-controlled printk ratelimiting
panic — halt the system
atomic_notifier_chain_register — Add notifier to an atomic notifier chain
atomic_notifier_chain_unregister — Remove notifier from an atomic notifier chain
atomic_notifier_call_chain — Call functions in an atomic notifier chain
blocking_notifier_chain_register — Add notifier to a blocking notifier chain
blocking_notifier_chain_unregister — Remove notifier from a blocking notifier chain
blocking_notifier_call_chain — Call functions in a blocking notifier chain
raw_notifier_chain_register — Add notifier to a raw notifier chain
raw_notifier_chain_unregister — Remove notifier from a raw notifier chain
raw_notifier_call_chain — Call functions in a raw notifier chain
srcu_notifier_chain_register — Add notifier to an SRCU notifier chain
srcu_notifier_chain_unregister — Remove notifier from an SRCU notifier chain
srcu_notifier_call_chain — Call functions in an SRCU notifier chain
srcu_init_notifier_head — Initialize an SRCU notifier head
register_reboot_notifier — Register function to be called at reboot time
unregister_reboot_notifier — Unregister previously registered reboot notifier
emergency_restart — reboot the system
kernel_restart — reboot the system
kernel_halt — halt the system
kernel_power_off — power_off the system
call_rcu — Queue an RCU callback for invocation after a grace period.
call_rcu_bh — Queue an RCU for invocation after a quicker grace period.
rcu_barrier — Wait until all the in-flight RCUs are complete.
synchronize_rcu — wait until a grace period has elapsed.
2. Data Types
Doubly Linked Lists
list_add — add a new entry
list_add_tail — add a new entry
list_add_rcu — add a new entry to rcu-protected list
list_add_tail_rcu — add a new entry to rcu-protected list
list_del — deletes entry from list.
list_del_rcu — deletes entry from list without re-initialization
list_replace — replace old entry by new one
list_replace_rcu — replace old entry by new one
list_del_init — deletes entry from list and reinitialize it.
list_move — delete from one list and add as another's head
list_move_tail — delete from one list and add as another's tail
list_is_last — tests whether list is the last entry in list head
list_empty — tests whether a list is empty
list_empty_careful — tests whether a list is empty and not being modified
list_splice — join two lists
list_splice_init — join two lists and reinitialise the emptied list.
list_entry — get the struct for this entry
list_for_each — iterate over a list
__list_for_each — iterate over a list
list_for_each_prev — iterate over a list backwards
list_for_each_safe — iterate over a list safe against removal of list entry
list_for_each_entry — iterate over list of given type
list_for_each_entry_reverse — iterate backwards over list of given type.
list_prepare_entry — prepare a pos entry for use in list_for_each_entry_continue
list_for_each_entry_continue — continue iteration over list of given type
list_for_each_entry_from — iterate over list of given type from the current point
list_for_each_entry_safe — iterate over list of given type safe against removal of list entry
list_for_each_entry_safe_continue
list_for_each_entry_safe_from
list_for_each_entry_safe_reverse
list_for_each_rcu — iterate over an rcu-protected list
list_for_each_safe_rcu
list_for_each_entry_rcu — iterate over rcu list of given type
list_for_each_continue_rcu
hlist_del_rcu — deletes entry from hash list without re-initialization
hlist_replace_rcu — replace old entry by new one
hlist_add_head_rcu
hlist_add_before_rcu
hlist_add_after_rcu
hlist_for_each_entry — iterate over list of given type
hlist_for_each_entry_continue — iterate over a hlist continuing after current point
hlist_for_each_entry_from — iterate over a hlist continuing from current point
hlist_for_each_entry_safe — iterate over list of given type safe against removal of list entry
hlist_for_each_entry_rcu — iterate over rcu list of given type
3. Basic C Library Functions
String Conversions
simple_strtoll — convert a string to a signed long long
simple_strtoul — convert a string to an unsigned long
simple_strtol — convert a string to a signed long
simple_strtoull — convert a string to an unsigned long long
vsnprintf — Format a string and place it in a buffer
vscnprintf — Format a string and place it in a buffer
snprintf — Format a string and place it in a buffer
scnprintf — Format a string and place it in a buffer
vsprintf — Format a string and place it in a buffer
sprintf — Format a string and place it in a buffer
vsscanf — Unformat a buffer into a list of arguments
sscanf — Unformat a buffer into a list of arguments
String Manipulation
strnicmp — Case insensitive, length-limited string comparison
strcpy — Copy a NUL terminated string
strncpy — Copy a length-limited, NUL-terminated string
strlcpy — Copy a NUL terminated string into a sized buffer
strcat — Append one NUL-terminated string to another
strncat — Append a length-limited, NUL-terminated string to another
strlcat — Append a length-limited, NUL-terminated string to another
strcmp — Compare two strings
strncmp — Compare two length-limited strings
strchr — Find the first occurrence of a character in a string
strrchr — Find the last occurrence of a character in a string
strnchr — Find a character in a length limited string
strstrip — Removes leading and trailing whitespace from s.
strlen — Find the length of a string
strnlen — Find the length of a length-limited string
strspn — Calculate the length of the initial substring of s which only
strcspn — Calculate the length of the initial substring of s which does
strpbrk — Find the first occurrence of a set of characters
strsep — Split a string into tokens
memset — Fill a region of memory with the given value
memcpy — Copy one area of memory to another
memmove — Copy one area of memory to another
memcmp — Compare two areas of memory
memscan — Find a character in an area of memory.
strstr — Find the first substring in a NUL terminated string
memchr — Find a character in an area of memory.
Bit Operations
set_bit — Atomically set a bit in memory
__set_bit — Set a bit in memory
clear_bit — Clears a bit in memory
__change_bit — Toggle a bit in memory
change_bit — Toggle a bit in memory
test_and_set_bit — Set a bit and return its old value
__test_and_set_bit — Set a bit and return its old value
test_and_clear_bit — Clear a bit and return its old value
__test_and_clear_bit — Clear a bit and return its old value
test_and_change_bit — Change a bit and return its old value
test_bit — Determine whether a bit is set
find_first_zero_bit — find the first zero bit in a memory region
find_next_zero_bit — find the first zero bit in a memory region
__ffs — find first bit in word.
find_first_bit — find the first set bit in a memory region
find_next_bit — find the first set bit in a memory region
ffz — find first zero in word.
ffs — find first bit set
fls — find last bit set
4. Basic Kernel Library Functions
Bitmap Operations
bitmap_scnprintf — convert bitmap to an ASCII hex string.
__bitmap_parse — convert an ASCII hex string into a bitmap.
bitmap_parse_user
bitmap_scnlistprintf — convert bitmap to list format ASCII string
bitmap_parselist — convert list format ASCII string to bitmap
bitmap_remap — Apply map defined by a pair of bitmaps to another bitmap
bitmap_bitremap — Apply map defined by a pair of bitmaps to a single bit
bitmap_find_free_region — find a contiguous aligned mem region
bitmap_release_region — release allocated bitmap region
bitmap_allocate_region — allocate bitmap region
bitmap_ord_to_pos
Command-line Parsing
get_option — Parse integer from an option string
get_options — Parse a string into a list of integers
memparse — parse a string with mem suffixes into a number
CRC Functions
crc16 — compute the CRC-16 for the data buffer
crc32_le — Calculate bitwise little-endian Ethernet AUTODIN II CRC32
crc32_be — Calculate bitwise big-endian Ethernet AUTODIN II CRC32
crc_ccitt — recompute the CRC for the data buffer
5. Memory Management in Linux
The Slab Cache
kcalloc — allocate memory for an array. The memory is set to zero.
kmalloc — allocate memory
kzalloc — allocate memory. The memory is set to zero.
kmem_cache_create — Create a cache.
kmem_cache_shrink — Shrink a cache.
kmem_cache_destroy — delete a cache
kmem_cache_alloc — Allocate an object
kmem_cache_zalloc — Allocate an object. The memory is set to zero.
kmem_cache_free — Deallocate an object
kfree — free previously allocated memory
User Space Memory Access
access_ok — Checks if a user space pointer is valid
get_user — Get a simple variable from user space.
put_user — Write a simple value into user space.
__get_user — Get a simple variable from user space, with less checking.
__put_user — Write a simple value into user space, with less checking.
__copy_to_user — Copy a block of data into user space, with less checking.
__copy_from_user — Copy a block of data from user space, with less checking.
strlen_user — Get the size of a string in user space.
__strncpy_from_user — Copy a NUL terminated string from userspace, with less checking.
strncpy_from_user — Copy a NUL terminated string from userspace.
clear_user — Zero a block of memory in user space.
__clear_user — Zero a block of memory in user space, with less checking.
strnlen_user — Get the size of a string in user space.
copy_to_user — Copy a block of data into user space.
copy_from_user — Copy a block of data from user space.
More Memory Management Functions
page_dup_rmap — duplicate pte mapping to a page
read_cache_pages — populate an address space with some pages & start reads against them
page_cache_readahead — generic adaptive readahead
filemap_flush — mostly a non-blocking flush
sync_page_range — write and wait on all pages in the passed range
sync_page_range_nolock
filemap_fdatawait — wait for all under-writeback pages to complete
add_to_page_cache — add newly allocated pagecache pages
unlock_page — unlock a locked page
end_page_writeback — end writeback against a page
__lock_page — get a lock on the page, assuming we need to sleep to get it
find_get_page — find and get a page reference
find_trylock_page — find and lock a page
find_lock_page — locate, pin and lock a pagecache page
find_or_create_page — locate or add a pagecache page
grab_cache_page_nowait — returns locked page at given index in given cache
do_generic_mapping_read — generic file read routine
generic_file_aio_read — generic filesystem read routine
filemap_nopage — read in file data for page fault handling
read_cache_page — read into page cache, fill it if needed
try_to_release_page — release old fs-specific metadata on a page
vm_insert_page — insert single page into user vma
remap_pfn_range — remap kernel memory to userspace
unmap_mapping_range — unmap the portion of all mmaps
vmtruncate — unmap mappings “freed” by truncate syscall
vfree — release memory allocated by vmalloc
vunmap — release virtual mapping obtained by vmap
vmap — map an array of pages into virtually contiguous space
vmalloc — allocate virtually contiguous memory
vmalloc_user — allocate zeroed virtually contiguous memory for userspace
vmalloc_node — allocate memory on a specific node
vmalloc_32 — allocate virtually contiguous memory (32bit addressable)
vmalloc_32_user — allocate zeroed virtually contiguous 32bit memory
remap_vmalloc_range — map vmalloc pages to userspace
find_next_best_node — find the next node that should appear in a given node's fallback list
free_bootmem_with_active_regions — Call free_bootmem_node for each active range
sparse_memory_present_with_active_regions — Call memory_present for each active range
push_node_boundaries — Push node boundaries to at least the requested boundary
get_pfn_range_for_nid — Return the start and end page frames for a node
absent_pages_in_range — Return number of page frames in holes within a range
add_active_range — Register a range of PFNs backed by physical memory
shrink_active_range — Shrink an existing registered range of PFNs
remove_all_active_ranges — Remove all currently registered regions
find_min_pfn_with_active_regions — Find the minimum PFN registered
find_max_pfn_with_active_regions — Find the maximum PFN registered
free_area_init_nodes — Initialise all pg_data_t and zone data
set_dma_reserve — set the specified number of pages reserved in the first zone
setup_per_zone_pages_min — called when min_free_kbytes changes.
mempool_create — create a memory pool
mempool_resize — resize an existing memory pool
mempool_destroy — deallocate a memory pool
mempool_alloc — allocate an element from a specific memory pool
mempool_free — return an element to the pool.
balance_dirty_pages_ratelimited_nr — balance dirty memory state
generic_writepages — walk the list of dirty pages of the given
write_one_page — write out a single page and optionally wait on I/O
truncate_inode_pages_range — truncate range of pages specified by start and
truncate_inode_pages — truncate *all* the pages from an offset
invalidate_inode_pages2_range — remove range of pages from an address_space
invalidate_inode_pages2 — remove all pages from an address_space
6. Kernel IPC facilities
IPC utilities
ipc_init — initialise IPC subsystem
ipc_init_ids — initialise IPC identifiers
ipc_init_proc_interface — Create a proc interface for sysipc types
ipc_findkey — find a key in an ipc identifier set
ipc_addid — add an IPC identifier
ipc_rmid — remove an IPC identifier
ipc_alloc — allocate ipc space
ipc_free — free ipc space
ipc_rcu_alloc — allocate ipc and rcu space
ipc_schedule_free — free ipc + rcu space
ipc_immediate_free — free ipc + rcu space
ipcperms — check IPC permissions
kernel_to_ipc64_perm — convert kernel ipc permissions to user
ipc64_perm_to_ipc_perm — convert old ipc permissions to new
ipc_parse_version — IPC call version
7. FIFO Buffer
kfifo interface
__kfifo_reset — removes the entire FIFO contents, no locking version
kfifo_reset — removes the entire FIFO contents
kfifo_put — puts some data into the FIFO
kfifo_get — gets some data from the FIFO
__kfifo_len — returns the number of bytes available in the FIFO, no locking version
kfifo_len — returns the number of bytes available in the FIFO
kfifo_init — allocates a new FIFO using a preallocated buffer
kfifo_alloc — allocates a new FIFO and its internal buffer
kfifo_free — frees the FIFO
__kfifo_put — puts some data into the FIFO, no locking version
__kfifo_get — gets some data from the FIFO, no locking version
8. relay interface support
relay interface
relay_buf_empty — boolean, is the channel buffer empty?
relay_buf_full — boolean, is the channel buffer full?
relay_reset — reset the channel
relay_open — create a new relay channel
relay_switch_subbuf — switch to a new sub-buffer
relay_subbufs_consumed — update the buffer's sub-buffers-consumed count
relay_close — close the channel
relay_flush — close the channel
relay_mmap_buf — mmap channel buffer to process address space
relay_alloc_buf — allocate a channel buffer
relay_create_buf — allocate and initialize a channel buffer
relay_destroy_channel — free the channel struct
relay_destroy_buf — destroy an rchan_buf struct and associated buffer
relay_remove_buf — remove a channel buffer
wakeup_readers — wake up readers waiting on a channel
__relay_reset — reset a channel buffer
relay_close_buf — close a channel buffer
relay_file_open — open file op for relay files
relay_file_mmap — mmap file op for relay files
relay_file_poll — poll file op for relay files
relay_file_release — release file op for relay files
relay_file_read_subbuf_avail — return bytes available in sub-buffer
relay_file_read_start_pos — find the first available byte to read
relay_file_read_end_pos — return the new read position
9. Linux Networking
Networking Base Types
enum sock_type — Socket types
struct socket — general BSD socket
Socket Buffer Functions
struct sk_buff — socket buffer
skb_queue_empty — check if a queue is empty
skb_get — reference buffer
skb_cloned — is the buffer a clone
skb_header_cloned — is the header a clone
skb_header_release — release reference to header
skb_shared — is the buffer shared
skb_share_check — check if buffer is shared and if so clone it
skb_unshare — make a copy of a shared buffer
skb_peek
skb_peek_tail
skb_queue_len — get queue length
__skb_queue_after — queue a buffer at the list head
skb_put — add data to a buffer
skb_push — add data to the start of a buffer
skb_pull — remove data from the start of a buffer
skb_headroom — bytes at buffer head
skb_tailroom — bytes at buffer end
skb_reserve — adjust headroom
skb_trim — remove end from a buffer
pskb_trim_unique — remove end from a paged unique (not cloned) buffer
skb_orphan — orphan a buffer
__dev_alloc_skb — allocate an skbuff for receiving
dev_alloc_skb — allocate an skbuff for receiving
netdev_alloc_skb — allocate an skbuff for rx on a specific device
skb_cow — copy header of skb when it is required
skb_padto — pad an skbuff up to a minimal size
skb_linearize — convert paged skb to linear one
skb_linearize_cow — make sure skb is linear and writable
skb_postpull_rcsum — update checksum for received skb after pull
pskb_trim_rcsum — trim received skb and update checksum
skb_get_timestamp — get timestamp from a skb
skb_set_timestamp — set timestamp of a skb
skb_checksum_complete — Calculate checksum of an entire packet
struct sock_common — minimal network layer representation of sockets
struct sock — network layer representation of sockets
sk_filter — run a packet through a socket filter
sk_filter_rcu_free
sk_filter_release
sk_eat_skb — Release a skb if it is no longer needed
move_addr_to_kernel — copy a socket address into kernel space
move_addr_to_user — copy an address to user space
sockfd_lookup — Go from a file number to its socket slot
sock_release — close a socket
sock_register — add a socket protocol handler
sock_unregister — remove a protocol handler
skb_over_panic — private function
skb_under_panic — private function
__alloc_skb — allocate a network buffer
__netdev_alloc_skb — allocate an skbuff for rx on a specific device
__kfree_skb — private function
kfree_skb — free an sk_buff
skb_clone — duplicate an sk_buff
skb_copy — create private copy of an sk_buff
pskb_copy — create copy of an sk_buff with private head.
pskb_expand_head — reallocate header of &sk_buff
skb_copy_expand — copy and expand sk_buff
skb_pad — zero pad the tail of an skb
__pskb_pull_tail — advance tail of skb header
skb_store_bits — store bits from kernel buffer to skb
skb_dequeue — remove from the head of the queue
skb_dequeue_tail — remove from the tail of the queue
skb_queue_purge — empty a list
skb_queue_head — queue a buffer at the list head
skb_queue_tail — queue a buffer at the list tail
skb_unlink — remove a buffer from a list
skb_append — append a buffer
skb_insert — insert a buffer
skb_split — Split fragmented skb to two parts at length len.
skb_prepare_seq_read — Prepare a sequential read of skb data
skb_seq_read — Sequentially read skb data
skb_abort_seq_read — Abort a sequential read of skb data
skb_find_text — Find a text pattern in skb data
skb_append_datato_frags — append the user data to a skb
skb_pull_rcsum — pull skb and update receive checksum
skb_segment — Perform protocol segmentation on skb.
sk_alloc — All socket objects are allocated here
sk_wait_data — wait for data to arrive at sk_receive_queue
skb_recv_datagram — Receive a datagram skbuff
skb_kill_datagram — Free a datagram skbuff forcibly
skb_copy_datagram_iovec — Copy a datagram to an iovec.
skb_copy_and_csum_datagram_iovec — Copy and checkum skb to user iovec.
datagram_poll — generic datagram poll
sk_stream_write_space — stream socket write_space callback.
sk_stream_wait_connect — Wait for a socket to get into the connected state
sk_stream_wait_memory — Wait for more memory for a socket
Socket Filter
sk_run_filter — run a filter on a socket
sk_chk_filter — verify socket filter code
Generic Network Statistics
struct gnet_stats_basic — byte/packet throughput statistics
struct gnet_stats_rate_est — rate estimator
struct gnet_stats_queue — queuing statistics
struct gnet_estimator — rate estimator configuration
gnet_stats_start_copy_compat — start dumping procedure in compatibility mode
gnet_stats_start_copy — start dumping procedure in compatibility mode
gnet_stats_copy_basic — copy basic statistics into statistic TLV
gnet_stats_copy_rate_est — copy rate estimator statistics into statistics TLV
gnet_stats_copy_queue — copy queue statistics into statistics TLV
gnet_stats_copy_app — copy application specific statistics into statistics TLV
gnet_stats_finish_copy — finish dumping procedure
gen_new_estimator — create a new rate estimator
gen_kill_estimator — remove a rate estimator
gen_replace_estimator — replace rate estimator configruation
SUN RPC subsystem
xdr_encode_opaque_fixed — Encode fixed length opaque data
xdr_encode_opaque — Encode variable length opaque data
xdr_init_encode — Initialize a struct xdr_stream for sending data.
xdr_reserve_space — Reserve buffer space for sending
xdr_write_pages — Insert a list of pages into an XDR buffer for sending
xdr_init_decode — Initialize an xdr_stream for decoding data.
xdr_inline_decode — Retrieve non-page XDR data to decode
xdr_read_pages — Ensure page-based XDR data to decode is aligned at current pointer position
xdr_enter_page — decode data from the XDR page
svc_reserve — change the space reserved for the reply to a request.
rpc_wake_up — wake up all rpc_tasks
rpc_wake_up_status — wake up all rpc_tasks and set their status value.
rpc_run_task — Allocate a new RPC task, then run rpc_execute against it
10. Network device support
Driver Support
dev_add_pack — add packet handler
__dev_remove_pack — remove packet handler
dev_remove_pack — remove packet handler
netdev_boot_setup_check — check boot time settings
__dev_get_by_name — find a device by its name
dev_get_by_name — find a device by its name
__dev_get_by_index — find a device by its ifindex
dev_get_by_index — find a device by its ifindex
dev_getbyhwaddr — find a device by its hardware address
dev_get_by_flags — find any device with given flags
dev_valid_name — check if name is okay for network device
dev_alloc_name — allocate a name for a device
netdev_features_change — device changes features
netdev_state_change — device changes state
dev_load — load a network module
dev_open — prepare an interface for use.
dev_close — shutdown an interface.
register_netdevice_notifier — register a network notifier block
unregister_netdevice_notifier — unregister a network notifier block
skb_gso_segment — Perform segmentation on skb.
dev_queue_xmit — transmit a buffer
netif_rx — post buffer to the network code
register_gifconf — register a SIOCGIF handler
netdev_set_master — set up master/slave pair
dev_set_promiscuity — update promiscuity count on a device
dev_set_allmulti — update allmulti count on a device
register_netdevice — register a network device
register_netdev — register a network device
alloc_netdev — allocate network device
free_netdev — free network device
unregister_netdevice — remove device from the kernel
unregister_netdev — remove device from the kernel
eth_type_trans — determine the packet's protocol ID.
ether_setup — setup Ethernet network device
alloc_etherdev — Allocates and sets up an Ethernet device
is_zero_ether_addr — Determine if give Ethernet address is all zeros.
is_multicast_ether_addr — Determine if the Ethernet address is a multicast.
is_broadcast_ether_addr — Determine if the Ethernet address is broadcast
is_valid_ether_addr — Determine if the given Ethernet address is valid
random_ether_addr — Generate software assigned random Ethernet address
compare_ether_addr — Compare two Ethernet addresses
Synchronous PPP
sppp_close — close down a synchronous PPP or Cisco HDLC link
sppp_open — open a synchronous PPP or Cisco HDLC link
sppp_reopen — notify of physical link loss
sppp_do_ioctl — Ioctl handler for ppp/hdlc
sppp_attach — attach synchronous PPP/HDLC to a device
sppp_detach — release PPP resources from a device
11. Module Support
Module Loading
request_module — try to load a kernel module
call_usermodehelper_keys — start a usermode application
Inter Module support
12. Hardware Interfaces
Interrupt Handling
synchronize_irq — wait for pending IRQ handlers (on other CPUs)
disable_irq_nosync — disable an irq without waiting
disable_irq — disable an irq and wait for completion
enable_irq — enable handling of an irq
set_irq_wake — control irq power management wakeup
free_irq — free an interrupt
request_irq — allocate an interrupt line
DMA Channels
request_dma — request and reserve a system DMA channel
free_dma — free a reserved system DMA channel
Resources Management
insert_resource — Inserts a resource in the resource tree
request_resource — request and reserve an I/O or memory resource
____request_resource — reserve a resource, with resource conflict returned
release_resource — release a previously reserved resource
allocate_resource — allocate empty slot in the resource tree given range & alignment
adjust_resource — modify a resource's start and size
__request_region — create a new busy resource region
__check_region — check if a resource region is busy or free
__release_region — release a previously reserved resource region
MTRR Handling
mtrr_add — Add a memory type region
mtrr_del — delete a memory type region
PCI Support Library
pci_bus_max_busnr — returns maximum PCI bus number of given bus' children
pci_find_capability — query for devices' capabilities
pci_bus_find_capability — query for devices' capabilities
pci_find_ext_capability — Find an extended capability
pci_find_next_ht_capability — query a device's Hypertransport capabilities
pci_find_ht_capability — query a device's Hypertransport capabilities
pci_find_parent_resource — return resource region of parent bus of given region
pci_restore_bars — restore a devices BAR values (e.g. after wake-up)
pci_set_power_state — Set the power state of a PCI device
pci_choose_state — Choose the power state of a PCI device
pci_save_state — save the PCI configuration space of a device before suspending
pci_restore_state — Restore the saved state of a PCI device
pci_enable_device_bars — Initialize some of a device for use
pci_enable_device — Initialize device before it's used by a driver.
pci_disable_device — Disable PCI device after use
pci_enable_wake — enable device to generate PME# when suspended
pci_release_region — Release a PCI bar
pci_request_region — Reserved PCI I/O and memory resource
pci_release_regions — Release reserved PCI I/O and memory resources
pci_request_regions — Reserved PCI I/O and memory resources
pci_set_master — enables bus-mastering for device dev
pci_set_mwi — enables memory-write-invalidate PCI transaction
pci_clear_mwi — disables Memory-Write-Invalidate for device dev
pci_intx — enables/disables PCI INTx for device dev
pci_match_id — See if a pci device matches a given pci_id table
pci_match_device — Tell if a PCI device structure has a matching PCI device id structure
__pci_register_driver — register a new pci driver
pci_unregister_driver — unregister a pci driver
pci_dev_driver — get the pci_driver of a device
pci_dev_get — increments the reference count of the pci device structure
pci_dev_put — release a use of the pci device structure
pci_remove_bus_device — remove a PCI device and any children
pci_remove_behind_bridge — remove all devices behind a PCI bridge
pci_stop_bus_device — stop a PCI device and any children
pci_osc_support_set — register OS support to Firmware
pci_osc_control_set — commit requested control to Firmware
pci_find_bus — locate PCI bus from a given domain and bus number
pci_find_next_bus — begin or continue searching for a PCI bus
pci_find_slot — locate PCI device from a given PCI slot
pci_get_slot — locate PCI device for a given PCI slot
pci_get_bus_and_slot — locate PCI device from a given PCI slot
pci_find_device — begin or continue searching for a PCI device by vendor/device id
pci_get_subsys — begin or continue searching for a PCI device by vendor/subvendor/device/subdevice id
pci_get_device — begin or continue searching for a PCI device by vendor/device id
pci_get_device_reverse — begin or continue searching for a PCI device by vendor/device id
pci_find_device_reverse — begin or continue searching for a PCI device by vendor/device id
pci_get_class — begin or continue searching for a PCI device by class
pci_dev_present — Returns 1 if device matching the device list is present, 0 if not.
pci_enable_msi — configure device's MSI capability structure
pci_enable_msix — configure device's MSI-X capability structure
pci_bus_alloc_resource — allocate a resource from a parent bus
pci_bus_add_device
pci_bus_add_devices — insert newly discovered PCI devices
pci_scan_slot — scan a PCI slot on a bus for devices.
pci_map_rom — map a PCI ROM to kernel space
pci_map_rom_copy — map a PCI ROM to kernel space, create a copy
pci_unmap_rom — unmap the ROM from kernel space
pci_remove_rom — disable the ROM and remove its sysfs attribute
PCI Hotplug Support Library
pci_hp_register — register a hotplug_slot with the PCI hotplug subsystem
pci_hp_deregister — deregister a hotplug_slot with the PCI hotplug subsystem
pci_hp_change_slot_info — changes the slot's information structure in the core
MCA Architecture
MCA Device Functions
MCA Bus DMA
13. Firmware Interfaces
DMI Interfaces
dmi_check_system — check system DMI data
dmi_get_system_info — return DMI data value
dmi_name_in_vendors — Check if string is anywhere in the DMI vendor information.
dmi_find_device — find onboard device by type/name
14. Security Framework
register_security — registers a security framework with the kernel
unregister_security — unregisters a security framework with the kernel
mod_reg_security — allows security modules to be “stacked
mod_unreg_security — allows a security module registered with mod_reg_security to be unloaded
15. Audit Interfaces
audit_log_start — obtain an audit buffer
audit_log_format — format a message into the audit buffer.
audit_log_end — end one audit record
audit_log — Log an audit record
audit_alloc — allocate an audit context block for a task
audit_free — free a per-task audit context
audit_syscall_entry — fill in an audit record at syscall entry
audit_syscall_exit — deallocate audit context after a system call
__audit_getname — add a name to the list
__audit_inode — store the inode and device from a lookup
__audit_inode_child — collect inode info for created/removed objects
__audit_inode_update — update inode info for last collected name
auditsc_get_stamp — get local copies of audit_context values
audit_set_loginuid — set a task's audit_context loginuid
__audit_mq_open — record audit data for a POSIX MQ open
__audit_mq_timedsend — record audit data for a POSIX MQ timed send
__audit_mq_timedreceive — record audit data for a POSIX MQ timed receive
__audit_mq_notify — record audit data for a POSIX MQ notify
__audit_mq_getsetattr — record audit data for a POSIX MQ get/set attribute
__audit_ipc_obj — record audit data for ipc object
__audit_ipc_set_perm — record audit data for new ipc permissions
audit_socketcall — record audit data for sys_socketcall
audit_sockaddr — record audit data for sys_bind, sys_connect, sys_sendto
audit_avc_path — record the granting or denial of permissions
__audit_signal_info — record signal info for shutting down audit subsystem
audit_receive_filter — apply all rules to the specified message type
16. Accounting Framework
sys_acct — enable/disable process accounting
acct_auto_close_mnt — turn off a filesystem's accounting if it is on
acct_auto_close — turn off a filesystem's accounting if it is on
acct_init_pacct — initialize a new pacct_struct
acct_collect — collect accounting information into pacct_struct
acct_process — now just a wrapper around do_acct_process
17. Power Management
pm_register — register a device with power management
pm_send_all — send request to all managed devices
18. Device drivers infrastructure
Device Drivers Base
driver_for_each_device — Iterator for devices bound to a driver.
driver_find_device — device iterator for locating a particular device.
driver_create_file — create sysfs file for driver.
driver_remove_file — remove sysfs file for driver.
get_driver — increment driver reference count.
put_driver — decrement driver's refcount.
driver_register — register driver with bus