Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
ksysfs.c File Reference
#include <linux/kobject.h>
#include <linux/string.h>
#include <linux/sysfs.h>
#include <linux/export.h>
#include <linux/init.h>
#include <linux/kexec.h>
#include <linux/profile.h>
#include <linux/stat.h>
#include <linux/sched.h>
#include <linux/capability.h>

Go to the source code of this file.

Macros

#define KERNEL_ATTR_RO(_name)   static struct kobj_attribute _name##_attr = __ATTR_RO(_name)
 
#define KERNEL_ATTR_RW(_name)
 
#define notes_size   (&__stop_notes - &__start_notes)
 

Functions

 KERNEL_ATTR_RO (fscaps)
 
const void __start_notes __attribute__ ((weak))
 
 EXPORT_SYMBOL_GPL (kernel_kobj)
 
 core_initcall (ksysfs_init)
 

Variables

struct kobjectkernel_kobj
 

Macro Definition Documentation

#define KERNEL_ATTR_RO (   _name)    static struct kobj_attribute _name##_attr = __ATTR_RO(_name)

Definition at line 22 of file ksysfs.c.

#define KERNEL_ATTR_RW (   _name)
Value:
static struct kobj_attribute _name##_attr = \
__ATTR(_name, 0644, _name##_show, _name##_store)

Definition at line 25 of file ksysfs.c.

#define notes_size   (&__stop_notes - &__start_notes)

Definition at line 149 of file ksysfs.c.

Function Documentation

const void __start_notes __attribute__ ( (weak)  )
read

read_persistent_clock - Return time from the persistent clock.

Weak dummy function for arches that do not yet support it. Reads the time from the battery backed persistent clock. Returns a timespec with tv_sec=0 and tv_nsec=0 if unsupported.

XXX - Do be sure to remove it once all arches implement it.

read_boot_clock - Return time of the system start.

Weak dummy function for arches that do not yet support it. Function to read the exact time the system has been started. Returns a timespec with tv_sec=0 and tv_nsec=0 if unsupported.

XXX - Do be sure to remove it once all arches implement it.

__iowrite32_copy - copy data to MMIO space, in 32-bit units : destination, in MMIO space (must be 32-bit aligned) : source (must be 32-bit aligned) : number of 32-bit quantities to copy

Copy data from kernel space to MMIO space, in units of 32 bits at a time. Order of access is not guaranteed, nor is a memory barrier performed afterwards.

__iowrite64_copy - copy data to MMIO space, in 64-bit or 32-bit units : destination, in MMIO space (must be 64-bit aligned) : source (must be 64-bit aligned) : number of 64-bit quantities to copy

Copy data from kernel space to MMIO space, in units of 32 or 64 bits at a time. Order of access is not guaranteed, nor is a memory barrier performed afterwards.

read_persistent_clock - Return time from the persistent clock.

Weak dummy function for arches that do not yet support it. Reads the time from the battery backed persistent clock. Returns a timespec with tv_sec=0 and tv_nsec=0 if unsupported.

XXX - Do be sure to remove it once all arches implement it.

read_boot_clock - Return time of the system start.

Weak dummy function for arches that do not yet support it. Function to read the exact time the system has been started. Returns a timespec with tv_sec=0 and tv_nsec=0 if unsupported.

XXX - Do be sure to remove it once all arches implement it.

__iowrite32_copy - copy data to MMIO space, in 32-bit units : destination, in MMIO space (must be 32-bit aligned) : source (must be 32-bit aligned) : number of 32-bit quantities to copy

Copy data from kernel space to MMIO space, in units of 32 bits at a time. Order of access is not guaranteed, nor is a memory barrier performed afterwards.

__iowrite64_copy - copy data to MMIO space, in 64-bit or 32-bit units : destination, in MMIO space (must be 64-bit aligned) : source (must be 64-bit aligned) : number of 64-bit quantities to copy

Copy data from kernel space to MMIO space, in units of 32 or 64 bits at a time. Order of access is not guaranteed, nor is a memory barrier performed afterwards.

get_user_pages_fast() - pin user pages in memory : starting user address : number of pages from start to pin : whether pages will be written to : array that receives pointers to the pages pinned. Should be at least nr_pages long.

Returns number of pages pinned. This may be fewer than the number requested. If nr_pages is 0 or negative, returns 0. If no pages were pinned, returns -errno.

get_user_pages_fast provides equivalent functionality to get_user_pages, operating on current and current->mm, with force=0 and vma=NULL. However unlike get_user_pages, it must be called without mmap_sem held.

get_user_pages_fast may take mmap_sem and page table locks, so no assumptions can be made about lack of locking. get_user_pages_fast is to be implemented in a way that is advantageous (vs get_user_pages()) when the user memory area is already faulted in and present in ptes. However if the pages have to be faulted in, it may turn out to be slightly slower so callers need to carefully consider what to use. On many architectures, get_user_pages_fast simply falls back to get_user_pages.

read_persistent_clock - Return time from the persistent clock.

Weak dummy function for arches that do not yet support it. Reads the time from the battery backed persistent clock. Returns a timespec with tv_sec=0 and tv_nsec=0 if unsupported.

XXX - Do be sure to remove it once all arches implement it.

read_boot_clock - Return time of the system start.

Weak dummy function for arches that do not yet support it. Function to read the exact time the system has been started. Returns a timespec with tv_sec=0 and tv_nsec=0 if unsupported.

XXX - Do be sure to remove it once all arches implement it.

__iowrite32_copy - copy data to MMIO space, in 32-bit units : destination, in MMIO space (must be 32-bit aligned) : source (must be 32-bit aligned) : number of 32-bit quantities to copy

Copy data from kernel space to MMIO space, in units of 32 bits at a time. Order of access is not guaranteed, nor is a memory barrier performed afterwards.

__iowrite64_copy - copy data to MMIO space, in 64-bit or 32-bit units : destination, in MMIO space (must be 64-bit aligned) : source (must be 64-bit aligned) : number of 64-bit quantities to copy

Copy data from kernel space to MMIO space, in units of 32 or 64 bits at a time. Order of access is not guaranteed, nor is a memory barrier performed afterwards.

get_user_pages_fast() - pin user pages in memory : starting user address : number of pages from start to pin : whether pages will be written to : array that receives pointers to the pages pinned. Should be at least nr_pages long.

Returns number of pages pinned. This may be fewer than the number requested. If nr_pages is 0 or negative, returns 0. If no pages were pinned, returns -errno.

get_user_pages_fast provides equivalent functionality to get_user_pages, operating on current and current->mm, with force=0 and vma=NULL. However unlike get_user_pages, it must be called without mmap_sem held.

get_user_pages_fast may take mmap_sem and page table locks, so no assumptions can be made about lack of locking. get_user_pages_fast is to be implemented in a way that is advantageous (vs get_user_pages()) when the user memory area is already faulted in and present in ptes. However if the pages have to be faulted in, it may turn out to be slightly slower so callers need to carefully consider what to use. On many architectures, get_user_pages_fast simply falls back to get_user_pages.

Definition at line 199 of file gumstix.c.

core_initcall ( ksysfs_init  )
EXPORT_SYMBOL_GPL ( kernel_kobj  )
KERNEL_ATTR_RO ( fscaps  )

Variable Documentation

struct kobject* kernel_kobj

Definition at line 167 of file ksysfs.c.