mirror of
https://github.com/torvalds/linux.git
synced 2024-12-02 17:11:33 +00:00
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into drm-next
There was some merge conflicts in -next and they weren't so pretty, so backmerge now to avoid them. Conflicts: drivers/gpu/drm/i915/i915_gem.c drivers/gpu/drm/i915/intel_modes.c
This commit is contained in:
commit
93bb70e0c0
@ -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
|
||||
|
@ -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
|
||||
|
23
MAINTAINERS
23
MAINTAINERS
@ -2217,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/
|
||||
@ -4537,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.*
|
||||
|
||||
@ -7076,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
|
||||
@ -7097,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
|
||||
@ -7170,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.*
|
||||
@ -7288,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
|
||||
@ -7670,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 = -rc2
|
||||
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
|
||||
|
55
arch/alpha/include/asm/word-at-a-time.h
Normal file
55
arch/alpha/include/asm/word-at-a-time.h
Normal file
@ -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 (fault & VM_FAULT_MAJOR)
|
||||
current->maj_flt++;
|
||||
else
|
||||
current->min_flt++;
|
||||
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -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";
|
||||
};
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
mmu-y += copy_from_user.o copy_to_user.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)
|
||||
lib-y += io-readsw-armv4.o io-writesw-armv4.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
|
||||
|
||||
|
106
arch/arm/lib/io-readsw-armv3.S
Normal file
106
arch/arm/lib/io-readsw-armv3.S
Normal file
@ -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}
|
||||
|
||||
|
126
arch/arm/lib/io-writesw-armv3.S
Normal file
126
arch/arm/lib/io-writesw-armv3.S
Normal file
@ -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}
|
564
arch/arm/lib/uaccess.S
Normal file
564
arch/arm/lib/uaccess.S
Normal file
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -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,
|
||||
|
@ -41,7 +41,6 @@ config MACH_HREFV60
|
||||
config MACH_SNOWBALL
|
||||
bool "U8500 Snowball platform"
|
||||
select MACH_MOP500
|
||||
select LEDS_GPIO
|
||||
help
|
||||
Include support for the snowball development platform.
|
||||
|
||||
|
@ -191,9 +191,9 @@ static struct platform_device *db8500_add_msp_i2s(struct device *parent,
|
||||
return pdev;
|
||||
}
|
||||
|
||||
/* Platform device for ASoC U8500 machine */
|
||||
static struct platform_device snd_soc_u8500 = {
|
||||
.name = "snd-soc-u8500",
|
||||
/* Platform device for ASoC MOP500 machine */
|
||||
static struct platform_device snd_soc_mop500 = {
|
||||
.name = "snd-soc-mop500",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.platform_data = NULL,
|
||||
@ -227,8 +227,8 @@ int mop500_msp_init(struct device *parent)
|
||||
{
|
||||
struct platform_device *msp1;
|
||||
|
||||
pr_info("%s: Register platform-device 'snd-soc-u8500'.\n", __func__);
|
||||
platform_device_register(&snd_soc_u8500);
|
||||
pr_info("%s: Register platform-device 'snd-soc-mop500'.\n", __func__);
|
||||
platform_device_register(&snd_soc_mop500);
|
||||
|
||||
pr_info("Initialize MSP I2S-devices.\n");
|
||||
db8500_add_msp_i2s(parent, 0, U8500_MSP0_BASE, IRQ_DB8500_MSP0,
|
||||
|
@ -797,6 +797,7 @@ static void __init u8500_init_machine(void)
|
||||
ARRAY_SIZE(mop500_platform_devs));
|
||||
|
||||
mop500_sdi_init(parent);
|
||||
mop500_msp_init(parent);
|
||||
i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
|
||||
i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
|
||||
i2c_register_board_info(2, mop500_i2c2_devices,
|
||||
@ -804,6 +805,8 @@ static void __init u8500_init_machine(void)
|
||||
|
||||
mop500_uib_init();
|
||||
|
||||
} else if (of_machine_is_compatible("calaosystems,snowball-a9500")) {
|
||||
mop500_msp_init(parent);
|
||||
} else if (of_machine_is_compatible("st-ericsson,hrefv60+")) {
|
||||
/*
|
||||
* The HREFv60 board removed a GPIO expander and routed
|
||||
@ -815,6 +818,7 @@ static void __init u8500_init_machine(void)
|
||||
ARRAY_SIZE(mop500_platform_devs));
|
||||
|
||||
hrefv60_sdi_init(parent);
|
||||
mop500_msp_init(parent);
|
||||
|
||||
i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
|
||||
i2c0_devs -= NUM_PRE_V60_I2C0_DEVICES;
|
||||
|
@ -231,8 +231,6 @@ void __sync_icache_dcache(pte_t pteval)
|
||||
struct page *page;
|
||||
struct address_space *mapping;
|
||||
|
||||
if (!pte_present_user(pteval))
|
||||
return;
|
||||
if (cache_is_vipt_nonaliasing() && !pte_exec(pteval))
|
||||
/* only flush non-aliasing VIPT caches for exec mappings */
|
||||
return;
|
||||
|
@ -38,10 +38,10 @@ ENTRY(v7wbi_flush_user_tlb_range)
|
||||
dsb
|
||||
mov r0, r0, lsr #PAGE_SHIFT @ align address
|
||||
mov r1, r1, lsr #PAGE_SHIFT
|
||||
#ifdef CONFIG_ARM_ERRATA_720789
|
||||
mov r3, #0
|
||||
#else
|
||||
asid r3, r3 @ mask ASID
|
||||
#ifdef CONFIG_ARM_ERRATA_720789
|
||||
ALT_SMP(W(mov) r3, #0 )
|
||||
ALT_UP(W(nop) )
|
||||
#endif
|
||||
orr r0, r3, r0, lsl #PAGE_SHIFT @ Create initial MVA
|
||||
mov r1, r1, lsl #PAGE_SHIFT
|
||||
|
@ -189,6 +189,7 @@ struct omap_dm_timer *omap_dm_timer_request(void)
|
||||
timer->reserved = 1;
|
||||
break;
|
||||
}
|
||||
spin_unlock_irqrestore(&dm_timer_lock, flags);
|
||||
|
||||
if (timer) {
|
||||
ret = omap_dm_timer_prepare(timer);
|
||||
@ -197,7 +198,6 @@ struct omap_dm_timer *omap_dm_timer_request(void)
|
||||
timer = NULL;
|
||||
}
|
||||
}
|
||||
spin_unlock_irqrestore(&dm_timer_lock, flags);
|
||||
|
||||
if (!timer)
|
||||
pr_debug("%s: timer request failed!\n", __func__);
|
||||
@ -220,6 +220,7 @@ struct omap_dm_timer *omap_dm_timer_request_specific(int id)
|
||||
break;
|
||||
}
|
||||
}
|
||||
spin_unlock_irqrestore(&dm_timer_lock, flags);
|
||||
|
||||
if (timer) {
|
||||
ret = omap_dm_timer_prepare(timer);
|
||||
@ -228,7 +229,6 @@ struct omap_dm_timer *omap_dm_timer_request_specific(int id)
|
||||
timer = NULL;
|
||||
}
|
||||
}
|
||||
spin_unlock_irqrestore(&dm_timer_lock, flags);
|
||||
|
||||
if (!timer)
|
||||
pr_debug("%s: timer%d request failed!\n", __func__, id);
|
||||
@ -258,7 +258,7 @@ EXPORT_SYMBOL_GPL(omap_dm_timer_enable);
|
||||
|
||||
void omap_dm_timer_disable(struct omap_dm_timer *timer)
|
||||
{
|
||||
pm_runtime_put(&timer->pdev->dev);
|
||||
pm_runtime_put_sync(&timer->pdev->dev);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(omap_dm_timer_disable);
|
||||
|
||||
|
@ -372,7 +372,8 @@ IS_OMAP_TYPE(3430, 0x3430)
|
||||
#define cpu_class_is_omap1() (cpu_is_omap7xx() || cpu_is_omap15xx() || \
|
||||
cpu_is_omap16xx())
|
||||
#define cpu_class_is_omap2() (cpu_is_omap24xx() || cpu_is_omap34xx() || \
|
||||
cpu_is_omap44xx() || soc_is_omap54xx())
|
||||
cpu_is_omap44xx() || soc_is_omap54xx() || \
|
||||
soc_is_am33xx())
|
||||
|
||||
/* Various silicon revisions for omap2 */
|
||||
#define OMAP242X_CLASS 0x24200024
|
||||
|
@ -108,4 +108,13 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SOC_AM33XX
|
||||
# ifdef OMAP_NAME
|
||||
# undef MULTI_OMAP2
|
||||
# define MULTI_OMAP2
|
||||
# else
|
||||
# define OMAP_NAME am33xx
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif /* __PLAT_OMAP_MULTI_H */
|
||||
|
@ -110,7 +110,7 @@ static inline void flush(void)
|
||||
_DEBUG_LL_ENTRY(mach, AM33XX_UART##p##_BASE, OMAP_PORT_SHIFT, \
|
||||
AM33XXUART##p)
|
||||
|
||||
static inline void __arch_decomp_setup(unsigned long arch_id)
|
||||
static inline void arch_decomp_setup(void)
|
||||
{
|
||||
int port = 0;
|
||||
|
||||
@ -198,8 +198,6 @@ static inline void __arch_decomp_setup(unsigned long arch_id)
|
||||
} while (0);
|
||||
}
|
||||
|
||||
#define arch_decomp_setup() __arch_decomp_setup(arch_id)
|
||||
|
||||
/*
|
||||
* nothing to do
|
||||
*/
|
||||
|
@ -291,10 +291,12 @@ static struct platform_device orion_ge00 = {
|
||||
void __init orion_ge00_init(struct mv643xx_eth_platform_data *eth_data,
|
||||
unsigned long mapbase,
|
||||
unsigned long irq,
|
||||
unsigned long irq_err)
|
||||
unsigned long irq_err,
|
||||
unsigned int tx_csum_limit)
|
||||
{
|
||||
fill_resources(&orion_ge00_shared, orion_ge00_shared_resources,
|
||||
mapbase + 0x2000, SZ_16K - 1, irq_err);
|
||||
orion_ge00_shared_data.tx_csum_limit = tx_csum_limit;
|
||||
ge_complete(&orion_ge00_shared_data,
|
||||
orion_ge00_resources, irq, &orion_ge00_shared,
|
||||
eth_data, &orion_ge00);
|
||||
@ -343,10 +345,12 @@ static struct platform_device orion_ge01 = {
|
||||
void __init orion_ge01_init(struct mv643xx_eth_platform_data *eth_data,
|
||||
unsigned long mapbase,
|
||||
unsigned long irq,
|
||||
unsigned long irq_err)
|
||||
unsigned long irq_err,
|
||||
unsigned int tx_csum_limit)
|
||||
{
|
||||
fill_resources(&orion_ge01_shared, orion_ge01_shared_resources,
|
||||
mapbase + 0x2000, SZ_16K - 1, irq_err);
|
||||
orion_ge01_shared_data.tx_csum_limit = tx_csum_limit;
|
||||
ge_complete(&orion_ge01_shared_data,
|
||||
orion_ge01_resources, irq, &orion_ge01_shared,
|
||||
eth_data, &orion_ge01);
|
||||
|
@ -39,12 +39,14 @@ void __init orion_rtc_init(unsigned long mapbase,
|
||||
void __init orion_ge00_init(struct mv643xx_eth_platform_data *eth_data,
|
||||
unsigned long mapbase,
|
||||
unsigned long irq,
|
||||
unsigned long irq_err);
|
||||
unsigned long irq_err,
|
||||
unsigned int tx_csum_limit);
|
||||
|
||||
void __init orion_ge01_init(struct mv643xx_eth_platform_data *eth_data,
|
||||
unsigned long mapbase,
|
||||
unsigned long irq,
|
||||
unsigned long irq_err);
|
||||
unsigned long irq_err,
|
||||
unsigned int tx_csum_limit);
|
||||
|
||||
void __init orion_ge10_init(struct mv643xx_eth_platform_data *eth_data,
|
||||
unsigned long mapbase,
|
||||
|
@ -430,7 +430,7 @@ s3c2410_dma_canload(struct s3c2410_dma_chan *chan)
|
||||
* when necessary.
|
||||
*/
|
||||
|
||||
int s3c2410_dma_enqueue(unsigned int channel, void *id,
|
||||
int s3c2410_dma_enqueue(enum dma_ch channel, void *id,
|
||||
dma_addr_t data, int size)
|
||||
{
|
||||
struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);
|
||||
|
@ -32,6 +32,8 @@
|
||||
#include <linux/platform_data/s3c-hsudc.h>
|
||||
#include <linux/platform_data/s3c-hsotg.h>
|
||||
|
||||
#include <media/s5p_hdmi.h>
|
||||
|
||||
#include <asm/irq.h>
|
||||
#include <asm/pmu.h>
|
||||
#include <asm/mach/arch.h>
|
||||
@ -748,7 +750,8 @@ void __init s5p_i2c_hdmiphy_set_platdata(struct s3c2410_platform_i2c *pd)
|
||||
if (!pd) {
|
||||
pd = &default_i2c_data;
|
||||
|
||||
if (soc_is_exynos4210())
|
||||
if (soc_is_exynos4210() ||
|
||||
soc_is_exynos4212() || soc_is_exynos4412())
|
||||
pd->bus_num = 8;
|
||||
else if (soc_is_s5pv210())
|
||||
pd->bus_num = 3;
|
||||
@ -759,6 +762,30 @@ void __init s5p_i2c_hdmiphy_set_platdata(struct s3c2410_platform_i2c *pd)
|
||||
npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
|
||||
&s5p_device_i2c_hdmiphy);
|
||||
}
|
||||
|
||||
struct s5p_hdmi_platform_data s5p_hdmi_def_platdata;
|
||||
|
||||
void __init s5p_hdmi_set_platdata(struct i2c_board_info *hdmiphy_info,
|
||||
struct i2c_board_info *mhl_info, int mhl_bus)
|
||||
{
|
||||
struct s5p_hdmi_platform_data *pd = &s5p_hdmi_def_platdata;
|
||||
|
||||
if (soc_is_exynos4210() ||
|
||||
soc_is_exynos4212() || soc_is_exynos4412())
|
||||
pd->hdmiphy_bus = 8;
|
||||
else if (soc_is_s5pv210())
|
||||
pd->hdmiphy_bus = 3;
|
||||
else
|
||||
pd->hdmiphy_bus = 0;
|
||||
|
||||
pd->hdmiphy_info = hdmiphy_info;
|
||||
pd->mhl_info = mhl_info;
|
||||
pd->mhl_bus = mhl_bus;
|
||||
|
||||
s3c_set_platdata(pd, sizeof(struct s5p_hdmi_platform_data),
|
||||
&s5p_device_hdmi);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_S5P_DEV_I2C_HDMIPHY */
|
||||
|
||||
/* I2S */
|
||||
|
16
arch/arm/plat-samsung/include/plat/hdmi.h
Normal file
16
arch/arm/plat-samsung/include/plat/hdmi.h
Normal file
@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2012 Samsung Electronics Co.Ltd
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*/
|
||||
|
||||
#ifndef __PLAT_SAMSUNG_HDMI_H
|
||||
#define __PLAT_SAMSUNG_HDMI_H __FILE__
|
||||
|
||||
extern void s5p_hdmi_set_platdata(struct i2c_board_info *hdmiphy_info,
|
||||
struct i2c_board_info *mhl_info, int mhl_bus);
|
||||
|
||||
#endif /* __PLAT_SAMSUNG_HDMI_H */
|
@ -74,7 +74,7 @@ unsigned char pm_uart_udivslot;
|
||||
|
||||
#ifdef CONFIG_SAMSUNG_PM_DEBUG
|
||||
|
||||
struct pm_uart_save uart_save[CONFIG_SERIAL_SAMSUNG_UARTS];
|
||||
static struct pm_uart_save uart_save[CONFIG_SERIAL_SAMSUNG_UARTS];
|
||||
|
||||
static void s3c_pm_save_uart(unsigned int uart, struct pm_uart_save *save)
|
||||
{
|
||||
|
@ -719,8 +719,10 @@ static int __init vfp_init(void)
|
||||
if ((fmrx(MVFR1) & 0x000fff00) == 0x00011100)
|
||||
elf_hwcap |= HWCAP_NEON;
|
||||
#endif
|
||||
#ifdef CONFIG_VFPv3
|
||||
if ((fmrx(MVFR1) & 0xf0000000) == 0x10000000)
|
||||
elf_hwcap |= HWCAP_VFPv4;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
@ -6,6 +6,7 @@
|
||||
config C6X
|
||||
def_bool y
|
||||
select CLKDEV_LOOKUP
|
||||
select GENERIC_ATOMIC64
|
||||
select GENERIC_IRQ_SHOW
|
||||
select HAVE_ARCH_TRACEHOOK
|
||||
select HAVE_DMA_API_DEBUG
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Port on Texas Instruments TMS320C6x architecture
|
||||
*
|
||||
* Copyright (C) 2005, 2006, 2009, 2010 Texas Instruments Incorporated
|
||||
* Copyright (C) 2005, 2006, 2009, 2010, 2012 Texas Instruments Incorporated
|
||||
* Author: Aurelien Jacquiot (aurelien.jacquiot@jaluna.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -16,9 +16,14 @@
|
||||
/*
|
||||
* Cache line size
|
||||
*/
|
||||
#define L1D_CACHE_BYTES 64
|
||||
#define L1P_CACHE_BYTES 32
|
||||
#define L2_CACHE_BYTES 128
|
||||
#define L1D_CACHE_SHIFT 6
|
||||
#define L1D_CACHE_BYTES (1 << L1D_CACHE_SHIFT)
|
||||
|
||||
#define L1P_CACHE_SHIFT 5
|
||||
#define L1P_CACHE_BYTES (1 << L1P_CACHE_SHIFT)
|
||||
|
||||
#define L2_CACHE_SHIFT 7
|
||||
#define L2_CACHE_BYTES (1 << L2_CACHE_SHIFT)
|
||||
|
||||
/*
|
||||
* L2 used as cache
|
||||
@ -29,7 +34,8 @@
|
||||
* For practical reasons the L1_CACHE_BYTES defines should not be smaller than
|
||||
* the L2 line size
|
||||
*/
|
||||
#define L1_CACHE_BYTES L2_CACHE_BYTES
|
||||
#define L1_CACHE_SHIFT L2_CACHE_SHIFT
|
||||
#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
|
||||
|
||||
#define L2_CACHE_ALIGN_LOW(x) \
|
||||
(((x) & ~(L2_CACHE_BYTES - 1)))
|
||||
|
@ -234,5 +234,4 @@ CONFIG_CRYPTO_PCBC=m
|
||||
CONFIG_CRYPTO_MD5=y
|
||||
# CONFIG_CRYPTO_ANSI_CPRNG is not set
|
||||
CONFIG_CRC_T10DIF=y
|
||||
CONFIG_MISC_DEVICES=y
|
||||
CONFIG_INTEL_IOMMU=y
|
||||
|
@ -209,4 +209,3 @@ CONFIG_MAGIC_SYSRQ=y
|
||||
CONFIG_DEBUG_KERNEL=y
|
||||
CONFIG_DEBUG_MUTEXES=y
|
||||
CONFIG_CRYPTO_MD5=y
|
||||
CONFIG_MISC_DEVICES=y
|
||||
|
@ -5,6 +5,7 @@ config M68K
|
||||
select HAVE_AOUT if MMU
|
||||
select HAVE_GENERIC_HARDIRQS
|
||||
select GENERIC_IRQ_SHOW
|
||||
select GENERIC_ATOMIC64
|
||||
select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS
|
||||
select GENERIC_CPU_DEVICES
|
||||
select GENERIC_STRNCPY_FROM_USER if MMU
|
||||
|
@ -28,6 +28,7 @@ config COLDFIRE
|
||||
select CPU_HAS_NO_BITFIELDS
|
||||
select CPU_HAS_NO_MULDIV64
|
||||
select GENERIC_CSUM
|
||||
select HAVE_CLK
|
||||
|
||||
endchoice
|
||||
|
||||
@ -58,7 +59,6 @@ config MCPU32
|
||||
config M68020
|
||||
bool "68020 support"
|
||||
depends on MMU
|
||||
select GENERIC_ATOMIC64
|
||||
select CPU_HAS_ADDRESS_SPACES
|
||||
help
|
||||
If you anticipate running this kernel on a computer with a MC68020
|
||||
@ -69,7 +69,6 @@ config M68020
|
||||
config M68030
|
||||
bool "68030 support"
|
||||
depends on MMU && !MMU_SUN3
|
||||
select GENERIC_ATOMIC64
|
||||
select CPU_HAS_ADDRESS_SPACES
|
||||
help
|
||||
If you anticipate running this kernel on a computer with a MC68030
|
||||
@ -79,7 +78,6 @@ config M68030
|
||||
config M68040
|
||||
bool "68040 support"
|
||||
depends on MMU && !MMU_SUN3
|
||||
select GENERIC_ATOMIC64
|
||||
select CPU_HAS_ADDRESS_SPACES
|
||||
help
|
||||
If you anticipate running this kernel on a computer with a MC68LC040
|
||||
@ -90,7 +88,6 @@ config M68040
|
||||
config M68060
|
||||
bool "68060 support"
|
||||
depends on MMU && !MMU_SUN3
|
||||
select GENERIC_ATOMIC64
|
||||
select CPU_HAS_ADDRESS_SPACES
|
||||
help
|
||||
If you anticipate running this kernel on a computer with a MC68060
|
||||
|
@ -89,6 +89,7 @@ config ATH79
|
||||
select CEVT_R4K
|
||||
select CSRC_R4K
|
||||
select DMA_NONCOHERENT
|
||||
select HAVE_CLK
|
||||
select IRQ_CPU
|
||||
select MIPS_MACHINE
|
||||
select SYS_HAS_CPU_MIPS32_R2
|
||||
|
@ -228,6 +228,8 @@ static int mtx1_pci_idsel(unsigned int devsel, int assert)
|
||||
* adapter on the mtx-1 "singleboard" variant. It triggers a custom
|
||||
* logic chip connected to EXT_IO3 (GPIO1) to suppress IDSEL signals.
|
||||
*/
|
||||
udelay(1);
|
||||
|
||||
if (assert && devsel != 0)
|
||||
/* Suppress signal to Cardbus */
|
||||
alchemy_gpio_set_value(1, 0); /* set EXT_IO3 OFF */
|
||||
|
@ -145,6 +145,8 @@ static void __init ar7240_usb_setup(void)
|
||||
|
||||
ath79_ohci_resources[0].start = AR7240_OHCI_BASE;
|
||||
ath79_ohci_resources[0].end = AR7240_OHCI_BASE + AR7240_OHCI_SIZE - 1;
|
||||
ath79_ohci_resources[1].start = ATH79_CPU_IRQ_USB;
|
||||
ath79_ohci_resources[1].end = ATH79_CPU_IRQ_USB;
|
||||
platform_device_register(&ath79_ohci_device);
|
||||
}
|
||||
|
||||
|
@ -188,8 +188,10 @@ void __init ath79_gpio_init(void)
|
||||
|
||||
if (soc_is_ar71xx())
|
||||
ath79_gpio_count = AR71XX_GPIO_COUNT;
|
||||
else if (soc_is_ar724x())
|
||||
ath79_gpio_count = AR724X_GPIO_COUNT;
|
||||
else if (soc_is_ar7240())
|
||||
ath79_gpio_count = AR7240_GPIO_COUNT;
|
||||
else if (soc_is_ar7241() || soc_is_ar7242())
|
||||
ath79_gpio_count = AR7241_GPIO_COUNT;
|
||||
else if (soc_is_ar913x())
|
||||
ath79_gpio_count = AR913X_GPIO_COUNT;
|
||||
else if (soc_is_ar933x())
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user