Merge branch 'linus' into perfcounters/core
Conflicts: fs/exec.c include/linux/init_task.h Simple context conflicts.
This commit is contained in:
commit
e1df957670
|
@ -6,7 +6,7 @@
|
|||
# To add a new book the only step required is to add the book to the
|
||||
# list of DOCBOOKS.
|
||||
|
||||
DOCBOOKS := wanbook.xml z8530book.xml mcabook.xml \
|
||||
DOCBOOKS := z8530book.xml mcabook.xml \
|
||||
kernel-hacking.xml kernel-locking.xml deviceiobook.xml \
|
||||
procfs-guide.xml writing_usb_driver.xml networking.xml \
|
||||
kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml \
|
||||
|
|
|
@ -98,9 +98,6 @@
|
|||
X!Enet/core/wireless.c
|
||||
</sect1>
|
||||
-->
|
||||
<sect1><title>Synchronous PPP</title>
|
||||
!Edrivers/net/wan/syncppp.c
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
||||
</book>
|
||||
|
|
|
@ -1,99 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []>
|
||||
|
||||
<book id="WANGuide">
|
||||
<bookinfo>
|
||||
<title>Synchronous PPP and Cisco HDLC Programming Guide</title>
|
||||
|
||||
<authorgroup>
|
||||
<author>
|
||||
<firstname>Alan</firstname>
|
||||
<surname>Cox</surname>
|
||||
<affiliation>
|
||||
<address>
|
||||
<email>alan@lxorguk.ukuu.org.uk</email>
|
||||
</address>
|
||||
</affiliation>
|
||||
</author>
|
||||
</authorgroup>
|
||||
|
||||
<copyright>
|
||||
<year>2000</year>
|
||||
<holder>Alan Cox</holder>
|
||||
</copyright>
|
||||
|
||||
<legalnotice>
|
||||
<para>
|
||||
This documentation is free software; you can redistribute
|
||||
it and/or modify it under the terms of the GNU General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later
|
||||
version.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This program is distributed in the hope that it will be
|
||||
useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU General Public License for more details.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this program; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
MA 02111-1307 USA
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For more details see the file COPYING in the source
|
||||
distribution of Linux.
|
||||
</para>
|
||||
</legalnotice>
|
||||
</bookinfo>
|
||||
|
||||
<toc></toc>
|
||||
|
||||
<chapter id="intro">
|
||||
<title>Introduction</title>
|
||||
<para>
|
||||
The syncppp drivers in Linux provide a fairly complete
|
||||
implementation of Cisco HDLC and a minimal implementation of
|
||||
PPP. The longer term goal is to switch the PPP layer to the
|
||||
generic PPP interface that is new in Linux 2.3.x. The API should
|
||||
remain unchanged when this is done, but support will then be
|
||||
available for IPX, compression and other PPP features
|
||||
</para>
|
||||
</chapter>
|
||||
<chapter id="bugs">
|
||||
<title>Known Bugs And Assumptions</title>
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry><term>PPP is minimal</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The current PPP implementation is very basic, although sufficient
|
||||
for most wan usages.
|
||||
</para>
|
||||
</listitem></varlistentry>
|
||||
|
||||
<varlistentry><term>Cisco HDLC Quirks</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Currently we do not end all packets with the correct Cisco multicast
|
||||
or unicast flags. Nothing appears to mind too much but this should
|
||||
be corrected.
|
||||
</para>
|
||||
</listitem></varlistentry>
|
||||
</variablelist>
|
||||
|
||||
</para>
|
||||
</chapter>
|
||||
|
||||
<chapter id="pubfunctions">
|
||||
<title>Public Functions Provided</title>
|
||||
!Edrivers/net/wan/syncppp.c
|
||||
</chapter>
|
||||
|
||||
</book>
|
|
@ -0,0 +1,167 @@
|
|||
Using hlist_nulls to protect read-mostly linked lists and
|
||||
objects using SLAB_DESTROY_BY_RCU allocations.
|
||||
|
||||
Please read the basics in Documentation/RCU/listRCU.txt
|
||||
|
||||
Using special makers (called 'nulls') is a convenient way
|
||||
to solve following problem :
|
||||
|
||||
A typical RCU linked list managing objects which are
|
||||
allocated with SLAB_DESTROY_BY_RCU kmem_cache can
|
||||
use following algos :
|
||||
|
||||
1) Lookup algo
|
||||
--------------
|
||||
rcu_read_lock()
|
||||
begin:
|
||||
obj = lockless_lookup(key);
|
||||
if (obj) {
|
||||
if (!try_get_ref(obj)) // might fail for free objects
|
||||
goto begin;
|
||||
/*
|
||||
* Because a writer could delete object, and a writer could
|
||||
* reuse these object before the RCU grace period, we
|
||||
* must check key after geting the reference on object
|
||||
*/
|
||||
if (obj->key != key) { // not the object we expected
|
||||
put_ref(obj);
|
||||
goto begin;
|
||||
}
|
||||
}
|
||||
rcu_read_unlock();
|
||||
|
||||
Beware that lockless_lookup(key) cannot use traditional hlist_for_each_entry_rcu()
|
||||
but a version with an additional memory barrier (smp_rmb())
|
||||
|
||||
lockless_lookup(key)
|
||||
{
|
||||
struct hlist_node *node, *next;
|
||||
for (pos = rcu_dereference((head)->first);
|
||||
pos && ({ next = pos->next; smp_rmb(); prefetch(next); 1; }) &&
|
||||
({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; });
|
||||
pos = rcu_dereference(next))
|
||||
if (obj->key == key)
|
||||
return obj;
|
||||
return NULL;
|
||||
|
||||
And note the traditional hlist_for_each_entry_rcu() misses this smp_rmb() :
|
||||
|
||||
struct hlist_node *node;
|
||||
for (pos = rcu_dereference((head)->first);
|
||||
pos && ({ prefetch(pos->next); 1; }) &&
|
||||
({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; });
|
||||
pos = rcu_dereference(pos->next))
|
||||
if (obj->key == key)
|
||||
return obj;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Quoting Corey Minyard :
|
||||
|
||||
"If the object is moved from one list to another list in-between the
|
||||
time the hash is calculated and the next field is accessed, and the
|
||||
object has moved to the end of a new list, the traversal will not
|
||||
complete properly on the list it should have, since the object will
|
||||
be on the end of the new list and there's not a way to tell it's on a
|
||||
new list and restart the list traversal. I think that this can be
|
||||
solved by pre-fetching the "next" field (with proper barriers) before
|
||||
checking the key."
|
||||
|
||||
2) Insert algo :
|
||||
----------------
|
||||
|
||||
We need to make sure a reader cannot read the new 'obj->obj_next' value
|
||||
and previous value of 'obj->key'. Or else, an item could be deleted
|
||||
from a chain, and inserted into another chain. If new chain was empty
|
||||
before the move, 'next' pointer is NULL, and lockless reader can
|
||||
not detect it missed following items in original chain.
|
||||
|
||||
/*
|
||||
* Please note that new inserts are done at the head of list,
|
||||
* not in the middle or end.
|
||||
*/
|
||||
obj = kmem_cache_alloc(...);
|
||||
lock_chain(); // typically a spin_lock()
|
||||
obj->key = key;
|
||||
atomic_inc(&obj->refcnt);
|
||||
/*
|
||||
* we need to make sure obj->key is updated before obj->next
|
||||
*/
|
||||
smp_wmb();
|
||||
hlist_add_head_rcu(&obj->obj_node, list);
|
||||
unlock_chain(); // typically a spin_unlock()
|
||||
|
||||
|
||||
3) Remove algo
|
||||
--------------
|
||||
Nothing special here, we can use a standard RCU hlist deletion.
|
||||
But thanks to SLAB_DESTROY_BY_RCU, beware a deleted object can be reused
|
||||
very very fast (before the end of RCU grace period)
|
||||
|
||||
if (put_last_reference_on(obj) {
|
||||
lock_chain(); // typically a spin_lock()
|
||||
hlist_del_init_rcu(&obj->obj_node);
|
||||
unlock_chain(); // typically a spin_unlock()
|
||||
kmem_cache_free(cachep, obj);
|
||||
}
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
With hlist_nulls we can avoid extra smp_rmb() in lockless_lookup()
|
||||
and extra smp_wmb() in insert function.
|
||||
|
||||
For example, if we choose to store the slot number as the 'nulls'
|
||||
end-of-list marker for each slot of the hash table, we can detect
|
||||
a race (some writer did a delete and/or a move of an object
|
||||
to another chain) checking the final 'nulls' value if
|
||||
the lookup met the end of chain. If final 'nulls' value
|
||||
is not the slot number, then we must restart the lookup at
|
||||
the begining. If the object was moved to same chain,
|
||||
then the reader doesnt care : It might eventually
|
||||
scan the list again without harm.
|
||||
|
||||
|
||||
1) lookup algo
|
||||
|
||||
head = &table[slot];
|
||||
rcu_read_lock();
|
||||
begin:
|
||||
hlist_nulls_for_each_entry_rcu(obj, node, head, member) {
|
||||
if (obj->key == key) {
|
||||
if (!try_get_ref(obj)) // might fail for free objects
|
||||
goto begin;
|
||||
if (obj->key != key) { // not the object we expected
|
||||
put_ref(obj);
|
||||
goto begin;
|
||||
}
|
||||
goto out;
|
||||
}
|
||||
/*
|
||||
* if the nulls value we got at the end of this lookup is
|
||||
* not the expected one, we must restart lookup.
|
||||
* We probably met an item that was moved to another chain.
|
||||
*/
|
||||
if (get_nulls_value(node) != slot)
|
||||
goto begin;
|
||||
obj = NULL;
|
||||
|
||||
out:
|
||||
rcu_read_unlock();
|
||||
|
||||
2) Insert function :
|
||||
--------------------
|
||||
|
||||
/*
|
||||
* Please note that new inserts are done at the head of list,
|
||||
* not in the middle or end.
|
||||
*/
|
||||
obj = kmem_cache_alloc(cachep);
|
||||
lock_chain(); // typically a spin_lock()
|
||||
obj->key = key;
|
||||
atomic_set(&obj->refcnt, 1);
|
||||
/*
|
||||
* insert obj in RCU way (readers might be traversing chain)
|
||||
*/
|
||||
hlist_nulls_add_head_rcu(&obj->obj_node, list);
|
||||
unlock_chain(); // typically a spin_unlock()
|
|
@ -24,7 +24,7 @@ real bad - it changes the behaviour of all unaligned instructions in user
|
|||
space, and might cause programs to fail unexpectedly.
|
||||
|
||||
To change the alignment trap behavior, simply echo a number into
|
||||
/proc/sys/debug/alignment. The number is made up from various bits:
|
||||
/proc/cpu/alignment. The number is made up from various bits:
|
||||
|
||||
bit behavior when set
|
||||
--- -----------------
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
CPU Accounting Controller
|
||||
-------------------------
|
||||
|
||||
The CPU accounting controller is used to group tasks using cgroups and
|
||||
account the CPU usage of these groups of tasks.
|
||||
|
||||
The CPU accounting controller supports multi-hierarchy groups. An accounting
|
||||
group accumulates the CPU usage of all of its child groups and the tasks
|
||||
directly present in its group.
|
||||
|
||||
Accounting groups can be created by first mounting the cgroup filesystem.
|
||||
|
||||
# mkdir /cgroups
|
||||
# mount -t cgroup -ocpuacct none /cgroups
|
||||
|
||||
With the above step, the initial or the parent accounting group
|
||||
becomes visible at /cgroups. At bootup, this group includes all the
|
||||
tasks in the system. /cgroups/tasks lists the tasks in this cgroup.
|
||||
/cgroups/cpuacct.usage gives the CPU time (in nanoseconds) obtained by
|
||||
this group which is essentially the CPU time obtained by all the tasks
|
||||
in the system.
|
||||
|
||||
New accounting groups can be created under the parent group /cgroups.
|
||||
|
||||
# cd /cgroups
|
||||
# mkdir g1
|
||||
# echo $$ > g1
|
||||
|
||||
The above steps create a new group g1 and move the current shell
|
||||
process (bash) into it. CPU time consumed by this bash and its children
|
||||
can be obtained from g1/cpuacct.usage and the same is accumulated in
|
||||
/cgroups/cpuacct.usage also.
|
|
@ -93,10 +93,8 @@ Several "PowerBook" and "iBook2" notebooks are supported.
|
|||
1.5 SuperH
|
||||
----------
|
||||
|
||||
The following SuperH processors are supported by cpufreq:
|
||||
|
||||
SH-3
|
||||
SH-4
|
||||
All SuperH processors supporting rate rounding through the clock
|
||||
framework are supported by cpufreq.
|
||||
|
||||
1.6 Blackfin
|
||||
------------
|
||||
|
|
|
@ -0,0 +1,582 @@
|
|||
====================
|
||||
CREDENTIALS IN LINUX
|
||||
====================
|
||||
|
||||
By: David Howells <dhowells@redhat.com>
|
||||
|
||||
Contents:
|
||||
|
||||
(*) Overview.
|
||||
|
||||
(*) Types of credentials.
|
||||
|
||||
(*) File markings.
|
||||
|
||||
(*) Task credentials.
|
||||
|
||||
- Immutable credentials.
|
||||
- Accessing task credentials.
|
||||
- Accessing another task's credentials.
|
||||
- Altering credentials.
|
||||
- Managing credentials.
|
||||
|
||||
(*) Open file credentials.
|
||||
|
||||
(*) Overriding the VFS's use of credentials.
|
||||
|
||||
|
||||
========
|
||||
OVERVIEW
|
||||
========
|
||||
|
||||
There are several parts to the security check performed by Linux when one
|
||||
object acts upon another:
|
||||
|
||||
(1) Objects.
|
||||
|
||||
Objects are things in the system that may be acted upon directly by
|
||||
userspace programs. Linux has a variety of actionable objects, including:
|
||||
|
||||
- Tasks
|
||||
- Files/inodes
|
||||
- Sockets
|
||||
- Message queues
|
||||
- Shared memory segments
|
||||
- Semaphores
|
||||
- Keys
|
||||
|
||||
As a part of the description of all these objects there is a set of
|
||||
credentials. What's in the set depends on the type of object.
|
||||
|
||||
(2) Object ownership.
|
||||
|
||||
Amongst the credentials of most objects, there will be a subset that
|
||||
indicates the ownership of that object. This is used for resource
|
||||
accounting and limitation (disk quotas and task rlimits for example).
|
||||
|
||||
In a standard UNIX filesystem, for instance, this will be defined by the
|
||||
UID marked on the inode.
|
||||
|
||||
(3) The objective context.
|
||||
|
||||
Also amongst the credentials of those objects, there will be a subset that
|
||||
indicates the 'objective context' of that object. This may or may not be
|
||||
the same set as in (2) - in standard UNIX files, for instance, this is the
|
||||
defined by the UID and the GID marked on the inode.
|
||||
|
||||
The objective context is used as part of the security calculation that is
|
||||
carried out when an object is acted upon.
|
||||
|
||||
(4) Subjects.
|
||||
|
||||
A subject is an object that is acting upon another object.
|
||||
|
||||
Most of the objects in the system are inactive: they don't act on other
|
||||
objects within the system. Processes/tasks are the obvious exception:
|
||||
they do stuff; they access and manipulate things.
|
||||
|
||||
Objects other than tasks may under some circumstances also be subjects.
|
||||
For instance an open file may send SIGIO to a task using the UID and EUID
|
||||
given to it by a task that called fcntl(F_SETOWN) upon it. In this case,
|
||||
the file struct will have a subjective context too.
|
||||
|
||||
(5) The subjective context.
|
||||
|
||||
A subject has an additional interpretation of its credentials. A subset
|
||||
of its credentials forms the 'subjective context'. The subjective context
|
||||
is used as part of the security calculation that is carried out when a
|
||||
subject acts.
|
||||
|
||||
A Linux task, for example, has the FSUID, FSGID and the supplementary
|
||||
group list for when it is acting upon a file - which are quite separate
|
||||
from the real UID and GID that normally form the objective context of the
|
||||
task.
|
||||
|
||||
(6) Actions.
|
||||
|
||||
Linux has a number of actions available that a subject may perform upon an
|
||||
object. The set of actions available depends on the nature of the subject
|
||||
and the object.
|
||||
|
||||
Actions include reading, writing, creating and deleting files; forking or
|
||||
signalling and tracing tasks.
|
||||
|
||||
(7) Rules, access control lists and security calculations.
|
||||
|
||||
When a subject acts upon an object, a security calculation is made. This
|
||||
involves taking the subjective context, the objective context and the
|
||||
action, and searching one or more sets of rules to see whether the subject
|
||||
is granted or denied permission to act in the desired manner on the
|
||||
object, given those contexts.
|
||||
|
||||
There are two main sources of rules:
|
||||
|
||||
(a) Discretionary access control (DAC):
|
||||
|
||||
Sometimes the object will include sets of rules as part of its
|
||||
description. This is an 'Access Control List' or 'ACL'. A Linux
|
||||
file may supply more than one ACL.
|
||||
|
||||
A traditional UNIX file, for example, includes a permissions mask that
|
||||
is an abbreviated ACL with three fixed classes of subject ('user',
|
||||
'group' and 'other'), each of which may be granted certain privileges
|
||||
('read', 'write' and 'execute' - whatever those map to for the object
|
||||
in question). UNIX file permissions do not allow the arbitrary
|
||||
specification of subjects, however, and so are of limited use.
|
||||
|
||||
A Linux file might also sport a POSIX ACL. This is a list of rules
|
||||
that grants various permissions to arbitrary subjects.
|
||||
|
||||
(b) Mandatory access control (MAC):
|
||||
|
||||
The system as a whole may have one or more sets of rules that get
|
||||
applied to all subjects and objects, regardless of their source.
|
||||
SELinux and Smack are examples of this.
|
||||
|
||||
In the case of SELinux and Smack, each object is given a label as part
|
||||
of its credentials. When an action is requested, they take the
|
||||
subject label, the object label and the action and look for a rule
|
||||
that says that this action is either granted or denied.
|
||||
|
||||
|
||||
====================
|
||||
TYPES OF CREDENTIALS
|
||||
====================
|
||||
|
||||
The Linux kernel supports the following types of credentials:
|
||||
|
||||
(1) Traditional UNIX credentials.
|
||||
|
||||
Real User ID
|
||||
Real Group ID
|
||||
|
||||
The UID and GID are carried by most, if not all, Linux objects, even if in
|
||||
some cases it has to be invented (FAT or CIFS files for example, which are
|
||||
derived from Windows). These (mostly) define the objective context of
|
||||
that object, with tasks being slightly different in some cases.
|
||||
|
||||
Effective, Saved and FS User ID
|
||||
Effective, Saved and FS Group ID
|
||||
Supplementary groups
|
||||
|
||||
These are additional credentials used by tasks only. Usually, an
|
||||
EUID/EGID/GROUPS will be used as the subjective context, and real UID/GID
|
||||
will be used as the objective. For tasks, it should be noted that this is
|
||||
not always true.
|
||||
|
||||
(2) Capabilities.
|
||||
|
||||
Set of permitted capabilities
|
||||
Set of inheritable capabilities
|
||||
Set of effective capabilities
|
||||
Capability bounding set
|
||||
|
||||
These are only carried by tasks. They indicate superior capabilities
|
||||
granted piecemeal to a task that an ordinary task wouldn't otherwise have.
|
||||
These are manipulated implicitly by changes to the traditional UNIX
|
||||
credentials, but can also be manipulated directly by the capset() system
|
||||
call.
|
||||
|
||||
The permitted capabilities are those caps that the process might grant
|
||||
itself to its effective or permitted sets through capset(). This
|
||||
inheritable set might also be so constrained.
|
||||
|
||||
The effective capabilities are the ones that a task is actually allowed to
|
||||
make use of itself.
|
||||
|
||||
The inheritable capabilities are the ones that may get passed across
|
||||
execve().
|
||||
|
||||
The bounding set limits the capabilities that may be inherited across
|
||||
execve(), especially when a binary is executed that will execute as UID 0.
|
||||
|
||||
(3) Secure management flags (securebits).
|
||||
|
||||
These are only carried by tasks. These govern the way the above
|
||||
credentials are manipulated and inherited over certain operations such as
|
||||
execve(). They aren't used directly as objective or subjective
|
||||
credentials.
|
||||
|
||||
(4) Keys and keyrings.
|
||||
|
||||
These are only carried by tasks. They carry and cache security tokens
|
||||
that don't fit into the other standard UNIX credentials. They are for
|
||||
making such things as network filesystem keys available to the file
|
||||
accesses performed by processes, without the necessity of ordinary
|
||||
programs having to know about security details involved.
|
||||
|
||||
Keyrings are a special type of key. They carry sets of other keys and can
|
||||
be searched for the desired key. Each process may subscribe to a number
|
||||
of keyrings:
|
||||
|
||||
Per-thread keying
|
||||
Per-process keyring
|
||||
Per-session keyring
|
||||
|
||||
When a process accesses a key, if not already present, it will normally be
|
||||
cached on one of these keyrings for future accesses to find.
|
||||
|
||||
For more information on using keys, see Documentation/keys.txt.
|
||||
|
||||
(5) LSM
|
||||
|
||||
The Linux Security Module allows extra controls to be placed over the
|
||||
operations that a task may do. Currently Linux supports two main
|
||||
alternate LSM options: SELinux and Smack.
|
||||
|
||||
Both work by labelling the objects in a system and then applying sets of
|
||||
rules (policies) that say what operations a task with one label may do to
|
||||
an object with another label.
|
||||
|
||||
(6) AF_KEY
|
||||
|
||||
This is a socket-based approach to credential management for networking
|
||||
stacks [RFC 2367]. It isn't discussed by this document as it doesn't
|
||||
interact directly with task and file credentials; rather it keeps system
|
||||
level credentials.
|
||||
|
||||
|
||||
When a file is opened, part of the opening task's subjective context is
|
||||
recorded in the file struct created. This allows operations using that file
|
||||
struct to use those credentials instead of the subjective context of the task
|
||||
that issued the operation. An example of this would be a file opened on a
|
||||
network filesystem where the credentials of the opened file should be presented
|
||||
to the server, regardless of who is actually doing a read or a write upon it.
|
||||
|
||||
|
||||
=============
|
||||
FILE MARKINGS
|
||||
=============
|
||||
|
||||
Files on disk or obtained over the network may have annotations that form the
|
||||
objective security context of that file. Depending on the type of filesystem,
|
||||
this may include one or more of the following:
|
||||
|
||||
(*) UNIX UID, GID, mode;
|
||||
|
||||
(*) Windows user ID;
|
||||
|
||||
(*) Access control list;
|
||||
|
||||
(*) LSM security label;
|
||||
|
||||
(*) UNIX exec privilege escalation bits (SUID/SGID);
|
||||
|
||||
(*) File capabilities exec privilege escalation bits.
|
||||
|
||||
These are compared to the task's subjective security context, and certain
|
||||
operations allowed or disallowed as a result. In the case of execve(), the
|
||||
privilege escalation bits come into play, and may allow the resulting process
|
||||
extra privileges, based on the annotations on the executable file.
|
||||
|
||||
|
||||
================
|
||||
TASK CREDENTIALS
|
||||
================
|
||||
|
||||
In Linux, all of a task's credentials are held in (uid, gid) or through
|
||||
(groups, keys, LSM security) a refcounted structure of type 'struct cred'.
|
||||
Each task points to its credentials by a pointer called 'cred' in its
|
||||
task_struct.
|
||||
|
||||
Once a set of credentials has been prepared and committed, it may not be
|
||||
changed, barring the following exceptions:
|
||||
|
||||
(1) its reference count may be changed;
|
||||
|
||||
(2) the reference count on the group_info struct it points to may be changed;
|
||||
|
||||
(3) the reference count on the security data it points to may be changed;
|
||||
|
||||
(4) the reference count on any keyrings it points to may be changed;
|
||||
|
||||
(5) any keyrings it points to may be revoked, expired or have their security
|
||||
attributes changed; and
|
||||
|
||||
(6) the contents of any keyrings to which it points may be changed (the whole
|
||||
point of keyrings being a shared set of credentials, modifiable by anyone
|
||||
with appropriate access).
|
||||
|
||||
To alter anything in the cred struct, the copy-and-replace principle must be
|
||||
adhered to. First take a copy, then alter the copy and then use RCU to change
|
||||
the task pointer to make it point to the new copy. There are wrappers to aid
|
||||
with this (see below).
|
||||
|
||||
A task may only alter its _own_ credentials; it is no longer permitted for a
|
||||
task to alter another's credentials. This means the capset() system call is no
|
||||
longer permitted to take any PID other than the one of the current process.
|
||||
Also keyctl_instantiate() and keyctl_negate() functions no longer permit
|
||||
attachment to process-specific keyrings in the requesting process as the
|
||||
instantiating process may need to create them.
|
||||
|
||||
|
||||
IMMUTABLE CREDENTIALS
|
||||
---------------------
|
||||
|
||||
Once a set of credentials has been made public (by calling commit_creds() for
|
||||
example), it must be considered immutable, barring two exceptions:
|
||||
|
||||
(1) The reference count may be altered.
|
||||
|
||||
(2) Whilst the keyring subscriptions of a set of credentials may not be
|
||||
changed, the keyrings subscribed to may have their contents altered.
|
||||
|
||||
To catch accidental credential alteration at compile time, struct task_struct
|
||||
has _const_ pointers to its credential sets, as does struct file. Furthermore,
|
||||
certain functions such as get_cred() and put_cred() operate on const pointers,
|
||||
thus rendering casts unnecessary, but require to temporarily ditch the const
|
||||
qualification to be able to alter the reference count.
|
||||
|
||||
|
||||
ACCESSING TASK CREDENTIALS
|
||||
--------------------------
|
||||
|
||||
A task being able to alter only its own credentials permits the current process
|
||||
to read or replace its own credentials without the need for any form of locking
|
||||
- which simplifies things greatly. It can just call:
|
||||
|
||||
const struct cred *current_cred()
|
||||
|
||||
to get a pointer to its credentials structure, and it doesn't have to release
|
||||
it afterwards.
|
||||
|
||||
There are convenience wrappers for retrieving specific aspects of a task's
|
||||
credentials (the value is simply returned in each case):
|
||||
|
||||
uid_t current_uid(void) Current's real UID
|
||||
gid_t current_gid(void) Current's real GID
|
||||
uid_t current_euid(void) Current's effective UID
|
||||
gid_t current_egid(void) Current's effective GID
|
||||
uid_t current_fsuid(void) Current's file access UID
|
||||
gid_t current_fsgid(void) Current's file access GID
|
||||
kernel_cap_t current_cap(void) Current's effective capabilities
|
||||
void *current_security(void) Current's LSM security pointer
|
||||
struct user_struct *current_user(void) Current's user account
|
||||
|
||||
There are also convenience wrappers for retrieving specific associated pairs of
|
||||
a task's credentials:
|
||||
|
||||
void current_uid_gid(uid_t *, gid_t *);
|
||||
void current_euid_egid(uid_t *, gid_t *);
|
||||
void current_fsuid_fsgid(uid_t *, gid_t *);
|
||||
|
||||
which return these pairs of values through their arguments after retrieving
|
||||
them from the current task's credentials.
|
||||
|
||||
|
||||
In addition, there is a function for obtaining a reference on the current
|
||||
process's current set of credentials:
|
||||
|
||||
const struct cred *get_current_cred(void);
|
||||
|
||||
and functions for getting references to one of the credentials that don't
|
||||
actually live in struct cred:
|
||||
|
||||
struct user_struct *get_current_user(void);
|
||||
struct group_info *get_current_groups(void);
|
||||
|
||||
which get references to the current process's user accounting structure and
|
||||
supplementary groups list respectively.
|
||||
|
||||
Once a reference has been obtained, it must be released with put_cred(),
|
||||
free_uid() or put_group_info() as appropriate.
|
||||
|
||||
|
||||
ACCESSING ANOTHER TASK'S CREDENTIALS
|
||||
------------------------------------
|
||||
|
||||
Whilst a task may access its own credentials without the need for locking, the
|
||||
same is not true of a task wanting to access another task's credentials. It
|
||||
must use the RCU read lock and rcu_dereference().
|
||||
|
||||
The rcu_dereference() is wrapped by:
|
||||
|
||||
const struct cred *__task_cred(struct task_struct *task);
|
||||
|
||||
This should be used inside the RCU read lock, as in the following example:
|
||||
|
||||
void foo(struct task_struct *t, struct foo_data *f)
|
||||
{
|
||||
const struct cred *tcred;
|
||||
...
|
||||
rcu_read_lock();
|
||||
tcred = __task_cred(t);
|
||||
f->uid = tcred->uid;
|
||||
f->gid = tcred->gid;
|
||||
f->groups = get_group_info(tcred->groups);
|
||||
rcu_read_unlock();
|
||||
...
|
||||
}
|
||||
|
||||
A function need not get RCU read lock to use __task_cred() if it is holding a
|
||||
spinlock at the time as this implicitly holds the RCU read lock.
|
||||
|
||||
Should it be necessary to hold another task's credentials for a long period of
|
||||
time, and possibly to sleep whilst doing so, then the caller should get a
|
||||
reference on them using:
|
||||
|
||||
const struct cred *get_task_cred(struct task_struct *task);
|
||||
|
||||
This does all the RCU magic inside of it. The caller must call put_cred() on
|
||||
the credentials so obtained when they're finished with.
|
||||
|
||||
There are a couple of convenience functions to access bits of another task's
|
||||
credentials, hiding the RCU magic from the caller:
|
||||
|
||||
uid_t task_uid(task) Task's real UID
|
||||
uid_t task_euid(task) Task's effective UID
|
||||
|
||||
If the caller is holding a spinlock or the RCU read lock at the time anyway,
|
||||
then:
|
||||
|
||||
__task_cred(task)->uid
|
||||
__task_cred(task)->euid
|
||||
|
||||
should be used instead. Similarly, if multiple aspects of a task's credentials
|
||||
need to be accessed, RCU read lock or a spinlock should be used, __task_cred()
|
||||
called, the result stored in a temporary pointer and then the credential
|
||||
aspects called from that before dropping the lock. This prevents the
|
||||
potentially expensive RCU magic from being invoked multiple times.
|
||||
|
||||
Should some other single aspect of another task's credentials need to be
|
||||
accessed, then this can be used:
|
||||
|
||||
task_cred_xxx(task, member)
|
||||
|
||||
where 'member' is a non-pointer member of the cred struct. For instance:
|
||||
|
||||
uid_t task_cred_xxx(task, suid);
|
||||
|
||||
will retrieve 'struct cred::suid' from the task, doing the appropriate RCU
|
||||
magic. This may not be used for pointer members as what they point to may
|
||||
disappear the moment the RCU read lock is dropped.
|
||||
|
||||
|
||||
ALTERING CREDENTIALS
|
||||
--------------------
|
||||
|
||||
As previously mentioned, a task may only alter its own credentials, and may not
|
||||
alter those of another task. This means that it doesn't need to use any
|
||||
locking to alter its own credentials.
|
||||
|
||||
To alter the current process's credentials, a function should first prepare a
|
||||
new set of credentials by calling:
|
||||
|
||||
struct cred *prepare_creds(void);
|
||||
|
||||
this locks current->cred_replace_mutex and then allocates and constructs a
|
||||
duplicate of the current process's credentials, returning with the mutex still
|
||||
held if successful. It returns NULL if not successful (out of memory).
|
||||
|
||||
The mutex prevents ptrace() from altering the ptrace state of a process whilst
|
||||
security checks on credentials construction and changing is taking place as
|
||||
the ptrace state may alter the outcome, particularly in the case of execve().
|
||||
|
||||
The new credentials set should be altered appropriately, and any security
|
||||
checks and hooks done. Both the current and the proposed sets of credentials
|
||||
are available for this purpose as current_cred() will return the current set
|
||||
still at this point.
|
||||
|
||||
|
||||
When the credential set is ready, it should be committed to the current process
|
||||
by calling:
|
||||
|
||||
int commit_creds(struct cred *new);
|
||||
|
||||
This will alter various aspects of the credentials and the process, giving the
|
||||
LSM a chance to do likewise, then it will use rcu_assign_pointer() to actually
|
||||
commit the new credentials to current->cred, it will release
|
||||
current->cred_replace_mutex to allow ptrace() to take place, and it will notify
|
||||
the scheduler and others of the changes.
|
||||
|
||||
This function is guaranteed to return 0, so that it can be tail-called at the
|
||||
end of such functions as sys_setresuid().
|
||||
|
||||
Note that this function consumes the caller's reference to the new credentials.
|
||||
The caller should _not_ call put_cred() on the new credentials afterwards.
|
||||
|
||||
Furthermore, once this function has been called on a new set of credentials,
|
||||
those credentials may _not_ be changed further.
|
||||
|
||||
|
||||
Should the security checks fail or some other error occur after prepare_creds()
|
||||
has been called, then the following function should be invoked:
|
||||
|
||||
void abort_creds(struct cred *new);
|
||||
|
||||
This releases the lock on current->cred_replace_mutex that prepare_creds() got
|
||||
and then releases the new credentials.
|
||||
|
||||
|
||||
A typical credentials alteration function would look something like this:
|
||||
|
||||
int alter_suid(uid_t suid)
|
||||
{
|
||||
struct cred *new;
|
||||
int ret;
|
||||
|
||||
new = prepare_creds();
|
||||
if (!new)
|
||||
return -ENOMEM;
|
||||
|
||||
new->suid = suid;
|
||||
ret = security_alter_suid(new);
|
||||
if (ret < 0) {
|
||||
abort_creds(new);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return commit_creds(new);
|
||||
}
|
||||
|
||||
|
||||
MANAGING CREDENTIALS
|
||||
--------------------
|
||||
|
||||
There are some functions to help manage credentials:
|
||||
|
||||
(*) void put_cred(const struct cred *cred);
|
||||
|
||||
This releases a reference to the given set of credentials. If the
|
||||
reference count reaches zero, the credentials will be scheduled for
|
||||
destruction by the RCU system.
|
||||
|
||||
(*) const struct cred *get_cred(const struct cred *cred);
|
||||
|
||||
This gets a reference on a live set of credentials, returning a pointer to
|
||||
that set of credentials.
|
||||
|
||||
(*) struct cred *get_new_cred(struct cred *cred);
|
||||
|
||||
This gets a reference on a set of credentials that is under construction
|
||||
and is thus still mutable, returning a pointer to that set of credentials.
|
||||
|
||||
|
||||
=====================
|
||||
OPEN FILE CREDENTIALS
|
||||
=====================
|
||||
|
||||
When a new file is opened, a reference is obtained on the opening task's
|
||||
credentials and this is attached to the file struct as 'f_cred' in place of
|
||||
'f_uid' and 'f_gid'. Code that used to access file->f_uid and file->f_gid
|
||||
should now access file->f_cred->fsuid and file->f_cred->fsgid.
|
||||
|
||||
It is safe to access f_cred without the use of RCU or locking because the
|
||||
pointer will not change over the lifetime of the file struct, and nor will the
|
||||
contents of the cred struct pointed to, barring the exceptions listed above
|
||||
(see the Task Credentials section).
|
||||
|
||||
|
||||
=======================================
|
||||
OVERRIDING THE VFS'S USE OF CREDENTIALS
|
||||
=======================================
|
||||
|
||||
Under some circumstances it is desirable to override the credentials used by
|
||||
the VFS, and that can be done by calling into such as vfs_mkdir() with a
|
||||
different set of credentials. This is done in the following places:
|
||||
|
||||
(*) sys_faccessat().
|
||||
|
||||
(*) do_coredump().
|
||||
|
||||
(*) nfs4recover.c.
|
|
@ -120,13 +120,6 @@ Who: Christoph Hellwig <hch@lst.de>
|
|||
|
||||
---------------------------
|
||||
|
||||
What: eepro100 network driver
|
||||
When: January 2007
|
||||
Why: replaced by the e100 driver
|
||||
Who: Adrian Bunk <bunk@stusta.de>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: Unused EXPORT_SYMBOL/EXPORT_SYMBOL_GPL exports
|
||||
(temporary transition config option provided until then)
|
||||
The transition config option will also be removed at the same time.
|
||||
|
@ -244,18 +237,6 @@ Who: Michael Buesch <mb@bu3sch.de>
|
|||
|
||||
---------------------------
|
||||
|
||||
What: init_mm export
|
||||
When: 2.6.26
|
||||
Why: Not used in-tree. The current out-of-tree users used it to
|
||||
work around problems in the CPA code which should be resolved
|
||||
by now. One usecase was described to provide verification code
|
||||
of the CPA operation. That's a good idea in general, but such
|
||||
code / infrastructure should be in the kernel and not in some
|
||||
out-of-tree driver.
|
||||
Who: Thomas Gleixner <tglx@linutronix.de>
|
||||
|
||||
----------------------------
|
||||
|
||||
What: usedac i386 kernel parameter
|
||||
When: 2.6.27
|
||||
Why: replaced by allowdac and no dac combination
|
||||
|
|
|
@ -1339,10 +1339,13 @@ nmi_watchdog
|
|||
|
||||
Enables/Disables the NMI watchdog on x86 systems. When the value is non-zero
|
||||
the NMI watchdog is enabled and will continuously test all online cpus to
|
||||
determine whether or not they are still functioning properly.
|
||||
determine whether or not they are still functioning properly. Currently,
|
||||
passing "nmi_watchdog=" parameter at boot time is required for this function
|
||||
to work.
|
||||
|
||||
Because the NMI watchdog shares registers with oprofile, by disabling the NMI
|
||||
watchdog, oprofile may have more registers to utilize.
|
||||
If LAPIC NMI watchdog method is in use (nmi_watchdog=2 kernel parameter), the
|
||||
NMI watchdog shares registers with oprofile. By disabling the NMI watchdog,
|
||||
oprofile may have more registers to utilize.
|
||||
|
||||
msgmni
|
||||
------
|
||||
|
|
|
@ -82,7 +82,7 @@ of ftrace. Here is a list of some of the key files:
|
|||
tracer is not adding more data, they will display
|
||||
the same information every time they are read.
|
||||
|
||||
iter_ctrl: This file lets the user control the amount of data
|
||||
trace_options: This file lets the user control the amount of data
|
||||
that is displayed in one of the above output
|
||||
files.
|
||||
|
||||
|
@ -94,10 +94,10 @@ of ftrace. Here is a list of some of the key files:
|
|||
only be recorded if the latency is greater than
|
||||
the value in this file. (in microseconds)
|
||||
|
||||
trace_entries: This sets or displays the number of bytes each CPU
|
||||
buffer_size_kb: This sets or displays the number of kilobytes each CPU
|
||||
buffer can hold. The tracer buffers are the same size
|
||||
for each CPU. The displayed number is the size of the
|
||||
CPU buffer and not total size of all buffers. The
|
||||
CPU buffer and not total size of all buffers. The
|
||||
trace buffers are allocated in pages (blocks of memory
|
||||
that the kernel uses for allocation, usually 4 KB in size).
|
||||
If the last page allocated has room for more bytes
|
||||
|
@ -127,6 +127,8 @@ of ftrace. Here is a list of some of the key files:
|
|||
be traced. If a function exists in both set_ftrace_filter
|
||||
and set_ftrace_notrace, the function will _not_ be traced.
|
||||
|
||||
set_ftrace_pid: Have the function tracer only trace a single thread.
|
||||
|
||||
available_filter_functions: This lists the functions that ftrace
|
||||
has processed and can trace. These are the function
|
||||
names that you can pass to "set_ftrace_filter" or
|
||||
|
@ -316,23 +318,23 @@ The above is mostly meaningful for kernel developers.
|
|||
The rest is the same as the 'trace' file.
|
||||
|
||||
|
||||
iter_ctrl
|
||||
---------
|
||||
trace_options
|
||||
-------------
|
||||
|
||||
The iter_ctrl file is used to control what gets printed in the trace
|
||||
The trace_options file is used to control what gets printed in the trace
|
||||
output. To see what is available, simply cat the file:
|
||||
|
||||
cat /debug/tracing/iter_ctrl
|
||||
cat /debug/tracing/trace_options
|
||||
print-parent nosym-offset nosym-addr noverbose noraw nohex nobin \
|
||||
noblock nostacktrace nosched-tree
|
||||
noblock nostacktrace nosched-tree nouserstacktrace nosym-userobj
|
||||
|
||||
To disable one of the options, echo in the option prepended with "no".
|
||||
|
||||
echo noprint-parent > /debug/tracing/iter_ctrl
|
||||
echo noprint-parent > /debug/tracing/trace_options
|
||||
|
||||
To enable an option, leave off the "no".
|
||||
|
||||
echo sym-offset > /debug/tracing/iter_ctrl
|
||||
echo sym-offset > /debug/tracing/trace_options
|
||||
|
||||
Here are the available options:
|
||||
|
||||
|
@ -378,6 +380,20 @@ Here are the available options:
|
|||
When a trace is recorded, so is the stack of functions.
|
||||
This allows for back traces of trace sites.
|
||||
|
||||
userstacktrace - This option changes the trace.
|
||||
It records a stacktrace of the current userspace thread.
|
||||
|
||||
sym-userobj - when user stacktrace are enabled, look up which object the
|
||||
address belongs to, and print a relative address
|
||||
This is especially useful when ASLR is on, otherwise you don't
|
||||
get a chance to resolve the address to object/file/line after the app is no
|
||||
longer running
|
||||
|
||||
The lookup is performed when you read trace,trace_pipe,latency_trace. Example:
|
||||
|
||||
a.out-1623 [000] 40874.465068: /root/a.out[+0x480] <-/root/a.out[+0
|
||||
x494] <- /root/a.out[+0x4a8] <- /lib/libc-2.7.so[+0x1e1a6]
|
||||
|
||||
sched-tree - TBD (any users??)
|
||||
|
||||
|
||||
|
@ -1059,6 +1075,83 @@ For simple one time traces, the above is sufficent. For anything else,
|
|||
a search through /proc/mounts may be needed to find where the debugfs
|
||||
file-system is mounted.
|
||||
|
||||
|
||||
Single thread tracing
|
||||
---------------------
|
||||
|
||||
By writing into /debug/tracing/set_ftrace_pid you can trace a
|
||||
single thread. For example:
|
||||
|
||||
# cat /debug/tracing/set_ftrace_pid
|
||||
no pid
|
||||
# echo 3111 > /debug/tracing/set_ftrace_pid
|
||||
# cat /debug/tracing/set_ftrace_pid
|
||||
3111
|
||||
# echo function > /debug/tracing/current_tracer
|
||||
# cat /debug/tracing/trace | head
|
||||
# tracer: function
|
||||
#
|
||||
# TASK-PID CPU# TIMESTAMP FUNCTION
|
||||
# | | | | |
|
||||
yum-updatesd-3111 [003] 1637.254676: finish_task_switch <-thread_return
|
||||
yum-updatesd-3111 [003] 1637.254681: hrtimer_cancel <-schedule_hrtimeout_range
|
||||
yum-updatesd-3111 [003] 1637.254682: hrtimer_try_to_cancel <-hrtimer_cancel
|
||||
yum-updatesd-3111 [003] 1637.254683: lock_hrtimer_base <-hrtimer_try_to_cancel
|
||||
yum-updatesd-3111 [003] 1637.254685: fget_light <-do_sys_poll
|
||||
yum-updatesd-3111 [003] 1637.254686: pipe_poll <-do_sys_poll
|
||||
# echo -1 > /debug/tracing/set_ftrace_pid
|
||||
# cat /debug/tracing/trace |head
|
||||
# tracer: function
|
||||
#
|
||||
# TASK-PID CPU# TIMESTAMP FUNCTION
|
||||
# | | | | |
|
||||
##### CPU 3 buffer started ####
|
||||
yum-updatesd-3111 [003] 1701.957688: free_poll_entry <-poll_freewait
|
||||
yum-updatesd-3111 [003] 1701.957689: remove_wait_queue <-free_poll_entry
|
||||
yum-updatesd-3111 [003] 1701.957691: fput <-free_poll_entry
|
||||
yum-updatesd-3111 [003] 1701.957692: audit_syscall_exit <-sysret_audit
|
||||
yum-updatesd-3111 [003] 1701.957693: path_put <-audit_syscall_exit
|
||||
|
||||
If you want to trace a function when executing, you could use
|
||||
something like this simple program:
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
if (argc < 1)
|
||||
exit(-1);
|
||||
|
||||
if (fork() > 0) {
|
||||
int fd, ffd;
|
||||
char line[64];
|
||||
int s;
|
||||
|
||||
ffd = open("/debug/tracing/current_tracer", O_WRONLY);
|
||||
if (ffd < 0)
|
||||
exit(-1);
|
||||
write(ffd, "nop", 3);
|
||||
|
||||
fd = open("/debug/tracing/set_ftrace_pid", O_WRONLY);
|
||||
s = sprintf(line, "%d\n", getpid());
|
||||
write(fd, line, s);
|
||||
|
||||
write(ffd, "function", 8);
|
||||
|
||||
close(fd);
|
||||
close(ffd);
|
||||
|
||||
execvp(argv[1], argv+1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
dynamic ftrace
|
||||
--------------
|
||||
|
||||
|
@ -1158,7 +1251,11 @@ These are the only wild cards which are supported.
|
|||
|
||||
<match>*<match> will not work.
|
||||
|
||||
# echo hrtimer_* > /debug/tracing/set_ftrace_filter
|
||||
Note: It is better to use quotes to enclose the wild cards, otherwise
|
||||
the shell may expand the parameters into names of files in the local
|
||||
directory.
|
||||
|
||||
# echo 'hrtimer_*' > /debug/tracing/set_ftrace_filter
|
||||
|
||||
Produces:
|
||||
|
||||
|
@ -1213,7 +1310,7 @@ Again, now we want to append.
|
|||
# echo sys_nanosleep > /debug/tracing/set_ftrace_filter
|
||||
# cat /debug/tracing/set_ftrace_filter
|
||||
sys_nanosleep
|
||||
# echo hrtimer_* >> /debug/tracing/set_ftrace_filter
|
||||
# echo 'hrtimer_*' >> /debug/tracing/set_ftrace_filter
|
||||
# cat /debug/tracing/set_ftrace_filter
|
||||
hrtimer_run_queues
|
||||
hrtimer_run_pending
|
||||
|
@ -1299,41 +1396,29 @@ trace entries
|
|||
-------------
|
||||
|
||||
Having too much or not enough data can be troublesome in diagnosing
|
||||
an issue in the kernel. The file trace_entries is used to modify
|
||||
an issue in the kernel. The file buffer_size_kb is used to modify
|
||||
the size of the internal trace buffers. The number listed
|
||||
is the number of entries that can be recorded per CPU. To know
|
||||
the full size, multiply the number of possible CPUS with the
|
||||
number of entries.
|
||||
|
||||
# cat /debug/tracing/trace_entries
|
||||
65620
|
||||
# cat /debug/tracing/buffer_size_kb
|
||||
1408 (units kilobytes)
|
||||
|
||||
Note, to modify this, you must have tracing completely disabled. To do that,
|
||||
echo "nop" into the current_tracer. If the current_tracer is not set
|
||||
to "nop", an EINVAL error will be returned.
|
||||
|
||||
# echo nop > /debug/tracing/current_tracer
|
||||
# echo 100000 > /debug/tracing/trace_entries
|
||||
# cat /debug/tracing/trace_entries
|
||||
100045
|
||||
|
||||
|
||||
Notice that we echoed in 100,000 but the size is 100,045. The entries
|
||||
are held in individual pages. It allocates the number of pages it takes
|
||||
to fulfill the request. If more entries may fit on the last page
|
||||
then they will be added.
|
||||
|
||||
# echo 1 > /debug/tracing/trace_entries
|
||||
# cat /debug/tracing/trace_entries
|
||||
85
|
||||
|
||||
This shows us that 85 entries can fit in a single page.
|
||||
# echo 10000 > /debug/tracing/buffer_size_kb
|
||||
# cat /debug/tracing/buffer_size_kb
|
||||
10000 (units kilobytes)
|
||||
|
||||
The number of pages which will be allocated is limited to a percentage
|
||||
of available memory. Allocating too much will produce an error.
|
||||
|
||||
# echo 1000000000000 > /debug/tracing/trace_entries
|
||||
# echo 1000000000000 > /debug/tracing/buffer_size_kb
|
||||
-bash: echo: write error: Cannot allocate memory
|
||||
# cat /debug/tracing/trace_entries
|
||||
# cat /debug/tracing/buffer_size_kb
|
||||
85
|
||||
|
||||
|
|
|
@ -383,6 +383,20 @@ more details, with real examples.
|
|||
to prerequisites are referenced with $(src) (because they are not
|
||||
generated files).
|
||||
|
||||
$(kecho)
|
||||
echoing information to user in a rule is often a good practice
|
||||
but when execution "make -s" one does not expect to see any output
|
||||
except for warnings/errors.
|
||||
To support this kbuild define $(kecho) which will echo out the
|
||||
text following $(kecho) to stdout except if "make -s" is used.
|
||||
|
||||
Example:
|
||||
#arch/blackfin/boot/Makefile
|
||||
$(obj)/vmImage: $(obj)/vmlinux.gz
|
||||
$(call if_changed,uimage)
|
||||
@$(kecho) 'Kernel: $@ is ready'
|
||||
|
||||
|
||||
--- 3.11 $(CC) support functions
|
||||
|
||||
The kernel may be built with several different versions of
|
||||
|
|
|
@ -89,6 +89,7 @@ parameter is applicable:
|
|||
SPARC Sparc architecture is enabled.
|
||||
SWSUSP Software suspend (hibernation) is enabled.
|
||||
SUSPEND System suspend states are enabled.
|
||||
FTRACE Function tracing enabled.
|
||||
TS Appropriate touchscreen support is enabled.
|
||||
USB USB support is enabled.
|
||||
USBHID USB Human Interface Device support is enabled.
|
||||
|
@ -220,14 +221,17 @@ and is between 256 and 4096 characters. It is defined in the file
|
|||
Bits in debug_level correspond to a level in
|
||||
ACPI_DEBUG_PRINT statements, e.g.,
|
||||
ACPI_DEBUG_PRINT((ACPI_DB_INFO, ...
|
||||
See Documentation/acpi/debug.txt for more information
|
||||
about debug layers and levels.
|
||||
The debug_level mask defaults to "info". See
|
||||
Documentation/acpi/debug.txt for more information about
|
||||
debug layers and levels.
|
||||
|
||||
Enable processor driver info messages:
|
||||
acpi.debug_layer=0x20000000
|
||||
Enable PCI/PCI interrupt routing info messages:
|
||||
acpi.debug_layer=0x400000
|
||||
Enable AML "Debug" output, i.e., stores to the Debug
|
||||
object while interpreting AML:
|
||||
acpi.debug_layer=0xffffffff acpi.debug_level=0x2
|
||||
Enable PCI/PCI interrupt routing info messages:
|
||||
acpi.debug_layer=0x400000 acpi.debug_level=0x4
|
||||
Enable all messages related to ACPI hardware:
|
||||
acpi.debug_layer=0x2 acpi.debug_level=0xffffffff
|
||||
|
||||
|
@ -750,6 +754,14 @@ and is between 256 and 4096 characters. It is defined in the file
|
|||
parameter will force ia64_sal_cache_flush to call
|
||||
ia64_pal_cache_flush instead of SAL_CACHE_FLUSH.
|
||||
|
||||
ftrace=[tracer]
|
||||
[ftrace] will set and start the specified tracer
|
||||
as early as possible in order to facilitate early
|
||||
boot debugging.
|
||||
|
||||
ftrace_dump_on_oops
|
||||
[ftrace] will dump the trace buffers on oops.
|
||||
|
||||
gamecon.map[2|3]=
|
||||
[HW,JOY] Multisystem joystick and NES/SNES/PSX pad
|
||||
support via parallel port (up to 5 devices per port)
|
||||
|
@ -811,6 +823,9 @@ and is between 256 and 4096 characters. It is defined in the file
|
|||
|
||||
hlt [BUGS=ARM,SH]
|
||||
|
||||
hvc_iucv= [S390] Number of z/VM IUCV Hypervisor console (HVC)
|
||||
back-ends. Valid parameters: 0..8
|
||||
|
||||
i8042.debug [HW] Toggle i8042 debug mode
|
||||
i8042.direct [HW] Put keyboard port into non-translated mode
|
||||
i8042.dumbkbd [HW] Pretend that controller can only read data from
|
||||
|
@ -1393,7 +1408,20 @@ and is between 256 and 4096 characters. It is defined in the file
|
|||
when a NMI is triggered.
|
||||
Format: [state][,regs][,debounce][,die]
|
||||
|
||||
nmi_watchdog= [KNL,BUGS=X86-32] Debugging features for SMP kernels
|
||||
nmi_watchdog= [KNL,BUGS=X86-32,X86-64] Debugging features for SMP kernels
|
||||
Format: [panic,][num]
|
||||
Valid num: 0,1,2
|
||||
0 - turn nmi_watchdog off
|
||||
1 - use the IO-APIC timer for the NMI watchdog
|
||||
2 - use the local APIC for the NMI watchdog using
|
||||
a performance counter. Note: This will use one performance
|
||||
counter and the local APIC's performance vector.
|
||||
When panic is specified panic when an NMI watchdog timeout occurs.
|
||||
This is useful when you use a panic=... timeout and need the box
|
||||
quickly up again.
|
||||
Instead of 1 and 2 it is possible to use the following
|
||||
symbolic names: lapic and ioapic
|
||||
Example: nmi_watchdog=2 or nmi_watchdog=panic,lapic
|
||||
|
||||
no387 [BUGS=X86-32] Tells the kernel to use the 387 maths
|
||||
emulation library even if a 387 maths coprocessor
|
||||
|
@ -1449,6 +1477,10 @@ and is between 256 and 4096 characters. It is defined in the file
|
|||
instruction doesn't work correctly and not to
|
||||
use it.
|
||||
|
||||
no_file_caps Tells the kernel not to honor file capabilities. The
|
||||
only way then for a file to be executed with privilege
|
||||
is to be setuid root or executed by root.
|
||||
|
||||
nohalt [IA-64] Tells the kernel not to use the power saving
|
||||
function PAL_HALT_LIGHT when idle. This increases
|
||||
power-consumption. On the positive side, it reduces
|
||||
|
@ -1626,6 +1658,17 @@ and is between 256 and 4096 characters. It is defined in the file
|
|||
nomsi [MSI] If the PCI_MSI kernel config parameter is
|
||||
enabled, this kernel boot option can be used to
|
||||
disable the use of MSI interrupts system-wide.
|
||||
noioapicquirk [APIC] Disable all boot interrupt quirks.
|
||||
Safety option to keep boot IRQs enabled. This
|
||||
should never be necessary.
|
||||
ioapicreroute [APIC] Enable rerouting of boot IRQs to the
|
||||
primary IO-APIC for bridges that cannot disable
|
||||
boot IRQs. This fixes a source of spurious IRQs
|
||||
when the system masks IRQs.
|
||||
noioapicreroute [APIC] Disable workaround that uses the
|
||||
boot IRQ equivalent of an IRQ that connects to
|
||||
a chipset where boot IRQs cannot be disabled.
|
||||
The opposite of ioapicreroute.
|
||||
biosirq [X86-32] Use PCI BIOS calls to get the interrupt
|
||||
routing table. These calls are known to be buggy
|
||||
on several machines and they hang the machine
|
||||
|
@ -2165,6 +2208,9 @@ and is between 256 and 4096 characters. It is defined in the file
|
|||
st= [HW,SCSI] SCSI tape parameters (buffers, etc.)
|
||||
See Documentation/scsi/st.txt.
|
||||
|
||||
stacktrace [FTRACE]
|
||||
Enabled the stack tracer on boot up.
|
||||
|
||||
sti= [PARISC,HW]
|
||||
Format: <num>
|
||||
Set the STI (builtin display/keyboard on the HP-PARISC
|
||||
|
@ -2249,12 +2295,27 @@ and is between 256 and 4096 characters. It is defined in the file
|
|||
See comment before function dc390_setup() in
|
||||
drivers/scsi/tmscsim.c.
|
||||
|
||||
topology= [S390]
|
||||
Format: {off | on}
|
||||
Specify if the kernel should make use of the cpu
|
||||
topology informations if the hardware supports these.
|
||||
The scheduler will make use of these informations and
|
||||
e.g. base its process migration decisions on it.
|
||||
Default is off.
|
||||
|
||||
tp720= [HW,PS2]
|
||||
|
||||
trix= [HW,OSS] MediaTrix AudioTrix Pro
|
||||
Format:
|
||||
<io>,<irq>,<dma>,<dma2>,<sb_io>,<sb_irq>,<sb_dma>,<mpu_io>,<mpu_irq>
|
||||
|
||||
tsc= Disable clocksource-must-verify flag for TSC.
|
||||
Format: <string>
|
||||
[x86] reliable: mark tsc clocksource as reliable, this
|
||||
disables clocksource verification at runtime.
|
||||
Used to enable high-resolution timer mode on older
|
||||
hardware, and in virtualized environment.
|
||||
|
||||
turbografx.map[2|3]= [HW,JOY]
|
||||
TurboGraFX parallel port interface
|
||||
Format:
|
||||
|
|
|
@ -51,11 +51,16 @@ to call) for the specific marker through marker_probe_register() and can be
|
|||
activated by calling marker_arm(). Marker deactivation can be done by calling
|
||||
marker_disarm() as many times as marker_arm() has been called. Removing a probe
|
||||
is done through marker_probe_unregister(); it will disarm the probe.
|
||||
marker_synchronize_unregister() must be called before the end of the module exit
|
||||
function to make sure there is no caller left using the probe. This, and the
|
||||
fact that preemption is disabled around the probe call, make sure that probe
|
||||
removal and module unload are safe. See the "Probe example" section below for a
|
||||
sample probe module.
|
||||
|
||||
marker_synchronize_unregister() must be called between probe unregistration and
|
||||
the first occurrence of
|
||||
- the end of module exit function,
|
||||
to make sure there is no caller left using the probe;
|
||||
- the free of any resource used by the probes,
|
||||
to make sure the probes wont be accessing invalid data.
|
||||
This, and the fact that preemption is disabled around the probe call, make sure
|
||||
that probe removal and module unload are safe. See the "Probe example" section
|
||||
below for a sample probe module.
|
||||
|
||||
The marker mechanism supports inserting multiple instances of the same marker.
|
||||
Markers can be put in inline functions, inlined static functions, and
|
||||
|
@ -70,6 +75,20 @@ a printk warning which identifies the inconsistency:
|
|||
|
||||
"Format mismatch for probe probe_name (format), marker (format)"
|
||||
|
||||
Another way to use markers is to simply define the marker without generating any
|
||||
function call to actually call into the marker. This is useful in combination
|
||||
with tracepoint probes in a scheme like this :
|
||||
|
||||
void probe_tracepoint_name(unsigned int arg1, struct task_struct *tsk);
|
||||
|
||||
DEFINE_MARKER_TP(marker_eventname, tracepoint_name, probe_tracepoint_name,
|
||||
"arg1 %u pid %d");
|
||||
|
||||
notrace void probe_tracepoint_name(unsigned int arg1, struct task_struct *tsk)
|
||||
{
|
||||
struct marker *marker = &GET_MARKER(kernel_irq_entry);
|
||||
/* write data to trace buffers ... */
|
||||
}
|
||||
|
||||
* Probe / marker example
|
||||
|
||||
|
|
|
@ -147,7 +147,7 @@ Where the supported parameter are:
|
|||
driver. If disabled, the driver will not attempt to scan
|
||||
for and associate to a network until it has been configured with
|
||||
one or more properties for the target network, for example configuring
|
||||
the network SSID. Default is 1 (auto-associate)
|
||||
the network SSID. Default is 0 (do not auto-associate)
|
||||
|
||||
Example: % modprobe ipw2200 associate=0
|
||||
|
||||
|
|
|
@ -194,6 +194,48 @@ or, for backwards compatibility, the option value. E.g.,
|
|||
|
||||
The parameters are as follows:
|
||||
|
||||
ad_select
|
||||
|
||||
Specifies the 802.3ad aggregation selection logic to use. The
|
||||
possible values and their effects are:
|
||||
|
||||
stable or 0
|
||||
|
||||
The active aggregator is chosen by largest aggregate
|
||||
bandwidth.
|
||||
|
||||
Reselection of the active aggregator occurs only when all
|
||||
slaves of the active aggregator are down or the active
|
||||
aggregator has no slaves.
|
||||
|
||||
This is the default value.
|
||||
|
||||
bandwidth or 1
|
||||
|
||||
The active aggregator is chosen by largest aggregate
|
||||
bandwidth. Reselection occurs if:
|
||||
|
||||
- A slave is added to or removed from the bond
|
||||
|
||||
- Any slave's link state changes
|
||||
|
||||
- Any slave's 802.3ad association state changes
|
||||
|
||||
- The bond's adminstrative state changes to up
|
||||
|
||||
count or 2
|
||||
|
||||
The active aggregator is chosen by the largest number of
|
||||
ports (slaves). Reselection occurs as described under the
|
||||
"bandwidth" setting, above.
|
||||
|
||||
The bandwidth and count selection policies permit failover of
|
||||
802.3ad aggregations when partial failure of the active aggregator
|
||||
occurs. This keeps the aggregator with the highest availability
|
||||
(either in bandwidth or in number of ports) active at all times.
|
||||
|
||||
This option was added in bonding version 3.4.0.
|
||||
|
||||
arp_interval
|
||||
|
||||
Specifies the ARP link monitoring frequency in milliseconds.
|
||||
|
@ -551,6 +593,16 @@ num_grat_arp
|
|||
affects only the active-backup mode. This option was added for
|
||||
bonding version 3.3.0.
|
||||
|
||||
num_unsol_na
|
||||
|
||||
Specifies the number of unsolicited IPv6 Neighbor Advertisements
|
||||
to be issued after a failover event. One unsolicited NA is issued
|
||||
immediately after the failover.
|
||||
|
||||
The valid range is 0 - 255; the default value is 1. This option
|
||||
affects only the active-backup mode. This option was added for
|
||||
bonding version 3.4.0.
|
||||
|
||||
primary
|
||||
|
||||
A string (eth0, eth2, etc) specifying which slave is the
|
||||
|
@ -922,17 +974,19 @@ USERCTL=no
|
|||
NETMASK, NETWORK and BROADCAST) to match your network configuration.
|
||||
|
||||
For later versions of initscripts, such as that found with Fedora
|
||||
7 and Red Hat Enterprise Linux version 5 (or later), it is possible, and,
|
||||
indeed, preferable, to specify the bonding options in the ifcfg-bond0
|
||||
7 (or later) and Red Hat Enterprise Linux version 5 (or later), it is possible,
|
||||
and, indeed, preferable, to specify the bonding options in the ifcfg-bond0
|
||||
file, e.g. a line of the format:
|
||||
|
||||
BONDING_OPTS="mode=active-backup arp_interval=60 arp_ip_target=+192.168.1.254"
|
||||
BONDING_OPTS="mode=active-backup arp_interval=60 arp_ip_target=192.168.1.254"
|
||||
|
||||
will configure the bond with the specified options. The options
|
||||
specified in BONDING_OPTS are identical to the bonding module parameters
|
||||
except for the arp_ip_target field. Each target should be included as a
|
||||
separate option and should be preceded by a '+' to indicate it should be
|
||||
added to the list of queried targets, e.g.,
|
||||
except for the arp_ip_target field when using versions of initscripts older
|
||||
than and 8.57 (Fedora 8) and 8.45.19 (Red Hat Enterprise Linux 5.2). When
|
||||
using older versions each target should be included as a separate option and
|
||||
should be preceded by a '+' to indicate it should be added to the list of
|
||||
queried targets, e.g.,
|
||||
|
||||
arp_ip_target=+192.168.1.1 arp_ip_target=+192.168.1.2
|
||||
|
||||
|
@ -940,7 +994,7 @@ added to the list of queried targets, e.g.,
|
|||
options via BONDING_OPTS, it is not necessary to edit /etc/modules.conf or
|
||||
/etc/modprobe.conf.
|
||||
|
||||
For older versions of initscripts that do not support
|
||||
For even older versions of initscripts that do not support
|
||||
BONDING_OPTS, it is necessary to edit /etc/modules.conf (or
|
||||
/etc/modprobe.conf, depending upon your distro) to load the bonding module
|
||||
with your desired options when the bond0 interface is brought up. The
|
||||
|
|
|
@ -57,6 +57,24 @@ can be set before calling bind().
|
|||
DCCP_SOCKOPT_GET_CUR_MPS is read-only and retrieves the current maximum packet
|
||||
size (application payload size) in bytes, see RFC 4340, section 14.
|
||||
|
||||
DCCP_SOCKOPT_AVAILABLE_CCIDS is also read-only and returns the list of CCIDs
|
||||
supported by the endpoint (see include/linux/dccp.h for symbolic constants).
|
||||
The caller needs to provide a sufficiently large (> 2) array of type uint8_t.
|
||||
|
||||
DCCP_SOCKOPT_CCID is write-only and sets both the TX and RX CCIDs at the same
|
||||
time, combining the operation of the next two socket options. This option is
|
||||
preferrable over the latter two, since often applications will use the same
|
||||
type of CCID for both directions; and mixed use of CCIDs is not currently well
|
||||
understood. This socket option takes as argument at least one uint8_t value, or
|
||||
an array of uint8_t values, which must match available CCIDS (see above). CCIDs
|
||||
must be registered on the socket before calling connect() or listen().
|
||||
|
||||
DCCP_SOCKOPT_TX_CCID is read/write. It returns the current CCID (if set) or sets
|
||||
the preference list for the TX CCID, using the same format as DCCP_SOCKOPT_CCID.
|
||||
Please note that the getsockopt argument type here is `int', not uint8_t.
|
||||
|
||||
DCCP_SOCKOPT_RX_CCID is analogous to DCCP_SOCKOPT_TX_CCID, but for the RX CCID.
|
||||
|
||||
DCCP_SOCKOPT_SERVER_TIMEWAIT enables the server (listening socket) to hold
|
||||
timewait state when closing the connection (RFC 4340, 8.3). The usual case is
|
||||
that the closing server sends a CloseReq, whereupon the client holds timewait
|
||||
|
@ -115,20 +133,12 @@ retries2
|
|||
importance for retransmitted acknowledgments and feature negotiation,
|
||||
data packets are never retransmitted. Analogue of tcp_retries2.
|
||||
|
||||
send_ndp = 1
|
||||
Whether or not to send NDP count options (sec. 7.7.2).
|
||||
|
||||
send_ackvec = 1
|
||||
Whether or not to send Ack Vector options (sec. 11.5).
|
||||
|
||||
ack_ratio = 2
|
||||
The default Ack Ratio (sec. 11.3) to use.
|
||||
|
||||
tx_ccid = 2
|
||||
Default CCID for the sender-receiver half-connection.
|
||||
Default CCID for the sender-receiver half-connection. Depending on the
|
||||
choice of CCID, the Send Ack Vector feature is enabled automatically.
|
||||
|
||||
rx_ccid = 2
|
||||
Default CCID for the receiver-sender half-connection.
|
||||
Default CCID for the receiver-sender half-connection; see tx_ccid.
|
||||
|
||||
seq_window = 100
|
||||
The initial sequence window (sec. 7.5.2).
|
||||
|
|
|
@ -13,7 +13,7 @@ Transmit path guidelines:
|
|||
static int drv_hard_start_xmit(struct sk_buff *skb,
|
||||
struct net_device *dev)
|
||||
{
|
||||
struct drv *dp = dev->priv;
|
||||
struct drv *dp = netdev_priv(dev);
|
||||
|
||||
lock_tx(dp);
|
||||
...
|
||||
|
|
|
@ -3,15 +3,15 @@ Krzysztof Halasa <khc@pm.waw.pl>
|
|||
|
||||
|
||||
Generic HDLC layer currently supports:
|
||||
1. Frame Relay (ANSI, CCITT, Cisco and no LMI).
|
||||
1. Frame Relay (ANSI, CCITT, Cisco and no LMI)
|
||||
- Normal (routed) and Ethernet-bridged (Ethernet device emulation)
|
||||
interfaces can share a single PVC.
|
||||
- ARP support (no InARP support in the kernel - there is an
|
||||
experimental InARP user-space daemon available on:
|
||||
http://www.kernel.org/pub/linux/utils/net/hdlc/).
|
||||
2. raw HDLC - either IP (IPv4) interface or Ethernet device emulation.
|
||||
3. Cisco HDLC.
|
||||
4. PPP (uses syncppp.c).
|
||||
2. raw HDLC - either IP (IPv4) interface or Ethernet device emulation
|
||||
3. Cisco HDLC
|
||||
4. PPP
|
||||
5. X.25 (uses X.25 routines).
|
||||
|
||||
Generic HDLC is a protocol driver only - it needs a low-level driver
|
||||
|
|
|
@ -27,6 +27,12 @@ min_adv_mss - INTEGER
|
|||
The advertised MSS depends on the first hop route MTU, but will
|
||||
never be lower than this setting.
|
||||
|
||||
rt_cache_rebuild_count - INTEGER
|
||||
The per net-namespace route cache emergency rebuild threshold.
|
||||
Any net-namespace having its route cache rebuilt due to
|
||||
a hash bucket chain being too long more than this many times
|
||||
will have its route caching disabled
|
||||
|
||||
IP Fragmentation:
|
||||
|
||||
ipfrag_high_thresh - INTEGER
|
||||
|
|
|
@ -50,10 +50,6 @@ associates with the AP. hostapd and wpa_supplicant are used to take
|
|||
care of WPA2-PSK authentication. In addition, hostapd is also
|
||||
processing access point side of association.
|
||||
|
||||
Please note that the current Linux kernel does not enable AP mode, so a
|
||||
simple patch is needed to enable AP mode selection:
|
||||
http://johannes.sipsolutions.net/patches/kernel/all/LATEST/006-allow-ap-vlan-modes.patch
|
||||
|
||||
|
||||
# Build mac80211_hwsim as part of kernel configuration
|
||||
|
||||
|
@ -65,3 +61,8 @@ hostapd hostapd.conf
|
|||
|
||||
# Run wpa_supplicant (station) for wlan1
|
||||
wpa_supplicant -Dwext -iwlan1 -c wpa_supplicant.conf
|
||||
|
||||
|
||||
More test cases are available in hostap.git:
|
||||
git://w1.fi/srv/git/hostap.git and mac80211_hwsim/tests subdirectory
|
||||
(http://w1.fi/gitweb/gitweb.cgi?p=hostap.git;a=tree;f=mac80211_hwsim/tests)
|
||||
|
|
|
@ -18,7 +18,7 @@ There are routines in net_init.c to handle the common cases of
|
|||
alloc_etherdev, alloc_netdev. These reserve extra space for driver
|
||||
private data which gets freed when the network device is freed. If
|
||||
separately allocated data is attached to the network device
|
||||
(dev->priv) then it is up to the module exit handler to free that.
|
||||
(netdev_priv(dev)) then it is up to the module exit handler to free that.
|
||||
|
||||
MTU
|
||||
===
|
||||
|
|
|
@ -131,11 +131,13 @@ are expected to do this during initialization.
|
|||
|
||||
r = zd_reg2alpha2(mac->regdomain, alpha2);
|
||||
if (!r)
|
||||
regulatory_hint(hw->wiphy, alpha2, NULL);
|
||||
regulatory_hint(hw->wiphy, alpha2);
|
||||
|
||||
Example code - drivers providing a built in regulatory domain:
|
||||
--------------------------------------------------------------
|
||||
|
||||
[NOTE: This API is not currently available, it can be added when required]
|
||||
|
||||
If you have regulatory information you can obtain from your
|
||||
driver and you *need* to use this we let you build a regulatory domain
|
||||
structure and pass it to the wireless core. To do this you should
|
||||
|
@ -167,7 +169,6 @@ struct ieee80211_regdomain mydriver_jp_regdom = {
|
|||
|
||||
Then in some part of your code after your wiphy has been registered:
|
||||
|
||||
int r;
|
||||
struct ieee80211_regdomain *rd;
|
||||
int size_of_regd;
|
||||
int num_rules = mydriver_jp_regdom.n_reg_rules;
|
||||
|
@ -178,17 +179,12 @@ Then in some part of your code after your wiphy has been registered:
|
|||
|
||||
rd = kzalloc(size_of_regd, GFP_KERNEL);
|
||||
if (!rd)
|
||||
return -ENOMEM;
|
||||
return -ENOMEM;
|
||||
|
||||
memcpy(rd, &mydriver_jp_regdom, sizeof(struct ieee80211_regdomain));
|
||||
|
||||
for (i=0; i < num_rules; i++) {
|
||||
memcpy(&rd->reg_rules[i], &mydriver_jp_regdom.reg_rules[i],
|
||||
sizeof(struct ieee80211_reg_rule));
|
||||
}
|
||||
r = regulatory_hint(hw->wiphy, NULL, rd);
|
||||
if (r) {
|
||||
kfree(rd);
|
||||
return r;
|
||||
}
|
||||
|
||||
for (i=0; i < num_rules; i++)
|
||||
memcpy(&rd->reg_rules[i],
|
||||
&mydriver_jp_regdom.reg_rules[i],
|
||||
sizeof(struct ieee80211_reg_rule));
|
||||
regulatory_struct_hint(rd);
|
||||
|
|
|
@ -69,6 +69,11 @@ to the overall system performance.
|
|||
On x86 nmi_watchdog is disabled by default so you have to enable it with
|
||||
a boot time parameter.
|
||||
|
||||
It's possible to disable the NMI watchdog in run-time by writing "0" to
|
||||
/proc/sys/kernel/nmi_watchdog. Writing "1" to the same file will re-enable
|
||||
the NMI watchdog. Notice that you still need to use "nmi_watchdog=" parameter
|
||||
at boot time.
|
||||
|
||||
NOTE: In kernels prior to 2.4.2-ac18 the NMI-oopser is enabled unconditionally
|
||||
on x86 SMP boxes.
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
The MDIO is a bus to which the PHY devices are connected. For each
|
||||
device that exists on this bus, a child node should be created. See
|
||||
the definition of the PHY node below for an example of how to define
|
||||
a PHY.
|
||||
the definition of the PHY node in booting-without-of.txt for an example
|
||||
of how to define a PHY.
|
||||
|
||||
Required properties:
|
||||
- reg : Offset and length of the register set for the device
|
||||
|
@ -21,6 +21,14 @@ Example:
|
|||
};
|
||||
};
|
||||
|
||||
* TBI Internal MDIO bus
|
||||
|
||||
As of this writing, every tsec is associated with an internal TBI PHY.
|
||||
This PHY is accessed through the local MDIO bus. These buses are defined
|
||||
similarly to the mdio buses, except they are compatible with "fsl,gianfar-tbi".
|
||||
The TBI PHYs underneath them are similar to normal PHYs, but the reg property
|
||||
is considered instructive, rather than descriptive. The reg property should
|
||||
be chosen so it doesn't interfere with other PHYs on the bus.
|
||||
|
||||
* Gianfar-compatible ethernet nodes
|
||||
|
||||
|
|
|
@ -191,12 +191,20 @@ Userspace input handlers (uevents) or kernel input handlers (rfkill-input):
|
|||
to tell the devices registered with the rfkill class to change
|
||||
their state (i.e. translates the input layer event into real
|
||||
action).
|
||||
|
||||
* rfkill-input implements EPO by handling EV_SW SW_RFKILL_ALL 0
|
||||
(power off all transmitters) in a special way: it ignores any
|
||||
overrides and local state cache and forces all transmitters to the
|
||||
RFKILL_STATE_SOFT_BLOCKED state (including those which are already
|
||||
supposed to be BLOCKED). Note that the opposite event (power on all
|
||||
transmitters) is handled normally.
|
||||
supposed to be BLOCKED).
|
||||
* rfkill EPO will remain active until rfkill-input receives an
|
||||
EV_SW SW_RFKILL_ALL 1 event. While the EPO is active, transmitters
|
||||
are locked in the blocked state (rfkill will refuse to unblock them).
|
||||
* rfkill-input implements different policies that the user can
|
||||
select for handling EV_SW SW_RFKILL_ALL 1. It will unlock rfkill,
|
||||
and either do nothing (leave transmitters blocked, but now unlocked),
|
||||
restore the transmitters to their state before the EPO, or unblock
|
||||
them all.
|
||||
|
||||
Userspace uevent handler or kernel platform-specific drivers hooked to the
|
||||
rfkill notifier chain:
|
||||
|
@ -331,11 +339,9 @@ class to get a sysfs interface :-)
|
|||
correct event for your switch/button. These events are emergency power-off
|
||||
events when they are trying to turn the transmitters off. An example of an
|
||||
input device which SHOULD generate *_RFKILL_ALL events is the wireless-kill
|
||||
switch in a laptop which is NOT a hotkey, but a real switch that kills radios
|
||||
in hardware, even if the O.S. has gone to lunch. An example of an input device
|
||||
which SHOULD NOT generate *_RFKILL_ALL events by default, is any sort of hot
|
||||
key that does nothing by itself, as well as any hot key that is type-specific
|
||||
(e.g. the one for WLAN).
|
||||
switch in a laptop which is NOT a hotkey, but a real sliding/rocker switch.
|
||||
An example of an input device which SHOULD NOT generate *_RFKILL_ALL events by
|
||||
default, is any sort of hot key that is type-specific (e.g. the one for WLAN).
|
||||
|
||||
|
||||
3.1 Guidelines for wireless device drivers
|
||||
|
|
|
@ -8,7 +8,7 @@ Context switch
|
|||
By default, the switch_to arch function is called with the runqueue
|
||||
locked. This is usually not a problem unless switch_to may need to
|
||||
take the runqueue lock. This is usually due to a wake up operation in
|
||||
the context switch. See include/asm-ia64/system.h for an example.
|
||||
the context switch. See arch/ia64/include/asm/system.h for an example.
|
||||
|
||||
To request the scheduler call switch_to with the runqueue unlocked,
|
||||
you must `#define __ARCH_WANT_UNLOCKED_CTXSW` in a header file
|
||||
|
@ -23,7 +23,7 @@ disabled. Interrupts may be enabled over the call if it is likely to
|
|||
introduce a significant interrupt latency by adding the line
|
||||
`#define __ARCH_WANT_INTERRUPTS_ON_CTXSW` in the same place as for
|
||||
unlocked context switches. This define also implies
|
||||
`__ARCH_WANT_UNLOCKED_CTXSW`. See include/asm-arm/system.h for an
|
||||
`__ARCH_WANT_UNLOCKED_CTXSW`. See arch/arm/include/asm/system.h for an
|
||||
example.
|
||||
|
||||
|
||||
|
|
|
@ -273,3 +273,24 @@ task groups and modify their CPU share using the "cgroups" pseudo filesystem.
|
|||
|
||||
# #Launch gmplayer (or your favourite movie player)
|
||||
# echo <movie_player_pid> > multimedia/tasks
|
||||
|
||||
8. Implementation note: user namespaces
|
||||
|
||||
User namespaces are intended to be hierarchical. But they are currently
|
||||
only partially implemented. Each of those has ramifications for CFS.
|
||||
|
||||
First, since user namespaces are hierarchical, the /sys/kernel/uids
|
||||
presentation is inadequate. Eventually we will likely want to use sysfs
|
||||
tagging to provide private views of /sys/kernel/uids within each user
|
||||
namespace.
|
||||
|
||||
Second, the hierarchical nature is intended to support completely
|
||||
unprivileged use of user namespaces. So if using user groups, then
|
||||
we want the users in a user namespace to be children of the user
|
||||
who created it.
|
||||
|
||||
That is currently unimplemented. So instead, every user in a new
|
||||
user namespace will receive 1024 shares just like any user in the
|
||||
initial user namespace. Note that at the moment creation of a new
|
||||
user namespace requires each of CAP_SYS_ADMIN, CAP_SETUID, and
|
||||
CAP_SETGID.
|
||||
|
|
|
@ -1,179 +0,0 @@
|
|||
|
||||
This file describes the configuration and behavior of KGDB for the SH
|
||||
kernel. Based on a description from Henry Bell <henry.bell@st.com>, it
|
||||
has been modified to account for quirks in the current implementation.
|
||||
|
||||
Version
|
||||
=======
|
||||
|
||||
This version of KGDB was written for 2.4.xx kernels for the SH architecture.
|
||||
Further documentation is available from the linux-sh project website.
|
||||
|
||||
|
||||
Debugging Setup: Host
|
||||
======================
|
||||
|
||||
The two machines will be connected together via a serial line - this
|
||||
should be a null modem cable i.e. with a twist.
|
||||
|
||||
On your DEVELOPMENT machine, go to your kernel source directory and
|
||||
build the kernel, enabling KGDB support in the "kernel hacking" section.
|
||||
This includes the KGDB code, and also makes the kernel be compiled with
|
||||
the "-g" option set -- necessary for debugging.
|
||||
|
||||
To install this new kernel, use the following installation procedure.
|
||||
|
||||
Decide on which tty port you want the machines to communicate, then
|
||||
cable them up back-to-back using the null modem. On the DEVELOPMENT
|
||||
machine, you may wish to create an initialization file called .gdbinit
|
||||
(in the kernel source directory or in your home directory) to execute
|
||||
commonly-used commands at startup.
|
||||
|
||||
A minimal .gdbinit might look like this:
|
||||
|
||||
file vmlinux
|
||||
set remotebaud 115200
|
||||
target remote /dev/ttyS0
|
||||
|
||||
Change the "target" definition so that it specifies the tty port that
|
||||
you intend to use. Change the "remotebaud" definition to match the
|
||||
data rate that you are going to use for the com line (115200 is the
|
||||
default).
|
||||
|
||||
Debugging Setup: Target
|
||||
========================
|
||||
|
||||
By default, the KGDB stub will communicate with the host GDB using
|
||||
ttySC1 at 115200 baud, 8 databits, no parity; these defaults can be
|
||||
changed in the kernel configuration. As the kernel starts up, KGDB will
|
||||
initialize so that breakpoints, kernel segfaults, and so forth will
|
||||
generally enter the debugger.
|
||||
|
||||
This behavior can be modified by including the "kgdb" option in the
|
||||
kernel command line; this option has the general form:
|
||||
|
||||
kgdb=<ttyspec>,<action>
|
||||
|
||||
The <ttyspec> indicates the port to use, and can optionally specify
|
||||
baud, parity and databits -- e.g. "ttySC0,9600N8" or "ttySC1,19200".
|
||||
|
||||
The <action> can be "halt" or "disabled". The "halt" action enters the
|
||||
debugger via a breakpoint as soon as kgdb is initialized; the "disabled"
|
||||
action causes kgdb to ignore kernel segfaults and such until explicitly
|
||||
entered by a breakpoint in the code or by external action (sysrq or NMI).
|
||||
|
||||
(Both <ttyspec> and <action> can appear alone, w/o the separating comma.)
|
||||
|
||||
For example, if you wish to debug early in kernel startup code, you
|
||||
might specify the halt option:
|
||||
|
||||
kgdb=halt
|
||||
|
||||
Boot the TARGET machine, which will appear to hang.
|
||||
|
||||
On your DEVELOPMENT machine, cd to the source directory and run the gdb
|
||||
program. (This is likely to be a cross GDB which runs on your host but
|
||||
is built for an SH target.) If everything is working correctly you
|
||||
should see gdb print out a few lines indicating that a breakpoint has
|
||||
been taken. It will actually show a line of code in the target kernel
|
||||
inside the gdbstub activation code.
|
||||
|
||||
NOTE: BE SURE TO TERMINATE OR SUSPEND any other host application which
|
||||
may be using the same serial port (for example, a terminal emulator you
|
||||
have been using to connect to the target boot code.) Otherwise, data
|
||||
from the target may not all get to GDB!
|
||||
|
||||
You can now use whatever gdb commands you like to set breakpoints.
|
||||
Enter "continue" to start your target machine executing again. At this
|
||||
point the target system will run at full speed until it encounters
|
||||
your breakpoint or gets a segment violation in the kernel, or whatever.
|
||||
|
||||
Serial Ports: KGDB, Console
|
||||
============================
|
||||
|
||||
This version of KGDB may not gracefully handle conflict with other
|
||||
drivers in the kernel using the same port. If KGDB is configured on the
|
||||
same port (and with the same parameters) as the kernel console, or if
|
||||
CONFIG_SH_KGDB_CONSOLE is configured, things should be fine (though in
|
||||
some cases console messages may appear twice through GDB). But if the
|
||||
KGDB port is not the kernel console and used by another serial driver
|
||||
which assumes different serial parameters (e.g. baud rate) KGDB may not
|
||||
recover.
|
||||
|
||||
Also, when KGDB is entered via sysrq-g (requires CONFIG_KGDB_SYSRQ) and
|
||||
the kgdb port uses the same port as the console, detaching GDB will not
|
||||
restore the console to working order without the port being re-opened.
|
||||
|
||||
Another serious consequence of this is that GDB currently CANNOT break
|
||||
into KGDB externally (e.g. via ^C or <BREAK>); unless a breakpoint or
|
||||
error is encountered, the only way to enter KGDB after the initial halt
|
||||
(see above) is via NMI (CONFIG_KGDB_NMI) or sysrq-g (CONFIG_KGDB_SYSRQ).
|
||||
|
||||
Code is included for the basic Hitachi Solution Engine boards to allow
|
||||
the use of ttyS0 for KGDB if desired; this is less robust, but may be
|
||||
useful in some cases. (This cannot be selected using the config file,
|
||||
but only through the kernel command line, e.g. "kgdb=ttyS0", though the
|
||||
configured defaults for baud rate etc. still apply if not overridden.)
|
||||
|
||||
If gdbstub Does Not Work
|
||||
========================
|
||||
|
||||
If it doesn't work, you will have to troubleshoot it. Do the easy
|
||||
things first like double checking your cabling and data rates. You
|
||||
might try some non-kernel based programs to see if the back-to-back
|
||||
connection works properly. Just something simple like cat /etc/hosts
|
||||
/dev/ttyS0 on one machine and cat /dev/ttyS0 on the other will tell you
|
||||
if you can send data from one machine to the other. There is no point
|
||||
in tearing out your hair in the kernel if the line doesn't work.
|
||||
|
||||
If you need to debug the GDB/KGDB communication itself, the gdb commands
|
||||
"set debug remote 1" and "set debug serial 1" may be useful, but be
|
||||
warned: they produce a lot of output.
|
||||
|
||||
Threads
|
||||
=======
|
||||
|
||||
Each process in a target machine is seen as a gdb thread. gdb thread related
|
||||
commands (info threads, thread n) can be used. CONFIG_KGDB_THREAD must
|
||||
be defined for this to work.
|
||||
|
||||
In this version, kgdb reports PID_MAX (32768) as the process ID for the
|
||||
idle process (pid 0), since GDB does not accept 0 as an ID.
|
||||
|
||||
Detaching (exiting KGDB)
|
||||
=========================
|
||||
|
||||
There are two ways to resume full-speed target execution: "continue" and
|
||||
"detach". With "continue", GDB inserts any specified breakpoints in the
|
||||
target code and resumes execution; the target is still in "gdb mode".
|
||||
If a breakpoint or other debug event (e.g. NMI) happens, the target
|
||||
halts and communicates with GDB again, which is waiting for it.
|
||||
|
||||
With "detach", GDB does *not* insert any breakpoints; target execution
|
||||
is resumed and GDB stops communicating (does not wait for the target).
|
||||
In this case, the target is no longer in "gdb mode" -- for example,
|
||||
console messages no longer get sent separately to the KGDB port, or
|
||||
encapsulated for GDB. If a debug event (e.g. NMI) occurs, the target
|
||||
will re-enter "gdb mode" and will display this fact on the console; you
|
||||
must give a new "target remote" command to gdb.
|
||||
|
||||
NOTE: TO AVOID LOSSING CONSOLE MESSAGES IN CASE THE KERNEL CONSOLE AND
|
||||
KGDB USING THE SAME PORT, THE TARGET WAITS FOR ANY INPUT CHARACTER ON
|
||||
THE KGDB PORT AFTER A DETACH COMMAND. For example, after the detach you
|
||||
could start a terminal emulator on the same host port and enter a <cr>;
|
||||
however, this program must then be terminated or suspended in order to
|
||||
use GBD again if KGDB is re-entered.
|
||||
|
||||
|
||||
Acknowledgements
|
||||
================
|
||||
|
||||
This code was mostly generated by Henry Bell <henry.bell@st.com>;
|
||||
largely from KGDB by Amit S. Kale <akale@veritas.com> - extracts from
|
||||
code by Glenn Engel, Jim Kingdon, David Grothe <dave@gcom.com>, Tigran
|
||||
Aivazian <tigran@sco.com>, William Gatliff <bgat@open-widgets.com>, Ben
|
||||
Lee, Steve Chamberlain and Benoit Miller <fulg@iname.com> are also
|
||||
included.
|
||||
|
||||
Jeremy Siegel
|
||||
<jsiegel@mvista.com>
|
|
@ -757,6 +757,8 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
|||
model - force the model name
|
||||
position_fix - Fix DMA pointer (0 = auto, 1 = use LPIB, 2 = POSBUF)
|
||||
probe_mask - Bitmask to probe codecs (default = -1, meaning all slots)
|
||||
probe_only - Only probing and no codec initialization (default=off);
|
||||
Useful to check the initial codec status for debugging
|
||||
bdl_pos_adj - Specifies the DMA IRQ timing delay in samples.
|
||||
Passing -1 will make the driver to choose the appropriate
|
||||
value based on the controller chip.
|
||||
|
@ -772,325 +774,23 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
|||
|
||||
This module supports multiple cards and autoprobe.
|
||||
|
||||
See Documentation/sound/alsa/HD-Audio.txt for more details about
|
||||
HD-audio driver.
|
||||
|
||||
Each codec may have a model table for different configurations.
|
||||
If your machine isn't listed there, the default (usually minimal)
|
||||
configuration is set up. You can pass "model=<name>" option to
|
||||
specify a certain model in such a case. There are different
|
||||
models depending on the codec chip.
|
||||
|
||||
Model name Description
|
||||
---------- -----------
|
||||
ALC880
|
||||
3stack 3-jack in back and a headphone out
|
||||
3stack-digout 3-jack in back, a HP out and a SPDIF out
|
||||
5stack 5-jack in back, 2-jack in front
|
||||
5stack-digout 5-jack in back, 2-jack in front, a SPDIF out
|
||||
6stack 6-jack in back, 2-jack in front
|
||||
6stack-digout 6-jack with a SPDIF out
|
||||
w810 3-jack
|
||||
z71v 3-jack (HP shared SPDIF)
|
||||
asus 3-jack (ASUS Mobo)
|
||||
asus-w1v ASUS W1V
|
||||
asus-dig ASUS with SPDIF out
|
||||
asus-dig2 ASUS with SPDIF out (using GPIO2)
|
||||
uniwill 3-jack
|
||||
fujitsu Fujitsu Laptops (Pi1536)
|
||||
F1734 2-jack
|
||||
lg LG laptop (m1 express dual)
|
||||
lg-lw LG LW20/LW25 laptop
|
||||
tcl TCL S700
|
||||
clevo Clevo laptops (m520G, m665n)
|
||||
medion Medion Rim 2150
|
||||
test for testing/debugging purpose, almost all controls can be
|
||||
adjusted. Appearing only when compiled with
|
||||
$CONFIG_SND_DEBUG=y
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
ALC260
|
||||
hp HP machines
|
||||
hp-3013 HP machines (3013-variant)
|
||||
hp-dc7600 HP DC7600
|
||||
fujitsu Fujitsu S7020
|
||||
acer Acer TravelMate
|
||||
will Will laptops (PB V7900)
|
||||
replacer Replacer 672V
|
||||
basic fixed pin assignment (old default model)
|
||||
test for testing/debugging purpose, almost all controls can
|
||||
adjusted. Appearing only when compiled with
|
||||
$CONFIG_SND_DEBUG=y
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
ALC262
|
||||
fujitsu Fujitsu Laptop
|
||||
hp-bpc HP xw4400/6400/8400/9400 laptops
|
||||
hp-bpc-d7000 HP BPC D7000
|
||||
hp-tc-t5735 HP Thin Client T5735
|
||||
hp-rp5700 HP RP5700
|
||||
benq Benq ED8
|
||||
benq-t31 Benq T31
|
||||
hippo Hippo (ATI) with jack detection, Sony UX-90s
|
||||
hippo_1 Hippo (Benq) with jack detection
|
||||
sony-assamd Sony ASSAMD
|
||||
toshiba-s06 Toshiba S06
|
||||
toshiba-rx1 Toshiba RX1
|
||||
ultra Samsung Q1 Ultra Vista model
|
||||
lenovo-3000 Lenovo 3000 y410
|
||||
nec NEC Versa S9100
|
||||
basic fixed pin assignment w/o SPDIF
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
ALC267/268
|
||||
quanta-il1 Quanta IL1 mini-notebook
|
||||
3stack 3-stack model
|
||||
toshiba Toshiba A205
|
||||
acer Acer laptops
|
||||
acer-aspire Acer Aspire One
|
||||
dell Dell OEM laptops (Vostro 1200)
|
||||
zepto Zepto laptops
|
||||
test for testing/debugging purpose, almost all controls can
|
||||
adjusted. Appearing only when compiled with
|
||||
$CONFIG_SND_DEBUG=y
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
ALC269
|
||||
basic Basic preset
|
||||
quanta Quanta FL1
|
||||
eeepc-p703 ASUS Eeepc P703 P900A
|
||||
eeepc-p901 ASUS Eeepc P901 S101
|
||||
|
||||
ALC662/663
|
||||
3stack-dig 3-stack (2-channel) with SPDIF
|
||||
3stack-6ch 3-stack (6-channel)
|
||||
3stack-6ch-dig 3-stack (6-channel) with SPDIF
|
||||
6stack-dig 6-stack with SPDIF
|
||||
lenovo-101e Lenovo laptop
|
||||
eeepc-p701 ASUS Eeepc P701
|
||||
eeepc-ep20 ASUS Eeepc EP20
|
||||
ecs ECS/Foxconn mobo
|
||||
m51va ASUS M51VA
|
||||
g71v ASUS G71V
|
||||
h13 ASUS H13
|
||||
g50v ASUS G50V
|
||||
asus-mode1 ASUS
|
||||
asus-mode2 ASUS
|
||||
asus-mode3 ASUS
|
||||
asus-mode4 ASUS
|
||||
asus-mode5 ASUS
|
||||
asus-mode6 ASUS
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
ALC882/885
|
||||
3stack-dig 3-jack with SPDIF I/O
|
||||
6stack-dig 6-jack digital with SPDIF I/O
|
||||
arima Arima W820Di1
|
||||
targa Targa T8, MSI-1049 T8
|
||||
asus-a7j ASUS A7J
|
||||
asus-a7m ASUS A7M
|
||||
macpro MacPro support
|
||||
mbp3 Macbook Pro rev3
|
||||
imac24 iMac 24'' with jack detection
|
||||
w2jc ASUS W2JC
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
ALC883/888
|
||||
3stack-dig 3-jack with SPDIF I/O
|
||||
6stack-dig 6-jack digital with SPDIF I/O
|
||||
3stack-6ch 3-jack 6-channel
|
||||
3stack-6ch-dig 3-jack 6-channel with SPDIF I/O
|
||||
6stack-dig-demo 6-jack digital for Intel demo board
|
||||
acer Acer laptops (Travelmate 3012WTMi, Aspire 5600, etc)
|
||||
acer-aspire Acer Aspire 9810
|
||||
medion Medion Laptops
|
||||
medion-md2 Medion MD2
|
||||
targa-dig Targa/MSI
|
||||
targa-2ch-dig Targs/MSI with 2-channel
|
||||
laptop-eapd 3-jack with SPDIF I/O and EAPD (Clevo M540JE, M550JE)
|
||||
lenovo-101e Lenovo 101E
|
||||
lenovo-nb0763 Lenovo NB0763
|
||||
lenovo-ms7195-dig Lenovo MS7195
|
||||
lenovo-sky Lenovo Sky
|
||||
haier-w66 Haier W66
|
||||
3stack-hp HP machines with 3stack (Lucknow, Samba boards)
|
||||
6stack-dell Dell machines with 6stack (Inspiron 530)
|
||||
mitac Mitac 8252D
|
||||
clevo-m720 Clevo M720 laptop series
|
||||
fujitsu-pi2515 Fujitsu AMILO Pi2515
|
||||
3stack-6ch-intel Intel DG33* boards
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
ALC861/660
|
||||
3stack 3-jack
|
||||
3stack-dig 3-jack with SPDIF I/O
|
||||
6stack-dig 6-jack with SPDIF I/O
|
||||
3stack-660 3-jack (for ALC660)
|
||||
uniwill-m31 Uniwill M31 laptop
|
||||
toshiba Toshiba laptop support
|
||||
asus Asus laptop support
|
||||
asus-laptop ASUS F2/F3 laptops
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
ALC861VD/660VD
|
||||
3stack 3-jack
|
||||
3stack-dig 3-jack with SPDIF OUT
|
||||
6stack-dig 6-jack with SPDIF OUT
|
||||
3stack-660 3-jack (for ALC660VD)
|
||||
3stack-660-digout 3-jack with SPDIF OUT (for ALC660VD)
|
||||
lenovo Lenovo 3000 C200
|
||||
dallas Dallas laptops
|
||||
hp HP TX1000
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
CMI9880
|
||||
minimal 3-jack in back
|
||||
min_fp 3-jack in back, 2-jack in front
|
||||
full 6-jack in back, 2-jack in front
|
||||
full_dig 6-jack in back, 2-jack in front, SPDIF I/O
|
||||
allout 5-jack in back, 2-jack in front, SPDIF out
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
AD1882 / AD1882A
|
||||
3stack 3-stack mode (default)
|
||||
6stack 6-stack mode
|
||||
|
||||
AD1884A / AD1883 / AD1984A / AD1984B
|
||||
desktop 3-stack desktop (default)
|
||||
laptop laptop with HP jack sensing
|
||||
mobile mobile devices with HP jack sensing
|
||||
thinkpad Lenovo Thinkpad X300
|
||||
|
||||
AD1884
|
||||
N/A
|
||||
|
||||
AD1981
|
||||
basic 3-jack (default)
|
||||
hp HP nx6320
|
||||
thinkpad Lenovo Thinkpad T60/X60/Z60
|
||||
toshiba Toshiba U205
|
||||
|
||||
AD1983
|
||||
N/A
|
||||
|
||||
AD1984
|
||||
basic default configuration
|
||||
thinkpad Lenovo Thinkpad T61/X61
|
||||
dell Dell T3400
|
||||
|
||||
AD1986A
|
||||
6stack 6-jack, separate surrounds (default)
|
||||
3stack 3-stack, shared surrounds
|
||||
laptop 2-channel only (FSC V2060, Samsung M50)
|
||||
laptop-eapd 2-channel with EAPD (Samsung R65, ASUS A6J)
|
||||
laptop-automute 2-channel with EAPD and HP-automute (Lenovo N100)
|
||||
ultra 2-channel with EAPD (Samsung Ultra tablet PC)
|
||||
|
||||
AD1988/AD1988B/AD1989A/AD1989B
|
||||
6stack 6-jack
|
||||
6stack-dig ditto with SPDIF
|
||||
3stack 3-jack
|
||||
3stack-dig ditto with SPDIF
|
||||
laptop 3-jack with hp-jack automute
|
||||
laptop-dig ditto with SPDIF
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
Conexant 5045
|
||||
laptop-hpsense Laptop with HP sense (old model laptop)
|
||||
laptop-micsense Laptop with Mic sense (old model fujitsu)
|
||||
laptop-hpmicsense Laptop with HP and Mic senses
|
||||
benq Benq R55E
|
||||
test for testing/debugging purpose, almost all controls
|
||||
can be adjusted. Appearing only when compiled with
|
||||
$CONFIG_SND_DEBUG=y
|
||||
|
||||
Conexant 5047
|
||||
laptop Basic Laptop config
|
||||
laptop-hp Laptop config for some HP models (subdevice 30A5)
|
||||
laptop-eapd Laptop config with EAPD support
|
||||
test for testing/debugging purpose, almost all controls
|
||||
can be adjusted. Appearing only when compiled with
|
||||
$CONFIG_SND_DEBUG=y
|
||||
|
||||
Conexant 5051
|
||||
laptop Basic Laptop config (default)
|
||||
hp HP Spartan laptop
|
||||
|
||||
STAC9200
|
||||
ref Reference board
|
||||
dell-d21 Dell (unknown)
|
||||
dell-d22 Dell (unknown)
|
||||
dell-d23 Dell (unknown)
|
||||
dell-m21 Dell Inspiron 630m, Dell Inspiron 640m
|
||||
dell-m22 Dell Latitude D620, Dell Latitude D820
|
||||
dell-m23 Dell XPS M1710, Dell Precision M90
|
||||
dell-m24 Dell Latitude 120L
|
||||
dell-m25 Dell Inspiron E1505n
|
||||
dell-m26 Dell Inspiron 1501
|
||||
dell-m27 Dell Inspiron E1705/9400
|
||||
gateway Gateway laptops with EAPD control
|
||||
panasonic Panasonic CF-74
|
||||
|
||||
STAC9205/9254
|
||||
ref Reference board
|
||||
dell-m42 Dell (unknown)
|
||||
dell-m43 Dell Precision
|
||||
dell-m44 Dell Inspiron
|
||||
|
||||
STAC9220/9221
|
||||
ref Reference board
|
||||
3stack D945 3stack
|
||||
5stack D945 5stack + SPDIF
|
||||
intel-mac-v1 Intel Mac Type 1
|
||||
intel-mac-v2 Intel Mac Type 2
|
||||
intel-mac-v3 Intel Mac Type 3
|
||||
intel-mac-v4 Intel Mac Type 4
|
||||
intel-mac-v5 Intel Mac Type 5
|
||||
intel-mac-auto Intel Mac (detect type according to subsystem id)
|
||||
macmini Intel Mac Mini (equivalent with type 3)
|
||||
macbook Intel Mac Book (eq. type 5)
|
||||
macbook-pro-v1 Intel Mac Book Pro 1st generation (eq. type 3)
|
||||
macbook-pro Intel Mac Book Pro 2nd generation (eq. type 3)
|
||||
imac-intel Intel iMac (eq. type 2)
|
||||
imac-intel-20 Intel iMac (newer version) (eq. type 3)
|
||||
dell-d81 Dell (unknown)
|
||||
dell-d82 Dell (unknown)
|
||||
dell-m81 Dell (unknown)
|
||||
dell-m82 Dell XPS M1210
|
||||
|
||||
STAC9202/9250/9251
|
||||
ref Reference board, base config
|
||||
m2-2 Some Gateway MX series laptops
|
||||
m6 Some Gateway NX series laptops
|
||||
pa6 Gateway NX860 series
|
||||
|
||||
STAC9227/9228/9229/927x
|
||||
ref Reference board
|
||||
3stack D965 3stack
|
||||
5stack D965 5stack + SPDIF
|
||||
dell-3stack Dell Dimension E520
|
||||
dell-bios Fixes with Dell BIOS setup
|
||||
|
||||
STAC92HD71B*
|
||||
ref Reference board
|
||||
dell-m4-1 Dell desktops
|
||||
dell-m4-2 Dell desktops
|
||||
dell-m4-3 Dell desktops
|
||||
|
||||
STAC92HD73*
|
||||
ref Reference board
|
||||
dell-m6-amic Dell desktops/laptops with analog mics
|
||||
dell-m6-dmic Dell desktops/laptops with digital mics
|
||||
dell-m6 Dell desktops/laptops with both type of mics
|
||||
|
||||
STAC9872
|
||||
vaio Setup for VAIO FE550G/SZ110
|
||||
vaio-ar Setup for VAIO AR
|
||||
models depending on the codec chip. The list of available models
|
||||
is found in HD-Audio-Models.txt
|
||||
|
||||
The model name "genric" is treated as a special case. When this
|
||||
model is given, the driver uses the generic codec parser without
|
||||
"codec-patch". It's sometimes good for testing and debugging.
|
||||
|
||||
If the default configuration doesn't work and one of the above
|
||||
matches with your device, report it together with the PCI
|
||||
subsystem ID (output of "lspci -nv") to ALSA BTS or alsa-devel
|
||||
matches with your device, report it together with alsa-info.sh
|
||||
output (with --no-upload option) to kernel bugzilla or alsa-devel
|
||||
ML (see the section "Links and Addresses").
|
||||
|
||||
power_save and power_save_controller options are for power-saving
|
||||
|
@ -1650,7 +1350,8 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
|||
* AuzenTech X-Meridian
|
||||
* Bgears b-Enspirer
|
||||
* Club3D Theatron DTS
|
||||
* HT-Omega Claro
|
||||
* HT-Omega Claro (plus)
|
||||
* HT-Omega Claro halo (XT)
|
||||
* Razer Barracuda AC-1
|
||||
* Sondigo Inferno
|
||||
|
||||
|
@ -2407,8 +2108,11 @@ Links and Addresses
|
|||
ALSA project homepage
|
||||
http://www.alsa-project.org
|
||||
|
||||
ALSA Bug Tracking System
|
||||
https://bugtrack.alsa-project.org/bugs/
|
||||
Kernel Bugzilla
|
||||
http://bugzilla.kernel.org/
|
||||
|
||||
ALSA Developers ML
|
||||
mailto:alsa-devel@alsa-project.org
|
||||
|
||||
alsa-info.sh script
|
||||
http://www.alsa-project.org/alsa-info.sh
|
||||
|
|
|
@ -0,0 +1,348 @@
|
|||
Model name Description
|
||||
---------- -----------
|
||||
ALC880
|
||||
======
|
||||
3stack 3-jack in back and a headphone out
|
||||
3stack-digout 3-jack in back, a HP out and a SPDIF out
|
||||
5stack 5-jack in back, 2-jack in front
|
||||
5stack-digout 5-jack in back, 2-jack in front, a SPDIF out
|
||||
6stack 6-jack in back, 2-jack in front
|
||||
6stack-digout 6-jack with a SPDIF out
|
||||
w810 3-jack
|
||||
z71v 3-jack (HP shared SPDIF)
|
||||
asus 3-jack (ASUS Mobo)
|
||||
asus-w1v ASUS W1V
|
||||
asus-dig ASUS with SPDIF out
|
||||
asus-dig2 ASUS with SPDIF out (using GPIO2)
|
||||
uniwill 3-jack
|
||||
fujitsu Fujitsu Laptops (Pi1536)
|
||||
F1734 2-jack
|
||||
lg LG laptop (m1 express dual)
|
||||
lg-lw LG LW20/LW25 laptop
|
||||
tcl TCL S700
|
||||
clevo Clevo laptops (m520G, m665n)
|
||||
medion Medion Rim 2150
|
||||
test for testing/debugging purpose, almost all controls can be
|
||||
adjusted. Appearing only when compiled with
|
||||
$CONFIG_SND_DEBUG=y
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
ALC260
|
||||
======
|
||||
hp HP machines
|
||||
hp-3013 HP machines (3013-variant)
|
||||
hp-dc7600 HP DC7600
|
||||
fujitsu Fujitsu S7020
|
||||
acer Acer TravelMate
|
||||
will Will laptops (PB V7900)
|
||||
replacer Replacer 672V
|
||||
basic fixed pin assignment (old default model)
|
||||
test for testing/debugging purpose, almost all controls can
|
||||
adjusted. Appearing only when compiled with
|
||||
$CONFIG_SND_DEBUG=y
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
ALC262
|
||||
======
|
||||
fujitsu Fujitsu Laptop
|
||||
hp-bpc HP xw4400/6400/8400/9400 laptops
|
||||
hp-bpc-d7000 HP BPC D7000
|
||||
hp-tc-t5735 HP Thin Client T5735
|
||||
hp-rp5700 HP RP5700
|
||||
benq Benq ED8
|
||||
benq-t31 Benq T31
|
||||
hippo Hippo (ATI) with jack detection, Sony UX-90s
|
||||
hippo_1 Hippo (Benq) with jack detection
|
||||
sony-assamd Sony ASSAMD
|
||||
toshiba-s06 Toshiba S06
|
||||
toshiba-rx1 Toshiba RX1
|
||||
ultra Samsung Q1 Ultra Vista model
|
||||
lenovo-3000 Lenovo 3000 y410
|
||||
nec NEC Versa S9100
|
||||
basic fixed pin assignment w/o SPDIF
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
ALC267/268
|
||||
==========
|
||||
quanta-il1 Quanta IL1 mini-notebook
|
||||
3stack 3-stack model
|
||||
toshiba Toshiba A205
|
||||
acer Acer laptops
|
||||
acer-dmic Acer laptops with digital-mic
|
||||
acer-aspire Acer Aspire One
|
||||
dell Dell OEM laptops (Vostro 1200)
|
||||
zepto Zepto laptops
|
||||
test for testing/debugging purpose, almost all controls can
|
||||
adjusted. Appearing only when compiled with
|
||||
$CONFIG_SND_DEBUG=y
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
ALC269
|
||||
======
|
||||
basic Basic preset
|
||||
quanta Quanta FL1
|
||||
eeepc-p703 ASUS Eeepc P703 P900A
|
||||
eeepc-p901 ASUS Eeepc P901 S101
|
||||
fujitsu FSC Amilo
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
ALC662/663
|
||||
==========
|
||||
3stack-dig 3-stack (2-channel) with SPDIF
|
||||
3stack-6ch 3-stack (6-channel)
|
||||
3stack-6ch-dig 3-stack (6-channel) with SPDIF
|
||||
6stack-dig 6-stack with SPDIF
|
||||
lenovo-101e Lenovo laptop
|
||||
eeepc-p701 ASUS Eeepc P701
|
||||
eeepc-ep20 ASUS Eeepc EP20
|
||||
ecs ECS/Foxconn mobo
|
||||
m51va ASUS M51VA
|
||||
g71v ASUS G71V
|
||||
h13 ASUS H13
|
||||
g50v ASUS G50V
|
||||
asus-mode1 ASUS
|
||||
asus-mode2 ASUS
|
||||
asus-mode3 ASUS
|
||||
asus-mode4 ASUS
|
||||
asus-mode5 ASUS
|
||||
asus-mode6 ASUS
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
ALC882/885
|
||||
==========
|
||||
3stack-dig 3-jack with SPDIF I/O
|
||||
6stack-dig 6-jack digital with SPDIF I/O
|
||||
arima Arima W820Di1
|
||||
targa Targa T8, MSI-1049 T8
|
||||
asus-a7j ASUS A7J
|
||||
asus-a7m ASUS A7M
|
||||
macpro MacPro support
|
||||
mbp3 Macbook Pro rev3
|
||||
imac24 iMac 24'' with jack detection
|
||||
w2jc ASUS W2JC
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
ALC883/888
|
||||
==========
|
||||
3stack-dig 3-jack with SPDIF I/O
|
||||
6stack-dig 6-jack digital with SPDIF I/O
|
||||
3stack-6ch 3-jack 6-channel
|
||||
3stack-6ch-dig 3-jack 6-channel with SPDIF I/O
|
||||
6stack-dig-demo 6-jack digital for Intel demo board
|
||||
acer Acer laptops (Travelmate 3012WTMi, Aspire 5600, etc)
|
||||
acer-aspire Acer Aspire 9810
|
||||
acer-aspire-4930g Acer Aspire 4930G
|
||||
medion Medion Laptops
|
||||
medion-md2 Medion MD2
|
||||
targa-dig Targa/MSI
|
||||
targa-2ch-dig Targs/MSI with 2-channel
|
||||
laptop-eapd 3-jack with SPDIF I/O and EAPD (Clevo M540JE, M550JE)
|
||||
lenovo-101e Lenovo 101E
|
||||
lenovo-nb0763 Lenovo NB0763
|
||||
lenovo-ms7195-dig Lenovo MS7195
|
||||
lenovo-sky Lenovo Sky
|
||||
haier-w66 Haier W66
|
||||
3stack-hp HP machines with 3stack (Lucknow, Samba boards)
|
||||
6stack-dell Dell machines with 6stack (Inspiron 530)
|
||||
mitac Mitac 8252D
|
||||
clevo-m720 Clevo M720 laptop series
|
||||
fujitsu-pi2515 Fujitsu AMILO Pi2515
|
||||
fujitsu-xa3530 Fujitsu AMILO XA3530
|
||||
3stack-6ch-intel Intel DG33* boards
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
ALC861/660
|
||||
==========
|
||||
3stack 3-jack
|
||||
3stack-dig 3-jack with SPDIF I/O
|
||||
6stack-dig 6-jack with SPDIF I/O
|
||||
3stack-660 3-jack (for ALC660)
|
||||
uniwill-m31 Uniwill M31 laptop
|
||||
toshiba Toshiba laptop support
|
||||
asus Asus laptop support
|
||||
asus-laptop ASUS F2/F3 laptops
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
ALC861VD/660VD
|
||||
==============
|
||||
3stack 3-jack
|
||||
3stack-dig 3-jack with SPDIF OUT
|
||||
6stack-dig 6-jack with SPDIF OUT
|
||||
3stack-660 3-jack (for ALC660VD)
|
||||
3stack-660-digout 3-jack with SPDIF OUT (for ALC660VD)
|
||||
lenovo Lenovo 3000 C200
|
||||
dallas Dallas laptops
|
||||
hp HP TX1000
|
||||
asus-v1s ASUS V1Sn
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
CMI9880
|
||||
=======
|
||||
minimal 3-jack in back
|
||||
min_fp 3-jack in back, 2-jack in front
|
||||
full 6-jack in back, 2-jack in front
|
||||
full_dig 6-jack in back, 2-jack in front, SPDIF I/O
|
||||
allout 5-jack in back, 2-jack in front, SPDIF out
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
AD1882 / AD1882A
|
||||
================
|
||||
3stack 3-stack mode (default)
|
||||
6stack 6-stack mode
|
||||
|
||||
AD1884A / AD1883 / AD1984A / AD1984B
|
||||
====================================
|
||||
desktop 3-stack desktop (default)
|
||||
laptop laptop with HP jack sensing
|
||||
mobile mobile devices with HP jack sensing
|
||||
thinkpad Lenovo Thinkpad X300
|
||||
|
||||
AD1884
|
||||
======
|
||||
N/A
|
||||
|
||||
AD1981
|
||||
======
|
||||
basic 3-jack (default)
|
||||
hp HP nx6320
|
||||
thinkpad Lenovo Thinkpad T60/X60/Z60
|
||||
toshiba Toshiba U205
|
||||
|
||||
AD1983
|
||||
======
|
||||
N/A
|
||||
|
||||
AD1984
|
||||
======
|
||||
basic default configuration
|
||||
thinkpad Lenovo Thinkpad T61/X61
|
||||
dell Dell T3400
|
||||
|
||||
AD1986A
|
||||
=======
|
||||
6stack 6-jack, separate surrounds (default)
|
||||
3stack 3-stack, shared surrounds
|
||||
laptop 2-channel only (FSC V2060, Samsung M50)
|
||||
laptop-eapd 2-channel with EAPD (ASUS A6J)
|
||||
laptop-automute 2-channel with EAPD and HP-automute (Lenovo N100)
|
||||
ultra 2-channel with EAPD (Samsung Ultra tablet PC)
|
||||
samsung 2-channel with EAPD (Samsung R65)
|
||||
|
||||
AD1988/AD1988B/AD1989A/AD1989B
|
||||
==============================
|
||||
6stack 6-jack
|
||||
6stack-dig ditto with SPDIF
|
||||
3stack 3-jack
|
||||
3stack-dig ditto with SPDIF
|
||||
laptop 3-jack with hp-jack automute
|
||||
laptop-dig ditto with SPDIF
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
Conexant 5045
|
||||
=============
|
||||
laptop-hpsense Laptop with HP sense (old model laptop)
|
||||
laptop-micsense Laptop with Mic sense (old model fujitsu)
|
||||
laptop-hpmicsense Laptop with HP and Mic senses
|
||||
benq Benq R55E
|
||||
test for testing/debugging purpose, almost all controls
|
||||
can be adjusted. Appearing only when compiled with
|
||||
$CONFIG_SND_DEBUG=y
|
||||
|
||||
Conexant 5047
|
||||
=============
|
||||
laptop Basic Laptop config
|
||||
laptop-hp Laptop config for some HP models (subdevice 30A5)
|
||||
laptop-eapd Laptop config with EAPD support
|
||||
test for testing/debugging purpose, almost all controls
|
||||
can be adjusted. Appearing only when compiled with
|
||||
$CONFIG_SND_DEBUG=y
|
||||
|
||||
Conexant 5051
|
||||
=============
|
||||
laptop Basic Laptop config (default)
|
||||
hp HP Spartan laptop
|
||||
|
||||
STAC9200
|
||||
========
|
||||
ref Reference board
|
||||
dell-d21 Dell (unknown)
|
||||
dell-d22 Dell (unknown)
|
||||
dell-d23 Dell (unknown)
|
||||
dell-m21 Dell Inspiron 630m, Dell Inspiron 640m
|
||||
dell-m22 Dell Latitude D620, Dell Latitude D820
|
||||
dell-m23 Dell XPS M1710, Dell Precision M90
|
||||
dell-m24 Dell Latitude 120L
|
||||
dell-m25 Dell Inspiron E1505n
|
||||
dell-m26 Dell Inspiron 1501
|
||||
dell-m27 Dell Inspiron E1705/9400
|
||||
gateway Gateway laptops with EAPD control
|
||||
panasonic Panasonic CF-74
|
||||
|
||||
STAC9205/9254
|
||||
=============
|
||||
ref Reference board
|
||||
dell-m42 Dell (unknown)
|
||||
dell-m43 Dell Precision
|
||||
dell-m44 Dell Inspiron
|
||||
|
||||
STAC9220/9221
|
||||
=============
|
||||
ref Reference board
|
||||
3stack D945 3stack
|
||||
5stack D945 5stack + SPDIF
|
||||
intel-mac-v1 Intel Mac Type 1
|
||||
intel-mac-v2 Intel Mac Type 2
|
||||
intel-mac-v3 Intel Mac Type 3
|
||||
intel-mac-v4 Intel Mac Type 4
|
||||
intel-mac-v5 Intel Mac Type 5
|
||||
intel-mac-auto Intel Mac (detect type according to subsystem id)
|
||||
macmini Intel Mac Mini (equivalent with type 3)
|
||||
macbook Intel Mac Book (eq. type 5)
|
||||
macbook-pro-v1 Intel Mac Book Pro 1st generation (eq. type 3)
|
||||
macbook-pro Intel Mac Book Pro 2nd generation (eq. type 3)
|
||||
imac-intel Intel iMac (eq. type 2)
|
||||
imac-intel-20 Intel iMac (newer version) (eq. type 3)
|
||||
dell-d81 Dell (unknown)
|
||||
dell-d82 Dell (unknown)
|
||||
dell-m81 Dell (unknown)
|
||||
dell-m82 Dell XPS M1210
|
||||
|
||||
STAC9202/9250/9251
|
||||
==================
|
||||
ref Reference board, base config
|
||||
m2-2 Some Gateway MX series laptops
|
||||
m6 Some Gateway NX series laptops
|
||||
pa6 Gateway NX860 series
|
||||
|
||||
STAC9227/9228/9229/927x
|
||||
=======================
|
||||
ref Reference board
|
||||
ref-no-jd Reference board without HP/Mic jack detection
|
||||
3stack D965 3stack
|
||||
5stack D965 5stack + SPDIF
|
||||
dell-3stack Dell Dimension E520
|
||||
dell-bios Fixes with Dell BIOS setup
|
||||
|
||||
STAC92HD71B*
|
||||
============
|
||||
ref Reference board
|
||||
dell-m4-1 Dell desktops
|
||||
dell-m4-2 Dell desktops
|
||||
dell-m4-3 Dell desktops
|
||||
|
||||
STAC92HD73*
|
||||
===========
|
||||
ref Reference board
|
||||
no-jd BIOS setup but without jack-detection
|
||||
dell-m6-amic Dell desktops/laptops with analog mics
|
||||
dell-m6-dmic Dell desktops/laptops with digital mics
|
||||
dell-m6 Dell desktops/laptops with both type of mics
|
||||
|
||||
STAC92HD83*
|
||||
===========
|
||||
ref Reference board
|
||||
|
||||
STAC9872
|
||||
========
|
||||
vaio Setup for VAIO FE550G/SZ110
|
||||
vaio-ar Setup for VAIO AR
|
|
@ -0,0 +1,577 @@
|
|||
MORE NOTES ON HD-AUDIO DRIVER
|
||||
=============================
|
||||
Takashi Iwai <tiwai@suse.de>
|
||||
|
||||
|
||||
GENERAL
|
||||
-------
|
||||
|
||||
HD-audio is the new standard on-board audio component on modern PCs
|
||||
after AC97. Although Linux has been supporting HD-audio since long
|
||||
time ago, there are often problems with new machines. A part of the
|
||||
problem is broken BIOS, and the rest is the driver implementation.
|
||||
This document explains the brief trouble-shooting and debugging
|
||||
methods for the HD-audio hardware.
|
||||
|
||||
The HD-audio component consists of two parts: the controller chip and
|
||||
the codec chips on the HD-audio bus. Linux provides a single driver
|
||||
for all controllers, snd-hda-intel. Although the driver name contains
|
||||
a word of a well-known harware vendor, it's not specific to it but for
|
||||
all controller chips by other companies. Since the HD-audio
|
||||
controllers are supposed to be compatible, the single snd-hda-driver
|
||||
should work in most cases. But, not surprisingly, there are known
|
||||
bugs and issues specific to each controller type. The snd-hda-intel
|
||||
driver has a bunch of workarounds for these as described below.
|
||||
|
||||
A controller may have multiple codecs. Usually you have one audio
|
||||
codec and optionally one modem codec. In theory, there might be
|
||||
multiple audio codecs, e.g. for analog and digital outputs, and the
|
||||
driver might not work properly because of conflict of mixer elements.
|
||||
This should be fixed in future if such hardware really exists.
|
||||
|
||||
The snd-hda-intel driver has several different codec parsers depending
|
||||
on the codec. It has a generic parser as a fallback, but this
|
||||
functionality is fairly limited until now. Instead of the generic
|
||||
parser, usually the codec-specific parser (coded in patch_*.c) is used
|
||||
for the codec-specific implementations. The details about the
|
||||
codec-specific problems are explained in the later sections.
|
||||
|
||||
If you are interested in the deep debugging of HD-audio, read the
|
||||
HD-audio specification at first. The specification is found on
|
||||
Intel's web page, for example:
|
||||
|
||||
- http://www.intel.com/standards/hdaudio/
|
||||
|
||||
|
||||
HD-AUDIO CONTROLLER
|
||||
-------------------
|
||||
|
||||
DMA-Position Problem
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
The most common problem of the controller is the inaccurate DMA
|
||||
pointer reporting. The DMA pointer for playback and capture can be
|
||||
read in two ways, either via a LPIB register or via a position-buffer
|
||||
map. As default the driver tries to read from the io-mapped
|
||||
position-buffer, and falls back to LPIB if the position-buffer appears
|
||||
dead. However, this detection isn't perfect on some devices. In such
|
||||
a case, you can change the default method via `position_fix` option.
|
||||
|
||||
`position_fix=1` means to use LPIB method explicitly.
|
||||
`position_fix=2` means to use the position-buffer. 0 is the default
|
||||
value, the automatic check and fallback to LPIB as described in the
|
||||
above. If you get a problem of repeated sounds, this option might
|
||||
help.
|
||||
|
||||
In addition to that, every controller is known to be broken regarding
|
||||
the wake-up timing. It wakes up a few samples before actually
|
||||
processing the data on the buffer. This caused a lot of problems, for
|
||||
example, with ALSA dmix or JACK. Since 2.6.27 kernel, the driver puts
|
||||
an artificial delay to the wake up timing. This delay is controlled
|
||||
via `bdl_pos_adj` option.
|
||||
|
||||
When `bdl_pos_adj` is a negative value (as default), it's assigned to
|
||||
an appropriate value depending on the controller chip. For Intel
|
||||
chips, it'd be 1 while it'd be 32 for others. Usually this works.
|
||||
Only in case it doesn't work and you get warning messages, you should
|
||||
change this parameter to other values.
|
||||
|
||||
|
||||
Codec-Probing Problem
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
A less often but a more severe problem is the codec probing. When
|
||||
BIOS reports the available codec slots wrongly, the driver gets
|
||||
confused and tries to access the non-existing codec slot. This often
|
||||
results in the total screw-up, and destructs the further communication
|
||||
with the codec chips. The symptom appears usually as error messages
|
||||
like:
|
||||
------------------------------------------------------------------------
|
||||
hda_intel: azx_get_response timeout, switching to polling mode:
|
||||
last cmd=0x12345678
|
||||
hda_intel: azx_get_response timeout, switching to single_cmd mode:
|
||||
last cmd=0x12345678
|
||||
------------------------------------------------------------------------
|
||||
|
||||
The first line is a warning, and this is usually relatively harmless.
|
||||
It means that the codec response isn't notified via an IRQ. The
|
||||
driver uses explicit polling method to read the response. It gives
|
||||
very slight CPU overhead, but you'd unlikely notice it.
|
||||
|
||||
The second line is, however, a fatal error. If this happens, usually
|
||||
it means that something is really wrong. Most likely you are
|
||||
accessing a non-existing codec slot.
|
||||
|
||||
Thus, if the second error message appears, try to narrow the probed
|
||||
codec slots via `probe_mask` option. It's a bitmask, and each bit
|
||||
corresponds to the codec slot. For example, to probe only the first
|
||||
slot, pass `probe_mask=1`. For the first and the third slots, pass
|
||||
`probe_mask=5` (where 5 = 1 | 4), and so on.
|
||||
|
||||
Since 2.6.29 kernel, the driver has a more robust probing method, so
|
||||
this error might happen rarely, though.
|
||||
|
||||
|
||||
Interrupt Handling
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
In rare but some cases, the interrupt isn't properly handled as
|
||||
default. You would notice this by the DMA transfer error reported by
|
||||
ALSA PCM core, for example. Using MSI might help in such a case.
|
||||
Pass `enable_msi=1` option for enabling MSI.
|
||||
|
||||
|
||||
HD-AUDIO CODEC
|
||||
--------------
|
||||
|
||||
Model Option
|
||||
~~~~~~~~~~~~
|
||||
The most common problem regarding the HD-audio driver is the
|
||||
unsupported codec features or the mismatched device configuration.
|
||||
Most of codec-specific code has several preset models, either to
|
||||
override the BIOS setup or to provide more comprehensive features.
|
||||
|
||||
The driver checks PCI SSID and looks through the static configuration
|
||||
table until any matching entry is found. If you have a new machine,
|
||||
you may see a message like below:
|
||||
------------------------------------------------------------------------
|
||||
hda_codec: Unknown model for ALC880, trying auto-probe from BIOS...
|
||||
------------------------------------------------------------------------
|
||||
Even if you see such a message, DON'T PANIC. Take a deep breath and
|
||||
keep your towel. First of all, it's an informational message, no
|
||||
warning, no error. This means that the PCI SSID of your device isn't
|
||||
listed in the known preset model (white-)list. But, this doesn't mean
|
||||
that the driver is broken. Many codec-drivers provide the automatic
|
||||
configuration mechanism based on the BIOS setup.
|
||||
|
||||
The HD-audio codec has usually "pin" widgets, and BIOS sets the default
|
||||
configuration of each pin, which indicates the location, the
|
||||
connection type, the jack color, etc. The HD-audio driver can guess
|
||||
the right connection judging from these default configuration values.
|
||||
However -- some codec-support codes, such as patch_analog.c, don't
|
||||
support the automatic probing (yet as of 2.6.28). And, BIOS is often,
|
||||
yes, pretty often broken. It sets up wrong values and screws up the
|
||||
driver.
|
||||
|
||||
The preset model is provided basically to overcome such a situation.
|
||||
When the matching preset model is found in the white-list, the driver
|
||||
assumes the static configuration of that preset and builds the mixer
|
||||
elements and PCM streams based on the static information. Thus, if
|
||||
you have a newer machine with a slightly different PCI SSID from the
|
||||
existing one, you may have a good chance to re-use the same model.
|
||||
You can pass the `model` option to specify the preset model instead of
|
||||
PCI SSID look-up.
|
||||
|
||||
What `model` option values are available depends on the codec chip.
|
||||
Check your codec chip from the codec proc file (see "Codec Proc-File"
|
||||
section below). It will show the vendor/product name of your codec
|
||||
chip. Then, see Documentation/sound/alsa/HD-Audio-Modelstxt file,
|
||||
the section of HD-audio driver. You can find a list of codecs
|
||||
and `model` options belonging to each codec. For example, for Realtek
|
||||
ALC262 codec chip, pass `model=ultra` for devices that are compatible
|
||||
with Samsung Q1 Ultra.
|
||||
|
||||
Thus, the first thing you can do for any brand-new, unsupported and
|
||||
non-working HD-audio hardware is to check HD-audio codec and several
|
||||
different `model` option values. If you have a luck, some of them
|
||||
might suit with your device well.
|
||||
|
||||
Some codecs such as ALC880 have a special model option `model=test`.
|
||||
This configures the driver to provide as many mixer controls as
|
||||
possible for every single pin feature except for the unsolicited
|
||||
events (and maybe some other specials). Adjust each mixer element and
|
||||
try the I/O in the way of trial-and-error until figuring out the whole
|
||||
I/O pin mappings.
|
||||
|
||||
Note that `model=generic` has a special meaning. It means to use the
|
||||
generic parser regardless of the codec. Usually the codec-specific
|
||||
parser is much better than the generic parser (as now). Thus this
|
||||
option is more about the debugging purpose.
|
||||
|
||||
|
||||
Speaker and Headphone Output
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
One of the most frequent (and obvious) bugs with HD-audio is the
|
||||
silent output from either or both of a built-in speaker and a
|
||||
headphone jack. In general, you should try a headphone output at
|
||||
first. A speaker output often requires more additional controls like
|
||||
the external amplifier bits. Thus a headphone output has a slightly
|
||||
better chance.
|
||||
|
||||
Before making a bug report, double-check whether the mixer is set up
|
||||
correctly. The recent version of snd-hda-intel driver provides mostly
|
||||
"Master" volume control as well as "Front" volume (where Front
|
||||
indicates the front-channels). In addition, there can be individual
|
||||
"Headphone" and "Speaker" controls.
|
||||
|
||||
Ditto for the speaker output. There can be "External Amplifier"
|
||||
switch on some codecs. Turn on this if present.
|
||||
|
||||
Another related problem is the automatic mute of speaker output by
|
||||
headphone plugging. This feature is implemented in most cases, but
|
||||
not on every preset model or codec-support code.
|
||||
|
||||
In anyway, try a different model option if you have such a problem.
|
||||
Some other models may match better and give you more matching
|
||||
functionality. If none of the available models works, send a bug
|
||||
report. See the bug report section for details.
|
||||
|
||||
If you are masochistic enough to debug the driver problem, note the
|
||||
following:
|
||||
|
||||
- The speaker (and the headphone, too) output often requires the
|
||||
external amplifier. This can be set usually via EAPD verb or a
|
||||
certain GPIO. If the codec pin supports EAPD, you have a better
|
||||
chance via SET_EAPD_BTL verb (0x70c). On others, GPIO pin (mostly
|
||||
it's either GPIO0 or GPIO1) may turn on/off EAPD.
|
||||
- Some Realtek codecs require special vendor-specific coefficients to
|
||||
turn on the amplifier. See patch_realtek.c.
|
||||
- IDT codecs may have extra power-enable/disable controls on each
|
||||
analog pin. See patch_sigmatel.c.
|
||||
- Very rare but some devices don't accept the pin-detection verb until
|
||||
triggered. Issuing GET_PIN_SENSE verb (0xf09) may result in the
|
||||
codec-communication stall. Some examples are found in
|
||||
patch_realtek.c.
|
||||
|
||||
|
||||
Capture Problems
|
||||
~~~~~~~~~~~~~~~~
|
||||
The capture problems are often because of missing setups of mixers.
|
||||
Thus, before submitting a bug report, make sure that you set up the
|
||||
mixer correctly. For example, both "Capture Volume" and "Capture
|
||||
Switch" have to be set properly in addition to the right "Capture
|
||||
Source" or "Input Source" selection. Some devices have "Mic Boost"
|
||||
volume or switch.
|
||||
|
||||
When the PCM device is opened via "default" PCM (without pulse-audio
|
||||
plugin), you'll likely have "Digital Capture Volume" control as well.
|
||||
This is provided for the extra gain/attenuation of the signal in
|
||||
software, especially for the inputs without the hardware volume
|
||||
control such as digital microphones. Unless really needed, this
|
||||
should be set to exactly 50%, corresponding to 0dB -- neither extra
|
||||
gain nor attenuation. When you use "hw" PCM, i.e., a raw access PCM,
|
||||
this control will have no influence, though.
|
||||
|
||||
It's known that some codecs / devices have fairly bad analog circuits,
|
||||
and the recorded sound contains a certain DC-offset. This is no bug
|
||||
of the driver.
|
||||
|
||||
Most of modern laptops have no analog CD-input connection. Thus, the
|
||||
recording from CD input won't work in many cases although the driver
|
||||
provides it as the capture source. Use CDDA instead.
|
||||
|
||||
The automatic switching of the built-in and external mic per plugging
|
||||
is implemented on some codec models but not on every model. Partly
|
||||
because of my laziness but mostly lack of testers. Feel free to
|
||||
submit the improvement patch to the author.
|
||||
|
||||
|
||||
Direct Debugging
|
||||
~~~~~~~~~~~~~~~~
|
||||
If no model option gives you a better result, and you are a tough guy
|
||||
to fight against evil, try debugging via hitting the raw HD-audio
|
||||
codec verbs to the device. Some tools are available: hda-emu and
|
||||
hda-analyzer. The detailed description is found in the sections
|
||||
below. You'd need to enable hwdep for using these tools. See "Kernel
|
||||
Configuration" section.
|
||||
|
||||
|
||||
OTHER ISSUES
|
||||
------------
|
||||
|
||||
Kernel Configuration
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
In general, I recommend you to enable the sound debug option,
|
||||
`CONFIG_SND_DEBUG=y`, no matter whether you are debugging or not.
|
||||
This enables snd_printd() macro and others, and you'll get additional
|
||||
kernel messages at probing.
|
||||
|
||||
In addition, you can enable `CONFIG_SND_DEBUG_VERBOSE=y`. But this
|
||||
will give you far more messages. Thus turn this on only when you are
|
||||
sure to want it.
|
||||
|
||||
Don't forget to turn on the appropriate `CONFIG_SND_HDA_CODEC_*`
|
||||
options. Note that each of them corresponds to the codec chip, not
|
||||
the controller chip. Thus, even if lspci shows the Nvidia controller,
|
||||
you may need to choose the option for other vendors. If you are
|
||||
unsure, just select all yes.
|
||||
|
||||
`CONFIG_SND_HDA_HWDEP` is a useful option for debugging the driver.
|
||||
When this is enabled, the driver creates hardware-dependent devices
|
||||
(one per each codec), and you have a raw access to the device via
|
||||
these device files. For example, `hwC0D2` will be created for the
|
||||
codec slot #2 of the first card (#0). For debug-tools such as
|
||||
hda-verb and hda-analyzer, the hwdep device has to be enabled.
|
||||
Thus, it'd be better to turn this on always.
|
||||
|
||||
`CONFIG_SND_HDA_RECONFIG` is a new option, and this depends on the
|
||||
hwdep option above. When enabled, you'll have some sysfs files under
|
||||
the corresponding hwdep directory. See "HD-audio reconfiguration"
|
||||
section below.
|
||||
|
||||
`CONFIG_SND_HDA_POWER_SAVE` option enables the power-saving feature.
|
||||
See "Power-saving" section below.
|
||||
|
||||
|
||||
Codec Proc-File
|
||||
~~~~~~~~~~~~~~~
|
||||
The codec proc-file is a treasure-chest for debugging HD-audio.
|
||||
It shows most of useful information of each codec widget.
|
||||
|
||||
The proc file is located in /proc/asound/card*/codec#*, one file per
|
||||
each codec slot. You can know the codec vendor, product id and
|
||||
names, the type of each widget, capabilities and so on.
|
||||
This file, however, doesn't show the jack sensing state, so far. This
|
||||
is because the jack-sensing might be depending on the trigger state.
|
||||
|
||||
This file will be picked up by the debug tools, and also it can be fed
|
||||
to the emulator as the primary codec information. See the debug tools
|
||||
section below.
|
||||
|
||||
This proc file can be also used to check whether the generic parser is
|
||||
used. When the generic parser is used, the vendor/product ID name
|
||||
will appear as "Realtek ID 0262", instead of "Realtek ALC262".
|
||||
|
||||
|
||||
HD-Audio Reconfiguration
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
This is an experimental feature to allow you re-configure the HD-audio
|
||||
codec dynamically without reloading the driver. The following sysfs
|
||||
files are available under each codec-hwdep device directory (e.g.
|
||||
/sys/class/sound/hwC0D0):
|
||||
|
||||
vendor_id::
|
||||
Shows the 32bit codec vendor-id hex number. You can change the
|
||||
vendor-id value by writing to this file.
|
||||
subsystem_id::
|
||||
Shows the 32bit codec subsystem-id hex number. You can change the
|
||||
subsystem-id value by writing to this file.
|
||||
revision_id::
|
||||
Shows the 32bit codec revision-id hex number. You can change the
|
||||
revision-id value by writing to this file.
|
||||
afg::
|
||||
Shows the AFG ID. This is read-only.
|
||||
mfg::
|
||||
Shows the MFG ID. This is read-only.
|
||||
name::
|
||||
Shows the codec name string. Can be changed by writing to this
|
||||
file.
|
||||
modelname::
|
||||
Shows the currently set `model` option. Can be changed by writing
|
||||
to this file.
|
||||
init_verbs::
|
||||
The extra verbs to execute at initialization. You can add a verb by
|
||||
writing to this file. Pass tree numbers, nid, verb and parameter.
|
||||
hints::
|
||||
Shows hint strings for codec parsers for any use. Right now it's
|
||||
not used.
|
||||
reconfig::
|
||||
Triggers the codec re-configuration. When any value is written to
|
||||
this file, the driver re-initialize and parses the codec tree
|
||||
again. All the changes done by the sysfs entries above are taken
|
||||
into account.
|
||||
clear::
|
||||
Resets the codec, removes the mixer elements and PCM stuff of the
|
||||
specified codec, and clear all init verbs and hints.
|
||||
|
||||
|
||||
Power-Saving
|
||||
~~~~~~~~~~~~
|
||||
The power-saving is a kind of auto-suspend of the device. When the
|
||||
device is inactive for a certain time, the device is automatically
|
||||
turned off to save the power. The time to go down is specified via
|
||||
`power_save` module option, and this option can be changed dynamically
|
||||
via sysfs.
|
||||
|
||||
The power-saving won't work when the analog loopback is enabled on
|
||||
some codecs. Make sure that you mute all unneeded signal routes when
|
||||
you want the power-saving.
|
||||
|
||||
The power-saving feature might cause audible click noises at each
|
||||
power-down/up depending on the device. Some of them might be
|
||||
solvable, but some are hard, I'm afraid. Some distros such as
|
||||
openSUSE enables the power-saving feature automatically when the power
|
||||
cable is unplugged. Thus, if you hear noises, suspect first the
|
||||
power-saving. See /sys/module/snd_hda_intel/parameters/power_save to
|
||||
check the current value. If it's non-zero, the feature is turned on.
|
||||
|
||||
|
||||
Development Tree
|
||||
~~~~~~~~~~~~~~~~
|
||||
The latest development codes for HD-audio are found on sound git tree:
|
||||
|
||||
- git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
|
||||
|
||||
The master branch or for-next branches can be used as the main
|
||||
development branches in general while the HD-audio specific patches
|
||||
are committed in topic/hda branch.
|
||||
|
||||
If you are using the latest Linus tree, it'd be better to pull the
|
||||
above GIT tree onto it. If you are using the older kernels, an easy
|
||||
way to try the latest ALSA code is to build from the snapshot
|
||||
tarball. There are daily tarballs and the latest snapshot tarball.
|
||||
All can be built just like normal alsa-driver release packages, that
|
||||
is, installed via the usual spells: configure, make and make
|
||||
install(-modules). See INSTALL in the package. The snapshot tarballs
|
||||
are found at:
|
||||
|
||||
- ftp://ftp.kernel.org/pub/linux/kernel/people/tiwai/snapshot/
|
||||
|
||||
|
||||
Sending a Bug Report
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
If any model or module options don't work for your device, it's time
|
||||
to send a bug report to the developers. Give the following in your
|
||||
bug report:
|
||||
|
||||
- Hardware vendor, product and model names
|
||||
- Kernel version (and ALSA-driver version if you built externally)
|
||||
- `alsa-info.sh` output; run with `--no-upload` option. See the
|
||||
section below about alsa-info
|
||||
|
||||
If it's a regression, at best, send alsa-info outputs of both working
|
||||
and non-working kernels. This is really helpful because we can
|
||||
compare the codec registers directly.
|
||||
|
||||
Send a bug report either the followings:
|
||||
|
||||
kernel-bugzilla::
|
||||
http://bugme.linux-foundation.org/
|
||||
alsa-devel ML::
|
||||
alsa-devel@alsa-project.org
|
||||
|
||||
|
||||
DEBUG TOOLS
|
||||
-----------
|
||||
|
||||
This section describes some tools available for debugging HD-audio
|
||||
problems.
|
||||
|
||||
alsa-info
|
||||
~~~~~~~~~
|
||||
The script `alsa-info.sh` is a very useful tool to gather the audio
|
||||
device information. You can fetch the latest version from:
|
||||
|
||||
- http://www.alsa-project.org/alsa-info.sh
|
||||
|
||||
Run this script as root, and it will gather the important information
|
||||
such as the module lists, module parameters, proc file contents
|
||||
including the codec proc files, mixer outputs and the control
|
||||
elements. As default, it will store the information onto a web server
|
||||
on alsa-project.org. But, if you send a bug report, it'd be better to
|
||||
run with `--no-upload` option, and attach the generated file.
|
||||
|
||||
There are some other useful options. See `--help` option output for
|
||||
details.
|
||||
|
||||
|
||||
hda-verb
|
||||
~~~~~~~~
|
||||
hda-verb is a tiny program that allows you to access the HD-audio
|
||||
codec directly. You can execute a raw HD-audio codec verb with this.
|
||||
This program accesses the hwdep device, thus you need to enable the
|
||||
kernel config `CONFIG_SND_HDA_HWDEP=y` beforehand.
|
||||
|
||||
The hda-verb program takes four arguments: the hwdep device file, the
|
||||
widget NID, the verb and the parameter. When you access to the codec
|
||||
on the slot 2 of the card 0, pass /dev/snd/hwC0D2 to the first
|
||||
argument, typically. (However, the real path name depends on the
|
||||
system.)
|
||||
|
||||
The second parameter is the widget number-id to access. The third
|
||||
parameter can be either a hex/digit number or a string corresponding
|
||||
to a verb. Similarly, the last parameter is the value to write, or
|
||||
can be a string for the parameter type.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
% hda-verb /dev/snd/hwC0D0 0x12 0x701 2
|
||||
nid = 0x12, verb = 0x701, param = 0x2
|
||||
value = 0x0
|
||||
|
||||
% hda-verb /dev/snd/hwC0D0 0x0 PARAMETERS VENDOR_ID
|
||||
nid = 0x0, verb = 0xf00, param = 0x0
|
||||
value = 0x10ec0262
|
||||
|
||||
% hda-verb /dev/snd/hwC0D0 2 set_a 0xb080
|
||||
nid = 0x2, verb = 0x300, param = 0xb080
|
||||
value = 0x0
|
||||
------------------------------------------------------------------------
|
||||
|
||||
Although you can issue any verbs with this program, the driver state
|
||||
won't be always updated. For example, the volume values are usually
|
||||
cached in the driver, and thus changing the widget amp value directly
|
||||
via hda-verb won't change the mixer value.
|
||||
|
||||
The hda-verb program is found in the ftp directory:
|
||||
|
||||
- ftp://ftp.kernel.org/pub/linux/kernel/people/tiwai/misc/
|
||||
|
||||
Also a git repository is available:
|
||||
|
||||
- git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/hda-verb.git
|
||||
|
||||
See README file in the tarball for more details about hda-verb
|
||||
program.
|
||||
|
||||
|
||||
hda-analyzer
|
||||
~~~~~~~~~~~~
|
||||
hda-analyzer provides a graphical interface to access the raw HD-audio
|
||||
control, based on pyGTK2 binding. It's a more powerful version of
|
||||
hda-verb. The program gives you an easy-to-use GUI stuff for showing
|
||||
the widget information and adjusting the amp values, as well as the
|
||||
proc-compatible output.
|
||||
|
||||
The hda-analyzer is a part of alsa.git repository in
|
||||
alsa-project.org:
|
||||
|
||||
- http://git.alsa-project.org/?p=alsa.git;a=tree;f=hda-analyzer
|
||||
|
||||
|
||||
Codecgraph
|
||||
~~~~~~~~~~
|
||||
Codecgraph is a utility program to generate a graph and visualizes the
|
||||
codec-node connection of a codec chip. It's especially useful when
|
||||
you analyze or debug a codec without a proper datasheet. The program
|
||||
parses the given codec proc file and converts to SVG via graphiz
|
||||
program.
|
||||
|
||||
The tarball and GIT trees are found in the web page at:
|
||||
|
||||
- http://helllabs.org/codecgraph/
|
||||
|
||||
|
||||
hda-emu
|
||||
~~~~~~~
|
||||
hda-emu is an HD-audio emulator. The main purpose of this program is
|
||||
to debug an HD-audio codec without the real hardware. Thus, it
|
||||
doesn't emulate the behavior with the real audio I/O, but it just
|
||||
dumps the codec register changes and the ALSA-driver internal changes
|
||||
at probing and operating the HD-audio driver.
|
||||
|
||||
The program requires a codec proc-file to simulate. Get a proc file
|
||||
for the target codec beforehand, or pick up an example codec from the
|
||||
codec proc collections in the tarball. Then, run the program with the
|
||||
proc file, and the hda-emu program will start parsing the codec file
|
||||
and simulates the HD-audio driver:
|
||||
|
||||
------------------------------------------------------------------------
|
||||
% hda-emu codecs/stac9200-dell-d820-laptop
|
||||
# Parsing..
|
||||
hda_codec: Unknown model for STAC9200, using BIOS defaults
|
||||
hda_codec: pin nid 08 bios pin config 40c003fa
|
||||
....
|
||||
------------------------------------------------------------------------
|
||||
|
||||
The program gives you only a very dumb command-line interface. You
|
||||
can get a proc-file dump at the current state, get a list of control
|
||||
(mixer) elements, set/get the control element value, simulate the PCM
|
||||
operation, the jack plugging simulation, etc.
|
||||
|
||||
The package is found in:
|
||||
|
||||
- ftp://ftp.kernel.org/pub/linux/kernel/people/tiwai/misc/
|
||||
|
||||
A git repository is available:
|
||||
|
||||
- git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/hda-emu.git
|
||||
|
||||
See README file in the tarball for more details about hda-emu
|
||||
program.
|
|
@ -153,6 +153,16 @@ card*/codec#*
|
|||
Shows the general codec information and the attribute of each
|
||||
widget node.
|
||||
|
||||
card*/eld#*
|
||||
Available for HDMI or DisplayPort interfaces.
|
||||
Shows ELD(EDID Like Data) info retrieved from the attached HDMI sink,
|
||||
and describes its audio capabilities and configurations.
|
||||
|
||||
Some ELD fields may be modified by doing `echo name hex_value > eld#*`.
|
||||
Only do this if you are sure the HDMI sink provided value is wrong.
|
||||
And if that makes your HDMI audio work, please report to us so that we
|
||||
can fix it in future kernel releases.
|
||||
|
||||
|
||||
Sequencer Information
|
||||
---------------------
|
||||
|
|
|
@ -9,7 +9,7 @@ the audio subsystem with the kernel as a platform device and is represented by
|
|||
the following struct:-
|
||||
|
||||
/* SoC machine */
|
||||
struct snd_soc_machine {
|
||||
struct snd_soc_card {
|
||||
char *name;
|
||||
|
||||
int (*probe)(struct platform_device *pdev);
|
||||
|
@ -67,10 +67,10 @@ static struct snd_soc_dai_link corgi_dai = {
|
|||
.ops = &corgi_ops,
|
||||
};
|
||||
|
||||
struct snd_soc_machine then sets up the machine with it's DAIs. e.g.
|
||||
struct snd_soc_card then sets up the machine with it's DAIs. e.g.
|
||||
|
||||
/* corgi audio machine driver */
|
||||
static struct snd_soc_machine snd_soc_machine_corgi = {
|
||||
static struct snd_soc_card snd_soc_corgi = {
|
||||
.name = "Corgi",
|
||||
.dai_link = &corgi_dai,
|
||||
.num_links = 1,
|
||||
|
@ -90,7 +90,7 @@ static struct wm8731_setup_data corgi_wm8731_setup = {
|
|||
|
||||
/* corgi audio subsystem */
|
||||
static struct snd_soc_device corgi_snd_devdata = {
|
||||
.machine = &snd_soc_machine_corgi,
|
||||
.machine = &snd_soc_corgi,
|
||||
.platform = &pxa2xx_soc_platform,
|
||||
.codec_dev = &soc_codec_dev_wm8731,
|
||||
.codec_data = &corgi_wm8731_setup,
|
||||
|
|
|
@ -3,28 +3,30 @@
|
|||
Mathieu Desnoyers
|
||||
|
||||
|
||||
This document introduces Linux Kernel Tracepoints and their use. It provides
|
||||
examples of how to insert tracepoints in the kernel and connect probe functions
|
||||
to them and provides some examples of probe functions.
|
||||
This document introduces Linux Kernel Tracepoints and their use. It
|
||||
provides examples of how to insert tracepoints in the kernel and
|
||||
connect probe functions to them and provides some examples of probe
|
||||
functions.
|
||||
|
||||
|
||||
* Purpose of tracepoints
|
||||
|
||||
A tracepoint placed in code provides a hook to call a function (probe) that you
|
||||
can provide at runtime. A tracepoint can be "on" (a probe is connected to it) or
|
||||
"off" (no probe is attached). When a tracepoint is "off" it has no effect,
|
||||
except for adding a tiny time penalty (checking a condition for a branch) and
|
||||
space penalty (adding a few bytes for the function call at the end of the
|
||||
instrumented function and adds a data structure in a separate section). When a
|
||||
tracepoint is "on", the function you provide is called each time the tracepoint
|
||||
is executed, in the execution context of the caller. When the function provided
|
||||
ends its execution, it returns to the caller (continuing from the tracepoint
|
||||
site).
|
||||
A tracepoint placed in code provides a hook to call a function (probe)
|
||||
that you can provide at runtime. A tracepoint can be "on" (a probe is
|
||||
connected to it) or "off" (no probe is attached). When a tracepoint is
|
||||
"off" it has no effect, except for adding a tiny time penalty
|
||||
(checking a condition for a branch) and space penalty (adding a few
|
||||
bytes for the function call at the end of the instrumented function
|
||||
and adds a data structure in a separate section). When a tracepoint
|
||||
is "on", the function you provide is called each time the tracepoint
|
||||
is executed, in the execution context of the caller. When the function
|
||||
provided ends its execution, it returns to the caller (continuing from
|
||||
the tracepoint site).
|
||||
|
||||
You can put tracepoints at important locations in the code. They are
|
||||
lightweight hooks that can pass an arbitrary number of parameters,
|
||||
which prototypes are described in a tracepoint declaration placed in a header
|
||||
file.
|
||||
which prototypes are described in a tracepoint declaration placed in a
|
||||
header file.
|
||||
|
||||
They can be used for tracing and performance accounting.
|
||||
|
||||
|
@ -42,14 +44,16 @@ In include/trace/subsys.h :
|
|||
|
||||
#include <linux/tracepoint.h>
|
||||
|
||||
DEFINE_TRACE(subsys_eventname,
|
||||
TPPTOTO(int firstarg, struct task_struct *p),
|
||||
DECLARE_TRACE(subsys_eventname,
|
||||
TPPROTO(int firstarg, struct task_struct *p),
|
||||
TPARGS(firstarg, p));
|
||||
|
||||
In subsys/file.c (where the tracing statement must be added) :
|
||||
|
||||
#include <trace/subsys.h>
|
||||
|
||||
DEFINE_TRACE(subsys_eventname);
|
||||
|
||||
void somefct(void)
|
||||
{
|
||||
...
|
||||
|
@ -61,31 +65,41 @@ Where :
|
|||
- subsys_eventname is an identifier unique to your event
|
||||
- subsys is the name of your subsystem.
|
||||
- eventname is the name of the event to trace.
|
||||
- TPPTOTO(int firstarg, struct task_struct *p) is the prototype of the function
|
||||
called by this tracepoint.
|
||||
- TPARGS(firstarg, p) are the parameters names, same as found in the prototype.
|
||||
|
||||
Connecting a function (probe) to a tracepoint is done by providing a probe
|
||||
(function to call) for the specific tracepoint through
|
||||
- TPPROTO(int firstarg, struct task_struct *p) is the prototype of the
|
||||
function called by this tracepoint.
|
||||
|
||||
- TPARGS(firstarg, p) are the parameters names, same as found in the
|
||||
prototype.
|
||||
|
||||
Connecting a function (probe) to a tracepoint is done by providing a
|
||||
probe (function to call) for the specific tracepoint through
|
||||
register_trace_subsys_eventname(). Removing a probe is done through
|
||||
unregister_trace_subsys_eventname(); it will remove the probe sure there is no
|
||||
caller left using the probe when it returns. Probe removal is preempt-safe
|
||||
because preemption is disabled around the probe call. See the "Probe example"
|
||||
section below for a sample probe module.
|
||||
unregister_trace_subsys_eventname(); it will remove the probe.
|
||||
|
||||
The tracepoint mechanism supports inserting multiple instances of the same
|
||||
tracepoint, but a single definition must be made of a given tracepoint name over
|
||||
all the kernel to make sure no type conflict will occur. Name mangling of the
|
||||
tracepoints is done using the prototypes to make sure typing is correct.
|
||||
Verification of probe type correctness is done at the registration site by the
|
||||
compiler. Tracepoints can be put in inline functions, inlined static functions,
|
||||
and unrolled loops as well as regular functions.
|
||||
tracepoint_synchronize_unregister() must be called before the end of
|
||||
the module exit function to make sure there is no caller left using
|
||||
the probe. This, and the fact that preemption is disabled around the
|
||||
probe call, make sure that probe removal and module unload are safe.
|
||||
See the "Probe example" section below for a sample probe module.
|
||||
|
||||
The naming scheme "subsys_event" is suggested here as a convention intended
|
||||
to limit collisions. Tracepoint names are global to the kernel: they are
|
||||
considered as being the same whether they are in the core kernel image or in
|
||||
modules.
|
||||
The tracepoint mechanism supports inserting multiple instances of the
|
||||
same tracepoint, but a single definition must be made of a given
|
||||
tracepoint name over all the kernel to make sure no type conflict will
|
||||
occur. Name mangling of the tracepoints is done using the prototypes
|
||||
to make sure typing is correct. Verification of probe type correctness
|
||||
is done at the registration site by the compiler. Tracepoints can be
|
||||
put in inline functions, inlined static functions, and unrolled loops
|
||||
as well as regular functions.
|
||||
|
||||
The naming scheme "subsys_event" is suggested here as a convention
|
||||
intended to limit collisions. Tracepoint names are global to the
|
||||
kernel: they are considered as being the same whether they are in the
|
||||
core kernel image or in modules.
|
||||
|
||||
If the tracepoint has to be used in kernel modules, an
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL() or EXPORT_TRACEPOINT_SYMBOL() can be
|
||||
used to export the defined tracepoints.
|
||||
|
||||
* Probe / tracepoint example
|
||||
|
||||
|
|
|
@ -114,11 +114,11 @@ modules.
|
|||
Then you must load the gadget serial driver. To load it as an
|
||||
ACM device (recommended for interoperability), do this:
|
||||
|
||||
modprobe g_serial use_acm=1
|
||||
modprobe g_serial
|
||||
|
||||
To load it as a vendor specific bulk in/out device, do this:
|
||||
|
||||
modprobe g_serial
|
||||
modprobe g_serial use_acm=0
|
||||
|
||||
This will also automatically load the underlying gadget peripheral
|
||||
controller driver. This must be done each time you reboot the gadget
|
||||
|
|
|
@ -49,8 +49,10 @@ it and 002/048 sometime later.
|
|||
|
||||
These files can be read as binary data. The binary data consists
|
||||
of first the device descriptor, then the descriptors for each
|
||||
configuration of the device. That information is also shown in
|
||||
text form by the /proc/bus/usb/devices file, described later.
|
||||
configuration of the device. Multi-byte fields in the device and
|
||||
configuration descriptors, but not other descriptors, are converted
|
||||
to host endianness by the kernel. This information is also shown
|
||||
in text form by the /proc/bus/usb/devices file, described later.
|
||||
|
||||
These files may also be used to write user-level drivers for the USB
|
||||
devices. You would open the /proc/bus/usb/BBB/DDD file read/write,
|
||||
|
|
|
@ -34,11 +34,12 @@ if usbmon is built into the kernel.
|
|||
Verify that bus sockets are present.
|
||||
|
||||
# ls /sys/kernel/debug/usbmon
|
||||
0s 0t 0u 1s 1t 1u 2s 2t 2u 3s 3t 3u 4s 4t 4u
|
||||
0s 0u 1s 1t 1u 2s 2t 2u 3s 3t 3u 4s 4t 4u
|
||||
#
|
||||
|
||||
Now you can choose to either use the sockets numbered '0' (to capture packets on
|
||||
all buses), and skip to step #3, or find the bus used by your device with step #2.
|
||||
Now you can choose to either use the socket '0u' (to capture packets on all
|
||||
buses), and skip to step #3, or find the bus used by your device with step #2.
|
||||
This allows to filter away annoying devices that talk continuously.
|
||||
|
||||
2. Find which bus connects to the desired device
|
||||
|
||||
|
@ -99,8 +100,9 @@ on the event type, but there is a set of words, common for all types.
|
|||
|
||||
Here is the list of words, from left to right:
|
||||
|
||||
- URB Tag. This is used to identify URBs is normally a kernel mode address
|
||||
of the URB structure in hexadecimal.
|
||||
- URB Tag. This is used to identify URBs, and is normally an in-kernel address
|
||||
of the URB structure in hexadecimal, but can be a sequence number or any
|
||||
other unique string, within reason.
|
||||
|
||||
- Timestamp in microseconds, a decimal number. The timestamp's resolution
|
||||
depends on available clock, and so it can be much worse than a microsecond
|
||||
|
|
|
@ -349,7 +349,7 @@ Protocol: 2.00+
|
|||
3 SYSLINUX
|
||||
4 EtherBoot
|
||||
5 ELILO
|
||||
7 GRuB
|
||||
7 GRUB
|
||||
8 U-BOOT
|
||||
9 Xen
|
||||
A Gujin
|
||||
|
@ -537,8 +537,8 @@ Type: read
|
|||
Offset/size: 0x248/4
|
||||
Protocol: 2.08+
|
||||
|
||||
If non-zero then this field contains the offset from the end of the
|
||||
real-mode code to the payload.
|
||||
If non-zero then this field contains the offset from the beginning
|
||||
of the protected-mode code to the payload.
|
||||
|
||||
The payload may be compressed. The format of both the compressed and
|
||||
uncompressed data should be determined using the standard magic
|
||||
|
|
|
@ -80,6 +80,30 @@ pci proc | -- | -- | WC |
|
|||
| | | |
|
||||
-------------------------------------------------------------------
|
||||
|
||||
Advanced APIs for drivers
|
||||
-------------------------
|
||||
A. Exporting pages to users with remap_pfn_range, io_remap_pfn_range,
|
||||
vm_insert_pfn
|
||||
|
||||
Drivers wanting to export some pages to userspace do it by using mmap
|
||||
interface and a combination of
|
||||
1) pgprot_noncached()
|
||||
2) io_remap_pfn_range() or remap_pfn_range() or vm_insert_pfn()
|
||||
|
||||
With PAT support, a new API pgprot_writecombine is being added. So, drivers can
|
||||
continue to use the above sequence, with either pgprot_noncached() or
|
||||
pgprot_writecombine() in step 1, followed by step 2.
|
||||
|
||||
In addition, step 2 internally tracks the region as UC or WC in memtype
|
||||
list in order to ensure no conflicting mapping.
|
||||
|
||||
Note that this set of APIs only works with IO (non RAM) regions. If driver
|
||||
wants to export a RAM region, it has to do set_memory_uc() or set_memory_wc()
|
||||
as step 0 above and also track the usage of those pages and use set_memory_wb()
|
||||
before the page is freed to free pool.
|
||||
|
||||
|
||||
|
||||
Notes:
|
||||
|
||||
-- in the above table mean "Not suggested usage for the API". Some of the --'s
|
||||
|
|
|
@ -79,17 +79,6 @@ Timing
|
|||
Report when timer interrupts are lost because some code turned off
|
||||
interrupts for too long.
|
||||
|
||||
nmi_watchdog=NUMBER[,panic]
|
||||
NUMBER can be:
|
||||
0 don't use an NMI watchdog
|
||||
1 use the IO-APIC timer for the NMI watchdog
|
||||
2 use the local APIC for the NMI watchdog using a performance counter. Note
|
||||
This will use one performance counter and the local APIC's performance
|
||||
vector.
|
||||
When panic is specified panic when an NMI watchdog timeout occurs.
|
||||
This is useful when you use a panic=... timeout and need the box
|
||||
quickly up again.
|
||||
|
||||
nohpet
|
||||
Don't use the HPET timer.
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ Virtual memory map with 4 level page tables:
|
|||
0000000000000000 - 00007fffffffffff (=47 bits) user space, different per mm
|
||||
hole caused by [48:63] sign extension
|
||||
ffff800000000000 - ffff80ffffffffff (=40 bits) guard hole
|
||||
ffff810000000000 - ffffc0ffffffffff (=46 bits) direct mapping of all phys. memory
|
||||
ffff880000000000 - ffffc0ffffffffff (=57 TB) direct mapping of all phys. memory
|
||||
ffffc10000000000 - ffffc1ffffffffff (=40 bits) hole
|
||||
ffffc20000000000 - ffffe1ffffffffff (=45 bits) vmalloc/ioremap space
|
||||
ffffe20000000000 - ffffe2ffffffffff (=40 bits) virtual memory map (1TB)
|
||||
|
|
64
MAINTAINERS
64
MAINTAINERS
|
@ -742,7 +742,7 @@ M: jirislaby@gmail.com
|
|||
P: Nick Kossifidis
|
||||
M: mickflemm@gmail.com
|
||||
P: Luis R. Rodriguez
|
||||
M: mcgrof@gmail.com
|
||||
M: lrodriguez@atheros.com
|
||||
P: Bob Copeland
|
||||
M: me@bobcopeland.com
|
||||
L: linux-wireless@vger.kernel.org
|
||||
|
@ -1527,10 +1527,10 @@ W: http://ebtables.sourceforge.net/
|
|||
S: Maintained
|
||||
|
||||
ECRYPT FILE SYSTEM
|
||||
P: Mike Halcrow, Phillip Hellewell
|
||||
M: mhalcrow@us.ibm.com, phillip@hellewell.homeip.net
|
||||
L: ecryptfs-devel@lists.sourceforge.net
|
||||
W: http://ecryptfs.sourceforge.net/
|
||||
P: Tyler Hicks, Dustin Kirkland
|
||||
M: tyhicks@linux.vnet.ibm.com, kirkland@canonical.com
|
||||
L: ecryptfs-devel@lists.launchpad.net
|
||||
W: https://launchpad.net/ecryptfs
|
||||
S: Supported
|
||||
|
||||
EDAC-CORE
|
||||
|
@ -1607,11 +1607,6 @@ L: acpi4asus-user@lists.sourceforge.net
|
|||
W: http://sourceforge.net/projects/acpi4asus
|
||||
S: Maintained
|
||||
|
||||
EEPRO100 NETWORK DRIVER
|
||||
P: Andrey V. Savochkin
|
||||
M: saw@saw.sw.com.sg
|
||||
S: Maintained
|
||||
|
||||
EFS FILESYSTEM
|
||||
W: http://aeschi.ch.eu.org/efs/
|
||||
S: Orphan
|
||||
|
@ -1849,7 +1844,7 @@ P: Haavard Skinnemoen
|
|||
M: hskinnemoen@atmel.com
|
||||
S: Supported
|
||||
|
||||
GENERIC HDLC DRIVER, N2, C101, PCI200SYN and WANXL DRIVERS
|
||||
GENERIC HDLC (WAN) DRIVERS
|
||||
P: Krzysztof Halasa
|
||||
M: khc@pm.waw.pl
|
||||
W: http://www.kernel.org/pub/linux/utils/net/hdlc/
|
||||
|
@ -2191,9 +2186,9 @@ S: Supported
|
|||
|
||||
INOTIFY
|
||||
P: John McCutchan
|
||||
M: ttb@tentacle.dhs.org
|
||||
M: john@johnmccutchan.com
|
||||
P: Robert Love
|
||||
M: rml@novell.com
|
||||
M: rlove@rlove.org
|
||||
L: linux-kernel@vger.kernel.org
|
||||
S: Maintained
|
||||
|
||||
|
@ -2248,6 +2243,11 @@ M: dan.j.williams@intel.com
|
|||
L: linux-kernel@vger.kernel.org
|
||||
S: Supported
|
||||
|
||||
INTEL IXP4XX QMGR, NPE, ETHERNET and HSS SUPPORT
|
||||
P: Krzysztof Halasa
|
||||
M: khc@pm.waw.pl
|
||||
S: Maintained
|
||||
|
||||
INTEL IXP4XX RANDOM NUMBER GENERATOR SUPPORT
|
||||
P: Deepak Saxena
|
||||
M: dsaxena@plexity.net
|
||||
|
@ -3614,16 +3614,26 @@ L: linux-hams@vger.kernel.org
|
|||
W: http://www.linux-ax25.org/
|
||||
S: Maintained
|
||||
|
||||
RTL818X WIRELESS DRIVER
|
||||
P: Michael Wu
|
||||
M: flamingice@sourmilk.net
|
||||
P: Andrea Merello
|
||||
M: andreamrl@tiscali.it
|
||||
RTL8180 WIRELESS DRIVER
|
||||
P: John W. Linville
|
||||
M: linville@tuxdriver.com
|
||||
L: linux-wireless@vger.kernel.org
|
||||
W: http://linuxwireless.org/
|
||||
T: git kernel.org:/pub/scm/linux/kernel/git/mwu/mac80211-drivers.git
|
||||
T: git kernel.org:/pub/scm/linux/kernel/git/linville/wireless-testing.git
|
||||
S: Maintained
|
||||
|
||||
RTL8187 WIRELESS DRIVER
|
||||
P: Herton Ronaldo Krzesinski
|
||||
M: herton@mandriva.com.br
|
||||
P: Hin-Tak Leung
|
||||
M htl10@users.sourceforge.net
|
||||
P: Larry Finger
|
||||
M: Larry.Finger@lwfinger.net
|
||||
L: linux-wireless@vger.kernel.org
|
||||
W: http://linuxwireless.org/
|
||||
T: git kernel.org:/pub/scm/linux/kernel/git/linville/wireless-testing.git
|
||||
S: Maintained
|
||||
|
||||
S3 SAVAGE FRAMEBUFFER DRIVER
|
||||
P: Antonino Daplas
|
||||
M: adaplas@gmail.com
|
||||
|
@ -3913,6 +3923,18 @@ M: mhoffman@lightlink.com
|
|||
L: lm-sensors@lm-sensors.org
|
||||
S: Maintained
|
||||
|
||||
SMSC911x ETHERNET DRIVER
|
||||
P: Steve Glendinning
|
||||
M: steve.glendinning@smsc.com
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
|
||||
SMSC9420 PCI ETHERNET DRIVER
|
||||
P: Steve Glendinning
|
||||
M: steve.glendinning@smsc.com
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
|
||||
SMX UIO Interface
|
||||
P: Ben Nizette
|
||||
M: bn@niasdigital.com
|
||||
|
@ -3977,7 +3999,7 @@ M: tiwai@suse.de
|
|||
L: alsa-devel@alsa-project.org (subscribers-only)
|
||||
S: Maintained
|
||||
|
||||
SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEMENT
|
||||
SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEMENT (ASoC)
|
||||
P: Liam Girdwood
|
||||
M: lrg@slimlogic.co.uk
|
||||
P: Mark Brown
|
||||
|
@ -4529,7 +4551,7 @@ S: Maintained
|
|||
USB VIDEO CLASS
|
||||
P: Laurent Pinchart
|
||||
M: laurent.pinchart@skynet.be
|
||||
L: linux-uvc-devel@lists.berlios.de
|
||||
L: linux-uvc-devel@lists.berlios.de (subscribers-only)
|
||||
L: video4linux-list@redhat.com
|
||||
W: http://linux-uvc.berlios.de
|
||||
S: Maintained
|
||||
|
|
209
Makefile
209
Makefile
|
@ -1,7 +1,7 @@
|
|||
VERSION = 2
|
||||
PATCHLEVEL = 6
|
||||
SUBLEVEL = 28
|
||||
EXTRAVERSION = -rc8
|
||||
EXTRAVERSION =
|
||||
NAME = Erotic Pickled Herring
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
@ -336,7 +336,7 @@ LINUXINCLUDE := -Iinclude \
|
|||
-I$(srctree)/arch/$(hdr-arch)/include \
|
||||
-include include/linux/autoconf.h
|
||||
|
||||
KBUILD_CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE)
|
||||
KBUILD_CPPFLAGS := -D__KERNEL__
|
||||
|
||||
KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
|
||||
-fno-strict-aliasing -fno-common \
|
||||
|
@ -439,7 +439,11 @@ ifeq ($(config-targets),1)
|
|||
include $(srctree)/arch/$(SRCARCH)/Makefile
|
||||
export KBUILD_DEFCONFIG KBUILD_KCONFIG
|
||||
|
||||
config %config: scripts_basic outputmakefile FORCE
|
||||
config: scripts_basic outputmakefile FORCE
|
||||
$(Q)mkdir -p include/linux include/config
|
||||
$(Q)$(MAKE) $(build)=scripts/kconfig $@
|
||||
|
||||
%config: scripts_basic outputmakefile FORCE
|
||||
$(Q)mkdir -p include/linux include/config
|
||||
$(Q)$(MAKE) $(build)=scripts/kconfig $@
|
||||
|
||||
|
@ -600,20 +604,25 @@ export INSTALL_PATH ?= /boot
|
|||
MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
|
||||
export MODLIB
|
||||
|
||||
#
|
||||
# INSTALL_MOD_STRIP, if defined, will cause modules to be
|
||||
# stripped after they are installed. If INSTALL_MOD_STRIP is '1', then
|
||||
# the default option --strip-debug will be used. Otherwise,
|
||||
# INSTALL_MOD_STRIP will used as the options to the strip command.
|
||||
strip-symbols := $(srctree)/scripts/strip-symbols \
|
||||
$(wildcard $(srctree)/arch/$(ARCH)/scripts/strip-symbols)
|
||||
|
||||
#
|
||||
# INSTALL_MOD_STRIP, if defined, will cause modules to be stripped while
|
||||
# they get installed. If INSTALL_MOD_STRIP is '1', then the default
|
||||
# options (see below) will be used. Otherwise, INSTALL_MOD_STRIP will
|
||||
# be used as the option(s) to the objcopy command.
|
||||
ifdef INSTALL_MOD_STRIP
|
||||
ifeq ($(INSTALL_MOD_STRIP),1)
|
||||
mod_strip_cmd = $(STRIP) --strip-debug
|
||||
mod_strip_cmd = $(OBJCOPY) --strip-debug
|
||||
ifeq ($(CONFIG_KALLSYMS_ALL),$(CONFIG_KALLSYMS_STRIP_GENERATED))
|
||||
mod_strip_cmd += --wildcard $(addprefix --strip-symbols ,$(strip-symbols))
|
||||
endif
|
||||
else
|
||||
mod_strip_cmd = $(STRIP) $(INSTALL_MOD_STRIP)
|
||||
mod_strip_cmd = $(OBJCOPY) $(INSTALL_MOD_STRIP)
|
||||
endif # INSTALL_MOD_STRIP=1
|
||||
else
|
||||
mod_strip_cmd = true
|
||||
mod_strip_cmd = false
|
||||
endif # INSTALL_MOD_STRIP
|
||||
export mod_strip_cmd
|
||||
|
||||
|
@ -743,6 +752,7 @@ last_kallsyms := 2
|
|||
endif
|
||||
|
||||
kallsyms.o := .tmp_kallsyms$(last_kallsyms).o
|
||||
kallsyms.h := $(wildcard include/config/kallsyms/*.h) $(wildcard include/config/kallsyms/*/*.h)
|
||||
|
||||
define verify_kallsyms
|
||||
$(Q)$(if $($(quiet)cmd_sysmap), \
|
||||
|
@ -767,24 +777,41 @@ endef
|
|||
|
||||
# Generate .S file with all kernel symbols
|
||||
quiet_cmd_kallsyms = KSYM $@
|
||||
cmd_kallsyms = $(NM) -n $< | $(KALLSYMS) \
|
||||
$(if $(CONFIG_KALLSYMS_ALL),--all-symbols) > $@
|
||||
cmd_kallsyms = { test $* -eq 0 || $(NM) -n $<; } \
|
||||
| $(KALLSYMS) $(if $(CONFIG_KALLSYMS_ALL),--all-symbols) >$@
|
||||
|
||||
.tmp_kallsyms1.o .tmp_kallsyms2.o .tmp_kallsyms3.o: %.o: %.S scripts FORCE
|
||||
quiet_cmd_kstrip = STRIP $@
|
||||
cmd_kstrip = $(OBJCOPY) --wildcard $(addprefix --strip$(if $(CONFIG_RELOCATABLE),-unneeded)-symbols ,$(filter %/scripts/strip-symbols,$^)) $< $@
|
||||
|
||||
$(foreach n,0 1 2 3,.tmp_kallsyms$(n).o): KBUILD_AFLAGS += -Wa,--strip-local-absolute
|
||||
$(foreach n,0 1 2 3,.tmp_kallsyms$(n).o): %.o: %.S scripts FORCE
|
||||
$(call if_changed_dep,as_o_S)
|
||||
|
||||
.tmp_kallsyms%.S: .tmp_vmlinux% $(KALLSYMS)
|
||||
ifeq ($(CONFIG_KALLSYMS_STRIP_GENERATED),y)
|
||||
strip-ext := .stripped
|
||||
endif
|
||||
|
||||
.tmp_kallsyms%.S: .tmp_vmlinux%$(strip-ext) $(KALLSYMS) $(kallsyms.h)
|
||||
$(call cmd,kallsyms)
|
||||
|
||||
# make -jN seems to have problems with intermediate files, see bug #3330.
|
||||
.SECONDARY: $(foreach n,1 2 3,.tmp_vmlinux$(n).stripped)
|
||||
.tmp_vmlinux%.stripped: .tmp_vmlinux% $(strip-symbols) $(kallsyms.h)
|
||||
$(call cmd,kstrip)
|
||||
|
||||
ifneq ($(CONFIG_DEBUG_INFO),y)
|
||||
.tmp_vmlinux%: LDFLAGS_vmlinux += -S
|
||||
endif
|
||||
# .tmp_vmlinux1 must be complete except kallsyms, so update vmlinux version
|
||||
.tmp_vmlinux1: $(vmlinux-lds) $(vmlinux-all) FORCE
|
||||
$(call if_changed_rule,ksym_ld)
|
||||
.tmp_vmlinux%: $(vmlinux-lds) $(vmlinux-all) FORCE
|
||||
$(if $(filter 1,$*),$(call if_changed_rule,ksym_ld),$(call if_changed,vmlinux__))
|
||||
|
||||
.tmp_vmlinux2: $(vmlinux-lds) $(vmlinux-all) .tmp_kallsyms1.o FORCE
|
||||
$(call if_changed,vmlinux__)
|
||||
.tmp_vmlinux0$(strip-ext):
|
||||
$(Q)echo "placeholder" >$@
|
||||
|
||||
.tmp_vmlinux3: $(vmlinux-lds) $(vmlinux-all) .tmp_kallsyms2.o FORCE
|
||||
$(call if_changed,vmlinux__)
|
||||
.tmp_vmlinux1: .tmp_kallsyms0.o
|
||||
.tmp_vmlinux2: .tmp_kallsyms1.o
|
||||
.tmp_vmlinux3: .tmp_kallsyms2.o
|
||||
|
||||
# Needs to visit scripts/ before $(KALLSYMS) can be used.
|
||||
$(KALLSYMS): scripts ;
|
||||
|
@ -926,7 +953,7 @@ PHONY += prepare archprepare prepare0 prepare1 prepare2 prepare3
|
|||
# 2) Create the include2 directory, used for the second asm symlink
|
||||
prepare3: include/config/kernel.release
|
||||
ifneq ($(KBUILD_SRC),)
|
||||
@echo ' Using $(srctree) as source for kernel'
|
||||
@$(kecho) ' Using $(srctree) as source for kernel'
|
||||
$(Q)if [ -f $(srctree)/.config -o -d $(srctree)/include/config ]; then \
|
||||
echo " $(srctree) is not clean, please run 'make mrproper'";\
|
||||
echo " in the '$(srctree)' directory.";\
|
||||
|
@ -983,7 +1010,7 @@ endef
|
|||
# directory for generated filesas used by some architectures.
|
||||
define create-symlink
|
||||
if [ ! -L include/asm ]; then \
|
||||
echo ' SYMLINK $@ -> include/asm-$(SRCARCH)'; \
|
||||
$(kecho) ' SYMLINK $@ -> include/asm-$(SRCARCH)'; \
|
||||
if [ ! -d include/asm-$(SRCARCH) ]; then \
|
||||
mkdir -p include/asm-$(SRCARCH); \
|
||||
fi; \
|
||||
|
@ -1022,6 +1049,10 @@ include/linux/version.h: $(srctree)/Makefile FORCE
|
|||
include/linux/utsrelease.h: include/config/kernel.release FORCE
|
||||
$(call filechk,utsrelease.h)
|
||||
|
||||
PHONY += headerdep
|
||||
headerdep:
|
||||
$(Q)find include/ -name '*.h' | xargs --max-args 1 scripts/headerdep.pl
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
PHONY += depend dep
|
||||
|
@ -1096,7 +1127,7 @@ all: modules
|
|||
PHONY += modules
|
||||
modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux)
|
||||
$(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
|
||||
@echo ' Building modules, stage 2.';
|
||||
@$(kecho) ' Building modules, stage 2.';
|
||||
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
|
||||
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modbuild
|
||||
|
||||
|
@ -1270,7 +1301,8 @@ help:
|
|||
@echo ' versioncheck - Sanity check on version.h usage'
|
||||
@echo ' includecheck - Check for duplicate included header files'
|
||||
@echo ' export_report - List the usages of all exported symbols'
|
||||
@echo ' headers_check - Sanity check on exported headers'; \
|
||||
@echo ' headers_check - Sanity check on exported headers'
|
||||
@echo ' headerdep - Detect inclusion cycles in headers'; \
|
||||
echo ''
|
||||
@echo 'Kernel packaging:'
|
||||
@$(MAKE) $(build)=$(package-dir) help
|
||||
|
@ -1360,7 +1392,7 @@ $(module-dirs): crmodverdir $(objtree)/Module.symvers
|
|||
$(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@)
|
||||
|
||||
modules: $(module-dirs)
|
||||
@echo ' Building modules, stage 2.';
|
||||
@$(kecho) ' Building modules, stage 2.';
|
||||
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
|
||||
|
||||
PHONY += modules_install
|
||||
|
@ -1409,123 +1441,12 @@ endif # KBUILD_EXTMOD
|
|||
|
||||
# Generate tags for editors
|
||||
# ---------------------------------------------------------------------------
|
||||
quiet_cmd_tags = GEN $@
|
||||
cmd_tags = $(CONFIG_SHELL) $(srctree)/scripts/tags.sh $@
|
||||
|
||||
#We want __srctree to totally vanish out when KBUILD_OUTPUT is not set
|
||||
#(which is the most common case IMHO) to avoid unneeded clutter in the big tags file.
|
||||
#Adding $(srctree) adds about 20M on i386 to the size of the output file!
|
||||
|
||||
ifeq ($(src),$(obj))
|
||||
__srctree =
|
||||
else
|
||||
__srctree = $(srctree)/
|
||||
endif
|
||||
|
||||
ifeq ($(ALLSOURCE_ARCHS),)
|
||||
ifeq ($(ARCH),um)
|
||||
ALLINCLUDE_ARCHS := $(ARCH) $(SUBARCH)
|
||||
else
|
||||
ALLINCLUDE_ARCHS := $(SRCARCH)
|
||||
endif
|
||||
else
|
||||
#Allow user to specify only ALLSOURCE_PATHS on the command line, keeping existing behaviour.
|
||||
ALLINCLUDE_ARCHS := $(ALLSOURCE_ARCHS)
|
||||
endif
|
||||
|
||||
ALLSOURCE_ARCHS := $(SRCARCH)
|
||||
|
||||
define find-sources
|
||||
( for arch in $(ALLSOURCE_ARCHS) ; do \
|
||||
find $(__srctree)arch/$${arch} $(RCS_FIND_IGNORE) \
|
||||
-wholename $(__srctree)arch/$${arch}/include/asm -type d -prune \
|
||||
-o -name $1 -print; \
|
||||
done ; \
|
||||
find $(__srctree)security/selinux/include $(RCS_FIND_IGNORE) \
|
||||
-name $1 -print; \
|
||||
find $(__srctree)include $(RCS_FIND_IGNORE) \
|
||||
\( -name config -o -name 'asm-*' \) -prune \
|
||||
-o -name $1 -print; \
|
||||
for arch in $(ALLINCLUDE_ARCHS) ; do \
|
||||
test -e $(__srctree)include/asm-$${arch} && \
|
||||
find $(__srctree)include/asm-$${arch} $(RCS_FIND_IGNORE) \
|
||||
-name $1 -print; \
|
||||
test -e $(__srctree)arch/$${arch}/include/asm && \
|
||||
find $(__srctree)arch/$${arch}/include/asm $(RCS_FIND_IGNORE) \
|
||||
-name $1 -print; \
|
||||
done ; \
|
||||
find $(__srctree)include/asm-generic $(RCS_FIND_IGNORE) \
|
||||
-name $1 -print; \
|
||||
find $(__srctree) $(RCS_FIND_IGNORE) \
|
||||
\( -name include -o -name arch -o -name '.tmp_*' \) -prune -o \
|
||||
-name $1 -print; \
|
||||
)
|
||||
endef
|
||||
|
||||
define all-sources
|
||||
$(call find-sources,'*.[chS]')
|
||||
endef
|
||||
define all-kconfigs
|
||||
$(call find-sources,'Kconfig*')
|
||||
endef
|
||||
define all-defconfigs
|
||||
$(call find-sources,'defconfig')
|
||||
endef
|
||||
|
||||
define xtags
|
||||
if $1 --version 2>&1 | grep -iq exuberant; then \
|
||||
$(all-sources) | xargs $1 -a \
|
||||
-I __initdata,__exitdata,__acquires,__releases \
|
||||
-I __read_mostly,____cacheline_aligned,____cacheline_aligned_in_smp,____cacheline_internodealigned_in_smp \
|
||||
-I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \
|
||||
--extra=+f --c-kinds=+px \
|
||||
--regex-asm='/^ENTRY\(([^)]*)\).*/\1/'; \
|
||||
$(all-kconfigs) | xargs $1 -a \
|
||||
--langdef=kconfig \
|
||||
--language-force=kconfig \
|
||||
--regex-kconfig='/^[[:blank:]]*(menu|)config[[:blank:]]+([[:alnum:]_]+)/\2/'; \
|
||||
$(all-defconfigs) | xargs -r $1 -a \
|
||||
--langdef=dotconfig \
|
||||
--language-force=dotconfig \
|
||||
--regex-dotconfig='/^#?[[:blank:]]*(CONFIG_[[:alnum:]_]+)/\1/'; \
|
||||
elif $1 --version 2>&1 | grep -iq emacs; then \
|
||||
$(all-sources) | xargs $1 -a; \
|
||||
$(all-kconfigs) | xargs $1 -a \
|
||||
--regex='/^[ \t]*\(\(menu\)*config\)[ \t]+\([a-zA-Z0-9_]+\)/\3/'; \
|
||||
$(all-defconfigs) | xargs -r $1 -a \
|
||||
--regex='/^#?[ \t]?\(CONFIG_[a-zA-Z0-9_]+\)/\1/'; \
|
||||
else \
|
||||
$(all-sources) | xargs $1 -a; \
|
||||
fi
|
||||
endef
|
||||
|
||||
quiet_cmd_cscope-file = FILELST cscope.files
|
||||
cmd_cscope-file = (echo \-k; echo \-q; $(all-sources)) > cscope.files
|
||||
|
||||
quiet_cmd_cscope = MAKE cscope.out
|
||||
cmd_cscope = cscope -b -f cscope.out
|
||||
|
||||
cscope: FORCE
|
||||
$(call cmd,cscope-file)
|
||||
$(call cmd,cscope)
|
||||
|
||||
quiet_cmd_TAGS = MAKE $@
|
||||
define cmd_TAGS
|
||||
rm -f $@; \
|
||||
$(call xtags,etags)
|
||||
endef
|
||||
|
||||
TAGS: FORCE
|
||||
$(call cmd,TAGS)
|
||||
|
||||
quiet_cmd_tags = MAKE $@
|
||||
define cmd_tags
|
||||
rm -f $@; \
|
||||
$(call xtags,ctags)
|
||||
endef
|
||||
|
||||
tags: FORCE
|
||||
tags TAGS cscope: FORCE
|
||||
$(call cmd,tags)
|
||||
|
||||
|
||||
# Scripts to check various things for consistency
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
|
@ -1604,7 +1525,11 @@ endif
|
|||
$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
|
||||
|
||||
# Modules
|
||||
/ %/: prepare scripts FORCE
|
||||
/: prepare scripts FORCE
|
||||
$(cmd_crmodverdir)
|
||||
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
|
||||
$(build)=$(build-dir)
|
||||
%/: prepare scripts FORCE
|
||||
$(cmd_crmodverdir)
|
||||
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
|
||||
$(build)=$(build-dir)
|
||||
|
@ -1638,7 +1563,7 @@ cmd_crmodverdir = $(Q)mkdir -p $(MODVERDIR) \
|
|||
$(if $(KBUILD_MODULES),; rm -f $(MODVERDIR)/*)
|
||||
|
||||
a_flags = -Wp,-MD,$(depfile) $(KBUILD_AFLAGS) $(AFLAGS_KERNEL) \
|
||||
$(NOSTDINC_FLAGS) $(KBUILD_CPPFLAGS) \
|
||||
$(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(KBUILD_CPPFLAGS) \
|
||||
$(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(basetarget).o)
|
||||
|
||||
quiet_cmd_as_o_S = AS $@
|
||||
|
|
|
@ -19,15 +19,18 @@ void foo(void)
|
|||
BLANK();
|
||||
|
||||
DEFINE(TASK_BLOCKED, offsetof(struct task_struct, blocked));
|
||||
DEFINE(TASK_UID, offsetof(struct task_struct, uid));
|
||||
DEFINE(TASK_EUID, offsetof(struct task_struct, euid));
|
||||
DEFINE(TASK_GID, offsetof(struct task_struct, gid));
|
||||
DEFINE(TASK_EGID, offsetof(struct task_struct, egid));
|
||||
DEFINE(TASK_CRED, offsetof(struct task_struct, cred));
|
||||
DEFINE(TASK_REAL_PARENT, offsetof(struct task_struct, real_parent));
|
||||
DEFINE(TASK_GROUP_LEADER, offsetof(struct task_struct, group_leader));
|
||||
DEFINE(TASK_TGID, offsetof(struct task_struct, tgid));
|
||||
BLANK();
|
||||
|
||||
DEFINE(CRED_UID, offsetof(struct cred, uid));
|
||||
DEFINE(CRED_EUID, offsetof(struct cred, euid));
|
||||
DEFINE(CRED_GID, offsetof(struct cred, gid));
|
||||
DEFINE(CRED_EGID, offsetof(struct cred, egid));
|
||||
BLANK();
|
||||
|
||||
DEFINE(SIZEOF_PT_REGS, sizeof(struct pt_regs));
|
||||
DEFINE(PT_PTRACED, PT_PTRACED);
|
||||
DEFINE(CLONE_VM, CLONE_VM);
|
||||
|
|
|
@ -850,8 +850,9 @@ osf_getpriority:
|
|||
sys_getxuid:
|
||||
.prologue 0
|
||||
ldq $2, TI_TASK($8)
|
||||
ldl $0, TASK_UID($2)
|
||||
ldl $1, TASK_EUID($2)
|
||||
ldq $3, TASK_CRED($2)
|
||||
ldl $0, CRED_UID($3)
|
||||
ldl $1, CRED_EUID($3)
|
||||
stq $1, 80($sp)
|
||||
ret
|
||||
.end sys_getxuid
|
||||
|
@ -862,8 +863,9 @@ sys_getxuid:
|
|||
sys_getxgid:
|
||||
.prologue 0
|
||||
ldq $2, TI_TASK($8)
|
||||
ldl $0, TASK_GID($2)
|
||||
ldl $1, TASK_EGID($2)
|
||||
ldq $3, TASK_CRED($2)
|
||||
ldl $0, CRED_GID($3)
|
||||
ldl $1, CRED_EGID($3)
|
||||
stq $1, 80($sp)
|
||||
ret
|
||||
.end sys_getxgid
|
||||
|
|
|
@ -630,7 +630,7 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq)
|
|||
return -ENOMEM;
|
||||
|
||||
sachip->clk = clk_get(me, "SA1111_CLK");
|
||||
if (!sachip->clk) {
|
||||
if (IS_ERR(sachip->clk)) {
|
||||
ret = PTR_ERR(sachip->clk);
|
||||
goto err_free;
|
||||
}
|
||||
|
|
|
@ -115,6 +115,8 @@ EXPORT_SYMBOL(__strnlen_user);
|
|||
EXPORT_SYMBOL(__strncpy_from_user);
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
EXPORT_SYMBOL(copy_page);
|
||||
|
||||
EXPORT_SYMBOL(__copy_from_user);
|
||||
EXPORT_SYMBOL(__copy_to_user);
|
||||
EXPORT_SYMBOL(__clear_user);
|
||||
|
@ -181,8 +183,6 @@ EXPORT_SYMBOL(_find_first_bit_be);
|
|||
EXPORT_SYMBOL(_find_next_bit_be);
|
||||
#endif
|
||||
|
||||
EXPORT_SYMBOL(copy_page);
|
||||
|
||||
#ifdef CONFIG_FUNCTION_TRACER
|
||||
EXPORT_SYMBOL(mcount);
|
||||
#endif
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include <linux/personality.h>
|
||||
#include <linux/kallsyms.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/hardirq.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/uaccess.h>
|
||||
|
||||
|
|
|
@ -177,7 +177,6 @@ static irqreturn_t fsg_reset_handler(int irq, void *dev_id)
|
|||
|
||||
static void __init fsg_init(void)
|
||||
{
|
||||
DECLARE_MAC_BUF(mac_buf);
|
||||
uint8_t __iomem *f;
|
||||
|
||||
ixp4xx_sys_init();
|
||||
|
@ -256,10 +255,10 @@ static void __init fsg_init(void)
|
|||
#endif
|
||||
iounmap(f);
|
||||
}
|
||||
printk(KERN_INFO "FSG: Using MAC address %s for port 0\n",
|
||||
print_mac(mac_buf, fsg_plat_eth[0].hwaddr));
|
||||
printk(KERN_INFO "FSG: Using MAC address %s for port 1\n",
|
||||
print_mac(mac_buf, fsg_plat_eth[1].hwaddr));
|
||||
printk(KERN_INFO "FSG: Using MAC address %pM for port 0\n",
|
||||
fsg_plat_eth[0].hwaddr);
|
||||
printk(KERN_INFO "FSG: Using MAC address %pM for port 1\n",
|
||||
fsg_plat_eth[1].hwaddr);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
#include <linux/io.h>
|
||||
#include <linux/kernel.h>
|
||||
|
||||
#define DEBUG_QMGR 0
|
||||
|
||||
#define HALF_QUEUES 32
|
||||
#define QUEUES 64 /* only 32 lower queues currently supported */
|
||||
#define MAX_QUEUE_LENGTH 4 /* in dwords */
|
||||
|
@ -61,22 +63,51 @@ void qmgr_enable_irq(unsigned int queue);
|
|||
void qmgr_disable_irq(unsigned int queue);
|
||||
|
||||
/* request_ and release_queue() must be called from non-IRQ context */
|
||||
|
||||
#if DEBUG_QMGR
|
||||
extern char qmgr_queue_descs[QUEUES][32];
|
||||
|
||||
int qmgr_request_queue(unsigned int queue, unsigned int len /* dwords */,
|
||||
unsigned int nearly_empty_watermark,
|
||||
unsigned int nearly_full_watermark);
|
||||
unsigned int nearly_full_watermark,
|
||||
const char *desc_format, const char* name);
|
||||
#else
|
||||
int __qmgr_request_queue(unsigned int queue, unsigned int len /* dwords */,
|
||||
unsigned int nearly_empty_watermark,
|
||||
unsigned int nearly_full_watermark);
|
||||
#define qmgr_request_queue(queue, len, nearly_empty_watermark, \
|
||||
nearly_full_watermark, desc_format, name) \
|
||||
__qmgr_request_queue(queue, len, nearly_empty_watermark, \
|
||||
nearly_full_watermark)
|
||||
#endif
|
||||
|
||||
void qmgr_release_queue(unsigned int queue);
|
||||
|
||||
|
||||
static inline void qmgr_put_entry(unsigned int queue, u32 val)
|
||||
{
|
||||
extern struct qmgr_regs __iomem *qmgr_regs;
|
||||
#if DEBUG_QMGR
|
||||
BUG_ON(!qmgr_queue_descs[queue]); /* not yet requested */
|
||||
|
||||
printk(KERN_DEBUG "Queue %s(%i) put %X\n",
|
||||
qmgr_queue_descs[queue], queue, val);
|
||||
#endif
|
||||
__raw_writel(val, &qmgr_regs->acc[queue][0]);
|
||||
}
|
||||
|
||||
static inline u32 qmgr_get_entry(unsigned int queue)
|
||||
{
|
||||
u32 val;
|
||||
extern struct qmgr_regs __iomem *qmgr_regs;
|
||||
return __raw_readl(&qmgr_regs->acc[queue][0]);
|
||||
val = __raw_readl(&qmgr_regs->acc[queue][0]);
|
||||
#if DEBUG_QMGR
|
||||
BUG_ON(!qmgr_queue_descs[queue]); /* not yet requested */
|
||||
|
||||
printk(KERN_DEBUG "Queue %s(%i) get %X\n",
|
||||
qmgr_queue_descs[queue], queue, val);
|
||||
#endif
|
||||
return val;
|
||||
}
|
||||
|
||||
static inline int qmgr_get_stat1(unsigned int queue)
|
||||
|
|
|
@ -14,8 +14,6 @@
|
|||
#include <linux/module.h>
|
||||
#include <mach/qmgr.h>
|
||||
|
||||
#define DEBUG 0
|
||||
|
||||
struct qmgr_regs __iomem *qmgr_regs;
|
||||
static struct resource *mem_res;
|
||||
static spinlock_t qmgr_lock;
|
||||
|
@ -23,6 +21,10 @@ static u32 used_sram_bitmap[4]; /* 128 16-dword pages */
|
|||
static void (*irq_handlers[HALF_QUEUES])(void *pdev);
|
||||
static void *irq_pdevs[HALF_QUEUES];
|
||||
|
||||
#if DEBUG_QMGR
|
||||
char qmgr_queue_descs[QUEUES][32];
|
||||
#endif
|
||||
|
||||
void qmgr_set_irq(unsigned int queue, int src,
|
||||
void (*handler)(void *pdev), void *pdev)
|
||||
{
|
||||
|
@ -70,6 +72,7 @@ void qmgr_disable_irq(unsigned int queue)
|
|||
spin_lock_irqsave(&qmgr_lock, flags);
|
||||
__raw_writel(__raw_readl(&qmgr_regs->irqen[0]) & ~(1 << queue),
|
||||
&qmgr_regs->irqen[0]);
|
||||
__raw_writel(1 << queue, &qmgr_regs->irqstat[0]); /* clear */
|
||||
spin_unlock_irqrestore(&qmgr_lock, flags);
|
||||
}
|
||||
|
||||
|
@ -81,9 +84,16 @@ static inline void shift_mask(u32 *mask)
|
|||
mask[0] <<= 1;
|
||||
}
|
||||
|
||||
#if DEBUG_QMGR
|
||||
int qmgr_request_queue(unsigned int queue, unsigned int len /* dwords */,
|
||||
unsigned int nearly_empty_watermark,
|
||||
unsigned int nearly_full_watermark)
|
||||
unsigned int nearly_full_watermark,
|
||||
const char *desc_format, const char* name)
|
||||
#else
|
||||
int __qmgr_request_queue(unsigned int queue, unsigned int len /* dwords */,
|
||||
unsigned int nearly_empty_watermark,
|
||||
unsigned int nearly_full_watermark)
|
||||
#endif
|
||||
{
|
||||
u32 cfg, addr = 0, mask[4]; /* in 16-dwords */
|
||||
int err;
|
||||
|
@ -151,12 +161,13 @@ int qmgr_request_queue(unsigned int queue, unsigned int len /* dwords */,
|
|||
used_sram_bitmap[2] |= mask[2];
|
||||
used_sram_bitmap[3] |= mask[3];
|
||||
__raw_writel(cfg | (addr << 14), &qmgr_regs->sram[queue]);
|
||||
spin_unlock_irq(&qmgr_lock);
|
||||
|
||||
#if DEBUG
|
||||
printk(KERN_DEBUG "qmgr: requested queue %i, addr = 0x%02X\n",
|
||||
queue, addr);
|
||||
#if DEBUG_QMGR
|
||||
snprintf(qmgr_queue_descs[queue], sizeof(qmgr_queue_descs[0]),
|
||||
desc_format, name);
|
||||
printk(KERN_DEBUG "qmgr: requested queue %s(%i) addr = 0x%02X\n",
|
||||
qmgr_queue_descs[queue], queue, addr);
|
||||
#endif
|
||||
spin_unlock_irq(&qmgr_lock);
|
||||
return 0;
|
||||
|
||||
err:
|
||||
|
@ -189,6 +200,11 @@ void qmgr_release_queue(unsigned int queue)
|
|||
while (addr--)
|
||||
shift_mask(mask);
|
||||
|
||||
#if DEBUG_QMGR
|
||||
printk(KERN_DEBUG "qmgr: releasing queue %s(%i)\n",
|
||||
qmgr_queue_descs[queue], queue);
|
||||
qmgr_queue_descs[queue][0] = '\x0';
|
||||
#endif
|
||||
__raw_writel(0, &qmgr_regs->sram[queue]);
|
||||
|
||||
used_sram_bitmap[0] &= ~mask[0];
|
||||
|
@ -199,9 +215,10 @@ void qmgr_release_queue(unsigned int queue)
|
|||
spin_unlock_irq(&qmgr_lock);
|
||||
|
||||
module_put(THIS_MODULE);
|
||||
#if DEBUG
|
||||
printk(KERN_DEBUG "qmgr: released queue %i\n", queue);
|
||||
#endif
|
||||
|
||||
while ((addr = qmgr_get_entry(queue)))
|
||||
printk(KERN_ERR "qmgr: released queue %i not empty: 0x%08X\n",
|
||||
queue, addr);
|
||||
}
|
||||
|
||||
static int qmgr_init(void)
|
||||
|
@ -272,5 +289,10 @@ EXPORT_SYMBOL(qmgr_regs);
|
|||
EXPORT_SYMBOL(qmgr_set_irq);
|
||||
EXPORT_SYMBOL(qmgr_enable_irq);
|
||||
EXPORT_SYMBOL(qmgr_disable_irq);
|
||||
#if DEBUG_QMGR
|
||||
EXPORT_SYMBOL(qmgr_queue_descs);
|
||||
EXPORT_SYMBOL(qmgr_request_queue);
|
||||
#else
|
||||
EXPORT_SYMBOL(__qmgr_request_queue);
|
||||
#endif
|
||||
EXPORT_SYMBOL(qmgr_release_queue);
|
||||
|
|
|
@ -231,7 +231,6 @@ static irqreturn_t nas100d_reset_handler(int irq, void *dev_id)
|
|||
|
||||
static void __init nas100d_init(void)
|
||||
{
|
||||
DECLARE_MAC_BUF(mac_buf);
|
||||
uint8_t __iomem *f;
|
||||
int i;
|
||||
|
||||
|
@ -294,8 +293,8 @@ static void __init nas100d_init(void)
|
|||
#endif
|
||||
iounmap(f);
|
||||
}
|
||||
printk(KERN_INFO "NAS100D: Using MAC address %s for port 0\n",
|
||||
print_mac(mac_buf, nas100d_plat_eth[0].hwaddr));
|
||||
printk(KERN_INFO "NAS100D: Using MAC address %pM for port 0\n",
|
||||
nas100d_plat_eth[0].hwaddr);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -220,7 +220,6 @@ static struct sys_timer nslu2_timer = {
|
|||
|
||||
static void __init nslu2_init(void)
|
||||
{
|
||||
DECLARE_MAC_BUF(mac_buf);
|
||||
uint8_t __iomem *f;
|
||||
int i;
|
||||
|
||||
|
@ -275,8 +274,8 @@ static void __init nslu2_init(void)
|
|||
#endif
|
||||
iounmap(f);
|
||||
}
|
||||
printk(KERN_INFO "NSLU2: Using MAC address %s for port 0\n",
|
||||
print_mac(mac_buf, nslu2_plat_eth[0].hwaddr));
|
||||
printk(KERN_INFO "NSLU2: Using MAC address %pM for port 0\n",
|
||||
nslu2_plat_eth[0].hwaddr);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
#ifndef _INCLUDE_PALMASOC_H_
|
||||
#define _INCLUDE_PALMASOC_H_
|
||||
struct palm27x_asoc_info {
|
||||
int jack_gpio;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_SND_PXA2XX_SOC_PALM27X
|
||||
void __init palm27x_asoc_set_pdata(struct palm27x_asoc_info *data);
|
||||
#else
|
||||
static inline void palm27x_asoc_set_pdata(struct palm27x_asoc_info *data) {}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -12,9 +12,8 @@ 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
|
||||
* @gpio: gpio nr
|
||||
* @output: set gpio as out/low instead of input during normal work
|
||||
*/
|
||||
extern int init_gpio_reset(int gpio, int output);
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include <linux/module.h>
|
||||
#include <linux/signal.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/hardirq.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/kprobes.h>
|
||||
#include <linux/uaccess.h>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/mtd/physmap.h>
|
||||
|
||||
#include <asm/arch/smc.h>
|
||||
#include <mach/smc.h>
|
||||
|
||||
static struct smc_timing flash_timing __initdata = {
|
||||
.ncs_read_setup = 0,
|
||||
|
|
|
@ -25,10 +25,10 @@
|
|||
|
||||
#include <asm/setup.h>
|
||||
|
||||
#include <asm/arch/at32ap700x.h>
|
||||
#include <asm/arch/init.h>
|
||||
#include <asm/arch/board.h>
|
||||
#include <asm/arch/portmux.h>
|
||||
#include <mach/at32ap700x.h>
|
||||
#include <mach/init.h>
|
||||
#include <mach/board.h>
|
||||
#include <mach/portmux.h>
|
||||
|
||||
/* Oscillator frequencies. These are board-specific */
|
||||
unsigned long at32_board_osc_rates[3] = {
|
||||
|
|
|
@ -10,7 +10,7 @@ MKIMAGE := $(srctree)/scripts/mkuboot.sh
|
|||
|
||||
extra-y := vmlinux.bin vmlinux.gz
|
||||
|
||||
OBJCOPYFLAGS_vmlinux.bin := -O binary
|
||||
OBJCOPYFLAGS_vmlinux.bin := -O binary -R .note.gnu.build-id
|
||||
$(obj)/vmlinux.bin: vmlinux FORCE
|
||||
$(call if_changed,objcopy)
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Linux kernel version: 2.6.27-rc1
|
||||
# Tue Aug 5 15:40:26 2008
|
||||
# Linux kernel version: 2.6.28-rc8
|
||||
# Thu Dec 18 11:22:23 2008
|
||||
#
|
||||
CONFIG_AVR32=y
|
||||
CONFIG_GENERIC_GPIO=y
|
||||
|
@ -67,6 +67,7 @@ CONFIG_SIGNALFD=y
|
|||
CONFIG_TIMERFD=y
|
||||
CONFIG_EVENTFD=y
|
||||
CONFIG_SHMEM=y
|
||||
CONFIG_AIO=y
|
||||
CONFIG_VM_EVENT_COUNTERS=y
|
||||
CONFIG_SLUB_DEBUG=y
|
||||
# CONFIG_SLAB is not set
|
||||
|
@ -77,15 +78,8 @@ CONFIG_PROFILING=y
|
|||
CONFIG_OPROFILE=m
|
||||
CONFIG_HAVE_OPROFILE=y
|
||||
CONFIG_KPROBES=y
|
||||
# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
|
||||
# CONFIG_HAVE_IOREMAP_PROT is not set
|
||||
CONFIG_HAVE_KPROBES=y
|
||||
# CONFIG_HAVE_KRETPROBES is not set
|
||||
# CONFIG_HAVE_ARCH_TRACEHOOK is not set
|
||||
# CONFIG_HAVE_DMA_ATTRS is not set
|
||||
# CONFIG_USE_GENERIC_SMP_HELPERS is not set
|
||||
CONFIG_HAVE_CLK=y
|
||||
CONFIG_PROC_PAGE_MONITOR=y
|
||||
# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
|
||||
CONFIG_SLABINFO=y
|
||||
CONFIG_RT_MUTEXES=y
|
||||
|
@ -118,6 +112,7 @@ CONFIG_DEFAULT_CFQ=y
|
|||
# CONFIG_DEFAULT_NOOP is not set
|
||||
CONFIG_DEFAULT_IOSCHED="cfq"
|
||||
CONFIG_CLASSIC_RCU=y
|
||||
CONFIG_FREEZER=y
|
||||
|
||||
#
|
||||
# System Type and features
|
||||
|
@ -134,6 +129,8 @@ CONFIG_CPU_AT32AP700X=y
|
|||
CONFIG_CPU_AT32AP7000=y
|
||||
CONFIG_BOARD_ATSTK1000=y
|
||||
# CONFIG_BOARD_ATNGW100 is not set
|
||||
# CONFIG_BOARD_FAVR_32 is not set
|
||||
# CONFIG_BOARD_MIMC200 is not set
|
||||
# CONFIG_BOARD_ATSTK1002 is not set
|
||||
# CONFIG_BOARD_ATSTK1003 is not set
|
||||
# CONFIG_BOARD_ATSTK1004 is not set
|
||||
|
@ -171,14 +168,14 @@ CONFIG_FLATMEM_MANUAL=y
|
|||
# CONFIG_SPARSEMEM_MANUAL is not set
|
||||
CONFIG_FLATMEM=y
|
||||
CONFIG_FLAT_NODE_MEM_MAP=y
|
||||
# CONFIG_SPARSEMEM_STATIC is not set
|
||||
# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
|
||||
CONFIG_PAGEFLAGS_EXTENDED=y
|
||||
CONFIG_SPLIT_PTLOCK_CPUS=4
|
||||
# CONFIG_RESOURCES_64BIT is not set
|
||||
# CONFIG_PHYS_ADDR_T_64BIT is not set
|
||||
CONFIG_ZONE_DMA_FLAG=0
|
||||
CONFIG_NR_QUICK=2
|
||||
CONFIG_VIRT_TO_BUS=y
|
||||
CONFIG_UNEVICTABLE_LRU=y
|
||||
# CONFIG_OWNERSHIP_TRACE is not set
|
||||
CONFIG_NMI_DEBUGGING=y
|
||||
# CONFIG_HZ_100 is not set
|
||||
|
@ -186,7 +183,7 @@ CONFIG_HZ_250=y
|
|||
# CONFIG_HZ_300 is not set
|
||||
# CONFIG_HZ_1000 is not set
|
||||
CONFIG_HZ=250
|
||||
# CONFIG_SCHED_HRTICK is not set
|
||||
CONFIG_SCHED_HRTICK=y
|
||||
CONFIG_CMDLINE=""
|
||||
|
||||
#
|
||||
|
@ -228,6 +225,8 @@ CONFIG_CPU_FREQ_AT32AP=y
|
|||
# Executable file formats
|
||||
#
|
||||
CONFIG_BINFMT_ELF=y
|
||||
CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y
|
||||
# CONFIG_HAVE_AOUT is not set
|
||||
# CONFIG_BINFMT_MISC is not set
|
||||
CONFIG_NET=y
|
||||
|
||||
|
@ -299,6 +298,7 @@ CONFIG_IPV6_TUNNEL=m
|
|||
# CONFIG_ATM is not set
|
||||
CONFIG_STP=m
|
||||
CONFIG_BRIDGE=m
|
||||
# CONFIG_NET_DSA is not set
|
||||
# CONFIG_VLAN_8021Q is not set
|
||||
# CONFIG_DECNET is not set
|
||||
CONFIG_LLC=m
|
||||
|
@ -321,14 +321,8 @@ CONFIG_LLC=m
|
|||
# CONFIG_IRDA is not set
|
||||
# CONFIG_BT is not set
|
||||
# CONFIG_AF_RXRPC is not set
|
||||
|
||||
#
|
||||
# Wireless
|
||||
#
|
||||
# CONFIG_CFG80211 is not set
|
||||
# CONFIG_WIRELESS_EXT is not set
|
||||
# CONFIG_MAC80211 is not set
|
||||
# CONFIG_IEEE80211 is not set
|
||||
# CONFIG_PHONET is not set
|
||||
# CONFIG_WIRELESS is not set
|
||||
# CONFIG_RFKILL is not set
|
||||
# CONFIG_NET_9P is not set
|
||||
|
||||
|
@ -359,6 +353,7 @@ CONFIG_MTD_CMDLINE_PARTS=y
|
|||
# User Modules And Translation Layers
|
||||
#
|
||||
CONFIG_MTD_CHAR=y
|
||||
CONFIG_HAVE_MTD_OTP=y
|
||||
CONFIG_MTD_BLKDEVS=y
|
||||
CONFIG_MTD_BLOCK=y
|
||||
# CONFIG_FTL is not set
|
||||
|
@ -407,6 +402,8 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
|
|||
# Self-contained MTD device drivers
|
||||
#
|
||||
CONFIG_MTD_DATAFLASH=m
|
||||
# CONFIG_MTD_DATAFLASH_WRITE_VERIFY is not set
|
||||
CONFIG_MTD_DATAFLASH_OTP=y
|
||||
CONFIG_MTD_M25P80=m
|
||||
CONFIG_M25PXX_USE_FAST_READ=y
|
||||
# CONFIG_MTD_SLRAM is not set
|
||||
|
@ -464,9 +461,10 @@ CONFIG_ATMEL_TCLIB=y
|
|||
CONFIG_ATMEL_TCB_CLKSRC=y
|
||||
CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0
|
||||
# CONFIG_EEPROM_93CX6 is not set
|
||||
# CONFIG_ICS932S401 is not set
|
||||
CONFIG_ATMEL_SSC=m
|
||||
# CONFIG_ENCLOSURE_SERVICES is not set
|
||||
# CONFIG_HAVE_IDE is not set
|
||||
# CONFIG_C2PORT is not set
|
||||
|
||||
#
|
||||
# SCSI device support
|
||||
|
@ -548,6 +546,9 @@ CONFIG_MACB=y
|
|||
# CONFIG_IBM_NEW_EMAC_RGMII is not set
|
||||
# CONFIG_IBM_NEW_EMAC_TAH is not set
|
||||
# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
|
||||
# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
|
||||
# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
|
||||
# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
|
||||
# CONFIG_B44 is not set
|
||||
# CONFIG_NETDEV_1000 is not set
|
||||
# CONFIG_NETDEV_10000 is not set
|
||||
|
@ -653,6 +654,7 @@ CONFIG_UNIX98_PTYS=y
|
|||
CONFIG_I2C=m
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
CONFIG_I2C_CHARDEV=m
|
||||
CONFIG_I2C_HELPER_AUTO=y
|
||||
CONFIG_I2C_ALGOBIT=m
|
||||
|
||||
#
|
||||
|
@ -716,6 +718,10 @@ CONFIG_GPIOLIB=y
|
|||
# CONFIG_DEBUG_GPIO is not set
|
||||
CONFIG_GPIO_SYSFS=y
|
||||
|
||||
#
|
||||
# Memory mapped GPIO expanders:
|
||||
#
|
||||
|
||||
#
|
||||
# I2C GPIO expanders:
|
||||
#
|
||||
|
@ -745,11 +751,11 @@ CONFIG_WATCHDOG=y
|
|||
#
|
||||
# CONFIG_SOFT_WATCHDOG is not set
|
||||
CONFIG_AT32AP700X_WDT=y
|
||||
CONFIG_SSB_POSSIBLE=y
|
||||
|
||||
#
|
||||
# Sonics Silicon Backplane
|
||||
#
|
||||
CONFIG_SSB_POSSIBLE=y
|
||||
# CONFIG_SSB is not set
|
||||
|
||||
#
|
||||
|
@ -758,6 +764,10 @@ CONFIG_SSB_POSSIBLE=y
|
|||
# CONFIG_MFD_CORE is not set
|
||||
# CONFIG_MFD_SM501 is not set
|
||||
# CONFIG_HTC_PASIC3 is not set
|
||||
# CONFIG_MFD_TMIO is not set
|
||||
# CONFIG_MFD_WM8400 is not set
|
||||
# CONFIG_MFD_WM8350_I2C is not set
|
||||
# CONFIG_REGULATOR is not set
|
||||
|
||||
#
|
||||
# Multimedia devices
|
||||
|
@ -783,6 +793,7 @@ CONFIG_SSB_POSSIBLE=y
|
|||
CONFIG_FB=y
|
||||
# CONFIG_FIRMWARE_EDID is not set
|
||||
# CONFIG_FB_DDC is not set
|
||||
# CONFIG_FB_BOOT_VESA_SUPPORT is not set
|
||||
CONFIG_FB_CFB_FILLRECT=y
|
||||
CONFIG_FB_CFB_COPYAREA=y
|
||||
CONFIG_FB_CFB_IMAGEBLIT=y
|
||||
|
@ -804,10 +815,13 @@ CONFIG_FB_CFB_IMAGEBLIT=y
|
|||
# CONFIG_FB_S1D13XXX is not set
|
||||
CONFIG_FB_ATMEL=y
|
||||
# CONFIG_FB_VIRTUAL is not set
|
||||
# CONFIG_FB_METRONOME is not set
|
||||
# CONFIG_FB_MB862XX is not set
|
||||
CONFIG_BACKLIGHT_LCD_SUPPORT=y
|
||||
CONFIG_LCD_CLASS_DEVICE=y
|
||||
CONFIG_LCD_LTV350QV=y
|
||||
# CONFIG_LCD_ILI9320 is not set
|
||||
# CONFIG_LCD_TDO24M is not set
|
||||
# CONFIG_LCD_VGG2432A4 is not set
|
||||
# CONFIG_LCD_PLATFORM is not set
|
||||
# CONFIG_BACKLIGHT_CLASS_DEVICE is not set
|
||||
|
@ -818,6 +832,7 @@ CONFIG_LCD_LTV350QV=y
|
|||
# CONFIG_DISPLAY_SUPPORT is not set
|
||||
# CONFIG_LOGO is not set
|
||||
CONFIG_SOUND=m
|
||||
CONFIG_SOUND_OSS_CORE=y
|
||||
CONFIG_SND=m
|
||||
CONFIG_SND_TIMER=m
|
||||
CONFIG_SND_PCM=m
|
||||
|
@ -848,28 +863,32 @@ CONFIG_USB_SUPPORT=y
|
|||
# CONFIG_USB_ARCH_HAS_EHCI is not set
|
||||
# CONFIG_USB_OTG_WHITELIST is not set
|
||||
# CONFIG_USB_OTG_BLACKLIST_HUB is not set
|
||||
# CONFIG_USB_MUSB_HDRC is not set
|
||||
# CONFIG_USB_GADGET_MUSB_HDRC is not set
|
||||
|
||||
#
|
||||
# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
|
||||
# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
|
||||
#
|
||||
CONFIG_USB_GADGET=y
|
||||
# CONFIG_USB_GADGET_DEBUG is not set
|
||||
# CONFIG_USB_GADGET_DEBUG_FILES is not set
|
||||
# CONFIG_USB_GADGET_DEBUG_FS is not set
|
||||
CONFIG_USB_GADGET_VBUS_DRAW=2
|
||||
CONFIG_USB_GADGET_SELECTED=y
|
||||
# CONFIG_USB_GADGET_AMD5536UDC is not set
|
||||
# CONFIG_USB_GADGET_AT91 is not set
|
||||
CONFIG_USB_GADGET_ATMEL_USBA=y
|
||||
CONFIG_USB_ATMEL_USBA=y
|
||||
# CONFIG_USB_GADGET_FSL_USB2 is not set
|
||||
# CONFIG_USB_GADGET_NET2280 is not set
|
||||
# CONFIG_USB_GADGET_PXA25X is not set
|
||||
# CONFIG_USB_GADGET_M66592 is not set
|
||||
# CONFIG_USB_GADGET_PXA27X is not set
|
||||
# CONFIG_USB_GADGET_GOKU is not set
|
||||
# CONFIG_USB_GADGET_LH7A40X is not set
|
||||
# CONFIG_USB_GADGET_OMAP is not set
|
||||
# CONFIG_USB_GADGET_PXA25X is not set
|
||||
# CONFIG_USB_GADGET_PXA27X is not set
|
||||
# CONFIG_USB_GADGET_S3C2410 is not set
|
||||
# CONFIG_USB_GADGET_AT91 is not set
|
||||
# CONFIG_USB_GADGET_M66592 is not set
|
||||
# CONFIG_USB_GADGET_AMD5536UDC is not set
|
||||
# CONFIG_USB_GADGET_FSL_QE is not set
|
||||
# CONFIG_USB_GADGET_NET2280 is not set
|
||||
# CONFIG_USB_GADGET_GOKU is not set
|
||||
# CONFIG_USB_GADGET_DUMMY_HCD is not set
|
||||
CONFIG_USB_GADGET_DUALSPEED=y
|
||||
CONFIG_USB_ZERO=m
|
||||
|
@ -887,7 +906,7 @@ CONFIG_MMC=y
|
|||
# CONFIG_MMC_UNSAFE_RESUME is not set
|
||||
|
||||
#
|
||||
# MMC/SD Card Drivers
|
||||
# MMC/SD/SDIO Card Drivers
|
||||
#
|
||||
CONFIG_MMC_BLOCK=y
|
||||
CONFIG_MMC_BLOCK_BOUNCE=y
|
||||
|
@ -895,10 +914,11 @@ CONFIG_MMC_BLOCK_BOUNCE=y
|
|||
# CONFIG_MMC_TEST is not set
|
||||
|
||||
#
|
||||
# MMC/SD Host Controller Drivers
|
||||
# MMC/SD/SDIO Host Controller Drivers
|
||||
#
|
||||
# CONFIG_MMC_SDHCI is not set
|
||||
CONFIG_MMC_ATMELMCI=y
|
||||
# CONFIG_MMC_ATMELMCI_DMA is not set
|
||||
CONFIG_MMC_SPI=m
|
||||
# CONFIG_MEMSTICK is not set
|
||||
CONFIG_NEW_LEDS=y
|
||||
|
@ -918,6 +938,7 @@ CONFIG_LEDS_GPIO=m
|
|||
CONFIG_LEDS_TRIGGERS=y
|
||||
CONFIG_LEDS_TRIGGER_TIMER=m
|
||||
CONFIG_LEDS_TRIGGER_HEARTBEAT=m
|
||||
# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
|
||||
CONFIG_LEDS_TRIGGER_DEFAULT_ON=m
|
||||
# CONFIG_ACCESSIBILITY is not set
|
||||
CONFIG_RTC_LIB=y
|
||||
|
@ -950,25 +971,31 @@ CONFIG_RTC_INTF_DEV=y
|
|||
# CONFIG_RTC_DRV_M41T80 is not set
|
||||
# CONFIG_RTC_DRV_S35390A is not set
|
||||
# CONFIG_RTC_DRV_FM3130 is not set
|
||||
# CONFIG_RTC_DRV_RX8581 is not set
|
||||
|
||||
#
|
||||
# SPI RTC drivers
|
||||
#
|
||||
# CONFIG_RTC_DRV_M41T94 is not set
|
||||
# CONFIG_RTC_DRV_DS1305 is not set
|
||||
# CONFIG_RTC_DRV_DS1390 is not set
|
||||
# CONFIG_RTC_DRV_MAX6902 is not set
|
||||
# CONFIG_RTC_DRV_R9701 is not set
|
||||
# CONFIG_RTC_DRV_RS5C348 is not set
|
||||
# CONFIG_RTC_DRV_DS3234 is not set
|
||||
|
||||
#
|
||||
# Platform RTC drivers
|
||||
#
|
||||
# CONFIG_RTC_DRV_DS1286 is not set
|
||||
# CONFIG_RTC_DRV_DS1511 is not set
|
||||
# CONFIG_RTC_DRV_DS1553 is not set
|
||||
# CONFIG_RTC_DRV_DS1742 is not set
|
||||
# CONFIG_RTC_DRV_STK17TA8 is not set
|
||||
# CONFIG_RTC_DRV_M48T86 is not set
|
||||
# CONFIG_RTC_DRV_M48T35 is not set
|
||||
# CONFIG_RTC_DRV_M48T59 is not set
|
||||
# CONFIG_RTC_DRV_BQ4802 is not set
|
||||
# CONFIG_RTC_DRV_V3020 is not set
|
||||
|
||||
#
|
||||
|
@ -989,6 +1016,8 @@ CONFIG_DMA_ENGINE=y
|
|||
# CONFIG_NET_DMA is not set
|
||||
CONFIG_DMATEST=m
|
||||
# CONFIG_UIO is not set
|
||||
# CONFIG_STAGING is not set
|
||||
CONFIG_STAGING_EXCLUDE_BUILD=y
|
||||
|
||||
#
|
||||
# File systems
|
||||
|
@ -998,12 +1027,17 @@ CONFIG_EXT2_FS=m
|
|||
# CONFIG_EXT2_FS_XIP is not set
|
||||
CONFIG_EXT3_FS=m
|
||||
# CONFIG_EXT3_FS_XATTR is not set
|
||||
# CONFIG_EXT4DEV_FS is not set
|
||||
CONFIG_EXT4_FS=m
|
||||
CONFIG_EXT4DEV_COMPAT=y
|
||||
# CONFIG_EXT4_FS_XATTR is not set
|
||||
CONFIG_JBD=m
|
||||
# CONFIG_JBD_DEBUG is not set
|
||||
CONFIG_JBD2=m
|
||||
# CONFIG_JBD2_DEBUG is not set
|
||||
# CONFIG_REISERFS_FS is not set
|
||||
# CONFIG_JFS_FS is not set
|
||||
# CONFIG_FS_POSIX_ACL is not set
|
||||
CONFIG_FILE_LOCKING=y
|
||||
# CONFIG_XFS_FS is not set
|
||||
# CONFIG_OCFS2_FS is not set
|
||||
# CONFIG_DNOTIFY is not set
|
||||
|
@ -1036,6 +1070,7 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
|
|||
CONFIG_PROC_FS=y
|
||||
CONFIG_PROC_KCORE=y
|
||||
CONFIG_PROC_SYSCTL=y
|
||||
CONFIG_PROC_PAGE_MONITOR=y
|
||||
CONFIG_SYSFS=y
|
||||
CONFIG_TMPFS=y
|
||||
# CONFIG_TMPFS_POSIX_ACL is not set
|
||||
|
@ -1054,7 +1089,8 @@ CONFIG_TMPFS=y
|
|||
# CONFIG_EFS_FS is not set
|
||||
CONFIG_JFFS2_FS=y
|
||||
CONFIG_JFFS2_FS_DEBUG=0
|
||||
# CONFIG_JFFS2_FS_WRITEBUFFER is not set
|
||||
CONFIG_JFFS2_FS_WRITEBUFFER=y
|
||||
# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
|
||||
# CONFIG_JFFS2_SUMMARY is not set
|
||||
# CONFIG_JFFS2_FS_XATTR is not set
|
||||
# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
|
||||
|
@ -1088,6 +1124,7 @@ CONFIG_LOCKD=y
|
|||
CONFIG_LOCKD_V4=y
|
||||
CONFIG_NFS_COMMON=y
|
||||
CONFIG_SUNRPC=y
|
||||
# CONFIG_SUNRPC_REGISTER_V4 is not set
|
||||
# CONFIG_RPCSEC_GSS_KRB5 is not set
|
||||
# CONFIG_RPCSEC_GSS_SPKM3 is not set
|
||||
# CONFIG_SMB_FS is not set
|
||||
|
@ -1185,10 +1222,21 @@ CONFIG_DEBUG_BUGVERBOSE=y
|
|||
CONFIG_FRAME_POINTER=y
|
||||
# CONFIG_BOOT_PRINTK_DELAY is not set
|
||||
# CONFIG_RCU_TORTURE_TEST is not set
|
||||
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
|
||||
# CONFIG_KPROBES_SANITY_TEST is not set
|
||||
# CONFIG_BACKTRACE_SELF_TEST is not set
|
||||
# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
|
||||
# CONFIG_LKDTM is not set
|
||||
# CONFIG_FAULT_INJECTION is not set
|
||||
|
||||
#
|
||||
# Tracers
|
||||
#
|
||||
# CONFIG_IRQSOFF_TRACER is not set
|
||||
# CONFIG_SCHED_TRACER is not set
|
||||
# CONFIG_CONTEXT_SWITCH_TRACER is not set
|
||||
# CONFIG_BOOT_TRACER is not set
|
||||
# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
|
||||
# CONFIG_SAMPLES is not set
|
||||
|
||||
#
|
||||
|
@ -1196,17 +1244,26 @@ CONFIG_FRAME_POINTER=y
|
|||
#
|
||||
# CONFIG_KEYS is not set
|
||||
# CONFIG_SECURITY is not set
|
||||
# CONFIG_SECURITYFS is not set
|
||||
# CONFIG_SECURITY_FILE_CAPABILITIES is not set
|
||||
CONFIG_CRYPTO=y
|
||||
|
||||
#
|
||||
# Crypto core or helper
|
||||
#
|
||||
CONFIG_CRYPTO_FIPS=y
|
||||
CONFIG_CRYPTO_ALGAPI=y
|
||||
CONFIG_CRYPTO_ALGAPI2=y
|
||||
CONFIG_CRYPTO_AEAD=m
|
||||
CONFIG_CRYPTO_AEAD2=y
|
||||
CONFIG_CRYPTO_BLKCIPHER=m
|
||||
CONFIG_CRYPTO_BLKCIPHER2=y
|
||||
CONFIG_CRYPTO_HASH=m
|
||||
CONFIG_CRYPTO_HASH2=y
|
||||
CONFIG_CRYPTO_RNG=m
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_MANAGER=m
|
||||
CONFIG_CRYPTO_MANAGER2=y
|
||||
# CONFIG_CRYPTO_GF128MUL is not set
|
||||
# CONFIG_CRYPTO_NULL is not set
|
||||
# CONFIG_CRYPTO_CRYPTD is not set
|
||||
|
@ -1257,7 +1314,7 @@ CONFIG_CRYPTO_SHA1=m
|
|||
#
|
||||
# Ciphers
|
||||
#
|
||||
# CONFIG_CRYPTO_AES is not set
|
||||
CONFIG_CRYPTO_AES=m
|
||||
# CONFIG_CRYPTO_ANUBIS is not set
|
||||
# CONFIG_CRYPTO_ARC4 is not set
|
||||
# CONFIG_CRYPTO_BLOWFISH is not set
|
||||
|
@ -1278,14 +1335,17 @@ CONFIG_CRYPTO_DES=m
|
|||
#
|
||||
CONFIG_CRYPTO_DEFLATE=y
|
||||
CONFIG_CRYPTO_LZO=y
|
||||
|
||||
#
|
||||
# Random Number Generation
|
||||
#
|
||||
CONFIG_CRYPTO_ANSI_CPRNG=m
|
||||
# CONFIG_CRYPTO_HW is not set
|
||||
|
||||
#
|
||||
# Library routines
|
||||
#
|
||||
CONFIG_BITREVERSE=y
|
||||
# CONFIG_GENERIC_FIND_FIRST_BIT is not set
|
||||
# CONFIG_GENERIC_FIND_NEXT_BIT is not set
|
||||
CONFIG_CRC_CCITT=m
|
||||
CONFIG_CRC16=y
|
||||
CONFIG_CRC_T10DIF=m
|
||||
|
|
|
@ -967,28 +967,28 @@ static inline void configure_usart0_pins(void)
|
|||
{
|
||||
u32 pin_mask = (1 << 8) | (1 << 9); /* RXD & TXD */
|
||||
|
||||
select_peripheral(PIOA, pin_mask, PERIPH_B, 0);
|
||||
select_peripheral(PIOA, pin_mask, PERIPH_B, AT32_GPIOF_PULLUP);
|
||||
}
|
||||
|
||||
static inline void configure_usart1_pins(void)
|
||||
{
|
||||
u32 pin_mask = (1 << 17) | (1 << 18); /* RXD & TXD */
|
||||
|
||||
select_peripheral(PIOA, pin_mask, PERIPH_A, 0);
|
||||
select_peripheral(PIOA, pin_mask, PERIPH_A, AT32_GPIOF_PULLUP);
|
||||
}
|
||||
|
||||
static inline void configure_usart2_pins(void)
|
||||
{
|
||||
u32 pin_mask = (1 << 26) | (1 << 27); /* RXD & TXD */
|
||||
|
||||
select_peripheral(PIOB, pin_mask, PERIPH_B, 0);
|
||||
select_peripheral(PIOB, pin_mask, PERIPH_B, AT32_GPIOF_PULLUP);
|
||||
}
|
||||
|
||||
static inline void configure_usart3_pins(void)
|
||||
{
|
||||
u32 pin_mask = (1 << 18) | (1 << 17); /* RXD & TXD */
|
||||
|
||||
select_peripheral(PIOB, pin_mask, PERIPH_B, 0);
|
||||
select_peripheral(PIOB, pin_mask, PERIPH_B, AT32_GPIOF_PULLUP);
|
||||
}
|
||||
|
||||
static struct platform_device *__initdata at32_usarts[4];
|
||||
|
|
|
@ -25,7 +25,7 @@ $(obj)/vmlinux.gz: $(obj)/vmlinux.bin FORCE
|
|||
|
||||
$(obj)/vmImage: $(obj)/vmlinux.gz
|
||||
$(call if_changed,uimage)
|
||||
@echo 'Kernel: $@ is ready'
|
||||
@$(kecho) 'Kernel: $@ is ready'
|
||||
|
||||
install:
|
||||
sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)"
|
||||
|
|
|
@ -99,7 +99,7 @@ config GENERIC_IOMAP
|
|||
bool
|
||||
default y
|
||||
|
||||
config SCHED_NO_NO_OMIT_FRAME_POINTER
|
||||
config SCHED_OMIT_FRAME_POINTER
|
||||
bool
|
||||
default y
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ menu "HP Simulator drivers"
|
|||
|
||||
config HP_SIMETH
|
||||
bool "Simulated Ethernet "
|
||||
depends on NET
|
||||
|
||||
config HP_SIMSERIAL
|
||||
bool "Simulated serial driver support"
|
||||
|
|
|
@ -167,6 +167,15 @@ netdev_read(int fd, unsigned char *buf, unsigned int len)
|
|||
return ia64_ssc(fd, __pa(buf), len, 0, SSC_NETDEV_RECV);
|
||||
}
|
||||
|
||||
static const struct net_device_ops simeth_netdev_ops = {
|
||||
.ndo_open = simeth_open,
|
||||
.ndo_stop = simeth_close,
|
||||
.ndo_start_xmit = simeth_tx,
|
||||
.ndo_get_stats = simeth_get_stats,
|
||||
.ndo_set_multicast_list = set_multicast_list, /* not yet used */
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
* Function shared with module code, so cannot be in init section
|
||||
*
|
||||
|
@ -206,14 +215,10 @@ simeth_probe1(void)
|
|||
|
||||
memcpy(dev->dev_addr, mac_addr, sizeof(mac_addr));
|
||||
|
||||
local = dev->priv;
|
||||
local = netdev_priv(dev);
|
||||
local->simfd = fd; /* keep track of underlying file descriptor */
|
||||
|
||||
dev->open = simeth_open;
|
||||
dev->stop = simeth_close;
|
||||
dev->hard_start_xmit = simeth_tx;
|
||||
dev->get_stats = simeth_get_stats;
|
||||
dev->set_multicast_list = set_multicast_list; /* no yet used */
|
||||
dev->netdev_ops = &simeth_netdev_ops;
|
||||
|
||||
err = register_netdev(dev);
|
||||
if (err) {
|
||||
|
@ -325,7 +330,7 @@ simeth_device_event(struct notifier_block *this,unsigned long event, void *ptr)
|
|||
* we get DOWN then UP.
|
||||
*/
|
||||
|
||||
local = dev->priv;
|
||||
local = netdev_priv(dev);
|
||||
/* now do it for real */
|
||||
r = event == NETDEV_UP ?
|
||||
netdev_attach(local->simfd, dev->irq, ntohl(ifa->ifa_local)):
|
||||
|
@ -380,7 +385,7 @@ frame_print(unsigned char *from, unsigned char *frame, int len)
|
|||
static int
|
||||
simeth_tx(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
struct simeth_local *local = dev->priv;
|
||||
struct simeth_local *local = netdev_priv(dev);
|
||||
|
||||
#if 0
|
||||
/* ensure we have at least ETH_ZLEN bytes (min frame size) */
|
||||
|
@ -443,7 +448,7 @@ simeth_rx(struct net_device *dev)
|
|||
int len;
|
||||
int rcv_count = SIMETH_RECV_MAX;
|
||||
|
||||
local = dev->priv;
|
||||
local = netdev_priv(dev);
|
||||
/*
|
||||
* the loop concept has been borrowed from other drivers
|
||||
* looks to me like it's a throttling thing to avoid pushing to many
|
||||
|
@ -507,7 +512,7 @@ simeth_interrupt(int irq, void *dev_id)
|
|||
static struct net_device_stats *
|
||||
simeth_get_stats(struct net_device *dev)
|
||||
{
|
||||
struct simeth_local *local = dev->priv;
|
||||
struct simeth_local *local = netdev_priv(dev);
|
||||
|
||||
return &local->stats;
|
||||
}
|
||||
|
|
|
@ -1767,25 +1767,24 @@ groups16_from_user(struct group_info *group_info, short __user *grouplist)
|
|||
asmlinkage long
|
||||
sys32_getgroups16 (int gidsetsize, short __user *grouplist)
|
||||
{
|
||||
const struct cred *cred = current_cred();
|
||||
int i;
|
||||
|
||||
if (gidsetsize < 0)
|
||||
return -EINVAL;
|
||||
|
||||
get_group_info(current->group_info);
|
||||
i = current->group_info->ngroups;
|
||||
i = cred->group_info->ngroups;
|
||||
if (gidsetsize) {
|
||||
if (i > gidsetsize) {
|
||||
i = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
if (groups16_to_user(grouplist, current->group_info)) {
|
||||
if (groups16_to_user(grouplist, cred->group_info)) {
|
||||
i = -EFAULT;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
out:
|
||||
put_group_info(current->group_info);
|
||||
return i;
|
||||
}
|
||||
|
||||
|
|
|
@ -158,7 +158,7 @@ mca_handler_bh(unsigned long paddr, void *iip, unsigned long ipsr)
|
|||
ia64_mlogbuf_dump();
|
||||
printk(KERN_ERR "OS_MCA: process [cpu %d, pid: %d, uid: %d, "
|
||||
"iip: %p, psr: 0x%lx,paddr: 0x%lx](%s) encounters MCA.\n",
|
||||
raw_smp_processor_id(), current->pid, current->uid,
|
||||
raw_smp_processor_id(), current->pid, current_uid(),
|
||||
iip, ipsr, paddr, current->comm);
|
||||
|
||||
spin_lock(&mca_bh_lock);
|
||||
|
|
|
@ -2220,8 +2220,8 @@ pfm_alloc_file(pfm_context_t *ctx)
|
|||
DPRINT(("new inode ino=%ld @%p\n", inode->i_ino, inode));
|
||||
|
||||
inode->i_mode = S_IFCHR|S_IRUGO;
|
||||
inode->i_uid = current->fsuid;
|
||||
inode->i_gid = current->fsgid;
|
||||
inode->i_uid = current_fsuid();
|
||||
inode->i_gid = current_fsgid();
|
||||
|
||||
sprintf(name, "[%lu]", inode->i_ino);
|
||||
this.name = name;
|
||||
|
@ -2399,22 +2399,33 @@ error_kmem:
|
|||
static int
|
||||
pfm_bad_permissions(struct task_struct *task)
|
||||
{
|
||||
const struct cred *tcred;
|
||||
uid_t uid = current_uid();
|
||||
gid_t gid = current_gid();
|
||||
int ret;
|
||||
|
||||
rcu_read_lock();
|
||||
tcred = __task_cred(task);
|
||||
|
||||
/* inspired by ptrace_attach() */
|
||||
DPRINT(("cur: uid=%d gid=%d task: euid=%d suid=%d uid=%d egid=%d sgid=%d\n",
|
||||
current->uid,
|
||||
current->gid,
|
||||
task->euid,
|
||||
task->suid,
|
||||
task->uid,
|
||||
task->egid,
|
||||
task->sgid));
|
||||
uid,
|
||||
gid,
|
||||
tcred->euid,
|
||||
tcred->suid,
|
||||
tcred->uid,
|
||||
tcred->egid,
|
||||
tcred->sgid));
|
||||
|
||||
return ((current->uid != task->euid)
|
||||
|| (current->uid != task->suid)
|
||||
|| (current->uid != task->uid)
|
||||
|| (current->gid != task->egid)
|
||||
|| (current->gid != task->sgid)
|
||||
|| (current->gid != task->gid)) && !capable(CAP_SYS_PTRACE);
|
||||
ret = ((uid != tcred->euid)
|
||||
|| (uid != tcred->suid)
|
||||
|| (uid != tcred->uid)
|
||||
|| (gid != tcred->egid)
|
||||
|| (gid != tcred->sgid)
|
||||
|| (gid != tcred->gid)) && !capable(CAP_SYS_PTRACE);
|
||||
|
||||
rcu_read_unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
@ -229,7 +229,7 @@ ia64_rt_sigreturn (struct sigscratch *scr)
|
|||
si.si_errno = 0;
|
||||
si.si_code = SI_KERNEL;
|
||||
si.si_pid = task_pid_vnr(current);
|
||||
si.si_uid = current->uid;
|
||||
si.si_uid = current_uid();
|
||||
si.si_addr = sc;
|
||||
force_sig_info(SIGSEGV, &si, current);
|
||||
return retval;
|
||||
|
@ -326,7 +326,7 @@ force_sigsegv_info (int sig, void __user *addr)
|
|||
si.si_errno = 0;
|
||||
si.si_code = SI_KERNEL;
|
||||
si.si_pid = task_pid_vnr(current);
|
||||
si.si_uid = current->uid;
|
||||
si.si_uid = current_uid();
|
||||
si.si_addr = addr;
|
||||
force_sig_info(SIGSEGV, &si, current);
|
||||
return 0;
|
||||
|
|
|
@ -273,7 +273,7 @@ config GENERIC_CALIBRATE_DELAY
|
|||
bool
|
||||
default y
|
||||
|
||||
config SCHED_NO_NO_OMIT_FRAME_POINTER
|
||||
config SCHED_OMIT_FRAME_POINTER
|
||||
bool
|
||||
default y
|
||||
|
||||
|
|
|
@ -36,9 +36,9 @@
|
|||
| depending on their values, the program may run faster or slower --
|
||||
| but no worse than 10% slower even in the extreme cases.
|
||||
|
|
||||
| The program setoxm1 takes approximately ???/??? cycles for input
|
||||
| The program setoxm1 takes approximately ??? / ??? cycles for input
|
||||
| argument X, 0.25 <= |X| < 70log2. For |X| < 0.25, it takes
|
||||
| approximately ???/??? cycles. For the less common arguments,
|
||||
| approximately ??? / ??? cycles. For the less common arguments,
|
||||
| depending on their values, the program may run faster or slower --
|
||||
| but no worse than 10% slower even in the extreme cases.
|
||||
|
|
||||
|
|
|
@ -18,11 +18,14 @@
|
|||
#include <asm/macints.h>
|
||||
#include <asm/mac_baboon.h>
|
||||
|
||||
/* #define DEBUG_BABOON */
|
||||
/* #define DEBUG_IRQS */
|
||||
|
||||
extern void mac_enable_irq(unsigned int);
|
||||
extern void mac_disable_irq(unsigned int);
|
||||
|
||||
int baboon_present;
|
||||
static volatile struct baboon *baboon;
|
||||
static unsigned char baboon_disabled;
|
||||
|
||||
#if 0
|
||||
extern int macide_ack_intr(struct ata_channel *);
|
||||
|
@ -88,34 +91,51 @@ static irqreturn_t baboon_irq(int irq, void *dev_id)
|
|||
|
||||
void __init baboon_register_interrupts(void)
|
||||
{
|
||||
request_irq(IRQ_NUBUS_C, baboon_irq, IRQ_FLG_LOCK|IRQ_FLG_FAST,
|
||||
"baboon", (void *) baboon);
|
||||
baboon_disabled = 0;
|
||||
request_irq(IRQ_NUBUS_C, baboon_irq, 0, "baboon", (void *)baboon);
|
||||
}
|
||||
|
||||
void baboon_irq_enable(int irq) {
|
||||
/*
|
||||
* The means for masking individual baboon interrupts remains a mystery, so
|
||||
* enable the umbrella interrupt only when no baboon interrupt is disabled.
|
||||
*/
|
||||
|
||||
void baboon_irq_enable(int irq)
|
||||
{
|
||||
int irq_idx = IRQ_IDX(irq);
|
||||
|
||||
#ifdef DEBUG_IRQUSE
|
||||
printk("baboon_irq_enable(%d)\n", irq);
|
||||
#endif
|
||||
/* FIXME: figure out how to mask and unmask baboon interrupt sources */
|
||||
enable_irq(IRQ_NUBUS_C);
|
||||
|
||||
baboon_disabled &= ~(1 << irq_idx);
|
||||
if (!baboon_disabled)
|
||||
mac_enable_irq(IRQ_NUBUS_C);
|
||||
}
|
||||
|
||||
void baboon_irq_disable(int irq) {
|
||||
void baboon_irq_disable(int irq)
|
||||
{
|
||||
int irq_idx = IRQ_IDX(irq);
|
||||
|
||||
#ifdef DEBUG_IRQUSE
|
||||
printk("baboon_irq_disable(%d)\n", irq);
|
||||
#endif
|
||||
disable_irq(IRQ_NUBUS_C);
|
||||
|
||||
baboon_disabled |= 1 << irq_idx;
|
||||
if (baboon_disabled)
|
||||
mac_disable_irq(IRQ_NUBUS_C);
|
||||
}
|
||||
|
||||
void baboon_irq_clear(int irq) {
|
||||
int irq_idx = IRQ_IDX(irq);
|
||||
void baboon_irq_clear(int irq)
|
||||
{
|
||||
int irq_idx = IRQ_IDX(irq);
|
||||
|
||||
baboon->mb_ifr &= ~(1 << irq_idx);
|
||||
}
|
||||
|
||||
int baboon_irq_pending(int irq)
|
||||
{
|
||||
int irq_idx = IRQ_IDX(irq);
|
||||
int irq_idx = IRQ_IDX(irq);
|
||||
|
||||
return baboon->mb_ifr & (1 << irq_idx);
|
||||
}
|
||||
|
|
|
@ -162,10 +162,7 @@ void __init config_mac(void)
|
|||
mach_init_IRQ = mac_init_IRQ;
|
||||
mach_get_model = mac_get_model;
|
||||
mach_gettimeoffset = mac_gettimeoffset;
|
||||
#warning move to adb/via init
|
||||
#if 0
|
||||
mach_hwclk = mac_hwclk;
|
||||
#endif
|
||||
mach_set_clock_mmss = mac_set_clock_mmss;
|
||||
mach_reset = mac_reset;
|
||||
mach_halt = mac_poweroff;
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#define BOOTINFO_COMPAT_1_0
|
||||
#include <asm/setup.h>
|
||||
#include <asm/bootinfo.h>
|
||||
#include <asm/machw.h>
|
||||
#include <asm/macints.h>
|
||||
|
||||
extern unsigned long mac_videobase;
|
||||
|
|
|
@ -127,7 +127,6 @@
|
|||
#include <asm/irq.h>
|
||||
#include <asm/traps.h>
|
||||
#include <asm/bootinfo.h>
|
||||
#include <asm/machw.h>
|
||||
#include <asm/macintosh.h>
|
||||
#include <asm/mac_via.h>
|
||||
#include <asm/mac_psc.h>
|
||||
|
@ -215,8 +214,8 @@ irqreturn_t mac_debug_handler(int, void *);
|
|||
|
||||
/* #define DEBUG_MACINTS */
|
||||
|
||||
static void mac_enable_irq(unsigned int irq);
|
||||
static void mac_disable_irq(unsigned int irq);
|
||||
void mac_enable_irq(unsigned int irq);
|
||||
void mac_disable_irq(unsigned int irq);
|
||||
|
||||
static struct irq_controller mac_irq_controller = {
|
||||
.name = "mac",
|
||||
|
@ -275,7 +274,7 @@ void __init mac_init_IRQ(void)
|
|||
* These routines are just dispatchers to the VIA/OSS/PSC routines.
|
||||
*/
|
||||
|
||||
static void mac_enable_irq(unsigned int irq)
|
||||
void mac_enable_irq(unsigned int irq)
|
||||
{
|
||||
int irq_src = IRQ_SRC(irq);
|
||||
|
||||
|
@ -308,7 +307,7 @@ static void mac_enable_irq(unsigned int irq)
|
|||
}
|
||||
}
|
||||
|
||||
static void mac_disable_irq(unsigned int irq)
|
||||
void mac_disable_irq(unsigned int irq)
|
||||
{
|
||||
int irq_src = IRQ_SRC(irq);
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ static void cuda_write_pram(int offset, __u8 data)
|
|||
#define cuda_write_pram NULL
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ADB_PMU68K
|
||||
#if 0 /* def CONFIG_ADB_PMU68K */
|
||||
static long pmu_read_time(void)
|
||||
{
|
||||
struct adb_request req;
|
||||
|
@ -148,7 +148,7 @@ static void pmu_write_pram(int offset, __u8 data)
|
|||
#define pmu_write_pram NULL
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ADB_MACIISI
|
||||
#if 0 /* def CONFIG_ADB_MACIISI */
|
||||
extern int maciisi_request(struct adb_request *req,
|
||||
void (*done)(struct adb_request *), int nbytes, ...);
|
||||
|
||||
|
@ -717,13 +717,18 @@ int mac_hwclk(int op, struct rtc_time *t)
|
|||
unmktime(now, 0,
|
||||
&t->tm_year, &t->tm_mon, &t->tm_mday,
|
||||
&t->tm_hour, &t->tm_min, &t->tm_sec);
|
||||
#if 0
|
||||
printk("mac_hwclk: read %04d-%02d-%-2d %02d:%02d:%02d\n",
|
||||
t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec);
|
||||
t->tm_year + 1900, t->tm_mon + 1, t->tm_mday,
|
||||
t->tm_hour, t->tm_min, t->tm_sec);
|
||||
#endif
|
||||
} else { /* write */
|
||||
#if 0
|
||||
printk("mac_hwclk: tried to write %04d-%02d-%-2d %02d:%02d:%02d\n",
|
||||
t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec);
|
||||
t->tm_year + 1900, t->tm_mon + 1, t->tm_mday,
|
||||
t->tm_hour, t->tm_min, t->tm_sec);
|
||||
#endif
|
||||
|
||||
#if 0 /* it trashes my rtc */
|
||||
now = mktime(t->tm_year + 1900, t->tm_mon + 1, t->tm_mday,
|
||||
t->tm_hour, t->tm_min, t->tm_sec);
|
||||
|
||||
|
@ -742,7 +747,6 @@ int mac_hwclk(int op, struct rtc_time *t)
|
|||
case MAC_ADB_IISI:
|
||||
maciisi_write_time(now);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#include <linux/init.h>
|
||||
|
||||
#include <asm/bootinfo.h>
|
||||
#include <asm/machw.h>
|
||||
#include <asm/macintosh.h>
|
||||
#include <asm/macints.h>
|
||||
#include <asm/mac_via.h>
|
||||
|
|
|
@ -32,15 +32,10 @@
|
|||
#include <asm/bootinfo.h>
|
||||
#include <asm/macintosh.h>
|
||||
#include <asm/macints.h>
|
||||
#include <asm/machw.h>
|
||||
#include <asm/mac_via.h>
|
||||
#include <asm/mac_psc.h>
|
||||
|
||||
volatile __u8 *via1, *via2;
|
||||
#if 0
|
||||
/* See note in mac_via.h about how this is possibly not useful */
|
||||
volatile long *via_memory_bogon=(long *)&via_memory_bogon;
|
||||
#endif
|
||||
int rbv_present;
|
||||
int via_alt_mapping;
|
||||
EXPORT_SYMBOL(via_alt_mapping);
|
||||
|
@ -66,7 +61,7 @@ static int gIER,gIFR,gBufA,gBufB;
|
|||
#define MAC_CLOCK_LOW (MAC_CLOCK_TICK&0xFF)
|
||||
#define MAC_CLOCK_HIGH (MAC_CLOCK_TICK>>8)
|
||||
|
||||
/* To disable a NuBus slot on Quadras we make the slot IRQ lines outputs, set
|
||||
/* To disable a NuBus slot on Quadras we make that slot IRQ line an output set
|
||||
* high. On RBV we just use the slot interrupt enable register. On Macs with
|
||||
* genuine VIA chips we must use nubus_disabled to keep track of disabled slot
|
||||
* interrupts. When any slot IRQ is disabled we mask the (edge triggered) CA1
|
||||
|
@ -180,7 +175,7 @@ void __init via_init(void)
|
|||
via1[vT1CH] = 0;
|
||||
via1[vT2CL] = 0;
|
||||
via1[vT2CH] = 0;
|
||||
via1[vACR] &= 0x3F;
|
||||
via1[vACR] &= ~0xC0; /* setup T1 timer with no PB7 output */
|
||||
via1[vACR] &= ~0x03; /* disable port A & B latches */
|
||||
|
||||
/*
|
||||
|
@ -203,40 +198,41 @@ void __init via_init(void)
|
|||
|
||||
/* Everything below this point is VIA2/RBV only... */
|
||||
|
||||
if (oss_present) return;
|
||||
if (oss_present)
|
||||
return;
|
||||
|
||||
#if 1
|
||||
/* Some machines support an alternate IRQ mapping that spreads */
|
||||
/* Ethernet and Sound out to their own autolevel IRQs and moves */
|
||||
/* VIA1 to level 6. A/UX uses this mapping and we do too. Note */
|
||||
/* that the IIfx emulates this alternate mapping using the OSS. */
|
||||
|
||||
switch(macintosh_config->ident) {
|
||||
case MAC_MODEL_P475:
|
||||
case MAC_MODEL_P475F:
|
||||
case MAC_MODEL_P575:
|
||||
case MAC_MODEL_Q605:
|
||||
case MAC_MODEL_Q605_ACC:
|
||||
case MAC_MODEL_C610:
|
||||
case MAC_MODEL_Q610:
|
||||
case MAC_MODEL_Q630:
|
||||
case MAC_MODEL_C650:
|
||||
case MAC_MODEL_Q650:
|
||||
case MAC_MODEL_Q700:
|
||||
case MAC_MODEL_Q800:
|
||||
case MAC_MODEL_Q900:
|
||||
case MAC_MODEL_Q950:
|
||||
via_alt_mapping = 0;
|
||||
if (macintosh_config->via_type == MAC_VIA_QUADRA)
|
||||
switch (macintosh_config->ident) {
|
||||
case MAC_MODEL_C660:
|
||||
case MAC_MODEL_Q840:
|
||||
/* not applicable */
|
||||
break;
|
||||
case MAC_MODEL_P588:
|
||||
case MAC_MODEL_TV:
|
||||
case MAC_MODEL_PB140:
|
||||
case MAC_MODEL_PB145:
|
||||
case MAC_MODEL_PB160:
|
||||
case MAC_MODEL_PB165:
|
||||
case MAC_MODEL_PB165C:
|
||||
case MAC_MODEL_PB170:
|
||||
case MAC_MODEL_PB180:
|
||||
case MAC_MODEL_PB180C:
|
||||
case MAC_MODEL_PB190:
|
||||
case MAC_MODEL_PB520:
|
||||
/* not yet tested */
|
||||
break;
|
||||
default:
|
||||
via_alt_mapping = 1;
|
||||
via1[vDirB] |= 0x40;
|
||||
via1[vBufB] &= ~0x40;
|
||||
break;
|
||||
default:
|
||||
via_alt_mapping = 0;
|
||||
break;
|
||||
}
|
||||
#else
|
||||
via_alt_mapping = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Now initialize VIA2. For RBV we just kill all interrupts;
|
||||
|
@ -252,14 +248,17 @@ void __init via_init(void)
|
|||
via2[vT1CH] = 0;
|
||||
via2[vT2CL] = 0;
|
||||
via2[vT2CH] = 0;
|
||||
via2[vACR] &= 0x3F;
|
||||
via2[vACR] &= ~0xC0; /* setup T1 timer with no PB7 output */
|
||||
via2[vACR] &= ~0x03; /* disable port A & B latches */
|
||||
}
|
||||
|
||||
/*
|
||||
* Set vPCR for SCSI interrupts (but not on RBV)
|
||||
* Set vPCR for control line interrupts (but not on RBV)
|
||||
*/
|
||||
if (!rbv_present) {
|
||||
/* For all VIA types, CA1 (SLOTS IRQ) and CB1 (ASC IRQ)
|
||||
* are made negative edge triggered here.
|
||||
*/
|
||||
if (macintosh_config->scsi_type == MAC_SCSI_OLD) {
|
||||
/* CB2 (IRQ) indep. input, positive edge */
|
||||
/* CA2 (DRQ) indep. input, positive edge */
|
||||
|
@ -466,21 +465,6 @@ irqreturn_t via1_irq(int irq, void *dev_id)
|
|||
++irq_num;
|
||||
irq_bit <<= 1;
|
||||
} while (events >= irq_bit);
|
||||
|
||||
#if 0 /* freakin' pmu is doing weird stuff */
|
||||
if (!oss_present) {
|
||||
/* This (still) seems to be necessary to get IDE
|
||||
working. However, if you enable VBL interrupts,
|
||||
you're screwed... */
|
||||
/* FIXME: should we check the SLOTIRQ bit before
|
||||
pulling this stunt? */
|
||||
/* No, it won't be set. that's why we're doing this. */
|
||||
via_irq_disable(IRQ_MAC_NUBUS);
|
||||
via_irq_clear(IRQ_MAC_NUBUS);
|
||||
m68k_handle_int(IRQ_MAC_NUBUS);
|
||||
via_irq_enable(IRQ_MAC_NUBUS);
|
||||
}
|
||||
#endif
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
|
|
|
@ -653,7 +653,7 @@ config GENERIC_CMOS_UPDATE
|
|||
bool
|
||||
default y
|
||||
|
||||
config SCHED_NO_NO_OMIT_FRAME_POINTER
|
||||
config SCHED_OMIT_FRAME_POINTER
|
||||
bool
|
||||
default y
|
||||
|
||||
|
|
|
@ -50,9 +50,8 @@ static inline __attribute_const__ __u32 __arch_swab32(__u32 x)
|
|||
static inline __attribute_const__ __u64 __arch_swab64(__u64 x)
|
||||
{
|
||||
__asm__(
|
||||
" dsbh %0, %1 \n"
|
||||
" dshd %0, %0 \n"
|
||||
" drotr %0, %0, 32 \n"
|
||||
" dsbh %0, %1\n"
|
||||
" dshd %0, %0"
|
||||
: "=r" (x)
|
||||
: "r" (x));
|
||||
|
||||
|
|
|
@ -232,7 +232,7 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
|
|||
*/
|
||||
#ifdef __MIPSEB__
|
||||
#define ELF_DATA ELFDATA2MSB
|
||||
#elif __MIPSEL__
|
||||
#elif defined(__MIPSEL__)
|
||||
#define ELF_DATA ELFDATA2LSB
|
||||
#endif
|
||||
#define ELF_ARCH EM_MIPS
|
||||
|
|
|
@ -174,8 +174,8 @@ static unsigned int translate_open_flags(int flags)
|
|||
|
||||
static void sp_setfsuidgid( uid_t uid, gid_t gid)
|
||||
{
|
||||
current->fsuid = uid;
|
||||
current->fsgid = gid;
|
||||
current->cred->fsuid = uid;
|
||||
current->cred->fsgid = gid;
|
||||
|
||||
key_fsuid_changed(current);
|
||||
key_fsgid_changed(current);
|
||||
|
|
|
@ -51,6 +51,7 @@ asmlinkage long mipsmt_sys_sched_setaffinity(pid_t pid, unsigned int len,
|
|||
int retval;
|
||||
struct task_struct *p;
|
||||
struct thread_info *ti;
|
||||
uid_t euid;
|
||||
|
||||
if (len < sizeof(new_mask))
|
||||
return -EINVAL;
|
||||
|
@ -76,9 +77,9 @@ asmlinkage long mipsmt_sys_sched_setaffinity(pid_t pid, unsigned int len,
|
|||
*/
|
||||
get_task_struct(p);
|
||||
|
||||
euid = current_euid();
|
||||
retval = -EPERM;
|
||||
if ((current->euid != p->euid) && (current->euid != p->uid) &&
|
||||
!capable(CAP_SYS_NICE)) {
|
||||
if (euid != p->euid && euid != p->uid && !capable(CAP_SYS_NICE)) {
|
||||
read_unlock(&tasklist_lock);
|
||||
goto out_unlock;
|
||||
}
|
||||
|
|
|
@ -1085,8 +1085,8 @@ static int vpe_open(struct inode *inode, struct file *filp)
|
|||
v->load_addr = NULL;
|
||||
v->len = 0;
|
||||
|
||||
v->uid = filp->f_uid;
|
||||
v->gid = filp->f_gid;
|
||||
v->uid = filp->f_cred->fsuid;
|
||||
v->gid = filp->f_cred->fsgid;
|
||||
|
||||
#ifdef CONFIG_MIPS_APSP_KSPD
|
||||
/* get kspd to tell us when a syscall_exit happens */
|
||||
|
|
|
@ -44,9 +44,12 @@ static inline void flush_tlb_mm(struct mm_struct *mm)
|
|||
{
|
||||
BUG_ON(mm == &init_mm); /* Should never happen */
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
#if 1 || defined(CONFIG_SMP)
|
||||
flush_tlb_all();
|
||||
#else
|
||||
/* FIXME: currently broken, causing space id and protection ids
|
||||
* to go out of sync, resulting in faults on userspace accesses.
|
||||
*/
|
||||
if (mm) {
|
||||
if (mm->context != 0)
|
||||
free_sid(mm->context);
|
||||
|
|
|
@ -182,7 +182,7 @@ give_sigsegv:
|
|||
si.si_errno = 0;
|
||||
si.si_code = SI_KERNEL;
|
||||
si.si_pid = task_pid_vnr(current);
|
||||
si.si_uid = current->uid;
|
||||
si.si_uid = current_uid();
|
||||
si.si_addr = &frame->uc;
|
||||
force_sig_info(SIGSEGV, &si, current);
|
||||
return;
|
||||
|
|
|
@ -141,7 +141,7 @@ config GENERIC_NVRAM
|
|||
bool
|
||||
default y if PPC32
|
||||
|
||||
config SCHED_NO_NO_OMIT_FRAME_POINTER
|
||||
config SCHED_OMIT_FRAME_POINTER
|
||||
bool
|
||||
default y
|
||||
|
||||
|
@ -285,6 +285,10 @@ config IOMMU_VMERGE
|
|||
config IOMMU_HELPER
|
||||
def_bool PPC64
|
||||
|
||||
config PPC_NEED_DMA_SYNC_OPS
|
||||
def_bool y
|
||||
depends on NOT_COHERENT_CACHE
|
||||
|
||||
config HOTPLUG_CPU
|
||||
bool "Support for enabling/disabling CPUs"
|
||||
depends on SMP && HOTPLUG && EXPERIMENTAL && (PPC_PSERIES || PPC_PMAC)
|
||||
|
@ -322,7 +326,7 @@ config KEXEC
|
|||
|
||||
config CRASH_DUMP
|
||||
bool "Build a kdump crash kernel"
|
||||
depends on PPC_MULTIPLATFORM && PPC64 && RELOCATABLE
|
||||
depends on (PPC64 && RELOCATABLE) || 6xx
|
||||
help
|
||||
Build a kernel suitable for use as a kdump capture kernel.
|
||||
The same kernel binary can be used as production kernel and dump
|
||||
|
@ -401,23 +405,53 @@ config PPC_HAS_HASH_64K
|
|||
depends on PPC64
|
||||
default n
|
||||
|
||||
config PPC_64K_PAGES
|
||||
bool "64k page size"
|
||||
depends on PPC64
|
||||
select PPC_HAS_HASH_64K
|
||||
choice
|
||||
prompt "Page size"
|
||||
default PPC_4K_PAGES
|
||||
help
|
||||
This option changes the kernel logical page size to 64k. On machines
|
||||
without processor support for 64k pages, the kernel will simulate
|
||||
them by loading each individual 4k page on demand transparently,
|
||||
while on hardware with such support, it will be used to map
|
||||
normal application pages.
|
||||
Select the kernel logical page size. Increasing the page size
|
||||
will reduce software overhead at each page boundary, allow
|
||||
hardware prefetch mechanisms to be more effective, and allow
|
||||
larger dma transfers increasing IO efficiency and reducing
|
||||
overhead. However the utilization of memory will increase.
|
||||
For example, each cached file will using a multiple of the
|
||||
page size to hold its contents and the difference between the
|
||||
end of file and the end of page is wasted.
|
||||
|
||||
Some dedicated systems, such as software raid serving with
|
||||
accelerated calculations, have shown significant increases.
|
||||
|
||||
If you configure a 64 bit kernel for 64k pages but the
|
||||
processor does not support them, then the kernel will simulate
|
||||
them with 4k pages, loading them on demand, but with the
|
||||
reduced software overhead and larger internal fragmentation.
|
||||
For the 32 bit kernel, a large page option will not be offered
|
||||
unless it is supported by the configured processor.
|
||||
|
||||
If unsure, choose 4K_PAGES.
|
||||
|
||||
config PPC_4K_PAGES
|
||||
bool "4k page size"
|
||||
|
||||
config PPC_16K_PAGES
|
||||
bool "16k page size" if 44x
|
||||
|
||||
config PPC_64K_PAGES
|
||||
bool "64k page size" if 44x || PPC_STD_MMU_64
|
||||
select PPC_HAS_HASH_64K if PPC_STD_MMU_64
|
||||
|
||||
endchoice
|
||||
|
||||
config FORCE_MAX_ZONEORDER
|
||||
int "Maximum zone order"
|
||||
range 9 64 if PPC_64K_PAGES
|
||||
default "9" if PPC_64K_PAGES
|
||||
range 13 64 if PPC64 && !PPC_64K_PAGES
|
||||
default "13" if PPC64 && !PPC_64K_PAGES
|
||||
range 9 64 if PPC_STD_MMU_64 && PPC_64K_PAGES
|
||||
default "9" if PPC_STD_MMU_64 && PPC_64K_PAGES
|
||||
range 13 64 if PPC_STD_MMU_64 && !PPC_64K_PAGES
|
||||
default "13" if PPC_STD_MMU_64 && !PPC_64K_PAGES
|
||||
range 9 64 if PPC_STD_MMU_32 && PPC_16K_PAGES
|
||||
default "9" if PPC_STD_MMU_32 && PPC_16K_PAGES
|
||||
range 7 64 if PPC_STD_MMU_32 && PPC_64K_PAGES
|
||||
default "7" if PPC_STD_MMU_32 && PPC_64K_PAGES
|
||||
range 11 64
|
||||
default "11"
|
||||
help
|
||||
|
@ -437,7 +471,7 @@ config FORCE_MAX_ZONEORDER
|
|||
|
||||
config PPC_SUBPAGE_PROT
|
||||
bool "Support setting protections for 4k subpages"
|
||||
depends on PPC_64K_PAGES
|
||||
depends on PPC_STD_MMU_64 && PPC_64K_PAGES
|
||||
help
|
||||
This option adds support for a system call to allow user programs
|
||||
to set access permissions (read/write, readonly, or no access)
|
||||
|
|
|
@ -2,6 +2,15 @@ menu "Kernel hacking"
|
|||
|
||||
source "lib/Kconfig.debug"
|
||||
|
||||
config PRINT_STACK_DEPTH
|
||||
int "Stack depth to print" if DEBUG_KERNEL
|
||||
default 64
|
||||
help
|
||||
This option allows you to set the stack depth that the kernel
|
||||
prints in stack traces. This can be useful if your display is
|
||||
too small and stack traces cause important information to
|
||||
scroll off the screen.
|
||||
|
||||
config DEBUG_STACKOVERFLOW
|
||||
bool "Check for stack overflows"
|
||||
depends on DEBUG_KERNEL
|
||||
|
|
|
@ -107,7 +107,6 @@ KBUILD_CFLAGS += $(call cc-option,-mno-altivec)
|
|||
# (We use all available options to help semi-broken compilers)
|
||||
KBUILD_CFLAGS += $(call cc-option,-mno-spe)
|
||||
KBUILD_CFLAGS += $(call cc-option,-mspe=no)
|
||||
KBUILD_CFLAGS += $(call cc-option,-mabi=no-spe)
|
||||
|
||||
# Enable unit-at-a-time mode when possible. It shrinks the
|
||||
# kernel considerably.
|
||||
|
|
|
@ -194,6 +194,7 @@ image-$(CONFIG_PPC_MAPLE) += zImage.pseries
|
|||
image-$(CONFIG_PPC_IBM_CELL_BLADE) += zImage.pseries
|
||||
image-$(CONFIG_PPC_PS3) += dtbImage.ps3
|
||||
image-$(CONFIG_PPC_CELLEB) += zImage.pseries
|
||||
image-$(CONFIG_PPC_CELL_QPACE) += zImage.pseries
|
||||
image-$(CONFIG_PPC_CHRP) += zImage.chrp
|
||||
image-$(CONFIG_PPC_EFIKA) += zImage.chrp
|
||||
image-$(CONFIG_PPC_PMAC) += zImage.pmac
|
||||
|
|
|
@ -213,7 +213,7 @@ static int find_range(u32 *reg, u32 *ranges, int nregaddr,
|
|||
u32 range_addr[MAX_ADDR_CELLS];
|
||||
u32 range_size[MAX_ADDR_CELLS];
|
||||
|
||||
copy_val(range_addr, ranges + i, naddr);
|
||||
copy_val(range_addr, ranges + i, nregaddr);
|
||||
copy_val(range_size, ranges + i + nregaddr + naddr, nsize);
|
||||
|
||||
if (compare_reg(reg, range_addr, range_size))
|
||||
|
|
|
@ -199,8 +199,26 @@
|
|||
reg = <0x2>;
|
||||
device_type = "ethernet-phy";
|
||||
};
|
||||
|
||||
tbi0: tbi-phy@11 {
|
||||
reg = <0x11>;
|
||||
device_type = "tbi-phy";
|
||||
};
|
||||
};
|
||||
|
||||
mdio@25520 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "fsl,gianfar-tbi";
|
||||
reg = <0x25520 0x20>;
|
||||
|
||||
tbi1: tbi-phy@11 {
|
||||
reg = <0x11>;
|
||||
device_type = "tbi-phy";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
enet0: ethernet@24000 {
|
||||
cell-index = <0>;
|
||||
device_type = "network";
|
||||
|
@ -210,6 +228,7 @@
|
|||
local-mac-address = [ 00 08 e5 11 32 33 ];
|
||||
interrupts = <32 0x8 33 0x8 34 0x8>;
|
||||
interrupt-parent = <&ipic>;
|
||||
tbi-handle = <&tbi0>;
|
||||
phy-handle = <&phy0>;
|
||||
linux,network-index = <0>;
|
||||
};
|
||||
|
@ -223,6 +242,7 @@
|
|||
local-mac-address = [ 00 08 e5 11 32 34 ];
|
||||
interrupts = <35 0x8 36 0x8 37 0x8>;
|
||||
interrupt-parent = <&ipic>;
|
||||
tbi-handle = <&tbi1>;
|
||||
phy-handle = <&phy1>;
|
||||
linux,network-index = <1>;
|
||||
};
|
||||
|
|
|
@ -269,7 +269,8 @@
|
|||
* later cannot be changed. Chip supports a second
|
||||
* IO range but we don't use it for now
|
||||
*/
|
||||
ranges = <0x02000000 0x00000000 0xa0000000 0x00000000 0xa0000000 0x00000000 0x20000000
|
||||
ranges = <0x02000000 0x00000000 0xa0000000 0x00000000 0xa0000000 0x00000000 0x40000000
|
||||
0x02000000 0x00000000 0x00000000 0x00000000 0xe0000000 0x00000000 0x00100000
|
||||
0x01000000 0x00000000 0x00000000 0x00000000 0xe8000000 0x00000000 0x00010000>;
|
||||
|
||||
/* Inbound 2GB range starting at 0 */
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
d-cache-size = <32768>;
|
||||
dcr-controller;
|
||||
dcr-access-method = "native";
|
||||
next-level-cache = <&L2C0>;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -104,6 +105,16 @@
|
|||
dcr-reg = <0x00c 0x002>;
|
||||
};
|
||||
|
||||
L2C0: l2c {
|
||||
compatible = "ibm,l2-cache-460ex", "ibm,l2-cache";
|
||||
dcr-reg = <0x020 0x008 /* Internal SRAM DCR's */
|
||||
0x030 0x008>; /* L2 cache DCR's */
|
||||
cache-line-size = <32>; /* 32 bytes */
|
||||
cache-size = <262144>; /* L2, 256K */
|
||||
interrupt-parent = <&UIC1>;
|
||||
interrupts = <11 1>;
|
||||
};
|
||||
|
||||
plb {
|
||||
compatible = "ibm,plb-460ex", "ibm,plb4";
|
||||
#address-cells = <2>;
|
||||
|
@ -343,6 +354,7 @@
|
|||
* later cannot be changed
|
||||
*/
|
||||
ranges = <0x02000000 0x00000000 0x80000000 0x0000000d 0x80000000 0x00000000 0x80000000
|
||||
0x02000000 0x00000000 0x00000000 0x0000000c 0x0ee00000 0x00000000 0x00100000
|
||||
0x01000000 0x00000000 0x00000000 0x0000000c 0x08000000 0x00000000 0x00010000>;
|
||||
|
||||
/* Inbound 2GB range starting at 0 */
|
||||
|
@ -373,6 +385,7 @@
|
|||
* later cannot be changed
|
||||
*/
|
||||
ranges = <0x02000000 0x00000000 0x80000000 0x0000000e 0x00000000 0x00000000 0x80000000
|
||||
0x02000000 0x00000000 0x00000000 0x0000000f 0x00000000 0x00000000 0x00100000
|
||||
0x01000000 0x00000000 0x00000000 0x0000000f 0x80000000 0x00000000 0x00010000>;
|
||||
|
||||
/* Inbound 2GB range starting at 0 */
|
||||
|
@ -414,6 +427,7 @@
|
|||
* later cannot be changed
|
||||
*/
|
||||
ranges = <0x02000000 0x00000000 0x80000000 0x0000000e 0x80000000 0x00000000 0x80000000
|
||||
0x02000000 0x00000000 0x00000000 0x0000000f 0x00100000 0x00000000 0x00100000
|
||||
0x01000000 0x00000000 0x00000000 0x0000000f 0x80010000 0x00000000 0x00010000>;
|
||||
|
||||
/* Inbound 2GB range starting at 0 */
|
||||
|
|
|
@ -98,6 +98,12 @@
|
|||
interrupt-parent = <&mpic>;
|
||||
|
||||
};
|
||||
gef_gpio: gpio@7,14000 {
|
||||
#gpio-cells = <2>;
|
||||
compatible = "gef,sbc610-gpio";
|
||||
reg = <0x7 0x14000 0x24>;
|
||||
gpio-controller;
|
||||
};
|
||||
};
|
||||
|
||||
soc@fef00000 {
|
||||
|
@ -119,6 +125,11 @@
|
|||
interrupt-parent = <&mpic>;
|
||||
dfsrr;
|
||||
|
||||
rtc@51 {
|
||||
compatible = "epson,rx8581";
|
||||
reg = <0x00000051>;
|
||||
};
|
||||
|
||||
eti@6b {
|
||||
compatible = "dallas,ds1682";
|
||||
reg = <0x6b>;
|
||||
|
|
|
@ -141,8 +141,26 @@
|
|||
reg = <0x2>;
|
||||
device_type = "ethernet-phy";
|
||||
};
|
||||
|
||||
tbi0: tbi-phy@11 {
|
||||
reg = <0x11>;
|
||||
device_type = "tbi-phy";
|
||||
};
|
||||
};
|
||||
|
||||
mdio@25520 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "fsl,gianfar-tbi";
|
||||
reg = <0x25520 0x20>;
|
||||
|
||||
tbi1: tbi-phy@11 {
|
||||
reg = <0x11>;
|
||||
device_type = "tbi-phy";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
enet0: ethernet@24000 {
|
||||
device_type = "network";
|
||||
model = "TSEC";
|
||||
|
@ -152,6 +170,7 @@
|
|||
local-mac-address = [ 00 00 00 00 00 00 ];
|
||||
interrupts = <0x1d 0x2 0x1e 0x2 0x22 0x2>;
|
||||
interrupt-parent = <&mpic>;
|
||||
tbi-handle = <&tbi0>;
|
||||
phy-handle = <&PHY1>;
|
||||
};
|
||||
|
||||
|
@ -164,6 +183,7 @@
|
|||
local-mac-address = [ 00 00 00 00 00 00 ];
|
||||
interrupts = <0x23 0x2 0x24 0x2 0x28 0x2>;
|
||||
interrupt-parent = <&mpic>;
|
||||
tbi-handle = <&tbi1>;
|
||||
phy-handle = <&PHY2>;
|
||||
};
|
||||
|
||||
|
|
|
@ -76,7 +76,6 @@ XXXX add flash parts, rtc, ??
|
|||
interrupt-parent = <&mpic>;
|
||||
|
||||
rtc@32 {
|
||||
device_type = "rtc";
|
||||
compatible = "ricoh,rs5c372a";
|
||||
reg = <0x32>;
|
||||
};
|
||||
|
|
|
@ -76,7 +76,6 @@ XXXX add flash parts, rtc, ??
|
|||
interrupt-parent = <&mpic>;
|
||||
|
||||
rtc@32 {
|
||||
device_type = "rtc";
|
||||
compatible = "ricoh,rs5c372a";
|
||||
reg = <0x32>;
|
||||
};
|
||||
|
|
|
@ -130,7 +130,6 @@
|
|||
|
||||
rtc@800 { // Real time clock
|
||||
compatible = "fsl,mpc5200-rtc";
|
||||
device_type = "rtc";
|
||||
reg = <0x800 0x100>;
|
||||
interrupts = <1 5 0 1 6 0>;
|
||||
interrupt-parent = <&mpc5200_pic>;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue