Merge branch 'linus' into irq/numa
Conflicts: arch/mips/sibyte/bcm1480/irq.c arch/mips/sibyte/sb1250/irq.c Merge reason: we gathered a few conflicts plus update to latest upstream fixes. Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Коммит
3d58f48ba0
|
@ -0,0 +1,479 @@
|
|||
What: /sys/kernel/slab
|
||||
Date: May 2007
|
||||
KernelVersion: 2.6.22
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The /sys/kernel/slab directory contains a snapshot of the
|
||||
internal state of the SLUB allocator for each cache. Certain
|
||||
files may be modified to change the behavior of the cache (and
|
||||
any cache it aliases, if any).
|
||||
Users: kernel memory tuning tools
|
||||
|
||||
What: /sys/kernel/slab/cache/aliases
|
||||
Date: May 2007
|
||||
KernelVersion: 2.6.22
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The aliases file is read-only and specifies how many caches
|
||||
have merged into this cache.
|
||||
|
||||
What: /sys/kernel/slab/cache/align
|
||||
Date: May 2007
|
||||
KernelVersion: 2.6.22
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The align file is read-only and specifies the cache's object
|
||||
alignment in bytes.
|
||||
|
||||
What: /sys/kernel/slab/cache/alloc_calls
|
||||
Date: May 2007
|
||||
KernelVersion: 2.6.22
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The alloc_calls file is read-only and lists the kernel code
|
||||
locations from which allocations for this cache were performed.
|
||||
The alloc_calls file only contains information if debugging is
|
||||
enabled for that cache (see Documentation/vm/slub.txt).
|
||||
|
||||
What: /sys/kernel/slab/cache/alloc_fastpath
|
||||
Date: February 2008
|
||||
KernelVersion: 2.6.25
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The alloc_fastpath file is read-only and specifies how many
|
||||
objects have been allocated using the fast path.
|
||||
Available when CONFIG_SLUB_STATS is enabled.
|
||||
|
||||
What: /sys/kernel/slab/cache/alloc_from_partial
|
||||
Date: February 2008
|
||||
KernelVersion: 2.6.25
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The alloc_from_partial file is read-only and specifies how
|
||||
many times a cpu slab has been full and it has been refilled
|
||||
by using a slab from the list of partially used slabs.
|
||||
Available when CONFIG_SLUB_STATS is enabled.
|
||||
|
||||
What: /sys/kernel/slab/cache/alloc_refill
|
||||
Date: February 2008
|
||||
KernelVersion: 2.6.25
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The alloc_refill file is read-only and specifies how many
|
||||
times the per-cpu freelist was empty but there were objects
|
||||
available as the result of remote cpu frees.
|
||||
Available when CONFIG_SLUB_STATS is enabled.
|
||||
|
||||
What: /sys/kernel/slab/cache/alloc_slab
|
||||
Date: February 2008
|
||||
KernelVersion: 2.6.25
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The alloc_slab file is read-only and specifies how many times
|
||||
a new slab had to be allocated from the page allocator.
|
||||
Available when CONFIG_SLUB_STATS is enabled.
|
||||
|
||||
What: /sys/kernel/slab/cache/alloc_slowpath
|
||||
Date: February 2008
|
||||
KernelVersion: 2.6.25
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The alloc_slowpath file is read-only and specifies how many
|
||||
objects have been allocated using the slow path because of a
|
||||
refill or allocation from a partial or new slab.
|
||||
Available when CONFIG_SLUB_STATS is enabled.
|
||||
|
||||
What: /sys/kernel/slab/cache/cache_dma
|
||||
Date: May 2007
|
||||
KernelVersion: 2.6.22
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The cache_dma file is read-only and specifies whether objects
|
||||
are from ZONE_DMA.
|
||||
Available when CONFIG_ZONE_DMA is enabled.
|
||||
|
||||
What: /sys/kernel/slab/cache/cpu_slabs
|
||||
Date: May 2007
|
||||
KernelVersion: 2.6.22
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The cpu_slabs file is read-only and displays how many cpu slabs
|
||||
are active and their NUMA locality.
|
||||
|
||||
What: /sys/kernel/slab/cache/cpuslab_flush
|
||||
Date: April 2009
|
||||
KernelVersion: 2.6.31
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The file cpuslab_flush is read-only and specifies how many
|
||||
times a cache's cpu slabs have been flushed as the result of
|
||||
destroying or shrinking a cache, a cpu going offline, or as
|
||||
the result of forcing an allocation from a certain node.
|
||||
Available when CONFIG_SLUB_STATS is enabled.
|
||||
|
||||
What: /sys/kernel/slab/cache/ctor
|
||||
Date: May 2007
|
||||
KernelVersion: 2.6.22
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The ctor file is read-only and specifies the cache's object
|
||||
constructor function, which is invoked for each object when a
|
||||
new slab is allocated.
|
||||
|
||||
What: /sys/kernel/slab/cache/deactivate_empty
|
||||
Date: February 2008
|
||||
KernelVersion: 2.6.25
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The file deactivate_empty is read-only and specifies how many
|
||||
times an empty cpu slab was deactivated.
|
||||
Available when CONFIG_SLUB_STATS is enabled.
|
||||
|
||||
What: /sys/kernel/slab/cache/deactivate_full
|
||||
Date: February 2008
|
||||
KernelVersion: 2.6.25
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The file deactivate_full is read-only and specifies how many
|
||||
times a full cpu slab was deactivated.
|
||||
Available when CONFIG_SLUB_STATS is enabled.
|
||||
|
||||
What: /sys/kernel/slab/cache/deactivate_remote_frees
|
||||
Date: February 2008
|
||||
KernelVersion: 2.6.25
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The file deactivate_remote_frees is read-only and specifies how
|
||||
many times a cpu slab has been deactivated and contained free
|
||||
objects that were freed remotely.
|
||||
Available when CONFIG_SLUB_STATS is enabled.
|
||||
|
||||
What: /sys/kernel/slab/cache/deactivate_to_head
|
||||
Date: February 2008
|
||||
KernelVersion: 2.6.25
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The file deactivate_to_head is read-only and specifies how
|
||||
many times a partial cpu slab was deactivated and added to the
|
||||
head of its node's partial list.
|
||||
Available when CONFIG_SLUB_STATS is enabled.
|
||||
|
||||
What: /sys/kernel/slab/cache/deactivate_to_tail
|
||||
Date: February 2008
|
||||
KernelVersion: 2.6.25
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The file deactivate_to_tail is read-only and specifies how
|
||||
many times a partial cpu slab was deactivated and added to the
|
||||
tail of its node's partial list.
|
||||
Available when CONFIG_SLUB_STATS is enabled.
|
||||
|
||||
What: /sys/kernel/slab/cache/destroy_by_rcu
|
||||
Date: May 2007
|
||||
KernelVersion: 2.6.22
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The destroy_by_rcu file is read-only and specifies whether
|
||||
slabs (not objects) are freed by rcu.
|
||||
|
||||
What: /sys/kernel/slab/cache/free_add_partial
|
||||
Date: February 2008
|
||||
KernelVersion: 2.6.25
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The file free_add_partial is read-only and specifies how many
|
||||
times an object has been freed in a full slab so that it had to
|
||||
added to its node's partial list.
|
||||
Available when CONFIG_SLUB_STATS is enabled.
|
||||
|
||||
What: /sys/kernel/slab/cache/free_calls
|
||||
Date: May 2007
|
||||
KernelVersion: 2.6.22
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The free_calls file is read-only and lists the locations of
|
||||
object frees if slab debugging is enabled (see
|
||||
Documentation/vm/slub.txt).
|
||||
|
||||
What: /sys/kernel/slab/cache/free_fastpath
|
||||
Date: February 2008
|
||||
KernelVersion: 2.6.25
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The free_fastpath file is read-only and specifies how many
|
||||
objects have been freed using the fast path because it was an
|
||||
object from the cpu slab.
|
||||
Available when CONFIG_SLUB_STATS is enabled.
|
||||
|
||||
What: /sys/kernel/slab/cache/free_frozen
|
||||
Date: February 2008
|
||||
KernelVersion: 2.6.25
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The free_frozen file is read-only and specifies how many
|
||||
objects have been freed to a frozen slab (i.e. a remote cpu
|
||||
slab).
|
||||
Available when CONFIG_SLUB_STATS is enabled.
|
||||
|
||||
What: /sys/kernel/slab/cache/free_remove_partial
|
||||
Date: February 2008
|
||||
KernelVersion: 2.6.25
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The file free_remove_partial is read-only and specifies how
|
||||
many times an object has been freed to a now-empty slab so
|
||||
that it had to be removed from its node's partial list.
|
||||
Available when CONFIG_SLUB_STATS is enabled.
|
||||
|
||||
What: /sys/kernel/slab/cache/free_slab
|
||||
Date: February 2008
|
||||
KernelVersion: 2.6.25
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The free_slab file is read-only and specifies how many times an
|
||||
empty slab has been freed back to the page allocator.
|
||||
Available when CONFIG_SLUB_STATS is enabled.
|
||||
|
||||
What: /sys/kernel/slab/cache/free_slowpath
|
||||
Date: February 2008
|
||||
KernelVersion: 2.6.25
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The free_slowpath file is read-only and specifies how many
|
||||
objects have been freed using the slow path (i.e. to a full or
|
||||
partial slab).
|
||||
Available when CONFIG_SLUB_STATS is enabled.
|
||||
|
||||
What: /sys/kernel/slab/cache/hwcache_align
|
||||
Date: May 2007
|
||||
KernelVersion: 2.6.22
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The hwcache_align file is read-only and specifies whether
|
||||
objects are aligned on cachelines.
|
||||
|
||||
What: /sys/kernel/slab/cache/min_partial
|
||||
Date: February 2009
|
||||
KernelVersion: 2.6.30
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
David Rientjes <rientjes@google.com>
|
||||
Description:
|
||||
The min_partial file specifies how many empty slabs shall
|
||||
remain on a node's partial list to avoid the overhead of
|
||||
allocating new slabs. Such slabs may be reclaimed by utilizing
|
||||
the shrink file.
|
||||
|
||||
What: /sys/kernel/slab/cache/object_size
|
||||
Date: May 2007
|
||||
KernelVersion: 2.6.22
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The object_size file is read-only and specifies the cache's
|
||||
object size.
|
||||
|
||||
What: /sys/kernel/slab/cache/objects
|
||||
Date: May 2007
|
||||
KernelVersion: 2.6.22
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The objects file is read-only and displays how many objects are
|
||||
active and from which nodes they are from.
|
||||
|
||||
What: /sys/kernel/slab/cache/objects_partial
|
||||
Date: April 2008
|
||||
KernelVersion: 2.6.26
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The objects_partial file is read-only and displays how many
|
||||
objects are on partial slabs and from which nodes they are
|
||||
from.
|
||||
|
||||
What: /sys/kernel/slab/cache/objs_per_slab
|
||||
Date: May 2007
|
||||
KernelVersion: 2.6.22
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The file objs_per_slab is read-only and specifies how many
|
||||
objects may be allocated from a single slab of the order
|
||||
specified in /sys/kernel/slab/cache/order.
|
||||
|
||||
What: /sys/kernel/slab/cache/order
|
||||
Date: May 2007
|
||||
KernelVersion: 2.6.22
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The order file specifies the page order at which new slabs are
|
||||
allocated. It is writable and can be changed to increase the
|
||||
number of objects per slab. If a slab cannot be allocated
|
||||
because of fragmentation, SLUB will retry with the minimum order
|
||||
possible depending on its characteristics.
|
||||
|
||||
What: /sys/kernel/slab/cache/order_fallback
|
||||
Date: April 2008
|
||||
KernelVersion: 2.6.26
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The file order_fallback is read-only and specifies how many
|
||||
times an allocation of a new slab has not been possible at the
|
||||
cache's order and instead fallen back to its minimum possible
|
||||
order.
|
||||
Available when CONFIG_SLUB_STATS is enabled.
|
||||
|
||||
What: /sys/kernel/slab/cache/partial
|
||||
Date: May 2007
|
||||
KernelVersion: 2.6.22
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The partial file is read-only and displays how long many
|
||||
partial slabs there are and how long each node's list is.
|
||||
|
||||
What: /sys/kernel/slab/cache/poison
|
||||
Date: May 2007
|
||||
KernelVersion: 2.6.22
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The poison file specifies whether objects should be poisoned
|
||||
when a new slab is allocated.
|
||||
|
||||
What: /sys/kernel/slab/cache/reclaim_account
|
||||
Date: May 2007
|
||||
KernelVersion: 2.6.22
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The reclaim_account file specifies whether the cache's objects
|
||||
are reclaimable (and grouped by their mobility).
|
||||
|
||||
What: /sys/kernel/slab/cache/red_zone
|
||||
Date: May 2007
|
||||
KernelVersion: 2.6.22
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The red_zone file specifies whether the cache's objects are red
|
||||
zoned.
|
||||
|
||||
What: /sys/kernel/slab/cache/remote_node_defrag_ratio
|
||||
Date: January 2008
|
||||
KernelVersion: 2.6.25
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The file remote_node_defrag_ratio specifies the percentage of
|
||||
times SLUB will attempt to refill the cpu slab with a partial
|
||||
slab from a remote node as opposed to allocating a new slab on
|
||||
the local node. This reduces the amount of wasted memory over
|
||||
the entire system but can be expensive.
|
||||
Available when CONFIG_NUMA is enabled.
|
||||
|
||||
What: /sys/kernel/slab/cache/sanity_checks
|
||||
Date: May 2007
|
||||
KernelVersion: 2.6.22
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The sanity_checks file specifies whether expensive checks
|
||||
should be performed on free and, at minimum, enables double free
|
||||
checks. Caches that enable sanity_checks cannot be merged with
|
||||
caches that do not.
|
||||
|
||||
What: /sys/kernel/slab/cache/shrink
|
||||
Date: May 2007
|
||||
KernelVersion: 2.6.22
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The shrink file is written when memory should be reclaimed from
|
||||
a cache. Empty partial slabs are freed and the partial list is
|
||||
sorted so the slabs with the fewest available objects are used
|
||||
first.
|
||||
|
||||
What: /sys/kernel/slab/cache/slab_size
|
||||
Date: May 2007
|
||||
KernelVersion: 2.6.22
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The slab_size file is read-only and specifies the object size
|
||||
with metadata (debugging information and alignment) in bytes.
|
||||
|
||||
What: /sys/kernel/slab/cache/slabs
|
||||
Date: May 2007
|
||||
KernelVersion: 2.6.22
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The slabs file is read-only and displays how long many slabs
|
||||
there are (both cpu and partial) and from which nodes they are
|
||||
from.
|
||||
|
||||
What: /sys/kernel/slab/cache/store_user
|
||||
Date: May 2007
|
||||
KernelVersion: 2.6.22
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The store_user file specifies whether the location of
|
||||
allocation or free should be tracked for a cache.
|
||||
|
||||
What: /sys/kernel/slab/cache/total_objects
|
||||
Date: April 2008
|
||||
KernelVersion: 2.6.26
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The total_objects file is read-only and displays how many total
|
||||
objects a cache has and from which nodes they are from.
|
||||
|
||||
What: /sys/kernel/slab/cache/trace
|
||||
Date: May 2007
|
||||
KernelVersion: 2.6.22
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The trace file specifies whether object allocations and frees
|
||||
should be traced.
|
||||
|
||||
What: /sys/kernel/slab/cache/validate
|
||||
Date: May 2007
|
||||
KernelVersion: 2.6.22
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
Writing to the validate file causes SLUB to traverse all of its
|
||||
cache's objects and check the validity of metadata.
|
|
@ -281,7 +281,7 @@
|
|||
seriously wrong while debugging, it will most often be the case
|
||||
that you want to enable gdb to be verbose about its target
|
||||
communications. You do this prior to issuing the <constant>target
|
||||
remote</constant> command by typing in: <constant>set remote debug 1</constant>
|
||||
remote</constant> command by typing in: <constant>set debug remote 1</constant>
|
||||
</para>
|
||||
</chapter>
|
||||
<chapter id="KGDBTestSuite">
|
||||
|
|
|
@ -133,4 +133,4 @@ RAM/SWAP in 10240 inodes and it is only accessible by root.
|
|||
Author:
|
||||
Christoph Rohland <cr@sap.com>, 1.12.01
|
||||
Updated:
|
||||
Hugh Dickins <hugh@veritas.com>, 4 June 2007
|
||||
Hugh Dickins, 4 June 2007
|
||||
|
|
|
@ -150,6 +150,11 @@ fan[1-*]_min Fan minimum value
|
|||
Unit: revolution/min (RPM)
|
||||
RW
|
||||
|
||||
fan[1-*]_max Fan maximum value
|
||||
Unit: revolution/min (RPM)
|
||||
Only rarely supported by the hardware.
|
||||
RW
|
||||
|
||||
fan[1-*]_input Fan input value.
|
||||
Unit: revolution/min (RPM)
|
||||
RO
|
||||
|
@ -390,6 +395,7 @@ OR
|
|||
in[0-*]_min_alarm
|
||||
in[0-*]_max_alarm
|
||||
fan[1-*]_min_alarm
|
||||
fan[1-*]_max_alarm
|
||||
temp[1-*]_min_alarm
|
||||
temp[1-*]_max_alarm
|
||||
temp[1-*]_crit_alarm
|
||||
|
|
|
@ -18,8 +18,12 @@ Usage
|
|||
Anonymous finger details are sent sequentially as separate packets of ABS
|
||||
events. Only the ABS_MT events are recognized as part of a finger
|
||||
packet. The end of a packet is marked by calling the input_mt_sync()
|
||||
function, which generates a SYN_MT_REPORT event. The end of multi-touch
|
||||
transfer is marked by calling the usual input_sync() function.
|
||||
function, which generates a SYN_MT_REPORT event. This instructs the
|
||||
receiver to accept the data for the current finger and prepare to receive
|
||||
another. The end of a multi-touch transfer is marked by calling the usual
|
||||
input_sync() function. This instructs the receiver to act upon events
|
||||
accumulated since last EV_SYN/SYN_REPORT and prepare to receive a new
|
||||
set of events/packets.
|
||||
|
||||
A set of ABS_MT events with the desired properties is defined. The events
|
||||
are divided into categories, to allow for partial implementation. The
|
||||
|
@ -27,11 +31,26 @@ minimum set consists of ABS_MT_TOUCH_MAJOR, ABS_MT_POSITION_X and
|
|||
ABS_MT_POSITION_Y, which allows for multiple fingers to be tracked. If the
|
||||
device supports it, the ABS_MT_WIDTH_MAJOR may be used to provide the size
|
||||
of the approaching finger. Anisotropy and direction may be specified with
|
||||
ABS_MT_TOUCH_MINOR, ABS_MT_WIDTH_MINOR and ABS_MT_ORIENTATION. Devices with
|
||||
more granular information may specify general shapes as blobs, i.e., as a
|
||||
sequence of rectangular shapes grouped together by an
|
||||
ABS_MT_BLOB_ID. Finally, the ABS_MT_TOOL_TYPE may be used to specify
|
||||
whether the touching tool is a finger or a pen or something else.
|
||||
ABS_MT_TOUCH_MINOR, ABS_MT_WIDTH_MINOR and ABS_MT_ORIENTATION. The
|
||||
ABS_MT_TOOL_TYPE may be used to specify whether the touching tool is a
|
||||
finger or a pen or something else. Devices with more granular information
|
||||
may specify general shapes as blobs, i.e., as a sequence of rectangular
|
||||
shapes grouped together by an ABS_MT_BLOB_ID. Finally, for the few devices
|
||||
that currently support it, the ABS_MT_TRACKING_ID event may be used to
|
||||
report finger tracking from hardware [5].
|
||||
|
||||
Here is what a minimal event sequence for a two-finger touch would look
|
||||
like:
|
||||
|
||||
ABS_MT_TOUCH_MAJOR
|
||||
ABS_MT_POSITION_X
|
||||
ABS_MT_POSITION_Y
|
||||
SYN_MT_REPORT
|
||||
ABS_MT_TOUCH_MAJOR
|
||||
ABS_MT_POSITION_X
|
||||
ABS_MT_POSITION_Y
|
||||
SYN_MT_REPORT
|
||||
SYN_REPORT
|
||||
|
||||
|
||||
Event Semantics
|
||||
|
@ -44,24 +63,24 @@ ABS_MT_TOUCH_MAJOR
|
|||
|
||||
The length of the major axis of the contact. The length should be given in
|
||||
surface units. If the surface has an X times Y resolution, the largest
|
||||
possible value of ABS_MT_TOUCH_MAJOR is sqrt(X^2 + Y^2), the diagonal.
|
||||
possible value of ABS_MT_TOUCH_MAJOR is sqrt(X^2 + Y^2), the diagonal [4].
|
||||
|
||||
ABS_MT_TOUCH_MINOR
|
||||
|
||||
The length, in surface units, of the minor axis of the contact. If the
|
||||
contact is circular, this event can be omitted.
|
||||
contact is circular, this event can be omitted [4].
|
||||
|
||||
ABS_MT_WIDTH_MAJOR
|
||||
|
||||
The length, in surface units, of the major axis of the approaching
|
||||
tool. This should be understood as the size of the tool itself. The
|
||||
orientation of the contact and the approaching tool are assumed to be the
|
||||
same.
|
||||
same [4].
|
||||
|
||||
ABS_MT_WIDTH_MINOR
|
||||
|
||||
The length, in surface units, of the minor axis of the approaching
|
||||
tool. Omit if circular.
|
||||
tool. Omit if circular [4].
|
||||
|
||||
The above four values can be used to derive additional information about
|
||||
the contact. The ratio ABS_MT_TOUCH_MAJOR / ABS_MT_WIDTH_MAJOR approximates
|
||||
|
@ -70,14 +89,17 @@ different characteristic widths [1].
|
|||
|
||||
ABS_MT_ORIENTATION
|
||||
|
||||
The orientation of the ellipse. The value should describe half a revolution
|
||||
clockwise around the touch center. The scale of the value is arbitrary, but
|
||||
zero should be returned for an ellipse aligned along the Y axis of the
|
||||
surface. As an example, an index finger placed straight onto the axis could
|
||||
return zero orientation, something negative when twisted to the left, and
|
||||
something positive when twisted to the right. This value can be omitted if
|
||||
the touching object is circular, or if the information is not available in
|
||||
the kernel driver.
|
||||
The orientation of the ellipse. The value should describe a signed quarter
|
||||
of a revolution clockwise around the touch center. The signed value range
|
||||
is arbitrary, but zero should be returned for a finger aligned along the Y
|
||||
axis of the surface, a negative value when finger is turned to the left, and
|
||||
a positive value when finger turned to the right. When completely aligned with
|
||||
the X axis, the range max should be returned. Orientation can be omitted
|
||||
if the touching object is circular, or if the information is not available
|
||||
in the kernel driver. Partial orientation support is possible if the device
|
||||
can distinguish between the two axis, but not (uniquely) any values in
|
||||
between. In such cases, the range of ABS_MT_ORIENTATION should be [0, 1]
|
||||
[4].
|
||||
|
||||
ABS_MT_POSITION_X
|
||||
|
||||
|
@ -98,8 +120,35 @@ ABS_MT_BLOB_ID
|
|||
|
||||
The BLOB_ID groups several packets together into one arbitrarily shaped
|
||||
contact. This is a low-level anonymous grouping, and should not be confused
|
||||
with the high-level contactID, explained below. Most kernel drivers will
|
||||
not have this capability, and can safely omit the event.
|
||||
with the high-level trackingID [5]. Most kernel drivers will not have blob
|
||||
capability, and can safely omit the event.
|
||||
|
||||
ABS_MT_TRACKING_ID
|
||||
|
||||
The TRACKING_ID identifies an initiated contact throughout its life cycle
|
||||
[5]. There are currently only a few devices that support it, so this event
|
||||
should normally be omitted.
|
||||
|
||||
|
||||
Event Computation
|
||||
-----------------
|
||||
|
||||
The flora of different hardware unavoidably leads to some devices fitting
|
||||
better to the MT protocol than others. To simplify and unify the mapping,
|
||||
this section gives recipes for how to compute certain events.
|
||||
|
||||
For devices reporting contacts as rectangular shapes, signed orientation
|
||||
cannot be obtained. Assuming X and Y are the lengths of the sides of the
|
||||
touching rectangle, here is a simple formula that retains the most
|
||||
information possible:
|
||||
|
||||
ABS_MT_TOUCH_MAJOR := max(X, Y)
|
||||
ABS_MT_TOUCH_MINOR := min(X, Y)
|
||||
ABS_MT_ORIENTATION := bool(X > Y)
|
||||
|
||||
The range of ABS_MT_ORIENTATION should be set to [0, 1], to indicate that
|
||||
the device can distinguish between a finger along the Y axis (0) and a
|
||||
finger along the X axis (1).
|
||||
|
||||
|
||||
Finger Tracking
|
||||
|
@ -109,14 +158,18 @@ The kernel driver should generate an arbitrary enumeration of the set of
|
|||
anonymous contacts currently on the surface. The order in which the packets
|
||||
appear in the event stream is not important.
|
||||
|
||||
The process of finger tracking, i.e., to assign a unique contactID to each
|
||||
The process of finger tracking, i.e., to assign a unique trackingID to each
|
||||
initiated contact on the surface, is left to user space; preferably the
|
||||
multi-touch X driver [3]. In that driver, the contactID stays the same and
|
||||
multi-touch X driver [3]. In that driver, the trackingID stays the same and
|
||||
unique until the contact vanishes (when the finger leaves the surface). The
|
||||
problem of assigning a set of anonymous fingers to a set of identified
|
||||
fingers is a euclidian bipartite matching problem at each event update, and
|
||||
relies on a sufficiently rapid update rate.
|
||||
|
||||
There are a few devices that support trackingID in hardware. User space can
|
||||
make use of these native identifiers to reduce bandwidth and cpu usage.
|
||||
|
||||
|
||||
Notes
|
||||
-----
|
||||
|
||||
|
@ -136,5 +189,7 @@ could be used to derive tilt.
|
|||
time of writing (April 2009), the MT protocol is not yet merged, and the
|
||||
prototype implements finger matching, basic mouse support and two-finger
|
||||
scrolling. The project aims at improving the quality of current multi-touch
|
||||
functionality available in the synaptics X driver, and in addition
|
||||
functionality available in the Synaptics X driver, and in addition
|
||||
implement more advanced gestures.
|
||||
[4] See the section on event computation.
|
||||
[5] See the section on finger tracking.
|
||||
|
|
|
@ -1535,6 +1535,10 @@ and is between 256 and 4096 characters. It is defined in the file
|
|||
register save and restore. The kernel will only save
|
||||
legacy floating-point registers on task switch.
|
||||
|
||||
noxsave [BUGS=X86] Disables x86 extended register state save
|
||||
and restore using xsave. The kernel will fallback to
|
||||
enabling legacy floating-point and sse state.
|
||||
|
||||
nohlt [BUGS=ARM,SH] Tells the kernel that the sleep(SH) or
|
||||
wfi(ARM) instruction doesn't work correctly and not to
|
||||
use it. This is also useful when using JTAG debugger.
|
||||
|
|
|
@ -1266,13 +1266,22 @@ sctp_rmem - vector of 3 INTEGERs: min, default, max
|
|||
sctp_wmem - vector of 3 INTEGERs: min, default, max
|
||||
See tcp_wmem for a description.
|
||||
|
||||
UNDOCUMENTED:
|
||||
|
||||
/proc/sys/net/core/*
|
||||
dev_weight FIXME
|
||||
dev_weight - INTEGER
|
||||
The maximum number of packets that kernel can handle on a NAPI
|
||||
interrupt, it's a Per-CPU variable.
|
||||
|
||||
Default: 64
|
||||
|
||||
/proc/sys/net/unix/*
|
||||
max_dgram_qlen FIXME
|
||||
max_dgram_qlen - INTEGER
|
||||
The maximum length of dgram socket receive queue
|
||||
|
||||
Default: 10
|
||||
|
||||
|
||||
UNDOCUMENTED:
|
||||
|
||||
/proc/sys/net/irda/*
|
||||
fast_poll_increase FIXME
|
||||
|
|
|
@ -334,6 +334,7 @@ STAC9227/9228/9229/927x
|
|||
ref-no-jd Reference board without HP/Mic jack detection
|
||||
3stack D965 3stack
|
||||
5stack D965 5stack + SPDIF
|
||||
5stack-no-fp D965 5stack without front panel
|
||||
dell-3stack Dell Dimension E520
|
||||
dell-bios Fixes with Dell BIOS setup
|
||||
auto BIOS setup (default)
|
||||
|
|
|
@ -104,6 +104,11 @@ card*/pcm*/xrun_debug
|
|||
When this value is greater than 1, the driver will show the
|
||||
stack trace additionally. This may help the debugging.
|
||||
|
||||
Since 2.6.30, this option also enables the hwptr check using
|
||||
jiffies. This detects spontaneous invalid pointer callback
|
||||
values, but can be lead to too much corrections for a (mostly
|
||||
buggy) hardware that doesn't give smooth pointer updates.
|
||||
|
||||
card*/pcm*/sub*/info
|
||||
The general information of this PCM sub-stream.
|
||||
|
||||
|
|
|
@ -39,8 +39,6 @@ Currently, these files are in /proc/sys/vm:
|
|||
- nr_hugepages
|
||||
- nr_overcommit_hugepages
|
||||
- nr_pdflush_threads
|
||||
- nr_pdflush_threads_min
|
||||
- nr_pdflush_threads_max
|
||||
- nr_trim_pages (only if CONFIG_MMU=n)
|
||||
- numa_zonelist_order
|
||||
- oom_dump_tasks
|
||||
|
@ -469,32 +467,6 @@ The default value is 0.
|
|||
|
||||
==============================================================
|
||||
|
||||
nr_pdflush_threads_min
|
||||
|
||||
This value controls the minimum number of pdflush threads.
|
||||
|
||||
At boot time, the kernel will create and maintain 'nr_pdflush_threads_min'
|
||||
threads for the kernel's lifetime.
|
||||
|
||||
The default value is 2. The minimum value you can specify is 1, and
|
||||
the maximum value is the current setting of 'nr_pdflush_threads_max'.
|
||||
|
||||
See 'nr_pdflush_threads_max' below for more information.
|
||||
|
||||
==============================================================
|
||||
|
||||
nr_pdflush_threads_max
|
||||
|
||||
This value controls the maximum number of pdflush threads that can be
|
||||
created. The pdflush algorithm will create a new pdflush thread (up to
|
||||
this maximum) if no pdflush threads have been available for >= 1 second.
|
||||
|
||||
The default value is 8. The minimum value you can specify is the
|
||||
current value of 'nr_pdflush_threads_min' and the
|
||||
maximum is 1000.
|
||||
|
||||
==============================================================
|
||||
|
||||
overcommit_memory:
|
||||
|
||||
This value contains a flag that enables memory overcommitment.
|
||||
|
|
|
@ -113,7 +113,7 @@ versions of the sysfs interface.
|
|||
"devices" directory at /sys/subsystem/<name>/devices.
|
||||
|
||||
If /sys/subsystem exists, /sys/bus, /sys/class and /sys/block can be
|
||||
ignored. If it does not exist, you have always to scan all three
|
||||
ignored. If it does not exist, you always have to scan all three
|
||||
places, as the kernel is free to move a subsystem from one place to
|
||||
the other, as long as the devices are still reachable by the same
|
||||
subsystem name.
|
||||
|
|
49
MAINTAINERS
49
MAINTAINERS
|
@ -434,7 +434,7 @@ F: arch/alpha/
|
|||
|
||||
AMD GEODE CS5536 USB DEVICE CONTROLLER DRIVER
|
||||
P: Thomas Dahlmann
|
||||
M: thomas.dahlmann@amd.com
|
||||
M: dahlmann.thomas@arcor.de
|
||||
L: linux-geode@lists.infradead.org (moderated for non-subscribers)
|
||||
S: Supported
|
||||
F: drivers/usb/gadget/amd5536udc.*
|
||||
|
@ -624,6 +624,7 @@ M: paulius.zaleckas@teltonika.lt
|
|||
L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
|
||||
T: git git://gitorious.org/linux-gemini/mainline.git
|
||||
S: Maintained
|
||||
F: arch/arm/mach-gemini/
|
||||
|
||||
ARM/EBSA110 MACHINE SUPPORT
|
||||
P: Russell King
|
||||
|
@ -650,6 +651,7 @@ P: Paulius Zaleckas
|
|||
M: paulius.zaleckas@teltonika.lt
|
||||
L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
|
||||
S: Maintained
|
||||
F: arch/arm/mm/*-fa*
|
||||
|
||||
ARM/FOOTBRIDGE ARCHITECTURE
|
||||
P: Russell King
|
||||
|
@ -1132,17 +1134,17 @@ F: fs/bfs/
|
|||
F: include/linux/bfs_fs.h
|
||||
|
||||
BLACKFIN ARCHITECTURE
|
||||
P: Bryan Wu
|
||||
M: cooloney@kernel.org
|
||||
P: Mike Frysinger
|
||||
M: vapier@gentoo.org
|
||||
L: uclinux-dist-devel@blackfin.uclinux.org
|
||||
W: http://blackfin.uclinux.org
|
||||
S: Supported
|
||||
F: arch/blackfin/
|
||||
|
||||
BLACKFIN EMAC DRIVER
|
||||
P: Bryan Wu
|
||||
M: cooloney@kernel.org
|
||||
L: uclinux-dist-devel@blackfin.uclinux.org (subscribers-only)
|
||||
P: Michael Hennerich
|
||||
M: michael.hennerich@analog.com
|
||||
L: uclinux-dist-devel@blackfin.uclinux.org
|
||||
W: http://blackfin.uclinux.org
|
||||
S: Supported
|
||||
F: drivers/net/bfin_mac.*
|
||||
|
@ -1150,7 +1152,7 @@ F: drivers/net/bfin_mac.*
|
|||
BLACKFIN RTC DRIVER
|
||||
P: Mike Frysinger
|
||||
M: vapier.adi@gmail.com
|
||||
L: uclinux-dist-devel@blackfin.uclinux.org (subscribers-only)
|
||||
L: uclinux-dist-devel@blackfin.uclinux.org
|
||||
W: http://blackfin.uclinux.org
|
||||
S: Supported
|
||||
F: drivers/rtc/rtc-bfin.c
|
||||
|
@ -1158,7 +1160,7 @@ F: drivers/rtc/rtc-bfin.c
|
|||
BLACKFIN SERIAL DRIVER
|
||||
P: Sonic Zhang
|
||||
M: sonic.zhang@analog.com
|
||||
L: uclinux-dist-devel@blackfin.uclinux.org (subscribers-only)
|
||||
L: uclinux-dist-devel@blackfin.uclinux.org
|
||||
W: http://blackfin.uclinux.org
|
||||
S: Supported
|
||||
F: drivers/serial/bfin_5xx.c
|
||||
|
@ -1166,7 +1168,7 @@ F: drivers/serial/bfin_5xx.c
|
|||
BLACKFIN WATCHDOG DRIVER
|
||||
P: Mike Frysinger
|
||||
M: vapier.adi@gmail.com
|
||||
L: uclinux-dist-devel@blackfin.uclinux.org (subscribers-only)
|
||||
L: uclinux-dist-devel@blackfin.uclinux.org
|
||||
W: http://blackfin.uclinux.org
|
||||
S: Supported
|
||||
F: drivers/watchdog/bfin_wdt.c
|
||||
|
@ -1174,7 +1176,7 @@ F: drivers/watchdog/bfin_wdt.c
|
|||
BLACKFIN I2C TWI DRIVER
|
||||
P: Sonic Zhang
|
||||
M: sonic.zhang@analog.com
|
||||
L: uclinux-dist-devel@blackfin.uclinux.org (subscribers-only)
|
||||
L: uclinux-dist-devel@blackfin.uclinux.org
|
||||
W: http://blackfin.uclinux.org/
|
||||
S: Supported
|
||||
F: drivers/i2c/busses/i2c-bfin-twi.c
|
||||
|
@ -1431,6 +1433,14 @@ P: Russell King
|
|||
M: linux@arm.linux.org.uk
|
||||
F: include/linux/clk.h
|
||||
|
||||
CISCO FCOE HBA DRIVER
|
||||
P: Abhijeet Joglekar
|
||||
M: abjoglek@cisco.com
|
||||
P: Joe Eykholt
|
||||
M: jeykholt@cisco.com
|
||||
L: linux-scsi@vger.kernel.org
|
||||
S: Supported
|
||||
|
||||
CODA FILE SYSTEM
|
||||
P: Jan Harkes
|
||||
M: jaharkes@cs.cmu.edu
|
||||
|
@ -1532,6 +1542,13 @@ W: http://www.fi.muni.cz/~kas/cosa/
|
|||
S: Maintained
|
||||
F: drivers/net/wan/cosa*
|
||||
|
||||
CPMAC ETHERNET DRIVER
|
||||
P: Florian Fainelli
|
||||
M: florian@openwrt.org
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/net/cpmac.c
|
||||
|
||||
CPU FREQUENCY DRIVERS
|
||||
P: Dave Jones
|
||||
M: davej@redhat.com
|
||||
|
@ -1963,8 +1980,8 @@ F: include/linux/edac.h
|
|||
|
||||
EDAC-E752X
|
||||
P: Mark Gross
|
||||
P: Doug Thompson
|
||||
M: mark.gross@intel.com
|
||||
P: Doug Thompson
|
||||
M: dougthompson@xmission.com
|
||||
L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers)
|
||||
W: bluesmoke.sourceforge.net
|
||||
|
@ -2241,7 +2258,7 @@ P: Li Yang
|
|||
M: leoli@freescale.com
|
||||
P: Zhang Wei
|
||||
M: zw@zh-kernel.org
|
||||
L: linuxppc-embedded@ozlabs.org
|
||||
L: linuxppc-dev@ozlabs.org
|
||||
L: linux-kernel@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/dma/fsldma.*
|
||||
|
@ -5579,6 +5596,14 @@ M: ian@mnementh.co.uk
|
|||
S: Maintained
|
||||
F: drivers/mmc/host/tmio_mmc.*
|
||||
|
||||
TMPFS (SHMEM FILESYSTEM)
|
||||
P: Hugh Dickins
|
||||
M: hugh.dickins@tiscali.co.uk
|
||||
L: linux-mm@kvack.org
|
||||
S: Maintained
|
||||
F: include/linux/shmem_fs.h
|
||||
F: mm/shmem.c
|
||||
|
||||
TPM DEVICE DRIVER
|
||||
P: Debora Velarde
|
||||
M: debora@linux.vnet.ibm.com
|
||||
|
|
4
Makefile
4
Makefile
|
@ -1,8 +1,8 @@
|
|||
VERSION = 2
|
||||
PATCHLEVEL = 6
|
||||
SUBLEVEL = 30
|
||||
EXTRAVERSION = -rc5
|
||||
NAME = Vindictive Armadillo
|
||||
EXTRAVERSION = -rc7
|
||||
NAME = Man-Eating Seals of Antiquity
|
||||
|
||||
# *DOCUMENTATION*
|
||||
# To see a list of typical targets execute "make help"
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
#ifndef __ALPHA_PERCPU_H
|
||||
#define __ALPHA_PERCPU_H
|
||||
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/threads.h>
|
||||
#include <linux/percpu-defs.h>
|
||||
|
||||
/*
|
||||
* Determine the real variable name from the name visible in the
|
||||
|
@ -73,6 +75,28 @@ extern unsigned long __per_cpu_offset[NR_CPUS];
|
|||
|
||||
#endif /* SMP */
|
||||
|
||||
#include <asm-generic/percpu.h>
|
||||
#ifdef CONFIG_SMP
|
||||
#define PER_CPU_BASE_SECTION ".data.percpu"
|
||||
#else
|
||||
#define PER_CPU_BASE_SECTION ".data"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
|
||||
#ifdef MODULE
|
||||
#define PER_CPU_SHARED_ALIGNED_SECTION ""
|
||||
#else
|
||||
#define PER_CPU_SHARED_ALIGNED_SECTION ".shared_aligned"
|
||||
#endif
|
||||
#define PER_CPU_FIRST_SECTION ".first"
|
||||
|
||||
#else
|
||||
|
||||
#define PER_CPU_SHARED_ALIGNED_SECTION ""
|
||||
#define PER_CPU_FIRST_SECTION ""
|
||||
|
||||
#endif
|
||||
|
||||
#define PER_CPU_ATTRIBUTES
|
||||
|
||||
#endif /* __ALPHA_PERCPU_H */
|
||||
|
|
|
@ -273,6 +273,7 @@ config ARCH_EP93XX
|
|||
select HAVE_CLK
|
||||
select COMMON_CLKDEV
|
||||
select ARCH_REQUIRE_GPIOLIB
|
||||
select ARCH_HAS_HOLES_MEMORYMODEL
|
||||
help
|
||||
This enables support for the Cirrus EP93xx series of CPUs.
|
||||
|
||||
|
@ -976,10 +977,9 @@ config OABI_COMPAT
|
|||
UNPREDICTABLE (in fact it can be predicted that it won't work
|
||||
at all). If in doubt say Y.
|
||||
|
||||
config ARCH_FLATMEM_HAS_HOLES
|
||||
config ARCH_HAS_HOLES_MEMORYMODEL
|
||||
bool
|
||||
default y
|
||||
depends on FLATMEM
|
||||
default n
|
||||
|
||||
# Discontigmem is deprecated
|
||||
config ARCH_DISCONTIGMEM_ENABLE
|
||||
|
|
|
@ -255,9 +255,9 @@ void __cpuinit gic_cpu_init(unsigned int gic_nr, void __iomem *base)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
void gic_raise_softirq(cpumask_t cpumask, unsigned int irq)
|
||||
void gic_raise_softirq(const struct cpumask *mask, unsigned int irq)
|
||||
{
|
||||
unsigned long map = *cpus_addr(cpumask);
|
||||
unsigned long map = *cpus_addr(*mask);
|
||||
|
||||
/* this always happens on GIC0 */
|
||||
writel(map << 16 | irq, gic_data[0].dist_base + GIC_DIST_SOFTINT);
|
||||
|
|
|
@ -114,3 +114,16 @@
|
|||
.align 3; \
|
||||
.long 9999b,9001f; \
|
||||
.previous
|
||||
|
||||
/*
|
||||
* SMP data memory barrier
|
||||
*/
|
||||
.macro smp_dmb
|
||||
#ifdef CONFIG_SMP
|
||||
#if __LINUX_ARM_ARCH__ >= 7
|
||||
dmb
|
||||
#elif __LINUX_ARM_ARCH__ == 6
|
||||
mcr p15, 0, r0, c7, c10, 5 @ dmb
|
||||
#endif
|
||||
#endif
|
||||
.endm
|
||||
|
|
|
@ -44,11 +44,29 @@ static inline void atomic_set(atomic_t *v, int i)
|
|||
: "cc");
|
||||
}
|
||||
|
||||
static inline void atomic_add(int i, atomic_t *v)
|
||||
{
|
||||
unsigned long tmp;
|
||||
int result;
|
||||
|
||||
__asm__ __volatile__("@ atomic_add\n"
|
||||
"1: ldrex %0, [%2]\n"
|
||||
" add %0, %0, %3\n"
|
||||
" strex %1, %0, [%2]\n"
|
||||
" teq %1, #0\n"
|
||||
" bne 1b"
|
||||
: "=&r" (result), "=&r" (tmp)
|
||||
: "r" (&v->counter), "Ir" (i)
|
||||
: "cc");
|
||||
}
|
||||
|
||||
static inline int atomic_add_return(int i, atomic_t *v)
|
||||
{
|
||||
unsigned long tmp;
|
||||
int result;
|
||||
|
||||
smp_mb();
|
||||
|
||||
__asm__ __volatile__("@ atomic_add_return\n"
|
||||
"1: ldrex %0, [%2]\n"
|
||||
" add %0, %0, %3\n"
|
||||
|
@ -59,14 +77,34 @@ static inline int atomic_add_return(int i, atomic_t *v)
|
|||
: "r" (&v->counter), "Ir" (i)
|
||||
: "cc");
|
||||
|
||||
smp_mb();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static inline void atomic_sub(int i, atomic_t *v)
|
||||
{
|
||||
unsigned long tmp;
|
||||
int result;
|
||||
|
||||
__asm__ __volatile__("@ atomic_sub\n"
|
||||
"1: ldrex %0, [%2]\n"
|
||||
" sub %0, %0, %3\n"
|
||||
" strex %1, %0, [%2]\n"
|
||||
" teq %1, #0\n"
|
||||
" bne 1b"
|
||||
: "=&r" (result), "=&r" (tmp)
|
||||
: "r" (&v->counter), "Ir" (i)
|
||||
: "cc");
|
||||
}
|
||||
|
||||
static inline int atomic_sub_return(int i, atomic_t *v)
|
||||
{
|
||||
unsigned long tmp;
|
||||
int result;
|
||||
|
||||
smp_mb();
|
||||
|
||||
__asm__ __volatile__("@ atomic_sub_return\n"
|
||||
"1: ldrex %0, [%2]\n"
|
||||
" sub %0, %0, %3\n"
|
||||
|
@ -77,6 +115,8 @@ static inline int atomic_sub_return(int i, atomic_t *v)
|
|||
: "r" (&v->counter), "Ir" (i)
|
||||
: "cc");
|
||||
|
||||
smp_mb();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -84,6 +124,8 @@ static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new)
|
|||
{
|
||||
unsigned long oldval, res;
|
||||
|
||||
smp_mb();
|
||||
|
||||
do {
|
||||
__asm__ __volatile__("@ atomic_cmpxchg\n"
|
||||
"ldrex %1, [%2]\n"
|
||||
|
@ -95,6 +137,8 @@ static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new)
|
|||
: "cc");
|
||||
} while (res);
|
||||
|
||||
smp_mb();
|
||||
|
||||
return oldval;
|
||||
}
|
||||
|
||||
|
@ -135,6 +179,7 @@ static inline int atomic_add_return(int i, atomic_t *v)
|
|||
|
||||
return val;
|
||||
}
|
||||
#define atomic_add(i, v) (void) atomic_add_return(i, v)
|
||||
|
||||
static inline int atomic_sub_return(int i, atomic_t *v)
|
||||
{
|
||||
|
@ -148,6 +193,7 @@ static inline int atomic_sub_return(int i, atomic_t *v)
|
|||
|
||||
return val;
|
||||
}
|
||||
#define atomic_sub(i, v) (void) atomic_sub_return(i, v)
|
||||
|
||||
static inline int atomic_cmpxchg(atomic_t *v, int old, int new)
|
||||
{
|
||||
|
@ -187,10 +233,8 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u)
|
|||
}
|
||||
#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
|
||||
|
||||
#define atomic_add(i, v) (void) atomic_add_return(i, v)
|
||||
#define atomic_inc(v) (void) atomic_add_return(1, v)
|
||||
#define atomic_sub(i, v) (void) atomic_sub_return(i, v)
|
||||
#define atomic_dec(v) (void) atomic_sub_return(1, v)
|
||||
#define atomic_inc(v) atomic_add(1, v)
|
||||
#define atomic_dec(v) atomic_sub(1, v)
|
||||
|
||||
#define atomic_inc_and_test(v) (atomic_add_return(1, v) == 0)
|
||||
#define atomic_dec_and_test(v) (atomic_sub_return(1, v) == 0)
|
||||
|
@ -200,11 +244,10 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u)
|
|||
|
||||
#define atomic_add_negative(i,v) (atomic_add_return(i, v) < 0)
|
||||
|
||||
/* Atomic operations are already serializing on ARM */
|
||||
#define smp_mb__before_atomic_dec() barrier()
|
||||
#define smp_mb__after_atomic_dec() barrier()
|
||||
#define smp_mb__before_atomic_inc() barrier()
|
||||
#define smp_mb__after_atomic_inc() barrier()
|
||||
#define smp_mb__before_atomic_dec() smp_mb()
|
||||
#define smp_mb__after_atomic_dec() smp_mb()
|
||||
#define smp_mb__before_atomic_inc() smp_mb()
|
||||
#define smp_mb__after_atomic_inc() smp_mb()
|
||||
|
||||
#include <asm-generic/atomic.h>
|
||||
#endif
|
||||
|
|
|
@ -5,9 +5,6 @@
|
|||
#ifndef __ARM_FLAT_H__
|
||||
#define __ARM_FLAT_H__
|
||||
|
||||
/* An odd number of words will be pushed after this alignment, so
|
||||
deliberately misalign the value. */
|
||||
#define flat_stack_align(sp) sp = (void *)(((unsigned long)(sp) - 4) | 4)
|
||||
#define flat_argvp_envp_on_stack() 1
|
||||
#define flat_old_ram_flag(flags) (flags)
|
||||
#define flat_reloc_valid(reloc, size) ((reloc) <= (size))
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
void gic_dist_init(unsigned int gic_nr, void __iomem *base, unsigned int irq_start);
|
||||
void gic_cpu_init(unsigned int gic_nr, void __iomem *base);
|
||||
void gic_cascade_irq(unsigned int gic_nr, unsigned int irq);
|
||||
void gic_raise_softirq(cpumask_t cpumask, unsigned int irq);
|
||||
void gic_raise_softirq(const struct cpumask *mask, unsigned int irq);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -53,17 +53,12 @@ extern void smp_store_cpu_info(unsigned int cpuid);
|
|||
/*
|
||||
* Raise an IPI cross call on CPUs in callmap.
|
||||
*/
|
||||
extern void smp_cross_call(cpumask_t callmap);
|
||||
|
||||
/*
|
||||
* Broadcast a timer interrupt to the other CPUs.
|
||||
*/
|
||||
extern void smp_send_timer(void);
|
||||
extern void smp_cross_call(const struct cpumask *mask);
|
||||
|
||||
/*
|
||||
* Broadcast a clock event to other CPUs.
|
||||
*/
|
||||
extern void smp_timer_broadcast(cpumask_t mask);
|
||||
extern void smp_timer_broadcast(const struct cpumask *mask);
|
||||
|
||||
/*
|
||||
* Boot a secondary CPU, and assign it the specified idle task.
|
||||
|
@ -102,7 +97,8 @@ extern int platform_cpu_kill(unsigned int cpu);
|
|||
extern void platform_cpu_enable(unsigned int cpu);
|
||||
|
||||
extern void arch_send_call_function_single_ipi(int cpu);
|
||||
extern void arch_send_call_function_ipi(cpumask_t mask);
|
||||
extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
|
||||
#define arch_send_call_function_ipi_mask arch_send_call_function_ipi_mask
|
||||
|
||||
/*
|
||||
* Local timer interrupt handling function (can be IPI'ed).
|
||||
|
|
|
@ -248,6 +248,8 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size
|
|||
unsigned int tmp;
|
||||
#endif
|
||||
|
||||
smp_mb();
|
||||
|
||||
switch (size) {
|
||||
#if __LINUX_ARM_ARCH__ >= 6
|
||||
case 1:
|
||||
|
@ -307,6 +309,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size
|
|||
__bad_xchg(ptr, size), ret = 0;
|
||||
break;
|
||||
}
|
||||
smp_mb();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -316,6 +319,12 @@ extern void enable_hlt(void);
|
|||
|
||||
#include <asm-generic/cmpxchg-local.h>
|
||||
|
||||
#if __LINUX_ARM_ARCH__ < 6
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
#error "SMP is not supported on this platform"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make
|
||||
* them available.
|
||||
|
@ -329,6 +338,173 @@ extern void enable_hlt(void);
|
|||
#include <asm-generic/cmpxchg.h>
|
||||
#endif
|
||||
|
||||
#else /* __LINUX_ARM_ARCH__ >= 6 */
|
||||
|
||||
extern void __bad_cmpxchg(volatile void *ptr, int size);
|
||||
|
||||
/*
|
||||
* cmpxchg only support 32-bits operands on ARMv6.
|
||||
*/
|
||||
|
||||
static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
|
||||
unsigned long new, int size)
|
||||
{
|
||||
unsigned long oldval, res;
|
||||
|
||||
switch (size) {
|
||||
#ifdef CONFIG_CPU_32v6K
|
||||
case 1:
|
||||
do {
|
||||
asm volatile("@ __cmpxchg1\n"
|
||||
" ldrexb %1, [%2]\n"
|
||||
" mov %0, #0\n"
|
||||
" teq %1, %3\n"
|
||||
" strexbeq %0, %4, [%2]\n"
|
||||
: "=&r" (res), "=&r" (oldval)
|
||||
: "r" (ptr), "Ir" (old), "r" (new)
|
||||
: "memory", "cc");
|
||||
} while (res);
|
||||
break;
|
||||
case 2:
|
||||
do {
|
||||
asm volatile("@ __cmpxchg1\n"
|
||||
" ldrexh %1, [%2]\n"
|
||||
" mov %0, #0\n"
|
||||
" teq %1, %3\n"
|
||||
" strexheq %0, %4, [%2]\n"
|
||||
: "=&r" (res), "=&r" (oldval)
|
||||
: "r" (ptr), "Ir" (old), "r" (new)
|
||||
: "memory", "cc");
|
||||
} while (res);
|
||||
break;
|
||||
#endif /* CONFIG_CPU_32v6K */
|
||||
case 4:
|
||||
do {
|
||||
asm volatile("@ __cmpxchg4\n"
|
||||
" ldrex %1, [%2]\n"
|
||||
" mov %0, #0\n"
|
||||
" teq %1, %3\n"
|
||||
" strexeq %0, %4, [%2]\n"
|
||||
: "=&r" (res), "=&r" (oldval)
|
||||
: "r" (ptr), "Ir" (old), "r" (new)
|
||||
: "memory", "cc");
|
||||
} while (res);
|
||||
break;
|
||||
default:
|
||||
__bad_cmpxchg(ptr, size);
|
||||
oldval = 0;
|
||||
}
|
||||
|
||||
return oldval;
|
||||
}
|
||||
|
||||
static inline unsigned long __cmpxchg_mb(volatile void *ptr, unsigned long old,
|
||||
unsigned long new, int size)
|
||||
{
|
||||
unsigned long ret;
|
||||
|
||||
smp_mb();
|
||||
ret = __cmpxchg(ptr, old, new, size);
|
||||
smp_mb();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define cmpxchg(ptr,o,n) \
|
||||
((__typeof__(*(ptr)))__cmpxchg_mb((ptr), \
|
||||
(unsigned long)(o), \
|
||||
(unsigned long)(n), \
|
||||
sizeof(*(ptr))))
|
||||
|
||||
static inline unsigned long __cmpxchg_local(volatile void *ptr,
|
||||
unsigned long old,
|
||||
unsigned long new, int size)
|
||||
{
|
||||
unsigned long ret;
|
||||
|
||||
switch (size) {
|
||||
#ifndef CONFIG_CPU_32v6K
|
||||
case 1:
|
||||
case 2:
|
||||
ret = __cmpxchg_local_generic(ptr, old, new, size);
|
||||
break;
|
||||
#endif /* !CONFIG_CPU_32v6K */
|
||||
default:
|
||||
ret = __cmpxchg(ptr, old, new, size);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define cmpxchg_local(ptr,o,n) \
|
||||
((__typeof__(*(ptr)))__cmpxchg_local((ptr), \
|
||||
(unsigned long)(o), \
|
||||
(unsigned long)(n), \
|
||||
sizeof(*(ptr))))
|
||||
|
||||
#ifdef CONFIG_CPU_32v6K
|
||||
|
||||
/*
|
||||
* Note : ARMv7-M (currently unsupported by Linux) does not support
|
||||
* ldrexd/strexd. If ARMv7-M is ever supported by the Linux kernel, it should
|
||||
* not be allowed to use __cmpxchg64.
|
||||
*/
|
||||
static inline unsigned long long __cmpxchg64(volatile void *ptr,
|
||||
unsigned long long old,
|
||||
unsigned long long new)
|
||||
{
|
||||
register unsigned long long oldval asm("r0");
|
||||
register unsigned long long __old asm("r2") = old;
|
||||
register unsigned long long __new asm("r4") = new;
|
||||
unsigned long res;
|
||||
|
||||
do {
|
||||
asm volatile(
|
||||
" @ __cmpxchg8\n"
|
||||
" ldrexd %1, %H1, [%2]\n"
|
||||
" mov %0, #0\n"
|
||||
" teq %1, %3\n"
|
||||
" teqeq %H1, %H3\n"
|
||||
" strexdeq %0, %4, %H4, [%2]\n"
|
||||
: "=&r" (res), "=&r" (oldval)
|
||||
: "r" (ptr), "Ir" (__old), "r" (__new)
|
||||
: "memory", "cc");
|
||||
} while (res);
|
||||
|
||||
return oldval;
|
||||
}
|
||||
|
||||
static inline unsigned long long __cmpxchg64_mb(volatile void *ptr,
|
||||
unsigned long long old,
|
||||
unsigned long long new)
|
||||
{
|
||||
unsigned long long ret;
|
||||
|
||||
smp_mb();
|
||||
ret = __cmpxchg64(ptr, old, new);
|
||||
smp_mb();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define cmpxchg64(ptr,o,n) \
|
||||
((__typeof__(*(ptr)))__cmpxchg64_mb((ptr), \
|
||||
(unsigned long long)(o), \
|
||||
(unsigned long long)(n)))
|
||||
|
||||
#define cmpxchg64_local(ptr,o,n) \
|
||||
((__typeof__(*(ptr)))__cmpxchg64((ptr), \
|
||||
(unsigned long long)(o), \
|
||||
(unsigned long long)(n)))
|
||||
|
||||
#else /* !CONFIG_CPU_32v6K */
|
||||
|
||||
#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))
|
||||
|
||||
#endif /* CONFIG_CPU_32v6K */
|
||||
|
||||
#endif /* __LINUX_ARM_ARCH__ >= 6 */
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#define arch_align_stack(x) (x)
|
||||
|
|
|
@ -78,6 +78,15 @@ int arm_elf_read_implies_exec(const struct elf32_hdr *x, int executable_stack)
|
|||
return 1;
|
||||
if (cpu_architecture() < CPU_ARCH_ARMv6)
|
||||
return 1;
|
||||
#if !defined(CONFIG_AEABI) || defined(CONFIG_OABI_COMPAT)
|
||||
/*
|
||||
* If we have support for OABI programs, we can never allow NX
|
||||
* support - our signal syscall restart mechanism relies upon
|
||||
* being able to execute code placed on the user stack.
|
||||
*/
|
||||
return 1;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
EXPORT_SYMBOL(arm_elf_read_implies_exec);
|
||||
|
|
|
@ -815,10 +815,7 @@ __kuser_helper_start:
|
|||
*/
|
||||
|
||||
__kuser_memory_barrier: @ 0xffff0fa0
|
||||
|
||||
#if __LINUX_ARM_ARCH__ >= 6 && defined(CONFIG_SMP)
|
||||
mcr p15, 0, r0, c7, c10, 5 @ dmb
|
||||
#endif
|
||||
smp_dmb
|
||||
usr_ret lr
|
||||
|
||||
.align 5
|
||||
|
|
|
@ -326,14 +326,14 @@ void __init smp_prepare_boot_cpu(void)
|
|||
per_cpu(cpu_data, cpu).idle = current;
|
||||
}
|
||||
|
||||
static void send_ipi_message(cpumask_t callmap, enum ipi_msg_type msg)
|
||||
static void send_ipi_message(const struct cpumask *mask, enum ipi_msg_type msg)
|
||||
{
|
||||
unsigned long flags;
|
||||
unsigned int cpu;
|
||||
|
||||
local_irq_save(flags);
|
||||
|
||||
for_each_cpu_mask(cpu, callmap) {
|
||||
for_each_cpu(cpu, mask) {
|
||||
struct ipi_data *ipi = &per_cpu(ipi_data, cpu);
|
||||
|
||||
spin_lock(&ipi->lock);
|
||||
|
@ -344,19 +344,19 @@ static void send_ipi_message(cpumask_t callmap, enum ipi_msg_type msg)
|
|||
/*
|
||||
* Call the platform specific cross-CPU call function.
|
||||
*/
|
||||
smp_cross_call(callmap);
|
||||
smp_cross_call(mask);
|
||||
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
void arch_send_call_function_ipi(cpumask_t mask)
|
||||
void arch_send_call_function_ipi_mask(const struct cpumask *mask)
|
||||
{
|
||||
send_ipi_message(mask, IPI_CALL_FUNC);
|
||||
}
|
||||
|
||||
void arch_send_call_function_single_ipi(int cpu)
|
||||
{
|
||||
send_ipi_message(cpumask_of_cpu(cpu), IPI_CALL_FUNC_SINGLE);
|
||||
send_ipi_message(cpumask_of(cpu), IPI_CALL_FUNC_SINGLE);
|
||||
}
|
||||
|
||||
void show_ipi_list(struct seq_file *p)
|
||||
|
@ -498,17 +498,10 @@ asmlinkage void __exception do_IPI(struct pt_regs *regs)
|
|||
|
||||
void smp_send_reschedule(int cpu)
|
||||
{
|
||||
send_ipi_message(cpumask_of_cpu(cpu), IPI_RESCHEDULE);
|
||||
send_ipi_message(cpumask_of(cpu), IPI_RESCHEDULE);
|
||||
}
|
||||
|
||||
void smp_send_timer(void)
|
||||
{
|
||||
cpumask_t mask = cpu_online_map;
|
||||
cpu_clear(smp_processor_id(), mask);
|
||||
send_ipi_message(mask, IPI_TIMER);
|
||||
}
|
||||
|
||||
void smp_timer_broadcast(cpumask_t mask)
|
||||
void smp_timer_broadcast(const struct cpumask *mask)
|
||||
{
|
||||
send_ipi_message(mask, IPI_TIMER);
|
||||
}
|
||||
|
@ -517,7 +510,7 @@ void smp_send_stop(void)
|
|||
{
|
||||
cpumask_t mask = cpu_online_map;
|
||||
cpu_clear(smp_processor_id(), mask);
|
||||
send_ipi_message(mask, IPI_CPU_STOP);
|
||||
send_ipi_message(&mask, IPI_CPU_STOP);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -528,20 +521,17 @@ int setup_profiling_timer(unsigned int multiplier)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
static int
|
||||
on_each_cpu_mask(void (*func)(void *), void *info, int wait, cpumask_t mask)
|
||||
static void
|
||||
on_each_cpu_mask(void (*func)(void *), void *info, int wait,
|
||||
const struct cpumask *mask)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
preempt_disable();
|
||||
|
||||
ret = smp_call_function_mask(mask, func, info, wait);
|
||||
if (cpu_isset(smp_processor_id(), mask))
|
||||
smp_call_function_many(mask, func, info, wait);
|
||||
if (cpumask_test_cpu(smp_processor_id(), mask))
|
||||
func(info);
|
||||
|
||||
preempt_enable();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**********************************************************************/
|
||||
|
@ -602,20 +592,17 @@ void flush_tlb_all(void)
|
|||
|
||||
void flush_tlb_mm(struct mm_struct *mm)
|
||||
{
|
||||
cpumask_t mask = mm->cpu_vm_mask;
|
||||
|
||||
on_each_cpu_mask(ipi_flush_tlb_mm, mm, 1, mask);
|
||||
on_each_cpu_mask(ipi_flush_tlb_mm, mm, 1, &mm->cpu_vm_mask);
|
||||
}
|
||||
|
||||
void flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr)
|
||||
{
|
||||
cpumask_t mask = vma->vm_mm->cpu_vm_mask;
|
||||
struct tlb_args ta;
|
||||
|
||||
ta.ta_vma = vma;
|
||||
ta.ta_start = uaddr;
|
||||
|
||||
on_each_cpu_mask(ipi_flush_tlb_page, &ta, 1, mask);
|
||||
on_each_cpu_mask(ipi_flush_tlb_page, &ta, 1, &vma->vm_mm->cpu_vm_mask);
|
||||
}
|
||||
|
||||
void flush_tlb_kernel_page(unsigned long kaddr)
|
||||
|
@ -630,14 +617,13 @@ void flush_tlb_kernel_page(unsigned long kaddr)
|
|||
void flush_tlb_range(struct vm_area_struct *vma,
|
||||
unsigned long start, unsigned long end)
|
||||
{
|
||||
cpumask_t mask = vma->vm_mm->cpu_vm_mask;
|
||||
struct tlb_args ta;
|
||||
|
||||
ta.ta_vma = vma;
|
||||
ta.ta_start = start;
|
||||
ta.ta_end = end;
|
||||
|
||||
on_each_cpu_mask(ipi_flush_tlb_range, &ta, 1, mask);
|
||||
on_each_cpu_mask(ipi_flush_tlb_range, &ta, 1, &vma->vm_mm->cpu_vm_mask);
|
||||
}
|
||||
|
||||
void flush_tlb_kernel_range(unsigned long start, unsigned long end)
|
||||
|
|
|
@ -18,12 +18,14 @@
|
|||
mov r2, #1
|
||||
add r1, r1, r0, lsr #3 @ Get byte offset
|
||||
mov r3, r2, lsl r3 @ create mask
|
||||
smp_dmb
|
||||
1: ldrexb r2, [r1]
|
||||
ands r0, r2, r3 @ save old value of bit
|
||||
\instr r2, r2, r3 @ toggle bit
|
||||
strexb ip, r2, [r1]
|
||||
cmp ip, #0
|
||||
bne 1b
|
||||
smp_dmb
|
||||
cmp r0, #0
|
||||
movne r0, #1
|
||||
2: mov pc, lr
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* <mach/asp.h> - DaVinci Audio Serial Port support
|
||||
*/
|
||||
#ifndef __ASM_ARCH_DAVINCI_ASP_H
|
||||
#define __ASM_ARCH_DAVINCI_ASP_H
|
||||
|
||||
#include <mach/irqs.h>
|
||||
|
||||
/* Bases of register banks */
|
||||
#define DAVINCI_ASP0_BASE 0x01E02000
|
||||
#define DAVINCI_ASP1_BASE 0x01E04000
|
||||
|
||||
/* EDMA channels */
|
||||
#define DAVINCI_DMA_ASP0_TX 2
|
||||
#define DAVINCI_DMA_ASP0_RX 3
|
||||
#define DAVINCI_DMA_ASP1_TX 8
|
||||
#define DAVINCI_DMA_ASP1_RX 9
|
||||
|
||||
/* Interrupts */
|
||||
#define DAVINCI_ASP0_RX_INT IRQ_MBRINT
|
||||
#define DAVINCI_ASP0_TX_INT IRQ_MBXINT
|
||||
#define DAVINCI_ASP1_RX_INT IRQ_MBRINT
|
||||
#define DAVINCI_ASP1_TX_INT IRQ_MBXINT
|
||||
|
||||
#endif /* __ASM_ARCH_DAVINCI_ASP_H */
|
|
@ -21,15 +21,50 @@
|
|||
#include <asm/div64.h>
|
||||
#include <mach/hardware.h>
|
||||
|
||||
|
||||
/*
|
||||
* The EP93xx has two external crystal oscillators. To generate the
|
||||
* required high-frequency clocks, the processor uses two phase-locked-
|
||||
* loops (PLLs) to multiply the incoming external clock signal to much
|
||||
* higher frequencies that are then divided down by programmable dividers
|
||||
* to produce the needed clocks. The PLLs operate independently of one
|
||||
* another.
|
||||
*/
|
||||
#define EP93XX_EXT_CLK_RATE 14745600
|
||||
#define EP93XX_EXT_RTC_RATE 32768
|
||||
|
||||
|
||||
struct clk {
|
||||
unsigned long rate;
|
||||
int users;
|
||||
int sw_locked;
|
||||
u32 enable_reg;
|
||||
u32 enable_mask;
|
||||
|
||||
unsigned long (*get_rate)(struct clk *clk);
|
||||
};
|
||||
|
||||
static struct clk clk_uart = {
|
||||
.rate = 14745600,
|
||||
|
||||
static unsigned long get_uart_rate(struct clk *clk);
|
||||
|
||||
|
||||
static struct clk clk_uart1 = {
|
||||
.sw_locked = 1,
|
||||
.enable_reg = EP93XX_SYSCON_DEVICE_CONFIG,
|
||||
.enable_mask = EP93XX_SYSCON_DEVICE_CONFIG_U1EN,
|
||||
.get_rate = get_uart_rate,
|
||||
};
|
||||
static struct clk clk_uart2 = {
|
||||
.sw_locked = 1,
|
||||
.enable_reg = EP93XX_SYSCON_DEVICE_CONFIG,
|
||||
.enable_mask = EP93XX_SYSCON_DEVICE_CONFIG_U2EN,
|
||||
.get_rate = get_uart_rate,
|
||||
};
|
||||
static struct clk clk_uart3 = {
|
||||
.sw_locked = 1,
|
||||
.enable_reg = EP93XX_SYSCON_DEVICE_CONFIG,
|
||||
.enable_mask = EP93XX_SYSCON_DEVICE_CONFIG_U3EN,
|
||||
.get_rate = get_uart_rate,
|
||||
};
|
||||
static struct clk clk_pll1;
|
||||
static struct clk clk_f;
|
||||
|
@ -95,9 +130,9 @@ static struct clk clk_m2m1 = {
|
|||
{ .dev_id = dev, .con_id = con, .clk = ck }
|
||||
|
||||
static struct clk_lookup clocks[] = {
|
||||
INIT_CK("apb:uart1", NULL, &clk_uart),
|
||||
INIT_CK("apb:uart2", NULL, &clk_uart),
|
||||
INIT_CK("apb:uart3", NULL, &clk_uart),
|
||||
INIT_CK("apb:uart1", NULL, &clk_uart1),
|
||||
INIT_CK("apb:uart2", NULL, &clk_uart2),
|
||||
INIT_CK("apb:uart3", NULL, &clk_uart3),
|
||||
INIT_CK(NULL, "pll1", &clk_pll1),
|
||||
INIT_CK(NULL, "fclk", &clk_f),
|
||||
INIT_CK(NULL, "hclk", &clk_h),
|
||||
|
@ -125,6 +160,8 @@ int clk_enable(struct clk *clk)
|
|||
u32 value;
|
||||
|
||||
value = __raw_readl(clk->enable_reg);
|
||||
if (clk->sw_locked)
|
||||
__raw_writel(0xaa, EP93XX_SYSCON_SWLOCK);
|
||||
__raw_writel(value | clk->enable_mask, clk->enable_reg);
|
||||
}
|
||||
|
||||
|
@ -138,13 +175,29 @@ void clk_disable(struct clk *clk)
|
|||
u32 value;
|
||||
|
||||
value = __raw_readl(clk->enable_reg);
|
||||
if (clk->sw_locked)
|
||||
__raw_writel(0xaa, EP93XX_SYSCON_SWLOCK);
|
||||
__raw_writel(value & ~clk->enable_mask, clk->enable_reg);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(clk_disable);
|
||||
|
||||
static unsigned long get_uart_rate(struct clk *clk)
|
||||
{
|
||||
u32 value;
|
||||
|
||||
value = __raw_readl(EP93XX_SYSCON_CLOCK_CONTROL);
|
||||
if (value & EP93XX_SYSCON_CLOCK_UARTBAUD)
|
||||
return EP93XX_EXT_CLK_RATE;
|
||||
else
|
||||
return EP93XX_EXT_CLK_RATE / 2;
|
||||
}
|
||||
|
||||
unsigned long clk_get_rate(struct clk *clk)
|
||||
{
|
||||
if (clk->get_rate)
|
||||
return clk->get_rate(clk);
|
||||
|
||||
return clk->rate;
|
||||
}
|
||||
EXPORT_SYMBOL(clk_get_rate);
|
||||
|
@ -162,7 +215,7 @@ static unsigned long calc_pll_rate(u32 config_word)
|
|||
unsigned long long rate;
|
||||
int i;
|
||||
|
||||
rate = 14745600;
|
||||
rate = EP93XX_EXT_CLK_RATE;
|
||||
rate *= ((config_word >> 11) & 0x1f) + 1; /* X1FBD */
|
||||
rate *= ((config_word >> 5) & 0x3f) + 1; /* X2FBD */
|
||||
do_div(rate, (config_word & 0x1f) + 1); /* X2IPD */
|
||||
|
@ -195,7 +248,7 @@ static int __init ep93xx_clock_init(void)
|
|||
|
||||
value = __raw_readl(EP93XX_SYSCON_CLOCK_SET1);
|
||||
if (!(value & 0x00800000)) { /* PLL1 bypassed? */
|
||||
clk_pll1.rate = 14745600;
|
||||
clk_pll1.rate = EP93XX_EXT_CLK_RATE;
|
||||
} else {
|
||||
clk_pll1.rate = calc_pll_rate(value);
|
||||
}
|
||||
|
@ -206,7 +259,7 @@ static int __init ep93xx_clock_init(void)
|
|||
|
||||
value = __raw_readl(EP93XX_SYSCON_CLOCK_SET2);
|
||||
if (!(value & 0x00080000)) { /* PLL2 bypassed? */
|
||||
clk_pll2.rate = 14745600;
|
||||
clk_pll2.rate = EP93XX_EXT_CLK_RATE;
|
||||
} else if (value & 0x00040000) { /* PLL2 enabled? */
|
||||
clk_pll2.rate = calc_pll_rate(value);
|
||||
} else {
|
||||
|
|
|
@ -159,7 +159,10 @@
|
|||
#define EP93XX_SYSCON_CLOCK_SET1 EP93XX_SYSCON_REG(0x20)
|
||||
#define EP93XX_SYSCON_CLOCK_SET2 EP93XX_SYSCON_REG(0x24)
|
||||
#define EP93XX_SYSCON_DEVICE_CONFIG EP93XX_SYSCON_REG(0x80)
|
||||
#define EP93XX_SYSCON_DEVICE_CONFIG_CRUNCH_ENABLE 0x00800000
|
||||
#define EP93XX_SYSCON_DEVICE_CONFIG_U3EN (1<<24)
|
||||
#define EP93XX_SYSCON_DEVICE_CONFIG_CRUNCH_ENABLE (1<<23)
|
||||
#define EP93XX_SYSCON_DEVICE_CONFIG_U2EN (1<<20)
|
||||
#define EP93XX_SYSCON_DEVICE_CONFIG_U1EN (1<<18)
|
||||
#define EP93XX_SYSCON_SWLOCK EP93XX_SYSCON_REG(0xc0)
|
||||
|
||||
#define EP93XX_WATCHDOG_BASE (EP93XX_APB_VIRT_BASE + 0x00140000)
|
||||
|
|
|
@ -15,10 +15,9 @@
|
|||
/*
|
||||
* Memory Map definitions
|
||||
*/
|
||||
/* FIXME: Does it really swap SRAM like this? */
|
||||
#ifdef CONFIG_GEMINI_MEM_SWAP
|
||||
# define GEMINI_DRAM_BASE 0x00000000
|
||||
# define GEMINI_SRAM_BASE 0x20000000
|
||||
# define GEMINI_SRAM_BASE 0x70000000
|
||||
#else
|
||||
# define GEMINI_SRAM_BASE 0x00000000
|
||||
# define GEMINI_DRAM_BASE 0x10000000
|
||||
|
|
|
@ -121,7 +121,7 @@ static struct clk uartclk = {
|
|||
.rate = 14745600,
|
||||
};
|
||||
|
||||
static struct clk_lookup lookups[] __initdata = {
|
||||
static struct clk_lookup lookups[] = {
|
||||
{ /* UART0 */
|
||||
.dev_id = "mb:16",
|
||||
.clk = &uartclk,
|
||||
|
|
|
@ -714,7 +714,7 @@ static int __init npe_init_module(void)
|
|||
}
|
||||
|
||||
if (!found)
|
||||
return -ENOSYS;
|
||||
return -ENODEV;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -144,6 +144,9 @@ static struct platform_device kirkwood_ge00 = {
|
|||
.id = 0,
|
||||
.num_resources = 1,
|
||||
.resource = kirkwood_ge00_resources,
|
||||
.dev = {
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
},
|
||||
};
|
||||
|
||||
void __init kirkwood_ge00_init(struct mv643xx_eth_platform_data *eth_data)
|
||||
|
@ -202,6 +205,9 @@ static struct platform_device kirkwood_ge01 = {
|
|||
.id = 1,
|
||||
.num_resources = 1,
|
||||
.resource = kirkwood_ge01_resources,
|
||||
.dev = {
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
},
|
||||
};
|
||||
|
||||
void __init kirkwood_ge01_init(struct mv643xx_eth_platform_data *eth_data)
|
||||
|
@ -386,12 +392,10 @@ static struct mv64xxx_i2c_pdata kirkwood_i2c_pdata = {
|
|||
|
||||
static struct resource kirkwood_i2c_resources[] = {
|
||||
{
|
||||
.name = "i2c",
|
||||
.start = I2C_PHYS_BASE,
|
||||
.end = I2C_PHYS_BASE + 0x1f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}, {
|
||||
.name = "i2c",
|
||||
.start = IRQ_KIRKWOOD_TWSI,
|
||||
.end = IRQ_KIRKWOOD_TWSI,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
|
|
|
@ -142,6 +142,8 @@ static unsigned int qnap_ts219_mpp_config[] __initdata = {
|
|||
MPP1_SPI_MOSI,
|
||||
MPP2_SPI_SCK,
|
||||
MPP3_SPI_MISO,
|
||||
MPP4_SATA1_ACTn,
|
||||
MPP5_SATA0_ACTn,
|
||||
MPP8_TW_SDA,
|
||||
MPP9_TW_SCK,
|
||||
MPP10_UART0_TXD,
|
||||
|
@ -150,10 +152,6 @@ static unsigned int qnap_ts219_mpp_config[] __initdata = {
|
|||
MPP14_UART1_RXD, /* PIC controller */
|
||||
MPP15_GPIO, /* USB Copy button */
|
||||
MPP16_GPIO, /* Reset button */
|
||||
MPP20_SATA1_ACTn,
|
||||
MPP21_SATA0_ACTn,
|
||||
MPP22_SATA1_PRESENTn,
|
||||
MPP23_SATA0_PRESENTn,
|
||||
0
|
||||
};
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
/* IO_START and IO_BASE are defined in hardware.h */
|
||||
|
||||
#define SYS_CLOCK_START (IO_START + SYS_CLCOK_OFF) /* Physical address */
|
||||
#define SYS_CLOCK_START (IO_START + SYS_CLOCK_OFF) /* Physical address */
|
||||
#define SYS_CLOCK_BASE (IO_BASE + SYS_CLOCK_OFF) /* Virtual address */
|
||||
|
||||
/* Define the interface to the SYS_CLOCK */
|
||||
|
|
|
@ -82,6 +82,9 @@ static struct platform_device loki_ge0 = {
|
|||
.id = 0,
|
||||
.num_resources = 1,
|
||||
.resource = loki_ge0_resources,
|
||||
.dev = {
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
},
|
||||
};
|
||||
|
||||
void __init loki_ge0_init(struct mv643xx_eth_platform_data *eth_data)
|
||||
|
@ -136,6 +139,9 @@ static struct platform_device loki_ge1 = {
|
|||
.id = 1,
|
||||
.num_resources = 1,
|
||||
.resource = loki_ge1_resources,
|
||||
.dev = {
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
},
|
||||
};
|
||||
|
||||
void __init loki_ge1_init(struct mv643xx_eth_platform_data *eth_data)
|
||||
|
|
|
@ -3,6 +3,11 @@
|
|||
|
||||
#include <mach/mfp.h>
|
||||
|
||||
#define MFP_DRIVE_VERY_SLOW (0x0 << 13)
|
||||
#define MFP_DRIVE_SLOW (0x1 << 13)
|
||||
#define MFP_DRIVE_MEDIUM (0x2 << 13)
|
||||
#define MFP_DRIVE_FAST (0x3 << 13)
|
||||
|
||||
/* GPIO */
|
||||
#define GPIO0_GPIO MFP_CFG(GPIO0, AF5)
|
||||
#define GPIO1_GPIO MFP_CFG(GPIO1, AF5)
|
||||
|
|
|
@ -3,6 +3,11 @@
|
|||
|
||||
#include <mach/mfp.h>
|
||||
|
||||
#define MFP_DRIVE_VERY_SLOW (0x0 << 13)
|
||||
#define MFP_DRIVE_SLOW (0x2 << 13)
|
||||
#define MFP_DRIVE_MEDIUM (0x4 << 13)
|
||||
#define MFP_DRIVE_FAST (0x8 << 13)
|
||||
|
||||
/* UART2 */
|
||||
#define GPIO47_UART2_RXD MFP_CFG(GPIO47, AF6)
|
||||
#define GPIO48_UART2_TXD MFP_CFG(GPIO48, AF6)
|
||||
|
|
|
@ -12,16 +12,13 @@
|
|||
* possible, we make the following compromise:
|
||||
*
|
||||
* 1. SLEEP_OE_N will always be programmed to '1' (by MFP_LPM_FLOAT)
|
||||
* 2. DRIVE strength definitions redefined to include the reserved bit10
|
||||
* 2. DRIVE strength definitions redefined to include the reserved bit
|
||||
* - the reserved bit differs between pxa168 and pxa910, and the
|
||||
* MFP_DRIVE_* macros are individually defined in mfp-pxa{168,910}.h
|
||||
* 3. Override MFP_CFG() and MFP_CFG_DRV()
|
||||
* 4. Drop the use of MFP_CFG_LPM() and MFP_CFG_X()
|
||||
*/
|
||||
|
||||
#define MFP_DRIVE_VERY_SLOW (0x0 << 13)
|
||||
#define MFP_DRIVE_SLOW (0x2 << 13)
|
||||
#define MFP_DRIVE_MEDIUM (0x4 << 13)
|
||||
#define MFP_DRIVE_FAST (0x8 << 13)
|
||||
|
||||
#undef MFP_CFG
|
||||
#undef MFP_CFG_DRV
|
||||
#undef MFP_CFG_LPM
|
||||
|
|
|
@ -136,7 +136,7 @@ static struct clock_event_device ckevt = {
|
|||
.set_mode = timer_set_mode,
|
||||
};
|
||||
|
||||
static cycle_t clksrc_read(void)
|
||||
static cycle_t clksrc_read(struct clocksource *cs)
|
||||
{
|
||||
return timer_read();
|
||||
}
|
||||
|
|
|
@ -321,6 +321,9 @@ static struct platform_device mv78xx0_ge00 = {
|
|||
.id = 0,
|
||||
.num_resources = 1,
|
||||
.resource = mv78xx0_ge00_resources,
|
||||
.dev = {
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
},
|
||||
};
|
||||
|
||||
void __init mv78xx0_ge00_init(struct mv643xx_eth_platform_data *eth_data)
|
||||
|
@ -375,6 +378,9 @@ static struct platform_device mv78xx0_ge01 = {
|
|||
.id = 1,
|
||||
.num_resources = 1,
|
||||
.resource = mv78xx0_ge01_resources,
|
||||
.dev = {
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
},
|
||||
};
|
||||
|
||||
void __init mv78xx0_ge01_init(struct mv643xx_eth_platform_data *eth_data)
|
||||
|
@ -429,6 +435,9 @@ static struct platform_device mv78xx0_ge10 = {
|
|||
.id = 2,
|
||||
.num_resources = 1,
|
||||
.resource = mv78xx0_ge10_resources,
|
||||
.dev = {
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
},
|
||||
};
|
||||
|
||||
void __init mv78xx0_ge10_init(struct mv643xx_eth_platform_data *eth_data)
|
||||
|
@ -496,6 +505,9 @@ static struct platform_device mv78xx0_ge11 = {
|
|||
.id = 3,
|
||||
.num_resources = 1,
|
||||
.resource = mv78xx0_ge11_resources,
|
||||
.dev = {
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
},
|
||||
};
|
||||
|
||||
void __init mv78xx0_ge11_init(struct mv643xx_eth_platform_data *eth_data)
|
||||
|
@ -532,12 +544,10 @@ static struct mv64xxx_i2c_pdata mv78xx0_i2c_0_pdata = {
|
|||
|
||||
static struct resource mv78xx0_i2c_0_resources[] = {
|
||||
{
|
||||
.name = "i2c 0 base",
|
||||
.start = I2C_0_PHYS_BASE,
|
||||
.end = I2C_0_PHYS_BASE + 0x1f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}, {
|
||||
.name = "i2c 0 irq",
|
||||
.start = IRQ_MV78XX0_I2C_0,
|
||||
.end = IRQ_MV78XX0_I2C_0,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
|
@ -567,12 +577,10 @@ static struct mv64xxx_i2c_pdata mv78xx0_i2c_1_pdata = {
|
|||
|
||||
static struct resource mv78xx0_i2c_1_resources[] = {
|
||||
{
|
||||
.name = "i2c 1 base",
|
||||
.start = I2C_1_PHYS_BASE,
|
||||
.end = I2C_1_PHYS_BASE + 0x1f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}, {
|
||||
.name = "i2c 1 irq",
|
||||
.start = IRQ_MV78XX0_I2C_1,
|
||||
.end = IRQ_MV78XX0_I2C_1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
|
|
|
@ -103,10 +103,10 @@ static struct omap_clk omap24xx_clks[] = {
|
|||
CLK(NULL, "mdm_ick", &mdm_ick, CK_243X),
|
||||
CLK(NULL, "mdm_osc_ck", &mdm_osc_ck, CK_243X),
|
||||
/* DSS domain clocks */
|
||||
CLK(NULL, "dss_ick", &dss_ick, CK_243X | CK_242X),
|
||||
CLK(NULL, "dss1_fck", &dss1_fck, CK_243X | CK_242X),
|
||||
CLK(NULL, "dss2_fck", &dss2_fck, CK_243X | CK_242X),
|
||||
CLK(NULL, "dss_54m_fck", &dss_54m_fck, CK_243X | CK_242X),
|
||||
CLK("omapfb", "ick", &dss_ick, CK_243X | CK_242X),
|
||||
CLK("omapfb", "dss1_fck", &dss1_fck, CK_243X | CK_242X),
|
||||
CLK("omapfb", "dss2_fck", &dss2_fck, CK_243X | CK_242X),
|
||||
CLK("omapfb", "tv_fck", &dss_54m_fck, CK_243X | CK_242X),
|
||||
/* L3 domain clocks */
|
||||
CLK(NULL, "core_l3_ck", &core_l3_ck, CK_243X | CK_242X),
|
||||
CLK(NULL, "ssi_fck", &ssi_ssr_sst_fck, CK_243X | CK_242X),
|
||||
|
@ -206,7 +206,7 @@ static struct omap_clk omap24xx_clks[] = {
|
|||
CLK(NULL, "aes_ick", &aes_ick, CK_243X | CK_242X),
|
||||
CLK(NULL, "pka_ick", &pka_ick, CK_243X | CK_242X),
|
||||
CLK(NULL, "usb_fck", &usb_fck, CK_243X | CK_242X),
|
||||
CLK(NULL, "usbhs_ick", &usbhs_ick, CK_243X),
|
||||
CLK("musb_hdrc", "ick", &usbhs_ick, CK_243X),
|
||||
CLK("mmci-omap-hs.0", "ick", &mmchs1_ick, CK_243X),
|
||||
CLK("mmci-omap-hs.0", "fck", &mmchs1_fck, CK_243X),
|
||||
CLK("mmci-omap-hs.1", "ick", &mmchs2_ick, CK_243X),
|
||||
|
|
|
@ -157,7 +157,7 @@ static struct omap_clk omap34xx_clks[] = {
|
|||
CLK(NULL, "ssi_ssr_fck", &ssi_ssr_fck, CK_343X),
|
||||
CLK(NULL, "ssi_sst_fck", &ssi_sst_fck, CK_343X),
|
||||
CLK(NULL, "core_l3_ick", &core_l3_ick, CK_343X),
|
||||
CLK(NULL, "hsotgusb_ick", &hsotgusb_ick, CK_343X),
|
||||
CLK("musb_hdrc", "ick", &hsotgusb_ick, CK_343X),
|
||||
CLK(NULL, "sdrc_ick", &sdrc_ick, CK_343X),
|
||||
CLK(NULL, "gpmc_fck", &gpmc_fck, CK_343X),
|
||||
CLK(NULL, "security_l3_ick", &security_l3_ick, CK_343X),
|
||||
|
@ -197,11 +197,11 @@ static struct omap_clk omap34xx_clks[] = {
|
|||
CLK("omap_rng", "ick", &rng_ick, CK_343X),
|
||||
CLK(NULL, "sha11_ick", &sha11_ick, CK_343X),
|
||||
CLK(NULL, "des1_ick", &des1_ick, CK_343X),
|
||||
CLK(NULL, "dss1_alwon_fck", &dss1_alwon_fck, CK_343X),
|
||||
CLK(NULL, "dss_tv_fck", &dss_tv_fck, CK_343X),
|
||||
CLK(NULL, "dss_96m_fck", &dss_96m_fck, CK_343X),
|
||||
CLK(NULL, "dss2_alwon_fck", &dss2_alwon_fck, CK_343X),
|
||||
CLK(NULL, "dss_ick", &dss_ick, CK_343X),
|
||||
CLK("omapfb", "dss1_fck", &dss1_alwon_fck, CK_343X),
|
||||
CLK("omapfb", "tv_fck", &dss_tv_fck, CK_343X),
|
||||
CLK("omapfb", "video_fck", &dss_96m_fck, CK_343X),
|
||||
CLK("omapfb", "dss2_fck", &dss2_alwon_fck, CK_343X),
|
||||
CLK("omapfb", "ick", &dss_ick, CK_343X),
|
||||
CLK(NULL, "cam_mclk", &cam_mclk, CK_343X),
|
||||
CLK(NULL, "cam_ick", &cam_ick, CK_343X),
|
||||
CLK(NULL, "csi2_96m_fck", &csi2_96m_fck, CK_343X),
|
||||
|
|
|
@ -2182,7 +2182,7 @@ static struct clk wkup_32k_fck = {
|
|||
|
||||
static struct clk gpio1_dbck = {
|
||||
.name = "gpio1_dbck",
|
||||
.ops = &clkops_omap2_dflt_wait,
|
||||
.ops = &clkops_omap2_dflt,
|
||||
.parent = &wkup_32k_fck,
|
||||
.enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
|
||||
.enable_bit = OMAP3430_EN_GPIO1_SHIFT,
|
||||
|
@ -2427,7 +2427,7 @@ static struct clk per_32k_alwon_fck = {
|
|||
|
||||
static struct clk gpio6_dbck = {
|
||||
.name = "gpio6_dbck",
|
||||
.ops = &clkops_omap2_dflt_wait,
|
||||
.ops = &clkops_omap2_dflt,
|
||||
.parent = &per_32k_alwon_fck,
|
||||
.enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
|
||||
.enable_bit = OMAP3430_EN_GPIO6_SHIFT,
|
||||
|
@ -2437,7 +2437,7 @@ static struct clk gpio6_dbck = {
|
|||
|
||||
static struct clk gpio5_dbck = {
|
||||
.name = "gpio5_dbck",
|
||||
.ops = &clkops_omap2_dflt_wait,
|
||||
.ops = &clkops_omap2_dflt,
|
||||
.parent = &per_32k_alwon_fck,
|
||||
.enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
|
||||
.enable_bit = OMAP3430_EN_GPIO5_SHIFT,
|
||||
|
@ -2447,7 +2447,7 @@ static struct clk gpio5_dbck = {
|
|||
|
||||
static struct clk gpio4_dbck = {
|
||||
.name = "gpio4_dbck",
|
||||
.ops = &clkops_omap2_dflt_wait,
|
||||
.ops = &clkops_omap2_dflt,
|
||||
.parent = &per_32k_alwon_fck,
|
||||
.enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
|
||||
.enable_bit = OMAP3430_EN_GPIO4_SHIFT,
|
||||
|
@ -2457,7 +2457,7 @@ static struct clk gpio4_dbck = {
|
|||
|
||||
static struct clk gpio3_dbck = {
|
||||
.name = "gpio3_dbck",
|
||||
.ops = &clkops_omap2_dflt_wait,
|
||||
.ops = &clkops_omap2_dflt,
|
||||
.parent = &per_32k_alwon_fck,
|
||||
.enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
|
||||
.enable_bit = OMAP3430_EN_GPIO3_SHIFT,
|
||||
|
@ -2467,7 +2467,7 @@ static struct clk gpio3_dbck = {
|
|||
|
||||
static struct clk gpio2_dbck = {
|
||||
.name = "gpio2_dbck",
|
||||
.ops = &clkops_omap2_dflt_wait,
|
||||
.ops = &clkops_omap2_dflt,
|
||||
.parent = &per_32k_alwon_fck,
|
||||
.enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
|
||||
.enable_bit = OMAP3430_EN_GPIO2_SHIFT,
|
||||
|
|
|
@ -354,10 +354,12 @@ static void omap_init_mcspi(void)
|
|||
platform_device_register(&omap2_mcspi1);
|
||||
platform_device_register(&omap2_mcspi2);
|
||||
#if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3)
|
||||
platform_device_register(&omap2_mcspi3);
|
||||
if (cpu_is_omap2430() || cpu_is_omap343x())
|
||||
platform_device_register(&omap2_mcspi3);
|
||||
#endif
|
||||
#ifdef CONFIG_ARCH_OMAP3
|
||||
platform_device_register(&omap2_mcspi4);
|
||||
if (cpu_is_omap343x())
|
||||
platform_device_register(&omap2_mcspi4);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -409,7 +409,7 @@
|
|||
/* PM_PREPWSTST_CAM specific bits */
|
||||
|
||||
/* PM_PWSTCTRL_USBHOST specific bits */
|
||||
#define OMAP3430ES2_SAVEANDRESTORE_SHIFT (1 << 4)
|
||||
#define OMAP3430ES2_SAVEANDRESTORE_SHIFT 4
|
||||
|
||||
/* RM_RSTST_PER specific bits */
|
||||
|
||||
|
|
|
@ -187,7 +187,7 @@ int tusb6010_platform_retime(unsigned is_refclk)
|
|||
unsigned sysclk_ps;
|
||||
int status;
|
||||
|
||||
if (!refclk_psec || sysclk_ps == 0)
|
||||
if (!refclk_psec || fclk_ps == 0)
|
||||
return -ENODEV;
|
||||
|
||||
sysclk_ps = is_refclk ? refclk_psec : TUSB6010_OSCCLK_60;
|
||||
|
|
|
@ -188,6 +188,9 @@ static struct platform_device orion5x_eth = {
|
|||
.id = 0,
|
||||
.num_resources = 1,
|
||||
.resource = orion5x_eth_resources,
|
||||
.dev = {
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
},
|
||||
};
|
||||
|
||||
void __init orion5x_eth_init(struct mv643xx_eth_platform_data *eth_data)
|
||||
|
@ -248,12 +251,10 @@ static struct mv64xxx_i2c_pdata orion5x_i2c_pdata = {
|
|||
|
||||
static struct resource orion5x_i2c_resources[] = {
|
||||
{
|
||||
.name = "i2c base",
|
||||
.start = I2C_PHYS_BASE,
|
||||
.end = I2C_PHYS_BASE + 0x1f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}, {
|
||||
.name = "i2c irq",
|
||||
.start = IRQ_ORION5X_I2C,
|
||||
.end = IRQ_ORION5X_I2C,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
|
|
|
@ -111,9 +111,9 @@ static unsigned long ezx_pin_config[] __initdata = {
|
|||
GPIO25_SSP1_TXD,
|
||||
GPIO26_SSP1_RXD,
|
||||
GPIO24_GPIO, /* pcap chip select */
|
||||
GPIO1_GPIO, /* pcap interrupt */
|
||||
GPIO4_GPIO, /* WDI_AP */
|
||||
GPIO55_GPIO, /* SYS_RESTART */
|
||||
GPIO1_GPIO | WAKEUP_ON_EDGE_RISE, /* pcap interrupt */
|
||||
GPIO4_GPIO | MFP_LPM_DRIVE_HIGH, /* WDI_AP */
|
||||
GPIO55_GPIO | MFP_LPM_DRIVE_HIGH, /* SYS_RESTART */
|
||||
|
||||
/* MMC */
|
||||
GPIO32_MMC_CLK,
|
||||
|
@ -144,20 +144,20 @@ static unsigned long ezx_pin_config[] __initdata = {
|
|||
#if defined(CONFIG_MACH_EZX_A780) || defined(CONFIG_MACH_EZX_E680)
|
||||
static unsigned long gen1_pin_config[] __initdata = {
|
||||
/* flip / lockswitch */
|
||||
GPIO12_GPIO,
|
||||
GPIO12_GPIO | WAKEUP_ON_EDGE_BOTH,
|
||||
|
||||
/* bluetooth (bcm2035) */
|
||||
GPIO14_GPIO | WAKEUP_ON_LEVEL_HIGH, /* HOSTWAKE */
|
||||
GPIO14_GPIO | WAKEUP_ON_EDGE_RISE, /* HOSTWAKE */
|
||||
GPIO48_GPIO, /* RESET */
|
||||
GPIO28_GPIO, /* WAKEUP */
|
||||
|
||||
/* Neptune handshake */
|
||||
GPIO0_GPIO | WAKEUP_ON_LEVEL_HIGH, /* BP_RDY */
|
||||
GPIO57_GPIO, /* AP_RDY */
|
||||
GPIO13_GPIO | WAKEUP_ON_LEVEL_HIGH, /* WDI */
|
||||
GPIO3_GPIO | WAKEUP_ON_LEVEL_HIGH, /* WDI2 */
|
||||
GPIO82_GPIO, /* RESET */
|
||||
GPIO99_GPIO, /* TC_MM_EN */
|
||||
GPIO0_GPIO | WAKEUP_ON_EDGE_FALL, /* BP_RDY */
|
||||
GPIO57_GPIO | MFP_LPM_DRIVE_HIGH, /* AP_RDY */
|
||||
GPIO13_GPIO | WAKEUP_ON_EDGE_BOTH, /* WDI */
|
||||
GPIO3_GPIO | WAKEUP_ON_EDGE_BOTH, /* WDI2 */
|
||||
GPIO82_GPIO | MFP_LPM_DRIVE_HIGH, /* RESET */
|
||||
GPIO99_GPIO | MFP_LPM_DRIVE_HIGH, /* TC_MM_EN */
|
||||
|
||||
/* sound */
|
||||
GPIO52_SSP3_SCLK,
|
||||
|
@ -199,21 +199,21 @@ static unsigned long gen1_pin_config[] __initdata = {
|
|||
defined(CONFIG_MACH_EZX_E2) || defined(CONFIG_MACH_EZX_E6)
|
||||
static unsigned long gen2_pin_config[] __initdata = {
|
||||
/* flip / lockswitch */
|
||||
GPIO15_GPIO,
|
||||
GPIO15_GPIO | WAKEUP_ON_EDGE_BOTH,
|
||||
|
||||
/* EOC */
|
||||
GPIO10_GPIO,
|
||||
GPIO10_GPIO | WAKEUP_ON_EDGE_RISE,
|
||||
|
||||
/* bluetooth (bcm2045) */
|
||||
GPIO13_GPIO | WAKEUP_ON_LEVEL_HIGH, /* HOSTWAKE */
|
||||
GPIO13_GPIO | WAKEUP_ON_EDGE_RISE, /* HOSTWAKE */
|
||||
GPIO37_GPIO, /* RESET */
|
||||
GPIO57_GPIO, /* WAKEUP */
|
||||
|
||||
/* Neptune handshake */
|
||||
GPIO0_GPIO | WAKEUP_ON_LEVEL_HIGH, /* BP_RDY */
|
||||
GPIO96_GPIO, /* AP_RDY */
|
||||
GPIO3_GPIO | WAKEUP_ON_LEVEL_HIGH, /* WDI */
|
||||
GPIO116_GPIO, /* RESET */
|
||||
GPIO0_GPIO | WAKEUP_ON_EDGE_FALL, /* BP_RDY */
|
||||
GPIO96_GPIO | MFP_LPM_DRIVE_HIGH, /* AP_RDY */
|
||||
GPIO3_GPIO | WAKEUP_ON_EDGE_FALL, /* WDI */
|
||||
GPIO116_GPIO | MFP_LPM_DRIVE_HIGH, /* RESET */
|
||||
GPIO41_GPIO, /* BP_FLASH */
|
||||
|
||||
/* sound */
|
||||
|
|
|
@ -13,8 +13,9 @@ extern void clear_reset_status(unsigned int mask);
|
|||
/**
|
||||
* init_gpio_reset() - register GPIO as reset generator
|
||||
* @gpio: gpio nr
|
||||
* @output: set gpio as out/low instead of input during normal work
|
||||
* @output: set gpio as output instead of input during normal work
|
||||
* @level: output level
|
||||
*/
|
||||
extern int init_gpio_reset(int gpio, int output);
|
||||
extern int init_gpio_reset(int gpio, int output, int level);
|
||||
|
||||
#endif /* __ASM_ARCH_RESET_H */
|
||||
|
|
|
@ -322,6 +322,7 @@ static inline void pxa27x_mfp_init(void) {}
|
|||
#ifdef CONFIG_PM
|
||||
static unsigned long saved_gafr[2][4];
|
||||
static unsigned long saved_gpdr[4];
|
||||
static unsigned long saved_pgsr[4];
|
||||
|
||||
static int pxa2xx_mfp_suspend(struct sys_device *d, pm_message_t state)
|
||||
{
|
||||
|
@ -332,6 +333,7 @@ static int pxa2xx_mfp_suspend(struct sys_device *d, pm_message_t state)
|
|||
saved_gafr[0][i] = GAFR_L(i);
|
||||
saved_gafr[1][i] = GAFR_U(i);
|
||||
saved_gpdr[i] = GPDR(i * 32);
|
||||
saved_pgsr[i] = PGSR(i);
|
||||
|
||||
GPDR(i * 32) = gpdr_lpm[i];
|
||||
}
|
||||
|
@ -346,6 +348,7 @@ static int pxa2xx_mfp_resume(struct sys_device *d)
|
|||
GAFR_L(i) = saved_gafr[0][i];
|
||||
GAFR_U(i) = saved_gafr[1][i];
|
||||
GPDR(i * 32) = saved_gpdr[i];
|
||||
PGSR(i) = saved_pgsr[i];
|
||||
}
|
||||
PSSR = PSSR_RDH | PSSR_PH;
|
||||
return 0;
|
||||
|
@ -374,6 +377,9 @@ static int __init pxa2xx_mfp_init(void)
|
|||
if (cpu_is_pxa27x())
|
||||
pxa27x_mfp_init();
|
||||
|
||||
/* clear RDH bit to enable GPIO receivers after reset/sleep exit */
|
||||
PSSR = PSSR_RDH;
|
||||
|
||||
/* initialize gafr_run[], pgsr_lpm[] from existing values */
|
||||
for (i = 0; i <= gpio_to_bank(pxa_last_gpio); i++)
|
||||
gpdr_lpm[i] = GPDR(i * 32);
|
||||
|
|
|
@ -62,6 +62,8 @@ static unsigned long palmld_pin_config[] __initdata = {
|
|||
GPIO29_AC97_SDATA_IN_0,
|
||||
GPIO30_AC97_SDATA_OUT,
|
||||
GPIO31_AC97_SYNC,
|
||||
GPIO89_AC97_SYSCLK,
|
||||
GPIO95_AC97_nRESET,
|
||||
|
||||
/* IrDA */
|
||||
GPIO108_GPIO, /* ir disable */
|
||||
|
|
|
@ -64,6 +64,7 @@ static unsigned long palmt5_pin_config[] __initdata = {
|
|||
GPIO29_AC97_SDATA_IN_0,
|
||||
GPIO30_AC97_SDATA_OUT,
|
||||
GPIO31_AC97_SYNC,
|
||||
GPIO89_AC97_SYSCLK,
|
||||
GPIO95_AC97_nRESET,
|
||||
|
||||
/* IrDA */
|
||||
|
|
|
@ -65,6 +65,7 @@ static unsigned long palmtx_pin_config[] __initdata = {
|
|||
GPIO29_AC97_SDATA_IN_0,
|
||||
GPIO30_AC97_SDATA_OUT,
|
||||
GPIO31_AC97_SYNC,
|
||||
GPIO89_AC97_SYSCLK,
|
||||
GPIO95_AC97_nRESET,
|
||||
|
||||
/* IrDA */
|
||||
|
|
|
@ -20,7 +20,7 @@ static void do_hw_reset(void);
|
|||
|
||||
static int reset_gpio = -1;
|
||||
|
||||
int init_gpio_reset(int gpio, int output)
|
||||
int init_gpio_reset(int gpio, int output, int level)
|
||||
{
|
||||
int rc;
|
||||
|
||||
|
@ -31,7 +31,7 @@ int init_gpio_reset(int gpio, int output)
|
|||
}
|
||||
|
||||
if (output)
|
||||
rc = gpio_direction_output(gpio, 0);
|
||||
rc = gpio_direction_output(gpio, level);
|
||||
else
|
||||
rc = gpio_direction_input(gpio);
|
||||
if (rc) {
|
||||
|
|
|
@ -531,9 +531,15 @@ static int spitz_ohci_init(struct device *dev)
|
|||
return gpio_direction_output(SPITZ_GPIO_USB_HOST, 1);
|
||||
}
|
||||
|
||||
static void spitz_ohci_exit(struct device *dev)
|
||||
{
|
||||
gpio_free(SPITZ_GPIO_USB_HOST);
|
||||
}
|
||||
|
||||
static struct pxaohci_platform_data spitz_ohci_platform_data = {
|
||||
.port_mode = PMM_NPS_MODE,
|
||||
.init = spitz_ohci_init,
|
||||
.exit = spitz_ohci_exit,
|
||||
.flags = ENABLE_PORT_ALL | NO_OC_PROTECTION,
|
||||
.power_budget = 150,
|
||||
};
|
||||
|
@ -731,7 +737,7 @@ static void spitz_restart(char mode, const char *cmd)
|
|||
|
||||
static void __init common_init(void)
|
||||
{
|
||||
init_gpio_reset(SPITZ_GPIO_ON_RESET, 1);
|
||||
init_gpio_reset(SPITZ_GPIO_ON_RESET, 1, 0);
|
||||
pm_power_off = spitz_poweroff;
|
||||
arm_pm_restart = spitz_restart;
|
||||
|
||||
|
|
|
@ -897,7 +897,7 @@ static void __init tosa_init(void)
|
|||
gpio_set_wake(MFP_PIN_GPIO1, 1);
|
||||
/* We can't pass to gpio-keys since it will drop the Reset altfunc */
|
||||
|
||||
init_gpio_reset(TOSA_GPIO_ON_RESET, 0);
|
||||
init_gpio_reset(TOSA_GPIO_ON_RESET, 0, 0);
|
||||
|
||||
pm_power_off = tosa_poweroff;
|
||||
arm_pm_restart = tosa_restart;
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
#include <mach/audio.h>
|
||||
#include <mach/pxafb.h>
|
||||
#include <mach/i2c.h>
|
||||
#include <mach/regs-uart.h>
|
||||
#include <mach/viper.h>
|
||||
|
||||
#include <asm/setup.h>
|
||||
|
|
|
@ -750,14 +750,6 @@ void __init realview_timer_init(unsigned int timer_irq)
|
|||
{
|
||||
u32 val;
|
||||
|
||||
#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
|
||||
/*
|
||||
* The dummy clock device has to be registered before the main device
|
||||
* so that the latter will broadcast the clock events
|
||||
*/
|
||||
local_timer_setup();
|
||||
#endif
|
||||
|
||||
/*
|
||||
* set clock frequency:
|
||||
* REALVIEW_REFCLK is 32KHz
|
||||
|
|
|
@ -15,16 +15,9 @@
|
|||
/*
|
||||
* We use IRQ1 as the IPI
|
||||
*/
|
||||
static inline void smp_cross_call(cpumask_t callmap)
|
||||
{
|
||||
gic_raise_softirq(callmap, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Do nothing on MPcore.
|
||||
*/
|
||||
static inline void smp_cross_call_done(cpumask_t callmap)
|
||||
static inline void smp_cross_call(const struct cpumask *mask)
|
||||
{
|
||||
gic_raise_softirq(mask, 1);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -189,8 +189,10 @@ void __cpuinit local_timer_setup(void)
|
|||
struct clock_event_device *clk = &per_cpu(local_clockevent, cpu);
|
||||
|
||||
clk->name = "dummy_timer";
|
||||
clk->features = CLOCK_EVT_FEAT_DUMMY;
|
||||
clk->rating = 200;
|
||||
clk->features = CLOCK_EVT_FEAT_ONESHOT |
|
||||
CLOCK_EVT_FEAT_PERIODIC |
|
||||
CLOCK_EVT_FEAT_DUMMY;
|
||||
clk->rating = 400;
|
||||
clk->mult = 1;
|
||||
clk->set_mode = dummy_timer_set_mode;
|
||||
clk->broadcast = smp_timer_broadcast;
|
||||
|
|
|
@ -77,13 +77,6 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
|
|||
{
|
||||
trace_hardirqs_off();
|
||||
|
||||
/*
|
||||
* the primary core may have used a "cross call" soft interrupt
|
||||
* to get this processor out of WFI in the BootMonitor - make
|
||||
* sure that we are no longer being sent this soft interrupt
|
||||
*/
|
||||
smp_cross_call_done(cpumask_of_cpu(cpu));
|
||||
|
||||
/*
|
||||
* if any interrupts are already enabled for the primary
|
||||
* core (e.g. timer irq), then they will not have been enabled
|
||||
|
@ -136,7 +129,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
|
|||
* Use smp_cross_call() for this, since there's little
|
||||
* point duplicating the code here
|
||||
*/
|
||||
smp_cross_call(cpumask_of_cpu(cpu));
|
||||
smp_cross_call(cpumask_of(cpu));
|
||||
|
||||
timeout = jiffies + (1 * HZ);
|
||||
while (time_before(jiffies, timeout)) {
|
||||
|
@ -224,11 +217,9 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
|
|||
if (max_cpus > ncores)
|
||||
max_cpus = ncores;
|
||||
|
||||
#ifdef CONFIG_LOCAL_TIMERS
|
||||
#if defined(CONFIG_LOCAL_TIMERS) || defined(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST)
|
||||
/*
|
||||
* Enable the local timer for primary CPU. If the device is
|
||||
* dummy (!CONFIG_LOCAL_TIMERS), it was already registers in
|
||||
* realview_timer_init
|
||||
* Enable the local timer or broadcast device for the boot CPU.
|
||||
*/
|
||||
local_timer_setup();
|
||||
#endif
|
||||
|
|
|
@ -588,8 +588,6 @@ static void __init bast_map_io(void)
|
|||
|
||||
s3c_device_nand.dev.platform_data = &bast_nand_info;
|
||||
|
||||
s3c_i2c0_set_platdata(&bast_i2c_info);
|
||||
|
||||
s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc));
|
||||
s3c24xx_init_clocks(0);
|
||||
s3c24xx_init_uarts(bast_uartcfgs, ARRAY_SIZE(bast_uartcfgs));
|
||||
|
@ -602,6 +600,7 @@ static void __init bast_init(void)
|
|||
sysdev_class_register(&bast_pm_sysclass);
|
||||
sysdev_register(&bast_pm_sysdev);
|
||||
|
||||
s3c_i2c0_set_platdata(&bast_i2c_info);
|
||||
s3c24xx_fb_set_platdata(&bast_fb_info);
|
||||
platform_add_devices(bast_devices, ARRAY_SIZE(bast_devices));
|
||||
|
||||
|
|
|
@ -413,7 +413,7 @@ static struct clk ref24_clk = {
|
|||
.rate = 24000000,
|
||||
};
|
||||
|
||||
static struct clk_lookup lookups[] __initdata = {
|
||||
static struct clk_lookup lookups[] = {
|
||||
{ /* UART0 */
|
||||
.dev_id = "dev:f1",
|
||||
.clk = &ref24_clk,
|
||||
|
|
|
@ -114,4 +114,8 @@ extern unsigned int SingleCPDO(struct roundingData *roundData,
|
|||
extern unsigned int DoubleCPDO(struct roundingData *roundData,
|
||||
const unsigned int opcode, FPREG * rFd);
|
||||
|
||||
/* extneded_cpdo.c */
|
||||
extern unsigned int ExtendedCPDO(struct roundingData *roundData,
|
||||
const unsigned int opcode, FPREG * rFd);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -27,10 +27,6 @@
|
|||
#include "fpmodule.inl"
|
||||
#include "softfloat.h"
|
||||
|
||||
#ifdef CONFIG_FPE_NWFPE_XP
|
||||
extern flag floatx80_is_nan(floatx80);
|
||||
#endif
|
||||
|
||||
unsigned int PerformFLT(const unsigned int opcode);
|
||||
unsigned int PerformFIX(const unsigned int opcode);
|
||||
|
||||
|
|
|
@ -226,6 +226,8 @@ char floatx80_le_quiet( floatx80, floatx80 );
|
|||
char floatx80_lt_quiet( floatx80, floatx80 );
|
||||
char floatx80_is_signaling_nan( floatx80 );
|
||||
|
||||
extern flag floatx80_is_nan(floatx80);
|
||||
|
||||
#endif
|
||||
|
||||
static inline flag extractFloat32Sign(float32 a)
|
||||
|
|
|
@ -206,9 +206,10 @@ void __init omapfb_reserve_sdram(void)
|
|||
config_invalid = 1;
|
||||
return;
|
||||
}
|
||||
if (rg.paddr)
|
||||
if (rg.paddr) {
|
||||
reserve_bootmem(rg.paddr, rg.size, BOOTMEM_DEFAULT);
|
||||
reserved += rg.size;
|
||||
reserved += rg.size;
|
||||
}
|
||||
omapfb_config.mem_desc.region[i] = rg;
|
||||
configured_regions++;
|
||||
}
|
||||
|
|
|
@ -307,7 +307,7 @@ static inline int gpio_valid(int gpio)
|
|||
return 0;
|
||||
if (cpu_is_omap24xx() && gpio < 128)
|
||||
return 0;
|
||||
if (cpu_is_omap34xx() && gpio < 160)
|
||||
if (cpu_is_omap34xx() && gpio < 192)
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -306,8 +306,6 @@ struct clk s3c24xx_uclk = {
|
|||
|
||||
int s3c24xx_register_clock(struct clk *clk)
|
||||
{
|
||||
clk->owner = THIS_MODULE;
|
||||
|
||||
if (clk->enable == NULL)
|
||||
clk->enable = clk_null_enable;
|
||||
|
||||
|
|
|
@ -1235,7 +1235,7 @@ int s3c2410_dma_getposition(unsigned int channel, dma_addr_t *src, dma_addr_t *d
|
|||
|
||||
EXPORT_SYMBOL(s3c2410_dma_getposition);
|
||||
|
||||
static struct s3c2410_dma_chan *to_dma_chan(struct sys_device *dev)
|
||||
static inline struct s3c2410_dma_chan *to_dma_chan(struct sys_device *dev)
|
||||
{
|
||||
return container_of(dev, struct s3c2410_dma_chan, dev);
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
#if 1
|
||||
#define gpio_dbg(x...) do { } while(0)
|
||||
#else
|
||||
#define gpio_dbg(x...) printk(KERN_DEBUG ## x)
|
||||
#define gpio_dbg(x...) printk(KERN_DEBUG x)
|
||||
#endif
|
||||
|
||||
/* The s3c64xx_gpiolib_4bit routines are to control the gpio banks where
|
||||
|
|
|
@ -61,14 +61,14 @@
|
|||
#define S3C64XX_GPH7_ADDR_CF1 (0x06 << 28)
|
||||
#define S3C64XX_GPH7_EINT_G6_7 (0x07 << 28)
|
||||
|
||||
#define S3C64XX_GPH8_MMC1_DATA6 (0x02 << 32)
|
||||
#define S3C64XX_GPH8_MMC2_DATA2 (0x03 << 32)
|
||||
#define S3C64XX_GPH8_I2S_V40_LRCLK (0x05 << 32)
|
||||
#define S3C64XX_GPH8_ADDR_CF2 (0x06 << 32)
|
||||
#define S3C64XX_GPH8_EINT_G6_8 (0x07 << 32)
|
||||
|
||||
#define S3C64XX_GPH9_MMC1_DATA7 (0x02 << 36)
|
||||
#define S3C64XX_GPH9_MMC2_DATA3 (0x03 << 36)
|
||||
#define S3C64XX_GPH9_I2S_V40_DI (0x05 << 36)
|
||||
#define S3C64XX_GPH9_EINT_G6_9 (0x07 << 36)
|
||||
#define S3C64XX_GPH8_MMC1_DATA6 (0x02 << 0)
|
||||
#define S3C64XX_GPH8_MMC2_DATA2 (0x03 << 0)
|
||||
#define S3C64XX_GPH8_I2S_V40_LRCLK (0x05 << 0)
|
||||
#define S3C64XX_GPH8_ADDR_CF2 (0x06 << 0)
|
||||
#define S3C64XX_GPH8_EINT_G6_8 (0x07 << 0)
|
||||
|
||||
#define S3C64XX_GPH9_OUTPUT (0x01 << 4)
|
||||
#define S3C64XX_GPH9_MMC1_DATA7 (0x02 << 4)
|
||||
#define S3C64XX_GPH9_MMC2_DATA3 (0x03 << 4)
|
||||
#define S3C64XX_GPH9_I2S_V40_DI (0x05 << 4)
|
||||
#define S3C64XX_GPH9_EINT_G6_9 (0x07 << 4)
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#
|
||||
# http://www.arm.linux.org.uk/developer/machines/?action=new
|
||||
#
|
||||
# Last update: Mon Mar 23 20:09:01 2009
|
||||
# Last update: Fri May 29 10:14:20 2009
|
||||
#
|
||||
# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
|
||||
#
|
||||
|
@ -916,7 +916,7 @@ nxdb500 MACH_NXDB500 NXDB500 905
|
|||
apf9328 MACH_APF9328 APF9328 906
|
||||
omap_wipoq MACH_OMAP_WIPOQ OMAP_WIPOQ 907
|
||||
omap_twip MACH_OMAP_TWIP OMAP_TWIP 908
|
||||
palmt650 MACH_PALMT650 PALMT650 909
|
||||
treo650 MACH_TREO650 TREO650 909
|
||||
acumen MACH_ACUMEN ACUMEN 910
|
||||
xp100 MACH_XP100 XP100 911
|
||||
fs2410 MACH_FS2410 FS2410 912
|
||||
|
@ -1232,7 +1232,7 @@ ql202b MACH_QL202B QL202B 1226
|
|||
vpac270 MACH_VPAC270 VPAC270 1227
|
||||
rd129 MACH_RD129 RD129 1228
|
||||
htcwizard MACH_HTCWIZARD HTCWIZARD 1229
|
||||
xscale_treo680 MACH_XSCALE_TREO680 XSCALE_TREO680 1230
|
||||
treo680 MACH_TREO680 TREO680 1230
|
||||
tecon_tmezon MACH_TECON_TMEZON TECON_TMEZON 1231
|
||||
zylonite MACH_ZYLONITE ZYLONITE 1233
|
||||
gene1270 MACH_GENE1270 GENE1270 1234
|
||||
|
@ -1418,10 +1418,10 @@ looxc550 MACH_LOOXC550 LOOXC550 1417
|
|||
cnty_titan MACH_CNTY_TITAN CNTY_TITAN 1418
|
||||
app3xx MACH_APP3XX APP3XX 1419
|
||||
sideoatsgrama MACH_SIDEOATSGRAMA SIDEOATSGRAMA 1420
|
||||
palmtreo700p MACH_PALMTREO700P PALMTREO700P 1421
|
||||
palmtreo700w MACH_PALMTREO700W PALMTREO700W 1422
|
||||
palmtreo750 MACH_PALMTREO750 PALMTREO750 1423
|
||||
palmtreo755p MACH_PALMTREO755P PALMTREO755P 1424
|
||||
treo700p MACH_TREO700P TREO700P 1421
|
||||
treo700w MACH_TREO700W TREO700W 1422
|
||||
treo750 MACH_TREO750 TREO750 1423
|
||||
treo755p MACH_TREO755P TREO755P 1424
|
||||
ezreganut9200 MACH_EZREGANUT9200 EZREGANUT9200 1425
|
||||
sarge MACH_SARGE SARGE 1426
|
||||
a696 MACH_A696 A696 1427
|
||||
|
@ -1721,7 +1721,7 @@ sapphire MACH_SAPPHIRE SAPPHIRE 1729
|
|||
csb637xo MACH_CSB637XO CSB637XO 1730
|
||||
evisiong MACH_EVISIONG EVISIONG 1731
|
||||
stmp37xx MACH_STMP37XX STMP37XX 1732
|
||||
stmp378x MACH_STMP38XX STMP38XX 1733
|
||||
stmp378x MACH_STMP378X STMP378X 1733
|
||||
tnt MACH_TNT TNT 1734
|
||||
tbxt MACH_TBXT TBXT 1735
|
||||
playmate MACH_PLAYMATE PLAYMATE 1736
|
||||
|
@ -1817,7 +1817,7 @@ smdkc100 MACH_SMDKC100 SMDKC100 1826
|
|||
tavorevb MACH_TAVOREVB TAVOREVB 1827
|
||||
saar MACH_SAAR SAAR 1828
|
||||
deister_eyecam MACH_DEISTER_EYECAM DEISTER_EYECAM 1829
|
||||
at91sam9m10ek MACH_AT91SAM9M10EK AT91SAM9M10EK 1830
|
||||
at91sam9m10g45ek MACH_AT91SAM9M10G45EK AT91SAM9M10G45EK 1830
|
||||
linkstation_produo MACH_LINKSTATION_PRODUO LINKSTATION_PRODUO 1831
|
||||
hit_b0 MACH_HIT_B0 HIT_B0 1832
|
||||
adx_rmu MACH_ADX_RMU ADX_RMU 1833
|
||||
|
@ -2132,3 +2132,116 @@ apollo MACH_APOLLO APOLLO 2141
|
|||
at91cap9stk MACH_AT91CAP9STK AT91CAP9STK 2142
|
||||
spc300 MACH_SPC300 SPC300 2143
|
||||
eko MACH_EKO EKO 2144
|
||||
ccw9m2443 MACH_CCW9M2443 CCW9M2443 2145
|
||||
ccw9m2443js MACH_CCW9M2443JS CCW9M2443JS 2146
|
||||
m2m_router_device MACH_M2M_ROUTER_DEVICE M2M_ROUTER_DEVICE 2147
|
||||
str9104nas MACH_STAR9104NAS STAR9104NAS 2148
|
||||
pca100 MACH_PCA100 PCA100 2149
|
||||
z3_dm365_mod_01 MACH_Z3_DM365_MOD_01 Z3_DM365_MOD_01 2150
|
||||
hipox MACH_HIPOX HIPOX 2151
|
||||
omap3_piteds MACH_OMAP3_PITEDS OMAP3_PITEDS 2152
|
||||
bm150r MACH_BM150R BM150R 2153
|
||||
tbone MACH_TBONE TBONE 2154
|
||||
merlin MACH_MERLIN MERLIN 2155
|
||||
falcon MACH_FALCON FALCON 2156
|
||||
davinci_da850_evm MACH_DAVINCI_DA850_EVM DAVINCI_DA850_EVM 2157
|
||||
s5p6440 MACH_S5P6440 S5P6440 2158
|
||||
at91sam9g10ek MACH_AT91SAM9G10EK AT91SAM9G10EK 2159
|
||||
omap_4430sdp MACH_OMAP_4430SDP OMAP_4430SDP 2160
|
||||
lpc313x MACH_LPC313X LPC313X 2161
|
||||
magx_zn5 MACH_MAGX_ZN5 MAGX_ZN5 2162
|
||||
magx_em30 MACH_MAGX_EM30 MAGX_EM30 2163
|
||||
magx_ve66 MACH_MAGX_VE66 MAGX_VE66 2164
|
||||
meesc MACH_MEESC MEESC 2165
|
||||
otc570 MACH_OTC570 OTC570 2166
|
||||
bcu2412 MACH_BCU2412 BCU2412 2167
|
||||
beacon MACH_BEACON BEACON 2168
|
||||
actia_tgw MACH_ACTIA_TGW ACTIA_TGW 2169
|
||||
e4430 MACH_E4430 E4430 2170
|
||||
ql300 MACH_QL300 QL300 2171
|
||||
btmavb101 MACH_BTMAVB101 BTMAVB101 2172
|
||||
btmawb101 MACH_BTMAWB101 BTMAWB101 2173
|
||||
sq201 MACH_SQ201 SQ201 2174
|
||||
quatro45xx MACH_QUATRO45XX QUATRO45XX 2175
|
||||
openpad MACH_OPENPAD OPENPAD 2176
|
||||
tx25 MACH_TX25 TX25 2177
|
||||
omap3_torpedo MACH_OMAP3_TORPEDO OMAP3_TORPEDO 2178
|
||||
htcraphael_k MACH_HTCRAPHAEL_K HTCRAPHAEL_K 2179
|
||||
lal43 MACH_LAL43 LAL43 2181
|
||||
htcraphael_cdma500 MACH_HTCRAPHAEL_CDMA500 HTCRAPHAEL_CDMA500 2182
|
||||
anw6410 MACH_ANW6410 ANW6410 2183
|
||||
htcprophet MACH_HTCPROPHET HTCPROPHET 2185
|
||||
cfa_10022 MACH_CFA_10022 CFA_10022 2186
|
||||
imx27_visstrim_m10 MACH_IMX27_VISSTRIM_M10 IMX27_VISSTRIM_M10 2187
|
||||
px2imx27 MACH_PX2IMX27 PX2IMX27 2188
|
||||
stm3210e_eval MACH_STM3210E_EVAL STM3210E_EVAL 2189
|
||||
dvs10 MACH_DVS10 DVS10 2190
|
||||
portuxg20 MACH_PORTUXG20 PORTUXG20 2191
|
||||
arm_spv MACH_ARM_SPV ARM_SPV 2192
|
||||
smdkc110 MACH_SMDKC110 SMDKC110 2193
|
||||
cabespresso MACH_CABESPRESSO CABESPRESSO 2194
|
||||
hmc800 MACH_HMC800 HMC800 2195
|
||||
sholes MACH_SHOLES SHOLES 2196
|
||||
btmxc31 MACH_BTMXC31 BTMXC31 2197
|
||||
dt501 MACH_DT501 DT501 2198
|
||||
ktx MACH_KTX KTX 2199
|
||||
omap3517evm MACH_OMAP3517EVM OMAP3517EVM 2200
|
||||
netspace_v2 MACH_NETSPACE_V2 NETSPACE_V2 2201
|
||||
netspace_max_v2 MACH_NETSPACE_MAX_V2 NETSPACE_MAX_V2 2202
|
||||
d2net_v2 MACH_D2NET_V2 D2NET_V2 2203
|
||||
net2big_v2 MACH_NET2BIG_V2 NET2BIG_V2 2204
|
||||
net4big_v2 MACH_NET4BIG_V2 NET4BIG_V2 2205
|
||||
net5big_v2 MACH_NET5BIG_V2 NET5BIG_V2 2206
|
||||
endb2443 MACH_ENDB2443 ENDB2443 2207
|
||||
inetspace_v2 MACH_INETSPACE_V2 INETSPACE_V2 2208
|
||||
tros MACH_TROS TROS 2209
|
||||
pelco_homer MACH_PELCO_HOMER PELCO_HOMER 2210
|
||||
ofsp8 MACH_OFSP8 OFSP8 2211
|
||||
at91sam9g45ekes MACH_AT91SAM9G45EKES AT91SAM9G45EKES 2212
|
||||
guf_cupid MACH_GUF_CUPID GUF_CUPID 2213
|
||||
eab1r MACH_EAB1R EAB1R 2214
|
||||
desirec MACH_DESIREC DESIREC 2215
|
||||
cordoba MACH_CORDOBA CORDOBA 2216
|
||||
irvine MACH_IRVINE IRVINE 2217
|
||||
sff772 MACH_SFF772 SFF772 2218
|
||||
pelco_milano MACH_PELCO_MILANO PELCO_MILANO 2219
|
||||
pc7302 MACH_PC7302 PC7302 2220
|
||||
bip6000 MACH_BIP6000 BIP6000 2221
|
||||
silvermoon MACH_SILVERMOON SILVERMOON 2222
|
||||
vc0830 MACH_VC0830 VC0830 2223
|
||||
dt430 MACH_DT430 DT430 2224
|
||||
ji42pf MACH_JI42PF JI42PF 2225
|
||||
gnet_ksm MACH_GNET_KSM GNET_KSM 2226
|
||||
gnet_sgm MACH_GNET_SGM GNET_SGM 2227
|
||||
gnet_sgr MACH_GNET_SGR GNET_SGR 2228
|
||||
omap3_icetekevm MACH_OMAP3_ICETEKEVM OMAP3_ICETEKEVM 2229
|
||||
pnp MACH_PNP PNP 2230
|
||||
ctera_2bay_k MACH_CTERA_2BAY_K CTERA_2BAY_K 2231
|
||||
ctera_2bay_u MACH_CTERA_2BAY_U CTERA_2BAY_U 2232
|
||||
sas_c MACH_SAS_C SAS_C 2233
|
||||
vma2315 MACH_VMA2315 VMA2315 2234
|
||||
vcs MACH_VCS VCS 2235
|
||||
spear600 MACH_SPEAR600 SPEAR600 2236
|
||||
spear300 MACH_SPEAR300 SPEAR300 2237
|
||||
spear1300 MACH_SPEAR1300 SPEAR1300 2238
|
||||
lilly1131 MACH_LILLY1131 LILLY1131 2239
|
||||
arvoo_ax301 MACH_ARVOO_AX301 ARVOO_AX301 2240
|
||||
mapphone MACH_MAPPHONE MAPPHONE 2241
|
||||
legend MACH_LEGEND LEGEND 2242
|
||||
salsa MACH_SALSA SALSA 2243
|
||||
lounge MACH_LOUNGE LOUNGE 2244
|
||||
vision MACH_VISION VISION 2245
|
||||
vmb20 MACH_VMB20 VMB20 2246
|
||||
hy2410 MACH_HY2410 HY2410 2247
|
||||
hy9315 MACH_HY9315 HY9315 2248
|
||||
bullwinkle MACH_BULLWINKLE BULLWINKLE 2249
|
||||
arm_ultimator2 MACH_ARM_ULTIMATOR2 ARM_ULTIMATOR2 2250
|
||||
vs_v210 MACH_VS_V210 VS_V210 2252
|
||||
vs_v212 MACH_VS_V212 VS_V212 2253
|
||||
hmt MACH_HMT HMT 2254
|
||||
suen3 MACH_SUEN3 SUEN3 2255
|
||||
vesper MACH_VESPER VESPER 2256
|
||||
str9 MACH_STR9 STR9 2257
|
||||
omap3_wl_ff MACH_OMAP3_WL_FF OMAP3_WL_FF 2258
|
||||
simcom MACH_SIMCOM SIMCOM 2259
|
||||
mcwebio MACH_MCWEBIO MCWEBIO 2260
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
+mach
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include <asm/unaligned.h>
|
||||
|
||||
#define flat_stack_align(sp) /* nothing needed */
|
||||
#define flat_argvp_envp_on_stack() 0
|
||||
#define flat_old_ram_flag(flags) (flags)
|
||||
|
||||
|
|
|
@ -378,8 +378,10 @@
|
|||
#define __NR_dup3 363
|
||||
#define __NR_pipe2 364
|
||||
#define __NR_inotify_init1 365
|
||||
#define __NR_preadv 366
|
||||
#define __NR_pwritev 367
|
||||
|
||||
#define __NR_syscall 366
|
||||
#define __NR_syscall 368
|
||||
#define NR_syscalls __NR_syscall
|
||||
|
||||
/* Old optional stuff no one actually uses */
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
vmlinux.lds
|
|
@ -8,9 +8,8 @@
|
|||
|
||||
#define strncmp __inline_strncmp
|
||||
#include <asm/string.h>
|
||||
#undef strncmp
|
||||
|
||||
#include <linux/module.h>
|
||||
#undef strncmp
|
||||
|
||||
int strncmp(const char *cs, const char *ct, size_t count)
|
||||
{
|
||||
|
|
|
@ -1581,6 +1581,8 @@ ENTRY(_sys_call_table)
|
|||
.long _sys_dup3
|
||||
.long _sys_pipe2
|
||||
.long _sys_inotify_init1 /* 365 */
|
||||
.long _sys_preadv
|
||||
.long _sys_pwritev
|
||||
|
||||
.rept NR_syscalls-(.-_sys_call_table)/4
|
||||
.long _sys_ni_syscall
|
||||
|
|
|
@ -70,7 +70,7 @@ SRC_ARCH = $(srctree)/arch/cris
|
|||
# cris object files path
|
||||
OBJ_ARCH = $(objtree)/arch/cris
|
||||
|
||||
boot := arch/cris/$(SARCH)/boot
|
||||
boot := arch/cris/boot
|
||||
MACHINE := arch/cris/$(SARCH)
|
||||
|
||||
all: zImage
|
||||
|
@ -81,15 +81,15 @@ zImage Image: vmlinux
|
|||
archprepare:
|
||||
|
||||
archclean:
|
||||
$(Q)if [ -e arch/cris/$(SARCH)/boot ]; then \
|
||||
$(MAKE) $(clean)=arch/cris/$(SARCH)/boot; \
|
||||
$(Q)if [ -e arch/cris/boot ]; then \
|
||||
$(MAKE) $(clean)=arch/cris/boot; \
|
||||
fi
|
||||
|
||||
CLEAN_FILES += \
|
||||
$(MACHINE)/boot/zImage \
|
||||
$(MACHINE)/boot/compressed/decompress.bin \
|
||||
$(MACHINE)/boot/compressed/piggy.gz \
|
||||
$(MACHINE)/boot/rescue/rescue.bin
|
||||
$(boot)/zImage \
|
||||
$(boot)/compressed/decompress.bin \
|
||||
$(boot)/compressed/piggy.gz \
|
||||
$(boot)/rescue/rescue.bin
|
||||
|
||||
|
||||
# MRPROPER_FILES +=
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
Creation of the self-extracting compressed kernel image (vmlinuz)
|
||||
-----------------------------------------------------------------
|
||||
$Id: README,v 1.1 2001/12/17 13:59:27 bjornw Exp $
|
||||
|
||||
This can be slightly confusing because it's a process with many steps.
|
||||
|
||||
The kernel object built by the arch/etrax100/Makefile, vmlinux, is split
|
||||
by that makefile into text and data binary files, vmlinux.text and
|
||||
vmlinux.data.
|
||||
|
||||
Those files together with a ROM filesystem can be catted together and
|
||||
burned into a flash or executed directly at the DRAM origin.
|
||||
|
||||
They can also be catted together and compressed with gzip, which is what
|
||||
happens in this makefile. Together they make up piggy.img.
|
||||
|
||||
The decompressor is built into the file decompress.o. It is turned into
|
||||
the binary file decompress.bin, which is catted together with piggy.img
|
||||
into the file vmlinuz. It can be executed in an arbitrary place in flash.
|
||||
|
||||
Be careful - it assumes some things about free locations in DRAM. It
|
||||
assumes the DRAM starts at 0x40000000 and that it is at least 8 MB,
|
||||
so it puts its code at 0x40700000, and initial stack at 0x40800000.
|
||||
|
||||
-Bjorn
|
|
@ -1,246 +0,0 @@
|
|||
/*
|
||||
* misc.c
|
||||
*
|
||||
* This is a collection of several routines from gzip-1.0.3
|
||||
* adapted for Linux.
|
||||
*
|
||||
* malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
|
||||
* puts by Nick Holloway 1993, better puts by Martin Mares 1995
|
||||
* adaptation for Linux/CRIS Axis Communications AB, 1999
|
||||
*
|
||||
*/
|
||||
|
||||
/* where the piggybacked kernel image expects itself to live.
|
||||
* it is the same address we use when we network load an uncompressed
|
||||
* image into DRAM, and it is the address the kernel is linked to live
|
||||
* at by vmlinux.lds.S
|
||||
*/
|
||||
|
||||
#define KERNEL_LOAD_ADR 0x40004000
|
||||
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <arch/svinto.h>
|
||||
|
||||
/*
|
||||
* gzip declarations
|
||||
*/
|
||||
|
||||
#define OF(args) args
|
||||
#define STATIC static
|
||||
|
||||
void *memset(void *s, int c, size_t n);
|
||||
void *memcpy(void *__dest, __const void *__src, size_t __n);
|
||||
|
||||
#define memzero(s, n) memset((s), 0, (n))
|
||||
|
||||
typedef unsigned char uch;
|
||||
typedef unsigned short ush;
|
||||
typedef unsigned long ulg;
|
||||
|
||||
#define WSIZE 0x8000 /* Window size must be at least 32k, */
|
||||
/* and a power of two */
|
||||
|
||||
static uch *inbuf; /* input buffer */
|
||||
static uch window[WSIZE]; /* Sliding window buffer */
|
||||
|
||||
unsigned inptr = 0; /* index of next byte to be processed in inbuf
|
||||
* After decompression it will contain the
|
||||
* compressed size, and head.S will read it.
|
||||
*/
|
||||
|
||||
static unsigned outcnt = 0; /* bytes in output buffer */
|
||||
|
||||
/* gzip flag byte */
|
||||
#define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */
|
||||
#define CONTINUATION 0x02 /* bit 1 set: continuation of multi-part gzip file */
|
||||
#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */
|
||||
#define ORIG_NAME 0x08 /* bit 3 set: original file name present */
|
||||
#define COMMENT 0x10 /* bit 4 set: file comment present */
|
||||
#define ENCRYPTED 0x20 /* bit 5 set: file is encrypted */
|
||||
#define RESERVED 0xC0 /* bit 6,7: reserved */
|
||||
|
||||
#define get_byte() (inbuf[inptr++])
|
||||
|
||||
/* Diagnostic functions */
|
||||
#ifdef DEBUG
|
||||
# define Assert(cond, msg) do { \
|
||||
if (!(cond)) \
|
||||
error(msg); \
|
||||
} while (0)
|
||||
# define Trace(x) fprintf x
|
||||
# define Tracev(x) do { \
|
||||
if (verbose) \
|
||||
fprintf x; \
|
||||
} while (0)
|
||||
# define Tracevv(x) do { \
|
||||
if (verbose > 1) \
|
||||
fprintf x; \
|
||||
} while (0)
|
||||
# define Tracec(c, x) do { \
|
||||
if (verbose && (c)) \
|
||||
fprintf x; \
|
||||
} while (0)
|
||||
# define Tracecv(c, x) do { \
|
||||
if (verbose > 1 && (c)) \
|
||||
fprintf x; \
|
||||
} while (0)
|
||||
#else
|
||||
# define Assert(cond, msg)
|
||||
# define Trace(x)
|
||||
# define Tracev(x)
|
||||
# define Tracevv(x)
|
||||
# define Tracec(c, x)
|
||||
# define Tracecv(c, x)
|
||||
#endif
|
||||
|
||||
static void flush_window(void);
|
||||
static void error(char *m);
|
||||
|
||||
extern char *input_data; /* lives in head.S */
|
||||
|
||||
static long bytes_out = 0;
|
||||
static uch *output_data;
|
||||
static unsigned long output_ptr = 0;
|
||||
static void puts(const char *);
|
||||
|
||||
/* the "heap" is put directly after the BSS ends, at end */
|
||||
|
||||
extern int _end;
|
||||
static long free_mem_ptr = (long)&_end;
|
||||
static long free_mem_end_ptr;
|
||||
|
||||
#include "../../../../../lib/inflate.c"
|
||||
|
||||
/* decompressor info and error messages to serial console */
|
||||
|
||||
static void
|
||||
puts(const char *s)
|
||||
{
|
||||
#ifndef CONFIG_ETRAX_DEBUG_PORT_NULL
|
||||
while (*s) {
|
||||
#ifdef CONFIG_ETRAX_DEBUG_PORT0
|
||||
while (!(*R_SERIAL0_STATUS & (1 << 5))) ;
|
||||
*R_SERIAL0_TR_DATA = *s++;
|
||||
#endif
|
||||
#ifdef CONFIG_ETRAX_DEBUG_PORT1
|
||||
while (!(*R_SERIAL1_STATUS & (1 << 5))) ;
|
||||
*R_SERIAL1_TR_DATA = *s++;
|
||||
#endif
|
||||
#ifdef CONFIG_ETRAX_DEBUG_PORT2
|
||||
while (!(*R_SERIAL2_STATUS & (1 << 5))) ;
|
||||
*R_SERIAL2_TR_DATA = *s++;
|
||||
#endif
|
||||
#ifdef CONFIG_ETRAX_DEBUG_PORT3
|
||||
while (!(*R_SERIAL3_STATUS & (1 << 5))) ;
|
||||
*R_SERIAL3_TR_DATA = *s++;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void *memset(void *s, int c, size_t n)
|
||||
{
|
||||
int i;
|
||||
char *ss = (char *)s;
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
ss[i] = c;
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
void *memcpy(void *__dest, __const void *__src, size_t __n)
|
||||
{
|
||||
int i;
|
||||
char *d = (char *)__dest, *s = (char *)__src;
|
||||
|
||||
for (i = 0; i < __n; i++)
|
||||
d[i] = s[i];
|
||||
|
||||
return __dest;
|
||||
}
|
||||
|
||||
/* ===========================================================================
|
||||
* Write the output window window[0..outcnt-1] and update crc and bytes_out.
|
||||
* (Used for the decompressed data only.)
|
||||
*/
|
||||
|
||||
static void flush_window(void)
|
||||
{
|
||||
ulg c = crc; /* temporary variable */
|
||||
unsigned n;
|
||||
uch *in, *out, ch;
|
||||
|
||||
in = window;
|
||||
out = &output_data[output_ptr];
|
||||
for (n = 0; n < outcnt; n++) {
|
||||
ch = *out = *in;
|
||||
out++;
|
||||
in++;
|
||||
c = crc_32_tab[((int)c ^ ch) & 0xff] ^ (c >> 8);
|
||||
}
|
||||
crc = c;
|
||||
bytes_out += (ulg)outcnt;
|
||||
output_ptr += (ulg)outcnt;
|
||||
outcnt = 0;
|
||||
}
|
||||
|
||||
static void error(char *x)
|
||||
{
|
||||
puts("\n\n");
|
||||
puts(x);
|
||||
puts("\n\n -- System halted\n");
|
||||
|
||||
while (1); /* Halt */
|
||||
}
|
||||
|
||||
void setup_normal_output_buffer(void)
|
||||
{
|
||||
output_data = (char *)KERNEL_LOAD_ADR;
|
||||
}
|
||||
|
||||
void decompress_kernel(void)
|
||||
{
|
||||
char revision;
|
||||
|
||||
/* input_data is set in head.S */
|
||||
inbuf = input_data;
|
||||
|
||||
#ifdef CONFIG_ETRAX_DEBUG_PORT0
|
||||
*R_SERIAL0_XOFF = 0;
|
||||
*R_SERIAL0_BAUD = 0x99;
|
||||
*R_SERIAL0_TR_CTRL = 0x40;
|
||||
#endif
|
||||
#ifdef CONFIG_ETRAX_DEBUG_PORT1
|
||||
*R_SERIAL1_XOFF = 0;
|
||||
*R_SERIAL1_BAUD = 0x99;
|
||||
*R_SERIAL1_TR_CTRL = 0x40;
|
||||
#endif
|
||||
#ifdef CONFIG_ETRAX_DEBUG_PORT2
|
||||
*R_GEN_CONFIG = 0x08;
|
||||
*R_SERIAL2_XOFF = 0;
|
||||
*R_SERIAL2_BAUD = 0x99;
|
||||
*R_SERIAL2_TR_CTRL = 0x40;
|
||||
#endif
|
||||
#ifdef CONFIG_ETRAX_DEBUG_PORT3
|
||||
*R_GEN_CONFIG = 0x100;
|
||||
*R_SERIAL3_XOFF = 0;
|
||||
*R_SERIAL3_BAUD = 0x99;
|
||||
*R_SERIAL3_TR_CTRL = 0x40;
|
||||
#endif
|
||||
|
||||
setup_normal_output_buffer();
|
||||
|
||||
makecrc();
|
||||
|
||||
__asm__ volatile ("move $vr,%0" : "=rm" (revision));
|
||||
if (revision < 10) {
|
||||
puts("You need an ETRAX 100LX to run linux 2.6\n");
|
||||
while (1);
|
||||
}
|
||||
|
||||
puts("Uncompressing Linux...\n");
|
||||
gunzip();
|
||||
puts("Done. Now booting the kernel.\n");
|
||||
}
|
|
@ -536,10 +536,10 @@ multiple_interrupt:
|
|||
movem $r13, [$sp]
|
||||
push $r10 ; push orig_r10
|
||||
clear.d [$sp=$sp-4] ; frametype == 0, normal frame
|
||||
|
||||
|
||||
move.d $sp, $r10
|
||||
jsr do_multiple_IRQ
|
||||
|
||||
|
||||
jump ret_from_intr
|
||||
|
||||
do_sigtrap:
|
||||
|
@ -585,7 +585,7 @@ _ugdb_handle_breakpoint:
|
|||
pop $r0 ; Restore r0.
|
||||
ba do_sigtrap ; SIGTRAP the offending process.
|
||||
pop $dccr ; Restore dccr in delay slot.
|
||||
|
||||
|
||||
.global kernel_execve
|
||||
kernel_execve:
|
||||
move.d __NR_execve, $r9
|
||||
|
@ -929,6 +929,14 @@ sys_call_table:
|
|||
.long sys_fallocate
|
||||
.long sys_timerfd_settime /* 325 */
|
||||
.long sys_timerfd_gettime
|
||||
.long sys_signalfd4
|
||||
.long sys_eventfd2
|
||||
.long sys_epoll_create1
|
||||
.long sys_dup3 /* 330 */
|
||||
.long sys_pipe2
|
||||
.long sys_inotify_init1
|
||||
.long sys_preadv
|
||||
.long sys_pwritev
|
||||
|
||||
/*
|
||||
* NOTE!! This doesn't have to be exact - we just have
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
#
|
||||
# arch/cris/arch-v32/boot/Makefile
|
||||
#
|
||||
|
||||
OBJCOPYFLAGS = -O binary -R .note -R .comment
|
||||
|
||||
subdir- := compressed rescue
|
||||
targets := Image
|
||||
|
||||
$(obj)/Image: vmlinux FORCE
|
||||
$(call if_changed,objcopy)
|
||||
@echo ' Kernel: $@ is ready'
|
||||
|
||||
$(obj)/compressed/vmlinux: $(obj)/Image FORCE
|
||||
$(Q)$(MAKE) $(build)=$(obj)/compressed $@
|
||||
$(Q)$(MAKE) $(build)=$(obj)/rescue $(obj)/rescue/rescue.bin
|
||||
|
||||
$(obj)/zImage: $(obj)/compressed/vmlinux
|
||||
@cp $< $@
|
||||
@echo ' Kernel: $@ is ready'
|
|
@ -1,26 +0,0 @@
|
|||
#
|
||||
# arch/cris/arch-v32/boot/compressed/Makefile
|
||||
#
|
||||
|
||||
asflags-y += -I$(srctree)/include/asm/mach/ -I$(srctree)/include/asm/arch
|
||||
ccflags-y += -O2 -I$(srctree)/include/asm/mach/ -I$(srctree)/include/asm/arch
|
||||
ldflags-y += -T$(srctree)/$(src)/decompress.lds
|
||||
OBJECTS = $(obj)/head.o $(obj)/misc.o
|
||||
OBJCOPYFLAGS = -O binary --remove-section=.bss
|
||||
|
||||
quiet_cmd_image = BUILD $@
|
||||
cmd_image = cat $(obj)/decompress.bin $(obj)/piggy.gz > $@
|
||||
|
||||
targets := vmlinux piggy.gz decompress.o decompress.bin
|
||||
|
||||
$(obj)/decompress.o: $(OBJECTS) FORCE
|
||||
$(call if_changed,ld)
|
||||
|
||||
$(obj)/decompress.bin: $(obj)/decompress.o FORCE
|
||||
$(call if_changed,objcopy)
|
||||
|
||||
$(obj)/vmlinux: $(obj)/piggy.gz $(obj)/decompress.bin FORCE
|
||||
$(call if_changed,image)
|
||||
|
||||
$(obj)/piggy.gz: $(obj)/../Image FORCE
|
||||
$(call if_changed,gzip)
|
|
@ -1,26 +0,0 @@
|
|||
#
|
||||
# Makefile for rescue (bootstrap) code
|
||||
#
|
||||
|
||||
CC = gcc-cris -mlinux -march=v32 $(LINUXINCLUDE)
|
||||
ccflags-y += -O2 -I $(srctree)/include/asm/arch/mach/ \
|
||||
-I $(srctree)/include/asm/arch
|
||||
asflags-y += -I $(srctree)/include/asm/arch/mach/ -I $(srctree)/include/asm/arch
|
||||
LD = gcc-cris -mlinux -march=v32 -nostdlib
|
||||
ldflags-y += -T $(srctree)/$(src)/rescue.lds
|
||||
LDPOSTFLAGS = -lgcc
|
||||
OBJCOPYFLAGS = -O binary --remove-section=.bss
|
||||
obj-$(CONFIG_ETRAX_AXISFLASHMAP) = head.o
|
||||
OBJECT := $(obj)/head.o
|
||||
|
||||
targets := rescue.o rescue.bin
|
||||
|
||||
quiet_cmd_ldlibgcc = LD $@
|
||||
cmd_ldlibgcc = $(LD) $(LDFLAGS) $(filter-out FORCE,$^) $(LDPOSTFLAGS) -o $@
|
||||
|
||||
$(obj)/rescue.o: $(OBJECTS) FORCE
|
||||
$(call if_changed,ldlibgcc)
|
||||
|
||||
$(obj)/rescue.bin: $(obj)/rescue.o FORCE
|
||||
$(call if_changed,objcopy)
|
||||
cp -p $(obj)/rescue.bin $(objtree)
|
|
@ -681,7 +681,7 @@ static int virtual_gpio_ioctl(struct file *file, unsigned int cmd,
|
|||
shadow |= ~readl(dir_oe[priv->minor]) |
|
||||
(arg & changeable_bits[priv->minor]);
|
||||
i2c_write(VIRT_I2C_ADDR, (void *)&shadow, sizeof(shadow));
|
||||
spin_lock_irqrestore(&gpio_lock, flags);
|
||||
spin_unlock_irqrestore(&gpio_lock, flags);
|
||||
break;
|
||||
case IO_CLRBITS:
|
||||
spin_lock_irqsave(&gpio_lock, flags);
|
||||
|
@ -690,7 +690,7 @@ static int virtual_gpio_ioctl(struct file *file, unsigned int cmd,
|
|||
shadow |= ~readl(dir_oe[priv->minor]) &
|
||||
~(arg & changeable_bits[priv->minor]);
|
||||
i2c_write(VIRT_I2C_ADDR, (void *)&shadow, sizeof(shadow));
|
||||
spin_lock_irqrestore(&gpio_lock, flags);
|
||||
spin_unlock_irqrestore(&gpio_lock, flags);
|
||||
break;
|
||||
case IO_HIGHALARM:
|
||||
/* Set alarm when bits with 1 in arg go high. */
|
||||
|
|
|
@ -9,8 +9,6 @@ obj-y := entry.o traps.o irq.o debugport.o \
|
|||
process.o ptrace.o setup.o signal.o traps.o time.o \
|
||||
cache.o cacheflush.o
|
||||
|
||||
obj-$(CONFIG_ETRAXFS_SIM) += vcs_hook.o
|
||||
|
||||
obj-$(CONFIG_SMP) += smp.o
|
||||
obj-$(CONFIG_ETRAX_KGDB) += kgdb.o kgdb_asm.o
|
||||
obj-$(CONFIG_ETRAX_FAST_TIMER) += fasttimer.o
|
||||
|
|
|
@ -852,6 +852,14 @@ sys_call_table:
|
|||
.long sys_fallocate
|
||||
.long sys_timerfd_settime /* 325 */
|
||||
.long sys_timerfd_gettime
|
||||
.long sys_signalfd4
|
||||
.long sys_eventfd2
|
||||
.long sys_epoll_create1
|
||||
.long sys_dup3 /* 330 */
|
||||
.long sys_pipe2
|
||||
.long sys_inotify_init1
|
||||
.long sys_preadv
|
||||
.long sys_pwritev
|
||||
|
||||
/*
|
||||
* NOTE!! This doesn't have to be exact - we just have
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
#
|
||||
# arch/cris/arch-v10/boot/Makefile
|
||||
# arch/cris/boot/Makefile
|
||||
#
|
||||
|
||||
OBJCOPYFLAGS = -O binary --remove-section=.bss
|
||||
objcopyflags-$(CONFIG_ETRAX_ARCH_V10) += -R .note -R .comment
|
||||
objcopyflags-$(CONFIG_ETRAX_ARCH_V32) += --remove-section=.bss
|
||||
|
||||
OBJCOPYFLAGS = -O binary $(objcopyflags-y)
|
||||
|
||||
|
||||
subdir- := compressed rescue
|
||||
targets := Image
|
|
@ -1,11 +1,23 @@
|
|||
#
|
||||
# arch/cris/arch-v10/boot/compressed/Makefile
|
||||
# arch/cris/boot/compressed/Makefile
|
||||
#
|
||||
|
||||
asflags-y += $(LINUXINCLUDE)
|
||||
ccflags-y += -O2 $(LINUXINCLUDE)
|
||||
ldflags-y += -T $(srctree)/$(src)/decompress.lds
|
||||
OBJECTS = $(obj)/head.o $(obj)/misc.o
|
||||
|
||||
# asflags-$(CONFIG_ETRAX_ARCH_V32) += -I$(srctree)/include/asm/mach \
|
||||
# -I$(srctree)/include/asm/arch
|
||||
# ccflags-$(CONFIG_ETRAX_ARCH_V32) += -O2 -I$(srctree)/include/asm/mach
|
||||
# -I$(srctree)/include/asm/arch
|
||||
|
||||
arch-$(CONFIG_ETRAX_ARCH_V10) = v10
|
||||
arch-$(CONFIG_ETRAX_ARCH_V32) = v32
|
||||
|
||||
ldflags-y += -T $(srctree)/$(src)/decompress_$(arch-y).lds
|
||||
|
||||
OBJECTS-$(CONFIG_ETRAX_ARCH_V32) = $(obj)/head_v32.o
|
||||
OBJECTS-$(CONFIG_ETRAX_ARCH_V10) = $(obj)/head_v10.o
|
||||
OBJECTS= $(OBJECTS-y) $(obj)/misc.o
|
||||
OBJCOPYFLAGS = -O binary --remove-section=.bss
|
||||
|
||||
quiet_cmd_image = BUILD $@
|
||||
|
@ -24,4 +36,3 @@ $(obj)/vmlinux: $(obj)/piggy.gz $(obj)/decompress.bin FORCE
|
|||
|
||||
$(obj)/piggy.gz: $(obj)/../Image FORCE
|
||||
$(call if_changed,gzip)
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
beq dram_init_finished
|
||||
nop
|
||||
|
||||
#include "../../lib/dram_init.S"
|
||||
#include "../../arch-v10/lib/dram_init.S"
|
||||
|
||||
dram_init_finished:
|
||||
|
||||
|
@ -123,4 +123,4 @@ _cmd_line_magic:
|
|||
.dword 0
|
||||
_cmd_line_addr:
|
||||
.dword 0
|
||||
#include "../../lib/hw_settings.S"
|
||||
#include "../../arch-v10/lib/hw_settings.S"
|
|
@ -17,7 +17,7 @@
|
|||
.globl input_data
|
||||
|
||||
.text
|
||||
_start:
|
||||
start:
|
||||
di
|
||||
|
||||
;; Start clocks for used blocks.
|
||||
|
@ -29,9 +29,9 @@ _start:
|
|||
nop
|
||||
|
||||
#if defined CONFIG_ETRAXFS
|
||||
#include "../../mach-fs/dram_init.S"
|
||||
#include "../../arch-v32/mach-fs/dram_init.S"
|
||||
#elif defined CONFIG_CRIS_MACH_ARTPEC3
|
||||
#include "../../mach-a3/dram_init.S"
|
||||
#include "../../arch-v32/mach-a3/dram_init.S"
|
||||
#else
|
||||
#error Only ETRAXFS and ARTPEC-3 supported!
|
||||
#endif
|
||||
|
@ -137,9 +137,9 @@ _boot_source:
|
|||
.dword 0
|
||||
|
||||
#if defined CONFIG_ETRAXFS
|
||||
#include "../../mach-fs/hw_settings.S"
|
||||
#include "../../arch-v32/mach-fs/hw_settings.S"
|
||||
#elif defined CONFIG_CRIS_MACH_ARTPEC3
|
||||
#include "../../mach-a3/hw_settings.S"
|
||||
#include "../../arch-v32/mach-a3/hw_settings.S"
|
||||
#else
|
||||
#error Only ETRAXFS and ARTPEC-3 supported!
|
||||
#endif
|
|
@ -18,8 +18,9 @@
|
|||
|
||||
#define KERNEL_LOAD_ADR 0x40004000
|
||||
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#ifdef CONFIG_ETRAX_ARCH_V32
|
||||
#include <hwregs/reg_rdwr.h>
|
||||
#include <hwregs/reg_map.h>
|
||||
#include <hwregs/ser_defs.h>
|
||||
|
@ -27,6 +28,9 @@
|
|||
#ifdef CONFIG_CRIS_MACH_ARTPEC3
|
||||
#include <hwregs/clkgen_defs.h>
|
||||
#endif
|
||||
#else
|
||||
#include <arch/svinto.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* gzip declarations
|
||||
|
@ -35,12 +39,10 @@
|
|||
#define OF(args) args
|
||||
#define STATIC static
|
||||
|
||||
void* memset(void* s, int c, size_t n);
|
||||
void* memcpy(void* __dest, __const void* __src,
|
||||
size_t __n);
|
||||
|
||||
#define memzero(s, n) memset ((s), 0, (n))
|
||||
void *memset(void *s, int c, size_t n);
|
||||
void *memcpy(void *__dest, __const void *__src, size_t __n);
|
||||
|
||||
#define memzero(s, n) memset((s), 0, (n))
|
||||
|
||||
typedef unsigned char uch;
|
||||
typedef unsigned short ush;
|
||||
|
@ -68,27 +70,43 @@ static unsigned outcnt = 0; /* bytes in output buffer */
|
|||
#define ENCRYPTED 0x20 /* bit 5 set: file is encrypted */
|
||||
#define RESERVED 0xC0 /* bit 6,7: reserved */
|
||||
|
||||
#define get_byte() inbuf[inptr++]
|
||||
#define get_byte() (inbuf[inptr++])
|
||||
|
||||
/* Diagnostic functions */
|
||||
#ifdef DEBUG
|
||||
# define Assert(cond,msg) {if(!(cond)) error(msg);}
|
||||
# define Assert(cond, msg) do { \
|
||||
if (!(cond)) \
|
||||
error(msg); \
|
||||
} while (0)
|
||||
# define Trace(x) fprintf x
|
||||
# define Tracev(x) {if (verbose) fprintf x ;}
|
||||
# define Tracevv(x) {if (verbose>1) fprintf x ;}
|
||||
# define Tracec(c,x) {if (verbose && (c)) fprintf x ;}
|
||||
# define Tracecv(c,x) {if (verbose>1 && (c)) fprintf x ;}
|
||||
# define Tracev(x) do { \
|
||||
if (verbose) \
|
||||
fprintf x; \
|
||||
} while (0)
|
||||
# define Tracevv(x) do { \
|
||||
if (verbose > 1) \
|
||||
fprintf x; \
|
||||
} while (0)
|
||||
# define Tracec(c, x) do { \
|
||||
if (verbose && (c)) \
|
||||
fprintf x; \
|
||||
} while (0)
|
||||
# define Tracecv(c, x) do { \
|
||||
if (verbose > 1 && (c)) \
|
||||
fprintf x; \
|
||||
} while (0)
|
||||
#else
|
||||
# define Assert(cond,msg)
|
||||
# define Assert(cond, msg)
|
||||
# define Trace(x)
|
||||
# define Tracev(x)
|
||||
# define Tracevv(x)
|
||||
# define Tracec(c,x)
|
||||
# define Tracecv(c,x)
|
||||
# define Tracec(c, x)
|
||||
# define Tracecv(c, x)
|
||||
#endif
|
||||
|
||||
static void flush_window(void);
|
||||
static void error(char *m);
|
||||
static void puts(const char *);
|
||||
|
||||
extern char *input_data; /* lives in head.S */
|
||||
|
||||
|
@ -96,10 +114,6 @@ static long bytes_out;
|
|||
static uch *output_data;
|
||||
static unsigned long output_ptr;
|
||||
|
||||
static void error(char *m);
|
||||
|
||||
static void puts(const char *);
|
||||
|
||||
/* the "heap" is put directly after the BSS ends, at end */
|
||||
|
||||
extern int _end;
|
||||
|
@ -110,8 +124,8 @@ static long free_mem_end_ptr;
|
|||
|
||||
/* decompressor info and error messages to serial console */
|
||||
|
||||
static inline void
|
||||
serout(const char *s, reg_scope_instances regi_ser)
|
||||
#ifdef CONFIG_ETRAX_ARCH_V32
|
||||
static inline void serout(const char *s, reg_scope_instances regi_ser)
|
||||
{
|
||||
reg_ser_rs_stat_din rs;
|
||||
reg_ser_rw_dout dout = {.data = *s};
|
||||
|
@ -123,23 +137,47 @@ serout(const char *s, reg_scope_instances regi_ser)
|
|||
|
||||
REG_WR(ser, regi_ser, rw_dout, dout);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
puts(const char *s)
|
||||
static void puts(const char *s)
|
||||
{
|
||||
#ifndef CONFIG_ETRAX_DEBUG_PORT_NULL
|
||||
while (*s) {
|
||||
#ifdef CONFIG_ETRAX_DEBUG_PORT0
|
||||
#ifdef CONFIG_ETRAX_ARCH_V32
|
||||
serout(s, regi_ser0);
|
||||
#else
|
||||
while (!(*R_SERIAL0_STATUS & (1 << 5)))
|
||||
;
|
||||
*R_SERIAL0_TR_DATA = *s++;
|
||||
#endif
|
||||
#endif
|
||||
#ifdef CONFIG_ETRAX_DEBUG_PORT1
|
||||
#ifdef CONFIG_ETRAX_ARCH_V32
|
||||
serout(s, regi_ser1);
|
||||
#else
|
||||
while (!(*R_SERIAL1_STATUS & (1 << 5)))
|
||||
;
|
||||
*R_SERIAL1_TR_DATA = *s++;
|
||||
#endif
|
||||
#endif
|
||||
#ifdef CONFIG_ETRAX_DEBUG_PORT2
|
||||
#ifdef CONFIG_ETRAX_ARCH_V32
|
||||
serout(s, regi_ser2);
|
||||
#else
|
||||
while (!(*R_SERIAL2_STATUS & (1 << 5)))
|
||||
;
|
||||
*R_SERIAL2_TR_DATA = *s++;
|
||||
#endif
|
||||
#endif
|
||||
#ifdef CONFIG_ETRAX_DEBUG_PORT3
|
||||
#ifdef CONFIG_ETRAX_ARCH_V32
|
||||
serout(s, regi_ser3);
|
||||
#else
|
||||
while (!(*R_SERIAL3_STATUS & (1 << 5)))
|
||||
;
|
||||
*R_SERIAL3_TR_DATA = *s++;
|
||||
#endif
|
||||
#endif
|
||||
*s++;
|
||||
}
|
||||
|
@ -147,8 +185,7 @@ puts(const char *s)
|
|||
#endif
|
||||
}
|
||||
|
||||
void*
|
||||
memset(void* s, int c, size_t n)
|
||||
void *memset(void *s, int c, size_t n)
|
||||
{
|
||||
int i;
|
||||
char *ss = (char*)s;
|
||||
|
@ -158,14 +195,13 @@ memset(void* s, int c, size_t n)
|
|||
return s;
|
||||
}
|
||||
|
||||
void*
|
||||
memcpy(void* __dest, __const void* __src,
|
||||
size_t __n)
|
||||
void *memcpy(void *__dest, __const void *__src, size_t __n)
|
||||
{
|
||||
int i;
|
||||
char *d = (char *)__dest, *s = (char *)__src;
|
||||
|
||||
for (i=0;i<__n;i++) d[i] = s[i];
|
||||
for (i = 0; i < __n; i++)
|
||||
d[i] = s[i];
|
||||
|
||||
return __dest;
|
||||
}
|
||||
|
@ -175,43 +211,42 @@ memcpy(void* __dest, __const void* __src,
|
|||
* (Used for the decompressed data only.)
|
||||
*/
|
||||
|
||||
static void
|
||||
flush_window()
|
||||
static void flush_window(void)
|
||||
{
|
||||
ulg c = crc; /* temporary variable */
|
||||
unsigned n;
|
||||
uch *in, *out, ch;
|
||||
ulg c = crc; /* temporary variable */
|
||||
unsigned n;
|
||||
uch *in, *out, ch;
|
||||
|
||||
in = window;
|
||||
out = &output_data[output_ptr];
|
||||
for (n = 0; n < outcnt; n++) {
|
||||
ch = *out++ = *in++;
|
||||
c = crc_32_tab[((int)c ^ ch) & 0xff] ^ (c >> 8);
|
||||
}
|
||||
crc = c;
|
||||
bytes_out += (ulg)outcnt;
|
||||
output_ptr += (ulg)outcnt;
|
||||
outcnt = 0;
|
||||
in = window;
|
||||
out = &output_data[output_ptr];
|
||||
for (n = 0; n < outcnt; n++) {
|
||||
ch = *out = *in;
|
||||
out++;
|
||||
in++;
|
||||
c = crc_32_tab[((int)c ^ ch) & 0xff] ^ (c >> 8);
|
||||
}
|
||||
crc = c;
|
||||
bytes_out += (ulg)outcnt;
|
||||
output_ptr += (ulg)outcnt;
|
||||
outcnt = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
error(char *x)
|
||||
static void error(char *x)
|
||||
{
|
||||
puts("\r\n\n");
|
||||
puts("\n\n");
|
||||
puts(x);
|
||||
puts("\r\n\n -- System halted\n");
|
||||
puts("\n\n -- System halted\n");
|
||||
|
||||
while(1); /* Halt */
|
||||
}
|
||||
|
||||
void
|
||||
setup_normal_output_buffer(void)
|
||||
void setup_normal_output_buffer(void)
|
||||
{
|
||||
output_data = (char *)KERNEL_LOAD_ADR;
|
||||
}
|
||||
|
||||
static inline void
|
||||
serial_setup(reg_scope_instances regi_ser)
|
||||
#ifdef CONFIG_ETRAX_ARCH_V32
|
||||
static inline void serial_setup(reg_scope_instances regi_ser)
|
||||
{
|
||||
reg_ser_rw_xoff xoff;
|
||||
reg_ser_rw_tr_ctrl tr_ctrl;
|
||||
|
@ -252,12 +287,16 @@ serial_setup(reg_scope_instances regi_ser)
|
|||
REG_WR(ser, regi_ser, rw_rec_ctrl, rec_ctrl);
|
||||
REG_WR(ser, regi_ser, rw_rec_baud_div, rec_baud);
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
decompress_kernel(void)
|
||||
void decompress_kernel(void)
|
||||
{
|
||||
char revision;
|
||||
char compile_rev;
|
||||
|
||||
#ifdef CONFIG_ETRAX_ARCH_V32
|
||||
/* Need at least a CRISv32 to run. */
|
||||
compile_rev = 32;
|
||||
#if defined(CONFIG_ETRAX_DEBUG_PORT1) || \
|
||||
defined(CONFIG_ETRAX_DEBUG_PORT2) || \
|
||||
defined(CONFIG_ETRAX_DEBUG_PORT3)
|
||||
|
@ -277,6 +316,7 @@ decompress_kernel(void)
|
|||
hwprot = REG_RD(pinmux, regi_pinmux, rw_hwprot);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CONFIG_ETRAX_DEBUG_PORT0
|
||||
serial_setup(regi_ser0);
|
||||
#endif
|
||||
|
@ -300,19 +340,52 @@ decompress_kernel(void)
|
|||
|
||||
/* input_data is set in head.S */
|
||||
inbuf = input_data;
|
||||
#else /* CRISv10 */
|
||||
/* Need at least a crisv10 to run. */
|
||||
compile_rev = 10;
|
||||
|
||||
/* input_data is set in head.S */
|
||||
inbuf = input_data;
|
||||
|
||||
#ifdef CONFIG_ETRAX_DEBUG_PORT0
|
||||
*R_SERIAL0_XOFF = 0;
|
||||
*R_SERIAL0_BAUD = 0x99;
|
||||
*R_SERIAL0_TR_CTRL = 0x40;
|
||||
#endif
|
||||
#ifdef CONFIG_ETRAX_DEBUG_PORT1
|
||||
*R_SERIAL1_XOFF = 0;
|
||||
*R_SERIAL1_BAUD = 0x99;
|
||||
*R_SERIAL1_TR_CTRL = 0x40;
|
||||
#endif
|
||||
#ifdef CONFIG_ETRAX_DEBUG_PORT2
|
||||
*R_GEN_CONFIG = 0x08;
|
||||
*R_SERIAL2_XOFF = 0;
|
||||
*R_SERIAL2_BAUD = 0x99;
|
||||
*R_SERIAL2_TR_CTRL = 0x40;
|
||||
#endif
|
||||
#ifdef CONFIG_ETRAX_DEBUG_PORT3
|
||||
*R_GEN_CONFIG = 0x100;
|
||||
*R_SERIAL3_XOFF = 0;
|
||||
*R_SERIAL3_BAUD = 0x99;
|
||||
*R_SERIAL3_TR_CTRL = 0x40;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
setup_normal_output_buffer();
|
||||
|
||||
makecrc();
|
||||
|
||||
__asm__ volatile ("move $vr,%0" : "=rm" (revision));
|
||||
if (revision < 32)
|
||||
{
|
||||
puts("You need an ETRAX FS to run Linux 2.6/crisv32.\r\n");
|
||||
if (revision < compile_rev) {
|
||||
#ifdef CONFIG_ETRAX_ARCH_V32
|
||||
puts("You need an ETRAX FS to run Linux 2.6/crisv32\n");
|
||||
#else
|
||||
puts("You need an ETRAX 100LX to run linux 2.6\n");
|
||||
#endif
|
||||
while(1);
|
||||
}
|
||||
|
||||
puts("Uncompressing Linux...\r\n");
|
||||
puts("Uncompressing Linux...\n");
|
||||
gunzip();
|
||||
puts("Done. Now booting the kernel.\r\n");
|
||||
puts("Done. Now booting the kernel\n");
|
||||
}
|
|
@ -2,16 +2,26 @@
|
|||
# Makefile for rescue (bootstrap) code
|
||||
#
|
||||
|
||||
ccflags-y += -O2 $(LINUXINCLUDE)
|
||||
# CC = gcc-cris -mlinux -march=v32 $(LINUXINCLUDE)
|
||||
# ccflags-$(CONFIG_ETRAX_ARCH_V32) += -I$(srctree)/include/asm/arch/mach/ \
|
||||
# -I$(srctree)/include/asm/arch
|
||||
# asflags-y += -I $(srctree)/include/asm/arch/mach/ -I $(srctree)/include/asm/arch
|
||||
# LD = gcc-cris -mlinux -march=v32 -nostdlib
|
||||
|
||||
asflags-y += $(LINUXINCLUDE)
|
||||
ldflags-y += -T $(srctree)/$(src)/rescue.lds
|
||||
ccflags-y += -O2 $(LINUXINCLUDE)
|
||||
arch-$(CONFIG_ETRAX_ARCH_V10) = v10
|
||||
arch-$(CONFIG_ETRAX_ARCH_V32) = v32
|
||||
|
||||
ldflags-y += -T $(srctree)/$(src)/rescue_$(arch-y).lds
|
||||
OBJCOPYFLAGS = -O binary --remove-section=.bss
|
||||
obj-$(CONFIG_ETRAX_AXISFLASHMAP) = head.o
|
||||
OBJECT := $(obj)/head.o
|
||||
obj-$(CONFIG_ETRAX_ARCH_V32) = $(obj)/head_v32.o
|
||||
obj-$(CONFIG_ETRAX_ARCH_V10) = $(obj)/head_v10.o
|
||||
OBJECTS := $(obj-y)
|
||||
|
||||
targets := rescue.o rescue.bin
|
||||
|
||||
$(obj)/rescue.o: $(OBJECT) FORCE
|
||||
$(obj)/rescue.o: $(OBJECTS) FORCE
|
||||
$(call if_changed,ld)
|
||||
|
||||
$(obj)/rescue.bin: $(obj)/rescue.o FORCE
|
||||
|
@ -26,6 +36,7 @@ $(obj)/testrescue.bin: $(obj)/testrescue.o
|
|||
dd if=testrescue_tmp.bin of=$(obj)/testrescue.bin bs=1 count=784
|
||||
rm tr.bin tmp2423 testrescue_tmp.bin
|
||||
|
||||
|
||||
$(obj)/kimagerescue.bin: $(obj)/kimagerescue.o
|
||||
$(OBJCOPY) $(OBJCOPYFLAGS) $(obj)/kimagerescue.o ktr.bin
|
||||
# Pad it to 784 bytes, that's what the rescue loader expects
|
||||
|
@ -33,3 +44,4 @@ $(obj)/kimagerescue.bin: $(obj)/kimagerescue.o
|
|||
cat ktr.bin tmp2423 >kimagerescue_tmp.bin
|
||||
dd if=kimagerescue_tmp.bin of=$(obj)/kimagerescue.bin bs=1 count=784
|
||||
rm ktr.bin tmp2423 kimagerescue_tmp.bin
|
||||
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче