forked from Minki/linux
Merge branch 'viro'
This commit is contained in:
commit
70c07e0262
@ -169,3 +169,12 @@ What: pci_module_init(driver)
|
|||||||
When: January 2007
|
When: January 2007
|
||||||
Why: Is replaced by pci_register_driver(pci_driver).
|
Why: Is replaced by pci_register_driver(pci_driver).
|
||||||
Who: Richard Knutsson <ricknu-0@student.ltu.se> and Greg Kroah-Hartman <gregkh@suse.de>
|
Who: Richard Knutsson <ricknu-0@student.ltu.se> and Greg Kroah-Hartman <gregkh@suse.de>
|
||||||
|
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
What: I2C interface of the it87 driver
|
||||||
|
When: January 2007
|
||||||
|
Why: The ISA interface is faster and should be always available. The I2C
|
||||||
|
probing is also known to cause trouble in at least one case (see
|
||||||
|
bug #5889.)
|
||||||
|
Who: Jean Delvare <khali@linux-fr.org>
|
||||||
|
105
Documentation/hwmon/f71805f
Normal file
105
Documentation/hwmon/f71805f
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
Kernel driver f71805f
|
||||||
|
=====================
|
||||||
|
|
||||||
|
Supported chips:
|
||||||
|
* Fintek F71805F/FG
|
||||||
|
Prefix: 'f71805f'
|
||||||
|
Addresses scanned: none, address read from Super I/O config space
|
||||||
|
Datasheet: Provided by Fintek on request
|
||||||
|
|
||||||
|
Author: Jean Delvare <khali@linux-fr.org>
|
||||||
|
|
||||||
|
Thanks to Denis Kieft from Barracuda Networks for the donation of a
|
||||||
|
test system (custom Jetway K8M8MS motherboard, with CPU and RAM) and
|
||||||
|
for providing initial documentation.
|
||||||
|
|
||||||
|
Thanks to Kris Chen from Fintek for answering technical questions and
|
||||||
|
providing additional documentation.
|
||||||
|
|
||||||
|
Thanks to Chris Lin from Jetway for providing wiring schematics and
|
||||||
|
anwsering technical questions.
|
||||||
|
|
||||||
|
|
||||||
|
Description
|
||||||
|
-----------
|
||||||
|
|
||||||
|
The Fintek F71805F/FG Super I/O chip includes complete hardware monitoring
|
||||||
|
capabilities. It can monitor up to 9 voltages (counting its own power
|
||||||
|
source), 3 fans and 3 temperature sensors.
|
||||||
|
|
||||||
|
This chip also has fan controlling features, using either DC or PWM, in
|
||||||
|
three different modes (one manual, two automatic). The driver doesn't
|
||||||
|
support these features yet.
|
||||||
|
|
||||||
|
The driver assumes that no more than one chip is present, which seems
|
||||||
|
reasonable.
|
||||||
|
|
||||||
|
|
||||||
|
Voltage Monitoring
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Voltages are sampled by an 8-bit ADC with a LSB of 8 mV. The supported
|
||||||
|
range is thus from 0 to 2.040 V. Voltage values outside of this range
|
||||||
|
need external resistors. An exception is in0, which is used to monitor
|
||||||
|
the chip's own power source (+3.3V), and is divided internally by a
|
||||||
|
factor 2.
|
||||||
|
|
||||||
|
The two LSB of the voltage limit registers are not used (always 0), so
|
||||||
|
you can only set the limits in steps of 32 mV (before scaling).
|
||||||
|
|
||||||
|
The wirings and resistor values suggested by Fintek are as follow:
|
||||||
|
|
||||||
|
pin expected
|
||||||
|
name use R1 R2 divider raw val.
|
||||||
|
|
||||||
|
in0 VCC VCC3.3V int. int. 2.00 1.65 V
|
||||||
|
in1 VIN1 VTT1.2V 10K - 1.00 1.20 V
|
||||||
|
in2 VIN2 VRAM 100K 100K 2.00 ~1.25 V (1)
|
||||||
|
in3 VIN3 VCHIPSET 47K 100K 1.47 2.24 V (2)
|
||||||
|
in4 VIN4 VCC5V 200K 47K 5.25 0.95 V
|
||||||
|
in5 VIN5 +12V 200K 20K 11.00 1.05 V
|
||||||
|
in6 VIN6 VCC1.5V 10K - 1.00 1.50 V
|
||||||
|
in7 VIN7 VCORE 10K - 1.00 ~1.40 V (1)
|
||||||
|
in8 VIN8 VSB5V 200K 47K 1.00 0.95 V
|
||||||
|
|
||||||
|
(1) Depends on your hardware setup.
|
||||||
|
(2) Obviously not correct, swapping R1 and R2 would make more sense.
|
||||||
|
|
||||||
|
These values can be used as hints at best, as motherboard manufacturers
|
||||||
|
are free to use a completely different setup. As a matter of fact, the
|
||||||
|
Jetway K8M8MS uses a significantly different setup. You will have to
|
||||||
|
find out documentation about your own motherboard, and edit sensors.conf
|
||||||
|
accordingly.
|
||||||
|
|
||||||
|
Each voltage measured has associated low and high limits, each of which
|
||||||
|
triggers an alarm when crossed.
|
||||||
|
|
||||||
|
|
||||||
|
Fan Monitoring
|
||||||
|
--------------
|
||||||
|
|
||||||
|
Fan rotation speeds are reported as 12-bit values from a gated clock
|
||||||
|
signal. Speeds down to 366 RPM can be measured. There is no theoretical
|
||||||
|
high limit, but values over 6000 RPM seem to cause problem. The effective
|
||||||
|
resolution is much lower than you would expect, the step between different
|
||||||
|
register values being 10 rather than 1.
|
||||||
|
|
||||||
|
The chip assumes 2 pulse-per-revolution fans.
|
||||||
|
|
||||||
|
An alarm is triggered if the rotation speed drops below a programmable
|
||||||
|
limit or is too low to be measured.
|
||||||
|
|
||||||
|
|
||||||
|
Temperature Monitoring
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
Temperatures are reported in degrees Celsius. Each temperature measured
|
||||||
|
has a high limit, those crossing triggers an alarm. There is an associated
|
||||||
|
hysteresis value, below which the temperature has to drop before the
|
||||||
|
alarm is cleared.
|
||||||
|
|
||||||
|
All temperature channels are external, there is no embedded temperature
|
||||||
|
sensor. Each channel can be used for connecting either a thermal diode
|
||||||
|
or a thermistor. The driver reports the currently selected mode, but
|
||||||
|
doesn't allow changing it. In theory, the BIOS should have configured
|
||||||
|
everything properly.
|
@ -9,7 +9,7 @@ Supported chips:
|
|||||||
http://www.ite.com.tw/
|
http://www.ite.com.tw/
|
||||||
* IT8712F
|
* IT8712F
|
||||||
Prefix: 'it8712'
|
Prefix: 'it8712'
|
||||||
Addresses scanned: I2C 0x28 - 0x2f
|
Addresses scanned: I2C 0x2d
|
||||||
from Super I/O config space (8 I/O ports)
|
from Super I/O config space (8 I/O ports)
|
||||||
Datasheet: Publicly available at the ITE website
|
Datasheet: Publicly available at the ITE website
|
||||||
http://www.ite.com.tw/
|
http://www.ite.com.tw/
|
||||||
|
@ -179,11 +179,12 @@ temp[1-*]_auto_point[1-*]_temp_hyst
|
|||||||
****************
|
****************
|
||||||
|
|
||||||
temp[1-3]_type Sensor type selection.
|
temp[1-3]_type Sensor type selection.
|
||||||
Integers 1, 2, 3 or thermistor Beta value (3435)
|
Integers 1 to 4 or thermistor Beta value (typically 3435)
|
||||||
Read/Write.
|
Read/Write.
|
||||||
1: PII/Celeron Diode
|
1: PII/Celeron Diode
|
||||||
2: 3904 transistor
|
2: 3904 transistor
|
||||||
3: thermal diode
|
3: thermal diode
|
||||||
|
4: thermistor (default/unknown Beta)
|
||||||
Not all types are supported by all chips
|
Not all types are supported by all chips
|
||||||
|
|
||||||
temp[1-4]_max Temperature max value.
|
temp[1-4]_max Temperature max value.
|
||||||
@ -261,6 +262,21 @@ alarms Alarm bitmask.
|
|||||||
of individual bits.
|
of individual bits.
|
||||||
Bits are defined in kernel/include/sensors.h.
|
Bits are defined in kernel/include/sensors.h.
|
||||||
|
|
||||||
|
alarms_in Alarm bitmask relative to in (voltage) channels
|
||||||
|
Read only
|
||||||
|
A '1' bit means an alarm, LSB corresponds to in0 and so on
|
||||||
|
Prefered to 'alarms' for newer chips
|
||||||
|
|
||||||
|
alarms_fan Alarm bitmask relative to fan channels
|
||||||
|
Read only
|
||||||
|
A '1' bit means an alarm, LSB corresponds to fan1 and so on
|
||||||
|
Prefered to 'alarms' for newer chips
|
||||||
|
|
||||||
|
alarms_temp Alarm bitmask relative to temp (temperature) channels
|
||||||
|
Read only
|
||||||
|
A '1' bit means an alarm, LSB corresponds to temp1 and so on
|
||||||
|
Prefered to 'alarms' for newer chips
|
||||||
|
|
||||||
beep_enable Beep/interrupt enable
|
beep_enable Beep/interrupt enable
|
||||||
0 to disable.
|
0 to disable.
|
||||||
1 to enable.
|
1 to enable.
|
||||||
|
@ -7,7 +7,7 @@ Supported adapters:
|
|||||||
Any combination of these host bridges:
|
Any combination of these host bridges:
|
||||||
645, 645DX (aka 646), 648, 650, 651, 655, 735, 745, 746
|
645, 645DX (aka 646), 648, 650, 651, 655, 735, 745, 746
|
||||||
and these south bridges:
|
and these south bridges:
|
||||||
961, 962, 963(L)
|
961, 962, 963(L)
|
||||||
|
|
||||||
Author: Mark M. Hoffman <mhoffman@lightlink.com>
|
Author: Mark M. Hoffman <mhoffman@lightlink.com>
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ The command "lspci" as root should produce something like these lines:
|
|||||||
|
|
||||||
or perhaps this...
|
or perhaps this...
|
||||||
|
|
||||||
00:00.0 Host bridge: Silicon Integrated Systems [SiS]: Unknown device 0645
|
00:00.0 Host bridge: Silicon Integrated Systems [SiS]: Unknown device 0645
|
||||||
00:02.0 ISA bridge: Silicon Integrated Systems [SiS]: Unknown device 0961
|
00:02.0 ISA bridge: Silicon Integrated Systems [SiS]: Unknown device 0961
|
||||||
00:02.1 SMBus: Silicon Integrated Systems [SiS]: Unknown device 0016
|
00:02.1 SMBus: Silicon Integrated Systems [SiS]: Unknown device 0016
|
||||||
|
|
@ -880,6 +880,10 @@ address which can extend beyond that limit.
|
|||||||
- device_type : Should be "soc"
|
- device_type : Should be "soc"
|
||||||
- ranges : Should be defined as specified in 1) to describe the
|
- ranges : Should be defined as specified in 1) to describe the
|
||||||
translation of SOC addresses for memory mapped SOC registers.
|
translation of SOC addresses for memory mapped SOC registers.
|
||||||
|
- bus-frequency: Contains the bus frequency for the SOC node.
|
||||||
|
Typically, the value of this field is filled in by the boot
|
||||||
|
loader.
|
||||||
|
|
||||||
|
|
||||||
Recommended properties:
|
Recommended properties:
|
||||||
|
|
||||||
@ -919,6 +923,7 @@ SOC.
|
|||||||
device_type = "soc";
|
device_type = "soc";
|
||||||
ranges = <00000000 e0000000 00100000>
|
ranges = <00000000 e0000000 00100000>
|
||||||
reg = <e0000000 00003000>;
|
reg = <e0000000 00003000>;
|
||||||
|
bus-frequency = <0>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1170,6 +1175,8 @@ platforms are moved over to use the flattened-device-tree model.
|
|||||||
|
|
||||||
mdio@24520 {
|
mdio@24520 {
|
||||||
reg = <24520 20>;
|
reg = <24520 20>;
|
||||||
|
device_type = "mdio";
|
||||||
|
compatible = "gianfar";
|
||||||
|
|
||||||
ethernet-phy@0 {
|
ethernet-phy@0 {
|
||||||
......
|
......
|
||||||
@ -1317,6 +1324,7 @@ not necessary as they are usually the same as the root node.
|
|||||||
device_type = "soc";
|
device_type = "soc";
|
||||||
ranges = <00000000 e0000000 00100000>
|
ranges = <00000000 e0000000 00100000>
|
||||||
reg = <e0000000 00003000>;
|
reg = <e0000000 00003000>;
|
||||||
|
bus-frequency = <0>;
|
||||||
|
|
||||||
mdio@24520 {
|
mdio@24520 {
|
||||||
reg = <24520 20>;
|
reg = <24520 20>;
|
||||||
|
@ -12,13 +12,20 @@ You can make this adapter from an old printer cable and solder things
|
|||||||
directly to the Butterfly. Or (if you have the parts and skills) you
|
directly to the Butterfly. Or (if you have the parts and skills) you
|
||||||
can come up with something fancier, providing ciruit protection to the
|
can come up with something fancier, providing ciruit protection to the
|
||||||
Butterfly and the printer port, or with a better power supply than two
|
Butterfly and the printer port, or with a better power supply than two
|
||||||
signal pins from the printer port.
|
signal pins from the printer port. Or for that matter, you can use
|
||||||
|
similar cables to talk to many AVR boards, even a breadboard.
|
||||||
|
|
||||||
|
This is more powerful than "ISP programming" cables since it lets kernel
|
||||||
|
SPI protocol drivers interact with the AVR, and could even let the AVR
|
||||||
|
issue interrupts to them. Later, your protocol driver should work
|
||||||
|
easily with a "real SPI controller", instead of this bitbanger.
|
||||||
|
|
||||||
|
|
||||||
The first cable connections will hook Linux up to one SPI bus, with the
|
The first cable connections will hook Linux up to one SPI bus, with the
|
||||||
AVR and a DataFlash chip; and to the AVR reset line. This is all you
|
AVR and a DataFlash chip; and to the AVR reset line. This is all you
|
||||||
need to reflash the firmware, and the pins are the standard Atmel "ISP"
|
need to reflash the firmware, and the pins are the standard Atmel "ISP"
|
||||||
connector pins (used also on non-Butterfly AVR boards).
|
connector pins (used also on non-Butterfly AVR boards). On the parport
|
||||||
|
side this is like "sp12" programming cables.
|
||||||
|
|
||||||
Signal Butterfly Parport (DB-25)
|
Signal Butterfly Parport (DB-25)
|
||||||
------ --------- ---------------
|
------ --------- ---------------
|
||||||
@ -40,10 +47,14 @@ by clearing PORTB.[0-3]); (b) configure the mtd_dataflash driver; and
|
|||||||
SELECT = J400.PB0/nSS = pin 17/C3,nSELECT
|
SELECT = J400.PB0/nSS = pin 17/C3,nSELECT
|
||||||
GND = J400.GND = pin 24/GND
|
GND = J400.GND = pin 24/GND
|
||||||
|
|
||||||
The "USI" controller, using J405, can be used for a second SPI bus. That
|
Or you could flash firmware making the AVR into an SPI slave (keeping the
|
||||||
would let you talk to the AVR over SPI, running firmware that makes it act
|
DataFlash in reset) and tweak the spi_butterfly driver to make it bind to
|
||||||
as an SPI slave, while letting either Linux or the AVR use the DataFlash.
|
the driver for your custom SPI-based protocol.
|
||||||
There are plenty of spare parport pins to wire this one up, such as:
|
|
||||||
|
The "USI" controller, using J405, can also be used for a second SPI bus.
|
||||||
|
That would let you talk to the AVR using custom SPI-with-USI firmware,
|
||||||
|
while letting either Linux or the AVR use the DataFlash. There are plenty
|
||||||
|
of spare parport pins to wire this one up, such as:
|
||||||
|
|
||||||
Signal Butterfly Parport (DB-25)
|
Signal Butterfly Parport (DB-25)
|
||||||
------ --------- ---------------
|
------ --------- ---------------
|
||||||
|
295
Documentation/unshare.txt
Normal file
295
Documentation/unshare.txt
Normal file
@ -0,0 +1,295 @@
|
|||||||
|
|
||||||
|
unshare system call:
|
||||||
|
--------------------
|
||||||
|
This document describes the new system call, unshare. The document
|
||||||
|
provides an overview of the feature, why it is needed, how it can
|
||||||
|
be used, its interface specification, design, implementation and
|
||||||
|
how it can be tested.
|
||||||
|
|
||||||
|
Change Log:
|
||||||
|
-----------
|
||||||
|
version 0.1 Initial document, Janak Desai (janak@us.ibm.com), Jan 11, 2006
|
||||||
|
|
||||||
|
Contents:
|
||||||
|
---------
|
||||||
|
1) Overview
|
||||||
|
2) Benefits
|
||||||
|
3) Cost
|
||||||
|
4) Requirements
|
||||||
|
5) Functional Specification
|
||||||
|
6) High Level Design
|
||||||
|
7) Low Level Design
|
||||||
|
8) Test Specification
|
||||||
|
9) Future Work
|
||||||
|
|
||||||
|
1) Overview
|
||||||
|
-----------
|
||||||
|
Most legacy operating system kernels support an abstraction of threads
|
||||||
|
as multiple execution contexts within a process. These kernels provide
|
||||||
|
special resources and mechanisms to maintain these "threads". The Linux
|
||||||
|
kernel, in a clever and simple manner, does not make distinction
|
||||||
|
between processes and "threads". The kernel allows processes to share
|
||||||
|
resources and thus they can achieve legacy "threads" behavior without
|
||||||
|
requiring additional data structures and mechanisms in the kernel. The
|
||||||
|
power of implementing threads in this manner comes not only from
|
||||||
|
its simplicity but also from allowing application programmers to work
|
||||||
|
outside the confinement of all-or-nothing shared resources of legacy
|
||||||
|
threads. On Linux, at the time of thread creation using the clone system
|
||||||
|
call, applications can selectively choose which resources to share
|
||||||
|
between threads.
|
||||||
|
|
||||||
|
unshare system call adds a primitive to the Linux thread model that
|
||||||
|
allows threads to selectively 'unshare' any resources that were being
|
||||||
|
shared at the time of their creation. unshare was conceptualized by
|
||||||
|
Al Viro in the August of 2000, on the Linux-Kernel mailing list, as part
|
||||||
|
of the discussion on POSIX threads on Linux. unshare augments the
|
||||||
|
usefulness of Linux threads for applications that would like to control
|
||||||
|
shared resources without creating a new process. unshare is a natural
|
||||||
|
addition to the set of available primitives on Linux that implement
|
||||||
|
the concept of process/thread as a virtual machine.
|
||||||
|
|
||||||
|
2) Benefits
|
||||||
|
-----------
|
||||||
|
unshare would be useful to large application frameworks such as PAM
|
||||||
|
where creating a new process to control sharing/unsharing of process
|
||||||
|
resources is not possible. Since namespaces are shared by default
|
||||||
|
when creating a new process using fork or clone, unshare can benefit
|
||||||
|
even non-threaded applications if they have a need to disassociate
|
||||||
|
from default shared namespace. The following lists two use-cases
|
||||||
|
where unshare can be used.
|
||||||
|
|
||||||
|
2.1 Per-security context namespaces
|
||||||
|
-----------------------------------
|
||||||
|
unshare can be used to implement polyinstantiated directories using
|
||||||
|
the kernel's per-process namespace mechanism. Polyinstantiated directories,
|
||||||
|
such as per-user and/or per-security context instance of /tmp, /var/tmp or
|
||||||
|
per-security context instance of a user's home directory, isolate user
|
||||||
|
processes when working with these directories. Using unshare, a PAM
|
||||||
|
module can easily setup a private namespace for a user at login.
|
||||||
|
Polyinstantiated directories are required for Common Criteria certification
|
||||||
|
with Labeled System Protection Profile, however, with the availability
|
||||||
|
of shared-tree feature in the Linux kernel, even regular Linux systems
|
||||||
|
can benefit from setting up private namespaces at login and
|
||||||
|
polyinstantiating /tmp, /var/tmp and other directories deemed
|
||||||
|
appropriate by system administrators.
|
||||||
|
|
||||||
|
2.2 unsharing of virtual memory and/or open files
|
||||||
|
-------------------------------------------------
|
||||||
|
Consider a client/server application where the server is processing
|
||||||
|
client requests by creating processes that share resources such as
|
||||||
|
virtual memory and open files. Without unshare, the server has to
|
||||||
|
decide what needs to be shared at the time of creating the process
|
||||||
|
which services the request. unshare allows the server an ability to
|
||||||
|
disassociate parts of the context during the servicing of the
|
||||||
|
request. For large and complex middleware application frameworks, this
|
||||||
|
ability to unshare after the process was created can be very
|
||||||
|
useful.
|
||||||
|
|
||||||
|
3) Cost
|
||||||
|
-------
|
||||||
|
In order to not duplicate code and to handle the fact that unshare
|
||||||
|
works on an active task (as opposed to clone/fork working on a newly
|
||||||
|
allocated inactive task) unshare had to make minor reorganizational
|
||||||
|
changes to copy_* functions utilized by clone/fork system call.
|
||||||
|
There is a cost associated with altering existing, well tested and
|
||||||
|
stable code to implement a new feature that may not get exercised
|
||||||
|
extensively in the beginning. However, with proper design and code
|
||||||
|
review of the changes and creation of an unshare test for the LTP
|
||||||
|
the benefits of this new feature can exceed its cost.
|
||||||
|
|
||||||
|
4) Requirements
|
||||||
|
---------------
|
||||||
|
unshare reverses sharing that was done using clone(2) system call,
|
||||||
|
so unshare should have a similar interface as clone(2). That is,
|
||||||
|
since flags in clone(int flags, void *stack) specifies what should
|
||||||
|
be shared, similar flags in unshare(int flags) should specify
|
||||||
|
what should be unshared. Unfortunately, this may appear to invert
|
||||||
|
the meaning of the flags from the way they are used in clone(2).
|
||||||
|
However, there was no easy solution that was less confusing and that
|
||||||
|
allowed incremental context unsharing in future without an ABI change.
|
||||||
|
|
||||||
|
unshare interface should accommodate possible future addition of
|
||||||
|
new context flags without requiring a rebuild of old applications.
|
||||||
|
If and when new context flags are added, unshare design should allow
|
||||||
|
incremental unsharing of those resources on an as needed basis.
|
||||||
|
|
||||||
|
5) Functional Specification
|
||||||
|
---------------------------
|
||||||
|
NAME
|
||||||
|
unshare - disassociate parts of the process execution context
|
||||||
|
|
||||||
|
SYNOPSIS
|
||||||
|
#include <sched.h>
|
||||||
|
|
||||||
|
int unshare(int flags);
|
||||||
|
|
||||||
|
DESCRIPTION
|
||||||
|
unshare allows a process to disassociate parts of its execution
|
||||||
|
context that are currently being shared with other processes. Part
|
||||||
|
of execution context, such as the namespace, is shared by default
|
||||||
|
when a new process is created using fork(2), while other parts,
|
||||||
|
such as the virtual memory, open file descriptors, etc, may be
|
||||||
|
shared by explicit request to share them when creating a process
|
||||||
|
using clone(2).
|
||||||
|
|
||||||
|
The main use of unshare is to allow a process to control its
|
||||||
|
shared execution context without creating a new process.
|
||||||
|
|
||||||
|
The flags argument specifies one or bitwise-or'ed of several of
|
||||||
|
the following constants.
|
||||||
|
|
||||||
|
CLONE_FS
|
||||||
|
If CLONE_FS is set, file system information of the caller
|
||||||
|
is disassociated from the shared file system information.
|
||||||
|
|
||||||
|
CLONE_FILES
|
||||||
|
If CLONE_FILES is set, the file descriptor table of the
|
||||||
|
caller is disassociated from the shared file descriptor
|
||||||
|
table.
|
||||||
|
|
||||||
|
CLONE_NEWNS
|
||||||
|
If CLONE_NEWNS is set, the namespace of the caller is
|
||||||
|
disassociated from the shared namespace.
|
||||||
|
|
||||||
|
CLONE_VM
|
||||||
|
If CLONE_VM is set, the virtual memory of the caller is
|
||||||
|
disassociated from the shared virtual memory.
|
||||||
|
|
||||||
|
RETURN VALUE
|
||||||
|
On success, zero returned. On failure, -1 is returned and errno is
|
||||||
|
|
||||||
|
ERRORS
|
||||||
|
EPERM CLONE_NEWNS was specified by a non-root process (process
|
||||||
|
without CAP_SYS_ADMIN).
|
||||||
|
|
||||||
|
ENOMEM Cannot allocate sufficient memory to copy parts of caller's
|
||||||
|
context that need to be unshared.
|
||||||
|
|
||||||
|
EINVAL Invalid flag was specified as an argument.
|
||||||
|
|
||||||
|
CONFORMING TO
|
||||||
|
The unshare() call is Linux-specific and should not be used
|
||||||
|
in programs intended to be portable.
|
||||||
|
|
||||||
|
SEE ALSO
|
||||||
|
clone(2), fork(2)
|
||||||
|
|
||||||
|
6) High Level Design
|
||||||
|
--------------------
|
||||||
|
Depending on the flags argument, the unshare system call allocates
|
||||||
|
appropriate process context structures, populates it with values from
|
||||||
|
the current shared version, associates newly duplicated structures
|
||||||
|
with the current task structure and releases corresponding shared
|
||||||
|
versions. Helper functions of clone (copy_*) could not be used
|
||||||
|
directly by unshare because of the following two reasons.
|
||||||
|
1) clone operates on a newly allocated not-yet-active task
|
||||||
|
structure, where as unshare operates on the current active
|
||||||
|
task. Therefore unshare has to take appropriate task_lock()
|
||||||
|
before associating newly duplicated context structures
|
||||||
|
2) unshare has to allocate and duplicate all context structures
|
||||||
|
that are being unshared, before associating them with the
|
||||||
|
current task and releasing older shared structures. Failure
|
||||||
|
do so will create race conditions and/or oops when trying
|
||||||
|
to backout due to an error. Consider the case of unsharing
|
||||||
|
both virtual memory and namespace. After successfully unsharing
|
||||||
|
vm, if the system call encounters an error while allocating
|
||||||
|
new namespace structure, the error return code will have to
|
||||||
|
reverse the unsharing of vm. As part of the reversal the
|
||||||
|
system call will have to go back to older, shared, vm
|
||||||
|
structure, which may not exist anymore.
|
||||||
|
|
||||||
|
Therefore code from copy_* functions that allocated and duplicated
|
||||||
|
current context structure was moved into new dup_* functions. Now,
|
||||||
|
copy_* functions call dup_* functions to allocate and duplicate
|
||||||
|
appropriate context structures and then associate them with the
|
||||||
|
task structure that is being constructed. unshare system call on
|
||||||
|
the other hand performs the following:
|
||||||
|
1) Check flags to force missing, but implied, flags
|
||||||
|
2) For each context structure, call the corresponding unshare
|
||||||
|
helper function to allocate and duplicate a new context
|
||||||
|
structure, if the appropriate bit is set in the flags argument.
|
||||||
|
3) If there is no error in allocation and duplication and there
|
||||||
|
are new context structures then lock the current task structure,
|
||||||
|
associate new context structures with the current task structure,
|
||||||
|
and release the lock on the current task structure.
|
||||||
|
4) Appropriately release older, shared, context structures.
|
||||||
|
|
||||||
|
7) Low Level Design
|
||||||
|
-------------------
|
||||||
|
Implementation of unshare can be grouped in the following 4 different
|
||||||
|
items:
|
||||||
|
a) Reorganization of existing copy_* functions
|
||||||
|
b) unshare system call service function
|
||||||
|
c) unshare helper functions for each different process context
|
||||||
|
d) Registration of system call number for different architectures
|
||||||
|
|
||||||
|
7.1) Reorganization of copy_* functions
|
||||||
|
Each copy function such as copy_mm, copy_namespace, copy_files,
|
||||||
|
etc, had roughly two components. The first component allocated
|
||||||
|
and duplicated the appropriate structure and the second component
|
||||||
|
linked it to the task structure passed in as an argument to the copy
|
||||||
|
function. The first component was split into its own function.
|
||||||
|
These dup_* functions allocated and duplicated the appropriate
|
||||||
|
context structure. The reorganized copy_* functions invoked
|
||||||
|
their corresponding dup_* functions and then linked the newly
|
||||||
|
duplicated structures to the task structure with which the
|
||||||
|
copy function was called.
|
||||||
|
|
||||||
|
7.2) unshare system call service function
|
||||||
|
* Check flags
|
||||||
|
Force implied flags. If CLONE_THREAD is set force CLONE_VM.
|
||||||
|
If CLONE_VM is set, force CLONE_SIGHAND. If CLONE_SIGHAND is
|
||||||
|
set and signals are also being shared, force CLONE_THREAD. If
|
||||||
|
CLONE_NEWNS is set, force CLONE_FS.
|
||||||
|
* For each context flag, invoke the corresponding unshare_*
|
||||||
|
helper routine with flags passed into the system call and a
|
||||||
|
reference to pointer pointing the new unshared structure
|
||||||
|
* If any new structures are created by unshare_* helper
|
||||||
|
functions, take the task_lock() on the current task,
|
||||||
|
modify appropriate context pointers, and release the
|
||||||
|
task lock.
|
||||||
|
* For all newly unshared structures, release the corresponding
|
||||||
|
older, shared, structures.
|
||||||
|
|
||||||
|
7.3) unshare_* helper functions
|
||||||
|
For unshare_* helpers corresponding to CLONE_SYSVSEM, CLONE_SIGHAND,
|
||||||
|
and CLONE_THREAD, return -EINVAL since they are not implemented yet.
|
||||||
|
For others, check the flag value to see if the unsharing is
|
||||||
|
required for that structure. If it is, invoke the corresponding
|
||||||
|
dup_* function to allocate and duplicate the structure and return
|
||||||
|
a pointer to it.
|
||||||
|
|
||||||
|
7.4) Appropriately modify architecture specific code to register the
|
||||||
|
the new system call.
|
||||||
|
|
||||||
|
8) Test Specification
|
||||||
|
---------------------
|
||||||
|
The test for unshare should test the following:
|
||||||
|
1) Valid flags: Test to check that clone flags for signal and
|
||||||
|
signal handlers, for which unsharing is not implemented
|
||||||
|
yet, return -EINVAL.
|
||||||
|
2) Missing/implied flags: Test to make sure that if unsharing
|
||||||
|
namespace without specifying unsharing of filesystem, correctly
|
||||||
|
unshares both namespace and filesystem information.
|
||||||
|
3) For each of the four (namespace, filesystem, files and vm)
|
||||||
|
supported unsharing, verify that the system call correctly
|
||||||
|
unshares the appropriate structure. Verify that unsharing
|
||||||
|
them individually as well as in combination with each
|
||||||
|
other works as expected.
|
||||||
|
4) Concurrent execution: Use shared memory segments and futex on
|
||||||
|
an address in the shm segment to synchronize execution of
|
||||||
|
about 10 threads. Have a couple of threads execute execve,
|
||||||
|
a couple _exit and the rest unshare with different combination
|
||||||
|
of flags. Verify that unsharing is performed as expected and
|
||||||
|
that there are no oops or hangs.
|
||||||
|
|
||||||
|
9) Future Work
|
||||||
|
--------------
|
||||||
|
The current implementation of unshare does not allow unsharing of
|
||||||
|
signals and signal handlers. Signals are complex to begin with and
|
||||||
|
to unshare signals and/or signal handlers of a currently running
|
||||||
|
process is even more complex. If in the future there is a specific
|
||||||
|
need to allow unsharing of signals and/or signal handlers, it can
|
||||||
|
be incrementally added to unshare without affecting legacy
|
||||||
|
applications using unshare.
|
||||||
|
|
@ -931,6 +931,12 @@ M: sct@redhat.com, akpm@osdl.org, adilger@clusterfs.com
|
|||||||
L: ext3-users@redhat.com
|
L: ext3-users@redhat.com
|
||||||
S: Maintained
|
S: Maintained
|
||||||
|
|
||||||
|
F71805F HARDWARE MONITORING DRIVER
|
||||||
|
P: Jean Delvare
|
||||||
|
M: khali@linux-fr.org
|
||||||
|
L: lm-sensors@lm-sensors.org
|
||||||
|
S: Maintained
|
||||||
|
|
||||||
FARSYNC SYNCHRONOUS DRIVER
|
FARSYNC SYNCHRONOUS DRIVER
|
||||||
P: Kevin Curtis
|
P: Kevin Curtis
|
||||||
M: kevin.curtis@farsite.co.uk
|
M: kevin.curtis@farsite.co.uk
|
||||||
|
@ -73,9 +73,6 @@ cpumask_t cpu_online_map;
|
|||||||
|
|
||||||
EXPORT_SYMBOL(cpu_online_map);
|
EXPORT_SYMBOL(cpu_online_map);
|
||||||
|
|
||||||
/* cpus reported in the hwrpb */
|
|
||||||
static unsigned long hwrpb_cpu_present_mask __initdata = 0;
|
|
||||||
|
|
||||||
int smp_num_probed; /* Internal processor count */
|
int smp_num_probed; /* Internal processor count */
|
||||||
int smp_num_cpus = 1; /* Number that came online. */
|
int smp_num_cpus = 1; /* Number that came online. */
|
||||||
|
|
||||||
@ -442,7 +439,7 @@ setup_smp(void)
|
|||||||
if ((cpu->flags & 0x1cc) == 0x1cc) {
|
if ((cpu->flags & 0x1cc) == 0x1cc) {
|
||||||
smp_num_probed++;
|
smp_num_probed++;
|
||||||
/* Assume here that "whami" == index */
|
/* Assume here that "whami" == index */
|
||||||
hwrpb_cpu_present_mask |= (1UL << i);
|
cpu_set(i, cpu_possible_map);
|
||||||
cpu->pal_revision = boot_cpu_palrev;
|
cpu->pal_revision = boot_cpu_palrev;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -453,12 +450,12 @@ setup_smp(void)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
smp_num_probed = 1;
|
smp_num_probed = 1;
|
||||||
hwrpb_cpu_present_mask = (1UL << boot_cpuid);
|
cpu_set(boot_cpuid, cpu_possible_map);
|
||||||
}
|
}
|
||||||
cpu_present_mask = cpumask_of_cpu(boot_cpuid);
|
cpu_present_mask = cpumask_of_cpu(boot_cpuid);
|
||||||
|
|
||||||
printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_mask = %lx\n",
|
printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_mask = %lx\n",
|
||||||
smp_num_probed, hwrpb_cpu_present_mask);
|
smp_num_probed, cpu_possible_map.bits[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -467,8 +464,6 @@ setup_smp(void)
|
|||||||
void __init
|
void __init
|
||||||
smp_prepare_cpus(unsigned int max_cpus)
|
smp_prepare_cpus(unsigned int max_cpus)
|
||||||
{
|
{
|
||||||
int cpu_count, i;
|
|
||||||
|
|
||||||
/* Take care of some initial bookkeeping. */
|
/* Take care of some initial bookkeeping. */
|
||||||
memset(ipi_data, 0, sizeof(ipi_data));
|
memset(ipi_data, 0, sizeof(ipi_data));
|
||||||
|
|
||||||
@ -486,19 +481,7 @@ smp_prepare_cpus(unsigned int max_cpus)
|
|||||||
|
|
||||||
printk(KERN_INFO "SMP starting up secondaries.\n");
|
printk(KERN_INFO "SMP starting up secondaries.\n");
|
||||||
|
|
||||||
cpu_count = 1;
|
smp_num_cpus = smp_num_probed;
|
||||||
for (i = 0; (i < NR_CPUS) && (cpu_count < max_cpus); i++) {
|
|
||||||
if (i == boot_cpuid)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (((hwrpb_cpu_present_mask >> i) & 1) == 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
cpu_set(i, cpu_possible_map);
|
|
||||||
cpu_count++;
|
|
||||||
}
|
|
||||||
|
|
||||||
smp_num_cpus = cpu_count;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void __devinit
|
void __devinit
|
||||||
|
@ -10,9 +10,9 @@ config ARM
|
|||||||
default y
|
default y
|
||||||
help
|
help
|
||||||
The ARM series is a line of low-power-consumption RISC chip designs
|
The ARM series is a line of low-power-consumption RISC chip designs
|
||||||
licensed by ARM ltd and targeted at embedded applications and
|
licensed by ARM Ltd and targeted at embedded applications and
|
||||||
handhelds such as the Compaq IPAQ. ARM-based PCs are no longer
|
handhelds such as the Compaq IPAQ. ARM-based PCs are no longer
|
||||||
manufactured, but legacy ARM-based PC hardware remains popular in
|
manufactured, but legacy ARM-based PC hardware remains popular in
|
||||||
Europe. There is an ARM Linux project with a web page at
|
Europe. There is an ARM Linux project with a web page at
|
||||||
<http://www.arm.linux.org.uk/>.
|
<http://www.arm.linux.org.uk/>.
|
||||||
|
|
||||||
@ -69,6 +69,9 @@ config GENERIC_ISA_DMA
|
|||||||
config FIQ
|
config FIQ
|
||||||
bool
|
bool
|
||||||
|
|
||||||
|
config ARCH_MTD_XIP
|
||||||
|
bool
|
||||||
|
|
||||||
source "init/Kconfig"
|
source "init/Kconfig"
|
||||||
|
|
||||||
menu "System Type"
|
menu "System Type"
|
||||||
@ -81,45 +84,62 @@ config ARCH_CLPS7500
|
|||||||
bool "Cirrus-CL-PS7500FE"
|
bool "Cirrus-CL-PS7500FE"
|
||||||
select TIMER_ACORN
|
select TIMER_ACORN
|
||||||
select ISA
|
select ISA
|
||||||
|
help
|
||||||
|
Support for the Cirrus Logic PS7500FE system-on-a-chip.
|
||||||
|
|
||||||
config ARCH_CLPS711X
|
config ARCH_CLPS711X
|
||||||
bool "CLPS711x/EP721x-based"
|
bool "CLPS711x/EP721x-based"
|
||||||
|
help
|
||||||
|
Support for Cirrus Logic 711x/721x based boards.
|
||||||
|
|
||||||
config ARCH_CO285
|
config ARCH_CO285
|
||||||
bool "Co-EBSA285"
|
bool "Co-EBSA285"
|
||||||
select FOOTBRIDGE
|
select FOOTBRIDGE
|
||||||
select FOOTBRIDGE_ADDIN
|
select FOOTBRIDGE_ADDIN
|
||||||
|
help
|
||||||
|
Support for Intel's EBSA285 companion chip.
|
||||||
|
|
||||||
config ARCH_EBSA110
|
config ARCH_EBSA110
|
||||||
bool "EBSA-110"
|
bool "EBSA-110"
|
||||||
select ISA
|
select ISA
|
||||||
help
|
help
|
||||||
This is an evaluation board for the StrongARM processor available
|
This is an evaluation board for the StrongARM processor available
|
||||||
from Digital. It has limited hardware on-board, including an onboard
|
from Digital. It has limited hardware on-board, including an
|
||||||
Ethernet interface, two PCMCIA sockets, two serial ports and a
|
Ethernet interface, two PCMCIA sockets, two serial ports and a
|
||||||
parallel port.
|
parallel port.
|
||||||
|
|
||||||
config ARCH_FOOTBRIDGE
|
config ARCH_FOOTBRIDGE
|
||||||
bool "FootBridge"
|
bool "FootBridge"
|
||||||
select FOOTBRIDGE
|
select FOOTBRIDGE
|
||||||
|
help
|
||||||
|
Support for systems based on the DC21285 companion chip
|
||||||
|
("FootBridge"), such as the Simtec CATS and the Rebel NetWinder.
|
||||||
|
|
||||||
config ARCH_INTEGRATOR
|
config ARCH_INTEGRATOR
|
||||||
bool "Integrator"
|
bool "Integrator"
|
||||||
select ARM_AMBA
|
select ARM_AMBA
|
||||||
select ICST525
|
select ICST525
|
||||||
|
help
|
||||||
|
Support for ARM's Integrator platform.
|
||||||
|
|
||||||
config ARCH_IOP3XX
|
config ARCH_IOP3XX
|
||||||
bool "IOP3xx-based"
|
bool "IOP3xx-based"
|
||||||
select PCI
|
select PCI
|
||||||
|
help
|
||||||
|
Support for Intel's IOP3XX (XScale) family of processors.
|
||||||
|
|
||||||
config ARCH_IXP4XX
|
config ARCH_IXP4XX
|
||||||
bool "IXP4xx-based"
|
bool "IXP4xx-based"
|
||||||
select DMABOUNCE
|
select DMABOUNCE
|
||||||
select PCI
|
select PCI
|
||||||
|
help
|
||||||
|
Support for Intel's IXP4XX (XScale) family of processors.
|
||||||
|
|
||||||
config ARCH_IXP2000
|
config ARCH_IXP2000
|
||||||
bool "IXP2400/2800-based"
|
bool "IXP2400/2800-based"
|
||||||
select PCI
|
select PCI
|
||||||
|
help
|
||||||
|
Support for Intel's IXP2400/2800 (XScale) family of processors.
|
||||||
|
|
||||||
config ARCH_L7200
|
config ARCH_L7200
|
||||||
bool "LinkUp-L7200"
|
bool "LinkUp-L7200"
|
||||||
@ -136,6 +156,9 @@ config ARCH_L7200
|
|||||||
|
|
||||||
config ARCH_PXA
|
config ARCH_PXA
|
||||||
bool "PXA2xx-based"
|
bool "PXA2xx-based"
|
||||||
|
select ARCH_MTD_XIP
|
||||||
|
help
|
||||||
|
Support for Intel's PXA2XX processor line.
|
||||||
|
|
||||||
config ARCH_RPC
|
config ARCH_RPC
|
||||||
bool "RiscPC"
|
bool "RiscPC"
|
||||||
@ -152,19 +175,25 @@ config ARCH_SA1100
|
|||||||
bool "SA1100-based"
|
bool "SA1100-based"
|
||||||
select ISA
|
select ISA
|
||||||
select ARCH_DISCONTIGMEM_ENABLE
|
select ARCH_DISCONTIGMEM_ENABLE
|
||||||
|
select ARCH_MTD_XIP
|
||||||
|
help
|
||||||
|
Support for StrongARM 11x0 based boards.
|
||||||
|
|
||||||
config ARCH_S3C2410
|
config ARCH_S3C2410
|
||||||
bool "Samsung S3C2410"
|
bool "Samsung S3C2410"
|
||||||
help
|
help
|
||||||
Samsung S3C2410X CPU based systems, such as the Simtec Electronics
|
Samsung S3C2410X CPU based systems, such as the Simtec Electronics
|
||||||
BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or
|
BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or
|
||||||
the Samsung SMDK2410 development board (and derviatives).
|
the Samsung SMDK2410 development board (and derivatives).
|
||||||
|
|
||||||
config ARCH_SHARK
|
config ARCH_SHARK
|
||||||
bool "Shark"
|
bool "Shark"
|
||||||
select ISA
|
select ISA
|
||||||
select ISA_DMA
|
select ISA_DMA
|
||||||
select PCI
|
select PCI
|
||||||
|
help
|
||||||
|
Support for the StrongARM based Digital DNARD machine, also known
|
||||||
|
as "Shark" (<http://www.shark-linux.de/shark.html>).
|
||||||
|
|
||||||
config ARCH_LH7A40X
|
config ARCH_LH7A40X
|
||||||
bool "Sharp LH7A40X"
|
bool "Sharp LH7A40X"
|
||||||
@ -176,6 +205,8 @@ config ARCH_LH7A40X
|
|||||||
|
|
||||||
config ARCH_OMAP
|
config ARCH_OMAP
|
||||||
bool "TI OMAP"
|
bool "TI OMAP"
|
||||||
|
help
|
||||||
|
Support for TI's OMAP platform (OMAP1 and OMAP2).
|
||||||
|
|
||||||
config ARCH_VERSATILE
|
config ARCH_VERSATILE
|
||||||
bool "Versatile"
|
bool "Versatile"
|
||||||
@ -194,6 +225,8 @@ config ARCH_REALVIEW
|
|||||||
|
|
||||||
config ARCH_IMX
|
config ARCH_IMX
|
||||||
bool "IMX"
|
bool "IMX"
|
||||||
|
help
|
||||||
|
Support for Motorola's i.MX family of processors (MX1, MXL).
|
||||||
|
|
||||||
config ARCH_H720X
|
config ARCH_H720X
|
||||||
bool "Hynix-HMS720x-based"
|
bool "Hynix-HMS720x-based"
|
||||||
@ -210,8 +243,8 @@ config ARCH_AAEC2000
|
|||||||
config ARCH_AT91RM9200
|
config ARCH_AT91RM9200
|
||||||
bool "AT91RM9200"
|
bool "AT91RM9200"
|
||||||
help
|
help
|
||||||
Say Y here if you intend to run this kernel on an AT91RM9200-based
|
Say Y here if you intend to run this kernel on an Atmel
|
||||||
board.
|
AT91RM9200-based board.
|
||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
@ -417,8 +450,8 @@ config AEABI
|
|||||||
To use this you need GCC version 4.0.0 or later.
|
To use this you need GCC version 4.0.0 or later.
|
||||||
|
|
||||||
config OABI_COMPAT
|
config OABI_COMPAT
|
||||||
bool "Allow old ABI binaries to run with this kernel"
|
bool "Allow old ABI binaries to run with this kernel (EXPERIMENTAL)"
|
||||||
depends on AEABI
|
depends on AEABI && EXPERIMENTAL
|
||||||
default y
|
default y
|
||||||
help
|
help
|
||||||
This option preserves the old syscall interface along with the
|
This option preserves the old syscall interface along with the
|
||||||
|
@ -171,7 +171,7 @@ CONFIG_ALIGNMENT_TRAP=y
|
|||||||
#
|
#
|
||||||
CONFIG_ZBOOT_ROM_TEXT=0x0
|
CONFIG_ZBOOT_ROM_TEXT=0x0
|
||||||
CONFIG_ZBOOT_ROM_BSS=0x0
|
CONFIG_ZBOOT_ROM_BSS=0x0
|
||||||
CONFIG_CMDLINE="console=ttyS0,57600 root=/dev/nfs ip=bootp mem=64M@0x0 pci=firmware"
|
CONFIG_CMDLINE="console=ttyS0,57600 root=/dev/nfs ip=bootp mem=64M@0x0"
|
||||||
# CONFIG_XIP_KERNEL is not set
|
# CONFIG_XIP_KERNEL is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -172,7 +172,7 @@ CONFIG_ALIGNMENT_TRAP=y
|
|||||||
#
|
#
|
||||||
CONFIG_ZBOOT_ROM_TEXT=0x0
|
CONFIG_ZBOOT_ROM_TEXT=0x0
|
||||||
CONFIG_ZBOOT_ROM_BSS=0x0
|
CONFIG_ZBOOT_ROM_BSS=0x0
|
||||||
CONFIG_CMDLINE="console=ttyS0,57600 root=/dev/nfs ip=bootp mem=64M@0x0 pci=firmware"
|
CONFIG_CMDLINE="console=ttyS0,57600 root=/dev/nfs ip=bootp mem=64M@0x0"
|
||||||
# CONFIG_XIP_KERNEL is not set
|
# CONFIG_XIP_KERNEL is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -172,7 +172,7 @@ CONFIG_ALIGNMENT_TRAP=y
|
|||||||
#
|
#
|
||||||
CONFIG_ZBOOT_ROM_TEXT=0x0
|
CONFIG_ZBOOT_ROM_TEXT=0x0
|
||||||
CONFIG_ZBOOT_ROM_BSS=0x0
|
CONFIG_ZBOOT_ROM_BSS=0x0
|
||||||
CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/nfs ip=bootp mem=64M@0x0 pci=firmware"
|
CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/nfs ip=bootp mem=64M@0x0"
|
||||||
# CONFIG_XIP_KERNEL is not set
|
# CONFIG_XIP_KERNEL is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -172,7 +172,7 @@ CONFIG_ALIGNMENT_TRAP=y
|
|||||||
#
|
#
|
||||||
CONFIG_ZBOOT_ROM_TEXT=0x0
|
CONFIG_ZBOOT_ROM_TEXT=0x0
|
||||||
CONFIG_ZBOOT_ROM_BSS=0x0
|
CONFIG_ZBOOT_ROM_BSS=0x0
|
||||||
CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/nfs ip=bootp mem=64M@0x0 pci=firmware ixdp2x01_clock=50000000"
|
CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/nfs ip=bootp mem=64M@0x0"
|
||||||
# CONFIG_XIP_KERNEL is not set
|
# CONFIG_XIP_KERNEL is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
#
|
#
|
||||||
# Automatically generated make config: don't edit
|
# Automatically generated make config: don't edit
|
||||||
# Linux kernel version: 2.6.15-rc1
|
# Linux kernel version: 2.6.16-rc2
|
||||||
# Sun Nov 13 17:41:24 2005
|
# Mon Feb 6 11:17:23 2006
|
||||||
#
|
#
|
||||||
CONFIG_ARM=y
|
CONFIG_ARM=y
|
||||||
CONFIG_MMU=y
|
CONFIG_MMU=y
|
||||||
CONFIG_UID16=y
|
|
||||||
CONFIG_RWSEM_GENERIC_SPINLOCK=y
|
CONFIG_RWSEM_GENERIC_SPINLOCK=y
|
||||||
CONFIG_GENERIC_CALIBRATE_DELAY=y
|
CONFIG_GENERIC_CALIBRATE_DELAY=y
|
||||||
|
|
||||||
@ -28,27 +27,31 @@ CONFIG_SYSVIPC=y
|
|||||||
# CONFIG_BSD_PROCESS_ACCT is not set
|
# CONFIG_BSD_PROCESS_ACCT is not set
|
||||||
CONFIG_SYSCTL=y
|
CONFIG_SYSCTL=y
|
||||||
# CONFIG_AUDIT is not set
|
# CONFIG_AUDIT is not set
|
||||||
# CONFIG_HOTPLUG is not set
|
|
||||||
CONFIG_KOBJECT_UEVENT=y
|
|
||||||
# CONFIG_IKCONFIG is not set
|
# CONFIG_IKCONFIG is not set
|
||||||
CONFIG_INITRAMFS_SOURCE=""
|
CONFIG_INITRAMFS_SOURCE=""
|
||||||
|
CONFIG_UID16=y
|
||||||
|
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||||
# CONFIG_EMBEDDED is not set
|
# CONFIG_EMBEDDED is not set
|
||||||
CONFIG_KALLSYMS=y
|
CONFIG_KALLSYMS=y
|
||||||
# CONFIG_KALLSYMS_ALL is not set
|
# CONFIG_KALLSYMS_ALL is not set
|
||||||
# CONFIG_KALLSYMS_EXTRA_PASS is not set
|
# CONFIG_KALLSYMS_EXTRA_PASS is not set
|
||||||
|
CONFIG_HOTPLUG=y
|
||||||
CONFIG_PRINTK=y
|
CONFIG_PRINTK=y
|
||||||
CONFIG_BUG=y
|
CONFIG_BUG=y
|
||||||
|
CONFIG_ELF_CORE=y
|
||||||
CONFIG_BASE_FULL=y
|
CONFIG_BASE_FULL=y
|
||||||
CONFIG_FUTEX=y
|
CONFIG_FUTEX=y
|
||||||
CONFIG_EPOLL=y
|
CONFIG_EPOLL=y
|
||||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
|
||||||
CONFIG_SHMEM=y
|
CONFIG_SHMEM=y
|
||||||
CONFIG_CC_ALIGN_FUNCTIONS=0
|
CONFIG_CC_ALIGN_FUNCTIONS=0
|
||||||
CONFIG_CC_ALIGN_LABELS=0
|
CONFIG_CC_ALIGN_LABELS=0
|
||||||
CONFIG_CC_ALIGN_LOOPS=0
|
CONFIG_CC_ALIGN_LOOPS=0
|
||||||
CONFIG_CC_ALIGN_JUMPS=0
|
CONFIG_CC_ALIGN_JUMPS=0
|
||||||
|
CONFIG_SLAB=y
|
||||||
# CONFIG_TINY_SHMEM is not set
|
# CONFIG_TINY_SHMEM is not set
|
||||||
CONFIG_BASE_SMALL=0
|
CONFIG_BASE_SMALL=0
|
||||||
|
# CONFIG_SLOB is not set
|
||||||
|
CONFIG_OBSOLETE_INTERMODULE=y
|
||||||
|
|
||||||
#
|
#
|
||||||
# Loadable module support
|
# Loadable module support
|
||||||
@ -102,6 +105,7 @@ CONFIG_ARCH_S3C2410=y
|
|||||||
# CONFIG_ARCH_IMX is not set
|
# CONFIG_ARCH_IMX is not set
|
||||||
# CONFIG_ARCH_H720X is not set
|
# CONFIG_ARCH_H720X is not set
|
||||||
# CONFIG_ARCH_AAEC2000 is not set
|
# CONFIG_ARCH_AAEC2000 is not set
|
||||||
|
# CONFIG_ARCH_AT91RM9200 is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# S3C24XX Implementations
|
# S3C24XX Implementations
|
||||||
@ -160,7 +164,6 @@ CONFIG_CPU_TLB_V4WBI=y
|
|||||||
# Bus support
|
# Bus support
|
||||||
#
|
#
|
||||||
CONFIG_ISA=y
|
CONFIG_ISA=y
|
||||||
CONFIG_ISA_DMA_API=y
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# PCCARD (PCMCIA/CardBus) support
|
# PCCARD (PCMCIA/CardBus) support
|
||||||
@ -172,6 +175,7 @@ CONFIG_ISA_DMA_API=y
|
|||||||
#
|
#
|
||||||
# CONFIG_PREEMPT is not set
|
# CONFIG_PREEMPT is not set
|
||||||
# CONFIG_NO_IDLE_HZ is not set
|
# CONFIG_NO_IDLE_HZ is not set
|
||||||
|
# CONFIG_AEABI is not set
|
||||||
# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
|
# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
|
||||||
CONFIG_SELECT_MEMORY_MODEL=y
|
CONFIG_SELECT_MEMORY_MODEL=y
|
||||||
CONFIG_FLATMEM_MANUAL=y
|
CONFIG_FLATMEM_MANUAL=y
|
||||||
@ -214,6 +218,8 @@ CONFIG_BINFMT_AOUT=y
|
|||||||
# Power management options
|
# Power management options
|
||||||
#
|
#
|
||||||
CONFIG_PM=y
|
CONFIG_PM=y
|
||||||
|
CONFIG_PM_LEGACY=y
|
||||||
|
# CONFIG_PM_DEBUG is not set
|
||||||
CONFIG_APM=y
|
CONFIG_APM=y
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -259,6 +265,11 @@ CONFIG_TCP_CONG_BIC=y
|
|||||||
# SCTP Configuration (EXPERIMENTAL)
|
# SCTP Configuration (EXPERIMENTAL)
|
||||||
#
|
#
|
||||||
# CONFIG_IP_SCTP is not set
|
# CONFIG_IP_SCTP is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# TIPC Configuration (EXPERIMENTAL)
|
||||||
|
#
|
||||||
|
# CONFIG_TIPC is not set
|
||||||
# CONFIG_ATM is not set
|
# CONFIG_ATM is not set
|
||||||
# CONFIG_BRIDGE is not set
|
# CONFIG_BRIDGE is not set
|
||||||
# CONFIG_VLAN_8021Q is not set
|
# CONFIG_VLAN_8021Q is not set
|
||||||
@ -276,7 +287,6 @@ CONFIG_TCP_CONG_BIC=y
|
|||||||
# QoS and/or fair queueing
|
# QoS and/or fair queueing
|
||||||
#
|
#
|
||||||
# CONFIG_NET_SCHED is not set
|
# CONFIG_NET_SCHED is not set
|
||||||
# CONFIG_NET_CLS_ROUTE is not set
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Network testing
|
# Network testing
|
||||||
@ -299,6 +309,11 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
|
|||||||
# CONFIG_FW_LOADER is not set
|
# CONFIG_FW_LOADER is not set
|
||||||
# CONFIG_DEBUG_DRIVER is not set
|
# CONFIG_DEBUG_DRIVER is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# Connector - unified userspace <-> kernelspace linker
|
||||||
|
#
|
||||||
|
# CONFIG_CONNECTOR is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# Memory Technology Devices (MTD)
|
# Memory Technology Devices (MTD)
|
||||||
#
|
#
|
||||||
@ -412,8 +427,6 @@ CONFIG_PARPORT_1284=y
|
|||||||
#
|
#
|
||||||
# Block devices
|
# Block devices
|
||||||
#
|
#
|
||||||
# CONFIG_BLK_DEV_XD is not set
|
|
||||||
# CONFIG_PARIDE is not set
|
|
||||||
# CONFIG_BLK_DEV_COW_COMMON is not set
|
# CONFIG_BLK_DEV_COW_COMMON is not set
|
||||||
CONFIG_BLK_DEV_LOOP=y
|
CONFIG_BLK_DEV_LOOP=y
|
||||||
# CONFIG_BLK_DEV_CRYPTOLOOP is not set
|
# CONFIG_BLK_DEV_CRYPTOLOOP is not set
|
||||||
@ -502,7 +515,6 @@ CONFIG_NETDEVICES=y
|
|||||||
CONFIG_NET_ETHERNET=y
|
CONFIG_NET_ETHERNET=y
|
||||||
CONFIG_MII=y
|
CONFIG_MII=y
|
||||||
# CONFIG_NET_VENDOR_3COM is not set
|
# CONFIG_NET_VENDOR_3COM is not set
|
||||||
# CONFIG_LANCE is not set
|
|
||||||
# CONFIG_NET_VENDOR_SMC is not set
|
# CONFIG_NET_VENDOR_SMC is not set
|
||||||
# CONFIG_SMC91X is not set
|
# CONFIG_SMC91X is not set
|
||||||
CONFIG_DM9000=y
|
CONFIG_DM9000=y
|
||||||
@ -607,11 +619,11 @@ CONFIG_SERIAL_NONSTANDARD=y
|
|||||||
# CONFIG_ROCKETPORT is not set
|
# CONFIG_ROCKETPORT is not set
|
||||||
# CONFIG_CYCLADES is not set
|
# CONFIG_CYCLADES is not set
|
||||||
# CONFIG_DIGIEPCA is not set
|
# CONFIG_DIGIEPCA is not set
|
||||||
# CONFIG_ESPSERIAL is not set
|
|
||||||
# CONFIG_MOXA_INTELLIO is not set
|
# CONFIG_MOXA_INTELLIO is not set
|
||||||
# CONFIG_MOXA_SMARTIO is not set
|
# CONFIG_MOXA_SMARTIO is not set
|
||||||
# CONFIG_ISI is not set
|
# CONFIG_ISI is not set
|
||||||
# CONFIG_SYNCLINKMP is not set
|
# CONFIG_SYNCLINKMP is not set
|
||||||
|
# CONFIG_SYNCLINK_GT is not set
|
||||||
# CONFIG_N_HDLC is not set
|
# CONFIG_N_HDLC is not set
|
||||||
# CONFIG_RISCOM8 is not set
|
# CONFIG_RISCOM8 is not set
|
||||||
# CONFIG_SPECIALIX is not set
|
# CONFIG_SPECIALIX is not set
|
||||||
@ -625,6 +637,7 @@ CONFIG_SERIAL_NONSTANDARD=y
|
|||||||
CONFIG_SERIAL_8250=y
|
CONFIG_SERIAL_8250=y
|
||||||
CONFIG_SERIAL_8250_CONSOLE=y
|
CONFIG_SERIAL_8250_CONSOLE=y
|
||||||
CONFIG_SERIAL_8250_NR_UARTS=8
|
CONFIG_SERIAL_8250_NR_UARTS=8
|
||||||
|
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
|
||||||
CONFIG_SERIAL_8250_EXTENDED=y
|
CONFIG_SERIAL_8250_EXTENDED=y
|
||||||
CONFIG_SERIAL_8250_MANY_PORTS=y
|
CONFIG_SERIAL_8250_MANY_PORTS=y
|
||||||
CONFIG_SERIAL_8250_SHARE_IRQ=y
|
CONFIG_SERIAL_8250_SHARE_IRQ=y
|
||||||
@ -687,6 +700,7 @@ CONFIG_S3C2410_RTC=y
|
|||||||
#
|
#
|
||||||
# TPM devices
|
# TPM devices
|
||||||
#
|
#
|
||||||
|
# CONFIG_TCG_TPM is not set
|
||||||
# CONFIG_TELCLOCK is not set
|
# CONFIG_TELCLOCK is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -730,6 +744,12 @@ CONFIG_SENSORS_EEPROM=m
|
|||||||
# CONFIG_I2C_DEBUG_BUS is not set
|
# CONFIG_I2C_DEBUG_BUS is not set
|
||||||
# CONFIG_I2C_DEBUG_CHIP is not set
|
# CONFIG_I2C_DEBUG_CHIP is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# SPI support
|
||||||
|
#
|
||||||
|
# CONFIG_SPI is not set
|
||||||
|
# CONFIG_SPI_MASTER is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# Hardware Monitoring support
|
# Hardware Monitoring support
|
||||||
#
|
#
|
||||||
@ -863,6 +883,7 @@ CONFIG_FS_MBCACHE=y
|
|||||||
# CONFIG_JFS_FS is not set
|
# CONFIG_JFS_FS is not set
|
||||||
# CONFIG_FS_POSIX_ACL is not set
|
# CONFIG_FS_POSIX_ACL is not set
|
||||||
# CONFIG_XFS_FS is not set
|
# CONFIG_XFS_FS is not set
|
||||||
|
# CONFIG_OCFS2_FS is not set
|
||||||
# CONFIG_MINIX_FS is not set
|
# CONFIG_MINIX_FS is not set
|
||||||
CONFIG_ROMFS_FS=y
|
CONFIG_ROMFS_FS=y
|
||||||
CONFIG_INOTIFY=y
|
CONFIG_INOTIFY=y
|
||||||
@ -897,6 +918,7 @@ CONFIG_SYSFS=y
|
|||||||
# CONFIG_HUGETLB_PAGE is not set
|
# CONFIG_HUGETLB_PAGE is not set
|
||||||
CONFIG_RAMFS=y
|
CONFIG_RAMFS=y
|
||||||
# CONFIG_RELAYFS_FS is not set
|
# CONFIG_RELAYFS_FS is not set
|
||||||
|
# CONFIG_CONFIGFS_FS is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# Miscellaneous filesystems
|
# Miscellaneous filesystems
|
||||||
@ -965,6 +987,7 @@ CONFIG_SOLARIS_X86_PARTITION=y
|
|||||||
# CONFIG_SGI_PARTITION is not set
|
# CONFIG_SGI_PARTITION is not set
|
||||||
# CONFIG_ULTRIX_PARTITION is not set
|
# CONFIG_ULTRIX_PARTITION is not set
|
||||||
# CONFIG_SUN_PARTITION is not set
|
# CONFIG_SUN_PARTITION is not set
|
||||||
|
# CONFIG_KARMA_PARTITION is not set
|
||||||
# CONFIG_EFI_PARTITION is not set
|
# CONFIG_EFI_PARTITION is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -1020,12 +1043,13 @@ CONFIG_NLS_DEFAULT="iso8859-1"
|
|||||||
# Kernel hacking
|
# Kernel hacking
|
||||||
#
|
#
|
||||||
# CONFIG_PRINTK_TIME is not set
|
# CONFIG_PRINTK_TIME is not set
|
||||||
CONFIG_DEBUG_KERNEL=y
|
|
||||||
CONFIG_MAGIC_SYSRQ=y
|
CONFIG_MAGIC_SYSRQ=y
|
||||||
|
CONFIG_DEBUG_KERNEL=y
|
||||||
CONFIG_LOG_BUF_SHIFT=16
|
CONFIG_LOG_BUF_SHIFT=16
|
||||||
CONFIG_DETECT_SOFTLOCKUP=y
|
CONFIG_DETECT_SOFTLOCKUP=y
|
||||||
# CONFIG_SCHEDSTATS is not set
|
# CONFIG_SCHEDSTATS is not set
|
||||||
# CONFIG_DEBUG_SLAB is not set
|
# CONFIG_DEBUG_SLAB is not set
|
||||||
|
CONFIG_DEBUG_MUTEXES=y
|
||||||
# CONFIG_DEBUG_SPINLOCK is not set
|
# CONFIG_DEBUG_SPINLOCK is not set
|
||||||
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
|
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
|
||||||
# CONFIG_DEBUG_KOBJECT is not set
|
# CONFIG_DEBUG_KOBJECT is not set
|
||||||
@ -1034,6 +1058,7 @@ CONFIG_DEBUG_INFO=y
|
|||||||
# CONFIG_DEBUG_FS is not set
|
# CONFIG_DEBUG_FS is not set
|
||||||
# CONFIG_DEBUG_VM is not set
|
# CONFIG_DEBUG_VM is not set
|
||||||
CONFIG_FRAME_POINTER=y
|
CONFIG_FRAME_POINTER=y
|
||||||
|
CONFIG_FORCED_INLINING=y
|
||||||
# CONFIG_RCU_TORTURE_TEST is not set
|
# CONFIG_RCU_TORTURE_TEST is not set
|
||||||
CONFIG_DEBUG_USER=y
|
CONFIG_DEBUG_USER=y
|
||||||
# CONFIG_DEBUG_WAITQ is not set
|
# CONFIG_DEBUG_WAITQ is not set
|
||||||
|
@ -291,21 +291,21 @@
|
|||||||
CALL(sys_mq_getsetattr)
|
CALL(sys_mq_getsetattr)
|
||||||
/* 280 */ CALL(sys_waitid)
|
/* 280 */ CALL(sys_waitid)
|
||||||
CALL(sys_socket)
|
CALL(sys_socket)
|
||||||
CALL(sys_bind)
|
CALL(ABI(sys_bind, sys_oabi_bind))
|
||||||
CALL(sys_connect)
|
CALL(ABI(sys_connect, sys_oabi_connect))
|
||||||
CALL(sys_listen)
|
CALL(sys_listen)
|
||||||
/* 285 */ CALL(sys_accept)
|
/* 285 */ CALL(sys_accept)
|
||||||
CALL(sys_getsockname)
|
CALL(sys_getsockname)
|
||||||
CALL(sys_getpeername)
|
CALL(sys_getpeername)
|
||||||
CALL(sys_socketpair)
|
CALL(sys_socketpair)
|
||||||
CALL(sys_send)
|
CALL(sys_send)
|
||||||
/* 290 */ CALL(sys_sendto)
|
/* 290 */ CALL(ABI(sys_sendto, sys_oabi_sendto))
|
||||||
CALL(sys_recv)
|
CALL(sys_recv)
|
||||||
CALL(sys_recvfrom)
|
CALL(sys_recvfrom)
|
||||||
CALL(sys_shutdown)
|
CALL(sys_shutdown)
|
||||||
CALL(sys_setsockopt)
|
CALL(sys_setsockopt)
|
||||||
/* 295 */ CALL(sys_getsockopt)
|
/* 295 */ CALL(sys_getsockopt)
|
||||||
CALL(sys_sendmsg)
|
CALL(ABI(sys_sendmsg, sys_oabi_sendmsg))
|
||||||
CALL(sys_recvmsg)
|
CALL(sys_recvmsg)
|
||||||
CALL(ABI(sys_semop, sys_oabi_semop))
|
CALL(ABI(sys_semop, sys_oabi_semop))
|
||||||
CALL(sys_semget)
|
CALL(sys_semget)
|
||||||
|
@ -333,9 +333,13 @@ __pabt_svc:
|
|||||||
@ from the exception stack
|
@ from the exception stack
|
||||||
|
|
||||||
#if __LINUX_ARM_ARCH__ < 6 && !defined(CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG)
|
#if __LINUX_ARM_ARCH__ < 6 && !defined(CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG)
|
||||||
|
#ifndef CONFIG_MMU
|
||||||
|
#warning "NPTL on non MMU needs fixing"
|
||||||
|
#else
|
||||||
@ make sure our user space atomic helper is aborted
|
@ make sure our user space atomic helper is aborted
|
||||||
cmp r2, #TASK_SIZE
|
cmp r2, #TASK_SIZE
|
||||||
bichs r3, r3, #PSR_Z_BIT
|
bichs r3, r3, #PSR_Z_BIT
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@
|
@
|
||||||
@ -705,7 +709,12 @@ __kuser_memory_barrier: @ 0xffff0fa0
|
|||||||
* The C flag is also set if *ptr was changed to allow for assembly
|
* The C flag is also set if *ptr was changed to allow for assembly
|
||||||
* optimization in the calling code.
|
* optimization in the calling code.
|
||||||
*
|
*
|
||||||
* Note: this routine already includes memory barriers as needed.
|
* Notes:
|
||||||
|
*
|
||||||
|
* - This routine already includes memory barriers as needed.
|
||||||
|
*
|
||||||
|
* - A failure might be transient, i.e. it is possible, although unlikely,
|
||||||
|
* that "failure" be returned even if *ptr == oldval.
|
||||||
*
|
*
|
||||||
* For example, a user space atomic_add implementation could look like this:
|
* For example, a user space atomic_add implementation could look like this:
|
||||||
*
|
*
|
||||||
@ -756,12 +765,18 @@ __kuser_cmpxchg: @ 0xffff0fc0
|
|||||||
* exception happening just after the str instruction which would
|
* exception happening just after the str instruction which would
|
||||||
* clear the Z flag although the exchange was done.
|
* clear the Z flag although the exchange was done.
|
||||||
*/
|
*/
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
teq ip, ip @ set Z flag
|
teq ip, ip @ set Z flag
|
||||||
ldr ip, [r2] @ load current val
|
ldr ip, [r2] @ load current val
|
||||||
add r3, r2, #1 @ prepare store ptr
|
add r3, r2, #1 @ prepare store ptr
|
||||||
teqeq ip, r0 @ compare with oldval if still allowed
|
teqeq ip, r0 @ compare with oldval if still allowed
|
||||||
streq r1, [r3, #-1]! @ store newval if still allowed
|
streq r1, [r3, #-1]! @ store newval if still allowed
|
||||||
subs r0, r2, r3 @ if r2 == r3 the str occured
|
subs r0, r2, r3 @ if r2 == r3 the str occured
|
||||||
|
#else
|
||||||
|
#warning "NPTL on non MMU needs fixing"
|
||||||
|
mov r0, #-1
|
||||||
|
adds r0, r0, #0
|
||||||
|
#endif
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
@ -59,6 +59,16 @@
|
|||||||
* struct sembuf loses its padding with EABI. Since arrays of them are
|
* struct sembuf loses its padding with EABI. Since arrays of them are
|
||||||
* used they have to be copyed to remove the padding. Compatibility wrappers
|
* used they have to be copyed to remove the padding. Compatibility wrappers
|
||||||
* provided below.
|
* provided below.
|
||||||
|
*
|
||||||
|
* sys_bind:
|
||||||
|
* sys_connect:
|
||||||
|
* sys_sendmsg:
|
||||||
|
* sys_sendto:
|
||||||
|
*
|
||||||
|
* struct sockaddr_un loses its padding with EABI. Since the size of the
|
||||||
|
* structure is used as a validation test in unix_mkname(), we need to
|
||||||
|
* change the length argument to 110 whenever it is 112. Compatibility
|
||||||
|
* wrappers provided below.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscalls.h>
|
#include <linux/syscalls.h>
|
||||||
@ -67,6 +77,7 @@
|
|||||||
#include <linux/fcntl.h>
|
#include <linux/fcntl.h>
|
||||||
#include <linux/eventpoll.h>
|
#include <linux/eventpoll.h>
|
||||||
#include <linux/sem.h>
|
#include <linux/sem.h>
|
||||||
|
#include <linux/socket.h>
|
||||||
#include <asm/ipc.h>
|
#include <asm/ipc.h>
|
||||||
#include <asm/uaccess.h>
|
#include <asm/uaccess.h>
|
||||||
|
|
||||||
@ -337,3 +348,63 @@ asmlinkage int sys_oabi_ipc(uint call, int first, int second, int third,
|
|||||||
return sys_ipc(call, first, second, third, ptr, fifth);
|
return sys_ipc(call, first, second, third, ptr, fifth);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
asmlinkage long sys_oabi_bind(int fd, struct sockaddr __user *addr, int addrlen)
|
||||||
|
{
|
||||||
|
sa_family_t sa_family;
|
||||||
|
if (addrlen == 112 &&
|
||||||
|
get_user(sa_family, &addr->sa_family) == 0 &&
|
||||||
|
sa_family == AF_UNIX)
|
||||||
|
addrlen = 110;
|
||||||
|
return sys_bind(fd, addr, addrlen);
|
||||||
|
}
|
||||||
|
|
||||||
|
asmlinkage long sys_oabi_connect(int fd, struct sockaddr __user *addr, int addrlen)
|
||||||
|
{
|
||||||
|
sa_family_t sa_family;
|
||||||
|
if (addrlen == 112 &&
|
||||||
|
get_user(sa_family, &addr->sa_family) == 0 &&
|
||||||
|
sa_family == AF_UNIX)
|
||||||
|
addrlen = 110;
|
||||||
|
return sys_connect(fd, addr, addrlen);
|
||||||
|
}
|
||||||
|
|
||||||
|
asmlinkage long sys_oabi_sendto(int fd, void __user *buff,
|
||||||
|
size_t len, unsigned flags,
|
||||||
|
struct sockaddr __user *addr,
|
||||||
|
int addrlen)
|
||||||
|
{
|
||||||
|
sa_family_t sa_family;
|
||||||
|
if (addrlen == 112 &&
|
||||||
|
get_user(sa_family, &addr->sa_family) == 0 &&
|
||||||
|
sa_family == AF_UNIX)
|
||||||
|
addrlen = 110;
|
||||||
|
return sys_sendto(fd, buff, len, flags, addr, addrlen);
|
||||||
|
}
|
||||||
|
|
||||||
|
asmlinkage long sys_oabi_sendmsg(int fd, struct msghdr __user *msg, unsigned flags)
|
||||||
|
{
|
||||||
|
struct sockaddr __user *addr;
|
||||||
|
int msg_namelen;
|
||||||
|
sa_family_t sa_family;
|
||||||
|
if (msg &&
|
||||||
|
get_user(msg_namelen, &msg->msg_namelen) == 0 &&
|
||||||
|
msg_namelen == 112 &&
|
||||||
|
get_user(addr, &msg->msg_name) == 0 &&
|
||||||
|
get_user(sa_family, &addr->sa_family) == 0 &&
|
||||||
|
sa_family == AF_UNIX)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* HACK ALERT: there is a limit to how much backward bending
|
||||||
|
* we should do for what is actually a transitional
|
||||||
|
* compatibility layer. This already has known flaws with
|
||||||
|
* a few ioctls that we don't intend to fix. Therefore
|
||||||
|
* consider this blatent hack as another one... and take care
|
||||||
|
* to run for cover. In most cases it will "just work fine".
|
||||||
|
* If it doesn't, well, tough.
|
||||||
|
*/
|
||||||
|
put_user(110, &msg->msg_namelen);
|
||||||
|
}
|
||||||
|
return sys_sendmsg(fd, msg, flags);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -24,6 +24,8 @@ config ARCH_CEIVA
|
|||||||
|
|
||||||
config ARCH_CLEP7312
|
config ARCH_CLEP7312
|
||||||
bool "CLEP7312"
|
bool "CLEP7312"
|
||||||
|
help
|
||||||
|
Boards based on the Cirrus Logic 7212/7312 chips.
|
||||||
|
|
||||||
config ARCH_EDB7211
|
config ARCH_EDB7211
|
||||||
bool "EDB7211"
|
bool "EDB7211"
|
||||||
|
@ -27,7 +27,6 @@
|
|||||||
#include <asm/mach/arch.h>
|
#include <asm/mach/arch.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include "generic.h"
|
#include "generic.h"
|
||||||
#include <asm/serial.h>
|
|
||||||
|
|
||||||
static struct resource cs89x0_resources[] = {
|
static struct resource cs89x0_resources[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
|
@ -106,6 +106,7 @@ static void __init enp2611_pci_preinit(void)
|
|||||||
{
|
{
|
||||||
ixp2000_reg_write(IXP2000_PCI_ADDR_EXT, 0x00100000);
|
ixp2000_reg_write(IXP2000_PCI_ADDR_EXT, 0x00100000);
|
||||||
ixp2000_pci_preinit();
|
ixp2000_pci_preinit();
|
||||||
|
pcibios_setup("firmware");
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int enp2611_pci_valid_device(struct pci_bus *bus,
|
static inline int enp2611_pci_valid_device(struct pci_bus *bus,
|
||||||
|
@ -68,6 +68,7 @@ void __init ixdp2400_pci_preinit(void)
|
|||||||
{
|
{
|
||||||
ixp2000_reg_write(IXP2000_PCI_ADDR_EXT, 0x00100000);
|
ixp2000_reg_write(IXP2000_PCI_ADDR_EXT, 0x00100000);
|
||||||
ixp2000_pci_preinit();
|
ixp2000_pci_preinit();
|
||||||
|
pcibios_setup("firmware");
|
||||||
}
|
}
|
||||||
|
|
||||||
int ixdp2400_pci_setup(int nr, struct pci_sys_data *sys)
|
int ixdp2400_pci_setup(int nr, struct pci_sys_data *sys)
|
||||||
|
@ -212,6 +212,7 @@ void __init ixdp2x01_pci_preinit(void)
|
|||||||
{
|
{
|
||||||
ixp2000_reg_write(IXP2000_PCI_ADDR_EXT, 0x00000000);
|
ixp2000_reg_write(IXP2000_PCI_ADDR_EXT, 0x00000000);
|
||||||
ixp2000_pci_preinit();
|
ixp2000_pci_preinit();
|
||||||
|
pcibios_setup("firmware");
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DEVPIN(dev, pin) ((pin) | ((dev) << 3))
|
#define DEVPIN(dev, pin) ((pin) | ((dev) << 3))
|
||||||
@ -299,7 +300,9 @@ struct hw_pci ixdp2x01_pci __initdata = {
|
|||||||
|
|
||||||
int __init ixdp2x01_pci_init(void)
|
int __init ixdp2x01_pci_init(void)
|
||||||
{
|
{
|
||||||
pci_common_init(&ixdp2x01_pci);
|
if (machine_is_ixdp2401() || machine_is_ixdp2801())
|
||||||
|
pci_common_init(&ixdp2x01_pci);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
|
|
||||||
static void __init omap_generic_init_irq(void)
|
static void __init omap_generic_init_irq(void)
|
||||||
{
|
{
|
||||||
|
omap1_init_common_hw();
|
||||||
omap_init_irq();
|
omap_init_irq();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,7 +105,7 @@ static void __init omap_generic_init(void)
|
|||||||
|
|
||||||
static void __init omap_generic_map_io(void)
|
static void __init omap_generic_map_io(void)
|
||||||
{
|
{
|
||||||
omap_map_common_io();
|
omap1_map_common_io();
|
||||||
}
|
}
|
||||||
|
|
||||||
MACHINE_START(OMAP_GENERIC, "Generic OMAP1510/1610/1710")
|
MACHINE_START(OMAP_GENERIC, "Generic OMAP1510/1610/1710")
|
||||||
|
@ -128,6 +128,7 @@ static void __init h2_init_smc91x(void)
|
|||||||
|
|
||||||
static void __init h2_init_irq(void)
|
static void __init h2_init_irq(void)
|
||||||
{
|
{
|
||||||
|
omap1_init_common_hw();
|
||||||
omap_init_irq();
|
omap_init_irq();
|
||||||
omap_gpio_init();
|
omap_gpio_init();
|
||||||
h2_init_smc91x();
|
h2_init_smc91x();
|
||||||
@ -194,7 +195,7 @@ static void __init h2_init(void)
|
|||||||
|
|
||||||
static void __init h2_map_io(void)
|
static void __init h2_map_io(void)
|
||||||
{
|
{
|
||||||
omap_map_common_io();
|
omap1_map_common_io();
|
||||||
}
|
}
|
||||||
|
|
||||||
MACHINE_START(OMAP_H2, "TI-H2")
|
MACHINE_START(OMAP_H2, "TI-H2")
|
||||||
|
@ -203,6 +203,7 @@ static void __init h3_init_smc91x(void)
|
|||||||
|
|
||||||
void h3_init_irq(void)
|
void h3_init_irq(void)
|
||||||
{
|
{
|
||||||
|
omap1_init_common_hw();
|
||||||
omap_init_irq();
|
omap_init_irq();
|
||||||
omap_gpio_init();
|
omap_gpio_init();
|
||||||
h3_init_smc91x();
|
h3_init_smc91x();
|
||||||
@ -210,7 +211,7 @@ void h3_init_irq(void)
|
|||||||
|
|
||||||
static void __init h3_map_io(void)
|
static void __init h3_map_io(void)
|
||||||
{
|
{
|
||||||
omap_map_common_io();
|
omap1_map_common_io();
|
||||||
}
|
}
|
||||||
|
|
||||||
MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board")
|
MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board")
|
||||||
|
@ -181,6 +181,7 @@ static void __init innovator_init_smc91x(void)
|
|||||||
|
|
||||||
void innovator_init_irq(void)
|
void innovator_init_irq(void)
|
||||||
{
|
{
|
||||||
|
omap1_init_common_hw();
|
||||||
omap_init_irq();
|
omap_init_irq();
|
||||||
omap_gpio_init();
|
omap_gpio_init();
|
||||||
#ifdef CONFIG_ARCH_OMAP15XX
|
#ifdef CONFIG_ARCH_OMAP15XX
|
||||||
@ -285,7 +286,7 @@ static void __init innovator_init(void)
|
|||||||
|
|
||||||
static void __init innovator_map_io(void)
|
static void __init innovator_map_io(void)
|
||||||
{
|
{
|
||||||
omap_map_common_io();
|
omap1_map_common_io();
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_OMAP15XX
|
#ifdef CONFIG_ARCH_OMAP15XX
|
||||||
if (cpu_is_omap1510()) {
|
if (cpu_is_omap1510()) {
|
||||||
|
@ -65,6 +65,7 @@ static struct omap_board_config_kernel netstar_config[] = {
|
|||||||
|
|
||||||
static void __init netstar_init_irq(void)
|
static void __init netstar_init_irq(void)
|
||||||
{
|
{
|
||||||
|
omap1_init_common_hw();
|
||||||
omap_init_irq();
|
omap_init_irq();
|
||||||
omap_gpio_init();
|
omap_gpio_init();
|
||||||
}
|
}
|
||||||
@ -108,7 +109,7 @@ static void __init netstar_init(void)
|
|||||||
|
|
||||||
static void __init netstar_map_io(void)
|
static void __init netstar_map_io(void)
|
||||||
{
|
{
|
||||||
omap_map_common_io();
|
omap1_map_common_io();
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MACHINE_PANICED 1
|
#define MACHINE_PANICED 1
|
||||||
|
@ -169,6 +169,7 @@ static void __init osk_init_cf(void)
|
|||||||
|
|
||||||
static void __init osk_init_irq(void)
|
static void __init osk_init_irq(void)
|
||||||
{
|
{
|
||||||
|
omap1_init_common_hw();
|
||||||
omap_init_irq();
|
omap_init_irq();
|
||||||
omap_gpio_init();
|
omap_gpio_init();
|
||||||
osk_init_smc91x();
|
osk_init_smc91x();
|
||||||
@ -269,7 +270,7 @@ static void __init osk_init(void)
|
|||||||
|
|
||||||
static void __init osk_map_io(void)
|
static void __init osk_map_io(void)
|
||||||
{
|
{
|
||||||
omap_map_common_io();
|
omap1_map_common_io();
|
||||||
}
|
}
|
||||||
|
|
||||||
MACHINE_START(OMAP_OSK, "TI-OSK")
|
MACHINE_START(OMAP_OSK, "TI-OSK")
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
|
|
||||||
static void __init omap_generic_init_irq(void)
|
static void __init omap_generic_init_irq(void)
|
||||||
{
|
{
|
||||||
|
omap1_init_common_hw();
|
||||||
omap_init_irq();
|
omap_init_irq();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,7 +73,7 @@ static void __init omap_generic_init(void)
|
|||||||
|
|
||||||
static void __init omap_generic_map_io(void)
|
static void __init omap_generic_map_io(void)
|
||||||
{
|
{
|
||||||
omap_map_common_io();
|
omap1_map_common_io();
|
||||||
}
|
}
|
||||||
|
|
||||||
MACHINE_START(OMAP_PALMTE, "OMAP310 based Palm Tungsten E")
|
MACHINE_START(OMAP_PALMTE, "OMAP310 based Palm Tungsten E")
|
||||||
|
@ -144,6 +144,7 @@ static void __init perseus2_init_smc91x(void)
|
|||||||
|
|
||||||
void omap_perseus2_init_irq(void)
|
void omap_perseus2_init_irq(void)
|
||||||
{
|
{
|
||||||
|
omap1_init_common_hw();
|
||||||
omap_init_irq();
|
omap_init_irq();
|
||||||
omap_gpio_init();
|
omap_gpio_init();
|
||||||
perseus2_init_smc91x();
|
perseus2_init_smc91x();
|
||||||
@ -160,7 +161,7 @@ static struct map_desc omap_perseus2_io_desc[] __initdata = {
|
|||||||
|
|
||||||
static void __init omap_perseus2_map_io(void)
|
static void __init omap_perseus2_map_io(void)
|
||||||
{
|
{
|
||||||
omap_map_common_io();
|
omap1_map_common_io();
|
||||||
iotable_init(omap_perseus2_io_desc,
|
iotable_init(omap_perseus2_io_desc,
|
||||||
ARRAY_SIZE(omap_perseus2_io_desc));
|
ARRAY_SIZE(omap_perseus2_io_desc));
|
||||||
|
|
||||||
|
@ -162,6 +162,7 @@ static struct omap_board_config_kernel voiceblue_config[] = {
|
|||||||
|
|
||||||
static void __init voiceblue_init_irq(void)
|
static void __init voiceblue_init_irq(void)
|
||||||
{
|
{
|
||||||
|
omap1_init_common_hw();
|
||||||
omap_init_irq();
|
omap_init_irq();
|
||||||
omap_gpio_init();
|
omap_gpio_init();
|
||||||
}
|
}
|
||||||
@ -206,7 +207,7 @@ static void __init voiceblue_init(void)
|
|||||||
|
|
||||||
static void __init voiceblue_map_io(void)
|
static void __init voiceblue_map_io(void)
|
||||||
{
|
{
|
||||||
omap_map_common_io();
|
omap1_map_common_io();
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MACHINE_PANICED 1
|
#define MACHINE_PANICED 1
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
|
|
||||||
|
#include <asm/tlb.h>
|
||||||
#include <asm/mach/map.h>
|
#include <asm/mach/map.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/arch/mux.h>
|
#include <asm/arch/mux.h>
|
||||||
@ -83,15 +84,24 @@ static struct map_desc omap16xx_io_desc[] __initdata = {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int initialized = 0;
|
/*
|
||||||
|
* Maps common IO regions for omap1. This should only get called from
|
||||||
static void __init _omap_map_io(void)
|
* board specific init.
|
||||||
|
*/
|
||||||
|
void __init omap1_map_common_io(void)
|
||||||
{
|
{
|
||||||
initialized = 1;
|
|
||||||
|
|
||||||
/* We have to initialize the IO space mapping before we can run
|
|
||||||
* cpu_is_omapxxx() macros. */
|
|
||||||
iotable_init(omap_io_desc, ARRAY_SIZE(omap_io_desc));
|
iotable_init(omap_io_desc, ARRAY_SIZE(omap_io_desc));
|
||||||
|
|
||||||
|
/* Normally devicemaps_init() would flush caches and tlb after
|
||||||
|
* mdesc->map_io(), but we must also do it here because of the CPU
|
||||||
|
* revision check below.
|
||||||
|
*/
|
||||||
|
local_flush_tlb_all();
|
||||||
|
flush_cache_all();
|
||||||
|
|
||||||
|
/* We want to check CPU revision early for cpu_is_omapxxxx() macros.
|
||||||
|
* IO space mapping must be initialized before we can do that.
|
||||||
|
*/
|
||||||
omap_check_revision();
|
omap_check_revision();
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_OMAP730
|
#ifdef CONFIG_ARCH_OMAP730
|
||||||
@ -111,7 +121,14 @@ static void __init _omap_map_io(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
omap_sram_init();
|
omap_sram_init();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Common low-level hardware init for omap1. This should only get called from
|
||||||
|
* board specific init.
|
||||||
|
*/
|
||||||
|
void __init omap1_init_common_hw()
|
||||||
|
{
|
||||||
/* REVISIT: Refer to OMAP5910 Errata, Advisory SYS_1: "Timeout Abort
|
/* REVISIT: Refer to OMAP5910 Errata, Advisory SYS_1: "Timeout Abort
|
||||||
* on a Posted Write in the TIPB Bridge".
|
* on a Posted Write in the TIPB Bridge".
|
||||||
*/
|
*/
|
||||||
@ -121,16 +138,7 @@ static void __init _omap_map_io(void)
|
|||||||
/* Must init clocks early to assure that timer interrupt works
|
/* Must init clocks early to assure that timer interrupt works
|
||||||
*/
|
*/
|
||||||
omap1_clk_init();
|
omap1_clk_init();
|
||||||
}
|
|
||||||
|
omap1_mux_init();
|
||||||
/*
|
|
||||||
* This should only get called from board specific init
|
|
||||||
*/
|
|
||||||
void __init omap_map_common_io(void)
|
|
||||||
{
|
|
||||||
if (!initialized) {
|
|
||||||
_omap_map_io();
|
|
||||||
omap1_mux_init();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
|
|
||||||
static void __init omap_generic_init_irq(void)
|
static void __init omap_generic_init_irq(void)
|
||||||
{
|
{
|
||||||
|
omap2_init_common_hw();
|
||||||
omap_init_irq();
|
omap_init_irq();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,7 +65,7 @@ static void __init omap_generic_init(void)
|
|||||||
|
|
||||||
static void __init omap_generic_map_io(void)
|
static void __init omap_generic_map_io(void)
|
||||||
{
|
{
|
||||||
omap_map_common_io();
|
omap2_map_common_io();
|
||||||
}
|
}
|
||||||
|
|
||||||
MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx")
|
MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx")
|
||||||
|
@ -136,6 +136,7 @@ static inline void __init h4_init_smc91x(void)
|
|||||||
|
|
||||||
static void __init omap_h4_init_irq(void)
|
static void __init omap_h4_init_irq(void)
|
||||||
{
|
{
|
||||||
|
omap2_init_common_hw();
|
||||||
omap_init_irq();
|
omap_init_irq();
|
||||||
omap_gpio_init();
|
omap_gpio_init();
|
||||||
h4_init_smc91x();
|
h4_init_smc91x();
|
||||||
@ -181,7 +182,7 @@ static void __init omap_h4_init(void)
|
|||||||
|
|
||||||
static void __init omap_h4_map_io(void)
|
static void __init omap_h4_map_io(void)
|
||||||
{
|
{
|
||||||
omap_map_common_io();
|
omap2_map_common_io();
|
||||||
}
|
}
|
||||||
|
|
||||||
MACHINE_START(OMAP_H4, "OMAP2420 H4 board")
|
MACHINE_START(OMAP_H4, "OMAP2420 H4 board")
|
||||||
|
@ -182,7 +182,7 @@ static const struct icst307_params realview_oscvco_params = {
|
|||||||
static void realview_oscvco_set(struct clk *clk, struct icst307_vco vco)
|
static void realview_oscvco_set(struct clk *clk, struct icst307_vco vco)
|
||||||
{
|
{
|
||||||
void __iomem *sys_lock = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_LOCK_OFFSET;
|
void __iomem *sys_lock = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_LOCK_OFFSET;
|
||||||
void __iomem *sys_osc = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_OSC1_OFFSET;
|
void __iomem *sys_osc = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_OSC4_OFFSET;
|
||||||
u32 val;
|
u32 val;
|
||||||
|
|
||||||
val = readl(sys_osc) & ~0x7ffff;
|
val = readl(sys_osc) & ~0x7ffff;
|
||||||
|
@ -40,7 +40,6 @@
|
|||||||
#include <linux/mutex.h>
|
#include <linux/mutex.h>
|
||||||
|
|
||||||
#include <asm/hardware.h>
|
#include <asm/hardware.h>
|
||||||
#include <asm/atomic.h>
|
|
||||||
#include <asm/irq.h>
|
#include <asm/irq.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
|
|
||||||
@ -59,22 +58,18 @@ static DEFINE_MUTEX(clocks_mutex);
|
|||||||
void inline s3c24xx_clk_enable(unsigned int clocks, unsigned int enable)
|
void inline s3c24xx_clk_enable(unsigned int clocks, unsigned int enable)
|
||||||
{
|
{
|
||||||
unsigned long clkcon;
|
unsigned long clkcon;
|
||||||
unsigned long flags;
|
|
||||||
|
|
||||||
local_irq_save(flags);
|
|
||||||
|
|
||||||
clkcon = __raw_readl(S3C2410_CLKCON);
|
clkcon = __raw_readl(S3C2410_CLKCON);
|
||||||
clkcon &= ~clocks;
|
|
||||||
|
|
||||||
if (enable)
|
if (enable)
|
||||||
clkcon |= clocks;
|
clkcon |= clocks;
|
||||||
|
else
|
||||||
|
clkcon &= ~clocks;
|
||||||
|
|
||||||
/* ensure none of the special function bits set */
|
/* ensure none of the special function bits set */
|
||||||
clkcon &= ~(S3C2410_CLKCON_IDLE|S3C2410_CLKCON_POWER);
|
clkcon &= ~(S3C2410_CLKCON_IDLE|S3C2410_CLKCON_POWER);
|
||||||
|
|
||||||
__raw_writel(clkcon, S3C2410_CLKCON);
|
__raw_writel(clkcon, S3C2410_CLKCON);
|
||||||
|
|
||||||
local_irq_restore(flags);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* enable and disable calls for use with the clk struct */
|
/* enable and disable calls for use with the clk struct */
|
||||||
@ -138,16 +133,32 @@ void clk_put(struct clk *clk)
|
|||||||
|
|
||||||
int clk_enable(struct clk *clk)
|
int clk_enable(struct clk *clk)
|
||||||
{
|
{
|
||||||
if (IS_ERR(clk))
|
if (IS_ERR(clk) || clk == NULL)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
return (clk->enable)(clk, 1);
|
clk_enable(clk->parent);
|
||||||
|
|
||||||
|
mutex_lock(&clocks_mutex);
|
||||||
|
|
||||||
|
if ((clk->usage++) == 0)
|
||||||
|
(clk->enable)(clk, 1);
|
||||||
|
|
||||||
|
mutex_unlock(&clocks_mutex);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void clk_disable(struct clk *clk)
|
void clk_disable(struct clk *clk)
|
||||||
{
|
{
|
||||||
if (!IS_ERR(clk))
|
if (IS_ERR(clk) || clk == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
mutex_lock(&clocks_mutex);
|
||||||
|
|
||||||
|
if ((--clk->usage) == 0)
|
||||||
(clk->enable)(clk, 0);
|
(clk->enable)(clk, 0);
|
||||||
|
|
||||||
|
mutex_unlock(&clocks_mutex);
|
||||||
|
clk_disable(clk->parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -361,6 +372,14 @@ int s3c24xx_register_clock(struct clk *clk)
|
|||||||
if (clk->enable == NULL)
|
if (clk->enable == NULL)
|
||||||
clk->enable = clk_null_enable;
|
clk->enable = clk_null_enable;
|
||||||
|
|
||||||
|
/* if this is a standard clock, set the usage state */
|
||||||
|
|
||||||
|
if (clk->ctrlbit) {
|
||||||
|
unsigned long clkcon = __raw_readl(S3C2410_CLKCON);
|
||||||
|
|
||||||
|
clk->usage = (clkcon & clk->ctrlbit) ? 1 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* add to the list of available clocks */
|
/* add to the list of available clocks */
|
||||||
|
|
||||||
mutex_lock(&clocks_mutex);
|
mutex_lock(&clocks_mutex);
|
||||||
@ -402,6 +421,8 @@ int __init s3c24xx_setup_clocks(unsigned long xtal,
|
|||||||
* the LCD clock if it is not needed.
|
* the LCD clock if it is not needed.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
mutex_lock(&clocks_mutex);
|
||||||
|
|
||||||
s3c24xx_clk_enable(S3C2410_CLKCON_NAND, 0);
|
s3c24xx_clk_enable(S3C2410_CLKCON_NAND, 0);
|
||||||
s3c24xx_clk_enable(S3C2410_CLKCON_USBH, 0);
|
s3c24xx_clk_enable(S3C2410_CLKCON_USBH, 0);
|
||||||
s3c24xx_clk_enable(S3C2410_CLKCON_USBD, 0);
|
s3c24xx_clk_enable(S3C2410_CLKCON_USBD, 0);
|
||||||
@ -409,6 +430,8 @@ int __init s3c24xx_setup_clocks(unsigned long xtal,
|
|||||||
s3c24xx_clk_enable(S3C2410_CLKCON_IIC, 0);
|
s3c24xx_clk_enable(S3C2410_CLKCON_IIC, 0);
|
||||||
s3c24xx_clk_enable(S3C2410_CLKCON_SPI, 0);
|
s3c24xx_clk_enable(S3C2410_CLKCON_SPI, 0);
|
||||||
|
|
||||||
|
mutex_unlock(&clocks_mutex);
|
||||||
|
|
||||||
/* assume uart clocks are correctly setup */
|
/* assume uart clocks are correctly setup */
|
||||||
|
|
||||||
/* register our clocks */
|
/* register our clocks */
|
||||||
|
@ -16,6 +16,7 @@ struct clk {
|
|||||||
struct clk *parent;
|
struct clk *parent;
|
||||||
const char *name;
|
const char *name;
|
||||||
int id;
|
int id;
|
||||||
|
int usage;
|
||||||
unsigned long rate;
|
unsigned long rate;
|
||||||
unsigned long ctrlbit;
|
unsigned long ctrlbit;
|
||||||
int (*enable)(struct clk *, int enable);
|
int (*enable)(struct clk *, int enable);
|
||||||
|
@ -275,6 +275,11 @@ static struct resource s3c_adc_resource[] = {
|
|||||||
},
|
},
|
||||||
[1] = {
|
[1] = {
|
||||||
.start = IRQ_TC,
|
.start = IRQ_TC,
|
||||||
|
.end = IRQ_TC,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
|
[2] = {
|
||||||
|
.start = IRQ_ADC,
|
||||||
.end = IRQ_ADC,
|
.end = IRQ_ADC,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
|
|
||||||
#include <asm/mach/map.h>
|
#include <asm/mach/map.h>
|
||||||
|
#include <asm/tlb.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/cacheflush.h>
|
#include <asm/cacheflush.h>
|
||||||
|
|
||||||
@ -95,6 +96,14 @@ void __init omap_map_sram(void)
|
|||||||
omap_sram_io_desc[0].pfn, omap_sram_io_desc[0].virtual,
|
omap_sram_io_desc[0].pfn, omap_sram_io_desc[0].virtual,
|
||||||
omap_sram_io_desc[0].length);
|
omap_sram_io_desc[0].length);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Normally devicemaps_init() would flush caches and tlb after
|
||||||
|
* mdesc->map_io(), but since we're called from map_io(), we
|
||||||
|
* must do it here.
|
||||||
|
*/
|
||||||
|
local_flush_tlb_all();
|
||||||
|
flush_cache_all();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Looks like we need to preserve some bootloader code at the
|
* Looks like we need to preserve some bootloader code at the
|
||||||
* beginning of SRAM for jumping to flash for reboot to work...
|
* beginning of SRAM for jumping to flash for reboot to work...
|
||||||
|
@ -202,18 +202,18 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
|
|||||||
int i;
|
int i;
|
||||||
unsigned long tmp;
|
unsigned long tmp;
|
||||||
|
|
||||||
|
ret = 0;
|
||||||
for (i = 0; i <= PT_MAX; i++) {
|
for (i = 0; i <= PT_MAX; i++) {
|
||||||
tmp = get_reg(child, i);
|
tmp = get_reg(child, i);
|
||||||
|
|
||||||
if (put_user(tmp, datap)) {
|
if (put_user(tmp, datap)) {
|
||||||
ret = -EFAULT;
|
ret = -EFAULT;
|
||||||
goto out_tsk;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
data += sizeof(long);
|
data += sizeof(long);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -222,10 +222,11 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
|
|||||||
int i;
|
int i;
|
||||||
unsigned long tmp;
|
unsigned long tmp;
|
||||||
|
|
||||||
|
ret = 0;
|
||||||
for (i = 0; i <= PT_MAX; i++) {
|
for (i = 0; i <= PT_MAX; i++) {
|
||||||
if (get_user(tmp, datap)) {
|
if (get_user(tmp, datap)) {
|
||||||
ret = -EFAULT;
|
ret = -EFAULT;
|
||||||
goto out_tsk;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == PT_DCCR) {
|
if (i == PT_DCCR) {
|
||||||
@ -237,7 +238,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
|
|||||||
data += sizeof(long);
|
data += sizeof(long);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
/*
|
/*
|
||||||
* Setup options
|
* Setup options
|
||||||
*/
|
*/
|
||||||
struct drive_info_struct { char dummy[32]; } drive_info;
|
|
||||||
struct screen_info screen_info;
|
struct screen_info screen_info;
|
||||||
|
|
||||||
extern int root_mountflags;
|
extern int root_mountflags;
|
||||||
|
@ -309,3 +309,4 @@ ENTRY(sys_call_table)
|
|||||||
.long sys_faccessat
|
.long sys_faccessat
|
||||||
.long sys_pselect6
|
.long sys_pselect6
|
||||||
.long sys_ppoll
|
.long sys_ppoll
|
||||||
|
.long sys_unshare /* 310 */
|
||||||
|
@ -25,16 +25,6 @@
|
|||||||
#include <asm/machvec.h>
|
#include <asm/machvec.h>
|
||||||
#include <asm/system.h>
|
#include <asm/system.h>
|
||||||
|
|
||||||
/*
|
|
||||||
* This is here so we can use the CMOS detection in ide-probe.c to
|
|
||||||
* determine what drives are present. In theory, we don't need this
|
|
||||||
* as the auto-detection could be done via ide-probe.c:do_probe() but
|
|
||||||
* in practice that would be much slower, which is painful when
|
|
||||||
* running in the simulator. Note that passing zeroes in DRIVE_INFO
|
|
||||||
* is sufficient (the IDE driver will autodetect the drive geometry).
|
|
||||||
*/
|
|
||||||
char drive_info[4*16];
|
|
||||||
|
|
||||||
void __init
|
void __init
|
||||||
dig_setup (char **cmdline_p)
|
dig_setup (char **cmdline_p)
|
||||||
{
|
{
|
||||||
|
@ -410,24 +410,16 @@ efi_init (void)
|
|||||||
efi_config_table_t *config_tables;
|
efi_config_table_t *config_tables;
|
||||||
efi_char16_t *c16;
|
efi_char16_t *c16;
|
||||||
u64 efi_desc_size;
|
u64 efi_desc_size;
|
||||||
char *cp, *end, vendor[100] = "unknown";
|
char *cp, vendor[100] = "unknown";
|
||||||
extern char saved_command_line[];
|
extern char saved_command_line[];
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* it's too early to be able to use the standard kernel command line support... */
|
/* it's too early to be able to use the standard kernel command line support... */
|
||||||
for (cp = saved_command_line; *cp; ) {
|
for (cp = saved_command_line; *cp; ) {
|
||||||
if (memcmp(cp, "mem=", 4) == 0) {
|
if (memcmp(cp, "mem=", 4) == 0) {
|
||||||
cp += 4;
|
mem_limit = memparse(cp + 4, &cp);
|
||||||
mem_limit = memparse(cp, &end);
|
|
||||||
if (end != cp)
|
|
||||||
break;
|
|
||||||
cp = end;
|
|
||||||
} else if (memcmp(cp, "max_addr=", 9) == 0) {
|
} else if (memcmp(cp, "max_addr=", 9) == 0) {
|
||||||
cp += 9;
|
max_addr = GRANULEROUNDDOWN(memparse(cp + 9, &cp));
|
||||||
max_addr = GRANULEROUNDDOWN(memparse(cp, &end));
|
|
||||||
if (end != cp)
|
|
||||||
break;
|
|
||||||
cp = end;
|
|
||||||
} else {
|
} else {
|
||||||
while (*cp != ' ' && *cp)
|
while (*cp != ' ' && *cp)
|
||||||
++cp;
|
++cp;
|
||||||
@ -458,7 +450,7 @@ efi_init (void)
|
|||||||
/* Show what we know for posterity */
|
/* Show what we know for posterity */
|
||||||
c16 = __va(efi.systab->fw_vendor);
|
c16 = __va(efi.systab->fw_vendor);
|
||||||
if (c16) {
|
if (c16) {
|
||||||
for (i = 0;i < (int) sizeof(vendor) && *c16; ++i)
|
for (i = 0;i < (int) sizeof(vendor) - 1 && *c16; ++i)
|
||||||
vendor[i] = *c16++;
|
vendor[i] = *c16++;
|
||||||
vendor[i] = '\0';
|
vendor[i] = '\0';
|
||||||
}
|
}
|
||||||
|
@ -352,6 +352,7 @@ start_ap:
|
|||||||
mov ar.rsc=0 // place RSE in enforced lazy mode
|
mov ar.rsc=0 // place RSE in enforced lazy mode
|
||||||
;;
|
;;
|
||||||
loadrs // clear the dirty partition
|
loadrs // clear the dirty partition
|
||||||
|
mov IA64_KR(PER_CPU_DATA)=r0 // clear physical per-CPU base
|
||||||
;;
|
;;
|
||||||
mov ar.bspstore=r2 // establish the new RSE stack
|
mov ar.bspstore=r2 // establish the new RSE stack
|
||||||
;;
|
;;
|
||||||
|
@ -71,6 +71,8 @@ unsigned long __per_cpu_offset[NR_CPUS];
|
|||||||
EXPORT_SYMBOL(__per_cpu_offset);
|
EXPORT_SYMBOL(__per_cpu_offset);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
extern void ia64_setup_printk_clock(void);
|
||||||
|
|
||||||
DEFINE_PER_CPU(struct cpuinfo_ia64, cpu_info);
|
DEFINE_PER_CPU(struct cpuinfo_ia64, cpu_info);
|
||||||
DEFINE_PER_CPU(unsigned long, local_per_cpu_offset);
|
DEFINE_PER_CPU(unsigned long, local_per_cpu_offset);
|
||||||
DEFINE_PER_CPU(unsigned long, ia64_phys_stacked_size_p8);
|
DEFINE_PER_CPU(unsigned long, ia64_phys_stacked_size_p8);
|
||||||
@ -445,6 +447,8 @@ setup_arch (char **cmdline_p)
|
|||||||
/* process SAL system table: */
|
/* process SAL system table: */
|
||||||
ia64_sal_init(efi.sal_systab);
|
ia64_sal_init(efi.sal_systab);
|
||||||
|
|
||||||
|
ia64_setup_printk_clock();
|
||||||
|
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
cpu_physical_id(0) = hard_smp_processor_id();
|
cpu_physical_id(0) = hard_smp_processor_id();
|
||||||
|
|
||||||
|
@ -278,3 +278,30 @@ udelay (unsigned long usecs)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(udelay);
|
EXPORT_SYMBOL(udelay);
|
||||||
|
|
||||||
|
static unsigned long long ia64_itc_printk_clock(void)
|
||||||
|
{
|
||||||
|
if (ia64_get_kr(IA64_KR_PER_CPU_DATA))
|
||||||
|
return sched_clock();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static unsigned long long ia64_default_printk_clock(void)
|
||||||
|
{
|
||||||
|
return (unsigned long long)(jiffies_64 - INITIAL_JIFFIES) *
|
||||||
|
(1000000000/HZ);
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned long long (*ia64_printk_clock)(void) = &ia64_default_printk_clock;
|
||||||
|
|
||||||
|
unsigned long long printk_clock(void)
|
||||||
|
{
|
||||||
|
return ia64_printk_clock();
|
||||||
|
}
|
||||||
|
|
||||||
|
void __init
|
||||||
|
ia64_setup_printk_clock(void)
|
||||||
|
{
|
||||||
|
if (!(sal_platform_features & IA64_SAL_PLATFORM_FEATURE_ITC_DRIFT))
|
||||||
|
ia64_printk_clock = ia64_itc_printk_clock;
|
||||||
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* License. See the file "COPYING" in the main directory of this archive
|
* License. See the file "COPYING" in the main directory of this archive
|
||||||
* for more details.
|
* for more details.
|
||||||
*
|
*
|
||||||
* Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
|
* Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
@ -137,7 +137,8 @@ int sn_salinfo_platform_oemdata(const u8 *sect_header, u8 **oemdata, u64 *oemdat
|
|||||||
|
|
||||||
static int __init sn_salinfo_init(void)
|
static int __init sn_salinfo_init(void)
|
||||||
{
|
{
|
||||||
salinfo_platform_oemdata = &sn_salinfo_platform_oemdata;
|
if (ia64_platform_is("sn2"))
|
||||||
|
salinfo_platform_oemdata = &sn_salinfo_platform_oemdata;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,6 +67,7 @@ extern unsigned long last_time_offset;
|
|||||||
extern void (*ia64_mark_idle) (int);
|
extern void (*ia64_mark_idle) (int);
|
||||||
extern void snidle(int);
|
extern void snidle(int);
|
||||||
extern unsigned char acpi_kbd_controller_present;
|
extern unsigned char acpi_kbd_controller_present;
|
||||||
|
extern unsigned long long (*ia64_printk_clock)(void);
|
||||||
|
|
||||||
unsigned long sn_rtc_cycles_per_second;
|
unsigned long sn_rtc_cycles_per_second;
|
||||||
EXPORT_SYMBOL(sn_rtc_cycles_per_second);
|
EXPORT_SYMBOL(sn_rtc_cycles_per_second);
|
||||||
@ -124,20 +125,6 @@ struct screen_info sn_screen_info = {
|
|||||||
.orig_video_points = 16
|
.orig_video_points = 16
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
* This is here so we can use the CMOS detection in ide-probe.c to
|
|
||||||
* determine what drives are present. In theory, we don't need this
|
|
||||||
* as the auto-detection could be done via ide-probe.c:do_probe() but
|
|
||||||
* in practice that would be much slower, which is painful when
|
|
||||||
* running in the simulator. Note that passing zeroes in DRIVE_INFO
|
|
||||||
* is sufficient (the IDE driver will autodetect the drive geometry).
|
|
||||||
*/
|
|
||||||
#ifdef CONFIG_IA64_GENERIC
|
|
||||||
extern char drive_info[4 * 16];
|
|
||||||
#else
|
|
||||||
char drive_info[4 * 16];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This routine can only be used during init, since
|
* This routine can only be used during init, since
|
||||||
* smp_boot_data is an init data structure.
|
* smp_boot_data is an init data structure.
|
||||||
@ -372,6 +359,16 @@ sn_scan_pcdp(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static unsigned long sn2_rtc_initial;
|
||||||
|
|
||||||
|
static unsigned long long ia64_sn2_printk_clock(void)
|
||||||
|
{
|
||||||
|
unsigned long rtc_now = rtc_time();
|
||||||
|
|
||||||
|
return (rtc_now - sn2_rtc_initial) *
|
||||||
|
(1000000000 / sn_rtc_cycles_per_second);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sn_setup - SN platform setup routine
|
* sn_setup - SN platform setup routine
|
||||||
* @cmdline_p: kernel command line
|
* @cmdline_p: kernel command line
|
||||||
@ -386,6 +383,7 @@ void __init sn_setup(char **cmdline_p)
|
|||||||
u32 version = sn_sal_rev();
|
u32 version = sn_sal_rev();
|
||||||
extern void sn_cpu_init(void);
|
extern void sn_cpu_init(void);
|
||||||
|
|
||||||
|
sn2_rtc_initial = rtc_time();
|
||||||
ia64_sn_plat_set_error_handling_features(); // obsolete
|
ia64_sn_plat_set_error_handling_features(); // obsolete
|
||||||
ia64_sn_set_os_feature(OSF_MCA_SLV_TO_OS_INIT_SLV);
|
ia64_sn_set_os_feature(OSF_MCA_SLV_TO_OS_INIT_SLV);
|
||||||
ia64_sn_set_os_feature(OSF_FEAT_LOG_SBES);
|
ia64_sn_set_os_feature(OSF_FEAT_LOG_SBES);
|
||||||
@ -437,19 +435,6 @@ void __init sn_setup(char **cmdline_p)
|
|||||||
*/
|
*/
|
||||||
build_cnode_tables();
|
build_cnode_tables();
|
||||||
|
|
||||||
/*
|
|
||||||
* Old PROMs do not provide an ACPI FADT. Disable legacy keyboard
|
|
||||||
* support here so we don't have to listen to failed keyboard probe
|
|
||||||
* messages.
|
|
||||||
*/
|
|
||||||
if (version <= 0x0209 && acpi_kbd_controller_present) {
|
|
||||||
printk(KERN_INFO "Disabling legacy keyboard support as prom "
|
|
||||||
"is too old and doesn't provide FADT\n");
|
|
||||||
acpi_kbd_controller_present = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
printk("SGI SAL version %x.%02x\n", version >> 8, version & 0x00FF);
|
|
||||||
|
|
||||||
status =
|
status =
|
||||||
ia64_sal_freq_base(SAL_FREQ_BASE_REALTIME_CLOCK, &ticks_per_sec,
|
ia64_sal_freq_base(SAL_FREQ_BASE_REALTIME_CLOCK, &ticks_per_sec,
|
||||||
&drift);
|
&drift);
|
||||||
@ -463,6 +448,21 @@ void __init sn_setup(char **cmdline_p)
|
|||||||
|
|
||||||
platform_intr_list[ACPI_INTERRUPT_CPEI] = IA64_CPE_VECTOR;
|
platform_intr_list[ACPI_INTERRUPT_CPEI] = IA64_CPE_VECTOR;
|
||||||
|
|
||||||
|
ia64_printk_clock = ia64_sn2_printk_clock;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Old PROMs do not provide an ACPI FADT. Disable legacy keyboard
|
||||||
|
* support here so we don't have to listen to failed keyboard probe
|
||||||
|
* messages.
|
||||||
|
*/
|
||||||
|
if (version <= 0x0209 && acpi_kbd_controller_present) {
|
||||||
|
printk(KERN_INFO "Disabling legacy keyboard support as prom "
|
||||||
|
"is too old and doesn't provide FADT\n");
|
||||||
|
acpi_kbd_controller_present = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
printk("SGI SAL version %x.%02x\n", version >> 8, version & 0x00FF);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* we set the default root device to /dev/hda
|
* we set the default root device to /dev/hda
|
||||||
* to make simulation easy
|
* to make simulation easy
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* License. See the file "COPYING" in the main directory of this archive
|
* License. See the file "COPYING" in the main directory of this archive
|
||||||
* for more details.
|
* for more details.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2004-2005 Silicon Graphics, Inc. All rights reserved.
|
* Copyright (C) 2004-2006 Silicon Graphics, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* SGI Altix topology and hardware performance monitoring API.
|
* SGI Altix topology and hardware performance monitoring API.
|
||||||
* Mark Goodwin <markgw@sgi.com>.
|
* Mark Goodwin <markgw@sgi.com>.
|
||||||
@ -973,6 +973,9 @@ static int __devinit sn_hwperf_misc_register_init(void)
|
|||||||
{
|
{
|
||||||
int e;
|
int e;
|
||||||
|
|
||||||
|
if (!ia64_platform_is("sn2"))
|
||||||
|
return 0;
|
||||||
|
|
||||||
sn_hwperf_init();
|
sn_hwperf_init();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -18,11 +18,6 @@
|
|||||||
#include <asm/irq.h>
|
#include <asm/irq.h>
|
||||||
#include <asm/tlbflush.h>
|
#include <asm/tlbflush.h>
|
||||||
|
|
||||||
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_HD) || defined(CONFIG_BLK_DEV_IDE_MODULE) || defined(CONFIG_BLK_DEV_HD_MODULE)
|
|
||||||
extern struct drive_info_struct drive_info;
|
|
||||||
EXPORT_SYMBOL(drive_info);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* platform dependent support */
|
/* platform dependent support */
|
||||||
EXPORT_SYMBOL(boot_cpu_data);
|
EXPORT_SYMBOL(boot_cpu_data);
|
||||||
EXPORT_SYMBOL(dump_fpu);
|
EXPORT_SYMBOL(dump_fpu);
|
||||||
|
@ -37,12 +37,6 @@
|
|||||||
extern void init_mmu(void);
|
extern void init_mmu(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_HD) \
|
|
||||||
|| defined(CONFIG_BLK_DEV_IDE_MODULE) \
|
|
||||||
|| defined(CONFIG_BLK_DEV_HD_MODULE)
|
|
||||||
struct drive_info_struct { char dummy[32]; } drive_info;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern char _end[];
|
extern char _end[];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -39,6 +39,14 @@
|
|||||||
|
|
||||||
asmlinkage void ret_from_fork(void);
|
asmlinkage void ret_from_fork(void);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The following aren't currently used.
|
||||||
|
*/
|
||||||
|
void (*pm_idle)(void);
|
||||||
|
EXPORT_SYMBOL(pm_idle);
|
||||||
|
|
||||||
|
void (*pm_power_off)(void);
|
||||||
|
EXPORT_SYMBOL(pm_power_off);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The idle loop on an m68knommu..
|
* The idle loop on an m68knommu..
|
||||||
|
@ -140,7 +140,7 @@ void __init plat_setup(void)
|
|||||||
uart.type = PORT_UNKNOWN;
|
uart.type = PORT_UNKNOWN;
|
||||||
uart.uartclk = 18432000;
|
uart.uartclk = 18432000;
|
||||||
uart.irq = COBALT_SERIAL_IRQ;
|
uart.irq = COBALT_SERIAL_IRQ;
|
||||||
uart.flags = STD_COM_FLAGS;
|
uart.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST;
|
||||||
uart.iobase = 0xc800000;
|
uart.iobase = 0xc800000;
|
||||||
uart.iotype = UPIO_PORT;
|
uart.iotype = UPIO_PORT;
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
* for more details.
|
* for more details.
|
||||||
*
|
*
|
||||||
* Copyright (C) 1994 - 1999, 2000 by Ralf Baechle and others.
|
* Copyright (C) 1994 - 1999, 2000 by Ralf Baechle and others.
|
||||||
|
* Copyright (C) 2005, 2006 by Ralf Baechle (ralf@linux-mips.org)
|
||||||
* Copyright (C) 1999, 2000 Silicon Graphics, Inc.
|
* Copyright (C) 1999, 2000 Silicon Graphics, Inc.
|
||||||
* Copyright (C) 2004 Thiemo Seufer
|
* Copyright (C) 2004 Thiemo Seufer
|
||||||
*/
|
*/
|
||||||
@ -58,8 +59,8 @@ ATTRIB_NORET void cpu_idle(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extern int do_signal(sigset_t *oldset, struct pt_regs *regs);
|
extern void do_signal(struct pt_regs *regs);
|
||||||
extern int do_signal32(sigset_t *oldset, struct pt_regs *regs);
|
extern void do_signal32(struct pt_regs *regs);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Native o32 and N64 ABI without DSP ASE
|
* Native o32 and N64 ABI without DSP ASE
|
||||||
|
@ -617,6 +617,23 @@ einval: li v0, -EINVAL
|
|||||||
sys sys_inotify_init 0
|
sys sys_inotify_init 0
|
||||||
sys sys_inotify_add_watch 3 /* 4285 */
|
sys sys_inotify_add_watch 3 /* 4285 */
|
||||||
sys sys_inotify_rm_watch 2
|
sys sys_inotify_rm_watch 2
|
||||||
|
sys sys_migrate_pages 4
|
||||||
|
sys sys_openat 4
|
||||||
|
sys sys_mkdirat 3
|
||||||
|
sys sys_mknodat 4 /* 4290 */
|
||||||
|
sys sys_fchownat 5
|
||||||
|
sys sys_futimesat 3
|
||||||
|
sys sys_newfstatat 4
|
||||||
|
sys sys_unlinkat 3
|
||||||
|
sys sys_renameat 4 /* 4295 */
|
||||||
|
sys sys_linkat 4
|
||||||
|
sys sys_symlinkat 3
|
||||||
|
sys sys_readlinkat 4
|
||||||
|
sys sys_fchmodat 3
|
||||||
|
sys sys_faccessat 3 /* 4300 */
|
||||||
|
sys sys_pselect6 6
|
||||||
|
sys sys_ppoll 5
|
||||||
|
sys sys_unshare 1
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
/* We pre-compute the number of _instruction_ bytes needed to
|
/* We pre-compute the number of _instruction_ bytes needed to
|
||||||
|
@ -443,3 +443,20 @@ sys_call_table:
|
|||||||
PTR sys_inotify_init
|
PTR sys_inotify_init
|
||||||
PTR sys_inotify_add_watch
|
PTR sys_inotify_add_watch
|
||||||
PTR sys_inotify_rm_watch /* 5245 */
|
PTR sys_inotify_rm_watch /* 5245 */
|
||||||
|
PTR sys_migrate_pages
|
||||||
|
PTR sys_openat
|
||||||
|
PTR sys_mkdirat
|
||||||
|
PTR sys_mknodat
|
||||||
|
PTR sys_fchownat /* 5250 */
|
||||||
|
PTR sys_futimesat
|
||||||
|
PTR sys_newfstatat
|
||||||
|
PTR sys_unlinkat
|
||||||
|
PTR sys_renameat
|
||||||
|
PTR sys_linkat /* 5255 */
|
||||||
|
PTR sys_symlinkat
|
||||||
|
PTR sys_readlinkat
|
||||||
|
PTR sys_fchmodat
|
||||||
|
PTR sys_faccessat
|
||||||
|
PTR sys_pselect6 /* 5260 */
|
||||||
|
PTR sys_ppoll
|
||||||
|
PTR sys_unshare
|
||||||
|
@ -369,3 +369,20 @@ EXPORT(sysn32_call_table)
|
|||||||
PTR sys_inotify_init
|
PTR sys_inotify_init
|
||||||
PTR sys_inotify_add_watch
|
PTR sys_inotify_add_watch
|
||||||
PTR sys_inotify_rm_watch
|
PTR sys_inotify_rm_watch
|
||||||
|
PTR sys_migrate_pages /* 6250 */
|
||||||
|
PTR sys_openat
|
||||||
|
PTR sys_mkdirat
|
||||||
|
PTR sys_mknodat
|
||||||
|
PTR sys_fchownat
|
||||||
|
PTR sys_futimesat /* 6255 */
|
||||||
|
PTR sys_newfstatat
|
||||||
|
PTR sys_unlinkat
|
||||||
|
PTR sys_renameat
|
||||||
|
PTR sys_linkat
|
||||||
|
PTR sys_symlinkat /* 6260 */
|
||||||
|
PTR sys_readlinkat
|
||||||
|
PTR sys_fchmodat
|
||||||
|
PTR sys_faccessat
|
||||||
|
PTR sys_pselect6
|
||||||
|
PTR sys_ppoll /* 6265 */
|
||||||
|
PTR sys_unshare
|
||||||
|
@ -491,4 +491,21 @@ sys_call_table:
|
|||||||
PTR sys_inotify_init
|
PTR sys_inotify_init
|
||||||
PTR sys_inotify_add_watch /* 4285 */
|
PTR sys_inotify_add_watch /* 4285 */
|
||||||
PTR sys_inotify_rm_watch
|
PTR sys_inotify_rm_watch
|
||||||
|
PTR sys_migrate_pages
|
||||||
|
PTR compat_sys_openat
|
||||||
|
PTR sys_mkdirat
|
||||||
|
PTR sys_mknodat /* 4290 */
|
||||||
|
PTR sys_fchownat
|
||||||
|
PTR compat_sys_futimesat
|
||||||
|
PTR compat_sys_newfstatat
|
||||||
|
PTR sys_unlinkat
|
||||||
|
PTR sys_renameat /* 4295 */
|
||||||
|
PTR sys_linkat
|
||||||
|
PTR sys_symlinkat
|
||||||
|
PTR sys_readlinkat
|
||||||
|
PTR sys_fchmodat
|
||||||
|
PTR sys_faccessat /* 4300 */
|
||||||
|
PTR sys_pselect6
|
||||||
|
PTR sys_ppoll
|
||||||
|
PTR sys_unshare
|
||||||
.size sys_call_table,.-sys_call_table
|
.size sys_call_table,.-sys_call_table
|
||||||
|
@ -39,8 +39,6 @@
|
|||||||
|
|
||||||
#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
|
#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
|
||||||
|
|
||||||
int do_signal(sigset_t *oldset, struct pt_regs *regs);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Atomically swap in the new signal mask, and wait for a signal.
|
* Atomically swap in the new signal mask, and wait for a signal.
|
||||||
*/
|
*/
|
||||||
@ -50,7 +48,7 @@ save_static_function(sys_sigsuspend);
|
|||||||
__attribute_used__ noinline static int
|
__attribute_used__ noinline static int
|
||||||
_sys_sigsuspend(nabi_no_regargs struct pt_regs regs)
|
_sys_sigsuspend(nabi_no_regargs struct pt_regs regs)
|
||||||
{
|
{
|
||||||
sigset_t saveset, newset;
|
sigset_t newset;
|
||||||
sigset_t __user *uset;
|
sigset_t __user *uset;
|
||||||
|
|
||||||
uset = (sigset_t __user *) regs.regs[4];
|
uset = (sigset_t __user *) regs.regs[4];
|
||||||
@ -59,19 +57,15 @@ _sys_sigsuspend(nabi_no_regargs struct pt_regs regs)
|
|||||||
sigdelsetmask(&newset, ~_BLOCKABLE);
|
sigdelsetmask(&newset, ~_BLOCKABLE);
|
||||||
|
|
||||||
spin_lock_irq(¤t->sighand->siglock);
|
spin_lock_irq(¤t->sighand->siglock);
|
||||||
saveset = current->blocked;
|
current->saved_sigmask = current->blocked;
|
||||||
current->blocked = newset;
|
current->blocked = newset;
|
||||||
recalc_sigpending();
|
recalc_sigpending();
|
||||||
spin_unlock_irq(¤t->sighand->siglock);
|
spin_unlock_irq(¤t->sighand->siglock);
|
||||||
|
|
||||||
regs.regs[2] = EINTR;
|
current->state = TASK_INTERRUPTIBLE;
|
||||||
regs.regs[7] = 1;
|
schedule();
|
||||||
while (1) {
|
set_thread_flag(TIF_RESTORE_SIGMASK);
|
||||||
current->state = TASK_INTERRUPTIBLE;
|
return -ERESTARTNOHAND;
|
||||||
schedule();
|
|
||||||
if (do_signal(&saveset, ®s))
|
|
||||||
return -EINTR;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -79,7 +73,7 @@ save_static_function(sys_rt_sigsuspend);
|
|||||||
__attribute_used__ noinline static int
|
__attribute_used__ noinline static int
|
||||||
_sys_rt_sigsuspend(nabi_no_regargs struct pt_regs regs)
|
_sys_rt_sigsuspend(nabi_no_regargs struct pt_regs regs)
|
||||||
{
|
{
|
||||||
sigset_t saveset, newset;
|
sigset_t newset;
|
||||||
sigset_t __user *unewset;
|
sigset_t __user *unewset;
|
||||||
size_t sigsetsize;
|
size_t sigsetsize;
|
||||||
|
|
||||||
@ -94,19 +88,15 @@ _sys_rt_sigsuspend(nabi_no_regargs struct pt_regs regs)
|
|||||||
sigdelsetmask(&newset, ~_BLOCKABLE);
|
sigdelsetmask(&newset, ~_BLOCKABLE);
|
||||||
|
|
||||||
spin_lock_irq(¤t->sighand->siglock);
|
spin_lock_irq(¤t->sighand->siglock);
|
||||||
saveset = current->blocked;
|
current->saved_sigmask = current->blocked;
|
||||||
current->blocked = newset;
|
current->blocked = newset;
|
||||||
recalc_sigpending();
|
recalc_sigpending();
|
||||||
spin_unlock_irq(¤t->sighand->siglock);
|
spin_unlock_irq(¤t->sighand->siglock);
|
||||||
|
|
||||||
regs.regs[2] = EINTR;
|
current->state = TASK_INTERRUPTIBLE;
|
||||||
regs.regs[7] = 1;
|
schedule();
|
||||||
while (1) {
|
set_thread_flag(TIF_RESTORE_SIGMASK);
|
||||||
current->state = TASK_INTERRUPTIBLE;
|
return -ERESTARTNOHAND;
|
||||||
schedule();
|
|
||||||
if (do_signal(&saveset, ®s))
|
|
||||||
return -EINTR;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_TRAD_SIGNALS
|
#ifdef CONFIG_TRAD_SIGNALS
|
||||||
@ -315,11 +305,11 @@ int setup_frame(struct k_sigaction * ka, struct pt_regs *regs,
|
|||||||
current->comm, current->pid,
|
current->comm, current->pid,
|
||||||
frame, regs->cp0_epc, frame->regs[31]);
|
frame, regs->cp0_epc, frame->regs[31]);
|
||||||
#endif
|
#endif
|
||||||
return 1;
|
return 0;
|
||||||
|
|
||||||
give_sigsegv:
|
give_sigsegv:
|
||||||
force_sigsegv(signr, current);
|
force_sigsegv(signr, current);
|
||||||
return 0;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -375,11 +365,11 @@ int setup_rt_frame(struct k_sigaction * ka, struct pt_regs *regs,
|
|||||||
current->comm, current->pid,
|
current->comm, current->pid,
|
||||||
frame, regs->cp0_epc, regs->regs[31]);
|
frame, regs->cp0_epc, regs->regs[31]);
|
||||||
#endif
|
#endif
|
||||||
return 1;
|
return 0;
|
||||||
|
|
||||||
give_sigsegv:
|
give_sigsegv:
|
||||||
force_sigsegv(signr, current);
|
force_sigsegv(signr, current);
|
||||||
return 0;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int handle_signal(unsigned long sig, siginfo_t *info,
|
static inline int handle_signal(unsigned long sig, siginfo_t *info,
|
||||||
@ -393,7 +383,7 @@ static inline int handle_signal(unsigned long sig, siginfo_t *info,
|
|||||||
regs->regs[2] = EINTR;
|
regs->regs[2] = EINTR;
|
||||||
break;
|
break;
|
||||||
case ERESTARTSYS:
|
case ERESTARTSYS:
|
||||||
if(!(ka->sa.sa_flags & SA_RESTART)) {
|
if (!(ka->sa.sa_flags & SA_RESTART)) {
|
||||||
regs->regs[2] = EINTR;
|
regs->regs[2] = EINTR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -420,9 +410,10 @@ static inline int handle_signal(unsigned long sig, siginfo_t *info,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int do_signal(sigset_t *oldset, struct pt_regs *regs)
|
void do_signal(struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
struct k_sigaction ka;
|
struct k_sigaction ka;
|
||||||
|
sigset_t *oldset;
|
||||||
siginfo_t info;
|
siginfo_t info;
|
||||||
int signr;
|
int signr;
|
||||||
|
|
||||||
@ -432,17 +423,31 @@ int do_signal(sigset_t *oldset, struct pt_regs *regs)
|
|||||||
* if so.
|
* if so.
|
||||||
*/
|
*/
|
||||||
if (!user_mode(regs))
|
if (!user_mode(regs))
|
||||||
return 1;
|
return;
|
||||||
|
|
||||||
if (try_to_freeze())
|
if (try_to_freeze())
|
||||||
goto no_signal;
|
goto no_signal;
|
||||||
|
|
||||||
if (!oldset)
|
if (test_thread_flag(TIF_RESTORE_SIGMASK))
|
||||||
|
oldset = ¤t->saved_sigmask;
|
||||||
|
else
|
||||||
oldset = ¤t->blocked;
|
oldset = ¤t->blocked;
|
||||||
|
|
||||||
|
|
||||||
signr = get_signal_to_deliver(&info, &ka, regs, NULL);
|
signr = get_signal_to_deliver(&info, &ka, regs, NULL);
|
||||||
if (signr > 0)
|
if (signr > 0) {
|
||||||
return handle_signal(signr, &info, &ka, oldset, regs);
|
/* Whee! Actually deliver the signal. */
|
||||||
|
if (handle_signal(signr, &info, &ka, oldset, regs) == 0) {
|
||||||
|
/*
|
||||||
|
* A signal was successfully delivered; the saved
|
||||||
|
* sigmask will have been stored in the signal frame,
|
||||||
|
* and will be restored by sigreturn, so we can simply
|
||||||
|
* clear the TIF_RESTORE_SIGMASK flag.
|
||||||
|
*/
|
||||||
|
if (test_thread_flag(TIF_RESTORE_SIGMASK))
|
||||||
|
clear_thread_flag(TIF_RESTORE_SIGMASK);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
no_signal:
|
no_signal:
|
||||||
/*
|
/*
|
||||||
@ -463,18 +468,25 @@ no_signal:
|
|||||||
regs->cp0_epc -= 4;
|
regs->cp0_epc -= 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
|
||||||
|
/*
|
||||||
|
* If there's no signal to deliver, we just put the saved sigmask
|
||||||
|
* back
|
||||||
|
*/
|
||||||
|
if (test_thread_flag(TIF_RESTORE_SIGMASK)) {
|
||||||
|
clear_thread_flag(TIF_RESTORE_SIGMASK);
|
||||||
|
sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* notification of userspace execution resumption
|
* notification of userspace execution resumption
|
||||||
* - triggered by current->work.notify_resume
|
* - triggered by the TIF_WORK_MASK flags
|
||||||
*/
|
*/
|
||||||
asmlinkage void do_notify_resume(struct pt_regs *regs, sigset_t *oldset,
|
asmlinkage void do_notify_resume(struct pt_regs *regs, void *unused,
|
||||||
__u32 thread_info_flags)
|
__u32 thread_info_flags)
|
||||||
{
|
{
|
||||||
/* deal with pending signal delivery */
|
/* deal with pending signal delivery */
|
||||||
if (thread_info_flags & _TIF_SIGPENDING) {
|
if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK))
|
||||||
current->thread.abi->do_signal(oldset, regs);
|
current->thread.abi->do_signal(regs);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -694,11 +694,11 @@ int setup_frame_32(struct k_sigaction * ka, struct pt_regs *regs,
|
|||||||
current->comm, current->pid,
|
current->comm, current->pid,
|
||||||
frame, regs->cp0_epc, frame->sf_code);
|
frame, regs->cp0_epc, frame->sf_code);
|
||||||
#endif
|
#endif
|
||||||
return 1;
|
return 0;
|
||||||
|
|
||||||
give_sigsegv:
|
give_sigsegv:
|
||||||
force_sigsegv(signr, current);
|
force_sigsegv(signr, current);
|
||||||
return 0;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
int setup_rt_frame_32(struct k_sigaction * ka, struct pt_regs *regs,
|
int setup_rt_frame_32(struct k_sigaction * ka, struct pt_regs *regs,
|
||||||
@ -765,11 +765,11 @@ int setup_rt_frame_32(struct k_sigaction * ka, struct pt_regs *regs,
|
|||||||
current->comm, current->pid,
|
current->comm, current->pid,
|
||||||
frame, regs->cp0_epc, frame->rs_code);
|
frame, regs->cp0_epc, frame->rs_code);
|
||||||
#endif
|
#endif
|
||||||
return 1;
|
return 0;
|
||||||
|
|
||||||
give_sigsegv:
|
give_sigsegv:
|
||||||
force_sigsegv(signr, current);
|
force_sigsegv(signr, current);
|
||||||
return 0;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int handle_signal(unsigned long sig, siginfo_t *info,
|
static inline int handle_signal(unsigned long sig, siginfo_t *info,
|
||||||
|
@ -186,9 +186,9 @@ int setup_rt_frame_n32(struct k_sigaction * ka,
|
|||||||
current->comm, current->pid,
|
current->comm, current->pid,
|
||||||
frame, regs->cp0_epc, regs->regs[31]);
|
frame, regs->cp0_epc, regs->regs[31]);
|
||||||
#endif
|
#endif
|
||||||
return 1;
|
return 0;
|
||||||
|
|
||||||
give_sigsegv:
|
give_sigsegv:
|
||||||
force_sigsegv(signr, current);
|
force_sigsegv(signr, current);
|
||||||
return 0;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
|
@ -212,12 +212,12 @@ asmlinkage int sys_execve(nabi_no_regargs struct pt_regs regs)
|
|||||||
int error;
|
int error;
|
||||||
char * filename;
|
char * filename;
|
||||||
|
|
||||||
filename = getname((char *) (long)regs.regs[4]);
|
filename = getname((char __user *) (long)regs.regs[4]);
|
||||||
error = PTR_ERR(filename);
|
error = PTR_ERR(filename);
|
||||||
if (IS_ERR(filename))
|
if (IS_ERR(filename))
|
||||||
goto out;
|
goto out;
|
||||||
error = do_execve(filename, (char **) (long)regs.regs[5],
|
error = do_execve(filename, (char __user *__user *) (long)regs.regs[5],
|
||||||
(char **) (long)regs.regs[6], ®s);
|
(char __user *__user *) (long)regs.regs[6], ®s);
|
||||||
putname(filename);
|
putname(filename);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
@ -227,7 +227,7 @@ out:
|
|||||||
/*
|
/*
|
||||||
* Compacrapability ...
|
* Compacrapability ...
|
||||||
*/
|
*/
|
||||||
asmlinkage int sys_uname(struct old_utsname * name)
|
asmlinkage int sys_uname(struct old_utsname __user * name)
|
||||||
{
|
{
|
||||||
if (name && !copy_to_user(name, &system_utsname, sizeof (*name)))
|
if (name && !copy_to_user(name, &system_utsname, sizeof (*name)))
|
||||||
return 0;
|
return 0;
|
||||||
@ -237,7 +237,7 @@ asmlinkage int sys_uname(struct old_utsname * name)
|
|||||||
/*
|
/*
|
||||||
* Compacrapability ...
|
* Compacrapability ...
|
||||||
*/
|
*/
|
||||||
asmlinkage int sys_olduname(struct oldold_utsname * name)
|
asmlinkage int sys_olduname(struct oldold_utsname __user * name)
|
||||||
{
|
{
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
@ -274,7 +274,7 @@ void sys_set_thread_area(unsigned long addr)
|
|||||||
asmlinkage int _sys_sysmips(int cmd, long arg1, int arg2, int arg3)
|
asmlinkage int _sys_sysmips(int cmd, long arg1, int arg2, int arg3)
|
||||||
{
|
{
|
||||||
int tmp, len;
|
int tmp, len;
|
||||||
char *name;
|
char __user *name;
|
||||||
|
|
||||||
switch(cmd) {
|
switch(cmd) {
|
||||||
case SETNAME: {
|
case SETNAME: {
|
||||||
@ -283,7 +283,7 @@ asmlinkage int _sys_sysmips(int cmd, long arg1, int arg2, int arg3)
|
|||||||
if (!capable(CAP_SYS_ADMIN))
|
if (!capable(CAP_SYS_ADMIN))
|
||||||
return -EPERM;
|
return -EPERM;
|
||||||
|
|
||||||
name = (char *) arg1;
|
name = (char __user *) arg1;
|
||||||
|
|
||||||
len = strncpy_from_user(nodename, name, __NEW_UTS_LEN);
|
len = strncpy_from_user(nodename, name, __NEW_UTS_LEN);
|
||||||
if (len < 0)
|
if (len < 0)
|
||||||
@ -324,7 +324,7 @@ asmlinkage int _sys_sysmips(int cmd, long arg1, int arg2, int arg3)
|
|||||||
* This is really horribly ugly.
|
* This is really horribly ugly.
|
||||||
*/
|
*/
|
||||||
asmlinkage int sys_ipc (uint call, int first, int second,
|
asmlinkage int sys_ipc (uint call, int first, int second,
|
||||||
unsigned long third, void *ptr, long fifth)
|
unsigned long third, void __user *ptr, long fifth)
|
||||||
{
|
{
|
||||||
int version, ret;
|
int version, ret;
|
||||||
|
|
||||||
@ -333,24 +333,25 @@ asmlinkage int sys_ipc (uint call, int first, int second,
|
|||||||
|
|
||||||
switch (call) {
|
switch (call) {
|
||||||
case SEMOP:
|
case SEMOP:
|
||||||
return sys_semtimedop (first, (struct sembuf *)ptr, second,
|
return sys_semtimedop (first, (struct sembuf __user *)ptr,
|
||||||
NULL);
|
second, NULL);
|
||||||
case SEMTIMEDOP:
|
case SEMTIMEDOP:
|
||||||
return sys_semtimedop (first, (struct sembuf *)ptr, second,
|
return sys_semtimedop (first, (struct sembuf __user *)ptr,
|
||||||
(const struct timespec __user *)fifth);
|
second,
|
||||||
|
(const struct timespec __user *)fifth);
|
||||||
case SEMGET:
|
case SEMGET:
|
||||||
return sys_semget (first, second, third);
|
return sys_semget (first, second, third);
|
||||||
case SEMCTL: {
|
case SEMCTL: {
|
||||||
union semun fourth;
|
union semun fourth;
|
||||||
if (!ptr)
|
if (!ptr)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
if (get_user(fourth.__pad, (void **) ptr))
|
if (get_user(fourth.__pad, (void *__user *) ptr))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
return sys_semctl (first, second, third, fourth);
|
return sys_semctl (first, second, third, fourth);
|
||||||
}
|
}
|
||||||
|
|
||||||
case MSGSND:
|
case MSGSND:
|
||||||
return sys_msgsnd (first, (struct msgbuf *) ptr,
|
return sys_msgsnd (first, (struct msgbuf __user *) ptr,
|
||||||
second, third);
|
second, third);
|
||||||
case MSGRCV:
|
case MSGRCV:
|
||||||
switch (version) {
|
switch (version) {
|
||||||
@ -360,7 +361,7 @@ asmlinkage int sys_ipc (uint call, int first, int second,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (copy_from_user(&tmp,
|
if (copy_from_user(&tmp,
|
||||||
(struct ipc_kludge *) ptr,
|
(struct ipc_kludge __user *) ptr,
|
||||||
sizeof (tmp)))
|
sizeof (tmp)))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
return sys_msgrcv (first, tmp.msgp, second,
|
return sys_msgrcv (first, tmp.msgp, second,
|
||||||
@ -368,35 +369,38 @@ asmlinkage int sys_ipc (uint call, int first, int second,
|
|||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
return sys_msgrcv (first,
|
return sys_msgrcv (first,
|
||||||
(struct msgbuf *) ptr,
|
(struct msgbuf __user *) ptr,
|
||||||
second, fifth, third);
|
second, fifth, third);
|
||||||
}
|
}
|
||||||
case MSGGET:
|
case MSGGET:
|
||||||
return sys_msgget ((key_t) first, second);
|
return sys_msgget ((key_t) first, second);
|
||||||
case MSGCTL:
|
case MSGCTL:
|
||||||
return sys_msgctl (first, second, (struct msqid_ds *) ptr);
|
return sys_msgctl (first, second,
|
||||||
|
(struct msqid_ds __user *) ptr);
|
||||||
|
|
||||||
case SHMAT:
|
case SHMAT:
|
||||||
switch (version) {
|
switch (version) {
|
||||||
default: {
|
default: {
|
||||||
ulong raddr;
|
ulong raddr;
|
||||||
ret = do_shmat (first, (char *) ptr, second, &raddr);
|
ret = do_shmat (first, (char __user *) ptr, second,
|
||||||
|
&raddr);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
return put_user (raddr, (ulong *) third);
|
return put_user (raddr, (ulong __user *) third);
|
||||||
}
|
}
|
||||||
case 1: /* iBCS2 emulator entry point */
|
case 1: /* iBCS2 emulator entry point */
|
||||||
if (!segment_eq(get_fs(), get_ds()))
|
if (!segment_eq(get_fs(), get_ds()))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
return do_shmat (first, (char *) ptr, second, (ulong *) third);
|
return do_shmat (first, (char __user *) ptr, second,
|
||||||
|
(ulong *) third);
|
||||||
}
|
}
|
||||||
case SHMDT:
|
case SHMDT:
|
||||||
return sys_shmdt ((char *)ptr);
|
return sys_shmdt ((char __user *)ptr);
|
||||||
case SHMGET:
|
case SHMGET:
|
||||||
return sys_shmget (first, second, third);
|
return sys_shmget (first, second, third);
|
||||||
case SHMCTL:
|
case SHMCTL:
|
||||||
return sys_shmctl (first, second,
|
return sys_shmctl (first, second,
|
||||||
(struct shmid_ds *) ptr);
|
(struct shmid_ds __user *) ptr);
|
||||||
default:
|
default:
|
||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
}
|
}
|
||||||
|
@ -134,8 +134,8 @@ void __init serial_init(void)
|
|||||||
|
|
||||||
memset(&s, 0, sizeof(s));
|
memset(&s, 0, sizeof(s));
|
||||||
|
|
||||||
s.flags = STD_COM_FLAGS;
|
s.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST;
|
||||||
s.iotype = SERIAL_IO_MEM;
|
s.iotype = UPIO_MEM;
|
||||||
|
|
||||||
if (mips_machtype == MACH_LASAT_100) {
|
if (mips_machtype == MACH_LASAT_100) {
|
||||||
s.uartclk = LASAT_BASE_BAUD_100 * 16;
|
s.uartclk = LASAT_BASE_BAUD_100 * 16;
|
||||||
|
@ -82,8 +82,8 @@ static void __init serial_init(void)
|
|||||||
#endif
|
#endif
|
||||||
s.irq = ATLASINT_UART;
|
s.irq = ATLASINT_UART;
|
||||||
s.uartclk = ATLAS_BASE_BAUD * 16;
|
s.uartclk = ATLAS_BASE_BAUD * 16;
|
||||||
s.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ;
|
s.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_AUTO_IRQ;
|
||||||
s.iotype = SERIAL_IO_PORT;
|
s.iotype = UPIO_PORT;
|
||||||
s.regshift = 3;
|
s.regshift = 3;
|
||||||
|
|
||||||
if (early_serial_setup(&s) != 0) {
|
if (early_serial_setup(&s) != 0) {
|
||||||
|
@ -71,8 +71,8 @@ static void __init serial_init(void)
|
|||||||
#endif
|
#endif
|
||||||
s.irq = MIPSCPU_INT_BASE + MIPSCPU_INT_UART0;
|
s.irq = MIPSCPU_INT_BASE + MIPSCPU_INT_UART0;
|
||||||
s.uartclk = SEAD_BASE_BAUD * 16;
|
s.uartclk = SEAD_BASE_BAUD * 16;
|
||||||
s.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ;
|
s.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_AUTO_IRQ;
|
||||||
s.iotype = 0;
|
s.iotype = UPIO_PORT;
|
||||||
s.regshift = 3;
|
s.regshift = 3;
|
||||||
|
|
||||||
if (early_serial_setup(&s) != 0) {
|
if (early_serial_setup(&s) != 0) {
|
||||||
|
@ -88,8 +88,8 @@ static void __init serial_init(void)
|
|||||||
but poll for now */
|
but poll for now */
|
||||||
s.irq = 0;
|
s.irq = 0;
|
||||||
s.uartclk = BASE_BAUD * 16;
|
s.uartclk = BASE_BAUD * 16;
|
||||||
s.flags = ASYNC_BOOT_AUTOCONF | UPF_SKIP_TEST;
|
s.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST;
|
||||||
s.iotype = SERIAL_IO_PORT | ASYNC_SKIP_TEST;
|
s.iotype = UPIO_PORT;
|
||||||
s.regshift = 0;
|
s.regshift = 0;
|
||||||
s.timeout = 4;
|
s.timeout = 4;
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ static void inline ja_console_probe(void)
|
|||||||
up.uartclk = JAGUAR_ATX_UART_CLK;
|
up.uartclk = JAGUAR_ATX_UART_CLK;
|
||||||
up.regshift = 2;
|
up.regshift = 2;
|
||||||
up.iotype = UPIO_MEM;
|
up.iotype = UPIO_MEM;
|
||||||
up.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST;
|
up.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST;
|
||||||
up.line = 0;
|
up.line = 0;
|
||||||
|
|
||||||
if (early_serial_setup(&up))
|
if (early_serial_setup(&up))
|
||||||
|
@ -66,28 +66,28 @@ struct ip3106_port ip3106_ports[] = {
|
|||||||
[0] = {
|
[0] = {
|
||||||
.port = {
|
.port = {
|
||||||
.type = PORT_IP3106,
|
.type = PORT_IP3106,
|
||||||
.iotype = SERIAL_IO_MEM,
|
.iotype = UPIO_MEM,
|
||||||
.membase = (void __iomem *)PNX8550_UART_PORT0,
|
.membase = (void __iomem *)PNX8550_UART_PORT0,
|
||||||
.mapbase = PNX8550_UART_PORT0,
|
.mapbase = PNX8550_UART_PORT0,
|
||||||
.irq = PNX8550_UART_INT(0),
|
.irq = PNX8550_UART_INT(0),
|
||||||
.uartclk = 3692300,
|
.uartclk = 3692300,
|
||||||
.fifosize = 16,
|
.fifosize = 16,
|
||||||
.ops = &ip3106_pops,
|
.ops = &ip3106_pops,
|
||||||
.flags = ASYNC_BOOT_AUTOCONF,
|
.flags = UPF_BOOT_AUTOCONF,
|
||||||
.line = 0,
|
.line = 0,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
[1] = {
|
[1] = {
|
||||||
.port = {
|
.port = {
|
||||||
.type = PORT_IP3106,
|
.type = PORT_IP3106,
|
||||||
.iotype = SERIAL_IO_MEM,
|
.iotype = UPIO_MEM,
|
||||||
.membase = (void __iomem *)PNX8550_UART_PORT1,
|
.membase = (void __iomem *)PNX8550_UART_PORT1,
|
||||||
.mapbase = PNX8550_UART_PORT1,
|
.mapbase = PNX8550_UART_PORT1,
|
||||||
.irq = PNX8550_UART_INT(1),
|
.irq = PNX8550_UART_INT(1),
|
||||||
.uartclk = 3692300,
|
.uartclk = 3692300,
|
||||||
.fifosize = 16,
|
.fifosize = 16,
|
||||||
.ops = &ip3106_pops,
|
.ops = &ip3106_pops,
|
||||||
.flags = ASYNC_BOOT_AUTOCONF,
|
.flags = UPF_BOOT_AUTOCONF,
|
||||||
.line = 1,
|
.line = 1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -185,7 +185,7 @@ static void __init py_uart_setup(void)
|
|||||||
up.uartclk = TITAN_UART_CLK;
|
up.uartclk = TITAN_UART_CLK;
|
||||||
up.regshift = 0;
|
up.regshift = 0;
|
||||||
up.iotype = UPIO_MEM;
|
up.iotype = UPIO_MEM;
|
||||||
up.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST;
|
up.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST;
|
||||||
up.line = 0;
|
up.line = 0;
|
||||||
|
|
||||||
if (early_serial_setup(&up))
|
if (early_serial_setup(&up))
|
||||||
|
@ -66,11 +66,6 @@ static inline void str2eaddr(unsigned char *ea, unsigned char *str)
|
|||||||
#include <linux/tty.h>
|
#include <linux/tty.h>
|
||||||
#include <linux/serial.h>
|
#include <linux/serial.h>
|
||||||
#include <linux/serial_core.h>
|
#include <linux/serial_core.h>
|
||||||
extern int early_serial_setup(struct uart_port *port);
|
|
||||||
|
|
||||||
#define STD_COM_FLAGS (ASYNC_SKIP_TEST)
|
|
||||||
#define BASE_BAUD (1843200 / 16)
|
|
||||||
|
|
||||||
#endif /* CONFIG_SERIAL_8250 */
|
#endif /* CONFIG_SERIAL_8250 */
|
||||||
|
|
||||||
/* An arbitrary time; this can be decreased if reliability looks good */
|
/* An arbitrary time; this can be decreased if reliability looks good */
|
||||||
@ -110,8 +105,8 @@ void __init plat_setup(void)
|
|||||||
o2_serial[0].type = PORT_16550A;
|
o2_serial[0].type = PORT_16550A;
|
||||||
o2_serial[0].line = 0;
|
o2_serial[0].line = 0;
|
||||||
o2_serial[0].irq = MACEISA_SERIAL1_IRQ;
|
o2_serial[0].irq = MACEISA_SERIAL1_IRQ;
|
||||||
o2_serial[0].flags = STD_COM_FLAGS;
|
o2_serial[0].flags = UPF_SKIP_TEST;
|
||||||
o2_serial[0].uartclk = BASE_BAUD * 16;
|
o2_serial[0].uartclk = 1843200;
|
||||||
o2_serial[0].iotype = UPIO_MEM;
|
o2_serial[0].iotype = UPIO_MEM;
|
||||||
o2_serial[0].membase = (char *)&mace->isa.serial1;
|
o2_serial[0].membase = (char *)&mace->isa.serial1;
|
||||||
o2_serial[0].fifosize = 14;
|
o2_serial[0].fifosize = 14;
|
||||||
@ -121,8 +116,8 @@ void __init plat_setup(void)
|
|||||||
o2_serial[1].type = PORT_16550A;
|
o2_serial[1].type = PORT_16550A;
|
||||||
o2_serial[1].line = 1;
|
o2_serial[1].line = 1;
|
||||||
o2_serial[1].irq = MACEISA_SERIAL2_IRQ;
|
o2_serial[1].irq = MACEISA_SERIAL2_IRQ;
|
||||||
o2_serial[1].flags = STD_COM_FLAGS;
|
o2_serial[1].flags = UPF_SKIP_TEST;
|
||||||
o2_serial[1].uartclk = BASE_BAUD * 16;
|
o2_serial[1].uartclk = 1843200;
|
||||||
o2_serial[1].iotype = UPIO_MEM;
|
o2_serial[1].iotype = UPIO_MEM;
|
||||||
o2_serial[1].membase = (char *)&mace->isa.serial2;
|
o2_serial[1].membase = (char *)&mace->isa.serial2;
|
||||||
o2_serial[1].fifosize = 14;
|
o2_serial[1].fifosize = 14;
|
||||||
|
@ -468,19 +468,23 @@ int hpux_sysfs(int opcode, unsigned long arg1, unsigned long arg2)
|
|||||||
if ( opcode == 1 ) { /* GETFSIND */
|
if ( opcode == 1 ) { /* GETFSIND */
|
||||||
len = strlen_user((char *)arg1);
|
len = strlen_user((char *)arg1);
|
||||||
printk(KERN_DEBUG "len of arg1 = %d\n", len);
|
printk(KERN_DEBUG "len of arg1 = %d\n", len);
|
||||||
|
if (len == 0)
|
||||||
fsname = (char *) kmalloc(len+1, GFP_KERNEL);
|
return 0;
|
||||||
|
fsname = (char *) kmalloc(len, GFP_KERNEL);
|
||||||
if ( !fsname ) {
|
if ( !fsname ) {
|
||||||
printk(KERN_DEBUG "failed to kmalloc fsname\n");
|
printk(KERN_DEBUG "failed to kmalloc fsname\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( copy_from_user(fsname, (char *)arg1, len+1) ) {
|
if ( copy_from_user(fsname, (char *)arg1, len) ) {
|
||||||
printk(KERN_DEBUG "failed to copy_from_user fsname\n");
|
printk(KERN_DEBUG "failed to copy_from_user fsname\n");
|
||||||
kfree(fsname);
|
kfree(fsname);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* String could be altered by userspace after strlen_user() */
|
||||||
|
fsname[len] = '\0';
|
||||||
|
|
||||||
printk(KERN_DEBUG "that is '%s' as (char *)\n", fsname);
|
printk(KERN_DEBUG "that is '%s' as (char *)\n", fsname);
|
||||||
if ( !strcmp(fsname, "hfs") ) {
|
if ( !strcmp(fsname, "hfs") ) {
|
||||||
fstype = 0;
|
fstype = 0;
|
||||||
|
@ -66,7 +66,7 @@ _GLOBAL(load_up_fpu)
|
|||||||
#else
|
#else
|
||||||
ld r4,PACACURRENT(r13)
|
ld r4,PACACURRENT(r13)
|
||||||
addi r5,r4,THREAD /* Get THREAD */
|
addi r5,r4,THREAD /* Get THREAD */
|
||||||
ld r4,THREAD_FPEXC_MODE(r5)
|
lwz r4,THREAD_FPEXC_MODE(r5)
|
||||||
ori r12,r12,MSR_FP
|
ori r12,r12,MSR_FP
|
||||||
or r12,r12,r4
|
or r12,r12,r4
|
||||||
std r12,_MSR(r1)
|
std r12,_MSR(r1)
|
||||||
|
@ -749,11 +749,12 @@ iSeries_secondary_smp_loop:
|
|||||||
|
|
||||||
.globl decrementer_iSeries_masked
|
.globl decrementer_iSeries_masked
|
||||||
decrementer_iSeries_masked:
|
decrementer_iSeries_masked:
|
||||||
|
/* We may not have a valid TOC pointer in here. */
|
||||||
li r11,1
|
li r11,1
|
||||||
ld r12,PACALPPACAPTR(r13)
|
ld r12,PACALPPACAPTR(r13)
|
||||||
stb r11,LPPACADECRINT(r12)
|
stb r11,LPPACADECRINT(r12)
|
||||||
LOAD_REG_ADDRBASE(r12,tb_ticks_per_jiffy)
|
LOAD_REG_IMMEDIATE(r12, tb_ticks_per_jiffy)
|
||||||
lwz r12,ADDROFF(tb_ticks_per_jiffy)(r12)
|
lwz r12,0(r12)
|
||||||
mtspr SPRN_DEC,r12
|
mtspr SPRN_DEC,r12
|
||||||
/* fall through */
|
/* fall through */
|
||||||
|
|
||||||
|
@ -334,9 +334,6 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl,
|
|||||||
|
|
||||||
spin_unlock_irqrestore(&(tbl->it_lock), flags);
|
spin_unlock_irqrestore(&(tbl->it_lock), flags);
|
||||||
|
|
||||||
/* Make sure updates are seen by hardware */
|
|
||||||
mb();
|
|
||||||
|
|
||||||
DBG("mapped %d elements:\n", outcount);
|
DBG("mapped %d elements:\n", outcount);
|
||||||
|
|
||||||
/* For the sake of iommu_unmap_sg, we clear out the length in the
|
/* For the sake of iommu_unmap_sg, we clear out the length in the
|
||||||
@ -347,6 +344,10 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl,
|
|||||||
outs->dma_address = DMA_ERROR_CODE;
|
outs->dma_address = DMA_ERROR_CODE;
|
||||||
outs->dma_length = 0;
|
outs->dma_length = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Make sure updates are seen by hardware */
|
||||||
|
mb();
|
||||||
|
|
||||||
return outcount;
|
return outcount;
|
||||||
|
|
||||||
failure:
|
failure:
|
||||||
@ -358,6 +359,8 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl,
|
|||||||
npages = (PAGE_ALIGN(s->dma_address + s->dma_length) - vaddr)
|
npages = (PAGE_ALIGN(s->dma_address + s->dma_length) - vaddr)
|
||||||
>> PAGE_SHIFT;
|
>> PAGE_SHIFT;
|
||||||
__iommu_free(tbl, vaddr, npages);
|
__iommu_free(tbl, vaddr, npages);
|
||||||
|
s->dma_address = DMA_ERROR_CODE;
|
||||||
|
s->dma_length = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&(tbl->it_lock), flags);
|
spin_unlock_irqrestore(&(tbl->it_lock), flags);
|
||||||
|
@ -491,7 +491,12 @@ void __init finish_device_tree(void)
|
|||||||
size = 16;
|
size = 16;
|
||||||
finish_node(allnodes, &size, 1);
|
finish_node(allnodes, &size, 1);
|
||||||
size -= 16;
|
size -= 16;
|
||||||
end = start = (unsigned long) __va(lmb_alloc(size, 128));
|
|
||||||
|
if (0 == size)
|
||||||
|
end = start = 0;
|
||||||
|
else
|
||||||
|
end = start = (unsigned long)__va(lmb_alloc(size, 128));
|
||||||
|
|
||||||
finish_node(allnodes, &end, 0);
|
finish_node(allnodes, &end, 0);
|
||||||
BUG_ON(end != start + size);
|
BUG_ON(end != start + size);
|
||||||
|
|
||||||
@ -1398,8 +1403,8 @@ struct device_node *of_find_node_by_name(struct device_node *from,
|
|||||||
|
|
||||||
read_lock(&devtree_lock);
|
read_lock(&devtree_lock);
|
||||||
np = from ? from->allnext : allnodes;
|
np = from ? from->allnext : allnodes;
|
||||||
for (; np != 0; np = np->allnext)
|
for (; np != NULL; np = np->allnext)
|
||||||
if (np->name != 0 && strcasecmp(np->name, name) == 0
|
if (np->name != NULL && strcasecmp(np->name, name) == 0
|
||||||
&& of_node_get(np))
|
&& of_node_get(np))
|
||||||
break;
|
break;
|
||||||
if (from)
|
if (from)
|
||||||
@ -1917,3 +1922,30 @@ int prom_update_property(struct device_node *np,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_KEXEC
|
||||||
|
/* We may have allocated the flat device tree inside the crash kernel region
|
||||||
|
* in prom_init. If so we need to move it out into regular memory. */
|
||||||
|
void kdump_move_device_tree(void)
|
||||||
|
{
|
||||||
|
unsigned long start, end;
|
||||||
|
struct boot_param_header *new;
|
||||||
|
|
||||||
|
start = __pa((unsigned long)initial_boot_params);
|
||||||
|
end = start + initial_boot_params->totalsize;
|
||||||
|
|
||||||
|
if (end < crashk_res.start || start > crashk_res.end)
|
||||||
|
return;
|
||||||
|
|
||||||
|
new = (struct boot_param_header*)
|
||||||
|
__va(lmb_alloc(initial_boot_params->totalsize, PAGE_SIZE));
|
||||||
|
|
||||||
|
memcpy(new, initial_boot_params, initial_boot_params->totalsize);
|
||||||
|
|
||||||
|
initial_boot_params = new;
|
||||||
|
|
||||||
|
DBG("Flat device tree blob moved to %p\n", initial_boot_params);
|
||||||
|
|
||||||
|
/* XXX should we unreserve the old DT? */
|
||||||
|
}
|
||||||
|
#endif /* CONFIG_KEXEC */
|
||||||
|
@ -2098,6 +2098,10 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4,
|
|||||||
*/
|
*/
|
||||||
prom_init_stdout();
|
prom_init_stdout();
|
||||||
|
|
||||||
|
/* Bail if this is a kdump kernel. */
|
||||||
|
if (PHYSICAL_START > 0)
|
||||||
|
prom_panic("Error: You can't boot a kdump kernel from OF!\n");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check for an initrd
|
* Check for an initrd
|
||||||
*/
|
*/
|
||||||
|
@ -465,8 +465,10 @@ u32 *of_get_pci_address(struct device_node *dev, int bar_no, u64 *size,
|
|||||||
if (parent == NULL)
|
if (parent == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
bus = of_match_bus(parent);
|
bus = of_match_bus(parent);
|
||||||
if (strcmp(bus->name, "pci"))
|
if (strcmp(bus->name, "pci")) {
|
||||||
|
of_node_put(parent);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
bus->count_cells(dev, &na, &ns);
|
bus->count_cells(dev, &na, &ns);
|
||||||
of_node_put(parent);
|
of_node_put(parent);
|
||||||
if (!OF_CHECK_COUNTS(na, ns))
|
if (!OF_CHECK_COUNTS(na, ns))
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#include <asm/prom.h>
|
#include <asm/prom.h>
|
||||||
#include <asm/rtas.h>
|
#include <asm/rtas.h>
|
||||||
|
#include <asm/hvcall.h>
|
||||||
#include <asm/semaphore.h>
|
#include <asm/semaphore.h>
|
||||||
#include <asm/machdep.h>
|
#include <asm/machdep.h>
|
||||||
#include <asm/page.h>
|
#include <asm/page.h>
|
||||||
@ -565,6 +566,7 @@ static int ibm_suspend_me_token = RTAS_UNKNOWN_SERVICE;
|
|||||||
#ifdef CONFIG_PPC_PSERIES
|
#ifdef CONFIG_PPC_PSERIES
|
||||||
static void rtas_percpu_suspend_me(void *info)
|
static void rtas_percpu_suspend_me(void *info)
|
||||||
{
|
{
|
||||||
|
int i;
|
||||||
long rc;
|
long rc;
|
||||||
long flags;
|
long flags;
|
||||||
struct rtas_suspend_me_data *data =
|
struct rtas_suspend_me_data *data =
|
||||||
@ -587,18 +589,16 @@ static void rtas_percpu_suspend_me(void *info)
|
|||||||
|
|
||||||
if (rc == H_Continue) {
|
if (rc == H_Continue) {
|
||||||
data->waiting = 0;
|
data->waiting = 0;
|
||||||
rtas_call(ibm_suspend_me_token, 0, 1,
|
data->args->args[data->args->nargs] =
|
||||||
data->args->args);
|
rtas_call(ibm_suspend_me_token, 0, 1, NULL);
|
||||||
|
for_each_cpu(i)
|
||||||
|
plpar_hcall_norets(H_PROD,i);
|
||||||
} else {
|
} else {
|
||||||
data->waiting = -EBUSY;
|
data->waiting = -EBUSY;
|
||||||
printk(KERN_ERR "Error on H_Join hypervisor call\n");
|
printk(KERN_ERR "Error on H_Join hypervisor call\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
/* before we restore interrupts, make sure we don't
|
|
||||||
* generate a spurious soft lockup errors
|
|
||||||
*/
|
|
||||||
touch_softlockup_watchdog();
|
|
||||||
local_irq_restore(flags);
|
local_irq_restore(flags);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -672,8 +672,7 @@ static void rtas_flash_firmware(int reboot_type)
|
|||||||
static void remove_flash_pde(struct proc_dir_entry *dp)
|
static void remove_flash_pde(struct proc_dir_entry *dp)
|
||||||
{
|
{
|
||||||
if (dp) {
|
if (dp) {
|
||||||
if (dp->data != NULL)
|
kfree(dp->data);
|
||||||
kfree(dp->data);
|
|
||||||
dp->owner = NULL;
|
dp->owner = NULL;
|
||||||
remove_proc_entry(dp->name, dp->parent);
|
remove_proc_entry(dp->name, dp->parent);
|
||||||
}
|
}
|
||||||
|
@ -398,6 +398,9 @@ void __init setup_system(void)
|
|||||||
{
|
{
|
||||||
DBG(" -> setup_system()\n");
|
DBG(" -> setup_system()\n");
|
||||||
|
|
||||||
|
#ifdef CONFIG_KEXEC
|
||||||
|
kdump_move_device_tree();
|
||||||
|
#endif
|
||||||
/*
|
/*
|
||||||
* Unflatten the device-tree passed by prom_init or kexec
|
* Unflatten the device-tree passed by prom_init or kexec
|
||||||
*/
|
*/
|
||||||
|
@ -142,11 +142,7 @@ static inline int get_old_sigaction(struct k_sigaction *new_ka,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline compat_uptr_t to_user_ptr(void *kp)
|
#define to_user_ptr(p) ptr_to_compat(p)
|
||||||
{
|
|
||||||
return (compat_uptr_t)(u64)kp;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define from_user_ptr(p) compat_ptr(p)
|
#define from_user_ptr(p) compat_ptr(p)
|
||||||
|
|
||||||
static inline int save_general_regs(struct pt_regs *regs,
|
static inline int save_general_regs(struct pt_regs *regs,
|
||||||
@ -213,8 +209,8 @@ static inline int get_old_sigaction(struct k_sigaction *new_ka,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define to_user_ptr(p) (p)
|
#define to_user_ptr(p) ((unsigned long)(p))
|
||||||
#define from_user_ptr(p) (p)
|
#define from_user_ptr(p) ((void __user *)(p))
|
||||||
|
|
||||||
static inline int save_general_regs(struct pt_regs *regs,
|
static inline int save_general_regs(struct pt_regs *regs,
|
||||||
struct mcontext __user *frame)
|
struct mcontext __user *frame)
|
||||||
@ -526,7 +522,7 @@ long compat_sys_rt_sigaction(int sig, const struct sigaction32 __user *act,
|
|||||||
|
|
||||||
ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
|
ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
|
||||||
if (!ret && oact) {
|
if (!ret && oact) {
|
||||||
ret = put_user((long)old_ka.sa.sa_handler, &oact->sa_handler);
|
ret = put_user(to_user_ptr(old_ka.sa.sa_handler), &oact->sa_handler);
|
||||||
ret |= put_sigset_t(&oact->sa_mask, &old_ka.sa.sa_mask);
|
ret |= put_sigset_t(&oact->sa_mask, &old_ka.sa.sa_mask);
|
||||||
ret |= __put_user(old_ka.sa.sa_flags, &oact->sa_flags);
|
ret |= __put_user(old_ka.sa.sa_flags, &oact->sa_flags);
|
||||||
}
|
}
|
||||||
@ -675,8 +671,8 @@ long compat_sys_rt_sigqueueinfo(u32 pid, u32 sig, compat_siginfo_t __user *uinfo
|
|||||||
int compat_sys_sigaltstack(u32 __new, u32 __old, int r5,
|
int compat_sys_sigaltstack(u32 __new, u32 __old, int r5,
|
||||||
int r6, int r7, int r8, struct pt_regs *regs)
|
int r6, int r7, int r8, struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
stack_32_t __user * newstack = (stack_32_t __user *)(long) __new;
|
stack_32_t __user * newstack = compat_ptr(__new);
|
||||||
stack_32_t __user * oldstack = (stack_32_t __user *)(long) __old;
|
stack_32_t __user * oldstack = compat_ptr(__old);
|
||||||
stack_t uss, uoss;
|
stack_t uss, uoss;
|
||||||
int ret;
|
int ret;
|
||||||
mm_segment_t old_fs;
|
mm_segment_t old_fs;
|
||||||
@ -708,7 +704,7 @@ int compat_sys_sigaltstack(u32 __new, u32 __old, int r5,
|
|||||||
set_fs(old_fs);
|
set_fs(old_fs);
|
||||||
/* Copy the stack information to the user output buffer */
|
/* Copy the stack information to the user output buffer */
|
||||||
if (!ret && oldstack &&
|
if (!ret && oldstack &&
|
||||||
(put_user((long)uoss.ss_sp, &oldstack->ss_sp) ||
|
(put_user(ptr_to_compat(uoss.ss_sp), &oldstack->ss_sp) ||
|
||||||
__put_user(uoss.ss_flags, &oldstack->ss_flags) ||
|
__put_user(uoss.ss_flags, &oldstack->ss_flags) ||
|
||||||
__put_user(uoss.ss_size, &oldstack->ss_size)))
|
__put_user(uoss.ss_size, &oldstack->ss_size)))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
@ -60,8 +60,8 @@ struct rt_sigframe {
|
|||||||
struct ucontext uc;
|
struct ucontext uc;
|
||||||
unsigned long _unused[2];
|
unsigned long _unused[2];
|
||||||
unsigned int tramp[TRAMP_SIZE];
|
unsigned int tramp[TRAMP_SIZE];
|
||||||
struct siginfo *pinfo;
|
struct siginfo __user *pinfo;
|
||||||
void *puc;
|
void __user *puc;
|
||||||
struct siginfo info;
|
struct siginfo info;
|
||||||
/* 64 bit ABI allows for 288 bytes below sp before decrementing it. */
|
/* 64 bit ABI allows for 288 bytes below sp before decrementing it. */
|
||||||
char abigap[288];
|
char abigap[288];
|
||||||
|
@ -540,6 +540,9 @@ int __devinit start_secondary(void *unused)
|
|||||||
if (smp_ops->take_timebase)
|
if (smp_ops->take_timebase)
|
||||||
smp_ops->take_timebase();
|
smp_ops->take_timebase();
|
||||||
|
|
||||||
|
if (system_state > SYSTEM_BOOTING)
|
||||||
|
per_cpu(last_jiffy, cpu) = get_tb();
|
||||||
|
|
||||||
spin_lock(&call_lock);
|
spin_lock(&call_lock);
|
||||||
cpu_set(cpu, cpu_online_map);
|
cpu_set(cpu, cpu_online_map);
|
||||||
spin_unlock(&call_lock);
|
spin_unlock(&call_lock);
|
||||||
|
@ -612,10 +612,10 @@ void __init generic_calibrate_decr(void)
|
|||||||
|
|
||||||
ppc_tb_freq = DEFAULT_TB_FREQ; /* hardcoded default */
|
ppc_tb_freq = DEFAULT_TB_FREQ; /* hardcoded default */
|
||||||
node_found = 0;
|
node_found = 0;
|
||||||
if (cpu != 0) {
|
if (cpu) {
|
||||||
fp = (unsigned int *)get_property(cpu, "timebase-frequency",
|
fp = (unsigned int *)get_property(cpu, "timebase-frequency",
|
||||||
NULL);
|
NULL);
|
||||||
if (fp != 0) {
|
if (fp) {
|
||||||
node_found = 1;
|
node_found = 1;
|
||||||
ppc_tb_freq = *fp;
|
ppc_tb_freq = *fp;
|
||||||
}
|
}
|
||||||
@ -626,10 +626,10 @@ void __init generic_calibrate_decr(void)
|
|||||||
|
|
||||||
ppc_proc_freq = DEFAULT_PROC_FREQ;
|
ppc_proc_freq = DEFAULT_PROC_FREQ;
|
||||||
node_found = 0;
|
node_found = 0;
|
||||||
if (cpu != 0) {
|
if (cpu) {
|
||||||
fp = (unsigned int *)get_property(cpu, "clock-frequency",
|
fp = (unsigned int *)get_property(cpu, "clock-frequency",
|
||||||
NULL);
|
NULL);
|
||||||
if (fp != 0) {
|
if (fp) {
|
||||||
node_found = 1;
|
node_found = 1;
|
||||||
ppc_proc_freq = *fp;
|
ppc_proc_freq = *fp;
|
||||||
}
|
}
|
||||||
|
@ -144,7 +144,7 @@ unsigned int udbg_probe_uart_speed(void __iomem *comport, unsigned int clock)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PPC_MAPLE
|
#ifdef CONFIG_PPC_MAPLE
|
||||||
void udbg_maple_real_putc(unsigned char c)
|
void udbg_maple_real_putc(char c)
|
||||||
{
|
{
|
||||||
if (udbg_comport) {
|
if (udbg_comport) {
|
||||||
while ((real_readb(&udbg_comport->lsr) & LSR_THRE) == 0)
|
while ((real_readb(&udbg_comport->lsr) & LSR_THRE) == 0)
|
||||||
|
@ -197,6 +197,8 @@ long __init lmb_reserve(unsigned long base, unsigned long size)
|
|||||||
{
|
{
|
||||||
struct lmb_region *_rgn = &(lmb.reserved);
|
struct lmb_region *_rgn = &(lmb.reserved);
|
||||||
|
|
||||||
|
BUG_ON(0 == size);
|
||||||
|
|
||||||
return lmb_add_region(_rgn, base, size);
|
return lmb_add_region(_rgn, base, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -227,6 +229,8 @@ unsigned long __init lmb_alloc_base(unsigned long size, unsigned long align,
|
|||||||
long i, j;
|
long i, j;
|
||||||
unsigned long base = 0;
|
unsigned long base = 0;
|
||||||
|
|
||||||
|
BUG_ON(0 == size);
|
||||||
|
|
||||||
#ifdef CONFIG_PPC32
|
#ifdef CONFIG_PPC32
|
||||||
/* On 32-bit, make sure we allocate lowmem */
|
/* On 32-bit, make sure we allocate lowmem */
|
||||||
if (max_addr == LMB_ALLOC_ANYWHERE)
|
if (max_addr == LMB_ALLOC_ANYWHERE)
|
||||||
|
@ -435,17 +435,12 @@ void clear_user_page(void *page, unsigned long vaddr, struct page *pg)
|
|||||||
{
|
{
|
||||||
clear_page(page);
|
clear_page(page);
|
||||||
|
|
||||||
if (cpu_has_feature(CPU_FTR_COHERENT_ICACHE))
|
|
||||||
return;
|
|
||||||
/*
|
/*
|
||||||
* We shouldnt have to do this, but some versions of glibc
|
* We shouldnt have to do this, but some versions of glibc
|
||||||
* require it (ld.so assumes zero filled pages are icache clean)
|
* require it (ld.so assumes zero filled pages are icache clean)
|
||||||
* - Anton
|
* - Anton
|
||||||
*/
|
*/
|
||||||
|
flush_dcache_page(pg);
|
||||||
/* avoid an atomic op if possible */
|
|
||||||
if (test_bit(PG_arch_1, &pg->flags))
|
|
||||||
clear_bit(PG_arch_1, &pg->flags);
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(clear_user_page);
|
EXPORT_SYMBOL(clear_user_page);
|
||||||
|
|
||||||
@ -469,12 +464,7 @@ void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
|
|||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (cpu_has_feature(CPU_FTR_COHERENT_ICACHE))
|
flush_dcache_page(pg);
|
||||||
return;
|
|
||||||
|
|
||||||
/* avoid an atomic op if possible */
|
|
||||||
if (test_bit(PG_arch_1, &pg->flags))
|
|
||||||
clear_bit(PG_arch_1, &pg->flags);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void flush_icache_user_range(struct vm_area_struct *vma, struct page *page,
|
void flush_icache_user_range(struct vm_area_struct *vma, struct page *page,
|
||||||
|
@ -2,7 +2,7 @@ obj-y += interrupt.o iommu.o setup.o spider-pic.o
|
|||||||
obj-y += pervasive.o
|
obj-y += pervasive.o
|
||||||
|
|
||||||
obj-$(CONFIG_SMP) += smp.o
|
obj-$(CONFIG_SMP) += smp.o
|
||||||
obj-$(CONFIG_SPU_FS) += spufs/ spu-base.o
|
obj-$(CONFIG_SPU_FS) += spu-base.o spufs/
|
||||||
|
|
||||||
spu-base-y += spu_base.o spu_priv1.o
|
spu-base-y += spu_base.o spu_priv1.o
|
||||||
|
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
extern void chrp_nvram_init(void);
|
extern void chrp_nvram_init(void);
|
||||||
extern void chrp_get_rtc_time(struct rtc_time *);
|
extern void chrp_get_rtc_time(struct rtc_time *);
|
||||||
extern int chrp_set_rtc_time(struct rtc_time *);
|
extern int chrp_set_rtc_time(struct rtc_time *);
|
||||||
extern void chrp_calibrate_decr(void);
|
|
||||||
extern long chrp_time_init(void);
|
extern long chrp_time_init(void);
|
||||||
|
|
||||||
extern void chrp_find_bridges(void);
|
extern void chrp_find_bridges(void);
|
||||||
|
@ -204,9 +204,11 @@ static void __init setup_peg2(struct pci_controller *hose, struct device_node *d
|
|||||||
struct device_node *root = find_path_device("/");
|
struct device_node *root = find_path_device("/");
|
||||||
struct device_node *rtas;
|
struct device_node *rtas;
|
||||||
|
|
||||||
|
of_node_get(root);
|
||||||
rtas = of_find_node_by_name (root, "rtas");
|
rtas = of_find_node_by_name (root, "rtas");
|
||||||
if (rtas) {
|
if (rtas) {
|
||||||
hose->ops = &rtas_pci_ops;
|
hose->ops = &rtas_pci_ops;
|
||||||
|
of_node_put(rtas);
|
||||||
} else {
|
} else {
|
||||||
printk ("RTAS supporting Pegasos OF not found, please upgrade"
|
printk ("RTAS supporting Pegasos OF not found, please upgrade"
|
||||||
" your firmware\n");
|
" your firmware\n");
|
||||||
|
@ -506,7 +506,7 @@ void __init chrp_init(void)
|
|||||||
ppc_md.halt = rtas_halt;
|
ppc_md.halt = rtas_halt;
|
||||||
|
|
||||||
ppc_md.time_init = chrp_time_init;
|
ppc_md.time_init = chrp_time_init;
|
||||||
ppc_md.calibrate_decr = chrp_calibrate_decr;
|
ppc_md.calibrate_decr = generic_calibrate_decr;
|
||||||
|
|
||||||
/* this may get overridden with rtas routines later... */
|
/* this may get overridden with rtas routines later... */
|
||||||
ppc_md.set_rtc_time = chrp_set_rtc_time;
|
ppc_md.set_rtc_time = chrp_set_rtc_time;
|
||||||
|
@ -167,24 +167,3 @@ void chrp_get_rtc_time(struct rtc_time *tm)
|
|||||||
tm->tm_mon = mon;
|
tm->tm_mon = mon;
|
||||||
tm->tm_year = year;
|
tm->tm_year = year;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void __init chrp_calibrate_decr(void)
|
|
||||||
{
|
|
||||||
struct device_node *cpu;
|
|
||||||
unsigned int freq, *fp;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The cpu node should have a timebase-frequency property
|
|
||||||
* to tell us the rate at which the decrementer counts.
|
|
||||||
*/
|
|
||||||
freq = 16666000; /* hardcoded default */
|
|
||||||
cpu = find_type_devices("cpu");
|
|
||||||
if (cpu != 0) {
|
|
||||||
fp = (unsigned int *)
|
|
||||||
get_property(cpu, "timebase-frequency", NULL);
|
|
||||||
if (fp != 0)
|
|
||||||
freq = *fp;
|
|
||||||
}
|
|
||||||
ppc_tb_freq = freq;
|
|
||||||
}
|
|
||||||
|
@ -1052,8 +1052,7 @@ struct pmac_i2c_bus *pmac_i2c_adapter_to_bus(struct i2c_adapter *adapter)
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(pmac_i2c_adapter_to_bus);
|
EXPORT_SYMBOL_GPL(pmac_i2c_adapter_to_bus);
|
||||||
|
|
||||||
extern int pmac_i2c_match_adapter(struct device_node *dev,
|
int pmac_i2c_match_adapter(struct device_node *dev, struct i2c_adapter *adapter)
|
||||||
struct i2c_adapter *adapter)
|
|
||||||
{
|
{
|
||||||
struct pmac_i2c_bus *bus = pmac_i2c_find_bus(dev);
|
struct pmac_i2c_bus *bus = pmac_i2c_find_bus(dev);
|
||||||
|
|
||||||
|
@ -136,14 +136,14 @@ static void __init fixup_bus_range(struct device_node *bridge)
|
|||||||
|(((unsigned int)(off)) & 0xFCUL) \
|
|(((unsigned int)(off)) & 0xFCUL) \
|
||||||
|1UL)
|
|1UL)
|
||||||
|
|
||||||
static unsigned long macrisc_cfg_access(struct pci_controller* hose,
|
static volatile void __iomem *macrisc_cfg_access(struct pci_controller* hose,
|
||||||
u8 bus, u8 dev_fn, u8 offset)
|
u8 bus, u8 dev_fn, u8 offset)
|
||||||
{
|
{
|
||||||
unsigned int caddr;
|
unsigned int caddr;
|
||||||
|
|
||||||
if (bus == hose->first_busno) {
|
if (bus == hose->first_busno) {
|
||||||
if (dev_fn < (11 << 3))
|
if (dev_fn < (11 << 3))
|
||||||
return 0;
|
return NULL;
|
||||||
caddr = MACRISC_CFA0(dev_fn, offset);
|
caddr = MACRISC_CFA0(dev_fn, offset);
|
||||||
} else
|
} else
|
||||||
caddr = MACRISC_CFA1(bus, dev_fn, offset);
|
caddr = MACRISC_CFA1(bus, dev_fn, offset);
|
||||||
@ -154,14 +154,14 @@ static unsigned long macrisc_cfg_access(struct pci_controller* hose,
|
|||||||
} while (in_le32(hose->cfg_addr) != caddr);
|
} while (in_le32(hose->cfg_addr) != caddr);
|
||||||
|
|
||||||
offset &= has_uninorth ? 0x07 : 0x03;
|
offset &= has_uninorth ? 0x07 : 0x03;
|
||||||
return ((unsigned long)hose->cfg_data) + offset;
|
return hose->cfg_data + offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int macrisc_read_config(struct pci_bus *bus, unsigned int devfn,
|
static int macrisc_read_config(struct pci_bus *bus, unsigned int devfn,
|
||||||
int offset, int len, u32 *val)
|
int offset, int len, u32 *val)
|
||||||
{
|
{
|
||||||
struct pci_controller *hose;
|
struct pci_controller *hose;
|
||||||
unsigned long addr;
|
volatile void __iomem *addr;
|
||||||
|
|
||||||
hose = pci_bus_to_host(bus);
|
hose = pci_bus_to_host(bus);
|
||||||
if (hose == NULL)
|
if (hose == NULL)
|
||||||
@ -177,13 +177,13 @@ static int macrisc_read_config(struct pci_bus *bus, unsigned int devfn,
|
|||||||
*/
|
*/
|
||||||
switch (len) {
|
switch (len) {
|
||||||
case 1:
|
case 1:
|
||||||
*val = in_8((u8 *)addr);
|
*val = in_8(addr);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
*val = in_le16((u16 *)addr);
|
*val = in_le16(addr);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
*val = in_le32((u32 *)addr);
|
*val = in_le32(addr);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return PCIBIOS_SUCCESSFUL;
|
return PCIBIOS_SUCCESSFUL;
|
||||||
@ -193,7 +193,7 @@ static int macrisc_write_config(struct pci_bus *bus, unsigned int devfn,
|
|||||||
int offset, int len, u32 val)
|
int offset, int len, u32 val)
|
||||||
{
|
{
|
||||||
struct pci_controller *hose;
|
struct pci_controller *hose;
|
||||||
unsigned long addr;
|
volatile void __iomem *addr;
|
||||||
|
|
||||||
hose = pci_bus_to_host(bus);
|
hose = pci_bus_to_host(bus);
|
||||||
if (hose == NULL)
|
if (hose == NULL)
|
||||||
@ -209,16 +209,16 @@ static int macrisc_write_config(struct pci_bus *bus, unsigned int devfn,
|
|||||||
*/
|
*/
|
||||||
switch (len) {
|
switch (len) {
|
||||||
case 1:
|
case 1:
|
||||||
out_8((u8 *)addr, val);
|
out_8(addr, val);
|
||||||
(void) in_8((u8 *)addr);
|
(void) in_8(addr);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
out_le16((u16 *)addr, val);
|
out_le16(addr, val);
|
||||||
(void) in_le16((u16 *)addr);
|
(void) in_le16(addr);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
out_le32((u32 *)addr, val);
|
out_le32(addr, val);
|
||||||
(void) in_le32((u32 *)addr);
|
(void) in_le32(addr);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return PCIBIOS_SUCCESSFUL;
|
return PCIBIOS_SUCCESSFUL;
|
||||||
@ -348,25 +348,23 @@ static int u3_ht_skip_device(struct pci_controller *hose,
|
|||||||
+ (((unsigned int)bus) << 16) \
|
+ (((unsigned int)bus) << 16) \
|
||||||
+ 0x01000000UL)
|
+ 0x01000000UL)
|
||||||
|
|
||||||
static unsigned long u3_ht_cfg_access(struct pci_controller* hose,
|
static volatile void __iomem *u3_ht_cfg_access(struct pci_controller* hose,
|
||||||
u8 bus, u8 devfn, u8 offset)
|
u8 bus, u8 devfn, u8 offset)
|
||||||
{
|
{
|
||||||
if (bus == hose->first_busno) {
|
if (bus == hose->first_busno) {
|
||||||
/* For now, we don't self probe U3 HT bridge */
|
/* For now, we don't self probe U3 HT bridge */
|
||||||
if (PCI_SLOT(devfn) == 0)
|
if (PCI_SLOT(devfn) == 0)
|
||||||
return 0;
|
return NULL;
|
||||||
return ((unsigned long)hose->cfg_data) +
|
return hose->cfg_data + U3_HT_CFA0(devfn, offset);
|
||||||
U3_HT_CFA0(devfn, offset);
|
|
||||||
} else
|
} else
|
||||||
return ((unsigned long)hose->cfg_data) +
|
return hose->cfg_data + U3_HT_CFA1(bus, devfn, offset);
|
||||||
U3_HT_CFA1(bus, devfn, offset);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn,
|
static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn,
|
||||||
int offset, int len, u32 *val)
|
int offset, int len, u32 *val)
|
||||||
{
|
{
|
||||||
struct pci_controller *hose;
|
struct pci_controller *hose;
|
||||||
unsigned long addr;
|
volatile void __iomem *addr;
|
||||||
|
|
||||||
hose = pci_bus_to_host(bus);
|
hose = pci_bus_to_host(bus);
|
||||||
if (hose == NULL)
|
if (hose == NULL)
|
||||||
@ -400,13 +398,13 @@ static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn,
|
|||||||
*/
|
*/
|
||||||
switch (len) {
|
switch (len) {
|
||||||
case 1:
|
case 1:
|
||||||
*val = in_8((u8 *)addr);
|
*val = in_8(addr);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
*val = in_le16((u16 *)addr);
|
*val = in_le16(addr);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
*val = in_le32((u32 *)addr);
|
*val = in_le32(addr);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return PCIBIOS_SUCCESSFUL;
|
return PCIBIOS_SUCCESSFUL;
|
||||||
@ -416,7 +414,7 @@ static int u3_ht_write_config(struct pci_bus *bus, unsigned int devfn,
|
|||||||
int offset, int len, u32 val)
|
int offset, int len, u32 val)
|
||||||
{
|
{
|
||||||
struct pci_controller *hose;
|
struct pci_controller *hose;
|
||||||
unsigned long addr;
|
volatile void __iomem *addr;
|
||||||
|
|
||||||
hose = pci_bus_to_host(bus);
|
hose = pci_bus_to_host(bus);
|
||||||
if (hose == NULL)
|
if (hose == NULL)
|
||||||
@ -442,16 +440,16 @@ static int u3_ht_write_config(struct pci_bus *bus, unsigned int devfn,
|
|||||||
*/
|
*/
|
||||||
switch (len) {
|
switch (len) {
|
||||||
case 1:
|
case 1:
|
||||||
out_8((u8 *)addr, val);
|
out_8(addr, val);
|
||||||
(void) in_8((u8 *)addr);
|
(void) in_8(addr);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
out_le16((u16 *)addr, val);
|
out_le16(addr, val);
|
||||||
(void) in_le16((u16 *)addr);
|
(void) in_le16(addr);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
out_le32((u32 *)addr, val);
|
out_le32((u32 __iomem *)addr, val);
|
||||||
(void) in_le32((u32 *)addr);
|
(void) in_le32(addr);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return PCIBIOS_SUCCESSFUL;
|
return PCIBIOS_SUCCESSFUL;
|
||||||
@ -476,7 +474,7 @@ static struct pci_ops u3_ht_pci_ops =
|
|||||||
|(((unsigned int)(off)) & 0xfcU) \
|
|(((unsigned int)(off)) & 0xfcU) \
|
||||||
|1UL)
|
|1UL)
|
||||||
|
|
||||||
static unsigned long u4_pcie_cfg_access(struct pci_controller* hose,
|
static volatile void __iomem *u4_pcie_cfg_access(struct pci_controller* hose,
|
||||||
u8 bus, u8 dev_fn, int offset)
|
u8 bus, u8 dev_fn, int offset)
|
||||||
{
|
{
|
||||||
unsigned int caddr;
|
unsigned int caddr;
|
||||||
@ -492,14 +490,14 @@ static unsigned long u4_pcie_cfg_access(struct pci_controller* hose,
|
|||||||
} while (in_le32(hose->cfg_addr) != caddr);
|
} while (in_le32(hose->cfg_addr) != caddr);
|
||||||
|
|
||||||
offset &= 0x03;
|
offset &= 0x03;
|
||||||
return ((unsigned long)hose->cfg_data) + offset;
|
return hose->cfg_data + offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int u4_pcie_read_config(struct pci_bus *bus, unsigned int devfn,
|
static int u4_pcie_read_config(struct pci_bus *bus, unsigned int devfn,
|
||||||
int offset, int len, u32 *val)
|
int offset, int len, u32 *val)
|
||||||
{
|
{
|
||||||
struct pci_controller *hose;
|
struct pci_controller *hose;
|
||||||
unsigned long addr;
|
volatile void __iomem *addr;
|
||||||
|
|
||||||
hose = pci_bus_to_host(bus);
|
hose = pci_bus_to_host(bus);
|
||||||
if (hose == NULL)
|
if (hose == NULL)
|
||||||
@ -515,13 +513,13 @@ static int u4_pcie_read_config(struct pci_bus *bus, unsigned int devfn,
|
|||||||
*/
|
*/
|
||||||
switch (len) {
|
switch (len) {
|
||||||
case 1:
|
case 1:
|
||||||
*val = in_8((u8 *)addr);
|
*val = in_8(addr);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
*val = in_le16((u16 *)addr);
|
*val = in_le16(addr);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
*val = in_le32((u32 *)addr);
|
*val = in_le32(addr);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return PCIBIOS_SUCCESSFUL;
|
return PCIBIOS_SUCCESSFUL;
|
||||||
@ -531,7 +529,7 @@ static int u4_pcie_write_config(struct pci_bus *bus, unsigned int devfn,
|
|||||||
int offset, int len, u32 val)
|
int offset, int len, u32 val)
|
||||||
{
|
{
|
||||||
struct pci_controller *hose;
|
struct pci_controller *hose;
|
||||||
unsigned long addr;
|
volatile void __iomem *addr;
|
||||||
|
|
||||||
hose = pci_bus_to_host(bus);
|
hose = pci_bus_to_host(bus);
|
||||||
if (hose == NULL)
|
if (hose == NULL)
|
||||||
@ -547,16 +545,16 @@ static int u4_pcie_write_config(struct pci_bus *bus, unsigned int devfn,
|
|||||||
*/
|
*/
|
||||||
switch (len) {
|
switch (len) {
|
||||||
case 1:
|
case 1:
|
||||||
out_8((u8 *)addr, val);
|
out_8(addr, val);
|
||||||
(void) in_8((u8 *)addr);
|
(void) in_8(addr);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
out_le16((u16 *)addr, val);
|
out_le16(addr, val);
|
||||||
(void) in_le16((u16 *)addr);
|
(void) in_le16(addr);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
out_le32((u32 *)addr, val);
|
out_le32(addr, val);
|
||||||
(void) in_le32((u32 *)addr);
|
(void) in_le32(addr);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return PCIBIOS_SUCCESSFUL;
|
return PCIBIOS_SUCCESSFUL;
|
||||||
@ -773,8 +771,7 @@ static void __init setup_u3_ht(struct pci_controller* hose)
|
|||||||
* the reg address cell, we shall fix that by killing struct
|
* the reg address cell, we shall fix that by killing struct
|
||||||
* reg_property and using some accessor functions instead
|
* reg_property and using some accessor functions instead
|
||||||
*/
|
*/
|
||||||
hose->cfg_data = (volatile unsigned char *)ioremap(0xf2000000,
|
hose->cfg_data = ioremap(0xf2000000, 0x02000000);
|
||||||
0x02000000);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* /ht node doesn't expose a "ranges" property, so we "remove"
|
* /ht node doesn't expose a "ranges" property, so we "remove"
|
||||||
|
@ -82,8 +82,6 @@
|
|||||||
|
|
||||||
#undef SHOW_GATWICK_IRQS
|
#undef SHOW_GATWICK_IRQS
|
||||||
|
|
||||||
unsigned char drive_info;
|
|
||||||
|
|
||||||
int ppc_override_l2cr = 0;
|
int ppc_override_l2cr = 0;
|
||||||
int ppc_override_l2cr_value;
|
int ppc_override_l2cr_value;
|
||||||
int has_l2cache = 0;
|
int has_l2cache = 0;
|
||||||
|
@ -333,7 +333,7 @@ void handle_eeh_events (struct eeh_event *event)
|
|||||||
rc = eeh_reset_device(frozen_pdn, NULL);
|
rc = eeh_reset_device(frozen_pdn, NULL);
|
||||||
if (rc)
|
if (rc)
|
||||||
goto hard_fail;
|
goto hard_fail;
|
||||||
pci_walk_bus(frozen_bus, eeh_report_reset, 0);
|
pci_walk_bus(frozen_bus, eeh_report_reset, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If all devices reported they can proceed, the re-enable PIO */
|
/* If all devices reported they can proceed, the re-enable PIO */
|
||||||
@ -342,11 +342,11 @@ void handle_eeh_events (struct eeh_event *event)
|
|||||||
rc = eeh_reset_device(frozen_pdn, NULL);
|
rc = eeh_reset_device(frozen_pdn, NULL);
|
||||||
if (rc)
|
if (rc)
|
||||||
goto hard_fail;
|
goto hard_fail;
|
||||||
pci_walk_bus(frozen_bus, eeh_report_reset, 0);
|
pci_walk_bus(frozen_bus, eeh_report_reset, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tell all device drivers that they can resume operations */
|
/* Tell all device drivers that they can resume operations */
|
||||||
pci_walk_bus(frozen_bus, eeh_report_resume, 0);
|
pci_walk_bus(frozen_bus, eeh_report_resume, NULL);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -367,7 +367,7 @@ hard_fail:
|
|||||||
eeh_slot_error_detail(frozen_pdn, 2 /* Permanent Error */);
|
eeh_slot_error_detail(frozen_pdn, 2 /* Permanent Error */);
|
||||||
|
|
||||||
/* Notify all devices that they're about to go down. */
|
/* Notify all devices that they're about to go down. */
|
||||||
pci_walk_bus(frozen_bus, eeh_report_failure, 0);
|
pci_walk_bus(frozen_bus, eeh_report_failure, NULL);
|
||||||
|
|
||||||
/* Shut down the device drivers for good. */
|
/* Shut down the device drivers for good. */
|
||||||
pcibios_remove_pci_devices(frozen_bus);
|
pcibios_remove_pci_devices(frozen_bus);
|
||||||
|
@ -585,7 +585,7 @@ static int pSeries_pci_probe_mode(struct pci_bus *bus)
|
|||||||
static void pseries_kexec_cpu_down(int crash_shutdown, int secondary)
|
static void pseries_kexec_cpu_down(int crash_shutdown, int secondary)
|
||||||
{
|
{
|
||||||
/* Don't risk a hypervisor call if we're crashing */
|
/* Don't risk a hypervisor call if we're crashing */
|
||||||
if (!crash_shutdown) {
|
if (firmware_has_feature(FW_FEATURE_SPLPAR) && !crash_shutdown) {
|
||||||
unsigned long vpa = __pa(get_lppaca());
|
unsigned long vpa = __pa(get_lppaca());
|
||||||
|
|
||||||
if (unregister_vpa(hard_smp_processor_id(), vpa)) {
|
if (unregister_vpa(hard_smp_processor_id(), vpa)) {
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user