Merge remote-tracking branch 'upstream/master' into queue
Merging critical fixes from upstream required for development. * upstream/master: (809 commits) libata: Add a space to " 2GB ATA Flash Disk" DMA blacklist entry Revert "powerpc: Update g5_defconfig" powerpc/perf: Use pmc_overflow() to detect rolled back events powerpc: Fix VMX in interrupt check in POWER7 copy loops powerpc: POWER7 copy_to_user/copy_from_user patch applied twice powerpc: Fix personality handling in ppc64_personality() powerpc/dma-iommu: Fix IOMMU window check powerpc: Remove unnecessary ifdefs powerpc/kgdb: Restore current_thread_info properly powerpc/kgdb: Bail out of KGDB when we've been triggered powerpc/kgdb: Do not set kgdb_single_step on ppc powerpc/mpic_msgr: Add missing includes powerpc: Fix null pointer deref in perf hardware breakpoints powerpc: Fixup whitespace in xmon powerpc: Fix xmon dl command for new printk implementation xfs: check for possible overflow in xfs_ioc_trim xfs: unlock the AGI buffer when looping in xfs_dialloc xfs: fix uninitialised variable in xfs_rtbuf_get() powerpc/fsl: fix "Failed to mount /dev: No such device" errors powerpc/fsl: update defconfigs ... Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
This commit is contained in:
Коммит
c78aa4c4b9
|
@ -5,4 +5,15 @@ Contact: "Ike Panhc <ike.pan@canonical.com>"
|
|||
Description:
|
||||
Control the power of camera module. 1 means on, 0 means off.
|
||||
|
||||
What: /sys/devices/platform/ideapad/fan_mode
|
||||
Date: June 2012
|
||||
KernelVersion: 3.6
|
||||
Contact: "Maxim Mikityanskiy <maxtram95@gmail.com>"
|
||||
Description:
|
||||
Change fan mode
|
||||
There are four available modes:
|
||||
* 0 -> Super Silent Mode
|
||||
* 1 -> Standard Mode
|
||||
* 2 -> Dust Cleaning
|
||||
* 4 -> Efficient Thermal Dissipation Mode
|
||||
|
||||
|
|
|
@ -125,7 +125,7 @@ the structure refers to a radio tuner the
|
|||
<constant>V4L2_TUNER_CAP_NORM</constant> flags can't be used.</para>
|
||||
<para>If multiple frequency bands are supported, then
|
||||
<structfield>capability</structfield> is the union of all
|
||||
<structfield>capability></structfield> fields of each &v4l2-frequency-band;.
|
||||
<structfield>capability</structfield> fields of each &v4l2-frequency-band;.
|
||||
</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
|
|
|
@ -3,15 +3,21 @@
|
|||
biodoc.txt
|
||||
- Notes on the Generic Block Layer Rewrite in Linux 2.5
|
||||
capability.txt
|
||||
- Generic Block Device Capability (/sys/block/<disk>/capability)
|
||||
- Generic Block Device Capability (/sys/block/<device>/capability)
|
||||
cfq-iosched.txt
|
||||
- CFQ IO scheduler tunables
|
||||
data-integrity.txt
|
||||
- Block data integrity
|
||||
deadline-iosched.txt
|
||||
- Deadline IO scheduler tunables
|
||||
ioprio.txt
|
||||
- Block io priorities (in CFQ scheduler)
|
||||
queue-sysfs.txt
|
||||
- Queue's sysfs entries
|
||||
request.txt
|
||||
- The members of struct request (in include/linux/blkdev.h)
|
||||
stat.txt
|
||||
- Block layer statistics in /sys/block/<dev>/stat
|
||||
- Block layer statistics in /sys/block/<device>/stat
|
||||
switching-sched.txt
|
||||
- Switching I/O schedulers at runtime
|
||||
writeback_cache_control.txt
|
||||
|
|
|
@ -1,3 +1,14 @@
|
|||
CFQ (Complete Fairness Queueing)
|
||||
===============================
|
||||
|
||||
The main aim of CFQ scheduler is to provide a fair allocation of the disk
|
||||
I/O bandwidth for all the processes which requests an I/O operation.
|
||||
|
||||
CFQ maintains the per process queue for the processes which request I/O
|
||||
operation(syncronous requests). In case of asynchronous requests, all the
|
||||
requests from all the processes are batched together according to their
|
||||
process's I/O priority.
|
||||
|
||||
CFQ ioscheduler tunables
|
||||
========================
|
||||
|
||||
|
@ -25,6 +36,72 @@ there are multiple spindles behind single LUN (Host based hardware RAID
|
|||
controller or for storage arrays), setting slice_idle=0 might end up in better
|
||||
throughput and acceptable latencies.
|
||||
|
||||
back_seek_max
|
||||
-------------
|
||||
This specifies, given in Kbytes, the maximum "distance" for backward seeking.
|
||||
The distance is the amount of space from the current head location to the
|
||||
sectors that are backward in terms of distance.
|
||||
|
||||
This parameter allows the scheduler to anticipate requests in the "backward"
|
||||
direction and consider them as being the "next" if they are within this
|
||||
distance from the current head location.
|
||||
|
||||
back_seek_penalty
|
||||
-----------------
|
||||
This parameter is used to compute the cost of backward seeking. If the
|
||||
backward distance of request is just 1/back_seek_penalty from a "front"
|
||||
request, then the seeking cost of two requests is considered equivalent.
|
||||
|
||||
So scheduler will not bias toward one or the other request (otherwise scheduler
|
||||
will bias toward front request). Default value of back_seek_penalty is 2.
|
||||
|
||||
fifo_expire_async
|
||||
-----------------
|
||||
This parameter is used to set the timeout of asynchronous requests. Default
|
||||
value of this is 248ms.
|
||||
|
||||
fifo_expire_sync
|
||||
----------------
|
||||
This parameter is used to set the timeout of synchronous requests. Default
|
||||
value of this is 124ms. In case to favor synchronous requests over asynchronous
|
||||
one, this value should be decreased relative to fifo_expire_async.
|
||||
|
||||
slice_async
|
||||
-----------
|
||||
This parameter is same as of slice_sync but for asynchronous queue. The
|
||||
default value is 40ms.
|
||||
|
||||
slice_async_rq
|
||||
--------------
|
||||
This parameter is used to limit the dispatching of asynchronous request to
|
||||
device request queue in queue's slice time. The maximum number of request that
|
||||
are allowed to be dispatched also depends upon the io priority. Default value
|
||||
for this is 2.
|
||||
|
||||
slice_sync
|
||||
----------
|
||||
When a queue is selected for execution, the queues IO requests are only
|
||||
executed for a certain amount of time(time_slice) before switching to another
|
||||
queue. This parameter is used to calculate the time slice of synchronous
|
||||
queue.
|
||||
|
||||
time_slice is computed using the below equation:-
|
||||
time_slice = slice_sync + (slice_sync/5 * (4 - prio)). To increase the
|
||||
time_slice of synchronous queue, increase the value of slice_sync. Default
|
||||
value is 100ms.
|
||||
|
||||
quantum
|
||||
-------
|
||||
This specifies the number of request dispatched to the device queue. In a
|
||||
queue's time slice, a request will not be dispatched if the number of request
|
||||
in the device exceeds this parameter. This parameter is used for synchronous
|
||||
request.
|
||||
|
||||
In case of storage with several disk, this setting can limit the parallel
|
||||
processing of request. Therefore, increasing the value can imporve the
|
||||
performace although this can cause the latency of some I/O to increase due
|
||||
to more number of requests.
|
||||
|
||||
CFQ IOPS Mode for group scheduling
|
||||
===================================
|
||||
Basic CFQ design is to provide priority based time slices. Higher priority
|
||||
|
|
|
@ -9,20 +9,71 @@ These files are the ones found in the /sys/block/xxx/queue/ directory.
|
|||
Files denoted with a RO postfix are readonly and the RW postfix means
|
||||
read-write.
|
||||
|
||||
add_random (RW)
|
||||
----------------
|
||||
This file allows to trun off the disk entropy contribution. Default
|
||||
value of this file is '1'(on).
|
||||
|
||||
discard_granularity (RO)
|
||||
-----------------------
|
||||
This shows the size of internal allocation of the device in bytes, if
|
||||
reported by the device. A value of '0' means device does not support
|
||||
the discard functionality.
|
||||
|
||||
discard_max_bytes (RO)
|
||||
----------------------
|
||||
Devices that support discard functionality may have internal limits on
|
||||
the number of bytes that can be trimmed or unmapped in a single operation.
|
||||
The discard_max_bytes parameter is set by the device driver to the maximum
|
||||
number of bytes that can be discarded in a single operation. Discard
|
||||
requests issued to the device must not exceed this limit. A discard_max_bytes
|
||||
value of 0 means that the device does not support discard functionality.
|
||||
|
||||
discard_zeroes_data (RO)
|
||||
------------------------
|
||||
When read, this file will show if the discarded block are zeroed by the
|
||||
device or not. If its value is '1' the blocks are zeroed otherwise not.
|
||||
|
||||
hw_sector_size (RO)
|
||||
-------------------
|
||||
This is the hardware sector size of the device, in bytes.
|
||||
|
||||
iostats (RW)
|
||||
-------------
|
||||
This file is used to control (on/off) the iostats accounting of the
|
||||
disk.
|
||||
|
||||
logical_block_size (RO)
|
||||
-----------------------
|
||||
This is the logcal block size of the device, in bytes.
|
||||
|
||||
max_hw_sectors_kb (RO)
|
||||
----------------------
|
||||
This is the maximum number of kilobytes supported in a single data transfer.
|
||||
|
||||
max_integrity_segments (RO)
|
||||
---------------------------
|
||||
When read, this file shows the max limit of integrity segments as
|
||||
set by block layer which a hardware controller can handle.
|
||||
|
||||
max_sectors_kb (RW)
|
||||
-------------------
|
||||
This is the maximum number of kilobytes that the block layer will allow
|
||||
for a filesystem request. Must be smaller than or equal to the maximum
|
||||
size allowed by the hardware.
|
||||
|
||||
max_segments (RO)
|
||||
-----------------
|
||||
Maximum number of segments of the device.
|
||||
|
||||
max_segment_size (RO)
|
||||
---------------------
|
||||
Maximum segment size of the device.
|
||||
|
||||
minimum_io_size (RO)
|
||||
--------------------
|
||||
This is the smallest preferred io size reported by the device.
|
||||
|
||||
nomerges (RW)
|
||||
-------------
|
||||
This enables the user to disable the lookup logic involved with IO
|
||||
|
@ -45,11 +96,24 @@ per-block-cgroup request pool. IOW, if there are N block cgroups,
|
|||
each request queue may have upto N request pools, each independently
|
||||
regulated by nr_requests.
|
||||
|
||||
optimal_io_size (RO)
|
||||
--------------------
|
||||
This is the optimal io size reported by the device.
|
||||
|
||||
physical_block_size (RO)
|
||||
------------------------
|
||||
This is the physical block size of device, in bytes.
|
||||
|
||||
read_ahead_kb (RW)
|
||||
------------------
|
||||
Maximum number of kilobytes to read-ahead for filesystems on this block
|
||||
device.
|
||||
|
||||
rotational (RW)
|
||||
---------------
|
||||
This file is used to stat if the device is of rotational type or
|
||||
non-rotational type.
|
||||
|
||||
rq_affinity (RW)
|
||||
----------------
|
||||
If this option is '1', the block layer will migrate request completions to the
|
||||
|
|
|
@ -10,8 +10,8 @@ Required properties:
|
|||
- compatible : Should be "fsl,<chip>-esdhc"
|
||||
|
||||
Optional properties:
|
||||
- fsl,cd-internal : Indicate to use controller internal card detection
|
||||
- fsl,wp-internal : Indicate to use controller internal write protection
|
||||
- fsl,cd-controller : Indicate to use controller internal card detection
|
||||
- fsl,wp-controller : Indicate to use controller internal write protection
|
||||
|
||||
Examples:
|
||||
|
||||
|
@ -19,8 +19,8 @@ esdhc@70004000 {
|
|||
compatible = "fsl,imx51-esdhc";
|
||||
reg = <0x70004000 0x4000>;
|
||||
interrupts = <1>;
|
||||
fsl,cd-internal;
|
||||
fsl,wp-internal;
|
||||
fsl,cd-controller;
|
||||
fsl,wp-controller;
|
||||
};
|
||||
|
||||
esdhc@70008000 {
|
||||
|
|
|
@ -9,9 +9,9 @@ Required properties:
|
|||
- regulators: list of regulators provided by this controller, must have
|
||||
property "regulator-compatible" to match their hardware counterparts:
|
||||
sm[0-2], ldo[0-9] and ldo_rtc
|
||||
- sm0-supply: The input supply for the SM0.
|
||||
- sm1-supply: The input supply for the SM1.
|
||||
- sm2-supply: The input supply for the SM2.
|
||||
- vin-sm0-supply: The input supply for the SM0.
|
||||
- vin-sm1-supply: The input supply for the SM1.
|
||||
- vin-sm2-supply: The input supply for the SM2.
|
||||
- vinldo01-supply: The input supply for the LDO1 and LDO2
|
||||
- vinldo23-supply: The input supply for the LDO2 and LDO3
|
||||
- vinldo4-supply: The input supply for the LDO4
|
||||
|
@ -30,9 +30,9 @@ Example:
|
|||
#gpio-cells = <2>;
|
||||
gpio-controller;
|
||||
|
||||
sm0-supply = <&some_reg>;
|
||||
sm1-supply = <&some_reg>;
|
||||
sm2-supply = <&some_reg>;
|
||||
vin-sm0-supply = <&some_reg>;
|
||||
vin-sm1-supply = <&some_reg>;
|
||||
vin-sm2-supply = <&some_reg>;
|
||||
vinldo01-supply = <...>;
|
||||
vinldo23-supply = <...>;
|
||||
vinldo4-supply = <...>;
|
||||
|
|
|
@ -137,6 +137,17 @@ errors=panic|continue|remount-ro
|
|||
without doing anything or remount the partition in
|
||||
read-only mode (default behavior).
|
||||
|
||||
discard -- If set, issues discard/TRIM commands to the block
|
||||
device when blocks are freed. This is useful for SSD devices
|
||||
and sparse/thinly-provisoned LUNs.
|
||||
|
||||
nfs -- This option maintains an index (cache) of directory
|
||||
inodes by i_logstart which is used by the nfs-related code to
|
||||
improve look-ups.
|
||||
|
||||
Enable this only if you want to export the FAT filesystem
|
||||
over NFS
|
||||
|
||||
<bool>: 0,1,yes,no,true,false
|
||||
|
||||
TODO
|
||||
|
|
|
@ -51,8 +51,23 @@ Built-in netconsole starts immediately after the TCP stack is
|
|||
initialized and attempts to bring up the supplied dev at the supplied
|
||||
address.
|
||||
|
||||
The remote host can run either 'netcat -u -l -p <port>',
|
||||
'nc -l -u <port>' or syslogd.
|
||||
The remote host has several options to receive the kernel messages,
|
||||
for example:
|
||||
|
||||
1) syslogd
|
||||
|
||||
2) netcat
|
||||
|
||||
On distributions using a BSD-based netcat version (e.g. Fedora,
|
||||
openSUSE and Ubuntu) the listening port must be specified without
|
||||
the -p switch:
|
||||
|
||||
'nc -u -l -p <port>' / 'nc -u -l <port>' or
|
||||
'netcat -u -l -p <port>' / 'netcat -u -l <port>'
|
||||
|
||||
3) socat
|
||||
|
||||
'socat udp-recv:<port> -'
|
||||
|
||||
Dynamic reconfiguration:
|
||||
========================
|
||||
|
|
|
@ -840,9 +840,9 @@ static unsigned long i2c_pin_configs[] = {
|
|||
|
||||
static struct pinctrl_map __initdata mapping[] = {
|
||||
PIN_MAP_MUX_GROUP("foo-i2c.0", PINCTRL_STATE_DEFAULT, "pinctrl-foo", "i2c0", "i2c0"),
|
||||
PIN_MAP_MUX_CONFIGS_GROUP("foo-i2c.0", PINCTRL_STATE_DEFAULT, "pinctrl-foo", "i2c0", i2c_grp_configs),
|
||||
PIN_MAP_MUX_CONFIGS_PIN("foo-i2c.0", PINCTRL_STATE_DEFAULT, "pinctrl-foo", "i2c0scl", i2c_pin_configs),
|
||||
PIN_MAP_MUX_CONFIGS_PIN("foo-i2c.0", PINCTRL_STATE_DEFAULT, "pinctrl-foo", "i2c0sda", i2c_pin_configs),
|
||||
PIN_MAP_CONFIGS_GROUP("foo-i2c.0", PINCTRL_STATE_DEFAULT, "pinctrl-foo", "i2c0", i2c_grp_configs),
|
||||
PIN_MAP_CONFIGS_PIN("foo-i2c.0", PINCTRL_STATE_DEFAULT, "pinctrl-foo", "i2c0scl", i2c_pin_configs),
|
||||
PIN_MAP_CONFIGS_PIN("foo-i2c.0", PINCTRL_STATE_DEFAULT, "pinctrl-foo", "i2c0sda", i2c_pin_configs),
|
||||
};
|
||||
|
||||
Finally, some devices expect the mapping table to contain certain specific
|
||||
|
|
|
@ -46,14 +46,13 @@ restrictions, it can call prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY, ...)
|
|||
so that any otherwise allowed process (even those in external pid namespaces)
|
||||
may attach.
|
||||
|
||||
These restrictions do not change how ptrace via PTRACE_TRACEME operates.
|
||||
|
||||
The sysctl settings are:
|
||||
The sysctl settings (writable only with CAP_SYS_PTRACE) are:
|
||||
|
||||
0 - classic ptrace permissions: a process can PTRACE_ATTACH to any other
|
||||
process running under the same uid, as long as it is dumpable (i.e.
|
||||
did not transition uids, start privileged, or have called
|
||||
prctl(PR_SET_DUMPABLE...) already).
|
||||
prctl(PR_SET_DUMPABLE...) already). Similarly, PTRACE_TRACEME is
|
||||
unchanged.
|
||||
|
||||
1 - restricted ptrace: a process must have a predefined relationship
|
||||
with the inferior it wants to call PTRACE_ATTACH on. By default,
|
||||
|
@ -61,12 +60,13 @@ The sysctl settings are:
|
|||
classic criteria is also met. To change the relationship, an
|
||||
inferior can call prctl(PR_SET_PTRACER, debugger, ...) to declare
|
||||
an allowed debugger PID to call PTRACE_ATTACH on the inferior.
|
||||
Using PTRACE_TRACEME is unchanged.
|
||||
|
||||
2 - admin-only attach: only processes with CAP_SYS_PTRACE may use ptrace
|
||||
with PTRACE_ATTACH.
|
||||
with PTRACE_ATTACH, or through children calling PTRACE_TRACEME.
|
||||
|
||||
3 - no attach: no processes may use ptrace with PTRACE_ATTACH. Once set,
|
||||
this sysctl cannot be changed to a lower value.
|
||||
3 - no attach: no processes may use ptrace with PTRACE_ATTACH nor via
|
||||
PTRACE_TRACEME. Once set, this sysctl value cannot be changed.
|
||||
|
||||
The original children-only logic was based on the restrictions in grsecurity.
|
||||
|
||||
|
|
|
@ -299,11 +299,17 @@ map_hugetlb.c.
|
|||
*******************************************************************
|
||||
|
||||
/*
|
||||
* hugepage-shm: see Documentation/vm/hugepage-shm.c
|
||||
* map_hugetlb: see tools/testing/selftests/vm/map_hugetlb.c
|
||||
*/
|
||||
|
||||
*******************************************************************
|
||||
|
||||
/*
|
||||
* hugepage-mmap: see Documentation/vm/hugepage-mmap.c
|
||||
* hugepage-shm: see tools/testing/selftests/vm/hugepage-shm.c
|
||||
*/
|
||||
|
||||
*******************************************************************
|
||||
|
||||
/*
|
||||
* hugepage-mmap: see tools/testing/selftests/vm/hugepage-mmap.c
|
||||
*/
|
||||
|
|
|
@ -3,6 +3,7 @@ Kernel driver w1_therm
|
|||
|
||||
Supported chips:
|
||||
* Maxim ds18*20 based temperature sensors.
|
||||
* Maxim ds1825 based temperature sensors.
|
||||
|
||||
Author: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
|
||||
|
||||
|
@ -15,6 +16,7 @@ supported family codes:
|
|||
W1_THERM_DS18S20 0x10
|
||||
W1_THERM_DS1822 0x22
|
||||
W1_THERM_DS18B20 0x28
|
||||
W1_THERM_DS1825 0x3B
|
||||
|
||||
Support is provided through the sysfs w1_slave file. Each open and
|
||||
read sequence will initiate a temperature conversion then provide two
|
||||
|
|
68
MAINTAINERS
68
MAINTAINERS
|
@ -827,24 +827,24 @@ F: arch/arm/mach-pxa/colibri-pxa270-income.c
|
|||
|
||||
ARM/INTEL IOP32X ARM ARCHITECTURE
|
||||
M: Lennert Buytenhek <kernel@wantstofly.org>
|
||||
M: Dan Williams <dan.j.williams@intel.com>
|
||||
M: Dan Williams <djbw@fb.com>
|
||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
S: Maintained
|
||||
|
||||
ARM/INTEL IOP33X ARM ARCHITECTURE
|
||||
M: Dan Williams <dan.j.williams@intel.com>
|
||||
M: Dan Williams <djbw@fb.com>
|
||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
S: Maintained
|
||||
|
||||
ARM/INTEL IOP13XX ARM ARCHITECTURE
|
||||
M: Lennert Buytenhek <kernel@wantstofly.org>
|
||||
M: Dan Williams <dan.j.williams@intel.com>
|
||||
M: Dan Williams <djbw@fb.com>
|
||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
S: Maintained
|
||||
|
||||
ARM/INTEL IQ81342EX MACHINE SUPPORT
|
||||
M: Lennert Buytenhek <kernel@wantstofly.org>
|
||||
M: Dan Williams <dan.j.williams@intel.com>
|
||||
M: Dan Williams <djbw@fb.com>
|
||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
S: Maintained
|
||||
|
||||
|
@ -869,7 +869,7 @@ F: drivers/pcmcia/pxa2xx_stargate2.c
|
|||
|
||||
ARM/INTEL XSC3 (MANZANO) ARM CORE
|
||||
M: Lennert Buytenhek <kernel@wantstofly.org>
|
||||
M: Dan Williams <dan.j.williams@intel.com>
|
||||
M: Dan Williams <djbw@fb.com>
|
||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
S: Maintained
|
||||
|
||||
|
@ -925,14 +925,14 @@ S: Maintained
|
|||
|
||||
ARM/NOMADIK ARCHITECTURE
|
||||
M: Alessandro Rubini <rubini@unipv.it>
|
||||
M: Linus Walleij <linus.walleij@stericsson.com>
|
||||
M: Linus Walleij <linus.walleij@linaro.org>
|
||||
M: STEricsson <STEricsson_nomadik_linux@list.st.com>
|
||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
S: Maintained
|
||||
F: arch/arm/mach-nomadik/
|
||||
F: arch/arm/plat-nomadik/
|
||||
F: drivers/i2c/busses/i2c-nomadik.c
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git
|
||||
|
||||
ARM/OPENMOKO NEO FREERUNNER (GTA02) MACHINE SUPPORT
|
||||
M: Nelson Castillo <arhuaco@freaks-unidos.net>
|
||||
|
@ -1146,7 +1146,7 @@ F: drivers/usb/host/ehci-w90x900.c
|
|||
F: drivers/video/nuc900fb.c
|
||||
|
||||
ARM/U300 MACHINE SUPPORT
|
||||
M: Linus Walleij <linus.walleij@stericsson.com>
|
||||
M: Linus Walleij <linus.walleij@linaro.org>
|
||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
S: Supported
|
||||
F: arch/arm/mach-u300/
|
||||
|
@ -1161,15 +1161,20 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson.git
|
|||
|
||||
ARM/Ux500 ARM ARCHITECTURE
|
||||
M: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
|
||||
M: Linus Walleij <linus.walleij@stericsson.com>
|
||||
M: Linus Walleij <linus.walleij@linaro.org>
|
||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
S: Maintained
|
||||
F: arch/arm/mach-ux500/
|
||||
F: drivers/clocksource/clksrc-dbx500-prcmu.c
|
||||
F: drivers/dma/ste_dma40*
|
||||
F: drivers/hwspinlock/u8500_hsem.c
|
||||
F: drivers/mfd/abx500*
|
||||
F: drivers/mfd/ab8500*
|
||||
F: drivers/mfd/stmpe*
|
||||
F: drivers/mfd/dbx500*
|
||||
F: drivers/mfd/db8500*
|
||||
F: drivers/pinctrl/pinctrl-nomadik*
|
||||
F: drivers/rtc/rtc-ab8500.c
|
||||
F: drivers/rtc/rtc-pl031.c
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson.git
|
||||
|
||||
ARM/VFP SUPPORT
|
||||
|
@ -1227,9 +1232,9 @@ S: Maintained
|
|||
F: drivers/hwmon/asb100.c
|
||||
|
||||
ASYNCHRONOUS TRANSFERS/TRANSFORMS (IOAT) API
|
||||
M: Dan Williams <dan.j.williams@intel.com>
|
||||
M: Dan Williams <djbw@fb.com>
|
||||
W: http://sourceforge.net/projects/xscaleiop
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: Documentation/crypto/async-tx-api.txt
|
||||
F: crypto/async_tx/
|
||||
F: drivers/dma/
|
||||
|
@ -2212,7 +2217,7 @@ S: Maintained
|
|||
F: drivers/scsi/tmscsim.*
|
||||
|
||||
DC395x SCSI driver
|
||||
M: Oliver Neukum <oliver@neukum.name>
|
||||
M: Oliver Neukum <oliver@neukum.org>
|
||||
M: Ali Akcaagac <aliakc@web.de>
|
||||
M: Jamie Lenehan <lenehan@twibble.org>
|
||||
W: http://twibble.org/dist/dc395x/
|
||||
|
@ -2359,7 +2364,7 @@ T: git git://git.linaro.org/people/sumitsemwal/linux-dma-buf.git
|
|||
|
||||
DMA GENERIC OFFLOAD ENGINE SUBSYSTEM
|
||||
M: Vinod Koul <vinod.koul@intel.com>
|
||||
M: Dan Williams <dan.j.williams@intel.com>
|
||||
M: Dan Williams <djbw@fb.com>
|
||||
S: Supported
|
||||
F: drivers/dma/
|
||||
F: include/linux/dma*
|
||||
|
@ -3094,7 +3099,7 @@ F: include/linux/gigaset_dev.h
|
|||
|
||||
GPIO SUBSYSTEM
|
||||
M: Grant Likely <grant.likely@secretlab.ca>
|
||||
M: Linus Walleij <linus.walleij@stericsson.com>
|
||||
M: Linus Walleij <linus.walleij@linaro.org>
|
||||
S: Maintained
|
||||
T: git git://git.secretlab.ca/git/linux-2.6.git
|
||||
F: Documentation/gpio.txt
|
||||
|
@ -3547,7 +3552,6 @@ K: \b(ABS|SYN)_MT_
|
|||
|
||||
INTEL C600 SERIES SAS CONTROLLER DRIVER
|
||||
M: Intel SCU Linux support <intel-linux-scu@intel.com>
|
||||
M: Dan Williams <dan.j.williams@intel.com>
|
||||
M: Dave Jiang <dave.jiang@intel.com>
|
||||
M: Ed Nadolski <edmund.nadolski@intel.com>
|
||||
L: linux-scsi@vger.kernel.org
|
||||
|
@ -3590,8 +3594,8 @@ F: arch/x86/kernel/microcode_core.c
|
|||
F: arch/x86/kernel/microcode_intel.c
|
||||
|
||||
INTEL I/OAT DMA DRIVER
|
||||
M: Dan Williams <dan.j.williams@intel.com>
|
||||
S: Supported
|
||||
M: Dan Williams <djbw@fb.com>
|
||||
S: Maintained
|
||||
F: drivers/dma/ioat*
|
||||
|
||||
INTEL IOMMU (VT-d)
|
||||
|
@ -3603,8 +3607,8 @@ F: drivers/iommu/intel-iommu.c
|
|||
F: include/linux/intel-iommu.h
|
||||
|
||||
INTEL IOP-ADMA DMA DRIVER
|
||||
M: Dan Williams <dan.j.williams@intel.com>
|
||||
S: Maintained
|
||||
M: Dan Williams <djbw@fb.com>
|
||||
S: Odd fixes
|
||||
F: drivers/dma/iop-adma.c
|
||||
|
||||
INTEL IXP4XX QMGR, NPE, ETHERNET and HSS SUPPORT
|
||||
|
@ -4533,7 +4537,7 @@ S: Supported
|
|||
F: arch/microblaze/
|
||||
|
||||
MICROTEK X6 SCANNER
|
||||
M: Oliver Neukum <oliver@neukum.name>
|
||||
M: Oliver Neukum <oliver@neukum.org>
|
||||
S: Maintained
|
||||
F: drivers/usb/image/microtek.*
|
||||
|
||||
|
@ -5329,6 +5333,7 @@ PIN CONTROL SUBSYSTEM
|
|||
M: Linus Walleij <linus.walleij@linaro.org>
|
||||
S: Maintained
|
||||
F: drivers/pinctrl/
|
||||
F: include/linux/pinctrl/
|
||||
|
||||
PIN CONTROLLER - ST SPEAR
|
||||
M: Viresh Kumar <viresh.linux@gmail.com>
|
||||
|
@ -5336,7 +5341,7 @@ L: spear-devel@list.st.com
|
|||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
W: http://www.st.com/spear
|
||||
S: Maintained
|
||||
F: driver/pinctrl/spear/
|
||||
F: drivers/pinctrl/spear/
|
||||
|
||||
PKTCDVD DRIVER
|
||||
M: Peter Osterlund <petero2@telia.com>
|
||||
|
@ -7071,7 +7076,7 @@ F: include/linux/mtd/ubi.h
|
|||
F: include/mtd/ubi-user.h
|
||||
|
||||
USB ACM DRIVER
|
||||
M: Oliver Neukum <oliver@neukum.name>
|
||||
M: Oliver Neukum <oliver@neukum.org>
|
||||
L: linux-usb@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/usb/acm.txt
|
||||
|
@ -7092,7 +7097,7 @@ S: Supported
|
|||
F: drivers/block/ub.c
|
||||
|
||||
USB CDC ETHERNET DRIVER
|
||||
M: Oliver Neukum <oliver@neukum.name>
|
||||
M: Oliver Neukum <oliver@neukum.org>
|
||||
L: linux-usb@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/net/usb/cdc_*.c
|
||||
|
@ -7165,7 +7170,7 @@ F: drivers/usb/host/isp116x*
|
|||
F: include/linux/usb/isp116x.h
|
||||
|
||||
USB KAWASAKI LSI DRIVER
|
||||
M: Oliver Neukum <oliver@neukum.name>
|
||||
M: Oliver Neukum <oliver@neukum.org>
|
||||
L: linux-usb@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/usb/serial/kl5kusb105.*
|
||||
|
@ -7283,6 +7288,12 @@ W: http://www.connecttech.com
|
|||
S: Supported
|
||||
F: drivers/usb/serial/whiteheat*
|
||||
|
||||
USB SMSC75XX ETHERNET DRIVER
|
||||
M: Steve Glendinning <steve.glendinning@shawell.net>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/net/usb/smsc75xx.*
|
||||
|
||||
USB SMSC95XX ETHERNET DRIVER
|
||||
M: Steve Glendinning <steve.glendinning@shawell.net>
|
||||
L: netdev@vger.kernel.org
|
||||
|
@ -7665,23 +7676,28 @@ S: Supported
|
|||
F: Documentation/hwmon/wm83??
|
||||
F: arch/arm/mach-s3c64xx/mach-crag6410*
|
||||
F: drivers/clk/clk-wm83*.c
|
||||
F: drivers/extcon/extcon-arizona.c
|
||||
F: drivers/leds/leds-wm83*.c
|
||||
F: drivers/gpio/gpio-*wm*.c
|
||||
F: drivers/gpio/gpio-arizona.c
|
||||
F: drivers/hwmon/wm83??-hwmon.c
|
||||
F: drivers/input/misc/wm831x-on.c
|
||||
F: drivers/input/touchscreen/wm831x-ts.c
|
||||
F: drivers/input/touchscreen/wm97*.c
|
||||
F: drivers/mfd/wm8*.c
|
||||
F: drivers/mfd/arizona*
|
||||
F: drivers/mfd/wm*.c
|
||||
F: drivers/power/wm83*.c
|
||||
F: drivers/rtc/rtc-wm83*.c
|
||||
F: drivers/regulator/wm8*.c
|
||||
F: drivers/video/backlight/wm83*_bl.c
|
||||
F: drivers/watchdog/wm83*_wdt.c
|
||||
F: include/linux/mfd/arizona/
|
||||
F: include/linux/mfd/wm831x/
|
||||
F: include/linux/mfd/wm8350/
|
||||
F: include/linux/mfd/wm8400*
|
||||
F: include/linux/wm97xx.h
|
||||
F: include/sound/wm????.h
|
||||
F: sound/soc/codecs/arizona.?
|
||||
F: sound/soc/codecs/wm*
|
||||
|
||||
WORKQUEUE
|
||||
|
|
2
Makefile
2
Makefile
|
@ -1,7 +1,7 @@
|
|||
VERSION = 3
|
||||
PATCHLEVEL = 6
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc1
|
||||
EXTRAVERSION = -rc3
|
||||
NAME = Saber-toothed Squirrel
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
|
|
@ -18,6 +18,8 @@ config ALPHA
|
|||
select ARCH_HAVE_NMI_SAFE_CMPXCHG
|
||||
select GENERIC_SMP_IDLE_THREAD
|
||||
select GENERIC_CMOS_UPDATE
|
||||
select GENERIC_STRNCPY_FROM_USER
|
||||
select GENERIC_STRNLEN_USER
|
||||
help
|
||||
The Alpha is a 64-bit general-purpose processor designed and
|
||||
marketed by the Digital Equipment Corporation of blessed memory,
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
*/
|
||||
|
||||
|
||||
#define ATOMIC_INIT(i) ( (atomic_t) { (i) } )
|
||||
#define ATOMIC64_INIT(i) ( (atomic64_t) { (i) } )
|
||||
#define ATOMIC_INIT(i) { (i) }
|
||||
#define ATOMIC64_INIT(i) { (i) }
|
||||
|
||||
#define atomic_read(v) (*(volatile int *)&(v)->counter)
|
||||
#define atomic64_read(v) (*(volatile long *)&(v)->counter)
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
#ifndef __ASM_ALPHA_FPU_H
|
||||
#define __ASM_ALPHA_FPU_H
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <asm/special_insns.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Alpha floating-point control register defines:
|
||||
|
|
|
@ -76,7 +76,10 @@ struct switch_stack {
|
|||
#define task_pt_regs(task) \
|
||||
((struct pt_regs *) (task_stack_page(task) + 2*PAGE_SIZE) - 1)
|
||||
|
||||
#define force_successful_syscall_return() (task_pt_regs(current)->r0 = 0)
|
||||
#define current_pt_regs() \
|
||||
((struct pt_regs *) ((char *)current_thread_info() + 2*PAGE_SIZE) - 1)
|
||||
|
||||
#define force_successful_syscall_return() (current_pt_regs()->r0 = 0)
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -76,9 +76,11 @@
|
|||
/* Instruct lower device to use last 4-bytes of skb data as FCS */
|
||||
#define SO_NOFCS 43
|
||||
|
||||
#ifdef __KERNEL__
|
||||
/* O_NONBLOCK clashes with the bits used for socket types. Therefore we
|
||||
* have to define SOCK_NONBLOCK to a different value here.
|
||||
*/
|
||||
#define SOCK_NONBLOCK 0x40000000
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _ASM_SOCKET_H */
|
||||
|
|
|
@ -433,36 +433,12 @@ clear_user(void __user *to, long len)
|
|||
#undef __module_address
|
||||
#undef __module_call
|
||||
|
||||
/* Returns: -EFAULT if exception before terminator, N if the entire
|
||||
buffer filled, else strlen. */
|
||||
#define user_addr_max() \
|
||||
(segment_eq(get_fs(), USER_DS) ? TASK_SIZE : ~0UL)
|
||||
|
||||
extern long __strncpy_from_user(char *__to, const char __user *__from, long __to_len);
|
||||
|
||||
extern inline long
|
||||
strncpy_from_user(char *to, const char __user *from, long n)
|
||||
{
|
||||
long ret = -EFAULT;
|
||||
if (__access_ok((unsigned long)from, 0, get_fs()))
|
||||
ret = __strncpy_from_user(to, from, n);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Returns: 0 if bad, string length+1 (memory size) of string if ok */
|
||||
extern long __strlen_user(const char __user *);
|
||||
|
||||
extern inline long strlen_user(const char __user *str)
|
||||
{
|
||||
return access_ok(VERIFY_READ,str,0) ? __strlen_user(str) : 0;
|
||||
}
|
||||
|
||||
/* Returns: 0 if exception before NUL or reaching the supplied limit (N),
|
||||
* a value greater than N if the limit would be exceeded, else strlen. */
|
||||
extern long __strnlen_user(const char __user *, long);
|
||||
|
||||
extern inline long strnlen_user(const char __user *str, long n)
|
||||
{
|
||||
return access_ok(VERIFY_READ,str,0) ? __strnlen_user(str, n) : 0;
|
||||
}
|
||||
extern long strncpy_from_user(char *dest, const char __user *src, long count);
|
||||
extern __must_check long strlen_user(const char __user *str);
|
||||
extern __must_check long strnlen_user(const char __user *str, long n);
|
||||
|
||||
/*
|
||||
* About the exception table:
|
||||
|
|
|
@ -465,10 +465,12 @@
|
|||
#define __NR_setns 501
|
||||
#define __NR_accept4 502
|
||||
#define __NR_sendmmsg 503
|
||||
#define __NR_process_vm_readv 504
|
||||
#define __NR_process_vm_writev 505
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#define NR_SYSCALLS 504
|
||||
#define NR_SYSCALLS 506
|
||||
|
||||
#define __ARCH_WANT_OLD_READDIR
|
||||
#define __ARCH_WANT_STAT64
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
#ifndef _ASM_WORD_AT_A_TIME_H
|
||||
#define _ASM_WORD_AT_A_TIME_H
|
||||
|
||||
#include <asm/compiler.h>
|
||||
|
||||
/*
|
||||
* word-at-a-time interface for Alpha.
|
||||
*/
|
||||
|
||||
/*
|
||||
* We do not use the word_at_a_time struct on Alpha, but it needs to be
|
||||
* implemented to humour the generic code.
|
||||
*/
|
||||
struct word_at_a_time {
|
||||
const unsigned long unused;
|
||||
};
|
||||
|
||||
#define WORD_AT_A_TIME_CONSTANTS { 0 }
|
||||
|
||||
/* Return nonzero if val has a zero */
|
||||
static inline unsigned long has_zero(unsigned long val, unsigned long *bits, const struct word_at_a_time *c)
|
||||
{
|
||||
unsigned long zero_locations = __kernel_cmpbge(0, val);
|
||||
*bits = zero_locations;
|
||||
return zero_locations;
|
||||
}
|
||||
|
||||
static inline unsigned long prep_zero_mask(unsigned long val, unsigned long bits, const struct word_at_a_time *c)
|
||||
{
|
||||
return bits;
|
||||
}
|
||||
|
||||
#define create_zero_mask(bits) (bits)
|
||||
|
||||
static inline unsigned long find_zero(unsigned long bits)
|
||||
{
|
||||
#if defined(CONFIG_ALPHA_EV6) && defined(CONFIG_ALPHA_EV67)
|
||||
/* Simple if have CIX instructions */
|
||||
return __kernel_cttz(bits);
|
||||
#else
|
||||
unsigned long t1, t2, t3;
|
||||
/* Retain lowest set bit only */
|
||||
bits &= -bits;
|
||||
/* Binary search for lowest set bit */
|
||||
t1 = bits & 0xf0;
|
||||
t2 = bits & 0xcc;
|
||||
t3 = bits & 0xaa;
|
||||
if (t1) t1 = 4;
|
||||
if (t2) t2 = 2;
|
||||
if (t3) t3 = 1;
|
||||
return t1 + t2 + t3;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* _ASM_WORD_AT_A_TIME_H */
|
|
@ -52,7 +52,6 @@ EXPORT_SYMBOL(alpha_write_fp_reg_s);
|
|||
|
||||
/* entry.S */
|
||||
EXPORT_SYMBOL(kernel_thread);
|
||||
EXPORT_SYMBOL(kernel_execve);
|
||||
|
||||
/* Networking helper routines. */
|
||||
EXPORT_SYMBOL(csum_tcpudp_magic);
|
||||
|
@ -74,8 +73,6 @@ EXPORT_SYMBOL(alpha_fp_emul);
|
|||
*/
|
||||
EXPORT_SYMBOL(__copy_user);
|
||||
EXPORT_SYMBOL(__do_clear_user);
|
||||
EXPORT_SYMBOL(__strncpy_from_user);
|
||||
EXPORT_SYMBOL(__strnlen_user);
|
||||
|
||||
/*
|
||||
* SMP-specific symbols.
|
||||
|
|
|
@ -663,58 +663,6 @@ kernel_thread:
|
|||
br ret_to_kernel
|
||||
.end kernel_thread
|
||||
|
||||
/*
|
||||
* kernel_execve(path, argv, envp)
|
||||
*/
|
||||
.align 4
|
||||
.globl kernel_execve
|
||||
.ent kernel_execve
|
||||
kernel_execve:
|
||||
/* We can be called from a module. */
|
||||
ldgp $gp, 0($27)
|
||||
lda $sp, -(32+SIZEOF_PT_REGS+8)($sp)
|
||||
.frame $sp, 32+SIZEOF_PT_REGS+8, $26, 0
|
||||
stq $26, 0($sp)
|
||||
stq $16, 8($sp)
|
||||
stq $17, 16($sp)
|
||||
stq $18, 24($sp)
|
||||
.prologue 1
|
||||
|
||||
lda $16, 32($sp)
|
||||
lda $17, 0
|
||||
lda $18, SIZEOF_PT_REGS
|
||||
bsr $26, memset !samegp
|
||||
|
||||
/* Avoid the HAE being gratuitously wrong, which would cause us
|
||||
to do the whole turn off interrupts thing and restore it. */
|
||||
ldq $2, alpha_mv+HAE_CACHE
|
||||
stq $2, 152+32($sp)
|
||||
|
||||
ldq $16, 8($sp)
|
||||
ldq $17, 16($sp)
|
||||
ldq $18, 24($sp)
|
||||
lda $19, 32($sp)
|
||||
bsr $26, do_execve !samegp
|
||||
|
||||
ldq $26, 0($sp)
|
||||
bne $0, 1f /* error! */
|
||||
|
||||
/* Move the temporary pt_regs struct from its current location
|
||||
to the top of the kernel stack frame. See copy_thread for
|
||||
details for a normal process. */
|
||||
lda $16, 0x4000 - SIZEOF_PT_REGS($8)
|
||||
lda $17, 32($sp)
|
||||
lda $18, SIZEOF_PT_REGS
|
||||
bsr $26, memmove !samegp
|
||||
|
||||
/* Take that over as our new stack frame and visit userland! */
|
||||
lda $sp, 0x4000 - SIZEOF_PT_REGS($8)
|
||||
br $31, ret_from_sys_call
|
||||
|
||||
1: lda $sp, 32+SIZEOF_PT_REGS+8($sp)
|
||||
ret
|
||||
.end kernel_execve
|
||||
|
||||
|
||||
/*
|
||||
* Special system calls. Most of these are special in that they either
|
||||
|
@ -796,115 +744,6 @@ sys_rt_sigreturn:
|
|||
br ret_from_sys_call
|
||||
.end sys_rt_sigreturn
|
||||
|
||||
.align 4
|
||||
.globl sys_sethae
|
||||
.ent sys_sethae
|
||||
sys_sethae:
|
||||
.prologue 0
|
||||
stq $16, 152($sp)
|
||||
ret
|
||||
.end sys_sethae
|
||||
|
||||
.align 4
|
||||
.globl osf_getpriority
|
||||
.ent osf_getpriority
|
||||
osf_getpriority:
|
||||
lda $sp, -16($sp)
|
||||
stq $26, 0($sp)
|
||||
.prologue 0
|
||||
|
||||
jsr $26, sys_getpriority
|
||||
|
||||
ldq $26, 0($sp)
|
||||
blt $0, 1f
|
||||
|
||||
/* Return value is the unbiased priority, i.e. 20 - prio.
|
||||
This does result in negative return values, so signal
|
||||
no error by writing into the R0 slot. */
|
||||
lda $1, 20
|
||||
stq $31, 16($sp)
|
||||
subl $1, $0, $0
|
||||
unop
|
||||
|
||||
1: lda $sp, 16($sp)
|
||||
ret
|
||||
.end osf_getpriority
|
||||
|
||||
.align 4
|
||||
.globl sys_getxuid
|
||||
.ent sys_getxuid
|
||||
sys_getxuid:
|
||||
.prologue 0
|
||||
ldq $2, TI_TASK($8)
|
||||
ldq $3, TASK_CRED($2)
|
||||
ldl $0, CRED_UID($3)
|
||||
ldl $1, CRED_EUID($3)
|
||||
stq $1, 80($sp)
|
||||
ret
|
||||
.end sys_getxuid
|
||||
|
||||
.align 4
|
||||
.globl sys_getxgid
|
||||
.ent sys_getxgid
|
||||
sys_getxgid:
|
||||
.prologue 0
|
||||
ldq $2, TI_TASK($8)
|
||||
ldq $3, TASK_CRED($2)
|
||||
ldl $0, CRED_GID($3)
|
||||
ldl $1, CRED_EGID($3)
|
||||
stq $1, 80($sp)
|
||||
ret
|
||||
.end sys_getxgid
|
||||
|
||||
.align 4
|
||||
.globl sys_getxpid
|
||||
.ent sys_getxpid
|
||||
sys_getxpid:
|
||||
.prologue 0
|
||||
ldq $2, TI_TASK($8)
|
||||
|
||||
/* See linux/kernel/timer.c sys_getppid for discussion
|
||||
about this loop. */
|
||||
ldq $3, TASK_GROUP_LEADER($2)
|
||||
ldq $4, TASK_REAL_PARENT($3)
|
||||
ldl $0, TASK_TGID($2)
|
||||
1: ldl $1, TASK_TGID($4)
|
||||
#ifdef CONFIG_SMP
|
||||
mov $4, $5
|
||||
mb
|
||||
ldq $3, TASK_GROUP_LEADER($2)
|
||||
ldq $4, TASK_REAL_PARENT($3)
|
||||
cmpeq $4, $5, $5
|
||||
beq $5, 1b
|
||||
#endif
|
||||
stq $1, 80($sp)
|
||||
ret
|
||||
.end sys_getxpid
|
||||
|
||||
.align 4
|
||||
.globl sys_alpha_pipe
|
||||
.ent sys_alpha_pipe
|
||||
sys_alpha_pipe:
|
||||
lda $sp, -16($sp)
|
||||
stq $26, 0($sp)
|
||||
.prologue 0
|
||||
|
||||
mov $31, $17
|
||||
lda $16, 8($sp)
|
||||
jsr $26, do_pipe_flags
|
||||
|
||||
ldq $26, 0($sp)
|
||||
bne $0, 1f
|
||||
|
||||
/* The return values are in $0 and $20. */
|
||||
ldl $1, 12($sp)
|
||||
ldl $0, 8($sp)
|
||||
|
||||
stq $1, 80+16($sp)
|
||||
1: lda $sp, 16($sp)
|
||||
ret
|
||||
.end sys_alpha_pipe
|
||||
|
||||
.align 4
|
||||
.globl sys_execve
|
||||
.ent sys_execve
|
||||
|
|
|
@ -1404,3 +1404,52 @@ SYSCALL_DEFINE3(osf_writev, unsigned long, fd,
|
|||
}
|
||||
|
||||
#endif
|
||||
|
||||
SYSCALL_DEFINE2(osf_getpriority, int, which, int, who)
|
||||
{
|
||||
int prio = sys_getpriority(which, who);
|
||||
if (prio >= 0) {
|
||||
/* Return value is the unbiased priority, i.e. 20 - prio.
|
||||
This does result in negative return values, so signal
|
||||
no error */
|
||||
force_successful_syscall_return();
|
||||
prio = 20 - prio;
|
||||
}
|
||||
return prio;
|
||||
}
|
||||
|
||||
SYSCALL_DEFINE0(getxuid)
|
||||
{
|
||||
current_pt_regs()->r20 = sys_geteuid();
|
||||
return sys_getuid();
|
||||
}
|
||||
|
||||
SYSCALL_DEFINE0(getxgid)
|
||||
{
|
||||
current_pt_regs()->r20 = sys_getegid();
|
||||
return sys_getgid();
|
||||
}
|
||||
|
||||
SYSCALL_DEFINE0(getxpid)
|
||||
{
|
||||
current_pt_regs()->r20 = sys_getppid();
|
||||
return sys_getpid();
|
||||
}
|
||||
|
||||
SYSCALL_DEFINE0(alpha_pipe)
|
||||
{
|
||||
int fd[2];
|
||||
int res = do_pipe_flags(fd, 0);
|
||||
if (!res) {
|
||||
/* The return values are in $0 and $20. */
|
||||
current_pt_regs()->r20 = fd[1];
|
||||
res = fd[0];
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
SYSCALL_DEFINE1(sethae, unsigned long, val)
|
||||
{
|
||||
current_pt_regs()->hae = val;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -455,3 +455,22 @@ get_wchan(struct task_struct *p)
|
|||
}
|
||||
return pc;
|
||||
}
|
||||
|
||||
int kernel_execve(const char *path, const char *const argv[], const char *const envp[])
|
||||
{
|
||||
/* Avoid the HAE being gratuitously wrong, which would cause us
|
||||
to do the whole turn off interrupts thing and restore it. */
|
||||
struct pt_regs regs = {.hae = alpha_mv.hae_cache};
|
||||
int err = do_execve(path, argv, envp, ®s);
|
||||
if (!err) {
|
||||
struct pt_regs *p = current_pt_regs();
|
||||
/* copy regs to normal position and off to userland we go... */
|
||||
*p = regs;
|
||||
__asm__ __volatile__ (
|
||||
"mov %0, $sp;"
|
||||
"br $31, ret_from_sys_call"
|
||||
: : "r"(p));
|
||||
}
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL(kernel_execve);
|
||||
|
|
|
@ -111,7 +111,7 @@ sys_call_table:
|
|||
.quad sys_socket
|
||||
.quad sys_connect
|
||||
.quad sys_accept
|
||||
.quad osf_getpriority /* 100 */
|
||||
.quad sys_osf_getpriority /* 100 */
|
||||
.quad sys_send
|
||||
.quad sys_recv
|
||||
.quad sys_sigreturn
|
||||
|
@ -522,6 +522,8 @@ sys_call_table:
|
|||
.quad sys_setns
|
||||
.quad sys_accept4
|
||||
.quad sys_sendmmsg
|
||||
.quad sys_process_vm_readv
|
||||
.quad sys_process_vm_writev /* 505 */
|
||||
|
||||
.size sys_call_table, . - sys_call_table
|
||||
.type sys_call_table, @object
|
||||
|
|
|
@ -31,8 +31,6 @@ lib-y = __divqu.o __remqu.o __divlu.o __remlu.o \
|
|||
$(ev6-y)memchr.o \
|
||||
$(ev6-y)copy_user.o \
|
||||
$(ev6-y)clear_user.o \
|
||||
$(ev6-y)strncpy_from_user.o \
|
||||
$(ev67-y)strlen_user.o \
|
||||
$(ev6-y)csum_ipv6_magic.o \
|
||||
$(ev6-y)clear_page.o \
|
||||
$(ev6-y)copy_page.o \
|
||||
|
|
|
@ -1,424 +0,0 @@
|
|||
/*
|
||||
* arch/alpha/lib/ev6-strncpy_from_user.S
|
||||
* 21264 version contributed by Rick Gorton <rick.gorton@alpha-processor.com>
|
||||
*
|
||||
* Just like strncpy except in the return value:
|
||||
*
|
||||
* -EFAULT if an exception occurs before the terminator is copied.
|
||||
* N if the buffer filled.
|
||||
*
|
||||
* Otherwise the length of the string is returned.
|
||||
*
|
||||
* Much of the information about 21264 scheduling/coding comes from:
|
||||
* Compiler Writer's Guide for the Alpha 21264
|
||||
* abbreviated as 'CWG' in other comments here
|
||||
* ftp.digital.com/pub/Digital/info/semiconductor/literature/dsc-library.html
|
||||
* Scheduling notation:
|
||||
* E - either cluster
|
||||
* U - upper subcluster; U0 - subcluster U0; U1 - subcluster U1
|
||||
* L - lower subcluster; L0 - subcluster L0; L1 - subcluster L1
|
||||
* A bunch of instructions got moved and temp registers were changed
|
||||
* to aid in scheduling. Control flow was also re-arranged to eliminate
|
||||
* branches, and to provide longer code sequences to enable better scheduling.
|
||||
* A total rewrite (using byte load/stores for start & tail sequences)
|
||||
* is desirable, but very difficult to do without a from-scratch rewrite.
|
||||
* Save that for the future.
|
||||
*/
|
||||
|
||||
|
||||
#include <asm/errno.h>
|
||||
#include <asm/regdef.h>
|
||||
|
||||
|
||||
/* Allow an exception for an insn; exit if we get one. */
|
||||
#define EX(x,y...) \
|
||||
99: x,##y; \
|
||||
.section __ex_table,"a"; \
|
||||
.long 99b - .; \
|
||||
lda $31, $exception-99b($0); \
|
||||
.previous
|
||||
|
||||
|
||||
.set noat
|
||||
.set noreorder
|
||||
.text
|
||||
|
||||
.globl __strncpy_from_user
|
||||
.ent __strncpy_from_user
|
||||
.frame $30, 0, $26
|
||||
.prologue 0
|
||||
|
||||
.align 4
|
||||
__strncpy_from_user:
|
||||
and a0, 7, t3 # E : find dest misalignment
|
||||
beq a2, $zerolength # U :
|
||||
|
||||
/* Are source and destination co-aligned? */
|
||||
mov a0, v0 # E : save the string start
|
||||
xor a0, a1, t4 # E :
|
||||
EX( ldq_u t1, 0(a1) ) # L : Latency=3 load first quadword
|
||||
ldq_u t0, 0(a0) # L : load first (partial) aligned dest quadword
|
||||
|
||||
addq a2, t3, a2 # E : bias count by dest misalignment
|
||||
subq a2, 1, a3 # E :
|
||||
addq zero, 1, t10 # E :
|
||||
and t4, 7, t4 # E : misalignment between the two
|
||||
|
||||
and a3, 7, t6 # E : number of tail bytes
|
||||
sll t10, t6, t10 # E : t10 = bitmask of last count byte
|
||||
bne t4, $unaligned # U :
|
||||
lda t2, -1 # E : build a mask against false zero
|
||||
|
||||
/*
|
||||
* We are co-aligned; take care of a partial first word.
|
||||
* On entry to this basic block:
|
||||
* t0 == the first destination word for masking back in
|
||||
* t1 == the first source word.
|
||||
*/
|
||||
|
||||
srl a3, 3, a2 # E : a2 = loop counter = (count - 1)/8
|
||||
addq a1, 8, a1 # E :
|
||||
mskqh t2, a1, t2 # U : detection in the src word
|
||||
nop
|
||||
|
||||
/* Create the 1st output word and detect 0's in the 1st input word. */
|
||||
mskqh t1, a1, t3 # U :
|
||||
mskql t0, a1, t0 # U : assemble the first output word
|
||||
ornot t1, t2, t2 # E :
|
||||
nop
|
||||
|
||||
cmpbge zero, t2, t8 # E : bits set iff null found
|
||||
or t0, t3, t0 # E :
|
||||
beq a2, $a_eoc # U :
|
||||
bne t8, $a_eos # U : 2nd branch in a quad. Bad.
|
||||
|
||||
/* On entry to this basic block:
|
||||
* t0 == a source quad not containing a null.
|
||||
* a0 - current aligned destination address
|
||||
* a1 - current aligned source address
|
||||
* a2 - count of quadwords to move.
|
||||
* NOTE: Loop improvement - unrolling this is going to be
|
||||
* a huge win, since we're going to stall otherwise.
|
||||
* Fix this later. For _really_ large copies, look
|
||||
* at using wh64 on a look-ahead basis. See the code
|
||||
* in clear_user.S and copy_user.S.
|
||||
* Presumably, since (a0) and (a1) do not overlap (by C definition)
|
||||
* Lots of nops here:
|
||||
* - Separate loads from stores
|
||||
* - Keep it to 1 branch/quadpack so the branch predictor
|
||||
* can train.
|
||||
*/
|
||||
$a_loop:
|
||||
stq_u t0, 0(a0) # L :
|
||||
addq a0, 8, a0 # E :
|
||||
nop
|
||||
subq a2, 1, a2 # E :
|
||||
|
||||
EX( ldq_u t0, 0(a1) ) # L :
|
||||
addq a1, 8, a1 # E :
|
||||
cmpbge zero, t0, t8 # E : Stall 2 cycles on t0
|
||||
beq a2, $a_eoc # U :
|
||||
|
||||
beq t8, $a_loop # U :
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
|
||||
/* Take care of the final (partial) word store. At this point
|
||||
* the end-of-count bit is set in t8 iff it applies.
|
||||
*
|
||||
* On entry to this basic block we have:
|
||||
* t0 == the source word containing the null
|
||||
* t8 == the cmpbge mask that found it.
|
||||
*/
|
||||
$a_eos:
|
||||
negq t8, t12 # E : find low bit set
|
||||
and t8, t12, t12 # E :
|
||||
|
||||
/* We're doing a partial word store and so need to combine
|
||||
our source and original destination words. */
|
||||
ldq_u t1, 0(a0) # L :
|
||||
subq t12, 1, t6 # E :
|
||||
|
||||
or t12, t6, t8 # E :
|
||||
zapnot t0, t8, t0 # U : clear src bytes > null
|
||||
zap t1, t8, t1 # U : clear dst bytes <= null
|
||||
or t0, t1, t0 # E :
|
||||
|
||||
stq_u t0, 0(a0) # L :
|
||||
br $finish_up # L0 :
|
||||
nop
|
||||
nop
|
||||
|
||||
/* Add the end-of-count bit to the eos detection bitmask. */
|
||||
.align 4
|
||||
$a_eoc:
|
||||
or t10, t8, t8
|
||||
br $a_eos
|
||||
nop
|
||||
nop
|
||||
|
||||
|
||||
/* The source and destination are not co-aligned. Align the destination
|
||||
and cope. We have to be very careful about not reading too much and
|
||||
causing a SEGV. */
|
||||
|
||||
.align 4
|
||||
$u_head:
|
||||
/* We know just enough now to be able to assemble the first
|
||||
full source word. We can still find a zero at the end of it
|
||||
that prevents us from outputting the whole thing.
|
||||
|
||||
On entry to this basic block:
|
||||
t0 == the first dest word, unmasked
|
||||
t1 == the shifted low bits of the first source word
|
||||
t6 == bytemask that is -1 in dest word bytes */
|
||||
|
||||
EX( ldq_u t2, 8(a1) ) # L : load second src word
|
||||
addq a1, 8, a1 # E :
|
||||
mskql t0, a0, t0 # U : mask trailing garbage in dst
|
||||
extqh t2, a1, t4 # U :
|
||||
|
||||
or t1, t4, t1 # E : first aligned src word complete
|
||||
mskqh t1, a0, t1 # U : mask leading garbage in src
|
||||
or t0, t1, t0 # E : first output word complete
|
||||
or t0, t6, t6 # E : mask original data for zero test
|
||||
|
||||
cmpbge zero, t6, t8 # E :
|
||||
beq a2, $u_eocfin # U :
|
||||
bne t8, $u_final # U : bad news - 2nd branch in a quad
|
||||
lda t6, -1 # E : mask out the bits we have
|
||||
|
||||
mskql t6, a1, t6 # U : already seen
|
||||
stq_u t0, 0(a0) # L : store first output word
|
||||
or t6, t2, t2 # E :
|
||||
cmpbge zero, t2, t8 # E : find nulls in second partial
|
||||
|
||||
addq a0, 8, a0 # E :
|
||||
subq a2, 1, a2 # E :
|
||||
bne t8, $u_late_head_exit # U :
|
||||
nop
|
||||
|
||||
/* Finally, we've got all the stupid leading edge cases taken care
|
||||
of and we can set up to enter the main loop. */
|
||||
|
||||
extql t2, a1, t1 # U : position hi-bits of lo word
|
||||
EX( ldq_u t2, 8(a1) ) # L : read next high-order source word
|
||||
addq a1, 8, a1 # E :
|
||||
cmpbge zero, t2, t8 # E :
|
||||
|
||||
beq a2, $u_eoc # U :
|
||||
bne t8, $u_eos # U :
|
||||
nop
|
||||
nop
|
||||
|
||||
/* Unaligned copy main loop. In order to avoid reading too much,
|
||||
the loop is structured to detect zeros in aligned source words.
|
||||
This has, unfortunately, effectively pulled half of a loop
|
||||
iteration out into the head and half into the tail, but it does
|
||||
prevent nastiness from accumulating in the very thing we want
|
||||
to run as fast as possible.
|
||||
|
||||
On entry to this basic block:
|
||||
t1 == the shifted high-order bits from the previous source word
|
||||
t2 == the unshifted current source word
|
||||
|
||||
We further know that t2 does not contain a null terminator. */
|
||||
|
||||
/*
|
||||
* Extra nops here:
|
||||
* separate load quads from store quads
|
||||
* only one branch/quad to permit predictor training
|
||||
*/
|
||||
|
||||
.align 4
|
||||
$u_loop:
|
||||
extqh t2, a1, t0 # U : extract high bits for current word
|
||||
addq a1, 8, a1 # E :
|
||||
extql t2, a1, t3 # U : extract low bits for next time
|
||||
addq a0, 8, a0 # E :
|
||||
|
||||
or t0, t1, t0 # E : current dst word now complete
|
||||
EX( ldq_u t2, 0(a1) ) # L : load high word for next time
|
||||
subq a2, 1, a2 # E :
|
||||
nop
|
||||
|
||||
stq_u t0, -8(a0) # L : save the current word
|
||||
mov t3, t1 # E :
|
||||
cmpbge zero, t2, t8 # E : test new word for eos
|
||||
beq a2, $u_eoc # U :
|
||||
|
||||
beq t8, $u_loop # U :
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
|
||||
/* We've found a zero somewhere in the source word we just read.
|
||||
If it resides in the lower half, we have one (probably partial)
|
||||
word to write out, and if it resides in the upper half, we
|
||||
have one full and one partial word left to write out.
|
||||
|
||||
On entry to this basic block:
|
||||
t1 == the shifted high-order bits from the previous source word
|
||||
t2 == the unshifted current source word. */
|
||||
.align 4
|
||||
$u_eos:
|
||||
extqh t2, a1, t0 # U :
|
||||
or t0, t1, t0 # E : first (partial) source word complete
|
||||
cmpbge zero, t0, t8 # E : is the null in this first bit?
|
||||
nop
|
||||
|
||||
bne t8, $u_final # U :
|
||||
stq_u t0, 0(a0) # L : the null was in the high-order bits
|
||||
addq a0, 8, a0 # E :
|
||||
subq a2, 1, a2 # E :
|
||||
|
||||
.align 4
|
||||
$u_late_head_exit:
|
||||
extql t2, a1, t0 # U :
|
||||
cmpbge zero, t0, t8 # E :
|
||||
or t8, t10, t6 # E :
|
||||
cmoveq a2, t6, t8 # E :
|
||||
|
||||
/* Take care of a final (probably partial) result word.
|
||||
On entry to this basic block:
|
||||
t0 == assembled source word
|
||||
t8 == cmpbge mask that found the null. */
|
||||
.align 4
|
||||
$u_final:
|
||||
negq t8, t6 # E : isolate low bit set
|
||||
and t6, t8, t12 # E :
|
||||
ldq_u t1, 0(a0) # L :
|
||||
subq t12, 1, t6 # E :
|
||||
|
||||
or t6, t12, t8 # E :
|
||||
zapnot t0, t8, t0 # U : kill source bytes > null
|
||||
zap t1, t8, t1 # U : kill dest bytes <= null
|
||||
or t0, t1, t0 # E :
|
||||
|
||||
stq_u t0, 0(a0) # E :
|
||||
br $finish_up # U :
|
||||
nop
|
||||
nop
|
||||
|
||||
.align 4
|
||||
$u_eoc: # end-of-count
|
||||
extqh t2, a1, t0 # U :
|
||||
or t0, t1, t0 # E :
|
||||
cmpbge zero, t0, t8 # E :
|
||||
nop
|
||||
|
||||
.align 4
|
||||
$u_eocfin: # end-of-count, final word
|
||||
or t10, t8, t8 # E :
|
||||
br $u_final # U :
|
||||
nop
|
||||
nop
|
||||
|
||||
/* Unaligned copy entry point. */
|
||||
.align 4
|
||||
$unaligned:
|
||||
|
||||
srl a3, 3, a2 # U : a2 = loop counter = (count - 1)/8
|
||||
and a0, 7, t4 # E : find dest misalignment
|
||||
and a1, 7, t5 # E : find src misalignment
|
||||
mov zero, t0 # E :
|
||||
|
||||
/* Conditionally load the first destination word and a bytemask
|
||||
with 0xff indicating that the destination byte is sacrosanct. */
|
||||
|
||||
mov zero, t6 # E :
|
||||
beq t4, 1f # U :
|
||||
ldq_u t0, 0(a0) # L :
|
||||
lda t6, -1 # E :
|
||||
|
||||
mskql t6, a0, t6 # E :
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
|
||||
.align 4
|
||||
1:
|
||||
subq a1, t4, a1 # E : sub dest misalignment from src addr
|
||||
/* If source misalignment is larger than dest misalignment, we need
|
||||
extra startup checks to avoid SEGV. */
|
||||
cmplt t4, t5, t12 # E :
|
||||
extql t1, a1, t1 # U : shift src into place
|
||||
lda t2, -1 # E : for creating masks later
|
||||
|
||||
beq t12, $u_head # U :
|
||||
mskqh t2, t5, t2 # U : begin src byte validity mask
|
||||
cmpbge zero, t1, t8 # E : is there a zero?
|
||||
nop
|
||||
|
||||
extql t2, a1, t2 # U :
|
||||
or t8, t10, t5 # E : test for end-of-count too
|
||||
cmpbge zero, t2, t3 # E :
|
||||
cmoveq a2, t5, t8 # E : Latency=2, extra map slot
|
||||
|
||||
nop # E : goes with cmov
|
||||
andnot t8, t3, t8 # E :
|
||||
beq t8, $u_head # U :
|
||||
nop
|
||||
|
||||
/* At this point we've found a zero in the first partial word of
|
||||
the source. We need to isolate the valid source data and mask
|
||||
it into the original destination data. (Incidentally, we know
|
||||
that we'll need at least one byte of that original dest word.) */
|
||||
|
||||
ldq_u t0, 0(a0) # L :
|
||||
negq t8, t6 # E : build bitmask of bytes <= zero
|
||||
mskqh t1, t4, t1 # U :
|
||||
and t6, t8, t12 # E :
|
||||
|
||||
subq t12, 1, t6 # E :
|
||||
or t6, t12, t8 # E :
|
||||
zapnot t2, t8, t2 # U : prepare source word; mirror changes
|
||||
zapnot t1, t8, t1 # U : to source validity mask
|
||||
|
||||
andnot t0, t2, t0 # E : zero place for source to reside
|
||||
or t0, t1, t0 # E : and put it there
|
||||
stq_u t0, 0(a0) # L :
|
||||
nop
|
||||
|
||||
.align 4
|
||||
$finish_up:
|
||||
zapnot t0, t12, t4 # U : was last byte written null?
|
||||
and t12, 0xf0, t3 # E : binary search for the address of the
|
||||
cmovne t4, 1, t4 # E : Latency=2, extra map slot
|
||||
nop # E : with cmovne
|
||||
|
||||
and t12, 0xcc, t2 # E : last byte written
|
||||
and t12, 0xaa, t1 # E :
|
||||
cmovne t3, 4, t3 # E : Latency=2, extra map slot
|
||||
nop # E : with cmovne
|
||||
|
||||
bic a0, 7, t0
|
||||
cmovne t2, 2, t2 # E : Latency=2, extra map slot
|
||||
nop # E : with cmovne
|
||||
nop
|
||||
|
||||
cmovne t1, 1, t1 # E : Latency=2, extra map slot
|
||||
nop # E : with cmovne
|
||||
addq t0, t3, t0 # E :
|
||||
addq t1, t2, t1 # E :
|
||||
|
||||
addq t0, t1, t0 # E :
|
||||
addq t0, t4, t0 # add one if we filled the buffer
|
||||
subq t0, v0, v0 # find string length
|
||||
ret # L0 :
|
||||
|
||||
.align 4
|
||||
$zerolength:
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
clr v0
|
||||
|
||||
$exception:
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
ret
|
||||
|
||||
.end __strncpy_from_user
|
|
@ -1,107 +0,0 @@
|
|||
/*
|
||||
* arch/alpha/lib/ev67-strlen_user.S
|
||||
* 21264 version contributed by Rick Gorton <rick.gorton@api-networks.com>
|
||||
*
|
||||
* Return the length of the string including the NULL terminator
|
||||
* (strlen+1) or zero if an error occurred.
|
||||
*
|
||||
* In places where it is critical to limit the processing time,
|
||||
* and the data is not trusted, strnlen_user() should be used.
|
||||
* It will return a value greater than its second argument if
|
||||
* that limit would be exceeded. This implementation is allowed
|
||||
* to access memory beyond the limit, but will not cross a page
|
||||
* boundary when doing so.
|
||||
*
|
||||
* Much of the information about 21264 scheduling/coding comes from:
|
||||
* Compiler Writer's Guide for the Alpha 21264
|
||||
* abbreviated as 'CWG' in other comments here
|
||||
* ftp.digital.com/pub/Digital/info/semiconductor/literature/dsc-library.html
|
||||
* Scheduling notation:
|
||||
* E - either cluster
|
||||
* U - upper subcluster; U0 - subcluster U0; U1 - subcluster U1
|
||||
* L - lower subcluster; L0 - subcluster L0; L1 - subcluster L1
|
||||
* Try not to change the actual algorithm if possible for consistency.
|
||||
*/
|
||||
|
||||
#include <asm/regdef.h>
|
||||
|
||||
|
||||
/* Allow an exception for an insn; exit if we get one. */
|
||||
#define EX(x,y...) \
|
||||
99: x,##y; \
|
||||
.section __ex_table,"a"; \
|
||||
.long 99b - .; \
|
||||
lda v0, $exception-99b(zero); \
|
||||
.previous
|
||||
|
||||
|
||||
.set noreorder
|
||||
.set noat
|
||||
.text
|
||||
|
||||
.globl __strlen_user
|
||||
.ent __strlen_user
|
||||
.frame sp, 0, ra
|
||||
|
||||
.align 4
|
||||
__strlen_user:
|
||||
ldah a1, 32767(zero) # do not use plain strlen_user() for strings
|
||||
# that might be almost 2 GB long; you should
|
||||
# be using strnlen_user() instead
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
|
||||
.globl __strnlen_user
|
||||
|
||||
.align 4
|
||||
__strnlen_user:
|
||||
.prologue 0
|
||||
EX( ldq_u t0, 0(a0) ) # L : load first quadword (a0 may be misaligned)
|
||||
lda t1, -1(zero) # E :
|
||||
|
||||
insqh t1, a0, t1 # U :
|
||||
andnot a0, 7, v0 # E :
|
||||
or t1, t0, t0 # E :
|
||||
subq a0, 1, a0 # E : get our +1 for the return
|
||||
|
||||
cmpbge zero, t0, t1 # E : t1 <- bitmask: bit i == 1 <==> i-th byte == 0
|
||||
subq a1, 7, t2 # E :
|
||||
subq a0, v0, t0 # E :
|
||||
bne t1, $found # U :
|
||||
|
||||
addq t2, t0, t2 # E :
|
||||
addq a1, 1, a1 # E :
|
||||
nop # E :
|
||||
nop # E :
|
||||
|
||||
.align 4
|
||||
$loop: ble t2, $limit # U :
|
||||
EX( ldq t0, 8(v0) ) # L :
|
||||
nop # E :
|
||||
nop # E :
|
||||
|
||||
cmpbge zero, t0, t1 # E :
|
||||
subq t2, 8, t2 # E :
|
||||
addq v0, 8, v0 # E : addr += 8
|
||||
beq t1, $loop # U :
|
||||
|
||||
$found: cttz t1, t2 # U0 :
|
||||
addq v0, t2, v0 # E :
|
||||
subq v0, a0, v0 # E :
|
||||
ret # L0 :
|
||||
|
||||
$exception:
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
ret
|
||||
|
||||
.align 4 # currently redundant
|
||||
$limit:
|
||||
nop
|
||||
nop
|
||||
subq a1, t2, v0
|
||||
ret
|
||||
|
||||
.end __strlen_user
|
|
@ -1,91 +0,0 @@
|
|||
/*
|
||||
* arch/alpha/lib/strlen_user.S
|
||||
*
|
||||
* Return the length of the string including the NUL terminator
|
||||
* (strlen+1) or zero if an error occurred.
|
||||
*
|
||||
* In places where it is critical to limit the processing time,
|
||||
* and the data is not trusted, strnlen_user() should be used.
|
||||
* It will return a value greater than its second argument if
|
||||
* that limit would be exceeded. This implementation is allowed
|
||||
* to access memory beyond the limit, but will not cross a page
|
||||
* boundary when doing so.
|
||||
*/
|
||||
|
||||
#include <asm/regdef.h>
|
||||
|
||||
|
||||
/* Allow an exception for an insn; exit if we get one. */
|
||||
#define EX(x,y...) \
|
||||
99: x,##y; \
|
||||
.section __ex_table,"a"; \
|
||||
.long 99b - .; \
|
||||
lda v0, $exception-99b(zero); \
|
||||
.previous
|
||||
|
||||
|
||||
.set noreorder
|
||||
.set noat
|
||||
.text
|
||||
|
||||
.globl __strlen_user
|
||||
.ent __strlen_user
|
||||
.frame sp, 0, ra
|
||||
|
||||
.align 3
|
||||
__strlen_user:
|
||||
ldah a1, 32767(zero) # do not use plain strlen_user() for strings
|
||||
# that might be almost 2 GB long; you should
|
||||
# be using strnlen_user() instead
|
||||
|
||||
.globl __strnlen_user
|
||||
|
||||
.align 3
|
||||
__strnlen_user:
|
||||
.prologue 0
|
||||
|
||||
EX( ldq_u t0, 0(a0) ) # load first quadword (a0 may be misaligned)
|
||||
lda t1, -1(zero)
|
||||
insqh t1, a0, t1
|
||||
andnot a0, 7, v0
|
||||
or t1, t0, t0
|
||||
subq a0, 1, a0 # get our +1 for the return
|
||||
cmpbge zero, t0, t1 # t1 <- bitmask: bit i == 1 <==> i-th byte == 0
|
||||
subq a1, 7, t2
|
||||
subq a0, v0, t0
|
||||
bne t1, $found
|
||||
|
||||
addq t2, t0, t2
|
||||
addq a1, 1, a1
|
||||
|
||||
.align 3
|
||||
$loop: ble t2, $limit
|
||||
EX( ldq t0, 8(v0) )
|
||||
subq t2, 8, t2
|
||||
addq v0, 8, v0 # addr += 8
|
||||
cmpbge zero, t0, t1
|
||||
beq t1, $loop
|
||||
|
||||
$found: negq t1, t2 # clear all but least set bit
|
||||
and t1, t2, t1
|
||||
|
||||
and t1, 0xf0, t2 # binary search for that set bit
|
||||
and t1, 0xcc, t3
|
||||
and t1, 0xaa, t4
|
||||
cmovne t2, 4, t2
|
||||
cmovne t3, 2, t3
|
||||
cmovne t4, 1, t4
|
||||
addq t2, t3, t2
|
||||
addq v0, t4, v0
|
||||
addq v0, t2, v0
|
||||
nop # dual issue next two on ev4 and ev5
|
||||
subq v0, a0, v0
|
||||
$exception:
|
||||
ret
|
||||
|
||||
.align 3 # currently redundant
|
||||
$limit:
|
||||
subq a1, t2, v0
|
||||
ret
|
||||
|
||||
.end __strlen_user
|
|
@ -1,339 +0,0 @@
|
|||
/*
|
||||
* arch/alpha/lib/strncpy_from_user.S
|
||||
* Contributed by Richard Henderson (rth@tamu.edu)
|
||||
*
|
||||
* Just like strncpy except in the return value:
|
||||
*
|
||||
* -EFAULT if an exception occurs before the terminator is copied.
|
||||
* N if the buffer filled.
|
||||
*
|
||||
* Otherwise the length of the string is returned.
|
||||
*/
|
||||
|
||||
|
||||
#include <asm/errno.h>
|
||||
#include <asm/regdef.h>
|
||||
|
||||
|
||||
/* Allow an exception for an insn; exit if we get one. */
|
||||
#define EX(x,y...) \
|
||||
99: x,##y; \
|
||||
.section __ex_table,"a"; \
|
||||
.long 99b - .; \
|
||||
lda $31, $exception-99b($0); \
|
||||
.previous
|
||||
|
||||
|
||||
.set noat
|
||||
.set noreorder
|
||||
.text
|
||||
|
||||
.globl __strncpy_from_user
|
||||
.ent __strncpy_from_user
|
||||
.frame $30, 0, $26
|
||||
.prologue 0
|
||||
|
||||
.align 3
|
||||
$aligned:
|
||||
/* On entry to this basic block:
|
||||
t0 == the first destination word for masking back in
|
||||
t1 == the first source word. */
|
||||
|
||||
/* Create the 1st output word and detect 0's in the 1st input word. */
|
||||
lda t2, -1 # e1 : build a mask against false zero
|
||||
mskqh t2, a1, t2 # e0 : detection in the src word
|
||||
mskqh t1, a1, t3 # e0 :
|
||||
ornot t1, t2, t2 # .. e1 :
|
||||
mskql t0, a1, t0 # e0 : assemble the first output word
|
||||
cmpbge zero, t2, t8 # .. e1 : bits set iff null found
|
||||
or t0, t3, t0 # e0 :
|
||||
beq a2, $a_eoc # .. e1 :
|
||||
bne t8, $a_eos # .. e1 :
|
||||
|
||||
/* On entry to this basic block:
|
||||
t0 == a source word not containing a null. */
|
||||
|
||||
$a_loop:
|
||||
stq_u t0, 0(a0) # e0 :
|
||||
addq a0, 8, a0 # .. e1 :
|
||||
EX( ldq_u t0, 0(a1) ) # e0 :
|
||||
addq a1, 8, a1 # .. e1 :
|
||||
subq a2, 1, a2 # e0 :
|
||||
cmpbge zero, t0, t8 # .. e1 (stall)
|
||||
beq a2, $a_eoc # e1 :
|
||||
beq t8, $a_loop # e1 :
|
||||
|
||||
/* Take care of the final (partial) word store. At this point
|
||||
the end-of-count bit is set in t8 iff it applies.
|
||||
|
||||
On entry to this basic block we have:
|
||||
t0 == the source word containing the null
|
||||
t8 == the cmpbge mask that found it. */
|
||||
|
||||
$a_eos:
|
||||
negq t8, t12 # e0 : find low bit set
|
||||
and t8, t12, t12 # e1 (stall)
|
||||
|
||||
/* For the sake of the cache, don't read a destination word
|
||||
if we're not going to need it. */
|
||||
and t12, 0x80, t6 # e0 :
|
||||
bne t6, 1f # .. e1 (zdb)
|
||||
|
||||
/* We're doing a partial word store and so need to combine
|
||||
our source and original destination words. */
|
||||
ldq_u t1, 0(a0) # e0 :
|
||||
subq t12, 1, t6 # .. e1 :
|
||||
or t12, t6, t8 # e0 :
|
||||
unop #
|
||||
zapnot t0, t8, t0 # e0 : clear src bytes > null
|
||||
zap t1, t8, t1 # .. e1 : clear dst bytes <= null
|
||||
or t0, t1, t0 # e1 :
|
||||
|
||||
1: stq_u t0, 0(a0)
|
||||
br $finish_up
|
||||
|
||||
/* Add the end-of-count bit to the eos detection bitmask. */
|
||||
$a_eoc:
|
||||
or t10, t8, t8
|
||||
br $a_eos
|
||||
|
||||
/*** The Function Entry Point ***/
|
||||
.align 3
|
||||
__strncpy_from_user:
|
||||
mov a0, v0 # save the string start
|
||||
beq a2, $zerolength
|
||||
|
||||
/* Are source and destination co-aligned? */
|
||||
xor a0, a1, t1 # e0 :
|
||||
and a0, 7, t0 # .. e1 : find dest misalignment
|
||||
and t1, 7, t1 # e0 :
|
||||
addq a2, t0, a2 # .. e1 : bias count by dest misalignment
|
||||
subq a2, 1, a2 # e0 :
|
||||
and a2, 7, t2 # e1 :
|
||||
srl a2, 3, a2 # e0 : a2 = loop counter = (count - 1)/8
|
||||
addq zero, 1, t10 # .. e1 :
|
||||
sll t10, t2, t10 # e0 : t10 = bitmask of last count byte
|
||||
bne t1, $unaligned # .. e1 :
|
||||
|
||||
/* We are co-aligned; take care of a partial first word. */
|
||||
|
||||
EX( ldq_u t1, 0(a1) ) # e0 : load first src word
|
||||
addq a1, 8, a1 # .. e1 :
|
||||
|
||||
beq t0, $aligned # avoid loading dest word if not needed
|
||||
ldq_u t0, 0(a0) # e0 :
|
||||
br $aligned # .. e1 :
|
||||
|
||||
|
||||
/* The source and destination are not co-aligned. Align the destination
|
||||
and cope. We have to be very careful about not reading too much and
|
||||
causing a SEGV. */
|
||||
|
||||
.align 3
|
||||
$u_head:
|
||||
/* We know just enough now to be able to assemble the first
|
||||
full source word. We can still find a zero at the end of it
|
||||
that prevents us from outputting the whole thing.
|
||||
|
||||
On entry to this basic block:
|
||||
t0 == the first dest word, unmasked
|
||||
t1 == the shifted low bits of the first source word
|
||||
t6 == bytemask that is -1 in dest word bytes */
|
||||
|
||||
EX( ldq_u t2, 8(a1) ) # e0 : load second src word
|
||||
addq a1, 8, a1 # .. e1 :
|
||||
mskql t0, a0, t0 # e0 : mask trailing garbage in dst
|
||||
extqh t2, a1, t4 # e0 :
|
||||
or t1, t4, t1 # e1 : first aligned src word complete
|
||||
mskqh t1, a0, t1 # e0 : mask leading garbage in src
|
||||
or t0, t1, t0 # e0 : first output word complete
|
||||
or t0, t6, t6 # e1 : mask original data for zero test
|
||||
cmpbge zero, t6, t8 # e0 :
|
||||
beq a2, $u_eocfin # .. e1 :
|
||||
bne t8, $u_final # e1 :
|
||||
|
||||
lda t6, -1 # e1 : mask out the bits we have
|
||||
mskql t6, a1, t6 # e0 : already seen
|
||||
stq_u t0, 0(a0) # e0 : store first output word
|
||||
or t6, t2, t2 # .. e1 :
|
||||
cmpbge zero, t2, t8 # e0 : find nulls in second partial
|
||||
addq a0, 8, a0 # .. e1 :
|
||||
subq a2, 1, a2 # e0 :
|
||||
bne t8, $u_late_head_exit # .. e1 :
|
||||
|
||||
/* Finally, we've got all the stupid leading edge cases taken care
|
||||
of and we can set up to enter the main loop. */
|
||||
|
||||
extql t2, a1, t1 # e0 : position hi-bits of lo word
|
||||
EX( ldq_u t2, 8(a1) ) # .. e1 : read next high-order source word
|
||||
addq a1, 8, a1 # e0 :
|
||||
cmpbge zero, t2, t8 # e1 (stall)
|
||||
beq a2, $u_eoc # e1 :
|
||||
bne t8, $u_eos # e1 :
|
||||
|
||||
/* Unaligned copy main loop. In order to avoid reading too much,
|
||||
the loop is structured to detect zeros in aligned source words.
|
||||
This has, unfortunately, effectively pulled half of a loop
|
||||
iteration out into the head and half into the tail, but it does
|
||||
prevent nastiness from accumulating in the very thing we want
|
||||
to run as fast as possible.
|
||||
|
||||
On entry to this basic block:
|
||||
t1 == the shifted high-order bits from the previous source word
|
||||
t2 == the unshifted current source word
|
||||
|
||||
We further know that t2 does not contain a null terminator. */
|
||||
|
||||
.align 3
|
||||
$u_loop:
|
||||
extqh t2, a1, t0 # e0 : extract high bits for current word
|
||||
addq a1, 8, a1 # .. e1 :
|
||||
extql t2, a1, t3 # e0 : extract low bits for next time
|
||||
addq a0, 8, a0 # .. e1 :
|
||||
or t0, t1, t0 # e0 : current dst word now complete
|
||||
EX( ldq_u t2, 0(a1) ) # .. e1 : load high word for next time
|
||||
stq_u t0, -8(a0) # e0 : save the current word
|
||||
mov t3, t1 # .. e1 :
|
||||
subq a2, 1, a2 # e0 :
|
||||
cmpbge zero, t2, t8 # .. e1 : test new word for eos
|
||||
beq a2, $u_eoc # e1 :
|
||||
beq t8, $u_loop # e1 :
|
||||
|
||||
/* We've found a zero somewhere in the source word we just read.
|
||||
If it resides in the lower half, we have one (probably partial)
|
||||
word to write out, and if it resides in the upper half, we
|
||||
have one full and one partial word left to write out.
|
||||
|
||||
On entry to this basic block:
|
||||
t1 == the shifted high-order bits from the previous source word
|
||||
t2 == the unshifted current source word. */
|
||||
$u_eos:
|
||||
extqh t2, a1, t0 # e0 :
|
||||
or t0, t1, t0 # e1 : first (partial) source word complete
|
||||
|
||||
cmpbge zero, t0, t8 # e0 : is the null in this first bit?
|
||||
bne t8, $u_final # .. e1 (zdb)
|
||||
|
||||
stq_u t0, 0(a0) # e0 : the null was in the high-order bits
|
||||
addq a0, 8, a0 # .. e1 :
|
||||
subq a2, 1, a2 # e1 :
|
||||
|
||||
$u_late_head_exit:
|
||||
extql t2, a1, t0 # .. e0 :
|
||||
cmpbge zero, t0, t8 # e0 :
|
||||
or t8, t10, t6 # e1 :
|
||||
cmoveq a2, t6, t8 # e0 :
|
||||
nop # .. e1 :
|
||||
|
||||
/* Take care of a final (probably partial) result word.
|
||||
On entry to this basic block:
|
||||
t0 == assembled source word
|
||||
t8 == cmpbge mask that found the null. */
|
||||
$u_final:
|
||||
negq t8, t6 # e0 : isolate low bit set
|
||||
and t6, t8, t12 # e1 :
|
||||
|
||||
and t12, 0x80, t6 # e0 : avoid dest word load if we can
|
||||
bne t6, 1f # .. e1 (zdb)
|
||||
|
||||
ldq_u t1, 0(a0) # e0 :
|
||||
subq t12, 1, t6 # .. e1 :
|
||||
or t6, t12, t8 # e0 :
|
||||
zapnot t0, t8, t0 # .. e1 : kill source bytes > null
|
||||
zap t1, t8, t1 # e0 : kill dest bytes <= null
|
||||
or t0, t1, t0 # e1 :
|
||||
|
||||
1: stq_u t0, 0(a0) # e0 :
|
||||
br $finish_up
|
||||
|
||||
$u_eoc: # end-of-count
|
||||
extqh t2, a1, t0
|
||||
or t0, t1, t0
|
||||
cmpbge zero, t0, t8
|
||||
|
||||
$u_eocfin: # end-of-count, final word
|
||||
or t10, t8, t8
|
||||
br $u_final
|
||||
|
||||
/* Unaligned copy entry point. */
|
||||
.align 3
|
||||
$unaligned:
|
||||
|
||||
EX( ldq_u t1, 0(a1) ) # e0 : load first source word
|
||||
|
||||
and a0, 7, t4 # .. e1 : find dest misalignment
|
||||
and a1, 7, t5 # e0 : find src misalignment
|
||||
|
||||
/* Conditionally load the first destination word and a bytemask
|
||||
with 0xff indicating that the destination byte is sacrosanct. */
|
||||
|
||||
mov zero, t0 # .. e1 :
|
||||
mov zero, t6 # e0 :
|
||||
beq t4, 1f # .. e1 :
|
||||
ldq_u t0, 0(a0) # e0 :
|
||||
lda t6, -1 # .. e1 :
|
||||
mskql t6, a0, t6 # e0 :
|
||||
1:
|
||||
subq a1, t4, a1 # .. e1 : sub dest misalignment from src addr
|
||||
|
||||
/* If source misalignment is larger than dest misalignment, we need
|
||||
extra startup checks to avoid SEGV. */
|
||||
|
||||
cmplt t4, t5, t12 # e1 :
|
||||
extql t1, a1, t1 # .. e0 : shift src into place
|
||||
lda t2, -1 # e0 : for creating masks later
|
||||
beq t12, $u_head # e1 :
|
||||
|
||||
mskqh t2, t5, t2 # e0 : begin src byte validity mask
|
||||
cmpbge zero, t1, t8 # .. e1 : is there a zero?
|
||||
extql t2, a1, t2 # e0 :
|
||||
or t8, t10, t5 # .. e1 : test for end-of-count too
|
||||
cmpbge zero, t2, t3 # e0 :
|
||||
cmoveq a2, t5, t8 # .. e1 :
|
||||
andnot t8, t3, t8 # e0 :
|
||||
beq t8, $u_head # .. e1 (zdb)
|
||||
|
||||
/* At this point we've found a zero in the first partial word of
|
||||
the source. We need to isolate the valid source data and mask
|
||||
it into the original destination data. (Incidentally, we know
|
||||
that we'll need at least one byte of that original dest word.) */
|
||||
|
||||
ldq_u t0, 0(a0) # e0 :
|
||||
negq t8, t6 # .. e1 : build bitmask of bytes <= zero
|
||||
mskqh t1, t4, t1 # e0 :
|
||||
and t6, t8, t12 # .. e1 :
|
||||
subq t12, 1, t6 # e0 :
|
||||
or t6, t12, t8 # e1 :
|
||||
|
||||
zapnot t2, t8, t2 # e0 : prepare source word; mirror changes
|
||||
zapnot t1, t8, t1 # .. e1 : to source validity mask
|
||||
|
||||
andnot t0, t2, t0 # e0 : zero place for source to reside
|
||||
or t0, t1, t0 # e1 : and put it there
|
||||
stq_u t0, 0(a0) # e0 :
|
||||
|
||||
$finish_up:
|
||||
zapnot t0, t12, t4 # was last byte written null?
|
||||
cmovne t4, 1, t4
|
||||
|
||||
and t12, 0xf0, t3 # binary search for the address of the
|
||||
and t12, 0xcc, t2 # last byte written
|
||||
and t12, 0xaa, t1
|
||||
bic a0, 7, t0
|
||||
cmovne t3, 4, t3
|
||||
cmovne t2, 2, t2
|
||||
cmovne t1, 1, t1
|
||||
addq t0, t3, t0
|
||||
addq t1, t2, t1
|
||||
addq t0, t1, t0
|
||||
addq t0, t4, t0 # add one if we filled the buffer
|
||||
|
||||
subq t0, v0, v0 # find string length
|
||||
ret
|
||||
|
||||
$zerolength:
|
||||
clr v0
|
||||
$exception:
|
||||
ret
|
||||
|
||||
.end __strncpy_from_user
|
|
@ -89,6 +89,8 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
|
|||
const struct exception_table_entry *fixup;
|
||||
int fault, si_code = SEGV_MAPERR;
|
||||
siginfo_t info;
|
||||
unsigned int flags = (FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE |
|
||||
(cause > 0 ? FAULT_FLAG_WRITE : 0));
|
||||
|
||||
/* As of EV6, a load into $31/$f31 is a prefetch, and never faults
|
||||
(or is suppressed by the PALcode). Support that for older CPUs
|
||||
|
@ -114,6 +116,7 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
|
|||
goto vmalloc_fault;
|
||||
#endif
|
||||
|
||||
retry:
|
||||
down_read(&mm->mmap_sem);
|
||||
vma = find_vma(mm, address);
|
||||
if (!vma)
|
||||
|
@ -144,8 +147,11 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
|
|||
/* If for any reason at all we couldn't handle the fault,
|
||||
make sure we exit gracefully rather than endlessly redo
|
||||
the fault. */
|
||||
fault = handle_mm_fault(mm, vma, address, cause > 0 ? FAULT_FLAG_WRITE : 0);
|
||||
up_read(&mm->mmap_sem);
|
||||
fault = handle_mm_fault(mm, vma, address, flags);
|
||||
|
||||
if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current))
|
||||
return;
|
||||
|
||||
if (unlikely(fault & VM_FAULT_ERROR)) {
|
||||
if (fault & VM_FAULT_OOM)
|
||||
goto out_of_memory;
|
||||
|
@ -153,10 +159,26 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
|
|||
goto do_sigbus;
|
||||
BUG();
|
||||
}
|
||||
|
||||
if (flags & FAULT_FLAG_ALLOW_RETRY) {
|
||||
if (fault & VM_FAULT_MAJOR)
|
||||
current->maj_flt++;
|
||||
else
|
||||
current->min_flt++;
|
||||
if (fault & VM_FAULT_RETRY) {
|
||||
flags &= ~FAULT_FLAG_ALLOW_RETRY;
|
||||
|
||||
/* No need to up_read(&mm->mmap_sem) as we would
|
||||
* have already released it in __lock_page_or_retry
|
||||
* in mm/filemap.c.
|
||||
*/
|
||||
|
||||
goto retry;
|
||||
}
|
||||
}
|
||||
|
||||
up_read(&mm->mmap_sem);
|
||||
|
||||
return;
|
||||
|
||||
/* Something tried to access memory that isn't in our memory map.
|
||||
|
@ -186,12 +208,14 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
|
|||
/* We ran out of memory, or some other thing happened to us that
|
||||
made us unable to handle the page fault gracefully. */
|
||||
out_of_memory:
|
||||
up_read(&mm->mmap_sem);
|
||||
if (!user_mode(regs))
|
||||
goto no_context;
|
||||
pagefault_out_of_memory();
|
||||
return;
|
||||
|
||||
do_sigbus:
|
||||
up_read(&mm->mmap_sem);
|
||||
/* Send a sigbus, regardless of whether we were in kernel
|
||||
or user mode. */
|
||||
info.si_signo = SIGBUS;
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include <linux/smp.h>
|
||||
#include <linux/errno.h>
|
||||
#include <asm/ptrace.h>
|
||||
#include <asm/special_insns.h>
|
||||
|
||||
#include "op_impl.h"
|
||||
|
||||
|
|
|
@ -38,7 +38,6 @@ config ARM
|
|||
select HARDIRQS_SW_RESEND
|
||||
select GENERIC_IRQ_PROBE
|
||||
select GENERIC_IRQ_SHOW
|
||||
select GENERIC_IRQ_PROBE
|
||||
select ARCH_WANT_IPC_PARSE_VERSION
|
||||
select HARDIRQS_SW_RESEND
|
||||
select CPU_PM if (SUSPEND || CPU_IDLE)
|
||||
|
@ -126,11 +125,6 @@ config TRACE_IRQFLAGS_SUPPORT
|
|||
bool
|
||||
default y
|
||||
|
||||
config GENERIC_LOCKBREAK
|
||||
bool
|
||||
default y
|
||||
depends on SMP && PREEMPT
|
||||
|
||||
config RWSEM_GENERIC_SPINLOCK
|
||||
bool
|
||||
default y
|
||||
|
@ -2150,6 +2144,7 @@ source "drivers/cpufreq/Kconfig"
|
|||
config CPU_FREQ_IMX
|
||||
tristate "CPUfreq driver for i.MX CPUs"
|
||||
depends on ARCH_MXC && CPU_FREQ
|
||||
select CPU_FREQ_TABLE
|
||||
help
|
||||
This enables the CPUfreq driver for i.MX CPUs.
|
||||
|
||||
|
|
|
@ -154,5 +154,10 @@
|
|||
#size-cells = <0>;
|
||||
ti,hwmods = "i2c3";
|
||||
};
|
||||
|
||||
wdt2: wdt@44e35000 {
|
||||
compatible = "ti,omap3-wdt";
|
||||
ti,hwmods = "wd_timer2";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -51,11 +51,11 @@
|
|||
|
||||
dma-apbh@80004000 {
|
||||
compatible = "fsl,imx23-dma-apbh";
|
||||
reg = <0x80004000 2000>;
|
||||
reg = <0x80004000 0x2000>;
|
||||
};
|
||||
|
||||
ecc@80008000 {
|
||||
reg = <0x80008000 2000>;
|
||||
reg = <0x80008000 0x2000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -63,7 +63,7 @@
|
|||
compatible = "fsl,imx23-gpmi-nand";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
reg = <0x8000c000 2000>, <0x8000a000 2000>;
|
||||
reg = <0x8000c000 0x2000>, <0x8000a000 0x2000>;
|
||||
reg-names = "gpmi-nand", "bch";
|
||||
interrupts = <13>, <56>;
|
||||
interrupt-names = "gpmi-dma", "bch";
|
||||
|
@ -72,14 +72,14 @@
|
|||
};
|
||||
|
||||
ssp0: ssp@80010000 {
|
||||
reg = <0x80010000 2000>;
|
||||
reg = <0x80010000 0x2000>;
|
||||
interrupts = <15 14>;
|
||||
fsl,ssp-dma-channel = <1>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
etm@80014000 {
|
||||
reg = <0x80014000 2000>;
|
||||
reg = <0x80014000 0x2000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -87,7 +87,7 @@
|
|||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "fsl,imx23-pinctrl", "simple-bus";
|
||||
reg = <0x80018000 2000>;
|
||||
reg = <0x80018000 0x2000>;
|
||||
|
||||
gpio0: gpio@0 {
|
||||
compatible = "fsl,imx23-gpio", "fsl,mxs-gpio";
|
||||
|
@ -273,32 +273,32 @@
|
|||
};
|
||||
|
||||
emi@80020000 {
|
||||
reg = <0x80020000 2000>;
|
||||
reg = <0x80020000 0x2000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
dma-apbx@80024000 {
|
||||
compatible = "fsl,imx23-dma-apbx";
|
||||
reg = <0x80024000 2000>;
|
||||
reg = <0x80024000 0x2000>;
|
||||
};
|
||||
|
||||
dcp@80028000 {
|
||||
reg = <0x80028000 2000>;
|
||||
reg = <0x80028000 0x2000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pxp@8002a000 {
|
||||
reg = <0x8002a000 2000>;
|
||||
reg = <0x8002a000 0x2000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
ocotp@8002c000 {
|
||||
reg = <0x8002c000 2000>;
|
||||
reg = <0x8002c000 0x2000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
axi-ahb@8002e000 {
|
||||
reg = <0x8002e000 2000>;
|
||||
reg = <0x8002e000 0x2000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -310,14 +310,14 @@
|
|||
};
|
||||
|
||||
ssp1: ssp@80034000 {
|
||||
reg = <0x80034000 2000>;
|
||||
reg = <0x80034000 0x2000>;
|
||||
interrupts = <2 20>;
|
||||
fsl,ssp-dma-channel = <2>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
tvenc@80038000 {
|
||||
reg = <0x80038000 2000>;
|
||||
reg = <0x80038000 0x2000>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
@ -330,37 +330,37 @@
|
|||
ranges;
|
||||
|
||||
clkctl@80040000 {
|
||||
reg = <0x80040000 2000>;
|
||||
reg = <0x80040000 0x2000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
saif0: saif@80042000 {
|
||||
reg = <0x80042000 2000>;
|
||||
reg = <0x80042000 0x2000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
power@80044000 {
|
||||
reg = <0x80044000 2000>;
|
||||
reg = <0x80044000 0x2000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
saif1: saif@80046000 {
|
||||
reg = <0x80046000 2000>;
|
||||
reg = <0x80046000 0x2000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
audio-out@80048000 {
|
||||
reg = <0x80048000 2000>;
|
||||
reg = <0x80048000 0x2000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
audio-in@8004c000 {
|
||||
reg = <0x8004c000 2000>;
|
||||
reg = <0x8004c000 0x2000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
lradc@80050000 {
|
||||
reg = <0x80050000 2000>;
|
||||
reg = <0x80050000 0x2000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -370,26 +370,26 @@
|
|||
};
|
||||
|
||||
i2c@80058000 {
|
||||
reg = <0x80058000 2000>;
|
||||
reg = <0x80058000 0x2000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
rtc@8005c000 {
|
||||
compatible = "fsl,imx23-rtc", "fsl,stmp3xxx-rtc";
|
||||
reg = <0x8005c000 2000>;
|
||||
reg = <0x8005c000 0x2000>;
|
||||
interrupts = <22>;
|
||||
};
|
||||
|
||||
pwm: pwm@80064000 {
|
||||
compatible = "fsl,imx23-pwm";
|
||||
reg = <0x80064000 2000>;
|
||||
reg = <0x80064000 0x2000>;
|
||||
#pwm-cells = <2>;
|
||||
fsl,pwm-number = <5>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
timrot@80068000 {
|
||||
reg = <0x80068000 2000>;
|
||||
reg = <0x80068000 0x2000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -429,7 +429,7 @@
|
|||
ranges;
|
||||
|
||||
usbctrl@80080000 {
|
||||
reg = <0x80080000 0x10000>;
|
||||
reg = <0x80080000 0x40000>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
uart@1000a000 {
|
||||
uart1: serial@1000a000 {
|
||||
fsl,uart-has-rtscts;
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
@ -19,6 +19,12 @@
|
|||
serial3 = &uart4;
|
||||
serial4 = &uart5;
|
||||
serial5 = &uart6;
|
||||
gpio0 = &gpio1;
|
||||
gpio1 = &gpio2;
|
||||
gpio2 = &gpio3;
|
||||
gpio3 = &gpio4;
|
||||
gpio4 = &gpio5;
|
||||
gpio5 = &gpio6;
|
||||
};
|
||||
|
||||
avic: avic-interrupt-controller@e0000000 {
|
||||
|
|
|
@ -57,18 +57,18 @@
|
|||
};
|
||||
|
||||
hsadc@80002000 {
|
||||
reg = <0x80002000 2000>;
|
||||
reg = <0x80002000 0x2000>;
|
||||
interrupts = <13 87>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
dma-apbh@80004000 {
|
||||
compatible = "fsl,imx28-dma-apbh";
|
||||
reg = <0x80004000 2000>;
|
||||
reg = <0x80004000 0x2000>;
|
||||
};
|
||||
|
||||
perfmon@80006000 {
|
||||
reg = <0x80006000 800>;
|
||||
reg = <0x80006000 0x800>;
|
||||
interrupts = <27>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
@ -77,7 +77,7 @@
|
|||
compatible = "fsl,imx28-gpmi-nand";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
reg = <0x8000c000 2000>, <0x8000a000 2000>;
|
||||
reg = <0x8000c000 0x2000>, <0x8000a000 0x2000>;
|
||||
reg-names = "gpmi-nand", "bch";
|
||||
interrupts = <88>, <41>;
|
||||
interrupt-names = "gpmi-dma", "bch";
|
||||
|
@ -86,28 +86,28 @@
|
|||
};
|
||||
|
||||
ssp0: ssp@80010000 {
|
||||
reg = <0x80010000 2000>;
|
||||
reg = <0x80010000 0x2000>;
|
||||
interrupts = <96 82>;
|
||||
fsl,ssp-dma-channel = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
ssp1: ssp@80012000 {
|
||||
reg = <0x80012000 2000>;
|
||||
reg = <0x80012000 0x2000>;
|
||||
interrupts = <97 83>;
|
||||
fsl,ssp-dma-channel = <1>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
ssp2: ssp@80014000 {
|
||||
reg = <0x80014000 2000>;
|
||||
reg = <0x80014000 0x2000>;
|
||||
interrupts = <98 84>;
|
||||
fsl,ssp-dma-channel = <2>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
ssp3: ssp@80016000 {
|
||||
reg = <0x80016000 2000>;
|
||||
reg = <0x80016000 0x2000>;
|
||||
interrupts = <99 85>;
|
||||
fsl,ssp-dma-channel = <3>;
|
||||
status = "disabled";
|
||||
|
@ -117,7 +117,7 @@
|
|||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "fsl,imx28-pinctrl", "simple-bus";
|
||||
reg = <0x80018000 2000>;
|
||||
reg = <0x80018000 0x2000>;
|
||||
|
||||
gpio0: gpio@0 {
|
||||
compatible = "fsl,imx28-gpio", "fsl,mxs-gpio";
|
||||
|
@ -510,96 +510,96 @@
|
|||
};
|
||||
|
||||
digctl@8001c000 {
|
||||
reg = <0x8001c000 2000>;
|
||||
reg = <0x8001c000 0x2000>;
|
||||
interrupts = <89>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
etm@80022000 {
|
||||
reg = <0x80022000 2000>;
|
||||
reg = <0x80022000 0x2000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
dma-apbx@80024000 {
|
||||
compatible = "fsl,imx28-dma-apbx";
|
||||
reg = <0x80024000 2000>;
|
||||
reg = <0x80024000 0x2000>;
|
||||
};
|
||||
|
||||
dcp@80028000 {
|
||||
reg = <0x80028000 2000>;
|
||||
reg = <0x80028000 0x2000>;
|
||||
interrupts = <52 53 54>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pxp@8002a000 {
|
||||
reg = <0x8002a000 2000>;
|
||||
reg = <0x8002a000 0x2000>;
|
||||
interrupts = <39>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
ocotp@8002c000 {
|
||||
reg = <0x8002c000 2000>;
|
||||
reg = <0x8002c000 0x2000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
axi-ahb@8002e000 {
|
||||
reg = <0x8002e000 2000>;
|
||||
reg = <0x8002e000 0x2000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
lcdif@80030000 {
|
||||
compatible = "fsl,imx28-lcdif";
|
||||
reg = <0x80030000 2000>;
|
||||
reg = <0x80030000 0x2000>;
|
||||
interrupts = <38 86>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
can0: can@80032000 {
|
||||
compatible = "fsl,imx28-flexcan", "fsl,p1010-flexcan";
|
||||
reg = <0x80032000 2000>;
|
||||
reg = <0x80032000 0x2000>;
|
||||
interrupts = <8>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
can1: can@80034000 {
|
||||
compatible = "fsl,imx28-flexcan", "fsl,p1010-flexcan";
|
||||
reg = <0x80034000 2000>;
|
||||
reg = <0x80034000 0x2000>;
|
||||
interrupts = <9>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
simdbg@8003c000 {
|
||||
reg = <0x8003c000 200>;
|
||||
reg = <0x8003c000 0x200>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
simgpmisel@8003c200 {
|
||||
reg = <0x8003c200 100>;
|
||||
reg = <0x8003c200 0x100>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
simsspsel@8003c300 {
|
||||
reg = <0x8003c300 100>;
|
||||
reg = <0x8003c300 0x100>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
simmemsel@8003c400 {
|
||||
reg = <0x8003c400 100>;
|
||||
reg = <0x8003c400 0x100>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpiomon@8003c500 {
|
||||
reg = <0x8003c500 100>;
|
||||
reg = <0x8003c500 0x100>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
simenet@8003c700 {
|
||||
reg = <0x8003c700 100>;
|
||||
reg = <0x8003c700 0x100>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
armjtag@8003c800 {
|
||||
reg = <0x8003c800 100>;
|
||||
reg = <0x8003c800 0x100>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
@ -612,45 +612,45 @@
|
|||
ranges;
|
||||
|
||||
clkctl@80040000 {
|
||||
reg = <0x80040000 2000>;
|
||||
reg = <0x80040000 0x2000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
saif0: saif@80042000 {
|
||||
compatible = "fsl,imx28-saif";
|
||||
reg = <0x80042000 2000>;
|
||||
reg = <0x80042000 0x2000>;
|
||||
interrupts = <59 80>;
|
||||
fsl,saif-dma-channel = <4>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
power@80044000 {
|
||||
reg = <0x80044000 2000>;
|
||||
reg = <0x80044000 0x2000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
saif1: saif@80046000 {
|
||||
compatible = "fsl,imx28-saif";
|
||||
reg = <0x80046000 2000>;
|
||||
reg = <0x80046000 0x2000>;
|
||||
interrupts = <58 81>;
|
||||
fsl,saif-dma-channel = <5>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
lradc@80050000 {
|
||||
reg = <0x80050000 2000>;
|
||||
reg = <0x80050000 0x2000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
spdif@80054000 {
|
||||
reg = <0x80054000 2000>;
|
||||
reg = <0x80054000 0x2000>;
|
||||
interrupts = <45 66>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
rtc@80056000 {
|
||||
compatible = "fsl,imx28-rtc", "fsl,stmp3xxx-rtc";
|
||||
reg = <0x80056000 2000>;
|
||||
reg = <0x80056000 0x2000>;
|
||||
interrupts = <29>;
|
||||
};
|
||||
|
||||
|
@ -658,7 +658,7 @@
|
|||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "fsl,imx28-i2c";
|
||||
reg = <0x80058000 2000>;
|
||||
reg = <0x80058000 0x2000>;
|
||||
interrupts = <111 68>;
|
||||
clock-frequency = <100000>;
|
||||
status = "disabled";
|
||||
|
@ -668,7 +668,7 @@
|
|||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "fsl,imx28-i2c";
|
||||
reg = <0x8005a000 2000>;
|
||||
reg = <0x8005a000 0x2000>;
|
||||
interrupts = <110 69>;
|
||||
clock-frequency = <100000>;
|
||||
status = "disabled";
|
||||
|
@ -676,14 +676,14 @@
|
|||
|
||||
pwm: pwm@80064000 {
|
||||
compatible = "fsl,imx28-pwm", "fsl,imx23-pwm";
|
||||
reg = <0x80064000 2000>;
|
||||
reg = <0x80064000 0x2000>;
|
||||
#pwm-cells = <2>;
|
||||
fsl,pwm-number = <8>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
timrot@80068000 {
|
||||
reg = <0x80068000 2000>;
|
||||
reg = <0x80068000 0x2000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
aips@70000000 { /* aips-1 */
|
||||
spba@70000000 {
|
||||
esdhc@70004000 { /* ESDHC1 */
|
||||
fsl,cd-internal;
|
||||
fsl,wp-internal;
|
||||
fsl,cd-controller;
|
||||
fsl,wp-controller;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
@ -53,7 +53,7 @@
|
|||
spi-max-frequency = <6000000>;
|
||||
reg = <0>;
|
||||
interrupt-parent = <&gpio1>;
|
||||
interrupts = <8>;
|
||||
interrupts = <8 0x4>;
|
||||
|
||||
regulators {
|
||||
sw1_reg: sw1 {
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
serial0 = &uart1;
|
||||
serial1 = &uart2;
|
||||
serial2 = &uart3;
|
||||
gpio0 = &gpio1;
|
||||
gpio1 = &gpio2;
|
||||
gpio2 = &gpio3;
|
||||
gpio3 = &gpio4;
|
||||
};
|
||||
|
||||
tzic: tz-interrupt-controller@e0000000 {
|
||||
|
|
|
@ -64,12 +64,32 @@
|
|||
reg = <0xf4000000 0x2000000>;
|
||||
phy-mode = "mii";
|
||||
interrupt-parent = <&gpio2>;
|
||||
interrupts = <31>;
|
||||
interrupts = <31 0x8>;
|
||||
reg-io-width = <4>;
|
||||
/*
|
||||
* VDD33A and VDDVARIO of LAN9220 are supplied by
|
||||
* SW4_3V3 of LTC3589. Before the regulator driver
|
||||
* for this PMIC is available, we use a fixed dummy
|
||||
* 3V3 regulator to get LAN9220 driver probing work.
|
||||
*/
|
||||
vdd33a-supply = <®_3p3v>;
|
||||
vddvario-supply = <®_3p3v>;
|
||||
smsc,irq-push-pull;
|
||||
};
|
||||
};
|
||||
|
||||
regulators {
|
||||
compatible = "simple-bus";
|
||||
|
||||
reg_3p3v: 3p3v {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "3P3V";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
};
|
||||
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
|
|
|
@ -19,6 +19,13 @@
|
|||
serial2 = &uart3;
|
||||
serial3 = &uart4;
|
||||
serial4 = &uart5;
|
||||
gpio0 = &gpio1;
|
||||
gpio1 = &gpio2;
|
||||
gpio2 = &gpio3;
|
||||
gpio3 = &gpio4;
|
||||
gpio4 = &gpio5;
|
||||
gpio5 = &gpio6;
|
||||
gpio6 = &gpio7;
|
||||
};
|
||||
|
||||
tzic: tz-interrupt-controller@0fffc000 {
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
fsl,pins = <
|
||||
144 0x80000000 /* MX6Q_PAD_EIM_D22__GPIO_3_22 */
|
||||
121 0x80000000 /* MX6Q_PAD_EIM_D19__GPIO_3_19 */
|
||||
953 0x80000000 /* MX6Q_PAD_GPIO_0__CCM_CLKO */
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -19,6 +19,13 @@
|
|||
serial2 = &uart3;
|
||||
serial3 = &uart4;
|
||||
serial4 = &uart5;
|
||||
gpio0 = &gpio1;
|
||||
gpio1 = &gpio2;
|
||||
gpio2 = &gpio3;
|
||||
gpio3 = &gpio4;
|
||||
gpio4 = &gpio5;
|
||||
gpio5 = &gpio6;
|
||||
gpio6 = &gpio7;
|
||||
};
|
||||
|
||||
cpus {
|
||||
|
|
|
@ -41,9 +41,13 @@
|
|||
};
|
||||
power-blue {
|
||||
label = "power:blue";
|
||||
gpios = <&gpio1 11 0>;
|
||||
gpios = <&gpio1 10 0>;
|
||||
linux,default-trigger = "timer";
|
||||
};
|
||||
power-red {
|
||||
label = "power:red";
|
||||
gpios = <&gpio1 11 0>;
|
||||
};
|
||||
usb1 {
|
||||
label = "usb1:blue";
|
||||
gpios = <&gpio1 12 0>;
|
||||
|
|
|
@ -66,6 +66,7 @@
|
|||
|
||||
vcxio: regulator@8 {
|
||||
compatible = "ti,twl6030-vcxio";
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vusb: regulator@9 {
|
||||
|
@ -74,10 +75,12 @@
|
|||
|
||||
v1v8: regulator@10 {
|
||||
compatible = "ti,twl6030-v1v8";
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
v2v1: regulator@11 {
|
||||
compatible = "ti,twl6030-v2v1";
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
clk32kg: regulator@12 {
|
||||
|
|
|
@ -192,6 +192,7 @@ CONFIG_RTC_DRV_MC13XXX=y
|
|||
CONFIG_RTC_DRV_MXC=y
|
||||
CONFIG_DMADEVICES=y
|
||||
CONFIG_IMX_SDMA=y
|
||||
CONFIG_MXS_DMA=y
|
||||
CONFIG_COMMON_CLK_DEBUG=y
|
||||
# CONFIG_IOMMU_SUPPORT is not set
|
||||
CONFIG_EXT2_FS=y
|
||||
|
|
|
@ -34,7 +34,6 @@ CONFIG_NO_HZ=y
|
|||
CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_PREEMPT_VOLUNTARY=y
|
||||
CONFIG_AEABI=y
|
||||
CONFIG_DEFAULT_MMAP_MIN_ADDR=65536
|
||||
CONFIG_AUTO_ZRELADDR=y
|
||||
CONFIG_FPE_NWFPE=y
|
||||
CONFIG_NET=y
|
||||
|
|
|
@ -7,7 +7,7 @@ CONFIG_SYSFS_DEPRECATED_V2=y
|
|||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_EXPERT=y
|
||||
# CONFIG_KALLSYMS is not set
|
||||
# CONFIG_BUG is not set
|
||||
# CONFIG_BUGVERBOSE is not set
|
||||
# CONFIG_ELF_CORE is not set
|
||||
# CONFIG_SHMEM is not set
|
||||
CONFIG_SLOB=y
|
||||
|
|
|
@ -86,6 +86,7 @@ CONFIG_NEW_LEDS=y
|
|||
CONFIG_LEDS_CLASS=y
|
||||
CONFIG_LEDS_LM3530=y
|
||||
CONFIG_LEDS_LP5521=y
|
||||
CONFIG_LEDS_GPIO=y
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_AB8500=y
|
||||
CONFIG_RTC_DRV_PL031=y
|
||||
|
|
|
@ -195,25 +195,6 @@ static inline pte_t *pmd_page_vaddr(pmd_t pmd)
|
|||
|
||||
#define pte_clear(mm,addr,ptep) set_pte_ext(ptep, __pte(0), 0)
|
||||
|
||||
#if __LINUX_ARM_ARCH__ < 6
|
||||
static inline void __sync_icache_dcache(pte_t pteval)
|
||||
{
|
||||
}
|
||||
#else
|
||||
extern void __sync_icache_dcache(pte_t pteval);
|
||||
#endif
|
||||
|
||||
static inline void set_pte_at(struct mm_struct *mm, unsigned long addr,
|
||||
pte_t *ptep, pte_t pteval)
|
||||
{
|
||||
if (addr >= TASK_SIZE)
|
||||
set_pte_ext(ptep, pteval, 0);
|
||||
else {
|
||||
__sync_icache_dcache(pteval);
|
||||
set_pte_ext(ptep, pteval, PTE_EXT_NG);
|
||||
}
|
||||
}
|
||||
|
||||
#define pte_none(pte) (!pte_val(pte))
|
||||
#define pte_present(pte) (pte_val(pte) & L_PTE_PRESENT)
|
||||
#define pte_write(pte) (!(pte_val(pte) & L_PTE_RDONLY))
|
||||
|
@ -226,6 +207,27 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr,
|
|||
((pte_val(pte) & (L_PTE_PRESENT | L_PTE_USER)) == \
|
||||
(L_PTE_PRESENT | L_PTE_USER))
|
||||
|
||||
#if __LINUX_ARM_ARCH__ < 6
|
||||
static inline void __sync_icache_dcache(pte_t pteval)
|
||||
{
|
||||
}
|
||||
#else
|
||||
extern void __sync_icache_dcache(pte_t pteval);
|
||||
#endif
|
||||
|
||||
static inline void set_pte_at(struct mm_struct *mm, unsigned long addr,
|
||||
pte_t *ptep, pte_t pteval)
|
||||
{
|
||||
unsigned long ext = 0;
|
||||
|
||||
if (addr < TASK_SIZE && pte_present_user(pteval)) {
|
||||
__sync_icache_dcache(pteval);
|
||||
ext |= PTE_EXT_NG;
|
||||
}
|
||||
|
||||
set_pte_ext(ptep, pteval, ext);
|
||||
}
|
||||
|
||||
#define PTE_BIT_FUNC(fn,op) \
|
||||
static inline pte_t pte_##fn(pte_t pte) { pte_val(pte) op; return pte; }
|
||||
|
||||
|
@ -251,13 +253,13 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
|
|||
*
|
||||
* 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
|
||||
* 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
|
||||
* <--------------- offset --------------------> <- type --> 0 0 0
|
||||
* <--------------- offset ----------------------> < type -> 0 0 0
|
||||
*
|
||||
* This gives us up to 63 swap files and 32GB per swap file. Note that
|
||||
* This gives us up to 31 swap files and 64GB per swap file. Note that
|
||||
* the offset field is always non-zero.
|
||||
*/
|
||||
#define __SWP_TYPE_SHIFT 3
|
||||
#define __SWP_TYPE_BITS 6
|
||||
#define __SWP_TYPE_BITS 5
|
||||
#define __SWP_TYPE_MASK ((1 << __SWP_TYPE_BITS) - 1)
|
||||
#define __SWP_OFFSET_SHIFT (__SWP_TYPE_BITS + __SWP_TYPE_SHIFT)
|
||||
|
||||
|
|
|
@ -10,5 +10,7 @@
|
|||
|
||||
extern void sched_clock_postinit(void);
|
||||
extern void setup_sched_clock(u32 (*read)(void), int bits, unsigned long rate);
|
||||
extern void setup_sched_clock_needs_suspend(u32 (*read)(void), int bits,
|
||||
unsigned long rate);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -21,6 +21,8 @@ struct clock_data {
|
|||
u32 epoch_cyc_copy;
|
||||
u32 mult;
|
||||
u32 shift;
|
||||
bool suspended;
|
||||
bool needs_suspend;
|
||||
};
|
||||
|
||||
static void sched_clock_poll(unsigned long wrap_ticks);
|
||||
|
@ -49,6 +51,9 @@ static unsigned long long cyc_to_sched_clock(u32 cyc, u32 mask)
|
|||
u64 epoch_ns;
|
||||
u32 epoch_cyc;
|
||||
|
||||
if (cd.suspended)
|
||||
return cd.epoch_ns;
|
||||
|
||||
/*
|
||||
* Load the epoch_cyc and epoch_ns atomically. We do this by
|
||||
* ensuring that we always write epoch_cyc, epoch_ns and
|
||||
|
@ -98,6 +103,13 @@ static void sched_clock_poll(unsigned long wrap_ticks)
|
|||
update_sched_clock();
|
||||
}
|
||||
|
||||
void __init setup_sched_clock_needs_suspend(u32 (*read)(void), int bits,
|
||||
unsigned long rate)
|
||||
{
|
||||
setup_sched_clock(read, bits, rate);
|
||||
cd.needs_suspend = true;
|
||||
}
|
||||
|
||||
void __init setup_sched_clock(u32 (*read)(void), int bits, unsigned long rate)
|
||||
{
|
||||
unsigned long r, w;
|
||||
|
@ -169,11 +181,23 @@ void __init sched_clock_postinit(void)
|
|||
static int sched_clock_suspend(void)
|
||||
{
|
||||
sched_clock_poll(sched_clock_timer.data);
|
||||
if (cd.needs_suspend)
|
||||
cd.suspended = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void sched_clock_resume(void)
|
||||
{
|
||||
if (cd.needs_suspend) {
|
||||
cd.epoch_cyc = read_sched_clock();
|
||||
cd.epoch_cyc_copy = cd.epoch_cyc;
|
||||
cd.suspended = false;
|
||||
}
|
||||
}
|
||||
|
||||
static struct syscore_ops sched_clock_ops = {
|
||||
.suspend = sched_clock_suspend,
|
||||
.resume = sched_clock_resume,
|
||||
};
|
||||
|
||||
static int __init sched_clock_syscore_init(void)
|
||||
|
|
|
@ -321,7 +321,7 @@ void store_cpu_topology(unsigned int cpuid)
|
|||
* init_cpu_topology is called at boot when only one cpu is running
|
||||
* which prevent simultaneous write access to cpu_topology array
|
||||
*/
|
||||
void init_cpu_topology(void)
|
||||
void __init init_cpu_topology(void)
|
||||
{
|
||||
unsigned int cpu;
|
||||
|
||||
|
|
|
@ -16,13 +16,30 @@ lib-y := backtrace.o changebit.o csumipv6.o csumpartial.o \
|
|||
call_with_stack.o
|
||||
|
||||
mmu-y := clear_user.o copy_page.o getuser.o putuser.o
|
||||
|
||||
# the code in uaccess.S is not preemption safe and
|
||||
# probably faster on ARMv3 only
|
||||
ifeq ($(CONFIG_PREEMPT),y)
|
||||
mmu-y += copy_from_user.o copy_to_user.o
|
||||
else
|
||||
ifneq ($(CONFIG_CPU_32v3),y)
|
||||
mmu-y += copy_from_user.o copy_to_user.o
|
||||
else
|
||||
mmu-y += uaccess.o
|
||||
endif
|
||||
endif
|
||||
|
||||
# using lib_ here won't override already available weak symbols
|
||||
obj-$(CONFIG_UACCESS_WITH_MEMCPY) += uaccess_with_memcpy.o
|
||||
|
||||
lib-$(CONFIG_MMU) += $(mmu-y)
|
||||
|
||||
ifeq ($(CONFIG_CPU_32v3),y)
|
||||
lib-y += io-readsw-armv3.o io-writesw-armv3.o
|
||||
else
|
||||
lib-y += io-readsw-armv4.o io-writesw-armv4.o
|
||||
endif
|
||||
|
||||
lib-$(CONFIG_ARCH_RPC) += ecard.o io-acorn.o floppydma.o
|
||||
lib-$(CONFIG_ARCH_SHARK) += io-shark.o
|
||||
|
||||
|
|
|
@ -0,0 +1,106 @@
|
|||
/*
|
||||
* linux/arch/arm/lib/io-readsw-armv3.S
|
||||
*
|
||||
* Copyright (C) 1995-2000 Russell King
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
#include <linux/linkage.h>
|
||||
#include <asm/assembler.h>
|
||||
|
||||
.Linsw_bad_alignment:
|
||||
adr r0, .Linsw_bad_align_msg
|
||||
mov r2, lr
|
||||
b panic
|
||||
.Linsw_bad_align_msg:
|
||||
.asciz "insw: bad buffer alignment (0x%p, lr=0x%08lX)\n"
|
||||
.align
|
||||
|
||||
.Linsw_align: tst r1, #1
|
||||
bne .Linsw_bad_alignment
|
||||
|
||||
ldr r3, [r0]
|
||||
strb r3, [r1], #1
|
||||
mov r3, r3, lsr #8
|
||||
strb r3, [r1], #1
|
||||
|
||||
subs r2, r2, #1
|
||||
moveq pc, lr
|
||||
|
||||
ENTRY(__raw_readsw)
|
||||
teq r2, #0 @ do we have to check for the zero len?
|
||||
moveq pc, lr
|
||||
tst r1, #3
|
||||
bne .Linsw_align
|
||||
|
||||
.Linsw_aligned: mov ip, #0xff
|
||||
orr ip, ip, ip, lsl #8
|
||||
stmfd sp!, {r4, r5, r6, lr}
|
||||
|
||||
subs r2, r2, #8
|
||||
bmi .Lno_insw_8
|
||||
|
||||
.Linsw_8_lp: ldr r3, [r0]
|
||||
and r3, r3, ip
|
||||
ldr r4, [r0]
|
||||
orr r3, r3, r4, lsl #16
|
||||
|
||||
ldr r4, [r0]
|
||||
and r4, r4, ip
|
||||
ldr r5, [r0]
|
||||
orr r4, r4, r5, lsl #16
|
||||
|
||||
ldr r5, [r0]
|
||||
and r5, r5, ip
|
||||
ldr r6, [r0]
|
||||
orr r5, r5, r6, lsl #16
|
||||
|
||||
ldr r6, [r0]
|
||||
and r6, r6, ip
|
||||
ldr lr, [r0]
|
||||
orr r6, r6, lr, lsl #16
|
||||
|
||||
stmia r1!, {r3 - r6}
|
||||
|
||||
subs r2, r2, #8
|
||||
bpl .Linsw_8_lp
|
||||
|
||||
tst r2, #7
|
||||
ldmeqfd sp!, {r4, r5, r6, pc}
|
||||
|
||||
.Lno_insw_8: tst r2, #4
|
||||
beq .Lno_insw_4
|
||||
|
||||
ldr r3, [r0]
|
||||
and r3, r3, ip
|
||||
ldr r4, [r0]
|
||||
orr r3, r3, r4, lsl #16
|
||||
|
||||
ldr r4, [r0]
|
||||
and r4, r4, ip
|
||||
ldr r5, [r0]
|
||||
orr r4, r4, r5, lsl #16
|
||||
|
||||
stmia r1!, {r3, r4}
|
||||
|
||||
.Lno_insw_4: tst r2, #2
|
||||
beq .Lno_insw_2
|
||||
|
||||
ldr r3, [r0]
|
||||
and r3, r3, ip
|
||||
ldr r4, [r0]
|
||||
orr r3, r3, r4, lsl #16
|
||||
|
||||
str r3, [r1], #4
|
||||
|
||||
.Lno_insw_2: tst r2, #1
|
||||
ldrne r3, [r0]
|
||||
strneb r3, [r1], #1
|
||||
movne r3, r3, lsr #8
|
||||
strneb r3, [r1]
|
||||
|
||||
ldmfd sp!, {r4, r5, r6, pc}
|
||||
|
||||
|
|
@ -0,0 +1,126 @@
|
|||
/*
|
||||
* linux/arch/arm/lib/io-writesw-armv3.S
|
||||
*
|
||||
* Copyright (C) 1995-2000 Russell King
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
#include <linux/linkage.h>
|
||||
#include <asm/assembler.h>
|
||||
|
||||
.Loutsw_bad_alignment:
|
||||
adr r0, .Loutsw_bad_align_msg
|
||||
mov r2, lr
|
||||
b panic
|
||||
.Loutsw_bad_align_msg:
|
||||
.asciz "outsw: bad buffer alignment (0x%p, lr=0x%08lX)\n"
|
||||
.align
|
||||
|
||||
.Loutsw_align: tst r1, #1
|
||||
bne .Loutsw_bad_alignment
|
||||
|
||||
add r1, r1, #2
|
||||
|
||||
ldr r3, [r1, #-4]
|
||||
mov r3, r3, lsr #16
|
||||
orr r3, r3, r3, lsl #16
|
||||
str r3, [r0]
|
||||
subs r2, r2, #1
|
||||
moveq pc, lr
|
||||
|
||||
ENTRY(__raw_writesw)
|
||||
teq r2, #0 @ do we have to check for the zero len?
|
||||
moveq pc, lr
|
||||
tst r1, #3
|
||||
bne .Loutsw_align
|
||||
|
||||
stmfd sp!, {r4, r5, r6, lr}
|
||||
|
||||
subs r2, r2, #8
|
||||
bmi .Lno_outsw_8
|
||||
|
||||
.Loutsw_8_lp: ldmia r1!, {r3, r4, r5, r6}
|
||||
|
||||
mov ip, r3, lsl #16
|
||||
orr ip, ip, ip, lsr #16
|
||||
str ip, [r0]
|
||||
|
||||
mov ip, r3, lsr #16
|
||||
orr ip, ip, ip, lsl #16
|
||||
str ip, [r0]
|
||||
|
||||
mov ip, r4, lsl #16
|
||||
orr ip, ip, ip, lsr #16
|
||||
str ip, [r0]
|
||||
|
||||
mov ip, r4, lsr #16
|
||||
orr ip, ip, ip, lsl #16
|
||||
str ip, [r0]
|
||||
|
||||
mov ip, r5, lsl #16
|
||||
orr ip, ip, ip, lsr #16
|
||||
str ip, [r0]
|
||||
|
||||
mov ip, r5, lsr #16
|
||||
orr ip, ip, ip, lsl #16
|
||||
str ip, [r0]
|
||||
|
||||
mov ip, r6, lsl #16
|
||||
orr ip, ip, ip, lsr #16
|
||||
str ip, [r0]
|
||||
|
||||
mov ip, r6, lsr #16
|
||||
orr ip, ip, ip, lsl #16
|
||||
str ip, [r0]
|
||||
|
||||
subs r2, r2, #8
|
||||
bpl .Loutsw_8_lp
|
||||
|
||||
tst r2, #7
|
||||
ldmeqfd sp!, {r4, r5, r6, pc}
|
||||
|
||||
.Lno_outsw_8: tst r2, #4
|
||||
beq .Lno_outsw_4
|
||||
|
||||
ldmia r1!, {r3, r4}
|
||||
|
||||
mov ip, r3, lsl #16
|
||||
orr ip, ip, ip, lsr #16
|
||||
str ip, [r0]
|
||||
|
||||
mov ip, r3, lsr #16
|
||||
orr ip, ip, ip, lsl #16
|
||||
str ip, [r0]
|
||||
|
||||
mov ip, r4, lsl #16
|
||||
orr ip, ip, ip, lsr #16
|
||||
str ip, [r0]
|
||||
|
||||
mov ip, r4, lsr #16
|
||||
orr ip, ip, ip, lsl #16
|
||||
str ip, [r0]
|
||||
|
||||
.Lno_outsw_4: tst r2, #2
|
||||
beq .Lno_outsw_2
|
||||
|
||||
ldr r3, [r1], #4
|
||||
|
||||
mov ip, r3, lsl #16
|
||||
orr ip, ip, ip, lsr #16
|
||||
str ip, [r0]
|
||||
|
||||
mov ip, r3, lsr #16
|
||||
orr ip, ip, ip, lsl #16
|
||||
str ip, [r0]
|
||||
|
||||
.Lno_outsw_2: tst r2, #1
|
||||
|
||||
ldrne r3, [r1]
|
||||
|
||||
movne ip, r3, lsl #16
|
||||
orrne ip, ip, ip, lsr #16
|
||||
strne ip, [r0]
|
||||
|
||||
ldmfd sp!, {r4, r5, r6, pc}
|
|
@ -0,0 +1,564 @@
|
|||
/*
|
||||
* linux/arch/arm/lib/uaccess.S
|
||||
*
|
||||
* Copyright (C) 1995, 1996,1997,1998 Russell King
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* Routines to block copy data to/from user memory
|
||||
* These are highly optimised both for the 4k page size
|
||||
* and for various alignments.
|
||||
*/
|
||||
#include <linux/linkage.h>
|
||||
#include <asm/assembler.h>
|
||||
#include <asm/errno.h>
|
||||
#include <asm/domain.h>
|
||||
|
||||
.text
|
||||
|
||||
#define PAGE_SHIFT 12
|
||||
|
||||
/* Prototype: int __copy_to_user(void *to, const char *from, size_t n)
|
||||
* Purpose : copy a block to user memory from kernel memory
|
||||
* Params : to - user memory
|
||||
* : from - kernel memory
|
||||
* : n - number of bytes to copy
|
||||
* Returns : Number of bytes NOT copied.
|
||||
*/
|
||||
|
||||
.Lc2u_dest_not_aligned:
|
||||
rsb ip, ip, #4
|
||||
cmp ip, #2
|
||||
ldrb r3, [r1], #1
|
||||
USER( TUSER( strb) r3, [r0], #1) @ May fault
|
||||
ldrgeb r3, [r1], #1
|
||||
USER( TUSER( strgeb) r3, [r0], #1) @ May fault
|
||||
ldrgtb r3, [r1], #1
|
||||
USER( TUSER( strgtb) r3, [r0], #1) @ May fault
|
||||
sub r2, r2, ip
|
||||
b .Lc2u_dest_aligned
|
||||
|
||||
ENTRY(__copy_to_user)
|
||||
stmfd sp!, {r2, r4 - r7, lr}
|
||||
cmp r2, #4
|
||||
blt .Lc2u_not_enough
|
||||
ands ip, r0, #3
|
||||
bne .Lc2u_dest_not_aligned
|
||||
.Lc2u_dest_aligned:
|
||||
|
||||
ands ip, r1, #3
|
||||
bne .Lc2u_src_not_aligned
|
||||
/*
|
||||
* Seeing as there has to be at least 8 bytes to copy, we can
|
||||
* copy one word, and force a user-mode page fault...
|
||||
*/
|
||||
|
||||
.Lc2u_0fupi: subs r2, r2, #4
|
||||
addmi ip, r2, #4
|
||||
bmi .Lc2u_0nowords
|
||||
ldr r3, [r1], #4
|
||||
USER( TUSER( str) r3, [r0], #4) @ May fault
|
||||
mov ip, r0, lsl #32 - PAGE_SHIFT @ On each page, use a ld/st??t instruction
|
||||
rsb ip, ip, #0
|
||||
movs ip, ip, lsr #32 - PAGE_SHIFT
|
||||
beq .Lc2u_0fupi
|
||||
/*
|
||||
* ip = max no. of bytes to copy before needing another "strt" insn
|
||||
*/
|
||||
cmp r2, ip
|
||||
movlt ip, r2
|
||||
sub r2, r2, ip
|
||||
subs ip, ip, #32
|
||||
blt .Lc2u_0rem8lp
|
||||
|
||||
.Lc2u_0cpy8lp: ldmia r1!, {r3 - r6}
|
||||
stmia r0!, {r3 - r6} @ Shouldnt fault
|
||||
ldmia r1!, {r3 - r6}
|
||||
subs ip, ip, #32
|
||||
stmia r0!, {r3 - r6} @ Shouldnt fault
|
||||
bpl .Lc2u_0cpy8lp
|
||||
|
||||
.Lc2u_0rem8lp: cmn ip, #16
|
||||
ldmgeia r1!, {r3 - r6}
|
||||
stmgeia r0!, {r3 - r6} @ Shouldnt fault
|
||||
tst ip, #8
|
||||
ldmneia r1!, {r3 - r4}
|
||||
stmneia r0!, {r3 - r4} @ Shouldnt fault
|
||||
tst ip, #4
|
||||
ldrne r3, [r1], #4
|
||||
TUSER( strne) r3, [r0], #4 @ Shouldnt fault
|
||||
ands ip, ip, #3
|
||||
beq .Lc2u_0fupi
|
||||
.Lc2u_0nowords: teq ip, #0
|
||||
beq .Lc2u_finished
|
||||
.Lc2u_nowords: cmp ip, #2
|
||||
ldrb r3, [r1], #1
|
||||
USER( TUSER( strb) r3, [r0], #1) @ May fault
|
||||
ldrgeb r3, [r1], #1
|
||||
USER( TUSER( strgeb) r3, [r0], #1) @ May fault
|
||||
ldrgtb r3, [r1], #1
|
||||
USER( TUSER( strgtb) r3, [r0], #1) @ May fault
|
||||
b .Lc2u_finished
|
||||
|
||||
.Lc2u_not_enough:
|
||||
movs ip, r2
|
||||
bne .Lc2u_nowords
|
||||
.Lc2u_finished: mov r0, #0
|
||||
ldmfd sp!, {r2, r4 - r7, pc}
|
||||
|
||||
.Lc2u_src_not_aligned:
|
||||
bic r1, r1, #3
|
||||
ldr r7, [r1], #4
|
||||
cmp ip, #2
|
||||
bgt .Lc2u_3fupi
|
||||
beq .Lc2u_2fupi
|
||||
.Lc2u_1fupi: subs r2, r2, #4
|
||||
addmi ip, r2, #4
|
||||
bmi .Lc2u_1nowords
|
||||
mov r3, r7, pull #8
|
||||
ldr r7, [r1], #4
|
||||
orr r3, r3, r7, push #24
|
||||
USER( TUSER( str) r3, [r0], #4) @ May fault
|
||||
mov ip, r0, lsl #32 - PAGE_SHIFT
|
||||
rsb ip, ip, #0
|
||||
movs ip, ip, lsr #32 - PAGE_SHIFT
|
||||
beq .Lc2u_1fupi
|
||||
cmp r2, ip
|
||||
movlt ip, r2
|
||||
sub r2, r2, ip
|
||||
subs ip, ip, #16
|
||||
blt .Lc2u_1rem8lp
|
||||
|
||||
.Lc2u_1cpy8lp: mov r3, r7, pull #8
|
||||
ldmia r1!, {r4 - r7}
|
||||
subs ip, ip, #16
|
||||
orr r3, r3, r4, push #24
|
||||
mov r4, r4, pull #8
|
||||
orr r4, r4, r5, push #24
|
||||
mov r5, r5, pull #8
|
||||
orr r5, r5, r6, push #24
|
||||
mov r6, r6, pull #8
|
||||
orr r6, r6, r7, push #24
|
||||
stmia r0!, {r3 - r6} @ Shouldnt fault
|
||||
bpl .Lc2u_1cpy8lp
|
||||
|
||||
.Lc2u_1rem8lp: tst ip, #8
|
||||
movne r3, r7, pull #8
|
||||
ldmneia r1!, {r4, r7}
|
||||
orrne r3, r3, r4, push #24
|
||||
movne r4, r4, pull #8
|
||||
orrne r4, r4, r7, push #24
|
||||
stmneia r0!, {r3 - r4} @ Shouldnt fault
|
||||
tst ip, #4
|
||||
movne r3, r7, pull #8
|
||||
ldrne r7, [r1], #4
|
||||
orrne r3, r3, r7, push #24
|
||||
TUSER( strne) r3, [r0], #4 @ Shouldnt fault
|
||||
ands ip, ip, #3
|
||||
beq .Lc2u_1fupi
|
||||
.Lc2u_1nowords: mov r3, r7, get_byte_1
|
||||
teq ip, #0
|
||||
beq .Lc2u_finished
|
||||
cmp ip, #2
|
||||
USER( TUSER( strb) r3, [r0], #1) @ May fault
|
||||
movge r3, r7, get_byte_2
|
||||
USER( TUSER( strgeb) r3, [r0], #1) @ May fault
|
||||
movgt r3, r7, get_byte_3
|
||||
USER( TUSER( strgtb) r3, [r0], #1) @ May fault
|
||||
b .Lc2u_finished
|
||||
|
||||
.Lc2u_2fupi: subs r2, r2, #4
|
||||
addmi ip, r2, #4
|
||||
bmi .Lc2u_2nowords
|
||||
mov r3, r7, pull #16
|
||||
ldr r7, [r1], #4
|
||||
orr r3, r3, r7, push #16
|
||||
USER( TUSER( str) r3, [r0], #4) @ May fault
|
||||
mov ip, r0, lsl #32 - PAGE_SHIFT
|
||||
rsb ip, ip, #0
|
||||
movs ip, ip, lsr #32 - PAGE_SHIFT
|
||||
beq .Lc2u_2fupi
|
||||
cmp r2, ip
|
||||
movlt ip, r2
|
||||
sub r2, r2, ip
|
||||
subs ip, ip, #16
|
||||
blt .Lc2u_2rem8lp
|
||||
|
||||
.Lc2u_2cpy8lp: mov r3, r7, pull #16
|
||||
ldmia r1!, {r4 - r7}
|
||||
subs ip, ip, #16
|
||||
orr r3, r3, r4, push #16
|
||||
mov r4, r4, pull #16
|
||||
orr r4, r4, r5, push #16
|
||||
mov r5, r5, pull #16
|
||||
orr r5, r5, r6, push #16
|
||||
mov r6, r6, pull #16
|
||||
orr r6, r6, r7, push #16
|
||||
stmia r0!, {r3 - r6} @ Shouldnt fault
|
||||
bpl .Lc2u_2cpy8lp
|
||||
|
||||
.Lc2u_2rem8lp: tst ip, #8
|
||||
movne r3, r7, pull #16
|
||||
ldmneia r1!, {r4, r7}
|
||||
orrne r3, r3, r4, push #16
|
||||
movne r4, r4, pull #16
|
||||
orrne r4, r4, r7, push #16
|
||||
stmneia r0!, {r3 - r4} @ Shouldnt fault
|
||||
tst ip, #4
|
||||
movne r3, r7, pull #16
|
||||
ldrne r7, [r1], #4
|
||||
orrne r3, r3, r7, push #16
|
||||
TUSER( strne) r3, [r0], #4 @ Shouldnt fault
|
||||
ands ip, ip, #3
|
||||
beq .Lc2u_2fupi
|
||||
.Lc2u_2nowords: mov r3, r7, get_byte_2
|
||||
teq ip, #0
|
||||
beq .Lc2u_finished
|
||||
cmp ip, #2
|
||||
USER( TUSER( strb) r3, [r0], #1) @ May fault
|
||||
movge r3, r7, get_byte_3
|
||||
USER( TUSER( strgeb) r3, [r0], #1) @ May fault
|
||||
ldrgtb r3, [r1], #0
|
||||
USER( TUSER( strgtb) r3, [r0], #1) @ May fault
|
||||
b .Lc2u_finished
|
||||
|
||||
.Lc2u_3fupi: subs r2, r2, #4
|
||||
addmi ip, r2, #4
|
||||
bmi .Lc2u_3nowords
|
||||
mov r3, r7, pull #24
|
||||
ldr r7, [r1], #4
|
||||
orr r3, r3, r7, push #8
|
||||
USER( TUSER( str) r3, [r0], #4) @ May fault
|
||||
mov ip, r0, lsl #32 - PAGE_SHIFT
|
||||
rsb ip, ip, #0
|
||||
movs ip, ip, lsr #32 - PAGE_SHIFT
|
||||
beq .Lc2u_3fupi
|
||||
cmp r2, ip
|
||||
movlt ip, r2
|
||||
sub r2, r2, ip
|
||||
subs ip, ip, #16
|
||||
blt .Lc2u_3rem8lp
|
||||
|
||||
.Lc2u_3cpy8lp: mov r3, r7, pull #24
|
||||
ldmia r1!, {r4 - r7}
|
||||
subs ip, ip, #16
|
||||
orr r3, r3, r4, push #8
|
||||
mov r4, r4, pull #24
|
||||
orr r4, r4, r5, push #8
|
||||
mov r5, r5, pull #24
|
||||
orr r5, r5, r6, push #8
|
||||
mov r6, r6, pull #24
|
||||
orr r6, r6, r7, push #8
|
||||
stmia r0!, {r3 - r6} @ Shouldnt fault
|
||||
bpl .Lc2u_3cpy8lp
|
||||
|
||||
.Lc2u_3rem8lp: tst ip, #8
|
||||
movne r3, r7, pull #24
|
||||
ldmneia r1!, {r4, r7}
|
||||
orrne r3, r3, r4, push #8
|
||||
movne r4, r4, pull #24
|
||||
orrne r4, r4, r7, push #8
|
||||
stmneia r0!, {r3 - r4} @ Shouldnt fault
|
||||
tst ip, #4
|
||||
movne r3, r7, pull #24
|
||||
ldrne r7, [r1], #4
|
||||
orrne r3, r3, r7, push #8
|
||||
TUSER( strne) r3, [r0], #4 @ Shouldnt fault
|
||||
ands ip, ip, #3
|
||||
beq .Lc2u_3fupi
|
||||
.Lc2u_3nowords: mov r3, r7, get_byte_3
|
||||
teq ip, #0
|
||||
beq .Lc2u_finished
|
||||
cmp ip, #2
|
||||
USER( TUSER( strb) r3, [r0], #1) @ May fault
|
||||
ldrgeb r3, [r1], #1
|
||||
USER( TUSER( strgeb) r3, [r0], #1) @ May fault
|
||||
ldrgtb r3, [r1], #0
|
||||
USER( TUSER( strgtb) r3, [r0], #1) @ May fault
|
||||
b .Lc2u_finished
|
||||
ENDPROC(__copy_to_user)
|
||||
|
||||
.pushsection .fixup,"ax"
|
||||
.align 0
|
||||
9001: ldmfd sp!, {r0, r4 - r7, pc}
|
||||
.popsection
|
||||
|
||||
/* Prototype: unsigned long __copy_from_user(void *to,const void *from,unsigned long n);
|
||||
* Purpose : copy a block from user memory to kernel memory
|
||||
* Params : to - kernel memory
|
||||
* : from - user memory
|
||||
* : n - number of bytes to copy
|
||||
* Returns : Number of bytes NOT copied.
|
||||
*/
|
||||
.Lcfu_dest_not_aligned:
|
||||
rsb ip, ip, #4
|
||||
cmp ip, #2
|
||||
USER( TUSER( ldrb) r3, [r1], #1) @ May fault
|
||||
strb r3, [r0], #1
|
||||
USER( TUSER( ldrgeb) r3, [r1], #1) @ May fault
|
||||
strgeb r3, [r0], #1
|
||||
USER( TUSER( ldrgtb) r3, [r1], #1) @ May fault
|
||||
strgtb r3, [r0], #1
|
||||
sub r2, r2, ip
|
||||
b .Lcfu_dest_aligned
|
||||
|
||||
ENTRY(__copy_from_user)
|
||||
stmfd sp!, {r0, r2, r4 - r7, lr}
|
||||
cmp r2, #4
|
||||
blt .Lcfu_not_enough
|
||||
ands ip, r0, #3
|
||||
bne .Lcfu_dest_not_aligned
|
||||
.Lcfu_dest_aligned:
|
||||
ands ip, r1, #3
|
||||
bne .Lcfu_src_not_aligned
|
||||
|
||||
/*
|
||||
* Seeing as there has to be at least 8 bytes to copy, we can
|
||||
* copy one word, and force a user-mode page fault...
|
||||
*/
|
||||
|
||||
.Lcfu_0fupi: subs r2, r2, #4
|
||||
addmi ip, r2, #4
|
||||
bmi .Lcfu_0nowords
|
||||
USER( TUSER( ldr) r3, [r1], #4)
|
||||
str r3, [r0], #4
|
||||
mov ip, r1, lsl #32 - PAGE_SHIFT @ On each page, use a ld/st??t instruction
|
||||
rsb ip, ip, #0
|
||||
movs ip, ip, lsr #32 - PAGE_SHIFT
|
||||
beq .Lcfu_0fupi
|
||||
/*
|
||||
* ip = max no. of bytes to copy before needing another "strt" insn
|
||||
*/
|
||||
cmp r2, ip
|
||||
movlt ip, r2
|
||||
sub r2, r2, ip
|
||||
subs ip, ip, #32
|
||||
blt .Lcfu_0rem8lp
|
||||
|
||||
.Lcfu_0cpy8lp: ldmia r1!, {r3 - r6} @ Shouldnt fault
|
||||
stmia r0!, {r3 - r6}
|
||||
ldmia r1!, {r3 - r6} @ Shouldnt fault
|
||||
subs ip, ip, #32
|
||||
stmia r0!, {r3 - r6}
|
||||
bpl .Lcfu_0cpy8lp
|
||||
|
||||
.Lcfu_0rem8lp: cmn ip, #16
|
||||
ldmgeia r1!, {r3 - r6} @ Shouldnt fault
|
||||
stmgeia r0!, {r3 - r6}
|
||||
tst ip, #8
|
||||
ldmneia r1!, {r3 - r4} @ Shouldnt fault
|
||||
stmneia r0!, {r3 - r4}
|
||||
tst ip, #4
|
||||
TUSER( ldrne) r3, [r1], #4 @ Shouldnt fault
|
||||
strne r3, [r0], #4
|
||||
ands ip, ip, #3
|
||||
beq .Lcfu_0fupi
|
||||
.Lcfu_0nowords: teq ip, #0
|
||||
beq .Lcfu_finished
|
||||
.Lcfu_nowords: cmp ip, #2
|
||||
USER( TUSER( ldrb) r3, [r1], #1) @ May fault
|
||||
strb r3, [r0], #1
|
||||
USER( TUSER( ldrgeb) r3, [r1], #1) @ May fault
|
||||
strgeb r3, [r0], #1
|
||||
USER( TUSER( ldrgtb) r3, [r1], #1) @ May fault
|
||||
strgtb r3, [r0], #1
|
||||
b .Lcfu_finished
|
||||
|
||||
.Lcfu_not_enough:
|
||||
movs ip, r2
|
||||
bne .Lcfu_nowords
|
||||
.Lcfu_finished: mov r0, #0
|
||||
add sp, sp, #8
|
||||
ldmfd sp!, {r4 - r7, pc}
|
||||
|
||||
.Lcfu_src_not_aligned:
|
||||
bic r1, r1, #3
|
||||
USER( TUSER( ldr) r7, [r1], #4) @ May fault
|
||||
cmp ip, #2
|
||||
bgt .Lcfu_3fupi
|
||||
beq .Lcfu_2fupi
|
||||
.Lcfu_1fupi: subs r2, r2, #4
|
||||
addmi ip, r2, #4
|
||||
bmi .Lcfu_1nowords
|
||||
mov r3, r7, pull #8
|
||||
USER( TUSER( ldr) r7, [r1], #4) @ May fault
|
||||
orr r3, r3, r7, push #24
|
||||
str r3, [r0], #4
|
||||
mov ip, r1, lsl #32 - PAGE_SHIFT
|
||||
rsb ip, ip, #0
|
||||
movs ip, ip, lsr #32 - PAGE_SHIFT
|
||||
beq .Lcfu_1fupi
|
||||
cmp r2, ip
|
||||
movlt ip, r2
|
||||
sub r2, r2, ip
|
||||
subs ip, ip, #16
|
||||
blt .Lcfu_1rem8lp
|
||||
|
||||
.Lcfu_1cpy8lp: mov r3, r7, pull #8
|
||||
ldmia r1!, {r4 - r7} @ Shouldnt fault
|
||||
subs ip, ip, #16
|
||||
orr r3, r3, r4, push #24
|
||||
mov r4, r4, pull #8
|
||||
orr r4, r4, r5, push #24
|
||||
mov r5, r5, pull #8
|
||||
orr r5, r5, r6, push #24
|
||||
mov r6, r6, pull #8
|
||||
orr r6, r6, r7, push #24
|
||||
stmia r0!, {r3 - r6}
|
||||
bpl .Lcfu_1cpy8lp
|
||||
|
||||
.Lcfu_1rem8lp: tst ip, #8
|
||||
movne r3, r7, pull #8
|
||||
ldmneia r1!, {r4, r7} @ Shouldnt fault
|
||||
orrne r3, r3, r4, push #24
|
||||
movne r4, r4, pull #8
|
||||
orrne r4, r4, r7, push #24
|
||||
stmneia r0!, {r3 - r4}
|
||||
tst ip, #4
|
||||
movne r3, r7, pull #8
|
||||
USER( TUSER( ldrne) r7, [r1], #4) @ May fault
|
||||
orrne r3, r3, r7, push #24
|
||||
strne r3, [r0], #4
|
||||
ands ip, ip, #3
|
||||
beq .Lcfu_1fupi
|
||||
.Lcfu_1nowords: mov r3, r7, get_byte_1
|
||||
teq ip, #0
|
||||
beq .Lcfu_finished
|
||||
cmp ip, #2
|
||||
strb r3, [r0], #1
|
||||
movge r3, r7, get_byte_2
|
||||
strgeb r3, [r0], #1
|
||||
movgt r3, r7, get_byte_3
|
||||
strgtb r3, [r0], #1
|
||||
b .Lcfu_finished
|
||||
|
||||
.Lcfu_2fupi: subs r2, r2, #4
|
||||
addmi ip, r2, #4
|
||||
bmi .Lcfu_2nowords
|
||||
mov r3, r7, pull #16
|
||||
USER( TUSER( ldr) r7, [r1], #4) @ May fault
|
||||
orr r3, r3, r7, push #16
|
||||
str r3, [r0], #4
|
||||
mov ip, r1, lsl #32 - PAGE_SHIFT
|
||||
rsb ip, ip, #0
|
||||
movs ip, ip, lsr #32 - PAGE_SHIFT
|
||||
beq .Lcfu_2fupi
|
||||
cmp r2, ip
|
||||
movlt ip, r2
|
||||
sub r2, r2, ip
|
||||
subs ip, ip, #16
|
||||
blt .Lcfu_2rem8lp
|
||||
|
||||
|
||||
.Lcfu_2cpy8lp: mov r3, r7, pull #16
|
||||
ldmia r1!, {r4 - r7} @ Shouldnt fault
|
||||
subs ip, ip, #16
|
||||
orr r3, r3, r4, push #16
|
||||
mov r4, r4, pull #16
|
||||
orr r4, r4, r5, push #16
|
||||
mov r5, r5, pull #16
|
||||
orr r5, r5, r6, push #16
|
||||
mov r6, r6, pull #16
|
||||
orr r6, r6, r7, push #16
|
||||
stmia r0!, {r3 - r6}
|
||||
bpl .Lcfu_2cpy8lp
|
||||
|
||||
.Lcfu_2rem8lp: tst ip, #8
|
||||
movne r3, r7, pull #16
|
||||
ldmneia r1!, {r4, r7} @ Shouldnt fault
|
||||
orrne r3, r3, r4, push #16
|
||||
movne r4, r4, pull #16
|
||||
orrne r4, r4, r7, push #16
|
||||
stmneia r0!, {r3 - r4}
|
||||
tst ip, #4
|
||||
movne r3, r7, pull #16
|
||||
USER( TUSER( ldrne) r7, [r1], #4) @ May fault
|
||||
orrne r3, r3, r7, push #16
|
||||
strne r3, [r0], #4
|
||||
ands ip, ip, #3
|
||||
beq .Lcfu_2fupi
|
||||
.Lcfu_2nowords: mov r3, r7, get_byte_2
|
||||
teq ip, #0
|
||||
beq .Lcfu_finished
|
||||
cmp ip, #2
|
||||
strb r3, [r0], #1
|
||||
movge r3, r7, get_byte_3
|
||||
strgeb r3, [r0], #1
|
||||
USER( TUSER( ldrgtb) r3, [r1], #0) @ May fault
|
||||
strgtb r3, [r0], #1
|
||||
b .Lcfu_finished
|
||||
|
||||
.Lcfu_3fupi: subs r2, r2, #4
|
||||
addmi ip, r2, #4
|
||||
bmi .Lcfu_3nowords
|
||||
mov r3, r7, pull #24
|
||||
USER( TUSER( ldr) r7, [r1], #4) @ May fault
|
||||
orr r3, r3, r7, push #8
|
||||
str r3, [r0], #4
|
||||
mov ip, r1, lsl #32 - PAGE_SHIFT
|
||||
rsb ip, ip, #0
|
||||
movs ip, ip, lsr #32 - PAGE_SHIFT
|
||||
beq .Lcfu_3fupi
|
||||
cmp r2, ip
|
||||
movlt ip, r2
|
||||
sub r2, r2, ip
|
||||
subs ip, ip, #16
|
||||
blt .Lcfu_3rem8lp
|
||||
|
||||
.Lcfu_3cpy8lp: mov r3, r7, pull #24
|
||||
ldmia r1!, {r4 - r7} @ Shouldnt fault
|
||||
orr r3, r3, r4, push #8
|
||||
mov r4, r4, pull #24
|
||||
orr r4, r4, r5, push #8
|
||||
mov r5, r5, pull #24
|
||||
orr r5, r5, r6, push #8
|
||||
mov r6, r6, pull #24
|
||||
orr r6, r6, r7, push #8
|
||||
stmia r0!, {r3 - r6}
|
||||
subs ip, ip, #16
|
||||
bpl .Lcfu_3cpy8lp
|
||||
|
||||
.Lcfu_3rem8lp: tst ip, #8
|
||||
movne r3, r7, pull #24
|
||||
ldmneia r1!, {r4, r7} @ Shouldnt fault
|
||||
orrne r3, r3, r4, push #8
|
||||
movne r4, r4, pull #24
|
||||
orrne r4, r4, r7, push #8
|
||||
stmneia r0!, {r3 - r4}
|
||||
tst ip, #4
|
||||
movne r3, r7, pull #24
|
||||
USER( TUSER( ldrne) r7, [r1], #4) @ May fault
|
||||
orrne r3, r3, r7, push #8
|
||||
strne r3, [r0], #4
|
||||
ands ip, ip, #3
|
||||
beq .Lcfu_3fupi
|
||||
.Lcfu_3nowords: mov r3, r7, get_byte_3
|
||||
teq ip, #0
|
||||
beq .Lcfu_finished
|
||||
cmp ip, #2
|
||||
strb r3, [r0], #1
|
||||
USER( TUSER( ldrgeb) r3, [r1], #1) @ May fault
|
||||
strgeb r3, [r0], #1
|
||||
USER( TUSER( ldrgtb) r3, [r1], #1) @ May fault
|
||||
strgtb r3, [r0], #1
|
||||
b .Lcfu_finished
|
||||
ENDPROC(__copy_from_user)
|
||||
|
||||
.pushsection .fixup,"ax"
|
||||
.align 0
|
||||
/*
|
||||
* We took an exception. r0 contains a pointer to
|
||||
* the byte not copied.
|
||||
*/
|
||||
9001: ldr r2, [sp], #4 @ void *to
|
||||
sub r2, r0, r2 @ bytes copied
|
||||
ldr r1, [sp], #4 @ unsigned long count
|
||||
subs r4, r1, r2 @ bytes left to copy
|
||||
movne r1, r4
|
||||
blne __memzero
|
||||
mov r0, r4
|
||||
ldmfd sp!, {r4 - r7, pc}
|
||||
.popsection
|
||||
|
|
@ -162,38 +162,6 @@ static void __init davinci_ntosd2_map_io(void)
|
|||
dm644x_init();
|
||||
}
|
||||
|
||||
/*
|
||||
I2C initialization
|
||||
*/
|
||||
static struct davinci_i2c_platform_data ntosd2_i2c_pdata = {
|
||||
.bus_freq = 20 /* kHz */,
|
||||
.bus_delay = 100 /* usec */,
|
||||
};
|
||||
|
||||
static struct i2c_board_info __initdata ntosd2_i2c_info[] = {
|
||||
};
|
||||
|
||||
static int ntosd2_init_i2c(void)
|
||||
{
|
||||
int status;
|
||||
|
||||
davinci_init_i2c(&ntosd2_i2c_pdata);
|
||||
status = gpio_request(NTOSD2_MSP430_IRQ, ntosd2_i2c_info[0].type);
|
||||
if (status == 0) {
|
||||
status = gpio_direction_input(NTOSD2_MSP430_IRQ);
|
||||
if (status == 0) {
|
||||
status = gpio_to_irq(NTOSD2_MSP430_IRQ);
|
||||
if (status > 0) {
|
||||
ntosd2_i2c_info[0].irq = status;
|
||||
i2c_register_board_info(1,
|
||||
ntosd2_i2c_info,
|
||||
ARRAY_SIZE(ntosd2_i2c_info));
|
||||
}
|
||||
}
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
static struct davinci_mmc_config davinci_ntosd2_mmc_config = {
|
||||
.wires = 4,
|
||||
.version = MMC_CTLR_VERSION_1
|
||||
|
@ -218,7 +186,6 @@ static __init void davinci_ntosd2_init(void)
|
|||
{
|
||||
struct clk *aemif_clk;
|
||||
struct davinci_soc_info *soc_info = &davinci_soc_info;
|
||||
int status;
|
||||
|
||||
aemif_clk = clk_get(NULL, "aemif");
|
||||
clk_enable(aemif_clk);
|
||||
|
@ -242,12 +209,6 @@ static __init void davinci_ntosd2_init(void)
|
|||
platform_add_devices(davinci_ntosd2_devices,
|
||||
ARRAY_SIZE(davinci_ntosd2_devices));
|
||||
|
||||
/* Initialize I2C interface specific for this board */
|
||||
status = ntosd2_init_i2c();
|
||||
if (status < 0)
|
||||
pr_warning("davinci_ntosd2_init: msp430 irq setup failed:"
|
||||
" %d\n", status);
|
||||
|
||||
davinci_serial_init(&uart_config);
|
||||
dm644x_init_asp(&dm644x_ntosd2_snd_data);
|
||||
|
||||
|
|
|
@ -102,7 +102,8 @@ void __init dove_ehci1_init(void)
|
|||
void __init dove_ge00_init(struct mv643xx_eth_platform_data *eth_data)
|
||||
{
|
||||
orion_ge00_init(eth_data, DOVE_GE00_PHYS_BASE,
|
||||
IRQ_DOVE_GE00_SUM, IRQ_DOVE_GE00_ERR);
|
||||
IRQ_DOVE_GE00_SUM, IRQ_DOVE_GE00_ERR,
|
||||
1600);
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
#include <plat/backlight.h>
|
||||
#include <plat/fb.h>
|
||||
#include <plat/mfc.h>
|
||||
#include <plat/hdmi.h>
|
||||
|
||||
#include <mach/ohci.h>
|
||||
#include <mach/map.h>
|
||||
|
@ -734,6 +735,11 @@ static void __init origen_bt_setup(void)
|
|||
s3c_gpio_setpull(EXYNOS4_GPX2(2), S3C_GPIO_PULL_NONE);
|
||||
}
|
||||
|
||||
/* I2C module and id for HDMIPHY */
|
||||
static struct i2c_board_info hdmiphy_info = {
|
||||
I2C_BOARD_INFO("hdmiphy-exynos4210", 0x38),
|
||||
};
|
||||
|
||||
static void s5p_tv_setup(void)
|
||||
{
|
||||
/* Direct HPD to HDMI chip */
|
||||
|
@ -781,6 +787,7 @@ static void __init origen_machine_init(void)
|
|||
|
||||
s5p_tv_setup();
|
||||
s5p_i2c_hdmiphy_set_platdata(NULL);
|
||||
s5p_hdmi_set_platdata(&hdmiphy_info, NULL, 0);
|
||||
|
||||
#ifdef CONFIG_DRM_EXYNOS
|
||||
s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata;
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include <plat/mfc.h>
|
||||
#include <plat/ehci.h>
|
||||
#include <plat/clock.h>
|
||||
#include <plat/hdmi.h>
|
||||
|
||||
#include <mach/map.h>
|
||||
#include <mach/ohci.h>
|
||||
|
@ -354,6 +355,11 @@ static struct platform_pwm_backlight_data smdkv310_bl_data = {
|
|||
.pwm_period_ns = 1000,
|
||||
};
|
||||
|
||||
/* I2C module and id for HDMIPHY */
|
||||
static struct i2c_board_info hdmiphy_info = {
|
||||
I2C_BOARD_INFO("hdmiphy-exynos4210", 0x38),
|
||||
};
|
||||
|
||||
static void s5p_tv_setup(void)
|
||||
{
|
||||
/* direct HPD to HDMI chip */
|
||||
|
@ -388,6 +394,7 @@ static void __init smdkv310_machine_init(void)
|
|||
|
||||
s5p_tv_setup();
|
||||
s5p_i2c_hdmiphy_set_platdata(NULL);
|
||||
s5p_hdmi_set_platdata(&hdmiphy_info, NULL, 0);
|
||||
|
||||
samsung_keypad_set_platdata(&smdkv310_keypad_data);
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ static __init int exynos_pm_dt_parse_domains(void)
|
|||
}
|
||||
#endif /* CONFIG_OF */
|
||||
|
||||
static __init void exynos_pm_add_dev_to_genpd(struct platform_device *pdev,
|
||||
static __init __maybe_unused void exynos_pm_add_dev_to_genpd(struct platform_device *pdev,
|
||||
struct exynos_pm_domain *pd)
|
||||
{
|
||||
if (pdev->dev.bus) {
|
||||
|
|
|
@ -9,7 +9,8 @@ obj-$(CONFIG_SOC_IMX27) += clk-imx27.o mm-imx27.o ehci-imx27.o
|
|||
obj-$(CONFIG_SOC_IMX31) += mm-imx3.o cpu-imx31.o clk-imx31.o iomux-imx31.o ehci-imx31.o pm-imx3.o
|
||||
obj-$(CONFIG_SOC_IMX35) += mm-imx3.o cpu-imx35.o clk-imx35.o ehci-imx35.o pm-imx3.o
|
||||
|
||||
obj-$(CONFIG_SOC_IMX5) += cpu-imx5.o mm-imx5.o clk-imx51-imx53.o ehci-imx5.o pm-imx5.o cpu_op-mx51.o
|
||||
imx5-pm-$(CONFIG_PM) += pm-imx5.o
|
||||
obj-$(CONFIG_SOC_IMX5) += cpu-imx5.o mm-imx5.o clk-imx51-imx53.o ehci-imx5.o $(imx5-pm-y) cpu_op-mx51.o
|
||||
|
||||
obj-$(CONFIG_COMMON_CLK) += clk-pllv1.o clk-pllv2.o clk-pllv3.o clk-gate2.o \
|
||||
clk-pfd.o clk-busy.o
|
||||
|
@ -70,14 +71,13 @@ obj-$(CONFIG_DEBUG_LL) += lluart.o
|
|||
obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o
|
||||
obj-$(CONFIG_HAVE_IMX_MMDC) += mmdc.o
|
||||
obj-$(CONFIG_HAVE_IMX_SRC) += src.o
|
||||
obj-$(CONFIG_CPU_V7) += head-v7.o
|
||||
AFLAGS_head-v7.o :=-Wa,-march=armv7-a
|
||||
obj-$(CONFIG_SMP) += platsmp.o
|
||||
AFLAGS_headsmp.o :=-Wa,-march=armv7-a
|
||||
obj-$(CONFIG_SMP) += headsmp.o platsmp.o
|
||||
obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
|
||||
obj-$(CONFIG_SOC_IMX6Q) += clk-imx6q.o mach-imx6q.o
|
||||
|
||||
ifeq ($(CONFIG_PM),y)
|
||||
obj-$(CONFIG_SOC_IMX6Q) += pm-imx6q.o
|
||||
obj-$(CONFIG_SOC_IMX6Q) += pm-imx6q.o headsmp.o
|
||||
endif
|
||||
|
||||
# i.MX5 based machines
|
||||
|
|
|
@ -223,7 +223,7 @@ int __init mx27_clocks_init(unsigned long fref)
|
|||
clk_register_clkdev(clk[per3_gate], "per", "imx-fb.0");
|
||||
clk_register_clkdev(clk[lcdc_ipg_gate], "ipg", "imx-fb.0");
|
||||
clk_register_clkdev(clk[lcdc_ahb_gate], "ahb", "imx-fb.0");
|
||||
clk_register_clkdev(clk[csi_ahb_gate], NULL, "mx2-camera.0");
|
||||
clk_register_clkdev(clk[csi_ahb_gate], "ahb", "mx2-camera.0");
|
||||
clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc");
|
||||
clk_register_clkdev(clk[usb_ipg_gate], "ipg", "fsl-usb2-udc");
|
||||
clk_register_clkdev(clk[usb_ahb_gate], "ahb", "fsl-usb2-udc");
|
||||
|
@ -250,8 +250,10 @@ int __init mx27_clocks_init(unsigned long fref)
|
|||
clk_register_clkdev(clk[i2c2_ipg_gate], NULL, "imx-i2c.1");
|
||||
clk_register_clkdev(clk[owire_ipg_gate], NULL, "mxc_w1.0");
|
||||
clk_register_clkdev(clk[kpp_ipg_gate], NULL, "imx-keypad");
|
||||
clk_register_clkdev(clk[emma_ahb_gate], "ahb", "imx-emma");
|
||||
clk_register_clkdev(clk[emma_ipg_gate], "ipg", "imx-emma");
|
||||
clk_register_clkdev(clk[emma_ahb_gate], "emma-ahb", "mx2-camera.0");
|
||||
clk_register_clkdev(clk[emma_ipg_gate], "emma-ipg", "mx2-camera.0");
|
||||
clk_register_clkdev(clk[emma_ahb_gate], "ahb", "m2m-emmaprp.0");
|
||||
clk_register_clkdev(clk[emma_ipg_gate], "ipg", "m2m-emmaprp.0");
|
||||
clk_register_clkdev(clk[iim_ipg_gate], "iim", NULL);
|
||||
clk_register_clkdev(clk[gpio_ipg_gate], "gpio", NULL);
|
||||
clk_register_clkdev(clk[brom_ahb_gate], "brom", NULL);
|
||||
|
|
|
@ -130,7 +130,7 @@ int __init mx31_clocks_init(unsigned long fref)
|
|||
clk_register_clkdev(clk[nfc], NULL, "mxc_nand.0");
|
||||
clk_register_clkdev(clk[ipu_gate], NULL, "ipu-core");
|
||||
clk_register_clkdev(clk[ipu_gate], NULL, "mx3_sdc_fb");
|
||||
clk_register_clkdev(clk[kpp_gate], "kpp", NULL);
|
||||
clk_register_clkdev(clk[kpp_gate], NULL, "imx-keypad");
|
||||
clk_register_clkdev(clk[usb_div_post], "per", "mxc-ehci.0");
|
||||
clk_register_clkdev(clk[usb_gate], "ahb", "mxc-ehci.0");
|
||||
clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.0");
|
||||
|
|
|
@ -303,6 +303,7 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil,
|
|||
clk_prepare_enable(clk[aips_tz2]); /* fec */
|
||||
clk_prepare_enable(clk[spba]);
|
||||
clk_prepare_enable(clk[emi_fast_gate]); /* fec */
|
||||
clk_prepare_enable(clk[emi_slow_gate]); /* eim */
|
||||
clk_prepare_enable(clk[tmax1]);
|
||||
clk_prepare_enable(clk[tmax2]); /* esdhc2, fec */
|
||||
clk_prepare_enable(clk[tmax3]); /* esdhc1, esdhc4 */
|
||||
|
|
|
@ -152,7 +152,7 @@ enum mx6q_clks {
|
|||
ssi2, ssi3, uart_ipg, uart_serial, usboh3, usdhc1, usdhc2, usdhc3,
|
||||
usdhc4, vdo_axi, vpu_axi, cko1, pll1_sys, pll2_bus, pll3_usb_otg,
|
||||
pll4_audio, pll5_video, pll6_mlb, pll7_usb_host, pll8_enet, ssi1_ipg,
|
||||
ssi2_ipg, ssi3_ipg, rom, usbphy1, usbphy2,
|
||||
ssi2_ipg, ssi3_ipg, rom, usbphy1, usbphy2, ldb_di0_div_3_5, ldb_di1_div_3_5,
|
||||
clk_max
|
||||
};
|
||||
|
||||
|
@ -288,8 +288,10 @@ int __init mx6q_clocks_init(void)
|
|||
clk[gpu3d_shader] = imx_clk_divider("gpu3d_shader", "gpu3d_shader_sel", base + 0x18, 29, 3);
|
||||
clk[ipu1_podf] = imx_clk_divider("ipu1_podf", "ipu1_sel", base + 0x3c, 11, 3);
|
||||
clk[ipu2_podf] = imx_clk_divider("ipu2_podf", "ipu2_sel", base + 0x3c, 16, 3);
|
||||
clk[ldb_di0_podf] = imx_clk_divider("ldb_di0_podf", "ldb_di0_sel", base + 0x20, 10, 1);
|
||||
clk[ldb_di1_podf] = imx_clk_divider("ldb_di1_podf", "ldb_di1_sel", base + 0x20, 11, 1);
|
||||
clk[ldb_di0_div_3_5] = imx_clk_fixed_factor("ldb_di0_div_3_5", "ldb_di0_sel", 2, 7);
|
||||
clk[ldb_di0_podf] = imx_clk_divider("ldb_di0_podf", "ldb_di0_div_3_5", base + 0x20, 10, 1);
|
||||
clk[ldb_di1_div_3_5] = imx_clk_fixed_factor("ldb_di1_div_3_5", "ldb_di1_sel", 2, 7);
|
||||
clk[ldb_di1_podf] = imx_clk_divider("ldb_di1_podf", "ldb_di1_div_3_5", base + 0x20, 11, 1);
|
||||
clk[ipu1_di0_pre] = imx_clk_divider("ipu1_di0_pre", "ipu1_di0_pre_sel", base + 0x34, 3, 3);
|
||||
clk[ipu1_di1_pre] = imx_clk_divider("ipu1_di1_pre", "ipu1_di1_pre_sel", base + 0x34, 12, 3);
|
||||
clk[ipu2_di0_pre] = imx_clk_divider("ipu2_di0_pre", "ipu2_di0_pre_sel", base + 0x38, 3, 3);
|
||||
|
|
|
@ -42,22 +42,6 @@ static inline void cpu_enter_lowpower(void)
|
|||
: "cc");
|
||||
}
|
||||
|
||||
static inline void cpu_leave_lowpower(void)
|
||||
{
|
||||
unsigned int v;
|
||||
|
||||
asm volatile(
|
||||
"mrc p15, 0, %0, c1, c0, 0\n"
|
||||
" orr %0, %0, %1\n"
|
||||
" mcr p15, 0, %0, c1, c0, 0\n"
|
||||
" mrc p15, 0, %0, c1, c0, 1\n"
|
||||
" orr %0, %0, %2\n"
|
||||
" mcr p15, 0, %0, c1, c0, 1\n"
|
||||
: "=&r" (v)
|
||||
: "Ir" (CR_C), "Ir" (0x40)
|
||||
: "cc");
|
||||
}
|
||||
|
||||
/*
|
||||
* platform-specific code to shutdown a CPU
|
||||
*
|
||||
|
@ -67,11 +51,10 @@ void platform_cpu_die(unsigned int cpu)
|
|||
{
|
||||
cpu_enter_lowpower();
|
||||
imx_enable_cpu(cpu, false);
|
||||
cpu_do_idle();
|
||||
cpu_leave_lowpower();
|
||||
|
||||
/* We should never return from idle */
|
||||
panic("cpu %d unexpectedly exit from shutdown\n", cpu);
|
||||
/* spin here until hardware takes it down */
|
||||
while (1)
|
||||
;
|
||||
}
|
||||
|
||||
int platform_cpu_disable(unsigned int cpu)
|
||||
|
|
|
@ -71,7 +71,7 @@ soft:
|
|||
/* For imx6q sabrelite board: set KSZ9021RN RGMII pad skew */
|
||||
static int ksz9021rn_phy_fixup(struct phy_device *phydev)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_PHYLIB)) {
|
||||
if (IS_BUILTIN(CONFIG_PHYLIB)) {
|
||||
/* min rx data delay */
|
||||
phy_write(phydev, 0x0b, 0x8105);
|
||||
phy_write(phydev, 0x0c, 0x0000);
|
||||
|
@ -112,7 +112,7 @@ put_clk:
|
|||
|
||||
static void __init imx6q_sabrelite_init(void)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_PHYLIB))
|
||||
if (IS_BUILTIN(CONFIG_PHYLIB))
|
||||
phy_register_fixup_for_uid(PHY_ID_KSZ9021, MICREL_PHY_ID_MASK,
|
||||
ksz9021rn_phy_fixup);
|
||||
imx6q_sabrelite_cko1_setup();
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/irq.h>
|
||||
|
|
|
@ -456,7 +456,7 @@ static void __init ap_init_timer(void)
|
|||
|
||||
clk = clk_get_sys("ap_timer", NULL);
|
||||
BUG_ON(IS_ERR(clk));
|
||||
clk_enable(clk);
|
||||
clk_prepare_enable(clk);
|
||||
rate = clk_get_rate(clk);
|
||||
|
||||
writel(0, TIMER0_VA_BASE + TIMER_CTRL);
|
||||
|
|
|
@ -7,7 +7,8 @@ dtb-$(CONFIG_MACH_DLINK_KIRKWOOD_DT) += kirkwood-dns320.dtb
|
|||
dtb-$(CONFIG_MACH_DLINK_KIRKWOOD_DT) += kirkwood-dns325.dtb
|
||||
dtb-$(CONFIG_MACH_ICONNECT_DT) += kirkwood-iconnect.dtb
|
||||
dtb-$(CONFIG_MACH_IB62X0_DT) += kirkwood-ib62x0.dtb
|
||||
dtb-$(CONFIG_MACH_TS219_DT) += kirkwood-qnap-ts219.dtb
|
||||
dtb-$(CONFIG_MACH_TS219_DT) += kirkwood-ts219-6281.dtb
|
||||
dtb-$(CONFIG_MACH_TS219_DT) += kirkwood-ts219-6282.dtb
|
||||
dtb-$(CONFIG_MACH_GOFLEXNET_DT) += kirkwood-goflexnet.dtb
|
||||
dbt-$(CONFIG_MACH_LSXL_DT) += kirkwood-lschlv2.dtb
|
||||
dbt-$(CONFIG_MACH_LSXL_DT) += kirkwood-lsxhl.dtb
|
||||
dtb-$(CONFIG_MACH_LSXL_DT) += kirkwood-lschlv2.dtb
|
||||
dtb-$(CONFIG_MACH_LSXL_DT) += kirkwood-lsxhl.dtb
|
||||
|
|
|
@ -301,7 +301,7 @@ void __init kirkwood_ge00_init(struct mv643xx_eth_platform_data *eth_data)
|
|||
{
|
||||
orion_ge00_init(eth_data,
|
||||
GE00_PHYS_BASE, IRQ_KIRKWOOD_GE00_SUM,
|
||||
IRQ_KIRKWOOD_GE00_ERR);
|
||||
IRQ_KIRKWOOD_GE00_ERR, 1600);
|
||||
/* The interface forgets the MAC address assigned by u-boot if
|
||||
the clock is turned off, so claim the clk now. */
|
||||
clk_prepare_enable(ge0);
|
||||
|
@ -315,7 +315,7 @@ void __init kirkwood_ge01_init(struct mv643xx_eth_platform_data *eth_data)
|
|||
{
|
||||
orion_ge01_init(eth_data,
|
||||
GE01_PHYS_BASE, IRQ_KIRKWOOD_GE01_SUM,
|
||||
IRQ_KIRKWOOD_GE01_ERR);
|
||||
IRQ_KIRKWOOD_GE01_ERR, 1600);
|
||||
clk_prepare_enable(ge1);
|
||||
}
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ static int __devinit sram_probe(struct platform_device *pdev)
|
|||
struct resource *res;
|
||||
int ret = 0;
|
||||
|
||||
if (!pdata && !pdata->pool_name)
|
||||
if (!pdata || !pdata->pool_name)
|
||||
return -ENODEV;
|
||||
|
||||
info = kzalloc(sizeof(*info), GFP_KERNEL);
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#define WIN0_OFF(n) (BRIDGE_VIRT_BASE + 0x0000 + ((n) << 4))
|
||||
#define WIN8_OFF(n) (BRIDGE_VIRT_BASE + 0x0900 + (((n) - 8) << 4))
|
||||
|
||||
static void __init __iomem *win_cfg_base(int win)
|
||||
static void __init __iomem *win_cfg_base(const struct orion_addr_map_cfg *cfg, int win)
|
||||
{
|
||||
/*
|
||||
* Find the control register base address for this window.
|
||||
|
|
|
@ -213,7 +213,8 @@ void __init mv78xx0_ge00_init(struct mv643xx_eth_platform_data *eth_data)
|
|||
{
|
||||
orion_ge00_init(eth_data,
|
||||
GE00_PHYS_BASE, IRQ_MV78XX0_GE00_SUM,
|
||||
IRQ_MV78XX0_GE_ERR);
|
||||
IRQ_MV78XX0_GE_ERR,
|
||||
MV643XX_TX_CSUM_DEFAULT_LIMIT);
|
||||
}
|
||||
|
||||
|
||||
|
@ -224,7 +225,8 @@ void __init mv78xx0_ge01_init(struct mv643xx_eth_platform_data *eth_data)
|
|||
{
|
||||
orion_ge01_init(eth_data,
|
||||
GE01_PHYS_BASE, IRQ_MV78XX0_GE01_SUM,
|
||||
NO_IRQ);
|
||||
NO_IRQ,
|
||||
MV643XX_TX_CSUM_DEFAULT_LIMIT);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2,9 +2,6 @@ if ARCH_MXS
|
|||
|
||||
source "arch/arm/mach-mxs/devices/Kconfig"
|
||||
|
||||
config MXS_OCOTP
|
||||
bool
|
||||
|
||||
config SOC_IMX23
|
||||
bool
|
||||
select ARM_AMBA
|
||||
|
@ -66,7 +63,6 @@ config MACH_MX28EVK
|
|||
select MXS_HAVE_PLATFORM_MXS_SAIF
|
||||
select MXS_HAVE_PLATFORM_MXS_I2C
|
||||
select MXS_HAVE_PLATFORM_RTC_STMP3XXX
|
||||
select MXS_OCOTP
|
||||
help
|
||||
Include support for MX28EVK platform. This includes specific
|
||||
configurations for the board and its peripherals.
|
||||
|
@ -94,7 +90,6 @@ config MODULE_M28
|
|||
select MXS_HAVE_PLATFORM_MXS_I2C
|
||||
select MXS_HAVE_PLATFORM_MXS_MMC
|
||||
select MXS_HAVE_PLATFORM_MXSFB
|
||||
select MXS_OCOTP
|
||||
|
||||
config MODULE_APX4
|
||||
bool
|
||||
|
@ -106,7 +101,6 @@ config MODULE_APX4
|
|||
select MXS_HAVE_PLATFORM_MXS_I2C
|
||||
select MXS_HAVE_PLATFORM_MXS_MMC
|
||||
select MXS_HAVE_PLATFORM_MXS_SAIF
|
||||
select MXS_OCOTP
|
||||
|
||||
config MACH_TX28
|
||||
bool "Ka-Ro TX28 module"
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# Common support
|
||||
obj-y := devices.o icoll.o iomux.o system.o timer.o mm.o
|
||||
obj-y := devices.o icoll.o iomux.o ocotp.o system.o timer.o mm.o
|
||||
|
||||
obj-$(CONFIG_MXS_OCOTP) += ocotp.o
|
||||
obj-$(CONFIG_PM) += pm.o
|
||||
|
||||
obj-$(CONFIG_MACH_MXS_DT) += mach-mxs.o
|
||||
|
|
|
@ -62,13 +62,14 @@ config ARCH_OMAP4
|
|||
select PM_OPP if PM
|
||||
select USB_ARCH_HAS_EHCI if USB_SUPPORT
|
||||
select ARM_CPU_SUSPEND if PM
|
||||
select ARCH_NEEDS_CPU_IDLE_COUPLED
|
||||
select ARCH_NEEDS_CPU_IDLE_COUPLED if SMP
|
||||
|
||||
config SOC_OMAP5
|
||||
bool "TI OMAP5"
|
||||
select CPU_V7
|
||||
select ARM_GIC
|
||||
select HAVE_SMP
|
||||
select ARM_CPU_SUSPEND if PM
|
||||
|
||||
comment "OMAP Core Type"
|
||||
depends on ARCH_OMAP2
|
||||
|
|
|
@ -554,6 +554,8 @@ static const struct usbhs_omap_board_data igep3_usbhs_bdata __initconst = {
|
|||
|
||||
#ifdef CONFIG_OMAP_MUX
|
||||
static struct omap_board_mux board_mux[] __initdata = {
|
||||
/* SMSC9221 LAN Controller ETH IRQ (GPIO_176) */
|
||||
OMAP3_MUX(MCSPI1_CS2, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
|
||||
{ .reg_offset = OMAP_MUX_TERMINATOR },
|
||||
};
|
||||
#endif
|
||||
|
|
|
@ -58,6 +58,7 @@
|
|||
#include "hsmmc.h"
|
||||
#include "common-board-devices.h"
|
||||
|
||||
#define OMAP3_EVM_TS_GPIO 175
|
||||
#define OMAP3_EVM_EHCI_VBUS 22
|
||||
#define OMAP3_EVM_EHCI_SELECT 61
|
||||
|
||||
|
|
|
@ -35,16 +35,6 @@ static struct omap2_mcspi_device_config ads7846_mcspi_config = {
|
|||
.turbo_mode = 0,
|
||||
};
|
||||
|
||||
/*
|
||||
* ADS7846 driver maybe request a gpio according to the value
|
||||
* of pdata->get_pendown_state, but we have done this. So set
|
||||
* get_pendown_state to avoid twice gpio requesting.
|
||||
*/
|
||||
static int omap3_get_pendown_state(void)
|
||||
{
|
||||
return !gpio_get_value(OMAP3_EVM_TS_GPIO);
|
||||
}
|
||||
|
||||
static struct ads7846_platform_data ads7846_config = {
|
||||
.x_max = 0x0fff,
|
||||
.y_max = 0x0fff,
|
||||
|
@ -55,7 +45,6 @@ static struct ads7846_platform_data ads7846_config = {
|
|||
.debounce_rep = 1,
|
||||
.gpio_pendown = -EINVAL,
|
||||
.keep_vref_on = 1,
|
||||
.get_pendown_state = &omap3_get_pendown_state,
|
||||
};
|
||||
|
||||
static struct spi_board_info ads7846_spi_board_info __initdata = {
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
#include "twl-common.h"
|
||||
|
||||
#define NAND_BLOCK_SIZE SZ_128K
|
||||
#define OMAP3_EVM_TS_GPIO 175
|
||||
|
||||
struct mtd_partition;
|
||||
struct ads7846_platform_data;
|
||||
|
|
|
@ -238,8 +238,9 @@ int __init omap4_idle_init(void)
|
|||
for_each_cpu(cpu_id, cpu_online_mask) {
|
||||
dev = &per_cpu(omap4_idle_dev, cpu_id);
|
||||
dev->cpu = cpu_id;
|
||||
#ifdef CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED
|
||||
dev->coupled_cpus = *cpu_online_mask;
|
||||
|
||||
#endif
|
||||
cpuidle_register_driver(&omap4_idle_driver);
|
||||
|
||||
if (cpuidle_register_device(dev)) {
|
||||
|
|
|
@ -127,7 +127,6 @@ struct omap_mux_partition {
|
|||
* @gpio: GPIO number
|
||||
* @muxnames: available signal modes for a ball
|
||||
* @balls: available balls on the package
|
||||
* @partition: mux partition
|
||||
*/
|
||||
struct omap_mux {
|
||||
u16 reg_offset;
|
||||
|
|
|
@ -94,7 +94,7 @@ int __init omap4_opp_init(void)
|
|||
{
|
||||
int r = -ENODEV;
|
||||
|
||||
if (!cpu_is_omap44xx())
|
||||
if (!cpu_is_omap443x())
|
||||
return r;
|
||||
|
||||
r = omap_init_opp_table(omap44xx_opp_def_list,
|
||||
|
|
|
@ -272,21 +272,16 @@ void omap_sram_idle(void)
|
|||
per_next_state = pwrdm_read_next_pwrst(per_pwrdm);
|
||||
core_next_state = pwrdm_read_next_pwrst(core_pwrdm);
|
||||
|
||||
if (mpu_next_state < PWRDM_POWER_ON) {
|
||||
pwrdm_pre_transition(mpu_pwrdm);
|
||||
pwrdm_pre_transition(neon_pwrdm);
|
||||
}
|
||||
pwrdm_pre_transition(NULL);
|
||||
|
||||
/* PER */
|
||||
if (per_next_state < PWRDM_POWER_ON) {
|
||||
pwrdm_pre_transition(per_pwrdm);
|
||||
per_going_off = (per_next_state == PWRDM_POWER_OFF) ? 1 : 0;
|
||||
omap2_gpio_prepare_for_idle(per_going_off);
|
||||
}
|
||||
|
||||
/* CORE */
|
||||
if (core_next_state < PWRDM_POWER_ON) {
|
||||
pwrdm_pre_transition(core_pwrdm);
|
||||
if (core_next_state == PWRDM_POWER_OFF) {
|
||||
omap3_core_save_context();
|
||||
omap3_cm_save_context();
|
||||
|
@ -339,20 +334,14 @@ void omap_sram_idle(void)
|
|||
omap2_prm_clear_mod_reg_bits(OMAP3430_AUTO_OFF_MASK,
|
||||
OMAP3430_GR_MOD,
|
||||
OMAP3_PRM_VOLTCTRL_OFFSET);
|
||||
pwrdm_post_transition(core_pwrdm);
|
||||
}
|
||||
omap3_intc_resume_idle();
|
||||
|
||||
/* PER */
|
||||
if (per_next_state < PWRDM_POWER_ON) {
|
||||
omap2_gpio_resume_after_idle();
|
||||
pwrdm_post_transition(per_pwrdm);
|
||||
}
|
||||
pwrdm_post_transition(NULL);
|
||||
|
||||
if (mpu_next_state < PWRDM_POWER_ON) {
|
||||
pwrdm_post_transition(mpu_pwrdm);
|
||||
pwrdm_post_transition(neon_pwrdm);
|
||||
}
|
||||
/* PER */
|
||||
if (per_next_state < PWRDM_POWER_ON)
|
||||
omap2_gpio_resume_after_idle();
|
||||
}
|
||||
|
||||
static void omap3_pm_idle(void)
|
||||
|
|
|
@ -56,9 +56,13 @@ ppa_por_params:
|
|||
* The restore function pointer is stored at CPUx_WAKEUP_NS_PA_ADDR_OFFSET.
|
||||
* It returns to the caller for CPU INACTIVE and ON power states or in case
|
||||
* CPU failed to transition to targeted OFF/DORMANT state.
|
||||
*
|
||||
* omap4_finish_suspend() calls v7_flush_dcache_all() which doesn't save
|
||||
* stack frame and it expects the caller to take care of it. Hence the entire
|
||||
* stack frame is saved to avoid possible stack corruption.
|
||||
*/
|
||||
ENTRY(omap4_finish_suspend)
|
||||
stmfd sp!, {lr}
|
||||
stmfd sp!, {r4-r12, lr}
|
||||
cmp r0, #0x0
|
||||
beq do_WFI @ No lowpower state, jump to WFI
|
||||
|
||||
|
@ -226,7 +230,7 @@ scu_gp_clear:
|
|||
skip_scu_gp_clear:
|
||||
isb
|
||||
dsb
|
||||
ldmfd sp!, {pc}
|
||||
ldmfd sp!, {r4-r12, pc}
|
||||
ENDPROC(omap4_finish_suspend)
|
||||
|
||||
/*
|
||||
|
|
|
@ -67,6 +67,7 @@ void __init omap_pmic_init(int bus, u32 clkrate,
|
|||
const char *pmic_type, int pmic_irq,
|
||||
struct twl4030_platform_data *pmic_data)
|
||||
{
|
||||
omap_mux_init_signal("sys_nirq", OMAP_PIN_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE);
|
||||
strncpy(pmic_i2c_board_info.type, pmic_type,
|
||||
sizeof(pmic_i2c_board_info.type));
|
||||
pmic_i2c_board_info.irq = pmic_irq;
|
||||
|
|
|
@ -109,7 +109,8 @@ void __init orion5x_eth_init(struct mv643xx_eth_platform_data *eth_data)
|
|||
{
|
||||
orion_ge00_init(eth_data,
|
||||
ORION5X_ETH_PHYS_BASE, IRQ_ORION5X_ETH_SUM,
|
||||
IRQ_ORION5X_ETH_ERR);
|
||||
IRQ_ORION5X_ETH_ERR,
|
||||
MV643XX_TX_CSUM_DEFAULT_LIMIT);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -953,12 +953,12 @@ static struct i2c_board_info raumfeld_connector_i2c_board_info __initdata = {
|
|||
|
||||
static struct eeti_ts_platform_data eeti_ts_pdata = {
|
||||
.irq_active_high = 1,
|
||||
.irq_gpio = GPIO_TOUCH_IRQ,
|
||||
};
|
||||
|
||||
static struct i2c_board_info raumfeld_controller_i2c_board_info __initdata = {
|
||||
.type = "eeti_ts",
|
||||
.addr = 0x0a,
|
||||
.irq = PXA_GPIO_TO_IRQ(GPIO_TOUCH_IRQ),
|
||||
.platform_data = &eeti_ts_pdata,
|
||||
};
|
||||
|
||||
|
|
|
@ -483,7 +483,7 @@ config MACH_NEO1973_GTA02
|
|||
select I2C
|
||||
select POWER_SUPPLY
|
||||
select MACH_NEO1973
|
||||
select S3C2410_PWM
|
||||
select S3C24XX_PWM
|
||||
select S3C_DEV_USB_HOST
|
||||
help
|
||||
Say Y here if you are using the Openmoko GTA02 / Freerunner GSM Phone
|
||||
|
@ -493,7 +493,7 @@ config MACH_RX1950
|
|||
select S3C24XX_DCLK
|
||||
select PM_H1940 if PM
|
||||
select I2C
|
||||
select S3C2410_PWM
|
||||
select S3C24XX_PWM
|
||||
select S3C_DEV_NAND
|
||||
select S3C2410_IOTIMING if S3C2440_CPUFREQ
|
||||
select S3C2440_XTAL_16934400
|
||||
|
|
|
@ -24,7 +24,8 @@
|
|||
*/
|
||||
|
||||
enum dma_ch {
|
||||
DMACH_XD0,
|
||||
DMACH_DT_PROP = -1, /* not yet supported, do not use */
|
||||
DMACH_XD0 = 0,
|
||||
DMACH_XD1,
|
||||
DMACH_SDI,
|
||||
DMACH_SPI0,
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
* as cpu led, the green one is used as timer led.
|
||||
*/
|
||||
#include <linux/init.h>
|
||||
#include <linux/io.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <asm/leds.h>
|
||||
|
|
|
@ -51,7 +51,7 @@ static struct regulator_init_data ldo0_data = {
|
|||
.consumer_supplies = tps658621_ldo0_supply,
|
||||
};
|
||||
|
||||
#define HARMONY_REGULATOR_INIT(_id, _name, _supply, _minmv, _maxmv) \
|
||||
#define HARMONY_REGULATOR_INIT(_id, _name, _supply, _minmv, _maxmv, _on)\
|
||||
static struct regulator_init_data _id##_data = { \
|
||||
.supply_regulator = _supply, \
|
||||
.constraints = { \
|
||||
|
@ -63,21 +63,22 @@ static struct regulator_init_data ldo0_data = {
|
|||
.valid_ops_mask = (REGULATOR_CHANGE_MODE | \
|
||||
REGULATOR_CHANGE_STATUS | \
|
||||
REGULATOR_CHANGE_VOLTAGE), \
|
||||
.always_on = _on, \
|
||||
}, \
|
||||
}
|
||||
|
||||
HARMONY_REGULATOR_INIT(sm0, "vdd_sm0", "vdd_sys", 725, 1500);
|
||||
HARMONY_REGULATOR_INIT(sm1, "vdd_sm1", "vdd_sys", 725, 1500);
|
||||
HARMONY_REGULATOR_INIT(sm2, "vdd_sm2", "vdd_sys", 3000, 4550);
|
||||
HARMONY_REGULATOR_INIT(ldo1, "vdd_ldo1", "vdd_sm2", 725, 1500);
|
||||
HARMONY_REGULATOR_INIT(ldo2, "vdd_ldo2", "vdd_sm2", 725, 1500);
|
||||
HARMONY_REGULATOR_INIT(ldo3, "vdd_ldo3", "vdd_sm2", 1250, 3300);
|
||||
HARMONY_REGULATOR_INIT(ldo4, "vdd_ldo4", "vdd_sm2", 1700, 2475);
|
||||
HARMONY_REGULATOR_INIT(ldo5, "vdd_ldo5", NULL, 1250, 3300);
|
||||
HARMONY_REGULATOR_INIT(ldo6, "vdd_ldo6", "vdd_sm2", 1250, 3300);
|
||||
HARMONY_REGULATOR_INIT(ldo7, "vdd_ldo7", "vdd_sm2", 1250, 3300);
|
||||
HARMONY_REGULATOR_INIT(ldo8, "vdd_ldo8", "vdd_sm2", 1250, 3300);
|
||||
HARMONY_REGULATOR_INIT(ldo9, "vdd_ldo9", "vdd_sm2", 1250, 3300);
|
||||
HARMONY_REGULATOR_INIT(sm0, "vdd_sm0", "vdd_sys", 725, 1500, 1);
|
||||
HARMONY_REGULATOR_INIT(sm1, "vdd_sm1", "vdd_sys", 725, 1500, 1);
|
||||
HARMONY_REGULATOR_INIT(sm2, "vdd_sm2", "vdd_sys", 3000, 4550, 1);
|
||||
HARMONY_REGULATOR_INIT(ldo1, "vdd_ldo1", "vdd_sm2", 725, 1500, 1);
|
||||
HARMONY_REGULATOR_INIT(ldo2, "vdd_ldo2", "vdd_sm2", 725, 1500, 0);
|
||||
HARMONY_REGULATOR_INIT(ldo3, "vdd_ldo3", "vdd_sm2", 1250, 3300, 1);
|
||||
HARMONY_REGULATOR_INIT(ldo4, "vdd_ldo4", "vdd_sm2", 1700, 2475, 1);
|
||||
HARMONY_REGULATOR_INIT(ldo5, "vdd_ldo5", NULL, 1250, 3300, 1);
|
||||
HARMONY_REGULATOR_INIT(ldo6, "vdd_ldo6", "vdd_sm2", 1250, 3300, 0);
|
||||
HARMONY_REGULATOR_INIT(ldo7, "vdd_ldo7", "vdd_sm2", 1250, 3300, 0);
|
||||
HARMONY_REGULATOR_INIT(ldo8, "vdd_ldo8", "vdd_sm2", 1250, 3300, 0);
|
||||
HARMONY_REGULATOR_INIT(ldo9, "vdd_ldo9", "vdd_sm2", 1250, 3300, 1);
|
||||
|
||||
#define TPS_REG(_id, _data) \
|
||||
{ \
|
||||
|
@ -119,9 +120,10 @@ static struct i2c_board_info __initdata harmony_regulators[] = {
|
|||
|
||||
int __init harmony_regulator_init(void)
|
||||
{
|
||||
if (machine_is_harmony()) {
|
||||
regulator_register_always_on(0, "vdd_sys",
|
||||
NULL, 0, 5000000);
|
||||
|
||||
if (machine_is_harmony()) {
|
||||
i2c_register_board_info(3, harmony_regulators, 1);
|
||||
} else { /* Harmony, booted using device tree */
|
||||
struct device_node *np;
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче