mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
Merge branch 'master' into for-3.9-async
To receive f56c3196f2
("async: fix
__lowest_in_progress()").
Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
commit
c14afb82ff
@ -1,7 +1,101 @@
|
||||
What: /sys/devices/system/node/possible
|
||||
Date: October 2002
|
||||
Contact: Linux Memory Management list <linux-mm@kvack.org>
|
||||
Description:
|
||||
Nodes that could be possibly become online at some point.
|
||||
|
||||
What: /sys/devices/system/node/online
|
||||
Date: October 2002
|
||||
Contact: Linux Memory Management list <linux-mm@kvack.org>
|
||||
Description:
|
||||
Nodes that are online.
|
||||
|
||||
What: /sys/devices/system/node/has_normal_memory
|
||||
Date: October 2002
|
||||
Contact: Linux Memory Management list <linux-mm@kvack.org>
|
||||
Description:
|
||||
Nodes that have regular memory.
|
||||
|
||||
What: /sys/devices/system/node/has_cpu
|
||||
Date: October 2002
|
||||
Contact: Linux Memory Management list <linux-mm@kvack.org>
|
||||
Description:
|
||||
Nodes that have one or more CPUs.
|
||||
|
||||
What: /sys/devices/system/node/has_high_memory
|
||||
Date: October 2002
|
||||
Contact: Linux Memory Management list <linux-mm@kvack.org>
|
||||
Description:
|
||||
Nodes that have regular or high memory.
|
||||
Depends on CONFIG_HIGHMEM.
|
||||
|
||||
What: /sys/devices/system/node/nodeX
|
||||
Date: October 2002
|
||||
Contact: Linux Memory Management list <linux-mm@kvack.org>
|
||||
Description:
|
||||
When CONFIG_NUMA is enabled, this is a directory containing
|
||||
information on node X such as what CPUs are local to the
|
||||
node.
|
||||
node. Each file is detailed next.
|
||||
|
||||
What: /sys/devices/system/node/nodeX/cpumap
|
||||
Date: October 2002
|
||||
Contact: Linux Memory Management list <linux-mm@kvack.org>
|
||||
Description:
|
||||
The node's cpumap.
|
||||
|
||||
What: /sys/devices/system/node/nodeX/cpulist
|
||||
Date: October 2002
|
||||
Contact: Linux Memory Management list <linux-mm@kvack.org>
|
||||
Description:
|
||||
The CPUs associated to the node.
|
||||
|
||||
What: /sys/devices/system/node/nodeX/meminfo
|
||||
Date: October 2002
|
||||
Contact: Linux Memory Management list <linux-mm@kvack.org>
|
||||
Description:
|
||||
Provides information about the node's distribution and memory
|
||||
utilization. Similar to /proc/meminfo, see Documentation/filesystems/proc.txt
|
||||
|
||||
What: /sys/devices/system/node/nodeX/numastat
|
||||
Date: October 2002
|
||||
Contact: Linux Memory Management list <linux-mm@kvack.org>
|
||||
Description:
|
||||
The node's hit/miss statistics, in units of pages.
|
||||
See Documentation/numastat.txt
|
||||
|
||||
What: /sys/devices/system/node/nodeX/distance
|
||||
Date: October 2002
|
||||
Contact: Linux Memory Management list <linux-mm@kvack.org>
|
||||
Description:
|
||||
Distance between the node and all the other nodes
|
||||
in the system.
|
||||
|
||||
What: /sys/devices/system/node/nodeX/vmstat
|
||||
Date: October 2002
|
||||
Contact: Linux Memory Management list <linux-mm@kvack.org>
|
||||
Description:
|
||||
The node's zoned virtual memory statistics.
|
||||
This is a superset of numastat.
|
||||
|
||||
What: /sys/devices/system/node/nodeX/compact
|
||||
Date: February 2010
|
||||
Contact: Mel Gorman <mel@csn.ul.ie>
|
||||
Description:
|
||||
When this file is written to, all memory within that node
|
||||
will be compacted. When it completes, memory will be freed
|
||||
into blocks which have as many contiguous pages as possible
|
||||
|
||||
What: /sys/devices/system/node/nodeX/scan_unevictable_pages
|
||||
Date: October 2008
|
||||
Contact: Lee Schermerhorn <lee.schermerhorn@hp.com>
|
||||
Description:
|
||||
When set, it triggers scanning the node's unevictable lists
|
||||
and move any pages that have become evictable onto the respective
|
||||
zone's inactive list. See mm/vmscan.c
|
||||
|
||||
What: /sys/devices/system/node/nodeX/hugepages/hugepages-<size>/
|
||||
Date: December 2009
|
||||
Contact: Lee Schermerhorn <lee.schermerhorn@hp.com>
|
||||
Description:
|
||||
The node's huge page size control/query attributes.
|
||||
See Documentation/vm/hugetlbpage.txt
|
@ -23,7 +23,7 @@ Description:
|
||||
lsm: [[subj_user=] [subj_role=] [subj_type=]
|
||||
[obj_user=] [obj_role=] [obj_type=]]
|
||||
|
||||
base: func:= [BPRM_CHECK][FILE_MMAP][FILE_CHECK]
|
||||
base: func:= [BPRM_CHECK][FILE_MMAP][FILE_CHECK][MODULE_CHECK]
|
||||
mask:= [MAY_READ] [MAY_WRITE] [MAY_APPEND] [MAY_EXEC]
|
||||
fsmagic:= hex value
|
||||
uid:= decimal value
|
||||
@ -53,6 +53,7 @@ Description:
|
||||
measure func=BPRM_CHECK
|
||||
measure func=FILE_MMAP mask=MAY_EXEC
|
||||
measure func=FILE_CHECK mask=MAY_READ uid=0
|
||||
measure func=MODULE_CHECK uid=0
|
||||
appraise fowner=0
|
||||
|
||||
The default policy measures all executables in bprm_check,
|
||||
|
@ -70,6 +70,10 @@ snap_*
|
||||
|
||||
A directory per each snapshot
|
||||
|
||||
parent
|
||||
|
||||
Information identifying the pool, image, and snapshot id for
|
||||
the parent image in a layered rbd image (format 2 only).
|
||||
|
||||
Entries under /sys/bus/rbd/devices/<dev-id>/snap_<snap-name>
|
||||
-------------------------------------------------------------
|
||||
|
@ -1,7 +0,0 @@
|
||||
What: /sys/devices/system/node/nodeX/compact
|
||||
Date: February 2010
|
||||
Contact: Mel Gorman <mel@csn.ul.ie>
|
||||
Description:
|
||||
When this file is written to, all memory within that node
|
||||
will be compacted. When it completes, memory will be freed
|
||||
into blocks which have as many contiguous pages as possible
|
@ -468,11 +468,46 @@ To map a single region, you do:
|
||||
size_t size = buffer->len;
|
||||
|
||||
dma_handle = dma_map_single(dev, addr, size, direction);
|
||||
if (dma_mapping_error(dma_handle)) {
|
||||
/*
|
||||
* reduce current DMA mapping usage,
|
||||
* delay and try again later or
|
||||
* reset driver.
|
||||
*/
|
||||
goto map_error_handling;
|
||||
}
|
||||
|
||||
and to unmap it:
|
||||
|
||||
dma_unmap_single(dev, dma_handle, size, direction);
|
||||
|
||||
You should call dma_mapping_error() as dma_map_single() could fail and return
|
||||
error. Not all dma implementations support dma_mapping_error() interface.
|
||||
However, it is a good practice to call dma_mapping_error() interface, which
|
||||
will invoke the generic mapping error check interface. Doing so will ensure
|
||||
that the mapping code will work correctly on all dma implementations without
|
||||
any dependency on the specifics of the underlying implementation. Using the
|
||||
returned address without checking for errors could result in failures ranging
|
||||
from panics to silent data corruption. Couple of example of incorrect ways to
|
||||
check for errors that make assumptions about the underlying dma implementation
|
||||
are as follows and these are applicable to dma_map_page() as well.
|
||||
|
||||
Incorrect example 1:
|
||||
dma_addr_t dma_handle;
|
||||
|
||||
dma_handle = dma_map_single(dev, addr, size, direction);
|
||||
if ((dma_handle & 0xffff != 0) || (dma_handle >= 0x1000000)) {
|
||||
goto map_error;
|
||||
}
|
||||
|
||||
Incorrect example 2:
|
||||
dma_addr_t dma_handle;
|
||||
|
||||
dma_handle = dma_map_single(dev, addr, size, direction);
|
||||
if (dma_handle == DMA_ERROR_CODE) {
|
||||
goto map_error;
|
||||
}
|
||||
|
||||
You should call dma_unmap_single when the DMA activity is finished, e.g.
|
||||
from the interrupt which told you that the DMA transfer is done.
|
||||
|
||||
@ -489,6 +524,14 @@ Specifically:
|
||||
size_t size = buffer->len;
|
||||
|
||||
dma_handle = dma_map_page(dev, page, offset, size, direction);
|
||||
if (dma_mapping_error(dma_handle)) {
|
||||
/*
|
||||
* reduce current DMA mapping usage,
|
||||
* delay and try again later or
|
||||
* reset driver.
|
||||
*/
|
||||
goto map_error_handling;
|
||||
}
|
||||
|
||||
...
|
||||
|
||||
@ -496,6 +539,12 @@ Specifically:
|
||||
|
||||
Here, "offset" means byte offset within the given page.
|
||||
|
||||
You should call dma_mapping_error() as dma_map_page() could fail and return
|
||||
error as outlined under the dma_map_single() discussion.
|
||||
|
||||
You should call dma_unmap_page when the DMA activity is finished, e.g.
|
||||
from the interrupt which told you that the DMA transfer is done.
|
||||
|
||||
With scatterlists, you map a region gathered from several regions by:
|
||||
|
||||
int i, count = dma_map_sg(dev, sglist, nents, direction);
|
||||
@ -578,6 +627,14 @@ to use the dma_sync_*() interfaces.
|
||||
dma_addr_t mapping;
|
||||
|
||||
mapping = dma_map_single(cp->dev, buffer, len, DMA_FROM_DEVICE);
|
||||
if (dma_mapping_error(dma_handle)) {
|
||||
/*
|
||||
* reduce current DMA mapping usage,
|
||||
* delay and try again later or
|
||||
* reset driver.
|
||||
*/
|
||||
goto map_error_handling;
|
||||
}
|
||||
|
||||
cp->rx_buf = buffer;
|
||||
cp->rx_len = len;
|
||||
@ -658,6 +715,75 @@ failure can be determined by:
|
||||
* delay and try again later or
|
||||
* reset driver.
|
||||
*/
|
||||
goto map_error_handling;
|
||||
}
|
||||
|
||||
- unmap pages that are already mapped, when mapping error occurs in the middle
|
||||
of a multiple page mapping attempt. These example are applicable to
|
||||
dma_map_page() as well.
|
||||
|
||||
Example 1:
|
||||
dma_addr_t dma_handle1;
|
||||
dma_addr_t dma_handle2;
|
||||
|
||||
dma_handle1 = dma_map_single(dev, addr, size, direction);
|
||||
if (dma_mapping_error(dev, dma_handle1)) {
|
||||
/*
|
||||
* reduce current DMA mapping usage,
|
||||
* delay and try again later or
|
||||
* reset driver.
|
||||
*/
|
||||
goto map_error_handling1;
|
||||
}
|
||||
dma_handle2 = dma_map_single(dev, addr, size, direction);
|
||||
if (dma_mapping_error(dev, dma_handle2)) {
|
||||
/*
|
||||
* reduce current DMA mapping usage,
|
||||
* delay and try again later or
|
||||
* reset driver.
|
||||
*/
|
||||
goto map_error_handling2;
|
||||
}
|
||||
|
||||
...
|
||||
|
||||
map_error_handling2:
|
||||
dma_unmap_single(dma_handle1);
|
||||
map_error_handling1:
|
||||
|
||||
Example 2: (if buffers are allocated a loop, unmap all mapped buffers when
|
||||
mapping error is detected in the middle)
|
||||
|
||||
dma_addr_t dma_addr;
|
||||
dma_addr_t array[DMA_BUFFERS];
|
||||
int save_index = 0;
|
||||
|
||||
for (i = 0; i < DMA_BUFFERS; i++) {
|
||||
|
||||
...
|
||||
|
||||
dma_addr = dma_map_single(dev, addr, size, direction);
|
||||
if (dma_mapping_error(dev, dma_addr)) {
|
||||
/*
|
||||
* reduce current DMA mapping usage,
|
||||
* delay and try again later or
|
||||
* reset driver.
|
||||
*/
|
||||
goto map_error_handling;
|
||||
}
|
||||
array[i].dma_addr = dma_addr;
|
||||
save_index++;
|
||||
}
|
||||
|
||||
...
|
||||
|
||||
map_error_handling:
|
||||
|
||||
for (i = 0; i < save_index; i++) {
|
||||
|
||||
...
|
||||
|
||||
dma_unmap_single(array[i].dma_addr);
|
||||
}
|
||||
|
||||
Networking drivers must call dev_kfree_skb to free the socket buffer
|
||||
|
@ -678,3 +678,15 @@ out of dma_debug_entries. These entries are preallocated at boot. The number
|
||||
of preallocated entries is defined per architecture. If it is too low for you
|
||||
boot with 'dma_debug_entries=<your_desired_number>' to overwrite the
|
||||
architectural default.
|
||||
|
||||
void debug_dmap_mapping_error(struct device *dev, dma_addr_t dma_addr);
|
||||
|
||||
dma-debug interface debug_dma_mapping_error() to debug drivers that fail
|
||||
to check dma mapping errors on addresses returned by dma_map_single() and
|
||||
dma_map_page() interfaces. This interface clears a flag set by
|
||||
debug_dma_map_page() to indicate that dma_mapping_error() has been called by
|
||||
the driver. When driver does unmap, debug_dma_unmap() checks the flag and if
|
||||
this flag is still set, prints warning message that includes call trace that
|
||||
leads up to the unmap. This interface can be called from dma_mapping_error()
|
||||
routines to enable dma mapping error check debugging.
|
||||
|
||||
|
@ -116,7 +116,7 @@ my_suspend (struct pci_dev * pci_dev,
|
||||
return 0; /* a negative value on error, 0 on success. */
|
||||
}
|
||||
|
||||
static void __devexit
|
||||
static void
|
||||
my_remove (struct pci_dev * pci_dev)
|
||||
{
|
||||
my_device *my = pci_get_drvdata (pci_dev);
|
||||
@ -124,7 +124,7 @@ my_remove (struct pci_dev * pci_dev)
|
||||
/* Describe me. */
|
||||
}
|
||||
|
||||
static int __devinit
|
||||
static int
|
||||
my_probe (struct pci_dev * pci_dev,
|
||||
const struct pci_device_id * pci_id)
|
||||
{
|
||||
@ -157,7 +157,7 @@ my_pci_driver = {
|
||||
.id_table = my_pci_device_ids,
|
||||
|
||||
.probe = my_probe,
|
||||
.remove = __devexit_p (my_remove),
|
||||
.remove = my_remove,
|
||||
|
||||
/* Power management functions. */
|
||||
.suspend = my_suspend,
|
||||
|
@ -76,7 +76,7 @@ To notify SR-IOV core of Virtual Function Migration:
|
||||
|
||||
Following piece of code illustrates the usage of the SR-IOV API.
|
||||
|
||||
static int __devinit dev_probe(struct pci_dev *dev, const struct pci_device_id *id)
|
||||
static int dev_probe(struct pci_dev *dev, const struct pci_device_id *id)
|
||||
{
|
||||
pci_enable_sriov(dev, NR_VIRTFN);
|
||||
|
||||
@ -85,7 +85,7 @@ static int __devinit dev_probe(struct pci_dev *dev, const struct pci_device_id *
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __devexit dev_remove(struct pci_dev *dev)
|
||||
static void dev_remove(struct pci_dev *dev)
|
||||
{
|
||||
pci_disable_sriov(dev);
|
||||
|
||||
@ -131,7 +131,7 @@ static struct pci_driver dev_driver = {
|
||||
.name = "SR-IOV Physical Function driver",
|
||||
.id_table = dev_id_table,
|
||||
.probe = dev_probe,
|
||||
.remove = __devexit_p(dev_remove),
|
||||
.remove = dev_remove,
|
||||
.suspend = dev_suspend,
|
||||
.resume = dev_resume,
|
||||
.shutdown = dev_shutdown,
|
||||
|
@ -183,12 +183,6 @@ Please mark the initialization and cleanup functions where appropriate
|
||||
initializes.
|
||||
__exit Exit code. Ignored for non-modular drivers.
|
||||
|
||||
|
||||
__devinit Device initialization code.
|
||||
Identical to __init if the kernel is not compiled
|
||||
with CONFIG_HOTPLUG, normal function otherwise.
|
||||
__devexit The same for __exit.
|
||||
|
||||
Tips on when/where to use the above attributes:
|
||||
o The module_init()/module_exit() functions (and all
|
||||
initialization functions called _only_ from these)
|
||||
@ -196,20 +190,6 @@ Tips on when/where to use the above attributes:
|
||||
|
||||
o Do not mark the struct pci_driver.
|
||||
|
||||
o The ID table array should be marked __devinitconst; this is done
|
||||
automatically if the table is declared with DEFINE_PCI_DEVICE_TABLE().
|
||||
|
||||
o The probe() and remove() functions should be marked __devinit
|
||||
and __devexit respectively. All initialization functions
|
||||
exclusively called by the probe() routine, can be marked __devinit.
|
||||
Ditto for remove() and __devexit.
|
||||
|
||||
o If mydriver_remove() is marked with __devexit(), then all address
|
||||
references to mydriver_remove must use __devexit_p(mydriver_remove)
|
||||
(in the struct pci_driver declaration for example).
|
||||
__devexit_p() will generate the function name _or_ NULL if the
|
||||
function will be discarded. For an example, see drivers/net/tg3.c.
|
||||
|
||||
o Do NOT mark a function if you are not sure which mark to use.
|
||||
Better to not mark the function than mark the function wrong.
|
||||
|
||||
|
@ -185,7 +185,7 @@ input driver:
|
||||
.acpi_match_table ACPI_PTR(mpu3050_acpi_match),
|
||||
},
|
||||
.probe = mpu3050_probe,
|
||||
.remove = __devexit_p(mpu3050_remove),
|
||||
.remove = mpu3050_remove,
|
||||
.id_table = mpu3050_ids,
|
||||
};
|
||||
|
||||
|
@ -71,6 +71,11 @@ Brief summary of control files.
|
||||
memory.oom_control # set/show oom controls.
|
||||
memory.numa_stat # show the number of memory usage per numa node
|
||||
|
||||
memory.kmem.limit_in_bytes # set/show hard limit for kernel memory
|
||||
memory.kmem.usage_in_bytes # show current kernel memory allocation
|
||||
memory.kmem.failcnt # show the number of kernel memory usage hits limits
|
||||
memory.kmem.max_usage_in_bytes # show max kernel memory usage recorded
|
||||
|
||||
memory.kmem.tcp.limit_in_bytes # set/show hard limit for tcp buf memory
|
||||
memory.kmem.tcp.usage_in_bytes # show current tcp buf memory allocation
|
||||
memory.kmem.tcp.failcnt # show the number of tcp buf memory usage hits limits
|
||||
@ -268,20 +273,73 @@ the amount of kernel memory used by the system. Kernel memory is fundamentally
|
||||
different than user memory, since it can't be swapped out, which makes it
|
||||
possible to DoS the system by consuming too much of this precious resource.
|
||||
|
||||
Kernel memory won't be accounted at all until limit on a group is set. This
|
||||
allows for existing setups to continue working without disruption. The limit
|
||||
cannot be set if the cgroup have children, or if there are already tasks in the
|
||||
cgroup. Attempting to set the limit under those conditions will return -EBUSY.
|
||||
When use_hierarchy == 1 and a group is accounted, its children will
|
||||
automatically be accounted regardless of their limit value.
|
||||
|
||||
After a group is first limited, it will be kept being accounted until it
|
||||
is removed. The memory limitation itself, can of course be removed by writing
|
||||
-1 to memory.kmem.limit_in_bytes. In this case, kmem will be accounted, but not
|
||||
limited.
|
||||
|
||||
Kernel memory limits are not imposed for the root cgroup. Usage for the root
|
||||
cgroup may or may not be accounted.
|
||||
cgroup may or may not be accounted. The memory used is accumulated into
|
||||
memory.kmem.usage_in_bytes, or in a separate counter when it makes sense.
|
||||
(currently only for tcp).
|
||||
The main "kmem" counter is fed into the main counter, so kmem charges will
|
||||
also be visible from the user counter.
|
||||
|
||||
Currently no soft limit is implemented for kernel memory. It is future work
|
||||
to trigger slab reclaim when those limits are reached.
|
||||
|
||||
2.7.1 Current Kernel Memory resources accounted
|
||||
|
||||
* stack pages: every process consumes some stack pages. By accounting into
|
||||
kernel memory, we prevent new processes from being created when the kernel
|
||||
memory usage is too high.
|
||||
|
||||
* slab pages: pages allocated by the SLAB or SLUB allocator are tracked. A copy
|
||||
of each kmem_cache is created everytime the cache is touched by the first time
|
||||
from inside the memcg. The creation is done lazily, so some objects can still be
|
||||
skipped while the cache is being created. All objects in a slab page should
|
||||
belong to the same memcg. This only fails to hold when a task is migrated to a
|
||||
different memcg during the page allocation by the cache.
|
||||
|
||||
* sockets memory pressure: some sockets protocols have memory pressure
|
||||
thresholds. The Memory Controller allows them to be controlled individually
|
||||
per cgroup, instead of globally.
|
||||
|
||||
* tcp memory pressure: sockets memory pressure for the tcp protocol.
|
||||
|
||||
2.7.3 Common use cases
|
||||
|
||||
Because the "kmem" counter is fed to the main user counter, kernel memory can
|
||||
never be limited completely independently of user memory. Say "U" is the user
|
||||
limit, and "K" the kernel limit. There are three possible ways limits can be
|
||||
set:
|
||||
|
||||
U != 0, K = unlimited:
|
||||
This is the standard memcg limitation mechanism already present before kmem
|
||||
accounting. Kernel memory is completely ignored.
|
||||
|
||||
U != 0, K < U:
|
||||
Kernel memory is a subset of the user memory. This setup is useful in
|
||||
deployments where the total amount of memory per-cgroup is overcommited.
|
||||
Overcommiting kernel memory limits is definitely not recommended, since the
|
||||
box can still run out of non-reclaimable memory.
|
||||
In this case, the admin could set up K so that the sum of all groups is
|
||||
never greater than the total memory, and freely set U at the cost of his
|
||||
QoS.
|
||||
|
||||
U != 0, K >= U:
|
||||
Since kmem charges will also be fed to the user counter and reclaim will be
|
||||
triggered for the cgroup for both kinds of memory. This setup gives the
|
||||
admin a unified view of memory, and it is also useful for people who just
|
||||
want to track kernel memory usage.
|
||||
|
||||
3. User Interface
|
||||
|
||||
0. Configuration
|
||||
@ -290,6 +348,7 @@ a. Enable CONFIG_CGROUPS
|
||||
b. Enable CONFIG_RESOURCE_COUNTERS
|
||||
c. Enable CONFIG_MEMCG
|
||||
d. Enable CONFIG_MEMCG_SWAP (to use swap extension)
|
||||
d. Enable CONFIG_MEMCG_KMEM (to use kmem extension)
|
||||
|
||||
1. Prepare the cgroups (see cgroups.txt, Why are cgroups needed?)
|
||||
# mount -t tmpfs none /sys/fs/cgroup
|
||||
@ -406,6 +465,11 @@ About use_hierarchy, see Section 6.
|
||||
Because rmdir() moves all pages to parent, some out-of-use page caches can be
|
||||
moved to the parent. If you want to avoid that, force_empty will be useful.
|
||||
|
||||
Also, note that when memory.kmem.limit_in_bytes is set the charges due to
|
||||
kernel pages will still be seen. This is not considered a failure and the
|
||||
write will still return success. In this case, it is expected that
|
||||
memory.kmem.usage_in_bytes == memory.usage_in_bytes.
|
||||
|
||||
About use_hierarchy, see Section 6.
|
||||
|
||||
5.2 stat file
|
||||
|
@ -83,16 +83,17 @@ to work with it.
|
||||
res_counter->lock internally (it must be called with res_counter->lock
|
||||
held). The force parameter indicates whether we can bypass the limit.
|
||||
|
||||
e. void res_counter_uncharge[_locked]
|
||||
e. u64 res_counter_uncharge[_locked]
|
||||
(struct res_counter *rc, unsigned long val)
|
||||
|
||||
When a resource is released (freed) it should be de-accounted
|
||||
from the resource counter it was accounted to. This is called
|
||||
"uncharging".
|
||||
"uncharging". The return value of this function indicate the amount
|
||||
of charges still present in the counter.
|
||||
|
||||
The _locked routines imply that the res_counter->lock is taken.
|
||||
|
||||
f. void res_counter_uncharge_until
|
||||
f. u64 res_counter_uncharge_until
|
||||
(struct res_counter *rc, struct res_counter *top,
|
||||
unsinged long val)
|
||||
|
||||
|
@ -23,6 +23,9 @@ Recommended properties :
|
||||
- ti,davinci-nand-buswidth: buswidth 8 or 16
|
||||
- ti,davinci-nand-use-bbt: use flash based bad block table support.
|
||||
|
||||
nand device bindings may contain additional sub-nodes describing
|
||||
partitions of the address space. See partition.txt for more detail.
|
||||
|
||||
Example(da850 EVM ):
|
||||
nand_cs3@62000000 {
|
||||
compatible = "ti,davinci-nand";
|
||||
@ -35,4 +38,9 @@ nand_cs3@62000000 {
|
||||
ti,davinci-ecc-mode = "hw";
|
||||
ti,davinci-ecc-bits = <4>;
|
||||
ti,davinci-nand-use-bbt;
|
||||
|
||||
partition@180000 {
|
||||
label = "ubifs";
|
||||
reg = <0x180000 0x7e80000>;
|
||||
};
|
||||
};
|
||||
|
@ -60,11 +60,6 @@ clks: clkctrl@80040000 {
|
||||
compatible = "fsl,imx23-clkctrl";
|
||||
reg = <0x80040000 0x2000>;
|
||||
#clock-cells = <1>;
|
||||
clock-output-names =
|
||||
...
|
||||
"uart", /* 32 */
|
||||
...
|
||||
"end_of_list";
|
||||
};
|
||||
|
||||
auart0: serial@8006c000 {
|
||||
|
@ -146,10 +146,6 @@ clks: ccm@53f80000 {
|
||||
compatible = "fsl,imx25-ccm";
|
||||
reg = <0x53f80000 0x4000>;
|
||||
interrupts = <31>;
|
||||
clock-output-names = ...
|
||||
"uart_ipg",
|
||||
"uart_serial",
|
||||
...;
|
||||
};
|
||||
|
||||
uart1: serial@43f90000 {
|
||||
|
@ -83,11 +83,6 @@ clks: clkctrl@80040000 {
|
||||
compatible = "fsl,imx28-clkctrl";
|
||||
reg = <0x80040000 0x2000>;
|
||||
#clock-cells = <1>;
|
||||
clock-output-names =
|
||||
...
|
||||
"uart", /* 45 */
|
||||
...
|
||||
"end_of_list";
|
||||
};
|
||||
|
||||
auart0: serial@8006a000 {
|
||||
|
@ -211,10 +211,6 @@ clks: ccm@020c4000 {
|
||||
reg = <0x020c4000 0x4000>;
|
||||
interrupts = <0 87 0x04 0 88 0x04>;
|
||||
#clock-cells = <1>;
|
||||
clock-output-names = ...
|
||||
"uart_ipg",
|
||||
"uart_serial",
|
||||
...;
|
||||
};
|
||||
|
||||
uart1: serial@02020000 {
|
||||
|
@ -1,4 +1,19 @@
|
||||
GPIO line that should be set high/low to power off a device
|
||||
Driver a GPIO line that can be used to turn the power off.
|
||||
|
||||
The driver supports both level triggered and edge triggered power off.
|
||||
At driver load time, the driver will request the given gpio line and
|
||||
install a pm_power_off handler. If the optional properties 'input' is
|
||||
not found, the GPIO line will be driven in the inactive
|
||||
state. Otherwise its configured as an input.
|
||||
|
||||
When the pm_power_off is called, the gpio is configured as an output,
|
||||
and drive active, so triggering a level triggered power off
|
||||
condition. This will also cause an inactive->active edge condition, so
|
||||
triggering positive edge triggered power off. After a delay of 100ms,
|
||||
the GPIO is set to inactive, thus causing an active->inactive edge,
|
||||
triggering negative edge triggered power off. After another 100ms
|
||||
delay the GPIO is driver active again. If the power is still on and
|
||||
the CPU still running after a 3000ms delay, a WARN_ON(1) is emitted.
|
||||
|
||||
Required properties:
|
||||
- compatible : should be "gpio-poweroff".
|
||||
@ -13,10 +28,9 @@ Optional properties:
|
||||
property is not specified, the GPIO is initialized as an output in its
|
||||
inactive state.
|
||||
|
||||
|
||||
Examples:
|
||||
|
||||
gpio-poweroff {
|
||||
compatible = "gpio-poweroff";
|
||||
gpios = <&gpio 4 0>; /* GPIO 4 Active Low */
|
||||
gpios = <&gpio 4 0>;
|
||||
};
|
||||
|
27
Documentation/devicetree/bindings/i2c/i2c-cbus-gpio.txt
Normal file
27
Documentation/devicetree/bindings/i2c/i2c-cbus-gpio.txt
Normal file
@ -0,0 +1,27 @@
|
||||
Device tree bindings for i2c-cbus-gpio driver
|
||||
|
||||
Required properties:
|
||||
- compatible = "i2c-cbus-gpio";
|
||||
- gpios: clk, dat, sel
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <0>;
|
||||
|
||||
Optional properties:
|
||||
- child nodes conforming to i2c bus binding
|
||||
|
||||
Example:
|
||||
|
||||
i2c@0 {
|
||||
compatible = "i2c-cbus-gpio";
|
||||
gpios = <&gpio 66 0 /* clk */
|
||||
&gpio 65 0 /* dat */
|
||||
&gpio 64 0 /* sel */
|
||||
>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
retu-mfd: retu@1 {
|
||||
compatible = "retu-mfd";
|
||||
reg = <0x1>;
|
||||
};
|
||||
};
|
81
Documentation/devicetree/bindings/i2c/i2c-mux-gpio.txt
Normal file
81
Documentation/devicetree/bindings/i2c/i2c-mux-gpio.txt
Normal file
@ -0,0 +1,81 @@
|
||||
GPIO-based I2C Bus Mux
|
||||
|
||||
This binding describes an I2C bus multiplexer that uses GPIOs to
|
||||
route the I2C signals.
|
||||
|
||||
+-----+ +-----+
|
||||
| dev | | dev |
|
||||
+------------+ +-----+ +-----+
|
||||
| SoC | | |
|
||||
| | /--------+--------+
|
||||
| +------+ | +------+ child bus A, on GPIO value set to 0
|
||||
| | I2C |-|--| Mux |
|
||||
| +------+ | +--+---+ child bus B, on GPIO value set to 1
|
||||
| | | \----------+--------+--------+
|
||||
| +------+ | | | | |
|
||||
| | GPIO |-|-----+ +-----+ +-----+ +-----+
|
||||
| +------+ | | dev | | dev | | dev |
|
||||
+------------+ +-----+ +-----+ +-----+
|
||||
|
||||
Required properties:
|
||||
- compatible: i2c-mux-gpio
|
||||
- i2c-parent: The phandle of the I2C bus that this multiplexer's master-side
|
||||
port is connected to.
|
||||
- mux-gpios: list of gpios used to control the muxer
|
||||
* Standard I2C mux properties. See mux.txt in this directory.
|
||||
* I2C child bus nodes. See mux.txt in this directory.
|
||||
|
||||
Optional properties:
|
||||
- idle-state: value to set the muxer to when idle. When no value is
|
||||
given, it defaults to the last value used.
|
||||
|
||||
For each i2c child node, an I2C child bus will be created. They will
|
||||
be numbered based on their order in the device tree.
|
||||
|
||||
Whenever an access is made to a device on a child bus, the value set
|
||||
in the revelant node's reg property will be output using the list of
|
||||
GPIOs, the first in the list holding the least-significant value.
|
||||
|
||||
If an idle state is defined, using the idle-state (optional) property,
|
||||
whenever an access is not being made to a device on a child bus, the
|
||||
GPIOs will be set according to the idle value.
|
||||
|
||||
If an idle state is not defined, the most recently used value will be
|
||||
left programmed into hardware whenever no access is being made to a
|
||||
device on a child bus.
|
||||
|
||||
Example:
|
||||
i2cmux {
|
||||
compatible = "i2c-mux-gpio";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
mux-gpios = <&gpio1 22 0 &gpio1 23 0>;
|
||||
i2c-parent = <&i2c1>;
|
||||
|
||||
i2c@1 {
|
||||
reg = <1>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
ssd1307: oled@3c {
|
||||
compatible = "solomon,ssd1307fb-i2c";
|
||||
reg = <0x3c>;
|
||||
pwms = <&pwm 4 3000>;
|
||||
reset-gpios = <&gpio2 7 1>;
|
||||
reset-active-low;
|
||||
};
|
||||
};
|
||||
|
||||
i2c@3 {
|
||||
reg = <3>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
pca9555: pca9555@20 {
|
||||
compatible = "nxp,pca9555";
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
reg = <0x20>;
|
||||
};
|
||||
};
|
||||
};
|
@ -1,7 +1,7 @@
|
||||
Device tree configuration for i2c-ocores
|
||||
|
||||
Required properties:
|
||||
- compatible : "opencores,i2c-ocores"
|
||||
- compatible : "opencores,i2c-ocores" or "aeroflexgaisler,i2cmst"
|
||||
- reg : bus address start and address range size of device
|
||||
- interrupts : interrupt number
|
||||
- clock-frequency : frequency of bus clock in Hz
|
||||
|
@ -13,11 +13,17 @@ Required properties:
|
||||
- interrupts: interrupt number to the cpu.
|
||||
- samsung,i2c-sda-delay: Delay (in ns) applied to data line (SDA) edges.
|
||||
|
||||
Required for all cases except "samsung,s3c2440-hdmiphy-i2c":
|
||||
- Samsung GPIO variant (deprecated):
|
||||
- gpios: The order of the gpios should be the following: <SDA, SCL>.
|
||||
The gpio specifier depends on the gpio controller. Required in all
|
||||
cases except for "samsung,s3c2440-hdmiphy-i2c" whose input/output
|
||||
lines are permanently wired to the respective clienta
|
||||
- Pinctrl variant (preferred, if available):
|
||||
- pinctrl-0: Pin control group to be used for this controller.
|
||||
- pinctrl-names: Should contain only one value - "default".
|
||||
|
||||
Optional properties:
|
||||
- gpios: The order of the gpios should be the following: <SDA, SCL>.
|
||||
The gpio specifier depends on the gpio controller. Required in all
|
||||
cases except for "samsung,s3c2440-hdmiphy-i2c" whose input/output
|
||||
lines are permanently wired to the respective client
|
||||
- samsung,i2c-slave-addr: Slave address in multi-master enviroment. If not
|
||||
specified, default value is 0.
|
||||
- samsung,i2c-max-bus-freq: Desired frequency in Hz of the bus. If not
|
||||
@ -31,8 +37,14 @@ Example:
|
||||
interrupts = <345>;
|
||||
samsung,i2c-sda-delay = <100>;
|
||||
samsung,i2c-max-bus-freq = <100000>;
|
||||
/* Samsung GPIO variant begins here */
|
||||
gpios = <&gpd1 2 0 /* SDA */
|
||||
&gpd1 3 0 /* SCL */>;
|
||||
/* Samsung GPIO variant ends here */
|
||||
/* Pinctrl variant begins here */
|
||||
pinctrl-0 = <&i2c3_bus>;
|
||||
pinctrl-names = "default";
|
||||
/* Pinctrl variant ends here */
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
|
@ -0,0 +1,46 @@
|
||||
* GPIO driven matrix keypad device tree bindings
|
||||
|
||||
GPIO driven matrix keypad is used to interface a SoC with a matrix keypad.
|
||||
The matrix keypad supports multiple row and column lines, a key can be
|
||||
placed at each intersection of a unique row and a unique column. The matrix
|
||||
keypad can sense a key-press and key-release by means of GPIO lines and
|
||||
report the event using GPIO interrupts to the cpu.
|
||||
|
||||
Required Properties:
|
||||
- compatible: Should be "gpio-matrix-keypad"
|
||||
- row-gpios: List of gpios used as row lines. The gpio specifier
|
||||
for this property depends on the gpio controller to
|
||||
which these row lines are connected.
|
||||
- col-gpios: List of gpios used as column lines. The gpio specifier
|
||||
for this property depends on the gpio controller to
|
||||
which these column lines are connected.
|
||||
- linux,keymap: The definition can be found at
|
||||
bindings/input/matrix-keymap.txt
|
||||
|
||||
Optional Properties:
|
||||
- linux,no-autorepeat: do no enable autorepeat feature.
|
||||
- linux,wakeup: use any event on keypad as wakeup event.
|
||||
- debounce-delay-ms: debounce interval in milliseconds
|
||||
- col-scan-delay-us: delay, measured in microseconds, that is needed
|
||||
before we can scan keypad after activating column gpio
|
||||
|
||||
Example:
|
||||
matrix-keypad {
|
||||
compatible = "gpio-matrix-keypad";
|
||||
debounce-delay-ms = <5>;
|
||||
col-scan-delay-us = <2>;
|
||||
|
||||
row-gpios = <&gpio2 25 0
|
||||
&gpio2 26 0
|
||||
&gpio2 27 0>;
|
||||
|
||||
col-gpios = <&gpio2 21 0
|
||||
&gpio2 22 0>;
|
||||
|
||||
linux,keymap = <0x0000008B
|
||||
0x0100009E
|
||||
0x02000069
|
||||
0x0001006A
|
||||
0x0101001C
|
||||
0x0201006C>;
|
||||
};
|
7
Documentation/devicetree/bindings/input/pwm-beeper.txt
Normal file
7
Documentation/devicetree/bindings/input/pwm-beeper.txt
Normal file
@ -0,0 +1,7 @@
|
||||
* PWM beeper device tree bindings
|
||||
|
||||
Registers a PWM device as beeper.
|
||||
|
||||
Required properties:
|
||||
- compatible: should be "pwm-beeper"
|
||||
- pwms: phandle to the physical PWM device
|
39
Documentation/devicetree/bindings/input/stmpe-keypad.txt
Normal file
39
Documentation/devicetree/bindings/input/stmpe-keypad.txt
Normal file
@ -0,0 +1,39 @@
|
||||
* STMPE Keypad
|
||||
|
||||
Required properties:
|
||||
- compatible : "st,stmpe-keypad"
|
||||
- linux,keymap : See ./matrix-keymap.txt
|
||||
|
||||
Optional properties:
|
||||
- debounce-interval : Debouncing interval time in milliseconds
|
||||
- st,scan-count : Scanning cycles elapsed before key data is updated
|
||||
- st,no-autorepeat : If specified device will not autorepeat
|
||||
|
||||
Example:
|
||||
|
||||
stmpe_keypad {
|
||||
compatible = "st,stmpe-keypad";
|
||||
|
||||
debounce-interval = <64>;
|
||||
st,scan-count = <8>;
|
||||
st,no-autorepeat;
|
||||
|
||||
linux,keymap = <0x205006b
|
||||
0x4010074
|
||||
0x3050072
|
||||
0x1030004
|
||||
0x502006a
|
||||
0x500000a
|
||||
0x5008b
|
||||
0x706001c
|
||||
0x405000b
|
||||
0x6070003
|
||||
0x3040067
|
||||
0x303006c
|
||||
0x60400e7
|
||||
0x602009e
|
||||
0x4020073
|
||||
0x5050002
|
||||
0x4030069
|
||||
0x3020008>;
|
||||
};
|
@ -0,0 +1,8 @@
|
||||
|
||||
Required properties:
|
||||
- compatible: "ti,tca8418"
|
||||
- reg: the I2C address
|
||||
- interrupts: IRQ line number, should trigger on falling edge
|
||||
- keypad,num-rows: The number of rows
|
||||
- keypad,num-columns: The number of columns
|
||||
- linux,keymap: Keys definitions, see keypad-matrix.
|
@ -0,0 +1,34 @@
|
||||
* MELFAS MMS114 touchscreen controller
|
||||
|
||||
Required properties:
|
||||
- compatible: must be "melfas,mms114"
|
||||
- reg: I2C address of the chip
|
||||
- interrupts: interrupt to which the chip is connected
|
||||
- x-size: horizontal resolution of touchscreen
|
||||
- y-size: vertical resolution of touchscreen
|
||||
|
||||
Optional properties:
|
||||
- contact-threshold:
|
||||
- moving-threshold:
|
||||
- x-invert: invert X axis
|
||||
- y-invert: invert Y axis
|
||||
|
||||
Example:
|
||||
|
||||
i2c@00000000 {
|
||||
/* ... */
|
||||
|
||||
touchscreen@48 {
|
||||
compatible = "melfas,mms114";
|
||||
reg = <0x48>;
|
||||
interrupts = <39 0>;
|
||||
x-size = <720>;
|
||||
y-size = <1280>;
|
||||
contact-threshold = <10>;
|
||||
moving-threshold = <10>;
|
||||
x-invert;
|
||||
y-invert;
|
||||
};
|
||||
|
||||
/* ... */
|
||||
};
|
@ -0,0 +1,43 @@
|
||||
STMPE Touchscreen
|
||||
----------------
|
||||
|
||||
Required properties:
|
||||
- compatible: "st,stmpe-ts"
|
||||
|
||||
Optional properties:
|
||||
- st,sample-time: ADC converstion time in number of clock. (0 -> 36 clocks, 1 ->
|
||||
44 clocks, 2 -> 56 clocks, 3 -> 64 clocks, 4 -> 80 clocks, 5 -> 96 clocks, 6
|
||||
-> 144 clocks), recommended is 4.
|
||||
- st,mod-12b: ADC Bit mode (0 -> 10bit ADC, 1 -> 12bit ADC)
|
||||
- st,ref-sel: ADC reference source (0 -> internal reference, 1 -> external
|
||||
reference)
|
||||
- st,adc-freq: ADC Clock speed (0 -> 1.625 MHz, 1 -> 3.25 MHz, 2 || 3 -> 6.5 MHz)
|
||||
- st,ave-ctrl: Sample average control (0 -> 1 sample, 1 -> 2 samples, 2 -> 4
|
||||
samples, 3 -> 8 samples)
|
||||
- st,touch-det-delay: Touch detect interrupt delay (0 -> 10 us, 1 -> 50 us, 2 ->
|
||||
100 us, 3 -> 500 us, 4-> 1 ms, 5 -> 5 ms, 6 -> 10 ms, 7 -> 50 ms) recommended
|
||||
is 3
|
||||
- st,settling: Panel driver settling time (0 -> 10 us, 1 -> 100 us, 2 -> 500 us, 3
|
||||
-> 1 ms, 4 -> 5 ms, 5 -> 10 ms, 6 for 50 ms, 7 -> 100 ms) recommended is 2
|
||||
- st,fraction-z: Length of the fractional part in z (fraction-z ([0..7]) = Count of
|
||||
the fractional part) recommended is 7
|
||||
- st,i-drive: current limit value of the touchscreen drivers (0 -> 20 mA typical 35
|
||||
mA max, 1 -> 50 mA typical 80 mA max)
|
||||
|
||||
Node name must be stmpe_touchscreen and should be child node of stmpe node to
|
||||
which it belongs.
|
||||
|
||||
Example:
|
||||
|
||||
stmpe_touchscreen {
|
||||
compatible = "st,stmpe-ts";
|
||||
st,sample-time = <4>;
|
||||
st,mod-12b = <1>;
|
||||
st,ref-sel = <0>;
|
||||
st,adc-freq = <1>;
|
||||
st,ave-ctrl = <1>;
|
||||
st,touch-det-delay = <2>;
|
||||
st,settling = <2>;
|
||||
st,fraction-z = <7>;
|
||||
st,i-drive = <1>;
|
||||
};
|
23
Documentation/devicetree/bindings/mtd/denali-nand.txt
Normal file
23
Documentation/devicetree/bindings/mtd/denali-nand.txt
Normal file
@ -0,0 +1,23 @@
|
||||
* Denali NAND controller
|
||||
|
||||
Required properties:
|
||||
- compatible : should be "denali,denali-nand-dt"
|
||||
- reg : should contain registers location and length for data and reg.
|
||||
- reg-names: Should contain the reg names "nand_data" and "denali_reg"
|
||||
- interrupts : The interrupt number.
|
||||
- dm-mask : DMA bit mask
|
||||
|
||||
The device tree may optionally contain sub-nodes describing partitions of the
|
||||
address space. See partition.txt for more detail.
|
||||
|
||||
Examples:
|
||||
|
||||
nand: nand@ff900000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "denali,denali-nand-dt";
|
||||
reg = <0xff900000 0x100000>, <0xffb80000 0x10000>;
|
||||
reg-names = "nand_data", "denali_reg";
|
||||
interrupts = <0 144 4>;
|
||||
dma-mask = <0xffffffff>;
|
||||
};
|
49
Documentation/devicetree/bindings/mtd/flctl-nand.txt
Normal file
49
Documentation/devicetree/bindings/mtd/flctl-nand.txt
Normal file
@ -0,0 +1,49 @@
|
||||
FLCTL NAND controller
|
||||
|
||||
Required properties:
|
||||
- compatible : "renesas,shmobile-flctl-sh7372"
|
||||
- reg : Address range of the FLCTL
|
||||
- interrupts : flste IRQ number
|
||||
- nand-bus-width : bus width to NAND chip
|
||||
|
||||
Optional properties:
|
||||
- dmas: DMA specifier(s)
|
||||
- dma-names: name for each DMA specifier. Valid names are
|
||||
"data_tx", "data_rx", "ecc_tx", "ecc_rx"
|
||||
|
||||
The DMA fields are not used yet in the driver but are listed here for
|
||||
completing the bindings.
|
||||
|
||||
The device tree may optionally contain sub-nodes describing partitions of the
|
||||
address space. See partition.txt for more detail.
|
||||
|
||||
Example:
|
||||
|
||||
flctl@e6a30000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "renesas,shmobile-flctl-sh7372";
|
||||
reg = <0xe6a30000 0x100>;
|
||||
interrupts = <0x0d80>;
|
||||
|
||||
nand-bus-width = <16>;
|
||||
|
||||
dmas = <&dmac 1 /* data_tx */
|
||||
&dmac 2;> /* data_rx */
|
||||
dma-names = "data_tx", "data_rx";
|
||||
|
||||
system@0 {
|
||||
label = "system";
|
||||
reg = <0x0 0x8000000>;
|
||||
};
|
||||
|
||||
userdata@8000000 {
|
||||
label = "userdata";
|
||||
reg = <0x8000000 0x10000000>;
|
||||
};
|
||||
|
||||
cache@18000000 {
|
||||
label = "cache";
|
||||
reg = <0x18000000 0x8000000>;
|
||||
};
|
||||
};
|
@ -3,9 +3,7 @@
|
||||
Required properties:
|
||||
- compatible : "st,spear600-fsmc-nand"
|
||||
- reg : Address range of the mtd chip
|
||||
- reg-names: Should contain the reg names "fsmc_regs" and "nand_data"
|
||||
- st,ale-off : Chip specific offset to ALE
|
||||
- st,cle-off : Chip specific offset to CLE
|
||||
- reg-names: Should contain the reg names "fsmc_regs", "nand_data", "nand_addr" and "nand_cmd"
|
||||
|
||||
Optional properties:
|
||||
- bank-width : Width (in bytes) of the device. If not present, the width
|
||||
@ -19,10 +17,10 @@ Example:
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
reg = <0xd1800000 0x1000 /* FSMC Register */
|
||||
0xd2000000 0x4000>; /* NAND Base */
|
||||
reg-names = "fsmc_regs", "nand_data";
|
||||
st,ale-off = <0x20000>;
|
||||
st,cle-off = <0x10000>;
|
||||
0xd2000000 0x0010 /* NAND Base DATA */
|
||||
0xd2020000 0x0010 /* NAND Base ADDR */
|
||||
0xd2010000 0x0010>; /* NAND Base CMD */
|
||||
reg-names = "fsmc_regs", "nand_data", "nand_addr", "nand_cmd";
|
||||
|
||||
bank-width = <1>;
|
||||
nand-skip-bbtscan;
|
||||
|
29
Documentation/devicetree/bindings/mtd/m25p80.txt
Normal file
29
Documentation/devicetree/bindings/mtd/m25p80.txt
Normal file
@ -0,0 +1,29 @@
|
||||
* MTD SPI driver for ST M25Pxx (and similar) serial flash chips
|
||||
|
||||
Required properties:
|
||||
- #address-cells, #size-cells : Must be present if the device has sub-nodes
|
||||
representing partitions.
|
||||
- compatible : Should be the manufacturer and the name of the chip. Bear in mind
|
||||
the DT binding is not Linux-only, but in case of Linux, see the
|
||||
"m25p_ids" table in drivers/mtd/devices/m25p80.c for the list of
|
||||
supported chips.
|
||||
- reg : Chip-Select number
|
||||
- spi-max-frequency : Maximum frequency of the SPI bus the chip can operate at
|
||||
|
||||
Optional properties:
|
||||
- m25p,fast-read : Use the "fast read" opcode to read data from the chip instead
|
||||
of the usual "read" opcode. This opcode is not supported by
|
||||
all chips and support for it can not be detected at runtime.
|
||||
Refer to your chips' datasheet to check if this is supported
|
||||
by your chip.
|
||||
|
||||
Example:
|
||||
|
||||
flash: m25p80@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "spansion,m25p80";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <40000000>;
|
||||
m25p,fast-read;
|
||||
};
|
@ -23,6 +23,9 @@ file systems on embedded devices.
|
||||
unaligned accesses as implemented in the JFFS2 code via memcpy().
|
||||
By defining "no-unaligned-direct-access", the flash will not be
|
||||
exposed directly to the MTD users (e.g. JFFS2) any more.
|
||||
- linux,mtd-name: allow to specify the mtd name for retro capability with
|
||||
physmap-flash drivers as boot loader pass the mtd partition via the old
|
||||
device name physmap-flash.
|
||||
|
||||
For JEDEC compatible devices, the following additional properties
|
||||
are defined:
|
||||
|
47
Documentation/devicetree/bindings/pinctrl/pinctrl-sirf.txt
Normal file
47
Documentation/devicetree/bindings/pinctrl/pinctrl-sirf.txt
Normal file
@ -0,0 +1,47 @@
|
||||
CSR SiRFprimaII pinmux controller
|
||||
|
||||
Required properties:
|
||||
- compatible : "sirf,prima2-pinctrl"
|
||||
- reg : Address range of the pinctrl registers
|
||||
- interrupts : Interrupts used by every GPIO group
|
||||
- gpio-controller : Indicates this device is a GPIO controller
|
||||
- interrupt-controller : Marks the device node as an interrupt controller
|
||||
Optional properties:
|
||||
- sirf,pullups : if n-th bit of m-th bank is set, set a pullup on GPIO-n of bank m
|
||||
- sirf,pulldowns : if n-th bit of m-th bank is set, set a pulldown on GPIO-n of bank m
|
||||
|
||||
Please refer to pinctrl-bindings.txt in this directory for details of the common
|
||||
pinctrl bindings used by client devices.
|
||||
|
||||
SiRFprimaII's pinmux nodes act as a container for an abitrary number of subnodes.
|
||||
Each of these subnodes represents some desired configuration for a group of pins.
|
||||
|
||||
Required subnode-properties:
|
||||
- sirf,pins : An array of strings. Each string contains the name of a group.
|
||||
- sirf,function: A string containing the name of the function to mux to the
|
||||
group.
|
||||
|
||||
Valid values for group and function names can be found from looking at the
|
||||
group and function arrays in driver files:
|
||||
drivers/pinctrl/pinctrl-sirf.c
|
||||
|
||||
For example, pinctrl might have subnodes like the following:
|
||||
uart2_pins_a: uart2@0 {
|
||||
uart {
|
||||
sirf,pins = "uart2grp";
|
||||
sirf,function = "uart2";
|
||||
};
|
||||
};
|
||||
uart2_noflow_pins_a: uart2@1 {
|
||||
uart {
|
||||
sirf,pins = "uart2_nostreamctrlgrp";
|
||||
sirf,function = "uart2_nostreamctrl";
|
||||
};
|
||||
};
|
||||
|
||||
For a specific board, if it wants to use uart2 without hardware flow control,
|
||||
it can add the following to its board-specific .dts file.
|
||||
uart2: uart@0xb0070000 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart2_noflow_pins_a>;
|
||||
}
|
81
Documentation/devicetree/bindings/powerpc/fsl/raideng.txt
Normal file
81
Documentation/devicetree/bindings/powerpc/fsl/raideng.txt
Normal file
@ -0,0 +1,81 @@
|
||||
* Freescale 85xx RAID Engine nodes
|
||||
|
||||
RAID Engine nodes are defined to describe on-chip RAID accelerators. Each RAID
|
||||
Engine should have a separate node.
|
||||
|
||||
Supported chips:
|
||||
P5020, P5040
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible: Should contain "fsl,raideng-v1.0" as the value
|
||||
This identifies RAID Engine block. 1 in 1.0 represents
|
||||
major number whereas 0 represents minor number. The
|
||||
version matches the hardware IP version.
|
||||
- reg: offset and length of the register set for the device
|
||||
- ranges: standard ranges property specifying the translation
|
||||
between child address space and parent address space
|
||||
|
||||
Example:
|
||||
/* P5020 */
|
||||
raideng: raideng@320000 {
|
||||
compatible = "fsl,raideng-v1.0";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
reg = <0x320000 0x10000>;
|
||||
ranges = <0 0x320000 0x10000>;
|
||||
};
|
||||
|
||||
|
||||
There must be a sub-node for each job queue present in RAID Engine
|
||||
This node must be a sub-node of the main RAID Engine node
|
||||
|
||||
- compatible: Should contain "fsl,raideng-v1.0-job-queue" as the value
|
||||
This identifies the job queue interface
|
||||
- reg: offset and length of the register set for job queue
|
||||
- ranges: standard ranges property specifying the translation
|
||||
between child address space and parent address space
|
||||
|
||||
Example:
|
||||
/* P5020 */
|
||||
raideng_jq0@1000 {
|
||||
compatible = "fsl,raideng-v1.0-job-queue";
|
||||
reg = <0x1000 0x1000>;
|
||||
ranges = <0x0 0x1000 0x1000>;
|
||||
};
|
||||
|
||||
|
||||
There must be a sub-node for each job ring present in RAID Engine
|
||||
This node must be a sub-node of job queue node
|
||||
|
||||
- compatible: Must contain "fsl,raideng-v1.0-job-ring" as the value
|
||||
This identifies job ring. Should contain either
|
||||
"fsl,raideng-v1.0-hp-ring" or "fsl,raideng-v1.0-lp-ring"
|
||||
depending upon whether ring has high or low priority
|
||||
- reg: offset and length of the register set for job ring
|
||||
- interrupts: interrupt mapping for job ring IRQ
|
||||
|
||||
Optional property:
|
||||
|
||||
- fsl,liodn: Specifies the LIODN to be used for Job Ring. This
|
||||
property is normally set by firmware. Value
|
||||
is of 12-bits which is the LIODN number for this JR.
|
||||
This property is used by the IOMMU (PAMU) to distinquish
|
||||
transactions from this JR and than be able to do address
|
||||
translation & protection accordingly.
|
||||
|
||||
Example:
|
||||
/* P5020 */
|
||||
raideng_jq0@1000 {
|
||||
compatible = "fsl,raideng-v1.0-job-queue";
|
||||
reg = <0x1000 0x1000>;
|
||||
ranges = <0x0 0x1000 0x1000>;
|
||||
|
||||
raideng_jr0: jr@0 {
|
||||
compatible = "fsl,raideng-v1.0-job-ring", "fsl,raideng-v1.0-hp-ring";
|
||||
reg = <0x0 0x400>;
|
||||
interrupts = <139 2 0 0>;
|
||||
interrupt-parent = <&mpic>;
|
||||
fsl,liodn = <0x41>;
|
||||
};
|
||||
};
|
23
Documentation/devicetree/bindings/pwm/pwm-tiecap.txt
Normal file
23
Documentation/devicetree/bindings/pwm/pwm-tiecap.txt
Normal file
@ -0,0 +1,23 @@
|
||||
TI SOC ECAP based APWM controller
|
||||
|
||||
Required properties:
|
||||
- compatible: Must be "ti,am33xx-ecap"
|
||||
- #pwm-cells: Should be 3. Number of cells being used to specify PWM property.
|
||||
First cell specifies the per-chip index of the PWM to use, the second
|
||||
cell is the period in nanoseconds and bit 0 in the third cell is used to
|
||||
encode the polarity of PWM output. Set bit 0 of the third in PWM specifier
|
||||
to 1 for inverse polarity & set to 0 for normal polarity.
|
||||
- reg: physical base address and size of the registers map.
|
||||
|
||||
Optional properties:
|
||||
- ti,hwmods: Name of the hwmod associated to the ECAP:
|
||||
"ecap<x>", <x> being the 0-based instance number from the HW spec
|
||||
|
||||
Example:
|
||||
|
||||
ecap0: ecap@0 {
|
||||
compatible = "ti,am33xx-ecap";
|
||||
#pwm-cells = <3>;
|
||||
reg = <0x48300100 0x80>;
|
||||
ti,hwmods = "ecap0";
|
||||
};
|
23
Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
Normal file
23
Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
Normal file
@ -0,0 +1,23 @@
|
||||
TI SOC EHRPWM based PWM controller
|
||||
|
||||
Required properties:
|
||||
- compatible : Must be "ti,am33xx-ehrpwm"
|
||||
- #pwm-cells: Should be 3. Number of cells being used to specify PWM property.
|
||||
First cell specifies the per-chip index of the PWM to use, the second
|
||||
cell is the period in nanoseconds and bit 0 in the third cell is used to
|
||||
encode the polarity of PWM output. Set bit 0 of the third in PWM specifier
|
||||
to 1 for inverse polarity & set to 0 for normal polarity.
|
||||
- reg: physical base address and size of the registers map.
|
||||
|
||||
Optional properties:
|
||||
- ti,hwmods: Name of the hwmod associated to the EHRPWM:
|
||||
"ehrpwm<x>", <x> being the 0-based instance number from the HW spec
|
||||
|
||||
Example:
|
||||
|
||||
ehrpwm0: ehrpwm@0 {
|
||||
compatible = "ti,am33xx-ehrpwm";
|
||||
#pwm-cells = <3>;
|
||||
reg = <0x48300200 0x100>;
|
||||
ti,hwmods = "ehrpwm0";
|
||||
};
|
31
Documentation/devicetree/bindings/pwm/pwm-tipwmss.txt
Normal file
31
Documentation/devicetree/bindings/pwm/pwm-tipwmss.txt
Normal file
@ -0,0 +1,31 @@
|
||||
TI SOC based PWM Subsystem
|
||||
|
||||
Required properties:
|
||||
- compatible: Must be "ti,am33xx-pwmss";
|
||||
- reg: physical base address and size of the registers map.
|
||||
- address-cells: Specify the number of u32 entries needed in child nodes.
|
||||
Should set to 1.
|
||||
- size-cells: specify number of u32 entries needed to specify child nodes size
|
||||
in reg property. Should set to 1.
|
||||
- ranges: describes the address mapping of a memory-mapped bus. Should set to
|
||||
physical address map of child's base address, physical address within
|
||||
parent's address space and length of the address map. For am33xx,
|
||||
3 set of child register maps present, ECAP register space, EQEP
|
||||
register space, EHRPWM register space.
|
||||
|
||||
Also child nodes should also populated under PWMSS DT node.
|
||||
|
||||
Example:
|
||||
pwmss0: pwmss@48300000 {
|
||||
compatible = "ti,am33xx-pwmss";
|
||||
reg = <0x48300000 0x10>;
|
||||
ti,hwmods = "epwmss0";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
status = "disabled";
|
||||
ranges = <0x48300100 0x48300100 0x80 /* ECAP */
|
||||
0x48300180 0x48300180 0x80 /* EQEP */
|
||||
0x48300200 0x48300200 0x80>; /* EHRPWM */
|
||||
|
||||
/* child nodes go here */
|
||||
};
|
@ -37,10 +37,21 @@ device:
|
||||
pwm-names = "backlight";
|
||||
};
|
||||
|
||||
Note that in the example above, specifying the "pwm-names" is redundant
|
||||
because the name "backlight" would be used as fallback anyway.
|
||||
|
||||
pwm-specifier typically encodes the chip-relative PWM number and the PWM
|
||||
period in nanoseconds. Note that in the example above, specifying the
|
||||
"pwm-names" is redundant because the name "backlight" would be used as
|
||||
fallback anyway.
|
||||
period in nanoseconds.
|
||||
|
||||
Optionally, the pwm-specifier can encode a number of flags in a third cell:
|
||||
- bit 0: PWM signal polarity (0: normal polarity, 1: inverse polarity)
|
||||
|
||||
Example with optional PWM specifier for inverse polarity
|
||||
|
||||
bl: backlight {
|
||||
pwms = <&pwm 0 5000000 1>;
|
||||
pwm-names = "backlight";
|
||||
};
|
||||
|
||||
2) PWM controller nodes
|
||||
-----------------------
|
||||
|
18
Documentation/devicetree/bindings/pwm/spear-pwm.txt
Normal file
18
Documentation/devicetree/bindings/pwm/spear-pwm.txt
Normal file
@ -0,0 +1,18 @@
|
||||
== ST SPEAr SoC PWM controller ==
|
||||
|
||||
Required properties:
|
||||
- compatible: should be one of:
|
||||
- "st,spear320-pwm"
|
||||
- "st,spear1340-pwm"
|
||||
- reg: physical base address and length of the controller's registers
|
||||
- #pwm-cells: number of cells used to specify PWM which is fixed to 2 on
|
||||
SPEAr. The first cell specifies the per-chip index of the PWM to use and
|
||||
the second cell is the period in nanoseconds.
|
||||
|
||||
Example:
|
||||
|
||||
pwm: pwm@a8000000 {
|
||||
compatible ="st,spear320-pwm";
|
||||
reg = <0xa8000000 0x1000>;
|
||||
#pwm-cells = <2>;
|
||||
};
|
17
Documentation/devicetree/bindings/pwm/ti,twl-pwm.txt
Normal file
17
Documentation/devicetree/bindings/pwm/ti,twl-pwm.txt
Normal file
@ -0,0 +1,17 @@
|
||||
Texas Instruments TWL series PWM drivers
|
||||
|
||||
Supported PWMs:
|
||||
On TWL4030 series: PWM1 and PWM2
|
||||
On TWL6030 series: PWM0 and PWM1
|
||||
|
||||
Required properties:
|
||||
- compatible: "ti,twl4030-pwm" or "ti,twl6030-pwm"
|
||||
- #pwm-cells: should be 2. The first cell specifies the per-chip index
|
||||
of the PWM to use and the second cell is the period in nanoseconds.
|
||||
|
||||
Example:
|
||||
|
||||
twl_pwm: pwm {
|
||||
compatible = "ti,twl6030-pwm";
|
||||
#pwm-cells = <2>;
|
||||
};
|
17
Documentation/devicetree/bindings/pwm/ti,twl-pwmled.txt
Normal file
17
Documentation/devicetree/bindings/pwm/ti,twl-pwmled.txt
Normal file
@ -0,0 +1,17 @@
|
||||
Texas Instruments TWL series PWM drivers connected to LED terminals
|
||||
|
||||
Supported PWMs:
|
||||
On TWL4030 series: PWMA and PWMB (connected to LEDA and LEDB terminals)
|
||||
On TWL6030 series: LED PWM (mainly used as charging indicator LED)
|
||||
|
||||
Required properties:
|
||||
- compatible: "ti,twl4030-pwmled" or "ti,twl6030-pwmled"
|
||||
- #pwm-cells: should be 2. The first cell specifies the per-chip index
|
||||
of the PWM to use and the second cell is the period in nanoseconds.
|
||||
|
||||
Example:
|
||||
|
||||
twl_pwmled: pwmled {
|
||||
compatible = "ti,twl6030-pwmled";
|
||||
#pwm-cells = <2>;
|
||||
};
|
17
Documentation/devicetree/bindings/pwm/vt8500-pwm.txt
Normal file
17
Documentation/devicetree/bindings/pwm/vt8500-pwm.txt
Normal file
@ -0,0 +1,17 @@
|
||||
VIA/Wondermedia VT8500/WM8xxx series SoC PWM controller
|
||||
|
||||
Required properties:
|
||||
- compatible: should be "via,vt8500-pwm"
|
||||
- reg: physical base address and length of the controller's registers
|
||||
- #pwm-cells: should be 2. The first cell specifies the per-chip index
|
||||
of the PWM to use and the second cell is the period in nanoseconds.
|
||||
- clocks: phandle to the PWM source clock
|
||||
|
||||
Example:
|
||||
|
||||
pwm1: pwm@d8220000 {
|
||||
#pwm-cells = <2>;
|
||||
compatible = "via,vt8500-pwm";
|
||||
reg = <0xd8220000 0x1000>;
|
||||
clocks = <&clkpwm>;
|
||||
};
|
@ -13,7 +13,7 @@ Recommended properties:
|
||||
|
||||
Example:
|
||||
|
||||
spi@7000d600 {
|
||||
spi@7000c380 {
|
||||
compatible = "nvidia,tegra20-sflash";
|
||||
reg = <0x7000c380 0x80>;
|
||||
interrupts = <0 39 0x04>;
|
||||
|
@ -13,7 +13,7 @@ Recommended properties:
|
||||
|
||||
Example:
|
||||
|
||||
slink@7000d600 {
|
||||
spi@7000d600 {
|
||||
compatible = "nvidia,tegra20-slink";
|
||||
reg = <0x7000d600 0x200>;
|
||||
interrupts = <0 82 0x04>;
|
||||
|
26
Documentation/devicetree/bindings/spi/spi_atmel.txt
Normal file
26
Documentation/devicetree/bindings/spi/spi_atmel.txt
Normal file
@ -0,0 +1,26 @@
|
||||
Atmel SPI device
|
||||
|
||||
Required properties:
|
||||
- compatible : should be "atmel,at91rm9200-spi".
|
||||
- reg: Address and length of the register set for the device
|
||||
- interrupts: Should contain spi interrupt
|
||||
- cs-gpios: chipselects
|
||||
|
||||
Example:
|
||||
|
||||
spi1: spi@fffcc000 {
|
||||
compatible = "atmel,at91rm9200-spi";
|
||||
reg = <0xfffcc000 0x4000>;
|
||||
interrupts = <13 4 5>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
cs-gpios = <&pioB 3 0>;
|
||||
status = "okay";
|
||||
|
||||
mmc-slot@0 {
|
||||
compatible = "mmc-spi-slot";
|
||||
reg = <0>;
|
||||
gpios = <&pioC 4 0>; /* CD */
|
||||
spi-max-frequency = <25000000>;
|
||||
};
|
||||
};
|
12
Documentation/devicetree/bindings/watchdog/davinci-wdt.txt
Normal file
12
Documentation/devicetree/bindings/watchdog/davinci-wdt.txt
Normal file
@ -0,0 +1,12 @@
|
||||
DaVinci Watchdog Timer (WDT) Controller
|
||||
|
||||
Required properties:
|
||||
- compatible : Should be "ti,davinci-wdt"
|
||||
- reg : Should contain WDT registers location and length
|
||||
|
||||
Examples:
|
||||
|
||||
wdt: wdt@2320000 {
|
||||
compatible = "ti,davinci-wdt";
|
||||
reg = <0x02320000 0x80>;
|
||||
};
|
10
Documentation/devicetree/bindings/watchdog/twl4030-wdt.txt
Normal file
10
Documentation/devicetree/bindings/watchdog/twl4030-wdt.txt
Normal file
@ -0,0 +1,10 @@
|
||||
Device tree bindings for twl4030-wdt driver (TWL4030 watchdog)
|
||||
|
||||
Required properties:
|
||||
compatible = "ti,twl4030-wdt";
|
||||
|
||||
Example:
|
||||
|
||||
watchdog {
|
||||
compatible = "ti,twl4030-wdt";
|
||||
};
|
@ -50,6 +50,8 @@ ext4.txt
|
||||
- info, mount options and specifications for the Ext4 filesystem.
|
||||
files.txt
|
||||
- info on file management in the Linux kernel.
|
||||
f2fs.txt
|
||||
- info and mount options for the F2FS filesystem.
|
||||
fuse.txt
|
||||
- info on the Filesystem in User SpacE including mount options.
|
||||
gfs2.txt
|
||||
|
@ -80,7 +80,6 @@ rename: yes (all) (see below)
|
||||
readlink: no
|
||||
follow_link: no
|
||||
put_link: no
|
||||
truncate: yes (see below)
|
||||
setattr: yes
|
||||
permission: no (may not block if called in rcu-walk mode)
|
||||
get_acl: no
|
||||
@ -96,11 +95,6 @@ atomic_open: yes
|
||||
Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on
|
||||
victim.
|
||||
cross-directory ->rename() has (per-superblock) ->s_vfs_rename_sem.
|
||||
->truncate() is never called directly - it's a callback, not a
|
||||
method. It's called by vmtruncate() - deprecated library function used by
|
||||
->setattr(). Locking information above applies to that call (i.e. is
|
||||
inherited from ->setattr() - vmtruncate() is used when ATTR_SIZE had been
|
||||
passed).
|
||||
|
||||
See Documentation/filesystems/directory-locking for more detailed discussion
|
||||
of the locking scheme for directory operations.
|
||||
|
@ -308,6 +308,18 @@ performed on the denizens of the cache. These are held in a structure of type:
|
||||
obtained by calling object->cookie->def->get_aux()/get_attr().
|
||||
|
||||
|
||||
(*) Invalidate data object [mandatory]:
|
||||
|
||||
int (*invalidate_object)(struct fscache_operation *op)
|
||||
|
||||
This is called to invalidate a data object (as pointed to by op->object).
|
||||
All the data stored for this object should be discarded and an
|
||||
attr_changed operation should be performed. The caller will follow up
|
||||
with an object update operation.
|
||||
|
||||
fscache_op_complete() must be called on op before returning.
|
||||
|
||||
|
||||
(*) Discard object [mandatory]:
|
||||
|
||||
void (*drop_object)(struct fscache_object *object)
|
||||
@ -419,7 +431,10 @@ performed on the denizens of the cache. These are held in a structure of type:
|
||||
|
||||
If an I/O error occurs, fscache_io_error() should be called and -ENOBUFS
|
||||
returned if possible or fscache_end_io() called with a suitable error
|
||||
code..
|
||||
code.
|
||||
|
||||
fscache_put_retrieval() should be called after a page or pages are dealt
|
||||
with. This will complete the operation when all pages are dealt with.
|
||||
|
||||
|
||||
(*) Request pages be read from cache [mandatory]:
|
||||
@ -526,6 +541,27 @@ FS-Cache provides some utilities that a cache backend may make use of:
|
||||
error value should be 0 if successful and an error otherwise.
|
||||
|
||||
|
||||
(*) Record that one or more pages being retrieved or allocated have been dealt
|
||||
with:
|
||||
|
||||
void fscache_retrieval_complete(struct fscache_retrieval *op,
|
||||
int n_pages);
|
||||
|
||||
This is called to record the fact that one or more pages have been dealt
|
||||
with and are no longer the concern of this operation. When the number of
|
||||
pages remaining in the operation reaches 0, the operation will be
|
||||
completed.
|
||||
|
||||
|
||||
(*) Record operation completion:
|
||||
|
||||
void fscache_op_complete(struct fscache_operation *op);
|
||||
|
||||
This is called to record the completion of an operation. This deducts
|
||||
this operation from the parent object's run state, potentially permitting
|
||||
one or more pending operations to start running.
|
||||
|
||||
|
||||
(*) Set highest store limit:
|
||||
|
||||
void fscache_set_store_limit(struct fscache_object *object,
|
||||
|
@ -35,8 +35,9 @@ This document contains the following sections:
|
||||
(12) Index and data file update
|
||||
(13) Miscellaneous cookie operations
|
||||
(14) Cookie unregistration
|
||||
(15) Index and data file invalidation
|
||||
(16) FS-Cache specific page flags.
|
||||
(15) Index invalidation
|
||||
(16) Data file invalidation
|
||||
(17) FS-Cache specific page flags.
|
||||
|
||||
|
||||
=============================
|
||||
@ -767,13 +768,42 @@ the cookies for "child" indices, objects and pages have been relinquished
|
||||
first.
|
||||
|
||||
|
||||
================================
|
||||
INDEX AND DATA FILE INVALIDATION
|
||||
================================
|
||||
==================
|
||||
INDEX INVALIDATION
|
||||
==================
|
||||
|
||||
There is no direct way to invalidate an index subtree or a data file. To do
|
||||
this, the caller should relinquish and retire the cookie they have, and then
|
||||
acquire a new one.
|
||||
There is no direct way to invalidate an index subtree. To do this, the caller
|
||||
should relinquish and retire the cookie they have, and then acquire a new one.
|
||||
|
||||
|
||||
======================
|
||||
DATA FILE INVALIDATION
|
||||
======================
|
||||
|
||||
Sometimes it will be necessary to invalidate an object that contains data.
|
||||
Typically this will be necessary when the server tells the netfs of a foreign
|
||||
change - at which point the netfs has to throw away all the state it had for an
|
||||
inode and reload from the server.
|
||||
|
||||
To indicate that a cache object should be invalidated, the following function
|
||||
can be called:
|
||||
|
||||
void fscache_invalidate(struct fscache_cookie *cookie);
|
||||
|
||||
This can be called with spinlocks held as it defers the work to a thread pool.
|
||||
All extant storage, retrieval and attribute change ops at this point are
|
||||
cancelled and discarded. Some future operations will be rejected until the
|
||||
cache has had a chance to insert a barrier in the operations queue. After
|
||||
that, operations will be queued again behind the invalidation operation.
|
||||
|
||||
The invalidation operation will perform an attribute change operation and an
|
||||
auxiliary data update operation as it is very likely these will have changed.
|
||||
|
||||
Using the following function, the netfs can wait for the invalidation operation
|
||||
to have reached a point at which it can start submitting ordinary operations
|
||||
once again:
|
||||
|
||||
void fscache_wait_on_invalidate(struct fscache_cookie *cookie);
|
||||
|
||||
|
||||
===========================
|
||||
|
@ -216,7 +216,14 @@ servicing netfs requests:
|
||||
The normal running state. In this state, requests the netfs makes will be
|
||||
passed on to the cache.
|
||||
|
||||
(6) State FSCACHE_OBJECT_UPDATING.
|
||||
(6) State FSCACHE_OBJECT_INVALIDATING.
|
||||
|
||||
The object is undergoing invalidation. When the state comes here, it
|
||||
discards all pending read, write and attribute change operations as it is
|
||||
going to clear out the cache entirely and reinitialise it. It will then
|
||||
continue to the FSCACHE_OBJECT_UPDATING state.
|
||||
|
||||
(7) State FSCACHE_OBJECT_UPDATING.
|
||||
|
||||
The state machine comes here to update the object in the cache from the
|
||||
netfs's records. This involves updating the auxiliary data that is used
|
||||
@ -225,13 +232,13 @@ servicing netfs requests:
|
||||
And there are terminal states in which an object cleans itself up, deallocates
|
||||
memory and potentially deletes stuff from disk:
|
||||
|
||||
(7) State FSCACHE_OBJECT_LC_DYING.
|
||||
(8) State FSCACHE_OBJECT_LC_DYING.
|
||||
|
||||
The object comes here if it is dying because of a lookup or creation
|
||||
error. This would be due to a disk error or system error of some sort.
|
||||
Temporary data is cleaned up, and the parent is released.
|
||||
|
||||
(8) State FSCACHE_OBJECT_DYING.
|
||||
(9) State FSCACHE_OBJECT_DYING.
|
||||
|
||||
The object comes here if it is dying due to an error, because its parent
|
||||
cookie has been relinquished by the netfs or because the cache is being
|
||||
@ -241,27 +248,27 @@ memory and potentially deletes stuff from disk:
|
||||
can destroy themselves. This object waits for all its children to go away
|
||||
before advancing to the next state.
|
||||
|
||||
(9) State FSCACHE_OBJECT_ABORT_INIT.
|
||||
(10) State FSCACHE_OBJECT_ABORT_INIT.
|
||||
|
||||
The object comes to this state if it was waiting on its parent in
|
||||
FSCACHE_OBJECT_INIT, but its parent died. The object will destroy itself
|
||||
so that the parent may proceed from the FSCACHE_OBJECT_DYING state.
|
||||
|
||||
(10) State FSCACHE_OBJECT_RELEASING.
|
||||
(11) State FSCACHE_OBJECT_RECYCLING.
|
||||
(11) State FSCACHE_OBJECT_RELEASING.
|
||||
(12) State FSCACHE_OBJECT_RECYCLING.
|
||||
|
||||
The object comes to one of these two states when dying once it is rid of
|
||||
all its children, if it is dying because the netfs relinquished its
|
||||
cookie. In the first state, the cached data is expected to persist, and
|
||||
in the second it will be deleted.
|
||||
|
||||
(12) State FSCACHE_OBJECT_WITHDRAWING.
|
||||
(13) State FSCACHE_OBJECT_WITHDRAWING.
|
||||
|
||||
The object transits to this state if the cache decides it wants to
|
||||
withdraw the object from service, perhaps to make space, but also due to
|
||||
error or just because the whole cache is being withdrawn.
|
||||
|
||||
(13) State FSCACHE_OBJECT_DEAD.
|
||||
(14) State FSCACHE_OBJECT_DEAD.
|
||||
|
||||
The object transits to this state when the in-memory object record is
|
||||
ready to be deleted. The object processor shouldn't ever see an object in
|
||||
|
@ -174,7 +174,7 @@ Operations are used through the following procedure:
|
||||
necessary (the object might have died whilst the thread was waiting).
|
||||
|
||||
When it has finished doing its processing, it should call
|
||||
fscache_put_operation() on it.
|
||||
fscache_op_complete() and fscache_put_operation() on it.
|
||||
|
||||
(4) The operation holds an effective lock upon the object, preventing other
|
||||
exclusive ops conflicting until it is released. The operation can be
|
||||
|
421
Documentation/filesystems/f2fs.txt
Normal file
421
Documentation/filesystems/f2fs.txt
Normal file
@ -0,0 +1,421 @@
|
||||
================================================================================
|
||||
WHAT IS Flash-Friendly File System (F2FS)?
|
||||
================================================================================
|
||||
|
||||
NAND flash memory-based storage devices, such as SSD, eMMC, and SD cards, have
|
||||
been equipped on a variety systems ranging from mobile to server systems. Since
|
||||
they are known to have different characteristics from the conventional rotating
|
||||
disks, a file system, an upper layer to the storage device, should adapt to the
|
||||
changes from the sketch in the design level.
|
||||
|
||||
F2FS is a file system exploiting NAND flash memory-based storage devices, which
|
||||
is based on Log-structured File System (LFS). The design has been focused on
|
||||
addressing the fundamental issues in LFS, which are snowball effect of wandering
|
||||
tree and high cleaning overhead.
|
||||
|
||||
Since a NAND flash memory-based storage device shows different characteristic
|
||||
according to its internal geometry or flash memory management scheme, namely FTL,
|
||||
F2FS and its tools support various parameters not only for configuring on-disk
|
||||
layout, but also for selecting allocation and cleaning algorithms.
|
||||
|
||||
The file system formatting tool, "mkfs.f2fs", is available from the following
|
||||
git tree:
|
||||
>> git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git
|
||||
|
||||
For reporting bugs and sending patches, please use the following mailing list:
|
||||
>> linux-f2fs-devel@lists.sourceforge.net
|
||||
|
||||
================================================================================
|
||||
BACKGROUND AND DESIGN ISSUES
|
||||
================================================================================
|
||||
|
||||
Log-structured File System (LFS)
|
||||
--------------------------------
|
||||
"A log-structured file system writes all modifications to disk sequentially in
|
||||
a log-like structure, thereby speeding up both file writing and crash recovery.
|
||||
The log is the only structure on disk; it contains indexing information so that
|
||||
files can be read back from the log efficiently. In order to maintain large free
|
||||
areas on disk for fast writing, we divide the log into segments and use a
|
||||
segment cleaner to compress the live information from heavily fragmented
|
||||
segments." from Rosenblum, M. and Ousterhout, J. K., 1992, "The design and
|
||||
implementation of a log-structured file system", ACM Trans. Computer Systems
|
||||
10, 1, 26–52.
|
||||
|
||||
Wandering Tree Problem
|
||||
----------------------
|
||||
In LFS, when a file data is updated and written to the end of log, its direct
|
||||
pointer block is updated due to the changed location. Then the indirect pointer
|
||||
block is also updated due to the direct pointer block update. In this manner,
|
||||
the upper index structures such as inode, inode map, and checkpoint block are
|
||||
also updated recursively. This problem is called as wandering tree problem [1],
|
||||
and in order to enhance the performance, it should eliminate or relax the update
|
||||
propagation as much as possible.
|
||||
|
||||
[1] Bityutskiy, A. 2005. JFFS3 design issues. http://www.linux-mtd.infradead.org/
|
||||
|
||||
Cleaning Overhead
|
||||
-----------------
|
||||
Since LFS is based on out-of-place writes, it produces so many obsolete blocks
|
||||
scattered across the whole storage. In order to serve new empty log space, it
|
||||
needs to reclaim these obsolete blocks seamlessly to users. This job is called
|
||||
as a cleaning process.
|
||||
|
||||
The process consists of three operations as follows.
|
||||
1. A victim segment is selected through referencing segment usage table.
|
||||
2. It loads parent index structures of all the data in the victim identified by
|
||||
segment summary blocks.
|
||||
3. It checks the cross-reference between the data and its parent index structure.
|
||||
4. It moves valid data selectively.
|
||||
|
||||
This cleaning job may cause unexpected long delays, so the most important goal
|
||||
is to hide the latencies to users. And also definitely, it should reduce the
|
||||
amount of valid data to be moved, and move them quickly as well.
|
||||
|
||||
================================================================================
|
||||
KEY FEATURES
|
||||
================================================================================
|
||||
|
||||
Flash Awareness
|
||||
---------------
|
||||
- Enlarge the random write area for better performance, but provide the high
|
||||
spatial locality
|
||||
- Align FS data structures to the operational units in FTL as best efforts
|
||||
|
||||
Wandering Tree Problem
|
||||
----------------------
|
||||
- Use a term, “node”, that represents inodes as well as various pointer blocks
|
||||
- Introduce Node Address Table (NAT) containing the locations of all the “node”
|
||||
blocks; this will cut off the update propagation.
|
||||
|
||||
Cleaning Overhead
|
||||
-----------------
|
||||
- Support a background cleaning process
|
||||
- Support greedy and cost-benefit algorithms for victim selection policies
|
||||
- Support multi-head logs for static/dynamic hot and cold data separation
|
||||
- Introduce adaptive logging for efficient block allocation
|
||||
|
||||
================================================================================
|
||||
MOUNT OPTIONS
|
||||
================================================================================
|
||||
|
||||
background_gc_off Turn off cleaning operations, namely garbage collection,
|
||||
triggered in background when I/O subsystem is idle.
|
||||
disable_roll_forward Disable the roll-forward recovery routine
|
||||
discard Issue discard/TRIM commands when a segment is cleaned.
|
||||
no_heap Disable heap-style segment allocation which finds free
|
||||
segments for data from the beginning of main area, while
|
||||
for node from the end of main area.
|
||||
nouser_xattr Disable Extended User Attributes. Note: xattr is enabled
|
||||
by default if CONFIG_F2FS_FS_XATTR is selected.
|
||||
noacl Disable POSIX Access Control List. Note: acl is enabled
|
||||
by default if CONFIG_F2FS_FS_POSIX_ACL is selected.
|
||||
active_logs=%u Support configuring the number of active logs. In the
|
||||
current design, f2fs supports only 2, 4, and 6 logs.
|
||||
Default number is 6.
|
||||
disable_ext_identify Disable the extension list configured by mkfs, so f2fs
|
||||
does not aware of cold files such as media files.
|
||||
|
||||
================================================================================
|
||||
DEBUGFS ENTRIES
|
||||
================================================================================
|
||||
|
||||
/sys/kernel/debug/f2fs/ contains information about all the partitions mounted as
|
||||
f2fs. Each file shows the whole f2fs information.
|
||||
|
||||
/sys/kernel/debug/f2fs/status includes:
|
||||
- major file system information managed by f2fs currently
|
||||
- average SIT information about whole segments
|
||||
- current memory footprint consumed by f2fs.
|
||||
|
||||
================================================================================
|
||||
USAGE
|
||||
================================================================================
|
||||
|
||||
1. Download userland tools and compile them.
|
||||
|
||||
2. Skip, if f2fs was compiled statically inside kernel.
|
||||
Otherwise, insert the f2fs.ko module.
|
||||
# insmod f2fs.ko
|
||||
|
||||
3. Create a directory trying to mount
|
||||
# mkdir /mnt/f2fs
|
||||
|
||||
4. Format the block device, and then mount as f2fs
|
||||
# mkfs.f2fs -l label /dev/block_device
|
||||
# mount -t f2fs /dev/block_device /mnt/f2fs
|
||||
|
||||
Format options
|
||||
--------------
|
||||
-l [label] : Give a volume label, up to 256 unicode name.
|
||||
-a [0 or 1] : Split start location of each area for heap-based allocation.
|
||||
1 is set by default, which performs this.
|
||||
-o [int] : Set overprovision ratio in percent over volume size.
|
||||
5 is set by default.
|
||||
-s [int] : Set the number of segments per section.
|
||||
1 is set by default.
|
||||
-z [int] : Set the number of sections per zone.
|
||||
1 is set by default.
|
||||
-e [str] : Set basic extension list. e.g. "mp3,gif,mov"
|
||||
|
||||
================================================================================
|
||||
DESIGN
|
||||
================================================================================
|
||||
|
||||
On-disk Layout
|
||||
--------------
|
||||
|
||||
F2FS divides the whole volume into a number of segments, each of which is fixed
|
||||
to 2MB in size. A section is composed of consecutive segments, and a zone
|
||||
consists of a set of sections. By default, section and zone sizes are set to one
|
||||
segment size identically, but users can easily modify the sizes by mkfs.
|
||||
|
||||
F2FS splits the entire volume into six areas, and all the areas except superblock
|
||||
consists of multiple segments as described below.
|
||||
|
||||
align with the zone size <-|
|
||||
|-> align with the segment size
|
||||
_________________________________________________________________________
|
||||
| | | Segment | Node | Segment | |
|
||||
| Superblock | Checkpoint | Info. | Address | Summary | Main |
|
||||
| (SB) | (CP) | Table (SIT) | Table (NAT) | Area (SSA) | |
|
||||
|____________|_____2______|______N______|______N______|______N_____|__N___|
|
||||
. .
|
||||
. .
|
||||
. .
|
||||
._________________________________________.
|
||||
|_Segment_|_..._|_Segment_|_..._|_Segment_|
|
||||
. .
|
||||
._________._________
|
||||
|_section_|__...__|_
|
||||
. .
|
||||
.________.
|
||||
|__zone__|
|
||||
|
||||
- Superblock (SB)
|
||||
: It is located at the beginning of the partition, and there exist two copies
|
||||
to avoid file system crash. It contains basic partition information and some
|
||||
default parameters of f2fs.
|
||||
|
||||
- Checkpoint (CP)
|
||||
: It contains file system information, bitmaps for valid NAT/SIT sets, orphan
|
||||
inode lists, and summary entries of current active segments.
|
||||
|
||||
- Segment Information Table (SIT)
|
||||
: It contains segment information such as valid block count and bitmap for the
|
||||
validity of all the blocks.
|
||||
|
||||
- Node Address Table (NAT)
|
||||
: It is composed of a block address table for all the node blocks stored in
|
||||
Main area.
|
||||
|
||||
- Segment Summary Area (SSA)
|
||||
: It contains summary entries which contains the owner information of all the
|
||||
data and node blocks stored in Main area.
|
||||
|
||||
- Main Area
|
||||
: It contains file and directory data including their indices.
|
||||
|
||||
In order to avoid misalignment between file system and flash-based storage, F2FS
|
||||
aligns the start block address of CP with the segment size. Also, it aligns the
|
||||
start block address of Main area with the zone size by reserving some segments
|
||||
in SSA area.
|
||||
|
||||
Reference the following survey for additional technical details.
|
||||
https://wiki.linaro.org/WorkingGroups/Kernel/Projects/FlashCardSurvey
|
||||
|
||||
File System Metadata Structure
|
||||
------------------------------
|
||||
|
||||
F2FS adopts the checkpointing scheme to maintain file system consistency. At
|
||||
mount time, F2FS first tries to find the last valid checkpoint data by scanning
|
||||
CP area. In order to reduce the scanning time, F2FS uses only two copies of CP.
|
||||
One of them always indicates the last valid data, which is called as shadow copy
|
||||
mechanism. In addition to CP, NAT and SIT also adopt the shadow copy mechanism.
|
||||
|
||||
For file system consistency, each CP points to which NAT and SIT copies are
|
||||
valid, as shown as below.
|
||||
|
||||
+--------+----------+---------+
|
||||
| CP | SIT | NAT |
|
||||
+--------+----------+---------+
|
||||
. . . .
|
||||
. . . .
|
||||
. . . .
|
||||
+-------+-------+--------+--------+--------+--------+
|
||||
| CP #0 | CP #1 | SIT #0 | SIT #1 | NAT #0 | NAT #1 |
|
||||
+-------+-------+--------+--------+--------+--------+
|
||||
| ^ ^
|
||||
| | |
|
||||
`----------------------------------------'
|
||||
|
||||
Index Structure
|
||||
---------------
|
||||
|
||||
The key data structure to manage the data locations is a "node". Similar to
|
||||
traditional file structures, F2FS has three types of node: inode, direct node,
|
||||
indirect node. F2FS assigns 4KB to an inode block which contains 923 data block
|
||||
indices, two direct node pointers, two indirect node pointers, and one double
|
||||
indirect node pointer as described below. One direct node block contains 1018
|
||||
data blocks, and one indirect node block contains also 1018 node blocks. Thus,
|
||||
one inode block (i.e., a file) covers:
|
||||
|
||||
4KB * (923 + 2 * 1018 + 2 * 1018 * 1018 + 1018 * 1018 * 1018) := 3.94TB.
|
||||
|
||||
Inode block (4KB)
|
||||
|- data (923)
|
||||
|- direct node (2)
|
||||
| `- data (1018)
|
||||
|- indirect node (2)
|
||||
| `- direct node (1018)
|
||||
| `- data (1018)
|
||||
`- double indirect node (1)
|
||||
`- indirect node (1018)
|
||||
`- direct node (1018)
|
||||
`- data (1018)
|
||||
|
||||
Note that, all the node blocks are mapped by NAT which means the location of
|
||||
each node is translated by the NAT table. In the consideration of the wandering
|
||||
tree problem, F2FS is able to cut off the propagation of node updates caused by
|
||||
leaf data writes.
|
||||
|
||||
Directory Structure
|
||||
-------------------
|
||||
|
||||
A directory entry occupies 11 bytes, which consists of the following attributes.
|
||||
|
||||
- hash hash value of the file name
|
||||
- ino inode number
|
||||
- len the length of file name
|
||||
- type file type such as directory, symlink, etc
|
||||
|
||||
A dentry block consists of 214 dentry slots and file names. Therein a bitmap is
|
||||
used to represent whether each dentry is valid or not. A dentry block occupies
|
||||
4KB with the following composition.
|
||||
|
||||
Dentry Block(4 K) = bitmap (27 bytes) + reserved (3 bytes) +
|
||||
dentries(11 * 214 bytes) + file name (8 * 214 bytes)
|
||||
|
||||
[Bucket]
|
||||
+--------------------------------+
|
||||
|dentry block 1 | dentry block 2 |
|
||||
+--------------------------------+
|
||||
. .
|
||||
. .
|
||||
. [Dentry Block Structure: 4KB] .
|
||||
+--------+----------+----------+------------+
|
||||
| bitmap | reserved | dentries | file names |
|
||||
+--------+----------+----------+------------+
|
||||
[Dentry Block: 4KB] . .
|
||||
. .
|
||||
. .
|
||||
+------+------+-----+------+
|
||||
| hash | ino | len | type |
|
||||
+------+------+-----+------+
|
||||
[Dentry Structure: 11 bytes]
|
||||
|
||||
F2FS implements multi-level hash tables for directory structure. Each level has
|
||||
a hash table with dedicated number of hash buckets as shown below. Note that
|
||||
"A(2B)" means a bucket includes 2 data blocks.
|
||||
|
||||
----------------------
|
||||
A : bucket
|
||||
B : block
|
||||
N : MAX_DIR_HASH_DEPTH
|
||||
----------------------
|
||||
|
||||
level #0 | A(2B)
|
||||
|
|
||||
level #1 | A(2B) - A(2B)
|
||||
|
|
||||
level #2 | A(2B) - A(2B) - A(2B) - A(2B)
|
||||
. | . . . .
|
||||
level #N/2 | A(2B) - A(2B) - A(2B) - A(2B) - A(2B) - ... - A(2B)
|
||||
. | . . . .
|
||||
level #N | A(4B) - A(4B) - A(4B) - A(4B) - A(4B) - ... - A(4B)
|
||||
|
||||
The number of blocks and buckets are determined by,
|
||||
|
||||
,- 2, if n < MAX_DIR_HASH_DEPTH / 2,
|
||||
# of blocks in level #n = |
|
||||
`- 4, Otherwise
|
||||
|
||||
,- 2^n, if n < MAX_DIR_HASH_DEPTH / 2,
|
||||
# of buckets in level #n = |
|
||||
`- 2^((MAX_DIR_HASH_DEPTH / 2) - 1), Otherwise
|
||||
|
||||
When F2FS finds a file name in a directory, at first a hash value of the file
|
||||
name is calculated. Then, F2FS scans the hash table in level #0 to find the
|
||||
dentry consisting of the file name and its inode number. If not found, F2FS
|
||||
scans the next hash table in level #1. In this way, F2FS scans hash tables in
|
||||
each levels incrementally from 1 to N. In each levels F2FS needs to scan only
|
||||
one bucket determined by the following equation, which shows O(log(# of files))
|
||||
complexity.
|
||||
|
||||
bucket number to scan in level #n = (hash value) % (# of buckets in level #n)
|
||||
|
||||
In the case of file creation, F2FS finds empty consecutive slots that cover the
|
||||
file name. F2FS searches the empty slots in the hash tables of whole levels from
|
||||
1 to N in the same way as the lookup operation.
|
||||
|
||||
The following figure shows an example of two cases holding children.
|
||||
--------------> Dir <--------------
|
||||
| |
|
||||
child child
|
||||
|
||||
child - child [hole] - child
|
||||
|
||||
child - child - child [hole] - [hole] - child
|
||||
|
||||
Case 1: Case 2:
|
||||
Number of children = 6, Number of children = 3,
|
||||
File size = 7 File size = 7
|
||||
|
||||
Default Block Allocation
|
||||
------------------------
|
||||
|
||||
At runtime, F2FS manages six active logs inside "Main" area: Hot/Warm/Cold node
|
||||
and Hot/Warm/Cold data.
|
||||
|
||||
- Hot node contains direct node blocks of directories.
|
||||
- Warm node contains direct node blocks except hot node blocks.
|
||||
- Cold node contains indirect node blocks
|
||||
- Hot data contains dentry blocks
|
||||
- Warm data contains data blocks except hot and cold data blocks
|
||||
- Cold data contains multimedia data or migrated data blocks
|
||||
|
||||
LFS has two schemes for free space management: threaded log and copy-and-compac-
|
||||
tion. The copy-and-compaction scheme which is known as cleaning, is well-suited
|
||||
for devices showing very good sequential write performance, since free segments
|
||||
are served all the time for writing new data. However, it suffers from cleaning
|
||||
overhead under high utilization. Contrarily, the threaded log scheme suffers
|
||||
from random writes, but no cleaning process is needed. F2FS adopts a hybrid
|
||||
scheme where the copy-and-compaction scheme is adopted by default, but the
|
||||
policy is dynamically changed to the threaded log scheme according to the file
|
||||
system status.
|
||||
|
||||
In order to align F2FS with underlying flash-based storage, F2FS allocates a
|
||||
segment in a unit of section. F2FS expects that the section size would be the
|
||||
same as the unit size of garbage collection in FTL. Furthermore, with respect
|
||||
to the mapping granularity in FTL, F2FS allocates each section of the active
|
||||
logs from different zones as much as possible, since FTL can write the data in
|
||||
the active logs into one allocation unit according to its mapping granularity.
|
||||
|
||||
Cleaning process
|
||||
----------------
|
||||
|
||||
F2FS does cleaning both on demand and in the background. On-demand cleaning is
|
||||
triggered when there are not enough free segments to serve VFS calls. Background
|
||||
cleaner is operated by a kernel thread, and triggers the cleaning job when the
|
||||
system is idle.
|
||||
|
||||
F2FS supports two victim selection policies: greedy and cost-benefit algorithms.
|
||||
In the greedy algorithm, F2FS selects a victim segment having the smallest number
|
||||
of valid blocks. In the cost-benefit algorithm, F2FS selects a victim segment
|
||||
according to the segment age and the number of valid blocks in order to address
|
||||
log block thrashing problem in the greedy algorithm. F2FS adopts the greedy
|
||||
algorithm for on-demand cleaner, while background cleaner adopts cost-benefit
|
||||
algorithm.
|
||||
|
||||
In order to identify whether the data in the victim segment are valid or not,
|
||||
F2FS manages a bitmap. Each bit represents the validity of a block, and the
|
||||
bitmap is composed of a bit stream covering whole blocks in main area.
|
@ -39,21 +39,10 @@ interoperability problems with future clients. Known issues:
|
||||
from a linux client are possible, but we aren't really
|
||||
conformant with the spec (for example, we don't use kerberos
|
||||
on the backchannel correctly).
|
||||
- Incomplete backchannel support: incomplete backchannel gss
|
||||
support and no support for BACKCHANNEL_CTL mean that
|
||||
callbacks (hence delegations and layouts) may not be
|
||||
available and clients confused by the incomplete
|
||||
implementation may fail.
|
||||
- We do not support SSV, which provides security for shared
|
||||
client-server state (thus preventing unauthorized tampering
|
||||
with locks and opens, for example). It is mandatory for
|
||||
servers to support this, though no clients use it yet.
|
||||
- Mandatory operations which we do not support, such as
|
||||
DESTROY_CLIENTID, are not currently used by clients, but will be
|
||||
(and the spec recommends their uses in common cases), and
|
||||
clients should not be expected to know how to recover from the
|
||||
case where they are not supported. This will eventually cause
|
||||
interoperability failures.
|
||||
|
||||
In addition, some limitations are inherited from the current NFSv4
|
||||
implementation:
|
||||
@ -89,7 +78,7 @@ Operations
|
||||
| | MNI | or OPT) | |
|
||||
+----------------------+------------+--------------+----------------+
|
||||
| ACCESS | REQ | | Section 18.1 |
|
||||
NS | BACKCHANNEL_CTL | REQ | | Section 18.33 |
|
||||
I | BACKCHANNEL_CTL | REQ | | Section 18.33 |
|
||||
I | BIND_CONN_TO_SESSION | REQ | | Section 18.34 |
|
||||
| CLOSE | REQ | | Section 18.2 |
|
||||
| COMMIT | REQ | | Section 18.3 |
|
||||
@ -99,7 +88,7 @@ NS*| DELEGPURGE | OPT | FDELG (REQ) | Section 18.5 |
|
||||
| DELEGRETURN | OPT | FDELG, | Section 18.6 |
|
||||
| | | DDELG, pNFS | |
|
||||
| | | (REQ) | |
|
||||
NS | DESTROY_CLIENTID | REQ | | Section 18.50 |
|
||||
I | DESTROY_CLIENTID | REQ | | Section 18.50 |
|
||||
I | DESTROY_SESSION | REQ | | Section 18.37 |
|
||||
I | EXCHANGE_ID | REQ | | Section 18.35 |
|
||||
I | FREE_STATEID | REQ | | Section 18.38 |
|
||||
@ -192,7 +181,6 @@ EXCHANGE_ID:
|
||||
|
||||
CREATE_SESSION:
|
||||
* backchannel attributes are ignored
|
||||
* backchannel security parameters are ignored
|
||||
|
||||
SEQUENCE:
|
||||
* no support for dynamic slot table renegotiation (optional)
|
||||
@ -202,7 +190,7 @@ Nonstandard compound limitations:
|
||||
ca_maxrequestsize request and a ca_maxresponsesize reply, so we may
|
||||
fail to live up to the promise we made in CREATE_SESSION fore channel
|
||||
negotiation.
|
||||
* No more than one IO operation (read, write, readdir) allowed per
|
||||
compound.
|
||||
* No more than one read-like operation allowed per compound; encoding
|
||||
replies that cross page boundaries (except for read data) not handled.
|
||||
|
||||
See also http://wiki.linux-nfs.org/wiki/index.php/Server_4.0_and_4.1_issues.
|
||||
|
@ -281,7 +281,7 @@ ext2_write_failed and callers for an example.
|
||||
|
||||
[mandatory]
|
||||
|
||||
->truncate is going away. The whole truncate sequence needs to be
|
||||
->truncate is gone. The whole truncate sequence needs to be
|
||||
implemented in ->setattr, which is now mandatory for filesystems
|
||||
implementing on-disk size changes. Start with a copy of the old inode_setattr
|
||||
and vmtruncate, and the reorder the vmtruncate + foofs_vmtruncate sequence to
|
||||
|
@ -350,7 +350,6 @@ struct inode_operations {
|
||||
int (*readlink) (struct dentry *, char __user *,int);
|
||||
void * (*follow_link) (struct dentry *, struct nameidata *);
|
||||
void (*put_link) (struct dentry *, struct nameidata *, void *);
|
||||
void (*truncate) (struct inode *);
|
||||
int (*permission) (struct inode *, int);
|
||||
int (*get_acl)(struct inode *, int);
|
||||
int (*setattr) (struct dentry *, struct iattr *);
|
||||
@ -431,16 +430,6 @@ otherwise noted.
|
||||
started might not be in the page cache at the end of the
|
||||
walk).
|
||||
|
||||
truncate: Deprecated. This will not be called if ->setsize is defined.
|
||||
Called by the VFS to change the size of a file. The
|
||||
i_size field of the inode is set to the desired size by the
|
||||
VFS before this method is called. This method is called by
|
||||
the truncate(2) system call and related functionality.
|
||||
|
||||
Note: ->truncate and vmtruncate are deprecated. Do not add new
|
||||
instances/calls of these. Filesystems should be converted to do their
|
||||
truncate sequence via ->setattr().
|
||||
|
||||
permission: called by the VFS to check for access rights on a POSIX-like
|
||||
filesystem.
|
||||
|
||||
|
@ -209,3 +209,13 @@ doesn't use CPU cycles.
|
||||
Trip points must be set properly before switching to automatic fan speed
|
||||
control mode. The driver will perform basic integrity checks before
|
||||
actually switching to automatic control mode.
|
||||
|
||||
|
||||
Temperature offset attributes
|
||||
-----------------------------
|
||||
|
||||
The driver supports temp[1-3]_offset sysfs attributes to adjust the reported
|
||||
temperature for thermal diodes or diode-connected thermal transistors.
|
||||
If a temperature sensor is configured for thermistors, the attribute values
|
||||
are ignored. If the thermal sensor type is Intel PECI, the temperature offset
|
||||
must be programmed to the critical CPU temperature.
|
||||
|
@ -91,7 +91,7 @@ Example (from the nxp OHCI driver):
|
||||
|
||||
static const unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END };
|
||||
|
||||
static int __devinit usb_hcd_nxp_probe(struct platform_device *pdev)
|
||||
static int usb_hcd_nxp_probe(struct platform_device *pdev)
|
||||
{
|
||||
(...)
|
||||
struct i2c_adapter *i2c_adap;
|
||||
|
@ -446,12 +446,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
|
||||
possible to determine what the correct size should be.
|
||||
This option provides an override for these situations.
|
||||
|
||||
capability.disable=
|
||||
[SECURITY] Disable capabilities. This would normally
|
||||
be used only if an alternative security model is to be
|
||||
configured. Potentially dangerous and should only be
|
||||
used if you are entirely sure of the consequences.
|
||||
|
||||
ccw_timeout_log [S390]
|
||||
See Documentation/s390/CommonIO for details.
|
||||
|
||||
|
@ -36,7 +36,7 @@ neigh/default/unres_qlen_bytes - INTEGER
|
||||
The maximum number of bytes which may be used by packets
|
||||
queued for each unresolved address by other network layers.
|
||||
(added in linux 3.3)
|
||||
Seting negative value is meaningless and will retrun error.
|
||||
Setting negative value is meaningless and will return error.
|
||||
Default: 65536 Bytes(64KB)
|
||||
|
||||
neigh/default/unres_qlen - INTEGER
|
||||
@ -215,7 +215,7 @@ tcp_ecn - INTEGER
|
||||
Possible values are:
|
||||
0 Disable ECN. Neither initiate nor accept ECN.
|
||||
1 Always request ECN on outgoing connection attempts.
|
||||
2 Enable ECN when requested by incomming connections
|
||||
2 Enable ECN when requested by incoming connections
|
||||
but do not request ECN on outgoing connections.
|
||||
Default: 2
|
||||
|
||||
@ -503,7 +503,7 @@ tcp_fastopen - INTEGER
|
||||
tcp_syn_retries - INTEGER
|
||||
Number of times initial SYNs for an active TCP connection attempt
|
||||
will be retransmitted. Should not be higher than 255. Default value
|
||||
is 6, which corresponds to 63seconds till the last restransmission
|
||||
is 6, which corresponds to 63seconds till the last retransmission
|
||||
with the current initial RTO of 1second. With this the final timeout
|
||||
for an active TCP connection attempt will happen after 127seconds.
|
||||
|
||||
@ -1331,6 +1331,12 @@ force_tllao - BOOLEAN
|
||||
race condition where the sender deletes the cached link-layer address
|
||||
prior to receiving a response to a previous solicitation."
|
||||
|
||||
ndisc_notify - BOOLEAN
|
||||
Define mode for notification of address and device changes.
|
||||
0 - (default): do nothing
|
||||
1 - Generate unsolicited neighbour advertisements when device is brought
|
||||
up or hardware address changes.
|
||||
|
||||
icmp/*:
|
||||
ratelimit - INTEGER
|
||||
Limit the maximal rates for sending ICMPv6 packets.
|
||||
@ -1530,7 +1536,7 @@ cookie_hmac_alg - STRING
|
||||
* sha1
|
||||
* none
|
||||
Ability to assign md5 or sha1 as the selected alg is predicated on the
|
||||
configuarion of those algorithms at build time (CONFIG_CRYPTO_MD5 and
|
||||
configuration of those algorithms at build time (CONFIG_CRYPTO_MD5 and
|
||||
CONFIG_CRYPTO_SHA1).
|
||||
|
||||
Default: Dependent on configuration. MD5 if available, else SHA1 if
|
||||
@ -1548,7 +1554,7 @@ rcvbuf_policy - INTEGER
|
||||
blocking.
|
||||
|
||||
1: rcvbuf space is per association
|
||||
0: recbuf space is per socket
|
||||
0: rcvbuf space is per socket
|
||||
|
||||
Default: 0
|
||||
|
||||
|
@ -642,12 +642,13 @@ out the following operations:
|
||||
* During system suspend it calls pm_runtime_get_noresume() and
|
||||
pm_runtime_barrier() for every device right before executing the
|
||||
subsystem-level .suspend() callback for it. In addition to that it calls
|
||||
pm_runtime_disable() for every device right after executing the
|
||||
subsystem-level .suspend() callback for it.
|
||||
__pm_runtime_disable() with 'false' as the second argument for every device
|
||||
right before executing the subsystem-level .suspend_late() callback for it.
|
||||
|
||||
* During system resume it calls pm_runtime_enable() and pm_runtime_put_sync()
|
||||
for every device right before and right after executing the subsystem-level
|
||||
.resume() callback for it, respectively.
|
||||
for every device right after executing the subsystem-level .resume_early()
|
||||
callback and right after executing the subsystem-level .resume() callback
|
||||
for it, respectively.
|
||||
|
||||
7. Generic subsystem callbacks
|
||||
|
||||
|
@ -127,6 +127,22 @@ Some examples of using the structure to:
|
||||
p.addr2 = (uint64_t) end_range;
|
||||
p.condition_value = 0;
|
||||
|
||||
- set a watchpoint in server processors (BookS)
|
||||
|
||||
p.version = 1;
|
||||
p.trigger_type = PPC_BREAKPOINT_TRIGGER_RW;
|
||||
p.addr_mode = PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE;
|
||||
or
|
||||
p.addr_mode = PPC_BREAKPOINT_MODE_EXACT;
|
||||
|
||||
p.condition_mode = PPC_BREAKPOINT_CONDITION_NONE;
|
||||
p.addr = (uint64_t) begin_range;
|
||||
/* For PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE addr2 needs to be specified, where
|
||||
* addr2 - addr <= 8 Bytes.
|
||||
*/
|
||||
p.addr2 = (uint64_t) end_range;
|
||||
p.condition_value = 0;
|
||||
|
||||
3. PTRACE_DELHWDEBUG
|
||||
|
||||
Takes an integer which identifies an existing breakpoint or watchpoint
|
||||
|
@ -236,7 +236,7 @@ static int rpmsg_sample_probe(struct rpmsg_channel *rpdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __devexit rpmsg_sample_remove(struct rpmsg_channel *rpdev)
|
||||
static void rpmsg_sample_remove(struct rpmsg_channel *rpdev)
|
||||
{
|
||||
dev_info(&rpdev->dev, "rpmsg sample client driver is removed\n");
|
||||
}
|
||||
@ -253,7 +253,7 @@ static struct rpmsg_driver rpmsg_sample_client = {
|
||||
.id_table = rpmsg_driver_sample_id_table,
|
||||
.probe = rpmsg_sample_probe,
|
||||
.callback = rpmsg_sample_cb,
|
||||
.remove = __devexit_p(rpmsg_sample_remove),
|
||||
.remove = rpmsg_sample_remove,
|
||||
};
|
||||
|
||||
static int __init init(void)
|
||||
|
@ -345,7 +345,7 @@ SPI protocol drivers somewhat resemble platform device drivers:
|
||||
},
|
||||
|
||||
.probe = CHIP_probe,
|
||||
.remove = __devexit_p(CHIP_remove),
|
||||
.remove = CHIP_remove,
|
||||
.suspend = CHIP_suspend,
|
||||
.resume = CHIP_resume,
|
||||
};
|
||||
@ -355,7 +355,7 @@ device whose board_info gave a modalias of "CHIP". Your probe() code
|
||||
might look like this unless you're creating a device which is managing
|
||||
a bus (appearing under /sys/class/spi_master).
|
||||
|
||||
static int __devinit CHIP_probe(struct spi_device *spi)
|
||||
static int CHIP_probe(struct spi_device *spi)
|
||||
{
|
||||
struct CHIP *chip;
|
||||
struct CHIP_platform_data *pdata;
|
||||
|
@ -38,6 +38,7 @@ show up in /proc/sys/kernel:
|
||||
- l2cr [ PPC only ]
|
||||
- modprobe ==> Documentation/debugging-modules.txt
|
||||
- modules_disabled
|
||||
- msg_next_id [ sysv ipc ]
|
||||
- msgmax
|
||||
- msgmnb
|
||||
- msgmni
|
||||
@ -62,7 +63,9 @@ show up in /proc/sys/kernel:
|
||||
- rtsig-max
|
||||
- rtsig-nr
|
||||
- sem
|
||||
- sem_next_id [ sysv ipc ]
|
||||
- sg-big-buff [ generic SCSI device (sg) ]
|
||||
- shm_next_id [ sysv ipc ]
|
||||
- shm_rmid_forced
|
||||
- shmall
|
||||
- shmmax [ sysv ipc ]
|
||||
@ -320,6 +323,22 @@ to false.
|
||||
|
||||
==============================================================
|
||||
|
||||
msg_next_id, sem_next_id, and shm_next_id:
|
||||
|
||||
These three toggles allows to specify desired id for next allocated IPC
|
||||
object: message, semaphore or shared memory respectively.
|
||||
|
||||
By default they are equal to -1, which means generic allocation logic.
|
||||
Possible values to set are in range {0..INT_MAX}.
|
||||
|
||||
Notes:
|
||||
1) kernel doesn't guarantee, that new object will have desired id. So,
|
||||
it's up to userspace, how to handle an object with "wrong" id.
|
||||
2) Toggle with non-default value will be set back to -1 by kernel after
|
||||
successful IPC object allocation.
|
||||
|
||||
==============================================================
|
||||
|
||||
nmi_watchdog:
|
||||
|
||||
Enables/Disables the NMI watchdog on x86 systems. When the value is
|
||||
@ -542,6 +561,19 @@ are doing anyway :)
|
||||
|
||||
==============================================================
|
||||
|
||||
shmall:
|
||||
|
||||
This parameter sets the total amount of shared memory pages that
|
||||
can be used system wide. Hence, SHMALL should always be at least
|
||||
ceil(shmmax/PAGE_SIZE).
|
||||
|
||||
If you are not sure what the default PAGE_SIZE is on your Linux
|
||||
system, you can run the following command:
|
||||
|
||||
# getconf PAGE_SIZE
|
||||
|
||||
==============================================================
|
||||
|
||||
shmmax:
|
||||
|
||||
This value can be used to query and set the run time limit
|
||||
|
@ -174,8 +174,7 @@ The recommended approach is as follows:
|
||||
|
||||
static atomic_t drv_instance = ATOMIC_INIT(0);
|
||||
|
||||
static int __devinit drv_probe(struct pci_dev *pdev,
|
||||
const struct pci_device_id *pci_id)
|
||||
static int drv_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
|
||||
{
|
||||
...
|
||||
state->instance = atomic_inc_return(&drv_instance) - 1;
|
||||
|
@ -373,7 +373,7 @@ Protocol: 2.00+
|
||||
1 Loadlin
|
||||
2 bootsect-loader (0x20, all other values reserved)
|
||||
3 Syslinux
|
||||
4 Etherboot/gPXE
|
||||
4 Etherboot/gPXE/iPXE
|
||||
5 ELILO
|
||||
7 GRUB
|
||||
8 U-Boot
|
||||
@ -381,6 +381,7 @@ Protocol: 2.00+
|
||||
A Gujin
|
||||
B Qemu
|
||||
C Arcturus Networks uCbootloader
|
||||
D kexec-tools
|
||||
E Extended (see ext_loader_type)
|
||||
F Special (0xFF = undefined)
|
||||
10 Reserved
|
||||
|
44
Documentation/xtensa/atomctl.txt
Normal file
44
Documentation/xtensa/atomctl.txt
Normal file
@ -0,0 +1,44 @@
|
||||
We Have Atomic Operation Control (ATOMCTL) Register.
|
||||
This register determines the effect of using a S32C1I instruction
|
||||
with various combinations of:
|
||||
|
||||
1. With and without an Coherent Cache Controller which
|
||||
can do Atomic Transactions to the memory internally.
|
||||
|
||||
2. With and without An Intelligent Memory Controller which
|
||||
can do Atomic Transactions itself.
|
||||
|
||||
The Core comes up with a default value of for the three types of cache ops:
|
||||
|
||||
0x28: (WB: Internal, WT: Internal, BY:Exception)
|
||||
|
||||
On the FPGA Cards we typically simulate an Intelligent Memory controller
|
||||
which can implement RCW transactions. For FPGA cards with an External
|
||||
Memory controller we let it to the atomic operations internally while
|
||||
doing a Cached (WB) transaction and use the Memory RCW for un-cached
|
||||
operations.
|
||||
|
||||
For systems without an coherent cache controller, non-MX, we always
|
||||
use the memory controllers RCW, thought non-MX controlers likely
|
||||
support the Internal Operation.
|
||||
|
||||
CUSTOMER-WARNING:
|
||||
Virtually all customers buy their memory controllers from vendors that
|
||||
don't support atomic RCW memory transactions and will likely want to
|
||||
configure this register to not use RCW.
|
||||
|
||||
Developers might find using RCW in Bypass mode convenient when testing
|
||||
with the cache being bypassed; for example studying cache alias problems.
|
||||
|
||||
See Section 4.3.12.4 of ISA; Bits:
|
||||
|
||||
WB WT BY
|
||||
5 4 | 3 2 | 1 0
|
||||
2 Bit
|
||||
Field
|
||||
Values WB - Write Back WT - Write Thru BY - Bypass
|
||||
--------- --------------- ----------------- ----------------
|
||||
0 Exception Exception Exception
|
||||
1 RCW Transaction RCW Transaction RCW Transaction
|
||||
2 Internal Operation Exception Reserved
|
||||
3 Reserved Reserved Reserved
|
@ -182,8 +182,7 @@ int iterate(void *p)
|
||||
|
||||
static atomic_t drv_instance = ATOMIC_INIT(0);
|
||||
|
||||
static int __devinit drv_probe(struct pci_dev *pdev,
|
||||
const struct pci_device_id *pci_id)
|
||||
static int drv_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
|
||||
{
|
||||
...
|
||||
state->instance = atomic_inc_return(&drv_instance) - 1;
|
||||
|
258
MAINTAINERS
258
MAINTAINERS
File diff suppressed because it is too large
Load Diff
20
Makefile
20
Makefile
@ -1,7 +1,7 @@
|
||||
VERSION = 3
|
||||
PATCHLEVEL = 7
|
||||
PATCHLEVEL = 8
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION =
|
||||
EXTRAVERSION = -rc4
|
||||
NAME = Terrified Chipmunk
|
||||
|
||||
# *DOCUMENTATION*
|
||||
@ -124,7 +124,7 @@ $(if $(KBUILD_OUTPUT),, \
|
||||
PHONY += $(MAKECMDGOALS) sub-make
|
||||
|
||||
$(filter-out _all sub-make $(CURDIR)/Makefile, $(MAKECMDGOALS)) _all: sub-make
|
||||
$(Q)@:
|
||||
@:
|
||||
|
||||
sub-make: FORCE
|
||||
$(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \
|
||||
@ -981,6 +981,12 @@ _modinst_post: _modinst_
|
||||
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modinst
|
||||
$(call cmd,depmod)
|
||||
|
||||
ifeq ($(CONFIG_MODULE_SIG), y)
|
||||
PHONY += modules_sign
|
||||
modules_sign:
|
||||
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modsign
|
||||
endif
|
||||
|
||||
else # CONFIG_MODULES
|
||||
|
||||
# Modules not configured
|
||||
@ -1021,11 +1027,14 @@ clean: rm-dirs := $(CLEAN_DIRS)
|
||||
clean: rm-files := $(CLEAN_FILES)
|
||||
clean-dirs := $(addprefix _clean_, . $(vmlinux-alldirs) Documentation samples)
|
||||
|
||||
PHONY += $(clean-dirs) clean archclean
|
||||
PHONY += $(clean-dirs) clean archclean vmlinuxclean
|
||||
$(clean-dirs):
|
||||
$(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
|
||||
|
||||
clean: archclean
|
||||
vmlinuxclean:
|
||||
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/link-vmlinux.sh clean
|
||||
|
||||
clean: archclean vmlinuxclean
|
||||
|
||||
# mrproper - Delete all generated files, including .config
|
||||
#
|
||||
@ -1252,7 +1261,6 @@ scripts: ;
|
||||
endif # KBUILD_EXTMOD
|
||||
|
||||
clean: $(clean-dirs)
|
||||
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/link-vmlinux.sh clean
|
||||
$(call cmd,rmdirs)
|
||||
$(call cmd,rmfiles)
|
||||
@find $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \
|
||||
|
28
arch/Kconfig
28
arch/Kconfig
@ -113,6 +113,25 @@ config HAVE_EFFICIENT_UNALIGNED_ACCESS
|
||||
See Documentation/unaligned-memory-access.txt for more
|
||||
information on the topic of unaligned memory accesses.
|
||||
|
||||
config ARCH_USE_BUILTIN_BSWAP
|
||||
bool
|
||||
help
|
||||
Modern versions of GCC (since 4.4) have builtin functions
|
||||
for handling byte-swapping. Using these, instead of the old
|
||||
inline assembler that the architecture code provides in the
|
||||
__arch_bswapXX() macros, allows the compiler to see what's
|
||||
happening and offers more opportunity for optimisation. In
|
||||
particular, the compiler will be able to combine the byteswap
|
||||
with a nearby load or store and use load-and-swap or
|
||||
store-and-swap instructions if the architecture has them. It
|
||||
should almost *never* result in code which is worse than the
|
||||
hand-coded assembler in <asm/swab.h>. But just in case it
|
||||
does, the use of the builtins is optional.
|
||||
|
||||
Any architecture with load-and-swap or store-and-swap
|
||||
instructions should set this. And it shouldn't hurt to set it
|
||||
on architectures that don't have such instructions.
|
||||
|
||||
config HAVE_SYSCALL_WRAPPERS
|
||||
bool
|
||||
|
||||
@ -272,12 +291,6 @@ config ARCH_WANT_OLD_COMPAT_IPC
|
||||
select ARCH_WANT_COMPAT_IPC_PARSE_VERSION
|
||||
bool
|
||||
|
||||
config GENERIC_KERNEL_THREAD
|
||||
bool
|
||||
|
||||
config GENERIC_KERNEL_EXECVE
|
||||
bool
|
||||
|
||||
config HAVE_ARCH_SECCOMP_FILTER
|
||||
bool
|
||||
help
|
||||
@ -343,6 +356,9 @@ config MODULES_USE_ELF_REL
|
||||
Modules only use ELF REL relocations. Modules with ELF RELA
|
||||
relocations will give an error.
|
||||
|
||||
config GENERIC_SIGALTSTACK
|
||||
bool
|
||||
|
||||
#
|
||||
# ABI hall of shame
|
||||
#
|
||||
|
@ -20,10 +20,9 @@ config ALPHA
|
||||
select GENERIC_CMOS_UPDATE
|
||||
select GENERIC_STRNCPY_FROM_USER
|
||||
select GENERIC_STRNLEN_USER
|
||||
select GENERIC_KERNEL_THREAD
|
||||
select GENERIC_KERNEL_EXECVE
|
||||
select HAVE_MOD_ARCH_SPECIFIC
|
||||
select MODULES_USE_ELF_RELA
|
||||
select GENERIC_SIGALTSTACK
|
||||
help
|
||||
The Alpha is a 64-bit general-purpose processor designed and
|
||||
marketed by the Digital Equipment Corporation of blessed memory,
|
||||
|
@ -1,14 +1,5 @@
|
||||
include include/asm-generic/Kbuild.asm
|
||||
|
||||
generic-y += clkdev.h
|
||||
|
||||
header-y += compiler.h
|
||||
header-y += console.h
|
||||
header-y += fpu.h
|
||||
header-y += gentrap.h
|
||||
header-y += pal.h
|
||||
header-y += reg.h
|
||||
header-y += regdef.h
|
||||
header-y += sysinfo.h
|
||||
generic-y += exec.h
|
||||
generic-y += trace_clock.h
|
||||
|
@ -1,94 +1,8 @@
|
||||
#ifndef __ALPHA_A_OUT_H__
|
||||
#define __ALPHA_A_OUT_H__
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <uapi/asm/a.out.h>
|
||||
|
||||
/*
|
||||
* OSF/1 ECOFF header structs. ECOFF files consist of:
|
||||
* - a file header (struct filehdr),
|
||||
* - an a.out header (struct aouthdr),
|
||||
* - one or more section headers (struct scnhdr).
|
||||
* The filhdr's "f_nscns" field contains the
|
||||
* number of section headers.
|
||||
*/
|
||||
|
||||
struct filehdr
|
||||
{
|
||||
/* OSF/1 "file" header */
|
||||
__u16 f_magic, f_nscns;
|
||||
__u32 f_timdat;
|
||||
__u64 f_symptr;
|
||||
__u32 f_nsyms;
|
||||
__u16 f_opthdr, f_flags;
|
||||
};
|
||||
|
||||
struct aouthdr
|
||||
{
|
||||
__u64 info; /* after that it looks quite normal.. */
|
||||
__u64 tsize;
|
||||
__u64 dsize;
|
||||
__u64 bsize;
|
||||
__u64 entry;
|
||||
__u64 text_start; /* with a few additions that actually make sense */
|
||||
__u64 data_start;
|
||||
__u64 bss_start;
|
||||
__u32 gprmask, fprmask; /* bitmask of general & floating point regs used in binary */
|
||||
__u64 gpvalue;
|
||||
};
|
||||
|
||||
struct scnhdr
|
||||
{
|
||||
char s_name[8];
|
||||
__u64 s_paddr;
|
||||
__u64 s_vaddr;
|
||||
__u64 s_size;
|
||||
__u64 s_scnptr;
|
||||
__u64 s_relptr;
|
||||
__u64 s_lnnoptr;
|
||||
__u16 s_nreloc;
|
||||
__u16 s_nlnno;
|
||||
__u32 s_flags;
|
||||
};
|
||||
|
||||
struct exec
|
||||
{
|
||||
/* OSF/1 "file" header */
|
||||
struct filehdr fh;
|
||||
struct aouthdr ah;
|
||||
};
|
||||
|
||||
/*
|
||||
* Define's so that the kernel exec code can access the a.out header
|
||||
* fields...
|
||||
*/
|
||||
#define a_info ah.info
|
||||
#define a_text ah.tsize
|
||||
#define a_data ah.dsize
|
||||
#define a_bss ah.bsize
|
||||
#define a_entry ah.entry
|
||||
#define a_textstart ah.text_start
|
||||
#define a_datastart ah.data_start
|
||||
#define a_bssstart ah.bss_start
|
||||
#define a_gprmask ah.gprmask
|
||||
#define a_fprmask ah.fprmask
|
||||
#define a_gpvalue ah.gpvalue
|
||||
|
||||
#define N_TXTADDR(x) ((x).a_textstart)
|
||||
#define N_DATADDR(x) ((x).a_datastart)
|
||||
#define N_BSSADDR(x) ((x).a_bssstart)
|
||||
#define N_DRSIZE(x) 0
|
||||
#define N_TRSIZE(x) 0
|
||||
#define N_SYMSIZE(x) 0
|
||||
|
||||
#define AOUTHSZ sizeof(struct aouthdr)
|
||||
#define SCNHSZ sizeof(struct scnhdr)
|
||||
#define SCNROUND 16
|
||||
|
||||
#define N_TXTOFF(x) \
|
||||
((long) N_MAGIC(x) == ZMAGIC ? 0 : \
|
||||
(sizeof(struct exec) + (x).fh.f_nscns*SCNHSZ + SCNROUND - 1) & ~(SCNROUND - 1))
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/* Assume that start addresses below 4G belong to a TASO application.
|
||||
Unfortunately, there is no proper bit in the exec header to check.
|
||||
@ -98,5 +12,4 @@ struct exec
|
||||
set_personality (((BFPM->taso || EX.ah.entry < 0x100000000L \
|
||||
? ADDR_LIMIT_32BIT : 0) | PER_OSF4))
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* __A_OUT_GNU_H__ */
|
||||
|
@ -1,119 +1,8 @@
|
||||
#ifndef __ALPHA_COMPILER_H
|
||||
#define __ALPHA_COMPILER_H
|
||||
|
||||
/*
|
||||
* Herein are macros we use when describing various patterns we want to GCC.
|
||||
* In all cases we can get better schedules out of the compiler if we hide
|
||||
* as little as possible inside inline assembly. However, we want to be
|
||||
* able to know what we'll get out before giving up inline assembly. Thus
|
||||
* these tests and macros.
|
||||
*/
|
||||
#include <uapi/asm/compiler.h>
|
||||
|
||||
#if __GNUC__ == 3 && __GNUC_MINOR__ >= 4 || __GNUC__ > 3
|
||||
# define __kernel_insbl(val, shift) __builtin_alpha_insbl(val, shift)
|
||||
# define __kernel_inswl(val, shift) __builtin_alpha_inswl(val, shift)
|
||||
# define __kernel_insql(val, shift) __builtin_alpha_insql(val, shift)
|
||||
# define __kernel_inslh(val, shift) __builtin_alpha_inslh(val, shift)
|
||||
# define __kernel_extbl(val, shift) __builtin_alpha_extbl(val, shift)
|
||||
# define __kernel_extwl(val, shift) __builtin_alpha_extwl(val, shift)
|
||||
# define __kernel_cmpbge(a, b) __builtin_alpha_cmpbge(a, b)
|
||||
#else
|
||||
# define __kernel_insbl(val, shift) \
|
||||
({ unsigned long __kir; \
|
||||
__asm__("insbl %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \
|
||||
__kir; })
|
||||
# define __kernel_inswl(val, shift) \
|
||||
({ unsigned long __kir; \
|
||||
__asm__("inswl %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \
|
||||
__kir; })
|
||||
# define __kernel_insql(val, shift) \
|
||||
({ unsigned long __kir; \
|
||||
__asm__("insql %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \
|
||||
__kir; })
|
||||
# define __kernel_inslh(val, shift) \
|
||||
({ unsigned long __kir; \
|
||||
__asm__("inslh %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \
|
||||
__kir; })
|
||||
# define __kernel_extbl(val, shift) \
|
||||
({ unsigned long __kir; \
|
||||
__asm__("extbl %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \
|
||||
__kir; })
|
||||
# define __kernel_extwl(val, shift) \
|
||||
({ unsigned long __kir; \
|
||||
__asm__("extwl %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \
|
||||
__kir; })
|
||||
# define __kernel_cmpbge(a, b) \
|
||||
({ unsigned long __kir; \
|
||||
__asm__("cmpbge %r2,%1,%0" : "=r"(__kir) : "rI"(b), "rJ"(a)); \
|
||||
__kir; })
|
||||
#endif
|
||||
|
||||
#ifdef __alpha_cix__
|
||||
# if __GNUC__ == 3 && __GNUC_MINOR__ >= 4 || __GNUC__ > 3
|
||||
# define __kernel_cttz(x) __builtin_ctzl(x)
|
||||
# define __kernel_ctlz(x) __builtin_clzl(x)
|
||||
# define __kernel_ctpop(x) __builtin_popcountl(x)
|
||||
# else
|
||||
# define __kernel_cttz(x) \
|
||||
({ unsigned long __kir; \
|
||||
__asm__("cttz %1,%0" : "=r"(__kir) : "r"(x)); \
|
||||
__kir; })
|
||||
# define __kernel_ctlz(x) \
|
||||
({ unsigned long __kir; \
|
||||
__asm__("ctlz %1,%0" : "=r"(__kir) : "r"(x)); \
|
||||
__kir; })
|
||||
# define __kernel_ctpop(x) \
|
||||
({ unsigned long __kir; \
|
||||
__asm__("ctpop %1,%0" : "=r"(__kir) : "r"(x)); \
|
||||
__kir; })
|
||||
# endif
|
||||
#else
|
||||
# define __kernel_cttz(x) \
|
||||
({ unsigned long __kir; \
|
||||
__asm__(".arch ev67; cttz %1,%0" : "=r"(__kir) : "r"(x)); \
|
||||
__kir; })
|
||||
# define __kernel_ctlz(x) \
|
||||
({ unsigned long __kir; \
|
||||
__asm__(".arch ev67; ctlz %1,%0" : "=r"(__kir) : "r"(x)); \
|
||||
__kir; })
|
||||
# define __kernel_ctpop(x) \
|
||||
({ unsigned long __kir; \
|
||||
__asm__(".arch ev67; ctpop %1,%0" : "=r"(__kir) : "r"(x)); \
|
||||
__kir; })
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Beginning with EGCS 1.1, GCC defines __alpha_bwx__ when the BWX
|
||||
* extension is enabled. Previous versions did not define anything
|
||||
* we could test during compilation -- too bad, so sad.
|
||||
*/
|
||||
|
||||
#if defined(__alpha_bwx__)
|
||||
#define __kernel_ldbu(mem) (mem)
|
||||
#define __kernel_ldwu(mem) (mem)
|
||||
#define __kernel_stb(val,mem) ((mem) = (val))
|
||||
#define __kernel_stw(val,mem) ((mem) = (val))
|
||||
#else
|
||||
#define __kernel_ldbu(mem) \
|
||||
({ unsigned char __kir; \
|
||||
__asm__(".arch ev56; \
|
||||
ldbu %0,%1" : "=r"(__kir) : "m"(mem)); \
|
||||
__kir; })
|
||||
#define __kernel_ldwu(mem) \
|
||||
({ unsigned short __kir; \
|
||||
__asm__(".arch ev56; \
|
||||
ldwu %0,%1" : "=r"(__kir) : "m"(mem)); \
|
||||
__kir; })
|
||||
#define __kernel_stb(val,mem) \
|
||||
__asm__(".arch ev56; \
|
||||
stb %1,%0" : "=m"(mem) : "r"(val))
|
||||
#define __kernel_stw(val,mem) \
|
||||
__asm__(".arch ev56; \
|
||||
stw %1,%0" : "=m"(mem) : "r"(val))
|
||||
#endif
|
||||
|
||||
#ifdef __KERNEL__
|
||||
/* Some idiots over in <linux/compiler.h> thought inline should imply
|
||||
always_inline. This breaks stuff. We'll include this file whenever
|
||||
we run into such problems. */
|
||||
@ -125,6 +14,4 @@
|
||||
#undef __always_inline
|
||||
#define __always_inline inline __attribute__((always_inline))
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* __ALPHA_COMPILER_H */
|
||||
|
@ -1,52 +1,8 @@
|
||||
#ifndef __AXP_CONSOLE_H
|
||||
#define __AXP_CONSOLE_H
|
||||
|
||||
/*
|
||||
* Console callback routine numbers
|
||||
*/
|
||||
#define CCB_GETC 0x01
|
||||
#define CCB_PUTS 0x02
|
||||
#define CCB_RESET_TERM 0x03
|
||||
#define CCB_SET_TERM_INT 0x04
|
||||
#define CCB_SET_TERM_CTL 0x05
|
||||
#define CCB_PROCESS_KEYCODE 0x06
|
||||
#define CCB_OPEN_CONSOLE 0x07
|
||||
#define CCB_CLOSE_CONSOLE 0x08
|
||||
#include <uapi/asm/console.h>
|
||||
|
||||
#define CCB_OPEN 0x10
|
||||
#define CCB_CLOSE 0x11
|
||||
#define CCB_IOCTL 0x12
|
||||
#define CCB_READ 0x13
|
||||
#define CCB_WRITE 0x14
|
||||
|
||||
#define CCB_SET_ENV 0x20
|
||||
#define CCB_RESET_ENV 0x21
|
||||
#define CCB_GET_ENV 0x22
|
||||
#define CCB_SAVE_ENV 0x23
|
||||
|
||||
#define CCB_PSWITCH 0x30
|
||||
#define CCB_BIOS_EMUL 0x32
|
||||
|
||||
/*
|
||||
* Environment variable numbers
|
||||
*/
|
||||
#define ENV_AUTO_ACTION 0x01
|
||||
#define ENV_BOOT_DEV 0x02
|
||||
#define ENV_BOOTDEF_DEV 0x03
|
||||
#define ENV_BOOTED_DEV 0x04
|
||||
#define ENV_BOOT_FILE 0x05
|
||||
#define ENV_BOOTED_FILE 0x06
|
||||
#define ENV_BOOT_OSFLAGS 0x07
|
||||
#define ENV_BOOTED_OSFLAGS 0x08
|
||||
#define ENV_BOOT_RESET 0x09
|
||||
#define ENV_DUMP_DEV 0x0A
|
||||
#define ENV_ENABLE_AUDIT 0x0B
|
||||
#define ENV_LICENSE 0x0C
|
||||
#define ENV_CHAR_SET 0x0D
|
||||
#define ENV_LANGUAGE 0x0E
|
||||
#define ENV_TTY_DEV 0x0F
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#ifndef __ASSEMBLY__
|
||||
extern long callback_puts(long unit, const char *s, long length);
|
||||
extern long callback_getc(long unit);
|
||||
@ -70,6 +26,4 @@ struct hwrpb_struct;
|
||||
extern int callback_init_done;
|
||||
extern void * callback_init(void *);
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* __AXP_CONSOLE_H */
|
||||
|
@ -1,128 +1,8 @@
|
||||
#ifndef __ASM_ALPHA_FPU_H
|
||||
#define __ASM_ALPHA_FPU_H
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <asm/special_insns.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Alpha floating-point control register defines:
|
||||
*/
|
||||
#define FPCR_DNOD (1UL<<47) /* denorm INV trap disable */
|
||||
#define FPCR_DNZ (1UL<<48) /* denorms to zero */
|
||||
#define FPCR_INVD (1UL<<49) /* invalid op disable (opt.) */
|
||||
#define FPCR_DZED (1UL<<50) /* division by zero disable (opt.) */
|
||||
#define FPCR_OVFD (1UL<<51) /* overflow disable (optional) */
|
||||
#define FPCR_INV (1UL<<52) /* invalid operation */
|
||||
#define FPCR_DZE (1UL<<53) /* division by zero */
|
||||
#define FPCR_OVF (1UL<<54) /* overflow */
|
||||
#define FPCR_UNF (1UL<<55) /* underflow */
|
||||
#define FPCR_INE (1UL<<56) /* inexact */
|
||||
#define FPCR_IOV (1UL<<57) /* integer overflow */
|
||||
#define FPCR_UNDZ (1UL<<60) /* underflow to zero (opt.) */
|
||||
#define FPCR_UNFD (1UL<<61) /* underflow disable (opt.) */
|
||||
#define FPCR_INED (1UL<<62) /* inexact disable (opt.) */
|
||||
#define FPCR_SUM (1UL<<63) /* summary bit */
|
||||
|
||||
#define FPCR_DYN_SHIFT 58 /* first dynamic rounding mode bit */
|
||||
#define FPCR_DYN_CHOPPED (0x0UL << FPCR_DYN_SHIFT) /* towards 0 */
|
||||
#define FPCR_DYN_MINUS (0x1UL << FPCR_DYN_SHIFT) /* towards -INF */
|
||||
#define FPCR_DYN_NORMAL (0x2UL << FPCR_DYN_SHIFT) /* towards nearest */
|
||||
#define FPCR_DYN_PLUS (0x3UL << FPCR_DYN_SHIFT) /* towards +INF */
|
||||
#define FPCR_DYN_MASK (0x3UL << FPCR_DYN_SHIFT)
|
||||
|
||||
#define FPCR_MASK 0xffff800000000000L
|
||||
|
||||
/*
|
||||
* IEEE trap enables are implemented in software. These per-thread
|
||||
* bits are stored in the "ieee_state" field of "struct thread_info".
|
||||
* Thus, the bits are defined so as not to conflict with the
|
||||
* floating-point enable bit (which is architected). On top of that,
|
||||
* we want to make these bits compatible with OSF/1 so
|
||||
* ieee_set_fp_control() etc. can be implemented easily and
|
||||
* compatibly. The corresponding definitions are in
|
||||
* /usr/include/machine/fpu.h under OSF/1.
|
||||
*/
|
||||
#define IEEE_TRAP_ENABLE_INV (1UL<<1) /* invalid op */
|
||||
#define IEEE_TRAP_ENABLE_DZE (1UL<<2) /* division by zero */
|
||||
#define IEEE_TRAP_ENABLE_OVF (1UL<<3) /* overflow */
|
||||
#define IEEE_TRAP_ENABLE_UNF (1UL<<4) /* underflow */
|
||||
#define IEEE_TRAP_ENABLE_INE (1UL<<5) /* inexact */
|
||||
#define IEEE_TRAP_ENABLE_DNO (1UL<<6) /* denorm */
|
||||
#define IEEE_TRAP_ENABLE_MASK (IEEE_TRAP_ENABLE_INV | IEEE_TRAP_ENABLE_DZE |\
|
||||
IEEE_TRAP_ENABLE_OVF | IEEE_TRAP_ENABLE_UNF |\
|
||||
IEEE_TRAP_ENABLE_INE | IEEE_TRAP_ENABLE_DNO)
|
||||
|
||||
/* Denorm and Underflow flushing */
|
||||
#define IEEE_MAP_DMZ (1UL<<12) /* Map denorm inputs to zero */
|
||||
#define IEEE_MAP_UMZ (1UL<<13) /* Map underflowed outputs to zero */
|
||||
|
||||
#define IEEE_MAP_MASK (IEEE_MAP_DMZ | IEEE_MAP_UMZ)
|
||||
|
||||
/* status bits coming from fpcr: */
|
||||
#define IEEE_STATUS_INV (1UL<<17)
|
||||
#define IEEE_STATUS_DZE (1UL<<18)
|
||||
#define IEEE_STATUS_OVF (1UL<<19)
|
||||
#define IEEE_STATUS_UNF (1UL<<20)
|
||||
#define IEEE_STATUS_INE (1UL<<21)
|
||||
#define IEEE_STATUS_DNO (1UL<<22)
|
||||
|
||||
#define IEEE_STATUS_MASK (IEEE_STATUS_INV | IEEE_STATUS_DZE | \
|
||||
IEEE_STATUS_OVF | IEEE_STATUS_UNF | \
|
||||
IEEE_STATUS_INE | IEEE_STATUS_DNO)
|
||||
|
||||
#define IEEE_SW_MASK (IEEE_TRAP_ENABLE_MASK | \
|
||||
IEEE_STATUS_MASK | IEEE_MAP_MASK)
|
||||
|
||||
#define IEEE_CURRENT_RM_SHIFT 32
|
||||
#define IEEE_CURRENT_RM_MASK (3UL<<IEEE_CURRENT_RM_SHIFT)
|
||||
|
||||
#define IEEE_STATUS_TO_EXCSUM_SHIFT 16
|
||||
|
||||
#define IEEE_INHERIT (1UL<<63) /* inherit on thread create? */
|
||||
|
||||
/*
|
||||
* Convert the software IEEE trap enable and status bits into the
|
||||
* hardware fpcr format.
|
||||
*
|
||||
* Digital Unix engineers receive my thanks for not defining the
|
||||
* software bits identical to the hardware bits. The chip designers
|
||||
* receive my thanks for making all the not-implemented fpcr bits
|
||||
* RAZ forcing us to use system calls to read/write this value.
|
||||
*/
|
||||
|
||||
static inline unsigned long
|
||||
ieee_swcr_to_fpcr(unsigned long sw)
|
||||
{
|
||||
unsigned long fp;
|
||||
fp = (sw & IEEE_STATUS_MASK) << 35;
|
||||
fp |= (sw & IEEE_MAP_DMZ) << 36;
|
||||
fp |= (sw & IEEE_STATUS_MASK ? FPCR_SUM : 0);
|
||||
fp |= (~sw & (IEEE_TRAP_ENABLE_INV
|
||||
| IEEE_TRAP_ENABLE_DZE
|
||||
| IEEE_TRAP_ENABLE_OVF)) << 48;
|
||||
fp |= (~sw & (IEEE_TRAP_ENABLE_UNF | IEEE_TRAP_ENABLE_INE)) << 57;
|
||||
fp |= (sw & IEEE_MAP_UMZ ? FPCR_UNDZ | FPCR_UNFD : 0);
|
||||
fp |= (~sw & IEEE_TRAP_ENABLE_DNO) << 41;
|
||||
return fp;
|
||||
}
|
||||
|
||||
static inline unsigned long
|
||||
ieee_fpcr_to_swcr(unsigned long fp)
|
||||
{
|
||||
unsigned long sw;
|
||||
sw = (fp >> 35) & IEEE_STATUS_MASK;
|
||||
sw |= (fp >> 36) & IEEE_MAP_DMZ;
|
||||
sw |= (~fp >> 48) & (IEEE_TRAP_ENABLE_INV
|
||||
| IEEE_TRAP_ENABLE_DZE
|
||||
| IEEE_TRAP_ENABLE_OVF);
|
||||
sw |= (~fp >> 57) & (IEEE_TRAP_ENABLE_UNF | IEEE_TRAP_ENABLE_INE);
|
||||
sw |= (fp >> 47) & IEEE_MAP_UMZ;
|
||||
sw |= (~fp >> 41) & IEEE_TRAP_ENABLE_DNO;
|
||||
return sw;
|
||||
}
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <uapi/asm/fpu.h>
|
||||
|
||||
/* The following two functions don't need trapb/excb instructions
|
||||
around the mf_fpcr/mt_fpcr instructions because (a) the kernel
|
||||
@ -192,6 +72,4 @@ extern void alpha_write_fp_reg (unsigned long reg, unsigned long val);
|
||||
extern unsigned long alpha_read_fp_reg_s (unsigned long reg);
|
||||
extern void alpha_write_fp_reg_s (unsigned long reg, unsigned long val);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* __ASM_ALPHA_FPU_H */
|
||||
|
@ -1,54 +1,8 @@
|
||||
#ifndef __ALPHA_PAL_H
|
||||
#define __ALPHA_PAL_H
|
||||
|
||||
/*
|
||||
* Common PAL-code
|
||||
*/
|
||||
#define PAL_halt 0
|
||||
#define PAL_cflush 1
|
||||
#define PAL_draina 2
|
||||
#define PAL_bpt 128
|
||||
#define PAL_bugchk 129
|
||||
#define PAL_chmk 131
|
||||
#define PAL_callsys 131
|
||||
#define PAL_imb 134
|
||||
#define PAL_rduniq 158
|
||||
#define PAL_wruniq 159
|
||||
#define PAL_gentrap 170
|
||||
#define PAL_nphalt 190
|
||||
#include <uapi/asm/pal.h>
|
||||
|
||||
/*
|
||||
* VMS specific PAL-code
|
||||
*/
|
||||
#define PAL_swppal 10
|
||||
#define PAL_mfpr_vptb 41
|
||||
|
||||
/*
|
||||
* OSF specific PAL-code
|
||||
*/
|
||||
#define PAL_cserve 9
|
||||
#define PAL_wripir 13
|
||||
#define PAL_rdmces 16
|
||||
#define PAL_wrmces 17
|
||||
#define PAL_wrfen 43
|
||||
#define PAL_wrvptptr 45
|
||||
#define PAL_jtopal 46
|
||||
#define PAL_swpctx 48
|
||||
#define PAL_wrval 49
|
||||
#define PAL_rdval 50
|
||||
#define PAL_tbi 51
|
||||
#define PAL_wrent 52
|
||||
#define PAL_swpipl 53
|
||||
#define PAL_rdps 54
|
||||
#define PAL_wrkgp 55
|
||||
#define PAL_wrusp 56
|
||||
#define PAL_wrperfmon 57
|
||||
#define PAL_rdusp 58
|
||||
#define PAL_whami 60
|
||||
#define PAL_retsys 61
|
||||
#define PAL_rti 63
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
extern void halt(void) __attribute__((noreturn));
|
||||
@ -158,6 +112,4 @@ __CALL_PAL_W1(wrvptptr, unsigned long);
|
||||
#define tbia() __tbi(-2, /* no second argument */)
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* __ALPHA_PAL_H */
|
||||
|
@ -1,27 +1,9 @@
|
||||
#ifndef _ASM_ALPHA_PARAM_H
|
||||
#define _ASM_ALPHA_PARAM_H
|
||||
|
||||
/* ??? Gross. I don't want to parameterize this, and supposedly the
|
||||
hardware ignores reprogramming. We also need userland buy-in to the
|
||||
change in HZ, since this is visible in the wait4 resources etc. */
|
||||
#include <uapi/asm/param.h>
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#define HZ CONFIG_HZ
|
||||
#define USER_HZ HZ
|
||||
#else
|
||||
#define HZ 1024
|
||||
#endif
|
||||
|
||||
#define EXEC_PAGESIZE 8192
|
||||
|
||||
#ifndef NOGROUP
|
||||
#define NOGROUP (-1)
|
||||
#endif
|
||||
|
||||
#define MAXHOSTNAMELEN 64 /* max length of hostname */
|
||||
|
||||
#ifdef __KERNEL__
|
||||
# define CLOCKS_PER_SEC HZ /* frequency at which times() counts */
|
||||
#endif
|
||||
|
||||
#endif /* _ASM_ALPHA_PARAM_H */
|
||||
|
@ -9,8 +9,8 @@
|
||||
#ifndef _ASM_AXP_PARPORT_H
|
||||
#define _ASM_AXP_PARPORT_H 1
|
||||
|
||||
static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma);
|
||||
static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma)
|
||||
static int parport_pc_find_isa_ports (int autoirq, int autodma);
|
||||
static int parport_pc_find_nonpci_ports (int autoirq, int autodma)
|
||||
{
|
||||
return parport_pc_find_isa_ports (autoirq, autodma);
|
||||
}
|
||||
|
@ -1,77 +1,14 @@
|
||||
#ifndef _ASMAXP_PTRACE_H
|
||||
#define _ASMAXP_PTRACE_H
|
||||
|
||||
#include <uapi/asm/ptrace.h>
|
||||
|
||||
/*
|
||||
* This struct defines the way the registers are stored on the
|
||||
* kernel stack during a system call or other kernel entry
|
||||
*
|
||||
* NOTE! I want to minimize the overhead of system calls, so this
|
||||
* struct has as little information as possible. I does not have
|
||||
*
|
||||
* - floating point regs: the kernel doesn't change those
|
||||
* - r9-15: saved by the C compiler
|
||||
*
|
||||
* This makes "fork()" and "exec()" a bit more complex, but should
|
||||
* give us low system call latency.
|
||||
*/
|
||||
|
||||
struct pt_regs {
|
||||
unsigned long r0;
|
||||
unsigned long r1;
|
||||
unsigned long r2;
|
||||
unsigned long r3;
|
||||
unsigned long r4;
|
||||
unsigned long r5;
|
||||
unsigned long r6;
|
||||
unsigned long r7;
|
||||
unsigned long r8;
|
||||
unsigned long r19;
|
||||
unsigned long r20;
|
||||
unsigned long r21;
|
||||
unsigned long r22;
|
||||
unsigned long r23;
|
||||
unsigned long r24;
|
||||
unsigned long r25;
|
||||
unsigned long r26;
|
||||
unsigned long r27;
|
||||
unsigned long r28;
|
||||
unsigned long hae;
|
||||
/* JRP - These are the values provided to a0-a2 by PALcode */
|
||||
unsigned long trap_a0;
|
||||
unsigned long trap_a1;
|
||||
unsigned long trap_a2;
|
||||
/* These are saved by PAL-code: */
|
||||
unsigned long ps;
|
||||
unsigned long pc;
|
||||
unsigned long gp;
|
||||
unsigned long r16;
|
||||
unsigned long r17;
|
||||
unsigned long r18;
|
||||
};
|
||||
|
||||
/*
|
||||
* This is the extended stack used by signal handlers and the context
|
||||
* switcher: it's pushed after the normal "struct pt_regs".
|
||||
*/
|
||||
struct switch_stack {
|
||||
unsigned long r9;
|
||||
unsigned long r10;
|
||||
unsigned long r11;
|
||||
unsigned long r12;
|
||||
unsigned long r13;
|
||||
unsigned long r14;
|
||||
unsigned long r15;
|
||||
unsigned long r26;
|
||||
unsigned long fp[32]; /* fp[31] is fpcr */
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#define arch_has_single_step() (1)
|
||||
#define user_mode(regs) (((regs)->ps & 8) != 0)
|
||||
#define instruction_pointer(regs) ((regs)->pc)
|
||||
#define profile_pc(regs) instruction_pointer(regs)
|
||||
#define current_user_stack_pointer() rdusp()
|
||||
|
||||
#define task_pt_regs(task) \
|
||||
((struct pt_regs *) (task_stack_page(task) + 2*PAGE_SIZE) - 1)
|
||||
@ -83,5 +20,3 @@ struct switch_stack {
|
||||
#define force_successful_syscall_return() (current_pt_regs()->r0 = 0)
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -1,12 +1,8 @@
|
||||
#ifndef _ASMAXP_SIGNAL_H
|
||||
#define _ASMAXP_SIGNAL_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <uapi/asm/signal.h>
|
||||
|
||||
/* Avoid too many header ordering problems. */
|
||||
struct siginfo;
|
||||
|
||||
#ifdef __KERNEL__
|
||||
/* Digital Unix defines 64 signals. Most things should be clean enough
|
||||
to redefine this at will, if care is taken to make libc match. */
|
||||
|
||||
@ -20,100 +16,6 @@ typedef struct {
|
||||
unsigned long sig[_NSIG_WORDS];
|
||||
} sigset_t;
|
||||
|
||||
#else
|
||||
/* Here we must cater to libcs that poke about in kernel headers. */
|
||||
|
||||
#define NSIG 32
|
||||
typedef unsigned long sigset_t;
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
|
||||
/*
|
||||
* Linux/AXP has different signal numbers that Linux/i386: I'm trying
|
||||
* to make it OSF/1 binary compatible, at least for normal binaries.
|
||||
*/
|
||||
#define SIGHUP 1
|
||||
#define SIGINT 2
|
||||
#define SIGQUIT 3
|
||||
#define SIGILL 4
|
||||
#define SIGTRAP 5
|
||||
#define SIGABRT 6
|
||||
#define SIGEMT 7
|
||||
#define SIGFPE 8
|
||||
#define SIGKILL 9
|
||||
#define SIGBUS 10
|
||||
#define SIGSEGV 11
|
||||
#define SIGSYS 12
|
||||
#define SIGPIPE 13
|
||||
#define SIGALRM 14
|
||||
#define SIGTERM 15
|
||||
#define SIGURG 16
|
||||
#define SIGSTOP 17
|
||||
#define SIGTSTP 18
|
||||
#define SIGCONT 19
|
||||
#define SIGCHLD 20
|
||||
#define SIGTTIN 21
|
||||
#define SIGTTOU 22
|
||||
#define SIGIO 23
|
||||
#define SIGXCPU 24
|
||||
#define SIGXFSZ 25
|
||||
#define SIGVTALRM 26
|
||||
#define SIGPROF 27
|
||||
#define SIGWINCH 28
|
||||
#define SIGINFO 29
|
||||
#define SIGUSR1 30
|
||||
#define SIGUSR2 31
|
||||
|
||||
#define SIGPOLL SIGIO
|
||||
#define SIGPWR SIGINFO
|
||||
#define SIGIOT SIGABRT
|
||||
|
||||
/* These should not be considered constants from userland. */
|
||||
#define SIGRTMIN 32
|
||||
#define SIGRTMAX _NSIG
|
||||
|
||||
/*
|
||||
* SA_FLAGS values:
|
||||
*
|
||||
* SA_ONSTACK indicates that a registered stack_t will be used.
|
||||
* SA_RESTART flag to get restarting signals (which were the default long ago)
|
||||
* SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
|
||||
* SA_RESETHAND clears the handler when the signal is delivered.
|
||||
* SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
|
||||
* SA_NODEFER prevents the current signal from being masked in the handler.
|
||||
*
|
||||
* SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
|
||||
* Unix names RESETHAND and NODEFER respectively.
|
||||
*/
|
||||
|
||||
#define SA_ONSTACK 0x00000001
|
||||
#define SA_RESTART 0x00000002
|
||||
#define SA_NOCLDSTOP 0x00000004
|
||||
#define SA_NODEFER 0x00000008
|
||||
#define SA_RESETHAND 0x00000010
|
||||
#define SA_NOCLDWAIT 0x00000020
|
||||
#define SA_SIGINFO 0x00000040
|
||||
|
||||
#define SA_ONESHOT SA_RESETHAND
|
||||
#define SA_NOMASK SA_NODEFER
|
||||
|
||||
/*
|
||||
* sigaltstack controls
|
||||
*/
|
||||
#define SS_ONSTACK 1
|
||||
#define SS_DISABLE 2
|
||||
|
||||
#define MINSIGSTKSZ 4096
|
||||
#define SIGSTKSZ 16384
|
||||
|
||||
#define SIG_BLOCK 1 /* for blocking signals */
|
||||
#define SIG_UNBLOCK 2 /* for unblocking signals */
|
||||
#define SIG_SETMASK 3 /* for setting the signal mask */
|
||||
|
||||
#include <asm-generic/signal-defs.h>
|
||||
|
||||
#ifdef __KERNEL__
|
||||
struct osf_sigaction {
|
||||
__sighandler_t sa_handler;
|
||||
old_sigset_t sa_mask;
|
||||
@ -130,40 +32,5 @@ struct k_sigaction {
|
||||
struct sigaction sa;
|
||||
__sigrestore_t ka_restorer;
|
||||
};
|
||||
#else
|
||||
/* Here we must cater to libcs that poke about in kernel headers. */
|
||||
|
||||
struct sigaction {
|
||||
union {
|
||||
__sighandler_t _sa_handler;
|
||||
void (*_sa_sigaction)(int, struct siginfo *, void *);
|
||||
} _u;
|
||||
sigset_t sa_mask;
|
||||
int sa_flags;
|
||||
};
|
||||
|
||||
#define sa_handler _u._sa_handler
|
||||
#define sa_sigaction _u._sa_sigaction
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
typedef struct sigaltstack {
|
||||
void __user *ss_sp;
|
||||
int ss_flags;
|
||||
size_t ss_size;
|
||||
} stack_t;
|
||||
|
||||
/* sigstack(2) is deprecated, and will be withdrawn in a future version
|
||||
of the X/Open CAE Specification. Use sigaltstack instead. It is only
|
||||
implemented here for OSF/1 compatibility. */
|
||||
|
||||
struct sigstack {
|
||||
void __user *ss_sp;
|
||||
int ss_onstack;
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <asm/sigcontext.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -1,87 +1,10 @@
|
||||
#ifndef _ASM_SOCKET_H
|
||||
#define _ASM_SOCKET_H
|
||||
|
||||
#include <asm/sockios.h>
|
||||
#include <uapi/asm/socket.h>
|
||||
|
||||
/* For setsockopt(2) */
|
||||
/*
|
||||
* Note: we only bother about making the SOL_SOCKET options
|
||||
* same as OSF/1, as that's all that "normal" programs are
|
||||
* likely to set. We don't necessarily want to be binary
|
||||
* compatible with _everything_.
|
||||
*/
|
||||
#define SOL_SOCKET 0xffff
|
||||
|
||||
#define SO_DEBUG 0x0001
|
||||
#define SO_REUSEADDR 0x0004
|
||||
#define SO_KEEPALIVE 0x0008
|
||||
#define SO_DONTROUTE 0x0010
|
||||
#define SO_BROADCAST 0x0020
|
||||
#define SO_LINGER 0x0080
|
||||
#define SO_OOBINLINE 0x0100
|
||||
/* To add :#define SO_REUSEPORT 0x0200 */
|
||||
|
||||
#define SO_TYPE 0x1008
|
||||
#define SO_ERROR 0x1007
|
||||
#define SO_SNDBUF 0x1001
|
||||
#define SO_RCVBUF 0x1002
|
||||
#define SO_SNDBUFFORCE 0x100a
|
||||
#define SO_RCVBUFFORCE 0x100b
|
||||
#define SO_RCVLOWAT 0x1010
|
||||
#define SO_SNDLOWAT 0x1011
|
||||
#define SO_RCVTIMEO 0x1012
|
||||
#define SO_SNDTIMEO 0x1013
|
||||
#define SO_ACCEPTCONN 0x1014
|
||||
#define SO_PROTOCOL 0x1028
|
||||
#define SO_DOMAIN 0x1029
|
||||
|
||||
/* linux-specific, might as well be the same as on i386 */
|
||||
#define SO_NO_CHECK 11
|
||||
#define SO_PRIORITY 12
|
||||
#define SO_BSDCOMPAT 14
|
||||
|
||||
#define SO_PASSCRED 17
|
||||
#define SO_PEERCRED 18
|
||||
#define SO_BINDTODEVICE 25
|
||||
|
||||
/* Socket filtering */
|
||||
#define SO_ATTACH_FILTER 26
|
||||
#define SO_DETACH_FILTER 27
|
||||
#define SO_GET_FILTER SO_ATTACH_FILTER
|
||||
|
||||
#define SO_PEERNAME 28
|
||||
#define SO_TIMESTAMP 29
|
||||
#define SCM_TIMESTAMP SO_TIMESTAMP
|
||||
|
||||
#define SO_PEERSEC 30
|
||||
#define SO_PASSSEC 34
|
||||
#define SO_TIMESTAMPNS 35
|
||||
#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
|
||||
|
||||
/* Security levels - as per NRL IPv6 - don't actually do anything */
|
||||
#define SO_SECURITY_AUTHENTICATION 19
|
||||
#define SO_SECURITY_ENCRYPTION_TRANSPORT 20
|
||||
#define SO_SECURITY_ENCRYPTION_NETWORK 21
|
||||
|
||||
#define SO_MARK 36
|
||||
|
||||
#define SO_TIMESTAMPING 37
|
||||
#define SCM_TIMESTAMPING SO_TIMESTAMPING
|
||||
|
||||
#define SO_RXQ_OVFL 40
|
||||
|
||||
#define SO_WIFI_STATUS 41
|
||||
#define SCM_WIFI_STATUS SO_WIFI_STATUS
|
||||
#define SO_PEEK_OFF 42
|
||||
|
||||
/* Instruct lower device to use last 4-bytes of skb data as FCS */
|
||||
#define SO_NOFCS 43
|
||||
|
||||
#ifdef __KERNEL__
|
||||
/* O_NONBLOCK clashes with the bits used for socket types. Therefore we
|
||||
* have to define SOCK_NONBLOCK to a different value here.
|
||||
*/
|
||||
#define SOCK_NONBLOCK 0x40000000
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _ASM_SOCKET_H */
|
||||
|
@ -1,72 +1,8 @@
|
||||
#ifndef _ALPHA_TERMIOS_H
|
||||
#define _ALPHA_TERMIOS_H
|
||||
|
||||
#include <asm/ioctls.h>
|
||||
#include <asm/termbits.h>
|
||||
#include <uapi/asm/termios.h>
|
||||
|
||||
struct sgttyb {
|
||||
char sg_ispeed;
|
||||
char sg_ospeed;
|
||||
char sg_erase;
|
||||
char sg_kill;
|
||||
short sg_flags;
|
||||
};
|
||||
|
||||
struct tchars {
|
||||
char t_intrc;
|
||||
char t_quitc;
|
||||
char t_startc;
|
||||
char t_stopc;
|
||||
char t_eofc;
|
||||
char t_brkc;
|
||||
};
|
||||
|
||||
struct ltchars {
|
||||
char t_suspc;
|
||||
char t_dsuspc;
|
||||
char t_rprntc;
|
||||
char t_flushc;
|
||||
char t_werasc;
|
||||
char t_lnextc;
|
||||
};
|
||||
|
||||
struct winsize {
|
||||
unsigned short ws_row;
|
||||
unsigned short ws_col;
|
||||
unsigned short ws_xpixel;
|
||||
unsigned short ws_ypixel;
|
||||
};
|
||||
|
||||
#define NCC 8
|
||||
struct termio {
|
||||
unsigned short c_iflag; /* input mode flags */
|
||||
unsigned short c_oflag; /* output mode flags */
|
||||
unsigned short c_cflag; /* control mode flags */
|
||||
unsigned short c_lflag; /* local mode flags */
|
||||
unsigned char c_line; /* line discipline */
|
||||
unsigned char c_cc[NCC]; /* control characters */
|
||||
};
|
||||
|
||||
/*
|
||||
* c_cc characters in the termio structure. Oh, how I love being
|
||||
* backwardly compatible. Notice that character 4 and 5 are
|
||||
* interpreted differently depending on whether ICANON is set in
|
||||
* c_lflag. If it's set, they are used as _VEOF and _VEOL, otherwise
|
||||
* as _VMIN and V_TIME. This is for compatibility with OSF/1 (which
|
||||
* is compatible with sysV)...
|
||||
*/
|
||||
#define _VINTR 0
|
||||
#define _VQUIT 1
|
||||
#define _VERASE 2
|
||||
#define _VKILL 3
|
||||
#define _VEOF 4
|
||||
#define _VMIN 4
|
||||
#define _VEOL 5
|
||||
#define _VTIME 5
|
||||
#define _VEOL2 6
|
||||
#define _VSWTC 7
|
||||
|
||||
#ifdef __KERNEL__
|
||||
/* eof=^D eol=\0 eol2=\0 erase=del
|
||||
werase=^W kill=^U reprint=^R sxtc=\0
|
||||
intr=^C quit=^\ susp=^Z <OSF/1 VDSUSP>
|
||||
@ -141,6 +77,4 @@ struct termio {
|
||||
#define kernel_termios_to_user_termios(u, k) \
|
||||
copy_to_user(u, k, sizeof(struct termios))
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _ALPHA_TERMIOS_H */
|
||||
|
@ -1,18 +1,7 @@
|
||||
#ifndef _ALPHA_TYPES_H
|
||||
#define _ALPHA_TYPES_H
|
||||
|
||||
/*
|
||||
* This file is never included by application software unless
|
||||
* explicitly requested (e.g., via linux/types.h) in which case the
|
||||
* application is Linux specific so (user-) name space pollution is
|
||||
* not a major issue. However, for interoperability, libraries still
|
||||
* need to be careful to avoid a name clashes.
|
||||
*/
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <asm-generic/int-ll64.h>
|
||||
#else
|
||||
#include <asm-generic/int-l64.h>
|
||||
#endif
|
||||
#include <uapi/asm/types.h>
|
||||
|
||||
#endif /* _ALPHA_TYPES_H */
|
||||
|
@ -1,474 +1,8 @@
|
||||
#ifndef _ALPHA_UNISTD_H
|
||||
#define _ALPHA_UNISTD_H
|
||||
|
||||
#define __NR_osf_syscall 0 /* not implemented */
|
||||
#define __NR_exit 1
|
||||
#define __NR_fork 2
|
||||
#define __NR_read 3
|
||||
#define __NR_write 4
|
||||
#define __NR_osf_old_open 5 /* not implemented */
|
||||
#define __NR_close 6
|
||||
#define __NR_osf_wait4 7
|
||||
#define __NR_osf_old_creat 8 /* not implemented */
|
||||
#define __NR_link 9
|
||||
#define __NR_unlink 10
|
||||
#define __NR_osf_execve 11 /* not implemented */
|
||||
#define __NR_chdir 12
|
||||
#define __NR_fchdir 13
|
||||
#define __NR_mknod 14
|
||||
#define __NR_chmod 15
|
||||
#define __NR_chown 16
|
||||
#define __NR_brk 17
|
||||
#define __NR_osf_getfsstat 18 /* not implemented */
|
||||
#define __NR_lseek 19
|
||||
#define __NR_getxpid 20
|
||||
#define __NR_osf_mount 21
|
||||
#define __NR_umount 22
|
||||
#define __NR_setuid 23
|
||||
#define __NR_getxuid 24
|
||||
#define __NR_exec_with_loader 25 /* not implemented */
|
||||
#define __NR_ptrace 26
|
||||
#define __NR_osf_nrecvmsg 27 /* not implemented */
|
||||
#define __NR_osf_nsendmsg 28 /* not implemented */
|
||||
#define __NR_osf_nrecvfrom 29 /* not implemented */
|
||||
#define __NR_osf_naccept 30 /* not implemented */
|
||||
#define __NR_osf_ngetpeername 31 /* not implemented */
|
||||
#define __NR_osf_ngetsockname 32 /* not implemented */
|
||||
#define __NR_access 33
|
||||
#define __NR_osf_chflags 34 /* not implemented */
|
||||
#define __NR_osf_fchflags 35 /* not implemented */
|
||||
#define __NR_sync 36
|
||||
#define __NR_kill 37
|
||||
#define __NR_osf_old_stat 38 /* not implemented */
|
||||
#define __NR_setpgid 39
|
||||
#define __NR_osf_old_lstat 40 /* not implemented */
|
||||
#define __NR_dup 41
|
||||
#define __NR_pipe 42
|
||||
#define __NR_osf_set_program_attributes 43
|
||||
#define __NR_osf_profil 44 /* not implemented */
|
||||
#define __NR_open 45
|
||||
#define __NR_osf_old_sigaction 46 /* not implemented */
|
||||
#define __NR_getxgid 47
|
||||
#define __NR_osf_sigprocmask 48
|
||||
#define __NR_osf_getlogin 49 /* not implemented */
|
||||
#define __NR_osf_setlogin 50 /* not implemented */
|
||||
#define __NR_acct 51
|
||||
#define __NR_sigpending 52
|
||||
#include <uapi/asm/unistd.h>
|
||||
|
||||
#define __NR_ioctl 54
|
||||
#define __NR_osf_reboot 55 /* not implemented */
|
||||
#define __NR_osf_revoke 56 /* not implemented */
|
||||
#define __NR_symlink 57
|
||||
#define __NR_readlink 58
|
||||
#define __NR_execve 59
|
||||
#define __NR_umask 60
|
||||
#define __NR_chroot 61
|
||||
#define __NR_osf_old_fstat 62 /* not implemented */
|
||||
#define __NR_getpgrp 63
|
||||
#define __NR_getpagesize 64
|
||||
#define __NR_osf_mremap 65 /* not implemented */
|
||||
#define __NR_vfork 66
|
||||
#define __NR_stat 67
|
||||
#define __NR_lstat 68
|
||||
#define __NR_osf_sbrk 69 /* not implemented */
|
||||
#define __NR_osf_sstk 70 /* not implemented */
|
||||
#define __NR_mmap 71 /* OSF/1 mmap is superset of Linux */
|
||||
#define __NR_osf_old_vadvise 72 /* not implemented */
|
||||
#define __NR_munmap 73
|
||||
#define __NR_mprotect 74
|
||||
#define __NR_madvise 75
|
||||
#define __NR_vhangup 76
|
||||
#define __NR_osf_kmodcall 77 /* not implemented */
|
||||
#define __NR_osf_mincore 78 /* not implemented */
|
||||
#define __NR_getgroups 79
|
||||
#define __NR_setgroups 80
|
||||
#define __NR_osf_old_getpgrp 81 /* not implemented */
|
||||
#define __NR_setpgrp 82 /* BSD alias for setpgid */
|
||||
#define __NR_osf_setitimer 83
|
||||
#define __NR_osf_old_wait 84 /* not implemented */
|
||||
#define __NR_osf_table 85 /* not implemented */
|
||||
#define __NR_osf_getitimer 86
|
||||
#define __NR_gethostname 87
|
||||
#define __NR_sethostname 88
|
||||
#define __NR_getdtablesize 89
|
||||
#define __NR_dup2 90
|
||||
#define __NR_fstat 91
|
||||
#define __NR_fcntl 92
|
||||
#define __NR_osf_select 93
|
||||
#define __NR_poll 94
|
||||
#define __NR_fsync 95
|
||||
#define __NR_setpriority 96
|
||||
#define __NR_socket 97
|
||||
#define __NR_connect 98
|
||||
#define __NR_accept 99
|
||||
#define __NR_getpriority 100
|
||||
#define __NR_send 101
|
||||
#define __NR_recv 102
|
||||
#define __NR_sigreturn 103
|
||||
#define __NR_bind 104
|
||||
#define __NR_setsockopt 105
|
||||
#define __NR_listen 106
|
||||
#define __NR_osf_plock 107 /* not implemented */
|
||||
#define __NR_osf_old_sigvec 108 /* not implemented */
|
||||
#define __NR_osf_old_sigblock 109 /* not implemented */
|
||||
#define __NR_osf_old_sigsetmask 110 /* not implemented */
|
||||
#define __NR_sigsuspend 111
|
||||
#define __NR_osf_sigstack 112
|
||||
#define __NR_recvmsg 113
|
||||
#define __NR_sendmsg 114
|
||||
#define __NR_osf_old_vtrace 115 /* not implemented */
|
||||
#define __NR_osf_gettimeofday 116
|
||||
#define __NR_osf_getrusage 117
|
||||
#define __NR_getsockopt 118
|
||||
|
||||
#define __NR_readv 120
|
||||
#define __NR_writev 121
|
||||
#define __NR_osf_settimeofday 122
|
||||
#define __NR_fchown 123
|
||||
#define __NR_fchmod 124
|
||||
#define __NR_recvfrom 125
|
||||
#define __NR_setreuid 126
|
||||
#define __NR_setregid 127
|
||||
#define __NR_rename 128
|
||||
#define __NR_truncate 129
|
||||
#define __NR_ftruncate 130
|
||||
#define __NR_flock 131
|
||||
#define __NR_setgid 132
|
||||
#define __NR_sendto 133
|
||||
#define __NR_shutdown 134
|
||||
#define __NR_socketpair 135
|
||||
#define __NR_mkdir 136
|
||||
#define __NR_rmdir 137
|
||||
#define __NR_osf_utimes 138
|
||||
#define __NR_osf_old_sigreturn 139 /* not implemented */
|
||||
#define __NR_osf_adjtime 140 /* not implemented */
|
||||
#define __NR_getpeername 141
|
||||
#define __NR_osf_gethostid 142 /* not implemented */
|
||||
#define __NR_osf_sethostid 143 /* not implemented */
|
||||
#define __NR_getrlimit 144
|
||||
#define __NR_setrlimit 145
|
||||
#define __NR_osf_old_killpg 146 /* not implemented */
|
||||
#define __NR_setsid 147
|
||||
#define __NR_quotactl 148
|
||||
#define __NR_osf_oldquota 149 /* not implemented */
|
||||
#define __NR_getsockname 150
|
||||
|
||||
#define __NR_osf_pid_block 153 /* not implemented */
|
||||
#define __NR_osf_pid_unblock 154 /* not implemented */
|
||||
|
||||
#define __NR_sigaction 156
|
||||
#define __NR_osf_sigwaitprim 157 /* not implemented */
|
||||
#define __NR_osf_nfssvc 158 /* not implemented */
|
||||
#define __NR_osf_getdirentries 159
|
||||
#define __NR_osf_statfs 160
|
||||
#define __NR_osf_fstatfs 161
|
||||
|
||||
#define __NR_osf_asynch_daemon 163 /* not implemented */
|
||||
#define __NR_osf_getfh 164 /* not implemented */
|
||||
#define __NR_osf_getdomainname 165
|
||||
#define __NR_setdomainname 166
|
||||
|
||||
#define __NR_osf_exportfs 169 /* not implemented */
|
||||
|
||||
#define __NR_osf_alt_plock 181 /* not implemented */
|
||||
|
||||
#define __NR_osf_getmnt 184 /* not implemented */
|
||||
|
||||
#define __NR_osf_alt_sigpending 187 /* not implemented */
|
||||
#define __NR_osf_alt_setsid 188 /* not implemented */
|
||||
|
||||
#define __NR_osf_swapon 199
|
||||
#define __NR_msgctl 200
|
||||
#define __NR_msgget 201
|
||||
#define __NR_msgrcv 202
|
||||
#define __NR_msgsnd 203
|
||||
#define __NR_semctl 204
|
||||
#define __NR_semget 205
|
||||
#define __NR_semop 206
|
||||
#define __NR_osf_utsname 207
|
||||
#define __NR_lchown 208
|
||||
#define __NR_osf_shmat 209
|
||||
#define __NR_shmctl 210
|
||||
#define __NR_shmdt 211
|
||||
#define __NR_shmget 212
|
||||
#define __NR_osf_mvalid 213 /* not implemented */
|
||||
#define __NR_osf_getaddressconf 214 /* not implemented */
|
||||
#define __NR_osf_msleep 215 /* not implemented */
|
||||
#define __NR_osf_mwakeup 216 /* not implemented */
|
||||
#define __NR_msync 217
|
||||
#define __NR_osf_signal 218 /* not implemented */
|
||||
#define __NR_osf_utc_gettime 219 /* not implemented */
|
||||
#define __NR_osf_utc_adjtime 220 /* not implemented */
|
||||
|
||||
#define __NR_osf_security 222 /* not implemented */
|
||||
#define __NR_osf_kloadcall 223 /* not implemented */
|
||||
|
||||
#define __NR_osf_stat 224
|
||||
#define __NR_osf_lstat 225
|
||||
#define __NR_osf_fstat 226
|
||||
#define __NR_osf_statfs64 227
|
||||
#define __NR_osf_fstatfs64 228
|
||||
|
||||
#define __NR_getpgid 233
|
||||
#define __NR_getsid 234
|
||||
#define __NR_sigaltstack 235
|
||||
#define __NR_osf_waitid 236 /* not implemented */
|
||||
#define __NR_osf_priocntlset 237 /* not implemented */
|
||||
#define __NR_osf_sigsendset 238 /* not implemented */
|
||||
#define __NR_osf_set_speculative 239 /* not implemented */
|
||||
#define __NR_osf_msfs_syscall 240 /* not implemented */
|
||||
#define __NR_osf_sysinfo 241
|
||||
#define __NR_osf_uadmin 242 /* not implemented */
|
||||
#define __NR_osf_fuser 243 /* not implemented */
|
||||
#define __NR_osf_proplist_syscall 244
|
||||
#define __NR_osf_ntp_adjtime 245 /* not implemented */
|
||||
#define __NR_osf_ntp_gettime 246 /* not implemented */
|
||||
#define __NR_osf_pathconf 247 /* not implemented */
|
||||
#define __NR_osf_fpathconf 248 /* not implemented */
|
||||
|
||||
#define __NR_osf_uswitch 250 /* not implemented */
|
||||
#define __NR_osf_usleep_thread 251
|
||||
#define __NR_osf_audcntl 252 /* not implemented */
|
||||
#define __NR_osf_audgen 253 /* not implemented */
|
||||
#define __NR_sysfs 254
|
||||
#define __NR_osf_subsys_info 255 /* not implemented */
|
||||
#define __NR_osf_getsysinfo 256
|
||||
#define __NR_osf_setsysinfo 257
|
||||
#define __NR_osf_afs_syscall 258 /* not implemented */
|
||||
#define __NR_osf_swapctl 259 /* not implemented */
|
||||
#define __NR_osf_memcntl 260 /* not implemented */
|
||||
#define __NR_osf_fdatasync 261 /* not implemented */
|
||||
|
||||
/*
|
||||
* Ignore legacy syscalls that we don't use.
|
||||
*/
|
||||
#define __IGNORE_alarm
|
||||
#define __IGNORE_creat
|
||||
#define __IGNORE_getegid
|
||||
#define __IGNORE_geteuid
|
||||
#define __IGNORE_getgid
|
||||
#define __IGNORE_getpid
|
||||
#define __IGNORE_getppid
|
||||
#define __IGNORE_getuid
|
||||
#define __IGNORE_pause
|
||||
#define __IGNORE_time
|
||||
#define __IGNORE_utime
|
||||
#define __IGNORE_umount2
|
||||
|
||||
/*
|
||||
* Linux-specific system calls begin at 300
|
||||
*/
|
||||
#define __NR_bdflush 300
|
||||
#define __NR_sethae 301
|
||||
#define __NR_mount 302
|
||||
#define __NR_old_adjtimex 303
|
||||
#define __NR_swapoff 304
|
||||
#define __NR_getdents 305
|
||||
#define __NR_create_module 306
|
||||
#define __NR_init_module 307
|
||||
#define __NR_delete_module 308
|
||||
#define __NR_get_kernel_syms 309
|
||||
#define __NR_syslog 310
|
||||
#define __NR_reboot 311
|
||||
#define __NR_clone 312
|
||||
#define __NR_uselib 313
|
||||
#define __NR_mlock 314
|
||||
#define __NR_munlock 315
|
||||
#define __NR_mlockall 316
|
||||
#define __NR_munlockall 317
|
||||
#define __NR_sysinfo 318
|
||||
#define __NR__sysctl 319
|
||||
/* 320 was sys_idle. */
|
||||
#define __NR_oldumount 321
|
||||
#define __NR_swapon 322
|
||||
#define __NR_times 323
|
||||
#define __NR_personality 324
|
||||
#define __NR_setfsuid 325
|
||||
#define __NR_setfsgid 326
|
||||
#define __NR_ustat 327
|
||||
#define __NR_statfs 328
|
||||
#define __NR_fstatfs 329
|
||||
#define __NR_sched_setparam 330
|
||||
#define __NR_sched_getparam 331
|
||||
#define __NR_sched_setscheduler 332
|
||||
#define __NR_sched_getscheduler 333
|
||||
#define __NR_sched_yield 334
|
||||
#define __NR_sched_get_priority_max 335
|
||||
#define __NR_sched_get_priority_min 336
|
||||
#define __NR_sched_rr_get_interval 337
|
||||
#define __NR_afs_syscall 338
|
||||
#define __NR_uname 339
|
||||
#define __NR_nanosleep 340
|
||||
#define __NR_mremap 341
|
||||
#define __NR_nfsservctl 342
|
||||
#define __NR_setresuid 343
|
||||
#define __NR_getresuid 344
|
||||
#define __NR_pciconfig_read 345
|
||||
#define __NR_pciconfig_write 346
|
||||
#define __NR_query_module 347
|
||||
#define __NR_prctl 348
|
||||
#define __NR_pread64 349
|
||||
#define __NR_pwrite64 350
|
||||
#define __NR_rt_sigreturn 351
|
||||
#define __NR_rt_sigaction 352
|
||||
#define __NR_rt_sigprocmask 353
|
||||
#define __NR_rt_sigpending 354
|
||||
#define __NR_rt_sigtimedwait 355
|
||||
#define __NR_rt_sigqueueinfo 356
|
||||
#define __NR_rt_sigsuspend 357
|
||||
#define __NR_select 358
|
||||
#define __NR_gettimeofday 359
|
||||
#define __NR_settimeofday 360
|
||||
#define __NR_getitimer 361
|
||||
#define __NR_setitimer 362
|
||||
#define __NR_utimes 363
|
||||
#define __NR_getrusage 364
|
||||
#define __NR_wait4 365
|
||||
#define __NR_adjtimex 366
|
||||
#define __NR_getcwd 367
|
||||
#define __NR_capget 368
|
||||
#define __NR_capset 369
|
||||
#define __NR_sendfile 370
|
||||
#define __NR_setresgid 371
|
||||
#define __NR_getresgid 372
|
||||
#define __NR_dipc 373
|
||||
#define __NR_pivot_root 374
|
||||
#define __NR_mincore 375
|
||||
#define __NR_pciconfig_iobase 376
|
||||
#define __NR_getdents64 377
|
||||
#define __NR_gettid 378
|
||||
#define __NR_readahead 379
|
||||
/* 380 is unused */
|
||||
#define __NR_tkill 381
|
||||
#define __NR_setxattr 382
|
||||
#define __NR_lsetxattr 383
|
||||
#define __NR_fsetxattr 384
|
||||
#define __NR_getxattr 385
|
||||
#define __NR_lgetxattr 386
|
||||
#define __NR_fgetxattr 387
|
||||
#define __NR_listxattr 388
|
||||
#define __NR_llistxattr 389
|
||||
#define __NR_flistxattr 390
|
||||
#define __NR_removexattr 391
|
||||
#define __NR_lremovexattr 392
|
||||
#define __NR_fremovexattr 393
|
||||
#define __NR_futex 394
|
||||
#define __NR_sched_setaffinity 395
|
||||
#define __NR_sched_getaffinity 396
|
||||
#define __NR_tuxcall 397
|
||||
#define __NR_io_setup 398
|
||||
#define __NR_io_destroy 399
|
||||
#define __NR_io_getevents 400
|
||||
#define __NR_io_submit 401
|
||||
#define __NR_io_cancel 402
|
||||
#define __NR_exit_group 405
|
||||
#define __NR_lookup_dcookie 406
|
||||
#define __NR_epoll_create 407
|
||||
#define __NR_epoll_ctl 408
|
||||
#define __NR_epoll_wait 409
|
||||
/* Feb 2007: These three sys_epoll defines shouldn't be here but culling
|
||||
* them would break userspace apps ... we'll kill them off in 2010 :) */
|
||||
#define __NR_sys_epoll_create __NR_epoll_create
|
||||
#define __NR_sys_epoll_ctl __NR_epoll_ctl
|
||||
#define __NR_sys_epoll_wait __NR_epoll_wait
|
||||
#define __NR_remap_file_pages 410
|
||||
#define __NR_set_tid_address 411
|
||||
#define __NR_restart_syscall 412
|
||||
#define __NR_fadvise64 413
|
||||
#define __NR_timer_create 414
|
||||
#define __NR_timer_settime 415
|
||||
#define __NR_timer_gettime 416
|
||||
#define __NR_timer_getoverrun 417
|
||||
#define __NR_timer_delete 418
|
||||
#define __NR_clock_settime 419
|
||||
#define __NR_clock_gettime 420
|
||||
#define __NR_clock_getres 421
|
||||
#define __NR_clock_nanosleep 422
|
||||
#define __NR_semtimedop 423
|
||||
#define __NR_tgkill 424
|
||||
#define __NR_stat64 425
|
||||
#define __NR_lstat64 426
|
||||
#define __NR_fstat64 427
|
||||
#define __NR_vserver 428
|
||||
#define __NR_mbind 429
|
||||
#define __NR_get_mempolicy 430
|
||||
#define __NR_set_mempolicy 431
|
||||
#define __NR_mq_open 432
|
||||
#define __NR_mq_unlink 433
|
||||
#define __NR_mq_timedsend 434
|
||||
#define __NR_mq_timedreceive 435
|
||||
#define __NR_mq_notify 436
|
||||
#define __NR_mq_getsetattr 437
|
||||
#define __NR_waitid 438
|
||||
#define __NR_add_key 439
|
||||
#define __NR_request_key 440
|
||||
#define __NR_keyctl 441
|
||||
#define __NR_ioprio_set 442
|
||||
#define __NR_ioprio_get 443
|
||||
#define __NR_inotify_init 444
|
||||
#define __NR_inotify_add_watch 445
|
||||
#define __NR_inotify_rm_watch 446
|
||||
#define __NR_fdatasync 447
|
||||
#define __NR_kexec_load 448
|
||||
#define __NR_migrate_pages 449
|
||||
#define __NR_openat 450
|
||||
#define __NR_mkdirat 451
|
||||
#define __NR_mknodat 452
|
||||
#define __NR_fchownat 453
|
||||
#define __NR_futimesat 454
|
||||
#define __NR_fstatat64 455
|
||||
#define __NR_unlinkat 456
|
||||
#define __NR_renameat 457
|
||||
#define __NR_linkat 458
|
||||
#define __NR_symlinkat 459
|
||||
#define __NR_readlinkat 460
|
||||
#define __NR_fchmodat 461
|
||||
#define __NR_faccessat 462
|
||||
#define __NR_pselect6 463
|
||||
#define __NR_ppoll 464
|
||||
#define __NR_unshare 465
|
||||
#define __NR_set_robust_list 466
|
||||
#define __NR_get_robust_list 467
|
||||
#define __NR_splice 468
|
||||
#define __NR_sync_file_range 469
|
||||
#define __NR_tee 470
|
||||
#define __NR_vmsplice 471
|
||||
#define __NR_move_pages 472
|
||||
#define __NR_getcpu 473
|
||||
#define __NR_epoll_pwait 474
|
||||
#define __NR_utimensat 475
|
||||
#define __NR_signalfd 476
|
||||
#define __NR_timerfd 477
|
||||
#define __NR_eventfd 478
|
||||
#define __NR_recvmmsg 479
|
||||
#define __NR_fallocate 480
|
||||
#define __NR_timerfd_create 481
|
||||
#define __NR_timerfd_settime 482
|
||||
#define __NR_timerfd_gettime 483
|
||||
#define __NR_signalfd4 484
|
||||
#define __NR_eventfd2 485
|
||||
#define __NR_epoll_create1 486
|
||||
#define __NR_dup3 487
|
||||
#define __NR_pipe2 488
|
||||
#define __NR_inotify_init1 489
|
||||
#define __NR_preadv 490
|
||||
#define __NR_pwritev 491
|
||||
#define __NR_rt_tgsigqueueinfo 492
|
||||
#define __NR_perf_event_open 493
|
||||
#define __NR_fanotify_init 494
|
||||
#define __NR_fanotify_mark 495
|
||||
#define __NR_prlimit64 496
|
||||
#define __NR_name_to_handle_at 497
|
||||
#define __NR_open_by_handle_at 498
|
||||
#define __NR_clock_adjtime 499
|
||||
#define __NR_syncfs 500
|
||||
#define __NR_setns 501
|
||||
#define __NR_accept4 502
|
||||
#define __NR_sendmmsg 503
|
||||
#define __NR_process_vm_readv 504
|
||||
#define __NR_process_vm_writev 505
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#define NR_SYSCALLS 506
|
||||
|
||||
@ -481,7 +15,6 @@
|
||||
#define __ARCH_WANT_SYS_OLDUMOUNT
|
||||
#define __ARCH_WANT_SYS_SIGPENDING
|
||||
#define __ARCH_WANT_SYS_RT_SIGSUSPEND
|
||||
#define __ARCH_WANT_SYS_EXECVE
|
||||
#define __ARCH_WANT_SYS_FORK
|
||||
#define __ARCH_WANT_SYS_VFORK
|
||||
#define __ARCH_WANT_SYS_CLONE
|
||||
@ -498,5 +31,4 @@
|
||||
|
||||
#define cond_syscall(x) asm(".weak\t" #x "\n" #x " = sys_ni_syscall")
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _ALPHA_UNISTD_H */
|
||||
|
@ -1,3 +1,43 @@
|
||||
# UAPI Header export list
|
||||
include include/uapi/asm-generic/Kbuild.asm
|
||||
|
||||
header-y += a.out.h
|
||||
header-y += auxvec.h
|
||||
header-y += bitsperlong.h
|
||||
header-y += byteorder.h
|
||||
header-y += compiler.h
|
||||
header-y += console.h
|
||||
header-y += errno.h
|
||||
header-y += fcntl.h
|
||||
header-y += fpu.h
|
||||
header-y += gentrap.h
|
||||
header-y += ioctl.h
|
||||
header-y += ioctls.h
|
||||
header-y += ipcbuf.h
|
||||
header-y += kvm_para.h
|
||||
header-y += mman.h
|
||||
header-y += msgbuf.h
|
||||
header-y += pal.h
|
||||
header-y += param.h
|
||||
header-y += poll.h
|
||||
header-y += posix_types.h
|
||||
header-y += ptrace.h
|
||||
header-y += reg.h
|
||||
header-y += regdef.h
|
||||
header-y += resource.h
|
||||
header-y += sembuf.h
|
||||
header-y += setup.h
|
||||
header-y += shmbuf.h
|
||||
header-y += sigcontext.h
|
||||
header-y += siginfo.h
|
||||
header-y += signal.h
|
||||
header-y += socket.h
|
||||
header-y += sockios.h
|
||||
header-y += stat.h
|
||||
header-y += statfs.h
|
||||
header-y += swab.h
|
||||
header-y += sysinfo.h
|
||||
header-y += termbits.h
|
||||
header-y += termios.h
|
||||
header-y += types.h
|
||||
header-y += unistd.h
|
||||
|
91
arch/alpha/include/uapi/asm/a.out.h
Normal file
91
arch/alpha/include/uapi/asm/a.out.h
Normal file
@ -0,0 +1,91 @@
|
||||
#ifndef _UAPI__ALPHA_A_OUT_H__
|
||||
#define _UAPI__ALPHA_A_OUT_H__
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
/*
|
||||
* OSF/1 ECOFF header structs. ECOFF files consist of:
|
||||
* - a file header (struct filehdr),
|
||||
* - an a.out header (struct aouthdr),
|
||||
* - one or more section headers (struct scnhdr).
|
||||
* The filhdr's "f_nscns" field contains the
|
||||
* number of section headers.
|
||||
*/
|
||||
|
||||
struct filehdr
|
||||
{
|
||||
/* OSF/1 "file" header */
|
||||
__u16 f_magic, f_nscns;
|
||||
__u32 f_timdat;
|
||||
__u64 f_symptr;
|
||||
__u32 f_nsyms;
|
||||
__u16 f_opthdr, f_flags;
|
||||
};
|
||||
|
||||
struct aouthdr
|
||||
{
|
||||
__u64 info; /* after that it looks quite normal.. */
|
||||
__u64 tsize;
|
||||
__u64 dsize;
|
||||
__u64 bsize;
|
||||
__u64 entry;
|
||||
__u64 text_start; /* with a few additions that actually make sense */
|
||||
__u64 data_start;
|
||||
__u64 bss_start;
|
||||
__u32 gprmask, fprmask; /* bitmask of general & floating point regs used in binary */
|
||||
__u64 gpvalue;
|
||||
};
|
||||
|
||||
struct scnhdr
|
||||
{
|
||||
char s_name[8];
|
||||
__u64 s_paddr;
|
||||
__u64 s_vaddr;
|
||||
__u64 s_size;
|
||||
__u64 s_scnptr;
|
||||
__u64 s_relptr;
|
||||
__u64 s_lnnoptr;
|
||||
__u16 s_nreloc;
|
||||
__u16 s_nlnno;
|
||||
__u32 s_flags;
|
||||
};
|
||||
|
||||
struct exec
|
||||
{
|
||||
/* OSF/1 "file" header */
|
||||
struct filehdr fh;
|
||||
struct aouthdr ah;
|
||||
};
|
||||
|
||||
/*
|
||||
* Define's so that the kernel exec code can access the a.out header
|
||||
* fields...
|
||||
*/
|
||||
#define a_info ah.info
|
||||
#define a_text ah.tsize
|
||||
#define a_data ah.dsize
|
||||
#define a_bss ah.bsize
|
||||
#define a_entry ah.entry
|
||||
#define a_textstart ah.text_start
|
||||
#define a_datastart ah.data_start
|
||||
#define a_bssstart ah.bss_start
|
||||
#define a_gprmask ah.gprmask
|
||||
#define a_fprmask ah.fprmask
|
||||
#define a_gpvalue ah.gpvalue
|
||||
|
||||
#define N_TXTADDR(x) ((x).a_textstart)
|
||||
#define N_DATADDR(x) ((x).a_datastart)
|
||||
#define N_BSSADDR(x) ((x).a_bssstart)
|
||||
#define N_DRSIZE(x) 0
|
||||
#define N_TRSIZE(x) 0
|
||||
#define N_SYMSIZE(x) 0
|
||||
|
||||
#define AOUTHSZ sizeof(struct aouthdr)
|
||||
#define SCNHSZ sizeof(struct scnhdr)
|
||||
#define SCNROUND 16
|
||||
|
||||
#define N_TXTOFF(x) \
|
||||
((long) N_MAGIC(x) == ZMAGIC ? 0 : \
|
||||
(sizeof(struct exec) + (x).fh.f_nscns*SCNHSZ + SCNROUND - 1) & ~(SCNROUND - 1))
|
||||
|
||||
#endif /* _UAPI__ALPHA_A_OUT_H__ */
|
117
arch/alpha/include/uapi/asm/compiler.h
Normal file
117
arch/alpha/include/uapi/asm/compiler.h
Normal file
@ -0,0 +1,117 @@
|
||||
#ifndef _UAPI__ALPHA_COMPILER_H
|
||||
#define _UAPI__ALPHA_COMPILER_H
|
||||
|
||||
/*
|
||||
* Herein are macros we use when describing various patterns we want to GCC.
|
||||
* In all cases we can get better schedules out of the compiler if we hide
|
||||
* as little as possible inside inline assembly. However, we want to be
|
||||
* able to know what we'll get out before giving up inline assembly. Thus
|
||||
* these tests and macros.
|
||||
*/
|
||||
|
||||
#if __GNUC__ == 3 && __GNUC_MINOR__ >= 4 || __GNUC__ > 3
|
||||
# define __kernel_insbl(val, shift) __builtin_alpha_insbl(val, shift)
|
||||
# define __kernel_inswl(val, shift) __builtin_alpha_inswl(val, shift)
|
||||
# define __kernel_insql(val, shift) __builtin_alpha_insql(val, shift)
|
||||
# define __kernel_inslh(val, shift) __builtin_alpha_inslh(val, shift)
|
||||
# define __kernel_extbl(val, shift) __builtin_alpha_extbl(val, shift)
|
||||
# define __kernel_extwl(val, shift) __builtin_alpha_extwl(val, shift)
|
||||
# define __kernel_cmpbge(a, b) __builtin_alpha_cmpbge(a, b)
|
||||
#else
|
||||
# define __kernel_insbl(val, shift) \
|
||||
({ unsigned long __kir; \
|
||||
__asm__("insbl %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \
|
||||
__kir; })
|
||||
# define __kernel_inswl(val, shift) \
|
||||
({ unsigned long __kir; \
|
||||
__asm__("inswl %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \
|
||||
__kir; })
|
||||
# define __kernel_insql(val, shift) \
|
||||
({ unsigned long __kir; \
|
||||
__asm__("insql %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \
|
||||
__kir; })
|
||||
# define __kernel_inslh(val, shift) \
|
||||
({ unsigned long __kir; \
|
||||
__asm__("inslh %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \
|
||||
__kir; })
|
||||
# define __kernel_extbl(val, shift) \
|
||||
({ unsigned long __kir; \
|
||||
__asm__("extbl %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \
|
||||
__kir; })
|
||||
# define __kernel_extwl(val, shift) \
|
||||
({ unsigned long __kir; \
|
||||
__asm__("extwl %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \
|
||||
__kir; })
|
||||
# define __kernel_cmpbge(a, b) \
|
||||
({ unsigned long __kir; \
|
||||
__asm__("cmpbge %r2,%1,%0" : "=r"(__kir) : "rI"(b), "rJ"(a)); \
|
||||
__kir; })
|
||||
#endif
|
||||
|
||||
#ifdef __alpha_cix__
|
||||
# if __GNUC__ == 3 && __GNUC_MINOR__ >= 4 || __GNUC__ > 3
|
||||
# define __kernel_cttz(x) __builtin_ctzl(x)
|
||||
# define __kernel_ctlz(x) __builtin_clzl(x)
|
||||
# define __kernel_ctpop(x) __builtin_popcountl(x)
|
||||
# else
|
||||
# define __kernel_cttz(x) \
|
||||
({ unsigned long __kir; \
|
||||
__asm__("cttz %1,%0" : "=r"(__kir) : "r"(x)); \
|
||||
__kir; })
|
||||
# define __kernel_ctlz(x) \
|
||||
({ unsigned long __kir; \
|
||||
__asm__("ctlz %1,%0" : "=r"(__kir) : "r"(x)); \
|
||||
__kir; })
|
||||
# define __kernel_ctpop(x) \
|
||||
({ unsigned long __kir; \
|
||||
__asm__("ctpop %1,%0" : "=r"(__kir) : "r"(x)); \
|
||||
__kir; })
|
||||
# endif
|
||||
#else
|
||||
# define __kernel_cttz(x) \
|
||||
({ unsigned long __kir; \
|
||||
__asm__(".arch ev67; cttz %1,%0" : "=r"(__kir) : "r"(x)); \
|
||||
__kir; })
|
||||
# define __kernel_ctlz(x) \
|
||||
({ unsigned long __kir; \
|
||||
__asm__(".arch ev67; ctlz %1,%0" : "=r"(__kir) : "r"(x)); \
|
||||
__kir; })
|
||||
# define __kernel_ctpop(x) \
|
||||
({ unsigned long __kir; \
|
||||
__asm__(".arch ev67; ctpop %1,%0" : "=r"(__kir) : "r"(x)); \
|
||||
__kir; })
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Beginning with EGCS 1.1, GCC defines __alpha_bwx__ when the BWX
|
||||
* extension is enabled. Previous versions did not define anything
|
||||
* we could test during compilation -- too bad, so sad.
|
||||
*/
|
||||
|
||||
#if defined(__alpha_bwx__)
|
||||
#define __kernel_ldbu(mem) (mem)
|
||||
#define __kernel_ldwu(mem) (mem)
|
||||
#define __kernel_stb(val,mem) ((mem) = (val))
|
||||
#define __kernel_stw(val,mem) ((mem) = (val))
|
||||
#else
|
||||
#define __kernel_ldbu(mem) \
|
||||
({ unsigned char __kir; \
|
||||
__asm__(".arch ev56; \
|
||||
ldbu %0,%1" : "=r"(__kir) : "m"(mem)); \
|
||||
__kir; })
|
||||
#define __kernel_ldwu(mem) \
|
||||
({ unsigned short __kir; \
|
||||
__asm__(".arch ev56; \
|
||||
ldwu %0,%1" : "=r"(__kir) : "m"(mem)); \
|
||||
__kir; })
|
||||
#define __kernel_stb(val,mem) \
|
||||
__asm__(".arch ev56; \
|
||||
stb %1,%0" : "=m"(mem) : "r"(val))
|
||||
#define __kernel_stw(val,mem) \
|
||||
__asm__(".arch ev56; \
|
||||
stw %1,%0" : "=m"(mem) : "r"(val))
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* _UAPI__ALPHA_COMPILER_H */
|
50
arch/alpha/include/uapi/asm/console.h
Normal file
50
arch/alpha/include/uapi/asm/console.h
Normal file
@ -0,0 +1,50 @@
|
||||
#ifndef _UAPI__AXP_CONSOLE_H
|
||||
#define _UAPI__AXP_CONSOLE_H
|
||||
|
||||
/*
|
||||
* Console callback routine numbers
|
||||
*/
|
||||
#define CCB_GETC 0x01
|
||||
#define CCB_PUTS 0x02
|
||||
#define CCB_RESET_TERM 0x03
|
||||
#define CCB_SET_TERM_INT 0x04
|
||||
#define CCB_SET_TERM_CTL 0x05
|
||||
#define CCB_PROCESS_KEYCODE 0x06
|
||||
#define CCB_OPEN_CONSOLE 0x07
|
||||
#define CCB_CLOSE_CONSOLE 0x08
|
||||
|
||||
#define CCB_OPEN 0x10
|
||||
#define CCB_CLOSE 0x11
|
||||
#define CCB_IOCTL 0x12
|
||||
#define CCB_READ 0x13
|
||||
#define CCB_WRITE 0x14
|
||||
|
||||
#define CCB_SET_ENV 0x20
|
||||
#define CCB_RESET_ENV 0x21
|
||||
#define CCB_GET_ENV 0x22
|
||||
#define CCB_SAVE_ENV 0x23
|
||||
|
||||
#define CCB_PSWITCH 0x30
|
||||
#define CCB_BIOS_EMUL 0x32
|
||||
|
||||
/*
|
||||
* Environment variable numbers
|
||||
*/
|
||||
#define ENV_AUTO_ACTION 0x01
|
||||
#define ENV_BOOT_DEV 0x02
|
||||
#define ENV_BOOTDEF_DEV 0x03
|
||||
#define ENV_BOOTED_DEV 0x04
|
||||
#define ENV_BOOT_FILE 0x05
|
||||
#define ENV_BOOTED_FILE 0x06
|
||||
#define ENV_BOOT_OSFLAGS 0x07
|
||||
#define ENV_BOOTED_OSFLAGS 0x08
|
||||
#define ENV_BOOT_RESET 0x09
|
||||
#define ENV_DUMP_DEV 0x0A
|
||||
#define ENV_ENABLE_AUDIT 0x0B
|
||||
#define ENV_LICENSE 0x0C
|
||||
#define ENV_CHAR_SET 0x0D
|
||||
#define ENV_LANGUAGE 0x0E
|
||||
#define ENV_TTY_DEV 0x0F
|
||||
|
||||
|
||||
#endif /* _UAPI__AXP_CONSOLE_H */
|
123
arch/alpha/include/uapi/asm/fpu.h
Normal file
123
arch/alpha/include/uapi/asm/fpu.h
Normal file
@ -0,0 +1,123 @@
|
||||
#ifndef _UAPI__ASM_ALPHA_FPU_H
|
||||
#define _UAPI__ASM_ALPHA_FPU_H
|
||||
|
||||
|
||||
/*
|
||||
* Alpha floating-point control register defines:
|
||||
*/
|
||||
#define FPCR_DNOD (1UL<<47) /* denorm INV trap disable */
|
||||
#define FPCR_DNZ (1UL<<48) /* denorms to zero */
|
||||
#define FPCR_INVD (1UL<<49) /* invalid op disable (opt.) */
|
||||
#define FPCR_DZED (1UL<<50) /* division by zero disable (opt.) */
|
||||
#define FPCR_OVFD (1UL<<51) /* overflow disable (optional) */
|
||||
#define FPCR_INV (1UL<<52) /* invalid operation */
|
||||
#define FPCR_DZE (1UL<<53) /* division by zero */
|
||||
#define FPCR_OVF (1UL<<54) /* overflow */
|
||||
#define FPCR_UNF (1UL<<55) /* underflow */
|
||||
#define FPCR_INE (1UL<<56) /* inexact */
|
||||
#define FPCR_IOV (1UL<<57) /* integer overflow */
|
||||
#define FPCR_UNDZ (1UL<<60) /* underflow to zero (opt.) */
|
||||
#define FPCR_UNFD (1UL<<61) /* underflow disable (opt.) */
|
||||
#define FPCR_INED (1UL<<62) /* inexact disable (opt.) */
|
||||
#define FPCR_SUM (1UL<<63) /* summary bit */
|
||||
|
||||
#define FPCR_DYN_SHIFT 58 /* first dynamic rounding mode bit */
|
||||
#define FPCR_DYN_CHOPPED (0x0UL << FPCR_DYN_SHIFT) /* towards 0 */
|
||||
#define FPCR_DYN_MINUS (0x1UL << FPCR_DYN_SHIFT) /* towards -INF */
|
||||
#define FPCR_DYN_NORMAL (0x2UL << FPCR_DYN_SHIFT) /* towards nearest */
|
||||
#define FPCR_DYN_PLUS (0x3UL << FPCR_DYN_SHIFT) /* towards +INF */
|
||||
#define FPCR_DYN_MASK (0x3UL << FPCR_DYN_SHIFT)
|
||||
|
||||
#define FPCR_MASK 0xffff800000000000L
|
||||
|
||||
/*
|
||||
* IEEE trap enables are implemented in software. These per-thread
|
||||
* bits are stored in the "ieee_state" field of "struct thread_info".
|
||||
* Thus, the bits are defined so as not to conflict with the
|
||||
* floating-point enable bit (which is architected). On top of that,
|
||||
* we want to make these bits compatible with OSF/1 so
|
||||
* ieee_set_fp_control() etc. can be implemented easily and
|
||||
* compatibly. The corresponding definitions are in
|
||||
* /usr/include/machine/fpu.h under OSF/1.
|
||||
*/
|
||||
#define IEEE_TRAP_ENABLE_INV (1UL<<1) /* invalid op */
|
||||
#define IEEE_TRAP_ENABLE_DZE (1UL<<2) /* division by zero */
|
||||
#define IEEE_TRAP_ENABLE_OVF (1UL<<3) /* overflow */
|
||||
#define IEEE_TRAP_ENABLE_UNF (1UL<<4) /* underflow */
|
||||
#define IEEE_TRAP_ENABLE_INE (1UL<<5) /* inexact */
|
||||
#define IEEE_TRAP_ENABLE_DNO (1UL<<6) /* denorm */
|
||||
#define IEEE_TRAP_ENABLE_MASK (IEEE_TRAP_ENABLE_INV | IEEE_TRAP_ENABLE_DZE |\
|
||||
IEEE_TRAP_ENABLE_OVF | IEEE_TRAP_ENABLE_UNF |\
|
||||
IEEE_TRAP_ENABLE_INE | IEEE_TRAP_ENABLE_DNO)
|
||||
|
||||
/* Denorm and Underflow flushing */
|
||||
#define IEEE_MAP_DMZ (1UL<<12) /* Map denorm inputs to zero */
|
||||
#define IEEE_MAP_UMZ (1UL<<13) /* Map underflowed outputs to zero */
|
||||
|
||||
#define IEEE_MAP_MASK (IEEE_MAP_DMZ | IEEE_MAP_UMZ)
|
||||
|
||||
/* status bits coming from fpcr: */
|
||||
#define IEEE_STATUS_INV (1UL<<17)
|
||||
#define IEEE_STATUS_DZE (1UL<<18)
|
||||
#define IEEE_STATUS_OVF (1UL<<19)
|
||||
#define IEEE_STATUS_UNF (1UL<<20)
|
||||
#define IEEE_STATUS_INE (1UL<<21)
|
||||
#define IEEE_STATUS_DNO (1UL<<22)
|
||||
|
||||
#define IEEE_STATUS_MASK (IEEE_STATUS_INV | IEEE_STATUS_DZE | \
|
||||
IEEE_STATUS_OVF | IEEE_STATUS_UNF | \
|
||||
IEEE_STATUS_INE | IEEE_STATUS_DNO)
|
||||
|
||||
#define IEEE_SW_MASK (IEEE_TRAP_ENABLE_MASK | \
|
||||
IEEE_STATUS_MASK | IEEE_MAP_MASK)
|
||||
|
||||
#define IEEE_CURRENT_RM_SHIFT 32
|
||||
#define IEEE_CURRENT_RM_MASK (3UL<<IEEE_CURRENT_RM_SHIFT)
|
||||
|
||||
#define IEEE_STATUS_TO_EXCSUM_SHIFT 16
|
||||
|
||||
#define IEEE_INHERIT (1UL<<63) /* inherit on thread create? */
|
||||
|
||||
/*
|
||||
* Convert the software IEEE trap enable and status bits into the
|
||||
* hardware fpcr format.
|
||||
*
|
||||
* Digital Unix engineers receive my thanks for not defining the
|
||||
* software bits identical to the hardware bits. The chip designers
|
||||
* receive my thanks for making all the not-implemented fpcr bits
|
||||
* RAZ forcing us to use system calls to read/write this value.
|
||||
*/
|
||||
|
||||
static inline unsigned long
|
||||
ieee_swcr_to_fpcr(unsigned long sw)
|
||||
{
|
||||
unsigned long fp;
|
||||
fp = (sw & IEEE_STATUS_MASK) << 35;
|
||||
fp |= (sw & IEEE_MAP_DMZ) << 36;
|
||||
fp |= (sw & IEEE_STATUS_MASK ? FPCR_SUM : 0);
|
||||
fp |= (~sw & (IEEE_TRAP_ENABLE_INV
|
||||
| IEEE_TRAP_ENABLE_DZE
|
||||
| IEEE_TRAP_ENABLE_OVF)) << 48;
|
||||
fp |= (~sw & (IEEE_TRAP_ENABLE_UNF | IEEE_TRAP_ENABLE_INE)) << 57;
|
||||
fp |= (sw & IEEE_MAP_UMZ ? FPCR_UNDZ | FPCR_UNFD : 0);
|
||||
fp |= (~sw & IEEE_TRAP_ENABLE_DNO) << 41;
|
||||
return fp;
|
||||
}
|
||||
|
||||
static inline unsigned long
|
||||
ieee_fpcr_to_swcr(unsigned long fp)
|
||||
{
|
||||
unsigned long sw;
|
||||
sw = (fp >> 35) & IEEE_STATUS_MASK;
|
||||
sw |= (fp >> 36) & IEEE_MAP_DMZ;
|
||||
sw |= (~fp >> 48) & (IEEE_TRAP_ENABLE_INV
|
||||
| IEEE_TRAP_ENABLE_DZE
|
||||
| IEEE_TRAP_ENABLE_OVF);
|
||||
sw |= (~fp >> 57) & (IEEE_TRAP_ENABLE_UNF | IEEE_TRAP_ENABLE_INE);
|
||||
sw |= (fp >> 47) & IEEE_MAP_UMZ;
|
||||
sw |= (~fp >> 41) & IEEE_TRAP_ENABLE_DNO;
|
||||
return sw;
|
||||
}
|
||||
|
||||
|
||||
#endif /* _UAPI__ASM_ALPHA_FPU_H */
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user