Merge branches 'common/dma' and 'sh/stable-updates' into sh-latest
This commit is contained in:
Коммит
d0459e1afa
|
@ -0,0 +1,56 @@
|
|||
What: /sys/class/backlight/<backlight>/<ambient light zone>_max
|
||||
What: /sys/class/backlight/<backlight>/l1_daylight_max
|
||||
What: /sys/class/backlight/<backlight>/l2_bright_max
|
||||
What: /sys/class/backlight/<backlight>/l3_office_max
|
||||
What: /sys/class/backlight/<backlight>/l4_indoor_max
|
||||
What: /sys/class/backlight/<backlight>/l5_dark_max
|
||||
Date: Mai 2011
|
||||
KernelVersion: 2.6.40
|
||||
Contact: device-drivers-devel@blackfin.uclinux.org
|
||||
Description:
|
||||
Control the maximum brightness for <ambient light zone>
|
||||
on this <backlight>. Values are between 0 and 127. This file
|
||||
will also show the brightness level stored for this
|
||||
<ambient light zone>.
|
||||
|
||||
What: /sys/class/backlight/<backlight>/<ambient light zone>_dim
|
||||
What: /sys/class/backlight/<backlight>/l2_bright_dim
|
||||
What: /sys/class/backlight/<backlight>/l3_office_dim
|
||||
What: /sys/class/backlight/<backlight>/l4_indoor_dim
|
||||
What: /sys/class/backlight/<backlight>/l5_dark_dim
|
||||
Date: Mai 2011
|
||||
KernelVersion: 2.6.40
|
||||
Contact: device-drivers-devel@blackfin.uclinux.org
|
||||
Description:
|
||||
Control the dim brightness for <ambient light zone>
|
||||
on this <backlight>. Values are between 0 and 127, typically
|
||||
set to 0. Full off when the backlight is disabled.
|
||||
This file will also show the dim brightness level stored for
|
||||
this <ambient light zone>.
|
||||
|
||||
What: /sys/class/backlight/<backlight>/ambient_light_level
|
||||
Date: Mai 2011
|
||||
KernelVersion: 2.6.40
|
||||
Contact: device-drivers-devel@blackfin.uclinux.org
|
||||
Description:
|
||||
Get conversion value of the light sensor.
|
||||
This value is updated every 80 ms (when the light sensor
|
||||
is enabled). Returns integer between 0 (dark) and
|
||||
8000 (max ambient brightness)
|
||||
|
||||
What: /sys/class/backlight/<backlight>/ambient_light_zone
|
||||
Date: Mai 2011
|
||||
KernelVersion: 2.6.40
|
||||
Contact: device-drivers-devel@blackfin.uclinux.org
|
||||
Description:
|
||||
Get/Set current ambient light zone. Reading returns
|
||||
integer between 1..5 (1 = daylight, 2 = bright, ..., 5 = dark).
|
||||
Writing a value between 1..5 forces the backlight controller
|
||||
to enter the corresponding ambient light zone.
|
||||
Writing 0 returns to normal/automatic ambient light level
|
||||
operation. The ambient light sensing feature on these devices
|
||||
is an extension to the API documented in
|
||||
Documentation/ABI/stable/sysfs-class-backlight.
|
||||
It can be enabled by writing the value stored in
|
||||
/sys/class/backlight/<backlight>/max_brightness to
|
||||
/sys/class/backlight/<backlight>/brightness.
|
|
@ -21,7 +21,7 @@ information will not be available.
|
|||
To extract cgroup statistics a utility very similar to getdelays.c
|
||||
has been developed, the sample output of the utility is shown below
|
||||
|
||||
~/balbir/cgroupstats # ./getdelays -C "/cgroup/a"
|
||||
~/balbir/cgroupstats # ./getdelays -C "/sys/fs/cgroup/a"
|
||||
sleeping 1, blocked 0, running 1, stopped 0, uninterruptible 0
|
||||
~/balbir/cgroupstats # ./getdelays -C "/cgroup"
|
||||
~/balbir/cgroupstats # ./getdelays -C "/sys/fs/cgroup"
|
||||
sleeping 155, blocked 0, running 1, stopped 0, uninterruptible 2
|
||||
|
|
|
@ -28,16 +28,19 @@ cgroups. Here is what you can do.
|
|||
- Enable group scheduling in CFQ
|
||||
CONFIG_CFQ_GROUP_IOSCHED=y
|
||||
|
||||
- Compile and boot into kernel and mount IO controller (blkio).
|
||||
- Compile and boot into kernel and mount IO controller (blkio); see
|
||||
cgroups.txt, Why are cgroups needed?.
|
||||
|
||||
mount -t cgroup -o blkio none /cgroup
|
||||
mount -t tmpfs cgroup_root /sys/fs/cgroup
|
||||
mkdir /sys/fs/cgroup/blkio
|
||||
mount -t cgroup -o blkio none /sys/fs/cgroup/blkio
|
||||
|
||||
- Create two cgroups
|
||||
mkdir -p /cgroup/test1/ /cgroup/test2
|
||||
mkdir -p /sys/fs/cgroup/blkio/test1/ /sys/fs/cgroup/blkio/test2
|
||||
|
||||
- Set weights of group test1 and test2
|
||||
echo 1000 > /cgroup/test1/blkio.weight
|
||||
echo 500 > /cgroup/test2/blkio.weight
|
||||
echo 1000 > /sys/fs/cgroup/blkio/test1/blkio.weight
|
||||
echo 500 > /sys/fs/cgroup/blkio/test2/blkio.weight
|
||||
|
||||
- Create two same size files (say 512MB each) on same disk (file1, file2) and
|
||||
launch two dd threads in different cgroup to read those files.
|
||||
|
@ -46,12 +49,12 @@ cgroups. Here is what you can do.
|
|||
echo 3 > /proc/sys/vm/drop_caches
|
||||
|
||||
dd if=/mnt/sdb/zerofile1 of=/dev/null &
|
||||
echo $! > /cgroup/test1/tasks
|
||||
cat /cgroup/test1/tasks
|
||||
echo $! > /sys/fs/cgroup/blkio/test1/tasks
|
||||
cat /sys/fs/cgroup/blkio/test1/tasks
|
||||
|
||||
dd if=/mnt/sdb/zerofile2 of=/dev/null &
|
||||
echo $! > /cgroup/test2/tasks
|
||||
cat /cgroup/test2/tasks
|
||||
echo $! > /sys/fs/cgroup/blkio/test2/tasks
|
||||
cat /sys/fs/cgroup/blkio/test2/tasks
|
||||
|
||||
- At macro level, first dd should finish first. To get more precise data, keep
|
||||
on looking at (with the help of script), at blkio.disk_time and
|
||||
|
@ -68,13 +71,13 @@ Throttling/Upper Limit policy
|
|||
- Enable throttling in block layer
|
||||
CONFIG_BLK_DEV_THROTTLING=y
|
||||
|
||||
- Mount blkio controller
|
||||
mount -t cgroup -o blkio none /cgroup/blkio
|
||||
- Mount blkio controller (see cgroups.txt, Why are cgroups needed?)
|
||||
mount -t cgroup -o blkio none /sys/fs/cgroup/blkio
|
||||
|
||||
- Specify a bandwidth rate on particular device for root group. The format
|
||||
for policy is "<major>:<minor> <byes_per_second>".
|
||||
|
||||
echo "8:16 1048576" > /cgroup/blkio/blkio.read_bps_device
|
||||
echo "8:16 1048576" > /sys/fs/cgroup/blkio/blkio.read_bps_device
|
||||
|
||||
Above will put a limit of 1MB/second on reads happening for root group
|
||||
on device having major/minor number 8:16.
|
||||
|
@ -108,7 +111,7 @@ Hierarchical Cgroups
|
|||
CFQ and throttling will practically treat all groups at same level.
|
||||
|
||||
pivot
|
||||
/ | \ \
|
||||
/ / \ \
|
||||
root test1 test2 test3
|
||||
|
||||
Down the line we can implement hierarchical accounting/control support
|
||||
|
@ -149,7 +152,7 @@ Proportional weight policy files
|
|||
|
||||
Following is the format.
|
||||
|
||||
#echo dev_maj:dev_minor weight > /path/to/cgroup/blkio.weight_device
|
||||
# echo dev_maj:dev_minor weight > blkio.weight_device
|
||||
Configure weight=300 on /dev/sdb (8:16) in this cgroup
|
||||
# echo 8:16 300 > blkio.weight_device
|
||||
# cat blkio.weight_device
|
||||
|
|
|
@ -138,11 +138,11 @@ With the ability to classify tasks differently for different resources
|
|||
the admin can easily set up a script which receives exec notifications
|
||||
and depending on who is launching the browser he can
|
||||
|
||||
# echo browser_pid > /mnt/<restype>/<userclass>/tasks
|
||||
# echo browser_pid > /sys/fs/cgroup/<restype>/<userclass>/tasks
|
||||
|
||||
With only a single hierarchy, he now would potentially have to create
|
||||
a separate cgroup for every browser launched and associate it with
|
||||
approp network and other resource class. This may lead to
|
||||
appropriate network and other resource class. This may lead to
|
||||
proliferation of such cgroups.
|
||||
|
||||
Also lets say that the administrator would like to give enhanced network
|
||||
|
@ -153,9 +153,9 @@ apps enhanced CPU power,
|
|||
With ability to write pids directly to resource classes, it's just a
|
||||
matter of :
|
||||
|
||||
# echo pid > /mnt/network/<new_class>/tasks
|
||||
# echo pid > /sys/fs/cgroup/network/<new_class>/tasks
|
||||
(after some time)
|
||||
# echo pid > /mnt/network/<orig_class>/tasks
|
||||
# echo pid > /sys/fs/cgroup/network/<orig_class>/tasks
|
||||
|
||||
Without this ability, he would have to split the cgroup into
|
||||
multiple separate ones and then associate the new cgroups with the
|
||||
|
@ -310,21 +310,24 @@ subsystem, this is the case for the cpuset.
|
|||
To start a new job that is to be contained within a cgroup, using
|
||||
the "cpuset" cgroup subsystem, the steps are something like:
|
||||
|
||||
1) mkdir /dev/cgroup
|
||||
2) mount -t cgroup -ocpuset cpuset /dev/cgroup
|
||||
3) Create the new cgroup by doing mkdir's and write's (or echo's) in
|
||||
the /dev/cgroup virtual file system.
|
||||
4) Start a task that will be the "founding father" of the new job.
|
||||
5) Attach that task to the new cgroup by writing its pid to the
|
||||
/dev/cgroup tasks file for that cgroup.
|
||||
6) fork, exec or clone the job tasks from this founding father task.
|
||||
1) mount -t tmpfs cgroup_root /sys/fs/cgroup
|
||||
2) mkdir /sys/fs/cgroup/cpuset
|
||||
3) mount -t cgroup -ocpuset cpuset /sys/fs/cgroup/cpuset
|
||||
4) Create the new cgroup by doing mkdir's and write's (or echo's) in
|
||||
the /sys/fs/cgroup virtual file system.
|
||||
5) Start a task that will be the "founding father" of the new job.
|
||||
6) Attach that task to the new cgroup by writing its pid to the
|
||||
/sys/fs/cgroup/cpuset/tasks file for that cgroup.
|
||||
7) fork, exec or clone the job tasks from this founding father task.
|
||||
|
||||
For example, the following sequence of commands will setup a cgroup
|
||||
named "Charlie", containing just CPUs 2 and 3, and Memory Node 1,
|
||||
and then start a subshell 'sh' in that cgroup:
|
||||
|
||||
mount -t cgroup cpuset -ocpuset /dev/cgroup
|
||||
cd /dev/cgroup
|
||||
mount -t tmpfs cgroup_root /sys/fs/cgroup
|
||||
mkdir /sys/fs/cgroup/cpuset
|
||||
mount -t cgroup cpuset -ocpuset /sys/fs/cgroup/cpuset
|
||||
cd /sys/fs/cgroup/cpuset
|
||||
mkdir Charlie
|
||||
cd Charlie
|
||||
/bin/echo 2-3 > cpuset.cpus
|
||||
|
@ -345,7 +348,7 @@ Creating, modifying, using the cgroups can be done through the cgroup
|
|||
virtual filesystem.
|
||||
|
||||
To mount a cgroup hierarchy with all available subsystems, type:
|
||||
# mount -t cgroup xxx /dev/cgroup
|
||||
# mount -t cgroup xxx /sys/fs/cgroup
|
||||
|
||||
The "xxx" is not interpreted by the cgroup code, but will appear in
|
||||
/proc/mounts so may be any useful identifying string that you like.
|
||||
|
@ -354,23 +357,32 @@ Note: Some subsystems do not work without some user input first. For instance,
|
|||
if cpusets are enabled the user will have to populate the cpus and mems files
|
||||
for each new cgroup created before that group can be used.
|
||||
|
||||
As explained in section `1.2 Why are cgroups needed?' you should create
|
||||
different hierarchies of cgroups for each single resource or group of
|
||||
resources you want to control. Therefore, you should mount a tmpfs on
|
||||
/sys/fs/cgroup and create directories for each cgroup resource or resource
|
||||
group.
|
||||
|
||||
# mount -t tmpfs cgroup_root /sys/fs/cgroup
|
||||
# mkdir /sys/fs/cgroup/rg1
|
||||
|
||||
To mount a cgroup hierarchy with just the cpuset and memory
|
||||
subsystems, type:
|
||||
# mount -t cgroup -o cpuset,memory hier1 /dev/cgroup
|
||||
# mount -t cgroup -o cpuset,memory hier1 /sys/fs/cgroup/rg1
|
||||
|
||||
To change the set of subsystems bound to a mounted hierarchy, just
|
||||
remount with different options:
|
||||
# mount -o remount,cpuset,blkio hier1 /dev/cgroup
|
||||
# mount -o remount,cpuset,blkio hier1 /sys/fs/cgroup/rg1
|
||||
|
||||
Now memory is removed from the hierarchy and blkio is added.
|
||||
|
||||
Note this will add blkio to the hierarchy but won't remove memory or
|
||||
cpuset, because the new options are appended to the old ones:
|
||||
# mount -o remount,blkio /dev/cgroup
|
||||
# mount -o remount,blkio /sys/fs/cgroup/rg1
|
||||
|
||||
To Specify a hierarchy's release_agent:
|
||||
# mount -t cgroup -o cpuset,release_agent="/sbin/cpuset_release_agent" \
|
||||
xxx /dev/cgroup
|
||||
xxx /sys/fs/cgroup/rg1
|
||||
|
||||
Note that specifying 'release_agent' more than once will return failure.
|
||||
|
||||
|
@ -379,17 +391,17 @@ when the hierarchy consists of a single (root) cgroup. Supporting
|
|||
the ability to arbitrarily bind/unbind subsystems from an existing
|
||||
cgroup hierarchy is intended to be implemented in the future.
|
||||
|
||||
Then under /dev/cgroup you can find a tree that corresponds to the
|
||||
tree of the cgroups in the system. For instance, /dev/cgroup
|
||||
Then under /sys/fs/cgroup/rg1 you can find a tree that corresponds to the
|
||||
tree of the cgroups in the system. For instance, /sys/fs/cgroup/rg1
|
||||
is the cgroup that holds the whole system.
|
||||
|
||||
If you want to change the value of release_agent:
|
||||
# echo "/sbin/new_release_agent" > /dev/cgroup/release_agent
|
||||
# echo "/sbin/new_release_agent" > /sys/fs/cgroup/rg1/release_agent
|
||||
|
||||
It can also be changed via remount.
|
||||
|
||||
If you want to create a new cgroup under /dev/cgroup:
|
||||
# cd /dev/cgroup
|
||||
If you want to create a new cgroup under /sys/fs/cgroup/rg1:
|
||||
# cd /sys/fs/cgroup/rg1
|
||||
# mkdir my_cgroup
|
||||
|
||||
Now you want to do something with this cgroup.
|
||||
|
|
|
@ -10,26 +10,25 @@ directly present in its group.
|
|||
|
||||
Accounting groups can be created by first mounting the cgroup filesystem.
|
||||
|
||||
# mkdir /cgroups
|
||||
# mount -t cgroup -ocpuacct none /cgroups
|
||||
# mount -t cgroup -ocpuacct none /sys/fs/cgroup
|
||||
|
||||
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
|
||||
With the above step, the initial or the parent accounting group becomes
|
||||
visible at /sys/fs/cgroup. At bootup, this group includes all the tasks in
|
||||
the system. /sys/fs/cgroup/tasks lists the tasks in this cgroup.
|
||||
/sys/fs/cgroup/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.
|
||||
New accounting groups can be created under the parent group /sys/fs/cgroup.
|
||||
|
||||
# cd /cgroups
|
||||
# cd /sys/fs/cgroup
|
||||
# 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.
|
||||
/sys/fs/cgroup/cpuacct.usage also.
|
||||
|
||||
cpuacct.stat file lists a few statistics which further divide the
|
||||
CPU time obtained by the cgroup into user and system times. Currently
|
||||
|
|
|
@ -661,21 +661,21 @@ than stress the kernel.
|
|||
|
||||
To start a new job that is to be contained within a cpuset, the steps are:
|
||||
|
||||
1) mkdir /dev/cpuset
|
||||
2) mount -t cgroup -ocpuset cpuset /dev/cpuset
|
||||
1) mkdir /sys/fs/cgroup/cpuset
|
||||
2) mount -t cgroup -ocpuset cpuset /sys/fs/cgroup/cpuset
|
||||
3) Create the new cpuset by doing mkdir's and write's (or echo's) in
|
||||
the /dev/cpuset virtual file system.
|
||||
the /sys/fs/cgroup/cpuset virtual file system.
|
||||
4) Start a task that will be the "founding father" of the new job.
|
||||
5) Attach that task to the new cpuset by writing its pid to the
|
||||
/dev/cpuset tasks file for that cpuset.
|
||||
/sys/fs/cgroup/cpuset tasks file for that cpuset.
|
||||
6) fork, exec or clone the job tasks from this founding father task.
|
||||
|
||||
For example, the following sequence of commands will setup a cpuset
|
||||
named "Charlie", containing just CPUs 2 and 3, and Memory Node 1,
|
||||
and then start a subshell 'sh' in that cpuset:
|
||||
|
||||
mount -t cgroup -ocpuset cpuset /dev/cpuset
|
||||
cd /dev/cpuset
|
||||
mount -t cgroup -ocpuset cpuset /sys/fs/cgroup/cpuset
|
||||
cd /sys/fs/cgroup/cpuset
|
||||
mkdir Charlie
|
||||
cd Charlie
|
||||
/bin/echo 2-3 > cpuset.cpus
|
||||
|
@ -710,14 +710,14 @@ Creating, modifying, using the cpusets can be done through the cpuset
|
|||
virtual filesystem.
|
||||
|
||||
To mount it, type:
|
||||
# mount -t cgroup -o cpuset cpuset /dev/cpuset
|
||||
# mount -t cgroup -o cpuset cpuset /sys/fs/cgroup/cpuset
|
||||
|
||||
Then under /dev/cpuset you can find a tree that corresponds to the
|
||||
tree of the cpusets in the system. For instance, /dev/cpuset
|
||||
Then under /sys/fs/cgroup/cpuset you can find a tree that corresponds to the
|
||||
tree of the cpusets in the system. For instance, /sys/fs/cgroup/cpuset
|
||||
is the cpuset that holds the whole system.
|
||||
|
||||
If you want to create a new cpuset under /dev/cpuset:
|
||||
# cd /dev/cpuset
|
||||
If you want to create a new cpuset under /sys/fs/cgroup/cpuset:
|
||||
# cd /sys/fs/cgroup/cpuset
|
||||
# mkdir my_cpuset
|
||||
|
||||
Now you want to do something with this cpuset.
|
||||
|
@ -765,12 +765,12 @@ wrapper around the cgroup filesystem.
|
|||
|
||||
The command
|
||||
|
||||
mount -t cpuset X /dev/cpuset
|
||||
mount -t cpuset X /sys/fs/cgroup/cpuset
|
||||
|
||||
is equivalent to
|
||||
|
||||
mount -t cgroup -ocpuset,noprefix X /dev/cpuset
|
||||
echo "/sbin/cpuset_release_agent" > /dev/cpuset/release_agent
|
||||
mount -t cgroup -ocpuset,noprefix X /sys/fs/cgroup/cpuset
|
||||
echo "/sbin/cpuset_release_agent" > /sys/fs/cgroup/cpuset/release_agent
|
||||
|
||||
2.2 Adding/removing cpus
|
||||
------------------------
|
||||
|
|
|
@ -22,16 +22,16 @@ removed from the child(ren).
|
|||
An entry is added using devices.allow, and removed using
|
||||
devices.deny. For instance
|
||||
|
||||
echo 'c 1:3 mr' > /cgroups/1/devices.allow
|
||||
echo 'c 1:3 mr' > /sys/fs/cgroup/1/devices.allow
|
||||
|
||||
allows cgroup 1 to read and mknod the device usually known as
|
||||
/dev/null. Doing
|
||||
|
||||
echo a > /cgroups/1/devices.deny
|
||||
echo a > /sys/fs/cgroup/1/devices.deny
|
||||
|
||||
will remove the default 'a *:* rwm' entry. Doing
|
||||
|
||||
echo a > /cgroups/1/devices.allow
|
||||
echo a > /sys/fs/cgroup/1/devices.allow
|
||||
|
||||
will add the 'a *:* rwm' entry to the whitelist.
|
||||
|
||||
|
|
|
@ -59,28 +59,28 @@ is non-freezable.
|
|||
|
||||
* Examples of usage :
|
||||
|
||||
# mkdir /containers
|
||||
# mount -t cgroup -ofreezer freezer /containers
|
||||
# mkdir /containers/0
|
||||
# echo $some_pid > /containers/0/tasks
|
||||
# mkdir /sys/fs/cgroup/freezer
|
||||
# mount -t cgroup -ofreezer freezer /sys/fs/cgroup/freezer
|
||||
# mkdir /sys/fs/cgroup/freezer/0
|
||||
# echo $some_pid > /sys/fs/cgroup/freezer/0/tasks
|
||||
|
||||
to get status of the freezer subsystem :
|
||||
|
||||
# cat /containers/0/freezer.state
|
||||
# cat /sys/fs/cgroup/freezer/0/freezer.state
|
||||
THAWED
|
||||
|
||||
to freeze all tasks in the container :
|
||||
|
||||
# echo FROZEN > /containers/0/freezer.state
|
||||
# cat /containers/0/freezer.state
|
||||
# echo FROZEN > /sys/fs/cgroup/freezer/0/freezer.state
|
||||
# cat /sys/fs/cgroup/freezer/0/freezer.state
|
||||
FREEZING
|
||||
# cat /containers/0/freezer.state
|
||||
# cat /sys/fs/cgroup/freezer/0/freezer.state
|
||||
FROZEN
|
||||
|
||||
to unfreeze all tasks in the container :
|
||||
|
||||
# echo THAWED > /containers/0/freezer.state
|
||||
# cat /containers/0/freezer.state
|
||||
# echo THAWED > /sys/fs/cgroup/freezer/0/freezer.state
|
||||
# cat /sys/fs/cgroup/freezer/0/freezer.state
|
||||
THAWED
|
||||
|
||||
This is the basic mechanism which should do the right thing for user space task
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
Memory Resource Controller
|
||||
|
||||
NOTE: The Memory Resource Controller has been generically been referred
|
||||
to as the memory controller in this document. Do not confuse memory
|
||||
controller used here with the memory controller that is used in hardware.
|
||||
NOTE: The Memory Resource Controller has generically been referred to as the
|
||||
memory controller in this document. Do not confuse memory controller
|
||||
used here with the memory controller that is used in hardware.
|
||||
|
||||
(For editors)
|
||||
In this document:
|
||||
|
@ -70,6 +70,7 @@ Brief summary of control files.
|
|||
(See sysctl's vm.swappiness)
|
||||
memory.move_charge_at_immigrate # set/show controls of moving charges
|
||||
memory.oom_control # set/show oom controls.
|
||||
memory.numa_stat # show the number of memory usage per numa node
|
||||
|
||||
1. History
|
||||
|
||||
|
@ -181,7 +182,7 @@ behind this approach is that a cgroup that aggressively uses a shared
|
|||
page will eventually get charged for it (once it is uncharged from
|
||||
the cgroup that brought it in -- this will happen on memory pressure).
|
||||
|
||||
Exception: If CONFIG_CGROUP_CGROUP_MEM_RES_CTLR_SWAP is not used..
|
||||
Exception: If CONFIG_CGROUP_CGROUP_MEM_RES_CTLR_SWAP is not used.
|
||||
When you do swapoff and make swapped-out pages of shmem(tmpfs) to
|
||||
be backed into memory in force, charges for pages are accounted against the
|
||||
caller of swapoff rather than the users of shmem.
|
||||
|
@ -213,7 +214,7 @@ affecting global LRU, memory+swap limit is better than just limiting swap from
|
|||
OS point of view.
|
||||
|
||||
* What happens when a cgroup hits memory.memsw.limit_in_bytes
|
||||
When a cgroup his memory.memsw.limit_in_bytes, it's useless to do swap-out
|
||||
When a cgroup hits memory.memsw.limit_in_bytes, it's useless to do swap-out
|
||||
in this cgroup. Then, swap-out will not be done by cgroup routine and file
|
||||
caches are dropped. But as mentioned above, global LRU can do swapout memory
|
||||
from it for sanity of the system's memory management state. You can't forbid
|
||||
|
@ -263,16 +264,17 @@ b. Enable CONFIG_RESOURCE_COUNTERS
|
|||
c. Enable CONFIG_CGROUP_MEM_RES_CTLR
|
||||
d. Enable CONFIG_CGROUP_MEM_RES_CTLR_SWAP (to use swap extension)
|
||||
|
||||
1. Prepare the cgroups
|
||||
# mkdir -p /cgroups
|
||||
# mount -t cgroup none /cgroups -o memory
|
||||
1. Prepare the cgroups (see cgroups.txt, Why are cgroups needed?)
|
||||
# mount -t tmpfs none /sys/fs/cgroup
|
||||
# mkdir /sys/fs/cgroup/memory
|
||||
# mount -t cgroup none /sys/fs/cgroup/memory -o memory
|
||||
|
||||
2. Make the new group and move bash into it
|
||||
# mkdir /cgroups/0
|
||||
# echo $$ > /cgroups/0/tasks
|
||||
# mkdir /sys/fs/cgroup/memory/0
|
||||
# echo $$ > /sys/fs/cgroup/memory/0/tasks
|
||||
|
||||
Since now we're in the 0 cgroup, we can alter the memory limit:
|
||||
# echo 4M > /cgroups/0/memory.limit_in_bytes
|
||||
# echo 4M > /sys/fs/cgroup/memory/0/memory.limit_in_bytes
|
||||
|
||||
NOTE: We can use a suffix (k, K, m, M, g or G) to indicate values in kilo,
|
||||
mega or gigabytes. (Here, Kilo, Mega, Giga are Kibibytes, Mebibytes, Gibibytes.)
|
||||
|
@ -280,11 +282,11 @@ mega or gigabytes. (Here, Kilo, Mega, Giga are Kibibytes, Mebibytes, Gibibytes.)
|
|||
NOTE: We can write "-1" to reset the *.limit_in_bytes(unlimited).
|
||||
NOTE: We cannot set limits on the root cgroup any more.
|
||||
|
||||
# cat /cgroups/0/memory.limit_in_bytes
|
||||
# cat /sys/fs/cgroup/memory/0/memory.limit_in_bytes
|
||||
4194304
|
||||
|
||||
We can check the usage:
|
||||
# cat /cgroups/0/memory.usage_in_bytes
|
||||
# cat /sys/fs/cgroup/memory/0/memory.usage_in_bytes
|
||||
1216512
|
||||
|
||||
A successful write to this file does not guarantee a successful set of
|
||||
|
@ -464,6 +466,24 @@ value for efficient access. (Of course, when necessary, it's synchronized.)
|
|||
If you want to know more exact memory usage, you should use RSS+CACHE(+SWAP)
|
||||
value in memory.stat(see 5.2).
|
||||
|
||||
5.6 numa_stat
|
||||
|
||||
This is similar to numa_maps but operates on a per-memcg basis. This is
|
||||
useful for providing visibility into the numa locality information within
|
||||
an memcg since the pages are allowed to be allocated from any physical
|
||||
node. One of the usecases is evaluating application performance by
|
||||
combining this information with the application's cpu allocation.
|
||||
|
||||
We export "total", "file", "anon" and "unevictable" pages per-node for
|
||||
each memcg. The ouput format of memory.numa_stat is:
|
||||
|
||||
total=<total pages> N0=<node 0 pages> N1=<node 1 pages> ...
|
||||
file=<total file pages> N0=<node 0 pages> N1=<node 1 pages> ...
|
||||
anon=<total anon pages> N0=<node 0 pages> N1=<node 1 pages> ...
|
||||
unevictable=<total anon pages> N0=<node 0 pages> N1=<node 1 pages> ...
|
||||
|
||||
And we have total = file + anon + unevictable.
|
||||
|
||||
6. Hierarchy support
|
||||
|
||||
The memory controller supports a deep hierarchy and hierarchical accounting.
|
||||
|
@ -471,13 +491,13 @@ The hierarchy is created by creating the appropriate cgroups in the
|
|||
cgroup filesystem. Consider for example, the following cgroup filesystem
|
||||
hierarchy
|
||||
|
||||
root
|
||||
root
|
||||
/ | \
|
||||
/ | \
|
||||
a b c
|
||||
| \
|
||||
| \
|
||||
d e
|
||||
/ | \
|
||||
a b c
|
||||
| \
|
||||
| \
|
||||
d e
|
||||
|
||||
In the diagram above, with hierarchical accounting enabled, all memory
|
||||
usage of e, is accounted to its ancestors up until the root (i.e, c and root),
|
||||
|
|
|
@ -481,23 +481,6 @@ Who: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|||
|
||||
----------------------------
|
||||
|
||||
What: namespace cgroup (ns_cgroup)
|
||||
When: 2.6.38
|
||||
Why: The ns_cgroup leads to some problems:
|
||||
* cgroup creation is out-of-control
|
||||
* cgroup name can conflict when pids are looping
|
||||
* it is not possible to have a single process handling
|
||||
a lot of namespaces without falling in a exponential creation time
|
||||
* we may want to create a namespace without creating a cgroup
|
||||
|
||||
The ns_cgroup is replaced by a compatibility flag 'clone_children',
|
||||
where a newly created cgroup will copy the parent cgroup values.
|
||||
The userspace has to manually create a cgroup and add a task to
|
||||
the 'tasks' file.
|
||||
Who: Daniel Lezcano <daniel.lezcano@free.fr>
|
||||
|
||||
----------------------------
|
||||
|
||||
What: iwlwifi disable_hw_scan module parameters
|
||||
When: 2.6.40
|
||||
Why: Hareware scan is the prefer method for iwlwifi devices for
|
||||
|
|
|
@ -11,7 +11,9 @@ with the difference that the orphan objects are not freed but only
|
|||
reported via /sys/kernel/debug/kmemleak. A similar method is used by the
|
||||
Valgrind tool (memcheck --leak-check) to detect the memory leaks in
|
||||
user-space applications.
|
||||
Kmemleak is supported on x86, arm, powerpc, sparc, sh, microblaze and tile.
|
||||
|
||||
Please check DEBUG_KMEMLEAK dependencies in lib/Kconfig.debug for supported
|
||||
architectures.
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
|
|
@ -555,7 +555,7 @@ also have
|
|||
sync_min
|
||||
sync_max
|
||||
The two values, given as numbers of sectors, indicate a range
|
||||
withing the array where 'check'/'repair' will operate. Must be
|
||||
within the array where 'check'/'repair' will operate. Must be
|
||||
a multiple of chunk_size. When it reaches "sync_max" it will
|
||||
pause, rather than complete.
|
||||
You can use 'select' or 'poll' on "sync_completed" to wait for
|
||||
|
|
|
@ -9,7 +9,121 @@ If variable is of Type, use printk format specifier:
|
|||
size_t %zu or %zx
|
||||
ssize_t %zd or %zx
|
||||
|
||||
Raw pointer value SHOULD be printed with %p.
|
||||
Raw pointer value SHOULD be printed with %p. The kernel supports
|
||||
the following extended format specifiers for pointer types:
|
||||
|
||||
Symbols/Function Pointers:
|
||||
|
||||
%pF versatile_init+0x0/0x110
|
||||
%pf versatile_init
|
||||
%pS versatile_init+0x0/0x110
|
||||
%ps versatile_init
|
||||
%pB prev_fn_of_versatile_init+0x88/0x88
|
||||
|
||||
For printing symbols and function pointers. The 'S' and 's' specifiers
|
||||
result in the symbol name with ('S') or without ('s') offsets. Where
|
||||
this is used on a kernel without KALLSYMS - the symbol address is
|
||||
printed instead.
|
||||
|
||||
The 'B' specifier results in the symbol name with offsets and should be
|
||||
used when printing stack backtraces. The specifier takes into
|
||||
consideration the effect of compiler optimisations which may occur
|
||||
when tail-call's are used and marked with the noreturn GCC attribute.
|
||||
|
||||
On ia64, ppc64 and parisc64 architectures function pointers are
|
||||
actually function descriptors which must first be resolved. The 'F' and
|
||||
'f' specifiers perform this resolution and then provide the same
|
||||
functionality as the 'S' and 's' specifiers.
|
||||
|
||||
Kernel Pointers:
|
||||
|
||||
%pK 0x01234567 or 0x0123456789abcdef
|
||||
|
||||
For printing kernel pointers which should be hidden from unprivileged
|
||||
users. The behaviour of %pK depends on the kptr_restrict sysctl - see
|
||||
Documentation/sysctl/kernel.txt for more details.
|
||||
|
||||
Struct Resources:
|
||||
|
||||
%pr [mem 0x60000000-0x6fffffff flags 0x2200] or
|
||||
[mem 0x0000000060000000-0x000000006fffffff flags 0x2200]
|
||||
%pR [mem 0x60000000-0x6fffffff pref] or
|
||||
[mem 0x0000000060000000-0x000000006fffffff pref]
|
||||
|
||||
For printing struct resources. The 'R' and 'r' specifiers result in a
|
||||
printed resource with ('R') or without ('r') a decoded flags member.
|
||||
|
||||
MAC/FDDI addresses:
|
||||
|
||||
%pM 00:01:02:03:04:05
|
||||
%pMF 00-01-02-03-04-05
|
||||
%pm 000102030405
|
||||
|
||||
For printing 6-byte MAC/FDDI addresses in hex notation. The 'M' and 'm'
|
||||
specifiers result in a printed address with ('M') or without ('m') byte
|
||||
separators. The default byte separator is the colon (':').
|
||||
|
||||
Where FDDI addresses are concerned the 'F' specifier can be used after
|
||||
the 'M' specifier to use dash ('-') separators instead of the default
|
||||
separator.
|
||||
|
||||
IPv4 addresses:
|
||||
|
||||
%pI4 1.2.3.4
|
||||
%pi4 001.002.003.004
|
||||
%p[Ii][hnbl]
|
||||
|
||||
For printing IPv4 dot-separated decimal addresses. The 'I4' and 'i4'
|
||||
specifiers result in a printed address with ('i4') or without ('I4')
|
||||
leading zeros.
|
||||
|
||||
The additional 'h', 'n', 'b', and 'l' specifiers are used to specify
|
||||
host, network, big or little endian order addresses respectively. Where
|
||||
no specifier is provided the default network/big endian order is used.
|
||||
|
||||
IPv6 addresses:
|
||||
|
||||
%pI6 0001:0002:0003:0004:0005:0006:0007:0008
|
||||
%pi6 00010002000300040005000600070008
|
||||
%pI6c 1:2:3:4:5:6:7:8
|
||||
|
||||
For printing IPv6 network-order 16-bit hex addresses. The 'I6' and 'i6'
|
||||
specifiers result in a printed address with ('I6') or without ('i6')
|
||||
colon-separators. Leading zeros are always used.
|
||||
|
||||
The additional 'c' specifier can be used with the 'I' specifier to
|
||||
print a compressed IPv6 address as described by
|
||||
http://tools.ietf.org/html/rfc5952
|
||||
|
||||
UUID/GUID addresses:
|
||||
|
||||
%pUb 00010203-0405-0607-0809-0a0b0c0d0e0f
|
||||
%pUB 00010203-0405-0607-0809-0A0B0C0D0E0F
|
||||
%pUl 03020100-0504-0706-0809-0a0b0c0e0e0f
|
||||
%pUL 03020100-0504-0706-0809-0A0B0C0E0E0F
|
||||
|
||||
For printing 16-byte UUID/GUIDs addresses. The additional 'l', 'L',
|
||||
'b' and 'B' specifiers are used to specify a little endian order in
|
||||
lower ('l') or upper case ('L') hex characters - and big endian order
|
||||
in lower ('b') or upper case ('B') hex characters.
|
||||
|
||||
Where no additional specifiers are used the default little endian
|
||||
order with lower case hex characters will be printed.
|
||||
|
||||
struct va_format:
|
||||
|
||||
%pV
|
||||
|
||||
For printing struct va_format structures. These contain a format string
|
||||
and va_list as follows:
|
||||
|
||||
struct va_format {
|
||||
const char *fmt;
|
||||
va_list *va;
|
||||
};
|
||||
|
||||
Do not use this feature without some mechanism to verify the
|
||||
correctness of the format string and va_list arguments.
|
||||
|
||||
u64 SHOULD be printed with %llu/%llx, (unsigned long long):
|
||||
|
||||
|
@ -32,4 +146,5 @@ Reminder: sizeof() result is of type size_t.
|
|||
Thank you for your cooperation and attention.
|
||||
|
||||
|
||||
By Randy Dunlap <rdunlap@xenotime.net>
|
||||
By Randy Dunlap <rdunlap@xenotime.net> and
|
||||
Andrew Murray <amurray@mpc-data.co.uk>
|
||||
|
|
|
@ -223,9 +223,10 @@ When CONFIG_FAIR_GROUP_SCHED is defined, a "cpu.shares" file is created for each
|
|||
group created using the pseudo filesystem. See example steps below to create
|
||||
task groups and modify their CPU share using the "cgroups" pseudo filesystem.
|
||||
|
||||
# mkdir /dev/cpuctl
|
||||
# mount -t cgroup -ocpu none /dev/cpuctl
|
||||
# cd /dev/cpuctl
|
||||
# mount -t tmpfs cgroup_root /sys/fs/cgroup
|
||||
# mkdir /sys/fs/cgroup/cpu
|
||||
# mount -t cgroup -ocpu none /sys/fs/cgroup/cpu
|
||||
# cd /sys/fs/cgroup/cpu
|
||||
|
||||
# mkdir multimedia # create "multimedia" group of tasks
|
||||
# mkdir browser # create "browser" group of tasks
|
||||
|
|
|
@ -129,9 +129,8 @@ priority!
|
|||
Enabling CONFIG_RT_GROUP_SCHED lets you explicitly allocate real
|
||||
CPU bandwidth to task groups.
|
||||
|
||||
This uses the /cgroup virtual file system and
|
||||
"/cgroup/<cgroup>/cpu.rt_runtime_us" to control the CPU time reserved for each
|
||||
control group.
|
||||
This uses the cgroup virtual file system and "<cgroup>/cpu.rt_runtime_us"
|
||||
to control the CPU time reserved for each control group.
|
||||
|
||||
For more information on working with control groups, you should read
|
||||
Documentation/cgroups/cgroups.txt as well.
|
||||
|
@ -150,7 +149,7 @@ For now, this can be simplified to just the following (but see Future plans):
|
|||
===============
|
||||
|
||||
There is work in progress to make the scheduling period for each group
|
||||
("/cgroup/<cgroup>/cpu.rt_period_us") configurable as well.
|
||||
("<cgroup>/cpu.rt_period_us") configurable as well.
|
||||
|
||||
The constraint on the period is that a subgroup must have a smaller or
|
||||
equal period to its parent. But realistically its not very useful _yet_
|
||||
|
|
|
@ -129,12 +129,12 @@ Limit injection to pages owned by memgroup. Specified by inode number
|
|||
of the memcg.
|
||||
|
||||
Example:
|
||||
mkdir /cgroup/hwpoison
|
||||
mkdir /sys/fs/cgroup/mem/hwpoison
|
||||
|
||||
usemem -m 100 -s 1000 &
|
||||
echo `jobs -p` > /cgroup/hwpoison/tasks
|
||||
echo `jobs -p` > /sys/fs/cgroup/mem/hwpoison/tasks
|
||||
|
||||
memcg_ino=$(ls -id /cgroup/hwpoison | cut -f1 -d' ')
|
||||
memcg_ino=$(ls -id /sys/fs/cgroup/mem/hwpoison | cut -f1 -d' ')
|
||||
echo $memcg_ino > /debug/hwpoison/corrupt-filter-memcg
|
||||
|
||||
page-types -p `pidof init` --hwpoison # shall do nothing
|
||||
|
|
21
MAINTAINERS
21
MAINTAINERS
|
@ -1889,7 +1889,6 @@ L: cpufreq@vger.kernel.org
|
|||
W: http://www.codemonkey.org.uk/projects/cpufreq/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq.git
|
||||
S: Maintained
|
||||
F: arch/x86/kernel/cpu/cpufreq/
|
||||
F: drivers/cpufreq/
|
||||
F: include/linux/cpufreq.h
|
||||
|
||||
|
@ -3820,6 +3819,12 @@ S: Maintained
|
|||
F: drivers/leds/
|
||||
F: include/linux/leds.h
|
||||
|
||||
LEGACY EEPROM DRIVER
|
||||
M: Jean Delvare <khali@linux-fr.org>
|
||||
S: Maintained
|
||||
F: Documentation/misc-devices/eeprom
|
||||
F: drivers/misc/eeprom/eeprom.c
|
||||
|
||||
LEGO USB Tower driver
|
||||
M: Juergen Stuber <starblue@users.sourceforge.net>
|
||||
L: legousb-devel@lists.sourceforge.net
|
||||
|
@ -4145,7 +4150,7 @@ F: include/linux/mm.h
|
|||
F: mm/
|
||||
|
||||
MEMORY RESOURCE CONTROLLER
|
||||
M: Balbir Singh <balbir@linux.vnet.ibm.com>
|
||||
M: Balbir Singh <bsingharora@gmail.com>
|
||||
M: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
|
||||
M: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
|
||||
L: linux-mm@kvack.org
|
||||
|
@ -4890,7 +4895,7 @@ F: mm/percpu*.c
|
|||
F: arch/*/include/asm/percpu.h
|
||||
|
||||
PER-TASK DELAY ACCOUNTING
|
||||
M: Balbir Singh <balbir@linux.vnet.ibm.com>
|
||||
M: Balbir Singh <bsingharora@gmail.com>
|
||||
S: Maintained
|
||||
F: include/linux/delayacct.h
|
||||
F: kernel/delayacct.c
|
||||
|
@ -6098,7 +6103,7 @@ F: include/target/
|
|||
F: Documentation/target/
|
||||
|
||||
TASKSTATS STATISTICS INTERFACE
|
||||
M: Balbir Singh <balbir@linux.vnet.ibm.com>
|
||||
M: Balbir Singh <bsingharora@gmail.com>
|
||||
S: Maintained
|
||||
F: Documentation/accounting/taskstats*
|
||||
F: include/linux/taskstats*
|
||||
|
@ -6717,6 +6722,14 @@ S: Maintained
|
|||
F: Documentation/filesystems/vfat.txt
|
||||
F: fs/fat/
|
||||
|
||||
VIDEOBUF2 FRAMEWORK
|
||||
M: Pawel Osciak <pawel@osciak.com>
|
||||
M: Marek Szyprowski <m.szyprowski@samsung.com>
|
||||
L: linux-media@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/media/video/videobuf2-*
|
||||
F: include/media/videobuf2-*
|
||||
|
||||
VIRTIO CONSOLE DRIVER
|
||||
M: Amit Shah <amit.shah@redhat.com>
|
||||
L: virtualization@lists.linux-foundation.org
|
||||
|
|
|
@ -409,7 +409,7 @@ SYSCALL_DEFINE2(osf_getdomainname, char __user *, name, int, namelen)
|
|||
return -EFAULT;
|
||||
|
||||
len = namelen;
|
||||
if (namelen > 32)
|
||||
if (len > 32)
|
||||
len = 32;
|
||||
|
||||
down_read(&uts_sem);
|
||||
|
@ -594,7 +594,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
|
|||
down_read(&uts_sem);
|
||||
res = sysinfo_table[offset];
|
||||
len = strlen(res)+1;
|
||||
if (len > count)
|
||||
if ((unsigned long)len > (unsigned long)count)
|
||||
len = count;
|
||||
if (copy_to_user(buf, res, len))
|
||||
err = -EFAULT;
|
||||
|
@ -649,7 +649,7 @@ SYSCALL_DEFINE5(osf_getsysinfo, unsigned long, op, void __user *, buffer,
|
|||
return 1;
|
||||
|
||||
case GSI_GET_HWRPB:
|
||||
if (nbytes < sizeof(*hwrpb))
|
||||
if (nbytes > sizeof(*hwrpb))
|
||||
return -EINVAL;
|
||||
if (copy_to_user(buffer, hwrpb, nbytes) != 0)
|
||||
return -EFAULT;
|
||||
|
@ -1008,6 +1008,7 @@ SYSCALL_DEFINE4(osf_wait4, pid_t, pid, int __user *, ustatus, int, options,
|
|||
{
|
||||
struct rusage r;
|
||||
long ret, err;
|
||||
unsigned int status = 0;
|
||||
mm_segment_t old_fs;
|
||||
|
||||
if (!ur)
|
||||
|
@ -1016,13 +1017,15 @@ SYSCALL_DEFINE4(osf_wait4, pid_t, pid, int __user *, ustatus, int, options,
|
|||
old_fs = get_fs();
|
||||
|
||||
set_fs (KERNEL_DS);
|
||||
ret = sys_wait4(pid, ustatus, options, (struct rusage __user *) &r);
|
||||
ret = sys_wait4(pid, (unsigned int __user *) &status, options,
|
||||
(struct rusage __user *) &r);
|
||||
set_fs (old_fs);
|
||||
|
||||
if (!access_ok(VERIFY_WRITE, ur, sizeof(*ur)))
|
||||
return -EFAULT;
|
||||
|
||||
err = 0;
|
||||
err |= put_user(status, ustatus);
|
||||
err |= __put_user(r.ru_utime.tv_sec, &ur->ru_utime.tv_sec);
|
||||
err |= __put_user(r.ru_utime.tv_usec, &ur->ru_utime.tv_usec);
|
||||
err |= __put_user(r.ru_stime.tv_sec, &ur->ru_stime.tv_sec);
|
||||
|
|
|
@ -691,9 +691,9 @@ proc_types:
|
|||
|
||||
.word 0x41069260 @ ARM926EJ-S (v5TEJ)
|
||||
.word 0xff0ffff0
|
||||
b __arm926ejs_mmu_cache_on
|
||||
b __armv4_mmu_cache_off
|
||||
b __armv5tej_mmu_cache_flush
|
||||
W(b) __arm926ejs_mmu_cache_on
|
||||
W(b) __armv4_mmu_cache_off
|
||||
W(b) __armv5tej_mmu_cache_flush
|
||||
|
||||
.word 0x00007000 @ ARM7 IDs
|
||||
.word 0x0000f000
|
||||
|
|
|
@ -157,7 +157,7 @@ CONFIG_LEDS_GPIO=m
|
|||
CONFIG_LEDS_TRIGGERS=y
|
||||
CONFIG_LEDS_TRIGGER_TIMER=m
|
||||
CONFIG_LEDS_TRIGGER_HEARTBEAT=m
|
||||
CONFIG_RTC_CLASS=m
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_EXT2_FS=y
|
||||
CONFIG_EXT3_FS=y
|
||||
CONFIG_XFS_FS=m
|
||||
|
|
|
@ -60,7 +60,7 @@ CONFIG_FB_ARMCLCD=y
|
|||
# CONFIG_VGA_CONSOLE is not set
|
||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||
CONFIG_LOGO=y
|
||||
CONFIG_RTC_CLASS=m
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_INOTIFY=y
|
||||
CONFIG_TMPFS=y
|
||||
CONFIG_JFFS2_FS=y
|
||||
|
|
|
@ -142,7 +142,7 @@ CONFIG_USB_GADGETFS=m
|
|||
CONFIG_USB_FILE_STORAGE=m
|
||||
CONFIG_USB_G_SERIAL=m
|
||||
CONFIG_USB_G_PRINTER=m
|
||||
CONFIG_RTC_CLASS=m
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_DS1307=m
|
||||
CONFIG_RTC_DRV_SA1100=m
|
||||
CONFIG_EXT2_FS=m
|
||||
|
|
|
@ -73,7 +73,7 @@ CONFIG_SENSORS_MAX6650=m
|
|||
# CONFIG_VGA_CONSOLE is not set
|
||||
# CONFIG_HID_SUPPORT is not set
|
||||
# CONFIG_USB_SUPPORT is not set
|
||||
CONFIG_RTC_CLASS=m
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_SA1100=m
|
||||
CONFIG_DMADEVICES=y
|
||||
# CONFIG_DNOTIFY is not set
|
||||
|
|
|
@ -158,7 +158,7 @@ CONFIG_LEDS_TRIGGER_HEARTBEAT=m
|
|||
CONFIG_LEDS_TRIGGER_BACKLIGHT=m
|
||||
CONFIG_LEDS_TRIGGER_GPIO=m
|
||||
CONFIG_LEDS_TRIGGER_DEFAULT_ON=m
|
||||
CONFIG_RTC_CLASS=m
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_ISL1208=m
|
||||
CONFIG_RTC_DRV_PXA=m
|
||||
CONFIG_EXT2_FS=y
|
||||
|
|
|
@ -76,6 +76,9 @@ struct machine_desc * __init setup_machine_fdt(unsigned int dt_phys)
|
|||
unsigned long dt_root;
|
||||
const char *model;
|
||||
|
||||
if (!dt_phys)
|
||||
return NULL;
|
||||
|
||||
devtree = phys_to_virt(dt_phys);
|
||||
|
||||
/* check device tree validity */
|
||||
|
|
|
@ -435,6 +435,10 @@ __irq_usr:
|
|||
usr_entry
|
||||
kuser_cmpxchg_check
|
||||
|
||||
#ifdef CONFIG_IRQSOFF_TRACER
|
||||
bl trace_hardirqs_off
|
||||
#endif
|
||||
|
||||
get_thread_info tsk
|
||||
#ifdef CONFIG_PREEMPT
|
||||
ldr r8, [tsk, #TI_PREEMPT] @ get preempt count
|
||||
|
@ -453,7 +457,7 @@ __irq_usr:
|
|||
#endif
|
||||
|
||||
mov why, #0
|
||||
b ret_to_user
|
||||
b ret_to_user_from_irq
|
||||
UNWIND(.fnend )
|
||||
ENDPROC(__irq_usr)
|
||||
|
||||
|
|
|
@ -64,6 +64,7 @@ work_resched:
|
|||
ENTRY(ret_to_user)
|
||||
ret_slow_syscall:
|
||||
disable_irq @ disable interrupts
|
||||
ENTRY(ret_to_user_from_irq)
|
||||
ldr r1, [tsk, #TI_FLAGS]
|
||||
tst r1, #_TIF_WORK_MASK
|
||||
bne work_pending
|
||||
|
@ -75,6 +76,7 @@ no_work_pending:
|
|||
arch_ret_to_user r1, lr
|
||||
|
||||
restore_user_regs fast = 0, offset = 0
|
||||
ENDPROC(ret_to_user_from_irq)
|
||||
ENDPROC(ret_to_user)
|
||||
|
||||
/*
|
||||
|
|
|
@ -139,7 +139,7 @@ static void dump_instr(const char *lvl, struct pt_regs *regs)
|
|||
fs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
|
||||
for (i = -4; i < 1; i++) {
|
||||
for (i = -4; i < 1 + !!thumb; i++) {
|
||||
unsigned int val, bad;
|
||||
|
||||
if (thumb)
|
||||
|
@ -563,7 +563,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs)
|
|||
if (!pmd_present(*pmd))
|
||||
goto bad_access;
|
||||
pte = pte_offset_map_lock(mm, pmd, addr, &ptl);
|
||||
if (!pte_present(*pte) || !pte_dirty(*pte)) {
|
||||
if (!pte_present(*pte) || !pte_write(*pte) || !pte_dirty(*pte)) {
|
||||
pte_unmap_unlock(pte, ptl);
|
||||
goto bad_access;
|
||||
}
|
||||
|
|
|
@ -494,7 +494,7 @@ static struct platform_device da850_mcasp_device = {
|
|||
.resource = da850_mcasp_resources,
|
||||
};
|
||||
|
||||
struct platform_device davinci_pcm_device = {
|
||||
static struct platform_device davinci_pcm_device = {
|
||||
.name = "davinci-pcm-audio",
|
||||
.id = -1,
|
||||
};
|
||||
|
|
|
@ -298,7 +298,7 @@ static void davinci_init_wdt(void)
|
|||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
struct platform_device davinci_pcm_device = {
|
||||
static struct platform_device davinci_pcm_device = {
|
||||
.name = "davinci-pcm-audio",
|
||||
.id = -1,
|
||||
};
|
||||
|
|
|
@ -252,9 +252,11 @@ static struct irq_chip gpio_irqchip = {
|
|||
static void
|
||||
gpio_irq_handler(unsigned irq, struct irq_desc *desc)
|
||||
{
|
||||
struct davinci_gpio_regs __iomem *g = irq2regs(irq);
|
||||
struct davinci_gpio_regs __iomem *g;
|
||||
u32 mask = 0xffff;
|
||||
|
||||
g = (__force struct davinci_gpio_regs __iomem *) irq_desc_get_handler_data(desc);
|
||||
|
||||
/* we only care about one bank */
|
||||
if (irq & 1)
|
||||
mask <<= 16;
|
||||
|
@ -422,8 +424,7 @@ static int __init davinci_gpio_irq_setup(void)
|
|||
|
||||
/* set up all irqs in this bank */
|
||||
irq_set_chained_handler(bank_irq, gpio_irq_handler);
|
||||
irq_set_chip_data(bank_irq, (__force void *)g);
|
||||
irq_set_handler_data(bank_irq, (void *)irq);
|
||||
irq_set_handler_data(bank_irq, (__force void *)g);
|
||||
|
||||
for (i = 0; i < 16 && gpio < ngpio; i++, irq++, gpio++) {
|
||||
irq_set_chip(irq, &gpio_irqchip);
|
||||
|
|
|
@ -103,6 +103,7 @@ static void __init footbridge_timer_init(void)
|
|||
clockevents_calc_mult_shift(ce, mem_fclk_21285, 5);
|
||||
ce->max_delta_ns = clockevent_delta2ns(0xffffff, ce);
|
||||
ce->min_delta_ns = clockevent_delta2ns(0x000004, ce);
|
||||
ce->cpumask = cpumask_of(smp_processor_id());
|
||||
|
||||
clockevents_register_device(ce);
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <asm/hardware/debug-8250.S>
|
||||
|
||||
#else
|
||||
#include <mach/hardware.h>
|
||||
/* For EBSA285 debugging */
|
||||
.equ dc21285_high, ARMCSR_BASE & 0xff000000
|
||||
.equ dc21285_low, ARMCSR_BASE & 0x00ffffff
|
||||
|
@ -36,8 +37,8 @@
|
|||
.else
|
||||
mov \rp, #0
|
||||
.endif
|
||||
orr \rv, \rp, #0x42000000
|
||||
orr \rp, \rp, #dc21285_high
|
||||
orr \rv, \rp, #dc21285_high
|
||||
orr \rp, \rp, #0x42000000
|
||||
.endm
|
||||
|
||||
.macro senduart,rd,rx
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
#include <linux/err.h>
|
||||
#include <linux/mutex.h>
|
||||
|
||||
#include <asm/processor.h> /* for cpu_relax() */
|
||||
|
||||
#include <mach/mxs.h>
|
||||
|
||||
#define OCOTP_WORD_OFFSET 0x20
|
||||
|
|
|
@ -31,7 +31,7 @@ struct clk {
|
|||
bool reset;
|
||||
__u16 clk_val;
|
||||
__s8 usecount;
|
||||
__u32 res_reg;
|
||||
void __iomem * res_reg;
|
||||
__u16 res_mask;
|
||||
|
||||
bool hw_ctrld;
|
||||
|
|
|
@ -18,6 +18,12 @@
|
|||
* the defines are used for setting up the I/O memory mapping.
|
||||
*/
|
||||
|
||||
#ifdef __ASSEMBLER__
|
||||
#define IOMEM(a) (a)
|
||||
#else
|
||||
#define IOMEM(a) (void __iomem *) a
|
||||
#endif
|
||||
|
||||
/* NAND Flash CS0 */
|
||||
#define U300_NAND_CS0_PHYS_BASE 0x80000000
|
||||
|
||||
|
@ -47,13 +53,6 @@
|
|||
#define U300_SEMI_CONFIG_BASE 0x30000000
|
||||
#endif
|
||||
|
||||
/*
|
||||
* All the following peripherals are specified at their PHYSICAL address,
|
||||
* so if you need to access them (in the kernel), you MUST use the macros
|
||||
* defined in <asm/io.h> to map to the IO_ADDRESS_AHB() IO_ADDRESS_FAST()
|
||||
* etc.
|
||||
*/
|
||||
|
||||
/*
|
||||
* AHB peripherals
|
||||
*/
|
||||
|
@ -63,11 +62,11 @@
|
|||
|
||||
/* Vectored Interrupt Controller 0, servicing 32 interrupts */
|
||||
#define U300_INTCON0_BASE (U300_AHB_PER_PHYS_BASE+0x1000)
|
||||
#define U300_INTCON0_VBASE (U300_AHB_PER_VIRT_BASE+0x1000)
|
||||
#define U300_INTCON0_VBASE IOMEM(U300_AHB_PER_VIRT_BASE+0x1000)
|
||||
|
||||
/* Vectored Interrupt Controller 1, servicing 32 interrupts */
|
||||
#define U300_INTCON1_BASE (U300_AHB_PER_PHYS_BASE+0x2000)
|
||||
#define U300_INTCON1_VBASE (U300_AHB_PER_VIRT_BASE+0x2000)
|
||||
#define U300_INTCON1_VBASE IOMEM(U300_AHB_PER_VIRT_BASE+0x2000)
|
||||
|
||||
/* Memory Stick Pro (MSPRO) controller */
|
||||
#define U300_MSPRO_BASE (U300_AHB_PER_PHYS_BASE+0x3000)
|
||||
|
@ -115,7 +114,7 @@
|
|||
|
||||
/* SYSCON */
|
||||
#define U300_SYSCON_BASE (U300_SLOW_PER_PHYS_BASE+0x1000)
|
||||
#define U300_SYSCON_VBASE (U300_SLOW_PER_VIRT_BASE+0x1000)
|
||||
#define U300_SYSCON_VBASE IOMEM(U300_SLOW_PER_VIRT_BASE+0x1000)
|
||||
|
||||
/* Watchdog */
|
||||
#define U300_WDOG_BASE (U300_SLOW_PER_PHYS_BASE+0x2000)
|
||||
|
@ -125,7 +124,7 @@
|
|||
|
||||
/* APP side special timer */
|
||||
#define U300_TIMER_APP_BASE (U300_SLOW_PER_PHYS_BASE+0x4000)
|
||||
#define U300_TIMER_APP_VBASE (U300_SLOW_PER_VIRT_BASE+0x4000)
|
||||
#define U300_TIMER_APP_VBASE IOMEM(U300_SLOW_PER_VIRT_BASE+0x4000)
|
||||
|
||||
/* Keypad */
|
||||
#define U300_KEYPAD_BASE (U300_SLOW_PER_PHYS_BASE+0x5000)
|
||||
|
@ -181,5 +180,4 @@
|
|||
* Virtual accessor macros for static devices
|
||||
*/
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -411,8 +411,7 @@ static void __init u300_timer_init(void)
|
|||
/* Use general purpose timer 2 as clock source */
|
||||
if (clocksource_mmio_init(U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT2CC,
|
||||
"GPT2", rate, 300, 32, clocksource_mmio_readl_up))
|
||||
printk(KERN_ERR "timer: failed to initialize clock "
|
||||
"source %s\n", clocksource_u300_1mhz.name);
|
||||
pr_err("timer: failed to initialize U300 clock source\n");
|
||||
|
||||
clockevents_calc_mult_shift(&clockevent_u300_1mhz,
|
||||
rate, APPTIMER_MIN_RANGE);
|
||||
|
|
|
@ -46,12 +46,6 @@ static struct map_desc v2m_io_desc[] __initdata = {
|
|||
},
|
||||
};
|
||||
|
||||
static void __init v2m_init_early(void)
|
||||
{
|
||||
ct_desc->init_early();
|
||||
versatile_sched_clock_init(MMIO_P2V(V2M_SYS_24MHZ), 24000000);
|
||||
}
|
||||
|
||||
static void __init v2m_timer_init(void)
|
||||
{
|
||||
u32 scctrl;
|
||||
|
@ -365,6 +359,13 @@ static struct clk_lookup v2m_lookups[] = {
|
|||
},
|
||||
};
|
||||
|
||||
static void __init v2m_init_early(void)
|
||||
{
|
||||
ct_desc->init_early();
|
||||
clkdev_add_table(v2m_lookups, ARRAY_SIZE(v2m_lookups));
|
||||
versatile_sched_clock_init(MMIO_P2V(V2M_SYS_24MHZ), 24000000);
|
||||
}
|
||||
|
||||
static void v2m_power_off(void)
|
||||
{
|
||||
if (v2m_cfg_write(SYS_CFG_SHUTDOWN | SYS_CFG_SITE_MB, 0))
|
||||
|
@ -418,8 +419,6 @@ static void __init v2m_init(void)
|
|||
{
|
||||
int i;
|
||||
|
||||
clkdev_add_table(v2m_lookups, ARRAY_SIZE(v2m_lookups));
|
||||
|
||||
platform_device_register(&v2m_pcie_i2c_device);
|
||||
platform_device_register(&v2m_ddc_i2c_device);
|
||||
platform_device_register(&v2m_flash_device);
|
||||
|
|
|
@ -24,7 +24,9 @@ DEFINE_PER_CPU(struct mm_struct *, current_mm);
|
|||
|
||||
/*
|
||||
* We fork()ed a process, and we need a new context for the child
|
||||
* to run in.
|
||||
* to run in. We reserve version 0 for initial tasks so we will
|
||||
* always allocate an ASID. The ASID 0 is reserved for the TTBR
|
||||
* register changing sequence.
|
||||
*/
|
||||
void __init_new_context(struct task_struct *tsk, struct mm_struct *mm)
|
||||
{
|
||||
|
@ -34,11 +36,8 @@ void __init_new_context(struct task_struct *tsk, struct mm_struct *mm)
|
|||
|
||||
static void flush_context(void)
|
||||
{
|
||||
u32 ttb;
|
||||
/* Copy TTBR1 into TTBR0 */
|
||||
asm volatile("mrc p15, 0, %0, c2, c0, 1\n"
|
||||
"mcr p15, 0, %0, c2, c0, 0"
|
||||
: "=r" (ttb));
|
||||
/* set the reserved ASID before flushing the TLB */
|
||||
asm("mcr p15, 0, %0, c13, c0, 1\n" : : "r" (0));
|
||||
isb();
|
||||
local_flush_tlb_all();
|
||||
if (icache_is_vivt_asid_tagged()) {
|
||||
|
@ -94,7 +93,7 @@ static void reset_context(void *info)
|
|||
return;
|
||||
|
||||
smp_rmb();
|
||||
asid = cpu_last_asid + cpu;
|
||||
asid = cpu_last_asid + cpu + 1;
|
||||
|
||||
flush_context();
|
||||
set_mm_context(mm, asid);
|
||||
|
@ -144,13 +143,13 @@ void __new_context(struct mm_struct *mm)
|
|||
* to start a new version and flush the TLB.
|
||||
*/
|
||||
if (unlikely((asid & ~ASID_MASK) == 0)) {
|
||||
asid = cpu_last_asid + smp_processor_id();
|
||||
asid = cpu_last_asid + smp_processor_id() + 1;
|
||||
flush_context();
|
||||
#ifdef CONFIG_SMP
|
||||
smp_wmb();
|
||||
smp_call_function(reset_context, NULL, 1);
|
||||
#endif
|
||||
cpu_last_asid += NR_CPUS - 1;
|
||||
cpu_last_asid += NR_CPUS;
|
||||
}
|
||||
|
||||
set_mm_context(mm, asid);
|
||||
|
|
|
@ -330,6 +330,12 @@ void __init arm_memblock_init(struct meminfo *mi, struct machine_desc *mdesc)
|
|||
memblock_reserve(__pa(_stext), _end - _stext);
|
||||
#endif
|
||||
#ifdef CONFIG_BLK_DEV_INITRD
|
||||
if (phys_initrd_size &&
|
||||
!memblock_is_region_memory(phys_initrd_start, phys_initrd_size)) {
|
||||
pr_err("INITRD: 0x%08lx+0x%08lx is not a memory region - disabling initrd\n",
|
||||
phys_initrd_start, phys_initrd_size);
|
||||
phys_initrd_start = phys_initrd_size = 0;
|
||||
}
|
||||
if (phys_initrd_size &&
|
||||
memblock_is_region_reserved(phys_initrd_start, phys_initrd_size)) {
|
||||
pr_err("INITRD: 0x%08lx+0x%08lx overlaps in-use memory region - disabling initrd\n",
|
||||
|
@ -635,7 +641,8 @@ void __init mem_init(void)
|
|||
" modules : 0x%08lx - 0x%08lx (%4ld MB)\n"
|
||||
" .init : 0x%p" " - 0x%p" " (%4d kB)\n"
|
||||
" .text : 0x%p" " - 0x%p" " (%4d kB)\n"
|
||||
" .data : 0x%p" " - 0x%p" " (%4d kB)\n",
|
||||
" .data : 0x%p" " - 0x%p" " (%4d kB)\n"
|
||||
" .bss : 0x%p" " - 0x%p" " (%4d kB)\n",
|
||||
|
||||
MLK(UL(CONFIG_VECTORS_BASE), UL(CONFIG_VECTORS_BASE) +
|
||||
(PAGE_SIZE)),
|
||||
|
@ -657,7 +664,8 @@ void __init mem_init(void)
|
|||
|
||||
MLK_ROUNDUP(__init_begin, __init_end),
|
||||
MLK_ROUNDUP(_text, _etext),
|
||||
MLK_ROUNDUP(_sdata, _edata));
|
||||
MLK_ROUNDUP(_sdata, _edata),
|
||||
MLK_ROUNDUP(__bss_start, __bss_stop));
|
||||
|
||||
#undef MLK
|
||||
#undef MLM
|
||||
|
|
|
@ -146,7 +146,7 @@ __arm7tdmi_proc_info:
|
|||
.long 0
|
||||
.long 0
|
||||
.long v4_cache_fns
|
||||
.size __arm7tdmi_proc_info, . - __arm7dmi_proc_info
|
||||
.size __arm7tdmi_proc_info, . - __arm7tdmi_proc_info
|
||||
|
||||
.type __triscenda7_proc_info, #object
|
||||
__triscenda7_proc_info:
|
||||
|
|
|
@ -116,7 +116,7 @@ __arm9tdmi_proc_info:
|
|||
.long 0
|
||||
.long 0
|
||||
.long v4_cache_fns
|
||||
.size __arm9tdmi_proc_info, . - __arm9dmi_proc_info
|
||||
.size __arm9tdmi_proc_info, . - __arm9tdmi_proc_info
|
||||
|
||||
.type __p2001_proc_info, #object
|
||||
__p2001_proc_info:
|
||||
|
|
|
@ -108,16 +108,18 @@ ENTRY(cpu_v7_switch_mm)
|
|||
#ifdef CONFIG_ARM_ERRATA_430973
|
||||
mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB
|
||||
#endif
|
||||
mrc p15, 0, r2, c2, c0, 1 @ load TTB 1
|
||||
mcr p15, 0, r2, c2, c0, 0 @ into TTB 0
|
||||
#ifdef CONFIG_ARM_ERRATA_754322
|
||||
dsb
|
||||
#endif
|
||||
mcr p15, 0, r2, c13, c0, 1 @ set reserved context ID
|
||||
isb
|
||||
1: mcr p15, 0, r0, c2, c0, 0 @ set TTB 0
|
||||
isb
|
||||
#ifdef CONFIG_ARM_ERRATA_754322
|
||||
dsb
|
||||
#endif
|
||||
mcr p15, 0, r1, c13, c0, 1 @ set context ID
|
||||
isb
|
||||
mcr p15, 0, r0, c2, c0, 0 @ set TTB 0
|
||||
isb
|
||||
#endif
|
||||
mov pc, lr
|
||||
ENDPROC(cpu_v7_switch_mm)
|
||||
|
|
|
@ -139,7 +139,7 @@ static struct sdma_script_start_addrs addr_imx35_to2 = {
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_SOC_IMX51
|
||||
static struct sdma_script_start_addrs addr_imx51_to1 = {
|
||||
static struct sdma_script_start_addrs addr_imx51 = {
|
||||
.ap_2_ap_addr = 642,
|
||||
.uart_2_mcu_addr = 817,
|
||||
.mcu_2_app_addr = 747,
|
||||
|
@ -196,7 +196,9 @@ static int __init imxXX_add_imx_dma(void)
|
|||
|
||||
#if defined(CONFIG_SOC_IMX51)
|
||||
if (cpu_is_mx51()) {
|
||||
imx51_imx_sdma_data.pdata.script_addrs = &addr_imx51_to1;
|
||||
int to_version = mx51_revision() >> 4;
|
||||
imx51_imx_sdma_data.pdata.to_version = to_version;
|
||||
imx51_imx_sdma_data.pdata.script_addrs = &addr_imx51;
|
||||
ret = imx_add_imx_sdma(&imx51_imx_sdma_data);
|
||||
} else
|
||||
#endif
|
||||
|
|
|
@ -5,6 +5,7 @@ CONFIG_POSIX_MQUEUE=y
|
|||
CONFIG_LOG_BUF_SHIFT=14
|
||||
CONFIG_RELAY=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
# CONFIG_SYSCTL_SYSCALL is not set
|
||||
# CONFIG_BASE_FULL is not set
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
|
|
|
@ -5,6 +5,7 @@ CONFIG_POSIX_MQUEUE=y
|
|||
CONFIG_LOG_BUF_SHIFT=14
|
||||
CONFIG_RELAY=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
# CONFIG_SYSCTL_SYSCALL is not set
|
||||
# CONFIG_BASE_FULL is not set
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
|
|
|
@ -5,6 +5,7 @@ CONFIG_POSIX_MQUEUE=y
|
|||
CONFIG_LOG_BUF_SHIFT=14
|
||||
CONFIG_RELAY=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
# CONFIG_SYSCTL_SYSCALL is not set
|
||||
# CONFIG_BASE_FULL is not set
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
|
|
|
@ -7,6 +7,7 @@ CONFIG_BSD_PROCESS_ACCT_V3=y
|
|||
CONFIG_LOG_BUF_SHIFT=14
|
||||
CONFIG_SYSFS_DEPRECATED_V2=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
# CONFIG_SYSCTL_SYSCALL is not set
|
||||
# CONFIG_BASE_FULL is not set
|
||||
# CONFIG_SLUB_DEBUG is not set
|
||||
|
@ -109,7 +110,7 @@ CONFIG_LEDS_GPIO=y
|
|||
CONFIG_LEDS_TRIGGERS=y
|
||||
CONFIG_LEDS_TRIGGER_TIMER=y
|
||||
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
|
||||
CONFIG_RTC_CLASS=m
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_S35390A=m
|
||||
CONFIG_RTC_DRV_AT32AP700X=m
|
||||
CONFIG_DMADEVICES=y
|
||||
|
|
|
@ -5,6 +5,7 @@ CONFIG_POSIX_MQUEUE=y
|
|||
CONFIG_LOG_BUF_SHIFT=14
|
||||
CONFIG_RELAY=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
# CONFIG_SYSCTL_SYSCALL is not set
|
||||
# CONFIG_BASE_FULL is not set
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
|
|
|
@ -5,6 +5,7 @@ CONFIG_POSIX_MQUEUE=y
|
|||
CONFIG_LOG_BUF_SHIFT=14
|
||||
CONFIG_RELAY=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
# CONFIG_SYSCTL_SYSCALL is not set
|
||||
# CONFIG_BASE_FULL is not set
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
|
|
|
@ -5,6 +5,7 @@ CONFIG_POSIX_MQUEUE=y
|
|||
CONFIG_LOG_BUF_SHIFT=14
|
||||
CONFIG_RELAY=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
# CONFIG_SYSCTL_SYSCALL is not set
|
||||
# CONFIG_BASE_FULL is not set
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
|
|
|
@ -5,6 +5,7 @@ CONFIG_POSIX_MQUEUE=y
|
|||
CONFIG_LOG_BUF_SHIFT=14
|
||||
CONFIG_RELAY=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
# CONFIG_SYSCTL_SYSCALL is not set
|
||||
# CONFIG_BASE_FULL is not set
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
|
|
|
@ -5,6 +5,7 @@ CONFIG_POSIX_MQUEUE=y
|
|||
CONFIG_LOG_BUF_SHIFT=14
|
||||
CONFIG_RELAY=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
# CONFIG_SYSCTL_SYSCALL is not set
|
||||
# CONFIG_BASE_FULL is not set
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
|
|
|
@ -5,6 +5,7 @@ CONFIG_POSIX_MQUEUE=y
|
|||
CONFIG_LOG_BUF_SHIFT=14
|
||||
CONFIG_RELAY=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
# CONFIG_SYSCTL_SYSCALL is not set
|
||||
# CONFIG_BASE_FULL is not set
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
|
|
|
@ -5,6 +5,7 @@ CONFIG_POSIX_MQUEUE=y
|
|||
CONFIG_LOG_BUF_SHIFT=14
|
||||
CONFIG_RELAY=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
# CONFIG_SYSCTL_SYSCALL is not set
|
||||
# CONFIG_BASE_FULL is not set
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
|
|
|
@ -6,6 +6,7 @@ CONFIG_LOG_BUF_SHIFT=14
|
|||
CONFIG_SYSFS_DEPRECATED_V2=y
|
||||
CONFIG_RELAY=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
# CONFIG_SYSCTL_SYSCALL is not set
|
||||
# CONFIG_BASE_FULL is not set
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
|
|
|
@ -7,6 +7,7 @@ CONFIG_BSD_PROCESS_ACCT_V3=y
|
|||
CONFIG_LOG_BUF_SHIFT=14
|
||||
CONFIG_SYSFS_DEPRECATED_V2=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
# CONFIG_SYSCTL_SYSCALL is not set
|
||||
# CONFIG_BASE_FULL is not set
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
|
|
|
@ -7,6 +7,7 @@ CONFIG_BSD_PROCESS_ACCT_V3=y
|
|||
CONFIG_LOG_BUF_SHIFT=14
|
||||
CONFIG_SYSFS_DEPRECATED_V2=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
# CONFIG_SYSCTL_SYSCALL is not set
|
||||
# CONFIG_BASE_FULL is not set
|
||||
CONFIG_MODULES=y
|
||||
|
|
|
@ -7,6 +7,7 @@ CONFIG_BSD_PROCESS_ACCT_V3=y
|
|||
CONFIG_LOG_BUF_SHIFT=14
|
||||
CONFIG_SYSFS_DEPRECATED_V2=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
# CONFIG_SYSCTL_SYSCALL is not set
|
||||
# CONFIG_BASE_FULL is not set
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
|
|
|
@ -131,7 +131,6 @@ struct thread_struct {
|
|||
*/
|
||||
#define start_thread(regs, new_pc, new_sp) \
|
||||
do { \
|
||||
set_fs(USER_DS); \
|
||||
memset(regs, 0, sizeof(*regs)); \
|
||||
regs->sr = MODE_USER; \
|
||||
regs->pc = new_pc & ~1; \
|
||||
|
|
|
@ -1043,8 +1043,9 @@ void __init at32_map_usart(unsigned int hw_id, unsigned int line, int flags)
|
|||
data->regs = (void __iomem *)pdev->resource[0].start;
|
||||
}
|
||||
|
||||
pdev->id = line;
|
||||
pdata = pdev->dev.platform_data;
|
||||
pdata->num = portnr;
|
||||
pdata->num = line;
|
||||
at32_usarts[line] = pdev;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,8 +31,20 @@
|
|||
#define cpu_is_at91sam9263() (0)
|
||||
#define cpu_is_at91sam9rl() (0)
|
||||
#define cpu_is_at91cap9() (0)
|
||||
#define cpu_is_at91cap9_revB() (0)
|
||||
#define cpu_is_at91cap9_revC() (0)
|
||||
#define cpu_is_at91sam9g10() (0)
|
||||
#define cpu_is_at91sam9g20() (0)
|
||||
#define cpu_is_at91sam9g45() (0)
|
||||
#define cpu_is_at91sam9g45es() (0)
|
||||
#define cpu_is_at91sam9m10() (0)
|
||||
#define cpu_is_at91sam9g46() (0)
|
||||
#define cpu_is_at91sam9m11() (0)
|
||||
#define cpu_is_at91sam9x5() (0)
|
||||
#define cpu_is_at91sam9g15() (0)
|
||||
#define cpu_is_at91sam9g35() (0)
|
||||
#define cpu_is_at91sam9x35() (0)
|
||||
#define cpu_is_at91sam9g25() (0)
|
||||
#define cpu_is_at91sam9x25() (0)
|
||||
|
||||
#endif /* __ASM_ARCH_CPU_H */
|
||||
|
|
|
@ -167,14 +167,12 @@ static int intc_suspend(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int intc_resume(void)
|
||||
static void intc_resume(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 64; i++)
|
||||
intc_writel(&intc0, INTPR0 + 4 * i, intc0.saved_ipr[i]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
#define intc_suspend NULL
|
||||
|
|
|
@ -112,7 +112,7 @@ CONFIG_USB_G_SERIAL=m
|
|||
CONFIG_USB_G_PRINTER=m
|
||||
CONFIG_MMC=m
|
||||
CONFIG_SDH_BFIN=m
|
||||
CONFIG_RTC_CLASS=m
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_BFIN=m
|
||||
CONFIG_EXT2_FS=m
|
||||
# CONFIG_DNOTIFY is not set
|
||||
|
|
|
@ -14,6 +14,33 @@ config GENERIC_CLOCKEVENTS
|
|||
bool
|
||||
default n
|
||||
|
||||
config M68000
|
||||
bool
|
||||
help
|
||||
The Freescale (was Motorola) 68000 CPU is the first generation of
|
||||
the well known M68K family of processors. The CPU core as well as
|
||||
being available as a stand alone CPU was also used in many
|
||||
System-On-Chip devices (eg 68328, 68302, etc). It does not contain
|
||||
a paging MMU.
|
||||
|
||||
config MCPU32
|
||||
bool
|
||||
help
|
||||
The Freescale (was then Motorola) CPU32 is a CPU core that is
|
||||
based on the 68020 processor. For the most part it is used in
|
||||
System-On-Chip parts, and does not contain a paging MMU.
|
||||
|
||||
config COLDFIRE
|
||||
bool
|
||||
select GENERIC_GPIO
|
||||
select ARCH_REQUIRE_GPIOLIB
|
||||
help
|
||||
The Freescale ColdFire family of processors is a modern derivitive
|
||||
of the 68000 processor family. They are mainly targeted at embedded
|
||||
applications, and are all System-On-Chip (SOC) devices, as opposed
|
||||
to stand alone CPUs. They implement a subset of the original 68000
|
||||
processor instruction set.
|
||||
|
||||
config COLDFIRE_SW_A7
|
||||
bool
|
||||
default n
|
||||
|
@ -36,26 +63,31 @@ choice
|
|||
|
||||
config M68328
|
||||
bool "MC68328"
|
||||
select M68000
|
||||
help
|
||||
Motorola 68328 processor support.
|
||||
|
||||
config M68EZ328
|
||||
bool "MC68EZ328"
|
||||
select M68000
|
||||
help
|
||||
Motorola 68EX328 processor support.
|
||||
|
||||
config M68VZ328
|
||||
bool "MC68VZ328"
|
||||
select M68000
|
||||
help
|
||||
Motorola 68VZ328 processor support.
|
||||
|
||||
config M68360
|
||||
bool "MC68360"
|
||||
select MCPU32
|
||||
help
|
||||
Motorola 68360 processor support.
|
||||
|
||||
config M5206
|
||||
bool "MCF5206"
|
||||
select COLDFIRE
|
||||
select COLDFIRE_SW_A7
|
||||
select HAVE_MBAR
|
||||
help
|
||||
|
@ -63,6 +95,7 @@ config M5206
|
|||
|
||||
config M5206e
|
||||
bool "MCF5206e"
|
||||
select COLDFIRE
|
||||
select COLDFIRE_SW_A7
|
||||
select HAVE_MBAR
|
||||
help
|
||||
|
@ -70,6 +103,7 @@ config M5206e
|
|||
|
||||
config M520x
|
||||
bool "MCF520x"
|
||||
select COLDFIRE
|
||||
select GENERIC_CLOCKEVENTS
|
||||
select HAVE_CACHE_SPLIT
|
||||
help
|
||||
|
@ -77,6 +111,7 @@ config M520x
|
|||
|
||||
config M523x
|
||||
bool "MCF523x"
|
||||
select COLDFIRE
|
||||
select GENERIC_CLOCKEVENTS
|
||||
select HAVE_CACHE_SPLIT
|
||||
select HAVE_IPSBAR
|
||||
|
@ -85,6 +120,7 @@ config M523x
|
|||
|
||||
config M5249
|
||||
bool "MCF5249"
|
||||
select COLDFIRE
|
||||
select COLDFIRE_SW_A7
|
||||
select HAVE_MBAR
|
||||
help
|
||||
|
@ -92,6 +128,7 @@ config M5249
|
|||
|
||||
config M5271
|
||||
bool "MCF5271"
|
||||
select COLDFIRE
|
||||
select HAVE_CACHE_SPLIT
|
||||
select HAVE_IPSBAR
|
||||
help
|
||||
|
@ -99,6 +136,7 @@ config M5271
|
|||
|
||||
config M5272
|
||||
bool "MCF5272"
|
||||
select COLDFIRE
|
||||
select COLDFIRE_SW_A7
|
||||
select HAVE_MBAR
|
||||
help
|
||||
|
@ -106,6 +144,7 @@ config M5272
|
|||
|
||||
config M5275
|
||||
bool "MCF5275"
|
||||
select COLDFIRE
|
||||
select HAVE_CACHE_SPLIT
|
||||
select HAVE_IPSBAR
|
||||
help
|
||||
|
@ -113,6 +152,7 @@ config M5275
|
|||
|
||||
config M528x
|
||||
bool "MCF528x"
|
||||
select COLDFIRE
|
||||
select GENERIC_CLOCKEVENTS
|
||||
select HAVE_CACHE_SPLIT
|
||||
select HAVE_IPSBAR
|
||||
|
@ -121,6 +161,7 @@ config M528x
|
|||
|
||||
config M5307
|
||||
bool "MCF5307"
|
||||
select COLDFIRE
|
||||
select COLDFIRE_SW_A7
|
||||
select HAVE_CACHE_CB
|
||||
select HAVE_MBAR
|
||||
|
@ -129,12 +170,14 @@ config M5307
|
|||
|
||||
config M532x
|
||||
bool "MCF532x"
|
||||
select COLDFIRE
|
||||
select HAVE_CACHE_CB
|
||||
help
|
||||
Freescale (Motorola) ColdFire 532x processor support.
|
||||
|
||||
config M5407
|
||||
bool "MCF5407"
|
||||
select COLDFIRE
|
||||
select COLDFIRE_SW_A7
|
||||
select HAVE_CACHE_CB
|
||||
select HAVE_MBAR
|
||||
|
@ -143,6 +186,7 @@ config M5407
|
|||
|
||||
config M547x
|
||||
bool "MCF547x"
|
||||
select COLDFIRE
|
||||
select HAVE_CACHE_CB
|
||||
select HAVE_MBAR
|
||||
help
|
||||
|
@ -150,6 +194,7 @@ config M547x
|
|||
|
||||
config M548x
|
||||
bool "MCF548x"
|
||||
select COLDFIRE
|
||||
select HAVE_CACHE_CB
|
||||
select HAVE_MBAR
|
||||
help
|
||||
|
@ -168,13 +213,6 @@ config M54xx
|
|||
depends on (M548x || M547x)
|
||||
default y
|
||||
|
||||
config COLDFIRE
|
||||
bool
|
||||
depends on (M5206 || M5206e || M520x || M523x || M5249 || M527x || M5272 || M528x || M5307 || M532x || M5407 || M54xx)
|
||||
select GENERIC_GPIO
|
||||
select ARCH_REQUIRE_GPIOLIB
|
||||
default y
|
||||
|
||||
config CLOCK_SET
|
||||
bool "Enable setting the CPU clock frequency"
|
||||
default n
|
||||
|
|
|
@ -14,8 +14,7 @@ EXPORT_SYMBOL(__ashrdi3);
|
|||
EXPORT_SYMBOL(__lshrdi3);
|
||||
EXPORT_SYMBOL(__muldi3);
|
||||
|
||||
#if !defined(__mc68020__) && !defined(__mc68030__) && \
|
||||
!defined(__mc68040__) && !defined(__mc68060__) && !defined(__mcpu32__)
|
||||
#if defined(CONFIG_M68000) || defined(CONFIG_COLDFIRE)
|
||||
/*
|
||||
* Simpler 68k and ColdFire parts also need a few other gcc functions.
|
||||
*/
|
||||
|
|
|
@ -84,52 +84,52 @@ SECTIONS {
|
|||
/* Kernel symbol table: Normal symbols */
|
||||
. = ALIGN(4);
|
||||
__start___ksymtab = .;
|
||||
*(__ksymtab)
|
||||
*(SORT(___ksymtab+*))
|
||||
__stop___ksymtab = .;
|
||||
|
||||
/* Kernel symbol table: GPL-only symbols */
|
||||
__start___ksymtab_gpl = .;
|
||||
*(__ksymtab_gpl)
|
||||
*(SORT(___ksymtab_gpl+*))
|
||||
__stop___ksymtab_gpl = .;
|
||||
|
||||
/* Kernel symbol table: Normal unused symbols */
|
||||
__start___ksymtab_unused = .;
|
||||
*(__ksymtab_unused)
|
||||
*(SORT(___ksymtab_unused+*))
|
||||
__stop___ksymtab_unused = .;
|
||||
|
||||
/* Kernel symbol table: GPL-only unused symbols */
|
||||
__start___ksymtab_unused_gpl = .;
|
||||
*(__ksymtab_unused_gpl)
|
||||
*(SORT(___ksymtab_unused_gpl+*))
|
||||
__stop___ksymtab_unused_gpl = .;
|
||||
|
||||
/* Kernel symbol table: GPL-future symbols */
|
||||
__start___ksymtab_gpl_future = .;
|
||||
*(__ksymtab_gpl_future)
|
||||
*(SORT(___ksymtab_gpl_future+*))
|
||||
__stop___ksymtab_gpl_future = .;
|
||||
|
||||
/* Kernel symbol table: Normal symbols */
|
||||
__start___kcrctab = .;
|
||||
*(__kcrctab)
|
||||
*(SORT(___kcrctab+*))
|
||||
__stop___kcrctab = .;
|
||||
|
||||
/* Kernel symbol table: GPL-only symbols */
|
||||
__start___kcrctab_gpl = .;
|
||||
*(__kcrctab_gpl)
|
||||
*(SORT(___kcrctab_gpl+*))
|
||||
__stop___kcrctab_gpl = .;
|
||||
|
||||
/* Kernel symbol table: Normal unused symbols */
|
||||
__start___kcrctab_unused = .;
|
||||
*(__kcrctab_unused)
|
||||
*(SORT(___kcrctab_unused+*))
|
||||
__stop___kcrctab_unused = .;
|
||||
|
||||
/* Kernel symbol table: GPL-only unused symbols */
|
||||
__start___kcrctab_unused_gpl = .;
|
||||
*(__kcrctab_unused_gpl)
|
||||
*(SORT(___kcrctab_unused_gpl+*))
|
||||
__stop___kcrctab_unused_gpl = .;
|
||||
|
||||
/* Kernel symbol table: GPL-future symbols */
|
||||
__start___kcrctab_gpl_future = .;
|
||||
*(__kcrctab_gpl_future)
|
||||
*(SORT(___kcrctab_gpl_future+*))
|
||||
__stop___kcrctab_gpl_future = .;
|
||||
|
||||
/* Kernel symbol table: strings */
|
||||
|
|
|
@ -34,8 +34,10 @@ void *memcpy(void *to, const void *from, size_t n)
|
|||
if (temp) {
|
||||
long *lto = to;
|
||||
const long *lfrom = from;
|
||||
#if defined(__mc68020__) || defined(__mc68030__) || \
|
||||
defined(__mc68040__) || defined(__mc68060__) || defined(__mcpu32__)
|
||||
#if defined(CONFIG_M68000) || defined(CONFIG_COLDFIRE)
|
||||
for (; temp; temp--)
|
||||
*lto++ = *lfrom++;
|
||||
#else
|
||||
asm volatile (
|
||||
" movel %2,%3\n"
|
||||
" andw #7,%3\n"
|
||||
|
@ -56,9 +58,6 @@ void *memcpy(void *to, const void *from, size_t n)
|
|||
" jpl 4b"
|
||||
: "=a" (lfrom), "=a" (lto), "=d" (temp), "=&d" (temp1)
|
||||
: "0" (lfrom), "1" (lto), "2" (temp));
|
||||
#else
|
||||
for (; temp; temp--)
|
||||
*lto++ = *lfrom++;
|
||||
#endif
|
||||
to = lto;
|
||||
from = lfrom;
|
||||
|
|
|
@ -32,8 +32,10 @@ void *memset(void *s, int c, size_t count)
|
|||
temp = count >> 2;
|
||||
if (temp) {
|
||||
long *ls = s;
|
||||
#if defined(__mc68020__) || defined(__mc68030__) || \
|
||||
defined(__mc68040__) || defined(__mc68060__) || defined(__mcpu32__)
|
||||
#if defined(CONFIG_M68000) || defined(CONFIG_COLDFIRE)
|
||||
for (; temp; temp--)
|
||||
*ls++ = c;
|
||||
#else
|
||||
size_t temp1;
|
||||
asm volatile (
|
||||
" movel %1,%2\n"
|
||||
|
@ -55,9 +57,6 @@ void *memset(void *s, int c, size_t count)
|
|||
" jpl 1b"
|
||||
: "=a" (ls), "=d" (temp), "=&d" (temp1)
|
||||
: "d" (c), "0" (ls), "1" (temp));
|
||||
#else
|
||||
for (; temp; temp--)
|
||||
*ls++ = c;
|
||||
#endif
|
||||
s = ls;
|
||||
}
|
||||
|
|
|
@ -19,17 +19,7 @@ along with GNU CC; see the file COPYING. If not, write to
|
|||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#if defined(__mc68020__) || defined(__mc68030__) || \
|
||||
defined(__mc68040__) || defined(__mc68060__) || defined(__mcpu32__)
|
||||
|
||||
#define umul_ppmm(w1, w0, u, v) \
|
||||
__asm__ ("mulu%.l %3,%1:%0" \
|
||||
: "=d" ((USItype)(w0)), \
|
||||
"=d" ((USItype)(w1)) \
|
||||
: "%0" ((USItype)(u)), \
|
||||
"dmi" ((USItype)(v)))
|
||||
|
||||
#else
|
||||
#if defined(CONFIG_M68000) || defined(CONFIG_COLDFIRE)
|
||||
|
||||
#define SI_TYPE_SIZE 32
|
||||
#define __BITS4 (SI_TYPE_SIZE / 4)
|
||||
|
@ -61,6 +51,15 @@ Boston, MA 02111-1307, USA. */
|
|||
(w0) = __ll_lowpart (__x1) * __ll_B + __ll_lowpart (__x0); \
|
||||
} while (0)
|
||||
|
||||
#else
|
||||
|
||||
#define umul_ppmm(w1, w0, u, v) \
|
||||
__asm__ ("mulu%.l %3,%1:%0" \
|
||||
: "=d" ((USItype)(w0)), \
|
||||
"=d" ((USItype)(w1)) \
|
||||
: "%0" ((USItype)(u)), \
|
||||
"dmi" ((USItype)(v)))
|
||||
|
||||
#endif
|
||||
|
||||
#define __umulsidi3(u, v) \
|
||||
|
|
|
@ -678,7 +678,7 @@ CONFIG_LEDS_TRIGGERS=y
|
|||
CONFIG_LEDS_TRIGGER_TIMER=y
|
||||
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
|
||||
CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
|
||||
CONFIG_RTC_CLASS=m
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_INTF_DEV_UIE_EMUL=y
|
||||
CONFIG_RTC_DRV_TEST=m
|
||||
CONFIG_RTC_DRV_DS1307=m
|
||||
|
|
|
@ -85,7 +85,7 @@ CONFIG_USB_OHCI_HCD=m
|
|||
CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
|
||||
# CONFIG_USB_OHCI_HCD_PCI is not set
|
||||
CONFIG_USB_STORAGE=m
|
||||
CONFIG_RTC_CLASS=m
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_PCF8563=m
|
||||
CONFIG_EXT2_FS=m
|
||||
CONFIG_EXT3_FS=m
|
||||
|
|
|
@ -141,7 +141,7 @@ CONFIG_USB_EHCI_TT_NEWSCHED=y
|
|||
# CONFIG_USB_EHCI_HCD_PPC_OF is not set
|
||||
CONFIG_USB_OHCI_HCD=m
|
||||
CONFIG_USB_STORAGE=m
|
||||
CONFIG_RTC_CLASS=m
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_PS3=m
|
||||
CONFIG_EXT2_FS=m
|
||||
CONFIG_EXT3_FS=m
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include <linux/io.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/usb/r8a66597.h>
|
||||
#include <linux/usb/renesas_usbhs.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/i2c/tsc2007.h>
|
||||
#include <linux/spi/spi.h>
|
||||
|
@ -232,6 +233,52 @@ static struct platform_device usb1_common_device = {
|
|||
.resource = usb1_common_resources,
|
||||
};
|
||||
|
||||
/*
|
||||
* USBHS
|
||||
*/
|
||||
static int usbhs_get_id(struct platform_device *pdev)
|
||||
{
|
||||
return gpio_get_value(GPIO_PTB3);
|
||||
}
|
||||
|
||||
static struct renesas_usbhs_platform_info usbhs_info = {
|
||||
.platform_callback = {
|
||||
.get_id = usbhs_get_id,
|
||||
},
|
||||
.driver_param = {
|
||||
.buswait_bwait = 4,
|
||||
.detection_delay = 5,
|
||||
},
|
||||
};
|
||||
|
||||
static struct resource usbhs_resources[] = {
|
||||
[0] = {
|
||||
.start = 0xa4d90000,
|
||||
.end = 0xa4d90124 - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = 66,
|
||||
.end = 66,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device usbhs_device = {
|
||||
.name = "renesas_usbhs",
|
||||
.id = 1,
|
||||
.dev = {
|
||||
.dma_mask = NULL, /* not use dma */
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
.platform_data = &usbhs_info,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(usbhs_resources),
|
||||
.resource = usbhs_resources,
|
||||
.archdata = {
|
||||
.hwblk_id = HWBLK_USB1,
|
||||
},
|
||||
};
|
||||
|
||||
/* LCDC */
|
||||
const static struct fb_videomode ecovec_lcd_modes[] = {
|
||||
{
|
||||
|
@ -897,6 +944,7 @@ static struct platform_device *ecovec_devices[] __initdata = {
|
|||
&sh_eth_device,
|
||||
&usb0_host_device,
|
||||
&usb1_common_device,
|
||||
&usbhs_device,
|
||||
&lcdc_device,
|
||||
&ceu0_device,
|
||||
&ceu1_device,
|
||||
|
|
|
@ -227,7 +227,7 @@ CONFIG_USB_SERIAL=m
|
|||
CONFIG_USB_SERIAL_GENERIC=y
|
||||
CONFIG_USB_SERIAL_ARK3116=m
|
||||
CONFIG_USB_SERIAL_PL2303=m
|
||||
CONFIG_RTC_CLASS=m
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_SH=m
|
||||
CONFIG_EXT2_FS=y
|
||||
CONFIG_EXT3_FS=y
|
||||
|
|
|
@ -298,6 +298,14 @@ enum {
|
|||
SHDMA_SLAVE_SCIF4_RX,
|
||||
SHDMA_SLAVE_SCIF5_TX,
|
||||
SHDMA_SLAVE_SCIF5_RX,
|
||||
SHDMA_SLAVE_USB0D0_TX,
|
||||
SHDMA_SLAVE_USB0D0_RX,
|
||||
SHDMA_SLAVE_USB0D1_TX,
|
||||
SHDMA_SLAVE_USB0D1_RX,
|
||||
SHDMA_SLAVE_USB1D0_TX,
|
||||
SHDMA_SLAVE_USB1D0_RX,
|
||||
SHDMA_SLAVE_USB1D1_TX,
|
||||
SHDMA_SLAVE_USB1D1_RX,
|
||||
SHDMA_SLAVE_SDHI0_TX,
|
||||
SHDMA_SLAVE_SDHI0_RX,
|
||||
SHDMA_SLAVE_SDHI1_TX,
|
||||
|
|
|
@ -92,6 +92,46 @@ static const struct sh_dmae_slave_config sh7724_dmae_slaves[] = {
|
|||
.addr = 0xa4e50024,
|
||||
.chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
|
||||
.mid_rid = 0x36,
|
||||
}, {
|
||||
.slave_id = SHDMA_SLAVE_USB0D0_TX,
|
||||
.addr = 0xA4D80100,
|
||||
.chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT),
|
||||
.mid_rid = 0x73,
|
||||
}, {
|
||||
.slave_id = SHDMA_SLAVE_USB0D0_RX,
|
||||
.addr = 0xA4D80100,
|
||||
.chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT),
|
||||
.mid_rid = 0x73,
|
||||
}, {
|
||||
.slave_id = SHDMA_SLAVE_USB0D1_TX,
|
||||
.addr = 0xA4D80120,
|
||||
.chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT),
|
||||
.mid_rid = 0x77,
|
||||
}, {
|
||||
.slave_id = SHDMA_SLAVE_USB0D1_RX,
|
||||
.addr = 0xA4D80120,
|
||||
.chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT),
|
||||
.mid_rid = 0x77,
|
||||
}, {
|
||||
.slave_id = SHDMA_SLAVE_USB1D0_TX,
|
||||
.addr = 0xA4D90100,
|
||||
.chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT),
|
||||
.mid_rid = 0xab,
|
||||
}, {
|
||||
.slave_id = SHDMA_SLAVE_USB1D0_RX,
|
||||
.addr = 0xA4D90100,
|
||||
.chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT),
|
||||
.mid_rid = 0xab,
|
||||
}, {
|
||||
.slave_id = SHDMA_SLAVE_USB1D1_TX,
|
||||
.addr = 0xA4D90120,
|
||||
.chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT),
|
||||
.mid_rid = 0xaf,
|
||||
}, {
|
||||
.slave_id = SHDMA_SLAVE_USB1D1_RX,
|
||||
.addr = 0xA4D90120,
|
||||
.chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT),
|
||||
.mid_rid = 0xaf,
|
||||
}, {
|
||||
.slave_id = SHDMA_SLAVE_SDHI0_TX,
|
||||
.addr = 0x04ce0030,
|
||||
|
|
|
@ -632,14 +632,14 @@ late_initcall(uv_init_heartbeat);
|
|||
|
||||
/* Direct Legacy VGA I/O traffic to designated IOH */
|
||||
int uv_set_vga_state(struct pci_dev *pdev, bool decode,
|
||||
unsigned int command_bits, bool change_bridge)
|
||||
unsigned int command_bits, u32 flags)
|
||||
{
|
||||
int domain, bus, rc;
|
||||
|
||||
PR_DEVEL("devfn %x decode %d cmd %x chg_brdg %d\n",
|
||||
pdev->devfn, decode, command_bits, change_bridge);
|
||||
PR_DEVEL("devfn %x decode %d cmd %x flags %d\n",
|
||||
pdev->devfn, decode, command_bits, flags);
|
||||
|
||||
if (!change_bridge)
|
||||
if (!(flags & PCI_VGA_STATE_CHANGE_BRIDGE))
|
||||
return 0;
|
||||
|
||||
if ((command_bits & PCI_COMMAND_IO) == 0)
|
||||
|
|
|
@ -337,7 +337,7 @@ EXPORT_SYMBOL(boot_option_idle_override);
|
|||
* Powermanagement idle function, if any..
|
||||
*/
|
||||
void (*pm_idle)(void);
|
||||
#if defined(CONFIG_APM_MODULE) && defined(CONFIG_APM_CPU_IDLE)
|
||||
#ifdef CONFIG_APM_MODULE
|
||||
EXPORT_SYMBOL(pm_idle);
|
||||
#endif
|
||||
|
||||
|
@ -399,7 +399,7 @@ void default_idle(void)
|
|||
cpu_relax();
|
||||
}
|
||||
}
|
||||
#if defined(CONFIG_APM_MODULE) && defined(CONFIG_APM_CPU_IDLE)
|
||||
#ifdef CONFIG_APM_MODULE
|
||||
EXPORT_SYMBOL(default_idle);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -163,11 +163,32 @@ static irqreturn_t hpet_interrupt(int irq, void *data)
|
|||
* This has the effect of treating non-periodic like periodic.
|
||||
*/
|
||||
if ((devp->hd_flags & (HPET_IE | HPET_PERIODIC)) == HPET_IE) {
|
||||
unsigned long m, t;
|
||||
unsigned long m, t, mc, base, k;
|
||||
struct hpet __iomem *hpet = devp->hd_hpet;
|
||||
struct hpets *hpetp = devp->hd_hpets;
|
||||
|
||||
t = devp->hd_ireqfreq;
|
||||
m = read_counter(&devp->hd_timer->hpet_compare);
|
||||
write_counter(t + m, &devp->hd_timer->hpet_compare);
|
||||
mc = read_counter(&hpet->hpet_mc);
|
||||
/* The time for the next interrupt would logically be t + m,
|
||||
* however, if we are very unlucky and the interrupt is delayed
|
||||
* for longer than t then we will completely miss the next
|
||||
* interrupt if we set t + m and an application will hang.
|
||||
* Therefore we need to make a more complex computation assuming
|
||||
* that there exists a k for which the following is true:
|
||||
* k * t + base < mc + delta
|
||||
* (k + 1) * t + base > mc + delta
|
||||
* where t is the interval in hpet ticks for the given freq,
|
||||
* base is the theoretical start value 0 < base < t,
|
||||
* mc is the main counter value at the time of the interrupt,
|
||||
* delta is the time it takes to write the a value to the
|
||||
* comparator.
|
||||
* k may then be computed as (mc - base + delta) / t .
|
||||
*/
|
||||
base = mc % t;
|
||||
k = (mc - base + hpetp->hp_delta) / t;
|
||||
write_counter(t * (k + 1) + base,
|
||||
&devp->hd_timer->hpet_compare);
|
||||
}
|
||||
|
||||
if (devp->hd_flags & HPET_SHARED_IRQ)
|
||||
|
|
|
@ -387,6 +387,7 @@ static void __exit cpufreq_stats_exit(void)
|
|||
unregister_hotcpu_notifier(&cpufreq_stat_cpu_notifier);
|
||||
for_each_online_cpu(cpu) {
|
||||
cpufreq_stats_free_table(cpu);
|
||||
cpufreq_stats_free_sysfs(cpu);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -130,8 +130,7 @@ static bool dmae_is_busy(struct sh_dmae_chan *sh_chan)
|
|||
|
||||
static unsigned int calc_xmit_shift(struct sh_dmae_chan *sh_chan, u32 chcr)
|
||||
{
|
||||
struct sh_dmae_device *shdev = container_of(sh_chan->common.device,
|
||||
struct sh_dmae_device, common);
|
||||
struct sh_dmae_device *shdev = to_sh_dev(sh_chan);
|
||||
struct sh_dmae_pdata *pdata = shdev->pdata;
|
||||
int cnt = ((chcr & pdata->ts_low_mask) >> pdata->ts_low_shift) |
|
||||
((chcr & pdata->ts_high_mask) >> pdata->ts_high_shift);
|
||||
|
@ -144,8 +143,7 @@ static unsigned int calc_xmit_shift(struct sh_dmae_chan *sh_chan, u32 chcr)
|
|||
|
||||
static u32 log2size_to_chcr(struct sh_dmae_chan *sh_chan, int l2size)
|
||||
{
|
||||
struct sh_dmae_device *shdev = container_of(sh_chan->common.device,
|
||||
struct sh_dmae_device, common);
|
||||
struct sh_dmae_device *shdev = to_sh_dev(sh_chan);
|
||||
struct sh_dmae_pdata *pdata = shdev->pdata;
|
||||
int i;
|
||||
|
||||
|
@ -209,12 +207,11 @@ static int dmae_set_chcr(struct sh_dmae_chan *sh_chan, u32 val)
|
|||
|
||||
static int dmae_set_dmars(struct sh_dmae_chan *sh_chan, u16 val)
|
||||
{
|
||||
struct sh_dmae_device *shdev = container_of(sh_chan->common.device,
|
||||
struct sh_dmae_device, common);
|
||||
struct sh_dmae_device *shdev = to_sh_dev(sh_chan);
|
||||
struct sh_dmae_pdata *pdata = shdev->pdata;
|
||||
const struct sh_dmae_channel *chan_pdata = &pdata->channel[sh_chan->id];
|
||||
u16 __iomem *addr = shdev->dmars;
|
||||
int shift = chan_pdata->dmars_bit;
|
||||
unsigned int shift = chan_pdata->dmars_bit;
|
||||
|
||||
if (dmae_is_busy(sh_chan))
|
||||
return -EBUSY;
|
||||
|
@ -296,9 +293,7 @@ static struct sh_desc *sh_dmae_get_desc(struct sh_dmae_chan *sh_chan)
|
|||
static const struct sh_dmae_slave_config *sh_dmae_find_slave(
|
||||
struct sh_dmae_chan *sh_chan, struct sh_dmae_slave *param)
|
||||
{
|
||||
struct dma_device *dma_dev = sh_chan->common.device;
|
||||
struct sh_dmae_device *shdev = container_of(dma_dev,
|
||||
struct sh_dmae_device, common);
|
||||
struct sh_dmae_device *shdev = to_sh_dev(sh_chan);
|
||||
struct sh_dmae_pdata *pdata = shdev->pdata;
|
||||
int i;
|
||||
|
||||
|
@ -771,10 +766,8 @@ static void sh_chan_xfer_ld_queue(struct sh_dmae_chan *sh_chan)
|
|||
|
||||
spin_lock_bh(&sh_chan->desc_lock);
|
||||
/* DMA work check */
|
||||
if (dmae_is_busy(sh_chan)) {
|
||||
spin_unlock_bh(&sh_chan->desc_lock);
|
||||
return;
|
||||
}
|
||||
if (dmae_is_busy(sh_chan))
|
||||
goto sh_chan_xfer_ld_queue_end;
|
||||
|
||||
/* Find the first not transferred descriptor */
|
||||
list_for_each_entry(desc, &sh_chan->ld_queue, node)
|
||||
|
@ -788,6 +781,7 @@ static void sh_chan_xfer_ld_queue(struct sh_dmae_chan *sh_chan)
|
|||
break;
|
||||
}
|
||||
|
||||
sh_chan_xfer_ld_queue_end:
|
||||
spin_unlock_bh(&sh_chan->desc_lock);
|
||||
}
|
||||
|
||||
|
|
|
@ -52,5 +52,7 @@ struct sh_dmae_device {
|
|||
#define to_sh_chan(chan) container_of(chan, struct sh_dmae_chan, common)
|
||||
#define to_sh_desc(lh) container_of(lh, struct sh_desc, node)
|
||||
#define tx_to_sh_desc(tx) container_of(tx, struct sh_desc, async_tx)
|
||||
#define to_sh_dev(chan) container_of(chan->common.device,\
|
||||
struct sh_dmae_device, common)
|
||||
|
||||
#endif /* __DMA_SHDMA_H */
|
||||
|
|
|
@ -46,10 +46,11 @@ static struct drm_map_list *drm_find_matching_map(struct drm_device *dev,
|
|||
list_for_each_entry(entry, &dev->maplist, head) {
|
||||
/*
|
||||
* Because the kernel-userspace ABI is fixed at a 32-bit offset
|
||||
* while PCI resources may live above that, we ignore the map
|
||||
* offset for maps of type _DRM_FRAMEBUFFER or _DRM_REGISTERS.
|
||||
* It is assumed that each driver will have only one resource of
|
||||
* each type.
|
||||
* while PCI resources may live above that, we only compare the
|
||||
* lower 32 bits of the map offset for maps of type
|
||||
* _DRM_FRAMEBUFFER or _DRM_REGISTERS.
|
||||
* It is assumed that if a driver have more than one resource
|
||||
* of each type, the lower 32 bits are different.
|
||||
*/
|
||||
if (!entry->map ||
|
||||
map->type != entry->map->type ||
|
||||
|
@ -59,9 +60,12 @@ static struct drm_map_list *drm_find_matching_map(struct drm_device *dev,
|
|||
case _DRM_SHM:
|
||||
if (map->flags != _DRM_CONTAINS_LOCK)
|
||||
break;
|
||||
return entry;
|
||||
case _DRM_REGISTERS:
|
||||
case _DRM_FRAME_BUFFER:
|
||||
return entry;
|
||||
if ((entry->map->offset & 0xffffffff) ==
|
||||
(map->offset & 0xffffffff))
|
||||
return entry;
|
||||
default: /* Make gcc happy */
|
||||
;
|
||||
}
|
||||
|
@ -182,9 +186,6 @@ static int drm_addmap_core(struct drm_device * dev, resource_size_t offset,
|
|||
kfree(map);
|
||||
return -EINVAL;
|
||||
}
|
||||
#endif
|
||||
#ifdef __alpha__
|
||||
map->offset += dev->hose->mem_space->start;
|
||||
#endif
|
||||
/* Some drivers preinitialize some maps, without the X Server
|
||||
* needing to be aware of it. Therefore, we just return success
|
||||
|
|
|
@ -1113,7 +1113,7 @@ int drm_mode_getresources(struct drm_device *dev, void *data,
|
|||
if (card_res->count_fbs >= fb_count) {
|
||||
copied = 0;
|
||||
fb_id = (uint32_t __user *)(unsigned long)card_res->fb_id_ptr;
|
||||
list_for_each_entry(fb, &file_priv->fbs, head) {
|
||||
list_for_each_entry(fb, &file_priv->fbs, filp_head) {
|
||||
if (put_user(fb->base.id, fb_id + copied)) {
|
||||
ret = -EFAULT;
|
||||
goto out;
|
||||
|
|
|
@ -526,7 +526,7 @@ static int drm_mmap_dma(struct file *filp, struct vm_area_struct *vma)
|
|||
static resource_size_t drm_core_get_reg_ofs(struct drm_device *dev)
|
||||
{
|
||||
#ifdef __alpha__
|
||||
return dev->hose->dense_mem_base - dev->hose->mem_space->start;
|
||||
return dev->hose->dense_mem_base;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
|
|
|
@ -465,8 +465,10 @@ i915_gem_shmem_pread_slow(struct drm_device *dev,
|
|||
|
||||
page = read_cache_page_gfp(mapping, offset >> PAGE_SHIFT,
|
||||
GFP_HIGHUSER | __GFP_RECLAIMABLE);
|
||||
if (IS_ERR(page))
|
||||
return PTR_ERR(page);
|
||||
if (IS_ERR(page)) {
|
||||
ret = PTR_ERR(page);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (do_bit17_swizzling) {
|
||||
slow_shmem_bit17_copy(page,
|
||||
|
|
|
@ -195,29 +195,10 @@ extern long mga_compat_ioctl(struct file *filp, unsigned int cmd,
|
|||
|
||||
#define mga_flush_write_combine() DRM_WRITEMEMORYBARRIER()
|
||||
|
||||
#if defined(__linux__) && defined(__alpha__)
|
||||
#define MGA_BASE(reg) ((unsigned long)(dev_priv->mmio->handle))
|
||||
#define MGA_ADDR(reg) (MGA_BASE(reg) + reg)
|
||||
|
||||
#define MGA_DEREF(reg) (*(volatile u32 *)MGA_ADDR(reg))
|
||||
#define MGA_DEREF8(reg) (*(volatile u8 *)MGA_ADDR(reg))
|
||||
|
||||
#define MGA_READ(reg) (_MGA_READ((u32 *)MGA_ADDR(reg)))
|
||||
#define MGA_READ8(reg) (_MGA_READ((u8 *)MGA_ADDR(reg)))
|
||||
#define MGA_WRITE(reg, val) do { DRM_WRITEMEMORYBARRIER(); MGA_DEREF(reg) = val; } while (0)
|
||||
#define MGA_WRITE8(reg, val) do { DRM_WRITEMEMORYBARRIER(); MGA_DEREF8(reg) = val; } while (0)
|
||||
|
||||
static inline u32 _MGA_READ(u32 *addr)
|
||||
{
|
||||
DRM_MEMORYBARRIER();
|
||||
return *(volatile u32 *)addr;
|
||||
}
|
||||
#else
|
||||
#define MGA_READ8(reg) DRM_READ8(dev_priv->mmio, (reg))
|
||||
#define MGA_READ(reg) DRM_READ32(dev_priv->mmio, (reg))
|
||||
#define MGA_WRITE8(reg, val) DRM_WRITE8(dev_priv->mmio, (reg), (val))
|
||||
#define MGA_WRITE(reg, val) DRM_WRITE32(dev_priv->mmio, (reg), (val))
|
||||
#endif
|
||||
|
||||
#define DWGREG0 0x1c00
|
||||
#define DWGREG0_END 0x1dff
|
||||
|
|
|
@ -2944,7 +2944,7 @@ restart_ih:
|
|||
radeon_fence_process(rdev);
|
||||
break;
|
||||
case 233: /* GUI IDLE */
|
||||
DRM_DEBUG("IH: CP EOP\n");
|
||||
DRM_DEBUG("IH: GUI idle\n");
|
||||
rdev->pm.gui_idle = true;
|
||||
wake_up(&rdev->irq.idle_queue);
|
||||
break;
|
||||
|
|
|
@ -63,7 +63,7 @@ struct r100_cs_track {
|
|||
unsigned num_arrays;
|
||||
unsigned max_indx;
|
||||
unsigned color_channel_mask;
|
||||
struct r100_cs_track_array arrays[11];
|
||||
struct r100_cs_track_array arrays[16];
|
||||
struct r100_cs_track_cb cb[R300_MAX_CB];
|
||||
struct r100_cs_track_cb zb;
|
||||
struct r100_cs_track_cb aa;
|
||||
|
@ -146,6 +146,12 @@ static inline int r100_packet3_load_vbpntr(struct radeon_cs_parser *p,
|
|||
ib = p->ib->ptr;
|
||||
track = (struct r100_cs_track *)p->track;
|
||||
c = radeon_get_ib_value(p, idx++) & 0x1F;
|
||||
if (c > 16) {
|
||||
DRM_ERROR("Only 16 vertex buffers are allowed %d\n",
|
||||
pkt->opcode);
|
||||
r100_cs_dump_packet(p, pkt);
|
||||
return -EINVAL;
|
||||
}
|
||||
track->num_arrays = c;
|
||||
for (i = 0; i < (c - 1); i+=2, idx+=3) {
|
||||
r = r100_cs_packet_next_reloc(p, &reloc);
|
||||
|
|
|
@ -3444,7 +3444,7 @@ restart_ih:
|
|||
radeon_fence_process(rdev);
|
||||
break;
|
||||
case 233: /* GUI IDLE */
|
||||
DRM_DEBUG("IH: CP EOP\n");
|
||||
DRM_DEBUG("IH: GUI idle\n");
|
||||
rdev->pm.gui_idle = true;
|
||||
wake_up(&rdev->irq.idle_queue);
|
||||
break;
|
||||
|
|
|
@ -165,6 +165,7 @@ struct radeon_clock {
|
|||
uint32_t default_sclk;
|
||||
uint32_t default_dispclk;
|
||||
uint32_t dp_extclk;
|
||||
uint32_t max_pixel_clock;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -1246,6 +1246,10 @@ bool radeon_atom_get_clock_info(struct drm_device *dev)
|
|||
}
|
||||
*dcpll = *p1pll;
|
||||
|
||||
rdev->clock.max_pixel_clock = le16_to_cpu(firmware_info->info.usMaxPixelClock);
|
||||
if (rdev->clock.max_pixel_clock == 0)
|
||||
rdev->clock.max_pixel_clock = 40000;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ static bool __devinit radeon_read_clocks_OF(struct drm_device *dev)
|
|||
p1pll->reference_div = RREG32_PLL(RADEON_PPLL_REF_DIV) & 0x3ff;
|
||||
if (p1pll->reference_div < 2)
|
||||
p1pll->reference_div = 12;
|
||||
p2pll->reference_div = p1pll->reference_div;
|
||||
p2pll->reference_div = p1pll->reference_div;
|
||||
|
||||
/* These aren't in the device-tree */
|
||||
if (rdev->family >= CHIP_R420) {
|
||||
|
@ -139,6 +139,8 @@ static bool __devinit radeon_read_clocks_OF(struct drm_device *dev)
|
|||
p2pll->pll_out_min = 12500;
|
||||
p2pll->pll_out_max = 35000;
|
||||
}
|
||||
/* not sure what the max should be in all cases */
|
||||
rdev->clock.max_pixel_clock = 35000;
|
||||
|
||||
spll->reference_freq = mpll->reference_freq = p1pll->reference_freq;
|
||||
spll->reference_div = mpll->reference_div =
|
||||
|
@ -151,7 +153,7 @@ static bool __devinit radeon_read_clocks_OF(struct drm_device *dev)
|
|||
else
|
||||
rdev->clock.default_sclk =
|
||||
radeon_legacy_get_engine_clock(rdev);
|
||||
|
||||
|
||||
val = of_get_property(dp, "ATY,MCLK", NULL);
|
||||
if (val && *val)
|
||||
rdev->clock.default_mclk = (*val) / 10;
|
||||
|
@ -160,7 +162,7 @@ static bool __devinit radeon_read_clocks_OF(struct drm_device *dev)
|
|||
radeon_legacy_get_memory_clock(rdev);
|
||||
|
||||
DRM_INFO("Using device-tree clock info\n");
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
#else
|
||||
|
|
|
@ -866,6 +866,11 @@ bool radeon_combios_get_clock_info(struct drm_device *dev)
|
|||
rdev->clock.default_sclk = sclk;
|
||||
rdev->clock.default_mclk = mclk;
|
||||
|
||||
if (RBIOS32(pll_info + 0x16))
|
||||
rdev->clock.max_pixel_clock = RBIOS32(pll_info + 0x16);
|
||||
else
|
||||
rdev->clock.max_pixel_clock = 35000; /* might need something asic specific */
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -1548,9 +1553,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
|
|||
(rdev->pdev->subsystem_device == 0x4a48)) {
|
||||
/* Mac X800 */
|
||||
rdev->mode_info.connector_table = CT_MAC_X800;
|
||||
} else if ((rdev->pdev->device == 0x4150) &&
|
||||
(rdev->pdev->subsystem_vendor == 0x1002) &&
|
||||
(rdev->pdev->subsystem_device == 0x4150)) {
|
||||
} else if (of_machine_is_compatible("PowerMac7,2") ||
|
||||
of_machine_is_compatible("PowerMac7,3")) {
|
||||
/* Mac G5 9600 */
|
||||
rdev->mode_info.connector_table = CT_MAC_G5_9600;
|
||||
} else
|
||||
|
|
|
@ -626,8 +626,14 @@ static int radeon_vga_get_modes(struct drm_connector *connector)
|
|||
static int radeon_vga_mode_valid(struct drm_connector *connector,
|
||||
struct drm_display_mode *mode)
|
||||
{
|
||||
struct drm_device *dev = connector->dev;
|
||||
struct radeon_device *rdev = dev->dev_private;
|
||||
|
||||
/* XXX check mode bandwidth */
|
||||
/* XXX verify against max DAC output frequency */
|
||||
|
||||
if ((mode->clock / 10) > rdev->clock.max_pixel_clock)
|
||||
return MODE_CLOCK_HIGH;
|
||||
|
||||
return MODE_OK;
|
||||
}
|
||||
|
||||
|
@ -1015,6 +1021,11 @@ static int radeon_dvi_mode_valid(struct drm_connector *connector,
|
|||
} else
|
||||
return MODE_CLOCK_HIGH;
|
||||
}
|
||||
|
||||
/* check against the max pixel clock */
|
||||
if ((mode->clock / 10) > rdev->clock.max_pixel_clock)
|
||||
return MODE_CLOCK_HIGH;
|
||||
|
||||
return MODE_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -647,9 +647,6 @@ int savage_driver_firstopen(struct drm_device *dev)
|
|||
ret = drm_addmap(dev, aperture_base, SAVAGE_APERTURE_SIZE,
|
||||
_DRM_FRAME_BUFFER, _DRM_WRITE_COMBINING,
|
||||
&dev_priv->aperture);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
config LEDS_GPIO_REGISTER
|
||||
bool
|
||||
help
|
||||
This option provides the function gpio_led_register_device.
|
||||
As this function is used by arch code it must not be compiled as a
|
||||
module.
|
||||
|
||||
menuconfig NEW_LEDS
|
||||
bool "LED Support"
|
||||
help
|
||||
|
@ -7,22 +14,14 @@ menuconfig NEW_LEDS
|
|||
This is not related to standard keyboard LEDs which are controlled
|
||||
via the input system.
|
||||
|
||||
if NEW_LEDS
|
||||
|
||||
config LEDS_CLASS
|
||||
bool "LED Class Support"
|
||||
depends on NEW_LEDS
|
||||
help
|
||||
This option enables the led sysfs class in /sys/class/leds. You'll
|
||||
need this to do anything useful with LEDs. If unsure, say N.
|
||||
|
||||
config LEDS_GPIO_REGISTER
|
||||
bool
|
||||
help
|
||||
This option provides the function gpio_led_register_device.
|
||||
As this function is used by arch code it must not be compiled as a
|
||||
module.
|
||||
|
||||
if NEW_LEDS
|
||||
|
||||
comment "LED drivers"
|
||||
|
||||
config LEDS_88PM860X
|
||||
|
@ -391,6 +390,7 @@ config LEDS_NETXBIG
|
|||
|
||||
config LEDS_ASIC3
|
||||
bool "LED support for the HTC ASIC3"
|
||||
depends on LEDS_CLASS
|
||||
depends on MFD_ASIC3
|
||||
default y
|
||||
help
|
||||
|
|
|
@ -534,6 +534,82 @@ void bitmap_print_sb(struct bitmap *bitmap)
|
|||
kunmap_atomic(sb, KM_USER0);
|
||||
}
|
||||
|
||||
/*
|
||||
* bitmap_new_disk_sb
|
||||
* @bitmap
|
||||
*
|
||||
* This function is somewhat the reverse of bitmap_read_sb. bitmap_read_sb
|
||||
* reads and verifies the on-disk bitmap superblock and populates bitmap_info.
|
||||
* This function verifies 'bitmap_info' and populates the on-disk bitmap
|
||||
* structure, which is to be written to disk.
|
||||
*
|
||||
* Returns: 0 on success, -Exxx on error
|
||||
*/
|
||||
static int bitmap_new_disk_sb(struct bitmap *bitmap)
|
||||
{
|
||||
bitmap_super_t *sb;
|
||||
unsigned long chunksize, daemon_sleep, write_behind;
|
||||
int err = -EINVAL;
|
||||
|
||||
bitmap->sb_page = alloc_page(GFP_KERNEL);
|
||||
if (IS_ERR(bitmap->sb_page)) {
|
||||
err = PTR_ERR(bitmap->sb_page);
|
||||
bitmap->sb_page = NULL;
|
||||
return err;
|
||||
}
|
||||
bitmap->sb_page->index = 0;
|
||||
|
||||
sb = kmap_atomic(bitmap->sb_page, KM_USER0);
|
||||
|
||||
sb->magic = cpu_to_le32(BITMAP_MAGIC);
|
||||
sb->version = cpu_to_le32(BITMAP_MAJOR_HI);
|
||||
|
||||
chunksize = bitmap->mddev->bitmap_info.chunksize;
|
||||
BUG_ON(!chunksize);
|
||||
if (!is_power_of_2(chunksize)) {
|
||||
kunmap_atomic(sb, KM_USER0);
|
||||
printk(KERN_ERR "bitmap chunksize not a power of 2\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
sb->chunksize = cpu_to_le32(chunksize);
|
||||
|
||||
daemon_sleep = bitmap->mddev->bitmap_info.daemon_sleep;
|
||||
if (!daemon_sleep ||
|
||||
(daemon_sleep < 1) || (daemon_sleep > MAX_SCHEDULE_TIMEOUT)) {
|
||||
printk(KERN_INFO "Choosing daemon_sleep default (5 sec)\n");
|
||||
daemon_sleep = 5 * HZ;
|
||||
}
|
||||
sb->daemon_sleep = cpu_to_le32(daemon_sleep);
|
||||
bitmap->mddev->bitmap_info.daemon_sleep = daemon_sleep;
|
||||
|
||||
/*
|
||||
* FIXME: write_behind for RAID1. If not specified, what
|
||||
* is a good choice? We choose COUNTER_MAX / 2 arbitrarily.
|
||||
*/
|
||||
write_behind = bitmap->mddev->bitmap_info.max_write_behind;
|
||||
if (write_behind > COUNTER_MAX)
|
||||
write_behind = COUNTER_MAX / 2;
|
||||
sb->write_behind = cpu_to_le32(write_behind);
|
||||
bitmap->mddev->bitmap_info.max_write_behind = write_behind;
|
||||
|
||||
/* keep the array size field of the bitmap superblock up to date */
|
||||
sb->sync_size = cpu_to_le64(bitmap->mddev->resync_max_sectors);
|
||||
|
||||
memcpy(sb->uuid, bitmap->mddev->uuid, 16);
|
||||
|
||||
bitmap->flags |= BITMAP_STALE;
|
||||
sb->state |= cpu_to_le32(BITMAP_STALE);
|
||||
bitmap->events_cleared = bitmap->mddev->events;
|
||||
sb->events_cleared = cpu_to_le64(bitmap->mddev->events);
|
||||
|
||||
bitmap->flags |= BITMAP_HOSTENDIAN;
|
||||
sb->version = cpu_to_le32(BITMAP_MAJOR_HOSTENDIAN);
|
||||
|
||||
kunmap_atomic(sb, KM_USER0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* read the superblock from the bitmap file and initialize some bitmap fields */
|
||||
static int bitmap_read_sb(struct bitmap *bitmap)
|
||||
{
|
||||
|
@ -575,7 +651,7 @@ static int bitmap_read_sb(struct bitmap *bitmap)
|
|||
reason = "unrecognized superblock version";
|
||||
else if (chunksize < 512)
|
||||
reason = "bitmap chunksize too small";
|
||||
else if ((1 << ffz(~chunksize)) != chunksize)
|
||||
else if (!is_power_of_2(chunksize))
|
||||
reason = "bitmap chunksize not a power of 2";
|
||||
else if (daemon_sleep < 1 || daemon_sleep > MAX_SCHEDULE_TIMEOUT)
|
||||
reason = "daemon sleep period out of range";
|
||||
|
@ -1076,8 +1152,8 @@ static int bitmap_init_from_disk(struct bitmap *bitmap, sector_t start)
|
|||
}
|
||||
|
||||
printk(KERN_INFO "%s: bitmap initialized from disk: "
|
||||
"read %lu/%lu pages, set %lu bits\n",
|
||||
bmname(bitmap), bitmap->file_pages, num_pages, bit_cnt);
|
||||
"read %lu/%lu pages, set %lu of %lu bits\n",
|
||||
bmname(bitmap), bitmap->file_pages, num_pages, bit_cnt, chunks);
|
||||
|
||||
return 0;
|
||||
|
||||
|
@ -1332,7 +1408,7 @@ int bitmap_startwrite(struct bitmap *bitmap, sector_t offset, unsigned long sect
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (unlikely((*bmc & COUNTER_MAX) == COUNTER_MAX)) {
|
||||
if (unlikely(COUNTER(*bmc) == COUNTER_MAX)) {
|
||||
DEFINE_WAIT(__wait);
|
||||
/* note that it is safe to do the prepare_to_wait
|
||||
* after the test as long as we do it before dropping
|
||||
|
@ -1404,10 +1480,10 @@ void bitmap_endwrite(struct bitmap *bitmap, sector_t offset, unsigned long secto
|
|||
sysfs_notify_dirent_safe(bitmap->sysfs_can_clear);
|
||||
}
|
||||
|
||||
if (!success && ! (*bmc & NEEDED_MASK))
|
||||
if (!success && !NEEDED(*bmc))
|
||||
*bmc |= NEEDED_MASK;
|
||||
|
||||
if ((*bmc & COUNTER_MAX) == COUNTER_MAX)
|
||||
if (COUNTER(*bmc) == COUNTER_MAX)
|
||||
wake_up(&bitmap->overflow_wait);
|
||||
|
||||
(*bmc)--;
|
||||
|
@ -1728,9 +1804,16 @@ int bitmap_create(mddev_t *mddev)
|
|||
vfs_fsync(file, 1);
|
||||
}
|
||||
/* read superblock from bitmap file (this sets mddev->bitmap_info.chunksize) */
|
||||
if (!mddev->bitmap_info.external)
|
||||
err = bitmap_read_sb(bitmap);
|
||||
else {
|
||||
if (!mddev->bitmap_info.external) {
|
||||
/*
|
||||
* If 'MD_ARRAY_FIRST_USE' is set, then device-mapper is
|
||||
* instructing us to create a new on-disk bitmap instance.
|
||||
*/
|
||||
if (test_and_clear_bit(MD_ARRAY_FIRST_USE, &mddev->flags))
|
||||
err = bitmap_new_disk_sb(bitmap);
|
||||
else
|
||||
err = bitmap_read_sb(bitmap);
|
||||
} else {
|
||||
err = 0;
|
||||
if (mddev->bitmap_info.chunksize == 0 ||
|
||||
mddev->bitmap_info.daemon_sleep == 0)
|
||||
|
@ -1754,9 +1837,6 @@ int bitmap_create(mddev_t *mddev)
|
|||
bitmap->chunks = chunks;
|
||||
bitmap->pages = pages;
|
||||
bitmap->missing_pages = pages;
|
||||
bitmap->counter_bits = COUNTER_BITS;
|
||||
|
||||
bitmap->syncchunk = ~0UL;
|
||||
|
||||
#ifdef INJECT_FATAL_FAULT_1
|
||||
bitmap->bp = NULL;
|
||||
|
|
|
@ -85,7 +85,6 @@
|
|||
typedef __u16 bitmap_counter_t;
|
||||
#define COUNTER_BITS 16
|
||||
#define COUNTER_BIT_SHIFT 4
|
||||
#define COUNTER_BYTE_RATIO (COUNTER_BITS / 8)
|
||||
#define COUNTER_BYTE_SHIFT (COUNTER_BIT_SHIFT - 3)
|
||||
|
||||
#define NEEDED_MASK ((bitmap_counter_t) (1 << (COUNTER_BITS - 1)))
|
||||
|
@ -196,19 +195,10 @@ struct bitmap {
|
|||
|
||||
mddev_t *mddev; /* the md device that the bitmap is for */
|
||||
|
||||
int counter_bits; /* how many bits per block counter */
|
||||
|
||||
/* bitmap chunksize -- how much data does each bit represent? */
|
||||
unsigned long chunkshift; /* chunksize = 2^chunkshift (for bitops) */
|
||||
unsigned long chunks; /* total number of data chunks for the array */
|
||||
|
||||
/* We hold a count on the chunk currently being synced, and drop
|
||||
* it when the last block is started. If the resync is aborted
|
||||
* midway, we need to be able to drop that count, so we remember
|
||||
* the counted chunk..
|
||||
*/
|
||||
unsigned long syncchunk;
|
||||
|
||||
__u64 events_cleared;
|
||||
int need_sync;
|
||||
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче